http://linux.bkbits.net/linux-2.5 torvalds@ppc970.osdl.org|ChangeSet|20040906190146|46085 torvalds # This is a BitKeeper generated diff -Nru style patch. # # drivers/scsi/scsiiom.c # 2004/08/17 13:56:00-04:00 hch@lst.de +1 -37 # clean up some more tmscsim scan logic # # drivers/scsi/scsiiom.c # 2004/07/04 18:25:48-04:00 g.liakhovetski@gmx.de +0 -12 # tmscsim: (CH) Fix error handling # # drivers/scsi/scsiiom.c # 2004/07/16 18:58:28-04:00 g.liakhovetski@gmx.de +40 -50 # SCSI tmscsim.c: fix inline compile errors # # drivers/scsi/scsiiom.c # 2004/07/06 04:47:42-05:00 g.liakhovetski@gmx.de +15 -7 # tmscsim: kernel bugzilla bug #2139 # # net/core/dev.c # 2004/08/31 01:06:39-07:00 jmoyer@redhat.com +2 -2 # netpoll: kill CONFIG_NETPOLL_RX # # net/core/dev.c # 2004/08/25 16:35:17-07:00 shemminger@osdl.org +16 -25 # [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets # # The ebtables brouting chain, traversed through the call # br_should_route_hook(), can alter a packet. The redirect target # does this, f.e., to change the MAC destination. # # Bart discovered this and proposed a patch; this is a revised version. # This version cleans up the handle_bridge code in net/core/dev.c as well # as getting rid of extra rcu_read_lock and only does the br_port checking # once. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/08/24 17:09:48-07:00 shemminger@osdl.org +4 -3 # [NET]: Another cleanup in netif_receive_skb() # # Move rcu_read_lock up a little, since it needs to be # done in both branches anyway. Also whitespace fix. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/08/24 17:07:59-07:00 shemminger@osdl.org +5 -6 # [NET]: deliver_skb() cleanup # # Cleanup of deliver_skb: get rid of unused argument and use it # in the NET_CLS_ACT hook. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/08/24 17:03:04-07:00 herbert@gondor.apana.org.au +3 -9 # [NET]: Use pskb_expand_head() instead of skb_copy() in skb_checksum_help(). # # Here is the patch that you wanted to shoot holes at :) # # The idea is simple. None of the callers of skb_checksum are passing it # skb's which are shared. They may be cloned however. But the application # checksum is always in the skb header so there is no need to linearise it. # # Supposing all these assumptions are correct, then we can avoid the overhead # of skb_copy() and get away with pskb_expand_head(). # # If the assumption is wrong, we will find out because # pskb_expand_head() will BUG() if skb_shared() is true. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # lib/kobject.c # 2004/08/25 12:30:25-07:00 greg@kroah.com +10 -9 # kobject: convert struct kobject use kref. # # Signed-off-by: Greg Kroah-Hartman # # # lib/kobject.c # 2004/08/23 23:14:58-07:00 dtor_core@ameritech.net +1 -1 # kobject: fix kobject_set_name comment. # # lib/kobject.c # 2004/08/06 13:53:24-07:00 rml@ximian.com +27 -9 # KOBJECT: add kobject_get_path # # include/linux/kobject.h # 2004/09/01 16:24:31-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # include/linux/kobject.h # 2004/08/31 21:07:01-07:00 torvalds@ppc970.osdl.org +4 -2 # Allow the compiler to notice "constant" header file. # # Both gcc and sparse will speed up tokenization by noticing # when a header file is protected by the standard preprocessor # #ifndef .. #endif exclusion. # # However, that requires that the headers actually _use_ that # standard exclusion. Some did their own little broken dance. # # drivers/base/class.c # 2004/08/07 03:27:32-07:00 thomas.koeller@baslerweb.com +7 -2 # Driver Core: fix minor class reference counting issue on the error path # # include/linux/kobject.h # 2004/08/25 12:30:25-07:00 greg@kroah.com +2 -1 # kobject: convert struct kobject use kref. # # Signed-off-by: Greg Kroah-Hartman # # # include/linux/kobject.h # 2004/08/06 13:25:03-07:00 rml@ximian.com +2 -0 # KOBJECT: add kobject_get_path # # ChangeSet # 2004/09/06 21:34:58+10:00 airlied@starflyer.(none) # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.h # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +3 -0 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.c # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +76 -28 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_context.c # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +17 -82 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +7 -2 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +2 -0 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/06 21:34:52+10:00 airlied@starflyer.(none) +1 -1 # drm: Sparc64 ffb compile fixes # # Fixup ffb driver and interfaces it uses, also avoid bus_to_virt # on sparc, I'll look into using the proper APIs for the DRM soon. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/06 20:26:50+10:00 airlied@starflyer.(none) # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx_drv.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +1 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_drv.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +1 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +6 -1 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_irq.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +5 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_cp.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -7 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_state.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +6 -1 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_irq.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +6 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_cce.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -7 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_irq.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +6 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_dma.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +6 -3 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -7 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_irq.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +8 -4 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +5 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_drv.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +1 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_dma.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +5 -1 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -4 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_irq.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +4 -4 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +4 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_dma.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +11 -3 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -13 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_drv.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +1 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_dma.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +4 -4 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -12 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +8 -8 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +0 -6 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -47 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_context.c # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +17 -0 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_vm.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +11 -10 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_os_linux.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -2 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_irq.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +39 -38 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_ioctl.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +3 -3 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +29 -46 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_dma.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +2 -38 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +17 -3 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/06 20:26:43+10:00 airlied@starflyer.(none) +21 -23 # drm: remove __HAVE_DMA/IRQ and mapping offset macros # # Remove __HAVE_DMA and __HAVE_IRQ and associated macros. # Also remove GET_MAP related macros... # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/05 23:04:09-07:00 zwane@linuxpower.ca # [PATCH] Correct ELF section used for out of line spinlocks # # Anton Blanchard noted that vmlinux.lds is using .lock.text but # __lockfunc was using .spinlock.text. # # Make them consistent. # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-generic/vmlinux.lds.h # 2004/09/05 12:59:53-07:00 zwane@linuxpower.ca +1 -1 # Correct ELF section used for out of line spinlocks # # ChangeSet # 2004/09/05 23:01:38-07:00 torvalds@ppc970.osdl.org # Merge bk://are.twiddle.net/axp-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # arch/alpha/kernel/osf_sys.c # 2004/09/05 23:01:34-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/09/05 18:05:06-07:00 rth@kanga.twiddle.home # [ALPHA] Fix raising of ieee exceptions from userland software. # # include/asm-alpha/sysinfo.h # 2004/09/05 18:04:28-07:00 rth@kanga.twiddle.home +1 -0 # Add SSI_IEEE_RAISE_EXCEPTION. # # arch/alpha/kernel/osf_sys.c # 2004/09/05 18:04:28-07:00 rth@kanga.twiddle.home +30 -10 # Never send signals for SSI_IEEE_FP_CONTROL. # Implement SSI_IEEE_RAISE_EXCEPTION for that. # # ChangeSet # 2004/09/06 09:49:04+10:00 hch@sgi.com # [XFS] Fix use of AIO wait_on_sync_kiocb and a deadlock in O_SYNC # inode semaphore handling. # # fs/xfs/linux-2.6/xfs_lrw.c # 2004/09/06 09:48:39+10:00 hch@sgi.com +10 -3 # [XFS] Fix use of AIO wait_on_sync_kiocb and a deadlock in O_SYNC # inode semaphore handling. # # fs/xfs/linux-2.6/xfs_file.c # 2004/09/06 09:48:39+10:00 hch@sgi.com +0 -4 # [XFS] Fix use of AIO wait_on_sync_kiocb and a deadlock in O_SYNC # inode semaphore handling. # # ChangeSet # 2004/09/06 09:35:41+10:00 hch@sgi.com # [XFS] Remove a readahead page allocation failure warning, this will # happen under normal workloads and does not indicate a problem. # # fs/xfs/linux-2.6/xfs_buf.c # 2004/09/06 09:35:16+10:00 hch@sgi.com +1 -4 # [XFS] Remove a readahead page allocation failure warning, this will # happen under normal workloads and does not indicate a problem. # # ChangeSet # 2004/09/06 09:19:02+10:00 tes@sgi.com # [XFS] Fix up header length miscalculation affecting version 1 logs. # # SGI Modid: xfs-linux:xfs-kern:178055a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_log.c # 2004/09/06 09:18:37+10:00 tes@sgi.com +7 -3 # [XFS] Fix up header length miscalculation affecting version 1 logs. # # ChangeSet # 2004/09/05 23:05:44+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # Patch from Ben Dooks # # Include the central code for detecting the cpu in use, # and initialising it's IO. Updated all mach-XXX.c files to # use this new init. # # Added the first stage of the new serial port code by # calling s3c2410_init_uarts() instead of just setting # a variable. # # Updates mach-h1940.c to prefix with h1940_ instead of ipaq_ # # Small fixes for redundant code # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/s3c2410.h # 2004/09/05 21:36:34+01:00 ben-linux@org.rmk.(none) +3 -0 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/s3c2410.c # 2004/09/05 21:46:12+01:00 ben-linux@org.rmk.(none) +11 -16 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/mach-vr1000.c # 2004/09/05 21:33:21+01:00 ben-linux@org.rmk.(none) +4 -6 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/mach-smdk2410.c # 2004/09/05 21:32:09+01:00 ben-linux@org.rmk.(none) +5 -3 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/mach-h1940.c # 2004/09/05 21:33:37+01:00 ben-linux@org.rmk.(none) +12 -13 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/mach-bast.c # 2004/09/05 22:08:16+01:00 ben-linux@org.rmk.(none) +24 -3 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/cpu.h # 2004/09/05 21:20:03+01:00 ben-linux@org.rmk.(none) +41 -0 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/Makefile # 2004/09/05 21:20:03+01:00 ben-linux@org.rmk.(none) +15 -8 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/cpu.h # 2004/09/05 21:20:03+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/cpu.h # # arch/arm/mach-s3c2410/cpu.c # 2004/09/05 21:40:24+01:00 ben-linux@org.rmk.(none) +152 -0 # [PATCH] 2076/1: S3C2410 - s3c2440 support and machine updates # # arch/arm/mach-s3c2410/cpu.c # 2004/09/05 21:40:24+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/cpu.c # # ChangeSet # 2004/09/05 20:42:25+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2039/1: 2033/6 resubmission # # Patch from Dave Jiang # # Rewrite if uncompress.h to use the proper machine_is_X function call. # # include/asm-arm/mach/pci.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +4 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/vmalloc.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +1 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/uncompress.h # 2004/08/19 23:16:10+01:00 dave.jiang@com.rmk.(none) +25 -5 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/timex.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +6 -2 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/system.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +8 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/serial.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +47 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/memory.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +11 -2 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/irqs.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +5 -7 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iq80331.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +38 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iq80321.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +25 -7 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iq31244.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +36 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iop331-irqs.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +113 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iop321.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +84 -11 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iop321-irqs.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +21 -5 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/hardware.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +27 -11 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/dma.h # 2004/08/19 17:56:53+01:00 dave.jiang@com.rmk.(none) +0 -38 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iq80331.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/iq80331.h # # include/asm-arm/arch-iop3xx/iq31244.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/iq31244.h # # include/asm-arm/arch-iop3xx/iop331-irqs.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/iop331-irqs.h # # include/asm-arm/arch-iop3xx/iop331.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +342 -0 # [PATCH] 2039/1: 2033/6 resubmission # # include/asm-arm/arch-iop3xx/iop331.h # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-iop3xx/iop331.h # # ChangeSet # 2004/09/05 20:37:06+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2049/1: 2037/1 (2033/5) resubmission # # Patch from Dave Jiang # # arch/arm/mm # # Removed offending #ifdefs for MACH names. Grouped into different IOP families. # # arch/arm/mm/proc-xscale.S # 2004/08/26 00:31:36+01:00 dave.jiang@com.rmk.(none) +30 -9 # [PATCH] 2049/1: 2037/1 (2033/5) resubmission # # ChangeSet # 2004/09/05 20:32:12+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # Patch from Dave Jiang # # arch/arm/mach-iop3xx update # Removed busy while loop and replaced with mdelay() from patch 2036/1 # # arch/arm/mach-iop3xx/iq80321-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +63 -20 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop321-time.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +55 -9 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop321-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +17 -48 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop321-irq.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +2 -1 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq80331-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +138 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq80331-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +36 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq80321-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +44 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq31244-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +134 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq31244-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +44 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop331-time.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +141 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop331-setup.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +102 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop331-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +219 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop331-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +43 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop331-irq.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +127 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/arch.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +15 -15 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/Makefile # 2004/08/19 17:52:27+01:00 dave.jiang@com.rmk.(none) +8 -5 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/Kconfig # 2004/08/19 17:51:58+01:00 dave.jiang@com.rmk.(none) +30 -16 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iq80331-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq80331-pci.c # # arch/arm/mach-iop3xx/iq80331-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq80331-mm.c # # arch/arm/mach-iop3xx/iq80321-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq80321-mm.c # # arch/arm/mach-iop3xx/iq31244-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq31244-pci.c # # arch/arm/mach-iop3xx/iq31244-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iq31244-mm.c # # arch/arm/mach-iop3xx/iop331-time.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop331-time.c # # arch/arm/mach-iop3xx/iop331-setup.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop331-setup.c # # arch/arm/mach-iop3xx/iop331-pci.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop331-pci.c # # arch/arm/mach-iop3xx/iop331-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop331-mm.c # # arch/arm/mach-iop3xx/iop331-irq.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop331-irq.c # # arch/arm/mach-iop3xx/iop321-setup.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +63 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop321-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +43 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/iop321-setup.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop321-setup.c # # arch/arm/mach-iop3xx/iop321-mm.c # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/iop321-mm.c # # arch/arm/mach-iop3xx/common.c # 2004/08/26 00:07:46+01:00 dave.jiang@com.rmk.(none) +75 -0 # [PATCH] 2048/1: Patch 2036/1 (2033/4) resubmission # # arch/arm/mach-iop3xx/common.c # 2004/08/26 00:07:46+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-iop3xx/common.c # # ChangeSet # 2004/09/05 20:23:19+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2035/1: 2033/3 - IOP3xx patch submission (3/6) # # Patch from Dave Jiang # # arch/arm/kernel changes # # arch/arm/kernel/entry-armv.S # 2004/08/19 17:53:59+01:00 dave.jiang@com.rmk.(none) +33 -0 # [PATCH] 2035/1: 2033/3 - IOP3xx patch submission (3/6) # # arch/arm/kernel/debug.S # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +10 -2 # [PATCH] 2035/1: 2033/3 - IOP3xx patch submission (3/6) # # ChangeSet # 2004/09/05 20:19:16+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2034/1: 2033/2 - IOP3xx patch submission (2/6) # # Patch from Dave Jiang # # arch/arm/configs # updates for defconfigs for all IOP platforms # # arch/arm/configs/iq80331_defconfig # 2004/08/19 18:31:46+01:00 dave.jiang@com.rmk.(none) +753 -0 # [PATCH] 2034/1: 2033/2 - IOP3xx patch submission (2/6) # # arch/arm/configs/iq31244_defconfig # 2004/08/19 18:29:07+01:00 dave.jiang@com.rmk.(none) +818 -0 # [PATCH] 2034/1: 2033/2 - IOP3xx patch submission (2/6) # # arch/arm/configs/iq80331_defconfig # 2004/08/19 18:31:46+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/iq80331_defconfig # # arch/arm/configs/iq80321_defconfig # 2004/08/19 18:26:08+01:00 dave.jiang@com.rmk.(none) +61 -137 # [PATCH] 2034/1: 2033/2 - IOP3xx patch submission (2/6) # # arch/arm/configs/iq31244_defconfig # 2004/08/19 18:29:07+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/iq31244_defconfig # # arch/arm/configs/ep80219_defconfig # 2004/08/19 18:34:38+01:00 dave.jiang@com.rmk.(none) +849 -0 # [PATCH] 2034/1: 2033/2 - IOP3xx patch submission (2/6) # # arch/arm/configs/ep80219_defconfig # 2004/08/19 18:34:38+01:00 dave.jiang@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/ep80219_defconfig # # ChangeSet # 2004/09/05 15:15:27-04:00 margitsw@t-online.de # [PATCH] prism54 Bug - Fix frequency reporting # # * prism54_get_freq is incorrectly returning channel # * and not frequency. Wireless tools detect this, but # * other programs do not, leading to insane reported # * values. (As Jean documents, drivers should really be # * reporting the frequency). # * An example is wavemon. # # drivers/net/wireless/prism54/isl_ioctl.c # 2004/09/05 04:16:55-04:00 margitsw@t-online.de +3 -2 # prism54 Bug - Fix frequency reporting # # ChangeSet # 2004/09/05 20:14:41+01:00 dave.jiang@com.rmk.(none) # [ARM PATCH] 2033/1: IOP3xx patch submission (1/6) # # Patch from Dave Jiang # # This patch depends on the applied patches of 1963/1 2017/1 # This is the arch/arm/boot directory # # As to address RMK's previous questions in head-xscale.S, all that are workarounds # for improper things coming from redboot. Currently the distribution redboot for IOP does not pass in correct MACH ID or setup the memory map correctly after exec (according to Deepak). So we have to fix it. I'm working on pushing the IOP redboot developer to fix those things at a later date. # # arch/arm/boot/compressed/head.S # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +9 -0 # [PATCH] 2033/1: IOP3xx patch submission (1/6) # # arch/arm/boot/compressed/head-xscale.S # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +15 -0 # [PATCH] 2033/1: IOP3xx patch submission (1/6) # # arch/arm/boot/Makefile # 2004/08/19 17:51:11+01:00 dave.jiang@com.rmk.(none) +6 -0 # [PATCH] 2033/1: IOP3xx patch submission (1/6) # # ChangeSet # 2004/09/05 15:09:12-04:00 khc@pm.waw.pl # [PATCH] fix for integer overflow in hd6457[02] driver code # # The attached patch fixes an integer overflow in drivers for N2, C101, # PCI200SYN WAN cards (brv * port->settings.clock_rate overflowed at # requested clock rate of 8*1024*1024 bps, problem noted by Nagaraj Kanniah). # # drivers/net/wan/hd6457x.c # 2004/09/05 09:59:22-04:00 khc@pm.waw.pl +3 -3 # fix for integer overflow in hd6457[02] driver code # # ChangeSet # 2004/09/05 18:26:49+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2058/2: S3C2410 - Add PWM devices, update ID on existing devices # # Patch from Ben Dooks # # Add PWM timers 0 through 3 # # Update ID on single devices to -1 # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/devs.h # 2004/09/05 17:56:00+01:00 ben-linux@org.rmk.(none) +7 -2 # [PATCH] 2058/2: S3C2410 - Add PWM devices, update ID on existing devices # # arch/arm/mach-s3c2410/devs.c # 2004/09/05 17:57:43+01:00 ben-linux@org.rmk.(none) +111 -9 # [PATCH] 2058/2: S3C2410 - Add PWM devices, update ID on existing devices # # ChangeSet # 2004/09/05 10:20:12-07:00 drzeus-list@drzeus.cx # [PATCH] x86-64: split timer resources # # This splits timer resource from 0x40-0x5f to 0x40-0x43, 0x50-053 for # x86_64. A patch doing this for i386 was released earlier. Forgot that # we have two x86 platforms. # # arch/x86_64/kernel/setup.c # 2004/09/05 05:54:32-07:00 drzeus-list@drzeus.cx +2 -1 # x86-64: split timer resources # # ChangeSet # 2004/09/05 17:58:44+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2029/1: S3C2410 - nand controller register definitions # # Patch from Ben Dooks # # NAND flash controller register definitions # # include/asm-arm/arch-s3c2410/regs-nand.h # 2004/08/19 00:07:58+01:00 ben-linux@org.rmk.(none) +43 -0 # [PATCH] 2029/1: S3C2410 - nand controller register definitions # # include/asm-arm/arch-s3c2410/regs-nand.h # 2004/08/19 00:07:58+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-nand.h # # ChangeSet # 2004/09/05 17:54:24+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2028/1: S3C2410 - SDIO/MMC register definitions # # Patch from Ben Dooks # # Definitions for the SDIO/MMC controller on the S3C2410 # # include/asm-arm/arch-s3c2410/regs-sdi.h # 2004/08/18 23:45:14+01:00 ben-linux@org.rmk.(none) +112 -0 # [PATCH] 2028/1: S3C2410 - SDIO/MMC register definitions # # include/asm-arm/arch-s3c2410/regs-sdi.h # 2004/08/18 23:45:14+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-sdi.h # # ChangeSet # 2004/09/05 16:43:40+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2074/1: S3C2410 - fix reboot by watchdog # # Patch from Ben Dooks # # Fix erroneously removed IO region which causes the reboot # by watchdog to fail to reboot with an OOPS. # # Thanks to Herber Potzl for finding this. # # Signed-off-by: Ben Dooks # # arch/arm/mach-s3c2410/s3c2410.c # 2004/09/02 19:25:06+01:00 ben-linux@org.rmk.(none) +1 -0 # [PATCH] 2074/1: S3C2410 - fix reboot by watchdog # # ChangeSet # 2004/09/05 16:39:32+01:00 elf@com.rmk.(none) # [ARM PATCH] 2072/1: lh7a40x Timer device change # # Patch from Marc Singer # # This patch changes the system jiffies timer to use TIMER2 so that a # given platform can use TIMER1 to drive the buzzer. Note that only # TIMER1 can be used to drive a buzzer. # # Signed-off-by: Marc Singer # # # # arch/arm/mach-lh7a40x/time.c # 2004/08/31 23:17:13+01:00 elf@com.rmk.(none) +4 -4 # [PATCH] 2072/1: lh7a40x Timer device change # # ChangeSet # 2004/09/05 16:35:02+01:00 bo.henriksen@com.rmk.(none) # [ARM PATCH] 2065/1: LH7A40X UDC ARCH changes # # Patch from Bo Henriksen # # This patch is part of the UDC driver for the lh7a40x sdk. # Please submit this patch for 2.6.9, otherwise the UDC driver will not work. # # arch/arm/mach-lh7a40x/arch-lpd7a40x.c # 2004/08/12 09:33:21+01:00 bo.henriksen@com.rmk.(none) +4 -7 # [PATCH] 2065/1: LH7A40X UDC ARCH changes # # ChangeSet # 2004/09/05 16:30:43+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2063/1: BAST - CPLD register updates # # Patch from Ben Dooks # # Added CTRL2,CTLR3 and CTRL4 definitions to bast-cpld.h # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/bast-cpld.h # 2004/08/31 00:50:05+01:00 ben-linux@org.rmk.(none) +34 -1 # [PATCH] 2063/1: BAST - CPLD register updates # # ChangeSet # 2004/09/05 16:26:20+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2062/2: Initial support for s3c2440 cpus # # Patch from Ben Dooks # # Resend of Patch 2062/1 with the commenbts from rmk # applied, so that CPU_S3C2410 / CPU_S3C2440 are # automatically selected without user intervention # # Signed-off-by: Ben Dooks # # include/asm-arm/arch-s3c2410/regs-gpioj.h # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +100 -0 # [PATCH] 2062/2: Initial support for s3c2440 cpus # # arch/arm/mach-s3c2410/s3c2440.h # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +18 -0 # [PATCH] 2062/2: Initial support for s3c2440 cpus # # include/asm-arm/arch-s3c2410/regs-gpioj.h # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-gpioj.h # # include/asm-arm/arch-s3c2410/regs-clock.h # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +26 -0 # [PATCH] 2062/2: Initial support for s3c2440 cpus # # arch/arm/mach-s3c2410/s3c2440.h # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/s3c2440.h # # arch/arm/mach-s3c2410/Kconfig # 2004/08/31 15:59:09+01:00 ben-linux@org.rmk.(none) +19 -1 # [PATCH] 2062/2: Initial support for s3c2440 cpus # # arch/arm/mach-s3c2410/s3c2440.c # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +192 -0 # [PATCH] 2062/2: Initial support for s3c2440 cpus # # arch/arm/mach-s3c2410/s3c2440.c # 2004/08/31 15:54:59+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/s3c2440.c # # ChangeSet # 2004/09/05 16:21:35+01:00 david-b@net.rmk.(none) # [ARM PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # Patch from David Brownell # # This makes /proc/cpuinfo more accurate on many ARM processors, so that # for example ARMv5TEJ processors always show they have Thumb (T), # EDSP (E), and Java (J) capability. # # arch/arm/mm/proc-v6.S # 2004/08/29 18:49:30+01:00 david-b@net.rmk.(none) +1 -1 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # arch/arm/mm/proc-arm926.S # 2004/08/29 18:31:37+01:00 david-b@net.rmk.(none) +1 -1 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # arch/arm/mm/proc-arm1026.S # 2004/08/29 18:37:06+01:00 david-b@net.rmk.(none) +1 -1 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # arch/arm/mm/proc-arm1022.S # 2004/08/29 18:36:17+01:00 david-b@net.rmk.(none) +1 -1 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # arch/arm/mm/proc-arm1020e.S # 2004/08/29 18:35:59+01:00 david-b@net.rmk.(none) +1 -1 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # arch/arm/kernel/setup.c # 2004/08/28 22:37:35+01:00 david-b@net.rmk.(none) +1 -0 # [PATCH] 2060/1: make /proc/cpuinfo report missing EDSP and Java support # # ChangeSet # 2004/09/04 20:42:57-07:00 viro@www.linux.org.uk # [PATCH] quota minor endianness fixes # # missing le32_to_cpu() in printk # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/quota_v2.c # 2004/09/04 16:07:39-07:00 viro@www.linux.org.uk +1 -1 # quota minor endianness fixes # # ChangeSet # 2004/09/04 20:42:46-07:00 viro@www.linux.org.uk # [PATCH] UDF endianness fixes # # Lots of crap. It looks like the thing had never been really tested on # big-endian boxen... Aside of usual "forgot to convert" bugs there's a cute # one - foo->le16field = cpu_to_le32(bar) does not work on big-endian... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/udf/super.c # 2004/09/04 16:07:17-07:00 viro@www.linux.org.uk +4 -3 # UDF endianness fixes # # fs/udf/partition.c # 2004/09/04 16:07:06-07:00 viro@www.linux.org.uk +5 -5 # UDF endianness fixes # # fs/udf/namei.c # 2004/09/04 16:06:52-07:00 viro@www.linux.org.uk +1 -1 # UDF endianness fixes # # fs/udf/inode.c # 2004/09/04 16:06:22-07:00 viro@www.linux.org.uk +6 -6 # UDF endianness fixes # # ChangeSet # 2004/09/04 20:42:34-07:00 viro@www.linux.org.uk # [PATCH] acorn partitions endianness fixes # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/partitions/acorn.c # 2004/09/04 16:05:45-07:00 viro@www.linux.org.uk +1 -1 # acorn partitions endianness fixes # # ChangeSet # 2004/09/04 20:42:22-07:00 viro@www.linux.org.uk # [PATCH] msdos and vfat endianness fixes # # Some callers of fat_date_unix2dos() (in msdos/namei.c and vfat/namei.c) # forgot to convert returned host-endian date and time to little-endian. # Since all callers want to get little-endian values, moved the conversion # into function itself. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/fat/misc.c # 2004/09/04 16:05:22-07:00 viro@www.linux.org.uk +3 -3 # msdos and vfat endianness fixes # # fs/fat/inode.c # 2004/09/04 16:04:54-07:00 viro@www.linux.org.uk +1 -5 # msdos and vfat endianness fixes # # fs/fat/dir.c # 2004/09/04 16:04:43-07:00 viro@www.linux.org.uk +4 -4 # msdos and vfat endianness fixes # # ChangeSet # 2004/09/04 20:42:10-07:00 viro@www.linux.org.uk # [PATCH] ext2 endianness fixes # # Several places printk a little-endian number without any conversions. # Ones in super.c are particulary unpleasant - there we are getting told that # fs couldn't be mounted because of the following set of incompat features # and it would be nice to have the printed number matching what one could # find in headers... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/ext2/super.c # 2004/09/04 16:04:15-07:00 viro@www.linux.org.uk +10 -8 # ext2 endianness fixes # # fs/ext2/ialloc.c # 2004/09/04 16:04:21-07:00 viro@www.linux.org.uk +2 -2 # ext2 endianness fixes # # fs/ext2/balloc.c # 2004/09/04 16:04:24-07:00 viro@www.linux.org.uk +2 -2 # ext2 endianness fixes # # ChangeSet # 2004/09/04 20:42:00-07:00 viro@www.linux.org.uk # [PATCH] adfs endianness fixes # # Thus starts the series of endianness problems found by sparse tricks.. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/adfs/super.c # 2004/09/04 16:03:13-07:00 viro@www.linux.org.uk +4 -4 # adfs endianness fixes # # ChangeSet # 2004/09/05 10:55:41+10:00 airlied@starflyer.(none) # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +27 -5 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drv.h # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +3 -0 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +0 -3 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_fops.h # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +10 -2 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +3 -0 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/05 10:55:34+10:00 airlied@starflyer.(none) +3 -4 # remove DRIVER_FILE_FIELDS, replace with a private driver structure # allocated in open helper and freed in free_filp_priv. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/05 10:30:54+10:00 airlied@starflyer.(none) # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -3 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_state.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -4 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_drv.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +0 -1 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_scatter.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +6 -0 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +7 -25 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_context.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +1 -5 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +4 -19 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/05 10:30:48+10:00 airlied@starflyer.(none) +2 -13 # Drop __HAVE_CTX_BITMAP, __HAVE_SG, __HAVE_PCI_DMA, these are # fairly straightforward removals.. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/04 16:48:06-07:00 torvalds@ppc970.osdl.org # ppc64: move C declaration in ptrace.h into "ifndef __ASSEMBLY__" # # The assembler gets quite confused otherwise. # # include/asm-ppc64/ptrace.h # 2004/09/04 16:48:00-07:00 torvalds@ppc970.osdl.org +7 -7 # ppc64: move C declaration in ptrace.h into "ifndef __ASSEMBLY__" # # The assembler gets quite confused otherwise. # # ChangeSet # 2004/09/05 09:22:49+10:00 airlied@starflyer.(none) # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx_drv.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +2 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -1 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_mm.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_cp.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +7 -7 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_state.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_cce.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +6 -6 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_dma.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_dma.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_dma.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_dma.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +0 -4 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_vm.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +13 -10 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_os_linux.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +26 -0 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_memory_debug.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +1 -1 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_memory.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +23 -14 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +31 -38 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +24 -24 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_agpsupport.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +2 -3 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/05 09:22:42+10:00 airlied@starflyer.(none) +33 -18 # Remove __HAVE_AGP and __HAVE_MTRR, add driver features bitmask, # Cleaned up a lot of #ifdef in functions using suggestions from Arjan. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/04 16:19:46-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / other # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # arch/sparc/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/sh64/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/sh/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/s390/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/parisc/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/mips/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/ia64/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # arch/alpha/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / other # # ChangeSet # 2004/09/04 16:19:34-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / sparc64 # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-sparc64/spinlock.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +112 -10 # out-of-line locks / sparc64 # # include/asm-sparc64/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +4 -0 # out-of-line locks / sparc64 # # arch/sparc64/lib/debuglocks.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / sparc64 # # arch/sparc64/lib/Makefile # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +2 -2 # out-of-line locks / sparc64 # # arch/sparc64/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / sparc64 # # arch/sparc64/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +13 -0 # out-of-line locks / sparc64 # # BitKeeper/deleted/.del-splock.S~cdf7ba4d17642e37 # 2004/09/04 16:19:28-07:00 zwane@linuxpower.ca +0 -0 # Delete: arch/sparc64/lib/splock.S # # BitKeeper/deleted/.del-rwlock.S~2a36dc095322fd90 # 2004/09/04 16:19:28-07:00 zwane@linuxpower.ca +0 -0 # Delete: arch/sparc64/lib/rwlock.S # # ChangeSet # 2004/09/04 16:19:22-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / ppc64 # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-ppc64/spinlock.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +123 -145 # out-of-line locks / ppc64 # # include/asm-ppc64/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +5 -0 # out-of-line locks / ppc64 # # arch/ppc64/lib/locks.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +7 -209 # out-of-line locks / ppc64 # # arch/ppc64/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / ppc64 # # arch/ppc64/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +14 -0 # out-of-line locks / ppc64 # # ChangeSet # 2004/09/04 16:19:10-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / ppc32 # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-ppc/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +5 -0 # out-of-line locks / ppc32 # # arch/ppc/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / ppc32 # # arch/ppc/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +14 -0 # out-of-line locks / ppc32 # # ChangeSet # 2004/09/04 16:18:59-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / x86_64 # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-x86_64/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +4 -0 # out-of-line locks / x86_64 # # arch/x86_64/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / x86_64 # # arch/x86_64/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +13 -0 # out-of-line locks / x86_64 # # ChangeSet # 2004/09/04 16:18:47-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / i386 # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-i386/spinlock.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +4 -6 # out-of-line locks / i386 # # include/asm-i386/rwlock.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +10 -22 # out-of-line locks / i386 # # include/asm-i386/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +4 -0 # out-of-line locks / i386 # # arch/i386/oprofile/op_model_ppro.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / i386 # # arch/i386/oprofile/op_model_p4.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / i386 # # arch/i386/oprofile/op_model_athlon.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / i386 # # arch/i386/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / i386 # # arch/i386/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +13 -0 # out-of-line locks / i386 # # ChangeSet # 2004/09/04 16:18:35-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / arm # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # include/asm-arm/ptrace.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +5 -0 # out-of-line locks / arm # # arch/arm/oprofile/op_model_xscale.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +2 -2 # out-of-line locks / arm # # arch/arm/kernel/vmlinux.lds.S # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -0 # out-of-line locks / arm # # arch/arm/kernel/time.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +16 -1 # out-of-line locks / arm # # ChangeSet # 2004/09/04 16:18:26-07:00 zwane@linuxpower.ca # [PATCH] out-of-line locks / generic # # This patch achieves out of line spinlocks by creating kernel/spinlock.c # and using the _raw_* inline locking functions. # # Now, as much as this is supposed to be arch agnostic, there was still a # fair amount of rummaging about in archs, mostly for the cases where the # arch already has out of line locks and i wanted to avoid the extra call, # saving that extra call also makes lock profiling easier. PPC32/64 was # an example of such an arch and i have added the necessary profile_pc() # function as an example. # # Size differences are with CONFIG_PREEMPT enabled since we wanted to # determine how much could be saved by moving that lot out of line too. # # ppc64 = 259897 bytes: # text data bss dec hex filename # 5489808 1962724 709064 8161596 7c893c vmlinux-after # 5749577 1962852 709064 8421493 808075 vmlinux-before # # sparc64 = 193368 bytes: # text data bss dec hex filename # 3472037 633712 308920 4414669 435ccd vmlinux-after # 3665285 633832 308920 4608037 465025 vmlinux-before # # i386 = 416075 bytes # text data bss dec hex filename # 5808371 867442 326864 7002677 6ada35 vmlinux-after # 6221254 870634 326864 7418752 713380 vmlinux-before # # x86-64 = 282446 bytes # text data bss dec hex filename # 4598025 1450644 523632 6572301 64490d vmlinux-after # 4881679 1449436 523632 6854747 68985b vmlinux-before # # It has been compile tested (UP, SMP, PREEMPT) on i386, x86-64, sparc, # sparc64, ppc64, ppc32 and runtime tested on i386, x86-64 and sparc64. # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Linus Torvalds # # kernel/spinlock.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +258 -0 # out-of-line locks / generic # # kernel/spinlock.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/kernel/spinlock.c # # kernel/Makefile # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / generic # # include/linux/spinlock.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +160 -91 # out-of-line locks / generic # # include/asm-generic/vmlinux.lds.h # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +5 -0 # out-of-line locks / generic # # drivers/oprofile/timer_int.c # 2004/09/03 16:55:27-07:00 zwane@linuxpower.ca +1 -1 # out-of-line locks / generic # # ChangeSet # 2004/09/04 15:31:30-07:00 Andries.Brouwer@cwi.nl # [PATCH] fat: add static # # In the long sequence of static additions, here some fat ones. # # include/linux/msdos_fs.h # 2004/09/04 14:51:33-07:00 Andries.Brouwer@cwi.nl +0 -2 # fat: add static # # fs/fat/inode.c # 2004/09/04 14:51:33-07:00 Andries.Brouwer@cwi.nl +9 -9 # fat: add static # # fs/fat/cache.c # 2004/09/04 14:51:33-07:00 Andries.Brouwer@cwi.nl +2 -1 # fat: add static # # ChangeSet # 2004/09/03 19:28:42-07:00 torvalds@ppc970.osdl.org # Remove extra tests from get_user_cpu_mask(). # # They aren't internally consistent. # # kernel/sched.c # 2004/09/03 19:28:36-07:00 torvalds@ppc970.osdl.org +0 -17 # Remove extra tests from get_user_cpu_mask(). # # They aren't internally consistent. # # ChangeSet # 2004/09/03 22:16:14-04:00 manfred@colorfullife.com # [PATCH] fix media detection for nForce 2 nics # # attached is a patch that polls the media setting for non GigE nForce # nics: # Without polling, media changes are not autodetected. This is fatal, # because the nic initialization is asynchroneous, thus "modprobe;ifup" # resulted in a dead network connection. The attached patch fixes that # problem. # # It's a repost of a patch I sent around three weeks ago: you objected # that I rely on the nic irq instead of a software timer. I've documented # why this is ok. # # drivers/net/forcedeth.c # 2004/08/31 15:58:33-04:00 manfred@colorfullife.com +52 -26 # fix media detection for nForce 2 nics # # ChangeSet # 2004/09/03 22:14:54-04:00 akpm@osdl.org # [PATCH] airo build fix # # drivers/net/wireless/airo.c: In function `issuecommand': # drivers/net/wireless/airo.c:3812: warning: implicit declaration of function `kernel_locked' # *** Warning: "kernel_locked" [drivers/net/wireless/airo.ko] undefined! # # Signed-off-by: Andrew Morton # # drivers/net/wireless/airo.c # 2004/09/03 00:32:35-04:00 akpm@osdl.org +1 -0 # airo build fix # # ChangeSet # 2004/09/03 22:13:22-04:00 davej@redhat.com # [PATCH] wavelan uninitalised var. # # This seems a little odd, printing out the value of a variable # we haven't read yet. # # Signed-off-by: Dave Jones # # drivers/net/wireless/wavelan.c # 2004/09/03 16:02:09-04:00 davej@redhat.com +6 -5 # wavelan uninitalised var. # # ChangeSet # 2004/09/03 22:13:11-04:00 davej@redhat.com # [PATCH] 3c527 possible oops. # # If the alloc_skb() fails, we dereference it in the skb_reserve() call. # Move the skb_reserve() call to after the NULL check. # Also clean up some CodingStyle violations whilst in the vicinity. # # Signed-off-by: Dave Jones # # drivers/net/3c527.c # 2004/09/03 16:42:28-04:00 davej@redhat.com +5 -8 # 3c527 possible oops. # # ChangeSet # 2004/09/03 18:48:28-07:00 wli@holomorphy.com # [PATCH] fix sched_domains hotplug bootstrap ordering vs. cpu_online_map issue # # cpu_online_map is not set up at the time of sched domain initialization # when hotplug cpu paths are used for SMP booting. # # At this phase of bootstrapping, cpu_possible_map can be used by the # various architectures using cpu hotplugging for SMP bootstrap, but the # manipulations of cpu_online_map done on behalf of NUMA architectures, # done indirectly via node_to_cpumask(), can't, because cpu_online_map # starts depopulated and hasn't yet been populated. # # On true NUMA architectures this is a distinct cpumask_t from # cpu_online_map and so the unpatched code works on NUMA; on non-NUMA # architectures the definition of node_to_cpumask() this way breaks and # would require an invasive sweeping of users of node_to_cpumask() to # change it to e.g. cpu_possible_map, as cpu_possible_map is not suitable # for use at runtime as a substitute for cpu_online_map. # # Signed-off-by: William Irwin # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/29 10:46:53-07:00 wli@holomorphy.com +9 -0 # fix sched_domains hotplug bootstrap ordering vs. cpu_online_map issue # # ChangeSet # 2004/09/03 10:44:40-07:00 ornati@fastwebnet.it # [PATCH] tdfxfb linkage fix v2.0 (the previous one is broken) # # This patch _really_ fixes tdfxfb linkage # # drivers/video/Makefile # 2004/09/03 06:26:57-07:00 ornati@fastwebnet.it +2 -3 # tdfxfb linkage fix v2.0 (the previous one is broken) # # ChangeSet # 2004/09/03 10:42:09-07:00 davej@redhat.com # [PATCH] Fix warning in pc300_tty driver. # # ..caused by my last patch to this file. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/net/wan/pc300_tty.c # 2004/09/03 08:47:37-07:00 davej@redhat.com +1 -1 # Fix warning in pc300_tty driver. # # ChangeSet # 2004/09/03 10:39:14-07:00 arjanv@redhat.com # [PATCH] make hugetlb expansion allocation nowarn # # a user can do echo 32000 > /proc/sys/vm/nr_hugepapges; at which point most # boxes will get spew about allocation failure. This of course isn't a real # bug so the patch below quiets that. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/hugetlb.c # 2004/09/03 02:08:36-07:00 arjanv@redhat.com +1 -1 # make hugetlb expansion allocation nowarn # # ChangeSet # 2004/09/03 10:39:02-07:00 janitor@sternwelten.at # [PATCH] update parport MAINTAINERS entry # # Add correct email for parport entry in MAINTAINERS. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/09/03 02:08:35-07:00 janitor@sternwelten.at +2 -2 # update parport MAINTAINERS entry # # ChangeSet # 2004/09/03 10:38:50-07:00 janitor@sternwelten.at # [PATCH] mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/mtd/chips/cfi_cmdset_0001.c # 2004/09/03 02:08:35-07:00 janitor@sternwelten.at +1 -2 # mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:38:39-07:00 janitor@sternwelten.at # [PATCH] message/i2o_core: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/i2o/i2o_core.c # 2004/09/03 02:08:35-07:00 janitor@sternwelten.at +1 -2 # message/i2o_core: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:38:28-07:00 janitor@sternwelten.at # [PATCH] message/mptscsih: replace schedule_timeout() with msleep() # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/fusion/mptscsih.c # 2004/09/03 02:08:35-07:00 janitor@sternwelten.at +3 -6 # message/mptscsih: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:38:17-07:00 janitor@sternwelten.at # [PATCH] radio/radio-sf16fmr2: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-sf16fmr2.c # 2004/09/03 02:08:34-07:00 janitor@sternwelten.at +1 -14 # radio/radio-sf16fmr2: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:38:06-07:00 janitor@sternwelten.at # [PATCH] radio/radio-sf16fmi: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-sf16fmi.c # 2004/09/03 02:08:34-07:00 janitor@sternwelten.at +2 -4 # radio/radio-sf16fmi: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:37:54-07:00 janitor@sternwelten.at # [PATCH] saa7146_i2c.c: use msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/common/saa7146_i2c.c # 2004/09/03 02:08:34-07:00 janitor@sternwelten.at +7 -14 # saa7146_i2c.c: use msleep() # # ChangeSet # 2004/09/03 10:37:42-07:00 janitor@sternwelten.at # [PATCH] radio/radio-maxiradio: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-maxiradio.c # 2004/09/03 02:08:34-07:00 janitor@sternwelten.at +1 -8 # radio/radio-maxiradio: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:37:30-07:00 janitor@sternwelten.at # [PATCH] radio/miropcm20-rds: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/miropcm20-rds.c # 2004/09/03 02:08:34-07:00 janitor@sternwelten.at +2 -2 # radio/miropcm20-rds: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:37:18-07:00 janitor@sternwelten.at # [PATCH] radio/radio-aimslab: replace while/schedule() with msleep() # # Uses msleep() instead of a while-loop and schedule(). Thus the CPU is # given up for the time desired. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-aimslab.c # 2004/09/03 02:08:33-07:00 janitor@sternwelten.at +1 -6 # radio/radio-aimslab: replace while/schedule() with msleep() # # ChangeSet # 2004/09/03 10:37:07-07:00 janitor@sternwelten.at # [PATCH] radio/radio-cadet: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-cadet.c # 2004/09/03 02:08:33-07:00 janitor@sternwelten.at +2 -4 # radio/radio-cadet: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:36:55-07:00 janitor@sternwelten.at # [PATCH] radio/radio-maestro: replace schedule_timeout() with msleep() # # Replaced sleep_125ms() with msleep(125), udelay2() with udelay(2), # udelay4() with udelay(4) and udelay16() with udelay(16) and removed the # replaced functions' definitions. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/radio/radio-maestro.c # 2004/09/03 02:08:33-07:00 janitor@sternwelten.at +15 -35 # radio/radio-maestro: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:36:43-07:00 janitor@sternwelten.at # [PATCH] mcd: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/mcd.c # 2004/09/03 02:08:33-07:00 janitor@sternwelten.at +3 -4 # mcd: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:36:31-07:00 janitor@sternwelten.at # [PATCH] cdu31a: replace schedule_timeout() with msleep() # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/cdrom/cdu31a.c # 2004/09/03 02:08:33-07:00 janitor@sternwelten.at +2 -4 # cdu31a: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:36:19-07:00 juhl-lkml@dif.dk # [PATCH] Sort the CREDITS file properly (and add Jesper) # # Many entries in the CREDITS file are not properly sorted in alphabetical # order, despite the note in the file that it is supposed to be sorted like # that. # # This patch attempts to sort the CREDITS file properly. No existing entries # were changed, merely moved around in the file. There where a few tricky # names that I was unsure how to sort (names with characters such as ü, ö, # and people with many names where it was unclear to me what name to sort by # etc), in those cases I've usually left the names where they were unless it # was glaringly obvious they were in the wrong spot. # # I've also taken the liberty to add my own name to the file - I have # contributed several tiny/small fixes/cleanups etc over the years. # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # CREDITS # 2004/09/03 02:08:32-07:00 juhl-lkml@dif.dk +48 -41 # Sort the CREDITS file properly (and add Jesper) # # ChangeSet # 2004/09/03 10:36:08-07:00 jaharkes@cs.cmu.edu # [PATCH] coda: add sendfile wrapper # # Add a wrapper for sendfile support in Coda. # # Signed-off-by: Jan Harkes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/coda/file.c # 2004/09/03 02:08:32-07:00 jaharkes@cs.cmu.edu +18 -0 # coda: add sendfile wrapper # # ChangeSet # 2004/09/03 10:35:56-07:00 jaharkes@cs.cmu.edu # [PATCH] coda: fix ifdefs for CONFIG_CODA_FS_OLD_API # # Trivial fix to make the CODA_FS_OLD_API config option actually work as # expected. # # Signed-off-by: Jan Harkes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/coda.h # 2004/09/03 02:08:32-07:00 jaharkes@cs.cmu.edu +5 -5 # coda: fix ifdefs for CONFIG_CODA_FS_OLD_API # # fs/coda/upcall.c # 2004/09/03 02:08:32-07:00 jaharkes@cs.cmu.edu +5 -5 # coda: fix ifdefs for CONFIG_CODA_FS_OLD_API # # fs/coda/psdev.c # 2004/09/03 02:08:32-07:00 jaharkes@cs.cmu.edu +1 -1 # coda: fix ifdefs for CONFIG_CODA_FS_OLD_API # # fs/coda/coda_linux.c # 2004/09/03 02:08:32-07:00 jaharkes@cs.cmu.edu +1 -1 # coda: fix ifdefs for CONFIG_CODA_FS_OLD_API # # ChangeSet # 2004/09/03 10:35:44-07:00 janitor@sternwelten.at # [PATCH] Add msleep_interruptible() function to kernel/timer.c # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/09/03 02:08:32-07:00 janitor@sternwelten.at +16 -0 # Add msleep_interruptible() function to kernel/timer.c # # include/linux/delay.h # 2004/09/03 02:08:32-07:00 janitor@sternwelten.at +1 -0 # Add msleep_interruptible() function to kernel/timer.c # # ChangeSet # 2004/09/03 10:35:32-07:00 janitor@sternwelten.at # [PATCH] synclink: replace jiffies_from_ms() with msecs_to_jiffies() # # Uses msecs_to_jiffies() instead of the custom jiffies_from_ms(). # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/synclink.c # 2004/09/03 02:08:32-07:00 janitor@sternwelten.at +7 -9 # synclink: replace jiffies_from_ms() with msecs_to_jiffies() # # ChangeSet # 2004/09/03 10:35:20-07:00 janitor@sternwelten.at # [PATCH] pcwd: replace schedule_timeout() with msleep() # # Replace # # set_current_state(TASK_INTERRUPTIBLE); # schedule_timeout(some_time); # # with # # msleep(jiffies_to_msecs(some_time)); # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/watchdog/pcwd.c # 2004/09/03 02:08:31-07:00 janitor@sternwelten.at +1 -2 # pcwd: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:35:08-07:00 janitor@sternwelten.at # [PATCH] nwflash: replace schedule_timeout() with msleep() # # Uses msleep() instead of schedule_timeout() to guarantee the task delays at # least the desired time amount. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/nwflash.c # 2004/09/03 02:08:31-07:00 janitor@sternwelten.at +5 -14 # nwflash: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:34:56-07:00 janitor@sternwelten.at # [PATCH] isicom: replace schedule_timeout() with msleep() # # Uses msleep() instead of schedule_timeout() to guarantee the task delays at # least the desired time amount. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/isicom.c # 2004/09/03 02:08:31-07:00 janitor@sternwelten.at +2 -2 # isicom: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:34:44-07:00 janitor@sternwelten.at # [PATCH] ec3104: replace schedule_timeout() with msleep() # # Uses msleep() instead of schedule_timeout() to guarantee the task delays at # least the desired time amount. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ec3104_keyb.c # 2004/09/03 02:08:30-07:00 janitor@sternwelten.at +1 -1 # ec3104: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:34:32-07:00 janitor@sternwelten.at # [PATCH] dsp56k: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the task delays at # least the desired time amount. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/dsp56k.c # 2004/09/03 02:08:30-07:00 janitor@sternwelten.at +4 -10 # dsp56k: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:34:21-07:00 janitor@sternwelten.at # [PATCH] ds1620: replace schedule_timeout() with msleep() # # Uses msleep() instead of schedule_timeout() to guarantee the task delays at # least the desired time amount. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ds1620.c # 2004/09/03 02:08:30-07:00 janitor@sternwelten.at +1 -2 # ds1620: replace schedule_timeout() with msleep() # # ChangeSet # 2004/09/03 10:34:09-07:00 janitor@sternwelten.at # [PATCH] drivers/tc/zs.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/tc/zs.c # 2004/09/03 02:08:30-07:00 janitor@sternwelten.at +5 -9 # drivers/tc/zs.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:33:57-07:00 janitor@sternwelten.at # [PATCH] include/linux/isicom.h MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/isicom.h # 2004/09/03 02:08:30-07:00 janitor@sternwelten.at +0 -1 # include/linux/isicom.h MIN/MAX removal # # ChangeSet # 2004/09/03 10:33:45-07:00 janitor@sternwelten.at # [PATCH] drivers/char/synclinkmp.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/synclinkmp.c # 2004/09/03 02:08:29-07:00 janitor@sternwelten.at +7 -11 # drivers/char/synclinkmp.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:33:33-07:00 janitor@sternwelten.at # [PATCH] drivers/char/synclink.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/synclink.c # 2004/09/03 02:08:29-07:00 janitor@sternwelten.at +9 -13 # drivers/char/synclink.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:33:22-07:00 janitor@sternwelten.at # [PATCH] drivers/char/specialix.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/specialix.c # 2004/09/03 02:08:29-07:00 janitor@sternwelten.at +5 -9 # drivers/char/specialix.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:33:10-07:00 janitor@sternwelten.at # [PATCH] drivers/char/serial167.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/serial167.c # 2004/09/03 02:08:29-07:00 janitor@sternwelten.at +6 -10 # drivers/char/serial167.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:58-07:00 janitor@sternwelten.at # [PATCH] drivers/char/selection.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/selection.c # 2004/09/03 02:08:29-07:00 janitor@sternwelten.at +1 -5 # drivers/char/selection.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:47-07:00 janitor@sternwelten.at # [PATCH] drivers/char/rocket_int.h MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/rocket_int.h # 2004/09/03 02:08:28-07:00 janitor@sternwelten.at +0 -4 # drivers/char/rocket_int.h MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:35-07:00 janitor@sternwelten.at # [PATCH] drivers/char/rocket.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/rocket.c # 2004/09/03 02:08:28-07:00 janitor@sternwelten.at +4 -4 # drivers/char/rocket.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:23-07:00 janitor@sternwelten.at # [PATCH] drivers/char/riscom8.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/riscom8.c # 2004/09/03 02:08:28-07:00 janitor@sternwelten.at +8 -12 # drivers/char/riscom8.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:12-07:00 janitor@sternwelten.at # [PATCH] drivers/char/pcxx.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/pcxx.c # 2004/09/03 02:08:28-07:00 janitor@sternwelten.at +3 -4 # drivers/char/pcxx.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:32:00-07:00 janitor@sternwelten.at # [PATCH] drivers/char/pcmcia/synclink_cs.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/pcmcia/synclink_cs.c # 2004/09/03 02:08:28-07:00 janitor@sternwelten.at +4 -8 # drivers/char/pcmcia/synclink_cs.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:31:48-07:00 janitor@sternwelten.at # [PATCH] drivers/char/mxser.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/mxser.c # 2004/09/03 02:08:27-07:00 janitor@sternwelten.at +3 -7 # drivers/char/mxser.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:31:36-07:00 janitor@sternwelten.at # [PATCH] drivers/char/isicom.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/isicom.c # 2004/09/03 02:08:27-07:00 janitor@sternwelten.at +7 -7 # drivers/char/isicom.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:31:24-07:00 janitor@sternwelten.at # [PATCH] drivers/char/esp.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/esp.c # 2004/09/03 02:08:27-07:00 janitor@sternwelten.at +2 -6 # drivers/char/esp.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:31:13-07:00 janitor@sternwelten.at # [PATCH] drivers/char/epca.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/epca.c # 2004/09/03 02:08:27-07:00 janitor@sternwelten.at +3 -4 # drivers/char/epca.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:31:01-07:00 janitor@sternwelten.at # [PATCH] drivers/char/amiserial.c MIN/MAX removal # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/amiserial.c # 2004/09/03 02:08:26-07:00 janitor@sternwelten.at +1 -5 # drivers/char/amiserial.c MIN/MAX removal # # ChangeSet # 2004/09/03 10:30:49-07:00 bjorn.helgaas@hp.com # [PATCH] silence sn_console driver on non-SGI boxes # # Acked by Jesse. # # sn_console: don't print anything unless we're actually on an SGI box. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/sn_console.c # 2004/09/03 02:08:26-07:00 bjorn.helgaas@hp.com +2 -2 # silence sn_console driver on non-SGI boxes # # ChangeSet # 2004/09/03 10:30:37-07:00 bjorn.helgaas@hp.com # [PATCH] announce hpet devices claimed # # I think the HPET driver should announce the hardware it claims. Here's # a patch that prints this: # # hpet0: at MMIO 0xc0000ffffc002000, IRQs 74, 75, 76 # hpet0: 4ns tick, 3 64-bit timers # hpet1: at MMIO 0xc0000ffffc082000, IRQs 77, 78, 79 # hpet1: 4ns tick, 3 64-bit timers # # This has been acked by Bob. I haven't heard from Venkatesh. # # Print basic information (MMIO address, IRQs used, tick rate, number # of timers) when claiming an HPET device. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/hpet.c # 2004/09/03 02:08:26-07:00 bjorn.helgaas@hp.com +13 -1 # announce hpet devices claimed # # ChangeSet # 2004/09/03 10:30:25-07:00 lcapitulino@conectiva.com.br # [PATCH] fix drivers/net/cs89x0.c warning. # # drivers/net/cs89x0.c: In function `net_close': # drivers/net/cs89x0.c:1601: warning: unused variable `lp' # # 'lp'is only used when ALLOW_DMA is defined. # # Signed-off-by: Luiz Capitulino # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/cs89x0.c # 2004/09/03 02:08:26-07:00 lcapitulino@conectiva.com.br +2 -0 # fix drivers/net/cs89x0.c warning. # # ChangeSet # 2004/09/03 10:30:15-07:00 hch@lst.de # [PATCH] fix compile warning in rivafb on ppc # # riva_get_EDID_i2c is only used on !CONFIG_PPC_OF, so don't compile it on # ppc either. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/riva/fbdev.c # 2004/09/03 02:08:26-07:00 hch@lst.de +1 -1 # fix compile warning in rivafb on ppc # # ChangeSet # 2004/09/03 10:30:03-07:00 hch@lst.de # [PATCH] remove ptrinfo # # It's defined in slab.c but not used anywhere. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2004/09/03 02:08:25-07:00 hch@lst.de +6 -75 # remove ptrinfo # # include/linux/slab.h # 2004/09/03 02:08:25-07:00 hch@lst.de +0 -2 # remove ptrinfo # # ChangeSet # 2004/09/03 10:29:51-07:00 hch@lst.de # [PATCH] some missing statics in mm/ # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2004/09/03 02:08:25-07:00 hch@lst.de +7 -6 # some missing statics in mm/ # # mm/shmem.c # 2004/09/03 02:08:25-07:00 hch@lst.de +1 -1 # some missing statics in mm/ # # ChangeSet # 2004/09/03 10:29:39-07:00 hch@lst.de # [PATCH] stop ->put_inode abuse in vxfs # # ->clear_inode is the right place to free private inode parts. No idea what # I though when using ->put_inode and i_count check. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/freevxfs/vxfs_super.c # 2004/09/03 02:08:25-07:00 hch@lst.de +1 -1 # stop ->put_inode abuse in vxfs # # fs/freevxfs/vxfs_inode.c # 2004/09/03 02:08:25-07:00 hch@lst.de +5 -6 # stop ->put_inode abuse in vxfs # # fs/freevxfs/vxfs_extern.h # 2004/09/03 02:08:25-07:00 hch@lst.de +1 -1 # stop ->put_inode abuse in vxfs # # ChangeSet # 2004/09/03 10:29:27-07:00 hch@lst.de # [PATCH] fix compile warnings in via-pmu.c for !CONFIG_PMAC_PBOOK # # There's some scoping problems so we get unused variables for that config. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/macintosh/via-pmu.c # 2004/09/03 02:08:25-07:00 hch@lst.de +8 -6 # fix compile warnings in via-pmu.c for !CONFIG_PMAC_PBOOK # # ChangeSet # 2004/09/03 10:29:16-07:00 hch@lst.de # [PATCH] fix compile warning in ppc64 pmac_feature.c # # dump_HT_speeds is only used by #if 0'ed code so if 0 it as well. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pmac_feature.c # 2004/09/03 02:08:25-07:00 hch@lst.de +2 -1 # fix compile warning in ppc64 pmac_feature.c # # ChangeSet # 2004/09/03 10:29:04-07:00 wli@holomorphy.com # [PATCH] make bad_page() print all of page->flags # # bad_page() only prints out 8 hexadecimal digits of page->flags regardless # of sizeof(page_flags_t). This leads to confusing and/or incomplete bug # reports. The following patch uses a field width argument to replace the # hardcoded %08lx so that bad_page() may print the whole of page->flags. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/09/03 02:08:24-07:00 wli@holomorphy.com +3 -3 # make bad_page() print all of page->flags # # ChangeSet # 2004/09/03 10:28:52-07:00 luca.risolia@studio.unibo.it # [PATCH] Disable colour conversion in the CPiA Video Camera driver # # Since in-kernel colorspace conversion is not allowed, this patch disables it # in the CPiA video camera driver by default. Users should fix the applications # in case they don't work without conversion reenabled by setting the new # 'colorspace_conv' module parameter to 1. This is a temporary solution, so # within a few months deprecated code will be entirely removed. # # Signed-off-by: Luca Risolia # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/cpia.c # 2004/09/03 02:08:24-07:00 luca.risolia@studio.unibo.it +30 -8 # Disable colour conversion in the CPiA Video Camera driver # # ChangeSet # 2004/09/03 10:28:40-07:00 alan@redhat.com # [PATCH] fix the barrier IDE detection logic # # This fixes the logic so we always check for the cache. It also defaults to # safer behaviour for the non cache flush case now we have the right bits in # the right places. I've also played a bit with timings - the worst case # timings I can get for the flush are about 7 seconds (which I'd expect as # the engineering worst cases will include retries) # # Probably what should happen is that the barrier logic is enabled providing # the wcache is disabled. I've not meddled with this as I don't know what # the intended semantics and rules are for disabling barrier on a live disk # (eg when a user uses hdparm to turn on the write cache). In the current # code as with Jens original that cannot occur. # # I've also fixed the new printk's as per a private request from Matt Domsch. # # Cc: Jens Axboe # Cc: Bartlomiej Zolnierkiewicz # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/ide/ide-disk.c # 2004/09/03 02:08:24-07:00 alan@redhat.com +21 -13 # fix the barrier IDE detection logic # # ChangeSet # 2004/09/03 10:28:28-07:00 alan@redhat.com # [PATCH] Root reservations for strict overcommit # # This was on my TODO list for a while and it turns out someone already fixed # the armwaving overcommit mode for the same problem. It is easy to get into # a situation where you have no overcommit and nothing can be done because # there is no memory to clean up the stable but non-useful state of the # machine. # # The fix is trivial and duplicated from the armwaving overcommit code path. # The last 3% of the memory can be claimed by root processes only. It isn't # a cure but it does seem to solve the real world problems - at least # providing you have enough memory for 3% to be useful 8). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/commoncap.c # 2004/09/03 02:08:24-07:00 alan@redhat.com +5 -0 # Root reservations for strict overcommit # # ChangeSet # 2004/09/03 10:28:16-07:00 bunk@fs.tum.de # [PATCH] pcxx.c build fix # # CC drivers/char/pcxx.o # drivers/char/pcxx.c: In function `pcxe_cleanup': # drivers/char/pcxx.c:209: warning: unused variable `e2' # drivers/char/pcxx.c: At top level: # drivers/char/pcxx.c:229: `pcxe_init' undeclared here (not in a function) # drivers/char/pcxx.c:230: warning: type defaults to `int' in declaration of `module_cleanup' # drivers/char/pcxx.c:230: warning: parameter names (without types) in function declaration # drivers/char/pcxx.c:230: warning: data definition has no type or storage class # drivers/char/pcxx.c:1016: redefinition of `__initcall_pcxe_init' # drivers/char/pcxx.c:229: `__initcall_pcxe_init' previously defined here # drivers/char/pcxx.c:1016: `pcxe_init' undeclared here (not in a function) # drivers/char/pcxx.c:1017: `pcxe_exit' undeclared here (not in a function) # drivers/char/pcxx.c: In function `pcxe_tiocmget': # drivers/char/pcxx.c:2009: `mstat' undeclared (first use in this function) # drivers/char/pcxx.c:2009: (Each undeclared identifier is reported only once # drivers/char/pcxx.c:2009: for each function it appears in.) # drivers/char/pcxx.c: In function `pcxe_tiocmset': # drivers/char/pcxx.c:2072: warning: control reaches end of non-void function # drivers/char/pcxx.c: At top level: # drivers/char/pcxx.c:1044: warning: `pcxe_init' defined but not used # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/pcxx.c # 2004/09/03 02:08:23-07:00 bunk@fs.tum.de +5 -10 # pcxx.c build fix # # ChangeSet # 2004/09/03 10:28:04-07:00 kraxel@bytesex.org # [PATCH] v4l: saa7134 driver update # # This is a minor update for the saa7134 driver. Changes: # # - i2c cleanups (i2c_add_driver return value, add __init & __exit). # # - fix radio tuning (last update broke this ...). # # - adds support for new tv cards. # # - add config info for the tda9887 (thus this one depends on the tuner # update patch mailed earlier). # # - add configuration help printk's for some cards, for stuff which can't # be autodetected. # # - make automute switchable via v4l2 API, without driver reload. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/saa7134/saa7134.h # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +6 -2 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-video.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +40 -8 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-tvaudio.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +5 -3 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-oss.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +0 -2 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-i2c.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +2 -0 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-core.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +4 -3 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa7134-cards.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +115 -17 # v4l: saa7134 driver update # # drivers/media/video/saa7134/saa6752hs.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +3 -4 # v4l: saa7134 driver update # # ChangeSet # 2004/09/03 10:27:52-07:00 kraxel@bytesex.org # [PATCH] v4l: bttv driver update. # # This patch is a minor update for the bttv driver. # # - add a few new tv cards. # # - add some infrastructure needed by the dvb drivers (for bt878-based dvb # cards). # # - improve croma line selection for planar video formats, # # - some new debug printk's # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/bttvp.h # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +1 -0 # v4l: bttv driver update. # # drivers/media/video/bttv.h # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +6 -0 # v4l: bttv driver update. # # drivers/media/video/bttv-risc.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +24 -5 # v4l: bttv driver update. # # drivers/media/video/bttv-i2c.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +12 -0 # v4l: bttv driver update. # # drivers/media/video/bttv-gpio.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +14 -0 # v4l: bttv driver update. # # drivers/media/video/bttv-driver.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +1 -0 # v4l: bttv driver update. # # drivers/media/video/bttv-cards.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +86 -4 # v4l: bttv driver update. # # ChangeSet # 2004/09/03 10:27:40-07:00 kraxel@bytesex.org # [PATCH] v4l: i2c tuner modules update # # This patch updates the tuner and tda9887 i2c modules which handle the tv # card tuning. # # - some cleanups (don't ignore i2c_add_driver return value, add __init and # __exit). # # - add support for new tuners. # # - allow to pass configuration info (tv card specific stuff) to the # tda9887 module. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/tuner.h # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +17 -0 # v4l: i2c tuner modules update # # drivers/media/video/tuner.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +15 -6 # v4l: i2c tuner modules update # # drivers/media/video/tda9887.c # 2004/09/03 02:08:23-07:00 kraxel@bytesex.org +63 -4 # v4l: i2c tuner modules update # # ChangeSet # 2004/09/03 10:27:28-07:00 kraxel@bytesex.org # [PATCH] v4l: i2c cleanups # # This patch has some minor cleanups for the v4l i2c modules: Don't ignore # the i2c_add_driver return value and mark the init+exit functions with # __init + __exit. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/media/id.h # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +0 -1 # v4l: i2c cleanups # # drivers/media/video/tvmixer.c # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +4 -4 # v4l: i2c cleanups # # drivers/media/video/tvaudio.c # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +4 -4 # v4l: i2c cleanups # # drivers/media/video/tda9875.c # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +3 -4 # v4l: i2c cleanups # # drivers/media/video/tda7432.c # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +4 -4 # v4l: i2c cleanups # # drivers/media/video/msp3400.c # 2004/09/03 02:08:22-07:00 kraxel@bytesex.org +3 -4 # v4l: i2c cleanups # # ChangeSet # 2004/09/03 10:27:16-07:00 hirofumi@mail.parknet.co.jp # [PATCH] NLS: nls_cp932 fix # # Some unicode chars is missing to convert on nls_cp932. # This patch fixes the following chars. # # U+00A2, U+00A3, U+00A7, U+00A8, U+00AC, U+00B0, U+00B1, U+00B4, # U+00B6, U+00D7, U+00F7, U+FFE2 # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nls/nls_cp932.c # 2004/09/03 02:08:22-07:00 hirofumi@mail.parknet.co.jp +39 -4 # NLS: nls_cp932 fix # # ChangeSet # 2004/09/03 10:27:04-07:00 hirofumi@mail.parknet.co.jp # [PATCH] FAT: document fix/update # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/Kconfig # 2004/09/03 02:08:22-07:00 hirofumi@mail.parknet.co.jp +9 -6 # FAT: document fix/update # # ChangeSet # 2004/09/03 10:26:52-07:00 juhl-lkml@dif.dk # [PATCH] x86_64: read_ldt() clear_user() return value checking # # Signed-off-by: Jesper Juhl # Cc: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/ldt.c # 2004/09/03 02:08:22-07:00 juhl-lkml@dif.dk +8 -2 # x86_64: read_ldt() clear_user() return value checking # # ChangeSet # 2004/09/03 10:26:40-07:00 juhl-lkml@dif.dk # [PATCH] read_ldt() neglects to check clear_user() return value # # akpm: It's a bit debatable. The user passed in a buffer of a particular size, # and we successfully sopied the LDT info into it, but we got a fault when # clearing out the rest of the user's buffer. Is that worth a -EFAULT? # # I suppose so... # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/ldt.c # 2004/09/03 02:08:21-07:00 juhl-lkml@dif.dk +7 -2 # read_ldt() neglects to check clear_user() return value # # ChangeSet # 2004/09/03 10:26:28-07:00 cus@fazekas.hu # [PATCH] urandom initialisation fix # # The urandom driver returns the same thing after every boot. # # The urandom pool is only cleared, and not initialized, and because there is # nothing in the primary pool, the reseeding is not successful. The solution # is also the same, initialize not just the primary and secondary, but also # the urandom pool. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/09/03 02:08:21-07:00 cus@fazekas.hu +1 -0 # urandom initialisation fix # # ChangeSet # 2004/09/03 10:26:16-07:00 roland@topspin.com # [PATCH] fix proc_symlink() warning with CONFIG_PROC_FS=n # # The last parameter of proc_symlink is usually a "const char *", but the # stub in for CONFIG_PROC_FS=n omits the const and makes # its last parameter a "char *". This causes a warning about discarding # qualifiers for any code that passes something const for that last # parameter. # # This patch fixes that up and also, for neatness's sake, makes the stub for # create_proc_read_entry() match the usual prototype more exactly (use # read_proc_t rather than the underlying function pointer type). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/proc_fs.h # 2004/09/03 02:08:21-07:00 roland@topspin.com +2 -3 # fix proc_symlink() warning with CONFIG_PROC_FS=n # # ChangeSet # 2004/09/03 10:26:05-07:00 dsaxena@plexity.net # [PATCH] Add IXDP2x01 board support to CS89x0 driver # # The following patch modifies the CS89x0 driver to work on Intel's IXDP2401 # and IXDP2801 (Intel ARm/XScale based) platforms: # # - The main change requried is that the IXDP2x01 boards have the # chip connected through a CPLD so all registers appear at # dword-aligned addresses. A macro in the header adjusts the register # offsets appropriately. # # - The boards do not have ISA, so we need to explicitly check for # IXDP2X01 in Kconfig. # # - There is what I believe is a bug in the driver as it currently # only asks for the signature if ioaddr & 1 is set but then # reads and checks against the expected signature even when # !(ioaddr & 1). This causes the driver to not load on the IXDP2x01 # since our ioaddr does not have bit 1 set. # # - #ifdef out some bits of code that assume the chip is really # sitting on an ISA bus. # # The main IXDP2x01 support will be coming in through rmk's tree at # a later date when all the drivers are merged upstream. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/cs89x0.h # 2004/09/03 02:08:21-07:00 dsaxena@plexity.net +13 -6 # Add IXDP2x01 board support to CS89x0 driver # # drivers/net/cs89x0.c # 2004/09/03 02:08:21-07:00 dsaxena@plexity.net +25 -2 # Add IXDP2x01 board support to CS89x0 driver # # drivers/net/Kconfig # 2004/09/03 02:08:21-07:00 dsaxena@plexity.net +1 -1 # Add IXDP2x01 board support to CS89x0 driver # # ChangeSet # 2004/09/03 10:25:53-07:00 ak@muc.de # [PATCH] Fix argument checking in sched_setaffinity # # This patch fixes the argument length checking in sched_setaffinity. # # Previously it would error out when the length passed was smaller than # sizeof(cpumask_t). And any bits beyond cpumask_s would be silently # ignored. # # First this assumes that the user application knows the size of cpumask_t, # which should be kernel internal. When you increase cpumask_t old # applications break and there is no good way for the application to find out # the cpumask_t size the kernel uses. # # This patch changes it to do similar checking to the NUMA API calls: # # - Any length is ok as long as all online CPUs are covered (this could # still cause application breakage with more CPUs, but there is no good way # around it) # # - When the user passes more than cpumask_t bytes the excess bytes are # checked to be zero. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/09/03 02:08:21-07:00 ak@muc.de +31 -5 # Fix argument checking in sched_setaffinity # # ChangeSet # 2004/09/03 10:25:41-07:00 ak@muc.de # [PATCH] Increase bus/apic limits on x86-64 # # This patch increases some hardcoded limits people have already run into or # plan to go towards eventually. # # Increase max MP busses on x86-64. Needed for some machines. Suggested by # Andrew Chen and James Cleverdon. # # MAX_IRQ_SOURCES kept at 256 for now, matching i386. # # Increase MAX_IO_APICS to 32 following i386. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/mpspec.h # 2004/09/03 02:08:20-07:00 ak@muc.de +1 -1 # Increase bus/apic limits on x86-64 # # include/asm-x86_64/apicdef.h # 2004/09/03 02:08:20-07:00 ak@muc.de +1 -1 # Increase bus/apic limits on x86-64 # # ChangeSet # 2004/09/03 10:25:29-07:00 ak@muc.de # [PATCH] Fix boot_cpu_data on x86-64 # # From: Andreas Gruenbacher # # Add brackets to boot_cpu_data to fix compilation of centrino cpufreq driver. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/processor.h # 2004/09/03 02:08:20-07:00 ak@muc.de +1 -1 # Fix boot_cpu_data on x86-64 # # ChangeSet # 2004/09/03 10:25:17-07:00 ak@muc.de # [PATCH] Add support for NUMA discovery on AMD dual core to x86-64 # # Following the CPUID extensions and APIC-ID setup presented by Richard # Brunner at Kernel Summit. # # Without this the kernel's node discovery would assign the wrong nodes on # dual core systems and cause performance degradation. # # Only handles power of two cored CPUs, others will be ignored. # # /proc/cpuinfo has a new field cpu cores: and also # show the other core as HT sibling (this is needed to make old CPU based # license managers to count one CPU package as only one physical CPU) # # FIXME this currently misses the disable code for SMT idle. That's because # 2.6.9rc1-bk6 removed the arch hooks need for that. Needs to be readded # later. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/processor.h # 2004/09/03 02:08:20-07:00 ak@muc.de +2 -0 # Add support for NUMA discovery on AMD dual core to x86-64 # # include/asm-x86_64/cpufeature.h # 2004/09/03 02:08:20-07:00 ak@muc.de +4 -1 # Add support for NUMA discovery on AMD dual core to x86-64 # # arch/x86_64/kernel/setup.c # 2004/09/03 02:08:20-07:00 ak@muc.de +29 -1 # Add support for NUMA discovery on AMD dual core to x86-64 # # ChangeSet # 2004/09/03 10:25:05-07:00 hbabu@us.ibm.com # [PATCH] ppc64: implement page_is_ram # # This patch contains - Removes __initdata from lmb definition (struct lmb # lmb;) and modified the existing page_is_ram function. # # Also changed the current argument from physical address to pfn to make it # compatible across architectures. Please review them and send me your # comments/suggestions. If you are OK with any one patch, please include it # in the mainline kernel. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/page.h # 2004/09/03 02:08:20-07:00 hbabu@us.ibm.com +1 -2 # ppc64: implement page_is_ram # # include/asm-ppc64/lmb.h # 2004/09/03 02:08:20-07:00 hbabu@us.ibm.com +1 -1 # ppc64: implement page_is_ram # # drivers/char/mem.c # 2004/09/03 02:08:20-07:00 hbabu@us.ibm.com +1 -1 # ppc64: implement page_is_ram # # arch/ppc64/mm/init.c # 2004/09/03 02:08:20-07:00 hbabu@us.ibm.com +21 -15 # ppc64: implement page_is_ram # # arch/ppc64/kernel/lmb.c # 2004/09/03 02:08:20-07:00 hbabu@us.ibm.com +1 -1 # ppc64: implement page_is_ram # # ChangeSet # 2004/09/03 10:24:53-07:00 anton@samba.org # [PATCH] ppc64: cleanup asm/processor.h # # Wrap a lot more of processor.h in #ifdef __KERNEL__ / __ASSEMBLY__. Remove # now unised EXC_FRAME_SIZE. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/processor.h # 2004/09/03 02:08:19-07:00 anton@samba.org +18 -24 # ppc64: cleanup asm/processor.h # # ChangeSet # 2004/09/03 10:24:41-07:00 anton@samba.org # [PATCH] ppc64: allocate NUMA node data node locally # # Instead of statically allocating the NUMA node structures, do it at runtime # with node local memory where possible. With NR_CPUS=128 we had over 800kB # of memory allocated before this patch, now we allocate only as many nodes # as the machine requires. # # We have to do some fancy footwork in do_init_bootmem since we use both the # LMB allocator and the bootmem allocator at the same time. The problem has # always been there although I only recently found a test case that hit it. # Wrap that logic in careful_allocation which uses the LMB allocator then # falls back to the bootmem allocator if required. # # Now alloc_bootmem on a node with no memory doesnt panic, we dont need the # hack in paging_init so remove it. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/mmzone.h # 2004/09/03 02:08:19-07:00 anton@samba.org +2 -2 # ppc64: allocate NUMA node data node locally # # arch/ppc64/mm/numa.c # 2004/09/03 02:08:19-07:00 anton@samba.org +87 -31 # ppc64: allocate NUMA node data node locally # # arch/ppc64/mm/init.c # 2004/09/03 02:08:19-07:00 anton@samba.org +1 -1 # ppc64: allocate NUMA node data node locally # # ChangeSet # 2004/09/03 10:24:30-07:00 anton@samba.org # [PATCH] ppc64: quieten NUMA boot messages # # On some machines we would print hundreds of lines of NUMA debug output. # The following patch cleans it up so we only print a summary of cpus and # memory vs nodes: # # Node 0 CPUs: 0-1 # Node 1 CPUs: 16-17 # Node 2 CPUs: 32-33 # Node 3 CPUs: 48-49 # Node 0 Memory: 0x0-0x400000000 # Node 1 Memory: 0x400000000-0x800000000 # # I lifted the code to do this out of xmon. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/mm/numa.c # 2004/09/03 02:08:19-07:00 anton@samba.org +78 -23 # ppc64: quieten NUMA boot messages # # ChangeSet # 2004/09/03 10:24:18-07:00 anton@samba.org # [PATCH] ppc64: update iSeries_defconfig # # Update iSeries_defconfig. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/configs/iSeries_defconfig # 2004/09/03 02:08:19-07:00 anton@samba.org +81 -28 # ppc64: update iSeries_defconfig # # ChangeSet # 2004/09/03 10:24:06-07:00 anton@samba.org # [PATCH] ppc64: update pSeries_defconfig # # Update pSeries_defconfig. This config should better cover POWER5 systems # with SPLPAR spinlocks, IPR SCSI, NR_CPUS = 128, NUMA, HVCS, and irq stacks # enabled, VSCSI and VETH as modules. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/configs/pSeries_defconfig # 2004/09/03 02:08:19-07:00 anton@samba.org +160 -88 # ppc64: update pSeries_defconfig # # ChangeSet # 2004/09/03 10:23:54-07:00 anton@samba.org # [PATCH] ppc64: dynamically allocate emergency stacks # # Now we set up cpu_possible_map early we can dynamically allocate the # emergency stacks. Previously we would allocate NR_CPUS * PAGE_SIZE, # potentially wasting quite a lot of memory. # # Clean a comment up in irqstack_early_init and use unsigned int for cpu ids # while in the area. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2004/09/03 02:08:18-07:00 anton@samba.org +24 -2 # ppc64: dynamically allocate emergency stacks # # arch/ppc64/kernel/pacaData.c # 2004/09/03 02:08:18-07:00 anton@samba.org +0 -8 # ppc64: dynamically allocate emergency stacks # # ChangeSet # 2004/09/03 10:23:42-07:00 paulus@samba.org # [PATCH] ppc64 another log buffer length fix # # This patch uses the firmware-defined error log buffer length for calls to # the firmware routine 'check-exception'. It also simplifies code in rtasd.c # that is attempting to obtain the error log length. # # Signed-off-by: Linas Vepstas # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/rtas.h # 2004/09/03 02:08:18-07:00 paulus@samba.org +8 -2 # ppc64 another log buffer length fix # # arch/ppc64/kernel/rtasd.c # 2004/09/03 02:08:18-07:00 paulus@samba.org +1 -14 # ppc64 another log buffer length fix # # arch/ppc64/kernel/rtas.c # 2004/09/03 02:08:18-07:00 paulus@samba.org +21 -0 # ppc64 another log buffer length fix # # arch/ppc64/kernel/ras.c # 2004/09/03 02:08:18-07:00 paulus@samba.org +4 -2 # ppc64 another log buffer length fix # # ChangeSet # 2004/09/03 10:23:30-07:00 olof@austin.ibm.com # [PATCH] ppc64: Make use of batched IOMMU calls on pSeries LPARs # # Implement the HCALLs to do more than one TCE setup or invalidation at a # time on pSeries LPAR. Previous implementation did one hypervisor call per # setup or teardown, resulting in significant overhead. # # A simple test of "time dd if=/dev/sda of=/dev/null bs=128k" shows the # amount of system time go down by about 5% by using the multi-tce calls. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/hvcall.h # 2004/09/03 02:08:18-07:00 olof@austin.ibm.com +5 -3 # ppc64: Make use of batched IOMMU calls on pSeries LPARs # # arch/ppc64/kernel/pSeries_lpar.c # 2004/09/03 02:08:18-07:00 olof@austin.ibm.com +117 -9 # ppc64: Make use of batched IOMMU calls on pSeries LPARs # # ChangeSet # 2004/09/03 10:23:19-07:00 olof@austin.ibm.com # [PATCH] ppc64: Setup fw_features before init_early calls on pSeries # # To be able to use the cur_cpu_spec->firmware_features values in early # setup, the function initializing them has to be moved up to before the # early init calls. # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2004/09/03 02:08:18-07:00 olof@austin.ibm.com +3 -0 # ppc64: Setup fw_features before init_early calls on pSeries # # arch/ppc64/kernel/chrp_setup.c # 2004/09/03 02:08:18-07:00 olof@austin.ibm.com +12 -8 # ppc64: Setup fw_features before init_early calls on pSeries # # ChangeSet # 2004/09/03 10:23:07-07:00 apw@shadowen.org # [PATCH] ppc64 topdown support: arch-specific get_unmapped_area() # # ppc64 has constraints on the mixing of small and large pages, such that # they cannot be mixed in the same 256Mb segment. This patch provides an # architecture specific arch_get_unmapped_area_topdown() which implements # these contraints. # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pgtable.h # 2004/09/03 02:08:17-07:00 apw@shadowen.org +1 -0 # ppc64 topdown support: arch-specific get_unmapped_area() # # arch/ppc64/mm/hugetlbpage.c # 2004/09/03 02:08:17-07:00 apw@shadowen.org +102 -0 # ppc64 topdown support: arch-specific get_unmapped_area() # # ChangeSet # 2004/09/03 10:22:55-07:00 apw@shadowen.org # [PATCH] ppc64: topdown support # # Recent patches introduced a top down user process address space allocation # policy; further patches enable this for ppc64. Although these work # correctly for normal maps, the topdown algorithm does not take into account # stringent mixing constraints for small and large pages on this # architecture. These patches introduce a ppc64 specific # arch_get_unused_area_topdown() variant. The first introduces # infrastructure to allow replacement of the generic # arch_get_unused_area_topdown() and the second utilises this infrastructure. # # In this patch I have followed the pattern set by the arch_get_unused_area() # using HAVE_ARCH_UNMAPPED_AREA_TOPDOWN to be consistent. However, it would # also be possible to simply have a ppc64_get_unused_area_topdown() in the # arch/ppc64/mm/mmap.c or to use weak bindings. # # This patch: # # Allow an architecture to override the default definition of # arch_get_unmapped_area_topdown(). # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/09/03 02:08:17-07:00 apw@shadowen.org +2 -0 # ppc64: topdown support # # ChangeSet # 2004/09/03 10:22:43-07:00 anton@samba.org # [PATCH] ppc64: print backtrace in EEH code # # We should print a stack backtrace when we get EEH errors, it makes # debugging the cause of the fail easier. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/eeh.c # 2004/09/03 02:08:17-07:00 anton@samba.org +4 -0 # ppc64: print backtrace in EEH code # # ChangeSet # 2004/09/03 10:22:31-07:00 paulus@samba.org # [PATCH] ppc64: test for EEH error in PCI Config-Read path # # This patch adds explicit checking for EEH slot isolation events into the # PCI config space read path. The change itself would have been minor, # except that pci config reads don't have a pointer to a struct pci_dev. # Thus, I had to restructure the eeh code to accomodate this, which seems to # be a good thing anyway, making it a tad cleaner. # # Signed-off-by: Linas Vepstas # Signed-off-by: Paul Mackerras # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/eeh.h # 2004/09/03 02:08:17-07:00 paulus@samba.org +10 -1 # ppc64: test for EEH error in PCI Config-Read path # # arch/ppc64/kernel/pSeries_pci.c # 2004/09/03 02:08:17-07:00 paulus@samba.org +20 -4 # ppc64: test for EEH error in PCI Config-Read path # # arch/ppc64/kernel/eeh.c # 2004/09/03 02:08:17-07:00 paulus@samba.org +54 -33 # ppc64: test for EEH error in PCI Config-Read path # # ChangeSet # 2004/09/03 10:22:19-07:00 anton@samba.org # [PATCH] ppc64: enable DEBUG_SPINLOCK_SLEEP # # DEBUG_SPINLOCK_SLEEP is useful on ppc64, so allow it to be selected. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # lib/Kconfig.debug # 2004/09/03 02:08:17-07:00 anton@samba.org +1 -1 # ppc64: enable DEBUG_SPINLOCK_SLEEP # # ChangeSet # 2004/09/03 10:22:09-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: pin the kernel stack's SLB entry # # This has been given basic testing on Power4 pSeries and iSeries machines. # # At present, the SLB miss handler has to check the SLB slot it is about to # use to ensure that it does not contain the SLBE for the current kernel # stack - throwing out the SLBE for the kernel stack can trigger the # "megabug": we have no SLBE for the stack, but we don't fault immediately # because we have an ERAT entry for it. The ERAT entry is then lost due to a # tlbie on another CPU during the unrecoverable section of the exception # return path. # # This patch implements a different approach - with this patch SLB slot 2 # always (well, nearly always) contains an SLBE for the stack. This slot is # never cast out by the normal SLB miss path. On context switch, an SLBE for # the new stack is pinned into this slot, unless the new stack is the the # bolted segment. # # For iSeries we need a special workaround because there is no way of # ensuring the stack SLBE is preserved an a shared processor switch. So, we # still need to handle taking an SLB miss on the stack, in which case we must # make sure it is loaded into slot 2, rather than using the normal # round-robin. # # This approach shaves a few ns off the slb miss time (on pSeries), but more # importantly makes it easier to experiment with different SLB castout # aporoaches without worrying about reinstating the megabug. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/processor.h # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +1 -0 # ppc64: pin the kernel stack's SLB entry # # include/asm-ppc64/mmu.h # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +1 -1 # ppc64: pin the kernel stack's SLB entry # # arch/ppc64/mm/slb_low.S # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +16 -30 # ppc64: pin the kernel stack's SLB entry # # arch/ppc64/mm/slb.c # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +56 -27 # ppc64: pin the kernel stack's SLB entry # # arch/ppc64/kernel/process.c # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +10 -0 # ppc64: pin the kernel stack's SLB entry # # arch/ppc64/kernel/entry.S # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +11 -3 # ppc64: pin the kernel stack's SLB entry # # arch/ppc64/kernel/asm-offsets.c # 2004/09/03 02:08:16-07:00 david@gibson.dropbear.id.au +1 -0 # ppc64: pin the kernel stack's SLB entry # # ChangeSet # 2004/09/03 10:21:57-07:00 benh@kernel.crashing.org # [PATCH] ppc[64]: increase max auxv entries # # ... but a better solution should probably be found, that's saved_auxv # in struct mm_struct is ... hrm... disgusting at least ;) # # So the problem is that we currently do # # unsigned long saved_auxv[40]; # # That is we assume that all archs will have an AUXV entry of no more than # 2 unsigned longs and we'll have no more than 20 entries in the table. # # Unfortunately, this is wrong. # # PPC/PPC64 adds 5 platform entries. then we add 14 in the common code, # and then we have # # if (k_platform) { # NEW_AUX_ENT(AT_PLATFORM, (elf_addr_t)(unsigned long)u_platform); # } # if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) { # NEW_AUX_ENT(AT_EXECFD, (elf_addr_t) bprm->interp_data); # } # # which may add a 20th entry... which means we are already out of room for # the terminating AT_NULL entry... bad bad bad. # # Now I'm adding AT_SYSINFO_EHDR to ppc/ppc64 and it breaks all the time. # # The quick fix is to bump the number of entries in struct mm_struct to 42, # though that's worth a big BOLD comment in binfmt_elf in case anybody adds # a new entry in there. (Patch below). I wonder if we shouldn't add a # ARCH_MAX_AUXV_ENTRIES macro to the asm-arch/elf.h though to get the max # amount of entry the arch may add to the normal count, and have the mm # struct array use that plus the number of "normal" entries... # # This patch increase the max amount of auxv entries in struct mm_struct to # 42 so that ppc & ppc64 don't get a chance to blow the array up. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2004/09/03 02:08:16-07:00 benh@kernel.crashing.org +1 -1 # ppc[64]: increase max auxv entries # # ChangeSet # 2004/09/03 10:21:45-07:00 akpm@osdl.org # [PATCH] ipr.c build fix # # drivers/scsi/ipr.c: In function `ipr_worker_thread': # drivers/scsi/ipr.c:1825: wrong type argument to unary exclamation mark # drivers/scsi/ipr.c: In function `ipr_read_dump': # drivers/scsi/ipr.c:2426: wrong type argument to unary exclamation mark # # Cc: James Bottomley # Cc: Brian King # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/ipr.c # 2004/09/03 02:08:16-07:00 akpm@osdl.org +4 -3 # ipr.c build fix # # ChangeSet # 2004/09/03 10:21:33-07:00 johnstul@us.ibm.com # [PATCH] fix target_cpus() for summit subarch # # I've been hunting down a bug affecting IBM x440/x445 systems where the # floppy driver would get spurious interrupts and would not initialize # properly. # # After digging James Cleverdon and Bill Irwin pointed out that target_cpus() # is routing the interrupts to the clustered apic broadcast mask using # destFixed deliver mode. This was causing multiple interrupts to show up, # breaking the floppy init code. # # This fix simply changes the delivery mode to dest_LowestPrio and initially # routes interrupts to the first cpu to resolve this issue. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/mach-summit/mach_apic.h # 2004/09/03 02:08:16-07:00 johnstul@us.ibm.com +6 -2 # fix target_cpus() for summit subarch # # ChangeSet # 2004/09/03 10:21:21-07:00 jd@rightthere.net # [PATCH] ES7000: increase MAX_MP_BUSSES # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/mach-es7000/mach_mpspec.h # 2004/09/03 02:08:15-07:00 jd@rightthere.net +1 -1 # ES7000: increase MAX_MP_BUSSES # # ChangeSet # 2004/09/03 10:21:10-07:00 olh@suse.de # [PATCH] request_region for winbond and smsc parport drivers # # An attempt to fix the random poking in legacy io space... # # ask for permissions before poking at io ports. this affects # detect_and_report_winbond() and detect_and_report_smsc(). # # Its unclear what port number is returned in show_parconfig_winbond(), so # just request the region as well and free the probing region. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/parport/parport_pc.c # 2004/09/03 02:08:15-07:00 olh@suse.de +53 -15 # request_region for winbond and smsc parport drivers # # ChangeSet # 2004/09/03 10:20:58-07:00 akpm@osdl.org # [PATCH] add_to_swap(): suppress oom message # # Page allocation failures are expected when add_to_swap() tries to allocate # radix-tree nodes without PF_MEMALLOC. Kill the __alloc_pages() warnings. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swap_state.c # 2004/09/03 02:08:15-07:00 akpm@osdl.org +1 -1 # add_to_swap(): suppress oom message # # ChangeSet # 2004/09/03 10:20:46-07:00 tiwai@suse.de # [PATCH] sparc ALSA fix # # sound/core/pcm_native.c was assuming that all architectures implement # io_remap_page_range() in the same way. They don't, so the sparc64 build # broke. # # mmap callback is added to PCM ops. The driver can implement its own mmap # method. # # Also, mmapping of the status and control records is available only on known # coherent architectures now. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/pci/rme96.c # 2004/09/03 02:08:15-07:00 tiwai@suse.de +8 -8 # sparc ALSA fix # # sound/pci/rme32.c # 2004/09/03 02:08:15-07:00 tiwai@suse.de +6 -4 # sparc ALSA fix # # sound/pci/nm256/nm256.c # 2004/09/03 02:08:15-07:00 tiwai@suse.de +4 -4 # sparc ALSA fix # # sound/core/pcm_native.c # 2004/09/03 02:08:15-07:00 tiwai@suse.de +76 -24 # sparc ALSA fix # # sound/core/pcm.c # 2004/09/03 02:08:15-07:00 tiwai@suse.de +3 -0 # sparc ALSA fix # # include/sound/pcm.h # 2004/09/03 02:08:15-07:00 tiwai@suse.de +23 -0 # sparc ALSA fix # # include/sound/asound.h # 2004/09/03 02:08:15-07:00 tiwai@suse.de +0 -1 # sparc ALSA fix # # ChangeSet # 2004/09/03 10:20:35-07:00 akpm@osdl.org # [PATCH] Fix shmem.c stubs # # Fix the build with CONFIG_SHMEM=n # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/mm.h # 2004/09/03 02:08:15-07:00 akpm@osdl.org +3 -3 # Fix shmem.c stubs # # ChangeSet # 2004/09/03 10:20:23-07:00 akpm@osdl.org # [PATCH] x86_64 waitid syscall number fix # # I mucked this up. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/unistd.h # 2004/09/03 02:08:14-07:00 akpm@osdl.org +1 -1 # x86_64 waitid syscall number fix # # ChangeSet # 2004/09/03 09:25:58-07:00 dev@sw.ru # [PATCH] Fix do_each_task_pid() loop with 'continue' inside # # Dmitry Torokhov triggered a problem in the new pidhash macros: These # do_each_task_pid()/while_each_task_pid() do loop forever if you use a # 'continue' inside them. # # The end of the loop has to be inside the "while()" statement, so as to # not make "continue" jump over it. # # include/linux/pid.h # 2004/09/03 00:40:34-07:00 dev@sw.ru +4 -4 # Fix do_each_task_pid() loop with 'continue' inside # # ChangeSet # 2004/09/03 07:54:12-07:00 torvalds@ppc970.osdl.org # Merge http://lia64.bkbits.net/linux-ia64-release-2.6.9 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-ia64/acpi.h # 2004/09/03 07:54:08-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # arch/ia64/mm/contig.c # 2004/09/03 07:54:08-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # arch/ia64/kernel/perfmon.c # 2004/09/03 07:54:08-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/09/03 20:01:05+10:00 airlied@starflyer.(none) # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_cp.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +11 -11 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_cce.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +11 -12 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_dma.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +11 -12 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_dma.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +3 -3 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_dma.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +2 -2 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_dma.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +2 -2 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +9 -10 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_memory.h # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +1 -0 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/03 20:00:58+10:00 airlied@starflyer.(none) +34 -48 # remove DRM_IOREMAP* and DRM_FIND_MAP macros replace them with inline fns # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 19:49:41+10:00 airlied@starflyer.(none) # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/03 19:49:23+10:00 airlied@starflyer.(none) +0 -1 # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/03 19:49:23+10:00 airlied@starflyer.(none) +0 -1 # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/03 19:49:23+10:00 airlied@starflyer.(none) +0 -2 # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/03 19:49:23+10:00 airlied@starflyer.(none) +0 -3 # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/03 19:49:23+10:00 airlied@starflyer.(none) +0 -3 # remove HAVE_DMA_WAITLIST as it was only used by gamma # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 19:43:02+10:00 airlied@starflyer.(none) # remove __HAVE_DMA_SCHEDULE was only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/03 19:42:55+10:00 airlied@starflyer.(none) +1 -3 # remove __HAVE_DMA_SCHEDULE was only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/03 19:42:55+10:00 airlied@starflyer.(none) +0 -7 # remove __HAVE_DMA_SCHEDULE was only used by gamma. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 19:37:35+10:00 airlied@starflyer.(none) # Dump __HAVE_DMA_FREELIST is only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/03 19:37:29+10:00 airlied@starflyer.(none) +2 -1 # Dump __HAVE_DMA_FREELIST is only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_dma.h # 2004/09/03 19:37:29+10:00 airlied@starflyer.(none) +0 -13 # Dump __HAVE_DMA_FREELIST is only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/03 19:37:29+10:00 airlied@starflyer.(none) +0 -22 # Dump __HAVE_DMA_FREELIST is only used by gamma. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/03 19:37:29+10:00 airlied@starflyer.(none) +0 -3 # Dump __HAVE_DMA_FREELIST is only used by gamma. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 19:21:49+10:00 airlied@starflyer.(none) # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_drv.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +4 -0 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +2 -0 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_context.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +2 -2 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +0 -3 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +7 -0 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.c # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +5 -19 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_context.c # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +1 -0 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_fops.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +0 -4 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/03 19:21:33+10:00 airlied@starflyer.(none) +11 -21 # remove DRIVER_FOPS and related macros # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 19:06:05+10:00 airlied@starflyer.(none) # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_mm.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +4 -2 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -2 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -11 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +10 -3 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_cp.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +11 -11 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -8 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_state.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +5 -4 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_cce.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +7 -7 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -7 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_dma.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +6 -6 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -7 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_dma.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +3 -2 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -9 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_dma.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +3 -2 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -8 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +4 -5 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -4 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_context.c # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +19 -0 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +0 -4 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +24 -51 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_context.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +8 -6 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +7 -19 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/03 19:05:58+10:00 airlied@starflyer.(none) +6 -1 # Remove DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T, DRIVER_AGP_BUFFERS_MAP # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/03 00:08:40-07:00 kaber@trash.net # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_irc.c # 2004/09/03 00:07:57-07:00 kaber@trash.net +1 -17 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_ftp.c # 2004/09/03 00:07:57-07:00 kaber@trash.net +1 -19 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_irc.c # 2004/09/03 00:07:57-07:00 kaber@trash.net +3 -4 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_ftp.c # 2004/09/03 00:07:57-07:00 kaber@trash.net +1 -2 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv4/ip_conntrack_irc.h # 2004/09/03 00:07:57-07:00 kaber@trash.net +0 -5 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv4/ip_conntrack_ftp.h # 2004/09/03 00:07:57-07:00 kaber@trash.net +0 -5 # [NETFILTER]: Fix deadlock condition in conntrack/nat-helpers # # There is a possible deadlock condition with conntrack/nat-helpers: # # CPU1: # conntrack-helper:help: lock(private_lock) # ip_conntrack_expect_related: write_lock(ip_conntrack_lock) # # CPU2: # nat-core:do_bindings: read_lock(ip_conntrack_lock) # nat-helper:help: lock(private_lock) # # The lock in the nat-helper is unneccessary because the expectation # is never changed and is protected by ip_conntrack_lock. # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/02 23:58:05-07:00 kaber@trash.net # [NETFILTER]: Fix confusing naming in NAT-helpers # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_irc.c # 2004/09/02 23:57:33-07:00 kaber@trash.net +9 -9 # [NETFILTER]: Fix confusing naming in NAT-helpers # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_ftp.c # 2004/09/02 23:57:33-07:00 kaber@trash.net +12 -12 # [NETFILTER]: Fix confusing naming in NAT-helpers # # Signed-off-by: Patrick McHardy # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/02 23:39:07-07:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/09/02 23:38:47-07:00 davem@nuts.davemloft.net +13 -11 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/09/02 19:05:39-07:00 akpm@osdl.org # [PATCH] NFS: older gcc's don't like unsized arrays # # The NFS symlink code cleanup causes older gcc's to barf. # # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/09/02 18:53:29-07:00 trond.myklebust@fys.uio.no # [PATCH] NFSv3: Fix up an unaligned access error in nfs3_proc_unlink_setup() # # Signed-off-by: Trond Myklebust # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/09/02 17:53:00-07:00 trond.myklebust@fys.uio.no # [PATCH] NFS: fix problem of ESTALE errors on NFSv2 symlinks # # NFSv2: Fix another bad filehandle cast. # NFSv2: The symlink operation does not return a valid filehandle. # # Signed-off-by: Trond Myklebust # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/09/02 17:52:49-07:00 trond.myklebust@fys.uio.no # [PATCH] NFS: clean up the new symlink code # # - Now that the VFS no longer uses it, we don't need to cache the symlink # string length. # - Make ->readlink() take page offset+length arguments # - Fix up page under/overflow checking on the readlink XDR code so that # it matches read/write. # # Signed-off-by: Trond Myklebust # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/09/02 17:00:19-07:00 torvalds@ppc970.osdl.org # The coverity source checker is wrong. Revert some of the "leak fixes". # # Thanks to Davem for noticing. We probably should _not_ trust the # coverity reports that much. # # Cset exclude: davej@redhat.com[torvalds]|ChangeSet|20040902213928|62770 # Cset exclude: davej@redhat.com[torvalds]|ChangeSet|20040902213829|63705 # # ChangeSet # 2004/09/03 05:48:35+00:00 aegl@agluck-lia64.sc.intel.com # Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/work/stephane # into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9 # # arch/ia64/kernel/perfmon.c # 2004/09/03 05:48:30+00:00 aegl@agluck-lia64.sc.intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/03 05:46:43+00:00 aegl@agluck-lia64.sc.intel.com # Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/work/sn2defconfig # into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9 # # arch/ia64/configs/sn2_defconfig # 2004/09/03 05:46:36+00:00 aegl@agluck-lia64.sc.intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/03 05:42:46+00:00 aegl@agluck-lia64.sc.intel.com # Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/work/jesse # into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9 # # arch/ia64/configs/generic_defconfig # 2004/09/03 05:42:39+00:00 aegl@agluck-lia64.sc.intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/03 05:34:20+00:00 ianw@gelato.unsw.edu.au # [IA64] VIRTUAL_MEM_MAP can be set when DISCONTIGMEM isn't; handle it # # Patch developed by Ian Wienand under advice from Bill Irwin. # # Signed-off-by: William Irwin # Signed-off-by: Tony Luck # # include/asm-ia64/page.h # 2004/09/03 05:25:57+00:00 aegl@agluck-lia64.sc.intel.com +7 -0 # CONFIG_VIRTUAL_MEM_MAP can be set when CONFIG_DISCONTIGMEM isn't; handle this case # # fs/nfs/symlink.c # 2004/09/02 18:49:18-07:00 akpm@osdl.org +1 -1 # NFS: older gcc's don't like unsized arrays # # fs/nfs/nfs3proc.c # 2004/08/31 17:24:35-07:00 trond.myklebust@fys.uio.no +12 -11 # NFSv3: Fix up an unaligned access error in nfs3_proc_unlink_setup() # # fs/nfs/proc.c # 2004/09/02 12:33:01-07:00 trond.myklebust@fys.uio.no +1 -0 # NFS: fix problem of ESTALE errors on NFSv2 symlinks # # fs/nfs/inode.c # 2004/09/02 12:43:48-07:00 trond.myklebust@fys.uio.no +9 -5 # NFS: fix problem of ESTALE errors on NFSv2 symlinks # # include/linux/nfs_xdr.h # 2004/09/02 12:10:54-07:00 trond.myklebust@fys.uio.no +8 -4 # NFS: clean up the new symlink code # # fs/nfs/symlink.c # 2004/09/02 13:10:32-07:00 trond.myklebust@fys.uio.no +7 -12 # NFS: clean up the new symlink code # # fs/nfs/proc.c # 2004/09/02 12:10:54-07:00 trond.myklebust@fys.uio.no +4 -3 # NFS: clean up the new symlink code # # fs/nfs/nfs4xdr.c # 2004/09/02 13:41:42-07:00 trond.myklebust@fys.uio.no +23 -23 # NFS: clean up the new symlink code # # fs/nfs/nfs4proc.c # 2004/09/02 12:10:54-07:00 trond.myklebust@fys.uio.no +7 -4 # NFS: clean up the new symlink code # # fs/nfs/nfs3xdr.c # 2004/09/02 13:41:18-07:00 trond.myklebust@fys.uio.no +25 -19 # NFS: clean up the new symlink code # # fs/nfs/nfs3proc.c # 2004/09/02 12:10:54-07:00 trond.myklebust@fys.uio.no +4 -3 # NFS: clean up the new symlink code # # fs/nfs/nfs2xdr.c # 2004/09/02 13:41:10-07:00 trond.myklebust@fys.uio.no +24 -19 # NFS: clean up the new symlink code # # net/ax25/af_ax25.c # 2004/09/02 17:00:17-07:00 torvalds@ppc970.osdl.org +0 -0 # The coverity source checker is wrong. Revert some of the "leak fixes". # # drivers/video/aty/atyfb_base.c # 2004/09/02 17:00:17-07:00 torvalds@ppc970.osdl.org +0 -0 # The coverity source checker is wrong. Revert some of the "leak fixes". # # ChangeSet # 2004/09/02 14:50:38-07:00 herbert@gondor.apana.org.au # [IPV4/IPV6]: Use csum_sub() instead of csum_block_sub() w/zero 3rd arg. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/09/02 14:50:20-07:00 herbert@gondor.apana.org.au +2 -2 # [IPV4/IPV6]: Use csum_sub() instead of csum_block_sub() w/zero 3rd arg. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/09/02 14:50:20-07:00 herbert@gondor.apana.org.au +4 -4 # [IPV4/IPV6]: Use csum_sub() instead of csum_block_sub() w/zero 3rd arg. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/02 14:44:05-07:00 pjones@redhat.com # [SPARC64]: Support 64-bit initrd addresses. # # Needs a SILO update too which is forthcoming. # # Signed-off-by: Peter Jones # Signed-off-by: Ben Collins # Signed-off-by: David S. Miller # # arch/sparc64/mm/init.c # 2004/09/02 14:43:01-07:00 pjones@redhat.com +12 -5 # [SPARC64]: Support 64-bit initrd addresses. # # arch/sparc64/kernel/head.S # 2004/09/02 14:43:01-07:00 pjones@redhat.com +4 -1 # [SPARC64]: Support 64-bit initrd addresses. # # ChangeSet # 2004/09/02 14:42:48-07:00 kksx@mail.ru # [PATCH] fixed pidhashing patch # # This patch fixes strange and obscure pid implementation in current kernels: # - it removes calling of put_task_struct() from detach_pid() # under tasklist_lock. This allows to use blocking calls # in security_task_free() hooks (in __put_task_struct()). # - it saves some space = 5*5 ints = 100 bytes in task_struct # - it's smaller and tidy, more straigthforward and doesn't use # any knowledge about pids using and assignment. # - it removes pid_links and pid_struct doesn't hold reference counters # on task_struct. instead, new pid_structs and linked altogether and # only one of them is inserted in hash_list. # # Signed-off-by: Kirill Korotaev (kksx@mail.ru) # Signed-off-by: William Irwin # Signed-off-by: Linus Torvalds # # kernel/sys.c # 2004/09/02 02:48:04-07:00 kksx@mail.ru +6 -10 # fixed pidhashing patch # # kernel/signal.c # 2004/09/02 02:48:04-07:00 kksx@mail.ru +4 -8 # fixed pidhashing patch # # kernel/pid.c # 2004/09/02 03:49:41-07:00 kksx@mail.ru +40 -46 # fixed pidhashing patch # # kernel/fork.c # 2004/09/02 02:48:04-07:00 kksx@mail.ru +2 -3 # fixed pidhashing patch # # kernel/exit.c # 2004/09/02 03:30:52-07:00 kksx@mail.ru +7 -19 # fixed pidhashing patch # # kernel/capability.c # 2004/09/02 02:48:04-07:00 kksx@mail.ru +2 -4 # fixed pidhashing patch # # include/linux/sched.h # 2004/09/02 02:48:04-07:00 kksx@mail.ru +4 -5 # fixed pidhashing patch # # include/linux/pid.h # 2004/09/02 03:43:53-07:00 kksx@mail.ru +17 -27 # fixed pidhashing patch # # fs/proc/base.c # 2004/09/02 02:48:03-07:00 kksx@mail.ru +2 -3 # fixed pidhashing patch # # fs/fcntl.c # 2004/09/02 02:48:03-07:00 kksx@mail.ru +4 -8 # fixed pidhashing patch # # drivers/char/tty_io.c # 2004/09/02 02:48:03-07:00 kksx@mail.ru +12 -18 # fixed pidhashing patch # # ChangeSet # 2004/09/02 14:39:41-07:00 cw@f00f.org # [PATCH] i386 reduce spurious interrupt noise # # i386 hardware can (and does) see spurious interrupts from time to # tome. Ideally I would like the printk removed completely but this is # probably good enough for now. # # Signed-off-by: Chris Wedgwood # Signed-off-by: Linus Torvalds # # arch/i386/kernel/i8259.c # 2004/09/02 12:20:49-07:00 cw@f00f.org +1 -1 # i386 reduce spurious interrupt noise # # arch/i386/kernel/apic.c # 2004/09/02 12:19:19-07:00 cw@f00f.org +1 -1 # i386 reduce spurious interrupt noise # # ChangeSet # 2004/09/02 14:39:16-07:00 davej@redhat.com # [PATCH] Check find_vma return code in make_pages_present() # # It can return NULL, so check for it. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # mm/memory.c # 2004/09/01 05:31:18-07:00 davej@redhat.com +2 -0 # Check find_vma return code in make_pages_present() # # ChangeSet # 2004/09/02 14:39:04-07:00 davej@redhat.com # [PATCH] More PNP leaks. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/pnp/pnpbios/proc.c # 2004/06/07 03:07:05-07:00 davej@redhat.com +6 -2 # More PNP leaks. # # ChangeSet # 2004/09/02 14:38:52-07:00 davej@redhat.com # [PATCH] Fix leak in ISAPNP core # # This looks odd, but there doesn't seem to be an # isapnp_free() or similar.. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/pnp/isapnp/core.c # 2004/08/23 06:08:16-07:00 davej@redhat.com +3 -1 # Fix leak in ISAPNP core # # ChangeSet # 2004/09/02 14:38:41-07:00 davej@redhat.com # [PATCH] Fix leak in atmel wireless driver. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/net/wireless/atmel.c # 2004/08/23 06:08:15-07:00 davej@redhat.com +3 -2 # Fix leak in atmel wireless driver. # # ChangeSet # 2004/09/02 14:38:17-07:00 davej@redhat.com # [PATCH] Fix potential leaks in pc300_tty driver # # It appears that 'new' can be allocated, and next time around # the loop, if something goes wrong, we lose the reference.. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/net/wan/pc300_tty.c # 2004/08/23 06:08:15-07:00 davej@redhat.com +8 -2 # Fix potential leaks in pc300_tty driver # # ChangeSet # 2004/09/02 14:38:05-07:00 davej@redhat.com # [PATCH] Fix leaks in ISOFS. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # fs/isofs/rock.c # 2004/08/23 06:08:20-07:00 davej@redhat.com +3 -1 # Fix leaks in ISOFS. # # ChangeSet # 2004/09/02 14:37:53-07:00 davej@redhat.com # [PATCH] Fix another PNP leak. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/pnp/pnpbios/core.c # 2004/08/23 06:08:16-07:00 davej@redhat.com +3 -1 # Fix another PNP leak. # # ChangeSet # 2004/09/02 14:37:41-07:00 davej@redhat.com # [PATCH] Fix NULL dereference in OSS v_midi driver # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # sound/oss/v_midi.c # 2004/06/03 05:43:00-07:00 davej@redhat.com +3 -2 # Fix NULL dereference in OSS v_midi driver # # ChangeSet # 2004/09/02 14:37:29-07:00 davej@redhat.com # [PATCH] Remove pointless check in zlib # # We dereference 'z' a few lines above this check. # If it was possible to hit this condition, it wouldve # triggered long ago, in the form of a crash. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # lib/zlib_inflate/inflate.c # 2004/06/03 05:42:54-07:00 davej@redhat.com +0 -2 # Remove pointless check in zlib # # ChangeSet # 2004/09/02 14:37:17-07:00 davej@redhat.com # [PATCH] Clean up failure path in DAC960 # # 1. If the ScatterGatherPool allocation fails, its pointless # trying to allocate a RequestSensePool. # 2. Free up the ScatterGatherPool if the RequestSensePool allocation fails. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/block/DAC960.c # 2004/06/07 03:07:03-07:00 davej@redhat.com +6 -1 # Clean up failure path in DAC960 # # ChangeSet # 2004/09/02 14:37:04-07:00 davej@redhat.com # [PATCH] Remove pointless code from ALSA emu10k1 midi driver. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # sound/oss/emu10k1/midi.c # 2004/08/23 06:08:26-07:00 davej@redhat.com +1 -2 # Remove pointless code from ALSA emu10k1 midi driver. # # ChangeSet # 2004/09/02 14:36:53-07:00 davej@redhat.com # [PATCH] Fix leak in PNP interface code. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # drivers/pnp/interface.c # 2004/09/01 13:38:41-07:00 davej@redhat.com +6 -4 # Fix leak in PNP interface code. # # ChangeSet # 2004/09/02 14:36:41-07:00 davej@redhat.com # [PATCH] Fix NULL derefence in OSS MAUI driver. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # sound/oss/maui.c # 2004/09/01 05:31:21-07:00 davej@redhat.com +1 -2 # Fix NULL derefence in OSS MAUI driver. # # ChangeSet # 2004/09/02 14:26:24-07:00 kaber@trash.net # [IPV4/IPV6]: Fix suboptimal fragment sizing for last fragment # # Yoshifuji's recent fragment patch prevents unnecessary fragmentation # when the data can be kept in a single packet, but only for the first # packet. When fragmenting, all fragments are still truncated to # multiples of 8 and we might end up creating an unnecessary fragment. # # This dump shows the problem (MTU 1499): # # 172.16.1.123.32771 > 172.16.195.3.4135: udp 2937 (frag 7066:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1472@1472+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1@2944) # # This patch always builds mtu sized fragments and truncates the previous # fragment to a multiple of 8 bytes when allocating a new one. With the # patch the dump looks like this: # # # 172.16.1.123.32772 > 172.16.195.3.4135: udp 2937 (frag 49641:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 49641:1473@1472) # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/09/02 14:26:06-07:00 kaber@trash.net +13 -22 # [IPV4/IPV6]: Fix suboptimal fragment sizing for last fragment # # Yoshifuji's recent fragment patch prevents unnecessary fragmentation # when the data can be kept in a single packet, but only for the first # packet. When fragmenting, all fragments are still truncated to # multiples of 8 and we might end up creating an unnecessary fragment. # # This dump shows the problem (MTU 1499): # # 172.16.1.123.32771 > 172.16.195.3.4135: udp 2937 (frag 7066:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1472@1472+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1@2944) # # This patch always builds mtu sized fragments and truncates the previous # fragment to a multiple of 8 bytes when allocating a new one. With the # patch the dump looks like this: # # # 172.16.1.123.32772 > 172.16.195.3.4135: udp 2937 (frag 49641:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 49641:1473@1472) # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/09/02 14:26:06-07:00 kaber@trash.net +20 -49 # [IPV4/IPV6]: Fix suboptimal fragment sizing for last fragment # # Yoshifuji's recent fragment patch prevents unnecessary fragmentation # when the data can be kept in a single packet, but only for the first # packet. When fragmenting, all fragments are still truncated to # multiples of 8 and we might end up creating an unnecessary fragment. # # This dump shows the problem (MTU 1499): # # 172.16.1.123.32771 > 172.16.195.3.4135: udp 2937 (frag 7066:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1472@1472+) # 172.16.1.123 > 172.16.195.3: udp (frag 7066:1@2944) # # This patch always builds mtu sized fragments and truncates the previous # fragment to a multiple of 8 bytes when allocating a new one. With the # patch the dump looks like this: # # # 172.16.1.123.32772 > 172.16.195.3.4135: udp 2937 (frag 49641:1472@0+) # 172.16.1.123 > 172.16.195.3: udp (frag 49641:1473@1472) # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/02 13:13:01-07:00 eric.lemoine@gmail.com # [NET]: Allow get/set of dev->weight via netlink. # # Signed-off-by: David S. Miller # # net/core/rtnetlink.c # 2004/09/02 13:12:43-07:00 eric.lemoine@gmail.com +12 -0 # [NET]: Allow get/set of dev->weight via netlink. # # Signed-off-by: David S. Miller # # include/linux/rtnetlink.h # 2004/09/02 13:12:43-07:00 eric.lemoine@gmail.com +2 -0 # [NET]: Allow get/set of dev->weight via netlink. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/02 13:05:19-07:00 laforge@netfilter.org # [IPV4]: Use nf_reset() in parp_redo(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/arp.c # 2004/09/02 13:04:33-07:00 laforge@netfilter.org +1 -3 # [IPV4]: Use nf_reset() in parp_redo(). # # ChangeSet # 2004/09/02 11:38:10-07:00 davej@redhat.com # [PATCH] Eicon ISDN: fix leak in eicon debug code. # # Spotted with the source checker from Coverity.com. # # Signed-off-by: Dave Jones # Signed-off-by: Armin Schindler # # drivers/isdn/hardware/eicon/debug.c # 2004/09/01 05:31:10-07:00 davej@redhat.com +1 -0 # Eicon ISDN: fix leak in eicon debug code. # # ChangeSet # 2004/09/02 21:52:02+10:00 airlied@starflyer.(none) # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/tdfx_drv.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +5 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_mm.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +4 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_drv.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +1 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon_state.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +33 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/radeon.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -37 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128_state.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +21 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/r128.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -24 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga_dma.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +17 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/mga.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -12 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_dma.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +23 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -21 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830_dma.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +25 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i830.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -17 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810_dma.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +24 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/i810.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -16 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma_dma.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +39 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/gamma.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -16 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_drv.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +0 -32 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb_context.c # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +40 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/ffb.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +1 -1 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_fops.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +2 -1 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_drv.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +79 -120 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # drivers/char/drm/drmP.h # 2004/09/02 21:51:56+10:00 airlied@starflyer.(none) +22 -0 # Initial DRM function table removes some if the DRIVER_ macros. # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/02 21:14:22+10:00 airlied@starflyer.(none) # Mark gamma as broken # # Signed-off-by: Dave Airlie # # drivers/char/drm/Kconfig # 2004/09/02 21:10:09+10:00 airlied@starflyer.(none) +1 -1 # Mark gamma as broken # # Signed-off-by: Dave Airlie # # ChangeSet # 2004/09/01 22:44:13-07:00 davem@nuts.davemloft.net # [PKT_SCHED]: Kill bogus spaces in Kconfig strings. # # Signed-off-by: David S. Miller # # net/sched/Kconfig # 2004/09/01 22:43:44-07:00 davem@nuts.davemloft.net +5 -5 # [PKT_SCHED]: Kill bogus spaces in Kconfig strings. # # ChangeSet # 2004/09/01 22:35:47-07:00 hadi@cyberus.ca # [PKT_SCHED]: Add gact generic actions. # # Signed-off-by: Jamal Hadi Salim # Signed-off-by: David S. Miller # # net/sched/Makefile # 2004/09/01 22:35:09-07:00 hadi@cyberus.ca +3 -2 # [PKT_SCHED]: Add gact generic actions. # # net/sched/Kconfig # 2004/09/01 22:35:09-07:00 hadi@cyberus.ca +12 -0 # [PKT_SCHED]: Add gact generic actions. # # net/sched/gact.c # 2004/09/01 22:35:04-07:00 hadi@cyberus.ca +261 -0 # [PKT_SCHED]: Add gact generic actions. # # include/net/tc_act/tc_gact.h # 2004/09/01 22:35:04-07:00 hadi@cyberus.ca +17 -0 # [PKT_SCHED]: Add gact generic actions. # # net/sched/gact.c # 2004/09/01 22:35:04-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/sched/gact.c # # include/net/tc_act/tc_gact.h # 2004/09/01 22:35:04-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/tc_act/tc_gact.h # # include/linux/tc_act/tc_gact.h # 2004/09/01 22:35:02-07:00 hadi@cyberus.ca +34 -0 # [PKT_SCHED]: Add gact generic actions. # # include/linux/tc_act/tc_gact.h # 2004/09/01 22:35:02-07:00 hadi@cyberus.ca +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/linux/tc_act/tc_gact.h # # ChangeSet # 2004/09/01 22:07:46-07:00 herbert@gondor.apana.org.au # [IPV4/IPV6]: Fixup checksums properly when fragmenting. # # If we end up with a fraggap, when we copy the data # over to the next frag being built we must compute # a checksum for the bit we copy over for the new # fragment and subtract that checksum from the place # we are copying it from. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/09/01 22:07:29-07:00 herbert@gondor.apana.org.au +7 -3 # [IPV4/IPV6]: Fixup checksums properly when fragmenting. # # If we end up with a fraggap, when we copy the data # over to the next frag being built we must compute # a checksum for the bit we copy over for the new # fragment and subtract that checksum from the place # we are copying it from. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/09/01 22:07:28-07:00 herbert@gondor.apana.org.au +12 -5 # [IPV4/IPV6]: Fixup checksums properly when fragmenting. # # If we end up with a fraggap, when we copy the data # over to the next frag being built we must compute # a checksum for the bit we copy over for the new # fragment and subtract that checksum from the place # we are copying it from. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 22:03:37-07:00 davem@nuts.davemloft.net # [NET]: Free neigh_parms using RCU to fix neigh_create/inetdev_destroy race. # # Signed-off-by: David S. Miller # # net/core/neighbour.c # 2004/09/01 22:03:13-07:00 davem@nuts.davemloft.net +11 -1 # [NET]: Free neigh_parms using RCU to fix neigh_create/inetdev_destroy race. # # Signed-off-by: David S. Miller # # include/net/neighbour.h # 2004/09/01 22:03:13-07:00 davem@nuts.davemloft.net +3 -0 # [NET]: Free neigh_parms using RCU to fix neigh_create/inetdev_destroy race. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 23:35:11-05:00 stevef@smfhome1.smfdom # [CIFS] Fix CIFS symlink regression when long symlink paths # # Signed-of-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/cifsfs.c # 2004/09/01 23:35:03-05:00 stevef@smfhome1.smfdom +1 -1 # finish off cifs symlink # # ChangeSet # 2004/09/01 18:15:25-07:00 laforge@netfilter.org # [NETFILTER]: Sort Kconfig entries into reasonable order. # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/Kconfig # 2004/09/01 18:15:07-07:00 laforge@netfilter.org +134 -128 # [NETFILTER]: Sort Kconfig entries into reasonable order. # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 18:14:42-07:00 laforge@netfilter.org # [NETFILTER]: Add some missing help entries. # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/Kconfig # 2004/09/01 18:14:20-07:00 laforge@netfilter.org +21 -0 # [NETFILTER]: Add some missing help entries. # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 18:13:30-07:00 kksx@maul.ru # [IPV4]: Need to clear nf_debug parp_redo(). # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/arp.c # 2004/09/01 18:12:37-07:00 kksx@maul.ru +3 -0 # [IPV4]: Need to clear nf_debug parp_redo(). # # ChangeSet # 2004/09/01 17:58:44-07:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/09/01 17:58:10-07:00 davem@nuts.davemloft.net +7 -6 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/09/01 17:54:36-07:00 janitor@sternwelten.at # [SPARC64]: Use list_for_each in pci_sabre.c # # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_sabre.c # 2004/09/01 17:54:18-07:00 janitor@sternwelten.at +4 -8 # [SPARC64]: Use list_for_each in pci_sabre.c # # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 17:53:26-07:00 davem@nuts.davemloft.net # [SPARC64]: Initial KPROBES implementation. # # Signed-off-by: David S. Miller # # include/asm-sparc64/ttable.h # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +6 -0 # [SPARC64]: Initial KPROBES implementation. # # include/asm-sparc64/kdebug.h # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +5 -4 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/mm/fault.c # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +10 -1 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/kernel/ttable.S # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/kernel/traps.c # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +77 -6 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/kernel/Makefile # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +1 -0 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/Kconfig.debug # 2004/09/01 17:52:53-07:00 davem@nuts.davemloft.net +10 -0 # [SPARC64]: Initial KPROBES implementation. # # include/asm-sparc64/kprobes.h # 2004/09/01 17:52:46-07:00 davem@nuts.davemloft.net +24 -0 # [SPARC64]: Initial KPROBES implementation. # # include/asm-sparc64/kprobes.h # 2004/09/01 17:52:46-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/sparc-2.6/include/asm-sparc64/kprobes.h # # arch/sparc64/kernel/kprobes.c # 2004/09/01 17:52:44-07:00 davem@nuts.davemloft.net +276 -0 # [SPARC64]: Initial KPROBES implementation. # # arch/sparc64/kernel/kprobes.c # 2004/09/01 17:52:44-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/kernel/kprobes.c # # ChangeSet # 2004/09/01 17:30:15-07:00 davem@nuts.davemloft.net # [KPROBES]: Pass integer addresses, not pointers, to flush_icache_range(). # # Signed-off-by: David S. Miller # # kernel/kprobes.c # 2004/09/01 17:29:45-07:00 davem@nuts.davemloft.net +4 -2 # [KPROBES]: Pass integer addresses, not pointers, to flush_icache_range(). # # ChangeSet # 2004/09/01 16:24:37-07:00 torvalds@ppc970.osdl.org # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # include/linux/kref.h # 2004/09/01 16:24:31-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # include/asm-ia64/sn/xtalk/xwidget.h # 2004/09/01 16:24:31-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # include/asm-ia64/sn/xtalk/xtalk.h # 2004/09/01 16:24:31-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # include/asm-ia64/sn/sn2/shubio.h # 2004/09/01 16:24:31-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "ifdef" rather than "if" to test for __KERNEL__ # # Both work, but the latter can cause warnings in user space # from compilers that don't like using undefined identifiers # in preprocessor expressions (quite reasonable). # # Pointed out by Randy Dunlap. # # ChangeSet # 2004/09/01 17:59:07-05:00 stevef@stevef95.austin.ibm.com # [CIFS] fix recent cifs symlink change so as not call kfree on null path # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/link.c # 2004/09/01 17:58:58-05:00 stevef@stevef95.austin.ibm.com +3 -3 # do not call kfree on null path in symlink # # ChangeSet # 2004/09/01 15:38:09-07:00 davem@nuts.davemloft.net # [SPARC64]: Add sparc64die_chain as on x86{,_64} # # include/asm-sparc64/kdebug.h # 2004/09/01 15:37:36-07:00 davem@nuts.davemloft.net +45 -3 # [SPARC64]: Add sparc64die_chain as on x86{,_64} # # arch/sparc64/kernel/traps.c # 2004/09/01 15:37:36-07:00 davem@nuts.davemloft.net +14 -0 # [SPARC64]: Add sparc64die_chain as on x86{,_64} # # ChangeSet # 2004/09/01 15:23:48-07:00 davem@nuts.davemloft.net # [SPARC64]: Kill unused 'flags' in pci_sabre.c # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_sabre.c # 2004/09/01 15:22:57-07:00 davem@nuts.davemloft.net +0 -1 # [SPARC64]: Kill unused 'flags' in pci_sabre.c # # ChangeSet # 2004/09/01 15:21:09-07:00 bdschuym@pandora.be # [BRIDGE]: Add ipv6 packet filtering. # # Signed-off-by: Bart De Schuymer # Signed-off-by: David S. Miller # # net/bridge/br_netfilter.c # 2004/09/01 15:20:51-07:00 bdschuym@pandora.be +257 -126 # [BRIDGE]: Add ipv6 packet filtering. # # Signed-off-by: Bart De Schuymer # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv6.h # 2004/09/01 15:20:51-07:00 bdschuym@pandora.be +2 -0 # [BRIDGE]: Add ipv6 packet filtering. # # Signed-off-by: Bart De Schuymer # Signed-off-by: David S. Miller # # Documentation/networking/ip-sysctl.txt # 2004/09/01 15:20:51-07:00 bdschuym@pandora.be +5 -0 # [BRIDGE]: Add ipv6 packet filtering. # # Signed-off-by: Bart De Schuymer # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 15:20:12-07:00 davem@nuts.davemloft.net # [SPARC64]: Zap pci_controller_lock. # # It is only taken during boot time bus probe, thus # protects nothing at run time and causes bogus bug # messages when PREEMPT is enabled. When we support # PCI controller hot plug we will add a suitable locking # mechanism. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_schizo.c # 2004/09/01 15:18:58-07:00 davem@nuts.davemloft.net +0 -6 # [SPARC64]: Zap pci_controller_lock. # # arch/sparc64/kernel/pci_sabre.c # 2004/09/01 15:18:58-07:00 davem@nuts.davemloft.net +0 -2 # [SPARC64]: Zap pci_controller_lock. # # arch/sparc64/kernel/pci_psycho.c # 2004/09/01 15:18:58-07:00 davem@nuts.davemloft.net +0 -6 # [SPARC64]: Zap pci_controller_lock. # # arch/sparc64/kernel/pci_impl.h # 2004/09/01 15:18:58-07:00 davem@nuts.davemloft.net +0 -1 # [SPARC64]: Zap pci_controller_lock. # # arch/sparc64/kernel/pci.c # 2004/09/01 15:18:58-07:00 davem@nuts.davemloft.net +0 -4 # [SPARC64]: Zap pci_controller_lock. # # ChangeSet # 2004/09/01 15:16:18-07:00 janitor@sternwelten.at # [SPARC64]: Use list_for_each in pci_common.c # # Replace for/while loops with list_for_each*. # # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_common.c # 2004/09/01 15:15:56-07:00 janitor@sternwelten.at +49 -73 # [SPARC64]: Use list_for_each in pci_common.c # # Replace for/while loops with list_for_each*. # # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: David S. Miller # # ChangeSet # 2004/09/01 14:40:21-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix set_utsname returning with uts semaphore held. # # Based upon a patch from Alexander Stohr. # # This thing was also reimplementing strnchr() as well. # # Signed-off-by: David S. Miller # # arch/sparc64/solaris/misc.c # 2004/09/01 14:39:26-07:00 davem@nuts.davemloft.net +44 -25 # [SPARC64]: Fix set_utsname returning with uts semaphore held. # # ChangeSet # 2004/09/01 12:26:04-07:00 trini@kernel.crashing.org # [PATCH] ppc32: fix the 'checkbin' target # # The checkbin target on PPC32 isn't quite right. # # First, one of the tests (to ensure that some instructions are known to # gas) is never actually invoked because 'checkbin' doesn't know about # stuff set in .config, so we always have the 'else' case run. This # changes to always running the test and telling the user to upgrade to at # least binutils 2.12.1. # # The next problem is that we were doing $(AS) -o /dev/null ... in both # that test, as well as another. The problem here is that the checkbin # target is run on the install targets, meaning that /dev/null will get # unlinked when the test passes. To get around this we use .tmp_gas_check # as the output file instead. # # Acked by Sam. # # Signed-off-by: Tom Rini # Signed-off-by: Linus Torvalds # # arch/ppc/Makefile # 2004/08/31 17:00:00-07:00 trini@kernel.crashing.org +10 -10 # ppc32: fix the 'checkbin' target # # ChangeSet # 2004/09/01 12:18:31-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] nfs ->follow_link() switched to new scheme # # NFS takes some thought to switch to the new symlink scheme, because we # can't rely on the pagecache lookup to find the symlink page when freeing # it - the cache might have been invalidated in the meantime. # # So we hide the page information in the symlink data area itself, # by stealing the last pointer in the page used for the cache. That # way nfs_put_link() can just look up the page directly. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/nfs/symlink.c # 2004/08/31 19:41:14-07:00 viro@parcelfarce.linux.theplanet.co.uk +45 -33 # nfs ->follow_link() switched to new scheme # # ChangeSet # 2004/08/31 21:46:37-07:00 viro@www.linux.org.uk # [PATCH] misc cleanup in symlink-handling part of namei.c # # page_follow_link_light() should just call nd_set_link() - error handling will # come for free. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/namei.c # 2004/08/31 16:00:48-07:00 viro@www.linux.org.uk +3 -8 # misc cleanup in symlink-handling part of namei.c # # ChangeSet # 2004/08/31 21:46:25-07:00 viro@www.linux.org.uk # [PATCH] reduce stack use in altroot handling # # Massaged altroot handling to avoid on-stack struct nameidata instance (and # got it faster, actually). We are in the middle of do_follow_link() recursion # here, so the stack footprint is critical. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/namei.c # 2004/08/31 16:12:55-07:00 viro@www.linux.org.uk +17 -15 # reduce stack use in altroot handling # # ChangeSet # 2004/08/31 21:46:13-07:00 viro@www.linux.org.uk # [PATCH] cifs ->follow_link() switched to new scheme, cleaned up # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/cifs/link.c # 2004/08/31 16:10:58-07:00 viro@www.linux.org.uk +22 -19 # cifs ->follow_link() switched to new scheme, cleaned up # # fs/cifs/cifsfs.h # 2004/08/31 16:10:36-07:00 viro@www.linux.org.uk +1 -0 # cifs ->follow_link() switched to new scheme, cleaned up # # fs/cifs/cifsfs.c # 2004/08/31 16:10:31-07:00 viro@www.linux.org.uk +1 -0 # cifs ->follow_link() switched to new scheme, cleaned up # # ChangeSet # 2004/08/31 21:46:01-07:00 viro@www.linux.org.uk # [PATCH] ncpfs ->follow_link() switched to new scheme # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/ncpfs/inode.c # 2004/08/31 16:10:16-07:00 viro@www.linux.org.uk +3 -2 # ncpfs ->follow_link() switched to new scheme # # ChangeSet # 2004/08/31 21:45:50-07:00 viro@www.linux.org.uk # [PATCH] sysfs ->follow_link() switched to new scheme # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/sysfs/sysfs.h # 2004/08/31 16:09:12-07:00 viro@www.linux.org.uk +1 -1 # sysfs ->follow_link() switched to new scheme # # fs/sysfs/symlink.c # 2004/08/31 16:09:00-07:00 viro@www.linux.org.uk +13 -28 # sysfs ->follow_link() switched to new scheme # # ChangeSet # 2004/08/31 21:45:38-07:00 viro@www.linux.org.uk # [PATCH] afs ->follow_link() fixes # # * fixed leaks on failure exits # * got rid of useless struct nameidata instance # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # fs/afs/mntpt.c # 2004/08/31 16:07:00-07:00 viro@www.linux.org.uk +10 -6 # afs ->follow_link() fixes # # ChangeSet # 2004/08/31 21:07:07-07:00 torvalds@ppc970.osdl.org # Allow the compiler to notice "constant" header file. # # Both gcc and sparse will speed up tokenization by noticing # when a header file is protected by the standard preprocessor # #ifndef .. #endif exclusion. # # However, that requires that the headers actually _use_ that # standard exclusion. Some did their own little broken dance. # # include/linux/slab.h # 2004/08/31 21:07:01-07:00 torvalds@ppc970.osdl.org +1 -1 # Allow the compiler to notice "constant" header file. # # Both gcc and sparse will speed up tokenization by noticing # when a header file is protected by the standard preprocessor # #ifndef .. #endif exclusion. # # However, that requires that the headers actually _use_ that # standard exclusion. Some did their own little broken dance. # # include/linux/kref.h # 2004/08/31 21:07:01-07:00 torvalds@ppc970.osdl.org +4 -1 # Allow the compiler to notice "constant" header file. # # Both gcc and sparse will speed up tokenization by noticing # when a header file is protected by the standard preprocessor # #ifndef .. #endif exclusion. # # However, that requires that the headers actually _use_ that # standard exclusion. Some did their own little broken dance. # # ChangeSet # 2004/08/31 18:51:37-07:00 torvalds@ppc970.osdl.org # Annotate sys_wait4() user pointers # # kernel/exit.c # 2004/08/31 18:51:30-07:00 torvalds@ppc970.osdl.org +2 -2 # Annotate sys_wait4() user pointers # # ChangeSet # 2004/08/31 18:06:08-07:00 davem@nuts.davemloft.net # [SPARC]: Add sys_waitid support. # # Signed-off-by: David S. Miller # # include/asm-sparc64/unistd.h # 2004/08/31 18:05:36-07:00 davem@nuts.davemloft.net +7 -5 # [SPARC]: Add sys_waitid support. # # include/asm-sparc64/siginfo.h # 2004/08/31 18:05:36-07:00 davem@nuts.davemloft.net +3 -51 # [SPARC]: Add sys_waitid support. # # include/asm-sparc/unistd.h # 2004/08/31 18:05:35-07:00 davem@nuts.davemloft.net +6 -5 # [SPARC]: Add sys_waitid support. # # arch/sparc64/kernel/systbls.S # 2004/08/31 18:05:35-07:00 davem@nuts.davemloft.net +2 -2 # [SPARC]: Add sys_waitid support. # # arch/sparc64/kernel/sys_sparc32.c # 2004/08/31 18:05:35-07:00 davem@nuts.davemloft.net +24 -4 # [SPARC]: Add sys_waitid support. # # arch/sparc64/kernel/signal32.c # 2004/08/31 18:05:35-07:00 davem@nuts.davemloft.net +74 -3 # [SPARC]: Add sys_waitid support. # # arch/sparc/kernel/systbls.S # 2004/08/31 18:05:35-07:00 davem@nuts.davemloft.net +1 -1 # [SPARC]: Add sys_waitid support. # # ChangeSet # 2004/08/31 16:43:34-07:00 viro@www.linux.org.uk # [PATCH] megaraid annotation # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/megaraid/megaraid_mm.h # 2004/08/31 11:54:15-07:00 viro@www.linux.org.uk +4 -4 # megaraid annotation # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/31 11:54:25-07:00 viro@www.linux.org.uk +22 -21 # megaraid annotation # # drivers/scsi/megaraid/megaraid_ioctl.h # 2004/08/31 11:54:08-07:00 viro@www.linux.org.uk +2 -2 # megaraid annotation # # ChangeSet # 2004/08/31 16:43:22-07:00 viro@www.linux.org.uk # [PATCH] eicon annotation # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/mntfunc.c # 2004/08/31 11:53:47-07:00 viro@www.linux.org.uk +2 -2 # eicon annotation # # ChangeSet # 2004/08/31 16:43:12-07:00 viro@www.linux.org.uk # [PATCH] more NULL noise removal # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/31 11:53:12-07:00 viro@www.linux.org.uk +5 -5 # more NULL noise removal # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/08/31 11:52:04-07:00 viro@www.linux.org.uk +2 -2 # more NULL noise removal # # drivers/mtd/maps/nettel.c # 2004/08/31 08:27:45-07:00 viro@www.linux.org.uk +1 -1 # more NULL noise removal # # drivers/message/i2o/iop.c # 2004/08/31 11:51:47-07:00 viro@www.linux.org.uk +2 -2 # more NULL noise removal # # drivers/isdn/hardware/eicon/divamnt.c # 2004/08/31 11:51:28-07:00 viro@www.linux.org.uk +1 -1 # more NULL noise removal # # drivers/isdn/hardware/eicon/debug.c # 2004/08/31 11:51:22-07:00 viro@www.linux.org.uk +3 -3 # more NULL noise removal # # ChangeSet # 2004/08/31 16:43:00-07:00 viro@www.linux.org.uk # [PATCH] __setup fixes # # fd_mcs and NCR53c406a forget to parse string -> int array in their # setup functions. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/fd_mcs.c # 2004/08/31 08:32:00-07:00 viro@www.linux.org.uk +1 -0 # __setup fixes # # drivers/scsi/NCR53c406a.c # 2004/08/31 08:33:10-07:00 viro@www.linux.org.uk +1 -0 # __setup fixes # # ChangeSet # 2004/08/31 16:42:48-07:00 viro@www.linux.org.uk # [PATCH] sparc64 vga.h fix # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-sparc64/vga.h # 2004/08/31 08:27:40-07:00 viro@www.linux.org.uk +3 -0 # sparc64 vga.h fix # # ChangeSet # 2004/08/31 16:42:36-07:00 viro@www.linux.org.uk # [PATCH] mixart cleanups # # * check result of pci_set_dma_mask() instead of looking at pci_dma_supported() # * size_t => %zd # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/pci/mixart/mixart_core.c # 2004/08/31 08:27:38-07:00 viro@www.linux.org.uk +1 -1 # mixart cleanups # # sound/pci/mixart/mixart.c # 2004/08/31 08:27:38-07:00 viro@www.linux.org.uk +5 -3 # mixart cleanups # # ChangeSet # 2004/08/31 16:42:24-07:00 viro@www.linux.org.uk # [PATCH] netfilter warning (alpha) # # On alpha u64 is unsigned long; %llu is unsigned long long... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/31 08:27:37-07:00 viro@www.linux.org.uk +2 -1 # netfilter warning (alpha) # # ChangeSet # 2004/08/31 16:42:13-07:00 viro@www.linux.org.uk # [PATCH] alpha csum_partial_copy.c annotations # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # arch/alpha/lib/csum_partial_copy.c # 2004/08/31 08:27:34-07:00 viro@www.linux.org.uk +3 -2 # alpha csum_partial_copy.c annotations # # ChangeSet # 2004/08/31 16:42:01-07:00 viro@www.linux.org.uk # [PATCH] acpiphp_ibm.c 64bit portability # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/pci/hotplug/acpiphp_ibm.c # 2004/08/31 08:27:29-07:00 viro@www.linux.org.uk +3 -3 # acpiphp_ibm.c 64bit portability # # ChangeSet # 2004/08/31 16:41:49-07:00 viro@www.linux.org.uk # [PATCH] acpi/processor.c 64bit portability # # wrong type of return value for ->write() # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/acpi/processor.c # 2004/08/31 08:27:29-07:00 viro@www.linux.org.uk +1 -1 # acpi/processor.c 64bit portability # # ChangeSet # 2004/08/31 16:41:37-07:00 viro@www.linux.org.uk # [PATCH] missing include in pcm_native.c # # compile fix for alpha - io.h is needed there for io_remap_...() # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/core/pcm_native.c # 2004/08/31 08:27:28-07:00 viro@www.linux.org.uk +1 -0 # missing include in pcm_native.c # # ChangeSet # 2004/08/31 16:41:25-07:00 viro@www.linux.org.uk # [PATCH] usx2y cleanups and fixes # # Sigh... # a) mixing of userland and kernel pointers is bad # b) so's not checking result of kmalloc() # c) so's not checking result of copy_from_user() # d) use of do { .... break; ... break; ... } while(0); is *highly* # unidiomatic. Do not confuse kernel with IOCCC, please. And if you have # religious aversion to multiple return statements in a function, at least # learn the reasons why it is frowned upon in many situations. Hint: they # all apply to use of break in that manner. # e) 0 instead of NULL # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/usb/usx2y/usbusx2yaudio.c # 2004/08/31 08:27:28-07:00 viro@www.linux.org.uk +4 -4 # usx2y cleanups and fixes # # sound/usb/usx2y/usbusx2y.c # 2004/08/31 08:27:28-07:00 viro@www.linux.org.uk +2 -2 # usx2y cleanups and fixes # # sound/usb/usx2y/usX2Yhwdep.c # 2004/08/31 08:27:28-07:00 viro@www.linux.org.uk +36 -29 # usx2y cleanups and fixes # # ChangeSet # 2004/08/31 16:41:13-07:00 viro@www.linux.org.uk # [PATCH] alpha warning fixes # # pci_dma_sync_single_for_device() had wrong prototype [who TF had come up # with that name, anyway?] # ->cpu in thread_info was long; it should be unsigned int. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-alpha/thread_info.h # 2004/08/31 08:27:27-07:00 viro@www.linux.org.uk +1 -1 # alpha warning fixes # # include/asm-alpha/pci.h # 2004/08/31 08:27:27-07:00 viro@www.linux.org.uk +1 -1 # alpha warning fixes # # ChangeSet # 2004/08/31 16:41:01-07:00 viro@www.linux.org.uk # [PATCH] missing include compiler.h in arm memory.h # # use of __deprecated requires compiler.h # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-arm/memory.h # 2004/08/31 08:27:27-07:00 viro@www.linux.org.uk +1 -0 # missing include compiler.h in arm memory.h # # ChangeSet # 2004/08/31 16:40:49-07:00 viro@www.linux.org.uk # [PATCH] mmc annotation # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/mmc/mmc_block.c # 2004/08/31 08:27:27-07:00 viro@www.linux.org.uk +1 -1 # mmc annotation # # ChangeSet # 2004/08/31 16:40:37-07:00 viro@www.linux.org.uk # [PATCH] missing includes from irq changes # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/irq.c # 2004/08/31 08:27:26-07:00 viro@www.linux.org.uk +1 -0 # missing includes from irq changes # # arch/alpha/kernel/irq.c # 2004/08/31 08:27:26-07:00 viro@www.linux.org.uk +1 -3 # missing includes from irq changes # # ChangeSet # 2004/08/31 23:38:10+01:00 davej@redhat.com # [CPUFREQ] Fix cosmetic issue in powernow-k8 error handling # # I tried to load the new SMP capable powernow k8 driver on a machine # with an too old BIOS. I got a lot of cryptic "init not cpu 0" # messages until the "MP systems not supported by PSB ..." message. # # This patch switches the order of the checks around to print the # other message first. It will be still printed multiple times # because the cpufreq setup will probe all CPUs, but that's probably # ok. # # From: Andi Kleen # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/powernow-k8.c # 2004/08/31 23:38:01+01:00 davej@redhat.com +4 -4 # [CPUFREQ] Fix cosmetic issue in powernow-k8 error handling # # I tried to load the new SMP capable powernow k8 driver on a machine # with an too old BIOS. I got a lot of cryptic "init not cpu 0" # messages until the "MP systems not supported by PSB ..." message. # # This patch switches the order of the checks around to print the # other message first. It will be still printed multiple times # because the cpufreq setup will probe all CPUs, but that's probably # ok. # # From: Andi Kleen # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/31 23:37:03+01:00 davej@redhat.com # [CPUFREQ] Remove duplicate information brought in with the new governor. # # The current CPU frequency is already exported one directory upwards, so there # is no need to duplicate it in the ondemand governor. # # From: Dominik Brodowski # Signed-off-by: Dave Jones # # drivers/cpufreq/cpufreq_ondemand.c # 2004/08/31 23:36:54+01:00 davej@redhat.com +0 -7 # [CPUFREQ] Remove duplicate information brought in with the new governor. # # The current CPU frequency is already exported one directory upwards, so there # is no need to duplicate it in the ondemand governor. # # From: Dominik Brodowski # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/31 23:23:28+01:00 davej@redhat.com # [CPUFREQ] Fix up ARM drivers 'out of sync' problem. # The SA1100 and SA1110 platforms can handle situations well where the # CPU frequency is different to the value the cpufreq (and timing) code # thinks it is, e.g. when resuming from sleep. So, remove the flags # noting the opposite. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # include/linux/cpufreq.h # 2004/08/31 23:23:18+01:00 davej@redhat.com +0 -7 # [CPUFREQ] Fix up ARM drivers 'out of sync' problem. # The SA1100 and SA1110 platforms can handle situations well where the # CPU frequency is different to the value the cpufreq (and timing) code # thinks it is, e.g. when resuming from sleep. So, remove the flags # noting the opposite. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # drivers/cpufreq/cpufreq.c # 2004/08/31 23:23:18+01:00 davej@redhat.com +0 -9 # [CPUFREQ] Fix up ARM drivers 'out of sync' problem. # The SA1100 and SA1110 platforms can handle situations well where the # CPU frequency is different to the value the cpufreq (and timing) code # thinks it is, e.g. when resuming from sleep. So, remove the flags # noting the opposite. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # arch/arm/mach-sa1100/cpu-sa1110.c # 2004/08/31 23:23:18+01:00 davej@redhat.com +1 -3 # [CPUFREQ] Fix up ARM drivers 'out of sync' problem. # The SA1100 and SA1110 platforms can handle situations well where the # CPU frequency is different to the value the cpufreq (and timing) code # thinks it is, e.g. when resuming from sleep. So, remove the flags # noting the opposite. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # arch/arm/mach-sa1100/cpu-sa1100.c # 2004/08/31 23:23:18+01:00 davej@redhat.com +1 -3 # [CPUFREQ] Fix up ARM drivers 'out of sync' problem. # The SA1100 and SA1110 platforms can handle situations well where the # CPU frequency is different to the value the cpufreq (and timing) code # thinks it is, e.g. when resuming from sleep. So, remove the flags # noting the opposite. # # Signed-off-by: Dominik Brodowski # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/31 14:49:34-07:00 davem@nuts.davemloft.net # [SPARC64]: SA_SAMPLE_RANDOMNESS fix. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/irq.c # 2004/08/31 14:48:57-07:00 davem@nuts.davemloft.net +14 -5 # [SPARC64]: SA_SAMPLE_RANDOMNESS fix. # # ChangeSet # 2004/08/31 13:35:33-07:00 torvalds@ppc970.osdl.org # Revert "mark pcxx as broken" # # Not only did it mark the wrong driver, Christoph reports that # somebody might have even made the driver compile these days.. # # Cset exclude: hch@lst.de[torvalds]|ChangeSet|20040831174055|41082 # # drivers/char/Kconfig # 2004/08/31 13:35:31-07:00 torvalds@ppc970.osdl.org +0 -0 # Revert "mark pcxx as broken" # # ChangeSet # 2004/08/31 10:43:29-07:00 akpm@osdl.org # [PATCH] isdn debug build fix # # On x86_64: # # drivers/isdn/hardware/eicon/debug.c: In function `DI_format': # drivers/isdn/hardware/eicon/debug.c:599: incompatible types in assignment # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hardware/eicon/debug.c # 2004/08/31 01:09:40-07:00 akpm@osdl.org +1 -4 # isdn debug build fix # # ChangeSet # 2004/08/31 10:43:11-07:00 schwidefsky@de.ibm.com # [PATCH] s390: zfcp host adapater # # zfcp host adapater changes: # - Add ability to enqueue other WKA ports besides the nameserver port. # - Document and cleanup sg_list functions. # - Add get_port_by_did/get_adapater_by_busid functions. # - Improve documentation of some functions and structures. # - Fix error handling for nameserver requests. # - Correct size check in zfcp_sg_list_copy_to_user. # - Correct parameter description for loglevel parameter. # - Remove unsused code, types and definitions. # - Add support for exchange_port_data command. # - Add infrastructure to set timers for ELS and SCSI commands. # - Avoid adapter shutdown after receiving FSF_SQ_ULP_PROGRAMMING_ERROR. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/scsi/zfcp_sysfs_port.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +3 -3 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_sysfs_adapter.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +2 -2 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_scsi.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +20 -9 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_fsf.h # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +0 -7 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_fsf.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +129 -96 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_ext.h # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +15 -11 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_erp.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +46 -27 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_def.h # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +73 -94 # s390: zfcp host adapater # # drivers/s390/scsi/zfcp_aux.c # 2004/08/31 01:09:40-07:00 schwidefsky@de.ibm.com +219 -96 # s390: zfcp host adapater # # ChangeSet # 2004/08/31 10:42:58-07:00 schwidefsky@de.ibm.com # [PATCH] s390: kernel stack options. # # This adds support for the new compiler options -mkernel-backchain, # -mstack-size, -mstack-guard, -mwarn-dynamicstack and -mwarn-framesize. # # The option -mkernel-backchain enables the use of modified layout for the # stack frames of kernel functions. This breaks the ABI, modules compiled # with the option won't work on a kernel compiled with the option and vice # versa. The positive effect of the option is a drastic reduction of kernel # stack use. The trick is that the new frame layout allows to overlap the 96 # (31 bit)/160 (64 bit) byte bias areas of the functions on the call chain. # This lowers the minimal stack usage of a function from 96 bytes to 16 bytes # (31 bit) and 160 bytes to 24 bytes (64 bit). The kernel stack use is # decreased to a point where it is possible to use 4K (31 bit) / 8K (64 bit) # stacks. The split into process stack and interrupt stack is already in # place. # # The options -mstack-size and -mstack-guard are used to detect kernel stack # overflows. The compiler adds code to the prolog of every function that # causes an illegal operation if the kernel stack is about to overflow. # # The options -mwarn-dynamicstack and -mwarn-framesize cause the compiler to # emit warnings if a function uses dynamic stack allocation or if the # function frame size is bigger then a specified limit. # # To play safe all the new options are configurable. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/thread_info.h # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +24 -14 # s390: kernel stack options. # # include/asm-s390/processor.h # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +19 -0 # s390: kernel stack options. # # include/asm-s390/lowcore.h # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +6 -2 # s390: kernel stack options. # # arch/s390/kernel/traps.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +70 -26 # s390: kernel stack options. # # arch/s390/kernel/smp.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +10 -4 # s390: kernel stack options. # # arch/s390/kernel/setup.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +4 -0 # s390: kernel stack options. # # arch/s390/kernel/process.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +27 -41 # s390: kernel stack options. # # arch/s390/kernel/head64.S # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +4 -2 # s390: kernel stack options. # # arch/s390/kernel/head.S # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +4 -2 # s390: kernel stack options. # # arch/s390/kernel/entry64.S # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +62 -29 # s390: kernel stack options. # # arch/s390/kernel/entry.S # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +60 -25 # s390: kernel stack options. # # arch/s390/kernel/asm-offsets.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +4 -0 # s390: kernel stack options. # # arch/s390/defconfig # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +11 -3 # s390: kernel stack options. # # arch/s390/Makefile # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +24 -2 # s390: kernel stack options. # # arch/s390/Kconfig # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +99 -27 # s390: kernel stack options. # # ChangeSet # 2004/08/31 10:42:46-07:00 schwidefsky@de.ibm.com # [PATCH] s390: core changes # # s390 core changes: # - Fix a race condition between kernel thread creation and preemption. # - Fix idal_is_needed for the border case 0x7ffff000. # - Get rid of compiler warnings in compat_signal.c and profile.c. # - Regenerate default configuration. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-s390/idals.h # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +1 -1 # s390: core changes # # arch/s390/kernel/profile.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +1 -0 # s390: core changes # # arch/s390/kernel/process.c # 2004/08/31 01:26:58-07:00 schwidefsky@de.ibm.com +3 -24 # s390: core changes # # arch/s390/kernel/entry64.S # 2004/08/31 01:26:58-07:00 schwidefsky@de.ibm.com +4 -1 # s390: core changes # # arch/s390/kernel/entry.S # 2004/08/31 01:26:58-07:00 schwidefsky@de.ibm.com +4 -1 # s390: core changes # # arch/s390/kernel/compat_signal.c # 2004/08/31 01:09:39-07:00 schwidefsky@de.ibm.com +17 -7 # s390: core changes # # arch/s390/defconfig # 2004/08/31 01:26:58-07:00 schwidefsky@de.ibm.com +8 -3 # s390: core changes # # ChangeSet # 2004/08/31 10:42:33-07:00 jacekpoplawski@wp.pl # [PATCH] stv0299 device naming fix # # Name of device has been changed in 2.6.9-rc1 to "SkyStar2", but module stv0299 # still compares name with "Technisat SkyStar2 driver", strings are different, # and result is that stv0299 detects invalid tuner type. # # Cc: Johannes Stezenbach # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/frontends/stv0299.c # 2004/08/31 01:09:39-07:00 jacekpoplawski@wp.pl +1 -1 # stv0299 device naming fix # # ChangeSet # 2004/08/31 10:42:19-07:00 lcapitulino@conectiva.com.br # [PATCH] kernel/fork.c add missing unlikely(). # # Signed-off-by: Luiz Capitulino # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/31 01:09:39-07:00 lcapitulino@conectiva.com.br +1 -1 # kernel/fork.c add missing unlikely(). # # ChangeSet # 2004/08/31 10:42:07-07:00 kraxel@bytesex.org # [PATCH] v4l/bttv: add sanity check (bug #3309) # # Missing sanity check, overlay is supported for packed pixel formats only. # Patch below. It's not API related btw, the bug can be triggered using the # v4l2 API as well. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/bttv-driver.c # 2004/08/31 01:09:39-07:00 kraxel@bytesex.org +2 -0 # v4l/bttv: add sanity check (bug #3309) # # ChangeSet # 2004/08/31 10:41:55-07:00 adaplas@hotpop.com # [PATCH] fbdev: fix copy_to/from_user in fbmem.c:fb_read/write # # This patch fixes a problem reported by David S. Miller # # "I just noticed that fb_{read,write}() uses copy_*_user() with # the kernel buffer being the frame buffer. It needs to use # the proper device address accessor functions." # # The patch will do an intermediate copy of the contents to a page-sized, # kmalloc'ed buffer. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/fbmem.c # 2004/08/31 01:09:39-07:00 adaplas@hotpop.com +72 -18 # fbdev: fix copy_to/from_user in fbmem.c:fb_read/write # # ChangeSet # 2004/08/31 10:41:42-07:00 adaplas@hotpop.com # [PATCH] fbdev: fix kernel panic from FBIO_CURSOR ioctl # # 1. This fixes a kernel oops when issuing an FBIO_CURSOR ioctl if struct # fb_cursor_user is filled with zero/NULLs. Reported by Yuval Kogman # . # # 2. This also fixes the cursor corruption in soft_cursor when # sprite.scan_align != 1. # # Signed-off-by: Antonino Daplas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/softcursor.c # 2004/08/31 01:09:38-07:00 adaplas@hotpop.com +15 -3 # fbdev: fix kernel panic from FBIO_CURSOR ioctl # # drivers/video/fbmem.c # 2004/08/31 01:26:59-07:00 adaplas@hotpop.com +11 -7 # fbdev: fix kernel panic from FBIO_CURSOR ioctl # # ChangeSet # 2004/08/31 10:41:30-07:00 vegarwa@online.no # [PATCH] BeFS: load default nls if none is specified in mount options # # Makes the BeOS File Systen driver load the default nls if none is specified # in the "iocharset" mount option. # # Signed-off-by: Vegard Wærp # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/befs/linuxvfs.c # 2004/08/31 01:09:38-07:00 vegarwa@online.no +6 -2 # BeFS: load default nls if none is specified in mount options # # ChangeSet # 2004/08/31 10:41:18-07:00 hch@lst.de # [PATCH] fix devfs name for microcode driver # # Seem like devfsd expects it in /dev/cpu/microcode and Debian users do # as well. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/microcode.c # 2004/08/31 01:09:38-07:00 hch@lst.de +1 -0 # fix devfs name for microcode driver # # ChangeSet # 2004/08/31 10:41:06-07:00 wli@holomorphy.com # [PATCH] make topology.h macros safer # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/topology.h # 2004/08/31 01:09:38-07:00 wli@holomorphy.com +1 -1 # make topology.h macros safer # # include/asm-ia64/numa.h # 2004/08/31 01:09:38-07:00 wli@holomorphy.com +1 -1 # make topology.h macros safer # # include/asm-i386/topology.h # 2004/08/31 01:09:38-07:00 wli@holomorphy.com +1 -1 # make topology.h macros safer # # ChangeSet # 2004/08/31 10:40:42-07:00 hch@lst.de # [PATCH] hfs/hfsplus is missing .sendfile # # There seem to be some crazy mac users that want to use the loop driver # on hfsplus. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hfsplus/inode.c # 2004/08/31 01:09:38-07:00 hch@lst.de +1 -0 # hfs/hfsplus is missing .sendfile # # fs/hfs/inode.c # 2004/08/31 01:09:38-07:00 hch@lst.de +1 -0 # hfs/hfsplus is missing .sendfile # # ChangeSet # 2004/08/31 10:40:31-07:00 rbultje@ronald.bitfreak.net # [PATCH] zr36067 driver - correct subfrequency carrier # # attached patch changes the subfrequency carrier value in the adv7175 # video output driver which is part of the zr36067 driver package. The # practical consequence is that the picture will be more stable on # non-passthrough video mode in NTSC. It does not affect PAL/SECAM. Patch # originally submitted by Douglas Fraser (8/21). # # Signed-off-by: Ronald Bultje # Signed-off-by: Douglas Fraser # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/adv7175.c # 2004/08/31 01:09:38-07:00 rbultje@ronald.bitfreak.net +28 -0 # zr36067 driver - correct subfrequency carrier # # ChangeSet # 2004/08/31 10:40:19-07:00 rbultje@ronald.bitfreak.net # [PATCH] zr36067 driver - use msleep() instead of schedule_timeout() # # attached patch makes the zr36067 driver use msleep() instead of # schedule_timeout() with uninterruptible state. Patch originally # submitted by Nishanth Aravamudan (7/26). # # Signed-off-by: Ronald Bultje # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/zoran_device.c # 2004/08/31 01:09:38-07:00 rbultje@ronald.bitfreak.net +1 -2 # zr36067 driver - use msleep() instead of schedule_timeout() # # ChangeSet # 2004/08/31 10:40:07-07:00 rbultje@ronald.bitfreak.net # [PATCH] zr36067 driver - correct i2c-algo-bit dependency in Kconfig # # attached patch correctly makes the zr36067 driver depend on i2c-ago-bit in # the kernel config. Bug reported and patch sent to me by Adrian Bunk # (6/21). It wasn't signed off. # # Signed-off-by: Ronald Bultje # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/video/Kconfig # 2004/08/31 01:09:37-07:00 rbultje@ronald.bitfreak.net +1 -1 # zr36067 driver - correct i2c-algo-bit dependency in Kconfig # # ChangeSet # 2004/08/31 10:39:56-07:00 bgerst@quark.didntduck.org # [PATCH] Fix hardcoded value in vsyscall.lds # # The last attempt to clean this up still left a hardcoded constant (the # offset from __FIXADDR_TOP). This patch moves VSYSCALL_BASE to # asm-offsets.c. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/vsyscall.lds.S # 2004/08/31 01:09:37-07:00 bgerst@quark.didntduck.org +1 -3 # Fix hardcoded value in vsyscall.lds # # arch/i386/kernel/asm-offsets.c # 2004/08/31 01:09:37-07:00 bgerst@quark.didntduck.org +1 -0 # Fix hardcoded value in vsyscall.lds # # ChangeSet # 2004/08/31 10:39:45-07:00 joshk@triplehelix.org # [PATCH] export more symbols on sparc32 # # Cc: William Lee Irwin III # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sparc/kernel/sparc_ksyms.c # 2004/08/31 01:09:37-07:00 joshk@triplehelix.org +7 -0 # export more symbols on sparc32 # # ChangeSet # 2004/08/31 10:39:32-07:00 akpm@osdl.org # [PATCH] remove ext2_panic() prototype # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ext2/ext2.h # 2004/08/31 01:09:37-07:00 akpm@osdl.org +0 -3 # remove ext2_panic() prototype # # ChangeSet # 2004/08/31 10:39:20-07:00 rsa@us.ibm.com # [PATCH] interrupt driven hvc_console as vio device # # This is an hvc_console patch which provides driver and ppc64 architecture # fixes to enable the hvc_console driver to register itself as a vio device # with the vio bus, provide hotplug add/remove for vty adapters, and act as # an interrupt driven driver on Power-5 hardware or remain as a polling # driver on Power-4 hardware. # # arch/ppc64/kernel/hvconsole.c # ============================= # # - Changed hvc_get_chars() and hvc_put_chars() api to take vtermno rather # than index number. # # - Added hvc_find_vtys() function which walks the bus looking for # vterm/vty devices to callback to the hvc_console driver. This provides # console output functionality prior to early console init (pre mem init # and pre device probe). # # include/asm-ppc64/hvconsole.h # ============================= # # - Changed hvc_get_chars() and hvc_put_chars() api to take vtermno rather # than index number. # # - Added hvc_find_vtys() function. # # - Added hvc_instantiate() function which is implemented by a console # driver wanting to receive a callback of and early console init. # # drivers/char/hvc_console.c # ========================== # # - Switch khvcd from kernel_threads to kthreads which got rid of # deprecated daemonize(). # # - Added module exit clause to be thorough (not terribly necessary with a # console driver of course) # # - Added early discovery of vterm/vty adapters by doing a bus walk on # early console init which results in hvc_instantiate() callback and # addition of the vtermno into a static array of vtermnos supported as # console adapters (meaning the console api's work against these vtermnos # prior to full console initialization). # # - This driver is now registered as a vio driver which means that vty # adapters are now managed via probe/remove. This means hvc_console # supports hotplug vty adapters. # # - Driver now requests more device nodes than what was found on the # initial bus walk when registered as a tty driver to make room for hotplug # vty adapters. These secondary vty adapters provide a tty tunnel between # partitions. # # - Removed static hvc_struct array and replaced with a linux list that has # elements (hvc_struct instances) added/removed on probe/remove AFTER early # console init. This is important because kmalloc can't be done at early # console init. # # - Driver now either runs in interrupt driven mode or in polling mode on # older hardware. The khvcd is smart enough to not 'schedule()' when there # are no interrupts. # # - kobjects are now used for ref counting on the hvc_struct instances. # # - This driver puts the tty layer to sleep on hvc_close() if there are # pending data writes being blocked by firmware. # # - Removed useless spinlocks in hvc_chars_in_buffer() and hvc_write_room. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Ryan S. Arnold # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/hvconsole.h # 2004/08/31 01:09:37-07:00 rsa@us.ibm.com +14 -4 # interrupt driven hvc_console as vio device # # drivers/char/hvc_console.c # 2004/08/31 01:09:37-07:00 rsa@us.ibm.com +614 -136 # interrupt driven hvc_console as vio device # # arch/ppc64/kernel/hvconsole.c # 2004/08/31 01:09:37-07:00 rsa@us.ibm.com +48 -20 # interrupt driven hvc_console as vio device # # ChangeSet # 2004/08/31 10:39:09-07:00 paulkf@microgate.com # [PATCH] synclinkmp transmit eom fix # # Bug Fixes: # # * Fix transmit end of message (EOM) processing to work correctly with # hardware auto CTS feature # # * Fix oops in error path if hardware diags fail during device # initialization # # Cosmetic change: # # * Use existing macros for address space size instead of hardcoded values # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/synclinkmp.c # 2004/08/31 01:09:37-07:00 paulkf@microgate.com +78 -76 # synclinkmp transmit eom fix # # ChangeSet # 2004/08/31 10:38:57-07:00 dhowells@redhat.com # [PATCH] Fix a NULL pointer bug in do_generic_file_read() # # The attached patch fixes a bug introduced into do_generic_mapping_read() by # which a file pointer becomes required. I'd arranged things so that the # file pointer was optional so that I could call the function directly on an # inode. # # Signed-Off-By: David Howells # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2004/08/31 01:09:36-07:00 dhowells@redhat.com +7 -4 # Fix a NULL pointer bug in do_generic_file_read() # # ChangeSet # 2004/08/31 10:38:44-07:00 hpa@zytor.com # [PATCH] Make i386 signal delivery work with -mregparm # # This patch allows i386 signal delivery to work correctly when userspace is # compiled with -mregparm. This is somewhat hacky: it passes the arguments # *both* on the stack and in registers, but it works because there are only # one or three (depending on SA_SIGINFO) official arguments. If you're # relying on the unofficial arguments then you're doing something nonportable # anyway and can put in the __attribute__((cdecl,regparm(0))) in the correct # place. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/signal.c # 2004/08/31 01:09:25-07:00 hpa@zytor.com +22 -12 # Make i386 signal delivery work with -mregparm # # ChangeSet # 2004/08/31 10:38:32-07:00 jmoyer@redhat.com # [PATCH] netpoll: fix up trapped logic # # This patch contains the updates necessary to fix the hangs in netconsole. # This includes the changing of trapped to an atomic_t, and the addition of a # netpoll_poll_lock. It also turns dev->netpoll_rx into a bitfield which is # used to keep from running the networking code from the netpoll_poll call path. # # Signed-off-by: Jeff Moyer # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/core/netpoll.c # 2004/08/31 01:06:39-07:00 jmoyer@redhat.com +27 -8 # netpoll: fix up trapped logic # # ChangeSet # 2004/08/31 10:38:19-07:00 jmoyer@redhat.com # [PATCH] netpoll: increase NAPI budget # # I've upped the poll budget to 16 and added a comment explaining why. I # definitely ran into this problem when testing netdump. # # Signed-off-by: Jeff Moyer # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/core/netpoll.c # 2004/08/31 01:27:02-07:00 jmoyer@redhat.com +7 -1 # netpoll: increase NAPI budget # # ChangeSet # 2004/08/31 10:38:07-07:00 jmoyer@redhat.com # [PATCH] netpoll: kill CONFIG_NETPOLL_RX # # This patch removes CONFIG_NETPOLL_RX, as discussed. # # Signed-off-by: Jeff Moyer # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/core/netpoll.c # 2004/08/31 01:27:02-07:00 jmoyer@redhat.com +3 -7 # netpoll: kill CONFIG_NETPOLL_RX # # include/linux/netdevice.h # 2004/08/31 01:06:39-07:00 jmoyer@redhat.com +1 -1 # netpoll: kill CONFIG_NETPOLL_RX # # ChangeSet # 2004/08/31 10:37:55-07:00 mpm@selenic.com # [PATCH] netpoll: revert queue stopped change # # Here's the first of the broken out patch set. This puts the check for # netif_queue_stopped back into netpoll_send_skb. Network drivers are not # designed to have their hard_start_xmit routines called when the queue is # stopped. # # Signed-off-by: Jeff Moyer # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/core/netpoll.c # 2004/08/31 01:27:02-07:00 mpm@selenic.com +12 -0 # netpoll: revert queue stopped change # # ChangeSet # 2004/08/31 10:37:42-07:00 mpm@selenic.com # [PATCH] netpoll: fix unaligned accesses # # Avoid some alignment traps. # # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/core/netpoll.c # 2004/08/31 01:27:02-07:00 mpm@selenic.com +6 -5 # netpoll: fix unaligned accesses # # ChangeSet # 2004/08/31 10:37:30-07:00 ornati@fastwebnet.it # [PATCH] tdfx linkage fix # # drivers/built-in.o(.data+0x40a68): undefined reference to `cfb_fillrect' # drivers/built-in.o(.data+0x40a6c): undefined reference to `cfb_copyarea' # # 3dfx framebuffer driver depends on "cfb_fillrect.c" and "cfb_copyarea.c" if # it's compiled without CONFIG_FB_3DFX_ACCEL turned on... # # Signed-off-by: Paolo Ornati # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/Makefile # 2004/08/31 01:06:39-07:00 ornati@fastwebnet.it +5 -1 # tdfx linkage fix # # ChangeSet # 2004/08/31 10:37:17-07:00 apw@shadowen.org # [PATCH] use page_to_nid # # There are a couple of places where we seem to go round the houses to get # the numa node id from a page. We have a macro for this so it seems # sensible to use that. # # Both lookup_node and enqueue_huge_page use page_zone() to locate the zone, # that to locate node pgdat_t and that to get the node_id. Its more # efficient to use page_to_nid() which gets the nid from the page flags, # especially if we are not using the zone for anything else it. Change these # to use page_to_nid(). # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mempolicy.c # 2004/08/31 01:06:38-07:00 apw@shadowen.org +1 -1 # use page_to_nid # # mm/hugetlb.c # 2004/08/31 01:06:38-07:00 apw@shadowen.org +1 -1 # use page_to_nid # # ChangeSet # 2004/08/31 10:37:03-07:00 apw@shadowen.org # [PATCH] i386 bootmem restrictions # # (Comment changes only) # # The bootmem allocator is initialised before the kernel virtual address # space has been fully established. As a result, any allocations which are # made before paging_init() has completed may point to invalid kernel # addresses. This patch notes this limitation and indicates where the # allocator is fully available. # # Signed-off-by: Andy Whitcroft # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/setup.c # 2004/08/31 01:06:38-07:00 apw@shadowen.org +10 -1 # i386 bootmem restrictions # # ChangeSet # 2004/08/31 10:36:51-07:00 rusty@rustcorp.com.au # [PATCH] Don't OOPS on stripped modules # # Don't want to go overboard with the checks, but this is simple and # reasonable. # # Signed-off-by: Rusty Russell (modified) # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/module.c # 2004/08/31 01:06:38-07:00 rusty@rustcorp.com.au +7 -3 # Don't OOPS on stripped modules # # ChangeSet # 2004/08/31 10:36:39-07:00 okir@suse.de # [PATCH] Prevent memory leak in devpts # # There is a dentry refcount leak in devpts_get_tty. # # struct tty_struct *devpts_get_tty(int number) # { # struct dentry *dentry = get_node(number); # struct tty_struct *tty; # # tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL : # dentry->d_inode->u.generic_ip; # # up(&devpts_root->d_inode->i_sem); # return tty; # } # # The get_node function does a lookup on /dev/pts/ and returns the # dentry, taking a reference. We should dput the dentry after extracting the # tty pointer. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/devpts/inode.c # 2004/08/31 01:06:38-07:00 okir@suse.de +6 -2 # Prevent memory leak in devpts # # ChangeSet # 2004/08/31 10:36:26-07:00 jdow@earthlink.net # [PATCH] Amiga partition reading fix # # I have a large archive of files stored on Amiga volumes. Many of these # volumes are on Fujitsu magneto-optical disks with 2k sector size. The # existing partitioning code cannot properly read them since it appears the # OS automatically deblocks the large sectors into logical 512 byte sectors, # something AmigaDOS never did. I arranged the partitioning code to handle # this situation. # # Second I have some rather strange test case disks, including my largest # storage partition, that have somewhat unusual partition values. As such I # needed additional information in addition to the first and last block # number information. AmigaDOS reserves N blocks, with N greater than or # equal to 1 and less than the size of the partition, for some boot time # information and signatures. I have some partitions that use other than the # usual value of 2. # # There is one more "fix" that could be put in if someone needs it. Another # value in the "Rigid Disk Blocks" description of a partition is a "PreAlloc" # value. It defines a number of blocks at the end of the disk that are not # considered to be a real part of the partition. This was "important" in the # days of 20 meg and 40 meg hard disks. It is hardly important and not used # on modern drives without special user intervention. # # This partitioning information is known correct. I wrote the low level # portion of the hard disk partitioning code for AmigaDOS 3.5 and 3.9. I am # also responsible for one of the more frequently used partitioning tools, # RDPrepX, before that. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/partitions/amiga.c # 2004/08/31 01:06:38-07:00 jdow@earthlink.net +27 -3 # Amiga partition reading fix # # ChangeSet # 2004/08/31 10:36:14-07:00 nickpiggin@yahoo.com.au # [PATCH] use hlist for pid hash: cache friendliness # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pid.h # 2004/08/31 01:06:38-07:00 nickpiggin@yahoo.com.au +2 -1 # use hlist for pid hash: cache friendliness # # ChangeSet # 2004/08/31 10:36:01-07:00 nickpiggin@yahoo.com.au # [PATCH] use hlist for pid hash # # Use hlists for the PID hashes. This halves the memory footprint of these # hashes. No benchmarks, but I think this is a worthy improvement because # the hashes are something that would be likely to have significant portions # loaded into the cache of every CPU on some workloads. # # This comes at the "expense" of # 1. reintroducing the memory prefetch into the hash traversal loop; # 2. adding new pids to the head of the list instead of the tail. I # suspect that if this was a big problem then the hash isn't sized # well or could benefit from moving hot entries to the head. # # Also, account for all the pid hashes when reporting hash memory usage. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/pid.c # 2004/08/31 01:06:38-07:00 nickpiggin@yahoo.com.au +10 -9 # use hlist for pid hash # # include/linux/pid.h # 2004/08/31 01:27:03-07:00 nickpiggin@yahoo.com.au +1 -1 # use hlist for pid hash # # ChangeSet # 2004/08/31 10:35:49-07:00 nickpiggin@yahoo.com.au # [PATCH] fix PID hash sizing # # A 4GB, 4-way Opteron would create the smallest size table (16 entries) because # pidhash_init is called before mem_init which is where x86-64 sets up max_pfn. # # nr_kernel_pages is setup by paging_init, called from setup_arch, which is also # where i386 sets up max_pfn. # # So export nr_kernel_pages, nr_all_pages. Use nr_kernel_pages when sizing the # PID hash. This fixes the problem. # # This also makes the pid hash dependant on the size of ZONE_NORMAL instead of # total size of memory. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/08/31 01:05:06-07:00 nickpiggin@yahoo.com.au +2 -2 # fix PID hash sizing # # kernel/pid.c # 2004/08/31 01:27:04-07:00 nickpiggin@yahoo.com.au +1 -1 # fix PID hash sizing # # include/linux/bootmem.h # 2004/08/31 01:05:06-07:00 nickpiggin@yahoo.com.au +3 -0 # fix PID hash sizing # # ChangeSet # 2004/08/31 10:35:38-07:00 roland@redhat.com # [PATCH] fix rusage semantics # # This patch changes the rusage bookkeeping and the semantics of the # getrusage and times calls in a couple of ways. # # The first change is in the c* fields counting dead child processes. POSIX # requires that children that have died be counted in these fields when they # are reaped by a wait* call, and that if they are never reaped (e.g. # because of ignoring SIGCHLD, or exitting yourself first) then they are # never counted. These were counted in release_task for all threads. I've # changed it so they are counted in wait_task_zombie, i.e. exactly when # being reaped. # # POSIX also specifies for RUSAGE_CHILDREN that the report include the reaped # child processes of the calling process, i.e. whole thread group in Linux, # not just ones forked by the calling thread. POSIX specifies tms_c[us]time # fields in the times call the same way. I've moved the c* fields that # contain this information into signal_struct, where the single set of # counters accumulates data from any thread in the group that calls wait*. # # Finally, POSIX specifies getrusage and times as returning cumulative totals # for the whole process (aka thread group), not just the calling thread. # I've added fields in signal_struct to accumulate the stats of detached # threads as they die. The process stats are the sums of these records plus # the stats of remaining each live/zombie thread. The times and getrusage # calls, and the internal uses for filling in wait4 results and siginfo_t, # now iterate over the threads in the thread group and sum up their stats # along with the stats recorded for threads already dead and gone. # # I added a new value RUSAGE_GROUP (-3) for the getrusage system call rather # than changing the behavior of the old RUSAGE_SELF (0). POSIX specifies # RUSAGE_SELF to mean all threads, so the glibc getrusage call will just # translate it to RUSAGE_GROUP for new kernels. I did this thinking that # someone somewhere might want the old behavior with an old glibc and a new # kernel (it is only different if they are using CLONE_THREAD anyway). # However, I've changed the times system call to conform to POSIX as well and # did not provide any backward compatibility there. In that case there is # nothing easy like a parameter value to use, it would have to be a new # system call number. That seems pretty pointless. Given that, I wonder if # it is worth bothering to preserve the compatible RUSAGE_SELF behavior by # introducing RUSAGE_GROUP instead of just changing RUSAGE_SELF's meaning. # Comments? # # I've done some basic testing on x86 and x86-64, and all the numbers come # out right after these fixes. (I have a test program that shows a few # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sys.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +99 -25 # fix rusage semantics # # kernel/signal.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +24 -4 # fix rusage semantics # # kernel/fork.c # 2004/08/31 01:26:58-07:00 roland@redhat.com +5 -3 # fix rusage semantics # # kernel/exit.c # 2004/08/31 01:04:21-07:00 roland@redhat.com +32 -6 # fix rusage semantics # # kernel/compat.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +33 -4 # fix rusage semantics # # include/linux/sched.h # 2004/08/31 01:03:59-07:00 roland@redhat.com +13 -3 # fix rusage semantics # # include/linux/resource.h # 2004/08/31 01:03:59-07:00 roland@redhat.com +1 -0 # fix rusage semantics # # fs/proc/array.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +9 -4 # fix rusage semantics # # fs/binfmt_elf.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +21 -4 # fix rusage semantics # # arch/mips/kernel/sysirix.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +2 -2 # fix rusage semantics # # arch/alpha/kernel/osf_sys.c # 2004/08/31 01:03:59-07:00 roland@redhat.com +4 -12 # fix rusage semantics # # ChangeSet # 2004/08/31 10:35:25-07:00 roland@redhat.com # [PATCH] waitid system call # # This patch adds a new system call `waitid'. This is a new POSIX call that # subsumes the rest of the wait* family and can do some things the older # calls cannot. A minor addition is the ability to select what kinds of # status to check for with a mask of independent bits, so you can wait for # just stops and not terminations, for example. A more significant # improvement is the WNOWAIT flag, which allows for polling child status # without reaping. This interface fills in a siginfo_t with the same details # that a SIGCHLD for the status change has; some of that info (e.g. si_uid) # is not available via wait4 or other calls. # # I've added a new system call that has the parameter conventions of the # POSIX function because that seems like the cleanest thing. This patch # includes the actual system call table additions for i386 and x86-64; other # architectures will need to assign the system call number, and 64-bit ones # may need to implement 32-bit compat support for it as I did for x86-64. # The new features could instead be provided by some new kludge inventions in # the wait4 system call interface (that's what BSD did). If kludges are # preferable to adding a system call, I can work up something different. # # I added a struct rusage field si_rusage to siginfo_t in the SIGCHLD case # (this does not affect the size or layout of the struct). This is not part # of the POSIX interface, but it makes it so that `waitid' subsumes all the # functionality of `wait4'. Future kernel ABIs (new arch's or whatnot) can # have only the `waitid' system call and the rest of the wait* family # including wait3 and wait4 can be implemented in user space using waitid. # There is nothing in user space as yet that would make use of the new field. # # Most of the new functionality is implemented purely in the waitid system # call itself. POSIX also provides for the WCONTINUED flag to report when a # child process had been stopped by job control and then resumed with # SIGCONT. Corresponding to this, a SIGCHLD is now generated when a child # resumes (unless SA_NOCLDSTOP is set), with the value CLD_CONTINUED in # siginfo_t.si_code. To implement this, some additional bookkeeping is # required in the signal code handling job control stops. # # The motivation for this work is to make it possible to implement the POSIX # semantics of the `waitid' function in glibc completely and correctly. If # changing either the system call interface used to accomplish that, or any # details of the kernel implementation work, would improve the chances of # getting this incorporated, I am more than happy to work through any issues. # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sys.c # 2004/08/31 01:27:04-07:00 roland@redhat.com +28 -22 # waitid system call # # kernel/signal.c # 2004/08/31 01:27:04-07:00 roland@redhat.com +38 -3 # waitid system call # # kernel/exit.c # 2004/08/31 01:27:04-07:00 roland@redhat.com +217 -24 # waitid system call # # kernel/compat.c # 2004/08/31 01:27:04-07:00 roland@redhat.com +3 -3 # waitid system call # # include/linux/wait.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +9 -0 # waitid system call # # include/linux/syscalls.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +2 -0 # waitid system call # # include/linux/sched.h # 2004/08/31 01:27:04-07:00 roland@redhat.com +2 -0 # waitid system call # # include/linux/compat.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +2 -0 # waitid system call # # include/asm-x86_64/unistd.h # 2004/08/31 01:03:28-07:00 roland@redhat.com +3 -1 # waitid system call # # include/asm-x86_64/ia32_unistd.h # 2004/08/31 01:02:51-07:00 roland@redhat.com +2 -1 # waitid system call # # include/asm-x86_64/ia32.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +1 -0 # waitid system call # # include/asm-ia64/siginfo.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +1 -0 # waitid system call # # include/asm-i386/unistd.h # 2004/08/31 01:02:11-07:00 roland@redhat.com +2 -1 # waitid system call # # include/asm-generic/siginfo.h # 2004/08/31 01:00:22-07:00 roland@redhat.com +3 -0 # waitid system call # # arch/x86_64/ia32/sys_ia32.c # 2004/08/31 01:00:22-07:00 roland@redhat.com +19 -0 # waitid system call # # arch/x86_64/ia32/ia32entry.S # 2004/08/31 01:01:21-07:00 roland@redhat.com +1 -0 # waitid system call # # arch/x86_64/ia32/ia32_signal.c # 2004/08/31 01:00:22-07:00 roland@redhat.com +2 -0 # waitid system call # # arch/i386/kernel/entry.S # 2004/08/31 01:00:52-07:00 roland@redhat.com +1 -0 # waitid system call # # ChangeSet # 2004/08/31 10:35:11-07:00 anton@samba.org # [PATCH] Using get_cycles for add_timer_randomness # # I tested how long it took to do a dd from /dev/random on ppc64 before and # after this patch, while doing a ping flood from another machine. # # before: # # /usr/bin/time dd if=/dev/random of=/dev/zero count=1k # 0+51 records in # Command terminated by signal 2 # 0.00user 0.00system 19:18.46elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k # # I gave up after 19 minutes. # # after: # # /usr/bin/time dd if=/dev/random of=/dev/zero count=1k # 0+1024 records in # 0.00user 0.00system 0:33.38elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k # # Just over 33 seconds. Better. # # From: Arnd Bergmann # # I noticed that only i386 and x86-64 are currently using a high resolution # timer source when adding randomness. Since many architectures have a # working get_cycles() implementation, it seems rather straightforward to use # that. # # Has this been discussed before, or can anyone comment on the implementation # below? # # This patch attempts to take into account the size of cycles_t, which is # either 32 or 64 bits wide but independent of the architecture's word size. # # The behavior should be nearly identical to the old one on i386, x86-64 and # all architectures without a time stamp counter, while finding more entropy # on the other architectures. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/timex.h # 2004/08/31 01:00:11-07:00 anton@samba.org +8 -5 # Using get_cycles for add_timer_randomness # # drivers/char/random.c # 2004/08/31 01:00:11-07:00 anton@samba.org +12 -19 # Using get_cycles for add_timer_randomness # # ChangeSet # 2004/08/31 10:34:59-07:00 ak@suse.de # [PATCH] x86_64: emulate NUMA on non-NUMA hardware # # Apply this handy patch and boot with numa=fake=4 (or how many nodes you # want, 8 max right now). # # There is a minor issue with the hash function, which can make the last node # be bigger than the others. Is probably fixable if it should be a problem. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/mm/numa.c # 2004/08/31 01:00:09-07:00 ak@suse.de +54 -1 # x86_64: emulate NUMA on non-NUMA hardware # # ChangeSet # 2004/08/31 10:34:47-07:00 mpm@selenic.com # [PATCH] tiny shmem/tmpfs replacement # # A patch to replace tmpfs/shmem with ramfs for systems without swap, # incorporating the suggestions from Andi and Hugh. It uses ramfs instead. # # Signed-off-by: Matt Mackall # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/tiny-shmem.c # 2004/08/31 01:00:08-07:00 mpm@selenic.com +124 -0 # tiny shmem/tmpfs replacement # # include/linux/ramfs.h # 2004/08/31 01:00:08-07:00 mpm@selenic.com +11 -0 # tiny shmem/tmpfs replacement # # mm/tiny-shmem.c # 2004/08/31 01:00:08-07:00 mpm@selenic.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/mm/tiny-shmem.c # # mm/filemap.c # 2004/08/31 01:27:01-07:00 mpm@selenic.com +1 -1 # tiny shmem/tmpfs replacement # # mm/Makefile # 2004/08/31 01:00:08-07:00 mpm@selenic.com +4 -1 # tiny shmem/tmpfs replacement # # init/Kconfig # 2004/08/31 01:00:08-07:00 mpm@selenic.com +14 -0 # tiny shmem/tmpfs replacement # # include/linux/ramfs.h # 2004/08/31 01:00:08-07:00 mpm@selenic.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/ramfs.h # # include/linux/mm.h # 2004/08/31 01:00:08-07:00 mpm@selenic.com +10 -2 # tiny shmem/tmpfs replacement # # fs/ramfs/inode.c # 2004/08/31 01:00:08-07:00 mpm@selenic.com +4 -4 # tiny shmem/tmpfs replacement # # ChangeSet # 2004/08/31 10:34:34-07:00 alan@redhat.com # [PATCH] VLAN support for 3c59x/3c90x # # This adds VLAN support to the 3c59x/90x series hardware. # # Stefan de Konink ported this code from the 2.4 VLAN patches and tested it # extensively. I cleaned up the ifdefs and fixed a problem with bracketing # that made older cards fail. # # -- # # Developer's Certificate of Origin 1.0 # # By making a contribution to this project, I certify that: # # (a) The contribution was created in whole or in part by me and I have the # right to submit it under the open source license indicated in the file; or # # (b) The contribution is based upon previous work that, to the best of my # knowledge, is covered under an appropriate open source license and I have # the right under that license to submit that work with modifications, # whether created in whole or in part by me, under the same open source # license (unless I am permitted to submit under a different license), as # indicated in the file; or # # (c) The contribution was provided directly to me by some other person who # certified (a), (b) or (c) and I have not modified it. # # I, Stefan de Konink, certify that: # The contribution is based upon previous work that, again is based on GPL # code and I have the right under that license to submit that work with # modifications, whether created in whole or in part by me, under the same # open source license. # # I, Alan Cox, certify likewise. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/3c59x.c # 2004/08/31 01:00:08-07:00 alan@redhat.com +72 -5 # VLAN support for 3c59x/3c90x # # ChangeSet # 2004/08/31 10:34:22-07:00 akpm@osdl.org # [PATCH] truncate_inode_pages latency fix # # Fix scheduling latency issues with large truncates. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/truncate.c # 2004/08/31 01:00:06-07:00 akpm@osdl.org +1 -0 # truncate_inode_pages latency fix # # ChangeSet # 2004/08/31 10:34:10-07:00 oleg@tv-sign.ru # [PATCH] hugetlbfs private mappings # # Hugetlbfs silently coerce private mappings of hugetlb files into shared # ones. So private writable mapping has MAP_SHARED semantics. I think, such # mappings should be disallowed. # # First, such behavior allows open hugetlbfs file O_RDONLY, and overwrite it # via mmap(PROT_READ|PROT_WRITE, MAP_PRIVATE), so it is security bug. # # Second, private writable mmap() should fail just because kernel does not # support this. # # I belisve, it is ok to allow private readonly hugetlb mappings, # sys_mprotect() does not work with hugetlb vmas. # # There is another problem. Hugetlb mapping is always prefaulted, pages # allocated at mmap() time. So even readonly mapping allows to enlarge the # size of the hugetlbfs file, and steal huge pages without appropriative # permissions. # # Signed-off-by: Oleg Nesterov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hugetlbfs/inode.c # 2004/08/31 00:57:58-07:00 oleg@tv-sign.ru +14 -2 # hugetlbfs private mappings # # ChangeSet # 2004/08/31 10:33:57-07:00 oleg@tv-sign.ru # [PATCH] /dev/zero vs hugetlb mappings. # # Hugetlbfs mmap with MAP_PRIVATE becomes MAP_SHARED silently, but # vma->vm_flags have no VM_SHARED bit. Reading from /dev/zero into hugetlb # area will do: # # read_zero() # read_zero_pagealigned() # if (vma->vm_flags & VM_SHARED) # break; // fallback to clear_user() # zap_page_range(); # zeromap_page_range(); # # It will hit BUG_ON() in unmap_hugepage_range() if region is not huge page # aligned, or silently convert it into the private anonymous mapping. # # Signed-off-by: Oleg Nesterov # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/mem.c # 2004/08/31 00:57:58-07:00 oleg@tv-sign.ru +1 -1 # /dev/zero vs hugetlb mappings. # # ChangeSet # 2004/08/31 10:33:46-07:00 haveblue@us.ibm.com # [PATCH] ppc64: add a pfn_to_kaddr() function # # This is a helper function that a few architectures already have. This just # copies the i386 implementation to ppc64. # # Signed-off-by: Dave Hansen # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/page.h # 2004/08/31 00:57:58-07:00 haveblue@us.ibm.com +1 -0 # ppc64: add a pfn_to_kaddr() function # # ChangeSet # 2004/08/31 10:33:34-07:00 paulus@samba.org # [PATCH] ppc64: allocate irqstacks only for possible cpus # # With earlier setup of cpu_possible_map the number of irqstacks shrinks from # NR_CPUS to the number of possible cpus. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/setup.c # 2004/08/31 00:57:57-07:00 paulus@samba.org +1 -1 # ppc64: allocate irqstacks only for possible cpus # # arch/ppc64/kernel/irq.c # 2004/08/31 00:57:57-07:00 paulus@samba.org +1 -1 # ppc64: allocate irqstacks only for possible cpus # # ChangeSet # 2004/08/31 10:33:23-07:00 paulus@samba.org # [PATCH] ppc64: set platform cpuids later in boot # # Move the initialization of the per-cpu paca->hw_cpu_id out of the Open # Firmware client boot code and into a common location which is executed # later. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2004/08/31 00:57:57-07:00 paulus@samba.org +1 -1 # ppc64: set platform cpuids later in boot # # arch/ppc64/kernel/setup.c # 2004/08/31 01:27:06-07:00 paulus@samba.org +6 -0 # ppc64: set platform cpuids later in boot # # arch/ppc64/kernel/prom.c # 2004/08/31 00:57:57-07:00 paulus@samba.org +0 -22 # ppc64: set platform cpuids later in boot # # ChangeSet # 2004/08/31 10:33:11-07:00 paulus@samba.org # [PATCH] ppc64: rework PPC64 cpu map setup # # Move all cpu map initializations to one place (except for the online map -- # cpus mark themselves online as they come up). This sets up # cpu_possible_map early enough that we can use num_possible_cpus for # allocating irqstacks instead of NR_CPUS. Hopefully this should also help # set the stage for kexec. # # Signed-off-by: Nathan Lynch # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/smp.c # 2004/08/31 00:57:57-07:00 paulus@samba.org +0 -54 # ppc64: rework PPC64 cpu map setup # # arch/ppc64/kernel/setup.c # 2004/08/31 01:27:06-07:00 paulus@samba.org +116 -20 # ppc64: rework PPC64 cpu map setup # # arch/ppc64/kernel/prom.c # 2004/08/31 01:27:06-07:00 paulus@samba.org +1 -27 # ppc64: rework PPC64 cpu map setup # # ChangeSet # 2004/08/31 10:32:58-07:00 paulus@samba.org # [PATCH] Update PPC MAINTAINERS & CREDITS # # David Engebretsen has moved on to other things and is no longer maintaining # ppc64. This patch adds an entry in CREDITS to note his contribution in # leading the team that did the PPC64 port originally and updates various # PPC-related MAINTAINERS entries. # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/31 00:57:57-07:00 paulus@samba.org +8 -5 # Update PPC MAINTAINERS & CREDITS # # CREDITS # 2004/08/31 00:57:57-07:00 paulus@samba.org +4 -0 # Update PPC MAINTAINERS & CREDITS # # ChangeSet # 2004/08/31 10:32:46-07:00 tiwai@suse.de # [PATCH] Fix the unnecessary entropy call in the irq handler # # Currently add_interrupt_randomness() is called at each interrupt when one # of the handlers has SA_SAMPLE_RANDOM flag, regardless whether the interrupt # is processed by that handler or not. This results in the higher latency # and perfomance loss. # # The patch fixes this behavior to avoid the unnecessary call by checking the # return value from each handler. # # Signed-off-by: Takashi Iwai # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/v850/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/um/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/sh64/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/sh/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/ppc64/kernel/irq.c # 2004/08/31 01:27:06-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/ppc/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/mips/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/mips/baget/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -3 # Fix the unnecessary entropy call in the irq handler # # arch/ia64/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/i386/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/cris/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/arm26/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # arch/arm/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +5 -3 # Fix the unnecessary entropy call in the irq handler # # arch/alpha/kernel/irq.c # 2004/08/31 00:57:57-07:00 tiwai@suse.de +4 -2 # Fix the unnecessary entropy call in the irq handler # # ChangeSet # 2004/08/31 10:32:33-07:00 prasanna@in.ibm.com # [PATCH] Jumper Probes to provide function arguments # # A special kprobe type which can be placed on function entry points, and # employs a simple mirroring principle to allow seamless access to the # arguments of a function being probed. The probe handler routine should # have the same prototype as the function being probed. Currently # implemented for x86. # # The way it works is that when the probe is hit, the breakpoint handler # simply irets to the probe handler's eip while retaining register and stack # state corresponding to the function entry. After it is done, the probe # handler calls jprobe_return() which traps again to restore processor state # and switch back to the probed function. Linus noted correctly at KS that # we need to be careful as gcc assumes that the callee owns arguments. We # save and restore enough stack bytes to cover argument space. # # Sample Usage: # static int jip_queue_xmit(struct sk_buff *skb, int ipfragok) # { # ... whatever ... # jprobe_return(); # return 0; # } # # struct jprobe jp = { # {.addr = (kprobe_opcode_t *) ip_queue_xmit}, # .entry = (kprobe_opcode_t *) jip_queue_xmit # }; # register_jprobe(&jp); # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/kprobes.c # 2004/08/31 00:56:06-07:00 prasanna@in.ibm.com +19 -0 # Jumper Probes to provide function arguments # # include/linux/kprobes.h # 2004/08/31 00:56:06-07:00 prasanna@in.ibm.com +41 -2 # Jumper Probes to provide function arguments # # include/asm-i386/kprobes.h # 2004/08/31 00:56:06-07:00 prasanna@in.ibm.com +5 -0 # Jumper Probes to provide function arguments # # arch/i386/kernel/kprobes.c # 2004/08/31 00:56:15-07:00 prasanna@in.ibm.com +76 -2 # Jumper Probes to provide function arguments # # ChangeSet # 2004/08/31 10:32:21-07:00 prasanna@in.ibm.com # [PATCH] kprobes base patch # # This patch helps developers to trap at almost any kernel code address, # specifying a handler routine to be invoked when the breakpoint is hit. # # Useful for analysing the Linux kernel by collecting debugging information # non-disruptively. Employs single-stepping out-of-line to avoid probe # misses on SMP and may be especially useful in aiding debugging elusive # races and problems on live systems. More elaborate dynamic tracing tools # such as DProbes can be built over the kprobes interface. # # # Helps developers to trap at almost any kernel code address, specifying a # handler routine to be invoked when the breakpoint is hit. Useful for # analysing the Linux kernel by collecting debugging information # non-disruptively. Employs single-stepping out-of-line to avoid probe # misses on SMP and may be especially useful in aiding debugging elusive # races and problems on live systems. More elaborate dynamic tracing tools # such as DProbes can be built over the kprobes interface. # # Sample usage: # To place a probe on __blockdev_direct_IO: # static int probe_handler(struct kprobe *p, struct pt_regs *) # { # ... whatever ... # } # struct kprobe kp = { # .addr = __blockdev_direct_IO, # .pre_handler = probe_handler # }; # register_kprobe(&kp); # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/kprobes.c # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +125 -0 # kprobes base patch # # include/linux/kprobes.h # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +95 -0 # kprobes base patch # # include/asm-i386/kprobes.h # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +55 -0 # kprobes base patch # # arch/i386/kernel/kprobes.c # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +275 -0 # kprobes base patch # # kernel/kprobes.c # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/kernel/kprobes.c # # kernel/Makefile # 2004/08/31 00:55:12-07:00 prasanna@in.ibm.com +1 -0 # kprobes base patch # # include/linux/kprobes.h # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/kprobes.h # # include/asm-i386/kprobes.h # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-i386/kprobes.h # # arch/i386/kernel/traps.c # 2004/08/31 00:55:19-07:00 prasanna@in.ibm.com +26 -1 # kprobes base patch # # arch/i386/kernel/kprobes.c # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/kernel/kprobes.c # # arch/i386/kernel/entry.S # 2004/08/31 01:27:04-07:00 prasanna@in.ibm.com +19 -5 # kprobes base patch # # arch/i386/kernel/Makefile # 2004/08/31 00:55:12-07:00 prasanna@in.ibm.com +1 -0 # kprobes base patch # # arch/i386/Kconfig.debug # 2004/08/31 00:55:12-07:00 prasanna@in.ibm.com +10 -0 # kprobes base patch # # ChangeSet # 2004/08/31 10:32:08-07:00 prasanna@in.ibm.com # [PATCH] i386 exceptions notifier for kprobes # # This patch provides notifiers for i386 architecture exceptions. This patch # has been ported from x86_64 architecture as suggested by Andi Kleen. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/kdebug.h # 2004/08/31 00:55:10-07:00 prasanna@in.ibm.com +50 -0 # i386 exceptions notifier for kprobes # # arch/i386/mm/fault.c # 2004/08/31 00:55:10-07:00 prasanna@in.ibm.com +4 -0 # i386 exceptions notifier for kprobes # # arch/i386/kernel/traps.c # 2004/08/31 01:27:09-07:00 prasanna@in.ibm.com +39 -1 # i386 exceptions notifier for kprobes # # arch/i386/kernel/i386_ksyms.c # 2004/08/31 00:55:10-07:00 prasanna@in.ibm.com +2 -0 # i386 exceptions notifier for kprobes # # include/asm-i386/kdebug.h # 2004/08/31 00:55:10-07:00 prasanna@in.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-i386/kdebug.h # # ChangeSet # 2004/08/31 10:31:55-07:00 phil.el@wanadoo.fr # [PATCH] Fix oops with nmi-watchdog=2 # # Contributions from Zarakin # # Intel removed two msrs: MSR_P4_IQ_ESCR_0|1 (0x3ba/0x3bb), P4 model >= 3. See # Intel documentation Vol. 3 System Programming Guide Appendix B. # # nmi_watchdog=2 oopsed at boot time and oprofile at driver load. # # Avoid touching them when model >= 3. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/oprofile/op_model_p4.c # 2004/08/31 00:55:09-07:00 phil.el@wanadoo.fr +33 -3 # Fix oops with nmi-watchdog=2 # # arch/i386/kernel/nmi.c # 2004/08/31 00:55:09-07:00 phil.el@wanadoo.fr +7 -1 # Fix oops with nmi-watchdog=2 # # ChangeSet # 2004/08/31 10:31:43-07:00 jason.davis@unisys.com # [PATCH] platform update for ES7000 # # This update only applies to Unisys' ES7000 server machines. The patch adds # a OEM id check to verify the current machine running is actually a Unisys # type box before executing the Unisys OEM parser routine. It also increases # the MAX_MP_BUSSES definition from 32 to 256. On the ES7000s, bus ID # numbering can range from 0 to 255. Without the patch, the system panics if # booted with acpi=off. # # This patch has been tested and verified on an authentic ES7000 machine. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/mach-es7000/mach_mpparse.h # 2004/08/31 00:55:08-07:00 jason.davis@unisys.com +2 -1 # platform update for ES7000 # # ChangeSet # 2004/08/31 10:31:31-07:00 bjorn.helgaas@hp.com # [PATCH] Make assign_irq_vector() non-__init # # Make assign_irq_vector() non-__init always (it's called from # io_apic_set_pci_routing(), which is used in the pci_enable_device() path). # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/io_apic.c # 2004/08/31 00:55:07-07:00 bjorn.helgaas@hp.com +0 -4 # Make assign_irq_vector() non-__init # # ChangeSet # 2004/08/31 10:31:19-07:00 anton@samba.org # [PATCH] prio-tree: remove function prototype inside function # # I had a problem when compiling a 2.6 kernel with gcc 3.5 CVS. The # prototype for prio_tree_remove in mm/prio_tree.c is inside another # function. gcc 3.5 gets upset and removes the function completely. # Apparently this isnt valid C, so lets fix it up. # # Details can be found here: # # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17205 # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/prio_tree.c # 2004/08/31 00:55:06-07:00 anton@samba.org +2 -2 # prio-tree: remove function prototype inside function # # ChangeSet # 2004/08/31 03:15:41-04:00 jgarzik@pobox.com # [netdrvr 8139cp,r8169] fix dma_addr_t sizeof test # # drivers/net/r8169.c # 2004/08/31 03:15:35-04:00 jgarzik@pobox.com +1 -1 # [netdrvr 8139cp,r8169] fix dma_addr_t sizeof test # # drivers/net/8139cp.c # 2004/08/31 03:15:35-04:00 jgarzik@pobox.com +1 -1 # [netdrvr 8139cp,r8169] fix dma_addr_t sizeof test # # ChangeSet # 2004/08/30 17:15:58-07:00 davej@redhat.com # [PATCH] Fix up Centaur CPU feature enabling. # # Nehemiah wasn't having the CX8 bit enabled before. # In fixing it up, I rewrote the code to be a little clearer. # # Signed-off-by: Dave Jones # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/30 17:14:53-07:00 rth@twiddle.net # [PATCH] Alpha: generic dma mapping # # From: Ivan Kokshaysky # # - big functions moved out of line; # - handle dev == NULL case, which apparently means the isa device. # # As before, this is needed for Jensen. This also makes the isa sound # drivers working again with recent kernels. # # ChangeSet # 2004/08/30 22:07:08-07:00 davem@nuts.davemloft.net # [IPV4]: Push ip_append_data() frag bug fix into ip_append_page() # # Based upon implementation suggestions from # Yoshifuji Hideaki. # # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/08/30 22:06:40-07:00 davem@nuts.davemloft.net +34 -7 # [IPV4]: Push ip_append_data() frag bug fix into ip_append_page() # # Based upon implementation suggestions from # Yoshifuji Hideaki. # # Signed-off-by: David S. Miller # # arch/i386/kernel/cpu/centaur.c # 2004/08/24 04:43:19-07:00 davej@redhat.com +12 -15 # Fix up Centaur CPU feature enabling. # # include/asm-alpha/pci.h # 2004/08/30 11:46:32-07:00 rth@twiddle.net +2 -0 # Alpha: generic dma mapping # # include/asm-alpha/dma-mapping.h # 2004/08/30 12:34:44-07:00 rth@twiddle.net +63 -1 # Alpha: generic dma mapping # # include/asm-alpha/cache.h # 2004/08/30 11:46:32-07:00 rth@twiddle.net +1 -1 # Alpha: generic dma mapping # # arch/alpha/kernel/pci_iommu.c # 2004/08/30 15:30:01-07:00 rth@twiddle.net +39 -0 # Alpha: generic dma mapping # # arch/alpha/kernel/pci-noop.c # 2004/08/30 16:11:17-07:00 rth@twiddle.net +62 -1 # Alpha: generic dma mapping # # arch/alpha/kernel/alpha_ksyms.c # 2004/08/30 16:05:49-07:00 rth@twiddle.net +3 -0 # Alpha: generic dma mapping # # ChangeSet # 2004/08/30 16:39:38-07:00 shemminger@osdl.org # [PKT_SCHED]: Distribution table fixes for netem. # # Fix some issues with netem. # * fix memory link in q_destroy where distribution table not freed # * fix math error in tabledist that made it work for only small values # * change API for distribution table so scaling factor is constant and # table size is determined by looking at the rtnetlink payload size. # this is faster and simpler. Since haven't actually released the tools to load # the table yet, this is the chance to get it right ;-) # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/08/30 16:39:21-07:00 shemminger@osdl.org +19 -19 # [PKT_SCHED]: Distribution table fixes for netem. # # Fix some issues with netem. # * fix memory link in q_destroy where distribution table not freed # * fix math error in tabledist that made it work for only small values # * change API for distribution table so scaling factor is constant and # table size is determined by looking at the rtnetlink payload size. # this is faster and simpler. Since haven't actually released the tools to load # the table yet, this is the chance to get it right ;-) # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/pkt_sched.h # 2004/08/30 16:39:21-07:00 shemminger@osdl.org +1 -6 # [PKT_SCHED]: Distribution table fixes for netem. # # Fix some issues with netem. # * fix memory link in q_destroy where distribution table not freed # * fix math error in tabledist that made it work for only small values # * change API for distribution table so scaling factor is constant and # table size is determined by looking at the rtnetlink payload size. # this is faster and simpler. Since haven't actually released the tools to load # the table yet, this is the chance to get it right ;-) # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/30 16:37:48-07:00 shemminger@osdl.org # [NET]: net_random_init needs to get seed later in boot process # # Argh.. random_init isn't called until the device's are initialized. # Rather than mess with random.c initialization, how about this; it resets # the net_random state late in initialization when get_random_bytes is ready. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/core/utils.c # 2004/08/30 16:37:31-07:00 shemminger@osdl.org +15 -7 # [NET]: net_random_init needs to get seed later in boot process # # Argh.. random_init isn't called until the device's are initialized. # Rather than mess with random.c initialization, how about this; it resets # the net_random state late in initialization when get_random_bytes is ready. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/31 00:21:36+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2061/1: S3C2410 - Drive strength control for s3c2440 # # Patch from Ben Dooks # # Register definitions, and support for modifying the # Drive Strength Control registers on the S3C2440 # # Signed-off-by: Ben Dooks # # # include/asm-arm/arch-s3c2410/regs-dsc.h # 2004/08/30 21:51:32+01:00 ben-linux@org.rmk.(none) +183 -0 # [PATCH] 2061/1: S3C2410 - Drive strength control for s3c2440 # # include/asm-arm/arch-s3c2410/regs-dsc.h # 2004/08/30 21:51:32+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-dsc.h # # arch/arm/mach-s3c2410/s3c2440-dsc.c # 2004/08/30 21:53:00+01:00 ben-linux@org.rmk.(none) +57 -0 # [PATCH] 2061/1: S3C2410 - Drive strength control for s3c2440 # # arch/arm/mach-s3c2410/s3c2440-dsc.c # 2004/08/30 21:53:00+01:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/s3c2440-dsc.c # # ChangeSet # 2004/08/31 00:16:46+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2056/1: S3C2410 - check for IRQ pending in gettimeoffset() # # Patch from Ben Dooks # # Ensure we check for IRQ pending for the gettimeoffset() # function # # # arch/arm/mach-s3c2410/time.c # 2004/08/30 19:51:23+01:00 ben-linux@org.rmk.(none) +16 -3 # [PATCH] 2056/1: S3C2410 - check for IRQ pending in gettimeoffset() # # ChangeSet # 2004/08/31 00:11:38+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2055/1: S3C2410 - add timer0 deadzone definition # # Patch from Ben Dooks # # Add the definition of timer 0's dead-zone capability # # # include/asm-arm/arch-s3c2410/regs-timer.h # 2004/08/30 00:43:36+01:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2055/1: S3C2410 - add timer0 deadzone definition # # ChangeSet # 2004/08/30 15:46:34-07:00 davem@nuts.davemloft.net # [TG3]: Update driver version and reldate. # # drivers/net/tg3.c # 2004/08/30 15:46:18-07:00 davem@nuts.davemloft.net +2 -2 # [TG3]: Update driver version and reldate. # # ChangeSet # 2004/08/30 15:46:01-07:00 davem@nuts.davemloft.net # [TG3]: Fix clock control programming on 5705/5750. # # Need to clear one bit at a time, so if we are # clearing both 625_CORE_CLOCK and ALTCLOCK # we first clear the latter then the final # write will clear the former. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/30 15:45:45-07:00 davem@nuts.davemloft.net +8 -3 # [TG3]: Fix clock control programming on 5705/5750. # # Need to clear one bit at a time, so if we are # clearing both 625_CORE_CLOCK and ALTCLOCK # we first clear the latter then the final # write will clear the former. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/30 15:43:38-07:00 davem@nuts.davemloft.net # [TG3]: Add capacitive coupling support. # # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2004/08/30 15:43:21-07:00 davem@nuts.davemloft.net +1 -0 # [TG3]: Add capacitive coupling support. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/30 15:43:21-07:00 davem@nuts.davemloft.net +18 -2 # [TG3]: Add capacitive coupling support. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/30 15:43:00-07:00 mchan@broadcom.com # [TG3]: Check MAC_STATUS_SIGNAL_DET in serdes polling. # # Otherwise we do not handle properly the case # where the switch/hub does not support auto- # negotiation. This is what was breaking 5704 # hw fiber autoneg. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/30 15:42:44-07:00 mchan@broadcom.com +2 -1 # [TG3]: Check MAC_STATUS_SIGNAL_DET in serdes polling. # # Otherwise we do not handle properly the case # where the switch/hub does not support auto- # negotiation. This is what was breaking 5704 # hw fiber autoneg. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/30 15:42:09-07:00 davem@nuts.davemloft.net # [TG3]: Add 5750 A3 workaround. # # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2004/08/30 15:41:52-07:00 davem@nuts.davemloft.net +1 -0 # [TG3]: Add 5750 A3 workaround. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/30 15:41:52-07:00 davem@nuts.davemloft.net +7 -0 # [TG3]: Add 5750 A3 workaround. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/30 22:20:37+00:00 eranian@hpl.hp.com # [IA64] perfmon.c: cleanup system-wide context when closed from another cpu # # - fix pfm_stop() and pfm_flush_pmds() to correctly cleanup # in case of a system-wide context which is closed while running # from another processor. This was leading to an assertion failure # in pfm_loads_regs() for the next user of the PMU on the monitored # CPU. # # signed-off-by: stephane eranian # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/08/30 22:18:07+00:00 aegl@agluck-lia64.sc.intel.com +12 -8 # cleanup system-wide context when closed from another cpu # # ChangeSet # 2004/08/30 22:15:50+00:00 eranian@hpl.hp.com # [IA64] palinfo.c: typo s/BEER/BERR/ # # - fix a typo in the file /proc/pal/CPU*/processor_info w.r.t. # to BERR promotion. Initially reported by Danny Kwong from HP. # # Signed-off-by: stephane eranian # Signed-off-by: Tony Luck # # arch/ia64/kernel/palinfo.c # 2004/08/30 22:13:15+00:00 aegl@agluck-lia64.sc.intel.com +1 -1 # typo s/BEER/BERR/ # # ChangeSet # 2004/08/30 14:28:05-07:00 hadi@znyx.com # [ETH]: Zap NET_CLS_ACT ifdef. # # Signed-off-by: Jamal Hadi Salim # Signed-off-by: David S. Miller # # net/ethernet/eth.c # 2004/08/30 14:27:27-07:00 hadi@znyx.com +0 -2 # [ETH]: Zap NET_CLS_ACT ifdef. # # ChangeSet # 2004/08/30 20:49:38+00:00 jbarnes@sgi.com # [IA64-SGI] sn2_defconfig: Enable preempt, CPU hotplug, ext2 and IDE. # # o enable preempt per Andrew's request for testing # o enable CPU hotplug for testing # o add EXT2 and IDE disk support to make simulation easy # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/configs/sn2_defconfig # 2004/08/30 20:46:40+00:00 aegl@agluck-lia64.sc.intel.com +24 -13 # Enable preempt, CPU hotplug, ext2 and IDE. # # ChangeSet # 2004/08/30 14:43:27-04:00 bzolnier@elka.pw.edu.pl # [PATCH] libata: ata_piix.c PIO fix # # [patch] libata: ata_piix.c PIO fix # # "[libata] transfer mode cleanup" introduced bug in ata_piix.c: # previously PIO number (not mode) was passed to piix_set_piomode(). # Fortunately this function is only used for (disabled) PATA support. # # I bet that this is the reason why MWDMA didn't work for PATA. # # Signed-off-by: Bartlomiej Zolnierkiewicz # # drivers/scsi/ata_piix.c # 2004/08/30 14:23:18-04:00 bzolnier@elka.pw.edu.pl +1 -1 # libata: ata_piix.c PIO fix # # ChangeSet # 2004/08/30 10:17:55-07:00 akpm@osdl.org # [PATCH] megaraid warning fix # # The ioctl32 conversion registration stubs are in ioctl32.h now. # # Signed-off-by: Andrew Morton # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/30 01:19:47-07:00 akpm@osdl.org +0 -3 # megaraid warning fix # # ChangeSet # 2004/08/29 23:49:23-07:00 torvalds@ppc970.osdl.org # Merge http://oss.sgi.com:8090/xfs-linux-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # mm/filemap.c # 2004/08/29 23:49:19-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/29 21:11:23-07:00 kaber@trash.net # [NETFILTER]: Fix race when flushing fragment queue # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/29 21:11:06-07:00 kaber@trash.net +1 -1 # [NETFILTER]: Fix race when flushing fragment queue # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/29 21:10:27-07:00 kaber@trash.net # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_standalone.c # 2004/08/29 21:10:09-07:00 kaber@trash.net +6 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_conntrack_core.c # 2004/08/29 21:10:09-07:00 kaber@trash.net +8 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/ipv4/ip_fragment.c # 2004/08/29 21:10:09-07:00 kaber@trash.net +14 -3 # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # include/net/ip.h # 2004/08/29 21:10:09-07:00 kaber@trash.net +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # include/linux/netfilter_ipv4/ip_conntrack.h # 2004/08/29 21:10:09-07:00 kaber@trash.net +1 -0 # [NETFILTER]: Flush fragment queue on conntrack unload # # Problem discovered, and original version of patch, by # Olaf Kirch. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/29 23:08:58-05:00 stevef@smfhome1.smfdom # [CIFS] Fix incorrect byte count in unlock SMB # # fs/cifs/cifssmb.c # 2004/08/29 23:08:50-05:00 stevef@smfhome1.smfdom +1 -1 # byte count wrong in unlock SMB # # ChangeSet # 2004/08/29 15:05:32-07:00 torvalds@ppc970.osdl.org # Undo UML mis-merge of jiffies initialization. # # Paolo Giarrusso points out that the UML merge incorrectly # caused INITIAL_JIFFIES to be reset back to zero, instead # of the debug value for getting an early jiffies wrap. # # Fix it back up. # # include/linux/time.h # 2004/08/29 15:05:26-07:00 torvalds@ppc970.osdl.org +1 -1 # Undo UML mis-merge of jiffies initialization. # # Paolo Giarrusso points out that the UML merge incorrectly # caused INITIAL_JIFFIES to be reset back to zero, instead # of the debug value for getting an early jiffies wrap. # # Fix it back up. # # ChangeSet # 2004/08/29 13:07:31+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Rename UART_STARTECH to UART_CAP_EFR # # UART_STARTECH is really telling us that the UART has an EFR register, # so call this flag UART_CAP_EFR. # # drivers/serial/8250.h # 2004/08/29 13:05:20+01:00 rmk@flint.arm.linux.org.uk +1 -0 # Rename UART_STARTECH to UART_CAP_EFR, since that's what it's really # telling us - that the UART has an EFR register. # # drivers/serial/8250.c # 2004/08/29 13:05:19+01:00 rmk@flint.arm.linux.org.uk +10 -8 # Rename UART_STARTECH to UART_CAP_EFR, since that's what it's really # telling us - that the UART has an EFR register. # # ChangeSet # 2004/08/29 12:59:58+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: add UART_CAP_SLEEP capability. # # drivers/serial/8250.h # 2004/08/29 12:57:48+01:00 rmk@flint.arm.linux.org.uk +1 -0 # Add UART_CAP_SLEEP definition. # # drivers/serial/8250.c # 2004/08/29 12:57:48+01:00 rmk@flint.arm.linux.org.uk +17 -17 # Add UART_CAP_SLEEP - this indicates which UART types have IER sleep # capability. We generalise the code in serial8250_set_sleep() since # Startech is a superset of the TI16750 sleep code. # # ChangeSet # 2004/08/29 12:52:25+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: serial8250_set_sleep # # Add container function for UART sleep code. Currently only Startech # and TI16750 uses this. # # drivers/serial/8250.c # 2004/08/29 12:49:56+01:00 rmk@flint.arm.linux.org.uk +24 -46 # Add serial8250_set_sleep - this contains the code to place UARTs into # sleep mode. # # ChangeSet # 2004/08/29 11:52:58+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: combine UART_CLEAR_FIFO/UART_USE_FIFO into one flag. # # Combine UART_CLEAR_FIFO and UART_USE_FIFO into one capability - # UART_CAP_FIFO. There is only one UART with an unused FIFO - ST16650. # Since we check the fifo size before enabling, we maintain the # existing behaviour. # # drivers/serial/8250.h # 2004/08/29 11:50:41+01:00 rmk@flint.arm.linux.org.uk +2 -0 # Add UART_CAP_FIFO flag. # # drivers/serial/8250.c # 2004/08/29 11:50:41+01:00 rmk@flint.arm.linux.org.uk +12 -12 # Combine UART_CLEAR_FIFO and UART_USE_FIFO into one capability - # UART_CAP_FIFO. There is only one UART with an unused FIFO, ST16650. # Since we check the fifo size before enabling, we maintain the # existing behaviour. # # ChangeSet # 2004/08/28 23:03:42-07:00 yoshfuji@linux-ipv6.org # [IPV4/IPV6]: Fix fragment creation. # # We have two problem in ipv4 and ipv6 wrt. to # fragmentation on output. Both of which result # in fragmentation when it is really not needed. # # When fragmenting both ipv4 and ipv6 need to make # the post IP-header portion of the packet have a # length of modulo 8. This means that if the PMTU # is not a multiple of 8 after the IP header size # is subtracted, we will fragment for full sized # frames for the modulo 8 bytes. # # Furthermore, IPV6 subtracts out space for the # fragmentation header it must add, making unnecessary # fragmentation even more likely. # # We still need to handle ip*_append_page() and that # will happen in a followup fix. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv6/ip6_output.c # 2004/08/28 23:03:09-07:00 yoshfuji@linux-ipv6.org +73 -11 # [IPV4/IPV6]: Fix fragment creation. # # We have two problem in ipv4 and ipv6 wrt. to # fragmentation on output. Both of which result # in fragmentation when it is really not needed. # # When fragmenting both ipv4 and ipv6 need to make # the post IP-header portion of the packet have a # length of modulo 8. This means that if the PMTU # is not a multiple of 8 after the IP header size # is subtracted, we will fragment for full sized # frames for the modulo 8 bytes. # # Furthermore, IPV6 subtracts out space for the # fragmentation header it must add, making unnecessary # fragmentation even more likely. # # We still need to handle ip*_append_page() and that # will happen in a followup fix. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv4/ip_output.c # 2004/08/28 23:03:09-07:00 yoshfuji@linux-ipv6.org +39 -15 # [IPV4/IPV6]: Fix fragment creation. # # We have two problem in ipv4 and ipv6 wrt. to # fragmentation on output. Both of which result # in fragmentation when it is really not needed. # # When fragmenting both ipv4 and ipv6 need to make # the post IP-header portion of the packet have a # length of modulo 8. This means that if the PMTU # is not a multiple of 8 after the IP header size # is subtracted, we will fragment for full sized # frames for the modulo 8 bytes. # # Furthermore, IPV6 subtracts out space for the # fragmentation header it must add, making unnecessary # fragmentation even more likely. # # We still need to handle ip*_append_page() and that # will happen in a followup fix. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/28 22:55:25-07:00 apm@brigitte.dna.fi # [NETFILTER]: One missed case in arp_tables.c unaligned fixes. # # Signed-off-by: Antti P Miettinen # Signed-off-by: David S. Miller # # net/ipv4/netfilter/arp_tables.c # 2004/08/28 22:54:42-07:00 apm@brigitte.dna.fi +4 -1 # [NETFILTER]: One missed case in arp_tables.c unaligned fixes. # # Signed-off-by: Antti P Miettinen # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/28 22:50:23-07:00 hadi@znyx.com # [PPP]: Fix assertion trigger with NET_CLS_ACT. # # Missing setting of skb->input_dev when changing # skb->dev # # Signed-off-by: Jamal Hadi Salim # Signed-off-by; David S. Miller # # drivers/net/ppp_generic.c # 2004/08/28 22:49:19-07:00 hadi@znyx.com +1 -0 # [PPP]: Fix assertion trigger with NET_CLS_ACT. # # ChangeSet # 2004/08/28 22:04:26-07:00 armin@melware.de # [PATCH] ISDN Eicon driver: maint/trace fix and update # # Fix of the debug/trace driver and removal of irq locks. # # - Only spinlocks[bh] are used now. # - Removed obsolete direct debug /proc interface. # - Update of internal trace features and its API. # - Use common definition of MAX_DESCRIPTORS. # # drivers/isdn/hardware/eicon/platform.h # 2004/08/28 13:14:30-07:00 armin@melware.de +22 -15 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/pc.h # 2004/08/28 13:14:30-07:00 armin@melware.de +87 -0 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/mntfunc.c # 2004/08/28 13:14:30-07:00 armin@melware.de +61 -42 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/maintidi.h # 2004/08/28 13:14:29-07:00 armin@melware.de +3 -1 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/maintidi.c # 2004/08/28 13:14:29-07:00 armin@melware.de +49 -2 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/io.h # 2004/08/28 13:14:29-07:00 armin@melware.de +51 -12 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/io.c # 2004/08/28 13:14:29-07:00 armin@melware.de +38 -12 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/idifunc.c # 2004/08/28 13:14:29-07:00 armin@melware.de +1 -3 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/divasync.h # 2004/08/28 13:14:29-07:00 armin@melware.de +15 -6 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/divasfunc.c # 2004/08/28 13:14:29-07:00 armin@melware.de +5 -7 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/divamnt.c # 2004/08/28 13:14:29-07:00 armin@melware.de +13 -225 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/diva_didd.c # 2004/08/28 13:14:29-07:00 armin@melware.de +2 -4 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/diddfunc.c # 2004/08/28 13:14:29-07:00 armin@melware.de +1 -3 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/debuglib.h # 2004/08/28 13:14:29-07:00 armin@melware.de +3 -3 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/debug_if.h # 2004/08/28 13:14:29-07:00 armin@melware.de +6 -0 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/debug.c # 2004/08/28 13:14:29-07:00 armin@melware.de +422 -70 # ISDN Eicon driver: maint/trace fix and update # # drivers/isdn/hardware/eicon/capifunc.h # 2004/08/28 13:14:28-07:00 armin@melware.de +1 -3 # ISDN Eicon driver: maint/trace fix and update # # ChangeSet # 2004/08/28 21:56:42-07:00 torvalds@ppc970.osdl.org # Merge bk://linux-voyager.bkbits.net/dma-declare-coherent-memory-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/device.h # 2004/08/28 21:56:39-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/29 00:48:16+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: tell transmit path the data transfer size. # # Some UARTs give us a transmit interrupt when the TX FIFO is less # than half empty. This means we should not transfer a FIFO-full # of data to the device. Introduce "tx_loadsz" to indicate the # size of this transfer. # # drivers/serial/8250.h # 2004/08/29 00:46:09+01:00 rmk@flint.arm.linux.org.uk +1 -0 # Add tx_loadsz element to serial8250_config # # drivers/serial/8250.c # 2004/08/29 00:46:08+01:00 rmk@flint.arm.linux.org.uk +19 -17 # Add "tx_loadsz". This gives the size of the data transfer when we # receive a transmit interrupt. Add transmit load size data to the # uart_config table. # # ChangeSet # 2004/08/29 00:29:43+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: Add serial8250_config structure definition. # # This structure replaces serial_uart_config to allow the 8250 driver # to extend it without breaking all the other users. # # ChangeSet # 2004/08/28 19:29:32-04:00 achew@nvidia.com # [PATCH] sata_nv: fix CK804 support # # This patch fixes a problem introduced when CK804 support was added. mmio_base can only be set in the CK804 case, # else libata will attempt to iounmap mmio_base, which isn't iomapped for the non-CK804 case. Still need the bar 5 # address, so steal from host_set->ports[0]->ioaddr.scr_addr. Jeff, let me know if this is a bad thing to do. # # drivers/scsi/sata_nv.c # 2004/08/19 16:36:06-04:00 achew@nvidia.com +12 -8 # sata_nv.c # # drivers/serial/8250.h # 2004/08/29 00:27:37+01:00 rmk@flint.arm.linux.org.uk +9 -0 # Add serial8250_config structure definition. # # drivers/serial/8250.c # 2004/08/29 00:27:36+01:00 rmk@flint.arm.linux.org.uk +2 -2 # Rename serial_uart_config structure to serial8250_config, and # dfl_xmit_fifo_size to fifo_size. # # ChangeSet # 2004/08/28 19:22:26-04:00 mporter@kernel.crashing.org # [PATCH] ibm_emac driver updates # # Optimizes transmit windows for improved performance and to prevent # TX underruns. Fixes driver registration error handling. Fixes ZMII # and RGMII thinkos. Fixes for MDIO handling issues from Ralph # Siemsen. Please apply. # # Signed-off-by: Matt Porter # # drivers/net/ibm_emac/ibm_emac_core.h # 2004/08/05 10:26:55-04:00 mporter@kernel.crashing.org +1 -1 # ibm_emac driver updates # # drivers/net/ibm_emac/ibm_emac_core.c # 2004/08/05 10:35:59-04:00 mporter@kernel.crashing.org +47 -27 # ibm_emac driver updates # # drivers/net/ibm_emac/ibm_emac.h # 2004/08/04 11:41:48-04:00 mporter@kernel.crashing.org +16 -16 # ibm_emac driver updates # # ChangeSet # 2004/08/29 00:06:41+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] 8250: We can only use the FIFO if fifosize > 1. # # drivers/serial/8250.c # 2004/08/29 00:03:54+01:00 rmk@flint.arm.linux.org.uk +1 -1 # We can only use the FIFO if fifosize > 1. # # ChangeSet # 2004/08/28 19:02:49-04:00 jeremy@sgi.com # [PATCH] Fix DMA boundary overflow bug # # We seem to have found an overflow problem in libata-core.c. # We were trying to DMA to the address range 0xffff8000-0xffffbfff. # # In the original version of the code, given that address and # count (0xffff8000 and 0x4000), the variable "boundary" would be # set to 0, causing len to be set to 0x8000 (which is greater than # sg_len). Then at the bottom of the loop, sg_len would be set # to 0xffffc000 (0x4000 - 0x8000), which would then cause the # loop never to terminate (until much of memory was scribbled # over or the kernel died). # # The code below should be functionally identical, but not be # subject to the same overflow problem (boundary needs to be a # u33). # # Signed-off-by: jeremy@sgi.com # # ===== drivers/scsi/libata-core.c 1.94 vs edited ===== # # drivers/scsi/libata-core.c # 2004/08/26 00:10:45-04:00 jeremy@sgi.com +4 -4 # 2.6.9-rc1 drivers/scsi/libata-core.c # # ChangeSet # 2004/08/28 18:55:46-04:00 tharbaugh@lnxi.com # [netdrvr e1000] disable DITR, which apparently hurts performance # # drivers/net/e1000/e1000_param.c # 2004/08/28 18:55:39-04:00 tharbaugh@lnxi.com +1 -1 # [netdrvr e1000] disable DITR, which apparently hurts performance # # ChangeSet # 2004/08/28 18:50:25-04:00 akpm@osdl.org # [PATCH] Problem with SiS900 - Unknown PHY # # From: Laurent # # Some time ago, I sent on this list a mail about my strange problem with my # SiS900 network card (Subject was Sluggish performances with FreeBSD) # # To sum up, when my card is in 100Mb mode, I have poor throughput but in # 10Mb, all seems normal. # # After some tests, it seems these results was due to a misdetection of the # PHY device. mii-tool reports : # # product info: vendor 08:00:17, model 3 rev 0 # # and after some search on the web, I found it's a NS DP83847 which is very # similar. # # Signed-off-by: Andrew Morton # # drivers/net/sis900.c # 2004/08/25 03:15:20-04:00 akpm@osdl.org +1 -0 # Problem with SiS900 - Unknown PHY # # ChangeSet # 2004/08/28 23:48:25+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Move XR16C850 Tx/Rx trigger level setup to startup code # # drivers/serial/8250.c # 2004/08/28 23:46:09+01:00 rmk@flint.arm.linux.org.uk +17 -17 # Move TX/RX trigger level settings for XR16C850 into startup code # rather than power management code. # # ChangeSet # 2004/08/28 23:34:57+01:00 rmk@flint.arm.linux.org.uk # [SERIAL] Factor out "clear fifo" functionality. # # Move "clear fifo" into separate function dependent on # UART_CLEAR_FIFO capability. We take note of the comment about # Lucent Venus and always use the two-stage enable-then-clear as # we do on startup. # # drivers/serial/8250.c # 2004/08/28 23:32:32+01:00 rmk@flint.arm.linux.org.uk +16 -14 # Move "clear fifo" into separate function dependent on # UART_CLEAR_FIFO capability. We take note of the comment about # Lucent Venus and always use the two-stage enable-then-clear as # we do on startup. # # ChangeSet # 2004/08/28 15:12:54-05:00 shaggy@austin.ibm.com # JFS: fix memory leak in __invalidate_metapages # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2004/08/28 15:12:30-05:00 shaggy@austin.ibm.com +1 -0 # fix memory leak # # ChangeSet # 2004/08/28 11:46:08-07:00 torvalds@ppc970.osdl.org # Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/pci_ids.h # 2004/08/28 11:46:04-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # MAINTAINERS # 2004/08/28 11:46:04-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/28 11:21:14-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide: remove unused IDETAPE_DEBUG_LOG_VERBOSE code from ide-tape.c # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/ide-tape.c # 2004/08/28 04:22:52-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -74 # ide: remove unused IDETAPE_DEBUG_LOG_VERBOSE code from ide-tape.c # # ChangeSet # 2004/08/28 11:21:02-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide: remove CONFIG_IDE_TASKFILE_IO code from pdc4030.c # # It seems that CONFIG_IDE_TASKFILE_IO code in pdc4030.c was never tested # (i.e. writes don't work et all because of bogus rq->cmd check). # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/legacy/pdc4030.c # 2004/08/28 08:35:05-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +1 -115 # ide: remove CONFIG_IDE_TASKFILE_IO code from pdc4030.c # # ChangeSet # 2004/08/28 11:20:50-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide: small drivers/ide/legacy/Makefile cleanup # # Let's kill the obsolete CONFIG_BLK_DEV_HD98 entry. # # Signed-off-by: Adrian Bunk # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/legacy/Makefile # 2004/08/28 08:30:35-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +0 -1 # ide: small drivers/ide/legacy/Makefile cleanup # # ChangeSet # 2004/08/28 11:20:39-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide: check the return value of pci_set_dma_mask() in cs5520.c # # From: Arjan van de Ven # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/pci/cs5520.c # 2004/08/28 08:27:45-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +4 -1 # ide: check the return value of pci_set_dma_mask() in cs5520.c # # ChangeSet # 2004/08/28 11:20:27-07:00 B.Zolnierkiewicz@elka.pw.edu.pl # [PATCH] ide: identify non decoded master/slave by serial and model # # From: Alan Cox # # Some interfaces (notably PCMCIA ones) don't decode the master/slave select so # you get two copies of a device appearing and bad things happening if a user # accidentally uses both. # # This checks for the model/serial matching but also knows about non ATA drives # ide=noprobe and a Maxtor problem that was found in Andrew's testing of an # earlier patch. Although M00000.. drives should be RMA'd to Maxtor (and with # info on where they were obtained...) we don't want to break anyone who has # them. # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/ide-probe.c # 2004/08/28 06:47:33-07:00 B.Zolnierkiewicz@elka.pw.edu.pl +12 -0 # ide: identify non decoded master/slave by serial and model # # ChangeSet # 2004/08/28 11:20:15-07:00 bzolnier@elka.pw.edu.pl # [PATCH] ide: fix bad disk geometry hang # # From: Alan Cox # # If you get invalid geometry (eg a failed drive) the box hangs on boot because # we try and unregister the registered driver and end up in a locking mess. # # We change the behaviour to simply leave the device unattached which avoids # the mess. # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/ide-disk.c # 2004/08/28 06:45:42-07:00 bzolnier@elka.pw.edu.pl +3 -6 # ide: fix bad disk geometry hang # # ChangeSet # 2004/08/28 11:20:03-07:00 bzolnier@elka.pw.edu.pl # [PATCH] ide: quiten hwif spin up # # From: Alan Cox # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/ide-probe.c # 2004/08/28 06:44:04-07:00 bzolnier@elka.pw.edu.pl +2 -2 # ide: quiten hwif spin up # # ChangeSet # 2004/08/28 11:19:52-07:00 bzolnier@elka.pw.edu.pl # [PATCH] ide: do hwif spin up for all platforms # # From: Alan Cox # # This was put in for PPC specifically and defined in the 2.4 tree to be # paranoid about breaking stuff. The actual wait for hwif spin up is however # perfectly correct for all drives. In the normal PC case the PC BIOS has done # this but with other embedded boxes and with things like LinuxBIOS it may not # have done. Thus it should always be done. # # Signed-off-by: Andrew Morton # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # drivers/ide/ide-probe.c # 2004/08/28 11:19:45-07:00 bzolnier@elka.pw.edu.pl +0 -4 # ide: do hwif spin up for all platforms # # ChangeSet # 2004/08/28 11:19:40-07:00 bzolnier@elka.pw.edu.pl # [PATCH] ide: remove /proc/ide/hd?/settings:ide-scsi & HDIO_SET_IDE_SCSI ioctl # # As noticed by Alan Cox: # # "It doesn't work now so it clearly isnt being used 8). We hold the lock # because its a proc function and we then replace the proc functions in the # attach method -> deadlock. It is also incredibly hard to fix without a # major rewrite." # # The same is true for HDIO_SET_IDE_SCSI ioctl. # # Both were broken 18 months ago in 2.5.63 as a side-effect of locking fixes. # # Signed-off-by: Bartlomiej Zolnierkiewicz # Signed-off-by: Linus Torvalds # # include/linux/ide.h # 2004/08/28 04:08:30-07:00 bzolnier@elka.pw.edu.pl +1 -1 # ide: remove /proc/ide/hd?/settings:ide-scsi & HDIO_SET_IDE_SCSI ioctl # # include/linux/hdreg.h # 2004/08/28 04:08:30-07:00 bzolnier@elka.pw.edu.pl +2 -3 # ide: remove /proc/ide/hd?/settings:ide-scsi & HDIO_SET_IDE_SCSI ioctl # # drivers/ide/ide.c # 2004/08/28 04:08:30-07:00 bzolnier@elka.pw.edu.pl +0 -19 # ide: remove /proc/ide/hd?/settings:ide-scsi & HDIO_SET_IDE_SCSI ioctl # # ChangeSet # 2004/08/28 10:04:12-07:00 torvalds@ppc970.osdl.org # Remove QIC-02 tape from Kconfig. # # Let's leave the code for a while yet, and see if somebody screams. # But both Red Hat and SuSE claim it is unused, so it probably is. The # driver hasn't gotten updated in years, and google doesn't seem to # show any usage either. # # drivers/char/Kconfig # 2004/08/28 10:04:06-07:00 torvalds@ppc970.osdl.org +0 -33 # Remove QIC-02 tape from Kconfig. # # Let's leave the code for a while yet, and see if somebody screams. # But both Red Hat and SuSE claim it is unused, so it probably is. The # driver hasn't gotten updated in years, and google doesn't seem to # show any usage either. # # ChangeSet # 2004/08/27 20:59:29-07:00 viro@www.linux.org.uk # [PATCH] NULL noise removal in usb/gadget # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/usb/gadget/inode.c # 2004/08/27 16:48:52-07:00 viro@www.linux.org.uk +2 -2 # NULL noise removal in usb/gadget # # ChangeSet # 2004/08/27 20:59:17-07:00 viro@www.linux.org.uk # [PATCH] ifdef fixes # # smc91x.c: missing ifdef CONFIG_ISA around ISA-only code. # asm-arm/apm.h: ifdef CONFIG_APM breaks if APM is a module. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-arm/apm.h # 2004/08/27 16:35:12-07:00 viro@www.linux.org.uk +1 -1 # ifdef fixes # # drivers/net/smc91x.c # 2004/08/27 16:35:26-07:00 viro@www.linux.org.uk +2 -0 # ifdef fixes # # ChangeSet # 2004/08/27 20:59:05-07:00 viro@www.linux.org.uk # [PATCH] misc alpha bits # # * long constant in a.out.h # * missing cast to pointer in pgtable.h # * removed useless __chk_user_ptr() in get_user() and put_user() - with fixed # typeof handling in sparse we are getting the check from # __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ # anyway, so __chk_user_ptr() is redundant there. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-alpha/uaccess.h # 2004/08/27 16:34:37-07:00 viro@www.linux.org.uk +0 -2 # misc alpha bits # # include/asm-alpha/pgtable.h # 2004/08/27 16:34:32-07:00 viro@www.linux.org.uk +1 -1 # misc alpha bits # # include/asm-alpha/a.out.h # 2004/08/27 16:34:28-07:00 viro@www.linux.org.uk +1 -1 # misc alpha bits # # ChangeSet # 2004/08/27 20:58:54-07:00 viro@www.linux.org.uk # [PATCH] checksum.h annotations # # missing annotations in csum_partial_copy_from_user() on arm and ppc # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-ppc/checksum.h # 2004/08/27 16:33:40-07:00 viro@www.linux.org.uk +1 -1 # checksum.h annotations # # include/asm-arm/checksum.h # 2004/08/27 16:33:49-07:00 viro@www.linux.org.uk +1 -1 # checksum.h annotations # # ChangeSet # 2004/08/27 20:58:42-07:00 viro@www.linux.org.uk # [PATCH] misc sound/oss bits # # - a couple of PCI drivers made dependent on CONFIG_PCI # - signed char fix in wavfront.c # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/wavfront.c # 2004/08/27 16:33:08-07:00 viro@www.linux.org.uk +1 -1 # misc sound/oss bits # # sound/oss/Kconfig # 2004/08/27 16:33:04-07:00 viro@www.linux.org.uk +3 -3 # misc sound/oss bits # # ChangeSet # 2004/08/27 19:29:11-07:00 torvalds@ppc970.osdl.org # Fix "insert_resource()" nesting bug # # It used to create totally impossible resource trees in some # circumstances where it was asked to insert a conflicting # resource. We never noticed, because it wasn't used that much. # # Make it return the proper error instead. # # kernel/resource.c # 2004/08/27 19:29:05-07:00 torvalds@ppc970.osdl.org +14 -8 # Fix "insert_resource()" nesting bug # # It used to create totally impossible resource trees in some # circumstances where it was asked to insert a conflicting # resource. We never noticed, because it wasn't used that much. # # Make it return the proper error instead. # # ChangeSet # 2004/08/27 19:13:44-07:00 viro@www.linux.org.uk # [PATCH] arm Kconfig fixes # # ARM dependency and makefile fixes (ACKed by rmk) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/input/serio/Kconfig # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -1 # arm Kconfig fixes # # drivers/char/agp/Kconfig # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -1 # arm Kconfig fixes # # drivers/char/Kconfig # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -1 # arm Kconfig fixes # # arch/arm/boot/compressed/Makefile # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +5 -4 # arm Kconfig fixes # # arch/arm/Kconfig # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -0 # arm Kconfig fixes # # ChangeSet # 2004/08/27 19:13:32-07:00 viro@www.linux.org.uk # [PATCH] 64bit portability fixes (pointer-to-int stuff) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/wavfront.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +2 -2 # 64bit portability fixes (pointer-to-int stuff) # # drivers/scsi/libata-scsi.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -1 # 64bit portability fixes (pointer-to-int stuff) # # drivers/media/video/zoran_driver.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +2 -2 # 64bit portability fixes (pointer-to-int stuff) # # drivers/media/dvb/frontends/dst.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +3 -3 # 64bit portability fixes (pointer-to-int stuff) # # ChangeSet # 2004/08/27 19:13:20-07:00 viro@www.linux.org.uk # [PATCH] 64bit cleanup in bt878 and btaudio # # ~0x0UL passed in u32 argument will do what the authors wanted, but it's # a hell of a silly way to spell ~0U on 32bit boxen and it generates warnings on # 64bit boxen (we get correct value after truncation, but compiler doesn't # know that ;-) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/btaudio.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +2 -2 # 64bit cleanup in bt878 and btaudio # # drivers/media/dvb/bt8xx/bt878.c # 2004/08/27 13:05:05-07:00 viro@www.linux.org.uk +1 -1 # 64bit cleanup in bt878 and btaudio # # ChangeSet # 2004/08/27 19:13:07-07:00 viro@www.linux.org.uk # [PATCH] wf_midi check_region() removal # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/wf_midi.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +2 -3 # wf_midi check_region() removal # # ChangeSet # 2004/08/27 19:12:55-07:00 viro@www.linux.org.uk # [PATCH] mpu401 check_region() removal # # mpu401 ports are claimed by callers now # probe_mpu401() gets pointer to resulting struct resource # callers updated, a bunch of check_region() calls eliminated # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/sscape.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +15 -10 # mpu401 check_region() removal # # sound/oss/sb_common.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +9 -4 # mpu401 check_region() removal # # sound/oss/pss.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +6 -3 # mpu401 check_region() removal # # sound/oss/opl3sa2.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +14 -17 # mpu401 check_region() removal # # sound/oss/mpu401.h # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +1 -1 # mpu401 check_region() removal # # sound/oss/mpu401.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +10 -16 # mpu401 check_region() removal # # sound/oss/maui.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +6 -3 # mpu401 check_region() removal # # sound/oss/cmpci.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +8 -2 # mpu401 check_region() removal # # ChangeSet # 2004/08/27 19:12:44-07:00 viro@www.linux.org.uk # [PATCH] cmpci cleanup # # cmpci probing partially cleaned up in preparation to mpu401 fixes # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/cmpci.c # 2004/08/27 13:05:04-07:00 viro@www.linux.org.uk +37 -40 # cmpci cleanup # # ChangeSet # 2004/08/27 19:12:31-07:00 viro@www.linux.org.uk # [PATCH] maui cleanup, fixes and check_region() removal # # probing cleaned up # leaks on failure exits fixed # ports handling mostly cleaned up (will be completed later, when we do mpu401) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/maui.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +25 -28 # maui cleanup, fixes and check_region() removal # # ChangeSet # 2004/08/27 19:12:19-07:00 viro@www.linux.org.uk # [PATCH] ad1848 check_region() removal # # * ports for ad1848 are now claimed by callers # * ad1848_detect() gets pointer to struct resource in question # * ad1848_init() gets the same pointer and consumes it # * ports for mss are now claimed by callers (both config and ad1848 ones) # * probe_ms_sound() gets pointer to ad1848 ports # * attach_ms_sound() gets the same pointer and consumes both regions. # * callers updated. That had killed a *lot* of check_region() and closed # corresponding races. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/trix.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +7 -4 # ad1848 check_region() removal # # sound/oss/sscape.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +12 -2 # ad1848 check_region() removal # # sound/oss/sgalaxy.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +18 -6 # ad1848 check_region() removal # # sound/oss/pss.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +12 -4 # ad1848 check_region() removal # # sound/oss/opl3sa2.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +19 -11 # ad1848 check_region() removal # # sound/oss/opl3sa.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +22 -13 # ad1848 check_region() removal # # sound/oss/mad16.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +8 -4 # ad1848 check_region() removal # # sound/oss/gus_wave.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +11 -3 # ad1848 check_region() removal # # sound/oss/gus_card.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +14 -10 # ad1848 check_region() removal # # sound/oss/cs4232.h # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +0 -2 # ad1848 check_region() removal # # sound/oss/cs4232.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +20 -26 # ad1848 check_region() removal # # sound/oss/ad1848.h # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +4 -4 # ad1848 check_region() removal # # sound/oss/ad1848.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +30 -26 # ad1848 check_region() removal # # ChangeSet # 2004/08/27 19:12:07-07:00 viro@www.linux.org.uk # [PATCH] opl3 cleanup and check_region() removal # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/opl3sa.c # 2004/08/27 13:05:03-07:00 viro@www.linux.org.uk +7 -23 # opl3 cleanup and check_region() removal # # ChangeSet # 2004/08/27 19:11:55-07:00 viro@www.linux.org.uk # [PATCH] sgalaxy cleanup and check_region() removal # # probing cleaned up, handling of ports mostly fixed. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/sgalaxy.c # 2004/08/27 13:05:02-07:00 viro@www.linux.org.uk +12 -14 # sgalaxy cleanup and check_region() removal # # ChangeSet # 2004/08/27 19:11:42-07:00 viro@www.linux.org.uk # [PATCH] pss cleanup, fixes and check_region() removal # # probing cleaned up, handling of ports mostly fixed. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/pss.c # 2004/08/27 13:05:00-07:00 viro@www.linux.org.uk +63 -60 # pss cleanup, fixes and check_region() removal # # ChangeSet # 2004/08/27 19:11:31-07:00 viro@www.linux.org.uk # [PATCH] mad16 cleanup, fixes and check_region() removal # # * probing cleaned up # * register ports claimed # * handling of other ports mostly fixed (will be completed later in series) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/mad16.c # 2004/08/27 13:05:00-07:00 viro@www.linux.org.uk +92 -114 # mad16 cleanup, fixes and check_region() removal # # ChangeSet # 2004/08/27 19:11:19-07:00 viro@www.linux.org.uk # [PATCH] trix cleanup and check_region() removal # # probing cleaned up, claiming of ports mostly fixed (will be finished in # ad1848 patch later in series) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/trix.c # 2004/08/27 13:05:00-07:00 viro@www.linux.org.uk +83 -105 # trix cleanup and check_region() removal # # ChangeSet # 2004/08/27 19:11:07-07:00 viro@www.linux.org.uk # [PATCH] sscape cleanup, fixes and check_region() removal # # * general cleanup of probing code # * claim codec ports # * sizeof(char *) had been used instead of intended sizeof(char[4]); it even # worked on x86... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/sscape.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +66 -116 # sscape cleanup, fixes and check_region() removal # # ChangeSet # 2004/08/27 19:10:54-07:00 viro@www.linux.org.uk # [PATCH] soundblaster check_region() removal # # moved request_region() to callers of sb_dsp_...() # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/trix.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +12 -14 # soundblaster check_region() removal # # sound/oss/sb_common.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +3 -8 # soundblaster check_region() removal # # sound/oss/sb_card.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +8 -1 # soundblaster check_region() removal # # sound/oss/mad16.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +5 -1 # soundblaster check_region() removal # # sound/oss/kahlua.c # 2004/08/27 13:04:56-07:00 viro@www.linux.org.uk +4 -0 # soundblaster check_region() removal # # ChangeSet # 2004/08/27 19:10:42-07:00 viro@www.linux.org.uk # [PATCH] casts are not lvalues # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/math-emu/op-common.h # 2004/08/27 13:04:55-07:00 viro@www.linux.org.uk +3 -3 # casts are not lvalues # # drivers/scsi/arm/eesox.c # 2004/08/27 13:04:55-07:00 viro@www.linux.org.uk +20 -10 # casts are not lvalues # # drivers/net/smc91x.h # 2004/08/27 13:04:55-07:00 viro@www.linux.org.uk +5 -4 # casts are not lvalues # # ChangeSet # 2004/08/27 18:55:48-07:00 davem@nuts.davemloft.net # [CREDITS]: Update my entry. # # CREDITS # 2004/08/27 18:55:19-07:00 davem@nuts.davemloft.net +3 -4 # [CREDITS]: Update my entry. # # ChangeSet # 2004/08/27 18:48:38-07:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # arch/sparc64/defconfig # 2004/08/27 18:48:17-07:00 davem@nuts.davemloft.net +4 -2 # [SPARC64]: Update defconfig. # # ChangeSet # 2004/08/27 18:33:58-07:00 davem@nuts.davemloft.net # [AMD7930]: Fix kcalloc() args. # # sound/sparc/amd7930.c # 2004/08/27 18:33:37-07:00 davem@nuts.davemloft.net +1 -1 # [AMD7930]: Fix kcalloc() args. # # ChangeSet # 2004/08/27 17:13:59-07:00 kaber@trash.net # [NETLINK]: Remove duplicate declarations # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # include/linux/netlink.h # 2004/08/27 17:13:43-07:00 kaber@trash.net +0 -7 # [NETLINK]: Remove duplicate declarations # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/27 17:11:21-07:00 pablo@eurodev.net # [NETLINK]: Improve behavior. # # Move sk->sk_data_ready() callback to a workqueue # when possible. Makes app less likely to stall in # sendmsg(). # # Signed-off-by: Pablo Neira # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2004/08/27 17:11:04-07:00 pablo@eurodev.net +73 -4 # [NETLINK]: Improve behavior. # # Move sk->sk_data_ready() callback to a workqueue # when possible. Makes app less likely to stall in # sendmsg(). # # Signed-off-by: Pablo Neira # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/28 10:05:33+10:00 airlied@starflyer.(none) # Add some missing NULL->0 and __user annotiations # # Signed-off-by: Dave Airlie # # drivers/char/drm/sis_mm.c # 2004/08/28 10:05:27+10:00 airlied@starflyer.(none) +4 -3 # Add some missing NULL->0 and __user annotiations # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_mem.c # 2004/08/28 10:05:27+10:00 airlied@starflyer.(none) +9 -9 # Add some missing NULL->0 and __user annotiations # # Signed-off-by: Dave Airlie # # drivers/char/drm/i915_dma.c # 2004/08/28 10:05:27+10:00 airlied@starflyer.(none) +1 -1 # Add some missing NULL->0 and __user annotiations # # Signed-off-by: Dave Airlie # # drivers/char/drm/drm_bufs.h # 2004/08/27 17:02:28-07:00 airlied@linux.ie +1 -0 # drm: missing bus_address assignment # # ChangeSet # 2004/08/27 16:43:45-07:00 yoshfuji@linux-ipv6.org # [NETFILTER]: Remove unused file. # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller ' # # BitKeeper/deleted/.del-ip6t_REJECT.h~33c802afafde57cf # 2004/08/27 16:41:41-07:00 davem@nuts.davemloft.net +0 -0 # Delete: include/linux/netfilter_ipv6/ip6t_REJECT.h # # ChangeSet # 2004/08/27 16:38:24-07:00 shemminger@osdl.org # [PKT_SCHED]: Update for netem scheduler. # # This is a third revision of the netem extensions which provides # * packet duplication # * correlated random number # * loading distribution table # # The API is backwards compatible and now uses nested elements to allow # for easier future changes. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/sched/sch_netem.c # 2004/08/27 16:38:07-07:00 shemminger@osdl.org +217 -591 # [PKT_SCHED]: Update for netem scheduler. # # This is a third revision of the netem extensions which provides # * packet duplication # * correlated random number # * loading distribution table # # The API is backwards compatible and now uses nested elements to allow # for easier future changes. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/pkt_sched.h # 2004/08/27 16:38:07-07:00 shemminger@osdl.org +25 -0 # [PKT_SCHED]: Update for netem scheduler. # # This is a third revision of the netem extensions which provides # * packet duplication # * correlated random number # * loading distribution table # # The API is backwards compatible and now uses nested elements to allow # for easier future changes. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/27 16:35:06-07:00 haveblue@us.ibm.com # [AF_PACKET]: Use void * for virtual addresses. # # I've been auditing code, cleaning up warning where code passes # unsigned long's to functions and macros that really take pointers. # # Here's some explanation as to why I think these types were coded up # this way originally: # http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2 # # The attached patch make packet_opt->pg_vec a pointer to an array of # char*'s instead of a pointer to an array of unsigned # # net/packet/af_packet.c # 2004/08/27 16:34:47-07:00 haveblue@us.ibm.com +19 -13 # [AF_PACKET]: Use void * for virtual addresses. # # I've been auditing code, cleaning up warning where code passes # unsigned long's to functions and macros that really take pointers. # # Here's some explanation as to why I think these types were coded up # this way originally: # http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2 # # The attached patch make packet_opt->pg_vec a pointer to an array of # char*'s instead of a pointer to an array of unsigned # # ChangeSet # 2004/08/27 16:19:23-07:00 davem@nuts.davemloft.net # [MAINTAINERS]: Update my email contact info. # # MAINTAINERS # 2004/08/27 16:19:01-07:00 davem@nuts.davemloft.net +3 -3 # [MAINTAINERS]: Update my email contact info. # # ChangeSet # 2004/08/27 16:12:23-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix delay with HZ==1000. # # When I moved sparc64 over to HZ==1000 this added some # problems to the udelay() handling. Specifically, with # slower cpus we could now get underflows to zero for # things like udelay(1) due to the order of multiplies # and shifts. # # Fix this, and move it out to arch/sparc64/lib/delay.c # so it is easier to tinker with this in the future and # also to optimize away one of the multiplies for the # constant delay case just like other platforms do. # # Signed-off-by: David S. Miller # # include/asm-sparc64/delay.h # 2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +21 -46 # [SPARC64]: Fix delay with HZ==1000. # # arch/sparc64/lib/Makefile # 2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Fix delay with HZ==1000. # # arch/sparc64/kernel/sparc64_ksyms.c # 2004/08/27 16:10:13-07:00 davem@nuts.davemloft.net +6 -0 # [SPARC64]: Fix delay with HZ==1000. # # arch/sparc64/lib/delay.c # 2004/08/27 16:10:01-07:00 davem@nuts.davemloft.net +49 -0 # [SPARC64]: Fix delay with HZ==1000. # # arch/sparc64/lib/delay.c # 2004/08/27 16:10:01-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/sparc-2.6/arch/sparc64/lib/delay.c # # ChangeSet # 2004/08/27 15:58:01-07:00 apm@brigitte.dna.fi # [NETFILTER]: Consistent IP address access in arp_tables.c # # Use memcpy just like net/ipv4/arp.c does since # these u32 values can be arbitrarily aligned and # this is not exactly a hot code path. # # Signed-off-by: Antti P Miettinen # Signed-off-by: David S. Miller # # net/ipv4/netfilter/arp_tables.c # 2004/08/27 15:57:44-07:00 apm@brigitte.dna.fi +7 -7 # [NETFILTER]: Consistent IP address access in arp_tables.c # # Use memcpy just like net/ipv4/arp.c does since # these u32 values can be arbitrarily aligned and # this is not exactly a hot code path. # # Signed-off-by: Antti P Miettinen # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/27 14:55:01-07:00 armin@melware.de # [PATCH] 2.6 ISDN CAPI: low-level drivers skb free fix # # CAPI skb freeing fix. On sending, the hardware/low-level # driver may free a skb on no error only. The application/core # side must take care otherwise. # # Author: Carsten Paeth, Armin Schindler # # drivers/isdn/hardware/eicon/capifunc.c # 2004/08/27 12:57:40-07:00 armin@melware.de +3 -2 # 2.6 ISDN CAPI: low-level drivers skb free fix # # drivers/isdn/hardware/avm/t1isa.c # 2004/08/27 12:51:03-07:00 armin@melware.de +3 -4 # 2.6 ISDN CAPI: low-level drivers skb free fix # # drivers/isdn/hardware/avm/c4.c # 2004/08/27 12:51:03-07:00 armin@melware.de +0 -2 # 2.6 ISDN CAPI: low-level drivers skb free fix # # drivers/isdn/hardware/avm/b1dma.c # 2004/08/27 12:51:03-07:00 armin@melware.de +0 -2 # 2.6 ISDN CAPI: low-level drivers skb free fix # # drivers/isdn/hardware/avm/b1.c # 2004/08/27 12:51:03-07:00 armin@melware.de +3 -5 # 2.6 ISDN CAPI: low-level drivers skb free fix # # drivers/isdn/capi/capidrv.c # 2004/08/27 12:27:24-07:00 armin@melware.de +2 -1 # 2.6 ISDN CAPI: low-level drivers skb free fix # # ChangeSet # 2004/08/27 14:37:00-07:00 wli@holomorphy.com # [PATCH] fix PA-RISC fork_idle() sweep # # Whether a brainfart or a mismerge, I inadvertently broke PA-RISC during # the fork_by_hand()/init_idle() consolidation. # # The following patch repairs a compilebug/thinko pair, consisting of the # use of an undeclared variable cpunum, and not attempting fork_idle() # until after the check for IS_ERR(idle) reported by James Bottomley. # # Signed-off-by: William Irwin # Signed-off-by: Linus Torvalds # # arch/parisc/kernel/smp.c # 2004/08/27 14:30:55-07:00 wli@holomorphy.com +1 -1 # fix PA-RISC fork_idle() sweep # # ChangeSet # 2004/08/27 13:45:44-07:00 davem@nuts.davemloft.net # [UACCESS]: Fix typo in generic __get_user_unaligned(). # # Signed-off-by: David S. Miller # # include/asm-generic/uaccess.h # 2004/08/27 13:45:13-07:00 davem@nuts.davemloft.net +1 -1 # [UACCESS]: Fix typo in generic __get_user_unaligned(). # # ChangeSet # 2004/08/27 13:24:18-07:00 torvalds@ppc970.osdl.org # Merge http://linux-sound.bkbits.net/linux-sound # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # mm/slab.c # 2004/08/27 13:24:14-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # include/linux/pci_ids.h # 2004/08/27 13:24:14-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/27 19:04:09+00:00 eranian@hpl.hp.com # [IA64] perfmon.c: file descriptor fixes # # - fix pfm_free_fd() to clear current->files->fd[fd] in # case of error during PFM_CONTEXT_CREATE, i.e., undo # the effect of fd_install(). This could cause kernel # panic if the file descriptor gets used by error through # perfmon. # - fix pfm_context_create() to correctly propagate the # return value of pfm_alloc_fd(). # # signed-off-by: stephane eranian # Signed-off-by: Tony Luck # # arch/ia64/kernel/perfmon.c # 2004/08/27 19:00:54+00:00 aegl@agluck-lia64.sc.intel.com +13 -2 # - fix pfm_free_fd() to clear current->files->fd[fd] in # case of error during PFM_CONTEXT_CREATE, i.e., undo # the effect of fd_install(). This could cause kernel # panic if the file descriptor gets used by error through # perfmon. # - fix pfm_context_create() to correctly propagate the # return value of pfm_alloc_fd(). # # ChangeSet # 2004/08/27 11:27:02-07:00 airlied@linux.ie # [PATCH] drm: optimise i8x0 accesses.. # # This optimises the drm code to not do put_user() on memory the kernel # allocated and then mmap-installed to userspace, but instead makes it use # the kernel virtual address directly instead. # # From: Arjan van de Ven # Signed-off-by: Dave Airlie # Signed-off-by: Linus Torvalds # # drivers/char/drm/i830_dma.c # 2004/08/27 11:26:17-07:00 airlied@linux.ie +6 -6 # drm: optimise i8x0 accesses.. # # drivers/char/drm/i810_dma.c # 2004/08/27 11:26:15-07:00 airlied@linux.ie +2 -5 # drm: optimise i8x0 accesses.. # # ChangeSet # 2004/08/27 11:24:08-07:00 airlied@linux.ie # [PATCH] drm: missing bus_address assignment # # Patch from Tom Arbuckle for missing bus_address # # Signed-off-by: Dave Airlie # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/27 10:49:37-07:00 schwidefsky@de.ibm.com # [PATCH] s390: force_sigsegv name clash. # # The recent signal fix broke s390 because of a name clash. # Rename the s390 arch function to do_sigsegv. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Linus Torvalds # # arch/s390/mm/fault.c # 2004/08/27 06:24:18-07:00 schwidefsky@de.ibm.com +3 -3 # s390: force_sigsegv name clash. # # ChangeSet # 2004/08/27 10:45:56-07:00 bunk@fs.tum.de # [PATCH] really uninline lmc_trace # # As part of some gcc 3.4 fixes, someone removed the inline from the # prototype of lmc_trace in lmc_debug.c, but the useless inline at the actual # function remained. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/wan/lmc/lmc_debug.c # 2004/08/27 00:02:39-07:00 bunk@fs.tum.de +1 -1 # really uninline lmc_trace # # ChangeSet # 2004/08/27 10:45:44-07:00 rusty@rustcorp.com.au # [PATCH] Use Name cramfs in Kconfig Message # # A senior kernel hacker couldn't find the cramfs option. No wonder, the # message doesn't mention cramfs at all. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/Kconfig # 2004/08/27 00:02:39-07:00 rusty@rustcorp.com.au +1 -1 # Use Name cramfs in Kconfig Message # # ChangeSet # 2004/08/27 10:45:32-07:00 akpm@osdl.org # [PATCH] copy_to_user checking in select.c # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/poll.h # 2004/08/27 00:02:39-07:00 akpm@osdl.org +5 -3 # copy_to_user checking in select.c # # fs/select.c # 2004/08/27 00:02:39-07:00 akpm@osdl.org +4 -3 # copy_to_user checking in select.c # # ChangeSet # 2004/08/27 10:45:21-07:00 akpm@osdl.org # [PATCH] must_check copy_to_user() # # Add __must_check tags to the x86 copy_*_user() functions. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/uaccess.h # 2004/08/27 00:02:39-07:00 akpm@osdl.org +16 -11 # must_check copy_to_user() # # ChangeSet # 2004/08/27 10:45:07-07:00 akpm@osdl.org # [PATCH] Fix x86_64 vs select.c namespace clash # # fs/select.c:122:1: warning: "__IN" redefined # In file included from include/linux/timex.h:61, # from include/linux/sched.h:11, # from include/linux/module.h:10, # from fs/select.c:17: # include/asm/io.h:70:1: warning: this is the location of the previous definition # fs/select.c:123:1: warning: "__OUT" redefined # include/asm/io.h:60:1: warning: this is the location of the previous definition # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/select.c # 2004/08/27 00:26:23-07:00 akpm@osdl.org +4 -8 # Fix x86_64 vs select.c namespace clash # # ChangeSet # 2004/08/27 10:44:56-07:00 bjorn.helgaas@hp.com # [PATCH] Fix hp100.c for pci_enable_device() changes # # Don't look at pci_resource_start() before pci_enable_device(). # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/hp100.c # 2004/08/27 00:02:39-07:00 bjorn.helgaas@hp.com +9 -8 # Fix hp100.c for pci_enable_device() changes # # ChangeSet # 2004/08/27 10:44:42-07:00 bjorn.helgaas@hp.com # [PATCH] revert ioc3-eth.c pci_enable_device() changes # # Revert addition of pci_enable_device(). It wasn't appropriate to this # device, apparently. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/ioc3-eth.c # 2004/08/27 00:02:38-07:00 bjorn.helgaas@hp.com +2 -10 # revert ioc3-eth.c pci_enable_device() changes # # ChangeSet # 2004/08/27 10:44:30-07:00 rsa@us.ibm.com # [PATCH] HVCS hotplug fixes # # Here is an HVCS (drivers/char/hvcs.c) patch which fixes the hvcs driver # problems with hotplugged vty-server adapters. The current driver handles # the adapter index assignment improperly so after a number of device # removals and insertions the driver could no longer map a tty->index to a # vty-server properly and tty_open() attempts would fail. This patch solves # this problem by always assigning the lowest available index to the new # adapters and returning an index to the list when the adapter is removed. # # changelog: # drivers/char/hvcs.c # =================== # -Added hvcs_index_list to manage the lowest available index. # # -Added four helper functions to manage the list, which include the # creation and destruction of the list, the get'ing of the lowest index, # and the returning of an index. # # -Moved free_irq() outside of the hvcs_final_close() function in order to # get it out of the spinlock. # # -Rearranged hvcs_close() to accomodate the previous change. # # -Removed local CLC_LENGTH define and used HVCS_CLC_LENGTH from # arch/ppc64/hvcserver.h instead. # # -Cleaned up some printks and did some house keeping on the changelog. # # Documentation/powerpc/hvcs.txt # ============================== # -Added information on sysfs 'index' attribute added in previous hvcs # patch. # # -Added Q & A section on how to find the proper dev node for a newly # added adapter. # # I think this is the last of the HVCS patches for a while, as all of my # oustanding issues have been dealt with. # # Signed-off-by: Ryan S. Arnold # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/hvcs.c # 2004/08/27 00:02:38-07:00 rsa@us.ibm.com +150 -66 # HVCS hotplug fixes # # Documentation/powerpc/hvcs.txt # 2004/08/27 00:02:38-07:00 rsa@us.ibm.com +36 -3 # HVCS hotplug fixes # # ChangeSet # 2004/08/27 10:44:17-07:00 yanmin.zhang@intel.com # [PATCH] interrupt is enabled before it should be when kernel is booted # # There is a minor problem in function start_kernel. start_kernel will # enable interrupt after calling profile_init. However, before that, # function time_init on IA64 platform could enable interrupt. See this call # sequence: # # start_kernel # ->time_init # ->ia64_init_itm # ->register_time_interpolator # ->write_seqlock_irq. # # Signed-off-by: Zhang Yanmin # Signed-off-by: Yao Jun # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/timer.c # 2004/08/27 00:02:38-07:00 yanmin.zhang@intel.com +7 -4 # interrupt is enabled before it should be when kernel is booted # # ChangeSet # 2004/08/27 10:44:05-07:00 tcallawa@redhat.com # [PATCH] Fix typo in bw2.c # # Patch to fix typo in bw2.c, added in 2.6.9-rc1. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/bw2.c # 2004/08/27 00:02:38-07:00 tcallawa@redhat.com +1 -1 # Fix typo in bw2.c # # ChangeSet # 2004/08/27 10:43:52-07:00 tcallawa@redhat.com # [PATCH] Keep sparc32 config consistent # # This patch changes the name of the sparc32 Kconfig menu from "General # Setup" to "General Machine Setup", to match the changes committed to most # other arches in 2.6.9-rc1. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sparc/Kconfig # 2004/08/27 00:02:38-07:00 tcallawa@redhat.com +1 -1 # Keep sparc32 config consistent # # ChangeSet # 2004/08/27 10:43:38-07:00 hch@lst.de # [PATCH] ftape support for x86_64 # # We have this patch that adds ftape support for x86_64 and cleans up the # alpha support a little. The comments look like Vojtech did the x86_64 part # and I guess the alpha bits are from Herbert Xu. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ftape/lowlevel/ftape-calibr.c # 2004/08/27 00:02:38-07:00 hch@lst.de +30 -41 # ftape support for x86_64 # # ChangeSet # 2004/08/27 10:43:26-07:00 wli@holomorphy.com # [PATCH] WAITQUEUE_DEBUG cleanup # # While trying out compiling of reiser4 on sparc64, ppc64, alpha, and ia64, I # discovered that WAITQUEUE_DEBUG is nowhere defined in 2.6.x, and various # compiler versions spew copious warnings at #if on it. Convert # __SEMAPHORE_INITIALIZER() to C99 initializers while in the area. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -29 # WAITQUEUE_DEBUG cleanup # # include/asm-sparc/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -30 # WAITQUEUE_DEBUG cleanup # # include/asm-sh64/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -29 # WAITQUEUE_DEBUG cleanup # # include/asm-sh/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -29 # WAITQUEUE_DEBUG cleanup # # include/asm-ppc64/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +5 -31 # WAITQUEUE_DEBUG cleanup # # include/asm-ppc/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +5 -31 # WAITQUEUE_DEBUG cleanup # # include/asm-parisc/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -25 # WAITQUEUE_DEBUG cleanup # # include/asm-mips/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +5 -31 # WAITQUEUE_DEBUG cleanup # # include/asm-m68knommu/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -27 # WAITQUEUE_DEBUG cleanup # # include/asm-m68k/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -27 # WAITQUEUE_DEBUG cleanup # # include/asm-ia64/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +5 -25 # WAITQUEUE_DEBUG cleanup # # include/asm-i386/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +7 -29 # WAITQUEUE_DEBUG cleanup # # include/asm-h8300/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -27 # WAITQUEUE_DEBUG cleanup # # include/asm-cris/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -27 # WAITQUEUE_DEBUG cleanup # # include/asm-arm26/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -31 # WAITQUEUE_DEBUG cleanup # # include/asm-arm/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +2 -28 # WAITQUEUE_DEBUG cleanup # # include/asm-alpha/semaphore.h # 2004/08/27 00:02:38-07:00 wli@holomorphy.com +6 -17 # WAITQUEUE_DEBUG cleanup # # ChangeSet # 2004/08/27 10:43:14-07:00 arun.sharma@intel.com # [PATCH] Fix copying of unaligned data across user/kernel boundary # # 32 bit compatibility code sometimes needs to copy unaligned data across # kernel/user boundary and currently there is no architecture independent API # to do it. # # (1) Introduce new APIs __{get,put}_user_unaligned. These APIs are # necessary because the optimal way to copy unaligned data across # kernel/user boundary is different on different architectures. # Some architectures don't even care about alignment. # On some __put_user is faster than __copy_to_user for small sizes. # (2) Optimize __{get,put}_user_unaligned for ia64, x86-64, s390, ppc64. # (3) Fix compat_filldir64() which is broken on big-endian machines # # Thanks to Arnd Bergmann for his help. # # Signed-off-by: Gordon Jin # Signed-off-by: Arun Sharma # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-generic/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +26 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-x86_64/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +3 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-sparc64/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +1 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-s390/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +3 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-ppc64/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +3 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-mips/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +1 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-ia64/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +36 -0 # Fix copying of unaligned data across user/kernel boundary # # include/asm-generic/uaccess.h # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-generic/uaccess.h # # fs/compat.c # 2004/08/27 00:02:37-07:00 arun.sharma@intel.com +4 -10 # Fix copying of unaligned data across user/kernel boundary # # ChangeSet # 2004/08/27 10:43:02-07:00 bjorn.helgaas@hp.com # [PATCH] dvb pci_enable_device() fix # # Call pci_enable_device() before looking at pci_dev. Also, call # pci_disable_device() when releasing the device. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/bt8xx/bt878.c # 2004/08/27 00:02:37-07:00 bjorn.helgaas@hp.com +7 -3 # dvb pci_enable_device() fix # # ChangeSet # 2004/08/27 10:42:51-07:00 tim@physik3.uni-rostock.de # [PATCH] make oom killer points unsigned long # # It seems a little unsafe to me to have oom killer badness points of type # int, when all the underlying objects are unsigned long. # # I can't immediately think of a case where this matters much, but e.g. a # long-running job or daemon on a 64 bit machine might lose it's bonus # because of that. # # Signed-off-by: Tim Schmielau # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/oom_kill.c # 2004/08/27 00:02:36-07:00 tim@physik3.uni-rostock.de +4 -4 # make oom killer points unsigned long # # ChangeSet # 2004/08/27 10:42:39-07:00 Valdis.Kletnieks@vt.edu # [PATCH] #ifdef cleanups in drivers/net # # Here's the last of them for 2.6.9-rc1 - two more #if/#ifdef cleanups. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/via-velocity.h # 2004/08/27 00:02:37-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanups in drivers/net # # drivers/net/amd8111e.c # 2004/08/27 00:02:37-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanups in drivers/net # # ChangeSet # 2004/08/27 10:42:27-07:00 Valdis.Kletnieks@vt.edu # [PATCH] #ifdef cleanup for PPC # # Another few #if/#ifdef cleanups, this time for the PPC architecture. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc85xx_setup.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +2 -2 # #ifdef cleanup for PPC # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanup for PPC # # arch/ppc/kernel/process.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanup for PPC # # ChangeSet # 2004/08/27 10:42:14-07:00 Valdis.Kletnieks@vt.edu # [PATCH] #ifdef cleanup for cris port # # Another small #if/#ifdef cleanup, to make things safer for compiling with # -Wundef # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/cris/arch-v10/kernel/debugport.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanup for cris port # # ChangeSet # 2004/08/27 10:42:02-07:00 Valdis.Kletnieks@vt.edu # [PATCH] #ifdef cleanup for sh64 # # Another small cleanup patch for #if/#ifdef usage. # # Signed-off-by: # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sh64/kernel/process.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef cleanup for sh64 # # ChangeSet # 2004/08/27 10:41:50-07:00 Valdis.Kletnieks@vt.edu # [PATCH] #ifdef fixes for drivers/isdn/hifax/* # # This patch changes a bunch of '#if CONFIG_PCI' to '#ifdef' instead, # to make the kernel source cleaner for compiling with 'gcc -Wundef'. # # Signed-off-by: Karsten keil # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/w6692.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/telespci.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/sedlbauer.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/nj_u.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +2 -2 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/nj_s.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/niccy.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/hfc_pci.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +2 -2 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/gazel.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/enternow_pci.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/elsa.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/diva.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +1 -1 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/bkm_a8.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +2 -2 # #ifdef fixes for drivers/isdn/hifax/* # # drivers/isdn/hisax/bkm_a4t.c # 2004/08/27 00:02:36-07:00 Valdis.Kletnieks@vt.edu +2 -2 # #ifdef fixes for drivers/isdn/hifax/* # # ChangeSet # 2004/08/27 10:41:38-07:00 thoss@de.ibm.com # [PATCH] s390: qeth network driver # # qeth network driver change: # - Make qeth devices which are present but not up addressable by # snmp ioctls. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/qeth_main.c # 2004/08/27 00:02:36-07:00 thoss@de.ibm.com +5 -4 # s390: qeth network driver # # ChangeSet # 2004/08/27 10:41:26-07:00 peter.oberparleiter@de.ibm.com # [PATCH] s390: sclp driver changes # # sclp driver changes: # - Add reboot notifier to reset the sclp send/receive masks on shutdown. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/char/sclp.c # 2004/08/27 00:02:36-07:00 peter.oberparleiter@de.ibm.com +36 -7 # s390: sclp driver changes # # ChangeSet # 2004/08/27 10:41:10-07:00 thoss@de.ibm.com # [PATCH] s390: common i/o layer # # common i/o layer change: # - Correct check in qdio_stop_polling to avoid loosing initiative on the # qdio inbound queue. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/cio/qdio.c # 2004/08/27 00:02:35-07:00 thoss@de.ibm.com +2 -2 # s390: common i/o layer # # ChangeSet # 2004/08/27 10:37:58-07:00 pavlic@de.ibm.com # [PATCH] s390: lcs network driver # # lcs network driver changes: # - Allocate the reply structure instead of taking it from the stack. # - Use del_timer_sync instead of del_timer. # - Clean up helper threads creation/shutdown. # - Split lcs_register_mc_addresses to make it readable again. # - Free multicast list entries when device is going down. # - Retransmit multicast list in device recovery. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/s390/net/lcs.h # 2004/08/27 00:02:35-07:00 pavlic@de.ibm.com +15 -2 # s390: lcs network driver # # drivers/s390/net/lcs.c # 2004/08/27 00:02:35-07:00 pavlic@de.ibm.com +321 -85 # s390: lcs network driver # # ChangeSet # 2004/08/27 10:37:46-07:00 thor@math.TU-Berlin.DE # [PATCH] parport: NetMOS 9805 interface # # Add support for netmos devices to the parallel port driver. # # NetMOS 9805 support is already in the kernel, this patch adds the support for # the missing 9735,9855,9755 and 9715 chips. # # And another remark: The 9735 and 9835 seem to be chips with serial *and* # parallel interfaces, so I suppose they are already claimed somewhere in the # serial driver. I don't know whether this causes any problems. I'm sorry that # I can't test, I've only a 9805 here. Any idea how these "dual" chips have to # be handled by the kernel? # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2004/08/27 00:02:35-07:00 thor@math.TU-Berlin.DE +2 -0 # parport: NetMOS 9805 interface # # drivers/parport/parport_pc.c # 2004/08/27 00:02:35-07:00 thor@math.TU-Berlin.DE +16 -0 # parport: NetMOS 9805 interface # # ChangeSet # 2004/08/27 10:37:36-07:00 torben.mathiasen@hp.com # [PATCH] LANANA: devices.txt update # # Patch brings devices.txt up-to-date with LANANA. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/devices.txt # 2004/08/27 00:02:35-07:00 torben.mathiasen@hp.com +57 -29 # LANANA: devices.txt update # # ChangeSet # 2004/08/27 10:37:24-07:00 torben.mathiasen@hp.com # [PATCH] LANANA: maintainer update # # I took over LANANA maintainership from John Cagle. Patch updates # MAINTAINERS accordingly. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/27 00:02:35-07:00 torben.mathiasen@hp.com +2 -1 # LANANA: maintainer update # # ChangeSet # 2004/08/27 10:37:13-07:00 akpm@osdl.org # [PATCH] sane mlock_limit # # As David M-T points out, the default per-user mlock limit should be at least a # single page. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/resource.h # 2004/08/27 00:02:35-07:00 akpm@osdl.org +1 -1 # sane mlock_limit # # ChangeSet # 2004/08/27 10:37:01-07:00 wli@holomorphy.com # [PATCH] Unaccount VM_DONTCOPY vmas properly # # Unaccount VM_DONTCOPY vmas properly; the child inherits the whole of the # parent's virtual accounting from the memcpy() in copy_mm(), but the # VM_DONTCOPY check here is where a decision is made for the child not to # inherit the vmas corresponding to some accounted memory usages. Hence, # unaccount them when skipping over them here. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/27 00:02:35-07:00 wli@holomorphy.com +4 -1 # Unaccount VM_DONTCOPY vmas properly # # ChangeSet # 2004/08/27 10:36:49-07:00 wli@holomorphy.com # [PATCH] /proc/pid/statm accounting fixes # # Account reserved memory properly as per acahalan's speecified semantics. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +2 -0 # /proc/pid/statm accounting fixes # # include/linux/sched.h # 2004/08/27 00:02:35-07:00 wli@holomorphy.com +1 -1 # /proc/pid/statm accounting fixes # # fs/proc/task_mmu.c # 2004/08/27 00:02:35-07:00 wli@holomorphy.com +1 -1 # /proc/pid/statm accounting fixes # # ChangeSet # 2004/08/27 10:36:38-07:00 wli@holomorphy.com # [PATCH] speed up /proc/pid/statm for !CONFIG_PROC_FS # # Remove the accounting overhead when CONFIG_PROC_FS is not defined. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/08/27 00:26:29-07:00 wli@holomorphy.com +2 -0 # speed up /proc/pid/statm for !CONFIG_PROC_FS # # include/linux/mm.h # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +8 -0 # speed up /proc/pid/statm for !CONFIG_PROC_FS # # ChangeSet # 2004/08/27 10:36:27-07:00 wli@holomorphy.com # [PATCH] fix text reporting in O(1) proc_pid_statm() # # Some kind of brainfart happened here, though it's not visible on the # default display from top(1) etc. This patch fixes up the gibberish I # mistakenly put down for text with the proper text size, and subtracts it # from data as per the O(vmas) code beforehand. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/task_mmu.c # 2004/08/27 00:26:29-07:00 wli@holomorphy.com +2 -2 # fix text reporting in O(1) proc_pid_statm() # # ChangeSet # 2004/08/27 10:36:15-07:00 wli@holomorphy.com # [PATCH] O(1) proc_pid_statm() # # Merely removing down_read(&mm->mmap_sem) from task_vsize() is too # half-assed to let stand. The following patch removes the vma iteration # as well as the down_read(&mm->mmap_sem) from both task_mem() and # task_statm() and callers for the CONFIG_MMU=y case in favor of # accounting the various stats reported at the times of vma creation, # destruction, and modification. Unlike the 2.4.x patches of the same # name, this has no per-pte-modification overhead whatsoever. # # This patch quashes end user complaints of top(1) being slow as well as # kernel hacker complaints of per-pte accounting overhead simultaneously. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mremap.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +3 -0 # O(1) proc_pid_statm() # # mm/mprotect.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +2 -0 # O(1) proc_pid_statm() # # mm/mmap.c # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +26 -0 # O(1) proc_pid_statm() # # include/linux/sched.h # 2004/08/27 00:26:29-07:00 wli@holomorphy.com +2 -2 # O(1) proc_pid_statm() # # include/linux/proc_fs.h # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +2 -0 # O(1) proc_pid_statm() # # include/linux/mm.h # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +13 -0 # O(1) proc_pid_statm() # # fs/proc/task_nommu.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +3 -2 # O(1) proc_pid_statm() # # fs/proc/task_mmu.c # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +10 -44 # O(1) proc_pid_statm() # # fs/proc/array.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +0 -5 # O(1) proc_pid_statm() # # fs/exec.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -1 # O(1) proc_pid_statm() # # arch/x86_64/ia32/ia32_binfmt.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -1 # O(1) proc_pid_statm() # # arch/s390/kernel/compat_exec.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -1 # O(1) proc_pid_statm() # # arch/ia64/mm/fault.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -0 # O(1) proc_pid_statm() # # arch/ia64/kernel/perfmon.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -1 # O(1) proc_pid_statm() # # arch/ia64/ia32/binfmt_elf32.c # 2004/08/27 00:02:34-07:00 wli@holomorphy.com +1 -1 # O(1) proc_pid_statm() # # ChangeSet # 2004/08/27 10:36:03-07:00 wli@holomorphy.com # [PATCH] task_vsize() locking cleanup # # task_vsize() doesn't need mm->mmap_sem for the CONFIG_MMU case; the # semaphore doesn't prevent mm->total_vm from going stale or getting # inconsistent with other numbers regardless. Also, KSTK_EIP() and # KSTK_ESP() don't want or need protection from mm->mmap_sem either. So this # pushes mm->mmap_sem to task_vsize() in the CONFIG_MMU=n task_vsize(). # # Also, hoist the prototype of task_vsize() into proc_fs.h # # The net result of this is a small speedup of procps for CONFIG_MMU. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/proc_fs.h # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +3 -0 # task_vsize() locking cleanup # # fs/proc/task_nommu.c # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +2 -1 # task_vsize() locking cleanup # # fs/proc/array.c # 2004/08/27 00:26:30-07:00 wli@holomorphy.com +0 -3 # task_vsize() locking cleanup # # ChangeSet # 2004/08/27 10:35:51-07:00 haveblue@us.ibm.com # [PATCH] include asm/page.h for virt_to_page() # # asm/page.h seems to be the accepted place to declare virt_to_page() on a vast # majority of architectures. This patch makes sure that a few files which use # that function also directly include the header. # # Signed-off-by: Dave Hansen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/packet/af_packet.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -0 # include asm/page.h for virt_to_page() # # mm/slab.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -0 # include asm/page.h for virt_to_page() # # include/asm-ppc64/pgalloc.h # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -0 # include asm/page.h for virt_to_page() # # fs/jbd/journal.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -0 # include asm/page.h for virt_to_page() # # fs/binfmt_elf.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -0 # include asm/page.h for virt_to_page() # # ChangeSet # 2004/08/27 10:35:39-07:00 haveblue@us.ibm.com # [PATCH] don't align virt_to_page() args # # __pa() is always be consistent inside of a single page. The next thing # virt_to_page() does after that is shift down the address, killing the bits # that __change_page_attr() just masked off. # # Remove the superfluous masking. # # Signed-off-by: Dave Hansen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/pageattr.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -1 # don't align virt_to_page() args # # ChangeSet # 2004/08/27 10:35:26-07:00 haveblue@us.ibm.com # [PATCH] vmalloc_fault() cleanup # # Store the physical pgd address in a different variable than the virtual # address. # # There's no real reason to only use 1 variable here, other than saving a # line of code. But, the types really are different and we might as well # just spell that out explicitly. # # Signed-off-by: Dave Hansen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/fault.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +3 -2 # vmalloc_fault() cleanup # # ChangeSet # 2004/08/27 10:35:14-07:00 haveblue@us.ibm.com # [PATCH] call virt_to_page() with void*, not UL # # I'm sure there's a good reason for these functions to take virtual addresses # as unsigned longs, so suppress the warnings and cast them to the proper types # before calling the virt/phys conversion functions # # A perfectly acceptable alternative would be to go and change free_pages() to # stop taking unsigned longs for virtual addresses, but this has a much smaller # impact. # # Signed-off-by: Dave Hansen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +2 -2 # call virt_to_page() with void*, not UL # # ChangeSet # 2004/08/27 10:35:03-07:00 haveblue@us.ibm.com # [PATCH] cast PAGE_OFFSET math to void* in early printk # # __pa() should take a void*. This adds the proper cast. # # Signed-off-by: Dave Hansen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/early_printk.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +1 -1 # cast PAGE_OFFSET math to void* in early printk # # ChangeSet # 2004/08/27 10:34:51-07:00 haveblue@us.ibm.com # [PATCH] reduce casting in sysenter.c # # Ran across this because it's another place where an unsigned long is passed # directly to __pa(). Making the "page" variable a void* seems a bit more # natural than an unsigned long and reduces the net number of casts by 1. # Without it, we probably need another (void *) cast in the __pa() call. # # For more explanation as to why this was probably done originally, see this # post: http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2 # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/sysenter.c # 2004/08/26 23:59:59-07:00 haveblue@us.ibm.com +3 -3 # reduce casting in sysenter.c # # ChangeSet # 2004/08/27 10:34:40-07:00 drzeus-list@drzeus.cx # [PATCH] Split timer resources # # The kernel currently allocates the range 0x40-0x5f for timer calls. This # causes conflicts with other hardware using these ports (In my case a # Winbond W83L519D SD/MMC card reader). This patch splits the resource into # the ports actually needed. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/setup.c # 2004/08/26 23:59:59-07:00 drzeus-list@drzeus.cx +7 -2 # Split timer resources # # ChangeSet # 2004/08/27 10:34:28-07:00 levon@movementarian.org # [PATCH] improve OProfile on many-way systems # # Anton prompted me to get this patch merged. It changes the core buffer # sync algorithm of OProfile to avoid global locks wherever possible. Anton # tested an earlier version of this patch with some success. I've lightly # tested this applied against 2.6.8.1-mm3 on my two-way machine. # # The changes also have the happy side-effect of losing less samples after # munmap operations, and removing the blind spot of tasks exiting inside the # kernel. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/08/27 00:26:30-07:00 levon@movementarian.org +2 -6 # improve OProfile on many-way systems # # kernel/timer.c # 2004/08/27 00:26:24-07:00 levon@movementarian.org +2 -0 # improve OProfile on many-way systems # # kernel/profile.c # 2004/08/26 23:42:56-07:00 levon@movementarian.org +44 -25 # improve OProfile on many-way systems # # kernel/fork.c # 2004/08/27 00:26:29-07:00 levon@movementarian.org +6 -2 # improve OProfile on many-way systems # # kernel/exit.c # 2004/08/26 23:42:56-07:00 levon@movementarian.org +2 -2 # improve OProfile on many-way systems # # include/linux/sched.h # 2004/08/27 00:26:30-07:00 levon@movementarian.org +1 -0 # improve OProfile on many-way systems # # include/linux/profile.h # 2004/08/26 23:42:56-07:00 levon@movementarian.org +25 -12 # improve OProfile on many-way systems # # drivers/oprofile/oprofile_stats.c # 2004/08/26 23:42:56-07:00 levon@movementarian.org +0 -3 # improve OProfile on many-way systems # # drivers/oprofile/cpu_buffer.h # 2004/08/26 23:42:56-07:00 levon@movementarian.org +9 -4 # improve OProfile on many-way systems # # drivers/oprofile/cpu_buffer.c # 2004/08/26 23:42:56-07:00 levon@movementarian.org +92 -26 # improve OProfile on many-way systems # # drivers/oprofile/buffer_sync.h # 2004/08/26 23:42:56-07:00 levon@movementarian.org +3 -0 # improve OProfile on many-way systems # # drivers/oprofile/buffer_sync.c # 2004/08/26 23:42:56-07:00 levon@movementarian.org +131 -115 # improve OProfile on many-way systems # # ChangeSet # 2004/08/27 10:34:16-07:00 akpm@osdl.org # [PATCH] copy_mount_options size fix # # davem says that copy_mount_options is failing in obscure ways if the # architecture's copy_from_user() doesn't return an exact count of the number of # uncopied bytes. # # Fixing that up in each architecture is a pain - it involves falling back to # byte-at-a-time copies. # # It's simple to open-code this in namespace.c. If we find other places in the # kernel which care about this we can promote this to a global function. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/namespace.c # 2004/08/26 23:42:56-07:00 akpm@osdl.org +30 -2 # copy_mount_options size fix # # ChangeSet # 2004/08/27 10:34:04-07:00 roland@redhat.com # [PATCH] fix MT reparenting when thread group leader dies # # When the initial thread in a multi-threaded program dies (the thread group # leader), its child processes are wrongly orphaned, and thereafter when # other threads die their child processes are also orphaned even though live # threads remain in the parent process that can call wait. I have a small # (under 100 lines), POSIX-compliant test program that demonstrates this # using -lpthread (NPTL) if anyone is interested in seeing it. # # The bug is that forget_original_parent moves children to the dead parent's # group leader if it's alive, but if not it orphans them. I've changed it so # it instead reparents children to any other live thread in the dead parent's # group (not even preferring the group leader). Children go to init only if # there are no live threads in the parent's group at all. These are the # correct semantics for fork children of POSIX threads. # # The second part of the change is to do the CLONE_PARENT behavior always for # CLONE_THREAD, i.e. make sure that each new thread's parent link points to # the real parent of the process and never another thread in its own group. # Without this, when the group leader dies leaving a sole live thread in the # group, forget_original_parent will try to reparent that thread to itself # because it's a child of the dying group leader. Rather handling this case # specially to reparent to the group leader's parent instead, it's more # efficient just to make sure that noone ever has a parent link to inside his # own thread group. Now the reparenting work never needs to be done for # threads created in the same group when their creator thread dies. The only # change from losing the who-created-whom information is when you look at # "PPid:" in /proc/PID/task/TID/status. For purposes of all direct system # calls, it was already as if CLONE_THREAD threads had the parent of the # group leader. (POSIX provides no way to keep track of which thread created # which other thread with pthread_create.) # # Signed-off-by: Roland McGrath # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/27 00:26:32-07:00 roland@redhat.com +1 -1 # fix MT reparenting when thread group leader dies # # kernel/exit.c # 2004/08/27 00:26:32-07:00 roland@redhat.com +9 -7 # fix MT reparenting when thread group leader dies # # ChangeSet # 2004/08/27 10:33:53-07:00 rusty@rustcorp.com.au # [PATCH] mostly remove module_parm() # # MODULE_PARM() was marked obsolete. Remove it from everything except # drivers/ and arch/. # # Naturally, such a widespread change may introduce bugs for some of the # non-trivial cases, and where in doubt I used "0" as permissions arg (ie. # won't appear in sysfs). Individual authors should think about whether that # would be useful. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sched/sch_teql.c # 2004/08/26 23:41:48-07:00 rusty@rustcorp.com.au +2 -1 # mostly remove module_parm() # # net/irda/irlan/irlan_common.c # 2004/08/26 23:41:48-07:00 rusty@rustcorp.com.au +3 -2 # mostly remove module_parm() # # fs/ntfs/super.c # 2004/08/26 23:41:48-07:00 rusty@rustcorp.com.au +2 -1 # mostly remove module_parm() # # fs/afs/main.c # 2004/08/26 23:41:48-07:00 rusty@rustcorp.com.au +2 -1 # mostly remove module_parm() # # crypto/tcrypt.c # 2004/08/26 23:41:48-07:00 rusty@rustcorp.com.au +2 -1 # mostly remove module_parm() # # ChangeSet # 2004/08/27 10:33:41-07:00 jeffm@suse.com # [PATCH] dnotify + autofs may create signal/restart syscall loop # # I saw a recent bug report that showed when a process set up a dnotify against # the autofs root and then attempted an access(2) call inside the autofs # namespace on a mount that would fail, it would create a signal/restart loop. # # The cause is that the autofs code checks to see if any signals are pending # after it waits on a response from the autofs daemon. If it finds any, it # assumes that autofs_wait was interrupted, and that it should return # -ERESTARTNOINTR. The problem with this is that a signal_pending(current) # check will return true if *any* signals were received, not just if a signal # that interrupted the wait was received. autofs_wait explicitly blocks all # signals except for SIGKILL, SIGQUIT, and SIGINT before calling # interruptible_sleep_on. # # The effect is that if a dnotify is set against the autofs root, when the # autofs daemon creates the directory, a dnotify event will be sent to the # originating process. Since the code in autofs_root_lookup doesn't check to # see what signals are actually pending, it bails early, telling the caller to # try again. The loop goes on forever until interrupted via one of the actual # interrupting signals. # # The following patch makes both autofs_root_lookup and autofs4_root_lookup # verify that one of its defined "shutdown" signals are pending before bailing # out early. Any other signal should be delivered later, as expected. It # doesn't matter if the signal occured outside of the sleep in autofs_wait. The # calling process will either go away or try again. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/autofs/root.c # 2004/08/26 23:40:25-07:00 jeffm@suse.com +8 -2 # dnotify + autofs may create signal/restart syscall loop # # ChangeSet # 2004/08/27 10:33:30-07:00 hugh@veritas.com # [PATCH] tmpfs atomicity fix # # tmpfs must use __copy_from_user_inatomic now, to avoid might_sleep warning, # when knowingly using __copy_from_user with an atomic kmap. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/shmem.c # 2004/08/26 23:34:13-07:00 hugh@veritas.com +2 -1 # tmpfs atomicity fix # # ChangeSet # 2004/08/27 10:33:18-07:00 mingo@redhat.com # [PATCH] Add a few might_sleep() checks # # Add a whole bunch more might_sleep() checks. We also enable might_sleep() # checking in copy_*_user(). This was non-trivial because of the "copy_*_user() # in atomic regions" trick would generate false positives. Fix that up by # adding a new __copy_*_user_inatomic(), which avoids the might_sleep() check. # # Only i386 is supported in this patch. # # With: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/mmap.c # 2004/08/27 00:26:32-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # mm/mempool.c # 2004/08/26 23:31:37-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # mm/filemap.c # 2004/08/27 00:26:26-07:00 mingo@redhat.com +4 -3 # Add a few might_sleep() checks # # include/linux/writeback.h # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # include/linux/pagemap.h # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # include/linux/buffer_head.h # 2004/08/26 23:31:38-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-x86_64/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-v850/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-um/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-sparc64/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-sparc/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-sh64/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-sh/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +4 -0 # Add a few might_sleep() checks # # include/asm-s390/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-ppc64/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-ppc/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-parisc/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-mips/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-m68knommu/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-m68k/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-ia64/uaccess.h # 2004/08/27 00:26:26-07:00 mingo@redhat.com +2 -1 # Add a few might_sleep() checks # # include/asm-i386/uaccess.h # 2004/08/27 00:26:24-07:00 mingo@redhat.com +15 -2 # Add a few might_sleep() checks # # include/asm-i386/checksum.h # 2004/08/26 23:31:38-07:00 mingo@redhat.com +5 -2 # Add a few might_sleep() checks # # include/asm-h8300/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-cris/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # include/asm-arm26/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-arm/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # include/asm-alpha/uaccess.h # 2004/08/26 23:31:37-07:00 mingo@redhat.com +4 -0 # Add a few might_sleep() checks # # fs/proc/base.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # fs/jbd/revoke.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # fs/inode.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # fs/fs-writeback.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # fs/file_table.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # fs/ext3/inode.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # fs/dcache.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # fs/buffer.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +3 -0 # Add a few might_sleep() checks # # drivers/block/ll_rw_blk.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +1 -0 # Add a few might_sleep() checks # # arch/i386/lib/usercopy.c # 2004/08/26 23:31:38-07:00 mingo@redhat.com +2 -0 # Add a few might_sleep() checks # # ChangeSet # 2004/08/27 10:33:05-07:00 david@gibson.dropbear.id.au # [PATCH] ppc64: clean up unused macro # # After the recent SLB and STAB cleanups, the ppc64 KERNEL_CONTEXT() macro is # no longer used anywhere. This patch removes it. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/mmu.h # 2004/08/26 23:30:32-07:00 david@gibson.dropbear.id.au +0 -10 # ppc64: clean up unused macro # # ChangeSet # 2004/08/27 10:32:53-07:00 galak@somerset.sps.mot.com # [PATCH] ppc32: refactor common Book-E exception handling macros # # Refefactor common Book-E exception handling macros into a single file to # reduce code duplication. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/head_e500.S # 2004/08/26 23:30:32-07:00 galak@somerset.sps.mot.com +1 -235 # ppc32: refactor common Book-E exception handling macros # # arch/ppc/kernel/head_booke.h # 2004/08/26 23:30:32-07:00 galak@somerset.sps.mot.com +240 -0 # ppc32: refactor common Book-E exception handling macros # # arch/ppc/kernel/head_44x.S # 2004/08/26 23:30:32-07:00 galak@somerset.sps.mot.com +1 -236 # ppc32: refactor common Book-E exception handling macros # # arch/ppc/kernel/head_booke.h # 2004/08/26 23:30:32-07:00 galak@somerset.sps.mot.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/kernel/head_booke.h # # ChangeSet # 2004/08/27 10:32:41-07:00 anton@samba.org # [PATCH] reduce size of struct inode on 64bit # # Reduce the size of struct inode on 64bit architectures by reducing padding. # This assumes spinlocks are 32bit or less which is the case on most # architectures. # # This reduces inode structs by 24 bytes on ppc64, and on ext2 increases the # number of inodes in a 4kB slab from 5 to 6. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/fs.h # 2004/08/26 23:30:32-07:00 anton@samba.org +7 -6 # reduce size of struct inode on 64bit # # ChangeSet # 2004/08/27 10:32:29-07:00 akpm@osdl.org # [PATCH] [un]register_ioctl32_conversion() stubs # # The megaraid driver is calling these, but they don't exist if !CONFIG_COMPAT. # Add the necessary stubs, and clean a few things up. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ioctl32.h # 2004/08/26 23:30:32-07:00 akpm@osdl.org +17 -8 # [un]register_ioctl32_conversion() stubs # # fs/compat.c # 2004/08/27 00:26:26-07:00 akpm@osdl.org +2 -2 # [un]register_ioctl32_conversion() stubs # # ChangeSet # 2004/08/27 10:32:18-07:00 wli@holomorphy.com # [PATCH] ppc64: remove iseries profiling # # From: Anton Blanchard # # - Remove iseries specific profiling, there were no complaints when I # suggested removal on the linuxppc64 list a few weeks ago. # # - Also remove another instance of that pesky abs() function. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/paca.h # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +0 -15 # ppc64: remove iseries profiling # # arch/ppc64/kernel/smp.c # 2004/08/26 23:30:32-07:00 wli@holomorphy.com +1 -8 # ppc64: remove iseries profiling # # arch/ppc64/kernel/misc.S # 2004/08/26 23:30:32-07:00 wli@holomorphy.com +0 -6 # ppc64: remove iseries profiling # # arch/ppc64/kernel/iSeries_setup.c # 2004/08/26 23:30:32-07:00 wli@holomorphy.com +1 -51 # ppc64: remove iseries profiling # # arch/ppc64/kernel/head.S # 2004/08/26 23:30:32-07:00 wli@holomorphy.com +0 -25 # ppc64: remove iseries profiling # # arch/ppc64/kernel/asm-offsets.c # 2004/08/26 23:30:32-07:00 wli@holomorphy.com +0 -5 # ppc64: remove iseries profiling # # ChangeSet # 2004/08/27 10:32:06-07:00 wli@holomorphy.com # [PATCH] make prof_buffer atomic_t # # Convert prof_buffer to an array of atomic_t instead of sometimes atomic_t, # sometimes unsigned int. Also, bootmem rounds up internally, so blow away some # crap code there. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/profile.c # 2004/08/27 00:26:32-07:00 wli@holomorphy.com +6 -11 # make prof_buffer atomic_t # # ChangeSet # 2004/08/27 10:31:54-07:00 wli@holomorphy.com # [PATCH] make private profile state static # # Make the various bits of state no longer used anywhere else static to # kernel/profile.c # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/profile.c # 2004/08/27 00:26:35-07:00 wli@holomorphy.com +6 -6 # make private profile state static # # init/main.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +0 -2 # make private profile state static # # include/linux/profile.h # 2004/08/27 00:26:32-07:00 wli@holomorphy.com +0 -10 # make private profile state static # # ChangeSet # 2004/08/27 10:31:44-07:00 wli@holomorphy.com # [PATCH] move profile_operations # # proc_misc.c is a trainwreck. Move the file_operations for /proc/profile into # kernel/profile.c and call the profiling setup via initcall. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/profile.c # 2004/08/27 00:26:36-07:00 wli@holomorphy.com +83 -5 # move profile_operations # # include/linux/profile.h # 2004/08/27 00:26:36-07:00 wli@holomorphy.com +5 -1 # move profile_operations # # fs/proc/proc_misc.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +0 -71 # move profile_operations # # ChangeSet # 2004/08/27 10:31:33-07:00 wli@holomorphy.com # [PATCH] consolidate hit count increments in profile_tick() # # With prof_cpu_mask and profile_pc() in hand, the core is now able to perform # all the profile accounting work on behalf of arches. Consolidate the profile # accounting and convert all arches to call the core function. # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +2 -4 # consolidate hit count increments in profile_tick() # # kernel/profile.c # 2004/08/27 00:26:36-07:00 wli@holomorphy.com +20 -0 # consolidate hit count increments in profile_tick() # # include/linux/profile.h # 2004/08/27 00:26:36-07:00 wli@holomorphy.com +6 -0 # consolidate hit count increments in profile_tick() # # include/asm-x86_64/hw_irq.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +0 -33 # consolidate hit count increments in profile_tick() # # include/asm-i386/mach-visws/do_timer.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -1 # consolidate hit count increments in profile_tick() # # include/asm-i386/mach-default/do_timer.h # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -1 # consolidate hit count increments in profile_tick() # # include/asm-i386/hw_irq.h # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +0 -42 # consolidate hit count increments in profile_tick() # # arch/x86_64/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -1 # consolidate hit count increments in profile_tick() # # arch/x86_64/kernel/apic.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -2 # consolidate hit count increments in profile_tick() # # arch/v850/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -22 # consolidate hit count increments in profile_tick() # # arch/sparc64/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -17 # consolidate hit count increments in profile_tick() # # arch/sparc64/kernel/smp.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -3 # consolidate hit count increments in profile_tick() # # arch/sparc/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -22 # consolidate hit count increments in profile_tick() # # arch/sparc/kernel/sun4m_smp.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -4 # consolidate hit count increments in profile_tick() # # arch/sparc/kernel/sun4d_smp.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -4 # consolidate hit count increments in profile_tick() # # arch/sh64/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -33 # consolidate hit count increments in profile_tick() # # arch/sh/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -29 # consolidate hit count increments in profile_tick() # # arch/s390/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -40 # consolidate hit count increments in profile_tick() # # arch/ppc64/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -40 # consolidate hit count increments in profile_tick() # # arch/ppc/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -36 # consolidate hit count increments in profile_tick() # # arch/parisc/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -36 # consolidate hit count increments in profile_tick() # # arch/mips/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -17 # consolidate hit count increments in profile_tick() # # arch/m68knommu/platform/5307/timers.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -11 # consolidate hit count increments in profile_tick() # # arch/m68knommu/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -21 # consolidate hit count increments in profile_tick() # # arch/m68k/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -21 # consolidate hit count increments in profile_tick() # # arch/ia64/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -44 # consolidate hit count increments in profile_tick() # # arch/i386/mach-voyager/voyager_smp.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -2 # consolidate hit count increments in profile_tick() # # arch/i386/kernel/apic.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -2 # consolidate hit count increments in profile_tick() # # arch/h8300/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -22 # consolidate hit count increments in profile_tick() # # arch/arm26/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -23 # consolidate hit count increments in profile_tick() # # arch/arm/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +1 -26 # consolidate hit count increments in profile_tick() # # arch/alpha/kernel/time.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -2 # consolidate hit count increments in profile_tick() # # arch/alpha/kernel/smp.c # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +2 -2 # consolidate hit count increments in profile_tick() # # arch/alpha/kernel/irq_impl.h # 2004/08/26 23:30:31-07:00 wli@holomorphy.com +0 -27 # consolidate hit count increments in profile_tick() # # ChangeSet # 2004/08/27 10:31:20-07:00 wli@holomorphy.com # [PATCH] introduce profile_pc() # # The program counter calculation from pt_regs is the only portion of profile # accounting that differs across various architectures. This is usually # instruction_pointer(regs), but to handle the few arches where it isn't, # introduce profile_pc(). # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-v850/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-sparc64/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-sparc/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-sh64/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-sh/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +9 -0 # introduce profile_pc() # # include/asm-s390/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-ppc64/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-ppc/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-parisc/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-mips/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-m68knommu/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-m68k/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-ia64/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +9 -0 # introduce profile_pc() # # include/asm-i386/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-h8300/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-cris/arch-v10/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-arm26/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-arm/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # include/asm-alpha/ptrace.h # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # arch/sparc64/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +3 -8 # introduce profile_pc() # # arch/sparc64/kernel/smp.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # arch/sparc/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +21 -15 # introduce profile_pc() # # arch/sparc/kernel/sun4m_smp.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # arch/sparc/kernel/sun4d_smp.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -0 # introduce profile_pc() # # arch/sh/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -4 # introduce profile_pc() # # arch/ia64/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +2 -4 # introduce profile_pc() # # ChangeSet # 2004/08/27 10:31:08-07:00 wli@holomorphy.com # [PATCH] consolidate prof_cpu_mask # # Handling of prof_cpu_mask is grossly inconsistent. Some arches have it as a # cpumask_t, others unsigned long, and even within arches it's treated # inconsistently. This makes it cpumask_t across the board, and consolidates # the handling in kernel/profile.c # # Signed-off-by: William Irwin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/profile.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +45 -0 # consolidate prof_cpu_mask # # include/linux/profile.h # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +5 -0 # consolidate prof_cpu_mask # # include/asm-x86_64/hw_irq.h # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -2 # consolidate prof_cpu_mask # # include/asm-i386/hw_irq.h # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -3 # consolidate prof_cpu_mask # # arch/x86_64/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -38 # consolidate prof_cpu_mask # # arch/um/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -34 # consolidate prof_cpu_mask # # arch/sh/kernel/time.c # 2004/08/27 00:26:38-07:00 wli@holomorphy.com +0 -1 # consolidate prof_cpu_mask # # arch/s390/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +0 -1 # consolidate prof_cpu_mask # # arch/s390/kernel/profile.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -39 # consolidate prof_cpu_mask # # arch/ppc64/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -2 # consolidate prof_cpu_mask # # arch/ppc64/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -50 # consolidate prof_cpu_mask # # arch/ppc/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -2 # consolidate prof_cpu_mask # # arch/ppc/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -36 # consolidate prof_cpu_mask # # arch/parisc/kernel/time.c # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -4 # consolidate prof_cpu_mask # # arch/mips/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -36 # consolidate prof_cpu_mask # # arch/ia64/kernel/time.c # 2004/08/27 00:26:38-07:00 wli@holomorphy.com +0 -1 # consolidate prof_cpu_mask # # arch/ia64/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -37 # consolidate prof_cpu_mask # # arch/i386/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -41 # consolidate prof_cpu_mask # # arch/alpha/kernel/irq_impl.h # 2004/08/27 00:26:37-07:00 wli@holomorphy.com +1 -3 # consolidate prof_cpu_mask # # arch/alpha/kernel/irq.c # 2004/08/26 23:30:30-07:00 wli@holomorphy.com +1 -33 # consolidate prof_cpu_mask # # ChangeSet # 2004/08/27 10:30:55-07:00 arjanv@redhat.com # [PATCH] schedule profileing # # From: William Lee Irwin III # # The patch (from Ingo) below is quite interesting, it allows the use of # readprofile not for statistical tine sampling, but for seeing where calls to # schedule() come from, so it can give some insight to the "where do my context # switches come from" question. # # Boot with `profile=schedul2' to activate this feature. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/27 00:26:37-07:00 arjanv@redhat.com +4 -0 # schedule profileing # # kernel/profile.c # 2004/08/27 00:26:39-07:00 arjanv@redhat.com +9 -1 # schedule profileing # # include/asm-i386/hw_irq.h # 2004/08/27 00:26:39-07:00 arjanv@redhat.com +19 -15 # schedule profileing # # Documentation/kernel-parameters.txt # 2004/08/26 23:30:30-07:00 arjanv@redhat.com +4 -1 # schedule profileing # # ChangeSet # 2004/08/27 10:30:43-07:00 rusty@rustcorp.com.au # [PATCH] Hotplug CPU vs TASK_ZOMBIEs: The Sequel to Hotplug CPU vs TASK_DEAD # # release_task can sleep. Sleeping allows a CPU to go down underneath you. # release_task removes you from the tasklist, so you don't get migrated off the # CPU: BUG() in sched.c. # # In last week's episode, our dashing hero (Ingo Molnar) solved this for # self-reaping tasks by grabbing the hotplug cpu lock to prevent this. # However, in an unexpected twist, the problem remains for tasks whose # parents call release_task on them: the zombies are off the task list, and # lurk on the dead CPU. # # Fortunately, the comedic sidekick (Rusty Russell) has an answer: let's make # the hotplug callback walk the runqueue of the dead CPU as well, taking care # of the zombies. # # 1) Restore exit.c to its former form. The comment is incorrect: sched.c # checks PF_DEAD, not the state, to decide to do the final # put_task_struct(), and it does it for all tasks, self-reaping or no. # # 2) Implement migrate_dead_tasks() in the sched.c hotplug CPU callback. # # 3) Rename migrate_all_tasks() to migrate_live_tasks(). # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/27 00:26:39-07:00 rusty@rustcorp.com.au +45 -3 # Hotplug CPU vs TASK_ZOMBIEs: The Sequel to Hotplug CPU vs TASK_DEAD # # kernel/exit.c # 2004/08/27 00:26:32-07:00 rusty@rustcorp.com.au +5 -24 # Hotplug CPU vs TASK_ZOMBIEs: The Sequel to Hotplug CPU vs TASK_DEAD # # ChangeSet # 2004/08/27 10:30:32-07:00 rusty@rustcorp.com.au # [PATCH] Fix CPU Hotplug: neaten migrate_all_tasks. # # A followup patch wants to do forced migration, so separate that part of the # code out of migrate_all_tasks(). # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/27 00:26:39-07:00 rusty@rustcorp.com.au +35 -33 # Fix CPU Hotplug: neaten migrate_all_tasks. # # ChangeSet # 2004/08/27 10:30:20-07:00 neilb@cse.unsw.edu.au # [PATCH] md: fix problems with checksum handling in MD superblocks. # # md currently uses csum_partial to calculate checksums for superblocks. # However this function is not consistent across all architectures. Some # (i386) to a 32bit csum. Some (alpha) do a 16 bit csum. This makes it hard # for userspace to keep up. # # So we provide a generic routine (that does exactly what the i386 # csum_partial does) and: # # - When setting the csum, use csum_partial so that old kernels will still # recognise the superblock # # - When checking the csum, allow either csum_partial or the new generic # code to provide the right csum. This allows user-space to just use the # common code and always work. # # Also modify the csum for version-1 superblock (which currently aren't being # used) to always user a predictable checksum algorithm. # # Thanks to Mike Tran for noticing this. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/08/26 23:30:29-07:00 neilb@cse.unsw.edu.au +38 -2 # md: fix problems with checksum handling in MD superblocks. # # ChangeSet # 2004/08/27 10:30:08-07:00 jbarnes@engr.sgi.com # [PATCH] fix sysrq support in sn_console.c # # In porting the sn_console driver to the serial core, we lost sysrq support. # This patch fixes it and removes a few unncessary #ifdefs. Can you please # send it on to Linus asap? sysrq is a *really* nice thing to have. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/sn_console.c # 2004/08/26 23:30:29-07:00 jbarnes@engr.sgi.com +34 -15 # fix sysrq support in sn_console.c # # drivers/serial/Kconfig # 2004/08/26 23:30:29-07:00 jbarnes@engr.sgi.com +1 -0 # fix sysrq support in sn_console.c # # ChangeSet # 2004/08/27 10:29:57-07:00 jbarnes@engr.sgi.com # [PATCH] fix show_mem on discontig machines # # Dave Hansen recently did some bootmem and paging init cleanups, but I # missed this little bit when I tested his original patches. We need to # initialize pgdat->node_mem_map correctly since a) we're using vmem_map, and # b) the core won't do it for us since we have a valid node_start_pfn I # believe. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ia64/mm/discontig.c # 2004/08/26 23:30:29-07:00 jbarnes@engr.sgi.com +1 -0 # fix show_mem on discontig machines # # ChangeSet # 2004/08/27 10:29:45-07:00 neilb@cse.unsw.edu.au # [PATCH] Use fixed size buffer instead of kmalloc for m_class in ip_map # # This avoids lots of bothersome memory management and is generally # cleaner. # # Signed-off-by: Neil Brown # Signed-off-by: J. Bruce Fields # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2004/08/26 23:30:29-07:00 neilb@cse.unsw.edu.au +10 -15 # Use fixed size buffer instead of kmalloc for m_class in ip_map # # ChangeSet # 2004/08/28 01:35:09+09:00 kazunori@miyazawa.org # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/udp.c # 2004/08/28 01:35:00+09:00 kazunori@miyazawa.org +10 -1 # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/tcp_ipv6.c # 2004/08/28 01:35:00+09:00 kazunori@miyazawa.org +59 -3 # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/raw.c # 2004/08/28 01:35:00+09:00 kazunori@miyazawa.org +10 -1 # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/ip6_output.c # 2004/08/28 01:35:00+09:00 kazunori@miyazawa.org +0 -4 # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # net/ipv6/datagram.c # 2004/08/28 01:35:00+09:00 kazunori@miyazawa.org +12 -1 # [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() to support source routing appropriately. # # This patch extracts xfrm_lookup() from ip6_dst_lookup() # to support source routing appropriately. # # This is because xfrm_lookup() should be performed with the final # destination while ip6_dst_lookup() is called with the next-hop. # # Signed-off-by: Kazunori Miyazawa # Signed-off-by: Hideaki YOSHIFUJI # # ChangeSet # 2004/08/27 12:02:41-04:00 akpm@osdl.org # [PATCH] ipr.c build fix # # Greg's tree changes the kref API. James's tree adds usage of the old API. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/16 02:40:17-04:00 akpm@osdl.org +32 -32 # ipr.c build fix # # ChangeSet # 2004/08/27 11:36:48-04:00 jejb@mulgrave.(none) # Merge mulgrave.(none):/home/jejb/BK/linux-2.5 # into mulgrave.(none):/home/jejb/BK/scsi-misc-2.6 # # drivers/scsi/sr.c # 2004/08/27 11:36:39-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/sd.c # 2004/08/27 11:36:39-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/message/fusion/mptbase.c # 2004/08/27 11:36:38-04:00 jejb@mulgrave.(none) +0 -1 # Auto merged # # drivers/block/scsi_ioctl.c # 2004/08/27 11:36:38-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # MAINTAINERS # 2004/08/27 11:36:38-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 20:41:32+10:00 airlied@starflyer.(none) # remove __NO_VERSION__ relic from the past... # # ChangeSet # 2004/08/27 19:42:30+10:00 airlied@starflyer.(none) # Add new i915 driver from Tungsten Graphics Inc. This driver covers the i830 # chipsets also, a new X 2D + 3D driver are needed to use this but they have # been integrated into at least the X.org tree at this point and I think the # XFree86 tree. There are probably a few cleanups necessary for this driver. # # From: Keith Whitwell # Signed-off-by: Dave Airlie # # # drivers/char/drm/i915_irq.c # 2004/08/27 20:36:17+10:00 airlied@starflyer.(none) +0 -1 # remove __NO_VERSION__ relic from the past... # # drivers/char/drm/drm_pciids.h # 2004/08/27 19:38:14+10:00 airlied@starflyer.(none) +8 -0 # Add new i915 driver from Tungsten Graphics Inc. This driver covers the i830 # chipsets also, a new X 2D + 3D driver are needed to use this but they have # been integrated into at least the X.org tree at this point and I think the # XFree86 tree. There are probably a few cleanups necessary for this driver. # # From: Keith Whitwell # Signed-off-by: Dave Airlie # # # drivers/char/drm/drm_os_linux.h # 2004/08/27 19:38:14+10:00 airlied@starflyer.(none) +4 -0 # Add new i915 driver from Tungsten Graphics Inc. This driver covers the i830 # chipsets also, a new X 2D + 3D driver are needed to use this but they have # been integrated into at least the X.org tree at this point and I think the # XFree86 tree. There are probably a few cleanups necessary for this driver. # # From: Keith Whitwell # Signed-off-by: Dave Airlie # # # drivers/char/drm/Makefile # 2004/08/27 19:38:14+10:00 airlied@starflyer.(none) +2 -0 # Add new i915 driver from Tungsten Graphics Inc. This driver covers the i830 # chipsets also, a new X 2D + 3D driver are needed to use this but they have # been integrated into at least the X.org tree at this point and I think the # XFree86 tree. There are probably a few cleanups necessary for this driver. # # From: Keith Whitwell # Signed-off-by: Dave Airlie # # # drivers/char/drm/Kconfig # 2004/08/27 19:38:14+10:00 airlied@starflyer.(none) +12 -1 # Add new i915 driver from Tungsten Graphics Inc. This driver covers the i830 # chipsets also, a new X 2D + 3D driver are needed to use this but they have # been integrated into at least the X.org tree at this point and I think the # XFree86 tree. There are probably a few cleanups necessary for this driver. # # From: Keith Whitwell # Signed-off-by: Dave Airlie # # # drivers/char/drm/i915_mem.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +347 -0 # add i915 drm # # drivers/char/drm/i915_irq.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +162 -0 # add i915 drm # # drivers/char/drm/i915_drv.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +214 -0 # add i915 drm # # drivers/char/drm/i915_drv.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +31 -0 # add i915 drm # # drivers/char/drm/i915_drm.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +154 -0 # add i915 drm # # drivers/char/drm/i915.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +88 -0 # add i915 drm # # drivers/char/drm/i915_mem.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_mem.c # # drivers/char/drm/i915_irq.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_irq.c # # drivers/char/drm/i915_drv.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_drv.h # # drivers/char/drm/i915_drv.c # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_drv.c # # drivers/char/drm/i915_drm.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_drm.h # # drivers/char/drm/i915_dma.c # 2004/08/27 19:33:28+10:00 airlied@starflyer.(none) +714 -0 # add i915 drm # # drivers/char/drm/i915.h # 2004/08/27 19:33:29+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915.h # # drivers/char/drm/i915_dma.c # 2004/08/27 19:33:28+10:00 airlied@starflyer.(none) +0 -0 # BitKeeper file /home/airlied/bitkeeper/drm-2.6/drivers/char/drm/i915_dma.c # # ChangeSet # 2004/08/27 17:26:27+10:00 nathans@sgi.com # [XFS] Fix compiler warnings on IA64 builds in ioctl compat code. # # SGI Modid: xfs-linux:xfs-kern:177850a # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_ioctl32.c # 2004/08/27 17:26:03+10:00 nathans@sgi.com +2 -2 # [XFS] Fix compiler warnings on IA64 builds in ioctl compat code. # # ChangeSet # 2004/08/27 17:21:43+10:00 hch@sgi.com # [XFS] Fix O_SYNC flushing in XFS which regressed with concurrent # O_SYNC write improvements recently. # # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_lrw.c # 2004/08/27 17:21:19+10:00 hch@sgi.com +20 -19 # [XFS] Fix O_SYNC flushing in XFS which regressed with concurrent # O_SYNC write improvements recently. # # ChangeSet # 2004/08/27 17:18:20+10:00 hch@sgi.com # [XFS] Rework parts of the write path so that when a direct write # needs to fallback to buffered in the generic code, we are able to # relock the XFS inode correctly. # # Signed-off-by: Nathan Scott # # fs/xfs/linux-2.6/xfs_lrw.c # 2004/08/27 17:17:56+10:00 hch@sgi.com +126 -89 # [XFS] Rework parts of the write path so that when a direct write # needs to fallback to buffered in the generic code, we are able to # relock the XFS inode correctly. # # fs/xfs/linux-2.6/xfs_file.c # 2004/08/27 17:17:56+10:00 hch@sgi.com +4 -18 # [XFS] Rework parts of the write path so that when a direct write # needs to fallback to buffered in the generic code, we are able to # relock the XFS inode correctly. # # ChangeSet # 2004/08/27 16:31:33+10:00 hch@sgi.com # [XFS] Export sync_page_range to fix O_SYNC in XFS. # # Signed-off-by: Nathan Scott # # mm/filemap.c # 2004/08/27 16:31:09+10:00 hch@sgi.com +1 -0 # [XFS] Export sync_page_range to fix O_SYNC in XFS. # # ChangeSet # 2004/08/27 15:58:55+10:00 nathans@sgi.com # [XFS] Ensure maxagi not updated early during growfs, conflicts with # concurrent inode allocations. Fix from ASANO Masahiro. # # SGI Modid: xfs-linux:xfs-kern:177699a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_mount.h # 2004/08/27 15:58:31+10:00 nathans@sgi.com +1 -1 # [XFS] Ensure maxagi not updated early during growfs, conflicts with # concurrent inode allocations. Fix from ASANO Masahiro. # # fs/xfs/xfs_mount.c # 2004/08/27 15:58:31+10:00 nathans@sgi.com +5 -5 # [XFS] Ensure maxagi not updated early during growfs, conflicts with # concurrent inode allocations. Fix from ASANO Masahiro. # # fs/xfs/xfs_fsops.c # 2004/08/27 15:58:31+10:00 nathans@sgi.com +5 -1 # [XFS] Ensure maxagi not updated early during growfs, conflicts with # concurrent inode allocations. Fix from ASANO Masahiro. # # ChangeSet # 2004/08/27 15:55:37+10:00 hch@sgi.com # [XFS] Fix warnings in xfs_bmap.c # # SGI Modid: xfs-linux:xfs-kern:177663a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_bmap.c # 2004/08/27 15:55:13+10:00 hch@sgi.com +12 -11 # [XFS] Fix warnings in xfs_bmap.c # # ChangeSet # 2004/08/27 15:48:54+10:00 nathans@sgi.com # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # SGI Modid: xfs-linux:xfs-kern:177627a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_log_recover.c # 2004/08/27 15:48:29+10:00 nathans@sgi.com +16 -5 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_trans_dquot.c # 2004/08/27 15:48:29+10:00 nathans@sgi.com +30 -11 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_qm_syscalls.c # 2004/08/27 15:48:29+10:00 nathans@sgi.com +24 -12 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_qm.h # 2004/08/27 15:48:29+10:00 nathans@sgi.com +6 -1 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_qm.c # 2004/08/27 15:48:29+10:00 nathans@sgi.com +39 -13 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_dquot.h # 2004/08/27 15:48:29+10:00 nathans@sgi.com +2 -0 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # fs/xfs/quota/xfs_dquot.c # 2004/08/27 15:48:29+10:00 nathans@sgi.com +82 -24 # [XFS] Support for default quota limits via the zero dquot (ala grace times). # # ChangeSet # 2004/08/27 15:45:09+10:00 roehrich@sgi.com # [XFS] Change DMAPI dm_punch_hole to punch holes, rather than just # truncate files. # # SGI Modid: xfs-linux:xfs-kern:177585a # Signed-off-by: Nathan Scott # # fs/xfs/xfs_vnodeops.c # 2004/08/27 15:44:44+10:00 roehrich@sgi.com +31 -26 # [XFS] Change DMAPI dm_punch_hole to punch holes, rather than just # truncate files. # # ChangeSet # 2004/08/26 23:51:23-05:00 stevef@smfhome.smfdom # [CIFS] Update cifs change log # # fs/cifs/CHANGES # 2004/08/26 23:51:14-05:00 stevef@smfhome.smfdom +3 -1 # Update cifs change log # # fs/cifs/AUTHORS # 2004/08/26 23:51:14-05:00 stevef@smfhome.smfdom +4 -1 # update contributors # # ChangeSet # 2004/08/26 23:47:07-05:00 stevef@smfhome.smfdom # [CIFS] Various fixes to bugs pointed out by Stanford checker SWAT tool (mostly missing checks on small kmallocs and some # out of order null pointer checks) # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/misc.c # 2004/08/26 23:46:59-05:00 stevef@smfhome.smfdom +1 -1 # put NULL pointer check in right order # # fs/cifs/file.c # 2004/08/26 23:46:59-05:00 stevef@smfhome.smfdom +28 -3 # missing checks for NULL on a few kmallocs # # fs/cifs/connect.c # 2004/08/26 23:46:59-05:00 stevef@smfhome.smfdom +105 -99 # put NULL pointer check in session setup routines in right order # # fs/cifs/cifssmb.c # 2004/08/26 23:46:59-05:00 stevef@smfhome.smfdom +11 -3 # put NULL pointer check in right order and add check for NULL which was missing on one call to kmalloc # # fs/cifs/cifsfs.c # 2004/08/26 23:46:59-05:00 stevef@smfhome.smfdom +7 -5 # put NULL pointer check in cifs_show_options in right order # # fs/cifs/asn1.c # 2004/08/26 23:46:58-05:00 stevef@smfhome.smfdom +15 -12 # add rc checking on call to decode oid # # ChangeSet # 2004/08/26 21:23:36-07:00 davem@nuts.davemloft.net # [SPARC64]: Speed up ffb font rendering. # # Render left to right instead of top to bottom. # This shaved a whole second off the: # time cat MAINTAINERS # benchmark. # # Signed-off-by: David S. Miller # # drivers/video/ffb.c # 2004/08/26 21:22:23-07:00 davem@nuts.davemloft.net +34 -101 # [SPARC64]: Speed up ffb font rendering. # # ChangeSet # 2004/08/26 17:53:38-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix copyarea bug and set default flags in ffb driver. # # - copyarea checking of src/dst y being equal was buggy. # - set optimal FBINFO flags for this device. # # Signed-off-by: David S. Miller # # drivers/video/ffb.c # 2004/08/26 17:53:11-07:00 davem@nuts.davemloft.net +8 -2 # [SPARC64]: Fix copyarea bug and set default flags in ffb driver. # # ChangeSet # 2004/08/26 17:51:19-07:00 davem@nuts.davemloft.net # [SPARC64]: Sign extend correct args of sys_syslog(). # # arch/sparc64/kernel/sys32.S # 2004/08/26 17:50:55-07:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Sign extend correct args of sys_syslog(). # # ChangeSet # 2004/08/26 16:59:41-07:00 torvalds@ppc970.osdl.org # Merge http://lia64.bkbits.net/linux-ia64-release-2.6.9 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-ia64/acpi.h # 2004/08/26 16:59:37-07:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # ChangeSet # 2004/08/26 16:29:22-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/usb-2.6 # # drivers/usb/gadget/inode.c # 2004/08/26 16:29:16-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/core/message.c # 2004/08/26 16:29:16-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/08/26 16:04:56-07:00 david-b@pacbell.net # [PATCH] USB: gadgetfs minor updates # # Gadgetfs updates: # # - Resolve a problem that came from a change in the API to AIO: # kiocb->private type and size changed, but the name remained # the same ... so GCC wouldn't report pending memory-corruption. # # - Probe the controller at runtime, eliminatingting config-specific # defines which need to be updated for each new controller. Rip # out the old #defines. # # - Use newish APIs to let VBUS current be used to recharge # batteries (or whatever). # # - Use no_llseek() ... endpoints are pure data streams. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/inode.c # 2004/08/24 15:01:22-07:00 david-b@pacbell.net +93 -52 # USB: gadgetfs minor updates # # ChangeSet # 2004/08/26 15:56:59-07:00 oliver@neukum.org # [PATCH] USB: cdc acm patch # # Fix tty layer sleep/locking problem (again) ... when this is # called through the network stack (PPP) sleeping isn't allowed. # There's some bugtraq ID for this. # # From: Oliver Neukum # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/class/cdc-acm.c # 2004/08/26 13:51:39-07:00 oliver@neukum.org +1 -1 # USB: cdc acm patch # # ChangeSet # 2004/08/26 18:42:38-04:00 jejb@mulgrave.(none) # fix dma mapping leak in fusion # # From: Moore, Eric Dean # # Remove the internal queueing so that commands # aren't stored in the driver and thus it doesn't # have to worry about whether the IOMMU resources # are allocated or not. # # Signed-off-by: James Bottomley # # drivers/message/fusion/mptscsih.c # 2004/08/26 18:41:13-04:00 jejb@mulgrave.(none) +53 -357 # fix dma mapping leak in fusion # # drivers/message/fusion/mptctl.c # 2004/08/26 18:41:13-04:00 jejb@mulgrave.(none) +4 -3 # fix dma mapping leak in fusion # # drivers/message/fusion/mptbase.h # 2004/08/26 18:41:13-04:00 jejb@mulgrave.(none) +3 -19 # fix dma mapping leak in fusion # # drivers/message/fusion/mptbase.c # 2004/08/26 18:41:13-04:00 jejb@mulgrave.(none) +1 -1 # fix dma mapping leak in fusion # # ChangeSet # 2004/08/26 15:39:07-07:00 davem@nuts.davemloft.net # [SUNSAB]: Remove CRTSCTS handling in set_termios. # # Higher layers call set_mctrl if necessary. # # Signed-off-by: David S. Miller # # drivers/serial/sunsab.c # 2004/08/26 15:38:22-07:00 davem@nuts.davemloft.net +0 -19 # [SUNSAB]: Remove CRTSCTS handling in set_termios. # # ChangeSet # 2004/08/26 18:22:07-04:00 jejb@mulgrave.(none) # Update megaraid to version 2.20.3.1 # # From: Mukker, Atul # # i. Function reordering so that inline functions are defined before they # are actually used. It is now mandatory for GCC 3.4.1 (current # stable) # # Declare some heavy-weight functions to be non-inlined, # megaraid_mbox_build_cmd, megaraid_mbox_runpendq, # megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru, # megaraid_busywait_mbox # # - Andrew Morton , 08.19.2004 # linux-scsi mailing list # # "Something else to clean up after inclusion: every instance of an # inline function is actually rendered as a full function call, # because # the function is always used before it is defined. Atul, please # re-arrange the code to eliminate the need for most (all) of the # function prototypes at the top of each file, and define (not just # declare with a prototype) each inline function before its first use" # # - Matt Domsch , 07.27.2004 # linux-scsi mailing list # # # ii. Display elapsed time (countdown) while waiting for FW to boot. # # iii. Module compilation reorder in Makefile so that unresolved symbols do # not occur when driver is compiled non-modular. # # Patrick J. LoPresti , 8.22.2004 # linux-scsi mailing list # # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/26 18:21:00-04:00 jejb@mulgrave.(none) +1 -1 # Update megaraid to version 2.20.3.1 # # drivers/scsi/megaraid/megaraid_mbox.h # 2004/08/26 18:21:00-04:00 jejb@mulgrave.(none) +3 -3 # Update megaraid to version 2.20.3.1 # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/08/26 18:21:00-04:00 jejb@mulgrave.(none) +362 -372 # Update megaraid to version 2.20.3.1 # # drivers/scsi/megaraid/Makefile # 2004/08/26 18:21:00-04:00 jejb@mulgrave.(none) +1 -1 # Update megaraid to version 2.20.3.1 # # Documentation/scsi/ChangeLog.megaraid # 2004/08/26 18:21:00-04:00 jejb@mulgrave.(none) +35 -0 # Update megaraid to version 2.20.3.1 # # ChangeSet # 2004/08/26 16:57:58-05:00 stevef@stevef95.austin.ibm.com # [CIFS] misc kmalloc and kernel_thread failure checks # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/link.c # 2004/08/26 16:57:48-05:00 stevef@stevef95.austin.ibm.com +1 -4 # fix double free # # fs/cifs/inode.c # 2004/08/26 16:57:48-05:00 stevef@stevef95.austin.ibm.com +2 -0 # misc check for null return on a kmalloc # # fs/cifs/connect.c # 2004/08/26 16:57:48-05:00 stevef@stevef95.austin.ibm.com +12 -1 # misc rc check on creating kernel_thread # # fs/cifs/cifsfs.c # 2004/08/26 16:57:48-05:00 stevef@stevef95.austin.ibm.com +7 -4 # misc rc check on creating kernel_thread # # fs/cifs/cifsencrypt.c # 2004/08/26 16:57:48-05:00 stevef@stevef95.austin.ibm.com +7 -1 # misc check for null return on a kmalloc # # ChangeSet # 2004/08/26 14:37:42-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix some tabbing in xor.S # # arch/sparc64/lib/xor.S # 2004/08/26 14:37:21-07:00 davem@nuts.davemloft.net +13 -15 # [SPARC64]: Fix some tabbing in xor.S # # ChangeSet # 2004/08/26 22:35:02+01:00 rmk@flint.arm.linux.org.uk # [ARM] signal handling fixes # # Patch from: Linus Torvalds # # Update ARM signal handling for Andrew's series of fixes. # # ChangeSet # 2004/08/26 14:34:43-07:00 davem@nuts.davemloft.net # [SPARC64]: Add .type and .size directives to some asm files. # # Signed-off-by: David S. Miller # # arch/sparc64/lib/strncpy_from_user.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +3 -1 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/strncmp.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +4 -2 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/strlen.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +4 -1 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/splock.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +5 -1 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/memmove.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +4 -2 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/ipcsum.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +4 -2 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/copy_page.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/copy_in_user.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +6 -1 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/bitops.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +6 -0 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/atomic.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +8 -1 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/U3patch.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +2 -0 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/U3memcpy.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/sparc64/lib/U1memcpy.S # 2004/08/26 14:34:13-07:00 davem@nuts.davemloft.net +3 -0 # [SPARC64]: Add .type and .size directives to some asm files. # # arch/arm/kernel/signal.c # 2004/08/26 22:32:42+01:00 rmk@flint.arm.linux.org.uk +6 -8 # ARM signal handling fixes # # ChangeSet # 2004/08/26 16:04:14-05:00 stevef@stevef95.austin.ibm.com # [CIFS] cifs ipv6 part 3 # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/connect.c # 2004/08/26 16:03:51-05:00 stevef@stevef95.austin.ibm.com +32 -6 # cifs ipv6 part 3 # # ChangeSet # 2004/08/26 13:56:08-07:00 shemminger@osdl.org # [TCP]: Automatically compute tcp_default_win_scale. # # This patch gets rid of the tcp_default_win_scale sysctl and instead # computes the optimum maximum window scale. It just means one less # thing to have to tune. I also moved the code out of the inline because # it gets called three places and isn't in the critical path. # # As a side effect, it will cause a smaller window scale for many people # since the default tcp_rmem fits in a win_scale of 2. This is allows for # finer grain windows (good), but may mask some of the problems with bad # implementations we have already seen (bad). # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/08/26 13:55:36-07:00 shemminger@osdl.org +59 -0 # [TCP]: Automatically compute tcp_default_win_scale. # # This patch gets rid of the tcp_default_win_scale sysctl and instead # computes the optimum maximum window scale. It just means one less # thing to have to tune. I also moved the code out of the inline because # it gets called three places and isn't in the critical path. # # As a side effect, it will cause a smaller window scale for many people # since the default tcp_rmem fits in a win_scale of 2. This is allows for # finer grain windows (good), but may mask some of the problems with bad # implementations we have already seen (bad). # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2004/08/26 13:55:36-07:00 shemminger@osdl.org +0 -2 # [TCP]: Automatically compute tcp_default_win_scale. # # This patch gets rid of the tcp_default_win_scale sysctl and instead # computes the optimum maximum window scale. It just means one less # thing to have to tune. I also moved the code out of the inline because # it gets called three places and isn't in the critical path. # # As a side effect, it will cause a smaller window scale for many people # since the default tcp_rmem fits in a win_scale of 2. This is allows for # finer grain windows (good), but may mask some of the problems with bad # implementations we have already seen (bad). # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/sysctl_net_ipv4.c # 2004/08/26 13:55:36-07:00 shemminger@osdl.org +0 -8 # [TCP]: Automatically compute tcp_default_win_scale. # # This patch gets rid of the tcp_default_win_scale sysctl and instead # computes the optimum maximum window scale. It just means one less # thing to have to tune. I also moved the code out of the inline because # it gets called three places and isn't in the critical path. # # As a side effect, it will cause a smaller window scale for many people # since the default tcp_rmem fits in a win_scale of 2. This is allows for # finer grain windows (good), but may mask some of the problems with bad # implementations we have already seen (bad). # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/net/tcp.h # 2004/08/26 13:55:36-07:00 shemminger@osdl.org +6 -65 # [TCP]: Automatically compute tcp_default_win_scale. # # This patch gets rid of the tcp_default_win_scale sysctl and instead # computes the optimum maximum window scale. It just means one less # thing to have to tune. I also moved the code out of the inline because # it gets called three places and isn't in the critical path. # # As a side effect, it will cause a smaller window scale for many people # since the default tcp_rmem fits in a win_scale of 2. This is allows for # finer grain windows (good), but may mask some of the problems with bad # implementations we have already seen (bad). # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/26 13:54:11-07:00 okir@suse.de # [NETFILTER]: Fix pointer deref'ing in ip6t_LOG.c # # Signed-off-by: Olaf Kirch # Signed-off-by: David S. Miller # # net/ipv6/netfilter/ip6t_LOG.c # 2004/08/26 13:53:40-07:00 okir@suse.de +2 -2 # [NETFILTER]: Fix pointer deref'ing in ip6t_LOG.c # # Signed-off-by: Olaf Kirch # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/26 21:20:43+02:00 sam@mars.ravnborg.org # kbuild: use *.lds infrastructure in arch/i386/kernel # # Rusty decided to preprocess a *.lds.S file in parallele with the new *.lds infrastructure # being added to kbuild. Fix that up. # Also added the file to targets so we do not see recompile each time the kernel is build. # # Signed-off-by: Sam Ravnborg # # arch/i386/kernel/Makefile # 2004/08/26 21:20:27+02:00 sam@mars.ravnborg.org +4 -3 # Use new infrastructure for .lds files. # Rusty decided to preporocess a .lds file in parallel # with the new infrastructure being added. # # ChangeSet # 2004/08/26 21:13:39+02:00 sam@mars.ravnborg.org # kbuild: Fix make O= # # A bug that slipped through when introducing Makefile.host. # A good way to check if people actually uses make O= ;-) # # Signed-off-by: Sam Ravnborg # # scripts/Makefile.host # 2004/08/26 21:13:23+02:00 sam@mars.ravnborg.org +1 -0 # Fix make O= build. # # When we put correct prefix on obj-dris the output directory is created if needed # # ChangeSet # 2004/08/26 08:25:47-07:00 benh@kernel.crashing.org # [PATCH] ppc32: Improve workaround for 74xx CPUs with broken BTIC # # The previous workaround didn't enable the BTIC bit on CPUs where it is # broken. However, it seems some firmwares will unconditionally set it, # so this new patch will actually _clear_ it on CPUs where it is broken. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/cpu_setup_6xx.S # 2004/08/26 02:16:36-07:00 benh@kernel.crashing.org +3 -3 # ppc32: Improve workaround for 74xx CPUs with broken BTIC # # ChangeSet # 2004/08/26 08:25:36-07:00 benh@kernel.crashing.org # [PATCH] ppc32: properly export some pcibios_* functions # # Recent yenta_socket (and maybe others) rely on some pcibios_* functions # to be available to modules. This exports them. # # arch/ppc/kernel/pci.c # 2004/08/25 23:43:07-07:00 benh@kernel.crashing.org +4 -5 # ppc32: properly export some pcibios_* functions # # ChangeSet # 2004/08/26 08:25:26-07:00 benh@kernel.crashing.org # [PATCH] ppc32: PowerMac trackpad problems # # The trackpad on recent Apple laptops tend to emmit spurrious 'right # clicks' apparently. This patch from Alex Clausen fixes it, please # apply. The trackpad cannot normally emit a right click, so just filter # those out. # # Signed-off-by: Alexander Clausen # Signed-off-by: Michael Schmitz # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Linus Torvalds # # drivers/macintosh/adbhid.c # 2004/03/10 14:41:34-08:00 benh@kernel.crashing.org +1 -1 # ppc32: PowerMac trackpad problems # # ChangeSet # 2004/08/26 08:14:42-07:00 viro@www.linux.org.uk # [PATCH] preprocessor mess in msnd # # msnd #defined outb to outb_p, which wasn't a good idea on platforms # that had outb_p #defined to outb ;-) # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/msnd_pinnacle.c # 2004/08/25 18:59:17-07:00 viro@www.linux.org.uk +21 -21 # preprocessor mess in msnd # # sound/oss/msnd.h # 2004/08/25 18:59:10-07:00 viro@www.linux.org.uk +5 -4 # preprocessor mess in msnd # # sound/oss/msnd.c # 2004/08/25 18:59:03-07:00 viro@www.linux.org.uk +14 -14 # preprocessor mess in msnd # # ChangeSet # 2004/08/26 08:14:30-07:00 viro@www.linux.org.uk # [PATCH] check_region() removal in waveartist # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/waveartist.c # 2004/08/25 18:58:07-07:00 viro@www.linux.org.uk +3 -3 # check_region() removal in waveartist # # ChangeSet # 2004/08/26 08:14:18-07:00 viro@www.linux.org.uk # [PATCH] more size_t portability fixes # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # sound/oss/cs46xx.c # 2004/08/25 19:01:30-07:00 viro@www.linux.org.uk +6 -6 # more size_t portability fixes # # drivers/mtd/nftlmount.c # 2004/08/25 18:54:37-07:00 viro@www.linux.org.uk +4 -2 # more size_t portability fixes # # drivers/message/fusion/mptbase.c # 2004/08/25 18:54:22-07:00 viro@www.linux.org.uk +1 -1 # more size_t portability fixes # # drivers/media/dvb/ttusb-dec/ttusb_dec.c # 2004/08/25 18:53:44-07:00 viro@www.linux.org.uk +1 -1 # more size_t portability fixes # # drivers/media/dvb/dvb-core/dvb_net.c # 2004/08/25 18:53:20-07:00 viro@www.linux.org.uk +1 -1 # more size_t portability fixes # # drivers/media/dvb/dvb-core/dvb_ca_en50221.c # 2004/08/25 18:53:12-07:00 viro@www.linux.org.uk +2 -2 # more size_t portability fixes # # ChangeSet # 2004/08/26 08:14:06-07:00 viro@www.linux.org.uk # [PATCH] signed char fixes in qd65xx # # qd65xx assumed that char is always signed # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/ide/legacy/qd65xx.h # 2004/08/25 18:52:19-07:00 viro@www.linux.org.uk +3 -3 # signed char fixes in qd65xx # # ChangeSet # 2004/08/26 08:13:55-07:00 viro@www.linux.org.uk # [PATCH] any2_scsi() cleaned up # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/wd7000.c # 2004/08/25 18:51:29-07:00 viro@www.linux.org.uk +4 -43 # any2_scsi() cleaned up # # drivers/scsi/aha1542.h # 2004/08/25 18:50:50-07:00 viro@www.linux.org.uk +6 -4 # any2_scsi() cleaned up # # ChangeSet # 2004/08/26 08:13:43-07:00 viro@www.linux.org.uk # [PATCH] check_region() removal in fdomain.c # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/scsi/fdomain.c # 2004/08/25 18:50:07-07:00 viro@www.linux.org.uk +34 -17 # check_region() removal in fdomain.c # # ChangeSet # 2004/08/26 08:13:31-07:00 viro@www.linux.org.uk # [PATCH] check_region() removal in tc/zs.c # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # drivers/tc/zs.c # 2004/08/25 18:49:42-07:00 viro@www.linux.org.uk +2 -6 # check_region() removal in tc/zs.c # # ChangeSet # 2004/08/26 08:13:20-07:00 viro@www.linux.org.uk # [PATCH] bad names of local-in-macros in arm io.h # # "v" and "r" are not good names for variables local in macro... # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-arm/arch-rpc/io.h # 2004/08/25 18:48:36-07:00 viro@www.linux.org.uk +19 -19 # bad names of local-in-macros in arm io.h # # ChangeSet # 2004/08/26 08:13:08-07:00 viro@www.linux.org.uk # [PATCH] missing include of config.h in asm-alpha/page.h # # That was a nasty one - missing include of config.h in a file that has # non-trivial ifdefs. With some configs it ended up with very odd conflicts # (we get included early, take the wrong branch of ifdef, then get another # file included, it pulls in config.h and picks the right branch of its # ifdef; surprise, surprise, they conflict). # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # include/asm-alpha/page.h # 2004/08/25 18:48:13-07:00 viro@www.linux.org.uk +1 -0 # missing include of config.h in asm-alpha/page.h # # ChangeSet # 2004/08/26 08:12:57-07:00 viro@www.linux.org.uk # [PATCH] missing export of memchr on arm # # arm forgot to export memchr(); everybody else does export it and it's used # in modules. # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # arch/arm/kernel/armksyms.c # 2004/08/25 18:47:39-07:00 viro@www.linux.org.uk +1 -0 # missing export of memchr on arm # # ChangeSet # 2004/08/26 08:12:45-07:00 viro@www.linux.org.uk # [PATCH] NULL noise removal # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # net/sunrpc/auth_gss/gss_spkm3_seal.c # 2004/08/25 18:43:41-07:00 viro@www.linux.org.uk +1 -1 # NULL noise removal # # net/ipv4/netfilter/ip_conntrack_proto_sctp.c # 2004/08/25 18:43:49-07:00 viro@www.linux.org.uk +1 -1 # NULL noise removal # # drivers/usb/host/ehci-hub.c # 2004/08/25 18:46:24-07:00 viro@www.linux.org.uk +2 -2 # NULL noise removal # # drivers/mtd/maps/impa7.c # 2004/08/25 18:45:32-07:00 viro@www.linux.org.uk +2 -2 # NULL noise removal # # drivers/mtd/maps/edb7312.c # 2004/08/25 18:45:25-07:00 viro@www.linux.org.uk +4 -4 # NULL noise removal # # drivers/char/ipmi/ipmi_poweroff.c # 2004/08/25 18:44:31-07:00 viro@www.linux.org.uk +1 -1 # NULL noise removal # # ChangeSet # 2004/08/26 08:12:33-07:00 viro@www.linux.org.uk # [PATCH] mpoa warning fix # # Forgot to switch return type from ssize_t to int when switching to seq_file # # Signed-off-by: Al Viro # Signed-off-by: Linus Torvalds # # net/atm/mpoa_proc.c # 2004/08/25 18:43:22-07:00 viro@www.linux.org.uk +1 -1 # mpoa warning fix # # ChangeSet # 2004/08/26 10:59:18-04:00 akpm@osdl.org # [PATCH] sym_requeue_awaiting_cmds() warning fix # # drivers/scsi/sym53c8xx_2/sym_glue.c: In function `sym_requeue_awaiting_cmds': # drivers/scsi/sym53c8xx_2/sym_glue.c:671: warning: 'cmd' is used uninitialized in this function # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/sym53c8xx_2/sym_glue.c # 2004/08/26 03:06:38-04:00 akpm@osdl.org +3 -2 # sym_requeue_awaiting_cmds() warning fix # # ChangeSet # 2004/08/26 10:56:26-04:00 hch@lst.de # [PATCH] mesh is ppc32-only # # mesh is only present on older 32bit pmac boards and doesn't compile # on ppc64. # # Signed-off-by: James Bottomley # # drivers/scsi/Kconfig # 2004/08/25 12:26:15-04:00 hch@lst.de +1 -1 # mesh is ppc32-only # # ChangeSet # 2004/08/26 10:51:04-04:00 jejb@mulgrave.(none) # BKL removal for EH thread startup # # From: Christoph Hellwig # # We don't need the BKL anymore for thread startup. # # Patch rejections fixed up and # Signed-off-by: James Bottomley # # drivers/scsi/scsi_error.c # 2004/08/26 10:49:48-04:00 jejb@mulgrave.(none) +0 -5 # BKL removal for EH thread startup # # ChangeSet # 2004/08/26 10:32:52-04:00 hch@lst.de # [PATCH] update scsi_eh_get_sense commentary # # Signed-off-by: James Bottomley # # drivers/scsi/scsi_error.c # 2004/08/24 07:38:13-04:00 hch@lst.de +5 -7 # update scsi_eh_get_sense commentary # # ChangeSet # 2004/08/26 16:12:16+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # mm/slab.c # 2004/08/26 16:11:56+02:00 perex@suse.cz +0 -0 # Auto merged # # include/linux/slab.h # 2004/08/26 16:11:55+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/26 12:39:44+02:00 perex@suse.cz # ALSA CVS update # ATIIXP-modem driver # Added workaround for buggy BIOS # # Force to set MODEM_PRESENT bit for some buggy BIOS which # don't set this bit. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/08/25 12:51:18+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/08/25 18:51:18 # C:ATIIXP-modem driver # F:pci/atiixp_modem.c:1.6->1.7 # L:Added workaround for buggy BIOS # L: # L:Force to set MODEM_PRESENT bit for some buggy BIOS which # L:don't set this bit. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/26 12:38:23+02:00 perex@suse.cz # ALSA CVS update # ICE1724 driver # Fixed the internal clock control. # # This fixes a bug that SPDIF-in mode can't be reset once after it's set. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/08/25 09:42:42+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/08/25 15:42:42 # C:ICE1724 driver # F:pci/ice1712/ice1724.c:1.43->1.44 # L:Fixed the internal clock control. # L: # L:This fixes a bug that SPDIF-in mode can't be reset once after it's set. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/26 12:37:01+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Pontis board: Misc fixes # # - buggy SPI communcation is fixed # - fixed the return value of put callbacks of GPIO controls # - corrected the initial register value of CS8416 # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/pontis.c # 2004/08/25 09:20:54+02:00 perex@suse.cz +28 -18 # ALSA CVS update # D:2004/08/25 15:20:54 # C:ICE1712 driver # F:pci/ice1712/pontis.c:1.1->1.2 # L:Pontis board: Misc fixes # L: # L:- buggy SPI communcation is fixed # L:- fixed the return value of put callbacks of GPIO controls # L:- corrected the initial register value of CS8416 # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/26 12:35:42+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Disable legacy FM and SB to prevent lock-ups. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/08/25 09:09:19+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/08/25 15:09:19 # C:VIA82xx driver # F:pci/via82xx.c:1.118->1.119 # L:Disable legacy FM and SB to prevent lock-ups. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 23:53:13-07:00 davem@nuts.davemloft.net # [SPARC64]: Fix direct f_pos fiddling in openpromfs. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/25 23:17:26-07:00 davem@nuts.davemloft.net # [SPARC64]: Hack fix, force DTR/RTS on in sunsab console. # # ChangeSet # 2004/08/25 22:52:34-07:00 davem@nuts.davemloft.net # [SPARC64]: Use force_{sig,sigsegv}() in sparc signal handling. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/25 21:28:31-07:00 davem@nuts.davemloft.net # [SPARC64]: Update defconfig. # # ChangeSet # 2004/08/25 21:31:10-07:00 torvalds@ppc970.osdl.org # Revert I2C keywest class fixup # # Benh says: "Please revert that for now, I need to figure out what they # were exactly trying to do and will come up with something if it makes # sense but the patch as-is doesn't" # # Cset exclude: khali@linux-fr.org|ChangeSet|20040825202122|07524 # # ChangeSet # 2004/08/25 21:20:57-07:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/sparcwork-2.6 # into nuts.davemloft.net:/disk1/BK/sparc-2.6 # # ChangeSet # 2004/08/26 00:15:24-07:00 greg@kroah.com # USB: rip out the whole pwc driver as the author wishes to have done. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/Makefile # 2004/08/26 00:14:29-07:00 greg@kroah.com +0 -2 # USB: rip out the whole pwc driver as the author wishes to have done. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/Kconfig # 2004/08/26 00:14:29-07:00 greg@kroah.com +0 -40 # USB: rip out the whole pwc driver as the author wishes to have done. # # Signed-off-by: Greg Kroah-Hartman # # BitKeeper/deleted/.del-pwc_timon.h~25ffdc166f591a6f # 2004/08/26 00:14:51-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc_timon.h # # BitKeeper/deleted/.del-pwc_nala.h~8096c5052b19459f # 2004/08/26 00:14:50-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc_nala.h # # BitKeeper/deleted/.del-pwc_kiara.h~6de04fc45e14401 # 2004/08/26 00:14:45-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc_kiara.h # # BitKeeper/deleted/.del-pwc.h~c09e86b6304a168d # 2004/08/26 00:14:43-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc.h # # BitKeeper/deleted/.del-pwc-misc.c~b6565476851f0275 # 2004/08/26 00:14:41-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-misc.c # # BitKeeper/deleted/.del-pwc-ioctl.h~906ba5d6320c241 # 2004/08/26 00:14:37-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-ioctl.h # # BitKeeper/deleted/.del-pwc-if.c~642b81561cf2a21 # 2004/08/26 00:14:37-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-if.c # # BitKeeper/deleted/.del-pwc-ctrl.c~10c060d18b2320e8 # 2004/08/26 00:14:37-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-ctrl.c # # BitKeeper/deleted/.del-philips.txt~6fb79c3962ca7e7a # 2004/08/26 00:14:36-07:00 greg@kroah.com +0 -0 # Delete: Documentation/usb/philips.txt # # fs/openpromfs/inode.c # 2004/08/25 23:52:33-07:00 davem@nuts.davemloft.net +24 -24 # [SPARC64]: Fix direct f_pos fiddling in openpromfs. # # drivers/serial/sunsab.c # 2004/08/25 23:17:04-07:00 davem@nuts.davemloft.net +1 -0 # [SPARC64]: Hack fix, force DTR/RTS on in sunsab console. # # arch/sparc64/kernel/signal32.c # 2004/08/25 22:52:03-07:00 davem@nuts.davemloft.net +8 -8 # [SPARC64]: Use force_{sig,sigsegv}() in sparc signal handling. # # arch/sparc64/kernel/signal.c # 2004/08/25 22:52:03-07:00 davem@nuts.davemloft.net +4 -4 # [SPARC64]: Use force_{sig,sigsegv}() in sparc signal handling. # # arch/sparc/kernel/signal.c # 2004/08/25 22:52:03-07:00 davem@nuts.davemloft.net +9 -12 # [SPARC64]: Use force_{sig,sigsegv}() in sparc signal handling. # # drivers/i2c/busses/i2c-keywest.c # 2004/08/25 21:30:53-07:00 torvalds@ppc970.osdl.org +0 -0 # Revert I2C keywest class fixup # # arch/sparc64/defconfig # 2004/08/25 21:28:10-07:00 davem@nuts.davemloft.net +20 -5 # [SPARC64]: Update defconfig. # # arch/sparc64/kernel/signal32.c # 2004/08/25 21:20:47-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # arch/sparc64/kernel/signal.c # 2004/08/25 21:20:47-07:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2004/08/25 22:24:28-05:00 stevef@smfhome1.smfdom # [CIFS] cifs ipv6 support part 2 # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/connect.c # 2004/08/25 22:24:20-05:00 stevef@smfhome1.smfdom +11 -6 # cifs ipv6 support part 2 # # ChangeSet # 2004/08/25 20:20:04-07:00 laforge@netfilter.org # [NETFILTER]: Fix ip_nat_find_helper() locking. # # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ip_nat_standalone.c # 2004/08/25 20:19:30-07:00 laforge@netfilter.org +2 -0 # [NETFILTER]: Fix ip_nat_find_helper() locking. # # net/ipv4/netfilter/ip_nat_helper.c # 2004/08/25 20:19:30-07:00 laforge@netfilter.org +7 -1 # [NETFILTER]: Fix ip_nat_find_helper() locking. # # net/ipv4/netfilter/ip_nat_core.c # 2004/08/25 20:19:30-07:00 laforge@netfilter.org +1 -1 # [NETFILTER]: Fix ip_nat_find_helper() locking. # # include/linux/netfilter_ipv4/ip_nat_helper.h # 2004/08/25 20:19:30-07:00 laforge@netfilter.org +3 -0 # [NETFILTER]: Fix ip_nat_find_helper() locking. # # ChangeSet # 2004/08/25 18:06:16-07:00 davidm@napali.hpl.hp.com # [PATCH] signal-race-fix: ia64 # # It looks fine to me, except that I decided to play chicken as far as the # give_sigsegv update of sa_handler is concerned. # # Arun, I hope I got the ia32 emulation parts right, but you may want to # double-check. # # The patch seems to work fine as far as I have tested. I'm seeing some # oddity in context-switch overhead and pipe latency as reported by LMbench, # but I suspect that's due to another change that happened somewhere between # 2.6.5-rc1 and Linus' bk tree as of this morning. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ia64/kernel/signal.c # 2004/08/25 10:13:41-07:00 davidm@napali.hpl.hp.com +38 -26 # signal-race-fix: ia64 # # ChangeSet # 2004/08/25 18:02:05-07:00 wli@holomorphy.com # [PATCH] alpha signal race fixes # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/alpha/kernel/signal.c # 2004/08/25 10:13:42-07:00 wli@holomorphy.com +4 -5 # alpha signal race fixes # # ChangeSet # 2004/08/25 18:01:53-07:00 paulus@samba.org # [PATCH] ppc64: signal race fix # # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/signal32.c # 2004/08/25 10:13:41-07:00 paulus@samba.org +10 -14 # ppc64: signal race fix # # arch/ppc64/kernel/signal.c # 2004/08/25 10:13:41-07:00 paulus@samba.org +5 -10 # ppc64: signal race fix # # ChangeSet # 2004/08/25 18:01:41-07:00 davem@redhat.com # [PATCH] signal handling race fixes: sparc and sparc64 # # Ok, here are the sparc64 and sparc32 versions. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sparc64/kernel/signal32.c # 2004/08/25 10:13:41-07:00 davem@redhat.com +5 -9 # signal handling race fixes: sparc and sparc64 # # arch/sparc64/kernel/signal.c # 2004/08/25 10:13:41-07:00 davem@redhat.com +4 -9 # signal handling race fixes: sparc and sparc64 # # arch/sparc/kernel/signal.c # 2004/08/25 10:13:41-07:00 davem@redhat.com +5 -9 # signal handling race fixes: sparc and sparc64 # # ChangeSet # 2004/08/25 18:01:29-07:00 ak@muc.de # [PATCH] signal-race-fixes: x86-64 support # # Add the signal race changes to x86-64 to make it compile again. # # Didn't merge the more pointless changes from i386. # # Also remove the special SA_ONESHOT handling, doesn't seem to be needed # anymore. # # From: Mikael Pettersson # # The signal-race-fixes patch in 2.6.8-rc2-mm1 appears to have broken # x86-64's ia32 emulation. # # When forcing a SIGSEGV the old code updated "*ka", where ka was a pointer # to current's k_sigaction for SIGSEGV. Now "ka_copy" points to a copy of # that structure, so assigning "*ka_copy" doesn't do what we want. Instead do # the assignment via current->... just like the normal signal delivery code # does. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/signal.c # 2004/08/25 10:13:41-07:00 ak@muc.de +6 -10 # signal-race-fixes: x86-64 support # # ChangeSet # 2004/08/25 18:01:20-07:00 mikpe@csd.uu.se # [PATCH] ppc signal handling fixes # # 2.6.8-rc2-mm1 reintroduced the signal-race-fixes patch for i386, x86_64, # s390, and ia64, breaking all other archs. # # The patch below updates ppc, following the pattern of i386. Compiled & # runtime tested. No observable breakage. # # Signed-off-by: Mikael Pettersson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/signal.c # 2004/08/25 10:13:41-07:00 mikpe@csd.uu.se +9 -14 # ppc signal handling fixes # # ChangeSet # 2004/08/25 18:01:08-07:00 schwidefsky@de.ibm.com # [PATCH] signal-race fixes for s390 # # Update s30 for the signal race fix # # From: Mikael Pettersson # # The signal-race-fixes patch in 2.6.8-rc2-mm1 appears to be a bit broken on # s390. # # When forcing a SIGSEGV the old code updated "*ka", where ka was a pointer # to current's k_sigaction for SIGSEGV. Now "ka_copy" points to a copy of # that structure, so assigning "*ka_copy" doesn't do what we want. Instead do # the assignment via current->... just like i386 and x86_64 do. # # Furthermore, the SA_ONESHOT handling wasn't deleted. That is now handled # by generic code in the kernel. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/kernel/signal.c # 2004/08/25 10:13:41-07:00 schwidefsky@de.ibm.com +7 -10 # signal-race fixes for s390 # # arch/s390/kernel/compat_signal.c # 2004/08/25 10:13:41-07:00 schwidefsky@de.ibm.com +2 -7 # signal-race fixes for s390 # # ChangeSet # 2004/08/25 18:00:58-07:00 minyard@acm.org # [PATCH] signal handling race fix # # The problem: # # In arch/i386/signal.c, in the do_signal() function, it calls # get_signal_to_deliver() which returns the signal number to deliver (along # with siginfo). get_signal_to_deliver() grabs and releases the lock, so # the signal handler lock is not held in do_signal(). Then the do_signal() # calls handle_signal(), which uses the signal number to extract the # sa_handler, etc. # # Since no lock is held, it seems like another thread with the same # signal handler set can come in and call sigaction(), it can change # sa_handler between the call to get_signal_to_deliver() and fetching the # value of sa_handler. If the sigaction() call set it to SIG_IGN, SIG_DFL, # or some other fundamental change, that bad things can happen. # # The patch: # # You have to get the sigaction information that will be delivered while # holding sighand->siglock in get_signal_to_deliver(). # # In 2.4, it can be fixed per-arch and requires no change to the # arch-independent code because the arch fetches the signal with # dequeue_signal() and does all the checking. # # The test app: # # The program below has three threads that share signal handlers. Thread # 1 changes the signal handler for a signal from a handler to SIG_IGN and # back. Thread 0 sends signals to thread 3, which just receives them. # What I believe is happening is that thread 1 changes the signal handler # in the process of thread 3 receiving the signal, between the time that # thread 3 fetches the signal info using get_signal_to_deliver() and # actually delivers the signal with handle_signal(). # # Although the program is obvously an extreme case, it seems like any # time you set the handler value of a signal to SIG_IGN or SIG_DFL, you can # have this happen. Changing signal attributes might also cause problems, # although I am not so sure about that. # # (akpm: this test app segv'd on SMP within milliseconds for me) # # # #include # #include # #include # # char stack1[16384]; # char stack2[16384]; # # void sighnd(int sig) # { # } # # int child1(void *data) # { # struct sigaction act; # # sigemptyset(&act.sa_mask); # act.sa_flags = 0; # for (;;) { # act.sa_handler = sighnd; # sigaction(45, &act, NULL); # act.sa_handler = SIG_IGN; # sigaction(45, &act, NULL); # } # } # # int child2(void *data) # { # for (;;) { # sleep(100); # } # } # # int main(int argc, char *argv[]) # { # int pid1, pid2; # # signal(45, SIG_IGN); # pid2 = clone(child2, stack2 + sizeof(stack2) - 8, # CLONE_SIGHAND | CLONE_VM, NULL); # pid1 = clone(child1, stack1 + sizeof(stack2) - 8, # CLONE_SIGHAND | CLONE_VM, NULL); # # for (;;) { # kill(pid2, 45); # } # } # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/signal.c # 2004/08/25 10:35:08-07:00 minyard@acm.org +10 -2 # signal handling race fix # # include/linux/signal.h # 2004/08/25 10:13:40-07:00 minyard@acm.org +1 -1 # signal handling race fix # # arch/i386/kernel/signal.c # 2004/08/25 10:13:40-07:00 minyard@acm.org +5 -9 # signal handling race fix # # ChangeSet # 2004/08/25 17:37:34-07:00 torvalds@ppc970.osdl.org # Merge common signal handling fault handling in generic code. # # kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +19 -0 # Merge common signal handling fault handling in generic code. # # include/linux/sched.h # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +1 -0 # Merge common signal handling fault handling in generic code. # # arch/x86_64/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +1 -3 # Merge common signal handling fault handling in generic code. # # arch/x86_64/ia32/ia32_signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/v850/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/um/kernel/signal_kern.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +1 -12 # Merge common signal handling fault handling in generic code. # # arch/sh64/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/sh/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/s390/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/s390/kernel/compat_signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/ppc64/kernel/signal32.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/ppc/kernel/signal.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/mips/kernel/signal_n32.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +1 -3 # Merge common signal handling fault handling in generic code. # # arch/mips/kernel/signal32.c # 2004/08/25 17:37:26-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/mips/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/mips/kernel/irixsig.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +1 -3 # Merge common signal handling fault handling in generic code. # # arch/m68knommu/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/m68k/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/ia64/ia32/ia32_signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/i386/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/h8300/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/cris/arch-v10/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # arch/arm26/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +1 -3 # Merge common signal handling fault handling in generic code. # # arch/arm/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +1 -3 # Merge common signal handling fault handling in generic code. # # arch/alpha/kernel/signal.c # 2004/08/25 17:37:25-07:00 torvalds@ppc970.osdl.org +2 -6 # Merge common signal handling fault handling in generic code. # # ChangeSet # 2004/08/25 17:28:57-07:00 torvalds@ppc970.osdl.org # vt: don't bother doing UTF translation in control states. # # And don't accept UTF translations as the start of a control # state either. # # drivers/char/vt.c # 2004/08/25 17:28:51-07:00 torvalds@ppc970.osdl.org +7 -3 # vt: don't bother doing UTF translation in control states. # # And don't accept UTF translations as the start of a control # state either. # # ChangeSet # 2004/08/25 16:35:34-07:00 shemminger@osdl.org # [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets # # The ebtables brouting chain, traversed through the call # br_should_route_hook(), can alter a packet. The redirect target # does this, f.e., to change the MAC destination. # # Bart discovered this and proposed a patch; this is a revised version. # This version cleans up the handle_bridge code in net/core/dev.c as well # as getting rid of extra rcu_read_lock and only does the br_port checking # once. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/bridge/br_private.h # 2004/08/25 16:35:17-07:00 shemminger@osdl.org +1 -1 # [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets # # The ebtables brouting chain, traversed through the call # br_should_route_hook(), can alter a packet. The redirect target # does this, f.e., to change the MAC destination. # # Bart discovered this and proposed a patch; this is a revised version. # This version cleans up the handle_bridge code in net/core/dev.c as well # as getting rid of extra rcu_read_lock and only does the br_port checking # once. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/bridge/br_input.c # 2004/08/25 16:35:17-07:00 shemminger@osdl.org +23 -34 # [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets # # The ebtables brouting chain, traversed through the call # br_should_route_hook(), can alter a packet. The redirect target # does this, f.e., to change the MAC destination. # # Bart discovered this and proposed a patch; this is a revised version. # This version cleans up the handle_bridge code in net/core/dev.c as well # as getting rid of extra rcu_read_lock and only does the br_port checking # once. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/if_bridge.h # 2004/08/25 16:35:17-07:00 shemminger@osdl.org +1 -1 # [BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets # # The ebtables brouting chain, traversed through the call # br_should_route_hook(), can alter a packet. The redirect target # does this, f.e., to change the MAC destination. # # Bart discovered this and proposed a patch; this is a revised version. # This version cleans up the handle_bridge code in net/core/dev.c as well # as getting rid of extra rcu_read_lock and only does the br_port checking # once. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/25 16:11:20-07:00 viro@www.linux.org.uk # [PATCH] mda dependency # # MDA is ISA-only ;-) # # drivers/video/console/Kconfig # 2004/08/25 10:45:00-07:00 viro@www.linux.org.uk +1 -1 # mda dependency # # ChangeSet # 2004/08/25 16:11:09-07:00 viro@www.linux.org.uk # [PATCH] usb alignment fixes # # Several places did le16_to_cpup() on misaligned address, which blows on # any little-endian platform that doesn't like misaligned reads. # # drivers/usb/net/rtl8150.c # 2004/08/25 10:44:40-07:00 viro@www.linux.org.uk +1 -1 # usb alignment fixes # # drivers/usb/misc/auerswald.c # 2004/08/25 10:44:34-07:00 viro@www.linux.org.uk +4 -3 # usb alignment fixes # # ChangeSet # 2004/08/25 16:10:57-07:00 viro@www.linux.org.uk # [PATCH] warning fix in usb/gadget/inode.c # # wrong type of return value. # # drivers/usb/gadget/inode.c # 2004/08/25 10:43:51-07:00 viro@www.linux.org.uk +2 -2 # warning fix in usb/gadget/inode.c # # ChangeSet # 2004/08/25 16:10:46-07:00 viro@www.linux.org.uk # [PATCH] signed char bugs in ixj # # Fixed assumption that char is always unsigned # # drivers/telephony/ixj.h # 2004/08/25 10:42:07-07:00 viro@www.linux.org.uk +2 -2 # signed char bugs in ixj # # ChangeSet # 2004/08/25 16:10:34-07:00 viro@www.linux.org.uk # [PATCH] killed check_region() in ixj # # Killed check_region(), fixed an old bug in ISA case (we checked the wrong # region before claiming the right one - dumb typo back in 2.4.early) # # drivers/telephony/ixj.c # 2004/08/25 10:41:51-07:00 viro@www.linux.org.uk +24 -29 # killed check_region() in ixj # # ChangeSet # 2004/08/25 16:10:22-07:00 viro@www.linux.org.uk # [PATCH] annotation of xfs sendfile # # ->sendfile() takes kernel pointer, not userland one. # # fs/xfs/linux-2.6/xfs_vnode.h # 2004/08/25 10:39:31-07:00 viro@www.linux.org.uk +1 -1 # annotation of xfs sendfile # # fs/xfs/linux-2.6/xfs_lrw.h # 2004/08/25 10:39:23-07:00 viro@www.linux.org.uk +1 -1 # annotation of xfs sendfile # # fs/xfs/linux-2.6/xfs_lrw.c # 2004/08/25 10:39:15-07:00 viro@www.linux.org.uk +1 -1 # annotation of xfs sendfile # # fs/xfs/linux-2.6/xfs_file.c # 2004/08/25 10:39:05-07:00 viro@www.linux.org.uk +1 -1 # annotation of xfs sendfile # # ChangeSet # 2004/08/25 16:10:10-07:00 viro@www.linux.org.uk # [PATCH] annotation of ki_buf # # ->ki_buf is always a userland pointer. # # include/linux/aio.h # 2004/08/25 10:38:21-07:00 viro@www.linux.org.uk +1 -1 # annotation of ki_buf # # fs/aio.c # 2004/08/25 10:38:30-07:00 viro@www.linux.org.uk +1 -1 # annotation of ki_buf # # ChangeSet # 2004/08/25 16:09:58-07:00 viro@www.linux.org.uk # [PATCH] removed bogus casts of SPIN_LOCK_UNLOCKED # # drivers/net/tulip/de4x5.c # 2004/08/25 10:34:58-07:00 viro@www.linux.org.uk +2 -2 # removed bogus casts of SPIN_LOCK_UNLOCKED # # drivers/net/tokenring/ibmtr.c # 2004/08/25 10:35:11-07:00 viro@www.linux.org.uk +1 -1 # removed bogus casts of SPIN_LOCK_UNLOCKED # # drivers/net/sundance.c # 2004/08/25 10:34:48-07:00 viro@www.linux.org.uk +1 -1 # removed bogus casts of SPIN_LOCK_UNLOCKED # # drivers/media/video/meye.c # 2004/08/25 10:34:12-07:00 viro@www.linux.org.uk +1 -1 # removed bogus casts of SPIN_LOCK_UNLOCKED # # drivers/char/sonypi.c # 2004/08/25 10:33:35-07:00 viro@www.linux.org.uk +1 -1 # removed bogus casts of SPIN_LOCK_UNLOCKED # # ChangeSet # 2004/08/25 22:40:12+00:00 levon@movementarian.org # [IA64] support for IA64 hardware performance counters via the perfmon interface # # This patch provides support for IA64 hardware performance counters via # the perfmon interface. Please consider applying. # # Signed-off-by: John Levon # Signed-off-by: Tony Luck # # arch/ia64/oprofile/perfmon.c # 2004/08/25 22:35:03+00:00 aegl@agluck-lia64.sc.intel.com +105 -0 # support for IA64 hardware performance counters via the perfmon interface # # arch/ia64/oprofile/perfmon.c # 2004/08/25 22:35:03+00:00 aegl@agluck-lia64.sc.intel.com +0 -0 # BitKeeper file /data/home/aegl/BK/work/oprofile/arch/ia64/oprofile/perfmon.c # # arch/ia64/oprofile/init.c # 2004/08/25 22:34:27+00:00 aegl@agluck-lia64.sc.intel.com +8 -1 # support for IA64 hardware performance counters via the perfmon interface # # arch/ia64/oprofile/Makefile # 2004/08/25 22:34:27+00:00 aegl@agluck-lia64.sc.intel.com +1 -0 # support for IA64 hardware performance counters via the perfmon interface # # arch/ia64/oprofile/Kconfig # 2004/08/25 22:34:27+00:00 aegl@agluck-lia64.sc.intel.com +4 -0 # support for IA64 hardware performance counters via the perfmon interface # # ChangeSet # 2004/08/25 22:38:53+01:00 rmk@flint.arm.linux.org.uk # [ADFS] Fix sparse signed bitfield warning # # include/linux/adfs_fs_i.h # 2004/08/25 22:36:47+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Make "stamped" bitfield unsigned. # # ChangeSet # 2004/08/25 13:23:54-07:00 johnrose@austin.ibm.com # [PATCH] PCI Hotplug: create pci_remove_bus() # # The following patch implements a pci_remove_bus() that can be used by # hotplug drivers for the removal of root buses. It also defines a # release function that frees the device struct for pci_bus->bridge when a # root bus class device is unregistered. # # Signed-off-by: John Rose # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2004/08/25 06:55:16-07:00 johnrose@austin.ibm.com +1 -1 # PCI Hotplug: create pci_remove_bus() # # drivers/pci/remove.c # 2004/08/25 06:55:16-07:00 johnrose@austin.ibm.com +13 -7 # PCI Hotplug: create pci_remove_bus() # # drivers/pci/probe.c # 2004/08/25 06:55:16-07:00 johnrose@austin.ibm.com +6 -0 # PCI Hotplug: create pci_remove_bus() # # ChangeSet # 2004/08/25 13:23:15-07:00 romieu@fr.zoreil.com # [PATCH] pci-driver: function documentation fix # # The returned value can not be null. Yet its description suggests differently. # # From: Francois Romieu # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci-driver.c # 2004/08/21 14:13:40-07:00 romieu@fr.zoreil.com +3 -4 # pci-driver: function documentation fix # # ChangeSet # 2004/08/25 13:22:38-07:00 khali@linux-fr.org # [PATCH] I2C: update kernel credits/maintainers # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2004/08/25 12:21:44-07:00 khali@linux-fr.org +30 -0 # I2C: update kernel credits/maintainers # # CREDITS # 2004/08/25 12:11:37-07:00 khali@linux-fr.org +6 -0 # I2C: update kernel credits/maintainers # # ChangeSet # 2004/08/25 13:21:59-07:00 khali@linux-fr.org # [PATCH] I2C: rename in0_ref to cpu0_vid # # This patch changes all the i2c chip drivers and documentation to use the # name "cpu0_vid" instead of "in0_ref". The name "in0_ref" was an error in # the first place as motherboard manufacturers may fail to follow the chip # manufacturer's recommendation about which "in" channel to use for VCore # monitoring. # # The new name leaves room for chips able to monitor more than 1 vid # value, such as the LM93 and, to a lesser extent, the PC87360 family (all # by National Semiconductor). These chips are typically designed for # dual-CPU motherboards. # # This breaks the interface (obviously) so libsensors has been updated to # support both names. # # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83781d.c # 2004/08/12 12:59:39-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # drivers/i2c/chips/w83627hf.c # 2004/08/12 13:00:11-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # drivers/i2c/chips/lm85.c # 2004/08/12 13:00:12-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # drivers/i2c/chips/lm78.c # 2004/08/12 13:00:12-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # drivers/i2c/chips/it87.c # 2004/08/12 13:00:13-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # drivers/i2c/chips/asb100.c # 2004/08/12 13:00:14-07:00 khali@linux-fr.org +2 -2 # I2C: rename in0_ref to cpu0_vid # # Documentation/i2c/sysfs-interface # 2004/08/12 12:57:05-07:00 khali@linux-fr.org +1 -1 # I2C: rename in0_ref to cpu0_vid # # ChangeSet # 2004/08/25 12:45:48-07:00 greg@kroah.com # Merge kroah.com:/home/greg/linux/BK/bleed-2.6 # into kroah.com:/home/greg/linux/BK/driver-2.6 # # lib/Makefile # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/core/urb.c # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/usb/core/message.c # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/scsi/sr.c # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/scsi/sd.c # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # drivers/char/tty_io.c # 2004/08/25 12:45:27-07:00 greg@kroah.com +0 -0 # Auto merged # # ChangeSet # 2004/08/25 12:43:29-07:00 torvalds@ppc970.osdl.org # Merge bk://linux-dj.bkbits.net/cpufreq # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # arch/i386/kernel/smpboot.c # 2004/08/25 12:43:26-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/25 12:30:41-07:00 greg@kroah.com # kobject: convert struct kobject use kref. # # Signed-off-by: Greg Kroah-Hartman # # # lib/Makefile # 2004/08/25 12:30:25-07:00 greg@kroah.com +1 -4 # kobject: convert struct kobject use kref. # # Signed-off-by: Greg Kroah-Hartman # # # ChangeSet # 2004/08/25 20:13:02+01:00 rmk@flint.arm.linux.org.uk # [ARM] Fix some sparse complaints: # # Pointers are NULL not 0. # Remove obviously unnecessary iBCS2 shm stuff... we're ARM after all. # # arch/arm/kernel/sys_arm.c # 2004/08/25 20:10:44+01:00 rmk@flint.arm.linux.org.uk +2 -5 # Remove "iBCS2 emulator entry point"... its ARM after all. # # arch/arm/common/dmabounce.c # 2004/08/25 20:10:44+01:00 rmk@flint.arm.linux.org.uk +5 -5 # Pointers are NULL not 0. # # ChangeSet # 2004/08/25 18:27:33+00:00 dcn@sgi.com # [IA64] allow OEM written modules to make calls to ia64 OEM SAL functions. # # Add wrapper functions for SAL_CALL(), SAL_CALL_NOLOCK(), and # SAL_CALL_REENTRANT() that allow OEM written modules to make # calls to ia64 OEM SAL functions. # # Signed-off-by: Dean Nelson # Signed-off-by: Tony Luck # # include/asm-ia64/sal.h # 2004/08/25 18:25:25+00:00 aegl@agluck-lia64.sc.intel.com +10 -0 # allow OEM written modules to make calls to ia64 OEM SAL functions. # # arch/ia64/kernel/sal.c # 2004/08/25 18:24:59+00:00 aegl@agluck-lia64.sc.intel.com +38 -0 # allow OEM written modules to make calls to ia64 OEM SAL functions. # # ChangeSet # 2004/08/25 18:21:19+00:00 ianw@gelato.unsw.edu.au # [IA64] Remove extraneous MMU_TRACE debugging macros # # Patch created by Ian Wienand. # # Signed-off-by: Tony Luck # # include/asm-ia64/tlbflush.h # 2004/08/25 18:16:41+00:00 aegl@agluck-lia64.sc.intel.com +2 -5 # Remove extraneous MMU_TRACE debugging macros # # include/asm-ia64/mmu_context.h # 2004/08/25 18:16:03+00:00 aegl@agluck-lia64.sc.intel.com +1 -38 # Remove extraneous MMU_TRACE debugging macros # # ChangeSet # 2004/08/25 18:03:28+00:00 yanmin.zhang@intel.com # [IA64] contig.c: Function find_bootmap_location has 2 bugs. # # Firstly, if it's done successfully, it should return -1 instead of 1 # because its caller, efi_memmap_walk, will end when find_bootmap_location # returns a value smaller than 0. # # Secondly, statement "free_start = PAGE_ALIGN(rsvd_region[i].end)" should # been moved forward. free_start needs to be initialized for every loop # iteration. Current implementation is buggy where initialization is # skipped if range_end <= range_start. Skipping initializing will leads # to overlapping bootmap with one of the rsvd_regions and subsequently # kernel hang at boot time. # # Singed-off-by:(sic) Zhang Yanmin # Signed-off-by: Yao Jun # Signed-off-by: Tony Luck # # arch/ia64/mm/contig.c # 2004/08/25 17:56:35+00:00 aegl@agluck-lia64.sc.intel.com +4 -4 # Function find_bootmap_location has 2 bugs. # # ChangeSet # 2004/08/25 17:54:46+00:00 yanmin.zhang@intel.com # [IA64] Fix boot problems when using "mem=" boot parameter. # # My tiger-4 machine has 16GB memory. Kernel 2.6.8 fails to boot on it # when command line parameter mem=8G, and it also fails when mem being # set to other value, such as 7G, 10G. # # Basically, in function efi_memmap_walk, md->num_pages might be decreased # if mem_limit is set, and then at the next time when efi_memmap_walk is # called, trim_top might trim the md again because of IA64_GRANULE_SIZE # alignment, then another md which is beyond mem_limit at the beginning # will be chosen, and its physical page number is larger than max_pfn. Then, # a BUG check is triggered. # # Signed-off-by: Zhang Yanmin # Signed-off-by: Yao Jun # Signed-off-by: Tony Luck # # arch/ia64/kernel/efi.c # 2004/08/25 17:50:37+00:00 aegl@agluck-lia64.sc.intel.com +3 -1 # Fix boot problems when using "mem=" boot parameter. # # ChangeSet # 2004/08/25 10:48:14-07:00 stern@rowland.harvard.edu # [PATCH] USB: Add missing cleanup to usb_register_root_hub() # # This patch adds some simple cleanups that are missing for one of the error # case in usb_register_root_hub(). I would be very surprised if this code # ever gets executed, but we might as well be correct. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hcd.c # 2004/07/12 08:55:12-07:00 stern@rowland.harvard.edu +2 -0 # USB: Add missing cleanup to usb_register_root_hub() # # ChangeSet # 2004/08/25 10:47:42-07:00 stern@rowland.harvard.edu # [PATCH] USB: Use 8-byte hub status URB buffer # # This patch changes the size of the buffer allocated for each hub's status # URB from 3 bytes to 8. The purpose is to avoid "babble" errors with # certain buggy hubs. Although I only know of one type of device which does # this, the patch does solve its problem and it adds no overhead for anyone # else since kmalloc doesn't dole out memory in chunks smaller than 8 bytes # (32 actually, on a PC). # # This is a small thing, but it doesn't hurt and it will make life easier # for a few people. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/hub.h # 2004/07/13 04:26:14-07:00 stern@rowland.harvard.edu +2 -2 # USB: Use 8-byte hub status URB buffer # # ChangeSet # 2004/08/25 10:46:37-07:00 icampbell@arcom.com # [PATCH] MTD: Additional JEDEC device types # # Add support for a couple of BIOS ROM devices. # # The patch has been committed to the MTD CVS tree and adds entries to # jedec_probe.c for AMD AM29F002T, Hyundai HY29F002T and Macronix # MX29F002T parts. # # This version is slightly updated from the previous once since I # accidentally added MANUFACTURER_MACRONIX when it already existed. I # also moved the new definitions to go along with the alphabetical by # manufacturer layout of the file. # # Signed-off-by: Ian Campbell # Signed-off-by: Linus Torvalds # # drivers/mtd/chips/jedec_probe.c # 2004/08/25 02:01:59-07:00 icampbell@arcom.com +39 -1 # MTD: Additional JEDEC device types # # ChangeSet # 2004/08/25 17:45:09+00:00 jbarnes@sgi.com # [IA64] generic_defconfig: Enable codepage/iocharset for VFAT filesystems. # # VFAT filesystems need to have codepages and iocharsets specified these days, # so build some into the kernel to make it easier to mount /boot/efi on ia64 # systems. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/configs/generic_defconfig # 2004/08/25 17:43:06+00:00 aegl@agluck-lia64.sc.intel.com +19 -9 # Enable codepage/iocharset for VFAT filesystems. # # ChangeSet # 2004/08/25 17:39:35+00:00 jbarnes@sgi.com # [IA64] Add include pagemap.h to tlb.h to fix warnings when CONFIG_SWAP=n. # # I noticed when building with CONFIG_SWAP=n that tlb.h gave a warning about # some undefined symbols. This is because it was pulling them in through # swap.h, but when CONFIG_SWAP=n, they're no longer pulled in. Adding # pagemap.h to tlb.h fixes the problem. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/tlb.h # 2004/08/25 17:35:10+00:00 aegl@agluck-lia64.sc.intel.com +1 -0 # Add pagemap.h to fix warnings when CONFIG_SWAP=n. # # ChangeSet # 2004/08/25 17:30:26+00:00 bjohnson@sgi.com # [IA64-SGI] Add full PROM version banner to /proc/sgi_prominfo/nodeXX/version. # # Signed-off-by: Brian J. Johnson # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/sn2/prominfo_proc.c # 2004/08/25 17:27:31+00:00 aegl@agluck-lia64.sc.intel.com +61 -13 # Add full PROM version banner to /proc/sgi_prominfo/nodeXX/version. # # ChangeSet # 2004/08/25 10:25:30-07:00 david-b@pacbell.net # [PATCH] USB: ethernet gadget, minor fixes # # Minor tweaks to the ethernet gadget driver: # # - mention that it requires full-duplex hardware # - correct the string description: they're always UTF-8 # - fix minor C error: don't "&array" (Al Borchers) # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/ether.c # 2004/08/20 12:37:59-07:00 david-b@pacbell.net +6 -7 # USB: ethernet gadget, minor fixes # # ChangeSet # 2004/08/25 10:24:39-07:00 david-b@pacbell.net # [PATCH] USB: add omap_udc driver # # This patch adds a UDC driver for OMAP, which should work on most # OMAP processors. It's been tested most on OMAP 1611/5912. The # driver supports all USB transfer types (including ISO), has limited # DMA support, and seems to work with all gadget drivers, both to # Linux hosts and to MS-Windows ones. # # One reason this UDC is particularly interesting is that recent OMAP # processors all support "USB On-The-Go" (OTG) ... and this driver # supports it on at least "H2-like" boards. # # Another reason is that the UDC is very flexible and fully featured; # gadget drivers can allocate fifo space to endpoints in the way that's # most convenient for the application. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/omap_udc.h # 2004/08/24 12:05:04-07:00 david-b@pacbell.net +199 -0 # USB: add omap_udc driver # # drivers/usb/gadget/omap_udc.h # 2004/08/24 12:05:04-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/gadget/omap_udc.h # # drivers/usb/gadget/Makefile # 2004/08/24 09:35:05-07:00 david-b@pacbell.net +2 -0 # USB: add omap_udc driver # # drivers/usb/gadget/Kconfig # 2004/08/24 09:34:48-07:00 david-b@pacbell.net +35 -0 # USB: add omap_udc driver # # drivers/usb/gadget/omap_udc.c # 2004/08/24 12:27:05-07:00 david-b@pacbell.net +2695 -0 # USB: add omap_udc driver # # drivers/usb/gadget/omap_udc.c # 2004/08/24 12:27:05-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/gadget/omap_udc.c # # ChangeSet # 2004/08/25 10:23:22-07:00 david-b@pacbell.net # [PATCH] USB: add lh7a40x_udc driver # # This patch implements the USB client controller (UDC) driver from scratch on # the LPD-LH7A40X development boards. # # Signed-off-by: Bo Henriksen # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/lh7a40x_udc.h # 2004/08/20 11:56:19-07:00 david-b@pacbell.net +261 -0 # USB: add lh7a40x_udc driver # # drivers/usb/gadget/lh7a40x_udc.h # 2004/08/20 11:56:19-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/gadget/lh7a40x_udc.h # # drivers/usb/gadget/Kconfig # 2004/08/24 13:37:26-07:00 david-b@pacbell.net +12 -0 # USB: add lh7a40x_udc driver # # drivers/usb/gadget/lh7a40x_udc.c # 2004/08/20 11:56:19-07:00 david-b@pacbell.net +2168 -0 # USB: add lh7a40x_udc driver # # drivers/usb/gadget/lh7a40x_udc.c # 2004/08/20 11:56:19-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/gadget/lh7a40x_udc.c # # ChangeSet # 2004/08/25 17:43:04+01:00 tony@com.rmk.(none) # [ARM PATCH] 2040/1: Increase ARM HARDIRQ_BITS to 9, version 2 # # Patch from Tony Lindgren # # This is an updated version of patch 2004/1 to optimize for immediate constant # # include/asm-arm/hardirq.h # 2004/08/20 09:06:19+01:00 tony@com.rmk.(none) +9 -1 # [PATCH] 2040/1: Increase ARM HARDIRQ_BITS to 9, version 2 # # ChangeSet # 2004/08/25 17:39:16+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2047/1: disable NWFPE_XP on big endian # # Patch from Lennert Buytenhek # # Hi, # # gcc doesn't understand 80-bit floating point on the ARM currently, # according to the kernel's Kconfig docs, but it would seem that the # current extended double emulation code is broken for big endian # platforms. # # So, this patch disables NWFPE_XP on big endian architectures, until # someone comes round and fixes it. # # # cheers, # Lennert # # arch/arm/Kconfig # 2004/08/19 00:03:18+01:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2047/1: disable NWFPE_XP on big endian # # ChangeSet # 2004/08/25 17:35:00+01:00 buytenh@org.rmk.(none) # [ARM PATCH] 2046/1: fix nwfpe for double arithmetic on big-endian platforms # # Patch from Lennert Buytenhek # # Hi, # # I need the patch below (against 2.6.8-rc1-ds1) to make nwfpe properly # emulate arithmetic with doubles on a big endian ARM platform. # # From reading the mailing list archives and from helpful comments I've # received from people on this list, I gather that this has come up in # the past, but it appears that Russell King was never really convinced # as to why this patch is needed. I think I understand what's going on, # and will try to explain. # # On little endian ARM, the double value 1.0 looks like this when stored # in memory in FPA word ordering: # bytes: 0x00 0x00 0xf0 0x3f 0x00 0x00 0x00 0x00 # u32s: 0x3ff00000 0x00000000 # u64: 0x000000003ff00000 # # On big endian, it looks like this: # bytes: 0x3f 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 # u32s: 0x3ff00000 0x00000000 # u64: 0x3ff0000000000000 # # It appears to be this way because once upon a time, somebody decided # that the sub-words of a double will use native endian word ordering # within themselves, but the two separate words will always be stored # with the most significant one first. God knows why they did it this # way, but they did. # # Anyway. The key observation is that nwfpe internally stores double # values in the type 'float64', which is basically just a typedef for # unsigned long long. It never accesses 'float64's on the byte level # by casting pointers around or anything like that, it just uses direct # u64 arithmetic primitives (add, shift, or, and) for float64 # manipulations and that's it. # # So. For little endian platforms, 1.0 looks like: # 0x00 0x00 0xf0 0x3f 0x00 0x00 0x00 0x00 # But since nwfpe treats it as a u64, it wants it to look like: # 0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x3f # So, that's why the current code swaps the words around when getting # doubles from userspace and putting them back (see fpa11_cpdt.c, # loadDouble and storeDouble.) # # On big endian, 1.0 looks like: # 0x3f 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 # Since nwfpe treats it as a u64, it wants it to look like: # 0x3f 0xf0 0x00 0x00 0x00 0x00 0x00 0x00 # Hey! That's exactly the same. So in this case, it shouldn't be # swapping the halves around. However, it currently does that swapping # unconditionally, and that's why floating point emulation messes up. # # This is how I understand things -- hope it makes sense to other people # too. # # # cheers, # Lennert # # arch/arm/nwfpe/fpa11_cpdt.c # 2004/08/18 23:52:12+01:00 buytenh@org.rmk.(none) +10 -0 # [PATCH] 2046/1: fix nwfpe for double arithmetic on big-endian platforms # # ChangeSet # 2004/08/25 12:22:18-04:00 jejb@mulgrave.(none) # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # This was used by sd and sr # # Instead make them use # # scsi_test_unit_ready() which is exported now # from scsi_lib.c # # Signed-off-by: James Bottomley # # include/scsi/scsi_device.h # 2004/08/25 12:21:41-04:00 jejb@mulgrave.(none) +2 -0 # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # drivers/scsi/sr.c # 2004/08/25 12:21:41-04:00 jejb@mulgrave.(none) +1 -1 # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # drivers/scsi/sd.c # 2004/08/25 12:21:41-04:00 jejb@mulgrave.(none) +1 -1 # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # drivers/scsi/scsi_lib.c # 2004/08/25 12:21:41-04:00 jejb@mulgrave.(none) +28 -0 # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # drivers/scsi/scsi_ioctl.c # 2004/08/25 12:21:41-04:00 jejb@mulgrave.(none) +2 -6 # Add internal API to remove reliance on deprecated SCSI_IOCTL_TEST_UNIT_READY # # ChangeSet # 2004/08/25 17:18:55+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2044/1: S3C2410 - missing IRQ_TICK from RTC resources # # Patch from Ben Dooks # # Fixes missing IRQ_TICK from RTC resources # # arch/arm/mach-s3c2410/devs.c # 2004/08/21 10:13:16+01:00 ben-linux@org.rmk.(none) +6 -1 # [PATCH] 2044/1: S3C2410 - missing IRQ_TICK from RTC resources # # ChangeSet # 2004/08/25 17:14:27+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2043/1: S3C2410 update to registered devices # # Patch from Ben Dooks # # Updated all arch/arm/mach-s3c2410/mach-XXX.c files to # register default set of devices # # Added new board struct to keep this sort of info, as it # isn't possible to register platform_devices until after # the init_io functions have been called. # # arch/arm/mach-s3c2410/s3c2410.h # 2004/08/21 01:12:12+01:00 ben-linux@org.rmk.(none) +14 -1 # [PATCH] 2043/1: S3C2410 update to registered devices # # arch/arm/mach-s3c2410/s3c2410.c # 2004/08/21 02:40:26+01:00 ben-linux@org.rmk.(none) +36 -20 # [PATCH] 2043/1: S3C2410 update to registered devices # # arch/arm/mach-s3c2410/mach-vr1000.c # 2004/08/21 02:47:09+01:00 ben-linux@org.rmk.(none) +17 -6 # [PATCH] 2043/1: S3C2410 update to registered devices # # arch/arm/mach-s3c2410/mach-smdk2410.c # 2004/08/21 02:47:20+01:00 ben-linux@org.rmk.(none) +15 -1 # [PATCH] 2043/1: S3C2410 update to registered devices # # arch/arm/mach-s3c2410/mach-h1940.c # 2004/08/21 02:46:58+01:00 ben-linux@org.rmk.(none) +21 -2 # [PATCH] 2043/1: S3C2410 update to registered devices # # arch/arm/mach-s3c2410/mach-bast.c # 2004/08/21 02:45:25+01:00 ben-linux@org.rmk.(none) +20 -4 # [PATCH] 2043/1: S3C2410 update to registered devices # # ChangeSet # 2004/08/25 17:09:50+01:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2042/1: S3C2410 - Clock fixes, added watchdog clock # # Patch from Ben Dooks # # Added clock definition for watchdog, and fixed it so # that clocks that cannot be enabled/disabled will be # left alone. # # Fixed typo in naming of clocks when registering # # arch/arm/mach-s3c2410/clock.c # 2004/08/21 00:32:37+01:00 ben-linux@org.rmk.(none) +10 -4 # [PATCH] 2042/1: S3C2410 - Clock fixes, added watchdog clock # # ChangeSet # 2004/08/25 08:29:20-07:00 trini@kernel.crashing.org # ppc32: Rework the hooks for serial in the bootwrapper. # # Signed-off-by: Hollis Blanchard # Signed-off-by: Tom Rini # # arch/ppc/boot/simple/prepmap.c # 2004/08/25 08:29:10-07:00 trini@kernel.crashing.org +12 -0 # # arch/ppc/boot/simple/prepmap.c # 2004/08/25 08:29:10-07:00 trini@kernel.crashing.org +0 -0 # BitKeeper file /home/trini/work/kernel/pristine/for-linus-ppc/arch/ppc/boot/simple/prepmap.c # # arch/ppc/boot/simple/chrpmap.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +12 -0 # # arch/ppc/boot/simple/misc.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +6 -1 # Remove a call to serial_fixups() and add the weak version of # board_isa_init(), which is called in load_kernel(). # # arch/ppc/boot/simple/misc-spruce.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +0 -3 # Remove cruft. # # arch/ppc/boot/simple/misc-prep.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +1 -0 # Call board_isa_init(). # # arch/ppc/boot/simple/chrpmap.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +0 -0 # BitKeeper file /home/trini/work/kernel/pristine/for-linus-ppc/arch/ppc/boot/simple/chrpmap.c # # arch/ppc/boot/simple/Makefile # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +3 -3 # Change 'legacy' to 'prepmap' for extra.o files. # # arch/ppc/boot/include/nonstdio.h # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +2 -0 # Add board_isa_init() and ISA_init(). # # arch/ppc/boot/common/serial_stub.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +0 -5 # Remove serial_fixups(). # # arch/ppc/boot/common/misc-common.c # 2004/08/25 08:29:09-07:00 trini@kernel.crashing.org +5 -0 # Add a function to set ISA_io. # # BitKeeper/deleted/.del-legacy.S~8dfa8dbf34d399ba # 2004/08/25 08:24:11-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/boot/simple/legacy.S # # BitKeeper/deleted/.del-chrpmap.S~753bd5ced436595 # 2004/08/25 08:24:11-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/boot/simple/chrpmap.S # # ChangeSet # 2004/08/25 07:50:30-07:00 trini@kernel.crashing.org # ppc32: Fix compiling of SBC82xx. # # Noticed by David Woodhouse. # # Signed-off-by: Tom Rini # # arch/ppc/platforms/sbc82xx.c # 2004/08/25 07:50:20-07:00 trini@kernel.crashing.org +0 -1 # Don't set ppc_md.setup_arch anymore. # # ChangeSet # 2004/08/25 14:29:22+01:00 rmk@flint.arm.linux.org.uk # [ARM] Move DMA mask-based bounce detection to dmabounce code. # # arch/arm/common/sa1111.c # 2004/08/25 14:27:11+01:00 rmk@flint.arm.linux.org.uk +2 -11 # Move DMA mask-based bounce handling detection to generic dmabounce # code. # # arch/arm/common/dmabounce.c # 2004/08/25 14:27:10+01:00 rmk@flint.arm.linux.org.uk +15 -9 # If a device has a DMA mask, use it to work out if we need to # do DMA bounce handling. If the dma range falls outside memory # covered by the DMA mask, we need to do DMA bounce handling. # # ChangeSet # 2004/08/25 15:21:32+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Misc fixes for Aureon boards. # # - Fixed center/LFE volume controls. # - Provide individual driver names for Aureon and Prodigy boards # since they have different channel assignment from Revo, etc. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/08/24 11:51:05+02:00 perex@suse.cz +5 -1 # ALSA CVS update # D:2004/08/24 17:51:05 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.15->1.16 # L:Misc fixes for Aureon boards. # L: # L:- Fixed center/LFE volume controls. # L:- Provide individual driver names for Aureon and Prodigy boards # L: since they have different channel assignment from Revo, etc. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:20:48+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver,Intel8x0-modem driver # Fixed resume when interrupts are shared with another devices. # # Signed-off-by: Jozef Vesely # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0m.c # 2004/08/24 06:01:08+02:00 perex@suse.cz +4 -0 # ALSA CVS update # D:2004/08/24 12:01:07 # C:Intel8x0 driver,Intel8x0-modem driver # F:pci/intel8x0.c:1.159->1.160 # F:pci/intel8x0m.c:1.18->1.19 # L:Fixed resume when interrupts are shared with another devices. # Signed-off-by: Jozef Vesely # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0.c # 2004/08/24 06:01:07+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/08/24 12:01:07 # C:Intel8x0 driver,Intel8x0-modem driver # F:pci/intel8x0.c:1.159->1.160 # F:pci/intel8x0m.c:1.18->1.19 # L:Fixed resume when interrupts are shared with another devices. # Signed-off-by: Jozef Vesely # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/25 15:20:03+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # intel8x0: Fixed a long mdelay() # # A long mdelay() call in prepration of 4/6 channels on nForce # is optimized and replaced with msleep(). # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/08/23 09:38:30+02:00 perex@suse.cz +4 -2 # ALSA CVS update # D:2004/08/23 15:38:30 # C:Intel8x0 driver # F:pci/intel8x0.c:1.158->1.159 # L:intel8x0: Fixed a long mdelay() # L: # L:A long mdelay() call in prepration of 4/6 channels on nForce # L:is optimized and replaced with msleep(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:19:21+02:00 perex@suse.cz # ALSA CVS update # ALSA sequencer # remove (now obsolete) support for _KERNEL_QUOTE events # # Signed-off-by: Clemens Ladisch # # sound/core/seq/seq_clientmgr.c # 2004/08/23 02:24:54+02:00 perex@suse.cz +3 -49 # ALSA CVS update # D:2004/08/23 08:24:54 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.33->1.34 # F:include/asequencer.h:1.12->1.13 # L:remove (now obsolete) support for _KERNEL_QUOTE events # Signed-off-by: Clemens Ladisch # # include/sound/asequencer.h # 2004/08/23 02:24:54+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/23 08:24:54 # C:ALSA sequencer # F:core/seq/seq_clientmgr.c:1.33->1.34 # F:include/asequencer.h:1.12->1.13 # L:remove (now obsolete) support for _KERNEL_QUOTE events # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:18:37+02:00 perex@suse.cz # ALSA CVS update # RawMidi Midlevel # fix handling of EFAULT errors in snd_rawmidi_read/write; # fix hang when writing to /dev/midi* with O_SYNC # # Signed-off-by: Clemens Ladisch # # sound/core/rawmidi.c # 2004/08/23 02:16:29+02:00 perex@suse.cz +4 -2 # ALSA CVS update # D:2004/08/23 08:16:29 # C:RawMidi Midlevel # F:core/rawmidi.c:1.47->1.48 # L:fix handling of EFAULT errors in snd_rawmidi_read/write; # L:fix hang when writing to /dev/midi* with O_SYNC # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:17:53+02:00 perex@suse.cz # ALSA CVS update # ATIIXP driver # add IXP400 support # # Signed-off-by: Clemens Ladisch # # sound/pci/atiixp.c # 2004/08/23 02:12:06+02:00 perex@suse.cz +2 -1 # ALSA CVS update # D:2004/08/23 08:12:06 # C:ATIIXP driver # F:pci/atiixp.c:1.21->1.22 # L:add IXP400 support # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:17:10+02:00 perex@suse.cz # ALSA CVS update # PPC # beep support depends on INPUT # # Signed-off-by: Jaroslav Kysela # # sound/ppc/Kconfig # 2004/08/22 02:36:25+02:00 perex@suse.cz +4 -1 # ALSA CVS update # D:2004/08/22 08:36:25 # C:PPC # F:ppc/Kconfig:1.3->1.4 # L:beep support depends on INPUT # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/25 15:16:27+02:00 perex@suse.cz # ALSA CVS update # MPU401 UART # use acpi_register_gsi # # Signed-off-by: Clemens Ladisch # # sound/drivers/mpu401/mpu401.c # 2004/08/20 07:00:33+02:00 perex@suse.cz +5 -9 # ALSA CVS update # D:2004/08/20 13:00:33 # C:MPU401 UART # F:drivers/mpu401/mpu401.c:1.19->1.20 # L:use acpi_register_gsi # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:15:41+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Added jack sense switches for AD1885 # # 'Headphone Jack Sense' and 'Line Jack Sense' switches are added for # AD1885. This will enable the h/w swich between the headphone and # the internal speaker on some laptops. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/08/20 05:03:16+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/08/20 11:03:16 # C:AC97 Codec Core # F:pci/ac97/ac97_patch.c:1.56->1.57 # L:Added jack sense switches for AD1885 # L: # L:'Headphone Jack Sense' and 'Line Jack Sense' switches are added for # L:AD1885. This will enable the h/w swich between the headphone and # L:the internal speaker on some laptops. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:14:58+02:00 perex@suse.cz # ALSA CVS update # Maestro3 driver # Fixed the typo in the last change for pci_set_master() call... # # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/08/19 12:16:31+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/19 18:16:31 # C:Maestro3 driver # F:pci/maestro3.c:1.61->1.62 # L:Fixed the typo in the last change for pci_set_master() call... # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:14:13+02:00 perex@suse.cz # ALSA CVS update # Maestro3 driver # Call pci_set_master() in resume (to be sure) # # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/08/19 12:15:21+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/08/19 18:15:21 # C:Maestro3 driver # F:pci/maestro3.c:1.60->1.61 # L:Call pci_set_master() in resume (to be sure) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:13:29+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Fixed the master volume control. # # The master volume control was inverted, fixed now. # The volume range is narrowed to -64dB. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/08/18 08:50:32+02:00 perex@suse.cz +11 -6 # ALSA CVS update # D:2004/08/18 14:50:32 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.14->1.15 # L:Fixed the master volume control. # L: # L:The master volume control was inverted, fixed now. # L:The volume range is narrowed to -64dB. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:12:45+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Added the DXS entry for Uniwill/Targa Visionary XP-210. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/08/18 07:43:23+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/08/18 13:43:23 # C:VIA82xx driver # F:pci/via82xx.c:1.117->1.118 # L:Added the DXS entry for Uniwill/Targa Visionary XP-210. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:12:01+02:00 perex@suse.cz # ALSA CVS update # PPC AWACS driver # awacs.c num_controls -> ARRAY_SIZE fix # # Signed-off-by: Joseph Fannin # Signed-off-by: Takashi Iwai # # sound/ppc/awacs.c # 2004/08/18 04:50:49+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/08/18 10:50:49 # C:PPC AWACS driver # F:ppc/awacs.c:1.25->1.26 # L:awacs.c num_controls -> ARRAY_SIZE fix # Signed-off-by: Joseph Fannin # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:11:18+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Removed MPU401 detection from Aureon and Prodigy boards. # # The bogus mpu401 may cause hang-up on some apps. # Now the detection bit in EEPROM image is removed. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/08/18 04:50:05+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/08/18 10:50:05 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.13->1.14 # L:Removed MPU401 detection from Aureon and Prodigy boards. # L: # L:The bogus mpu401 may cause hang-up on some apps. # L:Now the detection bit in EEPROM image is removed. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:10:36+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Add to snd-intel8x0 AC97 quirk list # # Additions for Dell Precision 450, HP xw4200 and xw8200. # # Signed-off-by: John W. Linville # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/08/17 12:11:54+02:00 perex@suse.cz +18 -0 # ALSA CVS update # D:2004/08/17 18:11:54 # C:Intel8x0 driver # F:pci/intel8x0.c:1.157->1.158 # L:Add to snd-intel8x0 AC97 quirk list # L: # L:Additions for Dell Precision 450, HP xw4200 and xw8200. # Signed-off-by: John W. Linville # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:09:53+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Fix Audigy + AC97 Master Volume # # This patch sets AC97 Master volume to 0 (0 dB). Previous value was # 0x0202 (-3 dB) (this was my misstake). # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emumixer.c # 2004/08/17 05:16:03+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/17 11:16:03 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emumixer.c:1.25->1.26 # L:Fix Audigy + AC97 Master Volume # L: # L:This patch sets AC97 Master volume to 0 (0 dB). Previous value was # L:0x0202 (-3 dB) (this was my misstake). # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:09:08+02:00 perex@suse.cz # ALSA CVS update # ES1938 driver # Added (experimental) PM support. # # Signed-off-by: Takashi Iwai # # sound/pci/es1938.c # 2004/08/16 12:22:18+02:00 perex@suse.cz +98 -37 # ALSA CVS update # D:2004/08/16 18:22:18 # C:ES1938 driver # F:pci/es1938.c:1.40->1.41 # L:Added (experimental) PM support. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:08:23+02:00 perex@suse.cz # ALSA CVS update # PPC PMAC driver,PPC Tumbler driver # pmac mixer update from shadow register on resume and switching DRC on headphone plug # # The attached patch improved the pmac driver by implementing updating the # mixer from the shadow register after a resume or headphone interrupt, as # well as automatically selecting DRC on headphone plug. # # For normal line-out one does not want the DRC, but it should # automatically be reenabled after the headphone is unplugged: Otherwise # the power to the internal speakers is high enought to destroy them # (happend once to my iBook - when it still had warrenty ... ;-) # # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # sound/ppc/tumbler.c # 2004/08/16 12:19:56+02:00 perex@suse.cz +54 -13 # ALSA CVS update # D:2004/08/16 18:19:56 # C:PPC PMAC driver,PPC Tumbler driver # F:ppc/pmac.h:1.16->1.17 # F:ppc/tumbler.c:1.32->1.33 # L:pmac mixer update from shadow register on resume and switching DRC on headphone plug # L: # L:The attached patch improved the pmac driver by implementing updating the # L:mixer from the shadow register after a resume or headphone interrupt, as # L:well as automatically selecting DRC on headphone plug. # L: # L:For normal line-out one does not want the DRC, but it should # L:automatically be reenabled after the headphone is unplugged: Otherwise # L:the power to the internal speakers is high enought to destroy them # L:(happend once to my iBook - when it still had warrenty ... ;-) # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.h # 2004/08/16 12:19:56+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/08/16 18:19:56 # C:PPC PMAC driver,PPC Tumbler driver # F:ppc/pmac.h:1.16->1.17 # F:ppc/tumbler.c:1.32->1.33 # L:pmac mixer update from shadow register on resume and switching DRC on headphone plug # L: # L:The attached patch improved the pmac driver by implementing updating the # L:mixer from the shadow register after a resume or headphone interrupt, as # L:well as automatically selecting DRC on headphone plug. # L: # L:For normal line-out one does not want the DRC, but it should # L:automatically be reenabled after the headphone is unplugged: Otherwise # L:the power to the internal speakers is high enought to destroy them # L:(happend once to my iBook - when it still had warrenty ... ;-) # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/25 15:07:38+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS sequencer # rewrote snd_seq_oss_read/snd_seq_oss_write to fix various # buffer overflow/locking/nonstandard behaviour bugs # # Signed-off-by: Clemens Ladisch # # sound/core/seq/oss/seq_oss_rw.c # 2004/08/16 04:03:22+02:00 perex@suse.cz +67 -47 # ALSA CVS update # D:2004/08/16 10:03:22 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_readq.c:1.9->1.10 # F:core/seq/oss/seq_oss_readq.h:1.2->1.3 # F:core/seq/oss/seq_oss_rw.c:1.5->1.6 # L:rewrote snd_seq_oss_read/snd_seq_oss_write to fix various # L:buffer overflow/locking/nonstandard behaviour bugs # Signed-off-by: Clemens Ladisch # # sound/core/seq/oss/seq_oss_readq.h # 2004/08/16 04:03:22+02:00 perex@suse.cz +6 -3 # ALSA CVS update # D:2004/08/16 10:03:22 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_readq.c:1.9->1.10 # F:core/seq/oss/seq_oss_readq.h:1.2->1.3 # F:core/seq/oss/seq_oss_rw.c:1.5->1.6 # L:rewrote snd_seq_oss_read/snd_seq_oss_write to fix various # L:buffer overflow/locking/nonstandard behaviour bugs # Signed-off-by: Clemens Ladisch # # sound/core/seq/oss/seq_oss_readq.c # 2004/08/16 04:03:22+02:00 perex@suse.cz +13 -26 # ALSA CVS update # D:2004/08/16 10:03:22 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_readq.c:1.9->1.10 # F:core/seq/oss/seq_oss_readq.h:1.2->1.3 # F:core/seq/oss/seq_oss_rw.c:1.5->1.6 # L:rewrote snd_seq_oss_read/snd_seq_oss_write to fix various # L:buffer overflow/locking/nonstandard behaviour bugs # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:06:53+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS sequencer # don't copy uninitialized kernel stack data to userspace # # Signed-off-by: Clemens Ladisch # # sound/core/seq/oss/seq_oss_readq.c # 2004/08/16 03:58:15+02:00 perex@suse.cz +3 -2 # ALSA CVS update # D:2004/08/16 09:58:15 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_readq.c:1.8->1.9 # L:don't copy uninitialized kernel stack data to userspace # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:06:08+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS sequencer # remove superfluous snd_seq_oss_readq_clear call # # Signed-off-by: Clemens Ladisch # # sound/core/seq/oss/seq_oss_readq.c # 2004/08/16 03:56:24+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/08/16 09:56:24 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_readq.c:1.7->1.8 # L:remove superfluous snd_seq_oss_readq_clear call # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 15:05:23+02:00 perex@suse.cz # ALSA CVS update # ALSA sequencer # don't fake the sender address in messages forwarded by snd-seq-dummy to prevent confusing other clients (e.g. snd-seq-oss) # # Signed-off-by: Clemens Ladisch # # sound/core/seq/seq_dummy.c # 2004/08/16 03:54:52+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/08/16 09:54:52 # C:ALSA sequencer # F:core/seq/seq_dummy.c:1.13->1.14 # L:don't fake the sender address in messages forwarded by snd-seq-dummy to prevent confusing other clients (e.g. snd-seq-oss) # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/25 13:59:55+01:00 rmk@flint.arm.linux.org.uk # [ARM] Correct dma_to_virt()/virt_to_dma() return types. # # include/asm-arm/memory.h # 2004/08/25 13:57:41+01:00 rmk@flint.arm.linux.org.uk +2 -2 # dma_to_virt() should return a void pointer. # virt_to_dma() should return a dma_addr_t. # # ChangeSet # 2004/08/25 08:59:52+02:00 perex@suse.cz # Merge bk://linux-sound@linux-sound.bkbits.net/linux-sound # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/parisc/harmony.c # 2004/08/25 08:59:34+02:00 perex@suse.cz +0 -2 # Auto merged # # sound/isa/wavefront/wavefront_fx.c # 2004/08/25 08:59:34+02:00 perex@suse.cz +0 -0 # Auto merged # # mm/slab.c # 2004/08/25 08:59:33+02:00 perex@suse.cz +0 -0 # Auto merged # # include/linux/pci_ids.h # 2004/08/25 08:59:33+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/24 23:39:21-07:00 paulus@samba.org # [PATCH] ppc64: better handling of H_ENTER failures # # This changes the hash insertion routines to return an error instead of # calling panic() when HV refuses to insert a HPTE (the hypervisor call to # set up a hashtable PTE is H_ENTER). # # The error is now propagated upstream, and either bad_page_fault() is # called (kernel mode) or a SIGBUS signal is forced (user mode). Some # other panic() cases are also turned into BUG_ON. # # Overall, this should provide us with better debugging data if the # problem happens, and avoids errors from userland mapping /dev/mem and # trying to use forbidden IOs (XFree ?) to bring the whole kernel down. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Paul Mackerras # Signed-off-by: Linus Torvalds # # include/asm-ppc64/system.h # 2004/08/23 23:49:57-07:00 paulus@samba.org +1 -0 # ppc64: better handling of H_ENTER failures # # arch/ppc64/mm/hash_utils.c # 2004/08/23 23:49:57-07:00 paulus@samba.org +24 -7 # ppc64: better handling of H_ENTER failures # # arch/ppc64/mm/hash_low.S # 2004/08/23 23:49:57-07:00 paulus@samba.org +5 -1 # ppc64: better handling of H_ENTER failures # # arch/ppc64/kernel/pSeries_lpar.c # 2004/08/24 00:29:18-07:00 paulus@samba.org +8 -16 # ppc64: better handling of H_ENTER failures # # arch/ppc64/kernel/head.S # 2004/08/23 23:51:40-07:00 paulus@samba.org +14 -0 # ppc64: better handling of H_ENTER failures # # ChangeSet # 2004/08/24 23:35:36-07:00 torvalds@ppc970.osdl.org # Use "insert_resource()" to add the PCI resources to the # resource tree. # # In contrast to the old "request_resource()", this allows # us to add a resource even when firmware (ACPI) has marked # part of it as being in use. # # arch/i386/pci/i386.c # 2004/08/24 23:35:30-07:00 torvalds@ppc970.osdl.org +1 -1 # Use "insert_resource()" to add the PCI resources to the # resource tree. # # In contrast to the old "request_resource()", this allows # us to add a resource even when firmware (ACPI) has marked # part of it as being in use. # # ChangeSet # 2004/08/24 23:35:02-04:00 akpm@osdl.org # [PATCH] via-rhine: small fixes # # From: Roger Luethi # # - remove Rhine model names (per Jeff's request) # - remove redundant calls to clear MII cmd # - fill some rhine_private fields earlier # # Signed-off-by: Roger Luethi # Signed-off-by: Andrew Morton # # drivers/net/via-rhine.c # 2004/08/24 22:18:35-04:00 akpm@osdl.org +16 -36 # via-rhine: small fixes # # ChangeSet # 2004/08/24 23:34:52-04:00 akpm@osdl.org # [PATCH] via-rhine: de-isolate PHY # # From: Roger Luethi # # PHYs may come up isolated. Make sure we can send data to them. This code # section needs a clean-up, but I prefer to merge this fix in isolation. # # Report and suggested fix by Tam, Ming Dat (Tommy). # # Signed-off-by: Roger Luethi # Signed-off-by: Andrew Morton # # drivers/net/via-rhine.c # 2004/08/24 22:18:35-04:00 akpm@osdl.org +3 -0 # via-rhine: de-isolate PHY # # ChangeSet # 2004/08/24 23:34:42-04:00 akpm@osdl.org # [PATCH] via-rhine: suspend/resume support # # From: Roger Luethi # # From: Arkadiusz Miskiewicz # # Signed-off-by: Arkadiusz Miskiewicz # Signed-off-by: Roger Luethi # Signed-off-by: Andrew Morton # # drivers/net/via-rhine.c # 2004/08/24 22:18:35-04:00 akpm@osdl.org +65 -0 # via-rhine: suspend/resume support # # ChangeSet # 2004/08/24 23:34:32-04:00 akpm@osdl.org # [PATCH] netdrv gianfar: fix printk output # # From: Kumar Gala # # Fix usage of printk on the output of mac address. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # # drivers/net/gianfar.c # 2004/08/24 22:18:40-04:00 akpm@osdl.org +2 -2 # netdrv gianfar: fix printk output # # ChangeSet # 2004/08/24 23:34:20-04:00 akpm@osdl.org # [PATCH] Typo in drivers/net/dl2k.h # # From: Alexander Shatohin # # # # Signed-off-by: Andrew Morton # # drivers/net/dl2k.h # 2004/08/24 22:18:37-04:00 akpm@osdl.org +1 -1 # Typo in drivers/net/dl2k.h # # ChangeSet # 2004/08/24 23:34:10-04:00 akpm@osdl.org # [PATCH] 8139too: be sure to progress during rtl8139_rx() # # From: Francois Romieu # # If the Rx buffer gets corrupted or the FIFO hangs in new interesting ways, # this code prevents the driver from looping in ksoftirqd context without # making any progress. # # Signed-off-by: Francois Romieu # Signed-off-by: Andrew Morton # # drivers/net/8139too.c # 2004/08/24 22:18:37-04:00 akpm@osdl.org +24 -1 # 8139too: be sure to progress during rtl8139_rx() # # ChangeSet # 2004/08/24 23:34:00-04:00 akpm@osdl.org # [PATCH] 8139too: Rx fifo/overflow recovery # # From: Francois Romieu # # This patch allows to update the interrupt status register after an Rx # overflow or a Rx fifo error even when the Rx buffer contains no packet. # The update must be kept in the packet processing loop to prevent an Rx # error storm. As an interesting behavior, the status of the interrupt # status register must not be read early. # # Signed-off-by: Francois Romieu # Signed-off-by: Andrew Morton # # drivers/net/8139too.c # 2004/08/24 22:18:36-04:00 akpm@osdl.org +26 -15 # 8139too: Rx fifo/overflow recovery # # ChangeSet # 2004/08/24 23:33:49-04:00 akpm@osdl.org # [PATCH] via-velocity: wrong module name in Kconfig documentation # # From: Francois Romieu # # Copy/paste abuse. # # Signed-off-by: Andrew Morton # # drivers/net/Kconfig # 2004/08/24 22:18:36-04:00 akpm@osdl.org +1 -1 # via-velocity: wrong module name in Kconfig documentation # # ChangeSet # 2004/08/24 23:33:39-04:00 akpm@osdl.org # [PATCH] drivers/net/wan/cycx_x25.c:189: warning: conflicting types for built-in function 'log2' # # From: Jesper Juhl # # To silence the warning in $subject, rename log2 to cycx_log2 in this file # to remove the clash, so there's no doubt that this file uses it's own # defined log2 function. # # Signed-off-by: Jesper Juhl # Signed-off-by: Andrew Morton # # drivers/net/wan/cycx_x25.c # 2004/08/24 22:18:34-04:00 akpm@osdl.org +3 -3 # drivers/net/wan/cycx_x25.c:189: warning: conflicting types for built-in function 'log2' # # ChangeSet # 2004/08/24 23:26:50-04:00 akpm@osdl.org # [PATCH] fix net/hamradio/dmascc with gcc 3.4 # # From: Adrian Bunk # # drivers/net/hamradio/dmascc.c: In function `scc_isr': # drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining # failed in call to 'z8530_isr': function body not available # drivers/net/hamradio/dmascc.c:969: sorry, unimplemented: called from # here # drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining # failed in call to 'z8530_isr': function body not available # drivers/net/hamradio/dmascc.c:978: sorry, unimplemented: called from # here # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/hamradio/dmascc.c # 2004/08/24 22:18:35-04:00 akpm@osdl.org +144 -146 # fix net/hamradio/dmascc with gcc 3.4 # # ChangeSet # 2004/08/24 23:26:40-04:00 akpm@osdl.org # [PATCH] sk98lin/skge.c doesn't compile with PROC_FS=n # # From: Adrian Bunk # # drivers/net/sk98lin/skge.c: In function `skge_remove_one': # drivers/net/sk98lin/skge.c:5116: warning: implicit declaration of function `remove_proc_entry' # drivers/net/sk98lin/skge.c:5116: `pSkRootDir' undeclared (first use in this function) # drivers/net/sk98lin/skge.c:5116: (Each undeclared identifier is reported only once # drivers/net/sk98lin/skge.c:5116: for each function it appears in.) # drivers/net/sk98lin/skge.c: In function `skge_init': # drivers/net/sk98lin/skge.c:5188: `SK_Root_Dir_entry' undeclared (first use in this function) # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/sk98lin/skge.c # 2004/08/24 22:18:35-04:00 akpm@osdl.org +1 -4 # sk98lin/skge.c doesn't compile with PROC_FS=n # # ChangeSet # 2004/08/24 23:26:29-04:00 jejb@mulgrave.(none) # scsi_mid_low_api.txt update # # From: Douglas Gilbert # # Signed-off-by: James Bottomley # # ChangeSet # 2004/08/24 23:26:28-04:00 akpm@osdl.org # [PATCH] via-velocity: more inetaddr_notifier fix # # From: Francois Romieu # # There is no guarantee that the event which gets passed is associated to a # via-velocity device, thus preventing to dereference dev->priv as if it # always was a struct velocity_info *. The via-velocity devices are kept in # a module private list for comparison. # # Signed-off-by: Francois Romieu # Signed-off-by: Andrew Morton # # drivers/net/via-velocity.h # 2004/08/24 22:18:34-04:00 akpm@osdl.org +1 -2 # via-velocity: more inetaddr_notifier fix # # drivers/net/via-velocity.c # 2004/08/24 22:18:34-04:00 akpm@osdl.org +54 -18 # via-velocity: more inetaddr_notifier fix # # ChangeSet # 2004/08/24 23:26:18-04:00 akpm@osdl.org # [PATCH] ixgb_main.c: fix inline compile errors # # From: Adrian Bunk # # drivers/net/ixgb/ixgb_main.c: In function `ixgb_up': # drivers/net/ixgb/ixgb_main.c:86: sorry, unimplemented: inlining failed # in call to 'ixgb_irq_enable': function body not available # drivers/net/ixgb/ixgb_main.c:234: sorry, unimplemented: called from here # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/ixgb/ixgb_main.c # 2004/08/24 22:18:34-04:00 akpm@osdl.org +66 -66 # ixgb_main.c: fix inline compile errors # # ChangeSet # 2004/08/24 23:26:07-04:00 akpm@osdl.org # [PATCH] net/tulip/dmfe.c: gcc-3.5 fixes # # From: Adrian Bunk # # CC drivers/net/tulip/dmfe.o # drivers/net/tulip/dmfe.c: In function `dmfe_rx_packet': # drivers/net/tulip/dmfe.c:323: sorry, unimplemented: inlining failed in # call to 'cal_CRC': function body not available # drivers/net/tulip/dmfe.c:936: sorry, unimplemented: called from here # make[3]: *** [drivers/net/tulip/dmfe.o] Error 1 # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/tulip/dmfe.c # 2004/08/24 22:18:33-04:00 akpm@osdl.org +15 -15 # net/tulip/dmfe.c: gcc-3.5 fixes # # ChangeSet # 2004/08/24 23:25:57-04:00 akpm@osdl.org # [PATCH] net/rrunner.c: gcc-3.5 fixes # # From: Adrian Bunk # # CC drivers/net/rrunner.o # drivers/net/rrunner.c: In function `rr_timer': # drivers/net/rrunner.h:846: sorry, unimplemented: inlining failed in call # to 'rr_raz_tx': function body not available # drivers/net/rrunner.c:1155: sorry, unimplemented: called from here # drivers/net/rrunner.h:847: sorry, unimplemented: inlining failed in call # to 'rr_raz_rx': function body not available # drivers/net/rrunner.c:1156: sorry, unimplemented: called from here # make[2]: *** [drivers/net/rrunner.o] Error 1 # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/rrunner.c # 2004/08/24 22:18:33-04:00 akpm@osdl.org +43 -43 # net/rrunner.c: gcc-3.5 fixes # # Documentation/scsi/scsi_mid_low_api.txt # 2004/08/24 23:25:48-04:00 jejb@mulgrave.(none) +170 -86 # scsi_mid_low_api.txt update # # ChangeSet # 2004/08/24 23:25:47-04:00 akpm@osdl.org # [PATCH] net/hamachi.c: gcc-3.5 build fixes # # From: Adrian Bunk # # CC drivers/net/hamachi.o # drivers/net/hamachi.c: In function `hamachi_interrupt': # drivers/net/hamachi.c:562: sorry, unimplemented: inlining failed in call # to 'hamachi_rx': function body not available # drivers/net/hamachi.c:1402: sorry, unimplemented: called from here # make[2]: *** [drivers/net/hamachi.o] Error 1 # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/hamachi.c # 2004/08/24 22:18:33-04:00 akpm@osdl.org +1 -1 # net/hamachi.c: gcc-3.5 build fixes # # ChangeSet # 2004/08/24 23:25:36-04:00 akpm@osdl.org # [PATCH] net/smc9194.c: fix gcc-3.5 inline compile errors # # From: Adrian Bunk # # CC drivers/net/smc9194.o # drivers/net/smc9194.c: In function `smc_interrupt': # drivers/net/smc9194.c:278: sorry, unimplemented: inlining failed in call # to 'smc_rcv': function body not available # drivers/net/smc9194.c:1254: sorry, unimplemented: called from here # drivers/net/smc9194.c:283: sorry, unimplemented: inlining failed in call # to 'smc_tx': function body not available # drivers/net/smc9194.c:1258: sorry, unimplemented: called from here # make[2]: *** [drivers/net/smc9194.o] Error 1 # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/smc9194.c # 2004/08/24 22:18:33-04:00 akpm@osdl.org +128 -127 # net/smc9194.c: fix gcc-3.5 inline compile errors # # ChangeSet # 2004/08/24 23:25:26-04:00 akpm@osdl.org # [PATCH] e1000 inlining fix # # From: Nick Orlov # # e1000 fixes for gcc-3.4.1 # # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000_main.c # 2004/08/24 22:18:32-04:00 akpm@osdl.org +6 -6 # e1000 inlining fix # # ChangeSet # 2004/08/24 23:25:15-04:00 akpm@osdl.org # [PATCH] e1000 build fix # # drivers/net/e1000/e1000_main.c: In function `e1000_up': # drivers/net/e1000/e1000_main.c:136: sorry, unimplemented: inlining failed # in call to 'e1000_irq_enable': function body not available # drivers/net/e1000/e1000_main.c:274: sorry, unimplemented: called from here # # # Signed-off-by: Andrew Morton # # drivers/net/e1000/e1000_main.c # 2004/08/24 22:18:32-04:00 akpm@osdl.org +2 -2 # e1000 build fix # # ChangeSet # 2004/08/24 23:25:05-04:00 akpm@osdl.org # [PATCH] sk98lin procfs fix # # From: Christoph Hellwig # # sk98line tries to register a procfile with the interfacename of the struct # net_device. The patch below (ontop of the previous one) makes it work # unless you change the interface name manually, but as Linux explicitly # allows that the interface is fundamentally broken and probably should just # go away. # # Signed-off-by: Andrew Morton # # drivers/net/sk98lin/skge.c # 2004/08/24 22:18:31-04:00 akpm@osdl.org +4 -1 # sk98lin procfs fix # # ChangeSet # 2004/08/24 23:24:55-04:00 akpm@osdl.org # [PATCH] R8169_NAPI help text # # From: Adrian Bunk # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # # drivers/net/Kconfig # 2004/08/24 22:18:31-04:00 akpm@osdl.org +13 -1 # R8169_NAPI help text # # ChangeSet # 2004/08/24 17:20:56-07:00 tgraf@suug.ch # [NET]: Device mtu/txqlen/ifmap via rtnetlink. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/core/rtnetlink.c # 2004/08/24 17:20:27-07:00 tgraf@suug.ch +74 -11 # [NET]: Device mtu/txqlen/ifmap via rtnetlink. # # include/linux/rtnetlink.h # 2004/08/24 17:20:27-07:00 tgraf@suug.ch +4 -0 # [NET]: Device mtu/txqlen/ifmap via rtnetlink. # # ChangeSet # 2004/08/24 17:10:20-07:00 shemminger@osdl.org # [NET]: Another cleanup in netif_receive_skb() # # Move rcu_read_lock up a little, since it needs to be # done in both branches anyway. Also whitespace fix. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 17:08:33-07:00 shemminger@osdl.org # [NET]: deliver_skb() cleanup # # Cleanup of deliver_skb: get rid of unused argument and use it # in the NET_CLS_ACT hook. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 17:03:36-07:00 herbert@gondor.apana.org.au # [NET]: Use pskb_expand_head() instead of skb_copy() in skb_checksum_help(). # # Here is the patch that you wanted to shoot holes at :) # # The idea is simple. None of the callers of skb_checksum are passing it # skb's which are shared. They may be cloned however. But the application # checksum is always in the skb header so there is no need to linearise it. # # Supposing all these assumptions are correct, then we can avoid the overhead # of skb_copy() and get away with pskb_expand_head(). # # If the assumption is wrong, we will find out because # pskb_expand_head() will BUG() if skb_shared() is true. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 19:53:17-04:00 jejb@mulgrave.(none) # fix NC5380 locking and delayed work handling # # From: Christoph Hellwig # # - move delayed workqueue handling to schedule_delayed_work instead # of the old horrible global list thing # - add NCR5380_exit to make sure all delayed work is flushed on HBA # (or module) removal # - fix locking # # Patch fixed up to apply and # Signed-off-by: James Bottomley # # drivers/scsi/t128.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/pas16.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/mac_scsi.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/g_NCR5380.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +4 -2 # fix NC5380 locking and delayed work handling # # drivers/scsi/dtc.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/dmx3191d.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +2 -1 # fix NC5380 locking and delayed work handling # # drivers/scsi/arm/oak.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/arm/ecoscsi.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/arm/cumana_1.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -0 # fix NC5380 locking and delayed work handling # # drivers/scsi/NCR5380.h # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +1 -2 # fix NC5380 locking and delayed work handling # # drivers/scsi/NCR5380.c # 2004/08/24 19:42:28-04:00 jejb@mulgrave.(none) +38 -179 # fix NC5380 locking and delayed work handling # # ChangeSet # 2004/08/24 16:41:38-07:00 davem@nuts.davemloft.net # [SPARC64]: Save/restore %asi properly in signal handling. # # Signed-off-by: David S. Miller # # include/asm-sparc64/sigcontext.h # 2004/08/24 16:40:58-07:00 davem@nuts.davemloft.net +0 -12 # [SPARC64]: Save/restore %asi properly in signal handling. # # include/asm-sparc/sigcontext.h # 2004/08/24 16:40:58-07:00 davem@nuts.davemloft.net +0 -14 # [SPARC64]: Save/restore %asi properly in signal handling. # # arch/sparc64/kernel/signal32.c # 2004/08/24 16:40:58-07:00 davem@nuts.davemloft.net +26 -1 # [SPARC64]: Save/restore %asi properly in signal handling. # # arch/sparc64/kernel/signal.c # 2004/08/24 16:40:58-07:00 davem@nuts.davemloft.net +5 -5 # [SPARC64]: Save/restore %asi properly in signal handling. # # ChangeSet # 2004/08/24 16:34:01-07:00 stern@rowland.harvard.edu # [PATCH] USB: Update unlink testing code in the usbtest driver # # Greg: # # This patch updates the part of the usbtest driver that tests URB # unlinking. The move to usb_kill_urb() invalidated some of the old tests. # There's a corresponding change to the UHCI driver, causing it to return a # more descriptive error code in the rare event that an URB is cancelled # after it has been linked but before it has been queued. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/misc/usbtest.c # 2004/08/23 03:51:39-07:00 stern@rowland.harvard.edu +17 -14 # USB: Update unlink testing code in the usbtest driver # # drivers/usb/host/uhci-hcd.c # 2004/08/23 03:46:17-07:00 stern@rowland.harvard.edu +3 -2 # USB: Update unlink testing code in the usbtest driver # # ChangeSet # 2004/08/24 19:27:53-04:00 jejb@mulgrave.(none) # Merge # # drivers/pci/pci.ids # 2004/08/24 19:24:39-04:00 jejb@mulgrave.(none) +4 -10 # SCCS merged # # ChangeSet # 2004/08/24 16:19:31-07:00 dtor_core@ameritech.net # [PATCH] kobject: fix kobject_set_name comment. # # Signed-off-by: Dmitry Torokhov # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 16:12:03-07:00 david-b@pacbell.net # [PATCH] USB: isp1301_omap driver (OTG core) # # This adds the isp1301_omap driver, supporting USB OTG on OMAP systems. # The driver tightly couples two different chunks of hardware, which are # used to implement the OTG protocols: # # - The Philips ISP1301 OTG transceiver (an I2C device) senses voltage # levels and sources VBUS current in the A-Device roles. # # - OMAP's OTG controller handles lots of OTG transitions, and # tells the transceiver what to do. # # The driver implements the abstract "otg_transceiver" API, since it's got to # talk to both the host controller (OHCI on current OMAPs) and the peripheral # controller (omap_udc) while hiding a variety of implementation details. It # should be easy to tweak to work on other OMAP boards using the isp1301 chip; # OMAP boards with other transceivers, or non-OMAP boards using isp1301, will # probably find things to learn from. # # Note that this also supports two non-OTG modes, with the OTG controller # disabled; very handy for debugging just the host side USB stack, or just the # peripheral side USB stack. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/isp1301_omap.c # 2004/08/24 12:02:11-07:00 david-b@pacbell.net +1660 -0 # USB: isp1301_omap driver (OTG core) # # drivers/i2c/chips/Makefile # 2004/08/24 12:02:11-07:00 david-b@pacbell.net +2 -0 # USB: isp1301_omap driver (OTG core) # # drivers/i2c/chips/Kconfig # 2004/08/24 12:02:11-07:00 david-b@pacbell.net +12 -0 # USB: isp1301_omap driver (OTG core) # # drivers/i2c/chips/isp1301_omap.c # 2004/08/24 12:02:11-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/i2c/chips/isp1301_omap.c # # include/scsi/scsi.h # 2004/08/24 19:09:04-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # include/linux/pci_ids.h # 2004/08/24 19:09:04-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/aic7xxx/aic79xx_osm.c # 2004/08/24 19:09:04-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/tmscsim.c # 2004/08/24 19:09:03-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/sg.c # 2004/08/24 19:09:03-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/sd.c # 2004/08/24 19:09:03-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/scsi/imm.c # 2004/08/24 19:09:03-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # drivers/block/scsi_ioctl.c # 2004/08/24 19:09:02-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # MAINTAINERS # 2004/08/24 19:09:02-04:00 jejb@mulgrave.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/24 16:07:32-07:00 david-b@pacbell.net # [PATCH] USB: ohci_omap updates # # This updates the OMAP OHCI support to match the latest from the # Linux-OMAP tree. Notable changes from the preceding version: # # - Use the new USB init model (arch/arm/mach-omap/usb.c). # # - The OMAP-specific bus is gone; it now uses platform_device. # (Update from Tony Lindgren.) # # - Works on the H2 board, which requires the external isp1301 # transceiver even in non-OTG configurations. # # - Adds OTG support. # # - Adds basic power management calls. # # The mach-omap/Kconfig file in the main Linux tree is a bit out of # date, it doesn't know about CONFIG_ARCH_OMAP_OTG (for the OMAPs that # have OTG silicon). # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci.h # 2004/08/24 13:38:01-07:00 david-b@pacbell.net +7 -0 # USB: ohci_omap updates # # drivers/usb/host/ohci-omap.c # 2004/08/24 12:27:05-07:00 david-b@pacbell.net +263 -295 # USB: ohci_omap updates # # drivers/usb/host/ohci-hcd.c # 2004/08/24 13:38:01-07:00 david-b@pacbell.net +2 -1 # USB: ohci_omap updates # # drivers/usb/host/Kconfig # 2004/08/24 13:37:26-07:00 david-b@pacbell.net +1 -0 # USB: ohci_omap updates # # BitKeeper/deleted/.del-ohci-omap.h~336ff934ba807595 # 2004/08/24 16:07:16-07:00 david-b@pacbell.net +0 -0 # Delete: drivers/usb/host/ohci-omap.h # # ChangeSet # 2004/08/24 15:58:54-07:00 greg@kroah.com # USB: rip the pwc decompressor hooks out of the kernel, as they are a GPL violation. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc.h # 2004/08/24 15:56:56-07:00 greg@kroah.com +0 -6 # USB: rip the pwc decompressor hooks out of the kernel, as they are a GPL violation. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc-if.c # 2004/08/24 15:56:56-07:00 greg@kroah.com +1 -34 # USB: rip the pwc decompressor hooks out of the kernel, as they are a GPL violation. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/pwc-ctrl.c # 2004/08/24 15:56:56-07:00 greg@kroah.com +0 -9 # USB: rip the pwc decompressor hooks out of the kernel, as they are a GPL violation. # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/Makefile # 2004/08/24 15:56:56-07:00 greg@kroah.com +1 -1 # USB: rip the pwc decompressor hooks out of the kernel, as they are a GPL violation. # # Signed-off-by: Greg Kroah-Hartman # # BitKeeper/deleted/.del-pwc-uncompress.h~793ccf26934187ad # 2004/08/24 15:58:21-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-uncompress.h # # BitKeeper/deleted/.del-pwc-uncompress.c~91b54980d570c500 # 2004/08/24 15:58:20-07:00 greg@kroah.com +0 -0 # Delete: drivers/usb/media/pwc-uncompress.c # # ChangeSet # 2004/08/24 17:50:19-05:00 stevef@stevef95.austin.ibm.com # CIFS: remove deprecated sleep_on_timeout # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/transport.c # 2004/08/24 17:50:09-05:00 stevef@stevef95.austin.ibm.com +17 -15 # remove deprecated sleep_on_timeout # # ChangeSet # 2004/08/24 18:48:27-04:00 dougg@torque.net # [PATCH] scsi_level constants in scsi.h # # The scsi_level value in struct scsi_device is a bit # mysterious. Hopefully this patch makes it a bit clearer # since it is visible via sysfs. # # Changes: # - add scsi_level constants for SPC-2 and SPC-3 # - comment on relationship between scsi_level and INQUIRY response # # Signed-off-by: James Bottomley # # include/scsi/scsi.h # 2004/08/24 07:34:26-04:00 dougg@torque.net +7 -2 # scsi_level constants in scsi.h # # ChangeSet # 2004/08/24 18:43:40-04:00 akpm@osdl.org # [PATCH] reduce aacraid namespace polution # # From: Jens Axboe # # This easily clashes with others (it's been seen, hence the patch), so lets # move aacraid log levels to something a little more private. # # Signed-off-by: Jens Axboe # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/commsup.c # 2004/08/16 01:49:55-04:00 akpm@osdl.org +1 -1 # reduce aacraid namespace polution # # drivers/scsi/aacraid/aacraid.h # 2004/08/16 01:49:55-04:00 akpm@osdl.org +9 -9 # reduce aacraid namespace polution # # ChangeSet # 2004/08/24 18:22:21-04:00 akpm@osdl.org # [PATCH] eata_pio.c warning fix # # drivers/scsi/eata_pio.c: In function `eata_pio_host_reset': # drivers/scsi/eata_pio.c:514: warning: implicit declaration of function `msleep' # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/eata_pio.c # 2004/08/04 22:31:42-04:00 akpm@osdl.org +2 -0 # eata_pio.c warning fix # # ChangeSet # 2004/08/24 15:11:07-07:00 greg@kroah.com # USB: Remove struct urb->timeout as it does not work # # Well, it works only for UHCI controllers, but that's not acceptable... # # Signed-off-by: Greg Kroah-Hartman # # include/linux/usb.h # 2004/08/24 15:10:19-07:00 greg@kroah.com +2 -5 # USB: Remove struct urb->timeout as it does not work # # Well, it works only for UHCI controllers, but that's not acceptable... # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/media/stv680.c # 2004/08/24 15:10:19-07:00 greg@kroah.com +0 -1 # USB: Remove struct urb->timeout as it does not work # # Well, it works only for UHCI controllers, but that's not acceptable... # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/uhci-hcd.c # 2004/08/24 15:10:19-07:00 greg@kroah.com +0 -7 # USB: Remove struct urb->timeout as it does not work # # Well, it works only for UHCI controllers, but that's not acceptable... # # Signed-off-by: Greg Kroah-Hartman # # drivers/net/irda/irda-usb.c # 2004/08/24 15:10:19-07:00 greg@kroah.com +0 -3 # USB: Remove struct urb->timeout as it does not work # # Well, it works only for UHCI controllers, but that's not acceptable... # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 17:25:17-04:00 akpm@osdl.org # [PATCH] i2o maintainer # # From: Markus Lidel # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # MAINTAINERS # 2004/08/17 11:05:47-04:00 akpm@osdl.org +6 -0 # i2o maintainer # # ChangeSet # 2004/08/24 17:21:14-04:00 akpm@osdl.org # [PATCH] I2O: removes multiplexer notification and use # # From: Markus Lidel # # - remove the multiplexer notification and replace it with a type-safe # function for each event (controller add/remove, device add/remove). # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # include/linux/i2o.h # 2004/08/19 12:24:16-04:00 akpm@osdl.org +55 -14 # I2O: removes multiplexer notification and use # # drivers/message/i2o/iop.c # 2004/08/19 12:24:16-04:00 akpm@osdl.org +2 -2 # I2O: removes multiplexer notification and use # # drivers/message/i2o/i2o_scsi.c # 2004/08/19 12:24:16-04:00 akpm@osdl.org +44 -41 # I2O: removes multiplexer notification and use # # drivers/message/i2o/driver.c # 2004/08/19 12:24:16-04:00 akpm@osdl.org +81 -9 # I2O: removes multiplexer notification and use # # drivers/message/i2o/device.c # 2004/08/19 12:24:16-04:00 akpm@osdl.org +3 -0 # I2O: removes multiplexer notification and use # # ChangeSet # 2004/08/24 13:38:39-07:00 zaitcev@redhat.com # [PATCH] USB: ub patch to use add_timer # # It just occured to me that urb->timeout is not functional. # # drivers/block/ub.c # 2004/08/23 17:02:30-07:00 zaitcev@redhat.com +70 -10 # USB: ub patch to use add_timer # # ChangeSet # 2004/08/24 22:36:35+02:00 sam@mars.ravnborg.org # kbuild: fix cc-version # # cc-version needs to use $(shell to get the gcc version. # Before if gave the following error when building the kernel: # # /bin/sh: line 1: [: too many arguments # # And all checks for gcc version were broken. # # Signed-off-by: Sam Ravnborg # # Makefile # 2004/08/24 22:34:30+02:00 sam@mars.ravnborg.org +2 -2 # fix cc-version # # ChangeSet # 2004/08/24 22:24:31+02:00 sam@mars.ravnborg.org # Merge mars.ravnborg.org:/home/sam/bk/linux-2.6 # into mars.ravnborg.org:/home/sam/bk/kbuild # # arch/arm/kernel/Makefile # 2004/08/24 22:24:23+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # arch/arm/Makefile # 2004/08/24 22:24:23+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # arch/arm/Kconfig # 2004/08/24 22:24:23+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 13:16:15-07:00 jfs.adm@hostme.bitkeeper.com # Merge bk://linux.bkbits.net/linux-2.5 # into hostme.bitkeeper.com:/repos/j/jfs/linux-2.5 # # fs/jfs/jfs_txnmgr.c # 2004/08/24 13:16:08-07:00 jfs.adm@hostme.bitkeeper.com +0 -0 # Auto merged # # ChangeSet # 2004/08/24 21:15:27+01:00 davej@redhat.com # [CPUFREQ] Remove fsb argument from longhauls calc_speed() # It's being passed a global everywhere, so it may as well directly reference it. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 21:15:16+01:00 davej@redhat.com +8 -8 # [CPUFREQ] Remove fsb argument from longhauls calc_speed() # It's being passed a global everywhere, so it may as well directly reference it. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 15:46:20-04:00 akpm@osdl.org # [PATCH] I2O: fixes compiler warning on x86_64 in i2o_config # # From: Markus Lidel # # - use compat_ptr to convert 32-bit pointer to 64-bit pointer in # i2o_cfg_passthru32. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/message/i2o/i2o_config.c # 2004/08/19 12:24:05-04:00 akpm@osdl.org +4 -1 # I2O: fixes compiler warning on x86_64 in i2o_config # # ChangeSet # 2004/08/24 12:43:49-07:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # security/selinux/hooks.c # 2004/08/24 12:43:46-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 12:40:58-07:00 torvalds@ppc970.osdl.org # Merge bk://ppc.bkbits.net/for-linus-ppc # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # kernel/sysctl.c # 2004/08/24 12:40:55-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # arch/ppc/Kconfig # 2004/08/24 12:40:55-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/08/24 12:40:54-07:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 12:33:27-07:00 axboe@suse.de # [PATCH] GPCMD_SEND_CUE_SHEET missing in scsi_ioctl # # Forgot one command, GPCMD_SEND_CUE_SHEET is also ok for write open. # # Signed-off-by: Jens Axboe # Signed-off-by: Linus Torvalds # # drivers/block/scsi_ioctl.c # 2004/08/24 06:10:37-07:00 axboe@suse.de +1 -0 # GPCMD_SEND_CUE_SHEET missing in scsi_ioctl # # ChangeSet # 2004/08/24 12:29:18-07:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] /dev/ptmx open() fixes # # If tty_open() fails for a normal serial device, we end up doing cleanups # that should only happen for failed open of /dev/ptmx. The results are # not pretty - devpts et.al. end up very confused. That's what gave # problems with ptmx. # # This splits ptmx file_operations from the normal case and cleans up both # tty_open() and (new) ptmx_open(). Survived serious beating. # # drivers/char/tty_io.c # 2004/08/10 01:31:45-07:00 viro@parcelfarce.linux.theplanet.co.uk +77 -56 # /dev/ptmx open() fixes # # ChangeSet # 2004/08/24 12:29:06-07:00 wli@holomorphy.com # [PATCH] Missing free_area_init_node() conversions # # Update architectures for the free_area_init_node() API change. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/v850/kernel/setup.c # 2004/08/24 11:05:57-07:00 wli@holomorphy.com +2 -2 # Missing free_area_init_node() conversions # # arch/sh64/mm/init.c # 2004/08/24 11:05:57-07:00 wli@holomorphy.com +2 -2 # Missing free_area_init_node() conversions # # arch/sh/mm/init.c # 2004/08/24 11:05:57-07:00 wli@holomorphy.com +2 -2 # Missing free_area_init_node() conversions # # arch/ppc64/mm/numa.c # 2004/08/24 11:06:27-07:00 wli@holomorphy.com +5 -6 # Missing free_area_init_node() conversions # # arch/cris/arch-v10/mm/init.c # 2004/08/24 11:05:57-07:00 wli@holomorphy.com +1 -1 # Missing free_area_init_node() conversions # # arch/arm26/mm/init.c # 2004/08/24 11:05:57-07:00 wli@holomorphy.com +2 -2 # Missing free_area_init_node() conversions # # ChangeSet # 2004/08/24 12:28:55-07:00 trond.myklebust@fys.uio.no # [PATCH] Undo broken FH conversion that broke nfsroot compile # # That conversion to nfs_fh_copy() is bogus since we're not copying into # an nfs_fh anyway. Just revert it. # # fs/nfs/nfsroot.c # 2004/08/24 10:18:32-07:00 trond.myklebust@fys.uio.no +4 -2 # Undo broken FH conversion that broke nfsroot compile # # ChangeSet # 2004/08/24 21:23:46+02:00 sam@mars.ravnborg.org # Merge mars.ravnborg.org:/home/sam/bk/linux-2.6 # into mars.ravnborg.org:/home/sam/bk/kbuild # # arch/arm/kernel/Makefile # 2004/08/24 21:23:37+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # arch/arm/Makefile # 2004/08/24 21:23:37+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # arch/arm/Kconfig # 2004/08/24 21:23:37+02:00 sam@mars.ravnborg.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 12:08:00-07:00 greg@kroah.com # USB: fix bad value in kaweth.c driver # # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/net/kaweth.c # 2004/08/24 12:07:46-07:00 greg@kroah.com +1 -1 # USB: fix bad value in kaweth.c driver # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 11:56:52-07:00 david-b@pacbell.net # [PATCH] USB OTG: doc updates (5/5) # # Gadget API update. Covers OTG support, lists a few more # types of hardware support, mentions gadget driver updates # including RNDIS, serial with CDC-ACM, and gadgetfs AIO. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # include/linux/usb_gadget.h # 2004/08/21 17:37:06-07:00 david-b@pacbell.net +0 -6 # USB OTG: doc updates (5/5) # # Documentation/DocBook/gadget.tmpl # 2004/08/21 17:34:24-07:00 david-b@pacbell.net +216 -29 # USB OTG: doc updates (5/5) # # ChangeSet # 2004/08/24 11:56:26-07:00 david-b@pacbell.net # [PATCH] USB OTG: gadget zero (4/5) # # Minor gadget zero fixes: # # - correct string descriptions: they're always UTF-8 # - for OTG, report HNP and remote wakeup support # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/gadget/zero.c # 2004/08/18 10:00:49-07:00 david-b@pacbell.net +9 -2 # USB OTG: gadget zero (4/5) # # ChangeSet # 2004/08/24 11:55:57-07:00 david-b@pacbell.net # [PATCH] USB OTG: usbcore enumeration (3/5) # # Teach usbcore how to enumerate OTG devices and perform HNP: # # - CONFIG_USB_OTG is a boolean; it selects CONFIG_USB_SUSPEND. # Boards with a Mini-AB connector should offer it as a config # option; no other hardware could support OTG. # # - Before resetting a port, make sure it's not still suspended. # (For example, after an HNP role switch.) # # - When an OTG A-Host enumerates a dual-role device, set the # appropriate device feature: B_HNP_ENABLE if it's connected # to the OTG port, otherwise A_ALT_HNP_SUPPORT. # # - When an OTG B-Host enumerates a dual-role device, don't # bother debouncing ... the power session is stable already, # the A-Host already debounced. # # - The OTG "Targeted Peripheral List" lives in a product-customized # "otg_whitelist.h" header. # # - CONFIG_USB_OTG_WHITELIST lets developers choose to ignore whitelist # failures, so unsupported devices can be configured anyway. # # - If the whitelist check fails, immediately suspend the device. # # * For dual-role devices, that triggers HNP so the other device # can try to act as host. # # * For peripheral-only devices, that conserves power ... but not # quite as much as turning off power on that port, which should # eventually be done with OTG ports (and all other ports that # support SRP). # # The whitelist logic tries to make use of the existing usb_device_id # logic, but since the interface info isn't available that early it's # a bit awkward use information anywhere outside the device descriptor. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/core/otg_whitelist.h # 2004/07/28 13:23:18-07:00 david-b@pacbell.net +112 -0 # USB OTG: usbcore enumeration (3/5) # # drivers/usb/core/hub.c # 2004/08/21 17:15:32-07:00 david-b@pacbell.net +87 -0 # USB OTG: usbcore enumeration (3/5) # # drivers/usb/core/Kconfig # 2004/07/28 13:23:18-07:00 david-b@pacbell.net +26 -0 # USB OTG: usbcore enumeration (3/5) # # drivers/usb/core/otg_whitelist.h # 2004/07/28 13:23:18-07:00 david-b@pacbell.net +0 -0 # BitKeeper file /home/greg/linux/BK/usb-2.6/drivers/usb/core/otg_whitelist.h # # ChangeSet # 2004/08/24 11:55:24-07:00 david-b@pacbell.net # [PATCH] USB OTG: ohci reset updates (2/5) # # Generic OTG and reset support for OTG. # # - Declare and use a start_hnp() board-specific procedure. The OMAP # implementation will come separately, it can't yet be configured. # # - When OTG is configured, implement the usb_bus_start_enum() hook; # that just starts a root port reset. # # - When some task (usually khubd) resets a root port, make sure it takes # the full 50 msec. The OHCI reset timer is in hardware, and the host # may need to issue multiple resets to guard against concurrent resume. # # - For backward compatibility, don't kick in the new 50 msec logic unless # it could be needed: without CONFIG_USB_SUSPEND, nothing will suspend # so nothing could resume. Which is good, at least until we start to # measure how long a reset takes ... it seems chip-specific. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # drivers/usb/host/ohci-q.c # 2004/08/20 15:52:58-07:00 david-b@pacbell.net +0 -3 # USB OTG: ohci reset updates (2/5) # # drivers/usb/host/ohci-pci.c # 2004/08/21 16:33:44-07:00 david-b@pacbell.net +2 -1 # USB OTG: ohci reset updates (2/5) # # drivers/usb/host/ohci-omap.c # 2004/08/21 17:36:08-07:00 david-b@pacbell.net +1 -0 # USB OTG: ohci reset updates (2/5) # # drivers/usb/host/ohci-hub.c # 2004/08/21 16:33:45-07:00 david-b@pacbell.net +90 -4 # USB OTG: ohci reset updates (2/5) # # ChangeSet # 2004/08/24 11:54:54-07:00 david-b@pacbell.net # [PATCH] USB OTG: add usb_bus_start_enum() (1/5) # # Define a new usb_bus_start_enum() routine that's available with OTG. # It starts immediate enumeration (port reset) and makes khubd wake up # later. Non-OTG code could start to use this, given some attention to # HC-specific reset timing issues. # # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # include/linux/usb_otg.h # 2004/08/21 17:37:06-07:00 david-b@pacbell.net +2 -0 # USB OTG: add usb_bus_start_enum() (1/5) # # drivers/usb/core/hcd.h # 2004/08/21 16:33:26-07:00 david-b@pacbell.net +1 -0 # USB OTG: add usb_bus_start_enum() (1/5) # # drivers/usb/core/hcd.c # 2004/08/21 16:33:32-07:00 david-b@pacbell.net +39 -0 # USB OTG: add usb_bus_start_enum() (1/5) # # ChangeSet # 2004/08/24 11:46:22-07:00 bunk@fs.tum.de # [PATCH] Alex DeVries has moved # # The patch below replaces all occurences of two bouncing email addresses of # Alex deVries in the kernel with his current address. # # It's already ACK'ed by Alex deVries. # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # sound/oss/harmony.c # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +2 -2 # Alex DeVries has moved # # drivers/parisc/superio.c # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +1 -1 # Alex DeVries has moved # # drivers/parisc/lasi.c # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +1 -1 # Alex DeVries has moved # # drivers/input/serio/gscps2.c # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +1 -1 # Alex DeVries has moved # # arch/parisc/kernel/hardware.c # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +1 -1 # Alex DeVries has moved # # CREDITS # 2004/08/24 02:09:07-07:00 bunk@fs.tum.de +1 -1 # Alex DeVries has moved # # ChangeSet # 2004/08/24 11:46:09-07:00 davej@redhat.com # [PATCH] describe Intel cache descriptors. # # Describe what the Intel cache descriptors actually mean in comments. Taken # from 24151827.pdf. # # Signed-off-by: Dave Jones # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/cpu/intel.c # 2004/08/24 02:09:07-07:00 davej@redhat.com +38 -38 # describe Intel cache descriptors. # # ChangeSet # 2004/08/24 11:45:58-07:00 arjanv@redhat.com # [PATCH] Fix fs/locks.c init order # # The patch below fixes an interesting oddity we're seeing with fedora core # development (where we recently started using udev heavily); basically right # now filelock_init() is a module_init(), eg runs late. However that breaks # down because there are earlier /sbin/hotplug callouts, which with udev, do # locking operations. When that happens the kernel oopses because the slabs # for file locks aren't initialized yet. # # Solution: initialize this way early. It's only a kmem_cache_create after # all, so can happen early. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/locks.c # 2004/08/24 02:09:06-07:00 arjanv@redhat.com +1 -1 # Fix fs/locks.c init order # # ChangeSet # 2004/08/24 11:45:48-07:00 olh@suse.de # [PATCH] remove obsolete zero-paged in Documentation/sysctl/kernel.txt # # This entry was removed during 2.5 development. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sysctl/kernel.txt # 2004/08/24 02:09:06-07:00 olh@suse.de +0 -9 # remove obsolete zero-paged in Documentation/sysctl/kernel.txt # # ChangeSet # 2004/08/24 11:45:37-07:00 olh@suse.de # [PATCH] remove obsolete htab-reclaim in Documentation/sysctl/kernel.txt # # This entry is long gone, even 2.4 doesnt have it anymore. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sysctl/kernel.txt # 2004/08/24 02:09:06-07:00 olh@suse.de +0 -9 # remove obsolete htab-reclaim in Documentation/sysctl/kernel.txt # # ChangeSet # 2004/08/24 11:45:25-07:00 hch@lst.de # [PATCH] inode time update funnies in ncpfs # # ncfpfs seems to update inode times by hand everywhere instead of using # the proper helpers. This means: # # - the atime updates in mmap() and read() seems to miss various checks # upodate_atime or one of the wrappers does. Also it doesn't mark the # inode dirty. # - in write() you update mtime and _a_time instead of ctime as expected, # also the usual checks and optimizations are missing. # # In addition the fops contain some bogus checks like for a refular file (but # the fops are only used of ISREG files) and inode->i_sb although that is # guranteed to be non-zero. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/ncpfs/mmap.c # 2004/08/24 02:09:06-07:00 hch@lst.de +3 -7 # inode time update funnies in ncpfs # # fs/ncpfs/file.c # 2004/08/24 02:09:06-07:00 hch@lst.de +5 -16 # inode time update funnies in ncpfs # # ChangeSet # 2004/08/24 11:45:14-07:00 amgta@yacht.ocn.ne.jp # [PATCH] show Active/Inactive on per-node meminfo # # The patch below enable to display the size of Active/Inactive pages on # per-node meminfo (/sys/devices/system/node/node%d/meminfo) like # /proc/meminfo. # # By a little change to procps, "vmstat -a" can show these statistics about # particular node. # # From: mita akinobu # # get_zone_counts() is used by max_sane_readahead(), and # max_sane_readahead() is often called in filemap_nopage(). # # Signed-off-by: Akinobu Mita # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/readahead.c # 2004/08/24 02:09:05-07:00 amgta@yacht.ocn.ne.jp +1 -1 # show Active/Inactive on per-node meminfo # # mm/page_alloc.c # 2004/08/24 02:09:05-07:00 amgta@yacht.ocn.ne.jp +23 -5 # show Active/Inactive on per-node meminfo # # include/linux/mmzone.h # 2004/08/24 02:09:05-07:00 amgta@yacht.ocn.ne.jp +2 -0 # show Active/Inactive on per-node meminfo # # drivers/base/node.c # 2004/08/24 02:09:05-07:00 amgta@yacht.ocn.ne.jp +10 -0 # show Active/Inactive on per-node meminfo # # ChangeSet # 2004/08/24 11:45:02-07:00 tim@physik3.uni-rostock.de # [PATCH] Fix bad URL in BSD acct help entry # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/Kconfig # 2004/08/24 02:09:05-07:00 tim@physik3.uni-rostock.de +1 -1 # Fix bad URL in BSD acct help entry # # ChangeSet # 2004/08/24 11:44:50-07:00 tytso@mit.edu # [PATCH] /dev/random: Remove RNDGETPOOL ioctl # # Recently, someone has kvetched that RNDGETPOOL is a "security # vulnerability". Never mind that it is superuser only, and with superuser # privs you could load a nasty kernel module, or read the entropy pool out of # /dev/mem directly, but they are nevertheless still spreading FUD. # # In any case, no one is using it (it was there for debugging purposes only), # so we can remove it as dead code. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/08/24 02:09:05-07:00 tytso@mit.edu +1 -36 # /dev/random: Remove RNDGETPOOL ioctl # # ChangeSet # 2004/08/24 11:44:39-07:00 tytso@mit.edu # [PATCH] /dev/random: Use separate entropy store for /dev/urandom # # This patch adds a separate pool for use with /dev/urandom. This prevents a # /dev/urandom read from being able to completely drain the entropy in the # /dev/random pool, and also makes it much more difficult for an attacker to # carry out a state extension attack. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/08/24 02:09:05-07:00 tytso@mit.edu +27 -9 # /dev/random: Use separate entropy store for /dev/urandom # # ChangeSet # 2004/08/24 11:44:27-07:00 tytso@mit.edu # [PATCH] /dev/random: Add pool name to entropy store # # This adds a pool name to the entropy_store data structure, which simplifies # the debugging code, and makes the code more generic for adding additional # entropy pools. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/08/24 02:09:04-07:00 tytso@mit.edu +15 -21 # /dev/random: Add pool name to entropy store # # ChangeSet # 2004/08/24 11:44:18-07:00 tytso@mit.edu # [PATCH] dev/random: Fix latency in rekeying sequence number # # Based on reports from Ingo's Latency Tracer that the TCP sequence number # rekey code is causing latency problems, I've moved the sequence number # rekey to be done out of a workqueue. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/random.c # 2004/08/24 02:09:04-07:00 tytso@mit.edu +16 -11 # dev/random: Fix latency in rekeying sequence number # # ChangeSet # 2004/08/24 11:44:06-07:00 akpm@osdl.org # [PATCH] file_ra_state_init speedup # # Marcelo points out that this function's main caller already memsets the # structure, so avoid doing it again. # # Also, an earlier knfsd patch withdrew file_ra_state_init()'s other caller, so # unexport this function. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/readahead.c # 2004/08/24 02:09:04-07:00 akpm@osdl.org +2 -3 # file_ra_state_init speedup # # ChangeSet # 2004/08/24 11:43:55-07:00 ramon.rey@hispalinux.es # [PATCH] Firmware Loader is orphan # # The author and maintainer of the firmware loader died in May. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/24 02:09:04-07:00 ramon.rey@hispalinux.es +1 -3 # Firmware Loader is orphan # # CREDITS # 2004/08/24 02:09:04-07:00 ramon.rey@hispalinux.es +3 -0 # Firmware Loader is orphan # # ChangeSet # 2004/08/24 11:43:44-07:00 linux@thorsten-knabe.de # [PATCH] ad1816 sound driver web page and email address # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/24 02:09:03-07:00 linux@thorsten-knabe.de +2 -2 # ad1816 sound driver web page and email address # # ChangeSet # 2004/08/24 11:43:32-07:00 diegocg@teleline.es # [PATCH] ext3 documentation # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:43:27-07:00 akpm@osdl.org # [PATCH] USB: legousbtower.c module_param fix # # drivers/usb/misc/legousbtower.c: In function `__check_read_buffer_size': # drivers/usb/misc/legousbtower.c:119: warning: return from incompatible pointer type # drivers/usb/misc/legousbtower.c: In function `__check_write_buffer_size': # drivers/usb/misc/legousbtower.c:129: warning: return from incompatible pointer type # # The fix is awkward - module_param() doesn't like size_t's. # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # Documentation/filesystems/ext3.txt # 2004/08/24 02:09:03-07:00 diegocg@teleline.es +58 -14 # ext3 documentation # # Documentation/filesystems/ext2.txt # 2004/08/24 02:09:03-07:00 diegocg@teleline.es +29 -5 # ext3 documentation # # ChangeSet # 2004/08/24 11:43:21-07:00 hirofumi@mail.parknet.co.jp # [PATCH] remove read-only/immutable checks from fat_truncate # # From: Christoph Hellwig # # There's two callers: # # - the truncate path via notify_change, ->setattr, vmtruncate. We # already check for permissions here at the upper level # - fat_delete_inode. This one looks bogus to me - even if we delete # an read-only or immutable inode we want to free the space allocated # by it, else you leak disk blocks. # # Signed-off-by: OGAWA Hirofumi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/fat/file.c # 2004/08/24 02:09:03-07:00 hirofumi@mail.parknet.co.jp +0 -6 # remove read-only/immutable checks from fat_truncate # # drivers/usb/misc/legousbtower.c # 2004/08/22 07:24:48-07:00 akpm@osdl.org +3 -3 # USB: legousbtower.c module_param fix # # ChangeSet # 2004/08/24 11:43:09-07:00 ramon.rey@hispalinux.es # [PATCH] Update ACI MIXER DRIVER webpage # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/24 02:09:03-07:00 ramon.rey@hispalinux.es +1 -1 # Update ACI MIXER DRIVER webpage # # ChangeSet # 2004/08/24 11:43:00-07:00 mdharm-usb@one-eyed-alien.net # [PATCH] USB Storage: help vendors count to 1... # # It turns out that the Konica-Minolta DiMAGE A2 camera, in addition to all # its other problems, returns a 0-length reply to the GetMaxLUN request. # With this patch (accept a null reply as meaning a single LUN) it is # somewhat useable. # # It's amazing to me that vendors have this much trouble counting to 1.... # # # Signed-off-by: Alan Stern # Signed-off-by: Matthew Dharm # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 11:42:57-07:00 okir@suse.de # [PATCH] /proc/PID/cmdline truncates arguments early # # We received a bug report that /proc/PID/cmdline only shows argv[0] if the # total length of all arguments exceeds PAGE_SIZE. The problem is that # proc_pid_cmdline checks for the presence of a NUL byte at the end of the # args list, and assumes that the application did a setproctitle if there's # any other character. # # OTOH proc_pid_cmdline will read just the first PAGE_SIZE worth of arguments # at most, and if you have more arguments, it's quite likely that there won't # be a NUL byte at offset PAGE_SIZE-1. # # The attached patch fixes this. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/base.c # 2004/08/24 02:09:03-07:00 okir@suse.de +1 -1 # /proc/PID/cmdline truncates arguments early # # drivers/usb/storage/transport.c # 2004/08/22 04:52:19-07:00 mdharm-usb@one-eyed-alien.net +2 -1 # USB Storage: help vendors count to 1... # # ChangeSet # 2004/08/24 11:42:46-07:00 zach@vmware.com # [PATCH] i386-unbusy-tss cleanup # # The TSS no longer needs to be unbusied before loading the task register, since # the set_tss_desc macros set the system gate type to Available IA-32 TSS. This # obscure, uncommented legacy code can now be removed for better readability and # saves 20 bytes of code space. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/cpu/common.c # 2004/08/24 02:09:02-07:00 zach@vmware.com +0 -2 # i386-unbusy-tss cleanup # # ChangeSet # 2004/08/24 11:42:35-07:00 stern@rowland.harvard.edu # [PATCH] USB: unusual_devs.h entry # # This patch adds an unusual_devs.h entry for the Apacer Audio Steno, which # reports its capacity as total number of blocks rather than largest block # number (i.e., the value is off by one). Please apply. # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 11:42:34-07:00 garloff@suse.de # [PATCH] fix bio_uncopy_user() mem leak # # When using bounce buffers for SG_IO commands with unaligned buffers in # blk_rq_map_user(), we should free the pages from blk_rq_unmap_user() which # calls bio_uncopy_user() for the non-BIO_USER_MAPPED case. That function # failed to free the pages for write requests. # # So we leaked pages and you machine would go OOM. Rebooting helped ;-) # # This bug was triggered by writing audio CDs (but not on data CDs), as the # audio frames are not aligned well (2352 bytes), so the user pages don't just # get mapped. # # Bug was reported by Mathias Homan and debugged by Chris Mason + me. (Jens # is away.) # # From: Chris Mason # # Fix the leak for real # # Signed-off-by: Kurt Garloff # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/bio.c # 2004/08/24 02:09:01-07:00 garloff@suse.de +11 -12 # fix bio_uncopy_user() mem leak # # ChangeSet # 2004/08/24 11:42:22-07:00 schwidefsky@de.ibm.com # [PATCH] s390: zfcp host adapter # # From: Heiko Carstens # From: Andreas Herrmann # From: Maxim Shchetynin # # zfcp host adapter changes: # - Use predefined macro to create in_recovery sysfs attributes. # - Add function to check CT_IU response. # - Fix handling of rejected ELS commands. # - Change return value of zfcp_fsf_req_sbal_get to -ERESTARTSYS in some cases. # - Return proper error code if control file upload/download failed. # - Remove dead code. # - Avoid sparse warnings. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/storage/unusual_devs.h # 2004/08/18 04:27:19-07:00 stern@rowland.harvard.edu +7 -0 # USB: unusual_devs.h entry # # drivers/s390/scsi/zfcp_sysfs_unit.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +4 -25 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_sysfs_port.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +6 -27 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_sysfs_driver.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +2 -2 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_sysfs_adapter.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +11 -32 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_scsi.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +2 -2 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_fsf.h # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +4 -0 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_fsf.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +18 -103 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_ext.h # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +4 -2 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_erp.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +62 -147 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_def.h # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +13 -10 # s390: zfcp host adapter # # drivers/s390/scsi/zfcp_aux.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +185 -20 # s390: zfcp host adapter # # ChangeSet # 2004/08/24 11:42:10-07:00 schwidefsky@de.ibm.com # [PATCH] s390: core changes # # From: Jan Glauber # From: Martin Schwidefsky # # s390 core changes: # - Use copy_siginfo_from_user32 instead of copy_from_user to get the # siginfo structure in sys32_rt_sigqueueinfo. # - Remove prototype for non-existant stop_timers function. # - Regenerate default configuration. # # Signed-off-by: Martin Schwidefsky # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:42:09-07:00 stern@rowland.harvard.edu # [PATCH] USB: Fix submission-error bug in the USB scatter-gather # # This patch has been hanging around for a while and seems to have been # forgotten. It fixes a bug in the USB scatter-gather library that crops up # when submission of an URB fails, and it fixes a bug in the cleanup routine # when some of the URBs being cleaned up have already completed. # # I think David will agree that the patch is correct. Please apply. # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # include/asm-s390/timer.h # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +0 -2 # s390: core changes # # arch/s390/kernel/vtime.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +1 -1 # s390: core changes # # arch/s390/kernel/compat_linux.c # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +1 -2 # s390: core changes # # arch/s390/defconfig # 2004/08/24 02:09:01-07:00 schwidefsky@de.ibm.com +2 -2 # s390: core changes # # ChangeSet # 2004/08/24 11:41:58-07:00 rusty@rustcorp.com.au # [PATCH] fix permissions on the `tainted' sysctl # # From: Arjan van de Ven # # The patch below sets the tainted sysctl file to read only, otherwise # userspace can just overwrite/reset it. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/core/message.c # 2004/08/16 05:26:51-07:00 stern@rowland.harvard.edu +8 -13 # USB: Fix submission-error bug in the USB scatter-gather # # kernel/sysctl.c # 2004/08/24 02:09:00-07:00 rusty@rustcorp.com.au +1 -1 # fix permissions on the `tainted' sysctl # # ChangeSet # 2004/08/24 11:41:47-07:00 pavel@ucw.cz # [PATCH] typo in laptop_mode.txt # # This patch is thanks to pavouk. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:41:43-07:00 david-b@pacbell.net # [PATCH] USB: net2280 patch # # Don't clear ep0 status phase handshake during endpoint reset ... at least # one driver emits so much debug output before resetting endpoints that the # reset happens late enough to make the chip break protocol. # # Also handle resets IRQs a bit differently: they can happen twice during # enumeration, which can worsen the other problem. # # From: Alex Sanks # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # Documentation/laptop-mode.txt # 2004/08/24 02:09:00-07:00 pavel@ucw.cz +1 -1 # typo in laptop_mode.txt # # ChangeSet # 2004/08/24 11:41:35-07:00 pavel@ucw.cz # [PATCH] Coding style: do_this(a,b) vs. do_this(a, b) # # Coding style document is not consistent with itself on whether there # should be space after ","... This makes it standardize on ", " option. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/CodingStyle # 2004/08/24 11:41:29-07:00 pavel@ucw.cz +2 -2 # Coding style: do_this(a,b) vs. do_this(a, b) # # drivers/usb/gadget/net2280.c # 2004/08/13 07:04:18-07:00 david-b@pacbell.net +12 -5 # USB: net2280 patch # # ChangeSet # 2004/08/24 11:41:24-07:00 ebiederm@xmission.com # [PATCH] fix 4K ext2fs support in 2.6 initrd's # # The ramdisk_blocksize option has been broken for quite a while in 2.6. # Making an initrd with a 4K ext2 filesystem impossible to use. # # After digging into this, the problem turned out to that rd.c was not # setting the hard sector size. There were a few secondary problems like # i_blkbits was not being set, and the number KiB in uncompressed ext2 images # was not taking into account the block size. # # I have also corrected the surrounding comments as they were not just # incorrect but misleading. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/do_mounts_rd.c # 2004/08/24 11:41:17-07:00 ebiederm@xmission.com +13 -7 # fix 4K ext2fs support in 2.6 initrd's # # drivers/block/rd.c # 2004/08/24 11:41:17-07:00 ebiederm@xmission.com +7 -2 # fix 4K ext2fs support in 2.6 initrd's # # ChangeSet # 2004/08/24 11:41:16-07:00 david-b@pacbell.net # [PATCH] USB: gadget drivers learn about LH7A40x # # Recognize the UDC for the Sharp LH7A40x chips (ARMv4t SOCs) # - define gadget_is_lh7a40x() macro # - gadget drivers use it to assign bcdDevice # - supports CDC Ethernet (and RNDIS) # # From: Bo Henriksen # Signed-off-by: David Brownell # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 11:41:13-07:00 olh@suse.de # [PATCH] compat_do_execve() fix # # For some reasons ls -l /proc/$$/exe doesnt work all time for me, # with 2.6.8.1 on ppc64. Sometimes it does, sometimes not. No pattern. # A few printks show that this check in proc_pid_readlink() triggers # an -EACCES: # # current->fsuid != inode->i_uid # # proc_pid_readlink(755) error -13 ntptrace(11408) fsuid 100 i_uid 0 0 # sys_readlink(281) ntptrace(11408) error -13 readlink # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/compat.c # 2004/08/24 02:08:59-07:00 olh@suse.de +2 -0 # compat_do_execve() fix # # drivers/usb/gadget/zero.c # 2004/08/13 02:46:19-07:00 david-b@pacbell.net +2 -0 # USB: gadget drivers learn about LH7A40x # # drivers/usb/gadget/serial.c # 2004/08/13 02:49:21-07:00 david-b@pacbell.net +3 -0 # USB: gadget drivers learn about LH7A40x # # drivers/usb/gadget/inode.c # 2004/08/12 11:31:38-07:00 david-b@pacbell.net +4 -0 # USB: gadget drivers learn about LH7A40x # # drivers/usb/gadget/gadget_chips.h # 2004/08/12 11:31:38-07:00 david-b@pacbell.net +6 -0 # USB: gadget drivers learn about LH7A40x # # drivers/usb/gadget/file_storage.c # 2004/08/13 02:45:30-07:00 david-b@pacbell.net +2 -0 # USB: gadget drivers learn about LH7A40x # # drivers/usb/gadget/ether.c # 2004/08/13 02:45:18-07:00 david-b@pacbell.net +6 -0 # USB: gadget drivers learn about LH7A40x # # ChangeSet # 2004/08/24 11:41:02-07:00 kernel@cornelia-huck.de # [PATCH] Add pci dependencies to drivers/media/dvb/ttpci/Kconfig # # The drivers under drivers/media/dvb/ttpci depend on pci (especially since # they select VIDEO_SAA7146, which depends on pci). # # Signed-off-by: Cornelia Huck # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/media/dvb/ttpci/Kconfig # 2004/08/24 02:08:59-07:00 kernel@cornelia-huck.de +4 -4 # Add pci dependencies to drivers/media/dvb/ttpci/Kconfig # # ChangeSet # 2004/08/24 11:40:50-07:00 janitor@sternwelten.at # [PATCH] remove last suser() call from drivers/char/rocket.c # # Signed-off-by: Maximilian Attems # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:40:48-07:00 alborchers@steinerpoint.com # [PATCH] USB: update Edgeport io_fw_down3.h # # - Updated io_fw_down3.h for the io_ti driver to firmware # version 4.10.0 from IO Networks. # # Signed-off-by: Al Borchers # Signed-off-by: Greg Kroah-Hartman # # drivers/char/rocket.c # 2004/08/24 02:08:59-07:00 janitor@sternwelten.at +0 -4 # remove last suser() call from drivers/char/rocket.c # # ChangeSet # 2004/08/24 11:40:38-07:00 jmorris@redhat.com # [PATCH] Reduce SELinux kernel memory use on 64-bit systems # # The patch below reduces kernel memory used by SELinux policy rules by about # 37% on 64-bit systems. This is because the size of struct avtab_node is 40 # bytes on 64-bit, and defaults to a size-64 slab. # # Creating a slab cache specifically for these structs saves considerable # amounts of kernel memory on 64-bit systems with large rulesets. 'Strict' # policy has over 300k rules, while 'targeted' policy has around 3k rules. # # Here's the slabtop output with 64 and 40 byte sized slabs to show the # memory savings, for strict policy: # # 303475 303447 99% 0.06K 4975 61 19900K avtab_node # 303456 303447 99% 0.04K 3161 96 12644K avtab_node # # Also, there are 57% more objects per slab. # # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/serial/io_fw_down3.h # 2004/08/12 13:03:28-07:00 alborchers@steinerpoint.com +784 -748 # USB: update Edgeport io_fw_down3.h # # security/selinux/ss/services.c # 2004/08/24 02:08:59-07:00 jmorris@redhat.com +1 -0 # Reduce SELinux kernel memory use on 64-bit systems # # security/selinux/ss/avtab.h # 2004/08/24 02:08:59-07:00 jmorris@redhat.com +2 -0 # Reduce SELinux kernel memory use on 64-bit systems # # security/selinux/ss/avtab.c # 2004/08/24 02:08:59-07:00 jmorris@redhat.com +10 -2 # Reduce SELinux kernel memory use on 64-bit systems # # ChangeSet # 2004/08/24 11:40:27-07:00 sds@epoch.ncsc.mil # [PATCH] SELinux: fix name_bind audit # # This patch restores the proper auditing behavior for the name_bind check. # # Author: James Morris # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/hooks.c # 2004/08/24 02:08:58-07:00 sds@epoch.ncsc.mil +1 -0 # SELinux: fix name_bind audit # # ChangeSet # 2004/08/24 11:40:15-07:00 sds@epoch.ncsc.mil # [PATCH] SElinux; defer inode security initialization # # This patch defers setting the inode security state for newly created inodes # until after policy has been loaded. # # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:40:15-07:00 alborchers@steinerpoint.com # [PATCH] USB: update Edgeport io_fw_down.h # # - Updated io_fw_down.h for the io_edgeport driver to firmware # version 1.16.4 from IO Networks. # # Signed-off-by: Al Borchers # Signed-off-by: Greg Kroah-Hartman # # security/selinux/hooks.c # 2004/08/24 02:08:58-07:00 sds@epoch.ncsc.mil +6 -0 # SElinux; defer inode security initialization # # ChangeSet # 2004/08/24 11:40:03-07:00 sds@epoch.ncsc.mil # [PATCH] SELinux: revalidate access to controlling tty # # This patch changes the SELinux flush_unauthorized_files function to also # recheck access to the controlling tty and reset it if it is no longer # accessible under the new security context. This patch is relative to the # selinuxfs devnull patch. # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/serial/io_fw_down.h # 2004/08/12 13:03:28-07:00 alborchers@steinerpoint.com +1038 -930 # USB: update Edgeport io_fw_down.h # # security/selinux/hooks.c # 2004/08/24 02:08:58-07:00 sds@epoch.ncsc.mil +25 -0 # SELinux: revalidate access to controlling tty # # ChangeSet # 2004/08/24 11:39:52-07:00 sds@epoch.ncsc.mil # [PATCH] SELinux: add null device node to selinuxfs, remove open_devnull # # This patch adds a null device node to selinuxfs and replaces the SELinux # open_devnull() code by simply acquiring a reference to this node each time, # based on a comment by Al Viro on lkml (see # http://marc.theaimsgroup.com/?l=linux-kernel&m=108664922032035&w=2). # # Signed-off-by: Stephen Smalley # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:39:45-07:00 alborchers@steinerpoint.com # [PATCH] USB: update Edgeport io_usbvend.h # # - Updated io_usbvend.h to the latest version of usbvend.h # provided by IO Networks. # # - Removed Black Box OEM device ids--they are duplicates of # existing Edgeport ids and no longer included in IO Networks # version of usbvend.h. # # - Removed the 1 port device from the io_edgeport driver--this # device is a parallel port handled by the usblp driver. # # Signed-off-by: Al Borchers # Signed-off-by: Greg Kroah-Hartman # # security/selinux/selinuxfs.c # 2004/08/24 02:08:57-07:00 sds@epoch.ncsc.mil +42 -2 # SELinux: add null device node to selinuxfs, remove open_devnull # # security/selinux/hooks.c # 2004/08/24 02:08:57-07:00 sds@epoch.ncsc.mil +3 -60 # SELinux: add null device node to selinuxfs, remove open_devnull # # ChangeSet # 2004/08/24 11:39:40-07:00 jeffm@suse.com # [PATCH] Fix access of files up to 4 GB support for ISO9660 filesystems # # Since the filesystem doesn't explicitly set s->s_maxbytes, seeks will fail # beyond 2^32-1, due to s->s_maxbytes being set to the default of # MAX_NON_LFS. # # Attached is the quick one liner fix. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/isofs/inode.c # 2004/08/24 02:08:57-07:00 jeffm@suse.com +1 -0 # Fix access of files up to 4 GB support for ISO9660 filesystems # # drivers/usb/serial/io_usbvend.h # 2004/08/12 13:03:28-07:00 alborchers@steinerpoint.com +281 -82 # USB: update Edgeport io_usbvend.h # # drivers/usb/serial/io_ti.c # 2004/08/12 13:16:41-07:00 alborchers@steinerpoint.com +2 -10 # USB: update Edgeport io_usbvend.h # # drivers/usb/serial/io_tables.h # 2004/08/12 13:06:14-07:00 alborchers@steinerpoint.com +10 -57 # USB: update Edgeport io_usbvend.h # # drivers/usb/serial/io_edgeport.c # 2004/08/12 13:13:41-07:00 alborchers@steinerpoint.com +3 -9 # USB: update Edgeport io_usbvend.h # # ChangeSet # 2004/08/24 11:39:28-07:00 jeffm@suse.com # [PATCH] reiserfs: xattr/acl fixes # # Here are a few fixes for bugs noticed on reiserfs-list or our own bugzilla. # # Attached is a patch that fixes several problems with xattrs/acls: # [SECURITY] Fixes the inode not getting dirtied when mode is set # via setxattr() # [CORRECTNESS] Fixes the inode not getting ctime updated when an xattr is # removed # [DATA] Fixes an issue with dcache hash colliding names in the filesystem # root caused by the d_compare to hide .reiserfs_priv. The bug # can only occur in the filesystem root, which is why we haven't # seen many (any, outside of the suse bugzilla, afaik) reports on # this. The results are that dcache operations on colliding entries # in the fs root will choose the first match rather than the # correct entry. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/reiserfs/xattr_acl.c # 2004/08/24 02:08:56-07:00 jeffm@suse.com +7 -1 # reiserfs: xattr/acl fixes # # fs/reiserfs/xattr.c # 2004/08/24 02:08:56-07:00 jeffm@suse.com +9 -2 # reiserfs: xattr/acl fixes # # ChangeSet # 2004/08/24 11:39:17-07:00 paulkf@microgate.com # [PATCH] synclink_cs.c: replace syncppp with genhdlc # # Replace syncppp interface with generic HDLC interface. Generic HDLC # provides superset of syncppp function. # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:39:16-07:00 luca.risolia@studio.unibo.it # [PATCH] USB: SN9C10[12] driver update # # Changes: # # - Delete the correct entry in the outgoing queue during DQBUF # - Implement correct image downscaling selection through VIDIOC_S_[CROP|FTM] # - Replace darkness controls with brightness (simple swapping) for PAS106B and # PAS202BCB # - Implement gain control for TAS5110C1B and TAS5130D1B # - Add a note to the documentation about correct image downscaling selection # # Signed-off-by: Luca Risolia # Signed-off-by: Greg Kroah-Hartman # # drivers/char/pcmcia/synclink_cs.c # 2004/08/24 02:08:56-07:00 paulkf@microgate.com +374 -187 # synclink_cs.c: replace syncppp with genhdlc # # ChangeSet # 2004/08/24 11:39:05-07:00 paulkf@microgate.com # [PATCH] synclinkmp.c: replace syncppp with genhdlc # # Replace syncppp interface with generic HDLC interface. Generic HDLC # provides superset of syncppp function. # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/usb/media/sn9c102_tas5130d1b.c # 2004/08/11 19:16:20-07:00 luca.risolia@studio.unibo.it +29 -8 # USB: SN9C10[12] driver update # # drivers/usb/media/sn9c102_tas5110c1b.c # 2004/08/11 19:16:12-07:00 luca.risolia@studio.unibo.it +28 -3 # USB: SN9C10[12] driver update # # drivers/usb/media/sn9c102_pas202bcb.c # 2004/08/11 19:15:54-07:00 luca.risolia@studio.unibo.it +3 -3 # USB: SN9C10[12] driver update # # drivers/usb/media/sn9c102_pas106b.c # 2004/08/11 19:15:47-07:00 luca.risolia@studio.unibo.it +3 -3 # USB: SN9C10[12] driver update # # drivers/usb/media/sn9c102_core.c # 2004/08/11 19:15:32-07:00 luca.risolia@studio.unibo.it +6 -3 # USB: SN9C10[12] driver update # # drivers/usb/media/sn9c102.h # 2004/08/11 19:16:47-07:00 luca.risolia@studio.unibo.it +3 -2 # USB: SN9C10[12] driver update # # Documentation/usb/sn9c102.txt # 2004/08/11 19:25:22-07:00 luca.risolia@studio.unibo.it +21 -13 # USB: SN9C10[12] driver update # # drivers/char/synclinkmp.c # 2004/08/24 02:08:56-07:00 paulkf@microgate.com +372 -186 # synclinkmp.c: replace syncppp with genhdlc # # ChangeSet # 2004/08/24 11:38:55-07:00 paulkf@microgate.com # [PATCH] synclink.c: replace syncppp with genhdlc # # Replace syncppp interface with generic HDLC interface. Generic HDLC # provides superset of syncppp function. # # Signed-off-by: Paul Fulghum # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/synclink.c # 2004/08/24 02:08:56-07:00 paulkf@microgate.com +374 -182 # synclink.c: replace syncppp with genhdlc # # ChangeSet # 2004/08/24 11:38:47-07:00 stern@rowland.harvard.edu # [PATCH] USB: Set QH bit in UHCI framelist entries # # This patch fixes the error in the UHCI driver found by Stuart Hayes. It # adds the UHCI_PTR_QH bit into the initial entries stored in the hardware # framelist. It's not entirely clear how the driver ever managed to work # with these bits not set; apparently by coincidence the QH entries # resembled TD entries sufficiently closely to fool the hardware. # # # On Tue, 10 Aug 2004 Stuart_Hayes@Dell.com wrote: # # > Never mind, I figured it out. It looks like the uhci-hcd driver # > doesn't add a "| UHCI_PTR_QH" to the pointers that it puts # > in the frame list. This causes the ICH to think that the frame list # > is pointing to a bunch of TDs instead of QHs for purposes of # > checking for TD errors. I can only assume that the ICH # > is actually treating the frame list entries as QH pointers in spite # > of that bit not being set when it is actually executing the # > schedule, or else I don't think it would work generally. # > # > I guess the high addresses were just making the QH look like an # > invalid TD instead of a valid TD... not sure exactly what the ICH # > is checking for! # # # # Signed-off-by: Alan Stern # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 11:38:43-07:00 rusty@rustcorp.com.au # [PATCH] Move param section out of init area, for export of built-in module params # # When exporting the module parameters of built-in modules, we need to access # the respective struct kernel_parameters. Currently, they're freed at init # time, and obviously this can't continue to be done. So, move them out of # __init_begin and __init_end and into RODATA in asm-generic/vmlinux.lds.h. # # Signed-off-by: Rusty Russell (modified) # Signed-off-by: Dominik Brodowski # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/common.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -4 # Move param section out of init area, for export of built-in module params # # include/asm-generic/vmlinux.lds.h # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +7 -0 # Move param section out of init area, for export of built-in module params # # arch/x86_64/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/v850/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/sparc64/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/sparc/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/sh64/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/sh/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/s390/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/ppc64/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -6 # Move param section out of init area, for export of built-in module params # # arch/ppc/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/parisc/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/mips/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/m68knommu/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/m68k/kernel/vmlinux-sun3.lds # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/m68k/kernel/vmlinux-std.lds # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/ia64/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -6 # Move param section out of init area, for export of built-in module params # # arch/i386/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/h8300/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/cris/arch-v10/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/arm26/kernel/vmlinux-arm26.lds.in # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/arm26/kernel/vmlinux-arm26-xip.lds.in # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/arm/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -3 # Move param section out of init area, for export of built-in module params # # arch/alpha/kernel/vmlinux.lds.S # 2004/08/24 02:08:55-07:00 rusty@rustcorp.com.au +0 -5 # Move param section out of init area, for export of built-in module params # # drivers/usb/host/uhci-hcd.c # 2004/08/11 02:54:29-07:00 stern@rowland.harvard.edu +2 -1 # USB: Set QH bit in UHCI framelist entries # # ChangeSet # 2004/08/24 11:38:29-07:00 rusty@rustcorp.com.au # [PATCH] Fix Permissions on module_param Usage # # module_param() and family take a "perms" argument; several people have # incorrectly used "644" instead of "0644". # # (I have a patch which checks for sane perms at compile time, but it bloats # modules, so I haven't included it.) # # Signed-off-by: Rusty Russell (authored) # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/lockd/svc.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +4 -4 # Fix Permissions on module_param Usage # # fs/jfs/super.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +1 -1 # Fix Permissions on module_param Usage # # drivers/usb/input/ati_remote.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +2 -2 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/shpchp_core.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +3 -3 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/pcihp_skeleton.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +1 -1 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/pciehp_core.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +3 -3 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/pci_hotplug_core.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +1 -1 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/cpqphp_core.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +2 -2 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/cpcihp_zt5550.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +2 -2 # Fix Permissions on module_param Usage # # drivers/pci/hotplug/acpiphp_core.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +1 -1 # Fix Permissions on module_param Usage # # ChangeSet # 2004/08/24 11:38:17-07:00 rusty@rustcorp.com.au # [PATCH] Centralize i386 Constants # # __FIXADDR_TOP and PAGE_OFFSET are hardcoded in various places. I had to # change it to run the kernel under qemu-fast, so I wanted to centralize # them. # # To do this, we rename vsyscall.lds to vsyscall.lds.s, and generate it from # vsyscall.lds.S. # # Signed-off-by: Rusty Russell (created) # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:38:15-07:00 sean@mess.org # [PATCH] USB: USB PhidgetServo driver update # # Once again a (small) patch for the phidgetservo driver. # # Some servos have a very high maximum angle, set upper limit to the # maximum allowed by the hardware. Reported by Mario Scholz # # # Signed-off-by: Sean Young # Signed-off-by: Greg Kroah-Hartman # # include/asm-i386/fixmap.h # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +12 -7 # Centralize i386 Constants # # arch/i386/kernel/vsyscall.lds.S # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +2 -2 # Centralize i386 Constants # # arch/i386/kernel/vmlinux.lds.S # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +2 -1 # Centralize i386 Constants # # arch/i386/kernel/Makefile # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +4 -2 # Centralize i386 Constants # # drivers/usb/misc/phidgetservo.c # 2004/08/09 14:26:07-07:00 sean@mess.org +11 -5 # USB: USB PhidgetServo driver update # # ChangeSet # 2004/08/24 14:36:22-04:00 akpm@osdl.org # [PATCH] I2O: run linux/i2o.h and linux/i2o-dev.h through # # From: Markus Lidel # # - i2o.h and i2o-dev.h are now formated using Lindent. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # include/linux/i2o.h # 2004/08/19 12:23:59-04:00 akpm@osdl.org +112 -128 # I2O: run linux/i2o.h and linux/i2o-dev.h through # # include/linux/i2o-dev.h # 2004/08/19 12:23:59-04:00 akpm@osdl.org +109 -131 # I2O: run linux/i2o.h and linux/i2o-dev.h through # # ChangeSet # 2004/08/24 11:35:14-07:00 sds@epoch.ncsc.mil # [SELINUX]: Fix bugs introduced by skb_header_pointer() changes. # # Lines assigning initial value to 'ret' were removed # erroneously. # # Signed-off-by: Stephen Smalley # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 14:35:04-04:00 akpm@osdl.org # [PATCH] I2O: remove on-demand allocation of Scsi_Host's in # # From: Markus Lidel # # - New notification system for i2o_driver's which get now a notification if a # I2O controller is added or removed. # # - SCSI-OSM now uses notifications to create the Scsi_Host to the # corresponding I2O controller. # # - Use __scsi_add_device to preset hostdata. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # security/selinux/hooks.c # 2004/08/24 11:34:56-07:00 sds@epoch.ncsc.mil +4 -2 # [SELINUX]: Fix bugs introduced by skb_header_pointer() changes. # # Lines assigning initial value to 'ret' were removed # erroneously. # # Signed-off-by: Stephen Smalley # Signed-off-by: David S. Miller # # include/linux/i2o.h # 2004/08/19 12:23:55-04:00 akpm@osdl.org +29 -0 # I2O: remove on-demand allocation of Scsi_Host's in # # drivers/message/i2o/iop.c # 2004/08/19 12:23:55-04:00 akpm@osdl.org +44 -6 # I2O: remove on-demand allocation of Scsi_Host's in # # drivers/message/i2o/i2o_scsi.c # 2004/08/19 12:23:55-04:00 akpm@osdl.org +86 -93 # I2O: remove on-demand allocation of Scsi_Host's in # # drivers/message/i2o/driver.c # 2004/08/19 12:23:55-04:00 akpm@osdl.org +26 -0 # I2O: remove on-demand allocation of Scsi_Host's in # # ChangeSet # 2004/08/24 11:34:21-07:00 rusty@rustcorp.com.au # [PATCH] Read cpumasks every time when exporting through sysfs # # Paul Jackson points out that the sysfs code saves a node's cpumask in the # sysfs node, although it can change with CPU hotplug. Don't do this. # # Signed-off-by: Rusty Russell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/node.h # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +0 -1 # Read cpumasks every time when exporting through sysfs # # drivers/base/node.c # 2004/08/24 02:08:54-07:00 rusty@rustcorp.com.au +1 -2 # Read cpumasks every time when exporting through sysfs # # ChangeSet # 2004/08/24 11:34:08-07:00 anton@samba.org # [PATCH] remove cacheline alignment from inode slabs # # Most of the inode slabs are cacheline aligned. This can waste a fair # amount of memory, especially on architectures with large cacheline sizes # (eg 128 bytes). # # Alignment has a few advantages. It prevents 2 cpus from accessing 2 data # structures in the same cacheline. Since struct inodes are well over a # cacheline and there are so many of them, there is little chance we will hit # this problem if we remove the alignment. # # Alignment also ensures the maximum amount of the data structure is in the # same cacheline (instead of straddling 2 for example). The large size of # struct inode reduces this advantage. # # With this patch the inode_cache slab goes from 640 bytes to 544 bytes, and # the number that fits in a 4kB slab goes from 6 to 7 on ppc64. A number of # other inode slabs also see improvements. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/xfs/linux-2.6/xfs_super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -2 # remove cacheline alignment from inode slabs # # fs/ufs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/udf/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/sysv/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/smbfs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/romfs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/reiserfs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/qnx4/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/proc/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/ntfs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/nfs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/ncpfs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/minix/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/jffs2/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/isofs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -2 # remove cacheline alignment from inode slabs # # fs/hpfs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/fat/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/ext3/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/ext2/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/efs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/coda/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/cifs/cifsfs.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/bfs/inode.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/befs/linuxvfs.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/affs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # fs/adfs/super.c # 2004/08/24 02:08:53-07:00 anton@samba.org +1 -1 # remove cacheline alignment from inode slabs # # ChangeSet # 2004/08/24 11:33:55-07:00 anton@samba.org # [PATCH] reduce size of struct dentry on 64bit # # Reduce size of struct dentry from 248 to 232 bytes on 64bit. # # - Reduce size of qstr by 8 bytes, placing int hash and int len together. # We gain a further 4 byte saving when qstr is used in struct dentry # since qstr goes from 24 to 16 bytes and the next member (d_lru) # requires 8 byte alignment (which means 4 bytes of padding). # # - Move d_mounted to the end, since char d_iname[] only requires 1 byte # alignment. This reduces struct dentry by another 4 bytes. # # With these changes the number of objects we can fit into a 4kB slab # goes from 16 to 17 on ppc64. # # Note the above assumes the architecture naturally aligns types. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/dcache.h # 2004/08/24 02:08:53-07:00 anton@samba.org +2 -2 # reduce size of struct dentry on 64bit # # ChangeSet # 2004/08/24 11:33:43-07:00 anton@samba.org # [PATCH] reduce size of struct buffer_head on 64bit # # Reduce size of buffer_head from 96 to 88 bytes on 64bit architectures by # putting b_count and b_size together. b_count will still be in the first 16 # bytes on 32bit architectures, so 16 byte cacheline machines shouldnt be # affected. # # With this change the number of objects per 4kB slab goes up from 40 to 44 # on ppc64. # # Signed-off-by: Anton Blanchard # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/buffer_head.h # 2004/08/24 02:08:52-07:00 anton@samba.org +2 -2 # reduce size of struct buffer_head on 64bit # # ChangeSet # 2004/08/24 11:33:32-07:00 pavel@ucw.cz # [PATCH] Fix ttyS0 vs. ttyS00 confusion # # According to devices.txt, serial ports are reffered as ttyS0 (and not # ttyS00). It would be nice to use that convention in printks, too. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/tc/zs.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +7 -7 # Fix ttyS0 vs. ttyS00 confusion # # drivers/serial/68360serial.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +1 -1 # Fix ttyS0 vs. ttyS00 confusion # # drivers/char/serial167.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +1 -1 # Fix ttyS0 vs. ttyS00 confusion # # drivers/char/amiserial.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +2 -2 # Fix ttyS0 vs. ttyS00 confusion # # arch/ppc/8xx_io/uart.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +1 -1 # Fix ttyS0 vs. ttyS00 confusion # # arch/ia64/hp/sim/simserial.c # 2004/08/24 02:08:52-07:00 pavel@ucw.cz +1 -1 # Fix ttyS0 vs. ttyS00 confusion # # ChangeSet # 2004/08/24 11:33:20-07:00 chrisw@osdl.org # [PATCH] use simple_read_from_buffer in proc_info_read and proc_pid_attr_read # # Use simple_read_from_buffer in proc_info_read and proc_pid_attr_read. Viro # had ack'd this earlier. # # Signed-off-by: Chris Wright # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/proc/base.c # 2004/08/24 02:08:51-07:00 chrisw@osdl.org +6 -36 # use simple_read_from_buffer in proc_info_read and proc_pid_attr_read # # ChangeSet # 2004/08/24 11:33:08-07:00 chrisw@osdl.org # [PATCH] use simple_read_from_buffer in selinuxfs # # Use simple_read_from_buffer. This also eliminates page allocation for the # sprintf buffer. Switch to get_zeroed_page instead of open-coding it. Viro # had ack'd this earlier. Still applies w/ the transaction update. # # Signed-off-by: Chris Wright # Signed-off-by: Stephen Smalley # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/selinuxfs.c # 2004/08/24 02:08:51-07:00 chrisw@osdl.org +17 -102 # use simple_read_from_buffer in selinuxfs # # ChangeSet # 2004/08/24 11:32:57-07:00 chrisw@osdl.org # [PATCH] Fix typos in security/security.c # # Fix typos in security/security.c. # # From: Nicolas Kaiser # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/security.c # 2004/08/24 02:08:51-07:00 chrisw@osdl.org +2 -2 # Fix typos in security/security.c # # ChangeSet # 2004/08/24 11:32:45-07:00 chrisw@osdl.org # [PATCH] configurable SELinux bootparam value # # Add configure option for setting default SELinux bootparam value. Ack'd by # James Morris. # # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:32:44-07:00 yoshfuji@linux-ipv6.org # [IPSEC]: Add SCTP to xfrm_flowi_{sport,dport}() # # Signed-off-by: HIDEAKI Yoshifuji # Signed-off-by: David S. Miller # # security/selinux/hooks.c # 2004/08/24 02:08:51-07:00 chrisw@osdl.org +1 -1 # configurable SELinux bootparam value # # security/selinux/Kconfig # 2004/08/24 02:08:51-07:00 chrisw@osdl.org +15 -0 # configurable SELinux bootparam value # # ChangeSet # 2004/08/24 14:32:36-04:00 akpm@osdl.org # [PATCH] I2O: add functionality to scsi_add_device to preset # # From: Markus Lidel # # - Add a new function __scsi_add_device, which has an additional parameter # compared to scsi_add_device. This parameter is used to preset the hostdata # pointer. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # ChangeSet # 2004/08/24 11:32:33-07:00 chrisw@osdl.org # [PATCH] small simplification for two SECURITY dependencies # # I'd suggest the patch below to let the SECURITY_CAPABILITIES and # SECURITY_ROOTPLUG dependencies look a bit more simple. # # Signed-off-by: Adrian Bunk # Signed-off-by: Chris Wright # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/net/xfrm.h # 2004/08/24 11:32:27-07:00 yoshfuji@linux-ipv6.org +2 -0 # [IPSEC]: Add SCTP to xfrm_flowi_{sport,dport}() # # Signed-off-by: HIDEAKI Yoshifuji # Signed-off-by: David S. Miller # # security/Kconfig # 2004/08/24 02:08:50-07:00 chrisw@osdl.org +2 -2 # small simplification for two SECURITY dependencies # # ChangeSet # 2004/08/24 11:32:21-07:00 hch@lst.de # [PATCH] fix some comments about epoch in arch/alpha/kernel/time.c # # (from the Debian kernel package) # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/alpha/kernel/time.c # 2004/08/24 02:08:50-07:00 hch@lst.de +1 -1 # fix some comments about epoch in arch/alpha/kernel/time.c # # ChangeSet # 2004/08/24 11:32:10-07:00 hch@lst.de # [PATCH] ppc32: remove dead CONFIG_KERNEL_ELF Kconfig entry # # We don't allow non-ELF kernels since 2.0 days, and surprisingly this is not # actually checked anywhere. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/scsi/scsi_device.h # 2004/08/22 21:06:22-04:00 akpm@osdl.org +4 -2 # I2O: add functionality to scsi_add_device to preset # # drivers/scsi/scsi_syms.c # 2004/08/22 21:06:22-04:00 akpm@osdl.org +1 -1 # I2O: add functionality to scsi_add_device to preset # # drivers/scsi/scsi_scan.c # 2004/08/22 21:06:22-04:00 akpm@osdl.org +14 -11 # I2O: add functionality to scsi_add_device to preset # # arch/ppc/Kconfig # 2004/08/24 02:08:50-07:00 hch@lst.de +0 -4 # ppc32: remove dead CONFIG_KERNEL_ELF Kconfig entry # # ChangeSet # 2004/08/24 11:31:58-07:00 hch@lst.de # [PATCH] BUG() on inconsistant dcache tree in may_delete # # This can't happen with a sane filesystem (but is triggered by the buggy # clearcase bin only kernel module), so let's better BUG_ON early. # # Adopted from Al's patch in the RH tree. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/namei.c # 2004/08/24 02:08:50-07:00 hch@lst.de +5 -1 # BUG() on inconsistant dcache tree in may_delete # # ChangeSet # 2004/08/24 11:31:47-07:00 hch@lst.de # [PATCH] reduce pty.c ifdef clutter # # - build only if either CONFIG_LEGACY_PTYS or CONFIG_UNIX98_PTYS are set # instead of testing in the file # # - try to keep big CONFIG_LEGACY_PTYS and CONFIG_UNIX98_PTYS ifdef blocks # at the end of the file instead of cluttering all over # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/pty.c # 2004/08/24 02:08:49-07:00 hch@lst.de +70 -92 # reduce pty.c ifdef clutter # # drivers/char/Makefile # 2004/08/24 02:08:49-07:00 hch@lst.de +4 -1 # reduce pty.c ifdef clutter # # ChangeSet # 2004/08/24 11:31:37-07:00 jbarnes@engr.sgi.com # [PATCH] fix sn_console for CONFIG_SMP=n # # I found that sn_console was missing an include and a fix if CONFIG_SMP=n. # This patch fixes up the two small problems I found. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/sn_console.c # 2004/08/24 02:08:49-07:00 jbarnes@engr.sgi.com +3 -0 # fix sn_console for CONFIG_SMP=n # # ChangeSet # 2004/08/24 11:31:25-07:00 jbarnes@engr.sgi.com # [PATCH] don't print per-cpu delay loop calibration # # People are mainly concerned with showing off their total bogomips, not # per-cpu bogomips, so turn it into a KERN_DEBUG message for the benefit of # systems with lots of CPUs. # # Signed-off-by: Jesse Barnes # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2004/08/24 02:08:49-07:00 jbarnes@engr.sgi.com +1 -1 # don't print per-cpu delay loop calibration # # ChangeSet # 2004/08/24 11:31:13-07:00 jmorris@redhat.com # [PATCH] libfs: move transaction file ops into libfs # # Below is an updated version of the patch which moves duplicated # transaction-based file operation code into libfs. Since the last post, the # patch has been through a couple of iterations with Al, who suggested a # number of cleanups including locking and interface simplification. # # For filesystem writers, the interface is now much simpler. The # simple_transaction_get() helper should be part of the file op write method. # This safely obtains the transaction request data during write(), allocates # a page for it and stores it there. The data is returned to the caller for # potential further processing, which then makes it available for the next # read() call via simple_transaction_set(). See the selinuxfs and nfsctl # code for examples of use. # # Signed-off-by: James Morris # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # security/selinux/selinuxfs.c # 2004/08/24 02:08:49-07:00 jmorris@redhat.com +17 -88 # libfs: move transaction file ops into libfs # # include/linux/fs.h # 2004/08/24 02:08:49-07:00 jmorris@redhat.com +33 -0 # libfs: move transaction file ops into libfs # # fs/nfsd/nfsctl.c # 2004/08/24 02:08:49-07:00 jmorris@redhat.com +13 -83 # libfs: move transaction file ops into libfs # # fs/libfs.c # 2004/08/24 02:08:49-07:00 jmorris@redhat.com +55 -0 # libfs: move transaction file ops into libfs # # ChangeSet # 2004/08/24 11:31:02-07:00 pluto@pld-linux.org # [PATCH] ix86,x86_64 cpu features # # Attached patch fix/add several cpu features. # # refs: # # [1] Intel Processor Identification and the CPUID instruction # Application Note 485. # http://developer.intel.ru/download/design/Xeon/applnots/24161826.pdf # # [2] http://www.sandpile.org/ia32/cpuid.htm # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/cpufeature.h # 2004/08/24 02:08:48-07:00 pluto@pld-linux.org +9 -1 # ix86,x86_64 cpu features # # include/asm-i386/cpufeature.h # 2004/08/24 02:08:48-07:00 pluto@pld-linux.org +8 -3 # ix86,x86_64 cpu features # # arch/x86_64/kernel/setup.c # 2004/08/24 02:08:48-07:00 pluto@pld-linux.org +2 -2 # ix86,x86_64 cpu features # # arch/i386/kernel/cpu/proc.c # 2004/08/24 02:08:48-07:00 pluto@pld-linux.org +2 -2 # ix86,x86_64 cpu features # # ChangeSet # 2004/08/24 11:30:50-07:00 davej@redhat.com # [PATCH] x86: quieten the "ESR value" printks # # Only print out the ESR value if it changes after enabling vector. # # Signed-off-by: Dave Jones # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apic.c # 2004/08/24 02:08:48-07:00 davej@redhat.com +6 -6 # x86: quieten the "ESR value" printks # # ChangeSet # 2004/08/24 11:30:39-07:00 benjl@cse.unsw.edu.au # [PATCH] Use posix headers in sumversion.c # # When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c. # It includes to obtain to definitions of htonl and ntohl. # # On Mac OSX these are found in . After checking the POSIX # specification it appears that this is the correct place to get the # definitons for these functions. # # (http://www.opengroup.org/onlinepubs/009695399/functions/htonl.html) # # Using this header also appears to work on Linux (at least with # Glibc-2.3.2). # # It seems clearer to me to go with the POSIX standard than implementing # #if __APPLE__ style macros, but if such an approach is preferred I can # supply patches for that instead. # # A patch against 2.6.7 which change -> is # attached. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/mod/sumversion.c # 2004/08/24 02:08:48-07:00 benjl@cse.unsw.edu.au +1 -1 # Use posix headers in sumversion.c # # ChangeSet # 2004/08/24 11:30:31-07:00 herbert@gondor.apana.org.au # [IPSEC]: Set TTL from route. # # Here is the promised patch that sets the TTL from the route parameter. # I decided against adding an option to inherit the TTL like IPIP/GRE # as I think that it doesn't really make sense with IPsec. But it # can be easily added later if someone needs it. # # This isn't completely right when nested tunnels are involved. The # TTL for intervening tunnels should be set from the routes to the # intervening nodes. But fixing that involves using information that # isn't currently in the bundle. I'll revisit this once the MTU stuff # is fixed since that'll also involving adding the intervening routes # to the bundle. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 11:30:27-07:00 bcasavan@sgi.com # [PATCH] Fix get_nodes() mask miscalculation # # It appears there is a nodemask miscalculation in the get_nodes() function # in mm/mempolicy.c. This bug has two effects: # # 1. It is impossible to specify a length 1 nodemask. # 2. It is impossible to specify a nodemask containing the last node. # # The following patch has been confirmed to solve both problems. # # Signed-off-by: Brent Casavant # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 14:30:22-04:00 jejb@mulgrave.(none) # i20 rewrite # # From: Markus Lidel # # generic: # - split i2o_core into several files, grouped by same function # - I2O devices are now registered as devices and show up in sysfs # - the various I2O OSM's (e.g. i2o_scsi) now register in the I2O core # and also use the 2.6 driver mechanism. # - I2O messages will be created in the message frame instead of creating # it in local memory and copying it over later on. # - context list for 64 pointer to 32 context conversion now uses a # double linked list # # PCI: # - driver now registers as a PCI device driver and uses probe function to # get the possible controllers. (needed for hotplugging) # - converted DMA handling from pci_* to generic dma_* functions # # Block OSM: # - use one request queue per I2O block device instead of one per # controller # - I2O block devices and queues are allocated dynamically and therefore # no more limit of block devices # # SCSI OSM: # - corrected bug in SCSI reply function which caused the memory to be # freed before the done function was called. # - one I2O controller registers as one scsi host instead of one scsi host # per channel # - no more ch,id,lun => tid mapping table # # Config OSM: # - added ioctl32 for passthru and getiops. # - removed ioctl_html # # Documentation: # - removed TODO entries from README # - moved docs under Documentation/i2o # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # mm/mempolicy.c # 2004/08/24 02:08:48-07:00 bcasavan@sgi.com +0 -1 # Fix get_nodes() mask miscalculation # # ChangeSet # 2004/08/24 11:30:15-07:00 michal@logix.cz # [PATCH] New cpu_has_ flags # # Add a couple more accessors for xstore features. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/ipv6/xfrm6_output.c # 2004/08/24 11:30:14-07:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Set TTL from route. # # Here is the promised patch that sets the TTL from the route parameter. # I decided against adding an option to inherit the TTL like IPIP/GRE # as I think that it doesn't really make sense with IPsec. But it # can be easily added later if someone needs it. # # This isn't completely right when nested tunnels are involved. The # TTL for intervening tunnels should be set from the routes to the # intervening nodes. But fixing that involves using information that # isn't currently in the bundle. I'll revisit this once the MTU stuff # is fixed since that'll also involving adding the intervening routes # to the bundle. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2004/08/24 11:30:14-07:00 herbert@gondor.apana.org.au +1 -2 # [IPSEC]: Set TTL from route. # # Here is the promised patch that sets the TTL from the route parameter. # I decided against adding an option to inherit the TTL like IPIP/GRE # as I think that it doesn't really make sense with IPsec. But it # can be easily added later if someone needs it. # # This isn't completely right when nested tunnels are involved. The # TTL for intervening tunnels should be set from the routes to the # intervening nodes. But fixing that involves using information that # isn't currently in the bundle. I'll revisit this once the MTU stuff # is fixed since that'll also involving adding the intervening routes # to the bundle. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/asm-i386/cpufeature.h # 2004/08/24 02:08:48-07:00 michal@logix.cz +2 -0 # New cpu_has_ flags # # ChangeSet # 2004/08/24 11:30:04-07:00 pj@sgi.com # [PATCH] hige2lowuid warning fixes # # fs/smbfs/inode.c: In function `smb_fill_super': # fs/smbfs/inode.c:563: warning: comparison is always false due to limited range of data type # # Unfortunately, this patch uses the notorious "gcc warning suppression by # obfuscation" technique. # # What seems to be going on is that the uid and gid convert macros in # include/linux/highuid.h: # # #define __convert_uid(size, uid) \ # (size >= sizeof(uid) ? (uid) : high2lowuid(uid)) # # only call high2lowuid in the case of trying to put a bigger (32 bit, say) # uid/gid in a smaller (16 bit, in this case) word. Gcc is smart enough to see # that the comparison in high2lowuid() macro is silly if called with a 16 bit # source uid, but not smart enough to understand from the __convert_uid() logic # that this is exactly the case that high2lowuid() won't be called. # # So replace the logical "<" operator with the bit op "&~". This obfuscates # things enough to shut gcc up. # # Only build the half-dozen files that use SET_UID/SET_GID, on arch i386 and # ia64. Only the file fs/smbfs/inode.c showed the warning, both arch's, and # this patch fixed both. Untested further, past staring at the code long enough # to convince myself the change has no actual affect on the code's results. # # Signed-off-by: Paul Jackson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/highuid.h # 2004/08/24 02:08:47-07:00 pj@sgi.com +4 -4 # hige2lowuid warning fixes # # ChangeSet # 2004/08/24 11:29:52-07:00 davej@redhat.com # [PATCH] fix inlining failures # # arch/i386/mach-generic/summit.c: In function `send_IPI_all': # include/asm/mach-summit/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available # arch/i386/mach-generic/summit.c:8: sorry, unimplemented: called from here # make[1]: *** [arch/i386/mach-generic/summit.o] Error 1 # make: *** [arch/i386/mach-generic] Error 2 # # arch/i386/mach-generic/bigsmp.c: In function `send_IPI_all': # include/asm/mach-bigsmp/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available # arch/i386/mach-generic/bigsmp.c:8: sorry, unimplemented: called from here # make[1]: *** [arch/i386/mach-generic/bigsmp.o] Error 1 # make: *** [arch/i386/mach-generic] Error 2 # # arch/i386/mach-generic/es7000.c: In function `send_IPI_all': # include/asm/mach-es7000/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available # arch/i386/mach-generic/es7000.c:8: sorry, unimplemented: called from here # make[1]: *** [arch/i386/mach-generic/es7000.o] Error 1 # make: *** [arch/i386/mach-generic] Error 2 # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/mach-summit/mach_ipi.h # 2004/08/24 02:08:47-07:00 davej@redhat.com +1 -1 # fix inlining failures # # include/asm-i386/mach-es7000/mach_ipi.h # 2004/08/24 02:08:47-07:00 davej@redhat.com +1 -1 # fix inlining failures # # include/asm-i386/mach-bigsmp/mach_ipi.h # 2004/08/24 02:08:47-07:00 davej@redhat.com +1 -1 # fix inlining failures # # ChangeSet # 2004/08/24 11:29:41-07:00 pluto@pld-linux.org # [PATCH] apm_info.disabled fix # # This minor fix is required to proper init "APM emulation" on HP-OmniBooks. # (An external patch). "APM emulation" is very useful if you want to use a tool # which looks into /proc/apm for getting informations about battery charging. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/apm.c # 2004/08/24 02:08:47-07:00 pluto@pld-linux.org +2 -0 # apm_info.disabled fix # # drivers/message/i2o/pci.c # 2004/08/24 14:29:33-04:00 jejb@mulgrave.(none) +513 -0 # # drivers/message/i2o/iop.c # 2004/08/24 14:29:33-04:00 jejb@mulgrave.(none) +1220 -0 # # drivers/message/i2o/pci.c # 2004/08/24 14:29:33-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/pci.c # # drivers/message/i2o/iop.c # 2004/08/24 14:29:33-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/iop.c # # drivers/message/i2o/i2o_block.h # 2004/08/24 14:29:32-04:00 jejb@mulgrave.(none) +99 -0 # # drivers/message/i2o/i2o_block.h # 2004/08/24 14:29:32-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/i2o_block.h # # drivers/message/i2o/exec-osm.c # 2004/08/24 14:29:31-04:00 jejb@mulgrave.(none) +505 -0 # # drivers/message/i2o/exec-osm.c # 2004/08/24 14:29:31-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/exec-osm.c # # drivers/message/i2o/driver.c # 2004/08/24 14:29:30-04:00 jejb@mulgrave.(none) +269 -0 # # drivers/message/i2o/driver.c # 2004/08/24 14:29:30-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/driver.c # # drivers/message/i2o/device.c # 2004/08/24 14:29:29-04:00 jejb@mulgrave.(none) +671 -0 # # ChangeSet # 2004/08/24 11:29:29-07:00 josha@sgi.com # [PATCH] Reduce bkl usage in do_coredump # # A patch that reduces bkl usage in do_coredump. I don't see anywhere that # it is necessary except for the call to format_corename, which is controlled # via sysctl (sys_sysctl holds the bkl). # # Also make format_corename() static. # # Signed-off-by: Josh Aas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/message/i2o/device.c # 2004/08/24 14:29:29-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/device.c # # drivers/message/i2o/debug.c # 2004/08/24 14:29:28-04:00 jejb@mulgrave.(none) +571 -0 # # drivers/message/i2o/debug.c # 2004/08/24 14:29:28-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/message/i2o/debug.c # # Documentation/i2o/ioctl # 2004/08/24 14:29:27-04:00 jejb@mulgrave.(none) +394 -0 # # Documentation/i2o/ioctl # 2004/08/24 14:29:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/Documentation/i2o/ioctl # # Documentation/i2o/README # 2004/08/24 14:29:25-04:00 jejb@mulgrave.(none) +63 -0 # # include/linux/i2o.h # 2004/08/24 14:29:25-04:00 jejb@mulgrave.(none) +405 -197 # i20 rewrite # # include/linux/i2o-dev.h # 2004/08/24 14:29:25-04:00 jejb@mulgrave.(none) +23 -15 # i20 rewrite # # drivers/message/i2o/i2o_scsi.c # 2004/08/24 14:29:25-04:00 jejb@mulgrave.(none) +611 -772 # i20 rewrite # # Documentation/i2o/README # 2004/08/24 14:29:25-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/Documentation/i2o/README # # drivers/message/i2o/i2o_proc.c # 2004/08/24 14:29:24-04:00 jejb@mulgrave.(none) +1383 -2675 # i20 rewrite # # drivers/message/i2o/i2o_config.c # 2004/08/24 14:29:24-04:00 jejb@mulgrave.(none) +730 -632 # i20 rewrite # # drivers/message/i2o/i2o_block.c # 2004/08/24 14:29:24-04:00 jejb@mulgrave.(none) +1041 -1314 # i20 rewrite # # drivers/message/i2o/Makefile # 2004/08/24 14:29:24-04:00 jejb@mulgrave.(none) +1 -0 # i20 rewrite # # fs/exec.c # 2004/08/24 02:08:46-07:00 josha@sgi.com +8 -4 # Reduce bkl usage in do_coredump # # ChangeSet # 2004/08/24 11:29:18-07:00 ak@suse.de # [PATCH] Fix warnings in es7000 # # Fix warnings in es7000. # # Otherwise gcc 3.3 complains about too large integer values. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mach-es7000/es7000plat.c # 2004/08/24 02:08:46-07:00 ak@suse.de +1 -1 # Fix warnings in es7000 # # arch/i386/mach-es7000/es7000.h # 2004/08/24 02:08:46-07:00 ak@suse.de +1 -1 # Fix warnings in es7000 # # ChangeSet # 2004/08/24 11:29:06-07:00 neilb@cse.unsw.edu.au # [PATCH] md: RAID10 module # # This patch adds a 'raid10' module which provides features similar to both # raid0 and raid1 in the one array. Various combinations of layout are # supported. # # This code is still "experimental", but appears to work. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/raid10.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +103 -0 # md: RAID10 module # # include/linux/raid/raid10.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/raid/raid10.h # # include/linux/raid/md_k.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +4 -1 # md: RAID10 module # # drivers/md/raid10.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +1780 -0 # md: RAID10 module # # drivers/md/Makefile # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +1 -0 # md: RAID10 module # # drivers/md/Kconfig # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +18 -0 # md: RAID10 module # # drivers/md/raid10.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/md/raid10.c # # ChangeSet # 2004/08/24 11:28:54-07:00 neilb@cse.unsw.edu.au # [PATCH] md: remove most calls to __bdevname from md.c # # __bdevname now only prints major/minor number which isn't much help. So # remove most calls to it from md.c, replacing those that are useful by calls # to bdevname (often printing the message when the error is first detected # rather than higher up the call tree). # # Also discard hot_generate_error which doesn't do anything useful and never # has. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +20 -76 # md: remove most calls to __bdevname from md.c # # ChangeSet # 2004/08/24 11:28:42-07:00 neilb@cse.unsw.edu.au # [PATCH] md: assorted minor md/raid1 fixes # # 1/ rationalise read_balance and "map" in raid1. Discard map and # tidyup the interface to read_balance so it can be used instead. # # 2/ use offsetof rather than a caclulation to find the size of an # structure with a var-length array at the end. # # 3/ remove some meaningless #defines # # 4/ use printk_ratelimit to limit reports of failed sectors being redirected. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/raid1.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +36 -53 # md: assorted minor md/raid1 fixes # # ChangeSet # 2004/08/24 11:28:31-07:00 neilb@cse.unsw.edu.au # [PATCH] md: assorted fixes/improvemnet to generic md resync code. # # 1/ Introduce "mddev->resync_max_sectors" so that an md personality # can ask for resync to cover a different address range than that of a # single drive. raid10 will use this. # # 2/ fix is_mddev_idle so that if there seem to be a negative number # of events, it doesn't immediately assume activity. # # 3/ make "sync_io" (the count of IO sectors used for array resync) # an atomic_t to avoid SMP races. # # 4/ Pass md_sync_acct a "block_device" rather than the containing "rdev", # as the whole rdev isn't needed. Also make this an inline function. # # 5/ Make sure recovery gets interrupted on any error. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/raid/md_k.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +6 -0 # md: assorted fixes/improvemnet to generic md resync code. # # include/linux/raid/md.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +0 -1 # md: assorted fixes/improvemnet to generic md resync code. # # include/linux/genhd.h # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +1 -1 # md: assorted fixes/improvemnet to generic md resync code. # # drivers/md/raid6main.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +3 -2 # md: assorted fixes/improvemnet to generic md resync code. # # drivers/md/raid5.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +3 -2 # md: assorted fixes/improvemnet to generic md resync code. # # drivers/md/raid1.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +2 -2 # md: assorted fixes/improvemnet to generic md resync code. # # drivers/md/md.c # 2004/08/24 02:08:45-07:00 neilb@cse.unsw.edu.au +22 -10 # md: assorted fixes/improvemnet to generic md resync code. # # ChangeSet # 2004/08/24 11:28:18-07:00 wli@holomorphy.com # [PATCH] hugetlb: permit executable mappings # # During the kernel summit, some discussion was had about the support # requirements for a userspace program loader that loads executables into # hugetlb on behalf of a major application (Oracle). In order to support # this in a robust fashion, the cleanup of the hugetlb must be robust in the # presence of disorderly termination of the programs (e.g. kill -9). Hence, # the cleanup semantics are those of System V shared memory, but Linux' # System V shared memory needs one critical extension for this use: # executability. # # The following microscopic patch enables this major application to provide # robust hugetlb cleanup. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:28:16-07:00 ajgrothe@yahoo.com # [CRYPTO]: Add Whirlpool digest algorithm. # # Given the recent potential weaknesses in the SHA and MD families, # I thought it might not be a bad idea to include another hash/digest # algorithm in the kernel. # # So here is Whirlpool. I chose it for a couple of reasons. # # o - It is by the same people who did Khazad. I feel pretty good about their work. # o - It has been evaluated by NESSIE # https://www.cosic.esat.kuleuven.ac.be/nessie/reports/phase1/sagwp3-037_1.pdf # o - NESSIE has accepted it as one of the cryptographic primitives # o - It will be part of an ISO standard in the revised ISO/IEC 10118-3:2003(E) standard, thanks to # NESSIE # o - It is patent free and has an implementation in the public domain. # # Signed-off-by: Aaron Grothe # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # ipc/shm.c # 2004/08/24 02:08:44-07:00 wli@holomorphy.com +4 -0 # hugetlb: permit executable mappings # # include/linux/shm.h # 2004/08/24 02:08:44-07:00 wli@holomorphy.com +1 -0 # hugetlb: permit executable mappings # # ChangeSet # 2004/08/24 11:28:07-07:00 wli@holomorphy.com # [PATCH] x86 PAE swapspace expansion # # PAE is artificially limited in terms of swapspace to the same bitsplit as # ordinary i386, a 5/24 split (32 swapfiles, 64GB max swapfile size), when a # 5/27 split (32 swapfiles, 512GB max swapfile size) is feasible. This patch # transparently removes that limitation by using more of the space available # in PAE's wider ptes for swap ptes. # # While this is obviously not likely to be used directly, it is important # from the standpoint of strict non-overcommit, where the swapspace must be # potentially usable in order to be reserved for non-overcommit. There are # workloads with Committed_AS of over 256GB on ia32 PAE wanting strict # non-overcommit to prevent being OOM killed. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/pgtable.h # 2004/08/24 02:08:44-07:00 wli@holomorphy.com +0 -7 # x86 PAE swapspace expansion # # include/asm-i386/pgtable-3level.h # 2004/08/24 02:08:44-07:00 wli@holomorphy.com +7 -0 # x86 PAE swapspace expansion # # include/asm-i386/pgtable-2level.h # 2004/08/24 02:08:44-07:00 wli@holomorphy.com +7 -0 # x86 PAE swapspace expansion # # ChangeSet # 2004/08/24 11:27:55-07:00 zwane@fsmlabs.com # [PATCH] fix i386/x86_64 idle routine selection # # This was broken when the mwait stuff went in since it executes after the # initial idle_setup() has already selected an idle routine and overrides it # with default_idle. # # Signed-off-by: Venkatesh Pallipadi # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/x86_64/kernel/process.c # 2004/08/24 02:08:44-07:00 zwane@fsmlabs.com +1 -6 # fix i386/x86_64 idle routine selection # # arch/i386/kernel/process.c # 2004/08/24 02:08:44-07:00 zwane@fsmlabs.com +1 -6 # fix i386/x86_64 idle routine selection # # ChangeSet # 2004/08/24 11:27:43-07:00 manfred@colorfullife.com # [PATCH] remove magic +1 from shm segment count # # Michael Kerrisk found a bug in the shm accounting code: sysv shm allows to # create SHMMNI+1 shared memory segments, instead of SHMMNI segments. The +1 # is probably from the first shared anonymous mapping implementation that # used the sysv code to implement shared anon mappings. # # The implementation got replaced, it's now the other way around (sysv uses # the shared anon code), but the +1 remained. # # Signed-off-by: Manfred Spraul # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ipc/shm.c # 2004/08/24 02:08:43-07:00 manfred@colorfullife.com +1 -1 # remove magic +1 from shm segment count # # ChangeSet # 2004/08/24 11:27:32-07:00 zwane@arm.linux.org.uk # [PATCH] OProfile/XScale fixes for PXA270/XScale2 # # The incorrect mask was being used when writing back to PMNC write-only-zero # bits as well as only ticking the CCNT every 64 processor cycles. Tested on # IOP331 and PXA270, i'm still looking for XScale1 users... # # Signed-off-by: Luca Rossato # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/arm/oprofile/op_model_xscale.c # 2004/08/24 02:08:43-07:00 zwane@arm.linux.org.uk +15 -6 # OProfile/XScale fixes for PXA270/XScale2 # # ChangeSet # 2004/08/24 11:27:20-07:00 wli@holomorphy.com # [PATCH] kill CLONE_IDLETASK # # The sole remaining usage of CLONE_IDLETASK is to determine whether pid # allocation should be performed in copy_process(). This patch eliminates # that last branch on CLONE_IDLETASK in the normal process creation path, # removes the masking of CLONE_IDLETASK from clone_flags as it's now ignored # under all circumstances, and furthermore eliminates the symbol # CLONE_IDLETASK entirely. # # From: William Lee Irwin III # # Fix the fork-idle consolidation. During that consolidation, the generic # code was made to pass a pointer to on-stack pt_regs that had been memset() # to 0. ia64, however, requires a NULL pt_regs pointer argument and # dispatches on that in its copy_thread() function to do SMP # trampoline-specific RSE -related setup. Passing pointers to zeroed pt_regs # resulted in SMP wakeup -time deadlocks and exceptions. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/24 02:08:43-07:00 wli@holomorphy.com +17 -20 # kill CLONE_IDLETASK # # arch/ia64/kernel/smpboot.c # 2004/08/24 02:08:43-07:00 wli@holomorphy.com +5 -0 # kill CLONE_IDLETASK # # ChangeSet # 2004/08/24 11:27:07-07:00 wli@holomorphy.com # [PATCH] sched: consolidate CLONE_IDLETASK masking # # Every arch now bears the burden of sanitizing CLONE_IDLETASK out of the # clone_flags passed to do_fork() by userspace. This patch hoists the # masking of CLONE_IDLETASK out of the system call entrypoints into # do_fork(), and thereby removes some small overheads from do_fork(), as # do_fork() may now assume that CLONE_IDLETASK has been cleared. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +10 -8 # sched: consolidate CLONE_IDLETASK masking # # include/linux/sched.h # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +0 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/x86_64/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/x86_64/ia32/sys_ia32.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/sparc64/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +0 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/sparc/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +0 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/sh64/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/sh/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/s390/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/s390/kernel/compat_linux.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/ppc64/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/ppc/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/parisc/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/mips/kernel/syscall.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/m68knommu/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/m68k/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/ia64/kernel/entry.S # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +2 -2 # sched: consolidate CLONE_IDLETASK masking # # arch/ia64/kernel/asm-offsets.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +0 -5 # sched: consolidate CLONE_IDLETASK masking # # arch/ia64/ia32/ia32_entry.S # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/i386/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/h8300/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/cris/arch-v10/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/arm26/kernel/sys_arm.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/arm/kernel/sys_arm.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -1 # sched: consolidate CLONE_IDLETASK masking # # arch/alpha/kernel/process.c # 2004/08/24 02:08:42-07:00 wli@holomorphy.com +1 -2 # sched: consolidate CLONE_IDLETASK masking # # ChangeSet # 2004/08/24 11:26:54-07:00 josha@sgi.com # [PATCH] improve speed of freeing bootmem # # Attached is a patch that greatly improves the speed of freeing boot memory. # On ia64 machines with 2GB or more memory (I didn't test with less, but I # can't imagine there being a problem), the speed improvement is about 75% # for the function free_all_bootmem_core. This translates to savings on the # order of 1 minute / TB of memory during boot time. That number comes from # testing on a machine with 512GB, and extrapolating based on profiling of an # unpatched 4TB machine. For 4 and 8 TB machines, the time spent in this # function is about 1 minutes/TB, which is painful especially given that # there is no indication of what is going on put to the console (this issue # to possibly be addressed later). # # The basic idea is to free higher order pages instead of going through every # single one. Also, some unnecessary atomic operations are done away with # and replaced with non-atomic equivalents, and prefetching is done where it # helps the most. For a more in-depth discusion of this patch, please see # the linux-ia64 archives (topic is "free bootmem feedback patch"). # # The patch is originally Tony Luck's, and I added some further optimizations # (non-atomic ops improvements and prefetching). # # Signed-off-by: Tony Luck # Signed-off-by: Josh Aas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/bootmem.c # 2004/08/24 02:08:42-07:00 josha@sgi.com +22 -3 # improve speed of freeing bootmem # # include/linux/page-flags.h # 2004/08/24 02:08:42-07:00 josha@sgi.com +1 -0 # improve speed of freeing bootmem # # ChangeSet # 2004/08/24 11:26:42-07:00 pbadari@us.ibm.com # [PATCH] Fix mpage_readpage() for big requests # # The problem is, if we increase our readhead size arbitrarily (say 2M), we # call mpage_readpages() with 2M and when it tries to allocated a bio enough to # fit 2M it fails, then we kick it back to "confused" code - which does 4K at # a time. # # The fix is to ask for the maxium the driver can handle. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # crypto/tcrypt.h # 2004/08/24 11:26:41-07:00 ajgrothe@yahoo.com +104 -0 # [CRYPTO]: Add Whirlpool digest algorithm. # # crypto/tcrypt.c # 2004/08/24 11:26:41-07:00 ajgrothe@yahoo.com +8 -1 # [CRYPTO]: Add Whirlpool digest algorithm. # # crypto/Makefile # 2004/08/24 11:26:41-07:00 ajgrothe@yahoo.com +1 -0 # [CRYPTO]: Add Whirlpool digest algorithm. # # crypto/Kconfig # 2004/08/24 11:26:41-07:00 ajgrothe@yahoo.com +15 -0 # [CRYPTO]: Add Whirlpool digest algorithm. # # Documentation/crypto/api-intro.txt # 2004/08/24 11:26:41-07:00 ajgrothe@yahoo.com +3 -0 # [CRYPTO]: Add Whirlpool digest algorithm. # # fs/mpage.c # 2004/08/24 02:08:42-07:00 pbadari@us.ibm.com +2 -1 # Fix mpage_readpage() for big requests # # crypto/whirlpool.c # 2004/08/24 11:26:34-07:00 ajgrothe@yahoo.com +1131 -0 # [CRYPTO]: Add Whirlpool digest algorithm. # # crypto/whirlpool.c # 2004/08/24 11:26:34-07:00 ajgrothe@yahoo.com +0 -0 # BitKeeper file /disk1/BK/net-2.6/crypto/whirlpool.c # # ChangeSet # 2004/08/24 11:26:31-07:00 roland@topspin.com # [PATCH] x86: remove hard-coded numbers from ptr_ok() # # Looks like arch/i386/kernel/doublefault.c is one place in the code that # hardcodes the assumption that PAGE_OFFSET == 0xC0000000. Here's a patch # that fixes that. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/kernel/doublefault.c # 2004/08/24 02:08:41-07:00 roland@topspin.com +1 -1 # x86: remove hard-coded numbers from ptr_ok() # # ChangeSet # 2004/08/24 11:26:19-07:00 James@superbug.demon.co.uk # [PATCH] emu10k1 maintainer update # # Rui Sousa has been unreachable for a long time now, so I have taken over # the emu10k1 project on sf.net. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # MAINTAINERS # 2004/08/24 02:08:41-07:00 James@superbug.demon.co.uk +2 -2 # emu10k1 maintainer update # # ChangeSet # 2004/08/24 11:26:07-07:00 andrea@suse.de # [PATCH] Correctly handle d_path error returns # # There's some minor bug in the d_path handling (the nfsd one may not the the # correct fix, there's no failure path for it, so I just terminate the # string, and the last one in the audit subsystem is just a robustness # cleanup if somebody will extend d_path in the future, right now it's a # noop). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/audit.c # 2004/08/24 02:08:41-07:00 andrea@suse.de +1 -1 # Correctly handle d_path error returns # # fs/nfsd/export.c # 2004/08/24 02:08:41-07:00 andrea@suse.de +5 -0 # Correctly handle d_path error returns # # fs/compat.c # 2004/08/24 02:08:41-07:00 andrea@suse.de +2 -0 # Correctly handle d_path error returns # # ChangeSet # 2004/08/24 11:25:56-07:00 akpm@osdl.org # [PATCH] alloc_pages priority tuning # # Fix up the logic which decides when the caller can dip into page reserves. # # - If the caller has realtime scheduling policy, or if the caller cannot run # direct reclaim, then allow the caller to use up to a quarter of the page # reserves. # # - If the caller has __GFP_HIGH then allow the caller to use up to half of # the page reserves. # # - If the caller has PF_MEMALLOC then the caller can use 100% of the page # reserves. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/08/24 02:08:40-07:00 akpm@osdl.org +14 -6 # alloc_pages priority tuning # # ChangeSet # 2004/08/24 11:25:44-07:00 nickpiggin@yahoo.com.au # [PATCH] vm: alloc_pages watermark fixes # # Previously the ->protection[] logic was broken. It was difficult to follow # and basically didn't use the asynch reclaim watermarks (pages_min, # pages_low, pages_high) properly. # # Now use ->protection *only* for lower-zone protection. So the allocator # now explicitly uses the ->pages_low, ->pages_min watermarks and adds # ->protection on top of that, instead of trying to use ->protection for # everything. # # Pages are allocated down to (->pages_low + ->protection), once this is # reached, kswapd the background reclaim is started; after this, we can # allocate down to (->pages_min + ->protection) without blocking; the memory # below pages_min is reserved for __GFP_HIGH and PF_MEMALLOC allocations. # kswapd attempts to reclaim memory until ->pages_high is reached. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/08/24 02:08:40-07:00 nickpiggin@yahoo.com.au +53 -66 # vm: alloc_pages watermark fixes # # ChangeSet # 2004/08/24 11:25:33-07:00 nickpiggin@yahoo.com.au # [PATCH] vm: writeout watermark tuning # # Slightly change the writeout watermark calculations so we keep background # and synchronous writeout watermarks in the same ratios after adjusting them # for the amout of mapped memory. This ensures we should always attempt to # start background writeout before synchronous writeout and preserves the # admin's desired background-versus-forground ratios after we've # auto-adjusted one of them. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page-writeback.c # 2004/08/24 02:08:40-07:00 nickpiggin@yahoo.com.au +5 -3 # vm: writeout watermark tuning # # ChangeSet # 2004/08/24 11:25:21-07:00 hugh@veritas.com # [PATCH] simple fs stop -ve dentries # # A tmpfs user reported increasingly slow directory reads when repeatedly # creating and unlinking in a mkstemp-like way. The negative dentries # accumulate alarmingly (until memory pressure finally frees them), and are # just a hindrance to any in-memory filesystem. simple_lookup set d_op to # arrange for negative dentries to be deleted immediately. # # (But I failed to discover how it is that on-disk filesystems seem to keep # their negative dentries within manageable bounds: this effect was gross # with tmpfs or ramfs, but no problem at all with extN or reiser.) # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/libfs.c # 2004/08/24 02:08:40-07:00 hugh@veritas.com +15 -2 # simple fs stop -ve dentries # # ChangeSet # 2004/08/24 11:25:09-07:00 hugh@veritas.com # [PATCH] clarify get_task_mm (mmgrab) # # Clarify mmgrab by collapsing it into get_task_mm (in fork.c not inline), # and commenting on the special case it is guarding against: when use_mm in # an AIO daemon temporarily adopts the mm while it's on its way out. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +26 -12 # clarify get_task_mm (mmgrab) # # include/linux/sched.h # 2004/08/24 02:08:39-07:00 hugh@veritas.com +2 -22 # clarify get_task_mm (mmgrab) # # fs/proc/array.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +1 -5 # clarify get_task_mm (mmgrab) # # ChangeSet # 2004/08/24 11:24:57-07:00 marcelo.tosatti@cyclades.com # [PATCH] x86 bitops.h commentary on instruction reordering # # Back when we were discussing the need for a memory barrier in sync_page(), # it came to me (thanks Andrea!) that the bit operations can be perfectly # reordered on architectures other than x86. # # I think the commentary on i386 bitops.h is misleading, its worth to note # that that these operations are not guaranteed not to be reordered on # different architectures. # # clear_bit() already does that: # # * clear_bit() is atomic and may not be reordered. However, it does # * not contain a memory barrier, so if it is used for locking purposes, # * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() # * in order to ensure changes are visible on other processors. # # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-i386/bitops.h # 2004/08/24 02:08:39-07:00 marcelo.tosatti@cyclades.com +10 -2 # x86 bitops.h commentary on instruction reordering # # ChangeSet # 2004/08/24 11:24:46-07:00 hugh@veritas.com # [PATCH] rmaplock: swapoff use anon_vma # # Swapoff can make good use of a page's anon_vma and index, while it's still # left in swapcache, or once it's brought back in and the first pte mapped back: # unuse_vma go directly to just one page of only those vmas with the same # anon_vma. And unuse_process can skip any vmas without an anon_vma (extending # the hugetlb check: hugetlb vmas have no anon_vma). # # This just hacks in on top of the existing procedure, still going through all # the vmas of all the mms in mmlist. A more elegant procedure might replace # mmlist by a list of anon_vmas: but that would be more work to implement, with # apparently more overhead in the common paths. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swapfile.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +16 -7 # rmaplock: swapoff use anon_vma # # mm/rmap.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +20 -0 # rmaplock: swapoff use anon_vma # # include/linux/rmap.h # 2004/08/24 02:08:39-07:00 hugh@veritas.com +5 -0 # rmaplock: swapoff use anon_vma # # ChangeSet # 2004/08/24 11:24:34-07:00 hugh@veritas.com # [PATCH] rmaplock: mm lock ordering # # With page_map_lock out of the way, there's no need for page_referenced and # try_to_unmap to use trylocks - provided we switch anon_vma->lock and # mm->page_table_lock around in anon_vma_prepare. Though I suppose it's # possible that we'll find that vmscan makes better progress with trylocks than # spinning - we're free to choose trylocks again if so. # # Try to update the mm lock ordering documentation in filemap.c. But I still # find it confusing, and I've no idea of where to stop. So add an mm lock # ordering list I can understand to rmap.c. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/rmap.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +45 -37 # rmaplock: mm lock ordering # # mm/filemap.c # 2004/08/24 02:08:39-07:00 hugh@veritas.com +9 -6 # rmaplock: mm lock ordering # # ChangeSet # 2004/08/24 11:24:22-07:00 hugh@veritas.com # [PATCH] rmaplock: SLAB_DESTROY_BY_RCU # # With page_map_lock gone, how to stabilize page->mapping's anon_vma while # acquiring anon_vma->lock in page_referenced_anon and try_to_unmap_anon? # # The page cannot actually be freed (vmscan holds reference), but however much # we check page_mapped (which guarantees that anon_vma is in use - or would # guarantee that if we added suitable barriers), there's no locking against page # becoming unmapped the instant after, then anon_vma freed. # # It's okay to take anon_vma->lock after it's freed, so long as it remains a # struct anon_vma (its list would become empty, or perhaps reused for an # unrelated anon_vma: but no problem since we always check that the page located # is the right one); but corruption if that memory gets reused for some other # purpose. # # This is not unique: it's liable to be problem whenever the kernel tries to # approach a structure obliquely. It's generally solved with an atomic # reference count; but one advantage of anon_vma over anonmm is that it does not # have such a count, and it would be a backward step to add one. # # Therefore... implement SLAB_DESTROY_BY_RCU flag, to guarantee that such a # kmem_cache_alloc'ed structure cannot get freed to other use while the # rcu_read_lock is held i.e. preempt disabled; and use that for anon_vma. # # Fix concerns raised by Manfred: this flag is incompatible with poisoning and # destructor, and kmem_cache_destroy needs to synchronize_kernel. # # I hope SLAB_DESTROY_BY_RCU may be useful elsewhere; but though it's safe for # little anon_vma, I'd be reluctant to use it on any caches whose immediate # shrinkage under pressure is important to the system. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/slab.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +62 -7 # rmaplock: SLAB_DESTROY_BY_RCU # # mm/rmap.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +33 -17 # rmaplock: SLAB_DESTROY_BY_RCU # # include/linux/slab.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +1 -0 # rmaplock: SLAB_DESTROY_BY_RCU # # ChangeSet # 2004/08/24 11:24:11-07:00 hugh@veritas.com # [PATCH] rmaplock: kill page_map_lock # # The pte_chains rmap used pte_chain_lock (bit_spin_lock on PG_chainlock) to # lock its pte_chains. We kept this (as page_map_lock: bit_spin_lock on # PG_maplock) when we moved to objrmap. But the file objrmap locks its vma tree # with mapping->i_mmap_lock, and the anon objrmap locks its vma list with # anon_vma->lock: so isn't the page_map_lock superfluous? # # Pretty much, yes. The mapcount was protected by it, and needs to become an # atomic: starting at -1 like page _count, so nr_mapped can be tracked precisely # up and down. The last page_remove_rmap can't clear anon page mapping any # more, because of races with page_add_rmap; from which some BUG_ONs must go for # the same reason, but they've served their purpose. # # vmscan decisions are naturally racy, little change there beyond removing # page_map_lock/unlock. But to stabilize the file-backed page->mapping against # truncation while acquiring i_mmap_lock, page_referenced_file now needs page # lock to be held even for refill_inactive_zone. There's a similar issue in # acquiring anon_vma->lock, where page lock doesn't help: which this patch # pretends to handle, but actually it needs the next. # # Roughly 10% cut off lmbench fork numbers on my 2*HT*P4. Must confess my # testing failed to show the races even while they were knowingly exposed: would # benefit from testing on racier equipment. # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +7 -30 # rmaplock: kill page_map_lock # # mm/rmap.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +76 -59 # rmaplock: kill page_map_lock # # mm/page_alloc.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +5 -5 # rmaplock: kill page_map_lock # # include/linux/rmap.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +3 -10 # rmaplock: kill page_map_lock # # include/linux/page-flags.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +1 -2 # rmaplock: kill page_map_lock # # include/linux/mm.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +18 -4 # rmaplock: kill page_map_lock # # ChangeSet # 2004/08/24 11:23:59-07:00 hugh@veritas.com # [PATCH] rmaplock: PageAnon in mapping # # First of a batch of five patches to eliminate rmap's page_map_lock, replace # its trylocking by spinlocking, and use anon_vma to speed up swapoff. # # Patches updated from the originals against 2.6.7-mm7: nothing new so I won't # spam the list, but including Manfred's SLAB_DESTROY_BY_RCU fixes, and omitting # the unuse_process mmap_sem fix already in 2.6.8-rc3. # # # This patch: # # Replace the PG_anon page->flags bit by setting the lower bit of the pointer in # page->mapping when it's anon_vma: PAGE_MAPPING_ANON bit. # # We're about to eliminate the locking which kept the flags and mapping in # synch: it's much easier to work on a local copy of page->mapping, than worry # about whether flags and mapping are in synch (though I imagine it could be # done, at greater cost, with some barriers). # # Signed-off-by: Hugh Dickins # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 11:23:53-07:00 lkml@felipe-alfaro.com # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # Signed-off-by: Felipe Alfaro Solana # Signed-off-by: David S. Miller # # mm/rmap.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +3 -17 # rmaplock: PageAnon in mapping # # mm/page_alloc.c # 2004/08/24 02:08:38-07:00 hugh@veritas.com +0 -3 # rmaplock: PageAnon in mapping # # include/linux/page-flags.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +0 -6 # rmaplock: PageAnon in mapping # # include/linux/mm.h # 2004/08/24 02:08:38-07:00 hugh@veritas.com +16 -7 # rmaplock: PageAnon in mapping # # ChangeSet # 2004/08/24 11:23:48-07:00 rl@hellgate.ch # [PATCH] Fix /proc/pid/statm documentation # # I really wanted /proc/pid/statm to die and I still believe the # reasoning is valid. As it doesn't look like that is going to happen, # though, I offer this fix for the respective documentation. Note: lrs/drs # fields are switched. # # Signed-off-by: Roger Luethi # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/filesystems/proc.txt # 2004/08/24 02:08:38-07:00 rl@hellgate.ch +11 -9 # Fix /proc/pid/statm documentation # # ChangeSet # 2004/08/24 11:23:35-07:00 arjanv@redhat.com # [PATCH] Automatically enable bigsmp on big HP machines # # This enables apic=bigsmp automatically on some big HP machines that need # it. This makes them boot without kernel parameters on a generic arch # kernel. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mach-generic/bigsmp.c # 2004/08/24 02:08:37-07:00 arjanv@redhat.com +27 -1 # Automatically enable bigsmp on big HP machines # # arch/i386/kernel/io_apic.c # 2004/08/24 02:08:37-07:00 arjanv@redhat.com +1 -1 # Automatically enable bigsmp on big HP machines # # ChangeSet # 2004/08/24 11:23:25-07:00 wli@holomorphy.com # [PATCH] ia64: dma_mapping fix # # We need to be able to dereference struct device in # include/asm-ia64/dma-mapping.h. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ia64/dma-mapping.h # 2004/08/24 02:08:37-07:00 wli@holomorphy.com +2 -1 # ia64: dma_mapping fix # # ChangeSet # 2004/08/24 11:23:14-07:00 ak@suse.de # [PATCH] md: make MD no device warning KERN_WARNING # # Prevents some noise during boot up when no MD volumes are found. # # I think I picked it up from someone else, but I cannot remember from whom # (sorry) # # Cc: Neil Brown # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/md/md.c # 2004/08/24 02:08:37-07:00 ak@suse.de +1 -1 # md: make MD no device warning KERN_WARNING # # ChangeSet # 2004/08/24 11:23:04-07:00 zaitcev@redhat.com # [PATCH] Make MAX_INIT_ARGS 32 # # We at Red Hat shipped a larger number of arguments for quite some time, it # was required for installations on IBM mainframe (s390), which doesn't have # a good way to pass arguments. # # There are a number of reasonable situations that go past the current limits # of 8. One that comes to mind is when you want to perform a manual vnc # install on a headless machine using anaconda. This requires passing in a # number of parameters to get anaconda past the initial (no-gui) loader # screens. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/ipv4/netfilter/ip_conntrack_proto_udp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # net/ipv4/netfilter/ip_conntrack_proto_tcp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # net/ipv4/netfilter/ip_conntrack_proto_icmp.c # 2004/08/24 11:23:03-07:00 lkml@felipe-alfaro.com +1 -0 # [NETFILTER]: Missing netfilter_ipv4.c include in conntrack proto code. # # init/main.c # 2004/08/24 02:08:36-07:00 zaitcev@redhat.com +2 -2 # Make MAX_INIT_ARGS 32 # # ChangeSet # 2004/08/24 11:22:52-07:00 suparna@in.ibm.com # [PATCH] AIO: workqueue context switch reduction # # From: Chris Mason # # I compared the 2.6 pipetest results with the 2.4 suse kernel, and 2.6 was # roughly 40% slower. During the pipetest run, 2.6 generates ~600,000 # context switches per second while 2.4 generates 30 or so. # # aio-context-switch (attached) has a few changes that reduces our context # switch rate, and bring performance back up to 2.4 levels. These have only # really been tested against pipetest, they might make other workloads worse. # # The basic theory behind the patch is that it is better for the userland # process to call run_iocbs than it is to schedule away and let the worker # thread do it. # # # 1) on io_submit, use run_iocbs instead of run_iocb # 2) on io_getevents, call run_iocbs if no events were available. # # 3) don't let two procs call run_iocbs for the same context at the same # time. They just end up bouncing on spinlocks. # # The first three optimizations got me down to 360,000 context switches per # second, and they help build a little structure to allow optimization #4, # which uses queue_delayed_work(HZ/10) instead of queue_work. # # That brings down the number of context switches to 2.4 levels. # # Adds aio_run_all_iocbs so that normal processes can run all the pending # retries on the run list. This allows worker threads to keep using list # splicing, but regular procs get to run the list until it stays empty. The # end result should be less work for the worker threads. # # I was able to trigger short stalls (1sec) with aio-stress, and with the # current patch they are gone. Could be wishful thinking on my part though, # please let me know how this works for you. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/aio.c # 2004/08/24 02:08:36-07:00 suparna@in.ibm.com +46 -7 # AIO: workqueue context switch reduction # # ChangeSet # 2004/08/24 11:22:40-07:00 suparna@in.ibm.com # [PATCH] AIO: Splice runlist for fairness across io contexts # # This patch tries be a little fairer across multiple io contexts in handling # retries, helping make sure progress happens uniformly across different io # contexts (especially if they are acting on independent queues). # # It splices the ioctx runlist before processing it in __aio_run_iocbs. If # new iocbs get added to the ctx in meantime, it queues a fresh workqueue # entry instead of handling them righaway, so that other ioctxs' retries get # a chance to be processed before the newer entries in the queue. # # This might make a difference in a situation where retries are getting # queued very fast on one ioctx, while the workqueue entry for another ioctx # is stuck behind it. I've only seen this occasionally earlier and can't # recreate it consistently, but may be worth including anyway. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/aio.c # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +20 -6 # AIO: Splice runlist for fairness across io contexts # # ChangeSet # 2004/08/24 11:22:28-07:00 suparna@in.ibm.com # [PATCH] AIO: retry infrastructure fixes and enhancements # # From: Daniel McNeil # From: Chris Mason # # AIO: retry infrastructure fixes and enhancements # # Reorganises, comments and fixes the AIO retry logic. Fixes # and enhancements include: # # - Split iocb setup and execution in io_submit # (also fixes io_submit error reporting) # - Use aio workqueue instead of keventd for retries # - Default high level retry methods # - Subtle use_mm/unuse_mm fix # - Code commenting # - Fix aio process hang on EINVAL (Daniel McNeil) # - Hold the context lock across unuse_mm # - Acquire task_lock in use_mm() # - Allow fops to override the retry method with their own # - Elevated ref count for AIO retries (Daniel McNeil) # - set_fs needed when calling use_mm # - Flush workqueue on __put_ioctx (Chris Mason) # - Fix io_cancel to work with retries (Chris Mason) # - Read-immediate option for socket/pipe retry support # # Note on default high-level retry methods support # ================================================ # # High-level retry methods allows an AIO request to be executed as a series of # non-blocking iterations, where each iteration retries the remaining part of # the request from where the last iteration left off, by reissuing the # corresponding AIO fop routine with modified arguments representing the # remaining I/O. The retries are "kicked" via the AIO waitqueue callback # aio_wake_function() which replaces the default wait queue entry used for # blocking waits. # # The high level retry infrastructure is responsible for running the # iterations in the mm context (address space) of the caller, and ensures that # only one retry instance is active at a given time, thus relieving the fops # themselves from having to deal with potential races of that sort. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +13 -2 # AIO: retry infrastructure fixes and enhancements # # include/linux/wait.h # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +9 -0 # AIO: retry infrastructure fixes and enhancements # # include/linux/sched.h # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +7 -1 # AIO: retry infrastructure fixes and enhancements # # include/linux/errno.h # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +1 -0 # AIO: retry infrastructure fixes and enhancements # # include/linux/aio.h # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +27 -1 # AIO: retry infrastructure fixes and enhancements # # fs/aio.c # 2004/08/24 02:08:35-07:00 suparna@in.ibm.com +505 -95 # AIO: retry infrastructure fixes and enhancements # # ChangeSet # 2004/08/24 11:22:16-07:00 bjorn.helgaas@hp.com # [PATCH] cpqfc: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers # often worked without this, but it is now required in order to route # PCI interrupts correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/scsi/cpqfcTSinit.c # 2004/08/24 02:08:35-07:00 bjorn.helgaas@hp.com +35 -16 # cpqfc: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:22:05-07:00 bjorn.helgaas@hp.com # [PATCH] de4x5.c: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers # often worked without this, but it is now required in order to route # PCI interrupts correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/tulip/de4x5.c # 2004/08/24 02:08:34-07:00 bjorn.helgaas@hp.com +10 -2 # de4x5.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:53-07:00 bjorn.helgaas@hp.com # [PATCH] ioc3-eth.c: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers often # worked without this, but it is now required in order to route PCI interrupts # correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/ioc3-eth.c # 2004/08/24 02:08:34-07:00 bjorn.helgaas@hp.com +10 -2 # ioc3-eth.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:42-07:00 bjorn.helgaas@hp.com # [PATCH] hp100.c: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers often # worked without this, but it is now required in order to route PCI interrupts # correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/net/hp100.c # 2004/08/24 02:08:34-07:00 bjorn.helgaas@hp.com +9 -1 # hp100.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:30-07:00 bjorn.helgaas@hp.com # [PATCH] ibmasm: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers often # worked without this, but it is now required in order to route PCI # interrupts correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/misc/ibmasm/module.c # 2004/08/24 02:08:34-07:00 bjorn.helgaas@hp.com +11 -1 # ibmasm: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:20-07:00 bjorn.helgaas@hp.com # [PATCH] tpam_main.c: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers # often worked without this, but it is now required in order to route # PCI interrupts correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/tpam/tpam_main.c # 2004/08/24 02:08:33-07:00 bjorn.helgaas@hp.com +33 -14 # tpam_main.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:08-07:00 bjorn.helgaas@hp.com # [PATCH] ip2main.c: add missing pci_enable_device() # # I don't have this hardware, so this has been compiled but not tested. # # Add pci_enable_device()/pci_disable_device In the past, drivers often worked # without this, but it is now required in order to route PCI interrupts # correctly. In addition, this driver incorrectly used the IRQ value from PCI # config space rather than the one in the struct pci_dev. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/ip2main.c # 2004/08/24 02:08:33-07:00 bjorn.helgaas@hp.com +13 -4 # ip2main.c: add missing pci_enable_device() # # drivers/char/ip2/ip2types.h # 2004/08/24 02:08:33-07:00 bjorn.helgaas@hp.com +3 -0 # ip2main.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:21:01-07:00 yoshfuji@linux-ipv6.org # [IPV6]: Fix device handling in ip6_route_add(). # # Signed-off-by: HIDEAKI Yoshifuji # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/24 11:20:57-07:00 bjorn.helgaas@hp.com # [PATCH] idt77252.c: add missing pci_enable_device() # # Add pci_enable_device()/pci_disable_device(). In the past, drivers often # worked without this, but it is now required in order to route PCI # interrupts correctly. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/atm/idt77252.c # 2004/08/24 02:08:33-07:00 bjorn.helgaas@hp.com +42 -26 # idt77252.c: add missing pci_enable_device() # # ChangeSet # 2004/08/24 11:20:45-07:00 haveblue@us.ibm.com # [PATCH] don't pass mem_map into init functions # # When using CONFIG_NONLINEAR, a zone's mem_map isn't contiguous, and isn't # allocated in the same place. This means that nonlinear doesn't really have # a mem_map[] to pass into free_area_init_node() or memmap_init_zone() which # makes any sense. # # So, this patch removes the 'struct page *mem_map' argument to both of # those functions. All non-NUMA architectures just pass a NULL in there, # which is ignored. The solution on the NUMA arches is to pass the mem_map in # via the pgdat, which works just fine. # # To replace the removed arguments, a call to pfn_to_page(node_start_pfn) is # made. This is valid because all of the pfn_to_page() implementations rely # only on the pgdats, which are already set up at this time. Plus, the # pfn_to_page() method should work for any future nonlinear-type code. # # Finally, the patch creates a function: node_alloc_mem_map(), which I plan # to effectively #ifdef out for nonlinear at some future date. # # Compile tested and booted on SMP x86, NUMAQ, and ppc64. # # From: Jesse Barnes # # Fix up ia64 specific memory map init function in light of Dave's # memmap_init cleanups. # # Signed-off-by: Jesse Barnes # # From: Dave Hansen # # Looks like I missed a couple of architectures. This patch, on top of my # previous one and Jesse's should clean up the rest. # # From: William Lee Irwin III # # x86-64 wouldn't compile with NUMA support on, as node_alloc_mem_map() # references mem_map outside #ifdefs on CONFIG_NUMA/CONFIG_DISCONTIGMEM. This # patch wraps that reference in such an #ifdef. # # From: William Lee Irwin III # # Initializing NODE_DATA(nid)->node_mem_map prior to calling it should do. # # From: Dave Hansen # # Rick, I bet you didn't think your nerf weapons would be so effective in # getting that compile error fixed, did you? # # Applying the attached patch and commenting out this line: # # arch/i386/kernel/nmi.c: In function `proc_unknown_nmi_panic': # arch/i386/kernel/nmi.c:558: too few arguments to function `proc_dointvec' # # will let it compile. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/ipv6/route.c # 2004/08/24 11:20:43-07:00 yoshfuji@linux-ipv6.org +6 -3 # [IPV6]: Fix device handling in ip6_route_add(). # # Signed-off-by: HIDEAKI Yoshifuji # Signed-off-by: David S. Miller # # mm/page_alloc.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +23 -18 # don't pass mem_map into init functions # # include/linux/mm.h # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +2 -3 # don't pass mem_map into init functions # # include/asm-ia64/pgtable.h # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/x86_64/mm/numa.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/sparc64/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/sparc/mm/sun4c.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/sparc/mm/srmmu.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/sh/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/ppc64/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/parisc/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/mips/sgi-ip27/ip27-memory.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/ia64/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +6 -4 # don't pass mem_map into init functions # # arch/ia64/mm/discontig.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -2 # don't pass mem_map into init functions # # arch/ia64/mm/contig.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +3 -2 # don't pass mem_map into init functions # # arch/i386/mm/discontig.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +4 -4 # don't pass mem_map into init functions # # arch/arm/mm/init.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # arch/alpha/mm/numa.c # 2004/08/24 02:08:33-07:00 haveblue@us.ibm.com +1 -1 # don't pass mem_map into init functions # # ChangeSet # 2004/08/24 11:20:32-07:00 guillaume.thouvenin@bull.net # [PATCH] watchdog: fix warning "defined but not used" # # Function wdtpci_init_one() in file wdt_pci.c generates a warning when # compiling the watchdog driver. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/watchdog/wdt_pci.c # 2004/08/24 02:08:32-07:00 guillaume.thouvenin@bull.net +1 -1 # watchdog: fix warning "defined but not used" # # ChangeSet # 2004/08/24 11:20:21-07:00 wli@holomorphy.com # [PATCH] first/next_cpu returns values > NR_CPUS # # Zwane Mwaikambo wrote: # # The following caused some fireworks whilst merging i386 cpu hotplug. # any_online_cpu(0x2) returns 32 on i386 if we're forced to continue past the # only set bit due to the additional find_first_bit in the find_next_bit i386 # implementation. Not wanting to change current behaviour in the bitops # primitives and since the NR_CPUS thing is a cpumask issue, i've opted to fix # next_cpu() and first_cpu() instead. # # This might save a couple of lines of code. # # From: # # Fix cross-arch ulong/int disaster with find_next_bit(). # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/cpumask.h # 2004/08/24 02:08:32-07:00 wli@holomorphy.com +3 -2 # first/next_cpu returns values > NR_CPUS # # ChangeSet # 2004/08/24 11:20:09-07:00 ak@suse.de # [PATCH] New x86-64 merge # # This fixes various issues in the previous update, in particular # a kernel without CONFIG_GART_IOMMU should boot now again, # # The kernel discoverys PCI BUS<->CPU affinity on AMD systems # now. It is so far used by dma_alloc_coherent to allocate memory # Experimental patches to add this to sysfs exist, but they're not # included yet. On systems with no memory on a CPU this information may # be wrong. # # It has a new experimental CONFIG_UNORDERED_IO option. When enabled # it uses write combining for stores to device iomemory mapping. This # may give better performance with some device drivers, but has a slight # risk of breaking drivers (in general if a driver works on ia64,ppc64,sparc64 # it should also work). Based on some discussions with Grant Grundler. # # It requires the driver to use memory barriers properly. I would be interested # in feedback on any performance changes you're seeing. For a production system I # would recommend to keep it turned off(although I run it on all my systems and # haven't run into any problems yet) # # ACPI and Centrino speedstep is enabled now for Nocona systems. # # The IOMMU code does lazy merging by default now, which should be safe # and may increase performance on block IO. It also avoids SAC force by default # now. # # The machine check code has been improved again, hopefully it is good # now. It will log now machine check events from before the last reset. # And various other fixes. # # The x86-64 parts are now gcc 3.5 clean. # # And various other fixes # # - Update defconfig # - Reset lost ticks on lost time warning, print RIP. # - Make TASK_SIZE test for 32bit (Arjan van de Ven) # - Work around bug in generic code that broke pcibus_to_cpumask # - Actually fix dummy iommu code # - Compile i386 acpi and speedstep-centrino cpufreq modules # - Export cpu_khz # - Fix compilation without GART_IOMMU # - Optimize find_*_bit functions for small fields # - Discover nodes near PCI busses on K8 (Travis Betak, changed by me) # - Optimize gart tlb flush slightly # - Add experimental CONFIG_UNORDERED_IO for unordered IO stores # - Add 32bit emulation for PTRACE_GETEVENTMSG # - Fix kernel_fpu_{begin,end} for preemptive kernels (Alexander Nyberg) # - Readd proper check for biomerge (got lost) # - Set up 32bit vsyscall page for ptrace early # - Add 32bit emulation for lookup_dcookie() for oprofile # - Export copy_page / clear_page # - Use rex prefix in save_init_fpu fxsave (Jan Beulich) # - Make it compile again # - Fix handling of hwdev == NULL (= ISA/LPC devices) in swiotlb # - Convert PCI DMA code to dma devices # - Change IOMMU code to use dummy fallback device instead of hardcoded # NULL tests everywhere. # - Test iommu_sac_force instead of nommu for DAC supported macro # (will cause more drivers to use DAC) # - Harden non IOMMU dma_alloc_consistent code to fail less likely. # - Remove use of strsep in option parsers # - Remove duplicated exports (Arjan van der Ven) # - Fix EFAULT checking in ptrace (John Blackwood) # - Update defconfig # - Remove dead URL from boot/setup.S (R.J. Wysocki) # - Use compat_sigval_t instead of sigval_t32 (Al Viro) # - Nanooptimization in 32bit ptregs calls # - Fix gcc 3.5 compilation in mtrr.h # - Pass pt_regs as pointer to avoid illegal pass by reference (for gcc 3.5) # - Make set_bit take int not long (Harald Dunkel) # - Avoid panic on pci_map_sg and pci_alloc_consistent overflow in GART IOMMU # - Handle large lost time delays in HPET code (Suresh B. Siddha) # - Work around theoretical bugs in prefetch handling (suggested by Jamie Lokier) # - Remove mtrr_strings declaration for gcc 3.5 # - Set KBUILD_IMAGE for make rpm (William Lee Irwin III) # - Add iommu=noaperture to not touch the aperture # - Clean up argument parsing for iommu= option # - Export symbols for xchgadd based rwsems (still disabled) # - Define iommu_bio_merge for !CONFIG_GART_IOMMU # - Don't use backwards rep ; movsb for memmove # - Out line bitmap search functions (saves 8k .text, from i386) # - Convert bitmap search functions to 64bit accesses and optimize them # a bit. # - Handle corrupted page tables in page fault handler # - Set iommu_merge (without force) to on by default again. # - Don't do bio merging by default for iommu=merge. This should make it # safe to use again # - Add iommu=biomerge option to enable BIO merging (like old iommu=merge) # - Fix iommu=memaper=... parsing # - More MCE fixes (based on a patch by Eric Morton, heavily changed by me) # - Fix check for banks causing exceptions # - Allow to reinit MCEs later even after mce=off, fix wrong # use of __initdata # to disable at boot, but reenable later. # - Log left over machine checks after boot and resume # - Fix missing prototype warning with CPU_FREQ on # - Fix parsing of noexec=on (Ian Hastie) # - Fix warning in ia32_binfmt.c # - Resync time variable cpu frequency handling with i386 # - Resync msr.c with i386 # - Add 0x60 level 1 intel cache descriptor (from i386) # - Remove duplicated 32bit ioctls (Arnd Bergmann) # - Enable -msoft-float (from i386) # - Use faster version of FPU hang fix - handle the exception # * a bit experimental, if you see "kernel ... math error" events # in the log please report. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/topology.h # 2004/08/24 02:08:31-07:00 ak@suse.de +7 -2 # New x86-64 merge # # include/asm-x86_64/system.h # 2004/08/24 02:08:31-07:00 ak@suse.de +4 -4 # New x86-64 merge # # include/asm-x86_64/swiotlb.h # 2004/08/24 11:20:02-07:00 ak@suse.de +36 -0 # # include/asm-x86_64/proto.h # 2004/08/24 02:08:31-07:00 ak@suse.de +2 -1 # New x86-64 merge # # include/asm-x86_64/pci.h # 2004/08/24 02:08:31-07:00 ak@suse.de +15 -238 # New x86-64 merge # # include/asm-x86_64/mtrr.h # 2004/08/24 02:08:31-07:00 ak@suse.de +0 -2 # New x86-64 merge # # include/asm-x86_64/mpspec.h # 2004/08/24 02:08:31-07:00 ak@suse.de +0 -1 # New x86-64 merge # # include/asm-x86_64/io.h # 2004/08/24 02:08:31-07:00 ak@suse.de +24 -7 # New x86-64 merge # # include/asm-x86_64/ia32.h # 2004/08/24 02:08:31-07:00 ak@suse.de +2 -8 # New x86-64 merge # # include/asm-x86_64/i387.h # 2004/08/24 02:08:31-07:00 ak@suse.de +20 -4 # New x86-64 merge # # include/asm-x86_64/dma-mapping.h # 2004/08/24 02:08:31-07:00 ak@suse.de +134 -1 # New x86-64 merge # # include/asm-x86_64/bitops.h # 2004/08/24 02:08:31-07:00 ak@suse.de +32 -123 # New x86-64 merge # # include/asm-x86_64/acpi.h # 2004/08/24 02:08:31-07:00 ak@suse.de +5 -0 # New x86-64 merge # # arch/x86_64/pci/k8-bus.c # 2004/08/24 11:20:02-07:00 ak@suse.de +74 -0 # # arch/x86_64/pci/Makefile # 2004/08/24 02:08:31-07:00 ak@suse.de +3 -1 # New x86-64 merge # # arch/x86_64/pci/Makefile-BUS # 2004/08/24 11:20:02-07:00 ak@suse.de +22 -0 # # arch/x86_64/mm/init.c # 2004/08/24 02:08:31-07:00 ak@suse.de +20 -2 # New x86-64 merge # # include/asm-x86_64/swiotlb.h # 2004/08/24 11:20:02-07:00 ak@suse.de +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-x86_64/swiotlb.h # # arch/x86_64/pci/k8-bus.c # 2004/08/24 11:20:02-07:00 ak@suse.de +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/pci/k8-bus.c # # arch/x86_64/pci/Makefile-BUS # 2004/08/24 11:20:02-07:00 ak@suse.de +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/pci/Makefile-BUS # # arch/x86_64/mm/fault.c # 2004/08/24 02:08:31-07:00 ak@suse.de +56 -21 # New x86-64 merge # # arch/x86_64/lib/memmove.c # 2004/08/24 02:08:31-07:00 ak@suse.de +4 -12 # New x86-64 merge # # arch/x86_64/lib/bitstr.c # 2004/08/24 02:08:31-07:00 ak@suse.de +3 -0 # New x86-64 merge # # arch/x86_64/lib/bitops.c # 2004/08/24 11:20:01-07:00 ak@suse.de +140 -0 # # arch/x86_64/lib/Makefile # 2004/08/24 02:08:31-07:00 ak@suse.de +1 -1 # New x86-64 merge # # arch/x86_64/kernel/x8664_ksyms.c # 2004/08/24 02:08:31-07:00 ak@suse.de +14 -11 # New x86-64 merge # # arch/x86_64/kernel/traps.c # 2004/08/24 02:08:31-07:00 ak@suse.de +37 -17 # New x86-64 merge # # arch/x86_64/kernel/time.c # 2004/08/24 02:08:31-07:00 ak@suse.de +80 -18 # New x86-64 merge # # arch/x86_64/kernel/signal.c # 2004/08/24 02:08:31-07:00 ak@suse.de +12 -11 # New x86-64 merge # # arch/x86_64/kernel/setup64.c # 2004/08/24 02:08:31-07:00 ak@suse.de +14 -12 # New x86-64 merge # # arch/x86_64/kernel/setup.c # 2004/08/24 02:08:31-07:00 ak@suse.de +3 -0 # New x86-64 merge # # arch/x86_64/kernel/ptrace.c # 2004/08/24 02:08:31-07:00 ak@suse.de +8 -6 # New x86-64 merge # # arch/x86_64/kernel/process.c # 2004/08/24 02:08:31-07:00 ak@suse.de +7 -7 # New x86-64 merge # # arch/x86_64/kernel/pci-nommu.c # 2004/08/24 02:08:31-07:00 ak@suse.de +44 -18 # New x86-64 merge # # arch/x86_64/kernel/pci-gart.c # 2004/08/24 02:08:31-07:00 ak@suse.de +168 -122 # New x86-64 merge # # arch/x86_64/kernel/pci-dma.c # 2004/08/24 02:08:31-07:00 ak@suse.de +10 -11 # New x86-64 merge # # arch/x86_64/kernel/msr.c # 2004/08/24 02:08:31-07:00 ak@suse.de +155 -160 # New x86-64 merge # # arch/x86_64/kernel/mce.c # 2004/08/24 02:08:31-07:00 ak@suse.de +62 -55 # New x86-64 merge # # arch/x86_64/kernel/ioport.c # 2004/08/24 02:08:31-07:00 ak@suse.de +3 -3 # New x86-64 merge # # arch/x86_64/kernel/entry.S # 2004/08/24 02:08:31-07:00 ak@suse.de +9 -7 # New x86-64 merge # # arch/x86_64/kernel/early_printk.c # 2004/08/24 02:08:31-07:00 ak@suse.de +9 -8 # New x86-64 merge # # arch/x86_64/kernel/cpufreq/Makefile # 2004/08/24 02:08:31-07:00 ak@suse.de +7 -1 # New x86-64 merge # # arch/x86_64/kernel/cpufreq/Kconfig # 2004/08/24 02:08:31-07:00 ak@suse.de +49 -0 # New x86-64 merge # # arch/x86_64/kernel/aperture.c # 2004/08/24 02:08:31-07:00 ak@suse.de +10 -13 # New x86-64 merge # # arch/x86_64/ia32/sys_ia32.c # 2004/08/24 02:08:31-07:00 ak@suse.de +14 -7 # New x86-64 merge # # arch/x86_64/ia32/ptrace32.c # 2004/08/24 02:08:31-07:00 ak@suse.de +5 -1 # New x86-64 merge # # arch/x86_64/ia32/ia32entry.S # 2004/08/24 02:08:31-07:00 ak@suse.de +15 -18 # New x86-64 merge # # arch/x86_64/ia32/ia32_signal.c # 2004/08/24 02:08:31-07:00 ak@suse.de +19 -14 # New x86-64 merge # # arch/x86_64/ia32/ia32_ioctl.c # 2004/08/24 02:08:31-07:00 ak@suse.de +0 -15 # New x86-64 merge # # arch/x86_64/ia32/ia32_binfmt.c # 2004/08/24 02:08:31-07:00 ak@suse.de +3 -0 # New x86-64 merge # # arch/x86_64/defconfig # 2004/08/24 02:08:31-07:00 ak@suse.de +76 -33 # New x86-64 merge # # arch/x86_64/Makefile # 2004/08/24 02:08:31-07:00 ak@suse.de +1 -0 # New x86-64 merge # # arch/x86_64/Kconfig # 2004/08/24 02:08:31-07:00 ak@suse.de +11 -0 # New x86-64 merge # # Documentation/x86_64/boot-options.txt # 2004/08/24 02:08:31-07:00 ak@suse.de +14 -6 # New x86-64 merge # # arch/x86_64/lib/bitops.c # 2004/08/24 11:20:01-07:00 ak@suse.de +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/x86_64/lib/bitops.c # # BitKeeper/deleted/.del-Makefile-HEAD~f95e78db221bb7a8 # 2004/08/24 11:20:01-07:00 ak@suse.de +0 -0 # Delete: arch/x86_64/kernel/Makefile-HEAD # # ChangeSet # 2004/08/24 11:19:45-07:00 akropel1@rochester.rr.com # [PATCH] preset loops_per_jiffy for faster booting # # Adds a kernel boot parameter "lpj=NNN" which allows the operator to specify # the loops-per-jiffy value. This shaves up to a quarter of a second off # boot times, which are critical for embedded appliances. # # It's a bit thin, but the code is in __init. # # Signed-off-by: Adam Kropelin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # init/main.c # 2004/08/24 02:08:30-07:00 akropel1@rochester.rr.com +71 -40 # preset loops_per_jiffy for faster booting # # Documentation/kernel-parameters.txt # 2004/08/24 02:08:30-07:00 akropel1@rochester.rr.com +14 -0 # preset loops_per_jiffy for faster booting # # ChangeSet # 2004/08/24 11:19:34-07:00 mika@osdl.org # [PATCH] Fix drivers/isdn/hisax/avm_pci.c build warning when !CONFIG_ISAPNP # # CC [M] drivers/isdn/hisax/avm_pci.o # drivers/isdn/hisax/avm_pci.c: In function `setup_avm_pcipnp': # drivers/isdn/hisax/avm_pci.c:817: warning: label `ready' defined but not used # # Patch is big because I replaced the '} else { ... }' with 'goto ready; }' # and so had to remove one level of indentation from code. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/isdn/hisax/avm_pci.c # 2004/08/24 02:08:30-07:00 mika@osdl.org +52 -52 # Fix drivers/isdn/hisax/avm_pci.c build warning when !CONFIG_ISAPNP # # ChangeSet # 2004/08/24 11:19:22-07:00 jdike@addtoit.com # [PATCH] Make UML build and run # # This patch includes the following - # updated defconfig # move uml.lds.S and main.c from arch/um to arch/um/kernel per Sam's suggestions # steal bitops.c from arch/i386 # convert all calls to open_private_file to dentry_open # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hppfs/hppfs_kern.c # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +21 -17 # Make UML build and run # # arch/um/sys-i386/Makefile # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +4 -3 # Make UML build and run # # arch/um/kernel/uml.lds.S # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +4 -4 # Make UML build and run # # arch/um/kernel/main.c # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +12 -12 # Make UML build and run # # arch/um/kernel/Makefile # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +3 -3 # Make UML build and run # # arch/um/defconfig # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +6 -3 # Make UML build and run # # arch/um/Makefile # 2004/08/24 02:08:30-07:00 jdike@addtoit.com +2 -11 # Make UML build and run # # ChangeSet # 2004/08/24 11:18:53-07:00 jdike@addtoit.com # [PATCH] UML fixes # # The patch below fixes a few UML-specific bugs not related to the rest of the # kernel # a bogus error return and some formatting in the fork code # correct calculation of task.thread.kernel_stack # remove a bogus panic # a couple of fixes to allow UML to boot in the presence of exec-shield # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/tt/process_kern.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +1 -1 # UML fixes # # arch/um/kernel/tt/mem.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +1 -1 # UML fixes # # arch/um/kernel/trap_kern.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +0 -2 # UML fixes # # arch/um/kernel/process_kern.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +1 -1 # UML fixes # # arch/um/kernel/process.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +7 -3 # UML fixes # # ChangeSet # 2004/08/24 11:18:42-07:00 jdike@addtoit.com # [PATCH] UML updates # # The patch below brings UML up to date with interface changes and the like # irq.c includes profile.h to bring in a missing definition # use the cpu_{set,clear} interface # use the new get_signal_to_deliver interface # define instruction_pointer # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/ptrace-generic.h # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +2 -0 # UML updates # # arch/um/kernel/signal_kern.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +5 -5 # UML updates # # arch/um/kernel/process_kern.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +4 -3 # UML updates # # arch/um/kernel/irq.c # 2004/08/24 02:08:29-07:00 jdike@addtoit.com +1 -0 # UML updates # # ChangeSet # 2004/08/24 11:18:30-07:00 coywolf@greatcn.org # [PATCH] uml: remove a group of unused bh functions # # This patch removes a group of unused bh functions in um. This 2.2 legacy # code should be cleaned up. # # Signed-off-by: Coywolf Qi Hunt # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/smp.c # 2004/08/24 02:08:29-07:00 coywolf@greatcn.org +0 -43 # uml: remove a group of unused bh functions # # ChangeSet # 2004/08/24 11:18:19-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Fix os_process_pc and os_process_parent for corner cases. # # Update os_process_pc and os_process_parent: now a PID can be > 32768 (so # increase number of digits) and make it work even with spaces in the command # name. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/os-Linux/process.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +8 -6 # uml: Fix os_process_pc and os_process_parent for corner cases. # # ChangeSet # 2004/08/24 11:18:07-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: little-kmalloc # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/main.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: little-kmalloc # # ChangeSet # 2004/08/24 11:17:56-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Make malloc() call vmalloc if needed. Needed for hostfs on 2.6 host. # # From: Oleg Drokin , Jeff Dike , and # me # # If size > 128K, with this patch malloc will call vmalloc; free will detect # whether to call vfree or kfree or __real_free(). The 2.4 version could forget # free()ing something; this has been fixed. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/main.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +36 -4 # uml: Make malloc() call vmalloc if needed. Needed for hostfs on 2.6 host. # # arch/um/kernel/process_kern.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +6 -0 # uml: Make malloc() call vmalloc if needed. Needed for hostfs on 2.6 host. # # arch/um/include/user.h # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Make malloc() call vmalloc if needed. Needed for hostfs on 2.6 host. # # ChangeSet # 2004/08/24 11:17:44-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Removes dead code in trap_kern.c # # That code comes from the out_of_memory section; in 2.4 it was correct to put # it for "default:", since it was called when handle_mm_fault() return value was # != 0, 1, 2, i.e. it was 3, OOM (but the i386 code put it out of line, for # better performance). Here, instead, the OOM case is handled on its own, so if # handle_mm_fault() != from the listed cases we must BUG(). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/trap_kern.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +1 -8 # uml: Removes dead code in trap_kern.c # # ChangeSet # 2004/08/24 11:17:33-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Avoids a panic for a legal situation # # From: Alex Züpke , and me # # SKAS mode is like 4G/4G (here we have actually 3G/3G) for guest processes, so # when checking for kernel stack overflow, we must first make sure we are # checking a kernel-space address. Also, correctly test for stack overflows # (i.e. check if there is less than 1k of stack left; see # arch/i386/kernel/irq.c:do_IRQ()). And also, THREAD_SIZE != PAGE_SIZE * 2, in # general (though this setting is almost never changed, so we didn't notice # this1). Thanks to the good eye of Alex Züpke for first seeing # this bug, and providing a test program: # # /* # * trigger.c - triggers panic("Kernel stack overflow") in UML # * # * 20040630, azu@sysgo.de # */ # # #include # #include # #include # #include # #include # #include # #include # # #define LOW 0xa0000000 # #define HIGH 0xb0000000 # # int main(int argc, char **argv) # { # unsigned long addr; # int fd; # # fd = open("/dev/zero", O_RDWR); # # printf("This may take some time ... one more cup of coffee ...\n"); # # for(addr = LOW; addr < HIGH; addr += 0x1000) # { # pid_t p; # if(mmap((void*)addr, 0x1000, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0) == MAP_FAILED) # printf("mmap failed\n"); # # p = fork(); # if(p == -1) # printf("fork failed\n"); # # if(p == 0) # { # /* child context */ # int *p = (int *)addr; # volatile int x; # # x = *p; # return 0; # } # /* father context */ # waitpid(p, 0, 0); # # if(munmap((void*)addr, 0x1000) == -1) # printf("munmap failed\n"); # } # # close(fd); # printf("done\n"); # } # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # ChangeSet # 2004/08/24 19:17:29+01:00 davej@redhat.com # [CPUFREQ] Fix silly typo that broke the compile. # # Signed-off-by: Dave Jones # # arch/um/kernel/trap_kern.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Avoids a panic for a legal situation # # arch/um/kernel/skas/uaccess.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Avoids a panic for a legal situation # # arch/um/kernel/process_kern.c # 2004/08/24 02:08:28-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Avoids a panic for a legal situation # # ChangeSet # 2004/08/24 11:17:21-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Adds some exports # # Adds some exports # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/ksyms.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Adds some exports # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 19:17:13+01:00 davej@redhat.com +1 -1 # [CPUFREQ] Fix silly typo that broke the compile. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 11:17:10-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Handles correctly errno == EINTR in lots of places. # # On various places (mostly waitpid() calls) this patch makes sure that if errno # == EINTR on return, then the syscall is endlessly retried. It also defines a # simple generic way to do this. # # Signed-off-by: # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/os-Linux/process.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/os-Linux/drivers/tuntap_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/os-Linux/drivers/ethertap_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +3 -1 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/user_util.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +4 -6 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/tt/tracer.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/tt/ptproxy/proxy.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/tt/exec_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +7 -2 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/trap_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +8 -1 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/skas/process.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +3 -3 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/skas/exec_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +4 -2 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/process.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +6 -5 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/helper.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/kernel/frame.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +5 -3 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/include/user_util.h # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/drivers/slirp_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +4 -4 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/drivers/slip_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +4 -2 # uml: Handles correctly errno == EINTR in lots of places. # # arch/um/drivers/net_user.c # 2004/08/24 02:08:27-07:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Handles correctly errno == EINTR in lots of places. # # ChangeSet # 2004/08/24 11:17:00-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Fix for sysemu patches # # - Correct some silly errors (dereferencing a pointer before checking if it's # != NULL when creating /proc/sysemu, some error messages) # # - separate using_sysemu from sysemu_supported (so to refuse to activate # sysemu if it is not supported, avoiding panics) # # - not probe sysemu if in tt mode. # # Signed-off-by: # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/process_kern.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +8 -6 # uml: Fix for sysemu patches # # arch/um/kernel/skas/process.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +5 -4 # uml: Fix for sysemu patches # # arch/um/kernel/skas/include/ptrace-skas.h # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Fix for sysemu patches # # arch/um/kernel/process.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +44 -36 # uml: Fix for sysemu patches # # ChangeSet # 2004/08/24 11:16:48-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Adds /proc/sysemu to toggle SYSEMU usage. # # Adds /proc/sysemu to toggle SYSEMU usage. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/process_kern.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +59 -0 # uml: Adds /proc/sysemu to toggle SYSEMU usage. # # arch/um/kernel/skas/process.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +29 -33 # uml: Adds /proc/sysemu to toggle SYSEMU usage. # # arch/um/kernel/skas/include/ptrace-skas.h # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +3 -1 # uml: Adds /proc/sysemu to toggle SYSEMU usage. # # arch/um/kernel/process.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Adds /proc/sysemu to toggle SYSEMU usage. # # ChangeSet # 2004/08/24 11:16:37-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Adds the "nosysemu" command line parameter to disable SYSEMU # # Adds the "nosysemu" command line parameter to disable SYSEMU # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/process.c # 2004/08/24 02:08:26-07:00 blaisorblade_spam@yahoo.it +22 -4 # uml: Adds the "nosysemu" command line parameter to disable SYSEMU # # ChangeSet # 2004/08/24 11:16:25-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Use PTRACE_SCEMU (the so-called SYSEMU) to reduce syscall cost. # # Turns off syscall emulation patch for ptrace (SYSEMU) on. SYSEMU is a # performance-patch introduced by Laurent Vivier. It changes behaviour of # ptrace() and helps reducing host context switch rate. To make it working, you # need a kernel patch for your host, too. See # http://perso.wanadoo.fr/laurent.vivier/UML/ for further information. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/skas/process.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +22 -0 # uml: Use PTRACE_SCEMU (the so-called SYSEMU) to reduce syscall cost. # # arch/um/kernel/skas/include/ptrace-skas.h # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +7 -0 # uml: Use PTRACE_SCEMU (the so-called SYSEMU) to reduce syscall cost. # # arch/um/kernel/process.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +35 -0 # uml: Use PTRACE_SCEMU (the so-called SYSEMU) to reduce syscall cost. # # ChangeSet # 2004/08/24 11:16:14-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Folds hostaudio_user.c into hostaudio_kern.c. # # Folds hostaudio_user.c into hostaudio_kern.c. A lot of code less. Also note # that I no more update ppos(as I used to do in the 2.4 patch): I checked that # OSS never changes ppos, so hostaudio did the right thing. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/hostaudio_kern.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +49 -24 # uml: Folds hostaudio_user.c into hostaudio_kern.c. # # arch/um/drivers/Makefile # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Folds hostaudio_user.c into hostaudio_kern.c. # # BitKeeper/deleted/.del-hostaudio_user.c~f70654a46a8dd652 # 2004/08/24 11:16:08-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: arch/um/drivers/hostaudio_user.c # # BitKeeper/deleted/.del-hostaudio.h~1b691cc72344dc1 # 2004/08/24 11:16:08-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: arch/um/include/hostaudio.h # # ChangeSet # 2004/08/24 11:16:02-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). # # Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR # returned by call). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/user_util.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +24 -5 # uml: Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). # # arch/um/kernel/sigio_user.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +4 -7 # uml: Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). # # arch/um/include/user_util.h # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +3 -1 # uml: Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). # # ChangeSet # 2004/08/24 11:15:51-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Reduces code in *_user files, by moving it in _kern files if already possible. # # Reduces code in *_user files, by moving it in _kern files if already possible. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/chan_user.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +0 -48 # uml: Reduces code in *_user files, by moving it in _kern files if already possible. # # arch/um/drivers/chan_kern.c # 2004/08/24 02:08:25-07:00 blaisorblade_spam@yahoo.it +47 -0 # uml: Reduces code in *_user files, by moving it in _kern files if already possible. # # ChangeSet # 2004/08/24 11:15:40-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Avoids compile failure when host misses tkill(). # # Avoids compile failure when host misses tkill(), by simply using kill() in # that case. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/os-Linux/process.c # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +4 -1 # uml: Avoids compile failure when host misses tkill(). # # ChangeSet # 2004/08/24 11:15:29-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Kill useless warnings # # Fixes some little warnings about "Defined but not used ..." by #ifdef'ing # things # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hostfs/hostfs_kern.c # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Kill useless warnings # # arch/um/kernel/time_kern.c # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +3 -1 # uml: Kill useless warnings # # arch/um/kernel/time.c # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Kill useless warnings # # ChangeSet # 2004/08/24 11:15:17-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Fixes "fixdep.c" to support arch/um/include/uml-config.h. # # You probably saw that if you change one config option, even if # linux/autoconf.h (which is included by everything) changes, the kernel is # smart enough not to recompile everything. But with UML this no more holds. # Why? Because, as you see in this patch, fixdep avoids making anything depend # onto linux/autoconf.h *explicitly*, but nobody taught him to do the same for # arch/um/include/uml-config.h. So apply this patch. Do not say "I don't want # to change the generic Kbuild for one arch": this cannot hurt. It's a bugfix # for us, a no-op for others. # # Note: with this patch, fixdep will still add a dependency from a file # containing UML_CONFIG_BYE onto CONFIG_BYE. Since someone could think that # fixdep should grep for [^A-Z_]CONFIG_ rather than simply for CONFIG_, I've # added a comment that ask *not to fix* this "bug". # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # scripts/basic/fixdep.c # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +9 -0 # uml: Fixes "fixdep.c" to support arch/um/include/uml-config.h. # # ChangeSet # 2004/08/24 11:15:06-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Makes "make help ARCH=um" work. # # Makes "make help ARCH=um" work. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Makefile # 2004/08/24 02:08:24-07:00 blaisorblade_spam@yahoo.it +6 -0 # uml: Makes "make help ARCH=um" work. # # ChangeSet # 2004/08/24 11:14:54-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Adds LEGACY_PTY config option # # The second adds the LEGACY_PTY config option. Without it, with late 2.6 kernels # /dev/ptyxx won't work. In fact, with those kernels, root_fs_toms does not # work, because it's "unable to allocate TTY pair". And removes the dead option # "UNIX98_PTY_COUNT" (just commented out for now). # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Kconfig_char # 2004/08/24 02:08:23-07:00 blaisorblade_spam@yahoo.it +52 -3 # uml: Adds LEGACY_PTY config option # # ChangeSet # 2004/08/24 11:14:43-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Fixes an host fd leak caused by hostfs. # # In detail, on 2.4 we used force_delete() to make sure inode were not cached, # and we then close the host file when the inode is cleared; when porting to 2.6 # the "force_delete" thing was dropped, and this patch adds a fix for this (by # setting drop_inode = generic_delete_inode). Search for drop_inode in the 2.6 # Documentation/filesystems/vfs.txt for info about this. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/hostfs/hostfs_kern.c # 2004/08/24 02:08:23-07:00 blaisorblade_spam@yahoo.it +15 -1 # uml: Fixes an host fd leak caused by hostfs. # # ChangeSet # 2004/08/24 11:14:34-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Avoid that gcc breaks UML with "unit at a time" compilation mode. # # Avoid that gcc breaks UML with "unit at a time" compilation mode. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/Makefile # 2004/08/24 02:08:23-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Avoid that gcc breaks UML with "unit at a time" compilation mode. # # ChangeSet # 2004/08/24 11:14:22-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Readds (just for now) ghash.h for UML # # Just for now and just for UML; it will go away. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/ghash.h # 2004/08/24 02:08:23-07:00 blaisorblade_spam@yahoo.it +236 -0 # uml: Readds (just for now) ghash.h for UML # # include/linux/ghash.h # 2004/08/24 02:08:23-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/linux/ghash.h # # ChangeSet # 2004/08/24 11:14:10-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: rename console_device # # In the -mm tree (in this moment) and not in 2.6.7 there is another # console_device in include/linux/console.h; so I renamed the UML one (it's # static). # # Cc: Jeff Dike # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/stdio_console.c # 2004/08/24 02:08:22-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: rename console_device # # ChangeSet # 2004/08/24 11:13:58-07:00 akpm@osdl.org # [PATCH] uml: CPU scheduler update # # Update UML for CPU scheduler changes # # Cc: Jeff Dike # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/kernel/smp.c # 2004/08/24 02:08:22-07:00 akpm@osdl.org +1 -3 # uml: CPU scheduler update # # ChangeSet # 2004/08/24 11:13:46-07:00 jdike@addtoit.com # [PATCH] UML updates # # The patch below brings UML up to date with some changes in the rest of the # kernel: # an updated defconfig # checksum.h includes in6.h to get a definition of in6_addr # added a missing cpu_{set,clear} change # removed include/asm-um/module.h since it's really a link # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-um/mmu_context.h # 2004/08/24 02:08:22-07:00 jdike@addtoit.com +2 -2 # UML updates # # arch/um/util/Makefile # 2004/08/24 02:08:22-07:00 jdike@addtoit.com +2 -2 # UML updates # # arch/um/kernel/skas/Makefile # 2004/08/24 02:08:22-07:00 jdike@addtoit.com +1 -1 # UML updates # # arch/um/include/sysdep-i386/checksum.h # 2004/08/24 02:08:22-07:00 jdike@addtoit.com +1 -0 # UML updates # # arch/um/defconfig # 2004/08/24 02:08:22-07:00 jdike@addtoit.com +61 -38 # UML updates # # BitKeeper/deleted/.del-module.h~8f403f09bbc33f5f # 2004/08/24 11:13:40-07:00 jdike@addtoit.com +0 -0 # Delete: include/asm-um/module.h # # ChangeSet # 2004/08/24 11:13:34-07:00 jdike@addtoit.com # [PATCH] UML: remove the COW block driver # # The code is still there but it's not built. Below is a patch which removes # it totally. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/um/drivers/Makefile # 2004/08/24 02:08:21-07:00 jdike@addtoit.com +0 -1 # UML: remove the COW block driver # # arch/um/Kconfig_block # 2004/08/24 02:08:21-07:00 jdike@addtoit.com +1 -11 # UML: remove the COW block driver # # BitKeeper/deleted/.del-cow_kern.c~32cc72171d064720 # 2004/08/24 11:13:28-07:00 jdike@addtoit.com +0 -0 # Delete: arch/um/drivers/cow_kern.c # # ChangeSet # 2004/08/24 11:13:23-07:00 blaisorblade_spam@yahoo.it # [PATCH] uml: Uml base patch # # The main part of UML; it is the last distributed patch for 2.6.7 Removes skas # support from the main UML patch; apply or get conflicts. # # Signed-off-by: Paolo 'Blaisorblade' Giarrusso # Cc: Jeff Dike # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/page_alloc.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -0 # uml: Uml base patch # # include/linux/time.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # include/linux/gfp.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -0 # uml: Uml base patch # # include/asm-um/unistd.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -1 # uml: Uml base patch # # include/asm-um/uaccess.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Uml base patch # # include/asm-um/timex.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -2 # uml: Uml base patch # # include/asm-um/thread_info.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +11 -5 # uml: Uml base patch # # include/asm-um/system-i386.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -31 # uml: Uml base patch # # include/asm-um/system-generic.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -2 # uml: Uml base patch # # include/asm-um/smp.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # include/asm-um/processor-i386.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # include/asm-um/processor-generic.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +20 -23 # uml: Uml base patch # # include/asm-um/pgtable.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +69 -42 # uml: Uml base patch # # include/asm-um/page.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +19 -15 # uml: Uml base patch # # include/asm-um/irq.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -18 # uml: Uml base patch # # include/asm-um/fixmap.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +8 -0 # uml: Uml base patch # # include/asm-um/elf.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +13 -0 # uml: Uml base patch # # include/asm-um/dma-mapping.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +119 -1 # uml: Uml base patch # # include/asm-um/current.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -2 # uml: Uml base patch # # include/asm-um/common.lds.S # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +35 -13 # uml: Uml base patch # # include/asm-um/archparam-i386.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +88 -1 # uml: Uml base patch # # fs/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Uml base patch # # arch/um/util/mk_constants_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -0 # uml: Uml base patch # # arch/um/util/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +6 -21 # uml: Uml base patch # # arch/um/uml.lds.S # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -3 # uml: Uml base patch # # arch/um/sys-ppc/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -10 # uml: Uml base patch # # arch/um/sys-ia64/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -14 # uml: Uml base patch # # arch/um/sys-i386/util/mk_sc.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Uml base patch # # arch/um/sys-i386/util/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -9 # uml: Uml base patch # # arch/um/sys-i386/ptrace_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -4 # uml: Uml base patch # # arch/um/sys-i386/fault.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +12 -4 # uml: Uml base patch # # arch/um/sys-i386/bugs.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +102 -38 # uml: Uml base patch # # arch/um/sys-i386/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +6 -18 # uml: Uml base patch # # arch/um/os-Linux/tty.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -5 # uml: Uml base patch # # arch/um/os-Linux/process.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +33 -25 # uml: Uml base patch # # arch/um/os-Linux/file.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +382 -68 # uml: Uml base patch # # arch/um/os-Linux/drivers/tuntap_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +29 -28 # uml: Uml base patch # # arch/um/os-Linux/drivers/ethertap_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +28 -28 # uml: Uml base patch # # arch/um/os-Linux/drivers/ethertap_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -1 # uml: Uml base patch # # arch/um/os-Linux/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -5 # uml: Uml base patch # # arch/um/main.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -2 # uml: Uml base patch # # arch/um/kernel/user_util.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -13 # uml: Uml base patch # # arch/um/kernel/umid.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +46 -34 # uml: Uml base patch # # arch/um/kernel/um_arch.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +50 -26 # uml: Uml base patch # # arch/um/kernel/uaccess_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # arch/um/kernel/tty_log.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +117 -19 # uml: Uml base patch # # arch/um/kernel/tt/unmap.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -3 # uml: Uml base patch # # include/asm-um/sections.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +7 -0 # # include/asm-um/module-i386.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +13 -0 # # include/asm-um/module-generic.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +6 -0 # # include/asm-um/local.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +6 -0 # # include/asm-um/cpufeature.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +6 -0 # # fs/hppfs/hppfs_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +811 -0 # # fs/hppfs/Makefile # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +19 -0 # # fs/hostfs/hostfs_user.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +361 -0 # # fs/hostfs/hostfs_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +1008 -0 # # fs/hostfs/hostfs.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +79 -0 # # fs/hostfs/Makefile # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +26 -0 # # arch/um/sys-i386/time.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +24 -0 # # arch/um/os-Linux/user_syms.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +88 -0 # # arch/um/kernel/tt/uaccess_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +17 -5 # uml: Uml base patch # # arch/um/kernel/tt/uaccess.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +73 -0 # # arch/um/kernel/tt/tracer.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -13 # uml: Uml base patch # # arch/um/kernel/tt/tlb.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Uml base patch # # arch/um/kernel/tt/syscall_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/kernel/tt/syscall_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # arch/um/kernel/tt/sys-i386/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -2 # uml: Uml base patch # # arch/um/kernel/tt/ptproxy/wait.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -5 # uml: Uml base patch # # arch/um/kernel/tt/ptproxy/sysdep.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Uml base patch # # arch/um/kernel/tt/ptproxy/proxy.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +13 -12 # uml: Uml base patch # # arch/um/kernel/tt/ptproxy/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -2 # uml: Uml base patch # # arch/um/kernel/tt/process_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +52 -30 # uml: Uml base patch # # arch/um/kernel/tt/mem_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +3 -4 # uml: Uml base patch # # arch/um/kernel/tt/include/uaccess.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -53 # uml: Uml base patch # # arch/um/kernel/tt/include/mode.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Uml base patch # # arch/um/kernel/tt/exec_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -3 # uml: Uml base patch # # arch/um/kernel/tt/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -4 # uml: Uml base patch # # arch/um/kernel/trap_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -5 # uml: Uml base patch # # arch/um/kernel/trap_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +49 -9 # uml: Uml base patch # # arch/um/kernel/time_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +59 -18 # uml: Uml base patch # # arch/um/kernel/time.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +61 -8 # uml: Uml base patch # # arch/um/kernel/tempfile.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -2 # uml: Uml base patch # # arch/um/kernel/sysrq.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -0 # uml: Uml base patch # # arch/um/kernel/syscall_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +15 -49 # uml: Uml base patch # # arch/um/kernel/sys_call_table.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +252 -434 # uml: Uml base patch # # arch/um/kernel/smp.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +37 -26 # uml: Uml base patch # # arch/um/kernel/skas/util/mk_ptregs.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Uml base patch # # arch/um/kernel/skas/util/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +3 -4 # uml: Uml base patch # # arch/um/kernel/skas/uaccess.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +219 -0 # # arch/um/kernel/skas/trap_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -5 # uml: Uml base patch # # arch/um/kernel/skas/syscall_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/kernel/skas/syscall_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # arch/um/kernel/skas/sys-i386/sigcontext.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -8 # uml: Uml base patch # # arch/um/kernel/skas/sys-i386/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -2 # uml: Uml base patch # # arch/um/kernel/skas/process_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +15 -11 # uml: Uml base patch # # arch/um/kernel/skas/process.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +71 -36 # uml: Uml base patch # # arch/um/kernel/skas/mmu.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -3 # uml: Uml base patch # # arch/um/kernel/skas/mem_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +21 -11 # uml: Uml base patch # # arch/um/kernel/skas/include/uaccess.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -200 # uml: Uml base patch # # arch/um/kernel/skas/include/skas.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/kernel/skas/include/mode.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -2 # uml: Uml base patch # # arch/um/kernel/skas/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -10 # uml: Uml base patch # # arch/um/kernel/signal_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +49 -11 # uml: Uml base patch # # arch/um/kernel/sigio_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +47 -49 # uml: Uml base patch # # arch/um/kernel/sigio_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -2 # uml: Uml base patch # # arch/um/kernel/reboot.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Uml base patch # # arch/um/kernel/ptrace.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +12 -11 # uml: Uml base patch # # arch/um/kernel/process_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +26 -19 # uml: Uml base patch # # arch/um/kernel/process.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +11 -9 # uml: Uml base patch # # arch/um/kernel/physmem.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +468 -0 # # arch/um/kernel/mem_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +108 -122 # uml: Uml base patch # # arch/um/kernel/mem.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +74 -583 # uml: Uml base patch # # arch/um/kernel/ksyms.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +47 -6 # uml: Uml base patch # # arch/um/kernel/irq_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +17 -20 # uml: Uml base patch # # arch/um/kernel/irq.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +52 -53 # uml: Uml base patch # # arch/um/kernel/initrd_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -6 # uml: Uml base patch # # arch/um/kernel/init_task.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -16 # uml: Uml base patch # # arch/um/kernel/helper.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +36 -19 # uml: Uml base patch # # arch/um/kernel/frame_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -2 # uml: Uml base patch # # arch/um/kernel/frame.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -2 # uml: Uml base patch # # arch/um/kernel/exec_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -0 # uml: Uml base patch # # arch/um/kernel/config.c.in # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -3 # uml: Uml base patch # # arch/um/kernel/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -30 # uml: Uml base patch # # arch/um/include/user_util.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +3 -4 # uml: Uml base patch # # arch/um/include/user.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -0 # uml: Uml base patch # # arch/um/include/um_uaccess.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +51 -0 # uml: Uml base patch # # arch/um/include/ubd_user.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -4 # uml: Uml base patch # # arch/um/include/sysdep-i386/syscalls.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +27 -32 # uml: Uml base patch # # arch/um/include/sysdep-i386/sigcontext.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/include/sysdep-i386/frame_user.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -14 # uml: Uml base patch # # arch/um/include/skas_ptrace.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -1 # uml: Uml base patch # # arch/um/include/signal_user.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -0 # uml: Uml base patch # # arch/um/include/os.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +49 -4 # uml: Uml base patch # # arch/um/include/mem_user.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +13 -18 # uml: Uml base patch # # arch/um/include/mem_kern.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +30 -0 # # arch/um/include/mem.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -8 # uml: Uml base patch # # arch/um/include/mconsole.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +5 -1 # uml: Uml base patch # # arch/um/include/line.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/include/kern_util.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +6 -5 # uml: Uml base patch # # arch/um/include/irq_kern.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +28 -0 # # arch/um/include/2_5compat.h # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -14 # uml: Uml base patch # # arch/um/dyn.lds.S # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +11 -4 # uml: Uml base patch # # arch/um/drivers/xterm_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +9 -3 # uml: Uml base patch # # arch/um/drivers/xterm.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +11 -10 # uml: Uml base patch # # arch/um/drivers/ubd_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +126 -371 # uml: Uml base patch # # arch/um/drivers/ubd_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +467 -133 # uml: Uml base patch # # arch/um/drivers/tty.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -2 # uml: Uml base patch # # arch/um/drivers/stdio_console.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +33 -21 # uml: Uml base patch # # arch/um/drivers/ssl.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +43 -6 # uml: Uml base patch # # arch/um/drivers/slirp_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +7 -8 # uml: Uml base patch # # arch/um/drivers/slip_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +34 -39 # uml: Uml base patch # # arch/um/drivers/pty.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +11 -11 # uml: Uml base patch # # arch/um/drivers/port_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +19 -12 # uml: Uml base patch # # arch/um/drivers/port_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +10 -7 # uml: Uml base patch # # arch/um/drivers/null.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -1 # uml: Uml base patch # # arch/um/drivers/net_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +22 -24 # uml: Uml base patch # # arch/um/drivers/net_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +32 -57 # uml: Uml base patch # # arch/um/drivers/mmapper_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -1 # uml: Uml base patch # # arch/um/drivers/mconsole_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -11 # uml: Uml base patch # # arch/um/drivers/mconsole_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +120 -20 # uml: Uml base patch # # arch/um/drivers/mcast_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +9 -7 # uml: Uml base patch # # arch/um/drivers/cow_user.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +375 -0 # # arch/um/drivers/cow_sys.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +48 -0 # # arch/um/drivers/cow_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +630 -0 # # include/asm-um/sections.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-um/sections.h # # include/asm-um/module-i386.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-um/module-i386.h # # include/asm-um/module-generic.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-um/module-generic.h # # include/asm-um/local.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-um/local.h # # include/asm-um/cpufeature.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-um/cpufeature.h # # fs/hppfs/hppfs_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hppfs/hppfs_kern.c # # fs/hppfs/Makefile # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hppfs/Makefile # # fs/hostfs/hostfs_user.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hostfs/hostfs_user.c # # fs/hostfs/hostfs_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hostfs/hostfs_kern.c # # fs/hostfs/hostfs.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hostfs/hostfs.h # # fs/hostfs/Makefile # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/fs/hostfs/Makefile # # arch/um/sys-i386/time.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/sys-i386/time.c # # arch/um/os-Linux/user_syms.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/os-Linux/user_syms.c # # arch/um/kernel/tt/uaccess.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/kernel/tt/uaccess.c # # arch/um/kernel/skas/uaccess.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/kernel/skas/uaccess.c # # arch/um/kernel/physmem.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/kernel/physmem.c # # arch/um/include/mem_kern.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/include/mem_kern.h # # arch/um/include/irq_kern.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/include/irq_kern.h # # arch/um/drivers/line.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +93 -59 # uml: Uml base patch # # arch/um/drivers/hostaudio_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +22 -41 # uml: Uml base patch # # arch/um/drivers/hostaudio_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +90 -17 # uml: Uml base patch # # arch/um/drivers/harddog_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +34 -28 # uml: Uml base patch # # arch/um/drivers/fd.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +2 -1 # uml: Uml base patch # # arch/um/drivers/daemon_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -12 # uml: Uml base patch # # arch/um/drivers/cow_user.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/drivers/cow_user.c # # arch/um/drivers/cow_sys.h # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/drivers/cow_sys.h # # arch/um/drivers/cow_kern.c # 2004/08/24 11:13:14-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/drivers/cow_kern.c # # arch/um/drivers/cow.h # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +41 -0 # # arch/um/drivers/chan_user.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +52 -48 # uml: Uml base patch # # arch/um/drivers/chan_kern.c # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +13 -3 # uml: Uml base patch # # arch/um/drivers/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -13 # uml: Uml base patch # # arch/um/defconfig # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +135 -95 # uml: Uml base patch # # arch/um/config.release # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +0 -1 # uml: Uml base patch # # arch/um/Makefile # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +69 -39 # uml: Uml base patch # # arch/um/Makefile-skas # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +3 -3 # uml: Uml base patch # # arch/um/Makefile-i386 # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -9 # uml: Uml base patch # # arch/um/Kconfig # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +38 -0 # uml: Uml base patch # # arch/um/Kconfig_net # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +1 -69 # uml: Uml base patch # # arch/um/Kconfig_block # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +14 -0 # uml: Uml base patch # # arch/um/Kconfig.debug # 2004/08/24 02:08:18-07:00 blaisorblade_spam@yahoo.it +4 -0 # uml: Uml base patch # # arch/um/drivers/cow.h # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/um/drivers/cow.h # # BitKeeper/deleted/.del-user_syms.c~3721953e2e77c594 # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: arch/um/kernel/user_syms.c # # BitKeeper/deleted/.del-spinlock.h~99a286c9bb0cdcd3 # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: include/asm-um/spinlock.h # # BitKeeper/deleted/.del-smplock.h~2fcbcd2e6471a0e5 # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: include/asm-um/smplock.h # # BitKeeper/deleted/.del-extable.c~8beb382d1d62f6d4 # 2004/08/24 11:13:13-07:00 blaisorblade_spam@yahoo.it +0 -0 # Delete: arch/um/sys-i386/extable.c # # ChangeSet # 2004/08/24 11:12:38-07:00 anton@samba.org # [PATCH] flexible-mmap for ppc64 # # From: # # Implement the new address space layout for 32-bit apps running on ppc64. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/processor.h # 2004/08/24 02:08:17-07:00 anton@samba.org +2 -0 # flexible-mmap for ppc64 # # arch/ppc64/mm/mmap.c # 2004/08/24 02:08:17-07:00 anton@samba.org +86 -0 # flexible-mmap for ppc64 # # arch/ppc64/mm/mmap.c # 2004/08/24 02:08:17-07:00 anton@samba.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/mm/mmap.c # # arch/ppc64/mm/Makefile # 2004/08/24 02:08:17-07:00 anton@samba.org +1 -1 # flexible-mmap for ppc64 # # ChangeSet # 2004/08/24 11:12:26-07:00 arjanv@redhat.com # [PATCH] flex mmap for s390(x) # # Below is a patch from Pete Zaitcev (zaitcev@redhat.com) to also use the # flex mmap infrastructure for s390(x). The IBM Domino guys *really* seem to # want this. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/s390/mm/mmap.c # 2004/08/24 02:08:16-07:00 arjanv@redhat.com +83 -0 # flex mmap for s390(x) # # include/asm-s390/processor.h # 2004/08/24 02:08:16-07:00 arjanv@redhat.com +2 -0 # flex mmap for s390(x) # # arch/s390/mm/mmap.c # 2004/08/24 02:08:16-07:00 arjanv@redhat.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/s390/mm/mmap.c # # arch/s390/mm/Makefile # 2004/08/24 02:08:16-07:00 arjanv@redhat.com +1 -1 # flex mmap for s390(x) # # ChangeSet # 2004/08/24 11:12:13-07:00 arjanv@redhat.com # [PATCH] sysctl tunable for flexmmap # # Create /proc/sys/vm/legacy_va_layout. If this is non-zero, the kernel # will use the old mmap layout for all tasks. it presently defaults to zero # (the new layout). # # From: William Lee Irwin III # # hugetlb CONFIG_SYSCTL=n fix # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/hugetlb.c # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +1 -1 # sysctl tunable for flexmmap # # kernel/sysctl.c # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +17 -0 # sysctl tunable for flexmmap # # include/linux/sysctl.h # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +1 -0 # sysctl tunable for flexmmap # # include/linux/mm.h # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +6 -0 # sysctl tunable for flexmmap # # include/asm-i386/page.h # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +2 -0 # sysctl tunable for flexmmap # # arch/i386/mm/mmap.c # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +2 -1 # sysctl tunable for flexmmap # # Documentation/filesystems/proc.txt # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +6 -0 # sysctl tunable for flexmmap # # ChangeSet # 2004/08/24 11:12:01-07:00 arjanv@redhat.com # [PATCH] flexmmap patchkit: fix for 32 bit emu for 64 bit arches # # Utz Lehmann found a problem with the flexmmap # patches on x86-64, what he is seeing is that the 32 bit personality isn't # set at the first point of setting the allocator strategy. The solution is # simple, in binfmt_elf the personality is set so put the pick-layout # function there. Please consider, # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/binfmt_elf.c # 2004/08/24 02:08:15-07:00 arjanv@redhat.com +2 -0 # flexmmap patchkit: fix for 32 bit emu for 64 bit arches # # ChangeSet # 2004/08/24 11:11:50-07:00 mingo@elte.hu # [PATCH] i386 virtual memory layout rework # # Rework the i386 mm layout to allow applications to allocate more virtual # memory, and larger contiguous chunks. # # # - the patch is compatible with existing architectures that either make # use of HAVE_ARCH_UNMAPPED_AREA or use the default mmap() allocator - there # is no change in behavior. # # - 64-bit architectures can use the same mechanism to clean up 32-bit # compatibility layouts: by defining HAVE_ARCH_PICK_MMAP_LAYOUT and # providing a arch_pick_mmap_layout() function - which can then decide # between various mmap() layout functions. # # - I also introduced a new personality bit (ADDR_COMPAT_LAYOUT) to signal # older binaries that dont have PT_GNU_STACK. x86 uses this to revert back # to the stock layout. I also changed x86 to not clear the personality bits # upon exec(), like x86-64 already does. # # - once every architecture that uses HAVE_ARCH_UNMAPPED_AREA has defined # its arch_pick_mmap_layout() function, we can get rid of # HAVE_ARCH_UNMAPPED_AREA altogether, as a final cleanup. # # the new layout generation function (__get_unmapped_area()) got significant # testing in FC1/2, so i'm pretty confident it's robust. # # # Compiles & boots fine on an 'old' and on a 'new' x86 distro as well. # # The two known breakages were: # # http://www.redhatconfig.com/msg/67248.html # # [ 'cyzload' third-party utility broke. ] # # http://www.zipworld.com/au/~akpm/dde.tar.gz # # [ your editor broke :-) ] # # both were caused by application bugs that did: # # int ret = malloc(); # # if (ret <= 0) # failure; # # such bugs are easy to spot if they happen, and if it happens it's possible # to work it around immediately without having to change the binary, via the # setarch patch. # # No other application has been found to be affected, and this particular # change got pretty wide coverage already over RHEL3 and exec-shield, it's in # use for more than a year. # # # The setarch utility can be used to trigger the compatibility layout on # x86, the following version has been patched to take the `-L' option: # # http://people.redhat.com/mingo/flexible-mmap/setarch-1.4-2.tar.gz # # "setarch -L i386 " will run the command with the old layout. # # From: Hugh Dickins # # The problem is in the flexible mmap patch: arch_get_unmapped_area_topdown # is liable to give your mmap vm_start above TASK_SIZE with vm_end wrapped; # which is confusing, and ends up as that BUG_ON(mm->map_count). # # The patch below stops that behaviour, but it's not the full solution: # wilson_mmap_test -s 1000 then simply cannot allocate memory for the large # mmap, whereas it works fine non-top-down. # # I think it's wrong to interpret a large or rlim_infinite stack rlimit as # an inviolable request to reserve that much for the stack: it makes much less # VM available than bottom up, not what was intended. Perhaps top down should # go bottom up (instead of belly up) when it fails - but I'd probably better # leave that to Ingo. # # Or perhaps the default should place stack below text (as WLI suggested and # ELF intended, with its text defaulting to 0x08048000, small progs sharing # page table between stack and text and data); with a further personality for # those needing bigger stack. # # From: Ingo Molnar # # - fall back to the bottom-up layout if the stack can grow unlimited (if # the stack ulimit has been set to RLIM_INFINITY) # # - try the bottom-up allocator if the top-down allocator fails - this can # utilize the hole between the true bottom of the stack and its ulimit, as a # last-resort effort. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/mmap.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +70 -0 # i386 virtual memory layout rework # # mm/mmap.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +111 -13 # i386 virtual memory layout rework # # kernel/fork.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -1 # i386 virtual memory layout rework # # include/linux/sched.h # 2004/08/24 02:08:15-07:00 mingo@elte.hu +27 -0 # i386 virtual memory layout rework # # include/linux/personality.h # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -0 # i386 virtual memory layout rework # # include/asm-i386/processor.h # 2004/08/24 02:08:15-07:00 mingo@elte.hu +2 -0 # i386 virtual memory layout rework # # fs/exec.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -0 # i386 virtual memory layout rework # # fs/binfmt_elf.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -1 # i386 virtual memory layout rework # # fs/binfmt_aout.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -1 # i386 virtual memory layout rework # # arch/i386/mm/mmap.c # 2004/08/24 02:08:15-07:00 mingo@elte.hu +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/mm/mmap.c # # arch/i386/mm/Makefile # 2004/08/24 02:08:15-07:00 mingo@elte.hu +1 -1 # i386 virtual memory layout rework # # ChangeSet # 2004/08/24 11:11:37-07:00 mingo@elte.hu # [PATCH] sched: smt fixes # # while looking at HT scheduler bugreports and boot failures i discovered a # bad assumption in most of the HT scheduling code: that resched_task() can # be called without holding the task's runqueue. # # This is most definitely not valid - doing it without locking can lead to # the task on that CPU exiting, and this CPU corrupting the (ex-) task_info # struct. It can also lead to HT-wakeup races with task switching on that # other CPU. (this_CPU marking the wrong task on that_CPU as need_resched - # resulting in e.g. idle wakeups not working.) # # The attached patch against fixes it all up. Changes: # # - resched_task() needs to touch the task so the runqueue lock of that CPU # must be held: resched_task() now enforces this rule. # # - wake_priority_sleeper() was called without holding the runqueue lock. # # - wake_sleeping_dependent() needs to hold the runqueue locks of all # siblings (2 typically). Effects of this ripples back to schedule() as # well - in the non-SMT case it gets compiled out so it's fine. # # - dependent_sleeper() needs the runqueue locks too - and it's slightly # harder because it wants to know the 'next task' info which might change # during the lock-drop/reacquire. Ripple effect on schedule() => compiled # out on non-SMT so fine. # # - resched_task() was disabling preemption for no good reason - all paths # that called this function had either a spinlock held or irqs disabled. # # Compiled & booted on x86 SMP and UP, with and without SMT. Booted the # SMT kernel on a real SMP+HT box as well. (Unpatched kernel wouldn't even # boot with the resched_task() assert in place.) # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:14-07:00 mingo@elte.hu +86 -29 # sched: smt fixes # # ChangeSet # 2004/08/24 11:11:26-07:00 mingo@elte.hu # [PATCH] sched: self-reaping atomicity fix # # disable preemption in the self-reap codepath, as such tasks may not be on # the tasklist anymore and CPU-hotplug relies on the tasklist to migrate # tasks. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/exit.c # 2004/08/24 02:08:14-07:00 mingo@elte.hu +7 -0 # sched: self-reaping atomicity fix # # ChangeSet # 2004/08/24 11:11:14-07:00 mingo@redhat.com # [PATCH] permit sleeping in release_task() # # release_task() calls proc_pid_flush() call dput(), which can sleep. But # that's a late-in-exit no-preempt path with CONFIG_PREEMPT. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/exit.c # 2004/08/24 02:08:14-07:00 mingo@redhat.com +18 -18 # permit sleeping in release_task() # # ChangeSet # 2004/08/24 11:11:02-07:00 mingo@elte.hu # [PATCH] sched: new task fix # # Rusty noticed that we update the parent ->avg_sleep without holding the # runqueue lock. Also the code needed cleanups. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:13-07:00 mingo@elte.hu +15 -9 # sched: new task fix # # ChangeSet # 2004/08/24 11:10:51-07:00 mingo@elte.hu # [PATCH] sched: nonlinear timeslices # # * Nick Piggin wrote: # # > Increasing priority (negative nice) doesn't have much impact. -20 CPU # > hog only gets about double the CPU of a 0 priority CPU hog and only # > about 120% the CPU time of a nice -10 hog. # # this is a property of the base scheduler as well. # # We can do a nonlinear timeslice distribution trivially - the attached # patch implements the following timeslice distribution ontop of # 2.6.8-rc3-mm1: # # [ -20 ... 0 ... 19 ] => [800ms ... 100ms ... 5ms] # # the nice-20/nice+19 ratio is now 1:160 - sufficient for all aspects. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:13-07:00 mingo@elte.hu +14 -17 # sched: nonlinear timeslices # # ChangeSet # 2004/08/24 11:10:39-07:00 mingo@elte.hu # [PATCH] sched: whitespace cleanups # # - whitespace and style cleanups # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:13-07:00 mingo@elte.hu +33 -32 # sched: whitespace cleanups # # ChangeSet # 2004/08/24 11:10:27-07:00 akpm@osdl.org # [PATCH] schedstat: UP fix # # SMP fix -- # for_each_domain() is not defined if not CONFIG_SMP, so show_schedstat # needed a couple of extra ifdefs. # # Signed-off-by: Rick Lindsley # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:12-07:00 akpm@osdl.org +4 -0 # schedstat: UP fix # # Documentation/sched-stats.txt # 2004/08/24 02:08:12-07:00 akpm@osdl.org +6 -2 # schedstat: UP fix # # ChangeSet # 2004/08/24 11:10:16-07:00 wli@holomorphy.com # [PATCH] sched: sparc32 fixes # # Fix up sparc32 properly. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/sparc/kernel/sun4m_smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -10 # sched: sparc32 fixes # # arch/sparc/kernel/sun4d_smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -1 # sched: sparc32 fixes # # ChangeSet # 2004/08/24 11:10:03-07:00 wli@holomorphy.com # [PATCH] sched: consolidate init_idle() and fork_by_hand() # # It appears that init_idle() and fork_by_hand() could be combined into a # single method that calls init_idle() on behalf of the caller. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +8 -0 # sched: consolidate init_idle() and fork_by_hand() # # kernel/fork.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +15 -1 # sched: consolidate init_idle() and fork_by_hand() # # init/main.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +0 -9 # sched: consolidate init_idle() and fork_by_hand() # # include/linux/sched.h # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -1 # sched: consolidate init_idle() and fork_by_hand() # # arch/x86_64/kernel/smpboot.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -17 # sched: consolidate init_idle() and fork_by_hand() # # arch/sparc64/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -8 # sched: consolidate init_idle() and fork_by_hand() # # arch/sparc/kernel/sun4d_smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -10 # sched: consolidate init_idle() and fork_by_hand() # # arch/sh/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -6 # sched: consolidate init_idle() and fork_by_hand() # # arch/s390/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -10 # sched: consolidate init_idle() and fork_by_hand() # # arch/ppc64/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -9 # sched: consolidate init_idle() and fork_by_hand() # # arch/ppc/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -6 # sched: consolidate init_idle() and fork_by_hand() # # arch/parisc/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -21 # sched: consolidate init_idle() and fork_by_hand() # # arch/mips/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -17 # sched: consolidate init_idle() and fork_by_hand() # # arch/ia64/kernel/smpboot.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +6 -21 # sched: consolidate init_idle() and fork_by_hand() # # arch/i386/mach-voyager/voyager_smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -17 # sched: consolidate init_idle() and fork_by_hand() # # arch/i386/kernel/smpboot.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -19 # sched: consolidate init_idle() and fork_by_hand() # # arch/alpha/kernel/smp.c # 2004/08/24 02:08:12-07:00 wli@holomorphy.com +1 -13 # sched: consolidate init_idle() and fork_by_hand() # # ChangeSet # 2004/08/24 11:09:52-07:00 nathanl@austin.ibm.com # [PATCH] move CONFIG_SCHEDSTATS to arch/ppc64/Kconfig.debug # # Otherwise it shows up under "iSeries device drivers", which doesn't seem # right. # # Signed-off-by: Nathan Lynch # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/Kconfig # 2004/08/24 02:08:11-07:00 nathanl@austin.ibm.com +0 -12 # move CONFIG_SCHEDSTATS to arch/ppc64/Kconfig.debug # # arch/ppc64/Kconfig.debug # 2004/08/24 02:08:11-07:00 nathanl@austin.ibm.com +12 -0 # move CONFIG_SCHEDSTATS to arch/ppc64/Kconfig.debug # # ChangeSet # 2004/08/24 11:09:41-07:00 ricklind@us.ibm.com # [PATCH] scheduler statistics # # It adds lots of CPU scheduler stats in /proc/pid/stat. They are described in # the new Documentation//sched-stats.txt # # We were carrying this patch offline for some time, but as there's still # considerable ongoing work in this area, and as the new stats are a # configuration option, I think it's best that this capability be in the base # kernel. # # Nick removed a fair amount of statistics that he wasn't using. The full patch # gathers more information. In particular, his patch doesn't include the code # to measure the latency between the time a process is made runnable and the # time it hits a processor which will be key to measuring interactivity changes. # # He passed his changes back to me and I got finished merging his changes with # the current statistics patches just before OLS. I believe this is largely a # superset of the patch you grabbed and should port relatively easily too. # # Versions also exist for # # 2.6.8-rc2 # 2.6.8-rc2-mm1 # 2.6.8-rc2-mm2 # # at # http://eaglet.rain.com/rick/linux/schedstat/patches/ # # and within 24 hours at # # http://oss.software.ibm.com/linux/patches/?patch_id=730&show=all # # The version below is for 2.6.8-rc2-mm2 without the staircase code and has # been compiled cleanly but not yet run. # # From: Ingo Molnar # # this code needs a couple of cleanups before it can go into mainline: # # fs/proc/array.c, fs/proc/base.c, fs/proc/proc_misc.c: # # - moved the new /proc//stat fields to /proc//schedstat, # because the new fields break older procps. It's cleaner this way # anyway. This moving of fields necessiated a bump to version 10. # # Documentation/sched-stats.txt: # # - updated sched-stats.txt for version 10 # # - wake_up_forked_thread() => wake_up_new_task() # # - updated the per-process field description # # Kconfig: # # - removed the default y and made the option dependent on DEBUG_KERNEL. # This is really for scheduler analysis, normal users dont need the # overhead. # # include/linux/sched.h: # # - moved the definitions into kernel/sched.c - this fixes UP compilation # and is cleaner. # # - also moved the sched-domain definitions to sched.c - now that the # sched-domains internals are not exposed to architectures this is # doable. It's also necessary due to the previous change. # # kernel/fork.c: # # - moved the ->sched_info init to sched_fork() where it belongs. # # kernel/sched.c: # # - wake_up_forked_thread() -> wake_up_new_task(), wuft_cnt -> wunt_cnt, # wuft_moved -> wunt_moved. # # - wunt_cnt and wunt_moved were defined by never updated - added the # missing code to wake_up_new_task(). # # - whitespace/style police # # - removed whitespace changes done to code not related to schedstats - # i'll send a separate patch for these (and more). # # Signed-off-by: Ingo Molnar # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # Documentation/sched-stats.txt # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +149 -0 # scheduler statistics # # kernel/sched.c # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +470 -21 # scheduler statistics # # include/linux/sched.h # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +18 -113 # scheduler statistics # # fs/proc/proc_misc.c # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +3 -0 # scheduler statistics # # fs/proc/base.c # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +32 -0 # scheduler statistics # # arch/x86_64/Kconfig.debug # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +12 -0 # scheduler statistics # # arch/ppc64/Kconfig # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +12 -0 # scheduler statistics # # arch/ppc/Kconfig.debug # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +12 -0 # scheduler statistics # # arch/i386/Kconfig.debug # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +12 -0 # scheduler statistics # # Documentation/sched-stats.txt # 2004/08/24 02:08:10-07:00 ricklind@us.ibm.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/Documentation/sched-stats.txt # # ChangeSet # 2004/08/24 11:09:28-07:00 kernel@kolivas.org # [PATCH] sched: adjust p4 per-cpu gain # # The smt-nice handling is a little too aggressive by not estimating the per cpu # gain as high enough for pentium4 hyperthread. This patch changes the per # sibling cpu gain from 15% to 25%. The true per cpu gain is entirely dependant # on the workload but overall the 2 species of Pentium4 that support # hyperthreading have about 20-30% gain. # # P.S: Anton - For the power processors that are now using this SMT nice # infrastructure it would be worth setting this value separately at 40%. # # Signed-off-by: Con Kolivas # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2004/08/24 02:08:10-07:00 kernel@kolivas.org +1 -1 # sched: adjust p4 per-cpu gain # # ChangeSet # 2004/08/24 11:09:16-07:00 colpatch@us.ibm.com # [PATCH] Create cpu_sibling_map for PPC64 # # In light of some proposed changes in the sched_domains code, I coded up # this little ditty that simply creates and populates a cpu_sibling_map for # PPC64 machines. The patch just checks the CPU flags to determine if the # CPU supports SMT (aka Hyper-Threading aka Multi-Threading aka ...) and # fills in a mask of the siblings for each CPU in the system. This should # allow us to build sched_domains for PPC64 with generic code in # kernel/sched.c for the SMT systems. SMT is becoming more popular and is # turning up in more and more architectures. I don't think it will be too # long until this feature is supported by most arches... # # Signed-off-by: Matthew Dobson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2004/08/24 02:08:10-07:00 colpatch@us.ibm.com +2 -0 # Create cpu_sibling_map for PPC64 # # arch/ppc64/kernel/smp.c # 2004/08/24 02:08:10-07:00 colpatch@us.ibm.com +7 -0 # Create cpu_sibling_map for PPC64 # # ChangeSet # 2004/08/24 11:09:04-07:00 sivanich@sgi.com # [PATCH] sched: isolated sched domains # # Here's a version of the isolated scheduler domain code that I mentioned in # an RFC on 7/22. This patch applies on top of 2.6.8-rc2-mm1 (to include all # of the new arch_init_sched_domain code). This patch also contains the 2 # line fix to remove the check of first_cpu(sd->groups->cpumask)) that Jesse # sent in earlier. # # Note that this has not been tested with CONFIG_SCHED_SMT. I hope that my # handling of those instances is OK. # # Signed-off-by: Dimitri Sivanich # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:10-07:00 sivanich@sgi.com +76 -5 # sched: isolated sched domains # # ChangeSet # 2004/08/24 11:08:53-07:00 jbarnes@engr.sgi.com # [PATCH] sched: limit cpuspan of node scheduler domains # # This patch limits the cpu span of each node's scheduler domain to prevent # balancing across too many cpus. The cpus included in a node's domain are # determined by the SD_NODES_PER_DOMAIN define and the arch specific # sched_domain_node_span routine if ARCH_HAS_SCHED_DOMAIN is defined. If # ARCH_HAS_SCHED_DOMAIN is not defined, behavior is unchanged--all possible # cpus will be included in each node's scheduling domain. Currently, only # ia64 provides an arch specific sched_domain_node_span routine. # # From: Jesse Barnes # # This patch adds some more NUMA specific logic to the creation of scheduler # domains. Domains spanning all CPUs in a large system are too large to # schedule across efficiently, leading to livelocks and inordinate amounts of # time being spent in scheduler routines. With this patch applied, the node # scheduling domains for NUMA platforms will only contain a specified number # of nearby CPUs, based on the value of SD_NODES_PER_DOMAIN. It also allows # arches to override SD_NODE_INIT, which sets the domain scheduling parameters # for each node's domain. This is necessary especially for large systems. # # Possible future directions: # # o multilevel node hierarchy (e.g. node domains could contain 4 nodes # worth of CPUs, supernode domains could contain 32 nodes worth, etc. each # with their own SD_NODE_INIT values) # # o more tweaking of SD_NODE_INIT values for good load balancing vs. # overhead tradeoffs # # From: mita akinobu # # Compile fix # # Signed-off-by: Jesse Barnes # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:09-07:00 jbarnes@engr.sgi.com +74 -8 # sched: limit cpuspan of node scheduler domains # # include/asm-ia64/processor.h # 2004/08/24 02:08:09-07:00 jbarnes@engr.sgi.com +20 -0 # sched: limit cpuspan of node scheduler domains # # arch/ia64/kernel/smpboot.c # 2004/08/24 02:08:09-07:00 jbarnes@engr.sgi.com +1 -0 # sched: limit cpuspan of node scheduler domains # # ChangeSet # 2004/08/24 11:08:41-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: consolidate sched domains # # Teach the generic domains builder about SMT, and consolidate all # architecture specific domain code into that. Also, the SD_*_INIT macros can # now be redefined by arch code without duplicating the entire setup code. # This can be done by defining ARCH_HASH_SCHED_TUNE. # # The generic builder has been simplified with the addition of a helper # macro which will probably prove to be useful to arch specific code as well # and should be exported if that is the case. # # Signed-off-by: Nick Piggin # # From: Matthew Dobson # # The attached patch is against 2.6.8-rc2-mm2, and removes Nick's # conditional definition & population of cpu_sibling_map[] in favor of my # unconditional ones. This does not affect how cpu_sibling_map is used, just # gives it broader scope. # # From: Nick Piggin # # Small fix to sched-consolidate-domains.patch picked up by # # From: Suresh # # another sched consolidate domains fix # # From: Nick Piggin # # Don't use cpu_sibling_map if !CONFIG_SCHED_SMT # # This one spotted by Dimitri Sivanich # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +145 -81 # sched: consolidate sched domains # # include/linux/sched.h # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +5 -0 # sched: consolidate sched domains # # include/asm-x86_64/processor.h # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -5 # sched: consolidate sched domains # # include/asm-ppc64/processor.h # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -5 # sched: consolidate sched domains # # include/asm-i386/processor.h # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -5 # sched: consolidate sched domains # # arch/x86_64/kernel/Makefile # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -1 # sched: consolidate sched domains # # arch/x86_64/kernel/Makefile-HEAD # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -1 # sched: consolidate sched domains # # arch/ppc64/kernel/smp.c # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -215 # sched: consolidate sched domains # # arch/i386/kernel/smpboot.c # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +0 -207 # sched: consolidate sched domains # # Documentation/sched-domains.txt # 2004/08/24 02:08:09-07:00 nickpiggin@yahoo.com.au +21 -6 # sched: consolidate sched domains # # BitKeeper/deleted/.del-domain.c~ae619231167b63a1 # 2004/08/24 11:08:35-07:00 nickpiggin@yahoo.com.au +0 -0 # Delete: arch/x86_64/kernel/domain.c # # ChangeSet # 2004/08/24 11:08:29-07:00 mingo@elte.hu # [PATCH] sched: fork hotplug hanling cleanup # # - remove the hotplug lock from around much of fork(), and re-copy the # cpus_allowed mask to solve the hotplug race cleanly. # # Signed-off-by: Ingo Molnar # Signed-off-by: Srivatsa Vaddagiri # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:08-07:00 mingo@elte.hu +1 -13 # sched: fork hotplug hanling cleanup # # kernel/fork.c # 2004/08/24 02:08:08-07:00 mingo@elte.hu +11 -11 # sched: fork hotplug hanling cleanup # # ChangeSet # 2004/08/24 11:08:17-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: remove balance on clone # # This removes balance on clone capability altogether. I told Andi we wouldn't # remove it yet, but provided it is in a single small patch, he mightn't get too # upset. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:08-07:00 nickpiggin@yahoo.com.au +2 -22 # sched: remove balance on clone # # kernel/fork.c # 2004/08/24 02:08:08-07:00 nickpiggin@yahoo.com.au +1 -1 # sched: remove balance on clone # # include/linux/sched.h # 2004/08/24 02:08:08-07:00 nickpiggin@yahoo.com.au +5 -6 # sched: remove balance on clone # # ChangeSet # 2004/08/24 11:08:06-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: disable balance on clone # # Don't balance on clone by default. # # Balance on clone has a number of trivial performance failure cases, but it was # needed to get decent OpenMP performance on NUMA (Opteron) systems. Not doing # child-runs-first for new threads also solves this problem in a nicer way # (implemented in a previous patch). # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2004/08/24 02:08:08-07:00 nickpiggin@yahoo.com.au +0 -3 # sched: disable balance on clone # # ChangeSet # 2004/08/24 11:07:54-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: sched misc changes # # Add some likely/unliklies, a for_each_cpu => for_each_cpu_online, and close # the sched_exit race. # # From: Ingo Molnar # # fix a typo in a previous patch breaking RT scheduling & interactivity. # # Signed-off-by: Nick Piggin # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:08-07:00 nickpiggin@yahoo.com.au +8 -10 # sched: sched misc changes # # ChangeSet # 2004/08/24 11:07:42-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: make rt_task unlikely # # From: Ingo Molnar # # RT tasks are unlikely, move this into rt_task() instead of open-coding it. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +2 -2 # sched: make rt_task unlikely # # include/linux/sched.h # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +1 -1 # sched: make rt_task unlikely # # ChangeSet # 2004/08/24 11:07:30-07:00 mingo@elte.hu # [PATCH] sched: misc cleanups #2 # # - fix two stale comments # - cleanup # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:07-07:00 mingo@elte.hu +3 -5 # sched: misc cleanups #2 # # ChangeSet # 2004/08/24 11:07:19-07:00 nickpiggin@yahoo.com.au # [PATCH] kernel thread idle fix # # Now that init_idle does not remove tasks from the runqueue, those # architectures that use kernel_thread instead of copy_process for the idle # task will break. To fix, ensure that CLONE_IDLETASK tasks are not put on # the runqueue in the first place. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/fork.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +7 -5 # kernel thread idle fix # # ChangeSet # 2004/08/24 11:07:08-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: cleanup, improve sched <=> fork APIs # # Move balancing and child-runs-first logic from fork.c into sched.c where # it belongs. # # * Consolidate wake_up_forked_process and wake_up_forked_thread into # wake_up_new_process, and pass in clone_flags as suggested by Linus. This # removes a lot of code duplication and allows all logic to be handled in that # function. # # * Don't do balance-on-clone balancing for vfork'ed threads. # # * Don't do set_task_cpu or balance one clone in wake_up_new_process. # Instead do it in sched_fork to fix set_cpus_allowed races. # # * Don't do child-runs-first for CLONE_VM processes, as there is obviously no # COW benifit to be had. This is a big one, it enables Andi's workload to run # well without clone balancing, because the OpenMP child threads can get # balanced off to other nodes *before* they start running and allocating # memory. # # * Rename sched_balance_exec to sched_exec: hide the policy from the API. # # # From: Ingo Molnar # # rename wake_up_new_process -> wake_up_new_task. # # in sched.c we are gradually moving away from the overloaded 'process' or # 'thread' notion to the traditional task (or context) naming. # # Signed-off-by: Nick Piggin # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +96 -103 # sched: cleanup, improve sched <=> fork APIs # # kernel/fork.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +16 -31 # sched: cleanup, improve sched <=> fork APIs # # include/linux/sched.h # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +6 -9 # sched: cleanup, improve sched <=> fork APIs # # fs/exec.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +1 -1 # sched: cleanup, improve sched <=> fork APIs # # fs/compat.c # 2004/08/24 02:08:07-07:00 nickpiggin@yahoo.com.au +2 -2 # sched: cleanup, improve sched <=> fork APIs # # ChangeSet # 2004/08/24 11:06:56-07:00 nickpiggin@yahoo.com.au # [PATCH] sched: cleanup init_idle() # # Clean up init_idle to not use wake_up_forked_process, then undo all the stuff # that call does. Instead, do everything in init_idle. # # Make double_rq_lock depend on CONFIG_SMP because it is no longer used on UP. # # Signed-off-by: Nick Piggin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +38 -39 # sched: cleanup init_idle() # # init/main.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +8 -7 # sched: cleanup init_idle() # # arch/x86_64/kernel/smpboot.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +2 -5 # sched: cleanup init_idle() # # arch/sh/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +0 -2 # sched: cleanup init_idle() # # arch/s390/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +4 -1 # sched: cleanup init_idle() # # arch/ppc64/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +0 -1 # sched: cleanup init_idle() # # arch/ppc/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +0 -2 # sched: cleanup init_idle() # # arch/parisc/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +0 -1 # sched: cleanup init_idle() # # arch/mips/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +2 -6 # sched: cleanup init_idle() # # arch/ia64/kernel/smpboot.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +2 -5 # sched: cleanup init_idle() # # arch/i386/mach-voyager/voyager_smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +3 -2 # sched: cleanup init_idle() # # arch/i386/kernel/smpboot.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +2 -5 # sched: cleanup init_idle() # # arch/alpha/kernel/smp.c # 2004/08/24 02:08:06-07:00 nickpiggin@yahoo.com.au +0 -2 # sched: cleanup init_idle() # # ChangeSet # 2004/08/24 11:06:43-07:00 mingo@elte.hu # [PATCH] sched: fix timeslice calculations for HZ=1000. # # The main benefit is that with the default HZ=1000 nice +19 tasks now get 5 # msecs of timeslices, so the ratio of CPU use is linear. (nice 0 task gets # 20 times more CPU time than a nice 19 task. Prior this change the ratio # was 1:10) # # another effect is that nice 0 tasks now get a round 100 msecs of timeslices # (as intended), instead of 102 msecs. # # here's a table of old/new timeslice values, for HZ=1000 and 100: # # HZ=1000 ( HZ=100 ) # old new ( old new ) # # nice -20: 200 200 ( 200 200 ) # nice -19: 195 195 ( 190 190 ) # ... # nice 0: 102 100 ( 100 100 ) # nice 1: 97 95 ( 90 90 ) # nice 2: 92 90 ( 90 90 ) # ... # nice 17: 19 15 ( 10 10 ) # nice 18: 14 10 ( 10 10 ) # nice 19: 10 5 ( 10 10 ) # # i've tested the patch on x86. # # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sched.c # 2004/08/24 02:08:06-07:00 mingo@elte.hu +7 -7 # sched: fix timeslice calculations for HZ=1000. # # ChangeSet # 2004/08/24 18:49:29+01:00 davej@redhat.com # [CPUFREQ] Work around some broken userspace daemons. # Some daemons try to set the speed to the same speed we're currently # running at. Detect that, and bail out early before we fiddle # with registers and such. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 18:49:20+01:00 davej@redhat.com +7 -2 # [CPUFREQ] Work around some broken userspace daemons. # Some daemons try to set the speed to the same speed we're currently # running at. Detect that, and bail out early before we fiddle # with registers and such. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 18:27:53+01:00 davej@redhat.com # [CPUFREQ] Merge on-demand cpufreq policy governor. # # From: "Pallipadi, Venkatesh" # Signed-off-by: Dave Jones # # drivers/cpufreq/cpufreq_ondemand.c # 2004/08/24 18:27:44+01:00 davej@redhat.com +424 -0 # # drivers/cpufreq/cpufreq_ondemand.c # 2004/08/24 18:27:44+01:00 davej@redhat.com +0 -0 # BitKeeper file /mnt/data/src/bk/cpufreq/drivers/cpufreq/cpufreq_ondemand.c # # drivers/cpufreq/Makefile # 2004/08/24 18:27:44+01:00 davej@redhat.com +1 -0 # [CPUFREQ] Merge on-demand cpufreq policy governor. # # From: "Pallipadi, Venkatesh" # Signed-off-by: Dave Jones # # drivers/cpufreq/Kconfig # 2004/08/24 18:27:44+01:00 davej@redhat.com +15 -0 # [CPUFREQ] Merge on-demand cpufreq policy governor. # # From: "Pallipadi, Venkatesh" # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 18:21:37+01:00 davej@redhat.com # [CPUFREQ] Fix reset-to-max-speed on unloading of longhaul driver. # # From: Sven Traenkle # # The second part adresses a problem of resetting the max cpu-freq when # unloading the driver. This didn't work for my cpu and I doubt it does # for other. There is no need to pass the computed index of the max. # multiplier in the clock_ratio[] table to longhault_table[] cause the # longhaul_setstate function works with the clock_ratio[] index. # # Changing the while loop to a for loop with upper limit isn't actually # necessary as long as the driver is bug free, but thats IMHO not yet the # case, so I suggest this change in order to not loop endlessly or read # beyond the limits of the clock_ratio array. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 18:21:29+01:00 davej@redhat.com +6 -6 # [CPUFREQ] Fix reset-to-max-speed on unloading of longhaul driver. # # From: Sven Traenkle # # The second part adresses a problem of resetting the max cpu-freq when # unloading the driver. This didn't work for my cpu and I doubt it does # for other. There is no need to pass the computed index of the max. # multiplier in the clock_ratio[] table to longhault_table[] cause the # longhaul_setstate function works with the clock_ratio[] index. # # Changing the while loop to a for loop with upper limit isn't actually # necessary as long as the driver is bug free, but thats IMHO not yet the # case, so I suggest this change in order to not loop endlessly or read # beyond the limits of the clock_ratio array. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 18:17:48+01:00 davej@redhat.com # [CPUFREQ] Samuel2 can use eblcr to determine FSB. # # From: Sven Traenkle. # # here's a patch that solves some issues I have with the longhaul cpufreq # driver on my epia 6000CL/Via EDEN (actually reporting as CentaurHauls, # family 6, model 7, VIA Samuel 2). The driver tries to compute the fsb speed # while it could actually use the fixed values (as it does for model == 6). # I got this change from the via forum, so no credits to me. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 18:17:41+01:00 davej@redhat.com +1 -1 # [CPUFREQ] Samuel2 can use eblcr to determine FSB. # # From: Sven Traenkle. # # here's a patch that solves some issues I have with the longhaul cpufreq # driver on my epia 6000CL/Via EDEN (actually reporting as CentaurHauls, # family 6, model 7, VIA Samuel 2). The driver tries to compute the fsb speed # while it could actually use the fixed values (as it does for model == 6). # I got this change from the via forum, so no credits to me. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 18:11:49+01:00 davej@redhat.com # [CPUFREQ] fix up random CodingStyle /whitespace regressions. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 18:11:42+01:00 davej@redhat.com +20 -18 # [CPUFREQ] fix up random CodingStyle /whitespace regressions. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 18:08:43+01:00 davej@redhat.com # [CPUFREQ] Further cleanups to longhaul driver using defines. # By defining the cpu type at startup, we can make a lot of comparisons # a lot more obvious what they are meaning. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 18:08:35+01:00 davej@redhat.com +28 -13 # [CPUFREQ] Further cleanups to longhaul driver using defines. # By defining the cpu type at startup, we can make a lot of comparisons # a lot more obvious what they are meaning. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 17:48:56+01:00 davej@redhat.com # [CPUFREQ] Prettyprint longhaul speeds. # If its >= 1000MHz print it as GHz. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 17:48:48+01:00 davej@redhat.com +20 -4 # [CPUFREQ] Prettyprint longhaul speeds. # If its >= 1000MHz print it as GHz. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 16:28:11+00:00 aegl@agluck-lia64.sc.intel.com # Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/Linus # into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.9 # # include/asm-ia64/acpi.h # 2004/08/24 16:28:05+00:00 aegl@agluck-lia64.sc.intel.com +0 -1 # Auto merged # # ChangeSet # 2004/08/24 17:15:25+01:00 davej@delerium.codemonkey.org.uk # Merge delerium.codemonkey.org.uk:/mnt/data/src/bk/bk-linus # into delerium.codemonkey.org.uk:/mnt/data/src/bk/cpufreq # # include/asm-i386/acpi.h # 2004/08/24 17:15:18+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # drivers/cpufreq/cpufreq_userspace.c # 2004/08/24 17:15:18+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # arch/i386/kernel/smpboot.c # 2004/08/24 17:15:18+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # ChangeSet # 2004/08/24 09:05:11-07:00 trini@kernel.crashing.org # Merge upstream changes by hand. # # arch/ppc/platforms/sbc82xx.c # 2004/08/24 09:04:53-07:00 trini@kernel.crashing.org +20 -0 # Merge by hand. # # kernel/sysctl.c # 2004/08/24 09:02:24-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/kernel/setup.c # 2004/08/24 09:02:24-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/Kconfig # 2004/08/24 09:02:23-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/08/24 09:02:23-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 08:31:24-07:00 trini@kernel.crashing.org # Merge kernel.crashing.org:/home/trini/work/kernel/devel/linux-2.6-reorg # into kernel.crashing.org:/home/trini/work/kernel/pristine/for-linus-ppc # # arch/ppc/syslib/m8260_setup.c # 2004/08/24 08:31:20-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/platforms/mvme5100.c # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/platforms/lopec.c # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/platforms/mvme5100.c # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Merge rename: arch/ppc/platforms/mvme5100_setup.c -> arch/ppc/platforms/mvme5100.c # # arch/ppc/platforms/mcpn765.c # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # arch/ppc/platforms/lopec.c # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Merge rename: arch/ppc/platforms/lopec_setup.c -> arch/ppc/platforms/lopec.c # # arch/ppc/Kconfig # 2004/08/24 08:31:19-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # ChangeSet # 2004/08/24 08:30:23-07:00 trini@kernel.crashing.org # ppc32: Fix a typo in cputable.c # # Signed-off-by: Tom Rini # # arch/ppc/kernel/cputable.c # 2004/08/24 08:30:14-07:00 trini@kernel.crashing.org +1 -1 # Fix a typo # # ChangeSet # 2004/08/24 08:29:42-07:00 trini@kernel.crashing.org # ppc32: Fix a compile error when CONFIG_PREP && !CONFIG_PREP_RESIDUAL # # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_setup.c # 2004/08/24 08:29:33-07:00 trini@kernel.crashing.org +2 -0 # Only check for noresidual on CONFIG_PREP_RESIDUAL. # # ChangeSet # 2004/08/24 15:42:53+01:00 davej@redhat.com # [CPUFREQ] Remove extraneous comment # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 15:42:41+01:00 davej@redhat.com +1 -1 # [CPUFREQ] Remove extraneous comment # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 15:38:01+01:00 davej@redhat.com # [CPUFREQ] Powersaver also has voltage scaling abilities. # We currently don't do voltage scaling, but we can at least set things up # to prepare for when we do. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 15:37:49+01:00 davej@redhat.com +2 -1 # [CPUFREQ] Powersaver also has voltage scaling abilities. # We currently don't do voltage scaling, but we can at least set things up # to prepare for when we do. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 15:35:28+01:00 davej@redhat.com # [CPUFREQ] Introduce some defines for the longhaul version, and use them. # This makes some of the code quite a bit cleaner, and a lot more # obvious whats going on on which CPUs. # # Signed-off-by: Dave Jones # # arch/i386/kernel/cpu/cpufreq/longhaul.c # 2004/08/24 15:33:10+01:00 davej@redhat.com +83 -62 # [CPUFREQ] Introduce some defines for the longhaul version, and use them. # This makes some of the code quite a bit cleaner, and a lot more # obvious whats going on on which CPUs. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/08/24 00:09:55-07:00 corbet@lwn.net # [PATCH] Remove struct bus_type->add() # # I recently went looking for users of the add() method in struct # bus_type, only to discover that there are none. A query to Pat # confirmed that it is surplus and should come out. So here's a patch # that does it. # # While I was at it, I updated Documentation/driver-model/bus.txt to at # least get rid of the blatantly untrue stuff; it is still rather far from # being up to date, however. I may be able to fix that later on. # # Signed-off-by: Jonathan Corbet # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # include/linux/device.h # 2004/08/19 12:26:00-07:00 corbet@lwn.net +0 -1 # Remove struct bus_type->add() # # Documentation/driver-model/bus.txt # 2004/08/19 12:32:58-07:00 corbet@lwn.net +23 -55 # Remove struct bus_type->add() # # ChangeSet # 2004/08/23 13:17:08-07:00 greg@kroah.com # KREF: make kref_get() return void as it makes sense to do so. # # Thanks to Kiran for bugging me to do this. # # Signed-off-by: Greg Kroah-Hartman # # lib/kref.c # 2004/08/23 13:16:09-07:00 greg@kroah.com +1 -2 # KREF: make kref_get() return void as it makes sense to do so. # # Thanks to Kiran for bugging me to do this. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/kref.h # 2004/08/23 13:16:09-07:00 greg@kroah.com +1 -1 # KREF: make kref_get() return void as it makes sense to do so. # # Thanks to Kiran for bugging me to do this. # # Signed-off-by: Greg Kroah-Hartman # # drivers/scsi/sr.c # 2004/08/23 13:16:09-07:00 greg@kroah.com +1 -3 # KREF: make kref_get() return void as it makes sense to do so. # # Thanks to Kiran for bugging me to do this. # # Signed-off-by: Greg Kroah-Hartman # # drivers/scsi/sd.c # 2004/08/23 13:16:09-07:00 greg@kroah.com +1 -3 # KREF: make kref_get() return void as it makes sense to do so. # # Thanks to Kiran for bugging me to do this. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/23 11:08:49-07:00 trini@kernel.crashing.org # We weren't including from , so # _IO_BASE was defined to zero instead of isa_io_base. # # Signed-Off-By: David Woodhouse # Signed-Off-By: Tom Rini # # include/asm-ppc/mpc8260.h # 2004/08/23 11:08:39-07:00 trini@kernel.crashing.org +4 -0 # Add before we look at _IO_BASE, etc, # otherwise it cannot be redefined. # # arch/ppc/syslib/m8260_pci.h # 2004/08/23 11:08:39-07:00 trini@kernel.crashing.org +1 -0 # Add a forward declaration of pci_controller. # # ChangeSet # 2004/08/23 18:06:07+00:00 aegl@agluck-lia64.sc.intel.com # Merge agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-test-2.6.8.1 # into agluck-lia64.sc.intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.8.1 # # include/asm-ia64/acpi.h # 2004/08/23 18:06:02+00:00 aegl@agluck-lia64.sc.intel.com +0 -1 # Auto merged # # ChangeSet # 2004/08/23 13:00:48+01:00 davej@delerium.codemonkey.org.uk # Merge delerium.codemonkey.org.uk:/mnt/data/src/bk/bk-linus # into delerium.codemonkey.org.uk:/mnt/data/src/bk/cpufreq # # include/asm-i386/acpi.h # 2004/08/23 13:00:43+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # drivers/cpufreq/cpufreq_userspace.c # 2004/08/23 13:00:43+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # arch/i386/kernel/smpboot.c # 2004/08/23 13:00:43+01:00 davej@delerium.codemonkey.org.uk +0 -0 # Auto merged # # ChangeSet # 2004/08/22 20:44:58-05:00 akpm@osdl.org # [PATCH] nsc-ircc driver crashes on shutdown # # From: Petr Vandrovec # # bk-dma-decleare-coherent-memory patch adds a requirement for # dma_free_coherent that dev cannot be NULL... But it can (nsc-ircc has no # suitable dev) and as dma_alloc_coherent allows NULL dev, dma_free_coherent # should allow it too IMHO. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # arch/i386/kernel/pci-dma.c # 2004/08/22 19:39:03-05:00 akpm@osdl.org +1 -1 # nsc-ircc driver crashes on shutdown # # ChangeSet # 2004/08/22 09:04:51-07:00 jejb@ios.(none) # Merge # # drivers/scsi/megaraid/megaraid_mm.h # 2004/08/22 09:04:19-07:00 jejb@ios.(none) +0 -0 # SCCS merged # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/22 09:01:03-07:00 jejb@ios.(none) +0 -1 # Auto merged # # ChangeSet # 2004/08/22 08:59:22-07:00 jejb@ios.(none) # Update to megaraid version 2.20.3.0 # # From: Mukker, Atul # # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.h # 2004/08/22 08:58:42-07:00 jejb@ios.(none) +3 -48 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/22 08:58:42-07:00 jejb@ios.(none) +128 -72 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/megaraid_mbox.h # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +9 -3 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +167 -197 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/megaraid_ioctl.h # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +2 -2 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/mega_common.h # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +0 -15 # Update to megaraid version 2.20.3.0 # # drivers/scsi/megaraid/Kconfig.megaraid # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +3 -7 # Update to megaraid version 2.20.3.0 # # Documentation/scsi/megaraid.txt # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +1 -1 # Update to megaraid version 2.20.3.0 # # Documentation/scsi/ChangeLog.megaraid # 2004/08/22 08:58:41-07:00 jejb@ios.(none) +122 -1 # Update to megaraid version 2.20.3.0 # # ChangeSet # 2004/08/22 15:41:39+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Remove pccard_mem_map's sys_start and sys_stop elements. # # include/pcmcia/ss.h # 2004/08/22 15:39:16+01:00 rmk@flint.arm.linux.org.uk +0 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/yenta_socket.c # 2004/08/22 15:39:15+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/tcic.c # 2004/08/22 15:39:15+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/rsrc_mgr.c # 2004/08/22 15:39:15+01:00 rmk@flint.arm.linux.org.uk +0 -6 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/pd6729.c # 2004/08/22 15:39:15+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/i82365.c # 2004/08/22 15:39:15+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/i82092.c # 2004/08/22 15:39:14+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/cs.c # 2004/08/22 15:39:14+01:00 rmk@flint.arm.linux.org.uk +0 -7 # Remove pccard_mem_map's sys_start and sys_stop elements. # # drivers/pcmcia/cistpl.c # 2004/08/22 15:39:14+01:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove pccard_mem_map's sys_start and sys_stop elements. # # ChangeSet # 2004/08/22 15:12:37+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Don't use sys_start for static-mapped sockets. # # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # include/pcmcia/ss.h # 2004/08/22 15:10:24+01:00 rmk@flint.arm.linux.org.uk +1 -0 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # drivers/pcmcia/soc_common.c # 2004/08/22 15:10:24+01:00 rmk@flint.arm.linux.org.uk +1 -3 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # drivers/pcmcia/hd64465_ss.c # 2004/08/22 15:10:24+01:00 rmk@flint.arm.linux.org.uk +4 -7 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # drivers/pcmcia/cs.c # 2004/08/22 15:10:23+01:00 rmk@flint.arm.linux.org.uk +7 -1 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # drivers/pcmcia/cistpl.c # 2004/08/22 15:10:23+01:00 rmk@flint.arm.linux.org.uk +1 -1 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # drivers/pcmcia/au1000_generic.c # 2004/08/22 15:10:23+01:00 rmk@flint.arm.linux.org.uk +4 -11 # Add static_start element to pccard_mem_map - which is used by # statically mapped sockets to return the physical address which # should be used to access the memory region. # # ChangeSet # 2004/08/22 15:02:41+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Convert PCI socket drivers to use struct resource. # # Convert PCI socket drivers to use the resource passed in rather than # pccard_mem_map's sys_start and sys_stop elements. This also means # that we convert the struct resource to a PCI bus region, thereby # performing any platform specific fixups which may be necessary. # # drivers/pcmcia/yenta_socket.c # 2004/08/22 14:59:58+01:00 rmk@flint.arm.linux.org.uk +5 -2 # Convert PCI socket drivers to use the resource passed in rather than # pccard_mem_map's sys_start and sys_stop elements. This also means # that we convert the struct resource to a PCI bus region, thereby # performing any platform specific fixups which may be necessary. # # drivers/pcmcia/i82092.c # 2004/08/22 14:59:58+01:00 rmk@flint.arm.linux.org.uk +11 -7 # Convert PCI socket drivers to use the resource passed in rather than # pccard_mem_map's sys_start and sys_stop elements. This also means # that we convert the struct resource to a PCI bus region, thereby # performing any platform specific fixups which may be necessary. # # ChangeSet # 2004/08/22 14:56:24+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Use struct resource rather than sys_start/sys_stop # # Convert 16-bit PCMCIA socket drivers to use the struct resource # rather than the sys_start and sys_stop members of pccard_mem_map. # # drivers/pcmcia/tcic.c # 2004/08/22 14:53:56+01:00 rmk@flint.arm.linux.org.uk +5 -5 # Convert 16-bit PCMCIA socket drivers to use the struct resource # rather than the sys_start and sys_stop members of pccard_mem_map. # # drivers/pcmcia/pd6729.c # 2004/08/22 14:53:56+01:00 rmk@flint.arm.linux.org.uk +6 -6 # Convert 16-bit PCMCIA socket drivers to use the struct resource # rather than the sys_start and sys_stop members of pccard_mem_map. # # drivers/pcmcia/i82365.c # 2004/08/22 14:53:55+01:00 rmk@flint.arm.linux.org.uk +6 -6 # Convert 16-bit PCMCIA socket drivers to use the struct resource # rather than the sys_start and sys_stop members of pccard_mem_map. # # ChangeSet # 2004/08/21 18:30:38-04:00 jejb@mulgrave.(none) # fix sym2 negotiation # # The problems with domain validation were just the tip of the iceberg in # the sym2 driver. Most of its problems seem to come from an overly # complex set of negotiating rules, which I've swept away with this patch. # # I also removed the ability to set parameters in the on-board bios and # have the driver respect them. (this hasn't worked for a while in 2.6 # because after the driver sets them, Domain Validation resets them # again). # # Finally, there was a really nasty bug where the driver negotiates # improperly when turning off DT clocking. If you simply turn it off, the # driver originally fell back to using the old WDTR/SDTR method of # negotiation. However, since it thought the bus was already wide, it # only emitted a SDTR, which causes the device to reset from wide to # narrow. Hence the driver thinks the device is wide and the device # thinks it is narrow => boom. # # I redid the negotiation to predicate PPR messages on whether the device # claims support for them or not. # # Signed-off-by: James Bottomley # # drivers/scsi/sym53c8xx_2/sym_nvram.c # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +0 -16 # fix sym2 negotiation # # drivers/scsi/sym53c8xx_2/sym_misc.c # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +0 -118 # fix sym2 negotiation # # drivers/scsi/sym53c8xx_2/sym_hipd.h # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +1 -39 # fix sym2 negotiation # # drivers/scsi/sym53c8xx_2/sym_hipd.c # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +67 -55 # fix sym2 negotiation # # drivers/scsi/sym53c8xx_2/sym_glue.h # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +7 -1 # fix sym2 negotiation # # drivers/scsi/sym53c8xx_2/sym_glue.c # 2004/08/21 18:29:47-04:00 jejb@mulgrave.(none) +13 -106 # fix sym2 negotiation # # ChangeSet # 2004/08/21 18:25:03-04:00 jejb@mulgrave.(none) # Add accessor functons for scsi_device 56 byte inquiry data # # Signed-off-by: James Bottomley # # include/scsi/scsi_device.h # 2004/08/21 18:24:28-04:00 jejb@mulgrave.(none) +32 -0 # Add accessor functons for scsi_device 56 byte inquiry data # # ChangeSet # 2004/08/21 18:21:27-04:00 jgarzik@pobox.com # [PATCH] add ssleep(), kill scsi_sleep() # # So, the kernel needs a 'sleep', but that token is far too common, so I # chose ssleep(). # # scsi_sleep() is a manually implemented msleep(), so I remove it. # # Signed-off-by: James Bottomley # # include/scsi/scsi_eh.h # 2004/08/18 22:39:39-04:00 jgarzik@pobox.com +0 -1 # add ssleep(), kill scsi_sleep() # # include/linux/delay.h # 2004/08/18 22:35:15-04:00 jgarzik@pobox.com +5 -0 # add ssleep(), kill scsi_sleep() # # drivers/scsi/sr_ioctl.c # 2004/08/18 22:45:43-04:00 jgarzik@pobox.com +2 -1 # add ssleep(), kill scsi_sleep() # # drivers/scsi/sg.c # 2004/08/18 22:45:56-04:00 jgarzik@pobox.com +3 -2 # add ssleep(), kill scsi_sleep() # # drivers/scsi/scsi_syms.c # 2004/08/18 22:39:16-04:00 jgarzik@pobox.com +0 -2 # add ssleep(), kill scsi_sleep() # # drivers/scsi/scsi_error.c # 2004/08/18 22:45:39-04:00 jgarzik@pobox.com +5 -41 # add ssleep(), kill scsi_sleep() # # drivers/scsi/arm/fas216.c # 2004/08/18 22:37:53-04:00 jgarzik@pobox.com +2 -2 # add ssleep(), kill scsi_sleep() # # drivers/scsi/aic7xxx_old.c # 2004/08/18 22:38:37-04:00 jgarzik@pobox.com +4 -4 # add ssleep(), kill scsi_sleep() # # drivers/scsi/aic7xxx/aic7xxx_osm.c # 2004/08/18 22:37:31-04:00 jgarzik@pobox.com +4 -3 # add ssleep(), kill scsi_sleep() # # drivers/scsi/aic7xxx/aic79xx_osm.c # 2004/08/18 22:36:56-04:00 jgarzik@pobox.com +4 -3 # add ssleep(), kill scsi_sleep() # # drivers/scsi/aha1542.c # 2004/08/18 22:38:11-04:00 jgarzik@pobox.com +2 -2 # add ssleep(), kill scsi_sleep() # # drivers/scsi/aacraid/linit.c # 2004/08/18 23:54:47-04:00 jgarzik@pobox.com +2 -1 # add ssleep(), kill scsi_sleep() # # ChangeSet # 2004/08/21 18:19:58-04:00 g.liakhovetski@gmx.de # [PATCH] tmscsim: remove unused / redundant bios_param # # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.c # 2004/08/17 17:17:27-04:00 g.liakhovetski@gmx.de +0 -135 # tmscsim: remove unused / redundant bios_param # # ChangeSet # 2004/08/21 18:18:09-04:00 hch@lst.de # [PATCH] clean up some more tmscsim scan logic # # - cleanup checks in ->queuecommand, we only get here either for # inquiry or a found device now # - DCBmap in the acb is gone, was only used for debug prints after # the prevous changes # - kill some more debugging keyed of by ->scan_devices # # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.h # 2004/08/17 13:56:00-04:00 hch@lst.de +0 -1 # clean up some more tmscsim scan logic # # drivers/scsi/tmscsim.c # 2004/08/17 14:05:52-04:00 hch@lst.de +0 -36 # clean up some more tmscsim scan logic # # ChangeSet # 2004/08/21 18:16:25-04:00 hch@lst.de # [PATCH] kill tmscsim ->proc_info # # hrrible code like all proc_info implementations and no really usefull # information. We might want to add sysfs attributes if some users really # miss anything. # # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.c # 2004/08/15 13:22:09-04:00 hch@lst.de +0 -150 # kill tmscsim ->proc_info # # ChangeSet # 2004/08/21 05:59:04-05:00 stevef@steveft21.ltcsamba # CIFS: xsymlink support part 1 of 2 # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/cifspdu.h # 2004/08/21 05:58:31-05:00 stevef@steveft21.ltcsamba +32 -3 # xsymlink support part 1 of 2 # # ChangeSet # 2004/08/21 05:47:13-05:00 stevef@steveft21.ltcsamba # CIFS: Workaround Samba bug in incorrectly setting extended security flag in negotiate response (which caused mounts # to fail to Samba server which have short, one or two byte, domain names). # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/inode.c # 2004/08/21 05:17:43-05:00 stevef@steveft21.ltcsamba +1 -1 # big endian problem in display of number of blocks in inode # # fs/cifs/cifssmb.c # 2004/08/21 05:17:43-05:00 stevef@steveft21.ltcsamba +6 -5 # Workaround Samba bug in incorrectly setting extended security flag in negotiate response # # ChangeSet # 2004/08/20 17:58:59-04:00 akpm@osdl.org # [PATCH] fix qla1280 build on visws # # From: Andrey Panin # # attached patch fixes qla1280 SCSI driver build failure on visws due to # undefined RD_REG_WORD_dmasync() macro. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.h # 2004/08/20 10:47:46-04:00 akpm@osdl.org +1 -0 # fix qla1280 build on visws # # ChangeSet # 2004/08/20 15:42:46-05:00 shaggy@austin.ibm.com # JFS: Trivial: remove dead code # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_mount.c # 2004/08/20 15:42:25-05:00 shaggy@austin.ibm.com +0 -3 # remove dead code # # ChangeSet # 2004/08/19 23:03:22-04:00 James.Bottomley@steeleye.com # [PATCH] fix for Domain Validation hang on some devices with sym_2 # # There's a bad hang where the driver locks the system solid trying to do # domain validation with certain devices. The one I've managed to # reproduce it with is a Quantum Atlas. # # What happens is that setting the offset to zero is an async negotiation # message. However, the driver still seems to have DT set (which is # illegal). Most devices just reject this as stupid, but the Quantum # seems to try to obey it and hangs the bus. # # The simple fix is to reset all PPR options when the offset is set to # zero. # # Signed-off-by: James Bottomley # # drivers/scsi/sym53c8xx_2/sym_glue.c # 2004/08/19 22:30:35-04:00 James.Bottomley@steeleye.com +3 -0 # fix for Domain Validation hang on some devices with sym_2 # # ChangeSet # 2004/08/19 17:39:03-04:00 brking@us.ibm.com # [PATCH] Allow TCQ depth to be lowered properly # # Ran into a couple small issues with the patch. First, # blk_queue_resize_tags wasn't getting exported, so I sent Jens a patch to # fix this, which he has now sent upstream. Second, the comment above # blk_queue_resize_tags says the queue_lock must be held when calling this # routine. Attached is an updated patch that grabs the lock. Other than # that, it looks good. # # James Bottomley wrote: # > On Tue, 2004-08-03 at 10:50, Brian King wrote: # >>Currently, it is possible to call scsi_activate_tcq with a small queue depth, # >>then later call scsi_adjust_queue_depth with a larger queue depth. This results # >>in the scsi layer having a larger queue depth than the block layer knows about. # >>This results in these additional commands being issued as untagged ops rather than # >>tagged ops. This patch changes scsi_activate_tcq to call blk_queue_init_tags with # >>the maximum supported number of tags so this cannot occur. # > # > # > Sorry, been away at conferences with not enough time to remember what # > went on here. # > # > The reason it looks the way it does is historical...when the blk layer # > tcq interfaces were created, there was no way to resize the queue. Jens # > later added resize (for me) and I forgot to incorporate it into the # > code. # > # > Another small point is that the max number of tags can be greater than # > 256. 256 is a SPI limit only (and even the qla1280, a SPI card which # > could use the tag as its global queue index would take > 256). The # > limit in scsi_adjust_queue_depth has long since been obsoleted by our # > dynamic command allocation. # > # > I think the attached should work correctly (as long as it compiles...I # > coded it up on the flight home). # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/scsi.c # 2004/08/09 13:55:05-04:00 brking@us.ibm.com +10 -7 # Allow TCQ depth to be lowered properly # # ChangeSet # 2004/08/19 17:12:33-04:00 jejb@mulgrave.(none) # get the kernel to warn about deprecated SCSI ioctls # # The non unique SCSI ioctls: # # SCSI_IOCTL_SEND_COMMAND # SCSI_IOCTL_TEST_UNIT_READY # SCSI_IOCTL_BENCHMARK_COMMAND # SCSI_IOCTL_SYNC # SCSI_IOCTL_START_UNIT # SCSI_IOCTL_STOP_UNIT # # Have been deprecated for a while now. We should make the kernel # complain when a program actually uses one of them, so users have had # adequate warning before they are removed. # # Signed-off-by: James Bottomley # # drivers/scsi/scsi_ioctl.c # 2004/08/19 17:11:54-04:00 jejb@mulgrave.(none) +15 -0 # get the kernel to warn about deprecated SCSI ioctls # # drivers/block/scsi_ioctl.c # 2004/08/19 17:11:54-04:00 jejb@mulgrave.(none) +1 -0 # get the kernel to warn about deprecated SCSI ioctls # # ChangeSet # 2004/08/19 08:42:46-05:00 stevef@smfhome.smfdom # CIFS: fix 64 bit compiler warning in cifs debug code # # Signed-off-by: Steve French (sfrench@us.ibm.com) # # fs/cifs/cifsproto.h # 2004/08/19 08:42:38-05:00 stevef@smfhome.smfdom +1 -1 # fix 64 bit compiler warning in debug code # # ChangeSet # 2004/08/19 00:04:31-04:00 akpm@osdl.org # [PATCH] megaraid build fix # # drivers/scsi/megaraid/megaraid_mm.c: In function `mraid_mm_init': # drivers/scsi/megaraid/megaraid_mm.c:1069: `mraid_mm_compat_ioctl' undeclared (first use in this function) # drivers/scsi/megaraid/megaraid_mm.c:1069: (Each undeclared identifier is reported only once # drivers/scsi/megaraid/megaraid_mm.c:1069: for each function it appears in.) # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/18 23:57:11-04:00 akpm@osdl.org +2 -0 # megaraid build fix # # ChangeSet # 2004/08/18 19:37:24-07:00 davem@nuts.davemloft.net # [TG3]: Disable CIOBE split, as per Broadcom's driver. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/18 19:36:35-07:00 davem@nuts.davemloft.net +3 -1 # [TG3]: Disable CIOBE split, as per Broadcom's driver. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/18 17:33:05-07:00 davem@nuts.davemloft.net # [TG3]: Do tg3_netif_start() under lock. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/18 17:32:43-07:00 davem@nuts.davemloft.net +11 -11 # [TG3]: Do tg3_netif_start() under lock. # # ChangeSet # 2004/08/18 15:51:14-07:00 davem@nuts.davemloft.net # Cset exclude: davem@nuts.davemloft.net|ChangeSet|20040817010613|52352 # # drivers/net/tg3.c # 2004/08/18 15:51:09-07:00 davem@nuts.davemloft.net +0 -0 # Exclude # # ChangeSet # 2004/08/18 15:48:43-07:00 davem@nuts.davemloft.net # [TG3]: Always set MAC_EVENT_LNKSTATE_CHANGED even when serdes polling. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/18 15:48:23-07:00 davem@nuts.davemloft.net +3 -6 # [TG3]: Always set MAC_EVENT_LNKSTATE_CHANGED even when serdes polling. # # ChangeSet # 2004/08/18 15:36:43-07:00 davem@nuts.davemloft.net # [TG3]: Remove autoneg handling from fibre_autoneg() unneeded. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/18 15:35:50-07:00 davem@nuts.davemloft.net +35 -52 # [TG3]: Remove autoneg handling from fibre_autoneg() unneeded. # # ChangeSet # 2004/08/18 21:50:56+00:00 jbarnes@sgi.com # [ACPI] ia64 build fix # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/acpi.h # 2004/08/17 22:17:10+00:00 jbarnes@sgi.com +1 -0 # ia64 ACPI build fix # # ChangeSet # 2004/08/18 16:25:50-04:00 jejb@mulgrave.(none) # Fix the new megaraid compat code to work on all 64 bit systems # # make it universally include linux/ioctl32.h for # its compat ioctl. # # This fixes a build failure on parisc64 # # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.h # 2004/08/18 16:25:05-04:00 jejb@mulgrave.(none) +2 -13 # Fix the new megaraid compat code to work on all 64 bit systems # # drivers/scsi/megaraid/megaraid_mm.c # 2004/08/18 16:25:05-04:00 jejb@mulgrave.(none) +1 -1 # Fix the new megaraid compat code to work on all 64 bit systems # # ChangeSet # 2004/08/18 14:32:52-05:00 shaggy@austin.ibm.com # JFS: disk quota support # # This patch adds disk quota support to jfs. # # A patch is required for quota-tools to work with jfs. It can be # found at http://oss.software.ibm.com/jfs/project/pub/quota-tools.patch # Quota tools source can be downloaded from # https://sourceforge.net/projects/linuxquota/ # # Written by: Karl Rister & Dave Kleikamp # Signed-off-by: Dave Kleikamp # # fs/jfs/xattr.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +42 -9 # Disk Quota Support # # fs/jfs/resize.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +3 -2 # Disk Quota Support # # fs/jfs/namei.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +25 -14 # Disk Quota Support # # fs/jfs/jfs_xtree.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +44 -17 # Disk Quota Support # # fs/jfs/jfs_txnmgr.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +0 -2 # Disk Quota Support # # fs/jfs/jfs_inode.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +13 -1 # Disk Quota Support # # fs/jfs/jfs_imap.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +7 -20 # Disk Quota Support # # fs/jfs/jfs_extent.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +19 -7 # Disk Quota Support # # fs/jfs/jfs_dtree.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +37 -28 # Disk Quota Support # # fs/jfs/inode.c # 2004/08/18 14:32:20-05:00 shaggy@austin.ibm.com +10 -2 # Disk Quota Support # # fs/jfs/acl.c # 2004/08/18 14:32:19-05:00 shaggy@austin.ibm.com +10 -3 # Disk Quota Support # # ChangeSet # 2004/08/18 11:19:19-07:00 trini@kernel.crashing.org # ppc32: Move ppc32-specific sysctls to arch/ppc # # Remove both of the PPC32 && 6xx sysctls from kernel/sysctl.c to # arch/ppc/ # # Signed-off-by: Tom Rini # # kernel/sysctl.c # 2004/08/18 11:19:09-07:00 trini@kernel.crashing.org +0 -22 # Remove both PPC32-specific sysctls. # # arch/ppc/kernel/ppc_htab.c # 2004/08/18 11:19:09-07:00 trini@kernel.crashing.org +30 -3 # Add a sysctl for l2cr (/proc/sys/kernel/l2cr). # # arch/ppc/kernel/idle.c # 2004/08/18 11:19:09-07:00 trini@kernel.crashing.org +34 -0 # Add a sysctl for powersave-nap (/proc/sys/kernel/powersave-nap). # # ChangeSet # 2004/08/18 18:18:02+00:00 kenneth.w.chen@intel.com # [IA64] head.S: update comments to match code # # Update comments in function ia64_switch_mode_virt() to reflect actual # implementation from recent region 5 init_task bug fix. # # Signed-off-by: Ken Chen # Signed-off-by: Tony Luck # # arch/ia64/kernel/head.S # 2004/08/18 18:17:23+00:00 kenneth.w.chen@intel.com +1 -2 # update comments to match code # # ChangeSet # 2004/08/18 18:11:06+00:00 jbarnes@sgi.com # [IA64] cyclone.c: Add includes for build on uni-processor. # # Small patch to fix the includes for the cyclone timer. We just happen to be # getting these if CONFIG_SMP is on, but if it's turned off the build breaks. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/kernel/cyclone.c # 2004/08/18 18:10:33+00:00 jbarnes@sgi.com +2 -0 # Add includes for build on uni-processor. # # ChangeSet # 2004/08/18 18:01:20+00:00 roe@sgi.com # [IA64-SGI] report coherence id in /proc/sgi_sn/coherence_id # # Current SGI Altix systems have a NUMAlink domain size of 1024 # compute nodes and are fully cache coherent up to 256 compute # nodes (compute nodes are even-numbered). Systems larger than # 256 nodes are partitioned into multiple cache coherent systems. # This patch exports a partition's coherence id to users via the # /proc/sgi_sn/coherence_id file. # # Signed-off-by: Dean Roe # Signed-off-by: Tony Luck # # include/asm-ia64/sn/sn_cpuid.h # 2004/08/18 18:00:37+00:00 roe@sgi.com +7 -1 # add macros to get coherence id from cpuid # # arch/ia64/sn/kernel/sn2/sn_proc_fs.c # 2004/08/18 18:00:37+00:00 roe@sgi.com +23 -1 # report coherence id in /proc/sgi_sn/coherence_id # # ChangeSet # 2004/08/18 17:52:20+00:00 jbarnes@sgi.com # [IA64] time.c: Downgrade printk of cpu speed to KERN_DEBUG # # This patch turns the per-CPU frequency printk into a KERN_DEBUG instead of a # KERN_INFO so it'll show up in the system log but won't be printed at boot, # since it's a big pain on system with a lot of CPUs. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/kernel/time.c # 2004/08/18 17:51:42+00:00 jbarnes@sgi.com +1 -1 # Downgrade printk of cpu speed to KERN_DEBUG # # ChangeSet # 2004/08/18 17:26:05+00:00 edwardsg@sgi.com # [IA64] ia32_support.c: Check whether page_alloc failed. # # It's pretty unlikely these page allocations would fail, but we should # still check them. # # Signed-off-by: Greg Edwards # Signed-off-by: Tony Luck # # arch/ia64/ia32/ia32_support.c # 2004/08/18 17:25:15+00:00 edwardsg@sgi.com +6 -0 # Check whether page_alloc failed. # # ChangeSet # 2004/08/18 17:19:08+00:00 steiner@sgi.com # [IA64-SGI] The SN2 fakeprom directories/files should be deleted. # # Signed-off-by: Jack Steiner # Signed-off-by: Tony Luck # # BitKeeper/deleted/.del-runsim~a711a1ab0af1705 # 2004/08/18 17:19:00+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/runsim # # BitKeeper/deleted/.del-make_textsym~7e01e13217d2f336 # 2004/08/18 17:19:00+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/make_textsym # # BitKeeper/deleted/.del-main.c~cb94011d199676d # 2004/08/18 17:19:00+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/main.c # # BitKeeper/deleted/.del-klgraph_init.c~aa95cde7a9f378ff # 2004/08/18 17:19:00+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/klgraph_init.c # # BitKeeper/deleted/.del-fw-emu.c~839acab86f841ae8 # 2004/08/18 17:19:00+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/fw-emu.c # # BitKeeper/deleted/.del-fpromasm.S~b1ba88b8fc042b23 # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/fpromasm.S # # BitKeeper/deleted/.del-fprom.lds~85f66545e097fe3c # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/fprom.lds # # BitKeeper/deleted/.del-fpmem.h~1d6c9758daedaaf0 # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/fpmem.h # # BitKeeper/deleted/.del-fpmem.c~3f099c89df871d43 # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/fpmem.c # # BitKeeper/deleted/.del-README~bd48db925e04952 # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/README # # BitKeeper/deleted/.del-Makefile~d85515a659a74329 # 2004/08/18 17:18:59+00:00 steiner@sgi.com +0 -0 # Delete: arch/ia64/sn/fakeprom/Makefile # # ChangeSet # 2004/08/18 17:01:08+00:00 jbarnes@sgi.com # [IA64-SGI] bte.c: kill expression as lvalue warning # # A recent patch caused a warning about not using expressions as lvalues # to crop up in bte.c (or maybe it's just that I'm using gcc-3.4.1 now). # This patch fixes it by creating a temporary to store the register whose # address we want to get and stuff into the per-bte info structure. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/sn/kernel/bte.c # 2004/08/18 17:00:28+00:00 jbarnes@sgi.com +4 -3 # kill expression as lvalue warning # # ChangeSet # 2004/08/18 16:40:05+00:00 jbarnes@sgi.com # [IA64-SGI] Assign parent to PCI devices. # # In working on the patch to export PCI ROM space via sysfs, I found that the # sn2 PCI code doesn't assign a parent resource to any of the PCI device # resources as it builds them. This provides a simple fix for that problem. # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # arch/ia64/sn/io/machvec/pci_bus_cvlink.c # 2004/08/18 16:38:41+00:00 jbarnes@sgi.com +3 -0 # provide parent resources for PCI devices # # ChangeSet # 2004/08/17 23:45:26+00:00 schwab@suse.de # [IA64] still declares deleted acpi_register_irq. # # Signed-off-by: Andreas Schwab # Signed-off-by: Tony Luck # # include/asm-ia64/acpi.h # 2004/08/17 23:44:28+00:00 schwab@suse.de +0 -1 # acpi_register_irq() no longer exists # # ChangeSet # 2004/08/17 23:31:45+00:00 seto.hidetoshi@jp.fujitsu.com # [IA64] floating point regs are not 16-byte aligned inside SAL error record # # Signed-off-by: Hidetoshi Seto # Signed-off-by: Tony Luck # # include/asm-ia64/sal.h # 2004/08/17 23:29:55+00:00 seto.hidetoshi@jp.fujitsu.com +1 -1 # floating point regs are not 16-byte aligned inside SAL error record # # ChangeSet # 2004/08/17 22:56:10+00:00 ak@suse.de # [IA64] various issues in the IA64 swiotlb code # # The biggest change is better overflow handling, partly ported from the AMD64 # IOMMU code. This is important for some 3d drivers who make use of this and can # map a lot of memory. # # First it increases the default memory usage of swiotlb to 64MB. # This was the value used in production systems in 2.4 (e.g. in SLES8) and the default # was far too small. Note this is only allocated when the swiotlb is needed. # # pci_map_single will not panic anymore on an overflow. Instead it returns # a pointer to a scratch area and allows the caller to check using # dma_mapping_error(). It still panics when the overflow buffer is exceeded. # # dma_mapping_error support is implemented. # # pci_map_sg will never panic now, but just return 0. Near all callers # of it seem to have proper error checking for this (IDE will even handle # it without erroring out) # # The handling of passing a NULL device is improved, previously it would # never map in this case. i386 and other architectures assume NULL means a 4GB # limit instead. This code does this now too. # # I added support for swiotlb=force for easier testing. # # Patch supplied by Andi Kleen & Suresh Siddha # # Signed-off-by: Tony Luck # # arch/ia64/lib/swiotlb.c # 2004/08/17 22:52:39+00:00 ak@suse.de +88 -26 # various issues in the IA64 swiotlb code # # ChangeSet # 2004/08/17 22:20:48+00:00 jbarnes@sgi.com # [ACPI] ia64 build fix # # Signed-off-by: Jesse Barnes # Signed-off-by: Tony Luck # # include/asm-ia64/acpi.h # 2004/08/17 22:17:10+00:00 jbarnes@sgi.com +1 -0 # ia64 ACPI build fix # # ChangeSet # 2004/08/17 10:43:05-07:00 trini@kernel.crashing.org # ppc32: Make use of cpufeatures in some flush rountines # # This is based on an observation from Pantelis Antoniou. We get # a minor speedup of flush_icache_range, __flush_dcache_icache and # __flush_dcache_icache_phys, in that we do not need to do this on # CPUs with a unified cache (601), so check for that feature bit # instead of a PVR check. # # Signed-off-by: Tom Rini # # arch/ppc/kernel/misc.S # 2004/08/17 10:42:55-07:00 trini@kernel.crashing.org +9 -12 # In flush_icache_range, __flush_dcache_icache and # __flush_dcache_icache_phys use the PPC_FEATURE_UNIFIED_CACHE # check, instead of an explicit check for 601 (601 has this feature # which is actually what we want). # # ChangeSet # 2004/08/17 10:40:49-07:00 trini@kernel.crashing.org # ppc32: Fix an LSB floating-point test failure. # # Signed-off-by: Greg Weeks under TS0087 # Signed-off-by: Tom Rini # # arch/ppc/math-emu/op-common.h # 2004/08/17 10:40:39-07:00 trini@kernel.crashing.org +0 -1 # Currently, one of the LSB tests fails here (while it's fine # on ppc_8260 and i386). What we do is remove the round in # the denormalised underflow case. This appears to match the # hardware behavior. # # ChangeSet # 2004/08/17 10:37:47-07:00 trini@kernel.crashing.org # ppc32: Add a 'noresidual' option, to ignore residual data. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_setup.c # 2004/08/17 10:37:37-07:00 trini@kernel.crashing.org +4 -0 # Add a 'noresidual' option to disable reading of residual data. # # arch/ppc/Kconfig # 2004/08/17 10:37:37-07:00 trini@kernel.crashing.org +4 -3 # Update the help for PREP_RESIDUAL. # # Documentation/kernel-parameters.txt # 2004/08/17 10:37:37-07:00 trini@kernel.crashing.org +2 -0 # Document noresidual. # # ChangeSet # 2004/08/17 12:09:18-04:00 jejb@mulgrave.(none) # Add new Megaraid driver version 2.20.0.1 # # From: Mukker, Atul # # This is a complete re-write to replace the now obsoleted megaraid2 # driver. # # Signed-off-by: James Bottomley # # drivers/scsi/megaraid/megaraid_mm.h # 2004/06/23 11:53:53-04:00 jejb@mulgrave.(none) +147 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/megaraid_mm.c # 2004/06/23 15:36:31-04:00 jejb@mulgrave.(none) +1104 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/megaraid_mbox.h # 2004/08/17 12:08:34-04:00 jejb@mulgrave.(none) +262 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/06/23 15:36:27-04:00 jejb@mulgrave.(none) +3931 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/megaraid_ioctl.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +291 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/mega_common.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +298 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/mbox_defs.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +790 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/Makefile # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +2 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/Kconfig.megaraid # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +81 -0 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/Makefile # 2004/06/22 19:51:44-04:00 jejb@mulgrave.(none) +2 -1 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/Kconfig # 2004/06/22 19:52:18-04:00 jejb@mulgrave.(none) +1 -9 # Add new Megaraid driver version 2.20.0.1 # # drivers/pci/pci.ids # 2004/06/17 15:42:31-04:00 jejb@mulgrave.(none) +25 -3 # Add new Megaraid driver version 2.20.0.1 # # Documentation/scsi/ChangeLog.megaraid # 2004/06/22 19:47:44-04:00 jejb@mulgrave.(none) +47 -30 # Add new Megaraid driver version 2.20.0.1 # # drivers/scsi/megaraid/megaraid_mm.h # 2004/06/23 11:53:53-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/megaraid_mm.h # # drivers/scsi/megaraid/megaraid_mm.c # 2004/06/23 15:36:31-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/megaraid_mm.c # # drivers/scsi/megaraid/megaraid_mbox.h # 2004/08/17 12:08:34-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/megaraid_mbox.h # # drivers/scsi/megaraid/megaraid_mbox.c # 2004/06/23 15:36:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/megaraid_mbox.c # # drivers/scsi/megaraid/megaraid_ioctl.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/megaraid_ioctl.h # # drivers/scsi/megaraid/mega_common.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/mega_common.h # # drivers/scsi/megaraid/mbox_defs.h # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/mbox_defs.h # # drivers/scsi/megaraid/Makefile # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/Makefile # # drivers/scsi/megaraid/Kconfig.megaraid # 2004/06/22 19:49:27-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/megaraid/Kconfig.megaraid # # Documentation/scsi/megaraid.txt # 2004/06/22 19:50:19-04:00 jejb@mulgrave.(none) +70 -0 # Add new Megaraid driver version 2.20.0.1 # # Documentation/scsi/megaraid.txt # 2004/06/22 19:50:19-04:00 jejb@mulgrave.(none) +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/Documentation/scsi/megaraid.txt # # ChangeSet # 2004/08/17 10:08:38+01:00 rmk@flint.arm.linux.org.uk # [PCMCIA] Fix case of two "skt" variables. # # We want the value preserved across both sections of code such that # the cleanup works as expected. # # drivers/pcmcia/soc_common.c # 2004/08/17 10:06:38+01:00 rmk@flint.arm.linux.org.uk +3 -2 # Don't declare two 'skt' variables - we want the value to be preserved # across both sections of code. # # ChangeSet # 2004/08/16 22:53:00-04:00 andmike@us.ibm.com # [PATCH] reorder call in scsi_remove_host # # This patch against scsi-misc-2.6 reorders a call to scsi_forget_host in # the scsi_remove_host function. This removes the error message # "Synchronizing SCSI cache..." on rmmod of a scsi host driver module as # shown in example output 1 and 2 below. # # I had previous created a much more complicated patch to work around this # problem. In response Christoph mention a simpler solution (pointer to # thread below) which is this patch. # # http://marc.theaimsgroup.com/?l=linux-scsi&m=108720042210331&w=2 # # Example output. # # 1.) Before patch. # # elm:~# scsi1 : scsi_debug, version 1.73 [20040518], dev_size_mb=8, # opts=0x0 # Vendor: Linux Model: scsi_debug Rev: 0004 # Type: Direct-Access ANSI SCSI revision: 03 # SCSI device sdc: 16384 512-byte hdwr sectors (8 MB) # SCSI device sdc: drive cache: write back # sdc: unknown partition table # Attached scsi disk sdc at scsi1, channel 0, id 0, lun 0 # Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0, type 0 # Synchronizing SCSI cache for disk sdc: <4>FAILED # status = 0, message = 00, host = 1, driver = 00 # # 2.) After patch. # # elm:~# scsi1 : scsi_debug, version 1.73 [20040518], dev_size_mb=8, opts=0x0 # Vendor: Linux Model: scsi_debug Rev: 0004 # Type: Direct-Access ANSI SCSI revision: 03 # SCSI device sdc: 16384 512-byte hdwr sectors (8 MB) # SCSI device sdc: drive cache: write back # sdc: unknown partition table # Attached scsi disk sdc at scsi1, channel 0, id 0, lun 0 # Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0, type 0 # Synchronizing SCSI cache for disk sdc: # # Signed-off-by: Mike Anderson # Signed-off-by: James Bottomley # # drivers/scsi/hosts.c # 2004/08/11 13:35:07-04:00 andmike@us.ibm.com +1 -1 # reorder call in scsi_remove_host # # ChangeSet # 2004/08/16 17:43:20-07:00 davem@nuts.davemloft.net # [TG3]: Revamp fibre PHY handling. # # - Clearly seperate hw-assisted vs. by-hand handling. # - Seperate PHY ID vs. Serdes state. # # Should fix 5704 Fibre brokenness introduced by Sun # patches. # # Signed-off-by: David S. Miller # # drivers/net/tg3.h # 2004/08/16 17:43:02-07:00 davem@nuts.davemloft.net +3 -2 # [TG3]: Revamp fibre PHY handling. # # - Clearly seperate hw-assisted vs. by-hand handling. # - Seperate PHY ID vs. Serdes state. # # Should fix 5704 Fibre brokenness introduced by Sun # patches. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2004/08/16 17:43:02-07:00 davem@nuts.davemloft.net +333 -188 # [TG3]: Revamp fibre PHY handling. # # - Clearly seperate hw-assisted vs. by-hand handling. # - Seperate PHY ID vs. Serdes state. # # Should fix 5704 Fibre brokenness introduced by Sun # patches. # # Signed-off-by: David S. Miller # # ChangeSet # 2004/08/16 18:50:36-04:00 jejb@mulgrave.(none) # MPT Fusion driver 3.01.15 update # # Highlights of this release: # - Patch provided by Christoph Hellwig to remove the isense code. # - Fix compile errors when CONFIG_PROC_FS=n. # - A fix for the module parameter "mptscsih" which was not being exported. # - The port of the 2.05.17 thru 2.05.23 of the lk 2.4 mpt driver. # # Signed-off-by: James Bottomley # # drivers/message/fusion/mptscsih.c # 2004/08/02 19:01:01-04:00 jejb@mulgrave.(none) +471 -940 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/mptlan.c # 2004/07/02 13:07:04-04:00 jejb@mulgrave.(none) +1 -1 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/mptctl.c # 2004/07/02 11:14:30-04:00 jejb@mulgrave.(none) +5 -7 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/mptbase.h # 2004/08/09 18:42:45-04:00 jejb@mulgrave.(none) +98 -50 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/mptbase.c # 2004/08/16 18:49:58-04:00 jejb@mulgrave.(none) +520 -548 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/Makefile # 2004/07/13 17:33:18-04:00 jejb@mulgrave.(none) +1 -2 # MPT Fusion driver 3.01.15 update # # drivers/message/fusion/Kconfig # 2004/07/13 17:55:06-04:00 jejb@mulgrave.(none) +0 -33 # MPT Fusion driver 3.01.15 update # # BitKeeper/deleted/.del-scsiops.c~eee26d0ceb1f7937 # 2004/08/16 18:50:01-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/scsiops.c # # BitKeeper/deleted/.del-scsi3.h~23cdcf75241fac2a # 2004/08/16 18:50:01-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/scsi3.h # # BitKeeper/deleted/.del-isense.h~8b0f8df2b84cc754 # 2004/08/16 18:50:00-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/isense.h # # BitKeeper/deleted/.del-isense.c~2fac8f7afc4989b9 # 2004/08/16 18:50:00-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/isense.c # # BitKeeper/deleted/.del-ascq_tbl.sh~8af7d761d0045c8a # 2004/08/16 18:50:00-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/ascq_tbl.sh # # BitKeeper/deleted/.del-ascq_tbl.c~104e726976d7da17 # 2004/08/16 18:49:59-04:00 jejb@mulgrave.(none) +0 -0 # Delete: drivers/message/fusion/ascq_tbl.c # # ChangeSet # 2004/08/16 15:32:17-07:00 davem@nuts.davemloft.net # [TIGON3]: Mention that firmware is copyrighted by Broadcom. # # drivers/net/tg3.c # 2004/08/16 15:32:01-07:00 davem@nuts.davemloft.net +3 -0 # [TIGON3]: Mention that firmware is copyrighted by Broadcom. # # ChangeSet # 2004/08/16 10:56:35-07:00 trini@kernel.crashing.org # ppc32: Correct the output of /proc/interrupts on PReP. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:56:27-07:00 trini@kernel.crashing.org +7 -0 # This makes the /proc/interrupts display the correct edge/level # indicator for each interrupt. This is purely cosmetic, but does # reduce confusion. # # ChangeSet # 2004/08/16 10:53:48-07:00 trini@kernel.crashing.org # ppc32: The planar id is only 1 byte, so only display that much. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_setup.c # 2004/08/16 10:53:39-07:00 trini@kernel.crashing.org +1 -1 # The planar id is only a byte, so why waste 8 characters displaying # it? # # ChangeSet # 2004/08/16 10:52:25-07:00 trini@kernel.crashing.org # ppc32: Fixup the OpenPIC code for older implementations. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # include/asm-ppc/open_pic.h # 2004/08/16 10:52:16-07:00 trini@kernel.crashing.org +1 -1 # Some older E20/E30 machines have a very old implementation of the # OpenPIC which trips up the existing ibm_prep_init() function. This # adds support for it. It also changes the OPENPIC_VEC_SPURIOUS # constant to work around the buggy OpenPIC in those machines. # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:52:16-07:00 trini@kernel.crashing.org +11 -4 # Some older E20/E30 machines have a very old implementation of the # OpenPIC which trips up the existing ibm_prep_init() function. This # adds support for it. It also changes the OPENPIC_VEC_SPURIOUS # constant to work around the buggy OpenPIC in those machines. # # ChangeSet # 2004/08/16 10:48:13-07:00 trini@kernel.crashing.org # ppc32: Add support for PCIBridgeRS6K to prep_find_bridges(). # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:48:04-07:00 trini@kernel.crashing.org +2 -1 # This adds support for the "PCIBridgeRS6K" bridge type in residual # data to prep_find_bridges() - this is for the 7043-240. # # ChangeSet # 2004/08/16 10:43:48-07:00 trini@kernel.crashing.org # ppc32: Use residual data to determine the addr to pass i8259_init() # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # include/asm-ppc/residual.h # 2004/08/16 10:43:39-07:00 trini@kernel.crashing.org +1 -0 # This adds a function to use the residual data to determine the # address to pass to i8259_init(). # # arch/ppc/platforms/residual.c # 2004/08/16 10:43:39-07:00 trini@kernel.crashing.org +33 -0 # This adds a function to use the residual data to determine the # address to pass to i8259_init(). # # arch/ppc/platforms/prep_setup.c # 2004/08/16 10:43:39-07:00 trini@kernel.crashing.org +6 -0 # This adds a function to use the residual data to determine the # address to pass to i8259_init(). # # ChangeSet # 2004/08/16 10:40:01-07:00 trini@kernel.crashing.org # ppc32: On PReP, allow for residual data to provide IRQ level/edge info # # This adds a function to determine the 8259 level/edge mask word. # With this function we can now (in theory) support any IBM PReP # machine. We therefore add a little bit more code to fallback # to using residual data if we don't recognise the machine. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # include/asm-ppc/residual.h # 2004/08/16 10:39:52-07:00 trini@kernel.crashing.org +1 -0 # This adds a function to determine the 8259 level/edge mask word. # With this function we can now (in theory) support any IBM PReP # machine. We therefore add a little bit more code to fallback # to using residual data if we don't recognise the machine. # # arch/ppc/platforms/residual.c # 2004/08/16 10:39:52-07:00 trini@kernel.crashing.org +30 -0 # This adds a function to determine the 8259 level/edge mask word. # With this function we can now (in theory) support any IBM PReP # machine. We therefore add a little bit more code to fallback # to using residual data if we don't recognise the machine. # # arch/ppc/platforms/prep_setup.c # 2004/08/16 10:39:52-07:00 trini@kernel.crashing.org +18 -1 # This adds a function to determine the 8259 level/edge mask word. # With this function we can now (in theory) support any IBM PReP # machine. We therefore add a little bit more code to fallback # to using residual data if we don't recognise the machine. # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:39:52-07:00 trini@kernel.crashing.org +18 -4 # This adds a function to determine the 8259 level/edge mask word. # With this function we can now (in theory) support any IBM PReP # machine. We therefore add a little bit more code to fallback # to using residual data if we don't recognise the machine. # # ChangeSet # 2004/08/16 10:35:18-07:00 trini@kernel.crashing.org # ppc32: On PReP, use residual data for PCI dev -> IRQ, and use it. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # include/asm-ppc/residual.h # 2004/08/16 10:35:09-07:00 trini@kernel.crashing.org +7 -0 # This adds a function to use the residual data to determine the IRQ # for a given PCI device, and changes prep_pcibios_fixup() to use it. # # arch/ppc/platforms/residual.c # 2004/08/16 10:35:09-07:00 trini@kernel.crashing.org +60 -0 # This adds a function to use the residual data to determine the IRQ # for a given PCI device, and changes prep_pcibios_fixup() to use it. # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:35:09-07:00 trini@kernel.crashing.org +37 -23 # This adds a function to use the residual data to determine the IRQ # for a given PCI device, and changes prep_pcibios_fixup() to use it. # # ChangeSet # 2004/08/16 10:32:34-07:00 trini@kernel.crashing.org # # This allows use of the IBM status LED if it's found in the residual # data, plus a couple of other bells and whistles. It removes the # 140-specific code. # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # arch/ppc/platforms/prep_setup.c # 2004/08/16 10:32:25-07:00 trini@kernel.crashing.org +109 -7 # This allows use of the IBM status LED if it's found in the residual # data, plus a couple of other bells and whistles. It removes the # 140-specific code. # # ChangeSet # 2004/08/16 10:26:23-07:00 trini@kernel.crashing.org # ppc32: Introduce a have_residual_data macro and switch to it. # # This is mainly to avoid my additions adding loads of ugly # #ifdef CONFIG_RESIDUAL_DATA sections. # # Signed-off-by: Leigh Brown # Signed-off-by: Tom Rini # # include/asm-ppc/residual.h # 2004/08/16 10:26:14-07:00 trini@kernel.crashing.org +7 -0 # Introduce have_residual_data macro and change existing code to # use it. This is mainly to avoid my additions adding loads of # ugly #ifdef CONFIG_RESIDUAL_DATA sections. # # arch/ppc/platforms/residual.c # 2004/08/16 10:26:14-07:00 trini@kernel.crashing.org +5 -5 # Introduce have_residual_data macro and change existing code to # use it. This is mainly to avoid my additions adding loads of # ugly #ifdef CONFIG_RESIDUAL_DATA sections. # # arch/ppc/platforms/prep_setup.c # 2004/08/16 10:26:14-07:00 trini@kernel.crashing.org +30 -35 # Introduce have_residual_data macro and change existing code to # use it. This is mainly to avoid my additions adding loads of # ugly #ifdef CONFIG_RESIDUAL_DATA sections. # # arch/ppc/platforms/prep_pci.c # 2004/08/16 10:26:14-07:00 trini@kernel.crashing.org +40 -41 # Introduce have_residual_data macro and change existing code to # use it. This is mainly to avoid my additions adding loads of # ugly #ifdef CONFIG_RESIDUAL_DATA sections. # # ChangeSet # 2004/08/16 09:13:40-07:00 trini@kernel.crashing.org # ppc32: Fix MPC8260 with an initrd and no root=/dev/ram0 # # Signed-off-by: Tom Rini # # arch/ppc/syslib/m8260_setup.c # 2004/08/16 09:13:31-07:00 trini@kernel.crashing.org +4 -0 # Fix the initrd case. # # ChangeSet # 2004/08/16 09:08:44-07:00 trini@kernel.crashing.org # [PPC32] Default to conswitchp=&dummy_con if DUMMY_CONSOLE. # # Signed-off-by: Tom Rini # # arch/ppc/syslib/ppc4xx_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/spruce.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -5 # - Don't manually set conswitchp. # # arch/ppc/platforms/sandpoint.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/prpmc800.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/prpmc750.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/prep_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -2 # - Only set conswitchp if VGA_CONSOLE. # # arch/ppc/platforms/pplus.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -2 # - Only set conswitchp if VGA_CONSOLE. # # arch/ppc/platforms/pmac_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -3 # - Don't manually set conswitchp. # # arch/ppc/platforms/pcore.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/mvme5100_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/mcpn765.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/lopec_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -3 # - Don't manually set conswitchp. # # arch/ppc/platforms/k2.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/chrp_setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -7 # - Don't manually set conswitchp. # # arch/ppc/platforms/85xx/sbc8560.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -3 # - Don't manually set conswitchp. # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/85xx/mpc8540_ads.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/4xx/ocotea.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/platforms/4xx/ebony.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -4 # - Don't manually set conswitchp. # # arch/ppc/kernel/setup.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +4 -0 # - By default, set conswitchp to dummy_con, if DUMMY_CONSOLE. # # arch/ppc/amiga/config.c # 2004/08/16 09:04:08-07:00 trini@kernel.crashing.org +0 -3 # - Don't manually set conswitchp. # # ChangeSet # 2004/08/16 08:57:02-07:00 trini@kernel.crashing.org # Merge kernel.crashing.org:/home/trini/work/kernel/pristine/linux-2.6 # into kernel.crashing.org:/home/trini/work/kernel/pristine/for-linus-ppc # # arch/ppc/syslib/Makefile # 2004/08/16 08:56:56-07:00 trini@kernel.crashing.org +0 -0 # Auto merged # # ChangeSet # 2004/08/15 11:03:31+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/pci/mixart/mixart.c # 2004/08/15 11:03:11+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/emu10k1/emuproc.c # 2004/08/15 11:03:11+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/cs46xx/cs46xx_lib.c # 2004/08/15 11:03:11+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/cs4281.c # 2004/08/15 11:03:11+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/gus/gus_mem_proc.c # 2004/08/15 11:03:10+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/drivers/opl4/opl4_proc.c # 2004/08/15 11:03:10+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/info.c # 2004/08/15 11:03:10+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/info.h # 2004/08/15 11:03:10+02:00 perex@suse.cz +0 -0 # Auto merged # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/08/15 11:03:10+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/15 10:48:18+02:00 perex@suse.cz # version.h: # ALSA 1.0.6 # # include/sound/version.h # 2004/08/15 10:46:47+02:00 perex@suse.cz +2 -2 # ALSA 1.0.6 # # ChangeSet # 2004/08/15 10:43:26+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # add support for Yamaha CVP-301, CVP-303, CVP-305, CVP-307, CVP-309, # CVP-309GP, PSR-1500, PSR-3000, ELS-01, ELS-01C, PSR-295, PSR-293, # DGX-205, DGX-203, DGX-305, DGX-505, DGP-7, DGP-5, PM5D, DME64N, # DME24N, DTX, UB99 # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/08/12 04:30:11+02:00 perex@suse.cz +30 -0 # ALSA CVS update # D:2004/08/12 10:30:11 # C:USB generic driver # F:usb/usbquirks.h:1.35->1.36 # L:add support for Yamaha CVP-301, CVP-303, CVP-305, CVP-307, CVP-309, # L:CVP-309GP, PSR-1500, PSR-3000, ELS-01, ELS-01C, PSR-295, PSR-293, # L:DGX-205, DGX-203, DGX-305, DGX-505, DGP-7, DGP-5, PM5D, DME64N, # L:DME24N, DTX, UB99 # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/15 10:42:34+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Add more timeout to avoid not respond messages # # Signed-off-by: Jaroslav Kysela # # sound/pci/ac97/ac97_codec.c # 2004/08/11 13:51:58+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/11 19:51:58 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.143->1.144 # L:Add more timeout to avoid not respond messages # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/15 10:37:55+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Fixed cut-n-paste typo # # Signed-off-by: Jaroslav Kysela # # sound/core/pcm_native.c # 2004/08/11 03:45:20+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/11 09:45:20 # C:PCM Midlevel # F:core/pcm_native.c:1.103->1.104 # L:Fixed cut-n-paste typo # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/15 10:36:25+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Don't use mute bit in REC_GAIN register during tests. # We have at least one case when the mute bit is zero. # # Signed-off-by: Jaroslav Kysela # # sound/pci/ac97/ac97_codec.c # 2004/08/10 06:19:16+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/08/10 12:19:16 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.142->1.143 # L:Don't use mute bit in REC_GAIN register during tests. # L:We have at least one case when the mute bit is zero. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/15 10:34:50+02:00 perex@suse.cz # ALSA CVS update # Intel8x0-modem driver # Added SiS, NVidia modem descriptions # # Signed-off-by: Jaroslav Kysela # # sound/pci/intel8x0m.c # 2004/08/10 05:11:17+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/10 11:11:17 # C:Intel8x0-modem driver # F:pci/intel8x0m.c:1.17->1.18 # L:Added SiS, NVidia modem descriptions # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/15 10:33:29+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Serialize runtime->status->state access # # Signed-off-by: Jaroslav Kysela # # sound/core/pcm_native.c # 2004/08/10 04:28:45+02:00 perex@suse.cz +22 -3 # ALSA CVS update # D:2004/08/10 10:28:45 # C:PCM Midlevel # F:core/pcm_native.c:1.102->1.103 # L:Serialize runtime->status->state access # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/14 19:04:09-04:00 hch@lst.de # [PATCH] switch sd numbering to idr # # Switch sd.c device number allocation to use idr, this limits memory # usage for lowend setups and highend setups are only limited by the # available names now. # # Signed-off-by: James Bottomley # # drivers/scsi/sd.c # 2004/08/14 09:46:26-04:00 hch@lst.de +26 -33 # switch sd numbering to idr # # ChangeSet # 2004/08/14 19:02:17-04:00 jejb@mulgrave.(none) # AUTOSENSE bug in NCR5380.c # # From: Kenn Humborg # # round line 2470 in NCR5380.c, if a command fails, and AUTOSENSE is on, # the current command is converted into a REQUEST_SENSE command and # put at the top of the request queue. Part of this setup, is setting # up cmd->SCp to point at the sense_buffer, so that the received sense # data goes straight into the sense buffer. # # Around line 1730, NCR5380_select() calls initialize_SCp() which ends # up clobbering cmd->SCp, and the sense data get written into the # original request buffer. # # This is what happens if cmd->use_sg = 0. I haven't looked at what # happens if use_sg is non-zero, but I expect the effect will be the same. # # Signed-off-by: James Bottomley # # drivers/scsi/NCR5380.c # 2004/08/14 19:01:06-04:00 jejb@mulgrave.(none) +3 -2 # AUTOSENSE bug in NCR5380.c # # ChangeSet # 2004/08/14 18:50:45-04:00 markh@osdl.org # [PATCH] aacraid driver update # # Here are some changes from Adaptec for the AACRAID driver. # # Change the pae_support flag to dac_support. This was suggested sometime # last year and never made it in. # Fix some cast problems in pci_set_dma_mask. Was casting the mask to # dma_addr_t when it should be a u64. # Fix SCp.ptr problem, should be SCp.dma_handle. # # Applies to the scsi-misc bk tree. # # Signed-off by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/linit.c # 2004/08/09 18:07:34-04:00 markh@osdl.org +0 -9 # aacraid driver update # # drivers/scsi/aacraid/commctrl.c # 2004/08/09 18:07:39-04:00 markh@osdl.org +1 -1 # aacraid driver update # # drivers/scsi/aacraid/aacraid.h # 2004/08/10 11:12:00-04:00 markh@osdl.org +2 -5 # aacraid driver update # # drivers/scsi/aacraid/aachba.c # 2004/08/10 12:26:16-04:00 markh@osdl.org +52 -19 # aacraid driver update # # ChangeSet # 2004/08/14 18:28:32-04:00 praka@pobox.com # [PATCH] Re: 2.6.8-rc3-mm2: Debug: sleeping function called from invalid # # > Andrew Vasquez wrote: # > # > > # > >This allocation should be done with GFP_ATOMIC flags. The attached # > >patch should apply cleanly to any recent kernel # > > # > # > and seems to work fine. # > # # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_os.c # 2004/08/09 19:48:29-04:00 praka@pobox.com +1 -1 # Re: 2.6.8-rc3-mm2: Debug: sleeping function called from invalid # # ChangeSet # 2004/08/14 18:26:58-04:00 bunk@fs.tum.de # [PATCH] SCSI gdth: kill #define __devinitdata # # I got the following warning in 2.6.8-rc3-mm2: # # <-- snip --> # # ... # CC drivers/scsi/gdth.o # drivers/scsi/gdth.c:622:1: warning: "__devinitdata" redefined # In file included from include/linux/moduleparam.h:4, # from include/linux/module.h:20, # from drivers/scsi/gdth.c:375: # include/linux/init.h:227:1: warning: this is the location of the # previous definition # ... # # <-- snip --> # # # The #define in question seems bogus, and the following patch simply # removes it: # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/gdth.c # 2004/08/09 15:03:02-04:00 bunk@fs.tum.de +0 -3 # SCSI gdth: kill #define __devinitdata # # ChangeSet # 2004/08/14 18:25:08-04:00 markh@osdl.org # [PATCH] aacraid patch for new device support # # Here is a patch from Adaptec for new adapter support. # # Signed-off-by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/linit.c # 2004/08/05 12:55:12-04:00 markh@osdl.org +87 -67 # aacraid patch for new device support # # drivers/scsi/aacraid/README # 2004/08/05 12:56:12-04:00 markh@osdl.org +11 -3 # aacraid patch for new device support # # ChangeSet # 2004/08/14 18:11:42-04:00 brking@us.ibm.com # [PATCH] ipr: replace schedule_timeout() with msleep() # # From: Nishanth Aravamudan # Subject: [PATCH] scsi/ipr: replace schedule_timeout() with msleep() # Description: Use msleep() instead of schedule_timeout() to # guarantee the task delays for the desired time. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:37-04:00 brking@us.ibm.com +1 -1 # ipr: replace schedule_timeout() with msleep() # # ChangeSet # 2004/08/14 18:11:10-04:00 brking@us.ibm.com # [PATCH] ipr: Don't log adapter shutdown error response code # # The following patch adds an adapter response code to the # table in the driver to prevent an error from being logged # when this response is received. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:32-04:00 brking@us.ibm.com +2 -0 # ipr: Don't log adapter shutdown error response code # # ChangeSet # 2004/08/14 18:10:39-04:00 brking@us.ibm.com # [PATCH] ipr: Set allow_restart for disk devices only # # This fixes ipr to only allow eh initiated start_unit commands # following erp to disk devices. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:33-04:00 brking@us.ibm.com +2 -2 # ipr: Set allow_restart for disk devices only # # ChangeSet # 2004/08/14 18:09:35-04:00 brking@us.ibm.com # [PATCH] ipr: Dead adapter I/O hang fix # # The following patch fixes a hang in i/o that could occur if an # adapter was ever declared "dead" by the ipr driver due to repeated # failed attempts to revive the card. The patch now allows ipr to fail # new commands when in this state rather than endlessly return # SCSI_MLQUEUE_HOST_BUSY. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:30-04:00 brking@us.ibm.com +1 -1 # ipr: Dead adapter I/O hang fix # # ChangeSet # 2004/08/14 18:08:42-04:00 brking@us.ibm.com # [PATCH] ipr: Sparse warnings fixes # # From: Mika Kukkonen # The following patch fixes some sparse warnings. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:26-04:00 brking@us.ibm.com +6 -4 # ipr: Sparse warnings fixes # # ChangeSet # 2004/08/14 18:08:08-04:00 brking@us.ibm.com # [PATCH] ipr: Properly enable/disable TCQ # # This patch correctly enables tagged command queuing for the ipr driver. # I had misinterpreted scsi_mid_low_api.txt. The following patch has the # appropriate scsi_activate_tcq/scsi_deactivate_tcq calls. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:29-04:00 brking@us.ibm.com +4 -7 # ipr: Properly enable/disable TCQ # # ChangeSet # 2004/08/14 18:07:31-04:00 brking@us.ibm.com # [PATCH] ipr: Fix assorted dma_addr_t typing errors # # From: Alan Cox # Subject: PATCH: Fix assorted dma_addr_t typing errors in ipr driver # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:24-04:00 brking@us.ibm.com +7 -5 # ipr: Fix assorted dma_addr_t typing errors # # drivers/scsi/ipr.c # 2004/08/04 18:17:24-04:00 brking@us.ibm.com +1 -1 # ipr: Fix assorted dma_addr_t typing errors # # ChangeSet # 2004/08/14 18:06:53-04:00 brking@us.ibm.com # [PATCH] ipr: New PCI IDs # # Add a couple new devices supported by the ipr device driver. This patch # has already been sent to pciids-devel@lists.sourceforge.net. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # include/linux/pci_ids.h # 2004/08/04 10:57:34-04:00 brking@us.ibm.com +1 -0 # ipr: New PCI IDs # # drivers/pci/pci.ids # 2004/08/04 10:57:34-04:00 brking@us.ibm.com +5 -0 # ipr: New PCI IDs # # ChangeSet # 2004/08/14 18:04:01-04:00 brking@us.ibm.com # [PATCH] ipr: Add maintainers email address to comment block # # The following patch adds my email address to the block comment # at the start of each file of the ipr driver to make it easier to find. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:25-04:00 brking@us.ibm.com +1 -1 # ipr: Add maintainers email address to comment block # # drivers/scsi/ipr.c # 2004/08/04 18:17:25-04:00 brking@us.ibm.com +1 -1 # ipr: Add maintainers email address to comment block # # ChangeSet # 2004/08/14 18:03:26-04:00 brking@us.ibm.com # [PATCH] ipr: Use kref instead of a kobject # # The following patch converts ipr to use a kref rather than a kobject to # do reference counting on an internal data structure. The added overhead # of a kobject is not needed. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:36-04:00 brking@us.ibm.com +2 -1 # ipr: Use kref instead of a kobject # # drivers/scsi/ipr.c # 2004/08/04 18:17:36-04:00 brking@us.ibm.com +10 -15 # ipr: Use kref instead of a kobject # # ChangeSet # 2004/08/14 18:02:52-04:00 brking@us.ibm.com # [PATCH] ipr: minor fixes and assorted nit # # From: Francois Romieu # Subject: [PATCH 2.6.7-mm3] ipr: minor fixes and assorted nit # # - balance pci_enable_device() with pci_disable_device() where appropriate; # - pci_release_regions() replaces release_mem_region(); # - ipr_alloc_mem() can not simply issue a call to ipr_free_mem() when # something goes wrong as it would lead to pci_free_consistent() of # unset data. Let ipr_alloc_mem() carefully release whatever it has # allocated instead; # - no need to memset(..., 0, ...) an area returned by pci_alloc_consistent; # - ipr_probe_ioa: # + DMA_32BIT_MASK for all; # + error path rework (includes bug fix when ipr_alloc_mem fails); # - ipr_init() can fail: return adequate status code. # # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:34-04:00 brking@us.ibm.com +62 -42 # ipr: minor fixes and assorted nit # # ChangeSet # 2004/08/14 18:02:14-04:00 brking@us.ibm.com # [PATCH] ipr: New adapter support # # This patch adds support for 2 new ipr adapters. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:39-04:00 brking@us.ibm.com +2 -0 # ipr: New adapter support # # drivers/scsi/ipr.c # 2004/08/04 18:17:39-04:00 brking@us.ibm.com +7 -1 # ipr: New adapter support # # ChangeSet # 2004/08/14 18:01:31-04:00 brking@us.ibm.com # [PATCH] ipr: Properly retry aborted reponse # # The ipr device driver runs tagged queuing with QERR=1. When a check # condition occurs on a device running tagged queuing, the other queued # commands get aborted by the ipr driver and will be returned by the # adapter with the IPR_IOASC_ABORTED_CMD_TERM_BY_HOST response. These # commands should be retried by the midlayer and their retry counter not # decremented. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:41-04:00 brking@us.ibm.com +1 -1 # ipr: Properly retry aborted reponse # # ChangeSet # 2004/08/14 18:00:45-04:00 brking@us.ibm.com # [PATCH] ipr: Bump driver version. # # Bump driver version. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:43-04:00 brking@us.ibm.com +2 -2 # ipr: Bump driver version. # # ChangeSet # 2004/08/14 17:58:14-04:00 brking@us.ibm.com # [PATCH] ipr: Use cancel all instead of abort task # # Currently, ABORT_TASK does not work properly on ipr adapters. It results in # timeouts and eh ends up getting escalated to eh_host_reset to recover. # The adapters are supposed to be fixed to properly handle this at some # point in the future, but until that updated microcode is available, # we need to send a cancel all to the device instead. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.h # 2004/08/04 18:17:40-04:00 brking@us.ibm.com +0 -1 # ipr: Use cancel all instead of abort task # # drivers/scsi/ipr.c # 2004/08/04 18:17:40-04:00 brking@us.ibm.com +3 -9 # ipr: Use cancel all instead of abort task # # ChangeSet # 2004/08/14 17:57:27-04:00 brking@us.ibm.com # [PATCH] ipr: Use sector_t type in sector_div call # # From: Pawel Sikora # The first parameter for sector_div must be sector_t rather than int. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/ipr.c # 2004/08/04 18:17:28-04:00 brking@us.ibm.com +2 -1 # ipr: Use sector_t type in sector_div call # # ChangeSet # 2004/08/14 17:52:21-04:00 g.liakhovetski@gmx.de # [PATCH] tmscsim: (CH) Fix error handling # # I might be wrong, but it looks like the attached patch has still not been # applied, although it is pretty important - it fixes error handling in # tmscsim. E.g., it was reported, that this patch fixes a problem with # tmscsim in 2.6.7 with a SCSI-3 scanner, that doesn't support REPORT LUNS # command. # # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.c # 2004/07/04 18:35:28-04:00 g.liakhovetski@gmx.de +66 -216 # tmscsim: (CH) Fix error handling # # BitKeeper/deleted/.del-dc390.h~c12819f78a10ccd # 2004/08/14 17:51:26-04:00 g.liakhovetski@gmx.de +0 -0 # Delete: drivers/scsi/dc390.h # # ChangeSet # 2004/08/14 17:47:09-04:00 christian@borntraeger.net # [PATCH] Add bus dependencies to two scsi drivers # # Two scsi drivers do not compile on systems without ISA/PCI. Therefore # allyesconfig breaks on hardware like s390. # # Signed-off-by: Christian Bornträger # Signed-off-by: James Bottomley # # drivers/scsi/Kconfig # 2004/08/04 10:10:34-04:00 christian@borntraeger.net +2 -2 # Add bus dependencies to two scsi drivers # # ChangeSet # 2004/08/14 14:13:34-05:00 jejb@raven.il.steeleye.com # Merge # # include/linux/dma-mapping.h # 2004/08/14 14:12:54-05:00 jejb@raven.il.steeleye.com +0 -0 # SCCS merged # # include/linux/device.h # 2004/08/14 14:08:12-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # ChangeSet # 2004/08/14 13:59:17-05:00 jejb@raven.il.steeleye.com # lib/bitmap.c: fix incorrect use of BITS_TO_LONGS() # # Bug spotted by: Ian Molton # # BITS_TO_LONGS() can't be used to derive an index # into a bitmap array. # # Also put a BUG_ON() for the pages > BITS_PER_LONG case # we don't cope with. # # lib/bitmap.c # 2004/08/14 13:58:32-05:00 jejb@raven.il.steeleye.com +9 -3 # Fix incorrect use of BITS_TO_LONGS() # # ChangeSet # 2004/08/13 16:34:31-07:00 trini@kernel.crashing.org # ppc32: Redo the MPC82xx set of call-backs. # # This removes at lot of the nearly empty files, and allows for # boards to do the board-specific init stuff they need in their own # file still. # # arch/ppc/syslib/m8260_setup.c # 2004/08/13 16:33:54-07:00 trini@kernel.crashing.org +18 -35 # - Re-order and cleanup include list. # - Print out vendor and machine in m8260_setup_arch, as that's # what most of the board-specific versions did. # - Simplify getting bd_t infos into one line. # - Rename m8260_init() to platform_init(), add m82xx_board_init() # weak version and call it. # - Remove some extraneous ppc_md.foo = NULLs. # # arch/ppc/platforms/tqm8260_setup.c # 2004/08/13 16:33:54-07:00 trini@kernel.crashing.org +3 -22 # - Cleanup include list. # - No need for callback_setup_arch(). # - Rename platform_init into m82xx_board_init(). # # arch/ppc/platforms/sbc82xx.c # 2004/08/13 16:33:54-07:00 trini@kernel.crashing.org +2 -20 # - Cleanup include list. # - No need for callback_setup_arch(). # - Rename platform_init into m82xx_board_init(). # # arch/ppc/platforms/pq2ads.c # 2004/08/13 16:33:54-07:00 trini@kernel.crashing.org +4 -24 # - No need for _setup_arch anymore. Move that work into # m82xx_board_init(). # - Cleanup include list. # # arch/ppc/platforms/Makefile # 2004/08/13 16:33:53-07:00 trini@kernel.crashing.org +0 -2 # est8260_setup.c and rpx8260.c are gone. # # ChangeSet # 2004/08/13 16:24:02-07:00 trini@kernel.crashing.org # ppc32: Small cleanups to the CPM2 PIC code. # # Signed-off-by: Tom Rini # # arch/ppc/syslib/cpm2_pic.h # 2004/08/13 16:23:50-07:00 trini@kernel.crashing.org +1 -7 # - Remove externs for non-existant functions # - Don't include anything in here. # # arch/ppc/syslib/cpm2_pic.c # 2004/08/13 16:23:50-07:00 trini@kernel.crashing.org +12 -13 # - Re-arrange and cleanup include list. # - Remove old code. # # BitKeeper/deleted/.del-rpx8260.c~f69dcf6ff5e2256 # 2004/08/13 15:40:47-07:00 trini@kernel.crashing.org +1 -18 # Delete: arch/ppc/platforms/rpx8260.c # # BitKeeper/deleted/.del-est8260_setup.c~d56081c82a335303 # 2004/08/13 15:40:47-07:00 trini@kernel.crashing.org +1 -18 # Delete: arch/ppc/platforms/est8260_setup.c # # ChangeSet # 2004/08/13 14:03:42-07:00 trini@kernel.crashing.org # ppc32: Re-work the cpuinfo hooks on MPC82xx # # Now we define CPUINFO_VENDOR and CPUINFO_MACHINE in one callback # instead of using show_cpuinfo and show_percpuinfo call-backs to # print constant per-board information. # # Signed-off-by: Tom Rini # # arch/ppc/syslib/m8260_setup.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +15 -10 # - Correct file location. # - Convert m8260_show_percpuinfo into m8260_show_cpuinfo, making # use of CPUINFO_{VENDOR,MACHINE} defines. # # arch/ppc/platforms/tqm8260_setup.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +0 -16 # Remove show_cpuinfo. # # arch/ppc/platforms/tqm8260.h # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +4 -0 # Add CPUINFO defines. # # arch/ppc/platforms/sbc82xx.h # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +4 -0 # Add CPUINFO defines. # # arch/ppc/platforms/sbc82xx.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +0 -18 # Remove show_cpuinfo. # # arch/ppc/platforms/rpx8260.h # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +7 -0 # Add CPUINFO defines and the correct BOOTROM_RESTART_ADDR. # # arch/ppc/platforms/rpx8260.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +0 -20 # Remove show_cpuinfo. # # arch/ppc/platforms/pq2ads.h # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +4 -0 # Add CPUINFO defines. # # arch/ppc/platforms/pq2ads.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +0 -20 # Remove show_cpuinfo. # # arch/ppc/platforms/est8260_setup.c # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +0 -20 # Remove show_cpuinfo. # # arch/ppc/platforms/est8260.h # 2004/08/13 14:03:33-07:00 trini@kernel.crashing.org +3 -0 # Add CPUINFO defines. # # ChangeSet # 2004/08/13 12:46:51-04:00 rddunlap@osdl.org # [PATCH] NCR53c406a: fix __setup function # # Use correct __setup function type and parameters. # Return result from __setup function. # # Signed-off-by: Randy Dunlap # Signed-off-by: James Bottomley # # drivers/scsi/NCR53c406a.c # 2004/08/04 00:28:44-04:00 rddunlap@osdl.org +6 -4 # NCR53c406a: fix __setup function # # ChangeSet # 2004/08/13 12:25:56-04:00 rddunlap@osdl.org # [PATCH] fd_mcs: fix __setup function # # Use correct __setup function type and parameters. # Return result from __setup function. # Don't confuse and . # # Signed-off-by: Randy Dunlap # Signed-off-by: James Bottomley # # drivers/scsi/fd_mcs.c # 2004/08/04 00:30:02-04:00 rddunlap@osdl.org +7 -3 # fd_mcs: fix __setup function # # ChangeSet # 2004/08/13 12:21:53-04:00 bunk@fs.tum.de # [PATCH] SCSI nsp32.c: missing parts of inline removal patch # # The SCSI tree as included in 2.6.8-rc2-mm2 only removes the inline's # from the functions prototypes, but the part of my original patch that # also removes the inline's from the functions was lost. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/nsp32.c # 2004/07/15 18:37:26-04:00 bunk@fs.tum.de +2 -2 # SCSI nsp32.c: missing parts of inline removal patch # # ChangeSet # 2004/08/13 12:16:54-04:00 rddunlap@osdl.org # [PATCH] fix imm to build with IMM_DEBUG # # Fix imm for IMM_DEBUG (changed device id struct). # # Signed-off-by: Randy Dunlap # Signed-off-by: James Bottomley # # drivers/scsi/imm.c # 2004/07/31 18:33:37-04:00 rddunlap@osdl.org +1 -1 # fix imm to build with IMM_DEBUG # # ChangeSet # 2004/08/12 16:44:55-07:00 trini@kernel.crashing.org # PPC32: Update the Motorola MVME5100 support. # # Signed-off-by: Tom Rini # # include/asm-ppc/serial.h # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +1 -1 # s/mvme5100_serial.h/mvme5100.h/ # # arch/ppc/syslib/hawk_common.c # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +32 -0 # Add back hawk_mpic_init(pci_mem_offset). # # arch/ppc/platforms/mvme5100.h # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +22 -3 # Merge in mvme5100_serial.h # # arch/ppc/platforms/mvme5100.c # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +130 -61 # - Merge in mvme5100_pci.c # - Update openpic_initsenses based on documentation. # - s/pplus/hawk/ fixes # - Update openpic calls. # - Update _set_bat(). # # arch/ppc/platforms/Makefile # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +1 -1 # Just mvme5100.o now. # # arch/ppc/configs/mvme5100_defconfig # 2004/08/12 16:44:46-07:00 trini@kernel.crashing.org +245 -158 # Update. # # BitKeeper/deleted/.del-mvme5100_serial.h~5d40325917f50f1d # 2004/08/12 15:54:44-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/mvme5100_serial.h # # BitKeeper/deleted/.del-mvme5100_pci.c~e2b80b5ada902aca # 2004/08/12 15:54:44-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/mvme5100_pci.c # # arch/ppc/platforms/mvme5100.c # 2004/08/12 15:28:23-07:00 trini@kernel.crashing.org +0 -0 # Rename: arch/ppc/platforms/mvme5100_setup.c -> arch/ppc/platforms/mvme5100.c # # ChangeSet # 2004/08/12 15:19:38-07:00 trini@kernel.crashing.org # PPC32: Finish cleanup of platforms that just needed _serial.h merged. # # Signed-off-by: Tom Rini # # include/asm-ppc/serial.h # 2004/08/12 15:19:29-07:00 trini@kernel.crashing.org +3 -3 # Remove _serial from powerpmc250/prpmc750/prpmc800 # # arch/ppc/platforms/prpmc800.h # 2004/08/12 15:19:29-07:00 trini@kernel.crashing.org +22 -6 # Merge in _serial.h. # # arch/ppc/platforms/prpmc750.h # 2004/08/12 15:19:29-07:00 trini@kernel.crashing.org +18 -8 # Merge in _serial.h and remove extra #include. # # arch/ppc/platforms/powerpmc250.h # 2004/08/12 15:19:29-07:00 trini@kernel.crashing.org +15 -3 # Merge in _serial.h and remove extra #include. # # BitKeeper/deleted/.del-prpmc800_serial.h~ae077ff6a76997f0 # 2004/08/12 15:16:32-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/prpmc800_serial.h # # BitKeeper/deleted/.del-powerpmc250_serial.h~814b823ebe2f7f52 # 2004/08/12 15:16:32-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/powerpmc250_serial.h # # BitKeeper/deleted/.del-prpmc750_serial.h~897fda58b650902b # 2004/08/12 15:16:31-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/prpmc750_serial.h # # ChangeSet # 2004/08/12 12:57:22-07:00 trini@kernel.crashing.org # PPC32: Update the Motorola LoPEC support # # Signed-off-by: Tom Rini # # include/asm-ppc/serial.h # 2004/08/12 12:57:13-07:00 trini@kernel.crashing.org +1 -1 # s/lopec_serial.h/lopec.h/ # # arch/ppc/platforms/lopec.c # 2004/08/12 12:57:13-07:00 trini@kernel.crashing.org +97 -62 # - Merge in lopec_pci.c # - Take over maintainership. # - Update lopec_set_bat() # - Switch over to GEN550 (do-nothing in this case). # - Only set default ROOT_DEV if BLK_DEV_IDEDISK=y # # arch/ppc/platforms/Makefile # 2004/08/12 12:57:13-07:00 trini@kernel.crashing.org +1 -1 # We just have lopec.o now. # # arch/ppc/Kconfig # 2004/08/12 12:57:13-07:00 trini@kernel.crashing.org +2 -1 # Add LOPEC to the PPC_GEN550 list. # # BitKeeper/deleted/.del-lopec_pci.c~135676742c1bc14b # 2004/08/12 12:27:27-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/lopec_pci.c # # arch/ppc/platforms/lopec.h # 2004/08/12 12:27:25-07:00 trini@kernel.crashing.org +0 -0 # Rename: arch/ppc/platforms/lopec_serial.h -> arch/ppc/platforms/lopec.h # # arch/ppc/platforms/lopec.c # 2004/08/12 12:23:20-07:00 trini@kernel.crashing.org +0 -0 # Rename: arch/ppc/platforms/lopec_setup.c -> arch/ppc/platforms/lopec.c # # ChangeSet # 2004/08/12 12:16:07-07:00 trini@kernel.crashing.org # PPC32: Merge mcpn765_serial.h into mcpn765.h # # Signed-off-by: Tom Rini # # include/asm-ppc/serial.h # 2004/08/12 12:15:58-07:00 trini@kernel.crashing.org +1 -1 # s/mcpn765_serial/mcpn765/ # # arch/ppc/platforms/mcpn765.h # 2004/08/12 12:15:58-07:00 trini@kernel.crashing.org +47 -3 # Merge in mcpn765_serial.h # # arch/ppc/platforms/mcpn765.c # 2004/08/12 12:15:58-07:00 trini@kernel.crashing.org +0 -2 # Remove mcpn765_serial.h # # BitKeeper/deleted/.del-mcpn765_serial.h~fe2a17546689ebde # 2004/08/12 12:11:55-07:00 trini@kernel.crashing.org +0 -0 # Delete: arch/ppc/platforms/mcpn765_serial.h # # ChangeSet # 2004/08/12 11:24:21-07:00 trini@kernel.crashing.org # PPC32: Rename pq2ads_setup.c to pq2ads.c # # Signed-off-by: Tom Rini # # arch/ppc/platforms/pq2ads.c # 2004/08/12 11:24:11-07:00 trini@kernel.crashing.org +1 -1 # Rename pq2ads_setup.c to pq2ads.c # # arch/ppc/platforms/Makefile # 2004/08/12 11:24:11-07:00 trini@kernel.crashing.org +1 -1 # Rename pq2ads_setup.c to pq2ads.c # # arch/ppc/platforms/pq2ads.c # 2004/08/12 11:22:40-07:00 trini@kernel.crashing.org +0 -0 # Rename: arch/ppc/platforms/pq2ads_setup.c -> arch/ppc/platforms/pq2ads.c # # ChangeSet # 2004/08/10 14:49:28-07:00 thomas.koeller@baslerweb.com # [PATCH] Driver Core: fix minor class reference counting issue on the error path # # Signed-off-by: Thomas Koeller # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/10 14:47:24-07:00 olh@suse.de # [PATCH] export legacy pty info via sysfs # # You missed that one last year. # # # export the legacy pty/tty device nodes via sysfs, # so udev has a chance to create them if /dev is in tmpfs. # # Signed-off-by: Olaf Hering # Signed-off-by: Greg Kroah-Hartman # # drivers/char/tty_io.c # 2004/08/10 05:04:53-07:00 olh@suse.de +16 -6 # export legacy pty info via sysfs # # ChangeSet # 2004/08/06 14:18:50-07:00 rml@ximian.com # [PATCH] KOBJECT: add kobject_get_path # # Add a new kobject helper, kobject_get_path(), which is the greatest # function ever. # # Signed-Off-By: Robert Love # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/06 14:35:55+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/08/06 14:35:37+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/06 14:01:30+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # some other misc eq cleanups # # Signed-off-by: Jeff Muizelaar # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_eq.c # 2004/08/06 04:49:57+02:00 perex@suse.cz +42 -38 # ALSA CVS update # D:2004/08/06 10:49:57 # C:au88x0 driver # F:pci/au88x0/au88x0_eq.c:1.3->1.4 # L:some other misc eq cleanups # Signed-off-by: Jeff Muizelaar # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/06 14:00:50+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # Cleans up the equalizer code by converting some loops to proper for # loops and fixes the conditions for looping. # # Signed-off-by: Jeff Muizelaar # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_eq.c # 2004/08/06 04:49:00+02:00 perex@suse.cz +16 -64 # ALSA CVS update # D:2004/08/06 10:49:00 # C:au88x0 driver # F:pci/au88x0/au88x0_eq.c:1.2->1.3 # L:Cleans up the equalizer code by converting some loops to proper for # L:loops and fixes the conditions for looping. # Signed-off-by: Jeff Muizelaar # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/06 14:00:09+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # Fixed asXtalkGainsAllChan problem for the solid kernel build. # # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_xtalk.h # 2004/08/06 04:44:58+02:00 perex@suse.cz +1 -2 # ALSA CVS update # D:2004/08/06 10:44:58 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.9->1.10 # F:pci/au88x0/au88x0_xtalk.c:1.2->1.3 # F:pci/au88x0/au88x0_xtalk.h:1.2->1.3 # L:Fixed asXtalkGainsAllChan problem for the solid kernel build. # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_xtalk.c # 2004/08/06 04:44:58+02:00 perex@suse.cz +7 -1 # ALSA CVS update # D:2004/08/06 10:44:58 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.9->1.10 # F:pci/au88x0/au88x0_xtalk.c:1.2->1.3 # F:pci/au88x0/au88x0_xtalk.h:1.2->1.3 # L:Fixed asXtalkGainsAllChan problem for the solid kernel build. # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_a3d.c # 2004/08/06 04:44:58+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/06 10:44:58 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.9->1.10 # F:pci/au88x0/au88x0_xtalk.c:1.2->1.3 # F:pci/au88x0/au88x0_xtalk.h:1.2->1.3 # L:Fixed asXtalkGainsAllChan problem for the solid kernel build. # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/06 13:59:28+02:00 perex@suse.cz # ALSA CVS update # USB USX2Y # fix compilation on 2.2.x kernels # # Signed-off-by: Clemens Ladisch # # sound/usb/usx2y/usbusx2yaudio.c # 2004/08/05 04:46:20+02:00 perex@suse.cz +4 -3 # ALSA CVS update # D:2004/08/05 10:46:20 # C:USB USX2Y # F:usb/usx2y/usbusx2yaudio.c:1.1->1.2 # L:fix compilation on 2.2.x kernels # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/06 13:58:47+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver,KORG1212 driver # Fixed the compile warnings on 64bit architectures. # # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/08/04 10:17:29+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/04 16:17:28 # C:EMU10K1/EMU10K2 driver,KORG1212 driver # F:pci/emu10k1/emuproc.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.46->1.47 # L:Fixed the compile warnings on 64bit architectures. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2004/08/04 10:17:28+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/04 16:17:28 # C:EMU10K1/EMU10K2 driver,KORG1212 driver # F:pci/emu10k1/emuproc.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.46->1.47 # L:Fixed the compile warnings on 64bit architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/06 13:58:05+02:00 perex@suse.cz # ALSA CVS update # PCI drivers,Intel8x0-modem driver # Added the support of SIS7013 modem. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/08/04 05:15:48+02:00 perex@suse.cz +31 -18 # ALSA CVS update # D:2004/08/04 11:15:48 # C:PCI drivers,Intel8x0-modem driver # F:pci/Kconfig:1.30->1.31 # F:pci/intel8x0m.c:1.16->1.17 # L:Added the support of SIS7013 modem. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/Kconfig # 2004/08/04 05:15:48+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/08/04 11:15:48 # C:PCI drivers,Intel8x0-modem driver # F:pci/Kconfig:1.30->1.31 # F:pci/intel8x0m.c:1.16->1.17 # L:Added the support of SIS7013 modem. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/06 13:57:21+02:00 perex@suse.cz # ALSA CVS update # SoundFont,Common EMU synth # Fixed messy locks in soundfont support code. # # Removed hacky down_trylock() in the interrupt context, and check # the busy lock flag explicitly. # # Signed-off-by: Takashi Iwai # # sound/synth/emux/soundfont.c # 2004/08/04 05:12:58+02:00 perex@suse.cz +33 -19 # ALSA CVS update # D:2004/08/04 11:12:58 # C:SoundFont,Common EMU synth # F:include/soundfont.h:1.6->1.7 # F:synth/emux/emux_oss.c:1.10->1.11 # F:synth/emux/soundfont.c:1.12->1.13 # L:Fixed messy locks in soundfont support code. # L: # L:Removed hacky down_trylock() in the interrupt context, and check # L:the busy lock flag explicitly. # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_oss.c # 2004/08/04 05:12:58+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/08/04 11:12:58 # C:SoundFont,Common EMU synth # F:include/soundfont.h:1.6->1.7 # F:synth/emux/emux_oss.c:1.10->1.11 # F:synth/emux/soundfont.c:1.12->1.13 # L:Fixed messy locks in soundfont support code. # L: # L:Removed hacky down_trylock() in the interrupt context, and check # L:the busy lock flag explicitly. # Signed-off-by: Takashi Iwai # # include/sound/soundfont.h # 2004/08/04 05:12:58+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/08/04 11:12:58 # C:SoundFont,Common EMU synth # F:include/soundfont.h:1.6->1.7 # F:synth/emux/emux_oss.c:1.10->1.11 # F:synth/emux/soundfont.c:1.12->1.13 # L:Fixed messy locks in soundfont support code. # L: # L:Removed hacky down_trylock() in the interrupt context, and check # L:the busy lock flag explicitly. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/06 13:56:39+02:00 perex@suse.cz # ALSA CVS update # PPC PMAC driver # Removed non-functional 48kHz support from pmac driver. # # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/08/04 05:10:17+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/08/04 11:10:17 # C:PPC PMAC driver # F:ppc/pmac.c:1.37->1.38 # L:Removed non-functional 48kHz support from pmac driver. # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/04 11:31:57+02:00 perex@suse.cz # ALSA misc # - control.c - compilation fixes # - es1968.c - hw volume fix # # sound/pci/es1968.c # 2004/08/04 11:31:38+02:00 perex@suse.cz +0 -2 # Don't mute master volume - use mute path rather. # # sound/core/control.c # 2004/08/04 11:31:38+02:00 perex@suse.cz +1 -0 # Compilation fix. # # ChangeSet # 2004/08/03 20:19:18+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # Cleanup the private_data initialization # # Signed-off-by: Takashi Iwai # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_a3d.c # 2004/08/03 13:08:53+02:00 perex@suse.cz +4 -8 # ALSA CVS update # D:2004/08/03 19:08:53 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.6->1.7 # L:Cleanup the private_data initialization # Signed-off-by: Takashi Iwai # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/08/03 11:14:08-07:00 trini@kernel.crashing.org # [PPC32] Add a watchdog driver on PPC8xx. # # Signed-off-by: Andreas Oberritter # Signed-off-by: Tom Rini # # drivers/char/watchdog/mpc8xx_wdt.c # 2004/08/03 11:13:57-07:00 trini@kernel.crashing.org +164 -0 # # drivers/char/watchdog/mpc8xx_wdt.c # 2004/08/03 11:13:57-07:00 trini@kernel.crashing.org +0 -0 # BitKeeper file /home/trini/work/kernel/pristine/for-linus-ppc/drivers/char/watchdog/mpc8xx_wdt.c # # arch/ppc/syslib/m8xx_wdt.h # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +16 -0 # # arch/ppc/syslib/m8xx_wdt.c # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +99 -0 # # drivers/char/watchdog/Makefile # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +1 -0 # Add 8xx_WDT. # # drivers/char/watchdog/Kconfig # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +6 -0 # Add 8xx_WDT. # # arch/ppc/syslib/m8xx_wdt.h # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +0 -0 # BitKeeper file /home/trini/work/kernel/pristine/for-linus-ppc/arch/ppc/syslib/m8xx_wdt.h # # arch/ppc/syslib/m8xx_wdt.c # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +0 -0 # BitKeeper file /home/trini/work/kernel/pristine/for-linus-ppc/arch/ppc/syslib/m8xx_wdt.c # # arch/ppc/syslib/Makefile # 2004/08/03 11:13:56-07:00 trini@kernel.crashing.org +3 -1 # Add m8xx_wdt.o on CONFIG_8xx_WDT and CONFIG_8xx. # # ChangeSet # 2004/08/03 11:04:30-07:00 trini@kernel.crashing.org # [PPC32] Give PPC8xx a callback into board-specific code in # m8xx_setup_arch(). # # Signed-off-by: Andreas Oberritter # Signed-off-by: Tom Rini # # arch/ppc/syslib/m8xx_setup.c # 2004/08/03 11:04:21-07:00 trini@kernel.crashing.org +6 -0 # Add a hook to allow board-specific initalization to be performed # from m8xx_setup_arch(). # # ChangeSet # 2004/08/03 11:01:58-07:00 trini@kernel.crashing.org # [PPC32] Add a weak version of embed_config(). # # This allows boards with U-Boot to have a functional 'all' target. # # Signed-off-by: Andreas Oberritter # Signed-off-by: Tom Rini # # arch/ppc/boot/simple/misc-embedded.c # 2004/08/03 11:01:47-07:00 trini@kernel.crashing.org +8 -0 # Add a weak version of embed_config(). This allows boards with # U-Boot to have a functional 'all' target. # # ChangeSet # 2004/08/03 19:57:05+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # fix email address and license # # Signed-off-by: Clemens Ladisch # # sound/usb/usbmidi.c # 2004/08/03 10:24:22+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/08/03 16:24:22 # C:USB generic driver # F:usb/usbmidi.c:1.32->1.33 # L:fix email address and license # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/08/03 19:56:02+02:00 perex@suse.cz # ALSA CVS update # Documentation,Intel8x0 driver # Added buggy_irq module parameter to intel8x0 driver. # # On some (broken :) motherboards, unknown irq is triggered when the audio # is started. This this option, the irq handler returns IRQ_HANDLED for # such an irq, so that the irq line won't be disabled. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/08/03 10:17:02+02:00 perex@suse.cz +13 -11 # ALSA CVS update # D:2004/08/03 16:17:01 # C:Documentation,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.49->1.50 # F:pci/intel8x0.c:1.156->1.157 # L:Added buggy_irq module parameter to intel8x0 driver. # L: # L:On some (broken :) motherboards, unknown irq is triggered when the audio # L:is started. This this option, the irq handler returns IRQ_HANDLED for # L:such an irq, so that the irq line won't be disabled. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/08/03 10:17:01+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/08/03 16:17:01 # C:Documentation,Intel8x0 driver # F:Documentation/ALSA-Configuration.txt:1.49->1.50 # F:pci/intel8x0.c:1.156->1.157 # L:Added buggy_irq module parameter to intel8x0 driver. # L: # L:On some (broken :) motherboards, unknown irq is triggered when the audio # L:is started. This this option, the irq handler returns IRQ_HANDLED for # L:such an irq, so that the irq line won't be disabled. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/03 19:54:52+02:00 perex@suse.cz # ALSA CVS update # Documentation,USB,USB generic driver,USB USX2Y # Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # Driver written by Karsten Wiese # # The shared code is split from usbaudio as snd-usb-lib module. # Currently, only MIDI part is included there. In future, more # audio part will be shared, too. # # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usx2y.h # 2004/08/03 19:47:45+02:00 perex@suse.cz +49 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2yaudio.c # 2004/08/03 19:47:36+02:00 perex@suse.cz +1026 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2y.h # 2004/08/03 19:47:30+02:00 perex@suse.cz +61 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbusx2y.c # 2004/08/03 19:47:22+02:00 perex@suse.cz +434 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usbus428ctldefs.h # 2004/08/03 19:47:17+02:00 perex@suse.cz +108 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usX2Yhwdep.h # 2004/08/03 19:47:12+02:00 perex@suse.cz +6 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usX2Yhwdep.c # 2004/08/03 19:47:05+02:00 perex@suse.cz +275 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/usx2y.h # 2004/08/03 19:47:45+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usx2y.h # # sound/usb/usx2y/usbusx2yaudio.c # 2004/08/03 19:47:36+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usbusx2yaudio.c # # sound/usb/usx2y/usbusx2y.h # 2004/08/03 19:47:30+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usbusx2y.h # # sound/usb/usx2y/usbusx2y.c # 2004/08/03 19:47:22+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usbusx2y.c # # sound/usb/usx2y/usbus428ctldefs.h # 2004/08/03 19:47:17+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usbus428ctldefs.h # # sound/usb/usx2y/usX2Yhwdep.h # 2004/08/03 19:47:12+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usX2Yhwdep.h # # sound/usb/usx2y/usX2Yhwdep.c # 2004/08/03 19:47:05+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/usX2Yhwdep.c # # sound/usb/usbmidi.c # 2004/08/03 09:22:32+02:00 perex@suse.cz +10 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/Makefile # 2004/08/03 09:22:32+02:00 perex@suse.cz +6 -2 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/Kconfig # 2004/08/03 09:22:32+02:00 perex@suse.cz +10 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/08/03 09:22:32+02:00 perex@suse.cz +10 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/Makefile # 2004/08/03 19:46:59+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/08/03 15:22:32 # C:Documentation,USB,USB generic driver,USB USX2Y # F:Documentation/ALSA-Configuration.txt:1.48->1.49 # F:usb/Kconfig:1.4->1.5 # F:usb/Makefile:1.4->1.5 # F:usb/usbmidi.c:1.31->1.32 # F:usb/usx2y/Makefile:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.c:INITIAL->1.1 # F:usb/usx2y/usX2Yhwdep.h:INITIAL->1.1 # F:usb/usx2y/usbus428ctldefs.h:INITIAL->1.1 # F:usb/usx2y/usbusx2y.c:INITIAL->1.1 # F:usb/usx2y/usbusx2y.h:INITIAL->1.1 # F:usb/usx2y/usbusx2yaudio.c:INITIAL->1.1 # F:usb/usx2y/usx2y.h:INITIAL->1.1 # L:Added snd-usb-usx2y driver for Tascam US-122/224/428 support. # L:Driver written by Karsten Wiese # L: # L:The shared code is split from usbaudio as snd-usb-lib module. # L:Currently, only MIDI part is included there. In future, more # L:audio part will be shared, too. # Signed-off-by: Takashi Iwai # # sound/usb/usx2y/Makefile # 2004/08/03 19:46:59+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/usb/usx2y/Makefile # # ChangeSet # 2004/08/03 19:53:42+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Added the DXS whitelist entry for Acer Inspire 1353LM. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/08/02 09:24:38+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/08/02 15:24:38 # C:VIA82xx driver # F:pci/via82xx.c:1.116->1.117 # L:Added the DXS whitelist entry for Acer Inspire 1353LM. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/03 14:07:05+02:00 perex@suse.cz # From: Jaroslav Kysela # ALSA patch # Removed duplicate CK804_AUDIO from intel8x0.c # # sound/pci/intel8x0.c # 2004/08/03 14:06:31+02:00 perex@suse.cz +0 -4 # Removed duplicate CK804_AUDIO # # ChangeSet # 2004/08/03 08:40:38+02:00 perex@suse.cz # From: "Andrew Chew" # # This patch updates include/linux/pci_ids.h with the CK804 audio controller # ID, and adds the CK804 audio controller to the sound/pci/intel8x0.c audio # driver. # # Signed-off-by: Andrew Morton # # sound/pci/intel8x0.c # 2004/08/03 08:40:17+02:00 perex@suse.cz +4 -0 # From: "Andrew Chew" # # This patch updates include/linux/pci_ids.h with the CK804 audio controller # ID, and adds the CK804 audio controller to the sound/pci/intel8x0.c audio # driver. # # Signed-off-by: Andrew Morton # # include/linux/pci_ids.h # 2004/08/03 08:40:17+02:00 perex@suse.cz +1 -0 # From: "Andrew Chew" # # This patch updates include/linux/pci_ids.h with the CK804 audio controller # ID, and adds the CK804 audio controller to the sound/pci/intel8x0.c audio # driver. # # Signed-off-by: Andrew Morton # # ChangeSet # 2004/08/02 17:08:20-07:00 greg@kroah.com # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/serial/usb-serial.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +62 -68 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/host/ehci-mem.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +2 -2 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/core/usb.h # 2004/08/02 17:08:07-07:00 greg@kroah.com +1 -0 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/core/urb.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +2 -2 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/core/message.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +1 -1 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/usb/core/config.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +4 -3 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/scsi/sr.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +4 -4 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # drivers/scsi/sd.c # 2004/08/02 17:08:07-07:00 greg@kroah.com +4 -4 # KREF: fix up the current kref users for the changed api. # # Based on work from Kiran, but fixed up by me to actually build and # link properly. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # # ChangeSet # 2004/08/02 17:02:58-07:00 greg@kroah.com # KREF: shrink the size of struct kref down to just a single atomic_t # # This was based on a patch from Kiran, but tweaked further by me. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # lib/kref.c # 2004/08/02 17:02:45-07:00 greg@kroah.com +12 -14 # KREF: shrink the size of struct kref down to just a single atomic_t # # This was based on a patch from Kiran, but tweaked further by me. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # include/linux/kref.h # 2004/08/02 17:02:45-07:00 greg@kroah.com +2 -5 # KREF: shrink the size of struct kref down to just a single atomic_t # # This was based on a patch from Kiran, but tweaked further by me. # # Signed-off-by: Ravikiran Thirumalai # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/02 16:55:05+02:00 perex@suse.cz # ALSA CVS update # PPC PMAC driver # Bailed a long delay out of the spin_lock_irq. # # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/08/02 07:11:06+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/08/02 13:11:06 # C:PPC PMAC driver # F:ppc/pmac.c:1.35->1.36 # L:Bailed a long delay out of the spin_lock_irq. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 16:54:24+02:00 perex@suse.cz # ALSA CVS update # PPC PMAC driver # pmac also apply the DMA stop work around to fix capture on iBook2 # # the attached patch for the pmac driver fixes capture for at least all # iBook2s I have access to. Without the fix arround 33% percent of all # recordings are just white noise. # # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/08/02 06:46:06+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/08/02 12:46:06 # C:PPC PMAC driver # F:ppc/pmac.c:1.34->1.35 # L:pmac also apply the DMA stop work around to fix capture on iBook2 # L: # L:the attached patch for the pmac driver fixes capture for at least all # L:iBook2s I have access to. Without the fix arround 33% percent of all # L:recordings are just white noise. # Signed-off-by: Rene Rebe # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 16:53:41+02:00 perex@suse.cz # ALSA CVS update # PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # Added the PCM beep support. # # enable_beep module option is back again (default = 1). # Beep is emulated via PCM playback when enabled. # # Signed-off-by: Takashi Iwai # # sound/ppc/powermac.c # 2004/08/02 05:06:38+02:00 perex@suse.cz +1 -14 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.h # 2004/08/02 05:06:38+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/08/02 05:06:38+02:00 perex@suse.cz +33 -2 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/awacs.c # 2004/08/02 05:06:38+02:00 perex@suse.cz +20 -1 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/Makefile # 2004/08/02 05:06:38+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/beep.c # 2004/08/02 16:06:03+02:00 perex@suse.cz +262 -0 # ALSA CVS update # D:2004/08/02 11:06:38 # C:PPC,PPC AWACS driver,PPC Beep,PPC PMAC driver,PPC PowerMac driver # F:ppc/Makefile:1.5->1.6 # F:ppc/awacs.c:1.24->1.25 # F:ppc/beep.c:INITIAL->1.1 # F:ppc/pmac.c:1.33->1.34 # F:ppc/pmac.h:1.15->1.16 # F:ppc/powermac.c:1.19->1.20 # L:Added the PCM beep support. # L: # L:enable_beep module option is back again (default = 1). # L:Beep is emulated via PCM playback when enabled. # Signed-off-by: Takashi Iwai # # sound/ppc/beep.c # 2004/08/02 16:06:03+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/ppc/beep.c # # ChangeSet # 2004/08/02 15:43:49+02:00 perex@suse.cz # Merge # # sound/pci/rme9652/hdsp.c # 2004/08/02 15:43:26+02:00 perex@suse.cz +1 -2 # SCCS merged # # sound/pci/ice1712/ice1724.c # 2004/08/02 15:40:06+02:00 perex@suse.cz +0 -0 # SCCS merged # # sound/core/control.c # 2004/08/02 15:37:32+02:00 perex@suse.cz +1 -3 # SCCS merged # # sound/usb/usbmixer.c # 2004/08/02 15:20:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/usb/usbaudio.c # 2004/08/02 15:20:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/ppc/pmac.c # 2004/08/02 15:20:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/ppc/Kconfig # 2004/08/02 15:20:26+02:00 perex@suse.cz +0 -4 # Auto merged # # sound/pci/nm256/nm256.c # 2004/08/02 15:20:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1712.c # 2004/08/02 15:20:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/sonicvibes.c # 2004/08/02 15:20:24+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/maestro3.c # 2004/08/02 15:20:24+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/intel8x0m.c # 2004/08/02 15:20:24+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/es1968.c # 2004/08/02 15:20:24+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/azt3328.c # 2004/08/02 15:20:23+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/wavefront/wavefront_fx.c # 2004/08/02 15:20:23+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/seq/seq_clientmgr.c # 2004/08/02 15:20:23+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_oss.c # 2004/08/02 15:20:23+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/ioctl32/pcm32.c # 2004/08/02 15:20:22+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/asound.h # 2004/08/02 15:20:22+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/02 14:53:29+02:00 perex@suse.cz # Merge # # sound/pci/ice1712/ice1724.c # 2004/08/02 14:53:06+02:00 perex@suse.cz +0 -1 # SCCS merged # # sound/pci/au88x0/au88x0_a3d.c # 2004/08/02 14:47:11+02:00 perex@suse.cz +0 -4 # SCCS merged # # sound/usb/usbmixer.c # 2004/08/02 14:19:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/usb/usbaudio.c # 2004/08/02 14:19:30+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/ppc/pmac.c # 2004/08/02 14:19:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/rme9652/hdsp.c # 2004/08/02 14:19:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/nm256/nm256.c # 2004/08/02 14:19:29+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/sonicvibes.c # 2004/08/02 14:19:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/ice1712/ice1712.c # 2004/08/02 14:19:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/au88x0/au88x0.h # 2004/08/02 14:19:28+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/maestro3.c # 2004/08/02 14:19:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/intel8x0m.c # 2004/08/02 14:19:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/es1968.c # 2004/08/02 14:19:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/azt3328.c # 2004/08/02 14:19:27+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/wavefront/wavefront_synth.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/sb/sb8_main.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/sb/emu8000_pcm.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/gus/gus_mem.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/isa/Kconfig # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/drivers/vx/vx_pcm.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/drivers/serial-u16550.c # 2004/08/02 14:19:26+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/seq/seq_clientmgr.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/pcm.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_oss.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/ioctl32/pcm32.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/ioctl32/ioctl32.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/control.c # 2004/08/02 14:19:25+02:00 perex@suse.cz +0 -0 # Auto merged # # mm/slab.c # 2004/08/02 14:19:24+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/asound.h # 2004/08/02 14:19:24+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/08/02 11:27:35+02:00 perex@suse.cz # ALSA CVS update # IOCTL32 emulation # Added the wrapper for sync_ptr and hwsync ioctls. # # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/07/30 13:21:35+02:00 perex@suse.cz +43 -0 # ALSA CVS update # D:2004/07/30 19:21:35 # C:IOCTL32 emulation # F:core/ioctl32/pcm32.c:1.18->1.19 # L:Added the wrapper for sync_ptr and hwsync ioctls. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:26:23+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Added the support of ZNF3-250 (supposed to be ZNF3-150 compatible). # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/vt1720_mobo.h # 2004/07/30 10:28:49+02:00 perex@suse.cz +3 -1 # ALSA CVS update # D:2004/07/30 16:28:49 # C:ICE1712 driver # F:pci/ice1712/vt1720_mobo.c:1.1->1.2 # F:pci/ice1712/vt1720_mobo.h:1.1->1.2 # L:Added the support of ZNF3-250 (supposed to be ZNF3-150 compatible). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/vt1720_mobo.c # 2004/07/30 10:28:49+02:00 perex@suse.cz +9 -0 # ALSA CVS update # D:2004/07/30 16:28:49 # C:ICE1712 driver # F:pci/ice1712/vt1720_mobo.c:1.1->1.2 # F:pci/ice1712/vt1720_mobo.h:1.1->1.2 # L:Added the support of ZNF3-250 (supposed to be ZNF3-150 compatible). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:25:26+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Added an ac97 quirk for ICH/AD1885 mobo. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/30 10:27:34+02:00 perex@suse.cz +6 -0 # ALSA CVS update # D:2004/07/30 16:27:34 # C:Intel8x0 driver # F:pci/intel8x0.c:1.155->1.156 # L:Added an ac97 quirk for ICH/AD1885 mobo. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:24:30+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Fixed the handling of unknown irqs on ICH5. # # This patch fixes (hopefully) the handling of unkown irqs triggered # on some ICH5 mobo. Also, free_irq() is moved before releasing # i/o ports to avoid hang-up at removal. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/30 10:22:12+02:00 perex@suse.cz +9 -2 # ALSA CVS update # D:2004/07/30 16:22:12 # C:Intel8x0 driver # F:pci/intel8x0.c:1.154->1.155 # L:Fixed the handling of unknown irqs on ICH5. # L: # L:This patch fixes (hopefully) the handling of unkown irqs triggered # L:on some ICH5 mobo. Also, free_irq() is moved before releasing # L:i/o ports to avoid hang-up at removal. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:23:29+02:00 perex@suse.cz # ALSA CVS update # PCI drivers,Intel8x0-modem driver # Added the support of Nvidia modem. # # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/30 10:20:47+02:00 perex@suse.cz +6 -3 # ALSA CVS update # D:2004/07/30 16:20:47 # C:PCI drivers,Intel8x0-modem driver # F:pci/Kconfig:1.29->1.30 # F:pci/intel8x0m.c:1.14->1.15 # L:Added the support of Nvidia modem. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # sound/pci/Kconfig # 2004/07/30 10:20:47+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/30 16:20:47 # C:PCI drivers,Intel8x0-modem driver # F:pci/Kconfig:1.29->1.30 # F:pci/intel8x0m.c:1.14->1.15 # L:Added the support of Nvidia modem. # Signed-off-by: Sasha Khapyorsky # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:22:30+02:00 perex@suse.cz # ALSA CVS update # PARISC Harmony driver # Clean up DMA buffer allocation routines. # # - snd_dma_alloc_pages*() take the device type and device pointer # directly as arguments. snd_dma_free_pages() takes only dma_buffer # instance. # # - snd_dma_device struct is removed in each driver's instance (no longer # needed due to the change above). # # - snd_malloc_pages_fallback() is removed since it's no longer used. # # - The buffer reservation / preallocation in snd-page-alloc module is # performed only when the buffer id is given. Normal PCM buffers won't # be reserved any more (unless the driver specifies). The module keeps # the linked list of free-reserved buffers, instead of the whole buffers # Reservation is done via snd_dma_reserve_buf(), and retrieved via # snd_dma_get_reserved_buf()). # # - Other misc clean-ups/fixes. # # Signed-off-by: Takashi Iwai # # sound/parisc/harmony.c # 2004/07/30 08:23:01+02:00 perex@suse.cz +9 -3 # ALSA CVS update # D:2004/07/30 14:23:01 # C:PARISC Harmony driver # F:parisc/harmony.c:1.15->1.16 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:21:26+02:00 perex@suse.cz # ALSA CVS update # Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # Clean up DMA buffer allocation routines. # # - snd_dma_alloc_pages*() take the device type and device pointer # directly as arguments. snd_dma_free_pages() takes only dma_buffer # instance. # # - snd_dma_device struct is removed in each driver's instance (no longer # needed due to the change above). # # - snd_malloc_pages_fallback() is removed since it's no longer used. # # - The buffer reservation / preallocation in snd-page-alloc module is # performed only when the buffer id is given. Normal PCM buffers won't # be reserved any more (unless the driver specifies). The module keeps # the linked list of free-reserved buffers, instead of the whole buffers # Reservation is done via snd_dma_reserve_buf(), and retrieved via # snd_dma_get_reserved_buf()). # # - Other misc clean-ups/fixes. # # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci_main.c # 2004/07/30 07:57:27+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +4 -9 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_synth.c # 2004/07/30 07:57:27+02:00 perex@suse.cz +16 -9 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_memory.c # 2004/07/30 07:57:27+02:00 perex@suse.cz +8 -4 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2004/07/30 07:57:26+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/07/30 07:57:26+02:00 perex@suse.cz +24 -76 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/07/30 07:57:26+02:00 perex@suse.cz +25 -76 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.h # 2004/07/30 07:57:26+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/07/30 07:57:26+02:00 perex@suse.cz +8 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/07/30 07:57:25+02:00 perex@suse.cz +12 -18 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +4 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +8 -13 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +3 -6 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/memory.c # 2004/07/30 07:57:25+02:00 perex@suse.cz +8 -4 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/07/30 07:57:25+02:00 perex@suse.cz +3 -2 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2004/07/30 07:57:25+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/bt87x.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +3 -6 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +3 -6 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +3 -6 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/isa/sscape.c # 2004/07/30 07:57:24+02:00 perex@suse.cz +4 -12 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/core/sgbuf.c # 2004/07/30 07:57:23+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/core/pcm_memory.c # 2004/07/30 07:57:23+02:00 perex@suse.cz +30 -39 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/07/30 07:57:16+02:00 perex@suse.cz +72 -274 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # include/sound/ymfpci.h # 2004/07/30 07:57:24+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/07/30 07:57:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # include/sound/memalloc.h # 2004/07/30 07:57:24+02:00 perex@suse.cz +11 -10 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/07/30 07:57:24+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # include/sound/cs46xx.h # 2004/07/30 07:57:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/30 13:57:16 # C:Memalloc module,PCM Midlevel,CS46xx driver,EMU10K1/EMU10K2 driver # C:ALSA Core,YMFPCI driver,Sound Scape driver,ATIIXP driver # C:ATIIXP-modem driver,BT87x driver,ENS1370/1+ driver,ES1968 driver # C:Intel8x0 driver,Intel8x0-modem driver,VIA82xx driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Trident driver # F:core/memalloc.c:1.35->1.36 # F:core/pcm_memory.c:1.31->1.32 # F:core/sgbuf.c:1.7->1.8 # F:include/cs46xx.h:1.20->1.21 # F:include/emu10k1.h:1.44->1.45 # F:include/memalloc.h:1.5->1.6 # F:include/pcm.h:1.45->1.46 # F:include/ymfpci.h:1.15->1.16 # F:isa/sscape.c:1.15->1.16 # F:pci/atiixp.c:1.20->1.21 # F:pci/atiixp_modem.c:1.5->1.6 # F:pci/bt87x.c:1.10->1.11 # F:pci/ens1370.c:1.66->1.67 # F:pci/es1968.c:1.74->1.75 # F:pci/intel8x0.c:1.153->1.154 # F:pci/intel8x0m.c:1.13->1.14 # F:pci/via82xx.c:1.115->1.116 # F:pci/cs46xx/cs46xx_lib.c:1.81->1.82 # F:pci/emu10k1/emu10k1_main.c:1.37->1.38 # F:pci/emu10k1/emufx.c:1.57->1.58 # F:pci/emu10k1/memory.c:1.18->1.19 # F:pci/korg1212/korg1212.c:1.45->1.46 # F:pci/mixart/mixart.c:1.15->1.16 # F:pci/mixart/mixart.h:1.4->1.5 # F:pci/rme9652/hdsp.c:1.65->1.66 # F:pci/rme9652/rme9652.c:1.51->1.52 # F:pci/trident/trident_main.c:1.63->1.64 # F:pci/trident/trident_memory.c:1.16->1.17 # F:pci/trident/trident_synth.c:1.14->1.15 # F:pci/ymfpci/ymfpci_main.c:1.56->1.57 # L:Clean up DMA buffer allocation routines. # L: # L:- snd_dma_alloc_pages*() take the device type and device pointer # L: directly as arguments. snd_dma_free_pages() takes only dma_buffer # L: instance. # L: # L:- snd_dma_device struct is removed in each driver's instance (no longer # L: needed due to the change above). # L: # L:- snd_malloc_pages_fallback() is removed since it's no longer used. # L: # L:- The buffer reservation / preallocation in snd-page-alloc module is # L: performed only when the buffer id is given. Normal PCM buffers won't # L: be reserved any more (unless the driver specifies). The module keeps # L: the linked list of free-reserved buffers, instead of the whole buffers # L: Reservation is done via snd_dma_reserve_buf(), and retrieved via # L: snd_dma_get_reserved_buf()). # L: # L:- Other misc clean-ups/fixes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:20:13+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # Intel8x0-modem driver # Fixed the reset problem of shared audio/modem drivers. # # This patch fixes the problem that the shared audio/modem drivers reset # the codecs with each other at loading time. # Currently, intel8x0 and atiixp drivers are supported. # The other drivers (if any) should add the new shared type in ac97_codec.h. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/29 10:09:35+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/29 10:09:35+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/29 10:09:35+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/29 10:09:35+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/07/29 10:09:35+02:00 perex@suse.cz +37 -1 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/07/29 10:09:34+02:00 perex@suse.cz +9 -0 # ALSA CVS update # D:2004/07/29 16:09:34 # C:AC97 Codec Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:Intel8x0-modem driver # F:include/ac97_codec.h:1.49->1.50 # F:pci/atiixp.c:1.19->1.20 # F:pci/atiixp_modem.c:1.4->1.5 # F:pci/intel8x0.c:1.152->1.153 # F:pci/intel8x0m.c:1.12->1.13 # F:pci/ac97/ac97_codec.c:1.141->1.142 # L:Fixed the reset problem of shared audio/modem drivers. # L: # L:This patch fixes the problem that the shared audio/modem drivers reset # L:the codecs with each other at loading time. # L:Currently, intel8x0 and atiixp drivers are supported. # L:The other drivers (if any) should add the new shared type in ac97_codec.h. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:19:14+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Added the support of MCP04. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/29 08:29:38+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/07/29 14:29:38 # C:Intel8x0 driver # F:pci/intel8x0.c:1.151->1.152 # L:Added the support of MCP04. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:18:18+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Added the support of nVidia CK804. # # Signed-off-by: Andrew Chew # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/28 12:31:03+02:00 perex@suse.cz +5 -0 # ALSA CVS update # D:2004/07/28 18:31:03 # C:Intel8x0 driver # F:pci/intel8x0.c:1.150->1.151 # L:Added the support of nVidia CK804. # Signed-off-by: Andrew Chew # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/02 11:17:24+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Added the quirk entry for ECS L7VMM2 uATX. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/28 08:19:34+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/07/28 14:19:34 # C:VIA82xx driver # F:pci/via82xx.c:1.114->1.115 # L:Added the quirk entry for ECS L7VMM2 uATX. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/08/01 23:45:22-04:00 bunk@fs.tum.de # [PATCH] let AIC7{9,X}XX_BUILD_FIRMWARE depend on # # The patch below lets AIC7{9,X}XX_BUILD_FIRMWARE depend on # !PREVENT_FIRMWARE_BUILD. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/aic7xxx/Kconfig.aic7xxx # 2004/08/01 11:04:40-04:00 bunk@fs.tum.de +1 -1 # let AIC7{9,X}XX_BUILD_FIRMWARE depend on # # drivers/scsi/aic7xxx/Kconfig.aic79xx # 2004/08/01 11:04:32-04:00 bunk@fs.tum.de +1 -1 # let AIC7{9,X}XX_BUILD_FIRMWARE depend on # # ChangeSet # 2004/08/01 23:35:26-04:00 akpm@osdl.org # [PATCH] sg.c: remove unused sg_jif_to_ms() # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/sg.c # 2004/07/30 04:04:13-04:00 akpm@osdl.org +0 -13 # sg.c: remove unused sg_jif_to_ms() # # ChangeSet # 2004/07/29 16:50:01-04:00 akpm@osdl.org # [PATCH] fix aic driver build for db4 # # From: "J.A. Magallon" # # This allows to build aic with db4. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/aic7xxx/aicasm/Makefile # 2004/07/26 19:48:36-04:00 akpm@osdl.org +5 -1 # fix aic driver build for db4 # # ChangeSet # 2004/07/29 16:48:36-04:00 akpm@osdl.org # [PATCH] Fix double reset in aic7xxx driver # # From: Joe Korty # # Fix occasional PCI bus parity errors on the Dell PowerEdge 4600 during # boot. # # Symptoms: The LCD display would turn orange and display "PCI SYSTEM E13F5", # and the following message would appear in /var/log/dmesg: "Uhhuh. NMI # received. Dazed and confused, but trying to continue". # # By inserting a PCI card with a PDC20268 IDE controller and attaching to # that a Sony DRU-510A DVD RW burner with an unloaded tray, the failure can # be made to happen on every boot. # # Cause: The aic7xxx driver was resetting the onboard AIC7891 SCSI controller # while waiting for a previous reset to complete. This second reset confuses # the controller causing it to put bad data onto the PCI bus. # # This is a backport of a RedHat 2.4.21-15.ELsmp fix. A letter discussing # this problem, or one very close to it, may be found at: # # http://lists.us.dell.com/pipermail/linux-poweredge/2003-May/025010.html # # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/aic7xxx/aic7xxx_pci.c # 2004/07/26 17:54:35-04:00 akpm@osdl.org +3 -1 # Fix double reset in aic7xxx driver # # drivers/scsi/aic7xxx/aic79xx_pci.c # 2004/07/26 17:54:35-04:00 akpm@osdl.org +3 -1 # Fix double reset in aic7xxx driver # # ChangeSet # 2004/07/29 16:44:58-04:00 akpm@osdl.org # [PATCH] gcc-3.5 fixes to advansys # # From: Andi Kleen # # Trivial gcc-3.5 build fixes. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/scsi/advansys.c # 2004/07/10 20:52:16-04:00 akpm@osdl.org +3 -3 # gcc-3.5 fixes # # ChangeSet # 2004/07/29 15:07:46+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver,ICE1724 driver # Added the support of Pontis MS300 to snd-ice1724 driver. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/pontis.h # 2004/07/28 15:13:57+02:00 perex@suse.cz +33 -0 # ALSA CVS update # D:2004/07/28 14:13:52 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.12->1.13 # F:pci/ice1712/ice1724.c:1.41->1.42 # F:pci/ice1712/pontis.c:INITIAL->1.1 # F:pci/ice1712/pontis.h:INITIAL->1.1 # L:Added the support of Pontis MS300 to snd-ice1724 driver. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/pontis.h # 2004/07/28 15:13:57+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/pontis.h # # sound/pci/ice1712/ice1724.c # 2004/07/28 08:13:52+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/07/28 14:13:52 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.12->1.13 # F:pci/ice1712/ice1724.c:1.41->1.42 # F:pci/ice1712/pontis.c:INITIAL->1.1 # F:pci/ice1712/pontis.h:INITIAL->1.1 # L:Added the support of Pontis MS300 to snd-ice1724 driver. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/Makefile # 2004/07/28 08:13:52+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/28 14:13:52 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.12->1.13 # F:pci/ice1712/ice1724.c:1.41->1.42 # F:pci/ice1712/pontis.c:INITIAL->1.1 # F:pci/ice1712/pontis.h:INITIAL->1.1 # L:Added the support of Pontis MS300 to snd-ice1724 driver. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/pontis.c # 2004/07/28 15:13:50+02:00 perex@suse.cz +839 -0 # ALSA CVS update # D:2004/07/28 14:13:52 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/Makefile:1.12->1.13 # F:pci/ice1712/ice1724.c:1.41->1.42 # F:pci/ice1712/pontis.c:INITIAL->1.1 # F:pci/ice1712/pontis.h:INITIAL->1.1 # L:Added the support of Pontis MS300 to snd-ice1724 driver. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/pontis.c # 2004/07/28 15:13:50+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/pontis.c # # ChangeSet # 2004/07/29 15:07:03+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS emulation # Fixed a typo in the last change, resulting in the infinite loop. # # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/07/28 08:09:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/28 14:09:10 # C:ALSA<-OSS emulation # F:core/oss/pcm_oss.c:1.75->1.76 # L:Fixed a typo in the last change, resulting in the infinite loop. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 23:08:11-05:00 jejb@raven.il.steeleye.com # Merge # # drivers/scsi/sg.c # 2004/07/28 23:07:45-05:00 jejb@raven.il.steeleye.com +0 -0 # SCCS merged # # drivers/scsi/nsp32.c # 2004/07/28 23:06:57-05:00 jejb@raven.il.steeleye.com +0 -2 # SCCS merged # # drivers/scsi/sym53c8xx_2/sym_hipd.c # 2004/07/28 22:59:13-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/sym53c8xx_2/sym_glue.c # 2004/07/28 22:59:12-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/aacraid/linit.c # 2004/07/28 22:59:11-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/scsi_sysfs.c # 2004/07/28 22:59:10-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/qla1280.c # 2004/07/28 22:59:10-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/megaraid.c # 2004/07/28 22:59:08-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/eata_pio.c # 2004/07/28 22:59:07-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/aic7xxx_old.c # 2004/07/28 22:59:06-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/scsi/Kconfig # 2004/07/28 22:59:05-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # drivers/message/fusion/mptscsih.c # 2004/07/28 22:59:04-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # MAINTAINERS # 2004/07/28 22:59:03-05:00 jejb@raven.il.steeleye.com +0 -0 # Auto merged # # ChangeSet # 2004/07/28 17:40:08-04:00 nacc@us.ibm.com # [PATCH] scsi/eata_pio: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to # guarantee the task delays for the desired time. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: James Bottomley # # drivers/scsi/eata_pio.c # 2004/07/02 23:47:44-04:00 nacc@us.ibm.com +1 -2 # scsi/eata_pio: replace schedule_timeout() with msleep() # # ChangeSet # 2004/07/28 17:37:56-04:00 Matt_Domsch@dell.com # [PATCH] add MODULE_VERSION to drivers/scsi # # On Thu, Jul 22, 2004 at 01:28:23PM +0100, Matthew Wilcox wrote: # > > +#define SYM_VERSION "2.1.18j" # > > +#define SYM_DRIVER_NAME "sym-" SYM_VERSION # > # > Umm. No. This is ridiculous. I'm not having a 51 line copyright message # > with 2 lines of #define. It's not even clear to me that these two lines # > have artisitic merit. How about putting these defines in sym_defs.h, # > at the top? It's already included in both sym_glue.c and sym_hipd.c by # > being included by sym_glue.h. # # Indeed, point well taken. Done, they're now at the top of defines in # sym_defs.h, and I've updated my BK tree accordingly. # # Signed-off-by: James Bottomley # # drivers/scsi/sym53c8xx_2/sym_hipd.c # 2004/07/22 10:12:03-04:00 Matt_Domsch@dell.com +0 -4 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/sym53c8xx_2/sym_glue.c # 2004/07/22 10:12:03-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/sym53c8xx_2/sym_defs.h # 2004/07/22 10:12:03-04:00 Matt_Domsch@dell.com +3 -0 # add MODULE_VERSION to drivers/scsi # # ChangeSet # 2004/07/28 17:35:37-04:00 Matt_Domsch@dell.com # [PATCH] add MODULE_VERSION to drivers/scsi # # Set MODULE_VERSION for drivers/scsi # # for Adaptec SCSI, megaraid qla1280, qla2x00 # # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_os.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql6322.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql6312.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql2322.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql2300.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql2200.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla2xxx/ql2100.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/qla1280.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/megaraid.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +3 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/aic7xxx_old.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/aic7xxx/aic7xxx_osm.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -4 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/aic7xxx/aic79xx_osm.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -4 # add MODULE_VERSION to drivers/scsi # # drivers/scsi/aacraid/linit.c # 2004/07/21 17:57:31-04:00 Matt_Domsch@dell.com +1 -0 # add MODULE_VERSION to drivers/scsi # # ChangeSet # 2004/07/28 17:33:44-04:00 boutcher@us.ibm.com # [PATCH] ibmvscsi driver v1.5.1 # # Based on comments from hch and jejb, an update to the ibmvscsi # driver patch. Primarily style issues, though the removal of # gratuitous casting lead to some significant refactoring # of functions. # # - Moved #include after #include # - removed the map_direct_data and map_indirect_data and moved # the function inline # - Fixed function declaration style issues (static on a line by # itself) # - Removed bogus cast from dma_map_single # - Moved setting of data transfer direction to a single helper # function # - Fixed up some gratuitous casting of types # - Collapsed a couple of other functions inline # - Removed bogus check for NULL from remove # - Removed the "evt_struct_for" routine as being needlessly obfuscatory # # Signed-off-by: James Bottomley # # drivers/scsi/ibmvscsi/viosrp.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +126 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/srp.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +225 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/rpa_vscsi.c # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +260 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/iseries_vscsi.c # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +144 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/ibmvscsi.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +108 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/Makefile # 2004/07/16 18:50:35-04:00 boutcher@us.ibm.com +5 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/viosrp.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/viosrp.h # # drivers/scsi/ibmvscsi/srp.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/srp.h # # drivers/scsi/ibmvscsi/rpa_vscsi.c # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/rpa_vscsi.c # # drivers/scsi/ibmvscsi/iseries_vscsi.c # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/iseries_vscsi.c # # drivers/scsi/ibmvscsi/ibmvscsi.h # 2004/07/16 18:50:36-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/ibmvscsi.h # # drivers/scsi/ibmvscsi/ibmvscsi.c # 2004/07/28 17:33:14-04:00 boutcher@us.ibm.com +1393 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/Makefile # 2004/07/16 18:50:35-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/Makefile # # drivers/scsi/Makefile # 2004/06/30 05:13:52-04:00 boutcher@us.ibm.com +1 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/Kconfig # 2004/06/30 05:13:51-04:00 boutcher@us.ibm.com +9 -0 # ibmvscsi driver v1.5.1 # # drivers/scsi/ibmvscsi/ibmvscsi.c # 2004/07/28 17:33:14-04:00 boutcher@us.ibm.com +0 -0 # BitKeeper file /home/jejb/BK/scsi-misc-2.6/drivers/scsi/ibmvscsi/ibmvscsi.c # # ChangeSet # 2004/07/28 17:31:21-04:00 g.liakhovetski@gmx.de # [PATCH] SCSI tmscsim.c: fix inline compile errors # # Original Patch From: Adrian Bunk # # I looked at those 3 functions. dc390_EnableMsgOut_Abort is called 5 times # in the code and is 0x30 bytes long (as compiled with 3.3.2), so, # uninlining it, probably, makes most sense. The other 2 functions are # called only ones each and from the interrupt, so, I applied the # "alternative approach" to them - moved above the calling functions. # # Signed-off-by: James Bottomley # # drivers/scsi/tmscsim.c # 2004/07/16 19:01:08-04:00 g.liakhovetski@gmx.de +1 -5 # SCSI tmscsim.c: fix inline compile errors # # ChangeSet # 2004/07/28 17:28:42-04:00 g.liakhovetski@gmx.de # [PATCH] tmscsim: MAINTAINERS # # add new maintainer # # Signed-off-by: James Bottomley # # MAINTAINERS # 2004/06/26 18:33:30-04:00 g.liakhovetski@gmx.de +2 -0 # tmscsim: MAINTAINERS # # ChangeSet # 2004/07/28 17:05:48-04:00 bunk@fs.tum.de # [PATCH] SCSI nsp32.c: remove inlines # # Trying to compile drivers/scsi/nsp32.c in 2.6.8-rc1-mm1 using gcc 3.4 # results in compile errors starting with the following: # # <-- snip --> # # ... # CC drivers/scsi/nsp32.o # drivers/scsi/nsp32.c: In function `nsp32_prom_start': # drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call # to 'nsp32_prom_set': function body not available # drivers/scsi/nsp32.c:3348: sorry, unimplemented: called from here # drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call # to 'nsp32_prom_set': function body not available # drivers/scsi/nsp32.c:3349: sorry, unimplemented: called from here # drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call # to 'nsp32_prom_set': function body not available # drivers/scsi/nsp32.c:3350: sorry, unimplemented: called from here # drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call # to 'nsp32_prom_set': function body not available # drivers/scsi/nsp32.c:3351: sorry, unimplemented: called from here # drivers/scsi/nsp32.c:270: sorry, unimplemented: inlining failed in call # to 'nsp32_prom_set': function body not available # drivers/scsi/nsp32.c:3353: sorry, unimplemented: called from here # make[2]: *** [drivers/scsi/nsp32.o] Error 1 # # # <-- snip --> # # # The patch below removes the inlines from nsp32_prom_{get,set}. # # An alternative approach would be to move the functions above the place # where they are called the first time. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/nsp32.c # 2004/07/15 18:37:26-04:00 bunk@fs.tum.de +4 -4 # SCSI nsp32.c: remove inlines # # ChangeSet # 2004/07/28 17:00:16-04:00 bunk@fs.tum.de # [PATCH] SCSI dc395x.c: fix inline compile errors # # Trying to compile drivers/scsi/dc395x.c in 2.6.8-rc1-mm1 using gcc 3.4 # results in compile errors starting with the following: # # <-- snip --> # # ... # CC drivers/scsi/dc395x.o # drivers/scsi/dc395x.c: In function `dc395x_handle_interrupt': # drivers/scsi/dc395x.c:388: sorry, unimplemented: inlining failed in call # to 'enable_msgout_abort': function body not available # drivers/scsi/dc395x.c:1740: sorry, unimplemented: called from here # make[2]: *** [drivers/scsi/dc395x.o] Error 1 # # <-- snip --> # # # The patch below moves enable_msgout_abort above the place where it is # called the first time and removes the bogus inline from the prototype of # set_xfer_rate (the function itself isn't marked as inline). # # An alternative approach would be to remove the inline from # enable_msgout_abort. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/dc395x.c # 2004/07/15 18:21:32-04:00 bunk@fs.tum.de +20 -20 # SCSI dc395x.c: fix inline compile errors # # ChangeSet # 2004/07/28 16:52:31-04:00 bunk@fs.tum.de # [PATCH] drivers/scsi/sg.c kill local jiffies functions # # [patch] kill local sg_ms_to_jif/sg_jif_to_ms functions and use # msecs_to_jiffies/jiffies_to_msecs instead # # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/sg.c # 2004/07/14 14:21:50-04:00 bunk@fs.tum.de +6 -32 # drivers/scsi/sg.c kill local jiffies functions # # ChangeSet # 2004/07/28 16:46:32-04:00 andrew.vasquez@qlogic.com # [PATCH] qla2xxx: Update version # # Update version number to 8.00.00b15-k. # # Signed-off-by: Andrew Vasquez # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_version.h # 2004/07/12 12:55:21-04:00 andrew.vasquez@qlogic.com +2 -2 # qla2xxx: Update version # # ChangeSet # 2004/07/28 16:44:41-04:00 andrew.vasquez@qlogic.com # [PATCH] qla2xxx: TCQ fixes # # Correct usage of tag-command-queueing methods: # # o Properly call scsi_activate_tcq() rather than # scsi_adjust_queue_depth(). # o Properly retrieve tag message from command via # scsi_populate_tag_msg(). # # Signed-off-by: Andrew Vasquez # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_os.c # 2004/07/12 12:54:49-04:00 andrew.vasquez@qlogic.com +1 -1 # qla2xxx: TCQ fixes # # drivers/scsi/qla2xxx/qla_iocb.c # 2004/07/12 12:54:49-04:00 andrew.vasquez@qlogic.com +11 -5 # qla2xxx: TCQ fixes # # ChangeSet # 2004/07/28 16:42:59-04:00 andrew.vasquez@qlogic.com # [PATCH] qla2xxx: Set firmware options fixes # # Fix issue where firmware options were not properly being # set before firmware initialization. # # Signed-off-by: Andrew Vasquez # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_init.c # 2004/07/12 12:54:32-04:00 andrew.vasquez@qlogic.com +4 -6 # qla2xxx: Set firmware options fixes # # ChangeSet # 2004/07/28 16:41:09-04:00 andrew.vasquez@qlogic.com # [PATCH] qla2xxx: EH host-reset fixes # # Fix issue where host-reset would incorrectly return a # FAILED status. # # Signed-off-by: Andrew Vasquez # Signed-off-by: James Bottomley # # drivers/scsi/qla2xxx/qla_os.c # 2004/07/12 12:54:16-04:00 andrew.vasquez@qlogic.com +1 -1 # qla2xxx: EH host-reset fixes # # ChangeSet # 2004/07/28 14:40:11+02:00 perex@suse.cz # Merge # # sound/core/control.c # 2004/07/28 14:39:53+02:00 perex@suse.cz +0 -3 # SCCS merged # # sound/isa/gus/interwave.c # 2004/07/28 14:33:10+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/07/28 14:02:21+02:00 perex@suse.cz # Merge # # sound/isa/gus/interwave.c # 2004/07/28 14:02:03+02:00 perex@suse.cz +0 -2 # SCCS merged # # ChangeSet # 2004/07/28 11:58:20+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Fixed the check of invalid DMA position. # # The workaround for buggy mobo to correct the DMA position is fixed # so that it works properly on normal chips. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/27 10:33:20+02:00 perex@suse.cz +17 -10 # ALSA CVS update # D:2004/07/27 16:33:20 # C:VIA82xx driver # F:pci/via82xx.c:1.113->1.114 # L:Fixed the check of invalid DMA position. # L: # L:The workaround for buggy mobo to correct the DMA position is fixed # L:so that it works properly on normal chips. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:57:41+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Added the (experimental) support of Terratec Phase 88. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.h # 2004/07/27 07:57:36+02:00 perex@suse.cz +3 -1 # ALSA CVS update # D:2004/07/27 13:57:36 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.18->1.19 # F:pci/ice1712/ews.h:1.3->1.4 # L:Added the (experimental) support of Terratec Phase 88. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/07/27 07:57:36+02:00 perex@suse.cz +14 -0 # ALSA CVS update # D:2004/07/27 13:57:36 # C:ICE1712 driver # F:pci/ice1712/ews.c:1.18->1.19 # F:pci/ice1712/ews.h:1.3->1.4 # L:Added the (experimental) support of Terratec Phase 88. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:57:02+02:00 perex@suse.cz # ALSA CVS update # RME32 driver # Fixed the address mask to get the correct DMA pointer value. # # Signed-off-by: Pilo Chambert # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/27 07:43:15+02:00 perex@suse.cz +5 -4 # ALSA CVS update # D:2004/07/27 13:43:15 # C:RME32 driver # F:pci/rme32.c:1.43->1.44 # L:Fixed the address mask to get the correct DMA pointer value. # Signed-off-by: Pilo Chambert # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:56:22+02:00 perex@suse.cz # ALSA CVS update # RME32 driver # Fixed the fullduplex mode. # # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/27 07:33:45+02:00 perex@suse.cz +24 -3 # ALSA CVS update # D:2004/07/27 13:33:45 # C:RME32 driver # F:pci/rme32.c:1.42->1.43 # L:Fixed the fullduplex mode. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:55:42+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Notify PCM buffer overrun of the intermidate buffer on capture. # # Signed-off-by: Takashi Iwai # # include/sound/pcm-indirect.h # 2004/07/27 07:32:38+02:00 perex@suse.cz +4 -0 # ALSA CVS update # D:2004/07/27 13:32:38 # C:PCM Midlevel # F:include/pcm-indirect.h:1.2->1.3 # L:Notify PCM buffer overrun of the intermidate buffer on capture. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:55:03+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Fixed/improved XRUN detection # # - don't print XRUN message in the case of draining. # - pointer callback can return SNDRV_PCM_POS_XRUN to notify the middle layer. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_lib.c # 2004/07/27 07:31:03+02:00 perex@suse.cz +29 -13 # ALSA CVS update # D:2004/07/27 13:31:03 # C:PCM Midlevel # F:core/pcm_lib.c:1.56->1.57 # F:include/pcm.h:1.44->1.45 # L:Fixed/improved XRUN detection # L: # L:- don't print XRUN message in the case of draining. # L:- pointer callback can return SNDRV_PCM_POS_XRUN to notify the middle layer. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/07/27 07:31:04+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/07/27 13:31:03 # C:PCM Midlevel # F:core/pcm_lib.c:1.56->1.57 # F:include/pcm.h:1.44->1.45 # L:Fixed/improved XRUN detection # L: # L:- don't print XRUN message in the case of draining. # L:- pointer callback can return SNDRV_PCM_POS_XRUN to notify the middle layer. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:54:20+02:00 perex@suse.cz # ALSA CVS update # Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # Unlock BKL in ioctl callback to avoid the long preempt-disabling. # # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +14 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/07/27 07:28:37+02:00 perex@suse.cz +7 -1 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss.c # 2004/07/27 07:28:37+02:00 perex@suse.cz +7 -1 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/rawmidi.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +14 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +13 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/07/27 07:28:37+02:00 perex@suse.cz +14 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/oss/mixer_oss.c # 2004/07/27 07:28:37+02:00 perex@suse.cz +8 -1 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/info.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +13 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/hwdep.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +14 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # sound/core/control.c # 2004/07/27 07:28:36+02:00 perex@suse.cz +14 -2 # ALSA CVS update # D:2004/07/27 13:28:36 # C:Control Midlevel,HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer # F:core/control.c:1.47->1.48 # F:core/hwdep.c:1.26->1.27 # F:core/info.c:1.46->1.47 # F:core/pcm_native.c:1.101->1.102 # F:core/rawmidi.c:1.46->1.47 # F:core/timer.c:1.61->1.62 # F:core/oss/mixer_oss.c:1.34->1.35 # F:core/oss/pcm_oss.c:1.74->1.75 # F:core/seq/seq_clientmgr.c:1.31->1.32 # F:core/seq/oss/seq_oss.c:1.15->1.16 # L:Unlock BKL in ioctl callback to avoid the long preempt-disabling. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:53:36+02:00 perex@suse.cz # ALSA CVS update # ALSA Core # Clean up: removed ifdefs and obsolete codes. # # Signed-off-by: Takashi Iwai # # sound/core/sound.c # 2004/07/27 07:27:18+02:00 perex@suse.cz +0 -32 # ALSA CVS update # D:2004/07/27 13:27:18 # C:ALSA Core # F:core/info_oss.c:1.10->1.11 # F:core/sound.c:1.65->1.66 # F:include/core.h:1.56->1.57 # F:include/info.h:1.16->1.17 # L:Clean up: removed ifdefs and obsolete codes. # Signed-off-by: Takashi Iwai # # sound/core/info_oss.c # 2004/07/27 07:27:18+02:00 perex@suse.cz +0 -12 # ALSA CVS update # D:2004/07/27 13:27:18 # C:ALSA Core # F:core/info_oss.c:1.10->1.11 # F:core/sound.c:1.65->1.66 # F:include/core.h:1.56->1.57 # F:include/info.h:1.16->1.17 # L:Clean up: removed ifdefs and obsolete codes. # Signed-off-by: Takashi Iwai # # include/sound/info.h # 2004/07/27 07:27:18+02:00 perex@suse.cz +4 -1 # ALSA CVS update # D:2004/07/27 13:27:18 # C:ALSA Core # F:core/info_oss.c:1.10->1.11 # F:core/sound.c:1.65->1.66 # F:include/core.h:1.56->1.57 # F:include/info.h:1.16->1.17 # L:Clean up: removed ifdefs and obsolete codes. # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/07/27 07:27:18+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/27 13:27:18 # C:ALSA Core # F:core/info_oss.c:1.10->1.11 # F:core/sound.c:1.65->1.66 # F:include/core.h:1.56->1.57 # F:include/info.h:1.16->1.17 # L:Clean up: removed ifdefs and obsolete codes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:52:54+02:00 perex@suse.cz # ALSA CVS update # ALSA Core # Added unlikely() to the debug check macros. # # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/07/27 07:22:34+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/27 13:22:34 # C:ALSA Core # F:include/core.h:1.55->1.56 # L:Added unlikely() to the debug check macros. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:52:15+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver # Added master volume control. # # The master volume control is added again, this time with # the digital attenuation so that it works independently from # the DAC volumes. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/07/27 07:15:17+02:00 perex@suse.cz +174 -92 # ALSA CVS update # D:2004/07/27 13:15:17 # C:ICE1712 driver # F:pci/ice1712/aureon.c:1.12->1.13 # L:Added master volume control. # L: # L:The master volume control is added again, this time with # L:the digital attenuation so that it works independently from # L:the DAC volumes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:51:35+02:00 perex@suse.cz # ALSA CVS update # ALSA Core,MIXART driver # Removed the obsolete NONATOMIC_OPS flag. # # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/07/27 07:13:50+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/27 13:13:50 # C:ALSA Core,MIXART driver # F:include/asound.h:1.42->1.43 # F:pci/mixart/mixart.c:1.14->1.15 # L:Removed the obsolete NONATOMIC_OPS flag. # Signed-off-by: Takashi Iwai # # include/sound/asound.h # 2004/07/27 07:13:50+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/27 13:13:50 # C:ALSA Core,MIXART driver # F:include/asound.h:1.42->1.43 # F:pci/mixart/mixart.c:1.14->1.15 # L:Removed the obsolete NONATOMIC_OPS flag. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:50:56+02:00 perex@suse.cz # ALSA CVS update # PPC PowerMac driver # Fixed typo. # # Signed-off-by: Nicolas Kaiser # Signed-off-by: Jaroslav Kysela # # sound/ppc/powermac.c # 2004/07/27 02:02:26+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/27 08:02:26 # C:PPC PowerMac driver # F:ppc/powermac.c:1.18->1.19 # L:Fixed typo. # Signed-off-by: Nicolas Kaiser # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/28 11:50:16+02:00 perex@suse.cz # ALSA CVS update # PPC PMAC driver # Fixed typo. # # Signed-off-by: Nicolas Kaiser # Signed-off-by: Jaroslav Kysela # # sound/ppc/pmac.h # 2004/07/27 01:35:53+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/27 07:35:53 # C:PPC PMAC driver # F:ppc/pmac.h:1.14->1.15 # L:Fixed typo. # Signed-off-by: Nicolas Kaiser # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/28 11:49:37+02:00 perex@suse.cz # ALSA CVS update # ALSA Core # use list_for_each() in core/memory.c # # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: Jaroslav Kysela # # sound/core/memory.c # 2004/07/26 06:57:39+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/26 12:57:39 # C:ALSA Core # F:core/memory.c:1.30->1.31 # L:use list_for_each() in core/memory.c # Signed-off-by: Domen Puncer # Signed-off-by: Maximilian Attems # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/28 11:48:57+02:00 perex@suse.cz # ALSA CVS update # PPC # The alsa driver for powermacs requires i2c support. # # Signed-off-by: Olaf Hering # Signed-off-by: Jaroslav Kysela # # sound/ppc/Kconfig # 2004/07/26 06:55:56+02:00 perex@suse.cz +4 -1 # ALSA CVS update # D:2004/07/26 12:55:56 # C:PPC # F:ppc/Kconfig:1.2->1.3 # L:The alsa driver for powermacs requires i2c support. # Signed-off-by: Olaf Hering # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/28 11:48:18+02:00 perex@suse.cz # ALSA CVS update # BT87x driver # use exact values of analog clock rate # # Signed-off-by: Clemens Ladisch # # sound/pci/bt87x.c # 2004/07/21 02:19:09+02:00 perex@suse.cz +12 -11 # ALSA CVS update # D:2004/07/21 08:19:09 # C:BT87x driver # F:pci/bt87x.c:1.9->1.10 # L:use exact values of analog clock rate # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:47:31+02:00 perex@suse.cz # ALSA CVS update # Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # Common EMU synth # use ARRAY_SIZE() instead of sizeof() computations # # Signed-off-by: Clemens Ladisch # # sound/synth/emux/emux_nrpn.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +3 -11 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/sparc/cs4231.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/sparc/amd7930.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +2 -5 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/ppc/daca.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/ppc/burgundy.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/ppc/awacs.c # 2004/07/20 10:54:28+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/ymfpci/ymfpci_main.c # 2004/07/20 10:54:27+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/sonicvibes.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/rme9652/rme9652.c # 2004/07/20 10:54:27+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/rme9652/hdsp.c # 2004/07/20 10:54:27+02:00 perex@suse.cz +4 -12 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/rme96.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/rme32.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/nm256/nm256.c # 2004/07/20 10:54:26+02:00 perex@suse.cz +2 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/maestro3.c # 2004/07/20 10:54:24+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/korg1212/korg1212.c # 2004/07/20 10:54:26+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/07/20 10:54:24+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/ice1712/ice1712.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/fm801.c # 2004/07/20 10:54:24+02:00 perex@suse.cz +3 -5 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/dsp_spos.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2004/07/20 10:54:23+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/cmipci.c # 2004/07/20 10:54:23+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/azt3328.c # 2004/07/20 10:54:23+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ak4531_codec.c # 2004/07/20 10:54:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/parisc/harmony.c # 2004/07/20 10:54:23+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/sb/emu8000_local.h # 2004/07/20 10:54:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/sb/emu8000.c # 2004/07/20 10:54:23+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/opti9xx/opti92x-ad1848.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/opl3sa2.c # 2004/07/20 10:54:21+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/gus/interwave.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +3 -5 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/gus/gus_mixer.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +2 -6 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/es1688/es1688_lib.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/cs423x/cs4236_lib.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +6 -18 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/cs423x/cs4231_lib.c # 2004/07/20 10:54:22+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/isa/ad1816a/ad1816a_lib.c # 2004/07/20 10:54:21+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/i2c/tea6330t.c # 2004/07/20 10:54:12+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/i2c/l3/uda1341.c # 2004/07/20 10:54:13+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/i2c/cs8427.c # 2004/07/20 10:54:12+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/drivers/dummy.c # 2004/07/20 10:54:12+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/core/pcm_native.c # 2004/07/20 10:54:09+02:00 perex@suse.cz +4 -5 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/core/pcm_lib.c # 2004/07/20 10:54:09+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/core/oss/pcm_plugin.c # 2004/07/20 10:54:11+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/core/oss/mixer_oss.c # 2004/07/20 10:54:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/core/ioctl32/pcm32.c # 2004/07/20 10:54:10+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # sound/arm/sa11xx-uda1341.c # 2004/07/20 10:54:09+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/20 10:54:09+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/20 16:54:09 # C:Documentation,SA11xx UDA1341 driver,PCM Midlevel,IOCTL32 emulation # C:ALSA<-OSS emulation,Generic drivers,I2C cs8427,I2C tea6330t,L3 drivers # C:OPL3SA2 driver,AD1816A driver,CS4231 driver,CS4236+ driver # C:ES1688 driver,GUS Library,AMD InterWave driver,Opti9xx drivers # C:EMU8000 driver,PARISC Harmony driver,AZT3328 driver,CMIPCI driver # C:CS4281 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,AK4531 codec,CS46xx driver # C:ICE1712 driver,KORG1212 driver,NM256 driver,RME HDSP driver # C:RME9652 driver,YMFPCI driver,PPC AWACS driver,PPC Burgundy driver # C:PPC DACA driver,SPARC AMD7930 driver,SPARC cs4231 driver # C:Common EMU synth # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.36->1.37 # F:arm/sa11xx-uda1341.c:1.17->1.18 # F:core/pcm_lib.c:1.55->1.56 # F:core/pcm_native.c:1.100->1.101 # F:core/ioctl32/pcm32.c:1.17->1.18 # F:core/oss/mixer_oss.c:1.33->1.34 # F:core/oss/pcm_plugin.c:1.21->1.22 # F:drivers/dummy.c:1.31->1.32 # F:i2c/cs8427.c:1.20->1.21 # F:i2c/tea6330t.c:1.9->1.10 # F:i2c/l3/uda1341.c:1.12->1.13 # F:isa/opl3sa2.c:1.37->1.38 # F:isa/ad1816a/ad1816a_lib.c:1.23->1.24 # F:isa/cs423x/cs4231_lib.c:1.42->1.43 # F:isa/cs423x/cs4236_lib.c:1.11->1.12 # F:isa/es1688/es1688_lib.c:1.26->1.27 # F:isa/gus/gus_mixer.c:1.9->1.10 # F:isa/gus/interwave.c:1.35->1.36 # F:isa/opti9xx/opti92x-ad1848.c:1.47->1.48 # F:isa/sb/emu8000.c:1.22->1.23 # F:isa/sb/emu8000_local.h:1.5->1.6 # F:parisc/harmony.c:1.14->1.15 # F:pci/azt3328.c:1.17->1.18 # F:pci/cmipci.c:1.72->1.73 # F:pci/cs4281.c:1.61->1.62 # F:pci/fm801.c:1.51->1.52 # F:pci/intel8x0.c:1.149->1.150 # F:pci/maestro3.c:1.58->1.59 # F:pci/rme32.c:1.41->1.42 # F:pci/rme96.c:1.41->1.42 # F:pci/sonicvibes.c:1.39->1.40 # F:pci/ac97/ak4531_codec.c:1.12->1.13 # F:pci/cs46xx/cs46xx_lib.c:1.80->1.81 # F:pci/cs46xx/dsp_spos.c:1.25->1.26 # F:pci/ice1712/ice1712.c:1.59->1.60 # F:pci/korg1212/korg1212.c:1.44->1.45 # F:pci/nm256/nm256.c:1.47->1.48 # F:pci/rme9652/hdsp.c:1.64->1.65 # F:pci/rme9652/rme9652.c:1.50->1.51 # F:pci/ymfpci/ymfpci_main.c:1.55->1.56 # F:ppc/awacs.c:1.23->1.24 # F:ppc/burgundy.c:1.12->1.13 # F:ppc/daca.c:1.12->1.13 # F:sparc/amd7930.c:1.11->1.12 # F:sparc/cs4231.c:1.15->1.16 # F:synth/emux/emux_nrpn.c:1.6->1.7 # L:use ARRAY_SIZE() instead of sizeof() computations # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:46:40+02:00 perex@suse.cz # ALSA CVS update # ALI5451 driver # Added the missing snd_power_change_state() in the resume callback. # # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/07/16 04:48:16+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/16 10:48:16 # C:ALI5451 driver # F:pci/ali5451/ali5451.c:1.55->1.56 # L:Added the missing snd_power_change_state() in the resume callback. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:46:00+02:00 perex@suse.cz # ALSA CVS update # ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # VIA82xx driver # Clean up the suspend/resume: save/restore of pci state # # PCI status is restored in the common resume callback. # (Stored in the saved_config array of pci_dev struct.) # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/15 10:25:22+02:00 perex@suse.cz +0 -3 # ALSA CVS update # D:2004/07/15 16:25:21 # C:ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:VIA82xx driver # F:core/init.c:1.47->1.48 # F:pci/atiixp.c:1.18->1.19 # F:pci/atiixp_modem.c:1.3->1.4 # F:pci/intel8x0.c:1.148->1.149 # F:pci/via82xx.c:1.112->1.113 # L:Clean up the suspend/resume: save/restore of pci state # L: # L:PCI status is restored in the common resume callback. # L:(Stored in the saved_config array of pci_dev struct.) # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/15 10:25:22+02:00 perex@suse.cz +0 -6 # ALSA CVS update # D:2004/07/15 16:25:21 # C:ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:VIA82xx driver # F:core/init.c:1.47->1.48 # F:pci/atiixp.c:1.18->1.19 # F:pci/atiixp_modem.c:1.3->1.4 # F:pci/intel8x0.c:1.148->1.149 # F:pci/via82xx.c:1.112->1.113 # L:Clean up the suspend/resume: save/restore of pci state # L: # L:PCI status is restored in the common resume callback. # L:(Stored in the saved_config array of pci_dev struct.) # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/15 10:25:22+02:00 perex@suse.cz +0 -6 # ALSA CVS update # D:2004/07/15 16:25:21 # C:ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:VIA82xx driver # F:core/init.c:1.47->1.48 # F:pci/atiixp.c:1.18->1.19 # F:pci/atiixp_modem.c:1.3->1.4 # F:pci/intel8x0.c:1.148->1.149 # F:pci/via82xx.c:1.112->1.113 # L:Clean up the suspend/resume: save/restore of pci state # L: # L:PCI status is restored in the common resume callback. # L:(Stored in the saved_config array of pci_dev struct.) # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/15 10:25:22+02:00 perex@suse.cz +0 -6 # ALSA CVS update # D:2004/07/15 16:25:21 # C:ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:VIA82xx driver # F:core/init.c:1.47->1.48 # F:pci/atiixp.c:1.18->1.19 # F:pci/atiixp_modem.c:1.3->1.4 # F:pci/intel8x0.c:1.148->1.149 # F:pci/via82xx.c:1.112->1.113 # L:Clean up the suspend/resume: save/restore of pci state # L: # L:PCI status is restored in the common resume callback. # L:(Stored in the saved_config array of pci_dev struct.) # Signed-off-by: Takashi Iwai # # sound/core/init.c # 2004/07/15 10:25:21+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/07/15 16:25:21 # C:ALSA Core,ATIIXP driver,ATIIXP-modem driver,Intel8x0 driver # C:VIA82xx driver # F:core/init.c:1.47->1.48 # F:pci/atiixp.c:1.18->1.19 # F:pci/atiixp_modem.c:1.3->1.4 # F:pci/intel8x0.c:1.148->1.149 # F:pci/via82xx.c:1.112->1.113 # L:Clean up the suspend/resume: save/restore of pci state # L: # L:PCI status is restored in the common resume callback. # L:(Stored in the saved_config array of pci_dev struct.) # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:45:19+02:00 perex@suse.cz # ALSA CVS update # Documentation # Changed the description of PCI resource allocation to use pci_request_regions(). # # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/15 08:46:13+02:00 perex@suse.cz +60 -53 # ALSA CVS update # D:2004/07/15 14:46:13 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.35->1.36 # L:Changed the description of PCI resource allocation to use pci_request_regions(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:44:34+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # Clean up the PCI resource allocation. # # Replaced the manual resource allocations with request_[mem_]region() # with pci_request_regions(). # # Signed-off-by: Takashi Iwai # # sound/pci/vx222/vx222.h # 2004/07/15 08:43:28+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/vx222/vx222.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +8 -20 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +7 -12 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +6 -10 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/sonicvibes.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +10 -42 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +7 -12 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +5 -13 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -11 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -11 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +7 -15 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +9 -14 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +6 -42 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +13 -42 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +16 -44 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/07/15 08:43:28+02:00 perex@suse.cz +7 -21 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/07/15 08:43:28+02:00 perex@suse.cz +0 -4 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +11 -40 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/fm801.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +5 -10 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -11 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/es1938.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +5 -50 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +5 -10 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +7 -9 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +11 -25 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -10 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/bt87x.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +4 -12 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/azt3328.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -50 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +8 -13 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +8 -14 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/als4000.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +6 -11 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/07/15 08:43:27+02:00 perex@suse.cz +7 -10 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # include/sound/trident.h # 2004/07/15 08:43:26+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/07/15 08:43:26+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/15 14:43:26 # C:EMU10K1/EMU10K2 driver,Trident driver,ALS4000 driver,ATIIXP driver # C:ATIIXP-modem driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:ALI5451 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,RME HDSP driver,RME9652 driver,Digigram VX222 driver # F:include/emu10k1.h:1.43->1.44 # F:include/trident.h:1.19->1.20 # F:pci/als4000.c:1.36->1.37 # F:pci/atiixp.c:1.17->1.18 # F:pci/atiixp_modem.c:1.2->1.3 # F:pci/azt3328.c:1.16->1.17 # F:pci/bt87x.c:1.8->1.9 # F:pci/cmipci.c:1.71->1.72 # F:pci/cs4281.c:1.60->1.61 # F:pci/ens1370.c:1.65->1.66 # F:pci/es1938.c:1.39->1.40 # F:pci/es1968.c:1.73->1.74 # F:pci/fm801.c:1.50->1.51 # F:pci/intel8x0.c:1.147->1.148 # F:pci/intel8x0m.c:1.11->1.12 # F:pci/maestro3.c:1.57->1.58 # F:pci/rme32.c:1.40->1.41 # F:pci/rme96.c:1.40->1.41 # F:pci/sonicvibes.c:1.38->1.39 # F:pci/via82xx.c:1.111->1.112 # F:pci/ali5451/ali5451.c:1.54->1.55 # F:pci/emu10k1/emu10k1_main.c:1.36->1.37 # F:pci/ice1712/ice1712.c:1.58->1.59 # F:pci/ice1712/ice1712.h:1.22->1.23 # F:pci/ice1712/ice1724.c:1.40->1.41 # F:pci/korg1212/korg1212.c:1.43->1.44 # F:pci/mixart/mixart.c:1.13->1.14 # F:pci/rme9652/hdsp.c:1.63->1.64 # F:pci/rme9652/rme9652.c:1.49->1.50 # F:pci/trident/trident_main.c:1.62->1.63 # F:pci/vx222/vx222.c:1.7->1.8 # F:pci/vx222/vx222.h:1.1->1.2 # L:Clean up the PCI resource allocation. # L: # L:Replaced the manual resource allocations with request_[mem_]region() # L:with pci_request_regions(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:43:47+02:00 perex@suse.cz # ALSA CVS update # ALI5451 driver # Fixed the suspend/resume. # # The suspend callback wasn't set the power state correctly, so # the resume process was skipped. # # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/07/15 04:21:50+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/15 10:21:50 # C:ALI5451 driver # F:pci/ali5451/ali5451.c:1.53->1.54 # L:Fixed the suspend/resume. # L: # L:The suspend callback wasn't set the power state correctly, so # L:the resume process was skipped. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:43:07+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Fixed the detection of Audigy 2 ZS. # # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2004/07/15 04:19:17+02:00 perex@suse.cz +9 -6 # ALSA CVS update # D:2004/07/15 10:19:17 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emu10k1_main.c:1.35->1.36 # L:Fixed the detection of Audigy 2 ZS. # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:42:29+02:00 perex@suse.cz # ALSA CVS update # ALSA sequencer # Fixed the bad check on copy_from_user() return value # # Signed-off-by: Mika Kukkonen # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_memory.c # 2004/07/15 04:13:36+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/15 10:13:36 # C:ALSA sequencer # F:core/seq/seq_memory.c:1.16->1.17 # L:Fixed the bad check on copy_from_user() return value # Signed-off-by: Mika Kukkonen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:41:49+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Added the ac97_quirk entry for ECS K7VTA3 v8.0 mobo. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/15 04:10:40+02:00 perex@suse.cz +6 -0 # ALSA CVS update # D:2004/07/15 10:10:40 # C:VIA82xx driver # F:pci/via82xx.c:1.110->1.111 # L:Added the ac97_quirk entry for ECS K7VTA3 v8.0 mobo. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:41:09+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Enable low latency EFX capture on emu10k1 # # The following patch fixes EFX capture on the emu10k1. The # capture_period_sizes table is in bytes, but the hardware constraint was # being set in frames. # # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/07/14 11:14:54+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/14 17:14:54 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.30->1.31 # L:Enable low latency EFX capture on emu10k1 # L: # L:The following patch fixes EFX capture on the emu10k1. The # L:capture_period_sizes table is in bytes, but the hardware constraint was # L:being set in frames. # Signed-off-by: Lee Revell # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:40:28+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver # Fixed the detection of sample rates with no VRA support. # # - Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT # supported. # - In the case of no_vra=1, only 48k is set as the possible rates in # snd_ac97_pcm_assign(). # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/14 10:37:32+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/14 16:37:32 # C:AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver # F:include/ac97_codec.h:1.48->1.49 # F:pci/intel8x0.c:1.146->1.147 # F:pci/intel8x0m.c:1.10->1.11 # F:pci/ac97/ac97_pcm.c:1.15->1.16 # L:Fixed the detection of sample rates with no VRA support. # L: # L:- Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT # L: supported. # L:- In the case of no_vra=1, only 48k is set as the possible rates in # L: snd_ac97_pcm_assign(). # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/14 10:37:32+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/14 16:37:32 # C:AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver # F:include/ac97_codec.h:1.48->1.49 # F:pci/intel8x0.c:1.146->1.147 # F:pci/intel8x0m.c:1.10->1.11 # F:pci/ac97/ac97_pcm.c:1.15->1.16 # L:Fixed the detection of sample rates with no VRA support. # L: # L:- Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT # L: supported. # L:- In the case of no_vra=1, only 48k is set as the possible rates in # L: snd_ac97_pcm_assign(). # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_pcm.c # 2004/07/14 10:37:33+02:00 perex@suse.cz +4 -1 # ALSA CVS update # D:2004/07/14 16:37:32 # C:AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver # F:include/ac97_codec.h:1.48->1.49 # F:pci/intel8x0.c:1.146->1.147 # F:pci/intel8x0m.c:1.10->1.11 # F:pci/ac97/ac97_pcm.c:1.15->1.16 # L:Fixed the detection of sample rates with no VRA support. # L: # L:- Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT # L: supported. # L:- In the case of no_vra=1, only 48k is set as the possible rates in # L: snd_ac97_pcm_assign(). # Signed-off-by: Takashi Iwai # # include/sound/ac97_codec.h # 2004/07/14 10:37:32+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/14 16:37:32 # C:AC97 Codec Core,Intel8x0 driver,Intel8x0-modem driver # F:include/ac97_codec.h:1.48->1.49 # F:pci/intel8x0.c:1.146->1.147 # F:pci/intel8x0m.c:1.10->1.11 # F:pci/ac97/ac97_pcm.c:1.15->1.16 # L:Fixed the detection of sample rates with no VRA support. # L: # L:- Changed ac97bus->vra to ac97bus->no_vra to indicate the VRA is NOT # L: supported. # L:- In the case of no_vra=1, only 48k is set as the possible rates in # L: snd_ac97_pcm_assign(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:39:42+02:00 perex@suse.cz # ALSA CVS update # ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # USB generic driver # Clean up spinlocks. # # - Removed superfluous spinlocks. # - Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # - Make sure that prepare callback be non-atomic. # - Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2004/07/14 10:33:21+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/07/14 10:33:21+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci_main.c # 2004/07/14 10:33:21+02:00 perex@suse.cz +34 -51 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +9 -13 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2004/07/14 10:33:21+02:00 perex@suse.cz +36 -49 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/sonicvibes.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +16 -24 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/07/14 10:33:20+02:00 perex@suse.cz +43 -62 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/07/14 10:33:20+02:00 perex@suse.cz +58 -86 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +61 -85 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +43 -58 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/07/14 10:33:20+02:00 perex@suse.cz +10 -16 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/07/14 10:33:20+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +11 -16 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/07/14 10:33:20+02:00 perex@suse.cz +23 -33 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +16 -18 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/07/14 10:33:19+02:00 perex@suse.cz +37 -17 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/07/14 10:33:19+02:00 perex@suse.cz +10 -10 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/fm801.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +16 -22 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +22 -33 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +17 -23 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +14 -22 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +17 -22 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +44 -65 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/bt87x.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +12 -20 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/azt3328.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +14 -23 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +10 -12 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/als4000.c # 2004/07/14 10:33:17+02:00 perex@suse.cz +14 -20 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/07/14 10:33:18+02:00 perex@suse.cz +3 -4 # ALSA CVS update # D:2004/07/14 16:33:17 # C:ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver # C:BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver # C:ES1968 driver,FM801 driver,Intel8x0 driver,Maestro3 driver,RME32 driver # C:RME96 driver,SonicVibes driver,VIA82xx driver,ALI5451 driver # C:CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:KORG1212 driver,MIXART driver,NM256 driver,RME HDSP driver # C:RME9652 driver,Trident driver,YMFPCI driver,PPC PMAC driver # C:USB generic driver # F:pci/als4000.c:1.35->1.36 # F:pci/atiixp.c:1.16->1.17 # F:pci/atiixp_modem.c:1.1->1.2 # F:pci/azt3328.c:1.15->1.16 # F:pci/bt87x.c:1.7->1.8 # F:pci/cmipci.c:1.70->1.71 # F:pci/cs4281.c:1.59->1.60 # F:pci/ens1370.c:1.64->1.65 # F:pci/es1968.c:1.72->1.73 # F:pci/fm801.c:1.49->1.50 # F:pci/intel8x0.c:1.145->1.146 # F:pci/maestro3.c:1.56->1.57 # F:pci/rme32.c:1.39->1.40 # F:pci/rme96.c:1.39->1.40 # F:pci/sonicvibes.c:1.37->1.38 # F:pci/via82xx.c:1.109->1.110 # F:pci/ali5451/ali5451.c:1.52->1.53 # F:pci/cs46xx/cs46xx_lib.c:1.79->1.80 # F:pci/emu10k1/emupcm.c:1.29->1.30 # F:pci/ice1712/ice1712.c:1.57->1.58 # F:pci/ice1712/ice1724.c:1.39->1.40 # F:pci/korg1212/korg1212.c:1.42->1.43 # F:pci/mixart/mixart.c:1.12->1.13 # F:pci/nm256/nm256.c:1.46->1.47 # F:pci/rme9652/hdsp.c:1.62->1.63 # F:pci/rme9652/rme9652.c:1.48->1.49 # F:pci/trident/trident_main.c:1.61->1.62 # F:pci/ymfpci/ymfpci_main.c:1.54->1.55 # F:ppc/pmac.c:1.32->1.33 # F:usb/usbaudio.c:1.105->1.106 # L:Clean up spinlocks. # L: # L:- Removed superfluous spinlocks. # L:- Replaced spin_lock_irqsave() with spin_lock_irq() in the obvious places. # L:- Make sure that prepare callback be non-atomic. # L:- Removed SNDRV_PCM_INFO_NONATOMIC_OPS flag (which is default now). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:38:54+02:00 perex@suse.cz # ALSA CVS update # Documentation,PCM Midlevel # Changed the atomicity of PCM prepare callback. # # The PCM prepare callback is now non-atomic, so that the driver can # use the functions calling schedule (e.g. kmalloc with GFP_KERNEL). # # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/07/14 10:30:37+02:00 perex@suse.cz +34 -57 # ALSA CVS update # D:2004/07/14 16:30:37 # C:Documentation,PCM Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.34->1.35 # F:core/pcm_lib.c:1.54->1.55 # F:core/pcm_native.c:1.99->1.100 # L:Changed the atomicity of PCM prepare callback. # L: # L:The PCM prepare callback is now non-atomic, so that the driver can # L:use the functions calling schedule (e.g. kmalloc with GFP_KERNEL). # Signed-off-by: Takashi Iwai # # sound/core/pcm_lib.c # 2004/07/14 10:30:37+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/07/14 16:30:37 # C:Documentation,PCM Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.34->1.35 # F:core/pcm_lib.c:1.54->1.55 # F:core/pcm_native.c:1.99->1.100 # L:Changed the atomicity of PCM prepare callback. # L: # L:The PCM prepare callback is now non-atomic, so that the driver can # L:use the functions calling schedule (e.g. kmalloc with GFP_KERNEL). # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/14 10:30:37+02:00 perex@suse.cz +13 -7 # ALSA CVS update # D:2004/07/14 16:30:37 # C:Documentation,PCM Midlevel # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.34->1.35 # F:core/pcm_lib.c:1.54->1.55 # F:core/pcm_native.c:1.99->1.100 # L:Changed the atomicity of PCM prepare callback. # L: # L:The PCM prepare callback is now non-atomic, so that the driver can # L:use the functions calling schedule (e.g. kmalloc with GFP_KERNEL). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:38:13+02:00 perex@suse.cz # ALSA CVS update # CS46xx driver # Fixed a compile warning in the debug code. # # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/13 11:19:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/13 17:19:24 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.78->1.79 # L:Fixed a compile warning in the debug code. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:37:33+02:00 perex@suse.cz # ALSA CVS update # Intel8x0-modem driver # Added -MODEM suffix to the driver name string to distinguish from the # intel8x0 audio driver. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/12 11:20:01+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/07/12 17:20:01 # C:Intel8x0-modem driver # F:pci/intel8x0m.c:1.9->1.10 # L:Added -MODEM suffix to the driver name string to distinguish from the # L:intel8x0 audio driver. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:36:54+02:00 perex@suse.cz # ALSA CVS update # Control Midlevel # Fixed the unbalanced spinlock in the error path. # # Signed-off-by: Takashi Iwai # # sound/core/control.c # 2004/07/12 10:31:48+02:00 perex@suse.cz +3 -2 # ALSA CVS update # D:2004/07/12 16:31:48 # C:Control Midlevel # F:core/control.c:1.46->1.47 # L:Fixed the unbalanced spinlock in the error path. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:36:14+02:00 perex@suse.cz # ALSA CVS update # Memalloc module # Mark the allocated DMA pages as reserved for certain architectures. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/07/12 10:31:05+02:00 perex@suse.cz +28 -12 # ALSA CVS update # D:2004/07/12 16:31:05 # C:Memalloc module # F:core/memalloc.c:1.34->1.35 # L:Mark the allocated DMA pages as reserved for certain architectures. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:35:35+02:00 perex@suse.cz # ALSA CVS update # Documentation,PCI drivers,ATIIXP-modem driver # Added snd-atiixp driver for ATI IXP AC97 modem controllers. # # Signed-off-by: Takashi Iwai # # sound/pci/Makefile # 2004/07/12 09:13:58+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/07/12 15:13:58 # C:Documentation,PCI drivers,ATIIXP-modem driver # F:Documentation/ALSA-Configuration.txt:1.47->1.48 # F:pci/Kconfig:1.28->1.29 # F:pci/Makefile:1.16->1.17 # F:pci/atiixp_modem.c:INITIAL->1.1 # L:Added snd-atiixp driver for ATI IXP AC97 modem controllers. # Signed-off-by: Takashi Iwai # # sound/pci/Kconfig # 2004/07/12 09:13:58+02:00 perex@suse.cz +8 -0 # ALSA CVS update # D:2004/07/12 15:13:58 # C:Documentation,PCI drivers,ATIIXP-modem driver # F:Documentation/ALSA-Configuration.txt:1.47->1.48 # F:pci/Kconfig:1.28->1.29 # F:pci/Makefile:1.16->1.17 # F:pci/atiixp_modem.c:INITIAL->1.1 # L:Added snd-atiixp driver for ATI IXP AC97 modem controllers. # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/07/12 09:13:58+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/07/12 15:13:58 # C:Documentation,PCI drivers,ATIIXP-modem driver # F:Documentation/ALSA-Configuration.txt:1.47->1.48 # F:pci/Kconfig:1.28->1.29 # F:pci/Makefile:1.16->1.17 # F:pci/atiixp_modem.c:INITIAL->1.1 # L:Added snd-atiixp driver for ATI IXP AC97 modem controllers. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/28 10:46:36+02:00 perex@suse.cz +1364 -0 # ALSA CVS update # D:2004/07/12 15:13:58 # C:Documentation,PCI drivers,ATIIXP-modem driver # F:Documentation/ALSA-Configuration.txt:1.47->1.48 # F:pci/Kconfig:1.28->1.29 # F:pci/Makefile:1.16->1.17 # F:pci/atiixp_modem.c:INITIAL->1.1 # L:Added snd-atiixp driver for ATI IXP AC97 modem controllers. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp_modem.c # 2004/07/28 10:46:36+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/atiixp_modem.c # # ChangeSet # 2004/07/28 11:34:52+02:00 perex@suse.cz # ALSA CVS update # ATIIXP driver # Fixed a typo in the check of buffer/period size configuration. # # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/12 09:13:06+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/12 15:13:06 # C:ATIIXP driver # F:pci/atiixp.c:1.15->1.16 # L:Fixed a typo in the check of buffer/period size configuration. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:34:13+02:00 perex@suse.cz # ALSA CVS update # RME HDSP driver # ALSA rme9652/hdsp: remove inlines # # The patch below removes all inlines from hdsp.c. As a side effect, it # showed that snd_hdsp_9652_disable_mixer() is completely unused, and it's # therefore also removed in the patch. # # Signed-off-by: Adrian Bunk # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/07/12 09:12:20+02:00 perex@suse.cz +32 -38 # ALSA CVS update # D:2004/07/12 15:12:20 # C:RME HDSP driver # F:pci/rme9652/hdsp.c:1.61->1.62 # L:ALSA rme9652/hdsp: remove inlines # L: # L:The patch below removes all inlines from hdsp.c. As a side effect, it # L:showed that snd_hdsp_9652_disable_mixer() is completely unused, and it's # L:therefore also removed in the patch. # Signed-off-by: Adrian Bunk # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:33:33+02:00 perex@suse.cz # ALSA CVS update # Documentation # fix typo # # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/12 03:27:41+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/07/12 09:27:41 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.33->1.34 # L:fix typo # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:32:54+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS emulation # fix missing semaphore release in snd_mixer_oss_build_input() # # Signed-off-by: Clemens Ladisch # # sound/core/oss/mixer_oss.c # 2004/07/06 03:03:52+02:00 perex@suse.cz +3 -1 # ALSA CVS update # D:2004/07/06 09:03:52 # C:ALSA<-OSS emulation # F:core/oss/mixer_oss.c:1.32->1.33 # L:fix missing semaphore release in snd_mixer_oss_build_input() # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:32:11+02:00 perex@suse.cz # ALSA CVS update # Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # NM256 driver,Trident driver,YMFPCI driver # replace ac97_t template with ac97_template_t # # Signed-off-by: Clemens Ladisch # # sound/pci/ymfpci/ymfpci_main.c # 2004/07/05 10:07:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/via82xx.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/trident/trident_main.c # 2004/07/05 10:07:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/nm256/nm256.c # 2004/07/05 10:07:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/maestro3.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0m.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +2 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +18 -6 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/ice1712/ice1724.c # 2004/07/05 10:07:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/ice1712/ice1712.c # 2004/07/05 10:07:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/fm801.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/es1968.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/ens1370.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/emu10k1/emumixer.c # 2004/07/05 10:07:23+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/au88x0/au88x0_mixer.c # 2004/07/05 10:07:23+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/atiixp.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/ali5451/ali5451.c # 2004/07/05 10:07:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/07/05 10:07:02+02:00 perex@suse.cz +16 -11 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/07/05 10:06:12+02:00 perex@suse.cz +13 -1 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/05 10:06:34+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/05 16:06:34 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver # C:NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.32->1.33 # F:include/ac97_codec.h:1.47->1.48 # F:pci/atiixp.c:1.14->1.15 # F:pci/cs4281.c:1.58->1.59 # F:pci/ens1370.c:1.63->1.64 # F:pci/es1968.c:1.71->1.72 # F:pci/fm801.c:1.48->1.49 # F:pci/intel8x0.c:1.144->1.145 # F:pci/intel8x0m.c:1.8->1.9 # F:pci/maestro3.c:1.55->1.56 # F:pci/via82xx.c:1.108->1.109 # F:pci/ac97/ac97_codec.c:1.140->1.141 # F:pci/ali5451/ali5451.c:1.51->1.52 # F:pci/au88x0/au88x0_mixer.c:1.2->1.3 # F:pci/emu10k1/emumixer.c:1.24->1.25 # F:pci/ice1712/ice1712.c:1.56->1.57 # F:pci/ice1712/ice1724.c:1.38->1.39 # F:pci/nm256/nm256.c:1.45->1.46 # F:pci/trident/trident_main.c:1.60->1.61 # F:pci/ymfpci/ymfpci_main.c:1.53->1.54 # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:31:26+02:00 perex@suse.cz # ALSA CVS update # CS46xx driver # change codec index computation in snd_cs46xx_read/write; # replace ac97_t template with ac97_template_t # # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/05 10:05:49+02:00 perex@suse.cz +30 -34 # ALSA CVS update # D:2004/07/05 16:05:49 # C:CS46xx driver # F:pci/cs46xx/cs46xx_lib.c:1.77->1.78 # L:change codec index computation in snd_cs46xx_read/write; # L:replace ac97_t template with ac97_template_t # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:30:46+02:00 perex@suse.cz # ALSA CVS update # Memalloc module # - Don't mark pages from dma_alloc_coherent as reserved. # The pages from __get_free_pages() are still marked as reserved, but this could # be also unnecessary. # - Fixed a typo in comment. # - Fixed the pre-allocated buffer size for rme9652 & hdsp. # # Signed-off-by: Takashi Iwai # # sound/core/memalloc.c # 2004/07/05 08:12:12+02:00 perex@suse.cz +28 -24 # ALSA CVS update # D:2004/07/05 14:12:12 # C:Memalloc module # F:core/memalloc.c:1.33->1.34 # L:- Don't mark pages from dma_alloc_coherent as reserved. # L: The pages from __get_free_pages() are still marked as reserved, but this could # L: be also unnecessary. # L:- Fixed a typo in comment. # L:- Fixed the pre-allocated buffer size for rme9652 & hdsp. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:30:06+02:00 perex@suse.cz # ALSA CVS update # Documentation # Fixed missing . # # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/05 05:46:45+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/07/05 11:46:45 # C:Documentation # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.31->1.32 # L:Fixed missing . # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:29:26+02:00 perex@suse.cz # ALSA CVS update # ALSA Core # Fixed compile warnings withoug CONFIG_PM. # # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/07/05 05:43:26+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/05 11:43:26 # C:ALSA Core # F:include/core.h:1.54->1.55 # L:Fixed compile warnings withoug CONFIG_PM. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:28:47+02:00 perex@suse.cz # ALSA CVS update # Documentation # Removed obsolete sndmagic.h. # # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl # 2004/07/05 05:42:54+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/05 11:42:54 # C:Documentation # F:Documentation/DocBook/alsa-driver-api.tmpl:1.5->1.6 # L:Removed obsolete sndmagic.h. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/28 11:28:03+02:00 perex@suse.cz # ALSA CVS update # Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # move AC'97 bus callbacks into seperate ops record; # remove ac97_bus_t template requirement from snd_ac97_bus() # # Signed-off-by: Clemens Ladisch # # sound/pci/ymfpci/ymfpci_main.c # 2004/07/05 03:09:14+02:00 perex@suse.cz +6 -7 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/via82xx.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +8 -9 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/trident/trident_main.c # 2004/07/05 03:09:14+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/nm256/nm256.c # 2004/07/05 03:09:14+02:00 perex@suse.cz +7 -6 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/maestro3.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0m.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +11 -12 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +20 -16 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/ice1712/ice1724.c # 2004/07/05 03:09:13+02:00 perex@suse.cz +7 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/ice1712/ice1712.c # 2004/07/05 03:09:13+02:00 perex@suse.cz +12 -10 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/fm801.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +6 -7 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/es1968.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/ens1370.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/emu10k1/emumixer.c # 2004/07/05 03:09:13+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/05 03:09:13+02:00 perex@suse.cz +9 -10 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/cs4281.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +6 -7 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/au88x0/au88x0_mixer.c # 2004/07/05 03:09:12+02:00 perex@suse.cz +6 -5 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/atiixp.c # 2004/07/05 03:09:11+02:00 perex@suse.cz +7 -7 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/ali5451/ali5451.c # 2004/07/05 03:09:12+02:00 perex@suse.cz +6 -7 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_codec.c # 2004/07/05 03:09:12+02:00 perex@suse.cz +42 -40 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # include/sound/ac97_codec.h # 2004/07/05 03:09:03+02:00 perex@suse.cz +8 -3 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/05 03:09:02+02:00 perex@suse.cz +15 -14 # ALSA CVS update # D:2004/07/05 09:09:02 # C:Documentation,AC97 Codec Core,ATIIXP driver,CS4281 driver # C:ENS1370/1+ driver,ES1968 driver,FM801 driver,Intel8x0 driver # C:Intel8x0-modem driver,Maestro3 driver,VIA82xx driver,ALI5451 driver # C:au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver,ICE1712 driver # C:ICE1724 driver,NM256 driver,Trident driver,YMFPCI driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.30->1.31 # F:include/ac97_codec.h:1.46->1.47 # F:pci/atiixp.c:1.13->1.14 # F:pci/cs4281.c:1.57->1.58 # F:pci/ens1370.c:1.62->1.63 # F:pci/es1968.c:1.70->1.71 # F:pci/fm801.c:1.47->1.48 # F:pci/intel8x0.c:1.143->1.144 # F:pci/intel8x0m.c:1.7->1.8 # F:pci/maestro3.c:1.54->1.55 # F:pci/via82xx.c:1.107->1.108 # F:pci/ac97/ac97_codec.c:1.139->1.140 # F:pci/ali5451/ali5451.c:1.50->1.51 # F:pci/au88x0/au88x0_mixer.c:1.1->1.2 # F:pci/cs46xx/cs46xx_lib.c:1.76->1.77 # F:pci/emu10k1/emumixer.c:1.23->1.24 # F:pci/ice1712/ice1712.c:1.55->1.56 # F:pci/ice1712/ice1724.c:1.37->1.38 # F:pci/nm256/nm256.c:1.44->1.45 # F:pci/trident/trident_main.c:1.59->1.60 # F:pci/ymfpci/ymfpci_main.c:1.52->1.53 # L:move AC'97 bus callbacks into seperate ops record; # L:remove ac97_bus_t template requirement from snd_ac97_bus() # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:27:18+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # allow USB MIDI devices without audio control interface # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/07/05 02:51:45+02:00 perex@suse.cz +17 -1 # ALSA CVS update # D:2004/07/05 08:51:45 # C:USB generic driver # F:usb/usbquirks.h:1.34->1.35 # L:allow USB MIDI devices without audio control interface # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:26:39+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # fix odd comment :) # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ac97_proc.c # 2004/07/05 02:49:24+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 08:49:24 # C:AC97 Codec Core # F:pci/ac97/ac97_proc.c:1.9->1.10 # L:fix odd comment :) # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:26:00+02:00 perex@suse.cz # ALSA CVS update # AMD InterWave driver # reduce stack usage; # fix ROM checksum check # # Signed-off-by: Clemens Ladisch # # sound/isa/gus/interwave.c # 2004/07/05 02:46:49+02:00 perex@suse.cz +14 -18 # ALSA CVS update # D:2004/07/05 08:46:49 # C:AMD InterWave driver # F:isa/gus/interwave.c:1.34->1.35 # L:reduce stack usage; # L:fix ROM checksum check # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:25:21+02:00 perex@suse.cz # ALSA CVS update # GUS Library,Wavefront drivers # reduce stack usage; # fix buffer overflow # # Signed-off-by: Clemens Ladisch # # sound/isa/wavefront/wavefront_fx.c # 2004/07/05 02:48:42+02:00 perex@suse.cz +14 -6 # ALSA CVS update # D:2004/07/05 08:44:58 # C:GUS Library,Wavefront drivers # F:isa/gus/gus_dram.c:1.6->1.7 # F:isa/wavefront/wavefront_fx.c:1.13->1.14 # L:reduce stack usage; # L:fix buffer overflow # Signed-off-by: Clemens Ladisch # # sound/isa/gus/gus_dram.c # 2004/07/05 02:44:58+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/07/05 08:44:58 # C:GUS Library,Wavefront drivers # F:isa/gus/gus_dram.c:1.6->1.7 # F:isa/wavefront/wavefront_fx.c:1.13->1.14 # L:reduce stack usage; # L:fix buffer overflow # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:24:42+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # fix memory leak # # Signed-off-by: Clemens Ladisch # # sound/core/pcm_lib.c # 2004/07/05 02:43:28+02:00 perex@suse.cz +9 -13 # ALSA CVS update # D:2004/07/05 08:43:28 # C:PCM Midlevel # F:core/pcm_lib.c:1.53->1.54 # L:fix memory leak # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:24:02+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # remove whitespace at end of lines # # Signed-off-by: Clemens Ladisch # # sound/usb/usbmixer_maps.c # 2004/07/05 02:37:07+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/05 08:37:07 # C:USB generic driver # F:usb/usbaudio.c:1.104->1.105 # F:usb/usbaudio.h:1.32->1.33 # F:usb/usbmidi.c:1.30->1.31 # F:usb/usbmixer.c:1.28->1.29 # F:usb/usbmixer_maps.c:1.6->1.7 # L:remove whitespace at end of lines # Signed-off-by: Clemens Ladisch # # sound/usb/usbmixer.c # 2004/07/05 02:37:07+02:00 perex@suse.cz +10 -10 # ALSA CVS update # D:2004/07/05 08:37:07 # C:USB generic driver # F:usb/usbaudio.c:1.104->1.105 # F:usb/usbaudio.h:1.32->1.33 # F:usb/usbmidi.c:1.30->1.31 # F:usb/usbmixer.c:1.28->1.29 # F:usb/usbmixer_maps.c:1.6->1.7 # L:remove whitespace at end of lines # Signed-off-by: Clemens Ladisch # # sound/usb/usbmidi.c # 2004/07/05 02:37:07+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/07/05 08:37:07 # C:USB generic driver # F:usb/usbaudio.c:1.104->1.105 # F:usb/usbaudio.h:1.32->1.33 # F:usb/usbmidi.c:1.30->1.31 # F:usb/usbmixer.c:1.28->1.29 # F:usb/usbmixer_maps.c:1.6->1.7 # L:remove whitespace at end of lines # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/07/05 02:37:07+02:00 perex@suse.cz +3 -2 # ALSA CVS update # D:2004/07/05 08:37:07 # C:USB generic driver # F:usb/usbaudio.c:1.104->1.105 # F:usb/usbaudio.h:1.32->1.33 # F:usb/usbmidi.c:1.30->1.31 # F:usb/usbmixer.c:1.28->1.29 # F:usb/usbmixer_maps.c:1.6->1.7 # L:remove whitespace at end of lines # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/07/05 02:37:07+02:00 perex@suse.cz +22 -22 # ALSA CVS update # D:2004/07/05 08:37:07 # C:USB generic driver # F:usb/usbaudio.c:1.104->1.105 # F:usb/usbaudio.h:1.32->1.33 # F:usb/usbmidi.c:1.30->1.31 # F:usb/usbmixer.c:1.28->1.29 # F:usb/usbmixer_maps.c:1.6->1.7 # L:remove whitespace at end of lines # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:23:20+02:00 perex@suse.cz # ALSA CVS update # Generic drivers,AK4531 codec # One space at the end of a line is evil. # So how do we call it if a line has 300 of them? :) # # Signed-off-by: Clemens Ladisch # # sound/pci/ac97/ak4531_codec.c # 2004/07/05 02:34:36+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/07/05 08:34:35 # C:Generic drivers,AK4531 codec # F:drivers/dummy.c:1.30->1.31 # F:pci/ac97/ak4531_codec.c:1.11->1.12 # L:One space at the end of a line is evil. # L:So how do we call it if a line has 300 of them? :) # Signed-off-by: Clemens Ladisch # # sound/drivers/dummy.c # 2004/07/05 02:34:35+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/07/05 08:34:35 # C:Generic drivers,AK4531 codec # F:drivers/dummy.c:1.30->1.31 # F:pci/ac97/ak4531_codec.c:1.11->1.12 # L:One space at the end of a line is evil. # L:So how do we call it if a line has 300 of them? :) # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:22:41+02:00 perex@suse.cz # ALSA CVS update # OPL4 # reorganize locking; # optimize memory accesses # # Signed-off-by: Clemens Ladisch # # sound/drivers/opl4/opl4_synth.c # 2004/07/05 02:32:29+02:00 perex@suse.cz +16 -9 # ALSA CVS update # D:2004/07/05 08:32:29 # C:OPL4 # F:drivers/opl4/opl4_lib.c:1.7->1.8 # F:drivers/opl4/opl4_local.h:1.2->1.3 # F:drivers/opl4/opl4_mixer.c:1.2->1.3 # F:drivers/opl4/opl4_synth.c:1.4->1.5 # L:reorganize locking; # L:optimize memory accesses # Signed-off-by: Clemens Ladisch # # sound/drivers/opl4/opl4_mixer.c # 2004/07/05 02:32:29+02:00 perex@suse.cz +7 -3 # ALSA CVS update # D:2004/07/05 08:32:29 # C:OPL4 # F:drivers/opl4/opl4_lib.c:1.7->1.8 # F:drivers/opl4/opl4_local.h:1.2->1.3 # F:drivers/opl4/opl4_mixer.c:1.2->1.3 # F:drivers/opl4/opl4_synth.c:1.4->1.5 # L:reorganize locking; # L:optimize memory accesses # Signed-off-by: Clemens Ladisch # # sound/drivers/opl4/opl4_local.h # 2004/07/05 02:32:29+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/05 08:32:29 # C:OPL4 # F:drivers/opl4/opl4_lib.c:1.7->1.8 # F:drivers/opl4/opl4_local.h:1.2->1.3 # F:drivers/opl4/opl4_mixer.c:1.2->1.3 # F:drivers/opl4/opl4_synth.c:1.4->1.5 # L:reorganize locking; # L:optimize memory accesses # Signed-off-by: Clemens Ladisch # # sound/drivers/opl4/opl4_lib.c # 2004/07/05 02:32:29+02:00 perex@suse.cz +28 -22 # ALSA CVS update # D:2004/07/05 08:32:29 # C:OPL4 # F:drivers/opl4/opl4_lib.c:1.7->1.8 # F:drivers/opl4/opl4_local.h:1.2->1.3 # F:drivers/opl4/opl4_mixer.c:1.2->1.3 # F:drivers/opl4/opl4_synth.c:1.4->1.5 # L:reorganize locking; # L:optimize memory accesses # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/28 11:22:00+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # set msbits for 20-bit sample format # # Signed-off-by: Clemens Ladisch # # sound/pci/intel8x0.c # 2004/07/05 02:30:54+02:00 perex@suse.cz +3 -1 # ALSA CVS update # D:2004/07/05 08:30:54 # C:Intel8x0 driver # F:pci/intel8x0.c:1.142->1.143 # L:set msbits for 20-bit sample format # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/07/16 11:08:37-05:00 bunk@fs.tum.de # [PATCH] another small advansys cleanup # # The patch below does the following small cleanups for the advansys # driver: # - remove obsolete maintainer information # - remove kernel 2.2 code from advansys.h # # diffstat output: # MAINTAINERS | 7 # drivers/scsi/advansys.c | 342 +++++++--------------------------------- # drivers/scsi/advansys.h | 26 --- # 3 files changed, 60 insertions(+), 315 deletions(-) # # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/advansys.h # 2004/05/22 07:47:56-05:00 bunk@fs.tum.de +0 -26 # another small advansys cleanup # # drivers/scsi/advansys.c # 2004/05/22 07:47:45-05:00 bunk@fs.tum.de +0 -14 # another small advansys cleanup # # ChangeSet # 2004/07/12 10:38:01-05:00 bunk@fs.tum.de # [PATCH] SCSI ips: remove inlines # # Trying to compile drivers/scsi/ips.c with gcc 3.4 and # # define inline __inline__ __attribute__((always_inline)) # results in the following error: # # <-- snip --> # # ... # CC drivers/scsi/ips.o # drivers/scsi/ips.c: In function `ips_eh_abort': # drivers/scsi/ips.c:490: sorry, unimplemented: inlining failed in call to # 'ips_removeq_copp': function body not available # drivers/scsi/ips.c:843: sorry, unimplemented: called from here # drivers/scsi/ips.c:488: sorry, unimplemented: inlining failed in call to # 'ips_removeq_wait': function body not available # drivers/scsi/ips.c:847: sorry, unimplemented: called from here # make[2]: *** [drivers/scsi/ips.o] Error 1 # # <-- snip --> # # # The patch below removes all inlines from ips.c. As a side effect, this # showed that 3 formerly inlined functions are completely unused which are # also removed in the patch. # # An alternative approach to removing the inlines would be to keep all # inlines that are _really_ required and reorder the functions in the file # accordingly. # # # diffstat output: # drivers/scsi/ips.c | 130 ++++++--------------------------------------- # 1 files changed, 19 insertions(+), 111 deletions(-) # # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/ips.c # 2004/07/08 18:24:02-05:00 bunk@fs.tum.de +19 -111 # SCSI ips: remove inlines # # ChangeSet # 2004/07/11 09:59:38-05:00 akpm@osdl.org # [PATCH] warning fix to include/scsi/scsi_device.h # # From: Mika Kukkonen # # CC [M] drivers/block/cciss.o # In file included from drivers/scsi/scsi.h:27, # from drivers/block/cciss_scsi.c:31, # from drivers/block/cciss.c:188: # include/scsi/scsi_device.h:191: warning: `inline' is not at beginning of declaration # # Another case of reordering the 'inline' and function return value. # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # include/scsi/scsi_device.h # 2004/07/07 11:24:13-05:00 akpm@osdl.org +1 -1 # warning fix to include/scsi/scsi_device.h # # ChangeSet # 2004/07/10 10:54:58-05:00 bunk@fs.tum.de # [PATCH] update contact address for SCSI megaraid.c # # If you send an email to linux-megaraid-devel@dell.com, you get an # automated response to send the mail to linux-scsi@vger.kernel.org # instead. # # The patch below updates megaraid.c accordingly. # # Signed-off-by: Adrian Bunk # Signed-off-by: James Bottomley # # drivers/scsi/megaraid.c # 2004/07/10 10:16:51-05:00 bunk@fs.tum.de +2 -5 # update contact address for SCSI megaraid.c # # ChangeSet # 2004/07/10 10:53:19-05:00 g.liakhovetski@gmx.de # [PATCH] tmscsim: kernel bugzilla bug #2139 # # > Short: The attached patch fixes the bug-report #2139 from kernel bugzilla. # # I wasn't quite convenient with the previous version of the patch, but I # just wanted to get it working at first and get some comments as to whether # the approach (put a workaround vs. blacklisting) is at all valid. Since no # objections arrived, I guess, nobody minds this small trick. So, I am # enclosing a reworked patch, which does essentially the same, but has some # more careful checking, and overall looks saner, than the previous one. # # Signed-off-by: James Bottomley # # ChangeSet # 2004/07/10 10:50:13-05:00 akpm@osdl.org # [PATCH] mptbase.c warning fix # # drivers/message/fusion/mptbase.c: In function `GetIocFacts': # drivers/message/fusion/mptbase.c:2420: warning: int format, different type arg (arg 4) # # Signed-off-by: Andrew Morton # Signed-off-by: James Bottomley # # drivers/message/fusion/mptbase.c # 2004/07/05 10:11:00-05:00 akpm@osdl.org +1 -1 # mptbase.c warning fix # # ChangeSet # 2004/07/10 10:49:20-05:00 jejb@mulgrave.(none) # MPT Fusion driver 3.01.10 update # # From: "Moore, Eric Dean" # # This driver incorporates the patches from Christoph Hellwig # and Masao Fukuchi. # # Changelog of this release: # # * Patch provided by Masao Fukuchi [fukuchi.masao@jp.fujitsu.com] # - mptctl updates for hot plug # # * Patch provided by Christoph Hellwig [hch@infradead.org] # - mptlan updates for hot plug # - remove CONFIG_LBD ifdefs from fusion { mptscsih.c} # # Signed-off-by: James Bottomley # # drivers/message/fusion/mptscsih.c # 2004/07/10 10:49:03-05:00 jejb@mulgrave.(none) +1 -10 # MPT Fusion driver 3.01.10 update # # drivers/message/fusion/mptlan.c # 2004/07/10 10:49:03-05:00 jejb@mulgrave.(none) +74 -78 # MPT Fusion driver 3.01.10 update # # drivers/message/fusion/mptctl.c # 2004/07/10 10:49:03-05:00 jejb@mulgrave.(none) +82 -72 # MPT Fusion driver 3.01.10 update # # drivers/message/fusion/mptbase.h # 2004/07/10 10:49:02-05:00 jejb@mulgrave.(none) +4 -2 # MPT Fusion driver 3.01.10 update # # drivers/message/fusion/mptbase.c # 2004/07/10 10:49:02-05:00 jejb@mulgrave.(none) +0 -2 # MPT Fusion driver 3.01.10 update # # ChangeSet # 2004/07/10 10:42:49-05:00 brking@us.ibm.com # [PATCH] fix scsi_remove_device locking # # The following patch fixes an oops I was seeing on a machine with # misconfigured scsi cables, but could feasibly happen in other paths. # The oops was occurring because scsi_remove_device was getting # called for a device before scsi_add_device had fully completed. # This resulted in sysfs_remove_link being called with a NULL dentry. # # Signed-off-by: Brian King # Signed-off-by: James Bottomley # # drivers/scsi/scsi_sysfs.c # 2004/07/02 15:29:59-05:00 brking@us.ibm.com +7 -1 # fix scsi_remove_device locking # # ChangeSet # 2004/07/10 10:39:57-05:00 markh@osdl.org # [PATCH] aacraid reset handler # # This restores a fix to the aacraid reset handler. It makes sure that # there are no active commands on any attached device before exiting with # SUCCESS. # # Signed-off-by: Mark Haverkamp # Signed-off-by: James Bottomley # # drivers/scsi/aacraid/linit.c # 2004/06/29 13:22:58-05:00 markh@osdl.org +7 -5 # aacraid reset handler # # ChangeSet # 2004/07/10 10:36:32-05:00 rddunlap@osdl.org # [PATCH] fix JAZZ_ESP driver config depends # # Use correct config symbol name for MACH_JAZZ in JAZZ_ESP driver config. # Acked by Ralf. # # Signed-off-by: Randy Dunlap # Signed-off-by: James Bottomley # # drivers/scsi/Kconfig # 2004/06/30 11:35:12-05:00 rddunlap@osdl.org +1 -1 # fix JAZZ_ESP driver config depends # # ChangeSet # 2004/07/10 09:02:15-05:00 jejb@raven.il.steeleye.com # dma_alloc_coherent() still needs to support a NULL device # # Fix the part of the on-chip memory API that broke this. # # Signed-off-by: James Bottomley # # arch/i386/kernel/pci-dma.c # 2004/07/10 09:01:31-05:00 jejb@raven.il.steeleye.com +1 -1 # dma_alloc_coherent() still needs to support a NULL device # # ChangeSet # 2004/07/09 18:06:52-05:00 jejb@raven.il.steeleye.com # Fix region sizing problem in dma_mark_declared_memory_occupied() # # The current code reserves too few pages if addr isn't # page aligned and size just spans onto the last page. # Fix by increasing size by the addr misalignment amount. # # Signed-off-by: James Bottomley # # arch/i386/kernel/pci-dma.c # 2004/07/09 18:06:07-05:00 jejb@raven.il.steeleye.com +1 -1 # Fix region sizing problem in dma_mark_declared_memory_occupied() # # ChangeSet # 2004/07/09 17:16:25-05:00 akpm@osdl.org # [PATCH] Fix sparc compile error in dma-mapping.h # # William Lee Irwin III wrote: # > # > SPLIT include/linux/autoconf.h -> include/config/* # > CHK include/linux/compile.h # > UPD include/linux/compile.h # > In file included from include/asm/sbus.h:10, # > from arch/sparc64/kernel/auxio.c:15: # # It needs err.h. # # Signed-off-by: James Bottomley # # include/linux/dma-mapping.h # 2004/07/09 17:07:13-05:00 akpm@osdl.org +2 -0 # Fix sparc compile error # # ChangeSet # 2004/07/08 15:53:54-05:00 jejb@raven.il.steeleye.com # Fix bug in __get_vm_area() alignment code # # If we are still above the vma start address on the last vma, we can use addr even if it is # inside the vma (i.e. addr < vma->addr + vma->size). Fix this by aligning addr past the # end of the vma in this case # # mm/vmalloc.c # 2004/07/08 15:53:09-05:00 jejb@raven.il.steeleye.com +6 -3 # Fix bug in __get_vm_area() alignment code # # ChangeSet # 2004/07/07 11:46:31-05:00 jejb@raven.il.steeleye.com # Fix incorrect prototype in the dma_declare_coherent_memory API # # dma_mark_declared_memory_occupied() wasn't declared static inline in the NULL (default) # implementation leading to compile failures. # # include/linux/dma-mapping.h # 2004/07/07 11:45:46-05:00 jejb@raven.il.steeleye.com +3 -2 # Fix incorrect prototype in the dma_declare_coherent_memory API # # sound/core/control.c # 2004/07/04 16:27:19+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/07/04 15:55:28+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # - asXtalkGainsAllChan -> vortex_asXtalkGainsAllChan # - fixed extern/static problem # # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_xtalk.h # 2004/07/04 07:47:16+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/04 13:47:16 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.4->1.5 # F:pci/au88x0/au88x0_xtalk.c:1.1->1.2 # F:pci/au88x0/au88x0_xtalk.h:1.1->1.2 # L:- asXtalkGainsAllChan -> vortex_asXtalkGainsAllChan # L:- fixed extern/static problem # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_xtalk.c # 2004/07/04 07:47:16+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/04 13:47:16 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.4->1.5 # F:pci/au88x0/au88x0_xtalk.c:1.1->1.2 # F:pci/au88x0/au88x0_xtalk.h:1.1->1.2 # L:- asXtalkGainsAllChan -> vortex_asXtalkGainsAllChan # L:- fixed extern/static problem # Signed-off-by: Jaroslav Kysela # # sound/pci/au88x0/au88x0_a3d.c # 2004/07/04 07:47:16+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/04 13:47:16 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.4->1.5 # F:pci/au88x0/au88x0_xtalk.c:1.1->1.2 # F:pci/au88x0/au88x0_xtalk.h:1.1->1.2 # L:- asXtalkGainsAllChan -> vortex_asXtalkGainsAllChan # L:- fixed extern/static problem # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/04 15:55:01+02:00 perex@suse.cz # ALSA CVS update # ES1938 driver # # Playing Quake1 (quakeforge-flavor with ALSA-driver) I hear cracks and blibs. # Other apps (xine, mpg321) are fine. The OSS driver in 2.6.7 produces no # cracks (but reverses stereo BTW). # # I fixed it, i.e. it works for me: # # *No swapping of stereo channels # *no cracks # # Signed-off-by: # Signed-off-by: Jaroslav Kysela # # sound/pci/es1938.c # 2004/07/04 06:05:55+02:00 perex@suse.cz +12 -4 # ALSA CVS update # D:2004/07/04 12:05:55 # C:ES1938 driver # F:pci/es1938.c:1.38->1.39 # L: # L:Playing Quake1 (quakeforge-flavor with ALSA-driver) I hear cracks and blibs. # L:Other apps (xine, mpg321) are fine. The OSS driver in 2.6.7 produces no # L:cracks (but reverses stereo BTW). # L: # L:I fixed it, i.e. it works for me: # L: # L:*No swapping of stereo channels # L:*no cracks # Signed-off-by: # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/04 15:54:34+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel,RME32 driver # - Fixed the int types in indirect_pcm helpers. # - Added the missing initialization of fullduplex mode on rme32. # # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/02 08:43:44+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/07/02 14:43:44 # C:PCM Midlevel,RME32 driver # F:include/pcm-indirect.h:1.1->1.2 # F:pci/rme32.c:1.38->1.39 # L:- Fixed the int types in indirect_pcm helpers. # L:- Added the missing initialization of fullduplex mode on rme32. # Signed-off-by: Takashi Iwai # # include/sound/pcm-indirect.h # 2004/07/02 08:43:44+02:00 perex@suse.cz +11 -11 # ALSA CVS update # D:2004/07/02 14:43:44 # C:PCM Midlevel,RME32 driver # F:include/pcm-indirect.h:1.1->1.2 # F:pci/rme32.c:1.38->1.39 # L:- Fixed the int types in indirect_pcm helpers. # L:- Added the missing initialization of fullduplex mode on rme32. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/04 15:54:07+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Clean up the invalid (commented out) lines for emu10k1x. # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2004/07/02 08:22:12+02:00 perex@suse.cz +0 -3 # ALSA CVS update # D:2004/07/02 14:22:12 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emu10k1.c:1.26->1.27 # L:Clean up the invalid (commented out) lines for emu10k1x. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:38:27+02:00 perex@suse.cz # ALSA CVS update # Instrument layer # LD .tmp_vmlinux1 # sound/built-in.o(.text+0xfb4ae): In function nd_gus_synth_new_device': # : undefined reference to nd_seq_iwffff_init' # make: *** [.tmp_vmlinux1] Error 1 # # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Jaroslav Kysela # # sound/core/seq/instr/Makefile # 2004/07/01 10:12:07+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/01 16:12:07 # C:Instrument layer # F:core/seq/instr/Makefile:1.17->1.18 # L: LD .tmp_vmlinux1 # L:sound/built-in.o(.text+0xfb4ae): In function nd_gus_synth_new_device': # L:: undefined reference to nd_seq_iwffff_init' # L:make: *** [.tmp_vmlinux1] Error 1 # Signed-off-by: Adrian Bunk # Signed-off-by: Andrew Morton # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/01 19:38:07+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # # snd_pcm_timer_resolution_change(): # # Right, that function doesn't work well for 44100/1024 in 32 bits -- it # ends up trying to calculate 1e7 * 1024 / 441 and having to divide # both numerator and denominator by 4 (thus losing the rather crucial 1 # at the end of 441) before it can do the calculation without overflow. # # Attached is a patch against 1.0.5a that gets better results in this # instance, by leaving the denominator alone and instead doubling the # result back up by the same number of times as the multiplier had to # be halved by. # # Signed-off-by: Chris Cannam # Signed-off-by: Jaroslav Kysela # # sound/core/pcm_timer.c # 2004/07/01 09:59:38+02:00 perex@suse.cz +4 -3 # ALSA CVS update # D:2004/07/01 15:59:38 # C:PCM Midlevel # F:core/pcm_timer.c:1.8->1.9 # L: # L:snd_pcm_timer_resolution_change(): # L: # L:Right, that function doesn't work well for 44100/1024 in 32 bits -- it # L:ends up trying to calculate 1e7 * 1024 / 441 and having to divide # L:both numerator and denominator by 4 (thus losing the rather crucial 1 # L:at the end of 441) before it can do the calculation without overflow. # L: # L:Attached is a patch against 1.0.5a that gets better results in this # L:instance, by leaving the denominator alone and instead doubling the # L:result back up by the same number of times as the multiplier had to # L:be halved by. # Signed-off-by: Chris Cannam # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/07/01 19:37:46+02:00 perex@suse.cz # ALSA CVS update # RME32 driver # Added the experimental fullduplex support. # # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/01 04:22:49+02:00 perex@suse.cz +336 -205 # ALSA CVS update # D:2004/07/01 10:22:49 # C:RME32 driver # F:pci/rme32.c:1.37->1.38 # L:Added the experimental fullduplex support. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:37:25+02:00 perex@suse.cz # ALSA CVS update # CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # Clean up of indirect PCM data transfer with helper functions. # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/07/01 04:22:16+02:00 perex@suse.cz +32 -72 # ALSA CVS update # D:2004/07/01 10:22:16 # C:CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # F:include/cs46xx.h:1.19->1.20 # F:include/emu10k1.h:1.42->1.43 # F:include/pcm-indirect.h:INITIAL->1.1 # F:pci/cs46xx/cs46xx_lib.c:1.75->1.76 # F:pci/emu10k1/emupcm.c:1.28->1.29 # L:Clean up of indirect PCM data transfer with helper functions. # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/07/01 04:22:16+02:00 perex@suse.cz +27 -102 # ALSA CVS update # D:2004/07/01 10:22:16 # C:CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # F:include/cs46xx.h:1.19->1.20 # F:include/emu10k1.h:1.42->1.43 # F:include/pcm-indirect.h:INITIAL->1.1 # F:pci/cs46xx/cs46xx_lib.c:1.75->1.76 # F:pci/emu10k1/emupcm.c:1.28->1.29 # L:Clean up of indirect PCM data transfer with helper functions. # Signed-off-by: Takashi Iwai # # include/sound/pcm-indirect.h # 2004/07/01 18:07:24+02:00 perex@suse.cz +173 -0 # ALSA CVS update # D:2004/07/01 10:22:16 # C:CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # F:include/cs46xx.h:1.19->1.20 # F:include/emu10k1.h:1.42->1.43 # F:include/pcm-indirect.h:INITIAL->1.1 # F:pci/cs46xx/cs46xx_lib.c:1.75->1.76 # F:pci/emu10k1/emupcm.c:1.28->1.29 # L:Clean up of indirect PCM data transfer with helper functions. # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/07/01 04:22:16+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/07/01 10:22:16 # C:CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # F:include/cs46xx.h:1.19->1.20 # F:include/emu10k1.h:1.42->1.43 # F:include/pcm-indirect.h:INITIAL->1.1 # F:pci/cs46xx/cs46xx_lib.c:1.75->1.76 # F:pci/emu10k1/emupcm.c:1.28->1.29 # L:Clean up of indirect PCM data transfer with helper functions. # Signed-off-by: Takashi Iwai # # include/sound/cs46xx.h # 2004/07/01 04:22:16+02:00 perex@suse.cz +3 -16 # ALSA CVS update # D:2004/07/01 10:22:16 # C:CS46xx driver,EMU10K1/EMU10K2 driver,PCM Midlevel # F:include/cs46xx.h:1.19->1.20 # F:include/emu10k1.h:1.42->1.43 # F:include/pcm-indirect.h:INITIAL->1.1 # F:pci/cs46xx/cs46xx_lib.c:1.75->1.76 # F:pci/emu10k1/emupcm.c:1.28->1.29 # L:Clean up of indirect PCM data transfer with helper functions. # Signed-off-by: Takashi Iwai # # include/sound/pcm-indirect.h # 2004/07/01 18:07:24+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/include/sound/pcm-indirect.h # # ChangeSet # 2004/07/01 19:37:02+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Check the validity of registers before creating controls. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/07/01 04:21:23+02:00 perex@suse.cz +9 -0 # ALSA CVS update # D:2004/07/01 10:21:23 # C:AC97 Codec Core # F:pci/ac97/ac97_codec.c:1.138->1.139 # L:Check the validity of registers before creating controls. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:36:42+02:00 perex@suse.cz # ALSA CVS update # ALSA<-OSS sequencer # Suppress the error message when no device is found. # # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_init.c # 2004/07/01 04:20:50+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/01 10:20:50 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_init.c:1.13->1.14 # L:Suppress the error message when no device is found. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:36:21+02:00 perex@suse.cz # ALSA CVS update # NM256 driver # Added AC97 CD register to the list of allowed registeres. # # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/07/01 04:19:48+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/07/01 10:19:48 # C:NM256 driver # F:pci/nm256/nm256.c:1.42->1.43 # L:Added AC97 CD register to the list of allowed registeres. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:35:59+02:00 perex@suse.cz # ALSA CVS update # SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # PARISC Harmony driver,Sound Core PDAudioCF driver # Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # SPARC cs4231 driver,USB generic driver # Clean up of obsolete MODULE_* stuff (other part) # # Removed MODULE_CLASSES() and MODULE_SYNTAX(). # Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2004/07/01 03:33:43+02:00 perex@suse.cz +1 -9 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/sparc/cs4231.c # 2004/07/01 03:33:43+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/sparc/amd7930.c # 2004/07/01 03:33:43+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/ppc/powermac.c # 2004/07/01 03:33:43+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pcmcia/vx/vxpocket.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/parisc/harmony.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/i2c/l3/uda1341.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +2 -3 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/virmidi.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/serial-u16550.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -13 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_seq.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_lib.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_seq.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/mtpav.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/mpu401/mpu401.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +0 -7 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/drivers/dummy.c # 2004/07/01 03:33:42+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/arm/sa11xx-uda1341.c # 2004/07/01 03:33:41+02:00 perex@suse.cz +2 -3 # ALSA CVS update # D:2004/07/01 09:33:41 # C:SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3,OPL4,L3 drivers # C:PARISC Harmony driver,Sound Core PDAudioCF driver # C:Digigram VX Pocket driver,PPC PowerMac driver,SPARC AMD7930 driver # C:SPARC cs4231 driver,USB generic driver # F:arm/sa11xx-uda1341.c:1.16->1.17 # F:drivers/dummy.c:1.29->1.30 # F:drivers/mtpav.c:1.28->1.29 # F:drivers/serial-u16550.c:1.27->1.28 # F:drivers/virmidi.c:1.13->1.14 # F:drivers/mpu401/mpu401.c:1.18->1.19 # F:drivers/opl3/opl3_seq.c:1.14->1.15 # F:drivers/opl4/opl4_lib.c:1.6->1.7 # F:drivers/opl4/opl4_seq.c:1.5->1.6 # F:i2c/l3/uda1341.c:1.11->1.12 # F:parisc/harmony.c:1.13->1.14 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.8->1.9 # F:pcmcia/vx/vxpocket.c:1.4->1.5 # F:ppc/powermac.c:1.17->1.18 # F:sparc/amd7930.c:1.10->1.11 # F:sparc/cs4231.c:1.14->1.15 # F:usb/usbaudio.c:1.103->1.104 # L:Clean up of obsolete MODULE_* stuff (other part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:35:33+02:00 perex@suse.cz # ALSA CVS update # ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # Trident driver,Digigram VX222 driver,YMFPCI driver # Clean up of obsolete MODULE_* stuff (pci part) # # Removed MODULE_CLASSES() and MODULE_SYNTAX(). # Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci.c # 2004/07/01 03:30:29+02:00 perex@suse.cz +1 -9 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/vx222/vx222.c # 2004/07/01 03:30:29+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/07/01 03:30:24+02:00 perex@suse.cz +1 -10 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident.c # 2004/07/01 03:30:28+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/sonicvibes.c # 2004/07/01 03:30:23+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/07/01 03:30:28+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/07/01 03:30:27+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/07/01 03:30:23+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/07/01 03:30:27+02:00 perex@suse.cz +1 -11 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/07/01 03:30:26+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/07/01 03:30:26+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -9 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/07/01 03:30:26+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/07/01 03:30:26+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ak4xxx.c # 2004/07/01 03:30:25+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/fm801.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/es1938.c # 2004/07/01 03:30:22+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/07/01 03:30:21+02:00 perex@suse.cz +2 -8 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2004/07/01 03:30:25+02:00 perex@suse.cz +1 -11 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx.c # 2004/07/01 03:30:25+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/07/01 03:30:21+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2004/07/01 03:30:21+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/bt87x.c # 2004/07/01 03:30:21+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/azt3328.c # 2004/07/01 03:30:21+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.c # 2004/07/01 03:30:25+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/07/01 03:30:20+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/als4000.c # 2004/07/01 03:30:20+02:00 perex@suse.cz +1 -6 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/07/01 03:30:24+02:00 perex@suse.cz +1 -7 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/07/01 03:30:24+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:30:20 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.34->1.35 # F:pci/atiixp.c:1.12->1.13 # F:pci/azt3328.c:1.14->1.15 # F:pci/bt87x.c:1.6->1.7 # F:pci/cmipci.c:1.69->1.70 # F:pci/cs4281.c:1.56->1.57 # F:pci/ens1370.c:1.61->1.62 # F:pci/es1938.c:1.37->1.38 # F:pci/es1968.c:1.69->1.70 # F:pci/fm801.c:1.46->1.47 # F:pci/intel8x0.c:1.140->1.141 # F:pci/intel8x0m.c:1.6->1.7 # F:pci/maestro3.c:1.53->1.54 # F:pci/rme32.c:1.36->1.37 # F:pci/rme96.c:1.38->1.39 # F:pci/sonicvibes.c:1.36->1.37 # F:pci/via82xx.c:1.106->1.107 # F:pci/ac97/ac97_codec.c:1.137->1.138 # F:pci/ali5451/ali5451.c:1.49->1.50 # F:pci/au88x0/au88x0.c:1.10->1.11 # F:pci/cs46xx/cs46xx.c:1.27->1.28 # F:pci/emu10k1/emu10k1.c:1.25->1.26 # F:pci/ice1712/ak4xxx.c:1.8->1.9 # F:pci/ice1712/ice1712.c:1.54->1.55 # F:pci/ice1712/ice1724.c:1.36->1.37 # F:pci/korg1212/korg1212.c:1.41->1.42 # F:pci/mixart/mixart.c:1.11->1.12 # F:pci/nm256/nm256.c:1.41->1.42 # F:pci/rme9652/hdsp.c:1.60->1.61 # F:pci/rme9652/rme9652.c:1.47->1.48 # F:pci/trident/trident.c:1.24->1.25 # F:pci/vx222/vx222.c:1.6->1.7 # F:pci/ymfpci/ymfpci.c:1.36->1.37 # L:Clean up of obsolete MODULE_* stuff (pci part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:35:06+02:00 perex@suse.cz # ALSA CVS update # ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # GUS Classic driver,GUS Extreme driver,GUS MAX driver # AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # Clean up of obsolete MODULE_* stuff (isa part) # # Removed MODULE_CLASSES() and MODULE_SYNTAX(). # Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # # Signed-off-by: Takashi Iwai # # sound/isa/wavefront/wavefront.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -16 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sscape.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +0 -6 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sgalaxy.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb_common.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb8.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb16_csp.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb16.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +2 -17 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/es968.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -8 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000_synth.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/opti9xx/opti92x-ad1848.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +3 -15 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/opl3sa2.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -15 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/gus/interwave.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +2 -16 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/gus/gusmax.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/gus/gusextreme.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -16 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/gus/gusclassic.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/es18xx.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/es1688/es1688_lib.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/es1688/es1688.c # 2004/07/01 03:29:30+02:00 perex@suse.cz +1 -10 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/dt019x.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -11 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4236.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +2 -16 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4231.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -11 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/cmi8330.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -13 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/azt2320.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -13 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/als100.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/ad1848/ad1848.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -9 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/isa/ad1816a/ad1816a.c # 2004/07/01 03:29:29+02:00 perex@suse.cz +1 -12 # ALSA CVS update # D:2004/07/01 09:29:29 # C:ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver,ES18xx driver # C:OPL3SA2 driver,Sound Galaxy driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,ES1688 driver # C:GUS Classic driver,GUS Extreme driver,GUS MAX driver # C:AMD InterWave driver,Opti9xx drivers,EMU8000 driver,ES968 driver # C:SB16/AWE driver,SB8 driver,SB drivers,Wavefront drivers # F:isa/als100.c:1.26->1.27 # F:isa/azt2320.c:1.26->1.27 # F:isa/cmi8330.c:1.30->1.31 # F:isa/dt019x.c:1.20->1.21 # F:isa/es18xx.c:1.47->1.48 # F:isa/opl3sa2.c:1.36->1.37 # F:isa/sgalaxy.c:1.20->1.21 # F:isa/sscape.c:1.14->1.15 # F:isa/ad1816a/ad1816a.c:1.20->1.21 # F:isa/ad1848/ad1848.c:1.12->1.13 # F:isa/cs423x/cs4231.c:1.14->1.15 # F:isa/cs423x/cs4236.c:1.44->1.45 # F:isa/es1688/es1688.c:1.16->1.17 # F:isa/es1688/es1688_lib.c:1.25->1.26 # F:isa/gus/gusclassic.c:1.14->1.15 # F:isa/gus/gusextreme.c:1.16->1.17 # F:isa/gus/gusmax.c:1.15->1.16 # F:isa/gus/interwave.c:1.33->1.34 # F:isa/opti9xx/opti92x-ad1848.c:1.46->1.47 # F:isa/sb/emu8000_synth.c:1.7->1.8 # F:isa/sb/es968.c:1.26->1.27 # F:isa/sb/sb16.c:1.48->1.49 # F:isa/sb/sb16_csp.c:1.14->1.15 # F:isa/sb/sb8.c:1.20->1.21 # F:isa/sb/sb_common.c:1.20->1.21 # F:isa/wavefront/wavefront.c:1.29->1.30 # L:Clean up of obsolete MODULE_* stuff (isa part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:34:41+02:00 perex@suse.cz # ALSA CVS update # Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # Clean up of obsolete MODULE_* stuff (core part) # # Removed MODULE_CLASSES() and MODULE_SYNTAX(). # Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2004/07/01 03:28:48+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/sound.c # 2004/07/01 03:28:48+02:00 perex@suse.cz +0 -5 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi_emul.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_instr.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_dummy.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_device.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/seq.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -1 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_simple.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_iw.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_gf1.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_fm.c # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/rawmidi.c # 2004/07/01 03:28:48+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/pcm_memory.c # 2004/07/01 03:28:48+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/07/01 03:28:48+02:00 perex@suse.cz +0 -3 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # include/sound/initval.h # 2004/07/01 03:28:49+02:00 perex@suse.cz +0 -33 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/07/01 03:28:48+02:00 perex@suse.cz +1 -2 # ALSA CVS update # D:2004/07/01 09:28:48 # C:Documentation,PCM Midlevel,RawMidi Midlevel,ALSA Core,Timer Midlevel # C:ALSA<-OSS emulation,ALSA sequencer,Instrument layer,ALSA<-OSS sequencer # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.29->1.30 # F:core/pcm_memory.c:1.30->1.31 # F:core/rawmidi.c:1.45->1.46 # F:core/sound.c:1.64->1.65 # F:core/timer.c:1.60->1.61 # F:core/oss/pcm_oss.c:1.72->1.73 # F:core/seq/seq.c:1.13->1.14 # F:core/seq/seq_device.c:1.15->1.16 # F:core/seq/seq_dummy.c:1.12->1.13 # F:core/seq/seq_instr.c:1.9->1.10 # F:core/seq/seq_midi.c:1.21->1.22 # F:core/seq/seq_midi_emul.c:1.10->1.11 # F:core/seq/instr/ainstr_fm.c:1.7->1.8 # F:core/seq/instr/ainstr_gf1.c:1.8->1.9 # F:core/seq/instr/ainstr_iw.c:1.9->1.10 # F:core/seq/instr/ainstr_simple.c:1.7->1.8 # F:core/seq/oss/seq_oss.c:1.14->1.15 # F:include/initval.h:1.20->1.21 # L:Clean up of obsolete MODULE_* stuff (core part) # L: # L:Removed MODULE_CLASSES() and MODULE_SYNTAX(). # L:Replaced MODULE_DEVICES() with MODULE_SUPPORTED_DEVICE() # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:34:16+02:00 perex@suse.cz # ALSA CVS update # CMIPCI driver # Fix the i/o port range of gameport on cmipci # # Gameport use only 1 I/O port not 8. # Attached patch fix gameport on CMIPCI soundcards. # # Signed-off-by: Artur Frysiak # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2004/06/30 04:54:31+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/30 10:54:31 # C:CMIPCI driver # F:pci/cmipci.c:1.68->1.69 # L:Fix the i/o port range of gameport on cmipci # L: # L:Gameport use only 1 I/O port not 8. # L:Attached patch fix gameport on CMIPCI soundcards. # Signed-off-by: Artur Frysiak # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:33:55+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Fixed STAC9758 output jack selection control # # - fixed unbalnaced mutex. # - use ac97_update_bits_page() instead of snd_ac97_update_bits(). # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/06/29 11:29:06+02:00 perex@suse.cz +2 -5 # ALSA CVS update # D:2004/06/29 17:29:06 # C:AC97 Codec Core # F:pci/ac97/ac97_patch.c:1.55->1.56 # L:Fixed STAC9758 output jack selection control # L: # L:- fixed unbalnaced mutex. # L:- use ac97_update_bits_page() instead of snd_ac97_update_bits(). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:33:30+02:00 perex@suse.cz # ALSA CVS update # Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # USB generic driver # Removal and replacement of magic memory allocators and casts (other parts) # # This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # with kmalloc(), kcalloc() and kfree(), respectively. # The cast via snd_magic_cast() is replaced with the standard cast, too. # # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/usb/usbmixer.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +21 -21 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/usb/usbmidi.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +13 -13 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/usb/usbaudio.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +10 -12 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_synth.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_seq.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +8 -8 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_proc.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_oss.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_nrpn.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_hwdep.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/sparc/cs4231.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +11 -12 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/sparc/amd7930.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +4 -5 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/ppc/tumbler.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/ppc/pmac.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +8 -10 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/ppc/daca.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/ppc/burgundy.c # 2004/06/29 11:14:25+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/ppc/awacs.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/vx/vxp_ops.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/vx/vxp_mixer.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/vx/vx_entry.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf_irq.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf_core.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pcmcia/pdaudiocf/pdaudiocf.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/parisc/harmony.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +2 -3 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/tea6330t.c # 2004/06/29 11:14:23+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/other/ak4xxx-adda.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/other/ak4117.c # 2004/06/29 11:14:24+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/l3/uda1341.c # 2004/06/29 11:14:23+02:00 perex@suse.cz +8 -9 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/i2c.c # 2004/06/29 11:14:23+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/i2c/cs8427.c # 2004/06/29 11:14:23+02:00 perex@suse.cz +10 -12 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/vx/vx_pcm.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +11 -13 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/vx/vx_mixer.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/vx/vx_hwdep.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/vx/vx_core.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/virmidi.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/serial-u16550.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +10 -10 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_synth.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_seq.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_proc.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_mixer.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl4/opl4_lib.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_synth.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_seq.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_oss.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +7 -7 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_midi.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +7 -7 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_lib.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/mtpav.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/mpu401/mpu401_uart.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +11 -11 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/dummy.c # 2004/06/29 11:14:22+02:00 perex@suse.cz +16 -16 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/arm/sa11xx-uda1341.c # 2004/06/29 11:14:21+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl # 2004/06/29 11:14:21+02:00 perex@suse.cz +46 -232 # ALSA CVS update # D:2004/06/29 17:14:21 # C:Documentation,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,OPL3 # C:OPL4,Digigram VX core,I2C cs8427,I2C lib core,I2C tea6330t,L3 drivers # C:AK4117 receiver,Serial BUS drivers,PARISC Harmony driver # C:Sound Core PDAudioCF driver,Digigram VX Pocket driver,PPC AWACS driver # C:PPC Burgundy driver,PPC DACA driver,PPC PMAC driver,PPC Tumbler driver # C:SPARC AMD7930 driver,SPARC cs4231 driver,Common EMU synth # C:USB generic driver # F:Documentation/DocBook/writing-an-alsa-driver.tmpl:1.28->1.29 # F:arm/sa11xx-uda1341.c:1.15->1.16 # F:drivers/dummy.c:1.28->1.29 # F:drivers/mtpav.c:1.27->1.28 # F:drivers/serial-u16550.c:1.26->1.27 # F:drivers/virmidi.c:1.12->1.13 # F:drivers/mpu401/mpu401_uart.c:1.30->1.31 # F:drivers/opl3/opl3_lib.c:1.20->1.21 # F:drivers/opl3/opl3_midi.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.13->1.14 # F:drivers/opl3/opl3_seq.c:1.13->1.14 # F:drivers/opl3/opl3_synth.c:1.7->1.8 # F:drivers/opl4/opl4_lib.c:1.5->1.6 # F:drivers/opl4/opl4_mixer.c:1.1->1.2 # F:drivers/opl4/opl4_proc.c:1.4->1.5 # F:drivers/opl4/opl4_seq.c:1.4->1.5 # F:drivers/opl4/opl4_synth.c:1.3->1.4 # F:drivers/vx/vx_core.c:1.8->1.9 # F:drivers/vx/vx_hwdep.c:1.1->1.2 # F:drivers/vx/vx_mixer.c:1.3->1.4 # F:drivers/vx/vx_pcm.c:1.5->1.6 # F:i2c/cs8427.c:1.19->1.20 # F:i2c/i2c.c:1.10->1.11 # F:i2c/tea6330t.c:1.8->1.9 # F:i2c/l3/uda1341.c:1.10->1.11 # F:i2c/other/ak4117.c:1.2->1.3 # F:i2c/other/ak4xxx-adda.c:1.7->1.8 # F:parisc/harmony.c:1.12->1.13 # F:pcmcia/pdaudiocf/pdaudiocf.c:1.7->1.8 # F:pcmcia/pdaudiocf/pdaudiocf_core.c:1.3->1.4 # F:pcmcia/pdaudiocf/pdaudiocf_irq.c:1.5->1.6 # F:pcmcia/pdaudiocf/pdaudiocf_pcm.c:1.1->1.2 # F:pcmcia/vx/vx_entry.c:1.5->1.6 # F:pcmcia/vx/vxp_mixer.c:1.1->1.2 # F:pcmcia/vx/vxp_ops.c:1.3->1.4 # F:ppc/awacs.c:1.22->1.23 # F:ppc/burgundy.c:1.11->1.12 # F:ppc/daca.c:1.11->1.12 # F:ppc/pmac.c:1.31->1.32 # F:ppc/tumbler.c:1.31->1.32 # F:sparc/amd7930.c:1.9->1.10 # F:sparc/cs4231.c:1.13->1.14 # F:synth/emux/emux.c:1.11->1.12 # F:synth/emux/emux_hwdep.c:1.1->1.2 # F:synth/emux/emux_nrpn.c:1.5->1.6 # F:synth/emux/emux_oss.c:1.9->1.10 # F:synth/emux/emux_proc.c:1.5->1.6 # F:synth/emux/emux_seq.c:1.11->1.12 # F:synth/emux/emux_synth.c:1.9->1.10 # F:usb/usbaudio.c:1.102->1.103 # F:usb/usbmidi.c:1.29->1.30 # F:usb/usbmixer.c:1.27->1.28 # L:Removal and replacement of magic memory allocators and casts (other parts) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:33:00+02:00 perex@suse.cz # ALSA CVS update # ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # Wavefront drivers # Removal and replacement of magic memory allocators and casts (isa part) # # This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # with kmalloc(), kcalloc() and kfree(), respectively. # The cast via snd_magic_cast() is replaced with the standard cast, too. # # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/wavefront/wavefront.c # 2004/06/29 11:12:29+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sscape.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb_mixer.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb_common.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +3 -5 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb8_midi.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +8 -8 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb8_main.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb8.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb16_main.c # 2004/06/29 11:12:28+02:00 perex@suse.cz +8 -10 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb16_csp.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +7 -9 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/sb16.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/es968.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000_pcm.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000_patch.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000_callback.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +10 -10 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +3 -5 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/opti9xx/opti92x-ad1848.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/opl3sa2.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +7 -8 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_uart.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_timer.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_synth.c # 2004/06/29 11:12:27+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_pcm.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +18 -20 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_mixer.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_mem_proc.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_mem.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_main.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_irq.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/gus/gus_instr.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +9 -9 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/es18xx.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +8 -10 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/es1688/es1688_lib.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/dt019x.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4236_lib.c # 2004/06/29 11:12:26+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4236.c # 2004/06/29 11:12:25+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4231_lib.c # 2004/06/29 11:12:25+02:00 perex@suse.cz +8 -10 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/cs423x/cs4231.c # 2004/06/29 11:12:25+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/cmi8330.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/azt2320.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/als100.c # 2004/06/29 11:12:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/ad1848/ad1848_lib.c # 2004/06/29 11:12:25+02:00 perex@suse.cz +7 -9 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/ad1848/ad1848.c # 2004/06/29 11:12:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/ad1816a/ad1816a_lib.c # 2004/06/29 11:12:24+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/ad1816a/ad1816a.c # 2004/06/29 11:12:24+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/es1688.h # 2004/06/29 11:12:23+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:12:23 # C:ES1688 driver,ALS100 driver,AZT2320 driver,CMI8330 driver,DT019x driver # C:ES18xx driver,OPL3SA2 driver,Sound Scape driver,AD1816A driver # C:AD1848 driver,CS4231 driver,CS4236+ driver,GUS Library,Opti9xx drivers # C:EMU8000 driver,ES968 driver,SB16/AWE driver,SB8 driver,SB drivers # C:Wavefront drivers # F:include/es1688.h:1.5->1.6 # F:isa/als100.c:1.25->1.26 # F:isa/azt2320.c:1.25->1.26 # F:isa/cmi8330.c:1.29->1.30 # F:isa/dt019x.c:1.19->1.20 # F:isa/es18xx.c:1.46->1.47 # F:isa/opl3sa2.c:1.35->1.36 # F:isa/sscape.c:1.13->1.14 # F:isa/ad1816a/ad1816a.c:1.19->1.20 # F:isa/ad1816a/ad1816a_lib.c:1.22->1.23 # F:isa/ad1848/ad1848.c:1.11->1.12 # F:isa/ad1848/ad1848_lib.c:1.35->1.36 # F:isa/cs423x/cs4231.c:1.13->1.14 # F:isa/cs423x/cs4231_lib.c:1.41->1.42 # F:isa/cs423x/cs4236.c:1.43->1.44 # F:isa/cs423x/cs4236_lib.c:1.10->1.11 # F:isa/es1688/es1688_lib.c:1.24->1.25 # F:isa/gus/gus_instr.c:1.6->1.7 # F:isa/gus/gus_irq.c:1.7->1.8 # F:isa/gus/gus_main.c:1.14->1.15 # F:isa/gus/gus_mem.c:1.8->1.9 # F:isa/gus/gus_mem_proc.c:1.9->1.10 # F:isa/gus/gus_mixer.c:1.8->1.9 # F:isa/gus/gus_pcm.c:1.22->1.23 # F:isa/gus/gus_synth.c:1.11->1.12 # F:isa/gus/gus_timer.c:1.6->1.7 # F:isa/gus/gus_uart.c:1.8->1.9 # F:isa/opti9xx/opti92x-ad1848.c:1.45->1.46 # F:isa/sb/emu8000.c:1.21->1.22 # F:isa/sb/emu8000_callback.c:1.9->1.10 # F:isa/sb/emu8000_patch.c:1.10->1.11 # F:isa/sb/emu8000_pcm.c:1.13->1.14 # F:isa/sb/es968.c:1.25->1.26 # F:isa/sb/sb16.c:1.47->1.48 # F:isa/sb/sb16_csp.c:1.13->1.14 # F:isa/sb/sb16_main.c:1.20->1.21 # F:isa/sb/sb8.c:1.19->1.20 # F:isa/sb/sb8_main.c:1.15->1.16 # F:isa/sb/sb8_midi.c:1.10->1.11 # F:isa/sb/sb_common.c:1.19->1.20 # F:isa/sb/sb_mixer.c:1.13->1.14 # F:isa/wavefront/wavefront.c:1.28->1.29 # L:Removal and replacement of magic memory allocators and casts (isa part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:32:29+02:00 perex@suse.cz # ALSA CVS update # ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # Trident driver,Digigram VX222 driver,YMFPCI driver # Removal and replacement of magic memory allocators and casts (pci part) # # This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # with kmalloc(), kcalloc() and kfree(), respectively. # The cast via snd_magic_cast() is replaced with the standard cast, too. # # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ymfpci/ymfpci_main.c # 2004/06/29 11:10:37+02:00 perex@suse.cz +33 -35 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/vx222/vx222_ops.c # 2004/06/29 11:10:37+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/vx222/vx222.c # 2004/06/29 11:10:37+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/06/29 11:10:26+02:00 perex@suse.cz +12 -13 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_synth.c # 2004/06/29 11:10:37+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2004/06/29 11:10:37+02:00 perex@suse.cz +17 -19 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/sonicvibes.c # 2004/06/29 11:10:26+02:00 perex@suse.cz +10 -11 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/rme9652.c # 2004/06/29 11:10:36+02:00 perex@suse.cz +36 -36 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/rme9652/hdsp.c # 2004/06/29 11:10:36+02:00 perex@suse.cz +61 -61 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/06/29 11:10:26+02:00 perex@suse.cz +35 -35 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +28 -28 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +10 -11 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart_mixer.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart_hwdep.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart_core.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/mixart/mixart.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +8 -10 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/maestro3.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +9 -11 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +27 -27 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0m.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +11 -12 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +13 -14 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/06/29 11:10:35+02:00 perex@suse.cz +5 -5 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.h # 2004/06/29 11:10:35+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1712.c # 2004/06/29 11:10:34+02:00 perex@suse.cz +9 -9 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ews.c # 2004/06/29 11:10:34+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/delta.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/fm801.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +9 -11 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +22 -24 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/es1938.c # 2004/06/29 11:10:25+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ens1370.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +18 -20 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/irq.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/io.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +20 -22 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emumixer.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +1 -3 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_synth.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_patch.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_callback.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +8 -8 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos_scb_lib.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/dsp_spos.c # 2004/06/29 11:10:33+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.h # 2004/06/29 11:10:33+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cs46xx/cs46xx_lib.c # 2004/06/29 11:10:32+02:00 perex@suse.cz +38 -40 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cs4281.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +23 -25 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/cmipci.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +5 -7 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/bt87x.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +4 -5 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/azt3328.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +5 -6 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_pcm.c # 2004/06/29 11:10:32+02:00 perex@suse.cz +3 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_mpu401.c # 2004/06/29 11:10:32+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_core.c # 2004/06/29 11:10:32+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.h # 2004/06/29 11:10:32+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0.c # 2004/06/29 11:10:32+02:00 perex@suse.cz +3 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/06/29 11:10:24+02:00 perex@suse.cz +9 -10 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/als4000.c # 2004/06/29 11:10:23+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ali5451/ali5451.c # 2004/06/29 11:10:31+02:00 perex@suse.cz +14 -15 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ak4531_codec.c # 2004/06/29 11:10:31+02:00 perex@suse.cz +4 -6 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_proc.c # 2004/06/29 11:10:31+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_pcm.c # 2004/06/29 11:10:31+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/06/29 11:10:30+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_codec.c # 2004/06/29 11:10:26+02:00 perex@suse.cz +6 -8 # ALSA CVS update # D:2004/06/29 17:10:23 # C:ALS4000 driver,ATIIXP driver,AZT3328 driver,BT87x driver,CMIPCI driver # C:CS4281 driver,ENS1370/1+ driver,ES1938 driver,ES1968 driver # C:FM801 driver,Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver # C:RME32 driver,RME96 driver,SonicVibes driver,VIA82xx driver # C:AC97 Codec Core,AK4531 codec,ALI5451 driver,au88x0 driver,CS46xx driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver # C:MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver # C:Trident driver,Digigram VX222 driver,YMFPCI driver # F:pci/als4000.c:1.33->1.34 # F:pci/atiixp.c:1.11->1.12 # F:pci/azt3328.c:1.13->1.14 # F:pci/bt87x.c:1.5->1.6 # F:pci/cmipci.c:1.67->1.68 # F:pci/cs4281.c:1.55->1.56 # F:pci/ens1370.c:1.60->1.61 # F:pci/es1938.c:1.36->1.37 # F:pci/es1968.c:1.68->1.69 # F:pci/fm801.c:1.45->1.46 # F:pci/intel8x0.c:1.139->1.140 # F:pci/intel8x0m.c:1.5->1.6 # F:pci/maestro3.c:1.52->1.53 # F:pci/rme32.c:1.35->1.36 # F:pci/rme96.c:1.37->1.38 # F:pci/sonicvibes.c:1.35->1.36 # F:pci/via82xx.c:1.105->1.106 # F:pci/ac97/ac97_codec.c:1.136->1.137 # F:pci/ac97/ac97_patch.c:1.54->1.55 # F:pci/ac97/ac97_pcm.c:1.14->1.15 # F:pci/ac97/ac97_proc.c:1.8->1.9 # F:pci/ac97/ak4531_codec.c:1.10->1.11 # F:pci/ali5451/ali5451.c:1.48->1.49 # F:pci/au88x0/au88x0.c:1.9->1.10 # F:pci/au88x0/au88x0.h:1.5->1.6 # F:pci/au88x0/au88x0_core.c:1.4->1.5 # F:pci/au88x0/au88x0_mpu401.c:1.1->1.2 # F:pci/au88x0/au88x0_pcm.c:1.3->1.4 # F:pci/cs46xx/cs46xx_lib.c:1.74->1.75 # F:pci/cs46xx/cs46xx_lib.h:1.12->1.13 # F:pci/cs46xx/dsp_spos.c:1.24->1.25 # F:pci/cs46xx/dsp_spos_scb_lib.c:1.23->1.24 # F:pci/emu10k1/emu10k1_callback.c:1.11->1.12 # F:pci/emu10k1/emu10k1_main.c:1.34->1.35 # F:pci/emu10k1/emu10k1_patch.c:1.5->1.6 # F:pci/emu10k1/emu10k1_synth.c:1.8->1.9 # F:pci/emu10k1/emufx.c:1.56->1.57 # F:pci/emu10k1/emumixer.c:1.22->1.23 # F:pci/emu10k1/emupcm.c:1.27->1.28 # F:pci/emu10k1/emuproc.c:1.17->1.18 # F:pci/emu10k1/io.c:1.6->1.7 # F:pci/emu10k1/irq.c:1.9->1.10 # F:pci/ice1712/delta.c:1.17->1.18 # F:pci/ice1712/ews.c:1.17->1.18 # F:pci/ice1712/ice1712.c:1.53->1.54 # F:pci/ice1712/ice1712.h:1.21->1.22 # F:pci/ice1712/ice1724.c:1.35->1.36 # F:pci/korg1212/korg1212.c:1.40->1.41 # F:pci/mixart/mixart.c:1.10->1.11 # F:pci/mixart/mixart_core.c:1.6->1.7 # F:pci/mixart/mixart_hwdep.c:1.5->1.6 # F:pci/mixart/mixart_mixer.c:1.2->1.3 # F:pci/nm256/nm256.c:1.40->1.41 # F:pci/rme9652/hdsp.c:1.59->1.60 # F:pci/rme9652/rme9652.c:1.46->1.47 # F:pci/trident/trident_main.c:1.58->1.59 # F:pci/trident/trident_synth.c:1.13->1.14 # F:pci/vx222/vx222.c:1.5->1.6 # F:pci/vx222/vx222_ops.c:1.6->1.7 # F:pci/ymfpci/ymfpci_main.c:1.51->1.52 # L:Removal and replacement of magic memory allocators and casts (pci part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:31:59+02:00 perex@suse.cz # ALSA CVS update # Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # Removal and replacement of magic memory allocators and casts (core part) # # This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # with kmalloc(), kcalloc() and kfree(), respectively. # The cast via snd_magic_cast() is replaced with the standard cast, too. # # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2004/06/29 11:09:18+02:00 perex@suse.cz +23 -23 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/sound.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +0 -3 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_virmidi.c # 2004/06/29 11:09:19+02:00 perex@suse.cz +23 -23 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_dummy.c # 2004/06/29 11:09:19+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_device.c # 2004/06/29 11:09:19+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/rawmidi.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +16 -16 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm_timer.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +15 -15 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +9 -9 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_oss.c # 2004/06/29 11:09:19+02:00 perex@suse.cz +8 -8 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/mixer_oss.c # 2004/06/29 11:09:18+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/memory.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +0 -40 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/06/29 11:09:18+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/ioctl32.c # 2004/06/29 11:09:18+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/info.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +21 -21 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/hwdep.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +12 -12 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/device.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/control.c # 2004/06/29 11:09:17+02:00 perex@suse.cz +9 -11 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/timer.h # 2004/06/29 11:09:19+02:00 perex@suse.cz +1 -2 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/06/29 11:09:19+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/driver.h # 2004/06/29 11:09:19+02:00 perex@suse.cz +0 -2 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/control.h # 2004/06/29 11:09:19+02:00 perex@suse.cz +1 -2 # ALSA CVS update # D:2004/06/29 17:09:17 # C:Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel # C:Timer Midlevel,IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer # F:core/control.c:1.45->1.46 # F:core/device.c:1.15->1.16 # F:core/hwdep.c:1.25->1.26 # F:core/info.c:1.45->1.46 # F:core/memory.c:1.29->1.30 # F:core/pcm.c:1.43->1.44 # F:core/pcm_native.c:1.97->1.98 # F:core/pcm_timer.c:1.7->1.8 # F:core/rawmidi.c:1.44->1.45 # F:core/sound.c:1.63->1.64 # F:core/timer.c:1.59->1.60 # F:core/ioctl32/ioctl32.c:1.19->1.20 # F:core/ioctl32/pcm32.c:1.16->1.17 # F:core/oss/mixer_oss.c:1.31->1.32 # F:core/oss/pcm_oss.c:1.71->1.72 # F:core/seq/seq_device.c:1.14->1.15 # F:core/seq/seq_dummy.c:1.11->1.12 # F:core/seq/seq_virmidi.c:1.11->1.12 # F:include/control.h:1.7->1.8 # F:include/driver.h:1.16->1.17 # F:include/pcm.h:1.43->1.44 # F:include/sndmagic.h:1.27->1.28(DEAD) # F:include/timer.h:1.17->1.18 # L:Removal and replacement of magic memory allocators and casts (core part) # L: # L:This patch replaces snd_magic_kmalloc(), snd_magic_kcallc() and snd_magic_kfree() # L:with kmalloc(), kcalloc() and kfree(), respectively. # L:The cast via snd_magic_cast() is replaced with the standard cast, too. # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # BitKeeper/deleted/.del-sndmagic.h~23e344d25055e00c # 2004/07/01 19:31:43+02:00 perex@suse.cz +0 -0 # Delete: include/sound/sndmagic.h # # ChangeSet # 2004/07/01 19:28:12+02:00 perex@suse.cz # ALSA CVS update # Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # Synth,Common EMU synth # Removal of snd_kcalloc() # # This patch removes snd_kcalloc() from the kernel and updates callers to use # the new generic kcalloc(). # # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/util_mem.c # 2004/06/29 10:55:14+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/soundfont.c # 2004/06/29 10:55:14+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_seq.c # 2004/06/29 10:55:14+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux_effect.c # 2004/06/29 10:55:14+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/synth/emux/emux.c # 2004/06/29 10:55:14+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_main.c # 2004/06/29 10:55:13+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/revo.c # 2004/06/29 10:55:13+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/06/29 10:55:13+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/06/29 10:55:13+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_game.c # 2004/06/29 10:55:12+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_pcm.c # 2004/06/29 10:55:11+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/isa/sb/emu8000_pcm.c # 2004/06/29 10:55:11+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/drivers/opl3/opl3_oss.c # 2004/06/29 10:55:11+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/timer.c # 2004/06/29 10:55:09+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/sound.c # 2004/06/29 10:55:09+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_timer.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_queue.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_prioq.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_ports.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi_event.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_midi.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_memory.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_instr.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +3 -6 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_fifo.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/seq_clientmgr.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_writeq.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_timer.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_synth.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +5 -3 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_readq.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_midi.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/oss/seq_oss_init.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_iw.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/ainstr_gf1.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/rawmidi.c # 2004/06/29 10:55:09+02:00 perex@suse.cz +3 -3 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm_memory.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm_lib.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/pcm.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/route.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_plugin.h # 2004/06/29 10:55:10+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_plugin.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/oss/mixer_oss.c # 2004/06/29 10:55:10+02:00 perex@suse.cz +13 -13 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/memory.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +11 -19 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/ioctl32/pcm32.c # 2004/06/29 10:55:09+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/init.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/info.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +2 -4 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # sound/core/control.c # 2004/06/29 10:55:08+02:00 perex@suse.cz +3 -4 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # include/sound/core.h # 2004/06/29 10:55:11+02:00 perex@suse.cz +2 -1 # ALSA CVS update # D:2004/06/29 16:55:08 # C:Control Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel,Timer Midlevel # C:IOCTL32 emulation,ALSA<-OSS emulation,ALSA sequencer,Instrument layer # C:ALSA<-OSS sequencer,OPL3,EMU8000 driver,AC97 Codec Core,au88x0 driver # C:EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,Trident driver # C:Synth,Common EMU synth # F:core/control.c:1.44->1.45 # F:core/info.c:1.44->1.45 # F:core/init.c:1.46->1.47 # F:core/memory.c:1.28->1.29 # F:core/pcm.c:1.42->1.43 # F:core/pcm_lib.c:1.51->1.52 # F:core/pcm_memory.c:1.29->1.30 # F:core/rawmidi.c:1.43->1.44 # F:core/sound.c:1.62->1.63 # F:core/timer.c:1.58->1.59 # F:core/ioctl32/pcm32.c:1.15->1.16 # F:core/oss/mixer_oss.c:1.30->1.31 # F:core/oss/pcm_plugin.c:1.19->1.20 # F:core/oss/pcm_plugin.h:1.6->1.7 # F:core/oss/route.c:1.7->1.8 # F:core/seq/seq_clientmgr.c:1.30->1.31 # F:core/seq/seq_fifo.c:1.8->1.9 # F:core/seq/seq_instr.c:1.8->1.9 # F:core/seq/seq_memory.c:1.15->1.16 # F:core/seq/seq_midi.c:1.20->1.21 # F:core/seq/seq_midi_event.c:1.12->1.13 # F:core/seq/seq_ports.c:1.16->1.17 # F:core/seq/seq_prioq.c:1.8->1.9 # F:core/seq/seq_queue.c:1.14->1.15 # F:core/seq/seq_timer.c:1.19->1.20 # F:core/seq/instr/ainstr_gf1.c:1.7->1.8 # F:core/seq/instr/ainstr_iw.c:1.8->1.9 # F:core/seq/oss/seq_oss_init.c:1.12->1.13 # F:core/seq/oss/seq_oss_midi.c:1.15->1.16 # F:core/seq/oss/seq_oss_readq.c:1.6->1.7 # F:core/seq/oss/seq_oss_synth.c:1.15->1.16 # F:core/seq/oss/seq_oss_timer.c:1.6->1.7 # F:core/seq/oss/seq_oss_writeq.c:1.5->1.6 # F:drivers/opl3/opl3_oss.c:1.12->1.13 # F:include/core.h:1.53->1.54 # F:isa/sb/emu8000_pcm.c:1.12->1.13 # F:pci/ac97/ac97_pcm.c:1.13->1.14 # F:pci/au88x0/au88x0_game.c:1.4->1.5 # F:pci/emu10k1/emufx.c:1.55->1.56 # F:pci/ice1712/aureon.c:1.11->1.12 # F:pci/ice1712/revo.c:1.7->1.8 # F:pci/trident/trident_main.c:1.57->1.58 # F:synth/util_mem.c:1.5->1.6 # F:synth/emux/emux.c:1.10->1.11 # F:synth/emux/emux_effect.c:1.6->1.7 # F:synth/emux/emux_seq.c:1.10->1.11 # F:synth/emux/soundfont.c:1.11->1.12 # L:Removal of snd_kcalloc() # L: # L:This patch removes snd_kcalloc() from the kernel and updates callers to use # L:the new generic kcalloc(). # Signed-off-by: Pekka Enberg # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:27:42+02:00 perex@suse.cz # ALSA CVS update # ICE1712 driver,ICE1724 driver # Fixes for VT1720/VT1724 # # - Fixed the volume update on aureon. # - Removed the bogus master volume from aureon. # - Fixed the wrong number of ADCS (not used, though). # - Don't access GPIO high bits on VT1720. # - Fixed the buffer byte alignment for SPDIF and independen PCMs. # - Proper rate constraints according to the I2S/AC-link connection. # - Clean up the private data for PCM callbacks. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/revo.c # 2004/06/29 05:49:02+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/29 11:49:02 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/aureon.c:1.10->1.11 # F:pci/ice1712/ice1724.c:1.34->1.35 # F:pci/ice1712/revo.c:1.6->1.7 # L:Fixes for VT1720/VT1724 # L: # L:- Fixed the volume update on aureon. # L:- Removed the bogus master volume from aureon. # L:- Fixed the wrong number of ADCS (not used, though). # L:- Don't access GPIO high bits on VT1720. # L:- Fixed the buffer byte alignment for SPDIF and independen PCMs. # L:- Proper rate constraints according to the I2S/AC-link connection. # L:- Clean up the private data for PCM callbacks. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/06/29 05:49:02+02:00 perex@suse.cz +104 -90 # ALSA CVS update # D:2004/06/29 11:49:02 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/aureon.c:1.10->1.11 # F:pci/ice1712/ice1724.c:1.34->1.35 # F:pci/ice1712/revo.c:1.6->1.7 # L:Fixes for VT1720/VT1724 # L: # L:- Fixed the volume update on aureon. # L:- Removed the bogus master volume from aureon. # L:- Fixed the wrong number of ADCS (not used, though). # L:- Don't access GPIO high bits on VT1720. # L:- Fixed the buffer byte alignment for SPDIF and independen PCMs. # L:- Proper rate constraints according to the I2S/AC-link connection. # L:- Clean up the private data for PCM callbacks. # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/aureon.c # 2004/06/29 05:49:02+02:00 perex@suse.cz +17 -13 # ALSA CVS update # D:2004/06/29 11:49:02 # C:ICE1712 driver,ICE1724 driver # F:pci/ice1712/aureon.c:1.10->1.11 # F:pci/ice1712/ice1724.c:1.34->1.35 # F:pci/ice1712/revo.c:1.6->1.7 # L:Fixes for VT1720/VT1724 # L: # L:- Fixed the volume update on aureon. # L:- Removed the bogus master volume from aureon. # L:- Fixed the wrong number of ADCS (not used, though). # L:- Don't access GPIO high bits on VT1720. # L:- Fixed the buffer byte alignment for SPDIF and independen PCMs. # L:- Proper rate constraints according to the I2S/AC-link connection. # L:- Clean up the private data for PCM callbacks. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:27:20+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Audigy 2 ZS - side support # # Added the support of side speakers on Audigy 2 ZS. # # TODO - detection of audigy 2 zs. Now it will add side controls to # mixer for audigy 2 to. Maybe left or right slider can control volume # of back center on audigy 2 too. # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/06/28 05:37:56+02:00 perex@suse.cz +34 -9 # ALSA CVS update # D:2004/06/28 11:37:55 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.41->1.42 # F:pci/emu10k1/emu10k1_main.c:1.33->1.34 # F:pci/emu10k1/emufx.c:1.54->1.55 # L:Audigy 2 ZS - side support # L: # L:Added the support of side speakers on Audigy 2 ZS. # L: # L:TODO - detection of audigy 2 zs. Now it will add side controls to # L:mixer for audigy 2 to. Maybe left or right slider can control volume # L:of back center on audigy 2 too. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1_main.c # 2004/06/28 05:37:56+02:00 perex@suse.cz +7 -1 # ALSA CVS update # D:2004/06/28 11:37:55 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.41->1.42 # F:pci/emu10k1/emu10k1_main.c:1.33->1.34 # F:pci/emu10k1/emufx.c:1.54->1.55 # L:Audigy 2 ZS - side support # L: # L:Added the support of side speakers on Audigy 2 ZS. # L: # L:TODO - detection of audigy 2 zs. Now it will add side controls to # L:mixer for audigy 2 to. Maybe left or right slider can control volume # L:of back center on audigy 2 too. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/06/28 05:37:55+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/06/28 11:37:55 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.41->1.42 # F:pci/emu10k1/emu10k1_main.c:1.33->1.34 # F:pci/emu10k1/emufx.c:1.54->1.55 # L:Audigy 2 ZS - side support # L: # L:Added the support of side speakers on Audigy 2 ZS. # L: # L:TODO - detection of audigy 2 zs. Now it will add side controls to # L:mixer for audigy 2 to. Maybe left or right slider can control volume # L:of back center on audigy 2 too. # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:26:58+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Fix Audigy + FX8010 capture (hw:x,2) # # # This patch fixes capture problems from hw:x,2 on Audigy. It is same as # previous, because it can be applied cleanly against CVS (I tested # version from 23.06.2004) and hope it is still true for current CVS. # # I tested 4 channel recrding and it was OK. # # hw:x,2 records outputs from FX8010 (not FX buses) # # Using 'EFX voices mask' you can set channels what you want record. # # use alsactl store to store config # edit this config (set true for needed channel for 'EFX voices mask' # control) - I recorded channels 8,9,14,15 (front and rear output). # use alsactl restore to restore config # # Looks like channel count must be power of 2 (1, 2, 4, 8, ...). # # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emuproc.c # 2004/06/28 05:31:01+02:00 perex@suse.cz +94 -24 # ALSA CVS update # D:2004/06/28 11:31:01 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.26->1.27 # F:pci/emu10k1/emuproc.c:1.16->1.17 # L:Fix Audigy + FX8010 capture (hw:x,2) # L: # L: # L:This patch fixes capture problems from hw:x,2 on Audigy. It is same as # L: previous, because it can be applied cleanly against CVS (I tested # L:version from 23.06.2004) and hope it is still true for current CVS. # L: # L:I tested 4 channel recrding and it was OK. # L: # L:hw:x,2 records outputs from FX8010 (not FX buses) # L: # L:Using 'EFX voices mask' you can set channels what you want record. # L: # L:use alsactl store to store config # L:edit this config (set true for needed channel for 'EFX voices mask' # L:control) - I recorded channels 8,9,14,15 (front and rear output). # L:use alsactl restore to restore config # L: # L:Looks like channel count must be power of 2 (1, 2, 4, 8, ...). # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/06/28 05:31:01+02:00 perex@suse.cz +15 -3 # ALSA CVS update # D:2004/06/28 11:31:01 # C:EMU10K1/EMU10K2 driver # F:pci/emu10k1/emupcm.c:1.26->1.27 # F:pci/emu10k1/emuproc.c:1.16->1.17 # L:Fix Audigy + FX8010 capture (hw:x,2) # L: # L: # L:This patch fixes capture problems from hw:x,2 on Audigy. It is same as # L: previous, because it can be applied cleanly against CVS (I tested # L:version from 23.06.2004) and hope it is still true for current CVS. # L: # L:I tested 4 channel recrding and it was OK. # L: # L:hw:x,2 records outputs from FX8010 (not FX buses) # L: # L:Using 'EFX voices mask' you can set channels what you want record. # L: # L:use alsactl store to store config # L:edit this config (set true for needed channel for 'EFX voices mask' # L:control) - I recorded channels 8,9,14,15 (front and rear output). # L:use alsactl restore to restore config # L: # L:Looks like channel count must be power of 2 (1, 2, 4, 8, ...). # Signed-off-by: Peter Zubaj # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 19:26:36+02:00 perex@suse.cz # ALSA CVS update # AC97 Codec Core # Fixed the detection of STAC9708/11 surround control. # # Signed-off-by: Takashi Iwai # # sound/pci/ac97/ac97_patch.c # 2004/06/25 11:12:39+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/06/25 17:12:39 # C:AC97 Codec Core # F:pci/ac97/ac97_patch.c:1.53->1.54 # L:Fixed the detection of STAC9708/11 surround control. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/07/01 17:28:18+02:00 perex@suse.cz # This patch introduces a kcalloc() in the kernel that is used to # replace the ALSA subsystem-specific snd_kcalloc() and snd_magic_kcalloc(). # # Signed-off-by: Pekka Enberg # # mm/slab.c # 2004/07/01 17:28:02+02:00 perex@suse.cz +21 -0 # Added kcalloc() implementation. # # include/linux/slab.h # 2004/07/01 17:28:02+02:00 perex@suse.cz +1 -0 # Added kcalloc() # # ChangeSet # 2004/07/01 12:50:31+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/pci/nm256/nm256.c # 2004/07/01 12:50:20+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/pci/intel8x0.c # 2004/07/01 12:50:20+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_plugin.c # 2004/07/01 12:50:20+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/pcm_native.c # 2004/07/01 12:50:19+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/oss/pcm_oss.c # 2004/07/01 12:50:19+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/memalloc.c # 2004/07/01 12:50:19+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/06/30 21:44:24-05:00 jejb@mulgrave.(none) # Convert NCR_Q720 to use dma_declare_coherent_memory # # This board makes an ideal example for using the API # since it consists of 4 SCSI I/O processors and a # 0.5-2MB block of memory on a single MCA card. # # Signed-off-by: James Bottomley # # drivers/scsi/NCR_Q720.c # 2004/06/30 21:44:03-05:00 jejb@mulgrave.(none) +18 -3 # Convert NCR_Q720 to use dma_declare_coherent_memory # # ChangeSet # 2004/06/30 21:38:34-05:00 jejb@mulgrave.(none) # Add x86 implementation of dma_declare_coherent_memory # # This actually implements the API (all except for # DMA_MEMORY_INCLUDES_CHILDREN). # # Signed-off-by: James Bottomley # # include/linux/device.h # 2004/06/30 21:37:55-05:00 jejb@mulgrave.(none) +3 -0 # Add x86 implementation of dma_declare_coherent_memory # # include/asm-i386/dma-mapping.h # 2004/06/30 21:37:55-05:00 jejb@mulgrave.(none) +12 -0 # Add x86 implementation of dma_declare_coherent_memory # # arch/i386/kernel/pci-dma.c # 2004/06/30 21:37:55-05:00 jejb@mulgrave.(none) +109 -2 # Add x86 implementation of dma_declare_coherent_memory # # ChangeSet # 2004/06/30 21:11:14-05:00 jejb@mulgrave.(none) # Add vmalloc alignment constraints # # vmalloc is used by ioremap() to get regions for # remapping I/O space. To feed these regions back # into a __get_free_pages() type memory allocator, # they are expected to have more alignment than # get_vm_area() proves. So add additional alignment # constraints for VM_IOREMAP. # # Signed-off-by: James Bottomley # # mm/vmalloc.c # 2004/06/30 21:10:54-05:00 jejb@mulgrave.(none) +18 -2 # Add vmalloc alignment constraints # # ChangeSet # 2004/06/30 21:08:15-05:00 jejb@mulgrave.(none) # Add memory region bitmap implementations # # These APIs deal with bitmaps representing contiguous # memory regions. The idea is to set, free and find # a contiguous area. # # For ease of implementation (as well as to conform # to the standard requirements), the bitmaps always # return n aligned n length regions. The implementation # is also limited to BITS_PER_LONG contiguous regions. # # Signed-off-by: James Bottomley # # lib/bitmap.c # 2004/06/30 21:07:26-05:00 jejb@mulgrave.(none) +76 -0 # Add memory region bitmap implementations # # include/linux/bitmap.h # 2004/06/30 21:07:26-05:00 jejb@mulgrave.(none) +3 -0 # Add memory region bitmap implementations # # ChangeSet # 2004/06/30 21:02:11-05:00 jejb@mulgrave.(none) # Add dma_declare_coherent_memory() API # # This adds the description and a null prototype. # # Signed-off-by: James Bottomley # # include/linux/dma-mapping.h # 2004/06/30 21:01:43-05:00 jejb@mulgrave.(none) +26 -0 # Add dma_declare_coherent_memory() API # # Documentation/DMA-API.txt # 2004/06/30 21:01:43-05:00 jejb@mulgrave.(none) +79 -0 # Add dma_declare_coherent_memory() API # # ChangeSet # 2004/06/28 11:13:18-05:00 hch@lst.de # [PATCH] qla1280: update changelog and version # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.c # 2004/06/06 07:47:45-05:00 hch@lst.de +5 -2 # update changelog and version # # ChangeSet # 2004/06/28 11:09:47-05:00 hch@lst.de # [PATCH] qla1280: cleanup qla1280_initialize_adapter # # no function changes, just some more gotos and less nested ifs to make # the code readable. # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.c # 2004/06/06 07:47:27-05:00 hch@lst.de +15 -27 # cleanup qla1280_initialize_adapter # # ChangeSet # 2004/06/28 11:08:20-05:00 hch@lst.de # [PATCH] qla1280: cleanup qla1280_nvram_config # # qla1280_nvram_config is a huge mess. Split it up into managable # subroutines and add suport for the ISP1040 to it. Add missing call # to set the age limit also on 1280/1x160. # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.c # 2004/06/06 07:47:07-05:00 hch@lst.de +255 -231 # cleanup qla1280_nvram_config # # ChangeSet # 2004/06/28 10:55:48-05:00 hch@lst.de # [PATCH] qla1280: cleanup firmware loading, add pio-based loading # # The ISP1040 needs to load firmware by PIO, and while we're at it clean # the convoluted mess of firmware loading up by splitting it into # managable subroutines. # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.c # 2004/06/06 07:45:10-05:00 hch@lst.de +226 -226 # cleanup firmware loading, add pio-based loading # # ChangeSet # 2004/06/28 10:48:11-05:00 hch@lst.de # [PATCH] qla1280: add IS_ISP* helpers # # The code is already messy due to the explicit pci id checks for # 1280 vs 1x160, so add some nice helpers for that. # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.c # 2004/06/06 07:44:56-05:00 hch@lst.de +27 -31 # add IS_ISP* helpers # # ChangeSet # 2004/06/28 10:33:34-05:00 hch@lst.de # [PATCH] qla1280: add ISP1040 register definitions # # The old 1020/1040 has some registers where the newer controlers only # have reserved space, add that to qla1280.h # # Signed-off-by: Jes Sorensen # Signed-off-by: James Bottomley # # drivers/scsi/qla1280.h # 2004/06/06 07:45:26-05:00 hch@lst.de +52 -4 # add ISP1040 register definitions # # ChangeSet # 2004/06/23 20:04:56+02:00 perex@suse.cz # ALSA CVS update # ALSA sequencer,Instrument layer,ISA,GUS drivers # Clean up Makefiles for the sequencer stuff using reverse selections. # # Signed-off-by: Takashi Iwai # # sound/isa/gus/Makefile # 2004/06/23 11:56:55+02:00 perex@suse.cz +1 -5 # ALSA CVS update # D:2004/06/23 17:56:53 # C:ALSA sequencer,Instrument layer,ISA,GUS drivers # F:core/seq/Makefile:1.33->1.34 # F:core/seq/instr/Makefile:1.16->1.17 # F:isa/Kconfig:1.11->1.12 # F:isa/gus/Makefile:1.11->1.12 # L:Clean up Makefiles for the sequencer stuff using reverse selections. # Signed-off-by: Takashi Iwai # # sound/isa/Kconfig # 2004/06/23 11:56:55+02:00 perex@suse.cz +8 -0 # ALSA CVS update # D:2004/06/23 17:56:53 # C:ALSA sequencer,Instrument layer,ISA,GUS drivers # F:core/seq/Makefile:1.33->1.34 # F:core/seq/instr/Makefile:1.16->1.17 # F:isa/Kconfig:1.11->1.12 # F:isa/gus/Makefile:1.11->1.12 # L:Clean up Makefiles for the sequencer stuff using reverse selections. # Signed-off-by: Takashi Iwai # # sound/core/seq/instr/Makefile # 2004/06/23 11:56:55+02:00 perex@suse.cz +3 -31 # ALSA CVS update # D:2004/06/23 17:56:53 # C:ALSA sequencer,Instrument layer,ISA,GUS drivers # F:core/seq/Makefile:1.33->1.34 # F:core/seq/instr/Makefile:1.16->1.17 # F:isa/Kconfig:1.11->1.12 # F:isa/gus/Makefile:1.11->1.12 # L:Clean up Makefiles for the sequencer stuff using reverse selections. # Signed-off-by: Takashi Iwai # # sound/core/seq/Makefile # 2004/06/23 11:56:53+02:00 perex@suse.cz +5 -53 # ALSA CVS update # D:2004/06/23 17:56:53 # C:ALSA sequencer,Instrument layer,ISA,GUS drivers # F:core/seq/Makefile:1.33->1.34 # F:core/seq/instr/Makefile:1.16->1.17 # F:isa/Kconfig:1.11->1.12 # F:isa/gus/Makefile:1.11->1.12 # L:Clean up Makefiles for the sequencer stuff using reverse selections. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 19:52:02+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # new functions snd_usbmidi_input_stop() and snd_usbmidi_input_start() # needed by snd-usb-usx2y to be able to use usb_set_interface() # # Signed-off-by: Clemens Ladisch # # sound/usb/usbmidi.c # 2004/06/23 07:48:41+02:00 perex@suse.cz +39 -3 # ALSA CVS update # D:2004/06/23 13:48:41 # C:USB generic driver # F:usb/usbaudio.h:1.31->1.32 # F:usb/usbmidi.c:1.28->1.29 # L:new functions snd_usbmidi_input_stop() and snd_usbmidi_input_start() # L:needed by snd-usb-usx2y to be able to use usb_set_interface() # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.h # 2004/06/23 07:48:41+02:00 perex@suse.cz +2 -0 # ALSA CVS update # D:2004/06/23 13:48:41 # C:USB generic driver # F:usb/usbaudio.h:1.31->1.32 # F:usb/usbmidi.c:1.28->1.29 # L:new functions snd_usbmidi_input_stop() and snd_usbmidi_input_start() # L:needed by snd-usb-usx2y to be able to use usb_set_interface() # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 15:02:18+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Each of snd_pcm_hw_refine_old_user() and snd_pcm_hw_params_old_user() # consume 856 bytes of stack and can invoke deep calls via the page allocator. # # Signed-off-by: Andrew Morton # Signed-off-by: Jaroslav Kysela # # sound/core/pcm_native.c # 2004/06/01 02:57:54+02:00 perex@suse.cz +55 -18 # ALSA CVS update # D:2004/06/01 08:57:54 # C:PCM Midlevel # F:core/pcm_native.c:1.91->1.92 # L:Each of snd_pcm_hw_refine_old_user() and snd_pcm_hw_params_old_user() # L:consume 856 bytes of stack and can invoke deep calls via the page allocator. # Signed-off-by: Andrew Morton # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/06/23 13:18:33+02:00 perex@suse.cz # ALSA CVS update # CMIPCI driver # don't sleep in prepare callback # # Signed-off-by: Clemens Ladisch # # sound/pci/cmipci.c # 2004/06/23 02:38:17+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/23 08:38:17 # C:CMIPCI driver # F:pci/cmipci.c:1.66->1.67 # L:don't sleep in prepare callback # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 13:17:12+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel,ALSA<-OSS emulation,CMIPCI driver # reduce stack usage # # Signed-off-by: Clemens Ladisch # # sound/pci/cmipci.c # 2004/06/22 11:18:41+02:00 perex@suse.cz +38 -21 # ALSA CVS update # D:2004/06/22 17:22:34 # C:PCM Midlevel,ALSA<-OSS emulation,CMIPCI driver # F:core/pcm_native.c:1.93->1.94 # F:core/oss/pcm_oss.c:1.69->1.70 # F:pci/cmipci.c:1.65->1.66 # L:reduce stack usage # Signed-off-by: Clemens Ladisch # # sound/core/pcm_native.c # 2004/06/22 11:22:34+02:00 perex@suse.cz +36 -12 # ALSA CVS update # D:2004/06/22 17:22:34 # C:PCM Midlevel,ALSA<-OSS emulation,CMIPCI driver # F:core/pcm_native.c:1.93->1.94 # F:core/oss/pcm_oss.c:1.69->1.70 # F:pci/cmipci.c:1.65->1.66 # L:reduce stack usage # Signed-off-by: Clemens Ladisch # # sound/core/oss/pcm_oss.c # 2004/06/22 11:20:43+02:00 perex@suse.cz +10 -5 # ALSA CVS update # D:2004/06/22 17:22:34 # C:PCM Midlevel,ALSA<-OSS emulation,CMIPCI driver # F:core/pcm_native.c:1.93->1.94 # F:core/oss/pcm_oss.c:1.69->1.70 # F:pci/cmipci.c:1.65->1.66 # L:reduce stack usage # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 13:15:50+02:00 perex@suse.cz # ALSA CVS update # au88x0 driver # - Fixed the wrong pointer cast on 64bit architectures. # # Signed-off-by: Andi Kleen # Signed-off-by: Takashi Iwai # # sound/pci/au88x0/au88x0_a3d.c # 2004/06/21 11:53:37+02:00 perex@suse.cz +4 -4 # ALSA CVS update # D:2004/06/21 17:53:37 # C:au88x0 driver # F:pci/au88x0/au88x0_a3d.c:1.3->1.4 # L:- Fixed the wrong pointer cast on 64bit architectures. # Signed-off-by: Andi Kleen # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:14:16+02:00 perex@suse.cz # ALSA CVS update # EMU10K1/EMU10K2 driver # Merge EFX playback and capture streams to the single device (hw:0,2). # # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emupcm.c # 2004/06/21 11:52:18+02:00 perex@suse.cz +272 -1 # ALSA CVS update # D:2004/06/21 17:52:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.39->1.40 # F:pci/emu10k1/emu10k1.c:1.24->1.25 # F:pci/emu10k1/emufx.c:1.52->1.53 # F:pci/emu10k1/emupcm.c:1.25->1.26 # L:Merge EFX playback and capture streams to the single device (hw:0,2). # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emufx.c # 2004/06/21 11:52:18+02:00 perex@suse.cz +2 -308 # ALSA CVS update # D:2004/06/21 17:52:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.39->1.40 # F:pci/emu10k1/emu10k1.c:1.24->1.25 # F:pci/emu10k1/emufx.c:1.52->1.53 # F:pci/emu10k1/emupcm.c:1.25->1.26 # L:Merge EFX playback and capture streams to the single device (hw:0,2). # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/emu10k1.c # 2004/06/21 11:52:18+02:00 perex@suse.cz +0 -4 # ALSA CVS update # D:2004/06/21 17:52:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.39->1.40 # F:pci/emu10k1/emu10k1.c:1.24->1.25 # F:pci/emu10k1/emufx.c:1.52->1.53 # F:pci/emu10k1/emupcm.c:1.25->1.26 # L:Merge EFX playback and capture streams to the single device (hw:0,2). # Signed-off-by: Takashi Iwai # # include/sound/emu10k1.h # 2004/06/21 11:52:17+02:00 perex@suse.cz +9 -0 # ALSA CVS update # D:2004/06/21 17:52:17 # C:EMU10K1/EMU10K2 driver # F:include/emu10k1.h:1.39->1.40 # F:pci/emu10k1/emu10k1.c:1.24->1.25 # F:pci/emu10k1/emufx.c:1.52->1.53 # F:pci/emu10k1/emupcm.c:1.25->1.26 # L:Merge EFX playback and capture streams to the single device (hw:0,2). # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:12:57+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # - Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # - Clean up the indirect accessing on RME32/RME96 drivers. # # Signed-off-by: Takashi Iwai # # sound/pci/rme96.c # 2004/06/21 11:50:09+02:00 perex@suse.cz +14 -110 # ALSA CVS update # D:2004/06/21 17:50:08 # C:PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # F:core/pcm_native.c:1.92->1.93 # F:include/asound.h:1.40->1.41 # F:pci/rme32.c:1.33->1.34 # F:pci/rme96.c:1.35->1.36 # F:pci/nm256/nm256.c:1.38->1.39 # L:- Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # L: Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # L:- Clean up the indirect accessing on RME32/RME96 drivers. # Signed-off-by: Takashi Iwai # # sound/pci/rme32.c # 2004/06/21 11:50:09+02:00 perex@suse.cz +16 -105 # ALSA CVS update # D:2004/06/21 17:50:08 # C:PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # F:core/pcm_native.c:1.92->1.93 # F:include/asound.h:1.40->1.41 # F:pci/rme32.c:1.33->1.34 # F:pci/rme96.c:1.35->1.36 # F:pci/nm256/nm256.c:1.38->1.39 # L:- Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # L: Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # L:- Clean up the indirect accessing on RME32/RME96 drivers. # Signed-off-by: Takashi Iwai # # sound/pci/nm256/nm256.c # 2004/06/21 11:50:09+02:00 perex@suse.cz +6 -10 # ALSA CVS update # D:2004/06/21 17:50:08 # C:PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # F:core/pcm_native.c:1.92->1.93 # F:include/asound.h:1.40->1.41 # F:pci/rme32.c:1.33->1.34 # F:pci/rme96.c:1.35->1.36 # F:pci/nm256/nm256.c:1.38->1.39 # L:- Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # L: Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # L:- Clean up the indirect accessing on RME32/RME96 drivers. # Signed-off-by: Takashi Iwai # # sound/core/pcm_native.c # 2004/06/21 11:50:08+02:00 perex@suse.cz +14 -0 # ALSA CVS update # D:2004/06/21 17:50:08 # C:PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # F:core/pcm_native.c:1.92->1.93 # F:include/asound.h:1.40->1.41 # F:pci/rme32.c:1.33->1.34 # F:pci/rme96.c:1.35->1.36 # F:pci/nm256/nm256.c:1.38->1.39 # L:- Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # L: Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # L:- Clean up the indirect accessing on RME32/RME96 drivers. # Signed-off-by: Takashi Iwai # # include/sound/asound.h # 2004/06/21 11:50:08+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/06/21 17:50:08 # C:PCM Midlevel,ALSA Core,RME32 driver,RME96 driver,NM256 driver # F:core/pcm_native.c:1.92->1.93 # F:include/asound.h:1.40->1.41 # F:pci/rme32.c:1.33->1.34 # F:pci/rme96.c:1.35->1.36 # F:pci/nm256/nm256.c:1.38->1.39 # L:- Fix the mmap via io_remap_page_range() on nm256, rme32 and rme96. # L: Added SNDRV_PCM_INFO_MMAP_IOMEM to handle this case. # L:- Clean up the indirect accessing on RME32/RME96 drivers. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:11:34+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # handle devices that allow setting but not reading sample rate # # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/06/21 09:45:12+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/21 15:45:12 # C:USB generic driver # F:usb/usbaudio.c:1.101->1.102 # L:handle devices that allow setting but not reading sample rate # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 13:10:13+02:00 perex@suse.cz # ALSA CVS update # VIA82xx driver # Fixed the calculation of the current DMA position at the period boundary. # # In some cases, DMA residue returns the value 0 during the transition # at the DMA boundary. The patch handles it as the position 0. # This may prevent the flood of 'invalid last pointer' debug messages # on some devices. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/06/18 11:52:36+02:00 perex@suse.cz +5 -1 # ALSA CVS update # D:2004/06/18 17:52:36 # C:VIA82xx driver # F:pci/via82xx.c:1.104->1.105 # L:Fixed the calculation of the current DMA position at the period boundary. # L: # L:In some cases, DMA residue returns the value 0 during the transition # L:at the DMA boundary. The patch handles it as the position 0. # L:This may prevent the flood of 'invalid last pointer' debug messages # L:on some devices. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:08:53+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Fixed the calculation of the current DMA position on some sloppy devices. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/06/18 11:50:52+02:00 perex@suse.cz +15 -9 # ALSA CVS update # D:2004/06/18 17:50:52 # C:Intel8x0 driver # F:pci/intel8x0.c:1.138->1.139 # L:Fixed the calculation of the current DMA position on some sloppy devices. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:07:19+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # Trident driver # Clean up the buffer management in the PCM runtime record. # # The buffer-allocation record is hold in runtime instance, so that # it can be checked more cleanly. # # dma_private is removed from runtime (it's used for SG-buffers). # The macro snd_pcm_substream_sgbuf() should be used instead of direct # access to the pointer, to retrieve the sgbuf struct from the PCM # substream instance. # # Signed-off-by: Takashi Iwai # # sound/pci/trident/trident_memory.c # 2004/06/18 11:46:32+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # sound/pci/korg1212/korg1212.c # 2004/06/18 11:46:32+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/06/18 11:46:31+02:00 perex@suse.cz +32 -30 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # sound/pci/emu10k1/memory.c # 2004/06/18 11:46:31+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # sound/core/pcm_memory.c # 2004/06/18 11:46:31+02:00 perex@suse.cz +18 -22 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/06/18 11:46:31+02:00 perex@suse.cz +19 -2 # ALSA CVS update # D:2004/06/18 17:46:31 # C:PCM Midlevel,ES1968 driver,EMU10K1/EMU10K2 driver,KORG1212 driver # C:Trident driver # F:core/pcm_memory.c:1.28->1.29 # F:include/pcm.h:1.41->1.42 # F:pci/es1968.c:1.67->1.68 # F:pci/emu10k1/memory.c:1.17->1.18 # F:pci/korg1212/korg1212.c:1.38->1.39 # F:pci/trident/trident_memory.c:1.14->1.15 # L:Clean up the buffer management in the PCM runtime record. # L: # L:The buffer-allocation record is hold in runtime instance, so that # L:it can be checked more cleanly. # L: # L:dma_private is removed from runtime (it's used for SG-buffers). # L:The macro snd_pcm_substream_sgbuf() should be used instead of direct # L:access to the pointer, to retrieve the sgbuf struct from the PCM # L:substream instance. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:05:35+02:00 perex@suse.cz # ALSA CVS update # Generic drivers # Do the buffer allocation in hw_params callback instead of open callback. # # This will prevent to use the allocation of excessive size. # Pre-allocation is called with the default size 0, ie. no buffer will be # pre-allocated as default. # # Signed-off-by: Takashi Iwai # # sound/drivers/dummy.c # 2004/06/18 11:43:33+02:00 perex@suse.cz +20 -31 # ALSA CVS update # D:2004/06/18 17:43:33 # C:Generic drivers # F:drivers/dummy.c:1.27->1.28 # L:Do the buffer allocation in hw_params callback instead of open callback. # L: # L:This will prevent to use the allocation of excessive size. # L:Pre-allocation is called with the default size 0, ie. no buffer will be # L:pre-allocated as default. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:04:14+02:00 perex@suse.cz # ALSA CVS update # ES1968 driver # Fix the crash at unloading the module due to the shared interrupt # with other devices. # # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # sound/pci/es1968.c # 2004/06/18 08:40:17+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/06/18 14:40:17 # C:ES1968 driver # F:pci/es1968.c:1.66->1.67 # L:Fix the crash at unloading the module due to the shared interrupt # L:with other devices. # Signed-off-by: Karsten Wiese # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:02:56+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel # Removed the obsoleted init for boot parameters. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_memory.c # 2004/06/18 08:38:26+02:00 perex@suse.cz +0 -15 # ALSA CVS update # D:2004/06/18 14:38:26 # C:PCM Midlevel # F:core/pcm_memory.c:1.27->1.28 # L:Removed the obsoleted init for boot parameters. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 13:01:38+02:00 perex@suse.cz # ALSA CVS update # CS46xx driver,MIXART driver # reduce stack usage # # Signed-off-by: Clemens Ladisch # # sound/pci/mixart/mixart.c # 2004/06/16 08:32:20+02:00 perex@suse.cz +27 -19 # ALSA CVS update # D:2004/06/16 14:35:18 # C:CS46xx driver,MIXART driver # F:pci/cs46xx/dsp_spos.c:1.23->1.24 # F:pci/mixart/mixart.c:1.8->1.9 # L:reduce stack usage # Signed-off-by: Clemens Ladisch # # sound/pci/cs46xx/dsp_spos.c # 2004/06/16 08:35:18+02:00 perex@suse.cz +16 -11 # ALSA CVS update # D:2004/06/16 14:35:18 # C:CS46xx driver,MIXART driver # F:pci/cs46xx/dsp_spos.c:1.23->1.24 # F:pci/mixart/mixart.c:1.8->1.9 # L:reduce stack usage # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 12:58:32+02:00 perex@suse.cz # ALSA CVS update # OSS sequencer emulation # # Use separate functions for some ioctls to reduce stack usage. # # Signed-off-by: Clemens Ladisch # Signed-off-by: Jaroslav Kysela # # sound/core/seq/oss/seq_oss_ioctl.c # 2004/06/23 12:58:02+02:00 perex@suse.cz +46 -28 # ALSA CVS update # D:2004/06/16 14:28:13 # C:ALSA<-OSS sequencer # F:core/seq/oss/seq_oss_ioctl.c:1.5->1.6 # L:use separate functions for some ioctls to reduce stack usage # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 12:44:07+02:00 perex@suse.cz # ALSA CVS update # OPL4 # add newline at end of file # # Signed-off-by: Clemens Ladisch # # sound/drivers/opl4/Makefile # 2004/06/16 04:46:02+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/16 10:46:02 # C:OPL4 # F:drivers/opl4/Makefile:1.3->1.4 # L:add newline at end of file # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 12:42:44+02:00 perex@suse.cz # ALSA CVS update # Opti9xx drivers # Fixed spin deadlocks. # # Signed-off-by: Takashi Iwai # # sound/isa/opti9xx/opti92x-ad1848.c # 2004/06/15 05:39:57+02:00 perex@suse.cz +2 -19 # ALSA CVS update # D:2004/06/15 11:39:57 # C:Opti9xx drivers # F:isa/opti9xx/opti92x-ad1848.c:1.44->1.45 # L:Fixed spin deadlocks. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 12:41:27+02:00 perex@suse.cz # ALSA CVS update # USB generic driver # Quattro USB: handle the different endianness of playback and recording sample data # # Signed-off-by: Clemens Ladisch # # sound/usb/usbquirks.h # 2004/06/14 12:12:05+02:00 perex@suse.cz +36 -5 # ALSA CVS update # D:2004/06/14 18:12:05 # C:USB generic driver # F:usb/usbaudio.c:1.100->1.101 # F:usb/usbquirks.h:1.33->1.34 # L:Quattro USB: handle the different endianness of playback and recording sample data # Signed-off-by: Clemens Ladisch # # sound/usb/usbaudio.c # 2004/06/14 12:12:05+02:00 perex@suse.cz +20 -6 # ALSA CVS update # D:2004/06/14 18:12:05 # C:USB generic driver # F:usb/usbaudio.c:1.100->1.101 # F:usb/usbquirks.h:1.33->1.34 # L:Quattro USB: handle the different endianness of playback and recording sample data # Signed-off-by: Clemens Ladisch # # ChangeSet # 2004/06/23 12:40:10+02:00 perex@suse.cz # ALSA CVS update # PCM Midlevel,ALSA<-OSS emulation # Clean up and optimization of PCM format-specific functions. # # - Use array indexing instead of huge swith/case. # - Removed superfluous handling of floats. # - Use memcpy for silencing to simplify the codes. # # Signed-off-by: Takashi Iwai # # sound/core/pcm_misc.c # 2004/06/09 12:36:14+02:00 perex@suse.cz +249 -459 # ALSA CVS update # D:2004/06/09 18:36:14 # C:PCM Midlevel,ALSA<-OSS emulation # F:core/pcm_misc.c:1.13->1.14 # F:core/oss/pcm_plugin.c:1.18->1.19 # F:include/pcm.h:1.40->1.41 # L:Clean up and optimization of PCM format-specific functions. # L: # L:- Use array indexing instead of huge swith/case. # L:- Removed superfluous handling of floats. # L:- Use memcpy for silencing to simplify the codes. # Signed-off-by: Takashi Iwai # # sound/core/oss/pcm_plugin.c # 2004/06/09 12:36:14+02:00 perex@suse.cz +27 -96 # ALSA CVS update # D:2004/06/09 18:36:14 # C:PCM Midlevel,ALSA<-OSS emulation # F:core/pcm_misc.c:1.13->1.14 # F:core/oss/pcm_plugin.c:1.18->1.19 # F:include/pcm.h:1.40->1.41 # L:Clean up and optimization of PCM format-specific functions. # L: # L:- Use array indexing instead of huge swith/case. # L:- Removed superfluous handling of floats. # L:- Use memcpy for silencing to simplify the codes. # Signed-off-by: Takashi Iwai # # include/sound/pcm.h # 2004/06/09 12:36:15+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/06/09 18:36:14 # C:PCM Midlevel,ALSA<-OSS emulation # F:core/pcm_misc.c:1.13->1.14 # F:core/oss/pcm_plugin.c:1.18->1.19 # F:include/pcm.h:1.40->1.41 # L:Clean up and optimization of PCM format-specific functions. # L: # L:- Use array indexing instead of huge swith/case. # L:- Removed superfluous handling of floats. # L:- Use memcpy for silencing to simplify the codes. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 12:38:51+02:00 perex@suse.cz # ALSA CVS update # Intel8x0 driver # Added the PCI ID for nVidia CK8. # # Signed-off-by: Takashi Iwai # # sound/pci/intel8x0.c # 2004/06/09 12:02:00+02:00 perex@suse.cz +5 -0 # ALSA CVS update # D:2004/06/09 18:02:00 # C:Intel8x0 driver # F:pci/intel8x0.c:1.137->1.138 # L:Added the PCI ID for nVidia CK8. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 12:37:24+02:00 perex@suse.cz # ALSA CVS update # ATIIXP driver,VIA82xx driver # Added the missing RESUME info bits to pcm. # # Signed-off-by: Takashi Iwai # # sound/pci/via82xx.c # 2004/06/09 12:01:05+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/06/09 18:01:05 # C:ATIIXP driver,VIA82xx driver # F:pci/atiixp.c:1.10->1.11 # F:pci/via82xx.c:1.103->1.104 # L:Added the missing RESUME info bits to pcm. # Signed-off-by: Takashi Iwai # # sound/pci/atiixp.c # 2004/06/09 12:01:05+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/06/09 18:01:05 # C:ATIIXP driver,VIA82xx driver # F:pci/atiixp.c:1.10->1.11 # F:pci/via82xx.c:1.103->1.104 # L:Added the missing RESUME info bits to pcm. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 12:33:49+02:00 perex@suse.cz # ALSA CVS update # ICE1724 driver # SPDIF output fixes # # - Fixed the encoding of SPDIF status bits in the consumer mode. # - Change the SPDIF status bits according to the current sample rate. # # Signed-off-by: Takashi Iwai # # sound/pci/ice1712/ice1724.c # 2004/06/08 11:15:26+02:00 perex@suse.cz +40 -11 # ALSA CVS update # D:2004/06/08 17:15:26 # C:ICE1724 driver # F:pci/ice1712/ice1724.c:1.33->1.34 # L:SPDIF output fixes # L: # L:- Fixed the encoding of SPDIF status bits in the consumer mode. # L:- Change the SPDIF status bits according to the current sample rate. # Signed-off-by: Takashi Iwai # # ChangeSet # 2004/06/23 12:28:34+02:00 perex@suse.cz # ALSA CVS update # Documentation # Added snd-fm801 tuner parameter description # Signed-off-by: Jaroslav Kysela # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/06/01 02:56:20+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/06/01 08:56:20 # C:Documentation # F:Documentation/ALSA-Configuration.txt:1.45->1.46 # L:Added snd-fm801 tuner parameter description # Signed-off-by: Jaroslav Kysela # # ChangeSet # 2004/06/16 11:59:16+02:00 perex@suse.cz # Merge suse.cz:/home/perex/bk/linux-sound/linux-2.5 # into suse.cz:/home/perex/bk/linux-sound/linux-sound # # sound/isa/wavefront/wavefront_synth.c # 2004/06/16 11:58:53+02:00 perex@suse.cz +0 -0 # Auto merged # # sound/core/seq/seq_clientmgr.c # 2004/06/16 11:58:53+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/vx_core.h # 2004/06/16 11:58:53+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/seq_kernel.h # 2004/06/16 11:58:53+02:00 perex@suse.cz +0 -0 # Auto merged # # include/sound/core.h # 2004/06/16 11:58:53+02:00 perex@suse.cz +0 -0 # Auto merged # # ChangeSet # 2004/05/31 08:49:28+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # AC97 Codec Core # Fixed mutex deadlocks. # # sound/pci/ac97/ac97_patch.c # 2004/05/30 11:40:05+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/30 17:40:04 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.135->1.136 # F:pci/ac97/ac97_patch.c:1.52->1.53 # L:Fixed mutex deadlocks. # # sound/pci/ac97/ac97_codec.c # 2004/05/30 11:40:04+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/30 17:40:04 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.135->1.136 # F:pci/ac97/ac97_patch.c:1.52->1.53 # L:Fixed mutex deadlocks. # # ChangeSet # 2004/05/30 14:01:08+02:00 perex@suse.cz # ALSA 1.0.5 # # include/sound/version.h # 2004/05/30 14:00:09+02:00 perex@suse.cz +2 -2 # ALSA 1.0.5 # # ChangeSet # 2004/05/30 13:57:33+02:00 perex@suse.cz # ALSA CVS update - Jaroslav Kysela # ALSA Core # Fixed warnings for pci PM callbacks when not CONFIG_PCI # # include/sound/core.h # 2004/05/30 06:50:15+02:00 perex@suse.cz +4 -0 # ALSA CVS update # D:2004/05/30 12:50:15 # C:ALSA Core # A:Jaroslav Kysela # F:include/core.h:1.51->1.52 # L:Fixed warnings for pci PM callbacks when not CONFIG_PCI # # ChangeSet # 2004/05/28 15:04:32+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # AC97 Codec Core # - Added the single mixer control with AC97 2.3 paging. # - Handle the paging for some ALC655/658 registers. # - Added the experimental support for ALC850. # # sound/pci/ac97/ac97_patch.h # 2004/05/28 04:27:09+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/05/28 10:27:09 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.134->1.135 # F:pci/ac97/ac97_id.h:1.8->1.9 # F:pci/ac97/ac97_local.h:1.6->1.7 # F:pci/ac97/ac97_patch.c:1.51->1.52 # F:pci/ac97/ac97_patch.h:1.15->1.16 # L:- Added the single mixer control with AC97 2.3 paging. # L:- Handle the paging for some ALC655/658 registers. # L:- Added the experimental support for ALC850. # # sound/pci/ac97/ac97_patch.c # 2004/05/28 04:27:09+02:00 perex@suse.cz +148 -28 # ALSA CVS update # D:2004/05/28 10:27:09 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.134->1.135 # F:pci/ac97/ac97_id.h:1.8->1.9 # F:pci/ac97/ac97_local.h:1.6->1.7 # F:pci/ac97/ac97_patch.c:1.51->1.52 # F:pci/ac97/ac97_patch.h:1.15->1.16 # L:- Added the single mixer control with AC97 2.3 paging. # L:- Handle the paging for some ALC655/658 registers. # L:- Added the experimental support for ALC850. # # sound/pci/ac97/ac97_local.h # 2004/05/28 04:27:09+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/05/28 10:27:09 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.134->1.135 # F:pci/ac97/ac97_id.h:1.8->1.9 # F:pci/ac97/ac97_local.h:1.6->1.7 # F:pci/ac97/ac97_patch.c:1.51->1.52 # F:pci/ac97/ac97_patch.h:1.15->1.16 # L:- Added the single mixer control with AC97 2.3 paging. # L:- Handle the paging for some ALC655/658 registers. # L:- Added the experimental support for ALC850. # # sound/pci/ac97/ac97_id.h # 2004/05/28 04:27:09+02:00 perex@suse.cz +7 -0 # ALSA CVS update # D:2004/05/28 10:27:09 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.134->1.135 # F:pci/ac97/ac97_id.h:1.8->1.9 # F:pci/ac97/ac97_local.h:1.6->1.7 # F:pci/ac97/ac97_patch.c:1.51->1.52 # F:pci/ac97/ac97_patch.h:1.15->1.16 # L:- Added the single mixer control with AC97 2.3 paging. # L:- Handle the paging for some ALC655/658 registers. # L:- Added the experimental support for ALC850. # # sound/pci/ac97/ac97_codec.c # 2004/05/28 04:27:09+02:00 perex@suse.cz +61 -18 # ALSA CVS update # D:2004/05/28 10:27:09 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.134->1.135 # F:pci/ac97/ac97_id.h:1.8->1.9 # F:pci/ac97/ac97_local.h:1.6->1.7 # F:pci/ac97/ac97_patch.c:1.51->1.52 # F:pci/ac97/ac97_patch.h:1.15->1.16 # L:- Added the single mixer control with AC97 2.3 paging. # L:- Handle the paging for some ALC655/658 registers. # L:- Added the experimental support for ALC850. # # ChangeSet # 2004/05/28 15:04:07+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # AC97 Codec Core # Avoid warning message during codec probing in case SKIP_AUDIO flag is not set. # # sound/pci/ac97/ac97_codec.c # 2004/05/27 13:15:54+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/05/27 19:15:54 # C:AC97 Codec Core # A:Takashi Iwai # F:pci/ac97/ac97_codec.c:1.133->1.134 # L:Avoid warning message during codec probing in case SKIP_AUDIO flag is not set. # # ChangeSet # 2004/05/28 15:03:42+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # PARISC Harmony driver # fixed typos. # # sound/parisc/harmony.c # 2004/05/26 11:02:12+02:00 perex@suse.cz +2 -2 # ALSA CVS update # D:2004/05/26 17:02:12 # C:PARISC Harmony driver # A:Takashi Iwai # F:parisc/harmony.c:1.11->1.12 # L:fixed typos. # # ChangeSet # 2004/05/28 15:03:20+02:00 perex@suse.cz # ALSA CVS update - Jaroslav Kysela # AC97 Codec Core # Signed-off-by: Kevin Mack # For Gateway M675 notebook - this will direct mixer # output to speaker, headphone and line-out instead # of just the front(DAC-A) signal. # # sound/pci/ac97/ac97_patch.c # 2004/05/26 02:34:55+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/26 08:34:55 # C:AC97 Codec Core # A:Jaroslav Kysela # F:pci/ac97/ac97_patch.c:1.50->1.51 # L:Signed-off-by: Kevin Mack # L:For Gateway M675 notebook - this will direct mixer # L:output to speaker, headphone and line-out instead # L:of just the front(DAC-A) signal. # # ChangeSet # 2004/05/28 15:02:56+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # VIA82xx driver # - use snd_pcm_limit_hw_rates() and removed redundant codes. # - fixed the rate constraints when 'IEC958 Output Switch' is on. # - check the SPDIF support on AC97 and don't build IEC958 stuffs if not available. # # sound/pci/via82xx.c # 2004/05/25 12:54:55+02:00 perex@suse.cz +15 -38 # ALSA CVS update # D:2004/05/25 18:54:55 # C:VIA82xx driver # A:Takashi Iwai # F:pci/via82xx.c:1.102->1.103 # L:- use snd_pcm_limit_hw_rates() and removed redundant codes. # L:- fixed the rate constraints when 'IEC958 Output Switch' is on. # L:- check the SPDIF support on AC97 and don't build IEC958 stuffs if not available. # # ChangeSet # 2004/05/28 15:02:35+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # AC97 Codec Core # added ac97_can_spdif() for checking the SPDIF support. # # include/sound/ac97_codec.h # 2004/05/25 12:52:57+02:00 perex@suse.cz +4 -0 # ALSA CVS update # D:2004/05/25 18:52:57 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.45->1.46 # L:added ac97_can_spdif() for checking the SPDIF support. # # ChangeSet # 2004/05/28 15:02:13+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # VIA82xx driver # added the DXS entry for Mitac/Vobis/Yakumo laptop. # # sound/pci/via82xx.c # 2004/05/25 10:10:38+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/05/25 16:10:38 # C:VIA82xx driver # A:Takashi Iwai # F:pci/via82xx.c:1.101->1.102 # L:added the DXS entry for Mitac/Vobis/Yakumo laptop. # # ChangeSet # 2004/05/28 15:01:53+02:00 perex@suse.cz # ALSA CVS update - Clemens Ladisch # Wavefront drivers # fix possible buffer overflow in wavefront_download_firmware() # # sound/isa/wavefront/wavefront_synth.c # 2004/05/25 07:10:48+02:00 perex@suse.cz +6 -0 # ALSA CVS update # D:2004/05/25 13:10:48 # C:Wavefront drivers # A:Clemens Ladisch # F:isa/wavefront/wavefront_synth.c:1.17->1.18 # L:fix possible buffer overflow in wavefront_download_firmware() # # ChangeSet # 2004/05/28 14:20:37+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # ICE1724 driver # avoid to change the AC97 rate registers. this seems conflicting # with the rate conversion on VT172x. # # sound/pci/ice1712/ice1724.c # 2004/05/25 04:56:22+02:00 perex@suse.cz +2 -17 # ALSA CVS update # D:2004/05/25 10:56:22 # C:ICE1724 driver # A:Takashi Iwai # F:pci/ice1712/ice1724.c:1.32->1.33 # L:avoid to change the AC97 rate registers. this seems conflicting # L:with the rate conversion on VT172x. # # ChangeSet # 2004/05/28 14:20:17+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # Digigram VX core # added 'Clock Mode' control to choose the clock source. # # sound/drivers/vx/vx_uer.c # 2004/05/24 12:12:43+02:00 perex@suse.cz +8 -7 # ALSA CVS update # D:2004/05/24 18:12:43 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_core.c:1.7->1.8 # F:drivers/vx/vx_mixer.c:1.2->1.3 # F:drivers/vx/vx_uer.c:1.1->1.2 # F:include/vx_core.h:1.1->1.2 # L:added 'Clock Mode' control to choose the clock source. # # sound/drivers/vx/vx_mixer.c # 2004/05/24 12:12:43+02:00 perex@suse.cz +51 -0 # ALSA CVS update # D:2004/05/24 18:12:43 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_core.c:1.7->1.8 # F:drivers/vx/vx_mixer.c:1.2->1.3 # F:drivers/vx/vx_uer.c:1.1->1.2 # F:include/vx_core.h:1.1->1.2 # L:added 'Clock Mode' control to choose the clock source. # # sound/drivers/vx/vx_core.c # 2004/05/24 12:12:43+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/05/24 18:12:43 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_core.c:1.7->1.8 # F:drivers/vx/vx_mixer.c:1.2->1.3 # F:drivers/vx/vx_uer.c:1.1->1.2 # F:include/vx_core.h:1.1->1.2 # L:added 'Clock Mode' control to choose the clock source. # # include/sound/vx_core.h # 2004/05/24 12:12:43+02:00 perex@suse.cz +8 -0 # ALSA CVS update # D:2004/05/24 18:12:43 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_core.c:1.7->1.8 # F:drivers/vx/vx_mixer.c:1.2->1.3 # F:drivers/vx/vx_uer.c:1.1->1.2 # F:include/vx_core.h:1.1->1.2 # L:added 'Clock Mode' control to choose the clock source. # # ChangeSet # 2004/05/28 14:19:53+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # Digigram VX core # fixed the compile warnings due to the last change. # # sound/drivers/vx/vx_pcm.c # 2004/05/24 12:11:58+02:00 perex@suse.cz +2 -1 # ALSA CVS update # D:2004/05/24 18:11:58 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_pcm.c:1.4->1.5 # L:fixed the compile warnings due to the last change. # # ChangeSet # 2004/05/28 14:19:28+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # PARISC Harmony driver # - fixed the buffer handling without dma_alloc_coherent support. # # sound/parisc/harmony.c # 2004/05/24 09:51:51+02:00 perex@suse.cz +31 -9 # ALSA CVS update # D:2004/05/24 15:51:51 # C:PARISC Harmony driver # A:Takashi Iwai # F:parisc/harmony.c:1.10->1.11 # L:- fixed the buffer handling without dma_alloc_coherent support. # # ChangeSet # 2004/05/28 14:19:07+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # Digigram VX core # fixed sleep while atomic in the trigger callback. # # sound/drivers/vx/vx_pcm.c # 2004/05/24 09:06:17+02:00 perex@suse.cz +2 -8 # ALSA CVS update # D:2004/05/24 15:06:17 # C:Digigram VX core # A:Takashi Iwai # F:drivers/vx/vx_pcm.c:1.3->1.4 # L:fixed sleep while atomic in the trigger callback. # # ChangeSet # 2004/05/28 14:14:19+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # AC97 Codec Core # - added the global mutex for ac97_t (ad18xx mutex is removed). # used to protect paging and AD18xx multi-codecs. # - set PAGE_INT register explicitly before accessing (for STAC9758). # - moved ALC650 revision check to patch_alc650(). # - support stereo Mic playback. # - moved STAC9708 quirk to patch_stac9708(). # - don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # - avoid the unnecessary RESET-waiting for audio/modem codec. # - fixed the evaluation of modem codec to call mpatch callback properly. # - determine the SPDIF rate in the build path. # - added suffix argument to snd_ac97_rename|remove|swap_ctl(). # - added snd_ac97_rename_vol_ctl(). # # sound/pci/ac97/ac97_proc.c # 2004/05/24 08:24:42+02:00 perex@suse.cz +6 -4 # ALSA CVS update # D:2004/05/24 14:24:42 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.44->1.45 # F:pci/ac97/ac97_codec.c:1.132->1.133 # F:pci/ac97/ac97_local.h:1.5->1.6 # F:pci/ac97/ac97_patch.c:1.49->1.50 # F:pci/ac97/ac97_proc.c:1.7->1.8 # L:- added the global mutex for ac97_t (ad18xx mutex is removed). # L: used to protect paging and AD18xx multi-codecs. # L:- set PAGE_INT register explicitly before accessing (for STAC9758). # L:- moved ALC650 revision check to patch_alc650(). # L:- support stereo Mic playback. # L:- moved STAC9708 quirk to patch_stac9708(). # L:- don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # L:- avoid the unnecessary RESET-waiting for audio/modem codec. # L:- fixed the evaluation of modem codec to call mpatch callback properly. # L:- determine the SPDIF rate in the build path. # L:- added suffix argument to snd_ac97_rename|remove|swap_ctl(). # L:- added snd_ac97_rename_vol_ctl(). # # sound/pci/ac97/ac97_patch.c # 2004/05/24 08:24:42+02:00 perex@suse.cz +75 -30 # ALSA CVS update # D:2004/05/24 14:24:42 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.44->1.45 # F:pci/ac97/ac97_codec.c:1.132->1.133 # F:pci/ac97/ac97_local.h:1.5->1.6 # F:pci/ac97/ac97_patch.c:1.49->1.50 # F:pci/ac97/ac97_proc.c:1.7->1.8 # L:- added the global mutex for ac97_t (ad18xx mutex is removed). # L: used to protect paging and AD18xx multi-codecs. # L:- set PAGE_INT register explicitly before accessing (for STAC9758). # L:- moved ALC650 revision check to patch_alc650(). # L:- support stereo Mic playback. # L:- moved STAC9708 quirk to patch_stac9708(). # L:- don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # L:- avoid the unnecessary RESET-waiting for audio/modem codec. # L:- fixed the evaluation of modem codec to call mpatch callback properly. # L:- determine the SPDIF rate in the build path. # L:- added suffix argument to snd_ac97_rename|remove|swap_ctl(). # L:- added snd_ac97_rename_vol_ctl(). # # sound/pci/ac97/ac97_local.h # 2004/05/24 08:24:42+02:00 perex@suse.cz +4 -3 # ALSA CVS update # D:2004/05/24 14:24:42 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.44->1.45 # F:pci/ac97/ac97_codec.c:1.132->1.133 # F:pci/ac97/ac97_local.h:1.5->1.6 # F:pci/ac97/ac97_patch.c:1.49->1.50 # F:pci/ac97/ac97_proc.c:1.7->1.8 # L:- added the global mutex for ac97_t (ad18xx mutex is removed). # L: used to protect paging and AD18xx multi-codecs. # L:- set PAGE_INT register explicitly before accessing (for STAC9758). # L:- moved ALC650 revision check to patch_alc650(). # L:- support stereo Mic playback. # L:- moved STAC9708 quirk to patch_stac9708(). # L:- don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # L:- avoid the unnecessary RESET-waiting for audio/modem codec. # L:- fixed the evaluation of modem codec to call mpatch callback properly. # L:- determine the SPDIF rate in the build path. # L:- added suffix argument to snd_ac97_rename|remove|swap_ctl(). # L:- added snd_ac97_rename_vol_ctl(). # # sound/pci/ac97/ac97_codec.c # 2004/05/24 08:24:42+02:00 perex@suse.cz +93 -70 # ALSA CVS update # D:2004/05/24 14:24:42 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.44->1.45 # F:pci/ac97/ac97_codec.c:1.132->1.133 # F:pci/ac97/ac97_local.h:1.5->1.6 # F:pci/ac97/ac97_patch.c:1.49->1.50 # F:pci/ac97/ac97_proc.c:1.7->1.8 # L:- added the global mutex for ac97_t (ad18xx mutex is removed). # L: used to protect paging and AD18xx multi-codecs. # L:- set PAGE_INT register explicitly before accessing (for STAC9758). # L:- moved ALC650 revision check to patch_alc650(). # L:- support stereo Mic playback. # L:- moved STAC9708 quirk to patch_stac9708(). # L:- don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # L:- avoid the unnecessary RESET-waiting for audio/modem codec. # L:- fixed the evaluation of modem codec to call mpatch callback properly. # L:- determine the SPDIF rate in the build path. # L:- added suffix argument to snd_ac97_rename|remove|swap_ctl(). # L:- added snd_ac97_rename_vol_ctl(). # # include/sound/ac97_codec.h # 2004/05/24 08:24:42+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/24 14:24:42 # C:AC97 Codec Core # A:Takashi Iwai # F:include/ac97_codec.h:1.44->1.45 # F:pci/ac97/ac97_codec.c:1.132->1.133 # F:pci/ac97/ac97_local.h:1.5->1.6 # F:pci/ac97/ac97_patch.c:1.49->1.50 # F:pci/ac97/ac97_proc.c:1.7->1.8 # L:- added the global mutex for ac97_t (ad18xx mutex is removed). # L: used to protect paging and AD18xx multi-codecs. # L:- set PAGE_INT register explicitly before accessing (for STAC9758). # L:- moved ALC650 revision check to patch_alc650(). # L:- support stereo Mic playback. # L:- moved STAC9708 quirk to patch_stac9708(). # L:- don't clear PC_BEEP high bits (ac97 2.3 sets frequency there). # L:- avoid the unnecessary RESET-waiting for audio/modem codec. # L:- fixed the evaluation of modem codec to call mpatch callback properly. # L:- determine the SPDIF rate in the build path. # L:- added suffix argument to snd_ac97_rename|remove|swap_ctl(). # L:- added snd_ac97_rename_vol_ctl(). # # ChangeSet # 2004/05/28 14:13:55+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # Memalloc module # - added ifdef CONFIG_PCI around the enable module option to avoid the compile # warnings without PCI support. # # sound/core/memalloc.c # 2004/05/24 08:19:55+02:00 perex@suse.cz +4 -0 # ALSA CVS update # D:2004/05/24 14:19:55 # C:Memalloc module # A:Takashi Iwai # F:core/memalloc.c:1.31->1.32 # L:- added ifdef CONFIG_PCI around the enable module option to avoid the compile # L: warnings without PCI support. # # ChangeSet # 2004/05/28 14:13:31+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # Documentation,ICE1712 driver,ICE1724 driver # - fixed the description of model module parameters for ice1712 and ice1724 # drivers. # - added the support of VT1720-based mobo. # (still experimental and supporting AC97 only) # # sound/pci/ice1712/vt1720_mobo.h # 2004/05/28 13:46:26+02:00 perex@suse.cz +35 -0 # ALSA CVS update # D:2004/05/24 14:18:20 # C:Documentation,ICE1712 driver,ICE1724 driver # A:Takashi Iwai # F:Documentation/ALSA-Configuration.txt:1.44->1.45 # F:pci/ice1712/Makefile:1.11->1.12 # F:pci/ice1712/ice1724.c:1.31->1.32 # F:pci/ice1712/vt1720_mobo.c:INITIAL->1.1 # F:pci/ice1712/vt1720_mobo.h:INITIAL->1.1 # L:- fixed the description of model module parameters for ice1712 and ice1724 # L: drivers. # L:- added the support of VT1720-based mobo. # L: (still experimental and supporting AC97 only) # # sound/pci/ice1712/vt1720_mobo.h # 2004/05/28 13:46:26+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/vt1720_mobo.h # # sound/pci/ice1712/vt1720_mobo.c # 2004/05/28 13:46:21+02:00 perex@suse.cz +97 -0 # ALSA CVS update # D:2004/05/24 14:18:20 # C:Documentation,ICE1712 driver,ICE1724 driver # A:Takashi Iwai # F:Documentation/ALSA-Configuration.txt:1.44->1.45 # F:pci/ice1712/Makefile:1.11->1.12 # F:pci/ice1712/ice1724.c:1.31->1.32 # F:pci/ice1712/vt1720_mobo.c:INITIAL->1.1 # F:pci/ice1712/vt1720_mobo.h:INITIAL->1.1 # L:- fixed the description of model module parameters for ice1712 and ice1724 # L: drivers. # L:- added the support of VT1720-based mobo. # L: (still experimental and supporting AC97 only) # # sound/pci/ice1712/ice1724.c # 2004/05/24 08:18:20+02:00 perex@suse.cz +6 -6 # ALSA CVS update # D:2004/05/24 14:18:20 # C:Documentation,ICE1712 driver,ICE1724 driver # A:Takashi Iwai # F:Documentation/ALSA-Configuration.txt:1.44->1.45 # F:pci/ice1712/Makefile:1.11->1.12 # F:pci/ice1712/ice1724.c:1.31->1.32 # F:pci/ice1712/vt1720_mobo.c:INITIAL->1.1 # F:pci/ice1712/vt1720_mobo.h:INITIAL->1.1 # L:- fixed the description of model module parameters for ice1712 and ice1724 # L: drivers. # L:- added the support of VT1720-based mobo. # L: (still experimental and supporting AC97 only) # # sound/pci/ice1712/Makefile # 2004/05/24 08:18:20+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/24 14:18:20 # C:Documentation,ICE1712 driver,ICE1724 driver # A:Takashi Iwai # F:Documentation/ALSA-Configuration.txt:1.44->1.45 # F:pci/ice1712/Makefile:1.11->1.12 # F:pci/ice1712/ice1724.c:1.31->1.32 # F:pci/ice1712/vt1720_mobo.c:INITIAL->1.1 # F:pci/ice1712/vt1720_mobo.h:INITIAL->1.1 # L:- fixed the description of model module parameters for ice1712 and ice1724 # L: drivers. # L:- added the support of VT1720-based mobo. # L: (still experimental and supporting AC97 only) # # Documentation/sound/alsa/ALSA-Configuration.txt # 2004/05/24 08:18:20+02:00 perex@suse.cz +3 -2 # ALSA CVS update # D:2004/05/24 14:18:20 # C:Documentation,ICE1712 driver,ICE1724 driver # A:Takashi Iwai # F:Documentation/ALSA-Configuration.txt:1.44->1.45 # F:pci/ice1712/Makefile:1.11->1.12 # F:pci/ice1712/ice1724.c:1.31->1.32 # F:pci/ice1712/vt1720_mobo.c:INITIAL->1.1 # F:pci/ice1712/vt1720_mobo.h:INITIAL->1.1 # L:- fixed the description of model module parameters for ice1712 and ice1724 # L: drivers. # L:- added the support of VT1720-based mobo. # L: (still experimental and supporting AC97 only) # # sound/pci/ice1712/vt1720_mobo.c # 2004/05/28 13:46:21+02:00 perex@suse.cz +0 -0 # BitKeeper file /home/perex/bk/linux-sound/work/sound/pci/ice1712/vt1720_mobo.c # # ChangeSet # 2004/05/28 14:13:07+02:00 perex@suse.cz # ALSA CVS update - Takashi Iwai # ATIIXP driver # - continue to probe other codecs even if a codec returns error # (instead of breaking the probing). # this will fix some cases with both AC97 and MC97 codecs. # # sound/pci/atiixp.c # 2004/05/24 08:16:43+02:00 perex@suse.cz +4 -12 # ALSA CVS update # D:2004/05/24 14:16:43 # C:ATIIXP driver # A:Takashi Iwai # F:pci/atiixp.c:1.9->1.10 # L:- continue to probe other codecs even if a codec returns error # L: (instead of breaking the probing). # L: this will fix some cases with both AC97 and MC97 codecs. # # ChangeSet # 2004/05/28 14:12:17+02:00 perex@suse.cz # ALSA CVS update - Clemens Ladisch # ALSA sequencer,ALSA<-OSS sequencer # export snd_seq_set_queue_tempo() for OSS to prevent calling # snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt # context # # sound/core/seq/seq_clientmgr.c # 2004/05/24 07:31:18+02:00 perex@suse.cz +9 -9 # ALSA CVS update # D:2004/05/24 13:31:18 # C:ALSA sequencer,ALSA<-OSS sequencer # A:Clemens Ladisch # F:core/seq/seq.c:1.12->1.13 # F:core/seq/seq_clientmgr.c:1.28->1.29 # F:core/seq/oss/seq_oss_timer.c:1.5->1.6 # F:include/seq_kernel.h:1.9->1.10 # L:export snd_seq_set_queue_tempo() for OSS to prevent calling # L:snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt # L:context # # sound/core/seq/seq.c # 2004/05/24 07:31:18+02:00 perex@suse.cz +1 -0 # ALSA CVS update # D:2004/05/24 13:31:18 # C:ALSA sequencer,ALSA<-OSS sequencer # A:Clemens Ladisch # F:core/seq/seq.c:1.12->1.13 # F:core/seq/seq_clientmgr.c:1.28->1.29 # F:core/seq/oss/seq_oss_timer.c:1.5->1.6 # F:include/seq_kernel.h:1.9->1.10 # L:export snd_seq_set_queue_tempo() for OSS to prevent calling # L:snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt # L:context # # sound/core/seq/oss/seq_oss_timer.c # 2004/05/24 07:31:19+02:00 perex@suse.cz +1 -1 # ALSA CVS update # D:2004/05/24 13:31:18 # C:ALSA sequencer,ALSA<-OSS sequencer # A:Clemens Ladisch # F:core/seq/seq.c:1.12->1.13 # F:core/seq/seq_clientmgr.c:1.28->1.29 # F:core/seq/oss/seq_oss_timer.c:1.5->1.6 # F:include/seq_kernel.h:1.9->1.10 # L:export snd_seq_set_queue_tempo() for OSS to prevent calling # L:snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt # L:context # # include/sound/seq_kernel.h # 2004/05/24 07:31:18+02:00 perex@suse.cz +3 -0 # ALSA CVS update # D:2004/05/24 13:31:18 # C:ALSA sequencer,ALSA<-OSS sequencer # A:Clemens Ladisch # F:core/seq/seq.c:1.12->1.13 # F:core/seq/seq_clientmgr.c:1.28->1.29 # F:core/seq/oss/seq_oss_timer.c:1.5->1.6 # F:include/seq_kernel.h:1.9->1.10 # L:export snd_seq_set_queue_tempo() for OSS to prevent calling # L:snd_seq_kernel_client_ctl() (using copy_from_user()) in interrupt # L:context # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS 2004-09-06 16:37:54 -07:00 +++ b/CREDITS 2004-09-06 16:37:54 -07:00 @@ -281,6 +281,11 @@ S: Greenbelt, Maryland 20771 S: USA +N: Adam Belay +E: ambx1@neo.rr.com +D: Linux Plug and Play Support +S: USA + N: Daniele Bellucci E: bellucda@tiscali.it D: Various Janitor work. @@ -513,6 +518,14 @@ S: Oxford S: United Kingdom +N: Luiz Fernando N. Capitulino +E: lcapitulino@terra.com.br +E: lcapitulino@prefeitura.sp.gov.br +W: http://www.telecentros.sp.gov.br +D: Little fixes and a lot of janitorial work +S: E-GOV Telecentros SP +S: Brazil + N: Remy Card E: Remy.Card@masi.ibp.fr E: Remy.Card@linux.org @@ -625,6 +638,14 @@ D: Assorted sched/mm titbits S: Oxfordshire, UK. +N: Kees Cook +E: kees@outflux.net +W: http://outflux.net/ +P: 1024D/17063E6D 9FA3 C49C 23C9 D1BC 2E30 1975 1FFF 4BA9 1706 3E6D +D: Minor updates to SCSI code for the Communications type +S: (ask for current address) +S: USA + N: Mark Corner E: mcorner@umich.edu W: http://www.eecs.umich.edu/~mcorner/ @@ -639,14 +660,6 @@ S: Santa Cruz, California S: USA -N: Kees Cook -E: kees@outflux.net -W: http://outflux.net/ -P: 1024D/17063E6D 9FA3 C49C 23C9 D1BC 2E30 1975 1FFF 4BA9 1706 3E6D -D: Minor updates to SCSI code for the Communications type -S: (ask for current address) -S: USA - N: Alan Cox W: http://www.linux.org.uk/diary/ D: Linux Networking (0.99.10->2.0.29) @@ -735,6 +748,12 @@ S: D-69231 Rauenberg S: Germany +N: Jean Delvare +E: khali@linux-fr.org +W: http://khali.linux-fr.org/ +D: Several hardware monitoring drivers +S: France + N: Peter Denison E: peterd@pnd-pc.demon.co.uk W: http://www.pnd-pc.demon.co.uk/promise/ @@ -754,7 +773,7 @@ D: HTB qdisc and random networking hacks N: Alex deVries -E: adevries@thepuffingroup.com +E: alex@onefishtwo.ca D: Various SGI parts, bits of HAL2 and Newport, PA-RISC Linux. S: 41.5 William Street S: Ottawa, Ontario @@ -905,6 +924,10 @@ S: S-114 79 Stockholm S: Sweden +N: David Engebretsen +E: engebret@us.ibm.com +D: Linux port to 64-bit PowerPC architecture + N: Michael Engel E: engel@unix-ag.org D: DECstation framebuffer drivers @@ -1049,6 +1072,12 @@ S: 80050-430 - Curitiba - Paraná S: Brazil +N: Kumar Gala +E: kumar.gala@freescale.com +D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support +S: Austin, Texas 78729 +S: USA + N: Nigel Gamble E: nigel@nrg.org D: Interrupt-driven printer driver @@ -1060,12 +1089,6 @@ N: Jeff Garzik E: jgarzik@pobox.com -N: Kumar Gala -E: kumar.gala@freescale.com -D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support -S: Austin, Texas 78729 -S: USA - N: Jacques Gelinas E: jacques@solucorp.qc.ca D: Author of the Umsdos file system @@ -1567,6 +1590,13 @@ E: ajoshi@shell.unixbox.com D: fbdev hacking +N: Jesper Juhl +E: juhl-lkml@dif.dk +D: Various small janitor fixes, cleanups etc. +S: Lemnosvej 1, 3.tv +S: 2300 Copenhagen S +S: Denmark + N: Bernhard Kaindl E: bkaindl@netway.at E: edv@bartelt.via.at @@ -1818,11 +1848,6 @@ S: 370 01 Ceske Budejovice S: Czech Republic -N: Adam Belay -E: ambx1@neo.rr.com -D: Linux Plug and Play Support -S: USA - N: Bas Laarhoven E: sjml@xs4all.nl D: Loadable modules and ftape driver @@ -1954,12 +1979,6 @@ S: Niwot, Colorado 80503 S: USA -N: Pete Popov -E: pete_popov@yahoo.com -D: Linux/MIPS AMD/Alchemy Port and mips hacking and debugging -S: San Jose, CA 95134 -S: USA - N: Robert M. Love E: rml@tech9.net E: rml@novell.com @@ -2214,14 +2233,13 @@ S: Netherlands N: David S. Miller -E: davem@redhat.com +E: davem@davemloft.net D: Sparc and blue box hacker D: Vger Linux mailing list co-maintainer D: Linux Emacs elf/qmagic support + other libc/gcc things D: Yee bore de yee bore! ;-) -S: 750 N. Shoreline Blvd. -S: Apt. #111 -S: Mountain View, California 94043 +S: 575 Harrison St. #103 +S: San Francisco, CA 94105 S: USA N: Rick Miller @@ -2582,6 +2600,12 @@ D: sonypi, meye drivers, mct_u232 usb serial hacks S: Paris, France +N: Pete Popov +E: pete_popov@yahoo.com +D: Linux/MIPS AMD/Alchemy Port and mips hacking and debugging +S: San Jose, CA 95134 +S: USA + N: Matt Porter E: mporter@kernel.crashing.org D: Motorola PowerPC PReP support @@ -2821,7 +2845,6 @@ S: Wellington S: New Zealand - N: Sampo Saaristo E: sambo@cs.tut.fi D: Co-author of Multi-Protocol Over ATM (MPOA) @@ -2838,6 +2861,9 @@ S: 8006 Zuerich S: Switzerland +N: Manuel Estrada Sainz +D: Firmware loader (request_firmware) + N: Wayne Salamon E: wsalamon@tislabs.com E: wsalamon@nai.com @@ -3289,14 +3315,6 @@ S: 10200 Prague 10, Hostivar S: Czech Republic -N: James R. Van Zandt -E: jrv@vanzandt.mv.com -P: 1024/E298966D F0 37 4F FD E5 7E C5 E6 F1 A0 1E 22 6F 46 DA 0C -D: Author and maintainer of the Double Talk speech synthesizer driver -S: 27 Spencer Drive -S: Nashua, New Hampshire 03062 -S: USA - N: Heikki Vatiainen E: hessu@cs.tut.fi D: Co-author of Multi-Protocol Over ATM (MPOA), some LANE hacks @@ -3578,6 +3596,14 @@ S: Tokyo 153 S: Japan +N: James R. Van Zandt +E: jrv@vanzandt.mv.com +P: 1024/E298966D F0 37 4F FD E5 7E C5 E6 F1 A0 1E 22 6F 46 DA 0C +D: Author and maintainer of the Double Talk speech synthesizer driver +S: 27 Spencer Drive +S: Nashua, New Hampshire 03062 +S: USA + N: Orest Zborowski E: orestz@eskimo.com D: XFree86 and kernel development @@ -3619,13 +3645,6 @@ D: EISA/sysfs subsystem S: France -N: Luiz Fernando N. Capitulino -E: lcapitulino@terra.com.br -E: lcapitulino@prefeitura.sp.gov.br -W: http://www.telecentros.sp.gov.br -D: Little fixes and a lot of janitorial work -S: E-GOV Telecentros SP -S: Brazil # Don't add your name here, unless you really _are_ after Marc # alphabetically. Leonard used to be very proud of being the diff -Nru a/Documentation/CodingStyle b/Documentation/CodingStyle --- a/Documentation/CodingStyle 2004-09-06 16:37:51 -07:00 +++ b/Documentation/CodingStyle 2004-09-06 16:37:51 -07:00 @@ -356,10 +356,10 @@ Macros with multiple statements should be enclosed in a do - while block: -#define macrofun(a,b,c) \ +#define macrofun(a, b, c) \ do { \ if (a == 5) \ - do_this(b,c); \ + do_this(b, c); \ } while (0) Things to avoid when using macros: diff -Nru a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt --- a/Documentation/DMA-API.txt 2004-09-06 16:37:53 -07:00 +++ b/Documentation/DMA-API.txt 2004-09-06 16:37:53 -07:00 @@ -444,4 +444,83 @@ continuing on for size. Again, you *must* observe the cache line boundaries when doing this. +int +dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int + flags) + + +Declare region of memory to be handed out by dma_alloc_coherent when +it's asked for coherent memory for this device. + +bus_addr is the physical address to which the memory is currently +assigned in the bus responding region (this will be used by the +platform to perform the mapping) + +device_addr is the physical address the device needs to be programmed +with actually to address this memory (this will be handed out as the +dma_addr_t in dma_alloc_coherent()) + +size is the size of the area (must be multiples of PAGE_SIZE). + +flags can be or'd together and are + +DMA_MEMORY_MAP - request that the memory returned from +dma_alloc_coherent() be directly writeable. + +DMA_MEMORY_IO - request that the memory returned from +dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. + +One or both of these flags must be present + +DMA_MEMORY_INCLUDES_CHILDREN - make the declared memory be allocated by +dma_alloc_coherent of any child devices of this one (for memory residing +on a bridge). + +DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions. +Do not allow dma_alloc_coherent() to fall back to system memory when +it's out of memory in the declared region. + +The return value will be either DMA_MEMORY_MAP or DMA_MEMORY_IO and +must correspond to a passed in flag (i.e. no returning DMA_MEMORY_IO +if only DMA_MEMORY_MAP were passed in) for success or zero for +failure. + +Note, for DMA_MEMORY_IO returns, all subsequent memory returned by +dma_alloc_coherent() may no longer be accessed directly, but instead +must be accessed using the correct bus functions. If your driver +isn't prepared to handle this contingency, it should not specify +DMA_MEMORY_IO in the input flags. + +As a simplification for the platforms, only *one* such region of +memory may be declared per device. + +For reasons of efficiency, most platforms choose to track the declared +region only at the granularity of a page. For smaller allocations, +you should use the dma_pool() API. + +void +dma_release_declared_memory(struct device *dev) + +Remove the memory region previously declared from the system. This +API performs *no* in-use checking for this region and will return +unconditionally having removed all the required structures. It is the +drivers job to ensure that no parts of this memory region are +currently in use. + +void * +dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size) + +This is used to occupy specific regions of the declared space +(dma_alloc_coherent() will hand out the first free region it finds). + +device_addr is the *device* address of the region requested + +size is the size (and should be a page sized multiple). + +The return value will be either a pointer to the processor virtual +address of the memory, or an error (via PTR_ERR()) if any part of the +region is occupied. + diff -Nru a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl --- a/Documentation/DocBook/gadget.tmpl 2004-09-06 16:37:52 -07:00 +++ b/Documentation/DocBook/gadget.tmpl 2004-09-06 16:37:52 -07:00 @@ -2,8 +2,8 @@ USB Gadget API for Linux - 02 June 2003 - 02 June 2003 + 20 August 2004 + 20 August 2004 @@ -34,7 +34,7 @@ - 2003 + 2003-2004 David Brownell @@ -73,9 +73,13 @@ composite devices, and alternate interface settings. + USB "On-The-Go" (OTG) support, in conjunction + with updates to the Linux-USB host side. + Sharing data structures and API models with the - Linux-USB host side API. This looks forward to USB "On-The-Go" - (OTG) and similar more-symmetric frameworks. + Linux-USB host side API. This helps the OTG support, and + looks forward to more-symmetric frameworks (where the same + I/O model is used by both host and device side drivers). Minimalist, so it's easier to support new device controller hardware. I/O processing doesn't imply large @@ -153,6 +157,7 @@ the SA-11x0 or PXA-25x UDC (found within many PDAs), and a variety of other products. + @@ -162,10 +167,14 @@ The lower boundary of this driver implements hardware-neutral USB functions, using calls to the controller driver. Because such hardware varies widely in capabilities and restrictions, - the gadget driver is normally configured at compile time + and is used in embedded environments where space is at a premium, + the gadget driver is often configured at compile time to work with endpoints supported by one particular controller. Gadget drivers may be portable to several different controllers, using conditional compilation. + (Recent kernels substantially simplify the work involved in + supporting new hardware, by autoconfiguring + endpoints automatically for many bulk-oriented drivers.) Gadget driver responsibilities include: @@ -178,8 +187,9 @@ altsettings, including enabling and configuring endpoints handling life cycle events, such as managing - bindings - to hardware, and disconnection from the USB host. + bindings to hardware, + USB suspend/resume, remote wakeup, + and disconnection from the USB host. managing IN and OUT transfers on all currently enabled endpoints @@ -244,15 +254,38 @@ -Over time, reusable utilities should evolve to help make some -gadget driver tasks simpler. An example of particular interest +OTG-capable systems will also need to include a standard Linux-USB +host side stack, +with usbcore, +one or more Host Controller Drivers (HCDs), +USB Device Drivers to support +the OTG "Targeted Peripheral List", +and so forth. +There will also be an OTG Controller Driver, +which is visible to gadget and device driver developers only indirectly. +That helps the host and device side USB controllers implement the +two new OTG protocols (HNP and SRP). +Roles switch (host to peripheral, or vice versa) using HNP +during USB suspend processing, and SRP can be viewed as a +more battery-friendly kind of device wakeup protocol. + + +Over time, reusable utilities are evolving to help make some +gadget driver tasks simpler. +For example, building configuration descriptors from vectors of +descriptors for the configurations interfaces and endpoints is +now automated, and many drivers now use autoconfiguration to +choose hardware endpoints and initialize their descriptors. + +A potential example of particular interest is code implementing standard USB-IF protocols for HID, networking, storage, or audio classes. Some developers are interested in KDB or KGDB hooks, to let target hardware be remotely debugged. Most such USB protocol code doesn't need to be hardware-specific, any more than network protocols like X11, HTTP, or NFS are. -Such interface drivers might be combined, to support composite devices. +Such gadget-side interface drivers should eventually be combined, +to implement composite devices. @@ -284,7 +317,7 @@ However, docproc does not understand all the C constructs that are used, so some relevant information is likely omitted from what you are reading. -One example of such information is several per-request flags. +One example of such information is endpoint autoconfiguration. You'll have to read the header file, and use example source code (such as that for "Gadget Zero"), to fully understand the API. @@ -292,7 +325,7 @@ The part of the API implementing some basic driver capabilities is specific to the version of the Linux kernel that's in use. -The 2.5 kernel includes a driver model +The 2.6 kernel includes a driver model framework that has no analogue on earlier kernels; so those parts of the gadget API are not fully portable. (They are implemented on 2.4 kernels, but in a different way.) @@ -308,17 +341,21 @@ that would be added using hardware-specific APIs. -This API expects drivers to use conditional compilation to handle -endpoint capabilities of different hardware. -Those tend to have arbitrary restrictions, relating to +This API allows drivers to use conditional compilation to handle +endpoint capabilities of different hardware, but doesn't require that. +Hardware tends to have arbitrary restrictions, relating to transfer types, addressing, packet sizes, buffering, and availability. As a rule, such differences only matter for "endpoint zero" logic that handles device configuration and management. -The API only supports limited run-time +The API supports limited run-time detection of capabilities, through naming conventions for endpoints. -Although a gadget driver could scan the endpoints available to it and -choose to map those capabilities onto driver functionality in some way, -few drivers will want to reconfigure themselves at run-time. +Many drivers will be able to at least partially autoconfigure +themselves. +In particular, driver init sections will often have endpoint +autoconfiguration logic that scans the hardware's list of endpoints +to find ones matching the driver requirements +(relying on those conventions), to eliminate some of the most +common reasons for conditional compilation. Like the Linux-USB host side API, this API exposes @@ -355,10 +392,14 @@ At this point the device is logically in the USB ch9 initial state ("attached"), drawing no power and not usable (since it does not yet support enumeration). +Any host should not see the device, since it's not +activated the data line pullup used by the host to +detect a device, even if VBUS power is available. Register a gadget driver that implements some higher level -device function. That will then bind() to a usb_gadget. +device function. That will then bind() to a usb_gadget, which +activates the data line pullup sometime after detecting VBUS. The hardware driver can now start enumerating. @@ -373,6 +414,8 @@ functionality being implemented. That can involve alternate settings or configurations, unless the hardware prevents such operation. +For OTG devices, each configuration descriptor includes +an OTG descriptor. The gadget driver handles the last step of enumeration, @@ -381,13 +424,18 @@ with all interfaces in their default settings. That involves using a list of the hardware's endpoints, enabling each endpoint according to its descriptor. +It may also involve using usb_gadget_vbus_draw +to let more power be drawn from VBUS, as allowed by that configuration. +For OTG devices, setting a configuration may also involve reporting +HNP capabilities through a user interface. Do real work and perform data transfers, possibly involving changes to interface settings or switching to new configurations, until the device is disconnect()ed from the host. Queue any number of transfer requests to each endpoint. -The drivers then go back to step 3 (above). +It may be suspended and resumed several times before being disconnected. +On disconnect, the drivers go back to step 3 (above). When the gadget driver module is being unloaded, @@ -399,7 +447,9 @@ Drivers will normally be arranged so that just loading the gadget driver module (or statically linking it into a Linux kernel) -allows the peripheral device to be enumerated. +allows the peripheral device to be enumerated, but some drivers +will defer enumeration until some higher level component (like +a user mode daemon) enables it. Note that at this lowest level there are no policies about how ep0 configuration logic is implemented, except that it should obey USB specifications. @@ -410,6 +460,18 @@ be built by integrating reusable components. +Note that the lifecycle above can be slightly different +for OTG devices. +Other than providing an additional OTG descriptor in each +configuration, only the HNP-related differences are particularly +visible to driver code. +They involve reporting requirements during the SET_CONFIGURATION +request, and the option to invoke HNP during some suspend callbacks. +Also, SRP changes the semantics of +usb_gadget_wakeup +slightly. + + USB 2.0 Chapter 9 Types and Constants @@ -418,9 +480,9 @@ rely on common USB structures and constants defined in the <linux/usb_ch9.h> -header file, which is standard in Linux 2.5 kernels. +header file, which is standard in Linux 2.6 kernels. These are the same types and constants used by host -side drivers. +side drivers (and usbcore). !Iinclude/linux/usb_ch9.h @@ -451,26 +513,38 @@ The core API is sufficient for writing a USB Gadget Driver, but some optional utilities are provided to simplify common tasks. +These utilities include endpoint autoconfiguration. !Edrivers/usb/gadget/usbstring.c !Edrivers/usb/gadget/config.c + Peripheral Controller Drivers -The first hardware supporting this API is the NetChip 2280 +The first hardware supporting this API was the NetChip 2280 controller, which supports USB 2.0 high speed and is based on PCI. This is the net2280 driver module. -The driver supports Linux kernel versions 2.4 and 2.5; +The driver supports Linux kernel versions 2.4 and 2.6; contact NetChip Technologies for development boards and product information. -For users of Intel's PXA 2xx series processors, -a pxa2xx_udc driver is available. +Other hardware working in the "gadget" framework includes: +Intel's PXA 25x and IXP42x series processors +(pxa2xx_udc), +Toshiba TC86c001 "Goku-S" (goku_udc), +Renesas SH7705/7727 (sh_udc), +MediaQ 11xx (mq11xx_udc), +Hynix HMS30C7202 (h7202_udc), +National 9303/4 (n9604_udc), +Texas Instruments OMAP (omap_udc), +Sharp LH7A40x (lh7a40x_udc), +and more. +Most of those are full speed controllers. At this writing, there are people at work on drivers in @@ -526,6 +600,15 @@ to avoid creating problems.) +Support for Microsoft's RNDIS +protocol has been contributed by Pengutronix and Auerswald GmbH. +This is like CDC Ethernet, but it runs on more slightly USB hardware +(but less than the CDC subset). +However, its main claim to fame is being able to connect directly to +recent versions of Windows, using drivers that Microsoft bundles +and supports, making it much simpler to network with Windows. + + There is also support for user mode gadget drivers, using gadgetfs. This provides a User Mode API that presents @@ -535,6 +618,10 @@ develop and debug user mode drivers, so that once a robust controller driver is available many applications for it won't require new kernel mode software. +Linux 2.6 Async I/O (AIO) +support is available, so that user mode software +can stream data with only slightly more overhead +than a kernel driver. There's a USB Mass Storage class driver, which provides @@ -548,6 +635,16 @@ to access the data from the backing store. +There's a "serial line" driver, useful for TTY style +operation over USB. +The latest version of that driver supports CDC ACM style +operation, like a USB modem, and so on most hardware it can +interoperate easily with MS-Windows. +One interesting use of that driver is in boot firmware (like a BIOS), +which can sometimes use that model with very small systems without +real serial lines. + + Support for other kinds of gadget is expected to be developed and contributed over time, as this driver framework evolves. @@ -555,6 +652,96 @@ +USB On-The-GO (OTG) + +USB OTG support on Linux 2.6 was initially developed +by Texas Instruments for +OMAP 16xx and 17xx +series processors. +Other OTG systems should work in similar ways, but the +hardware level details could be very different. + + +Systems need specialized hardware support to implement OTG, +notably including a special Mini-AB jack +and associated transciever to support Dual-Role +operation: +they can act either as a host, using the standard +Linux-USB host side driver stack, +or as a peripheral, using this "gadget" framework. +To do that, the system software relies on small additions +to those programming interfaces, +and on a new internal component (here called an "OTG Controller") +affecting which driver stack connects to the OTG port. +In each role, the system can re-use the existing pool of +hardware-neutral drivers, layered on top of the controller +driver interfaces (usb_bus or +usb_gadget). +Such drivers need at most minor changes, and most of the calls +added to support OTG can also benefit non-OTG products. + + + + Gadget drivers test the is_otg + flag, and use it to determine whether or not to include + an OTG descriptor in each of their configurations. + + Gadget drivers may need changes to support the + two new OTG protocols, exposed in new gadget attributes + such as b_hnp_enable flag. + HNP support should be reported through a user interface + (two LEDs could suffice), and is triggered in some cases + when the host suspends the peripheral. + SRP support can be user-initiated just like remote wakeup, + probably by pressing the same button. + + On the host side, USB device drivers need + to be taught to trigger HNP at appropriate moments, using + usb_suspend_device(). + That also conserves battery power, which is useful even + for non-OTG configurations. + + Also on the host side, a driver must support the + OTG "Targeted Peripheral List". That's just a whitelist, + used to reject peripherals not supported with a given + Linux OTG host. + This whitelist is product-specific; + each product must modify otg_whitelist.h + to match its interoperability specification. + + + Non-OTG Linux hosts, like PCs and workstations, + normally have some solution for adding drivers, so that + peripherals that aren't recognized can eventually be supported. + That approach is unreasonable for consumer products that may + never have their firmware upgraded, and where it's usually + unrealistic to expect traditional PC/workstation/server kinds + of support model to work. + For example, it's often impractical to change device firmware + once the product has been distributed, so driver bugs can't + normally be fixed if they're found after shipment. + + + + +Additional changes are needed below those hardware-neutral +usb_bus and usb_gadget +driver interfaces; those aren't discussed here in any detail. +Those affect the hardware-specific code for each USB Host or Peripheral +controller, and how the HCD initializes (since OTG can be active only +on a single port). +They also involve what may be called an OTG Controller +Driver, managing the OTG transceiver and the OTG state +machine logic as well as much of the root hub behavior for the +OTG port. +The OTG controller driver needs to activate and deactivate USB +controllers depending on the relevant device role. +Some related changes were needed inside usbcore, so that it +can identify OTG-capable devices and respond appropriately +to HNP or SRP protocols. + + + $TEXTSYM" >&2 -echo " Found $N symbols" >&2 diff -Nru a/arch/ia64/sn/fakeprom/runsim b/arch/ia64/sn/fakeprom/runsim --- a/arch/ia64/sn/fakeprom/runsim 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,387 +0,0 @@ -#!/bin/sh - -# Script for running PROMs and LINUX kernwls on medusa. -# Type "sim -H" for instructions. - -MEDUSA=${MEDUSA:-/home/rickc/official_medusa/medusa} - -# ------------------ err ----------------------- -err() { - echo "ERROR - $1" - exit 1 -} - -# ---------------- help ---------------------- -help() { -cat <] <-p> | <-k> [] - -p Create PROM control file & links - -k Create LINUX control file & links - -c Control file name [Default: cf] - Path to directory that contains the linux or PROM files. - The directory can be any of the following: - (linux simulations) - worktree - worktree/linux - any directory with vmlinux, vmlinux.sym & fprom files - (prom simulations) - worktree - worktree/stand/arcs/IP37prom/dev - any directory with fw.bin & fw.sim files - - Simulations: - sim [-X ] [-o ] [-M] [] - -c Control file name [Default: cf] - -M Pipe output thru fmtmedusa - -o Output filename (copy of all commands/output) [Default: simout] - -X Specifies number of instructions to execute [Default: 0] - (Used only in auto test mode - not described here) - -Examples: - sim -p # create control file (cf) & links for prom simulations - sim -k # create control file (cf) & links for linux simulations - sim -p -c cfprom # create a prom control file (cfprom) only. No links are made. - - sim # run medusa using previously created links & - # control file (cf). -END -exit 1 -} - -# ----------------------- create control file header -------------------- -create_cf_header() { -cat <>$CF -# -# Template for a control file for running linux kernels under medusa. -# You probably want to make mods here but this is a good starting point. -# - -# Preferences -setenv cpu_stepping A -setenv exceptionPrint off -setenv interrupt_messages off -setenv lastPCsize 100000 -setenv low_power_mode on -setenv partialIntelChipSet on -setenv printIntelMessages off -setenv prom_write_action halt -setenv prom_write_messages on -setenv step_quantum 100 -setenv swizzling on -setenv tsconsole on -setenv uart_echo on -symbols on - -# IDE disk params -setenv diskCylinders 611 -setenv bootDrive C -setenv diskHeads 16 -setenv diskPath idedisk -setenv diskPresent 1 -setenv diskSpt 63 - -# Hardware config -setenv coherency_type nasid -setenv cpu_cache_type default -setenv synergy_cache_type syn_cac_64m_8w -setenv l4_uc_snoop off - -# Numalink config -setenv route_enable on -setenv network_type router # Select [xbar|router] -setenv network_warning 0xff - -END -} - - -# ------------------ create control file entries for linux simulations ------------- -create_cf_linux() { -cat <>$CF -# Kernel specific options -setenv calias_size 0 -setenv mca_on_memory_failure off -setenv LOADPC 0x00100000 # FPROM load address/entry point (8 digits!) -setenv symbol_table vmlinux.sym -load fprom -load vmlinux - -# Useful breakpoints to always have set. Add more if desired. -break 0xe000000000505e00 all # dispatch_to_fault_handler -break panic all # stop on panic -break die_if_kernel all # may as well stop - -END -} - -# ------------------ create control file entries for prom simulations --------------- -create_cf_prom() { - SYM2="" - ADDR="0x80000000ff800000" - [ "$EMBEDDED_LINUX" != "0" ] || SYM2="setenv symbol_table2 vmlinux.sym" - [ "$SIZE" = "8MB" ] || ADDR="0x80000000ffc00000" - cat <>$CF -# PROM specific options -setenv mca_on_memory_failure on -setenv LOADPC 0x80000000ffffffb0 -setenv promFile fw.bin -setenv promAddr $ADDR -setenv symbol_table fw.sym -$SYM2 - -# Useful breakpoints to always have set. Add more if desired. -break ivt_gexx all -break ivt_brk all -break PROM_Panic_Spin all -break PROM_Panic all -break PROM_C_Panic all -break fled_die all -break ResetNow all -break zzzbkpt all - -END -} - - -# ------------------ create control file entries for memory configuration ------------- -create_cf_memory() { -cat <>$CF -# CPU/Memory map format: -# setenv nodeN_memory_config 0xBSBSBSBS -# B=banksize (0=unused, 1=64M, 2=128M, .., 5-1G, c=8M, d=16M, e=32M) -# S=bank enable (0=both disable, 3=both enable, 2=bank1 enable, 1=bank0 enable) -# rightmost digits are for bank 0, the lowest address. -# setenv nodeN_nasid -# specifies the NASID for the node. This is used ONLY if booting the kernel. -# On PROM configurations, set to 0 - PROM will change it later. -# setenv nodeN_cpu_config -# Set bit number N to 1 to enable cpu N. Ex., a value of 5 enables cpu 0 & 2. -# -# Repeat the above 3 commands for each node. -# -# For kernel, default to 32MB. Although this is not a valid hardware configuration, -# it runs faster on medusa. For PROM, 64MB is smallest allowed value. - -setenv node0_cpu_config 0x1 # Enable only cpu 0 on the node -END - -if [ $LINUX -eq 1 ] ; then -cat <>$CF -setenv node0_nasid 0 # cnode 0 has NASID 0 -setenv node0_memory_config 0xe1 # 32MB -END -else -cat <>$CF -setenv node0_memory_config 0x31 # 256MB -END -fi -} - -# -------------------- set links to linux files ------------------------- -set_linux_links() { - if [ -d $D/linux/arch ] ; then - D=$D/linux - elif [ -d $D/arch -o -e vmlinux.sym -o -e $D/vmlinux ] ; then - D=$D - else - err "cant determine directory for linux binaries" - fi - rm -rf vmlinux vmlinux.sym fprom - ln -s $D/vmlinux vmlinux - if [ -f $D/vmlinux.sym ] ; then - ln -s $D/vmlinux.sym vmlinux.sym - elif [ -f $D/System.map ] ; then - ln -s $D/System.map vmlinux.sym - fi - if [ -d $D/arch ] ; then - ln -s $D/arch/ia64/sn/fprom/fprom fprom - else - ln -s $D/fprom fprom - fi - echo " .. Created links to linux files" -} - -# -------------------- set links to prom files ------------------------- -set_prom_links() { - if [ -d $D/stand ] ; then - D=$D/stand/arcs/IP37prom/dev - elif [ -d $D/sal ] ; then - D=$D - else - err "cant determine directory for PROM binaries" - fi - SETUP="/tmp/tmp.$$" - rm -r -f $SETUP - sed 's/export/setenv/' < $D/../../../../.setup | sed 's/=/ /' >$SETUP - egrep -q '^ *setenv *PROMSIZE *8MB|^ *export' $SETUP - if [ $? -eq 0 ] ; then - SIZE="8MB" - else - SIZE="4MB" - fi - grep -q '^ *setenv *LAUNCH_VMLINUX' $SETUP - EMBEDDED_LINUX=$? - PRODUCT=`grep '^ *setenv *PRODUCT' $SETUP | cut -d" " -f3` - rm -f fw.bin fw.map fw.sym vmlinux vmlinux.sym fprom $SETUP - SDIR="${PRODUCT}${SIZE}.O" - BIN="${PRODUCT}ip37prom${SIZE}" - ln -s $D/$SDIR/$BIN.bin fw.bin - ln -s $D/$SDIR/$BIN.map fw.map - ln -s $D/$SDIR/$BIN.sym fw.sym - echo " .. Created links to $SIZE prom files" - if [ $EMBEDDED_LINUX -eq 0 ] ; then - ln -s $D/linux/vmlinux vmlinux - ln -s $D/linux/vmlinux.sym vmlinux.sym - if [ -d linux/arch ] ; then - ln -s $D/linux/arch/ia64/sn/fprom/fprom fprom - else - ln -s $D/linux/fprom fprom - fi - echo " .. Created links to embedded linux files in prom tree" - fi -} - -# --------------- start of shell script -------------------------------- -OUT="simout" -FMTMED=0 -STEPCNT=0 -PROM=0 -LINUX=0 -NCF="cf" -while getopts "HMX:c:o:pk" c ; do - case ${c} in - H) help;; - M) FMTMED=1;; - X) STEPCNT=${OPTARG};; - c) NCF=${OPTARG};; - k) PROM=0;LINUX=1;; - p) PROM=1;LINUX=0;; - o) OUT=${OPTARG};; - \?) exit 1;; - esac -done -shift `expr ${OPTIND} - 1` - -# Check if command is for creating control file and/or links to images. -if [ $PROM -eq 1 -o $LINUX -eq 1 ] ; then - CF=$NCF - [ ! -f $CF ] || err "wont overwrite an existing control file ($CF)" - if [ $# -gt 0 ] ; then - D=$1 - [ -d $D ] || err "cannot find directory $D" - [ $PROM -eq 0 ] || set_prom_links - [ $LINUX -eq 0 ] || set_linux_links - fi - create_cf_header - [ $PROM -eq 0 ] || create_cf_prom - [ $LINUX -eq 0 ] || create_cf_linux - [ ! -f ../idedisk ] || ln -s ../idedisk . - create_cf_memory - echo " .. Basic control file created (in $CF). You might want to edit" - echo " this file (at least, look at it)." - exit 0 -fi - -# Verify that the control file exists -CF=${1:-$NCF} -[ -f $CF ] || err "No control file exists. For help, type: $0 -H" - -# Build the .cf files from the user control file. The .cf file is -# identical except that the actual start & load addresses are inserted -# into the file. In addition, the FPROM commands for configuring memory -# and LIDs are generated. - -rm -f .cf .cf1 .cf2 -awk ' -function strtonum(n) { - if (substr(n,1,2) != "0x") - return int(n) - n = substr(n,3) - r=0 - while (length(n) > 0) { - r = r*16+(index("0123456789abcdef", substr(n,1,1))-1) - n = substr(n,2) - } - return r - } -/^#/ {next} -/^$/ {next} -/^setenv *LOADPC/ {loadpc = $3; next} -/^setenv *node.._cpu_config/ {n=int(substr($2,5,2)); cpuconf[n] = strtonum($3); print; next} -/^setenv *node.._memory_config/ {n=int(substr($2,5,2)); memconf[n] = strtonum($3); print; next} -/^setenv *node.._nasid/ {n=int(substr($2,5,2)); nasid[n] = strtonum($3); print; next} -/^setenv *node._cpu_config/ {n=int(substr($2,5,1)); cpuconf[n] = strtonum($3); print; next} -/^setenv *node._memory_config/ {n=int(substr($2,5,1)); memconf[n] = strtonum($3); print; next} -/^setenv *node._nasid/ {n=int(substr($2,5,1)); nasid[n] = strtonum($3); print; next} - {print} -END { - # Generate the memmap info that starts at the beginning of - # the node the kernel was loaded on. - loadnasid = nasid[0] - cnode = 0 - for (i=0; i<128; i++) { - if (memconf[i] != "") { - printf "sm 0x%x%08x 0x%x%04x%04x\n", - 2*loadnasid, 8*cnodes+8, memconf[i], cpuconf[i], nasid[i] - cnodes++ - cpus += substr("0112122312232334", cpuconf[i]+1,1) - } - } - printf "sm 0x%x00000000 0x%x%08x\n", 2*loadnasid, cnodes, cpus - printf "setenv number_of_nodes %d\n", cnodes - - # Now set the starting PC for each cpu. - cnode = 0 - lowcpu=-1 - for (i=0; i<128; i++) { - if (memconf[i] != "") { - printf "setnode %d\n", cnode - conf = cpuconf[i] - for (j=0; j<4; j++) { - if (conf != int(conf/2)*2) { - printf "setcpu %d\n", j - if (length(loadpc) == 18) - printf "sr pc %s\n", loadpc - else - printf "sr pc 0x%x%s\n", 2*loadnasid, substr(loadpc,3) - if (lowcpu == -1) - lowcpu = j - } - conf = int(conf/2) - } - cnode++ - } - } - printf "setnode 0\n" - printf "setcpu %d\n", lowcpu - } -' <$CF >.cf - -# Now build the .cf1 & .cf2 control files. -CF2_LINES="^sm |^break |^run |^si |^quit |^symbols " -egrep "$CF2_LINES" .cf >.cf2 -egrep -v "$CF2_LINES" .cf >.cf1 -if [ $STEPCNT -ne 0 ] ; then - echo "s $STEPCNT" >>.cf2 - echo "lastpc 1000" >>.cf2 - echo "q" >>.cf2 -fi -if [ -f vmlinux.sym ] ; then - awk '/ _start$/ {print "sr g 9 0x" $3}' < vmlinux.sym >> .cf2 -fi -echo "script-on $OUT" >>.cf2 - -# Now start medusa.... -if [ $FMTMED -ne 0 ] ; then - $MEDUSA -system mpsn1 -c .cf1 -i .cf2 | fmtmedusa -elif [ $STEPCNT -eq 0 ] ; then - $MEDUSA -system mpsn1 -c .cf1 -i .cf2 -else - $MEDUSA -system mpsn1 -c .cf1 -i .cf2 2>&1 -fi diff -Nru a/arch/ia64/sn/io/machvec/pci_bus_cvlink.c b/arch/ia64/sn/io/machvec/pci_bus_cvlink.c --- a/arch/ia64/sn/io/machvec/pci_bus_cvlink.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ia64/sn/io/machvec/pci_bus_cvlink.c 2004-09-06 16:37:54 -07:00 @@ -290,6 +290,7 @@ addr |= __IA64_UNCACHED_OFFSET; dev->resource[idx].start = addr; dev->resource[idx].end = addr + size; + dev->resource[idx].parent = &ioport_resource; } if (dev->resource[idx].flags & IORESOURCE_IO) @@ -322,6 +323,7 @@ addr |= __IA64_UNCACHED_OFFSET; dev->resource[idx].start = addr; dev->resource[idx].end = addr + size; + dev->resource[idx].parent = &iomem_resource; } if (dev->resource[idx].flags & IORESOURCE_MEM) @@ -351,6 +353,7 @@ addr |= __IA64_UNCACHED_OFFSET; dev->resource[PCI_ROM_RESOURCE].start = addr; dev->resource[PCI_ROM_RESOURCE].end = addr + size; + dev->resource[idx].parent = &iomem_resource; if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM) cmd |= PCI_COMMAND_MEMORY; } diff -Nru a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c --- a/arch/ia64/sn/kernel/bte.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ia64/sn/kernel/bte.c 2004-09-06 16:37:53 -07:00 @@ -421,9 +421,10 @@ mynodepda->bte_recovery_timer.data = (unsigned long) mynodepda; for (i = 0; i < BTES_PER_NODE; i++) { - (u64) mynodepda->bte_if[i].bte_base_addr = - REMOTE_HUB_ADDR(cnodeid_to_nasid(cnode), - (i == 0 ? IIO_IBLS0 : IIO_IBLS1)); + /* Which link status register should we use? */ + unsigned long link_status = (i == 0 ? IIO_IBLS0 : IIO_IBLS1); + mynodepda->bte_if[i].bte_base_addr = (u64 *) + REMOTE_HUB_ADDR(cnodeid_to_nasid(cnode), link_status); /* * Initialize the notification and spinlock diff -Nru a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c --- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c 2004-09-06 16:37:51 -07:00 @@ -3,10 +3,10 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1999,2001-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (C) 1999,2001-2004 Silicon Graphics, Inc. All Rights Reserved. * * Module to export the system's Firmware Interface Tables, including - * PROM revision numbers, in /proc + * PROM revision numbers and banners, in /proc */ #include #include @@ -45,9 +45,18 @@ # define TRACE() #endif +/* Architected IA64 firmware space */ +#define FW_BASE 0x00000000FF000000 +#define FW_TOP 0x0000000100000000 + /* Sub-regions determined by bits in Node Offset */ #define LB_PROM_SPACE 0x0000000700000000ul /* Local LB PROM */ +/* Offset of PROM banner pointers in SAL A and SAL B */ +#define SAL_A_BANNER_OFFSET (1 * 16) +#define SAL_B_BANNER_OFFSET (3 * 16) + + #define FIT_SIGNATURE 0x2020205f5449465ful /* Standard Intel FIT entry types */ #define FIT_ENTRY_FIT_HEADER 0x00 /* FIT header entry */ @@ -125,6 +134,26 @@ return "Unknown type"; } +static unsigned long +convert_fw_addr(nasid_t nasid, unsigned long addr) +{ + /* snag just the node-relative offset */ + addr &= ~0ul >> (63-35); + /* the pointer to SAL A is relative to IA-64 compatibility + * space. However, the PROM is mapped at a different offset + * in MMR space (both local and global) + */ + addr += 0x700000000; + return GLOBAL_MMR_ADDR(nasid, addr); +} + +static int +valid_fw_addr(unsigned long addr) +{ + addr &= ~(1ul << 63); /* Clear cached/uncached bit */ + return (addr >= FW_BASE && addr < FW_TOP); +} + /* These two routines read the FIT table directly from the FLASH PROM * on a specific node. The PROM can only be accessed using aligned 64 * bit reads, so we do that and then shift and mask the result to get @@ -194,6 +223,8 @@ int nentries; int fentry; unsigned long qw; + int len; + nasid_t nasid = NASID_GET(fit); TRACE(); @@ -203,10 +234,31 @@ for (fentry = 0; fentry < nentries; fentry++) { qw = readq(fit + 2 * fentry + 1); if (FIT_TYPE(qw) == FIT_ENTRY_SAL_A) - return sprintf(page, "%x.%02x\n", - FIT_MAJOR(qw), FIT_MINOR(qw)); + break; } - return 0; + if (fentry >= nentries) + return 0; + + len = sprintf(page, "%x.%02x\n", FIT_MAJOR(qw), FIT_MINOR(qw)); + page += len; + + qw = readq(fit + 2 * fentry); /* Address of SAL A */ + DPRINTK("SAL A at %p\n", (void *)qw); + if (!valid_fw_addr(qw)) + return len; + + qw += SAL_A_BANNER_OFFSET; + qw = convert_fw_addr(nasid, qw); + DPRINTK("Banner ptr at %p\n", (void *)qw); + + qw = readq(qw); /* Address of banner */ + if (!valid_fw_addr(qw)) + return len; + qw = convert_fw_addr(nasid, qw); + DPRINTK("Banner at %p\n", (void *)qw); + + len += snprintf(page, PAGE_SIZE-len, "%s\n", (char *)qw); + return len; } /* same as in proc_misc.c */ @@ -278,14 +330,10 @@ DPRINTK("pointer to fit at %p\n", (void *)fitp); fit_paddr = readq(fitp); DPRINTK("fit pointer contains %lx\n", fit_paddr); - /* snag just the node-relative offset */ - fit_paddr &= ~0ul >> (63-35); - /* the pointer to the FIT is relative to IA-64 compatibility - * space. However, the PROM is mapped at a different offset - * in MMR space (both local and global) - */ - fit_paddr += 0x700000000; - fit_vaddr = (void *)GLOBAL_MMR_ADDR(nasid, fit_paddr); + + BUG_ON(!valid_fw_addr(fit_paddr)); + fit_vaddr = (void *)convert_fw_addr(nasid, fit_paddr); + DPRINTK("fit at %p\n", (void *)fit_vaddr); return fit_vaddr; } diff -Nru a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2004-09-06 16:37:55 -07:00 @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved. */ #include #include @@ -118,11 +118,33 @@ } } +static int coherence_id_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) { + return sprintf(page, "%d\n", cpuid_to_coherence_id(smp_processor_id())); +} + +void +register_sn_coherence_id(void) { + struct proc_dir_entry *entry; + + if (!sgi_proc_dir) { + sgi_proc_dir = proc_mkdir("sgi_sn", 0); + } + entry = create_proc_entry("coherence_id", 0444, sgi_proc_dir); + if (entry) { + entry->nlink = 1; + entry->data = 0; + entry->read_proc = coherence_id_read_proc; + entry->write_proc = NULL; + } +} + void register_sn_procfs(void) { register_sn_partition_id(); register_sn_serial_numbers(); register_sn_force_interrupt(); + register_sn_coherence_id(); } #endif /* CONFIG_PROC_FS */ diff -Nru a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c --- a/arch/m68k/kernel/process.c 2004-09-06 16:37:55 -07:00 +++ b/arch/m68k/kernel/process.c 2004-09-06 16:37:55 -07:00 @@ -232,7 +232,7 @@ child_tidptr = (int *)regs->d4; if (!newsp) newsp = rdusp(); - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, + return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr); } diff -Nru a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c --- a/arch/m68k/kernel/signal.c 2004-09-06 16:37:54 -07:00 +++ b/arch/m68k/kernel/signal.c 2004-09-06 16:37:54 -07:00 @@ -842,9 +842,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); goto adjust_stack; } @@ -925,9 +923,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); goto adjust_stack; } diff -Nru a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c --- a/arch/m68k/kernel/time.c 2004-09-06 16:37:51 -07:00 +++ b/arch/m68k/kernel/time.c 2004-09-06 16:37:51 -07:00 @@ -38,24 +38,6 @@ return -1; } -static inline void do_profile (unsigned long pc) -{ - if (prof_buffer && current->pid) { - extern int _stext; - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - if (pc < prof_len) - ++prof_buffer[pc]; - else - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - ++prof_buffer[prof_len-1]; - } -} - /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -63,9 +45,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) { do_timer(regs); - - if (!user_mode(regs)) - do_profile(regs->pc); + profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT /* use power LED as a heartbeat instead -- much more useful diff -Nru a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds --- a/arch/m68k/kernel/vmlinux-std.lds 2004-09-06 16:37:54 -07:00 +++ b/arch/m68k/kernel/vmlinux-std.lds 2004-09-06 16:37:54 -07:00 @@ -51,9 +51,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds --- a/arch/m68k/kernel/vmlinux-sun3.lds 2004-09-06 16:37:50 -07:00 +++ b/arch/m68k/kernel/vmlinux-sun3.lds 2004-09-06 16:37:50 -07:00 @@ -45,9 +45,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c --- a/arch/m68knommu/kernel/process.c 2004-09-06 16:37:51 -07:00 +++ b/arch/m68knommu/kernel/process.c 2004-09-06 16:37:51 -07:00 @@ -188,7 +188,7 @@ newsp = regs->d2; if (!newsp) newsp = rdusp(); - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL); + return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); } int copy_thread(int nr, unsigned long clone_flags, diff -Nru a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c --- a/arch/m68knommu/kernel/signal.c 2004-09-06 16:37:53 -07:00 +++ b/arch/m68knommu/kernel/signal.c 2004-09-06 16:37:53 -07:00 @@ -616,9 +616,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); goto adjust_stack; } @@ -685,9 +683,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); goto adjust_stack; } diff -Nru a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c --- a/arch/m68knommu/kernel/time.c 2004-09-06 16:37:53 -07:00 +++ b/arch/m68knommu/kernel/time.c 2004-09-06 16:37:53 -07:00 @@ -41,24 +41,6 @@ return -1; } -static inline void do_profile (unsigned long pc) -{ - if (prof_buffer && current->pid) { - extern int _stext; - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - if (pc < prof_len) - ++prof_buffer[pc]; - else - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - ++prof_buffer[prof_len-1]; - } -} - /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -75,9 +57,8 @@ write_seqlock(&xtime_lock); do_timer(regs); - - if (!user_mode(regs)) - do_profile(regs->pc); + if (current->pid) + profile_tick(CPU_PROFILING, regs); /* * If we have an externally synchronized Linux clock, then update diff -Nru a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S --- a/arch/m68knommu/kernel/vmlinux.lds.S 2004-09-06 16:37:52 -07:00 +++ b/arch/m68knommu/kernel/vmlinux.lds.S 2004-09-06 16:37:52 -07:00 @@ -284,9 +284,6 @@ __setup_start = .; *(.init.setup) __setup_end = .; - __start___param = .; - *(__param) - __stop___param = .; __initcall_start = .; *(.initcall1.init) *(.initcall2.init) diff -Nru a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c --- a/arch/m68knommu/platform/5307/timers.c 2004-09-06 16:37:55 -07:00 +++ b/arch/m68knommu/platform/5307/timers.c 2004-09-06 16:37:55 -07:00 @@ -110,17 +110,8 @@ { /* Reset ColdFire timer2 */ mcf_proftp->ter = MCFTIMER_TER_CAP | MCFTIMER_TER_REF; - - if (!user_mode(regs)) { - if (prof_buffer && current->pid) { - extern int _stext; - unsigned long ip = instruction_pointer(regs); - ip -= (unsigned long) &_stext; - ip >>= prof_shift; - if (ip < prof_len) - prof_buffer[ip]++; - } - } + if (current->pid) + profile_tick(CPU_PROFILING, regs); } /***************************************************************************/ diff -Nru a/arch/mips/baget/irq.c b/arch/mips/baget/irq.c --- a/arch/mips/baget/irq.c 2004-09-06 16:37:53 -07:00 +++ b/arch/mips/baget/irq.c 2004-09-06 16:37:53 -07:00 @@ -180,7 +180,7 @@ static void do_IRQ(int irq, struct pt_regs * regs) { struct irqaction *action; - int do_random, cpu; + int ret, do_random, cpu; cpu = smp_processor_id(); irq_enter(); @@ -194,8 +194,9 @@ action = *(irq + irq_action); do_random = 0; do { - do_random |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + do_random |= action->flags; action = action->next; } while (action); if (do_random & SA_SAMPLE_RANDOM) diff -Nru a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c --- a/arch/mips/kernel/irixsig.c 2004-09-06 16:37:54 -07:00 +++ b/arch/mips/kernel/irixsig.c 2004-09-06 16:37:54 -07:00 @@ -121,9 +121,7 @@ return; segv_and_exit: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } static void inline diff -Nru a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c --- a/arch/mips/kernel/irq.c 2004-09-06 16:37:51 -07:00 +++ b/arch/mips/kernel/irq.c 2004-09-06 16:37:51 -07:00 @@ -144,14 +144,16 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ - int retval = 0; + int ret, retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - retval |= action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; + retval |= ret; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -872,30 +874,6 @@ #endif -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer, - unsigned long count, void *data) -{ - cpumask_t *mask = (cpumask_t *)data, new_value; - unsigned long full_count = count, err; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - #define MAX_NAMELEN 10 static void register_irq_proc (unsigned int irq) @@ -931,26 +909,15 @@ #endif } -unsigned long prof_cpu_mask = -1; - void init_irq_proc (void) { - struct proc_dir_entry *entry; int i; /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", 0); /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - if (!entry) - return; - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. diff -Nru a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c --- a/arch/mips/kernel/signal.c 2004-09-06 16:37:54 -07:00 +++ b/arch/mips/kernel/signal.c 2004-09-06 16:37:54 -07:00 @@ -406,9 +406,7 @@ return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } #endif @@ -475,9 +473,7 @@ return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } extern void setup_rt_frame_n32(struct k_sigaction * ka, diff -Nru a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c --- a/arch/mips/kernel/signal32.c 2004-09-06 16:37:53 -07:00 +++ b/arch/mips/kernel/signal32.c 2004-09-06 16:37:53 -07:00 @@ -574,9 +574,7 @@ return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } static inline void setup_rt_frame(struct k_sigaction * ka, @@ -647,9 +645,7 @@ return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } static inline void handle_signal(unsigned long sig, siginfo_t *info, diff -Nru a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c --- a/arch/mips/kernel/signal_n32.c 2004-09-06 16:37:53 -07:00 +++ b/arch/mips/kernel/signal_n32.c 2004-09-06 16:37:53 -07:00 @@ -208,7 +208,5 @@ return; give_sigsegv: - if (signr == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(signr, current); } diff -Nru a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c --- a/arch/mips/kernel/smp.c 2004-09-06 16:37:51 -07:00 +++ b/arch/mips/kernel/smp.c 2004-09-06 16:37:51 -07:00 @@ -254,16 +254,6 @@ cpu_set(0, cpu_callin_map); } -static struct task_struct * __init fork_by_hand(void) -{ - struct pt_regs regs; - /* - * don't care about the eip and regs settings since - * we'll never reschedule the forked task. - */ - return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); -} - /* * Startup the CPU with this logical number */ @@ -275,19 +265,9 @@ * The following code is purely to make sure * Linux can schedule processes on this slave. */ - idle = fork_by_hand(); + idle = fork_idle(cpu); if (IS_ERR(idle)) panic("failed fork for CPU %d\n", cpu); - - wake_up_forked_process(idle); - - /* - * We remove it from the pidhash and the runqueue once we've - * got the process: - */ - init_idle(idle, cpu); - - unhash_process(idle); prom_boot_secondary(cpu, idle); diff -Nru a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c --- a/arch/mips/kernel/syscall.c 2004-09-06 16:37:54 -07:00 +++ b/arch/mips/kernel/syscall.c 2004-09-06 16:37:54 -07:00 @@ -180,7 +180,7 @@ newsp = regs.regs[29]; parent_tidptr = (int *) regs.regs[6]; child_tidptr = (int *) regs.regs[7]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } diff -Nru a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c --- a/arch/mips/kernel/sysirix.c 2004-09-06 16:37:55 -07:00 +++ b/arch/mips/kernel/sysirix.c 2004-09-06 16:37:55 -07:00 @@ -810,8 +810,8 @@ return err; err |= __put_user(current->utime, &tbuf->tms_utime); err |= __put_user(current->stime, &tbuf->tms_stime); - err |= __put_user(current->cutime, &tbuf->tms_cutime); - err |= __put_user(current->cstime, &tbuf->tms_cstime); + err |= __put_user(current->signal->cutime, &tbuf->tms_cutime); + err |= __put_user(current->signal->cstime, &tbuf->tms_cstime); } return err; diff -Nru a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c --- a/arch/mips/kernel/time.c 2004-09-06 16:37:52 -07:00 +++ b/arch/mips/kernel/time.c 2004-09-06 16:37:52 -07:00 @@ -417,23 +417,8 @@ */ void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - if (!user_mode(regs)) { - if (prof_buffer && current->pid) { - unsigned long pc = regs->cp0_epc; - - pc -= (unsigned long) _stext; - pc >>= prof_shift; - /* - * Dont ignore out-of-bounds pc values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (pc > prof_len - 1) - pc = prof_len - 1; - atomic_inc((atomic_t *)&prof_buffer[pc]); - } - } - + if (current->pid) + profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_SMP /* in UP mode, update_process_times() is invoked by do_timer() */ update_process_times(user_mode(regs)); diff -Nru a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S --- a/arch/mips/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 +++ b/arch/mips/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 @@ -29,6 +29,7 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) } =0 @@ -96,9 +97,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; .early_initcall.init : { __earlyinitcall_start = .; diff -Nru a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c --- a/arch/mips/sgi-ip27/ip27-memory.c 2004-09-06 16:37:51 -07:00 +++ b/arch/mips/sgi-ip27/ip27-memory.c 2004-09-06 16:37:51 -07:00 @@ -225,7 +225,7 @@ pfn_t end_pfn = node_getmaxclick(node) + 1; zones_size[ZONE_DMA] = end_pfn - start_pfn; - free_area_init_node(node, NODE_DATA(node), NULL, + free_area_init_node(node, NODE_DATA(node), zones_size, start_pfn, NULL); if (end_pfn > max_low_pfn) diff -Nru a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c --- a/arch/parisc/kernel/hardware.c 2004-09-06 16:37:52 -07:00 +++ b/arch/parisc/kernel/hardware.c 2004-09-06 16:37:52 -07:00 @@ -7,7 +7,7 @@ * Reference Specification", March 7, 1999, version 0.96. This * is available at http://parisc-linux.org/documentation/ * - * Copyright 1999 by Alex deVries + * Copyright 1999 by Alex deVries * and copyright 1999 The Puffin Group Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c --- a/arch/parisc/kernel/process.c 2004-09-06 16:37:55 -07:00 +++ b/arch/parisc/kernel/process.c 2004-09-06 16:37:55 -07:00 @@ -262,7 +262,7 @@ if(usp == 0) usp = regs->gr[30]; - return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid, NULL); + return do_fork(clone_flags, usp, regs, 0, user_tid, NULL); } int diff -Nru a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c --- a/arch/parisc/kernel/smp.c 2004-09-06 16:37:55 -07:00 +++ b/arch/parisc/kernel/smp.c 2004-09-06 16:37:55 -07:00 @@ -486,24 +486,6 @@ } /* - * Create the idle task for a new Slave CPU. DO NOT use kernel_thread() - * because that could end up calling schedule(). If it did, the new idle - * task could get scheduled before we had a chance to remove it from the - * run-queue... - */ -static struct task_struct *fork_by_hand(void) -{ - struct pt_regs regs; - - /* - * don't care about the regs settings since - * we'll never reschedule the forked task. - */ - return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); -} - - -/* * Bring one cpu online. */ int __init smp_boot_one_cpu(int cpuid) @@ -521,13 +503,10 @@ * Sheesh . . . */ - idle = fork_by_hand(); + idle = fork_idle(cpuid); if (IS_ERR(idle)) panic("SMP: fork failed for CPU:%d", cpuid); - wake_up_forked_process(idle); - init_idle(idle, cpuid); - unhash_process(idle); idle->thread_info->cpu = cpuid; /* Let _start know what logical CPU we're booting diff -Nru a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c --- a/arch/parisc/kernel/time.c 2004-09-06 16:37:55 -07:00 +++ b/arch/parisc/kernel/time.c 2004-09-06 16:37:55 -07:00 @@ -47,44 +47,6 @@ extern void smp_do_timer(struct pt_regs *regs); #endif -static inline void -parisc_do_profile(struct pt_regs *regs) -{ - unsigned long pc = regs->iaoq[0]; -#if 0 - extern unsigned long prof_cpu_mask; -#endif - extern char _stext; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - if (!prof_buffer) - return; - -#if 0 - /* FIXME: when we have irq affinity to cpu, we need to - * only look at the cpus specified in this mask - */ - - if (!((1 << smp_processor_id()) & prof_cpu_mask)) - return; -#endif - - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (pc > prof_len - 1) - pc = prof_len - 1; - atomic_inc((atomic_t *)&prof_buffer[pc]); -} - irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { long now; @@ -92,7 +54,7 @@ int nticks; int cpu = smp_processor_id(); - parisc_do_profile(regs); + profile_tick(CPU_PROFILING, regs); now = mfctl(16); /* initialize next_tick to time at last clocktick */ diff -Nru a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S --- a/arch/parisc/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 +++ b/arch/parisc/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 @@ -52,6 +52,7 @@ .text ALIGN(16) : { *(.text) SCHED_TEXT + LOCK_TEXT *(.text.do_softirq) *(.text.sys_exit) *(.text.do_sigaltstack) @@ -130,9 +131,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c --- a/arch/parisc/mm/init.c 2004-09-06 16:37:52 -07:00 +++ b/arch/parisc/mm/init.c 2004-09-06 16:37:52 -07:00 @@ -804,7 +804,7 @@ ZONE_DMA zone. */ zones_size[ZONE_DMA] = pmem_ranges[i].pages; - free_area_init_node(i,NODE_DATA(i),NULL,zones_size, + free_area_init_node(i, NODE_DATA(i), zones_size, pmem_ranges[i].start_pfn, 0); #ifdef CONFIG_DISCONTIGMEM diff -Nru a/arch/ppc/8xx_io/uart.c b/arch/ppc/8xx_io/uart.c --- a/arch/ppc/8xx_io/uart.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/8xx_io/uart.c 2004-09-06 16:37:54 -07:00 @@ -2592,7 +2592,7 @@ state->icount.rx = state->icount.tx = 0; state->icount.frame = state->icount.parity = 0; state->icount.overrun = state->icount.brk = 0; - printk(KERN_INFO "ttyS%02d at 0x%04x is a %s\n", + printk(KERN_INFO "ttyS%d at 0x%04x is a %s\n", i, (unsigned int)(state->port), (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC"); #ifdef CONFIG_SERIAL_CONSOLE diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/Kconfig 2004-09-06 16:37:55 -07:00 @@ -685,7 +685,8 @@ config PPC_GEN550 bool - depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || PRPMC750 || K2 || PRPMC800 + depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \ + PRPMC750 || K2 || PRPMC800 || LOPEC default y config FORCE @@ -811,10 +812,6 @@ config HIGHMEM bool "High memory support" -config KERNEL_ELF - bool - default y - source "fs/Kconfig.binfmt" config PROC_DEVICETREE @@ -832,10 +829,11 @@ Some PReP systems have residual data passed to the kernel by the firmware. This allows detection of memory size, devices present and other useful pieces of information. Sometimes this information is - not present or incorrect. + not present or incorrect, in which case it could lead to the machine + behaving incorrectly. If this happens, either disable PREP_RESIDUAL + or pass the 'noresidual' option to the kernel. - Unless you expect to boot on a PReP system, there is no need to - select Y. + If you are running a PReP system, say Y here, otherwise say N. config PROC_PREPRESIDUAL bool "Support for reading of PReP Residual Data in /proc" diff -Nru a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug --- a/arch/ppc/Kconfig.debug 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/Kconfig.debug 2004-09-06 16:37:54 -07:00 @@ -53,6 +53,18 @@ Unless you are intending to debug the kernel with one of these machines, say N here. +config SCHEDSTATS + bool "Collect scheduler statistics" + depends on DEBUG_KERNEL && PROC_FS + help + If you say Y here, additional code will be inserted into the + scheduler and related routines to collect statistics about + scheduler behavior and provide them in /proc/schedstat. These + stats may be useful for both tuning and debugging the scheduler + If you aren't debugging the scheduler or trying to tune a specific + application, you can say N to avoid the very slight overhead + this adds. + config BOOTX_TEXT bool "Support for early boot text console (BootX or OpenFirmware only)" depends PPC_OF diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile --- a/arch/ppc/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/Makefile 2004-09-06 16:37:50 -07:00 @@ -104,16 +104,15 @@ include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s $(call filechk,gen-asm-offsets) -ifdef CONFIG_6xx -# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later -NEW_AS := $(shell echo dssall | $(AS) -many -o /dev/null >/dev/null 2>&1 ; echo $$?) -GOODVER := 2.12.1 -else -NEW_AS := 0 -endif +# Use the file '.tmp_gas_check' for binutils tests, as gas won't output +# to stdout and these checks are run even on install targets. +TOUT := .tmp_gas_check +# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec +# instructions. +AS_ALTIVEC := $(shell echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; echo $$?) # gcc-3.4 and binutils-2.14 are a fatal combination. GCC_VERSION := $(call cc-version) -BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1) +BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1) checkbin: ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) @@ -122,10 +121,11 @@ @echo '*** Please upgrade your binutils or downgrade your gcc' @false endif -ifneq ($(NEW_AS),0) +ifneq ($(AS_ALTIVEC),0) + echo $(AS_ALTIVEC) @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' @echo 'correctly with old versions of binutils.' - @echo '*** Please upgrade your binutils to ${GOODVER} or newer' + @echo '*** Please upgrade your binutils to 2.12.1 or newer' @false endif @true diff -Nru a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c --- a/arch/ppc/amiga/config.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/amiga/config.c 2004-09-06 16:37:54 -07:00 @@ -423,9 +423,6 @@ mach_floppy_setup = amiga_floppy_setup; #endif mach_reset = amiga_reset; -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif #ifdef CONFIG_HEARTBEAT mach_heartbeat = amiga_heartbeat; #endif diff -Nru a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c --- a/arch/ppc/boot/common/misc-common.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/boot/common/misc-common.c 2004-09-06 16:37:52 -07:00 @@ -526,6 +526,11 @@ * on others it's an offset from a given location. -- Tom */ +void ISA_init(unsigned long base) +{ + ISA_io = (unsigned char *)base; +} + void outb(int port, unsigned char val) { diff -Nru a/arch/ppc/boot/common/serial_stub.c b/arch/ppc/boot/common/serial_stub.c --- a/arch/ppc/boot/common/serial_stub.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/boot/common/serial_stub.c 2004-09-06 16:37:55 -07:00 @@ -11,11 +11,6 @@ * is" without any warranty of any kind, whether express or implied. */ -void __attribute__ ((weak)) -serial_fixups(void) -{ -} - unsigned long __attribute__ ((weak)) serial_init(int chan, void *ignored) { diff -Nru a/arch/ppc/boot/include/nonstdio.h b/arch/ppc/boot/include/nonstdio.h --- a/arch/ppc/boot/include/nonstdio.h 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/boot/include/nonstdio.h 2004-09-06 16:37:52 -07:00 @@ -30,3 +30,5 @@ extern void puts(const char *); extern void udelay(long delay); extern unsigned char inb(int port); +extern void board_isa_init(void); +extern void ISA_init(unsigned long base); diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/boot/simple/Makefile 2004-09-06 16:37:50 -07:00 @@ -73,7 +73,7 @@ zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF end-$(CONFIG_GEMINI) := gemini - extra.o-$(CONFIG_K2) := legacy.o + extra.o-$(CONFIG_K2) := prepmap.o end-$(CONFIG_K2) := k2 cacheflag-$(CONFIG_K2) := -include $(clear_L2_L3) @@ -89,7 +89,7 @@ end-$(motorola) := pplus # Overrides previous assingment - extra.o-$(CONFIG_PPLUS) := legacy.o + extra.o-$(CONFIG_PPLUS) := prepmap.o extra.o-$(CONFIG_LOPEC) := mpc10x_memory.o zimage-$(pcore) := zImage-STRIPELF @@ -100,7 +100,7 @@ zimage-$(CONFIG_PPC_PREP) := zImage-PPLUS zimageinitrd-$(CONFIG_PPC_PREP) := zImage.initrd-PPLUS - extra.o-$(CONFIG_PPC_PREP) := legacy.o + extra.o-$(CONFIG_PPC_PREP) := prepmap.o misc-$(CONFIG_PPC_PREP) += misc-prep.o mpc10x_memory.o end-$(CONFIG_PPC_PREP) := prep diff -Nru a/arch/ppc/boot/simple/chrpmap.S b/arch/ppc/boot/simple/chrpmap.S --- a/arch/ppc/boot/simple/chrpmap.S 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,19 +0,0 @@ -/* - * arch/ppc/boot/simple/chrpmap.S - * - * Author: Tom Rini - * - * This will go and setup ISA_io to 0xFE00000 and return. - */ - -#include - - .text - - .globl serial_fixups -serial_fixups: - lis r3,ISA_io@h /* Load ISA_io */ - ori r3,r3,ISA_io@l - lis r4,0xFE00 /* Load the value, 0xFE00000 */ - stw r4,0(r3) /* store */ - blr diff -Nru a/arch/ppc/boot/simple/chrpmap.c b/arch/ppc/boot/simple/chrpmap.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/chrpmap.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,12 @@ +/* + * 2004 (C) IBM. This file is licensed under the terms of the GNU General + * Public License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include + +void board_isa_init(void) +{ + ISA_init(0xFE000000); +} diff -Nru a/arch/ppc/boot/simple/legacy.S b/arch/ppc/boot/simple/legacy.S --- a/arch/ppc/boot/simple/legacy.S 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,19 +0,0 @@ -/* - * arch/ppc/boot/simple/legacy.S - * - * Author: Tom Rini - * - * This will go and setup ISA_io to 0x8000000 and return. - */ - -#include - - .text - - .globl serial_fixups -serial_fixups: - lis r3,ISA_io@h /* Load ISA_io */ - ori r3,r3,ISA_io@l - lis r4,0x8000 /* Load the value, 0x8000000 */ - stw r4,0(r3) /* store */ - blr diff -Nru a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c --- a/arch/ppc/boot/simple/misc-embedded.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/boot/simple/misc-embedded.c 2004-09-06 16:37:51 -07:00 @@ -72,6 +72,14 @@ extern void gunzip(void *, int, unsigned char *, int *); extern void embed_config(bd_t **bp); +/* Weak function for boards which don't need to build the + * board info struct because they are using PPCBoot/U-Boot. + */ +void __attribute__ ((weak)) +embed_config(bd_t **bdp) +{ +} + unsigned long load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp) { diff -Nru a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c --- a/arch/ppc/boot/simple/misc-prep.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/boot/simple/misc-prep.c 2004-09-06 16:37:50 -07:00 @@ -88,6 +88,7 @@ ofinit(OFW_interface); } + board_isa_init(); #if defined(CONFIG_VGA_CONSOLE) vga_init((unsigned char *)0xC0000000); #endif /* CONFIG_VGA_CONSOLE */ diff -Nru a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c --- a/arch/ppc/boot/simple/misc-spruce.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/boot/simple/misc-spruce.c 2004-09-06 16:37:53 -07:00 @@ -26,7 +26,6 @@ /* Define some important locations of the Spruce. */ #define SPRUCE_PCI_CONFIG_ADDR 0xfec00000 #define SPRUCE_PCI_CONFIG_DATA 0xfec00004 -#define SPRUCE_ISA_IO_BASE 0xf8000000 /* PCI configuration space access routines. */ unsigned int *pci_config_address = (unsigned int *)SPRUCE_PCI_CONFIG_ADDR; @@ -85,8 +84,6 @@ out_le32((unsigned *)pci_config_data, val); } - -unsigned long isa_io_base = SPRUCE_ISA_IO_BASE; #define PCNET32_WIO_RDP 0x10 #define PCNET32_WIO_RAP 0x12 diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c --- a/arch/ppc/boot/simple/misc.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/boot/simple/misc.c 2004-09-06 16:37:54 -07:00 @@ -97,7 +97,6 @@ struct bi_record *rec; unsigned long initrd_loc, TotalMemory = 0; - serial_fixups(); #ifdef CONFIG_SERIAL_8250_CONSOLE com_port = serial_init(0, NULL); #endif @@ -268,10 +267,16 @@ return rec; } +void __attribute__ ((weak)) +board_isa_init(void) +{ +} + /* Allow decompress_kernel to be hooked into. This is the default. */ void * __attribute__ ((weak)) load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, void *ign1, void *ign2) { + board_isa_init(); return decompress_kernel(load_addr, num_words, cksum); } diff -Nru a/arch/ppc/boot/simple/prepmap.c b/arch/ppc/boot/simple/prepmap.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/prepmap.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,12 @@ +/* + * 2004 (C) IBM. This file is licensed under the terms of the GNU General + * Public License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include + +void board_isa_init(void) +{ + ISA_init(0x80000000); +} diff -Nru a/arch/ppc/configs/mvme5100_defconfig b/arch/ppc/configs/mvme5100_defconfig --- a/arch/ppc/configs/mvme5100_defconfig 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/configs/mvme5100_defconfig 2004-09-06 16:37:50 -07:00 @@ -4,23 +4,39 @@ CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_HAVE_DEC_LOCK=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_GENERIC_NVRAM=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # # Loadable module support @@ -33,24 +49,26 @@ CONFIG_KMOD=y # -# Platform support +# Processor # -CONFIG_PPC=y -CONFIG_PPC32=y CONFIG_6xx=y # CONFIG_40x is not set +# CONFIG_44x is not set # CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_E500 is not set +CONFIG_ALTIVEC=y +# CONFIG_TAU is not set +# CONFIG_CPU_FREQ is not set +CONFIG_PPC_STD_MMU=y # -# IBM 4xx options +# Platform options # -# CONFIG_8260 is not set -CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_STD_MMU=y # CONFIG_PPC_MULTIPLATFORM is not set # CONFIG_APUS is not set -# CONFIG_WILLOW_2 is not set +# CONFIG_WILLOW is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set # CONFIG_EV64260 is not set @@ -66,34 +84,31 @@ # CONFIG_K2 is not set # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set +# CONFIG_SBC82xx is not set +# CONFIG_SBS8260 is not set +# CONFIG_RPX8260 is not set +# CONFIG_TQM8260 is not set +# CONFIG_ADS8272 is not set +# CONFIG_LITE5200 is not set # CONFIG_MVME5100_IPMC761_PRESENT is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set -CONFIG_ALTIVEC=y -# CONFIG_TAU is not set -# CONFIG_CPU_FREQ is not set +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_ELF=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on" # -# General setup +# Bus options # -# CONFIG_HIGHMEM is not set +CONFIG_GENERIC_ISA_DMA=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_KCORE_ELF=y -CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y -# CONFIG_BINFMT_MISC is not set # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set -# CONFIG_PPC601_SYNC_FIX is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="ip=on" # # Advanced setup @@ -110,14 +125,28 @@ CONFIG_BOOT_LOAD=0x00800000 # +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y + +# # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # +# Parallel port support +# +# CONFIG_PARPORT is not set + +# # Plug and Play support # -# CONFIG_PNP is not set # # Block devices @@ -129,46 +158,46 @@ # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +# CONFIG_LBD is not set # -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# ATA/IDE/MFM/RLL support +# ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set # CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes # +CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_IDEPCI is not set +# CONFIG_IDE_ARM is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) @@ -184,64 +213,69 @@ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_REPORT_LUNS is not set # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=y +# CONFIG_SCSI_FC_ATTRS is not set + +# # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 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 # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_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_NCR53C7xx is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_NCR53C8XX is not set -CONFIG_SCSI_SYM53C8XX=y -CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 -CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 -CONFIG_SCSI_NCR53C8XX_SYNC=20 -# CONFIG_SCSI_NCR53C8XX_PROFILE is not set -# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set -# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set -# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=8 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=32 +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +# CONFIG_SCSI_IPR 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_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 # +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# # Fusion MPT device support # # CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set @@ -251,6 +285,10 @@ # CONFIG_I2O is not set # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -261,28 +299,33 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m @@ -293,11 +336,13 @@ # CONFIG_IP_NF_QUEUE is not set CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m +# CONFIG_IP_NF_MATCH_IPRANGE is not set CONFIG_IP_NF_MATCH_MAC=m CONFIG_IP_NF_MATCH_PKTTYPE=m CONFIG_IP_NF_MATCH_MARK=m CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_TOS=m +# CONFIG_IP_NF_MATCH_RECENT is not set CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m CONFIG_IP_NF_MATCH_AH_ESP=m @@ -307,15 +352,15 @@ CONFIG_IP_NF_MATCH_HELPER=m CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_UNCLEAN=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_MIRROR=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m +# CONFIG_IP_NF_TARGET_NETMAP is not set +# CONFIG_IP_NF_TARGET_SAME is not set # CONFIG_IP_NF_NAT_LOCAL is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_IRC=m @@ -326,21 +371,24 @@ CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m +# CONFIG_IP_NF_ARP_MANGLE is not set CONFIG_IP_NF_COMPAT_IPCHAINS=m # CONFIG_IP_NF_COMPAT_IPFWADM is not set -# CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE 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 @@ -352,29 +400,33 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set @@ -389,10 +441,11 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set -CONFIG_EEPRO100=y -# CONFIG_EEPRO100_PIO is not set -# CONFIG_E100 is not set +# CONFIG_EEPRO100 is not set +CONFIG_E100=y +# CONFIG_E100_NAPI is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set @@ -403,6 +456,7 @@ # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -421,80 +475,91 @@ # 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 +# CONFIG_S2IO is not set # -# Wireless LAN (non-hamradio) +# Token Ring devices # -# CONFIG_NET_RADIO is not set +# CONFIG_TR is not set # -# Token Ring devices (depends on LLC=y) +# Wireless LAN (non-hamradio) # -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set - -# -# Graphics support -# -# CONFIG_FB is not set +# CONFIG_ISDN is not set # -# Old CD-ROM drivers (not SCSI, not IDE) +# Telephony Support # -# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_PHONE is not set # # Input device support # -# CONFIG_INPUT is not set +CONFIG_INPUT=y # # Userland interfaces # +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -# CONFIG_SERIO is not set +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers # - -# -# Macintosh device drivers -# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# 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=y +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Character devices # +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -502,6 +567,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -510,26 +576,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# I2C Hardware Sensors Mainboard support -# - -# -# I2C Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_QIC02_TAPE is not set # @@ -551,11 +599,23 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Misc devices +# # # Multimedia devices @@ -568,6 +628,33 @@ # CONFIG_DVB is not set # +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -592,17 +679,20 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -611,6 +701,7 @@ # 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 is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -625,19 +716,20 @@ # Network File Systems # CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set +CONFIG_NFS_V3=y # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y # CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y -# CONFIG_SUNRPC_GSS is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -647,31 +739,26 @@ CONFIG_MSDOS_PARTITION=y # -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support +# Native Language Support # -# CONFIG_USB is not set -# CONFIG_USB_GADGET is not set +# CONFIG_NLS is not set # -# Bluetooth support +# Library routines # -# CONFIG_BT is not set +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set # -# Library routines +# Profiling support # -# CONFIG_CRC32 is not set +# CONFIG_PROFILING is not set # # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set -# CONFIG_KALLSYMS is not set # # Security options diff -Nru a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S --- a/arch/ppc/kernel/cpu_setup_6xx.S 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/kernel/cpu_setup_6xx.S 2004-09-06 16:37:51 -07:00 @@ -218,10 +218,10 @@ /* All of the bits we have to set..... */ - ori r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_LRSTK + ori r11,r11,HID0_SGE | HID0_FOLD | HID0_BHTE | HID0_LRSTK | HID0_BTIC BEGIN_FTR_SECTION - ori r11,r11,HID0_BTIC -END_FTR_SECTION_IFCLR(CPU_FTR_NO_BTIC) + xori r11,r11,HID0_BTIC +END_FTR_SECTION_IFSET(CPU_FTR_NO_BTIC) BEGIN_FTR_SECTION oris r11,r11,HID0_DPM@h /* enable dynamic power mgmt */ END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM) diff -Nru a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c --- a/arch/ppc/kernel/cputable.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/kernel/cputable.c 2004-09-06 16:37:53 -07:00 @@ -55,7 +55,7 @@ #endif /* We need to mark all pages as being coherent if we're SMP or we - * have a 754x and an MPC107 host bridge. + * have a 74[45]x and an MPC107 host bridge. */ #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT diff -Nru a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S --- a/arch/ppc/kernel/head_44x.S 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/kernel/head_44x.S 2004-09-06 16:37:51 -07:00 @@ -41,16 +41,9 @@ #include #include #include +#include "head_booke.h" -/* - * Macros - */ -#define SET_IVOR(vector_number, vector_label) \ - li r26,vector_label@l; \ - mtspr SPRN_IVOR##vector_number,r26; \ - sync - /* As with the other PowerPC ports, it is expected that when code * execution begins here, the following registers contain valid, yet * optional, information: @@ -301,234 +294,6 @@ * Interrupt vectors must be aligned on a 16 byte boundary. * We align on a 32 byte cache line boundary for good measure. */ - -#define NORMAL_EXCEPTION_PROLOG \ - mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ - mtspr SPRN_SPRG1,r11; \ - mtspr SPRN_SPRG4W,r1; \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - beq 1f; \ - mfspr r1,SPRG3; /* if from user, start at top of */\ - lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ - addi r1,r1,THREAD_SIZE; \ -1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ - tophys(r11,r1); \ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mfspr r10,SPRG0; \ - stw r10,GPR10(r11); \ - mfspr r12,SPRG1; \ - stw r12,GPR11(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r10,SPRG4R; \ - mfspr r12,SRR0; \ - stw r10,GPR1(r11); \ - mfspr r9,SRR1; \ - stw r10,0(r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception prolog for critical exceptions. This is a little different - * from the normal exception prolog above since a critical exception - * can potentially occur at any point during normal exception processing. - * Thus we cannot use the same SPRG registers as the normal prolog above. - * Instead we use a couple of words of memory at low physical addresses. - * This is OK since we don't support SMP on these processors. For Book E - * processors, we also have a reserved register (SPRG2) that is only used - * in critical exceptions so we can free up a GPR to use as the base for - * indirect access to the critical exception save area. This is necessary - * since the MMU is always on and the save area is offset from KERNELBASE. - */ -#define CRITICAL_EXCEPTION_PROLOG \ - mtspr SPRG2,r8; /* SPRG2 only used in criticals */ \ - lis r8,crit_save@ha; \ - stw r10,crit_r10@l(r8); \ - stw r11,crit_r11@l(r8); \ - mfspr r10,SPRG0; \ - stw r10,crit_sprg0@l(r8); \ - mfspr r10,SPRG1; \ - stw r10,crit_sprg1@l(r8); \ - mfspr r10,SPRG4R; \ - stw r10,crit_sprg4@l(r8); \ - mfspr r10,SPRG5R; \ - stw r10,crit_sprg5@l(r8); \ - mfspr r10,SPRG7R; \ - stw r10,crit_sprg7@l(r8); \ - mfspr r10,SPRN_PID; \ - stw r10,crit_pid@l(r8); \ - mfspr r10,SRR0; \ - stw r10,crit_srr0@l(r8); \ - mfspr r10,SRR1; \ - stw r10,crit_srr1@l(r8); \ - mfspr r8,SPRG2; /* SPRG2 only used in criticals */ \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_CSRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - lis r11,critical_stack_top@h; \ - ori r11,r11,critical_stack_top@l; \ - beq 1f; \ - /* COMING FROM USER MODE */ \ - mfspr r11,SPRG3; /* if from user, start at top of */\ - lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ - addi r11,r11,THREAD_SIZE; \ -1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ - stw r12,_DEAR(r11); /* since they may have had stuff */\ - mfspr r9,SPRN_ESR; /* in them at the point where the */\ - stw r9,_ESR(r11); /* exception was taken */\ - mfspr r12,CSRR0; \ - stw r1,GPR1(r11); \ - mfspr r9,CSRR1; \ - stw r1,0(r11); \ - tovirt(r1,r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception prolog for machine check exceptions. This is similar to - * the critical exception prolog, except that machine check exceptions - * have their own save area. For Book E processors, we also have a - * reserved register (SPRG6) that is only used in machine check exceptions - * so we can free up a GPR to use as the base for indirect access to the - * machine check exception save area. This is necessary since the MMU - * is always on and the save area is offset from KERNELBASE. - */ -#define MCHECK_EXCEPTION_PROLOG \ - mtspr SPRG6W,r8; /* SPRG6 used in machine checks */ \ - lis r8,mcheck_save@ha; \ - stw r10,mcheck_r10@l(r8); \ - stw r11,mcheck_r11@l(r8); \ - mfspr r10,SPRG0; \ - stw r10,mcheck_sprg0@l(r8); \ - mfspr r10,SPRG1; \ - stw r10,mcheck_sprg1@l(r8); \ - mfspr r10,SPRG4R; \ - stw r10,mcheck_sprg4@l(r8); \ - mfspr r10,SPRG5R; \ - stw r10,mcheck_sprg5@l(r8); \ - mfspr r10,SPRG7R; \ - stw r10,mcheck_sprg7@l(r8); \ - mfspr r10,SPRN_PID; \ - stw r10,mcheck_pid@l(r8); \ - mfspr r10,SRR0; \ - stw r10,mcheck_srr0@l(r8); \ - mfspr r10,SRR1; \ - stw r10,mcheck_srr1@l(r8); \ - mfspr r10,CSRR0; \ - stw r10,mcheck_csrr0@l(r8); \ - mfspr r10,CSRR1; \ - stw r10,mcheck_csrr1@l(r8); \ - mfspr r8,SPRG6R; /* SPRG6 used in machine checks */ \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_MCSRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - lis r11,mcheck_stack_top@h; \ - ori r11,r11,mcheck_stack_top@l; \ - beq 1f; \ - /* COMING FROM USER MODE */ \ - mfspr r11,SPRG3; /* if from user, start at top of */\ - lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ - addi r11,r11,THREAD_SIZE; \ -1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ - stw r12,_DEAR(r11); /* since they may have had stuff */\ - mfspr r9,SPRN_ESR; /* in them at the point where the */\ - stw r9,_ESR(r11); /* exception was taken */\ - mfspr r12,MCSRR0; \ - stw r1,GPR1(r11); \ - mfspr r9,MCSRR1; \ - stw r1,0(r11); \ - tovirt(r1,r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception vectors. - */ -#define START_EXCEPTION(label) \ - .align 5; \ -label: - -#define FINISH_EXCEPTION(func) \ - bl transfer_to_handler_full; \ - .long func; \ - .long ret_from_except_full - -#define EXCEPTION(n, label, hdlr, xfer) \ - START_EXCEPTION(label); \ - NORMAL_EXCEPTION_PROLOG; \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - xfer(n, hdlr) - -#define CRITICAL_EXCEPTION(n, label, hdlr) \ - START_EXCEPTION(label); \ - CRITICAL_EXCEPTION_PROLOG; \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, transfer_to_handler_full, \ - ret_from_except_full) - -#define MCHECK_EXCEPTION(n, label, hdlr) \ - START_EXCEPTION(label); \ - MCHECK_EXCEPTION_PROLOG; \ - lis r4,MCSR_MCS@h; \ - mtspr SPRN_MCSR,r4; \ - mfspr r5,SPRN_ESR; \ - stw r5,_ESR(r11); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, mcheck_transfer_to_handler, \ - ret_from_mcheck_exc) - -#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ - li r10,trap; \ - stw r10,TRAP(r11); \ - lis r10,msr@h; \ - ori r10,r10,msr@l; \ - copyee(r10, r9); \ - bl tfer; \ - .long hdlr; \ - .long ret - -#define COPY_EE(d, s) rlwimi d,s,0,16,16 -#define NOCOPY(d, s) - -#define EXC_XFER_STD(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ - ret_from_except_full) - -#define EXC_XFER_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ - ret_from_except) - -#define EXC_XFER_EE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ - ret_from_except_full) - -#define EXC_XFER_EE_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ - ret_from_except) interrupt_base: /* Critical Input Interrupt */ diff -Nru a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/kernel/head_booke.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,240 @@ +#ifndef __HEAD_BOOKE_H__ +#define __HEAD_BOOKE_H__ + +/* + * Macros used for common Book-e exception handling + */ + +#define SET_IVOR(vector_number, vector_label) \ + li r26,vector_label@l; \ + mtspr SPRN_IVOR##vector_number,r26; \ + sync + +#define NORMAL_EXCEPTION_PROLOG \ + mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ + mtspr SPRN_SPRG1,r11; \ + mtspr SPRN_SPRG4W,r1; \ + mfcr r10; /* save CR in r10 for now */\ + mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ + andi. r11,r11,MSR_PR; \ + beq 1f; \ + mfspr r1,SPRG3; /* if from user, start at top of */\ + lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ + addi r1,r1,THREAD_SIZE; \ +1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ + tophys(r11,r1); \ + stw r10,_CCR(r11); /* save various registers */\ + stw r12,GPR12(r11); \ + stw r9,GPR9(r11); \ + mfspr r10,SPRG0; \ + stw r10,GPR10(r11); \ + mfspr r12,SPRG1; \ + stw r12,GPR11(r11); \ + mflr r10; \ + stw r10,_LINK(r11); \ + mfspr r10,SPRG4R; \ + mfspr r12,SRR0; \ + stw r10,GPR1(r11); \ + mfspr r9,SRR1; \ + stw r10,0(r11); \ + rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ + stw r0,GPR0(r11); \ + SAVE_4GPRS(3, r11); \ + SAVE_2GPRS(7, r11) + +/* + * Exception prolog for critical exceptions. This is a little different + * from the normal exception prolog above since a critical exception + * can potentially occur at any point during normal exception processing. + * Thus we cannot use the same SPRG registers as the normal prolog above. + * Instead we use a couple of words of memory at low physical addresses. + * This is OK since we don't support SMP on these processors. For Book E + * processors, we also have a reserved register (SPRG2) that is only used + * in critical exceptions so we can free up a GPR to use as the base for + * indirect access to the critical exception save area. This is necessary + * since the MMU is always on and the save area is offset from KERNELBASE. + */ +#define CRITICAL_EXCEPTION_PROLOG \ + mtspr SPRG2,r8; /* SPRG2 only used in criticals */ \ + lis r8,crit_save@ha; \ + stw r10,crit_r10@l(r8); \ + stw r11,crit_r11@l(r8); \ + mfspr r10,SPRG0; \ + stw r10,crit_sprg0@l(r8); \ + mfspr r10,SPRG1; \ + stw r10,crit_sprg1@l(r8); \ + mfspr r10,SPRG4R; \ + stw r10,crit_sprg4@l(r8); \ + mfspr r10,SPRG5R; \ + stw r10,crit_sprg5@l(r8); \ + mfspr r10,SPRG7R; \ + stw r10,crit_sprg7@l(r8); \ + mfspr r10,SPRN_PID; \ + stw r10,crit_pid@l(r8); \ + mfspr r10,SRR0; \ + stw r10,crit_srr0@l(r8); \ + mfspr r10,SRR1; \ + stw r10,crit_srr1@l(r8); \ + mfspr r8,SPRG2; /* SPRG2 only used in criticals */ \ + mfcr r10; /* save CR in r10 for now */\ + mfspr r11,SPRN_CSRR1; /* check whether user or kernel */\ + andi. r11,r11,MSR_PR; \ + lis r11,critical_stack_top@h; \ + ori r11,r11,critical_stack_top@l; \ + beq 1f; \ + /* COMING FROM USER MODE */ \ + mfspr r11,SPRG3; /* if from user, start at top of */\ + lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ + addi r11,r11,THREAD_SIZE; \ +1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ + stw r10,_CCR(r11); /* save various registers */\ + stw r12,GPR12(r11); \ + stw r9,GPR9(r11); \ + mflr r10; \ + stw r10,_LINK(r11); \ + mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ + stw r12,_DEAR(r11); /* since they may have had stuff */\ + mfspr r9,SPRN_ESR; /* in them at the point where the */\ + stw r9,_ESR(r11); /* exception was taken */\ + mfspr r12,CSRR0; \ + stw r1,GPR1(r11); \ + mfspr r9,CSRR1; \ + stw r1,0(r11); \ + tovirt(r1,r11); \ + rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ + stw r0,GPR0(r11); \ + SAVE_4GPRS(3, r11); \ + SAVE_2GPRS(7, r11) + +/* + * Exception prolog for machine check exceptions. This is similar to + * the critical exception prolog, except that machine check exceptions + * have their own save area. For Book E processors, we also have a + * reserved register (SPRG6) that is only used in machine check exceptions + * so we can free up a GPR to use as the base for indirect access to the + * machine check exception save area. This is necessary since the MMU + * is always on and the save area is offset from KERNELBASE. + */ +#define MCHECK_EXCEPTION_PROLOG \ + mtspr SPRG6W,r8; /* SPRG6 used in machine checks */ \ + lis r8,mcheck_save@ha; \ + stw r10,mcheck_r10@l(r8); \ + stw r11,mcheck_r11@l(r8); \ + mfspr r10,SPRG0; \ + stw r10,mcheck_sprg0@l(r8); \ + mfspr r10,SPRG1; \ + stw r10,mcheck_sprg1@l(r8); \ + mfspr r10,SPRG4R; \ + stw r10,mcheck_sprg4@l(r8); \ + mfspr r10,SPRG5R; \ + stw r10,mcheck_sprg5@l(r8); \ + mfspr r10,SPRG7R; \ + stw r10,mcheck_sprg7@l(r8); \ + mfspr r10,SPRN_PID; \ + stw r10,mcheck_pid@l(r8); \ + mfspr r10,SRR0; \ + stw r10,mcheck_srr0@l(r8); \ + mfspr r10,SRR1; \ + stw r10,mcheck_srr1@l(r8); \ + mfspr r10,CSRR0; \ + stw r10,mcheck_csrr0@l(r8); \ + mfspr r10,CSRR1; \ + stw r10,mcheck_csrr1@l(r8); \ + mfspr r8,SPRG6R; /* SPRG6 used in machine checks */ \ + mfcr r10; /* save CR in r10 for now */\ + mfspr r11,SPRN_MCSRR1; /* check whether user or kernel */\ + andi. r11,r11,MSR_PR; \ + lis r11,mcheck_stack_top@h; \ + ori r11,r11,mcheck_stack_top@l; \ + beq 1f; \ + /* COMING FROM USER MODE */ \ + mfspr r11,SPRG3; /* if from user, start at top of */\ + lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ + addi r11,r11,THREAD_SIZE; \ +1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ + stw r10,_CCR(r11); /* save various registers */\ + stw r12,GPR12(r11); \ + stw r9,GPR9(r11); \ + mflr r10; \ + stw r10,_LINK(r11); \ + mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ + stw r12,_DEAR(r11); /* since they may have had stuff */\ + mfspr r9,SPRN_ESR; /* in them at the point where the */\ + stw r9,_ESR(r11); /* exception was taken */\ + mfspr r12,MCSRR0; \ + stw r1,GPR1(r11); \ + mfspr r9,MCSRR1; \ + stw r1,0(r11); \ + tovirt(r1,r11); \ + rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ + stw r0,GPR0(r11); \ + SAVE_4GPRS(3, r11); \ + SAVE_2GPRS(7, r11) + +/* + * Exception vectors. + */ +#define START_EXCEPTION(label) \ + .align 5; \ +label: + +#define FINISH_EXCEPTION(func) \ + bl transfer_to_handler_full; \ + .long func; \ + .long ret_from_except_full + +#define EXCEPTION(n, label, hdlr, xfer) \ + START_EXCEPTION(label); \ + NORMAL_EXCEPTION_PROLOG; \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + xfer(n, hdlr) + +#define CRITICAL_EXCEPTION(n, label, hdlr) \ + START_EXCEPTION(label); \ + CRITICAL_EXCEPTION_PROLOG; \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ + NOCOPY, transfer_to_handler_full, \ + ret_from_except_full) + +#define MCHECK_EXCEPTION(n, label, hdlr) \ + START_EXCEPTION(label); \ + MCHECK_EXCEPTION_PROLOG; \ + mfspr r5,SPRN_ESR; \ + stw r5,_ESR(r11); \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ + NOCOPY, mcheck_transfer_to_handler, \ + ret_from_mcheck_exc) + +#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ + li r10,trap; \ + stw r10,TRAP(r11); \ + lis r10,msr@h; \ + ori r10,r10,msr@l; \ + copyee(r10, r9); \ + bl tfer; \ + .long hdlr; \ + .long ret + +#define COPY_EE(d, s) rlwimi d,s,0,16,16 +#define NOCOPY(d, s) + +#define EXC_XFER_STD(n, hdlr) \ + EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ + ret_from_except_full) + +#define EXC_XFER_LITE(n, hdlr) \ + EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ + ret_from_except) + +#define EXC_XFER_EE(n, hdlr) \ + EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ + ret_from_except_full) + +#define EXC_XFER_EE_LITE(n, hdlr) \ + EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ + ret_from_except) + + +#endif /* __HEAD_BOOKE_H__ */ diff -Nru a/arch/ppc/kernel/head_e500.S b/arch/ppc/kernel/head_e500.S --- a/arch/ppc/kernel/head_e500.S 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/kernel/head_e500.S 2004-09-06 16:37:54 -07:00 @@ -41,15 +41,7 @@ #include #include #include - -/* - * Macros - */ - -#define SET_IVOR(vector_number, vector_label) \ - li r26,vector_label@l; \ - mtspr SPRN_IVOR##vector_number,r26; \ - sync +#include "head_booke.h" /* As with the other PowerPC ports, it is expected that when code * execution begins here, the following registers contain valid, yet @@ -370,232 +362,6 @@ * Interrupt vectors must be aligned on a 16 byte boundary. * We align on a 32 byte cache line boundary for good measure. */ - -#define NORMAL_EXCEPTION_PROLOG \ - mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ - mtspr SPRN_SPRG1,r11; \ - mtspr SPRN_SPRG4W,r1; \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - beq 1f; \ - mfspr r1,SPRG3; /* if from user, start at top of */\ - lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ - addi r1,r1,THREAD_SIZE; \ -1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ - tophys(r11,r1); \ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mfspr r10,SPRG0; \ - stw r10,GPR10(r11); \ - mfspr r12,SPRG1; \ - stw r12,GPR11(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r10,SPRG4R; \ - mfspr r12,SRR0; \ - stw r10,GPR1(r11); \ - mfspr r9,SRR1; \ - stw r10,0(r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception prolog for critical exceptions. This is a little different - * from the normal exception prolog above since a critical exception - * can potentially occur at any point during normal exception processing. - * Thus we cannot use the same SPRG registers as the normal prolog above. - * Instead we use a couple of words of memory at low physical addresses. - * This is OK since we don't support SMP on these processors. For Book E - * processors, we also have a reserved register (SPRG2) that is only used - * in critical exceptions so we can free up a GPR to use as the base for - * indirect access to the critical exception save area. This is necessary - * since the MMU is always on and the save area is offset from KERNELBASE. - */ -#define CRITICAL_EXCEPTION_PROLOG \ - mtspr SPRG2,r8; /* SPRG2 only used in criticals */ \ - lis r8,crit_save@ha; \ - stw r10,crit_r10@l(r8); \ - stw r11,crit_r11@l(r8); \ - mfspr r10,SPRG0; \ - stw r10,crit_sprg0@l(r8); \ - mfspr r10,SPRG1; \ - stw r10,crit_sprg1@l(r8); \ - mfspr r10,SPRG4R; \ - stw r10,crit_sprg4@l(r8); \ - mfspr r10,SPRG5R; \ - stw r10,crit_sprg5@l(r8); \ - mfspr r10,SPRG7R; \ - stw r10,crit_sprg7@l(r8); \ - mfspr r10,SPRN_PID; \ - stw r10,crit_pid@l(r8); \ - mfspr r10,SRR0; \ - stw r10,crit_srr0@l(r8); \ - mfspr r10,SRR1; \ - stw r10,crit_srr1@l(r8); \ - mfspr r8,SPRG2; /* SPRG2 only used in criticals */ \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_CSRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - lis r11,critical_stack_top@h; \ - ori r11,r11,critical_stack_top@l; \ - beq 1f; \ - /* COMING FROM USER MODE */ \ - mfspr r11,SPRG3; /* if from user, start at top of */\ - lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ - addi r11,r11,THREAD_SIZE; \ -1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ - stw r12,_DEAR(r11); /* since they may have had stuff */\ - mfspr r9,SPRN_ESR; /* in them at the point where the */\ - stw r9,_ESR(r11); /* exception was taken */\ - mfspr r12,CSRR0; \ - stw r1,GPR1(r11); \ - mfspr r9,CSRR1; \ - stw r1,0(r11); \ - tovirt(r1,r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception prolog for machine check exceptions. This is similar to - * the critical exception prolog, except that machine check exceptions - * have their own save area. For Book E processors, we also have a - * reserved register (SPRG6) that is only used in machine check exceptions - * so we can free up a GPR to use as the base for indirect access to the - * machine check exception save area. This is necessary since the MMU - * is always on and the save area is offset from KERNELBASE. - */ -#define MCHECK_EXCEPTION_PROLOG \ - mtspr SPRG6W,r8; /* SPRG6 used in machine checks */ \ - lis r8,mcheck_save@ha; \ - stw r10,mcheck_r10@l(r8); \ - stw r11,mcheck_r11@l(r8); \ - mfspr r10,SPRG0; \ - stw r10,mcheck_sprg0@l(r8); \ - mfspr r10,SPRG1; \ - stw r10,mcheck_sprg1@l(r8); \ - mfspr r10,SPRG4R; \ - stw r10,mcheck_sprg4@l(r8); \ - mfspr r10,SPRG5R; \ - stw r10,mcheck_sprg5@l(r8); \ - mfspr r10,SPRG7R; \ - stw r10,mcheck_sprg7@l(r8); \ - mfspr r10,SPRN_PID; \ - stw r10,mcheck_pid@l(r8); \ - mfspr r10,SRR0; \ - stw r10,mcheck_srr0@l(r8); \ - mfspr r10,SRR1; \ - stw r10,mcheck_srr1@l(r8); \ - mfspr r10,CSRR0; \ - stw r10,mcheck_csrr0@l(r8); \ - mfspr r10,CSRR1; \ - stw r10,mcheck_csrr1@l(r8); \ - mfspr r8,SPRG6R; /* SPRG6 used in machine checks */ \ - mfcr r10; /* save CR in r10 for now */\ - mfspr r11,SPRN_MCSRR1; /* check whether user or kernel */\ - andi. r11,r11,MSR_PR; \ - lis r11,mcheck_stack_top@h; \ - ori r11,r11,mcheck_stack_top@l; \ - beq 1f; \ - /* COMING FROM USER MODE */ \ - mfspr r11,SPRG3; /* if from user, start at top of */\ - lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ - addi r11,r11,THREAD_SIZE; \ -1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ - stw r10,_CCR(r11); /* save various registers */\ - stw r12,GPR12(r11); \ - stw r9,GPR9(r11); \ - mflr r10; \ - stw r10,_LINK(r11); \ - mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ - stw r12,_DEAR(r11); /* since they may have had stuff */\ - mfspr r9,SPRN_ESR; /* in them at the point where the */\ - stw r9,_ESR(r11); /* exception was taken */\ - mfspr r12,MCSRR0; \ - stw r1,GPR1(r11); \ - mfspr r9,MCSRR1; \ - stw r1,0(r11); \ - tovirt(r1,r11); \ - rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ - stw r0,GPR0(r11); \ - SAVE_4GPRS(3, r11); \ - SAVE_2GPRS(7, r11) - -/* - * Exception vectors. - */ -#define START_EXCEPTION(label) \ - .align 5; \ -label: - -#define FINISH_EXCEPTION(func) \ - bl transfer_to_handler_full; \ - .long func; \ - .long ret_from_except_full - -#define EXCEPTION(n, label, hdlr, xfer) \ - START_EXCEPTION(label); \ - NORMAL_EXCEPTION_PROLOG; \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - xfer(n, hdlr) - -#define CRITICAL_EXCEPTION(n, label, hdlr) \ - START_EXCEPTION(label); \ - CRITICAL_EXCEPTION_PROLOG; \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, transfer_to_handler_full, \ - ret_from_except_full) - -#define MCHECK_EXCEPTION(n, label, hdlr) \ - START_EXCEPTION(label); \ - MCHECK_EXCEPTION_PROLOG; \ - mfspr r5,SPRN_ESR; \ - stw r5,_ESR(r11); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ - EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ - NOCOPY, mcheck_transfer_to_handler, \ - ret_from_mcheck_exc) - -#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ - li r10,trap; \ - stw r10,TRAP(r11); \ - lis r10,msr@h; \ - ori r10,r10,msr@l; \ - copyee(r10, r9); \ - bl tfer; \ - .long hdlr; \ - .long ret - -#define COPY_EE(d, s) rlwimi d,s,0,16,16 -#define NOCOPY(d, s) - -#define EXC_XFER_STD(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ - ret_from_except_full) - -#define EXC_XFER_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ - ret_from_except) - -#define EXC_XFER_EE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ - ret_from_except_full) - -#define EXC_XFER_EE_LITE(n, hdlr) \ - EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ - ret_from_except) interrupt_base: /* Critical Input Interrupt */ diff -Nru a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c --- a/arch/ppc/kernel/idle.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/kernel/idle.c 2004-09-06 16:37:50 -07:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -65,3 +66,36 @@ default_idle(); return 0; } + +#if defined(CONFIG_SYSCTL) && defined(CONFIG_6xx) +/* + * Register the sysctl to set/clear powersave_nap. + */ +extern unsigned long powersave_nap; + +static ctl_table powersave_nap_ctl_table[]={ + { + .ctl_name = KERN_PPC_POWERSAVE_NAP, + .procname = "powersave-nap", + .data = &powersave_nap, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { 0, }, +}; +static ctl_table powersave_nap_sysctl_root[] = { + { 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, }, + { 0,}, +}; + +static int __init +register_powersave_nap_sysctl(void) +{ + register_sysctl_table(powersave_nap_sysctl_root, 0); + + return 0; +} + +__initcall(register_powersave_nap_sysctl); +#endif diff -Nru a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c --- a/arch/ppc/kernel/irq.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/kernel/irq.c 2004-09-06 16:37:54 -07:00 @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -414,13 +415,15 @@ handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action) { int status = 0; + int ret; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -620,32 +623,6 @@ return full_count; } -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - int err; - int full_count = count; - cpumask_t *mask = (cpumask_t *)data; - cpumask_t new_value; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - #define MAX_NAMELEN 10 static void register_irq_proc (unsigned int irq) @@ -673,23 +650,14 @@ smp_affinity_entry[irq] = entry; } -unsigned long prof_cpu_mask = -1; - void init_irq_proc (void) { - struct proc_dir_entry *entry; int i; /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", NULL); - /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/kernel/misc.S 2004-09-06 16:37:55 -07:00 @@ -617,10 +617,9 @@ * flush_icache_range(unsigned long start, unsigned long stop) */ _GLOBAL(flush_icache_range) - mfspr r5,PVR - rlwinm r5,r5,16,16,31 - cmpi 0,r5,1 - beqlr /* for 601, do nothing */ +BEGIN_FTR_SECTION + blr /* for 601, do nothing */ +END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) li r5,L1_CACHE_LINE_SIZE-1 andc r3,r3,r5 subf r4,r3,r4 @@ -735,10 +734,9 @@ * void __flush_dcache_icache(void *page) */ _GLOBAL(__flush_dcache_icache) - mfspr r5,PVR - rlwinm r5,r5,16,16,31 - cmpi 0,r5,1 - beqlr /* for 601, do nothing */ +BEGIN_FTR_SECTION + blr /* for 601, do nothing */ +END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) rlwinm r3,r3,0,0,19 /* Get page base address */ li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */ mtctr r4 @@ -764,10 +762,9 @@ * void __flush_dcache_icache_phys(unsigned long physaddr) */ _GLOBAL(__flush_dcache_icache_phys) - mfspr r5,PVR - rlwinm r5,r5,16,16,31 - cmpi 0,r5,1 - beqlr /* for 601, do nothing */ +BEGIN_FTR_SECTION + blr /* for 601, do nothing */ +END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) mfmsr r10 rlwinm r0,r10,0,28,26 /* clear DR */ mtmsr r0 diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c --- a/arch/ppc/kernel/pci.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/kernel/pci.c 2004-09-06 16:37:52 -07:00 @@ -144,8 +144,7 @@ } DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources); -void -pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, +void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, struct resource *res) { unsigned long offset = 0; @@ -158,6 +157,7 @@ region->start = res->start - offset; region->end = res->end - offset; } +EXPORT_SYMBOL(pcibios_resource_to_bus); /* * We need to avoid collisions with `mirrored' VGA ports @@ -172,8 +172,7 @@ * but we want to try to avoid allocating at 0x2900-0x2bff * which might have be mirrored at 0x0100-0x03ff.. */ -void -pcibios_align_resource(void *data, struct resource *res, unsigned long size, +void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align) { struct pci_dev *dev = data; @@ -193,7 +192,7 @@ } } } - +EXPORT_SYMBOL(pcibios_align_resource); /* * Handle resources of PCI devices. If the world were perfect, we could diff -Nru a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c --- a/arch/ppc/kernel/ppc_htab.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/kernel/ppc_htab.c 2004-09-06 16:37:50 -07:00 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -34,9 +35,6 @@ static int ppc_htab_show(struct seq_file *m, void *v); static ssize_t ppc_htab_write(struct file * file, const char __user * buffer, size_t count, loff_t *ppos); -int proc_dol2crvec(ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos); - extern PTE *Hash, *Hash_end; extern unsigned long Hash_size, Hash_mask; extern unsigned long _SDR1; @@ -438,3 +436,32 @@ *ppos += *lenp; return 0; } + +#ifdef CONFIG_SYSCTL +/* + * Register our sysctl. + */ +static ctl_table htab_ctl_table[]={ + { + .ctl_name = KERN_PPC_L2CR, + .procname = "l2cr", + .mode = 0644, + .proc_handler = &proc_dol2crvec, + }, + { 0, }, +}; +static ctl_table htab_sysctl_root[] = { + { 1, "kernel", NULL, 0, 0755, htab_ctl_table, }, + { 0,}, +}; + +static int __init +register_ppc_htab_sysctl(void) +{ + register_sysctl_table(htab_sysctl_root, 0); + + return 0; +} + +__initcall(register_ppc_htab_sysctl); +#endif diff -Nru a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c --- a/arch/ppc/kernel/process.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/kernel/process.c 2004-09-06 16:37:52 -07:00 @@ -555,8 +555,7 @@ CHECK_FULL_REGS(regs); if (usp == 0) usp = regs->gpr[1]; /* stack pointer for child */ - return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, - parent_tidp, child_tidp); + return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp); } int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6, @@ -662,7 +661,7 @@ ++count; sp = *(unsigned long *)sp; } -#if !CONFIG_KALLSYMS +#ifndef CONFIG_KALLSYMS if (count > 0) printk("\n"); #endif diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c --- a/arch/ppc/kernel/setup.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/kernel/setup.c 2004-09-06 16:37:55 -07:00 @@ -747,6 +747,10 @@ if ( ppc_md.progress ) ppc_md.progress("ocp: exit", 0x3eab); #endif +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif + ppc_md.setup_arch(); if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab); diff -Nru a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c --- a/arch/ppc/kernel/signal.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/kernel/signal.c 2004-09-06 16:37:55 -07:00 @@ -404,9 +404,7 @@ printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n", regs, frame, newsp); #endif - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static int do_setcontext(struct ucontext __user *ucp, struct pt_regs *regs, int sig) @@ -556,9 +554,7 @@ printk("badframe in handle_signal, regs=%p frame=%p newsp=%lx\n", regs, frame, newsp); #endif - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -604,7 +600,7 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) { siginfo_t info; - struct k_sigaction *ka; + struct k_sigaction ka; unsigned long frame, newsp; int signr, ret; @@ -613,9 +609,7 @@ newsp = frame = 0; - signr = get_signal_to_deliver(&info, regs, NULL); - - ka = (signr == 0)? NULL: ¤t->sighand->action[signr-1]; + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (TRAP(regs) == 0x0C00 /* System Call! */ && regs->ccr & 0x10000000 /* error signalled */ @@ -626,7 +620,7 @@ if (signr > 0 && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK || (ret == ERESTARTSYS - && !(ka->sa.sa_flags & SA_RESTART)))) { + && !(ka.sa.sa_flags & SA_RESTART)))) { /* make the system call return an EINTR error */ regs->result = -EINTR; regs->gpr[3] = EINTR; @@ -645,7 +639,7 @@ if (signr == 0) return 0; /* no signals delivered */ - if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size + if ((ka.sa.sa_flags & SA_ONSTACK) && current->sas_ss_size && !on_sig_stack(regs->gpr[1])) newsp = current->sas_ss_sp + current->sas_ss_size; else @@ -653,17 +647,14 @@ newsp &= ~0xfUL; /* Whee! Actually deliver the signal. */ - if (ka->sa.sa_flags & SA_SIGINFO) - handle_rt_signal(signr, ka, &info, oldset, regs, newsp); + if (ka.sa.sa_flags & SA_SIGINFO) + handle_rt_signal(signr, &ka, &info, oldset, regs, newsp); else - handle_signal(signr, ka, &info, oldset, regs, newsp); - - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; + handle_signal(signr, &ka, &info, oldset, regs, newsp); - if (!(ka->sa.sa_flags & SA_NODEFER)) { + if (!(ka.sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); + sigorsets(¤t->blocked,¤t->blocked,&ka.sa.sa_mask); sigaddset(¤t->blocked, signr); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); diff -Nru a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c --- a/arch/ppc/kernel/smp.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/kernel/smp.c 2004-09-06 16:37:55 -07:00 @@ -364,22 +364,15 @@ int __cpu_up(unsigned int cpu) { - struct pt_regs regs; struct task_struct *p; char buf[32]; int c; /* create a process for the processor */ /* only regs.msr is actually used, and 0 is OK for it */ - memset(®s, 0, sizeof(struct pt_regs)); - p = copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); + p = fork_idle(cpu); if (IS_ERR(p)) panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); - wake_up_forked_process(p); - - init_idle(p, cpu); - unhash_process(p); - secondary_ti = p->thread_info; p->thread_info->cpu = cpu; diff -Nru a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c --- a/arch/ppc/kernel/time.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/kernel/time.c 2004-09-06 16:37:54 -07:00 @@ -108,41 +108,19 @@ return delta; } -extern char _stext; - -static inline void ppc_do_profile (struct pt_regs *regs) +#ifdef CONFIG_SMP +unsigned long profile_pc(struct pt_regs *regs) { - unsigned long nip; - extern unsigned long prof_cpu_mask; - - profile_hook(regs); + unsigned long pc = instruction_pointer(regs); - if (user_mode(regs)) - return; + if (pc >= (unsigned long)&__lock_text_start && + pc <= (unsigned long)&__lock_text_end) + return regs->link; - if (!prof_buffer) - return; - - nip = instruction_pointer(regs); - - /* - * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. - * (default is all CPUs.) - */ - if (!((1<>= prof_shift; - /* - * Don't ignore out-of-bounds EIP values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (nip > prof_len-1) - nip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[nip]); + return pc; } +EXPORT_SYMBOL(profile_pc); +#endif /* * timer_interrupt - gets called when the decrementer overflows, @@ -164,7 +142,7 @@ while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) { jiffy_stamp += tb_ticks_per_jiffy; - ppc_do_profile(regs); + profile_tick(CPU_PROFILING, regs); if (smp_processor_id()) continue; diff -Nru a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S --- a/arch/ppc/kernel/vmlinux.lds.S 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/kernel/vmlinux.lds.S 2004-09-06 16:37:55 -07:00 @@ -32,6 +32,7 @@ { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.got1) __got2_start = .; @@ -102,9 +103,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/ppc/math-emu/op-common.h b/arch/ppc/math-emu/op-common.h --- a/arch/ppc/math-emu/op-common.h 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/math-emu/op-common.h 2004-09-06 16:37:54 -07:00 @@ -82,7 +82,6 @@ if (X##_e <= _FP_WFRACBITS_##fs) \ { \ _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ - __ret |= _FP_ROUND(wc, X); \ _FP_FRAC_SLL_##wc(X, 1); \ if (_FP_FRAC_OVERP_##wc(fs, X)) \ { \ diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c --- a/arch/ppc/platforms/4xx/ebony.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/4xx/ebony.c 2004-09-06 16:37:55 -07:00 @@ -361,10 +361,6 @@ ROOT_DEV = Root_HDA1; #endif -#ifdef CONFIG_VT - conswitchp = &dummy_con; -#endif - ebony_early_serial_map(); ibm4xxPIC_InitSenses = ebony_IRQ_initsenses; diff -Nru a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c --- a/arch/ppc/platforms/4xx/ocotea.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/4xx/ocotea.c 2004-09-06 16:37:54 -07:00 @@ -319,10 +319,6 @@ ROOT_DEV = Root_HDA1; #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - ocotea_early_serial_map(&clocks); /* Identify the system */ diff -Nru a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c --- a/arch/ppc/platforms/85xx/mpc8540_ads.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c 2004-09-06 16:37:51 -07:00 @@ -120,10 +120,6 @@ mpc85xx_setup_hose(); #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - #ifdef CONFIG_SERIAL_8250 mpc85xx_early_serial_map(); #endif diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2004-09-06 16:37:55 -07:00 @@ -307,7 +307,7 @@ { if (bus == 0 && PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; -#if CONFIG_85xx_PCI2 +#ifdef CONFIG_85xx_PCI2 /* With the current code we know PCI2 will be bus 2, however this may * not be guarnteed */ if (bus == 2 && PCI_SLOT(devfn) == 0) @@ -356,10 +356,6 @@ #ifdef CONFIG_PCI /* setup PCI host bridges */ mpc85xx_setup_hose(); -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; #endif #ifdef CONFIG_SERIAL_8250 diff -Nru a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c --- a/arch/ppc/platforms/85xx/sbc8560.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/85xx/sbc8560.c 2004-09-06 16:37:51 -07:00 @@ -144,9 +144,6 @@ /* setup PCI host bridges */ mpc85xx_setup_hose(); #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif #ifdef CONFIG_SERIAL_8250 sbc8560_early_serial_map(); #endif diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile --- a/arch/ppc/platforms/Makefile 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/Makefile 2004-09-06 16:37:55 -07:00 @@ -21,23 +21,21 @@ obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o obj-$(CONFIG_PREP_RESIDUAL) += residual.o obj-$(CONFIG_ADIR) += adir_setup.o adir_pic.o adir_pci.o -obj-$(CONFIG_EST8260) += est8260_setup.o -obj-$(CONFIG_PQ2ADS) += pq2ads_setup.o +obj-$(CONFIG_PQ2ADS) += pq2ads.o obj-$(CONFIG_TQM8260) += tqm8260_setup.o obj-$(CONFIG_EV64260) += ev64260_setup.o obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o obj-$(CONFIG_K2) += k2.o -obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o +obj-$(CONFIG_LOPEC) += lopec.o obj-$(CONFIG_MCPN765) += mcpn765.o obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o -obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o +obj-$(CONFIG_MVME5100) += mvme5100.o obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o obj-$(CONFIG_PCORE) += pcore.o obj-$(CONFIG_POWERPMC250) += powerpmc250.o obj-$(CONFIG_PPLUS) += pplus.o obj-$(CONFIG_PRPMC750) += prpmc750.o obj-$(CONFIG_PRPMC800) += prpmc800.o -obj-$(CONFIG_RPX8260) += rpx8260.o obj-$(CONFIG_SANDPOINT) += sandpoint.o obj-$(CONFIG_SBC82xx) += sbc82xx.o obj-$(CONFIG_SPRUCE) += spruce.o diff -Nru a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c --- a/arch/ppc/platforms/chrp_setup.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/chrp_setup.c 2004-09-06 16:37:54 -07:00 @@ -250,13 +250,6 @@ */ sio_init(); - /* - * Setup the console operations - */ -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - /* Get the event scan rate for the rtas so we know how * often it expects a heartbeat. -- Cort */ diff -Nru a/arch/ppc/platforms/est8260.h b/arch/ppc/platforms/est8260.h --- a/arch/ppc/platforms/est8260.h 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/est8260.h 2004-09-06 16:37:54 -07:00 @@ -10,6 +10,9 @@ #define BOOTROM_RESTART_ADDR ((uint)0xff000104) +/* For our show_cpuinfo hooks. */ +#define CPUINFO_VENDOR "EST Corporation" +#define CPUINFO_MACHINE "SBC8260 PowerPC" /* A Board Information structure that is given to a program when * prom starts it up. diff -Nru a/arch/ppc/platforms/est8260_setup.c b/arch/ppc/platforms/est8260_setup.c --- a/arch/ppc/platforms/est8260_setup.c 2004-09-06 16:37:50 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,65 +0,0 @@ -/* - * arch/ppc/platforms/est8260_setup.c - * - * EST8260 platform support - * - * Author: Allen Curtis - * Derived from: m8260_setup.c by Dan Malek, MVista - * - * Copyright 2002 Ones and Zeros, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include - -#include -#include - -static void (*callback_setup_arch)(void); - -extern unsigned char __res[sizeof(bd_t)]; - -extern void m8260_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7); - -static int -est8260_show_cpuinfo(struct seq_file *m) -{ - bd_t *binfo = (bd_t *)__res; - - seq_printf(m, "vendor\t\t: EST Corporation\n" - "machine\t\t: SBC8260 PowerPC\n" - "\n" - "mem size\t\t: 0x%08x\n" - "console baud\t\t: %d\n" - "\n", - binfo->bi_memsize, - binfo->bi_baudrate); - return 0; -} - -static void __init -est8260_setup_arch(void) -{ - printk("EST SBC8260 Port\n"); - callback_setup_arch(); -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - /* Generic 8260 platform initialization */ - m8260_init(r3, r4, r5, r6, r7); - - /* Anything special for this platform */ - ppc_md.show_cpuinfo = est8260_show_cpuinfo; - - callback_setup_arch = ppc_md.setup_arch; - ppc_md.setup_arch = est8260_setup_arch; -} diff -Nru a/arch/ppc/platforms/k2.c b/arch/ppc/platforms/k2.c --- a/arch/ppc/platforms/k2.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/platforms/k2.c 2004-09-06 16:37:50 -07:00 @@ -464,10 +464,6 @@ ROOT_DEV = Root_HDC1; #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - /* Identify the system */ printk(KERN_INFO "System Identification: SBS K2 - PowerPC 750 @ " "%d Mhz\n", k2_get_cpu_speed() / 1000000); diff -Nru a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/lopec.c 2004-09-06 16:37:53 -07:00 @@ -0,0 +1,410 @@ +/* + * arch/ppc/platforms/lopec.c + * + * Setup routines for the Motorola LoPEC. + * + * Author: Dan Cox + * Maintainer: Tom Rini + * + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Define all of the IRQ senses and polarities. Taken from the + * LoPEC Programmer's Reference Guide. + */ +static u_char lopec_openpic_initsenses[16] __initdata = { + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 4 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 5 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 6 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 7 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 8 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 9 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 10 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 11 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 12 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 13 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* IRQ 14 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE) /* IRQ 15 */ +}; + +static inline int __init +lopec_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + int irq; + static char pci_irq_table[][4] = { + {16, 0, 0, 0}, /* ID 11 - Winbond */ + {22, 0, 0, 0}, /* ID 12 - SCSI */ + {0, 0, 0, 0}, /* ID 13 - nothing */ + {17, 0, 0, 0}, /* ID 14 - 82559 Ethernet */ + {27, 0, 0, 0}, /* ID 15 - USB */ + {23, 0, 0, 0}, /* ID 16 - PMC slot 1 */ + {24, 0, 0, 0}, /* ID 17 - PMC slot 2 */ + {25, 0, 0, 0}, /* ID 18 - PCI slot */ + {0, 0, 0, 0}, /* ID 19 - nothing */ + {0, 0, 0, 0}, /* ID 20 - nothing */ + {0, 0, 0, 0}, /* ID 21 - nothing */ + {0, 0, 0, 0}, /* ID 22 - nothing */ + {0, 0, 0, 0}, /* ID 23 - nothing */ + {0, 0, 0, 0}, /* ID 24 - PMC slot 1b */ + {0, 0, 0, 0}, /* ID 25 - nothing */ + {0, 0, 0, 0} /* ID 26 - PMC Slot 2b */ + }; + const long min_idsel = 11, max_idsel = 26, irqs_per_slot = 4; + + irq = PCI_IRQ_TABLE_LOOKUP; + if (!irq) + return 0; + + return irq; +} + +static void __init +lopec_setup_winbond_83553(struct pci_controller *hose) +{ + int devfn; + + devfn = PCI_DEVFN(11,0); + + /* IDE interrupt routing (primary 14, secondary 15) */ + early_write_config_byte(hose, 0, devfn, 0x43, 0xef); + /* PCI interrupt routing */ + early_write_config_word(hose, 0, devfn, 0x44, 0x0000); + + /* ISA-PCI address decoder */ + early_write_config_byte(hose, 0, devfn, 0x48, 0xf0); + + /* RTC, kb, not used in PPC */ + early_write_config_byte(hose, 0, devfn, 0x4d, 0x00); + early_write_config_byte(hose, 0, devfn, 0x4e, 0x04); + devfn = PCI_DEVFN(11, 1); + early_write_config_byte(hose, 0, devfn, 0x09, 0x8f); + early_write_config_dword(hose, 0, devfn, 0x40, 0x00ff0011); +} + +static void __init +lopec_find_bridges(void) +{ + struct pci_controller *hose; + + hose = pcibios_alloc_controller(); + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + + if (mpc10x_bridge_init(hose, MPC10X_MEM_MAP_B, MPC10X_MEM_MAP_B, + MPC10X_MAPB_EUMB_BASE) == 0) { + + hose->mem_resources[0].end = 0xffffffff; + lopec_setup_winbond_83553(hose); + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = lopec_map_irq; + } +} + +static int +lopec_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "machine\t\t: Motorola LoPEC\n"); + return 0; +} + +static u32 +lopec_irq_canonicalize(u32 irq) +{ + if (irq == 2) + return 9; + else + return irq; +} + +static void +lopec_restart(char *cmd) +{ +#define LOPEC_SYSSTAT1 0xffe00000 + /* force a hard reset, if possible */ + unsigned char reg = *((unsigned char *) LOPEC_SYSSTAT1); + reg |= 0x80; + *((unsigned char *) LOPEC_SYSSTAT1) = reg; + + local_irq_disable(); + while(1); +#undef LOPEC_SYSSTAT1 +} + +static void +lopec_halt(void) +{ + local_irq_disable(); + while(1); +} + +static void +lopec_power_off(void) +{ + lopec_halt(); +} + +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +int lopec_ide_ports_known = 0; +static unsigned long lopec_ide_regbase[MAX_HWIFS]; +static unsigned long lopec_ide_ctl_regbase[MAX_HWIFS]; +static unsigned long lopec_idedma_regbase; + +static void +lopec_ide_probe(void) +{ + struct pci_dev *dev = pci_find_device(PCI_VENDOR_ID_WINBOND, + PCI_DEVICE_ID_WINBOND_82C105, + NULL); + lopec_ide_ports_known = 1; + + if (dev) { + lopec_ide_regbase[0] = dev->resource[0].start; + lopec_ide_regbase[1] = dev->resource[2].start; + lopec_ide_ctl_regbase[0] = dev->resource[1].start; + lopec_ide_ctl_regbase[1] = dev->resource[3].start; + lopec_idedma_regbase = dev->resource[4].start; + } +} + +static int +lopec_ide_default_irq(unsigned long base) +{ + if (lopec_ide_ports_known == 0) + lopec_ide_probe(); + + if (base == lopec_ide_regbase[0]) + return 14; + else if (base == lopec_ide_regbase[1]) + return 15; + else + return 0; +} + +static unsigned long +lopec_ide_default_io_base(int index) +{ + if (lopec_ide_ports_known == 0) + lopec_ide_probe(); + return lopec_ide_regbase[index]; +} + +static void __init +lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data, + unsigned long ctl, int *irq) +{ + unsigned long reg = data; + uint alt_status_base; + int i; + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) + hw->io_ports[i] = reg++; + + if (data == lopec_ide_regbase[0]) { + alt_status_base = lopec_ide_ctl_regbase[0] + 2; + hw->irq = 14; + } else if (data == lopec_ide_regbase[1]) { + alt_status_base = lopec_ide_ctl_regbase[1] + 2; + hw->irq = 15; + } else { + alt_status_base = 0; + hw->irq = 0; + } + + if (ctl) + hw->io_ports[IDE_CONTROL_OFFSET] = ctl; + else + hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base; + + if (irq != NULL) + *irq = hw->irq; + +} +#endif /* BLK_DEV_IDE */ + +static void __init +lopec_init_IRQ(void) +{ + int i; + + /* + * Provide the open_pic code with the correct table of interrupts. + */ + OpenPIC_InitSenses = lopec_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof(lopec_openpic_initsenses); + + mpc10x_set_openpic(); + + /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + &i8259_irq); + + /* Map i8259 interrupts */ + for(i = 0; i < NUM_8259_INTERRUPTS; i++) + irq_desc[i].handler = &i8259_pic; + + /* + * The EPIC allows for a read in the range of 0xFEF00000 -> + * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. + */ + i8259_init(0xfef00000); +} + +static int __init +lopec_request_io(void) +{ + outb(0x00, 0x4d0); + outb(0xc0, 0x4d1); + + request_region(0x00, 0x20, "dma1"); + request_region(0x20, 0x20, "pic1"); + request_region(0x40, 0x20, "timer"); + request_region(0x80, 0x10, "dma page reg"); + request_region(0xa0, 0x20, "pic2"); + request_region(0xc0, 0x20, "dma2"); + + return 0; +} + +device_initcall(lopec_request_io); + +static void __init +lopec_map_io(void) +{ + io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); + io_block_mapping(0xb0000000, 0xb0000000, 0x10000000, _PAGE_IO); +} + +/* + * Set BAT 3 to map 0xf8000000 to end of physical memory space 1-to-1. + */ +static __inline__ void +lopec_set_bat(void) +{ + mb(); + mtspr(DBAT1U, 0xf8000ffe); + mtspr(DBAT1L, 0xf800002a); + mb(); +} + +TODC_ALLOC(); + +static void __init +lopec_setup_arch(void) +{ + + TODC_INIT(TODC_TYPE_MK48T37, 0, 0, + ioremap(0xffe80000, 0x8000), 8); + + loops_per_jiffy = 100000000/HZ; + + lopec_find_bridges(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#elif defined(CONFIG_ROOT_NFS) + ROOT_DEV = Root_NFS; +#elif defined(CONFIG_BLK_DEV_IDEDISK) + ROOT_DEV = Root_HDA1; +#else + ROOT_DEV = Root_SDA1; +#endif + +#ifdef CONFIG_PPCBUG_NVRAM + /* Read in NVRAM data */ + init_prep_nvram(); + + /* if no bootargs, look in NVRAM */ + if ( cmd_line[0] == '\0' ) { + char *bootargs; + bootargs = prep_nvram_get_var("bootargs"); + if (bootargs != NULL) { + strcpy(cmd_line, bootargs); + /* again.. */ + strcpy(saved_command_line, cmd_line); + } + } +#endif +} + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + lopec_set_bat(); + + isa_io_base = MPC10X_MAPB_ISA_IO_BASE; + isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; + pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; + ISA_DMA_THRESHOLD = 0x00ffffff; + DMA_MODE_READ = 0x44; + DMA_MODE_WRITE = 0x48; + + ppc_md.setup_arch = lopec_setup_arch; + ppc_md.show_cpuinfo = lopec_show_cpuinfo; + ppc_md.irq_canonicalize = lopec_irq_canonicalize; + ppc_md.init_IRQ = lopec_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + + ppc_md.restart = lopec_restart; + ppc_md.power_off = lopec_power_off; + ppc_md.halt = lopec_halt; + + ppc_md.setup_io_mappings = lopec_map_io; + + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + ppc_md.calibrate_decr = todc_calibrate_decr; + + ppc_md.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; + +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) + ppc_ide_md.default_irq = lopec_ide_default_irq; + ppc_ide_md.default_io_base = lopec_ide_default_io_base; + ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports; +#endif +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif +} diff -Nru a/arch/ppc/platforms/lopec.h b/arch/ppc/platforms/lopec.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/lopec.h 2004-09-06 16:37:54 -07:00 @@ -0,0 +1,39 @@ +/* + * include/asm-ppc/lopec_serial.h + * + * Definitions for Motorola LoPEC board. + * + * Author: Dan Cox + * danc@mvista.com (or, alternately, source@mvista.com) + * + * 2001 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#ifndef __H_LOPEC_SERIAL +#define __H_LOPEC_SERIAL + +#define RS_TABLE_SIZE 3 + +#define BASE_BAUD (1843200 / 16) + +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) +#else +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) +#endif + +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0xffe10000, 29, STD_COM_FLAGS, \ + iomem_base: (u8 *) 0xffe10000, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, 0xffe11000, 20, STD_COM_FLAGS, \ + iomem_base: (u8 *) 0xffe11000, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, 0xffe12000, 21, STD_COM_FLAGS, \ + iomem_base: (u8 *) 0xffe12000, \ + io_type: SERIAL_IO_MEM } + +#endif diff -Nru a/arch/ppc/platforms/lopec_pci.c b/arch/ppc/platforms/lopec_pci.c --- a/arch/ppc/platforms/lopec_pci.c 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,99 +0,0 @@ -/* - * arch/ppc/platforms/lopec_pci.c - * - * PCI setup routines for the Motorola LoPEC. - * - * Author: Dan Cox - * danc@mvista.com (or, alternately, source@mvista.com) - * - * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include - -#include -#include -#include - -static inline int __init -lopec_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) -{ - int irq; - static char pci_irq_table[][4] = { - {16, 0, 0, 0}, /* ID 11 - Winbond */ - {22, 0, 0, 0}, /* ID 12 - SCSI */ - {0, 0, 0, 0}, /* ID 13 - nothing */ - {17, 0, 0, 0}, /* ID 14 - 82559 Ethernet */ - {27, 0, 0, 0}, /* ID 15 - USB */ - {23, 0, 0, 0}, /* ID 16 - PMC slot 1 */ - {24, 0, 0, 0}, /* ID 17 - PMC slot 2 */ - {25, 0, 0, 0}, /* ID 18 - PCI slot */ - {0, 0, 0, 0}, /* ID 19 - nothing */ - {0, 0, 0, 0}, /* ID 20 - nothing */ - {0, 0, 0, 0}, /* ID 21 - nothing */ - {0, 0, 0, 0}, /* ID 22 - nothing */ - {0, 0, 0, 0}, /* ID 23 - nothing */ - {0, 0, 0, 0}, /* ID 24 - PMC slot 1b */ - {0, 0, 0, 0}, /* ID 25 - nothing */ - {0, 0, 0, 0} /* ID 26 - PMC Slot 2b */ - }; - const long min_idsel = 11, max_idsel = 26, irqs_per_slot = 4; - - irq = PCI_IRQ_TABLE_LOOKUP; - if (!irq) - return 0; - - return irq; -} - -void __init -lopec_setup_winbond_83553(struct pci_controller *hose) -{ - int devfn; - - devfn = PCI_DEVFN(11,0); - - /* IDE interrupt routing (primary 14, secondary 15) */ - early_write_config_byte(hose, 0, devfn, 0x43, 0xef); - /* PCI interrupt routing */ - early_write_config_word(hose, 0, devfn, 0x44, 0x0000); - - /* ISA-PCI address decoder */ - early_write_config_byte(hose, 0, devfn, 0x48, 0xf0); - - /* RTC, kb, not used in PPC */ - early_write_config_byte(hose, 0, devfn, 0x4d, 0x00); - early_write_config_byte(hose, 0, devfn, 0x4e, 0x04); - devfn = PCI_DEVFN(11, 1); - early_write_config_byte(hose, 0, devfn, 0x09, 0x8f); - early_write_config_dword(hose, 0, devfn, 0x40, 0x00ff0011); -} - -void __init -lopec_find_bridges(void) -{ - struct pci_controller *hose; - - hose = pcibios_alloc_controller(); - if (!hose) - return; - - hose->first_busno = 0; - hose->last_busno = 0xff; - - if (mpc10x_bridge_init(hose, - MPC10X_MEM_MAP_B, - MPC10X_MEM_MAP_B, - MPC10X_MAPB_EUMB_BASE) == 0) { - - hose->mem_resources[0].end = 0xffffffff; - lopec_setup_winbond_83553(hose); - hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); - ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = lopec_map_irq; - } -} diff -Nru a/arch/ppc/platforms/lopec_serial.h b/arch/ppc/platforms/lopec_serial.h --- a/arch/ppc/platforms/lopec_serial.h 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,39 +0,0 @@ -/* - * include/asm-ppc/lopec_serial.h - * - * Definitions for Motorola LoPEC board. - * - * Author: Dan Cox - * danc@mvista.com (or, alternately, source@mvista.com) - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __H_LOPEC_SERIAL -#define __H_LOPEC_SERIAL - -#define RS_TABLE_SIZE 3 - -#define BASE_BAUD (1843200 / 16) - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#endif - -#define SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, 0xffe10000, 29, STD_COM_FLAGS, \ - iomem_base: (u8 *) 0xffe10000, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, 0xffe11000, 20, STD_COM_FLAGS, \ - iomem_base: (u8 *) 0xffe11000, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, 0xffe12000, 21, STD_COM_FLAGS, \ - iomem_base: (u8 *) 0xffe12000, \ - io_type: SERIAL_IO_MEM } - -#endif diff -Nru a/arch/ppc/platforms/lopec_setup.c b/arch/ppc/platforms/lopec_setup.c --- a/arch/ppc/platforms/lopec_setup.c 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,378 +0,0 @@ -/* - * arch/ppc/platforms/lopec_setup.c - * - * Setup routines for the Motorola LoPEC. - * - * Author: Dan Cox - * danc@mvista.com - * - * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -extern void lopec_find_bridges(void); - -/* - * Define all of the IRQ senses and polarities. Taken from the - * LoPEC Programmer's Reference Guide. - */ -static u_char lopec_openpic_initsenses[16] __initdata = { - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 0 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 1 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 2 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 3 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 4 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 5 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 6 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 7 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 8 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 9 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 10 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 11 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 12 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 13 */ - (IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* IRQ 14 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE) /* IRQ 15 */ -}; - -static int -lopec_show_cpuinfo(struct seq_file *m) -{ - seq_printf(m, "machine\t\t: Motorola LoPEC\n"); - return 0; -} - -static u32 -lopec_irq_canonicalize(u32 irq) -{ - if (irq == 2) - return 9; - else - return irq; -} - -static void -lopec_restart(char *cmd) -{ -#define LOPEC_SYSSTAT1 0xffe00000 - /* force a hard reset, if possible */ - unsigned char reg = *((unsigned char *) LOPEC_SYSSTAT1); - reg |= 0x80; - *((unsigned char *) LOPEC_SYSSTAT1) = reg; - - local_irq_disable(); - while(1); -#undef LOPEC_SYSSTAT1 -} - -static void -lopec_halt(void) -{ - local_irq_disable(); - while(1); -} - -static void -lopec_power_off(void) -{ - lopec_halt(); -} - -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) -int lopec_ide_ports_known = 0; -static unsigned long lopec_ide_regbase[MAX_HWIFS]; -static unsigned long lopec_ide_ctl_regbase[MAX_HWIFS]; -static unsigned long lopec_idedma_regbase; - -static void -lopec_ide_probe(void) -{ - struct pci_dev *dev = pci_find_device(PCI_VENDOR_ID_WINBOND, - PCI_DEVICE_ID_WINBOND_82C105, - NULL); - lopec_ide_ports_known = 1; - - if (dev) { - lopec_ide_regbase[0] = dev->resource[0].start; - lopec_ide_regbase[1] = dev->resource[2].start; - lopec_ide_ctl_regbase[0] = dev->resource[1].start; - lopec_ide_ctl_regbase[1] = dev->resource[3].start; - lopec_idedma_regbase = dev->resource[4].start; - } -} - -static int -lopec_ide_default_irq(unsigned long base) -{ - if (lopec_ide_ports_known == 0) - lopec_ide_probe(); - - if (base == lopec_ide_regbase[0]) - return 14; - else if (base == lopec_ide_regbase[1]) - return 15; - else - return 0; -} - -static unsigned long -lopec_ide_default_io_base(int index) -{ - if (lopec_ide_ports_known == 0) - lopec_ide_probe(); - return lopec_ide_regbase[index]; -} - -static void __init -lopec_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data, - unsigned long ctl, int *irq) -{ - unsigned long reg = data; - uint alt_status_base; - int i; - - for(i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) - hw->io_ports[i] = reg++; - - if (data == lopec_ide_regbase[0]) { - alt_status_base = lopec_ide_ctl_regbase[0] + 2; - hw->irq = 14; - } - else if (data == lopec_ide_regbase[1]) { - alt_status_base = lopec_ide_ctl_regbase[1] + 2; - hw->irq = 15; - } - else { - alt_status_base = 0; - hw->irq = 0; - } - - if (ctl) - hw->io_ports[IDE_CONTROL_OFFSET] = ctl; - else - hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base; - - if (irq != NULL) - *irq = hw->irq; - -} -#endif /* BLK_DEV_IDE */ - -static void __init -lopec_init_IRQ(void) -{ - int i; - - /* - * Provide the open_pic code with the correct table of interrupts. - */ - OpenPIC_InitSenses = lopec_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof(lopec_openpic_initsenses); - - mpc10x_set_openpic(); - - /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ - openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", - &i8259_irq); - - /* Map i8259 interrupts */ - for(i = 0; i < NUM_8259_INTERRUPTS; i++) - irq_desc[i].handler = &i8259_pic; - - /* - * The EPIC allows for a read in the range of 0xFEF00000 -> - * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. - */ - i8259_init(0xfef00000); -} - -static int __init -lopec_request_io(void) -{ - outb(0x00, 0x4d0); - outb(0xc0, 0x4d1); - - request_region(0x00, 0x20, "dma1"); - request_region(0x20, 0x20, "pic1"); - request_region(0x40, 0x20, "timer"); - request_region(0x80, 0x10, "dma page reg"); - request_region(0xa0, 0x20, "pic2"); - request_region(0xc0, 0x20, "dma2"); - - return 0; -} - -device_initcall(lopec_request_io); - -static void __init -lopec_map_io(void) -{ - io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); - io_block_mapping(0xb0000000, 0xb0000000, 0x10000000, _PAGE_IO); -} - -static void __init -lopec_set_bat(void) -{ - unsigned long batu, batl; - - __asm__ __volatile__( - "lis %0,0xf800\n \ - ori %1,%0,0x002a\n \ - ori %0,%0,0x0ffe\n \ - mtspr 0x21e,%0\n \ - mtspr 0x21f,%1\n \ - isync\n \ - sync " - : "=r" (batu), "=r" (batl)); -} - -#ifdef CONFIG_SERIAL_TEXT_DEBUG -#include -#include -#include -#include - -static struct serial_state rs_table[RS_TABLE_SIZE] = { - SERIAL_PORT_DFNS /* Defined in */ -}; - -volatile unsigned char *com_port; -volatile unsigned char *com_port_lsr; - -static void -serial_writechar(char c) -{ - while ((*com_port_lsr & UART_LSR_THRE) == 0) - ; - *com_port = c; -} - -void -lopec_progress(char *s, unsigned short hex) -{ - volatile char c; - - com_port = (volatile unsigned char *) rs_table[0].port; - com_port_lsr = com_port + UART_LSR; - - while ((c = *s++) != 0) - serial_writechar(c); - - /* Most messages don't have a newline in them */ - serial_writechar('\n'); - serial_writechar('\r'); -} -#endif /* CONFIG_SERIAL_TEXT_DEBUG */ - -TODC_ALLOC(); - -static void __init -lopec_setup_arch(void) -{ - - TODC_INIT(TODC_TYPE_MK48T37, 0, 0, - ioremap(0xffe80000, 0x8000), 8); - - loops_per_jiffy = 100000000/HZ; - - lopec_find_bridges(); - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#elif defined(CONFIG_ROOT_NFS) - ROOT_DEV = Root_NFS; -#elif defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) - ROOT_DEV = Root_HDA1; -#else - ROOT_DEV = Root_SDA1; -#endif - -#ifdef CONFIG_VT - conswitchp = &dummy_con; -#endif -#ifdef CONFIG_PPCBUG_NVRAM - /* Read in NVRAM data */ - init_prep_nvram(); - - /* if no bootargs, look in NVRAM */ - if ( cmd_line[0] == '\0' ) { - char *bootargs; - bootargs = prep_nvram_get_var("bootargs"); - if (bootargs != NULL) { - strcpy(cmd_line, bootargs); - /* again.. */ - strcpy(saved_command_line, cmd_line); - } - } -#endif -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - parse_bootinfo(find_bootinfo()); - lopec_set_bat(); - - isa_io_base = MPC10X_MAPB_ISA_IO_BASE; - isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; - pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; - ISA_DMA_THRESHOLD = 0x00ffffff; - DMA_MODE_READ = 0x44; - DMA_MODE_WRITE = 0x48; - - ppc_md.setup_arch = lopec_setup_arch; - ppc_md.show_cpuinfo = lopec_show_cpuinfo; - ppc_md.irq_canonicalize = lopec_irq_canonicalize; - ppc_md.init_IRQ = lopec_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - - ppc_md.restart = lopec_restart; - ppc_md.power_off = lopec_power_off; - ppc_md.halt = lopec_halt; - - ppc_md.setup_io_mappings = lopec_map_io; - - ppc_md.time_init = todc_time_init; - ppc_md.set_rtc_time = todc_set_rtc_time; - ppc_md.get_rtc_time = todc_get_rtc_time; - ppc_md.calibrate_decr = todc_calibrate_decr; - - ppc_md.nvram_read_val = todc_direct_read_val; - ppc_md.nvram_write_val = todc_direct_write_val; - -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) - ppc_ide_md.default_irq = lopec_ide_default_irq; - ppc_ide_md.default_io_base = lopec_ide_default_io_base; - ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports; -#endif -#ifdef CONFIG_SERIAL_TEXT_DEBUG - ppc_md.progress = lopec_progress; -#endif -} diff -Nru a/arch/ppc/platforms/mcpn765.c b/arch/ppc/platforms/mcpn765.c --- a/arch/ppc/platforms/mcpn765.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/platforms/mcpn765.c 2004-09-06 16:37:53 -07:00 @@ -58,8 +58,6 @@ #include #include "mcpn765.h" -#include "mcpn765_serial.h" - static u_char mcpn765_openpic_initsenses[] __initdata = { (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE),/* 16: i8259 cascade */ @@ -322,10 +320,6 @@ ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; #endif if ( ppc_md.progress ) diff -Nru a/arch/ppc/platforms/mcpn765.h b/arch/ppc/platforms/mcpn765.h --- a/arch/ppc/platforms/mcpn765.h 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/mcpn765.h 2004-09-06 16:37:51 -07:00 @@ -6,7 +6,7 @@ * Author: Mark A. Greer * mgreer@mvista.com * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under * the terms of the GNU General Public License version 2. This program * is licensed "as is" without any warranty of any kind, whether express * or implied. @@ -25,6 +25,7 @@ #ifndef __PPC_PLATFORMS_MCPN765_H #define __PPC_PLATFORMS_MCPN765_H +#include /* PCI Memory space mapping info */ #define MCPN765_PCI_MEM_SIZE 0x40000000U @@ -65,13 +66,56 @@ #define MCPN765_BOARD_EXT_FEATURE_REG 0xfef880f0U #define MCPN765_BOARD_LAST_RESET_REG 0xfef880f8U -/* UART base addresses are defined in */ +/* Defines for UART */ + +/* Define the UART base addresses */ +#define MCPN765_SERIAL_1 0xfef88000 +#define MCPN765_SERIAL_2 0xfef88200 +#define MCPN765_SERIAL_3 0xfef88400 +#define MCPN765_SERIAL_4 0xfef88600 + +#ifdef CONFIG_SERIAL_MANY_PORTS +#define RS_TABLE_SIZE 64 +#else +#define RS_TABLE_SIZE 4 +#endif + +/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ +#define BASE_BAUD ( 1843200 / 16 ) +#define UART_CLK 1843200 + +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) +#else +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) +#endif + +/* All UART IRQ's are wire-OR'd to IRQ 17 */ +#define STD_SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, MCPN765_SERIAL_1, 17, STD_COM_FLAGS, /* ttyS0 */\ + iomem_base: (u8 *)MCPN765_SERIAL_1, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, MCPN765_SERIAL_2, 17, STD_COM_FLAGS, /* ttyS1 */\ + iomem_base: (u8 *)MCPN765_SERIAL_2, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, MCPN765_SERIAL_3, 17, STD_COM_FLAGS, /* ttyS2 */\ + iomem_base: (u8 *)MCPN765_SERIAL_3, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, MCPN765_SERIAL_4, 17, STD_COM_FLAGS, /* ttyS3 */\ + iomem_base: (u8 *)MCPN765_SERIAL_4, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, + +#define SERIAL_PORT_DFNS \ + STD_SERIAL_PORT_DFNS /* Define the NVRAM/RTC address strobe & data registers */ #define MCPN765_PHYS_NVRAM_AS0 0xfef880c8U #define MCPN765_PHYS_NVRAM_AS1 0xfef880d0U #define MCPN765_PHYS_NVRAM_DATA 0xfef880d8U - extern void mcpn765_find_bridges(void); diff -Nru a/arch/ppc/platforms/mcpn765_serial.h b/arch/ppc/platforms/mcpn765_serial.h --- a/arch/ppc/platforms/mcpn765_serial.h 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,64 +0,0 @@ -/* - * include/asm-ppc/mcpn765_serial.h - * - * Definitions for Motorola MCG MCPN765 cPCI board support - * - * Author: Mark A. Greer - * mgreer@mvista.com - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __ASMPPC_MCPN765_SERIAL_H -#define __ASMPPC_MCPN765_SERIAL_H - -#include - -/* Define the UART base addresses */ -#define MCPN765_SERIAL_1 0xfef88000 -#define MCPN765_SERIAL_2 0xfef88200 -#define MCPN765_SERIAL_3 0xfef88400 -#define MCPN765_SERIAL_4 0xfef88600 - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE 4 -#endif - -/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ -#define BASE_BAUD ( 1843200 / 16 ) -#define UART_CLK 1843200 - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#endif - -/* All UART IRQ's are wire-OR'd to IRQ 17 */ -#define STD_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, MCPN765_SERIAL_1, 17, STD_COM_FLAGS, /* ttyS0 */\ - iomem_base: (u8 *)MCPN765_SERIAL_1, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, MCPN765_SERIAL_2, 17, STD_COM_FLAGS, /* ttyS1 */\ - iomem_base: (u8 *)MCPN765_SERIAL_2, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, MCPN765_SERIAL_3, 17, STD_COM_FLAGS, /* ttyS2 */\ - iomem_base: (u8 *)MCPN765_SERIAL_3, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, MCPN765_SERIAL_4, 17, STD_COM_FLAGS, /* ttyS3 */\ - iomem_base: (u8 *)MCPN765_SERIAL_4, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, - -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DFNS - -#endif /* __ASMPPC_MCPN765_SERIAL_H */ diff -Nru a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/mvme5100.c 2004-09-06 16:37:51 -07:00 @@ -0,0 +1,349 @@ +/* + * arch/ppc/platforms/mvme5100.c + * + * Board setup routines for the Motorola MVME5100. + * + * Author: Matt Porter + * + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static u_char mvme5100_openpic_initsenses[16] __initdata = { + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* i8259 cascade */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* TL16C550 UART 1,2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Enet1 front panel or P2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Hawk Watchdog 1,2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* DS1621 thermal alarm */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Universe II LINT0# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Universe II LINT1# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Universe II LINT2# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Universe II LINT3# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PMC1 INTA#, PMC2 INTB# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PMC1 INTB#, PMC2 INTC# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PMC1 INTC#, PMC2 INTD# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* PMC1 INTD#, PMC2 INTA# */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Enet 2 (front panel) */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Abort Switch */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* RTC Alarm */ +}; + +static inline int +mvme5100_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + int irq; + + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + { 0, 0, 0, 0 }, /* IDSEL 11 - Winbond */ + { 0, 0, 0, 0 }, /* IDSEL 12 - unused */ + { 21, 22, 23, 24 }, /* IDSEL 13 - Universe II */ + { 18, 0, 0, 0 }, /* IDSEL 14 - Enet 1 */ + { 0, 0, 0, 0 }, /* IDSEL 15 - unused */ + { 25, 26, 27, 28 }, /* IDSEL 16 - PMC Slot 1 */ + { 28, 25, 26, 27 }, /* IDSEL 17 - PMC Slot 2 */ + { 0, 0, 0, 0 }, /* IDSEL 18 - unused */ + { 29, 0, 0, 0 }, /* IDSEL 19 - Enet 2 */ + { 0, 0, 0, 0 }, /* IDSEL 20 - PMCSPAN */ + }; + + const long min_idsel = 11, max_idsel = 20, irqs_per_slot = 4; + irq = PCI_IRQ_TABLE_LOOKUP; + /* If lookup is zero, always return 0 */ + if (!irq) + return 0; + else +#ifdef CONFIG_MVME5100_IPMC761_PRESENT + /* If IPMC761 present, return table value */ + return irq; +#else + /* If IPMC761 not present, we don't have an i8259 so adjust */ + return (irq - NUM_8259_INTERRUPTS); +#endif +} + +static void +mvme5100_pcibios_fixup_resources(struct pci_dev *dev) +{ + int i; + + if ((dev->vendor == PCI_VENDOR_ID_MOTOROLA) && + (dev->device == PCI_DEVICE_ID_MOTOROLA_HAWK)) + for (i=0; iresource[i].start = 0; + dev->resource[i].end = 0; + } +} + +static void __init +mvme5100_setup_bridge(void) +{ + struct pci_controller* hose; + + hose = pcibios_alloc_controller(); + + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + hose->pci_mem_offset = MVME5100_PCI_MEM_OFFSET; + + pci_init_resource(&hose->io_resource, MVME5100_PCI_LOWER_IO, + MVME5100_PCI_UPPER_IO, IORESOURCE_IO, + "PCI host bridge"); + + pci_init_resource(&hose->mem_resources[0], MVME5100_PCI_LOWER_MEM, + MVME5100_PCI_UPPER_MEM, IORESOURCE_MEM, + "PCI host bridge"); + + hose->io_space.start = MVME5100_PCI_LOWER_IO; + hose->io_space.end = MVME5100_PCI_UPPER_IO; + hose->mem_space.start = MVME5100_PCI_LOWER_MEM; + hose->mem_space.end = MVME5100_PCI_UPPER_MEM; + hose->io_base_virt = (void *)MVME5100_ISA_IO_BASE; + + /* Use indirect method of Hawk */ + setup_indirect_pci(hose, MVME5100_PCI_CONFIG_ADDR, + MVME5100_PCI_CONFIG_DATA); + + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + + ppc_md.pcibios_fixup_resources = mvme5100_pcibios_fixup_resources; + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = mvme5100_map_irq; +} + +static void __init +mvme5100_setup_arch(void) +{ + if ( ppc_md.progress ) + ppc_md.progress("mvme5100_setup_arch: enter", 0); + + loops_per_jiffy = 50000000 / HZ; + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_SDA2; +#endif + + if ( ppc_md.progress ) + ppc_md.progress("mvme5100_setup_arch: find_bridges", 0); + + /* Setup PCI host bridge */ + mvme5100_setup_bridge(); + + /* Find and map our OpenPIC */ + hawk_mpic_init(MVME5100_PCI_MEM_OFFSET); + OpenPIC_InitSenses = mvme5100_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof(mvme5100_openpic_initsenses); + + printk("MVME5100 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); + + if ( ppc_md.progress ) + ppc_md.progress("mvme5100_setup_arch: exit", 0); + + return; +} + +static void __init +mvme5100_init2(void) +{ +#ifdef CONFIG_MVME5100_IPMC761_PRESENT + request_region(0x00,0x20,"dma1"); + request_region(0x20,0x20,"pic1"); + request_region(0x40,0x20,"timer"); + request_region(0x80,0x10,"dma page reg"); + request_region(0xa0,0x20,"pic2"); + request_region(0xc0,0x20,"dma2"); +#endif + return; +} + +/* + * Interrupt setup and service. + * Have MPIC on HAWK and cascaded 8259s on Winbond cascaded to MPIC. + */ +static void __init +mvme5100_init_IRQ(void) +{ +#ifdef CONFIG_MVME5100_IPMC761_PRESENT + int i; +#endif + + if ( ppc_md.progress ) + ppc_md.progress("init_irq: enter", 0); + + openpic_set_sources(0, 16, OpenPIC_Addr + 0x10000); +#ifdef CONFIG_MVME5100_IPMC761_PRESENT + openpic_init(NUM_8259_INTERRUPTS); + openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", + &i8259_irq); + + /* Map i8259 interrupts. */ + for (i = 0; i < NUM_8259_INTERRUPTS; i++) + irq_desc[i].handler = &i8259_pic; + + i8259_init(NULL); +#else + openpic_init(0); +#endif + + if ( ppc_md.progress ) + ppc_md.progress("init_irq: exit", 0); + + return; +} + +/* + * Set BAT 3 to map 0xf0000000 to end of physical memory space. + */ +static __inline__ void +mvme5100_set_bat(void) +{ + mb(); + mtspr(DBAT1U, 0xf0001ffe); + mtspr(DBAT1L, 0xf000002a); + mb(); +} + +static unsigned long __init +mvme5100_find_end_of_memory(void) +{ + return hawk_get_mem_size(MVME5100_HAWK_SMC_BASE); +} + +static void __init +mvme5100_map_io(void) +{ + io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); + ioremap_base = 0xfe000000; +} + +static void +mvme5100_reset_board(void) +{ + local_irq_disable(); + + /* Set exception prefix high - to the firmware */ + _nmask_and_or_msr(0, MSR_IP); + + out_8((u_char *)MVME5100_BOARD_MODRST_REG, 0x01); + + return; +} + +static void +mvme5100_restart(char *cmd) +{ + volatile ulong i = 10000000; + + mvme5100_reset_board(); + + while (i-- > 0); + panic("restart failed\n"); +} + +static void +mvme5100_halt(void) +{ + local_irq_disable(); + while (1); +} + +static void +mvme5100_power_off(void) +{ + mvme5100_halt(); +} + +static int +mvme5100_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "vendor\t\t: Motorola\n"); + seq_printf(m, "machine\t\t: MVME5100\n"); + + return 0; +} + +TODC_ALLOC(); + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + mvme5100_set_bat(); + + isa_io_base = MVME5100_ISA_IO_BASE; + isa_mem_base = MVME5100_ISA_MEM_BASE; + pci_dram_offset = MVME5100_PCI_DRAM_OFFSET; + + ppc_md.setup_arch = mvme5100_setup_arch; + ppc_md.show_cpuinfo = mvme5100_show_cpuinfo; + ppc_md.init_IRQ = mvme5100_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + ppc_md.init = mvme5100_init2; + + ppc_md.restart = mvme5100_restart; + ppc_md.power_off = mvme5100_power_off; + ppc_md.halt = mvme5100_halt; + + ppc_md.find_end_of_memory = mvme5100_find_end_of_memory; + ppc_md.setup_io_mappings = mvme5100_map_io; + + TODC_INIT(TODC_TYPE_MK48T37, MVME5100_NVRAM_AS0, MVME5100_NVRAM_AS1, + MVME5100_NVRAM_DATA, 8); + + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + ppc_md.calibrate_decr = todc_calibrate_decr; + + ppc_md.nvram_read_val = todc_m48txx_read_val; + ppc_md.nvram_write_val = todc_m48txx_write_val; +} diff -Nru a/arch/ppc/platforms/mvme5100.h b/arch/ppc/platforms/mvme5100.h --- a/arch/ppc/platforms/mvme5100.h 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/mvme5100.h 2004-09-06 16:37:54 -07:00 @@ -63,10 +63,29 @@ #define MVME5100_SERIAL_IRQ 1 #endif -#define MVME5100_WINBOND_DEVFN 0x58 -#define MVME5100_WINBOND_VIDDID 0x056510ad +#define RS_TABLE_SIZE 4 -extern void mvme5100_setup_bridge(void); +#define BASE_BAUD ( MVME5100_BASE_BAUD / 16 ) + +#define STD_COM_FLAGS ASYNC_BOOT_AUTOCONF + +/* All UART IRQ's are wire-OR'd to one MPIC IRQ */ +#define STD_SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, MVME5100_SERIAL_1, \ + MVME5100_SERIAL_IRQ, \ + STD_COM_FLAGS, /* ttyS0 */ \ + iomem_base: (unsigned char *)MVME5100_SERIAL_1, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, \ + { 0, BASE_BAUD, MVME5100_SERIAL_2, \ + MVME5100_SERIAL_IRQ, \ + STD_COM_FLAGS, /* ttyS1 */ \ + iomem_base: (unsigned char *)MVME5100_SERIAL_2, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM }, + +#define SERIAL_PORT_DFNS \ + STD_SERIAL_PORT_DFNS #endif /* __ASM_MVME5100_H__ */ #endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/mvme5100_pci.c b/arch/ppc/platforms/mvme5100_pci.c --- a/arch/ppc/platforms/mvme5100_pci.c 2004-09-06 16:37:50 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,121 +0,0 @@ -/* - * arch/ppc/platforms/mvme5100_pci.c - * - * PCI setup routines for the Motorola MVME5100. - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static inline int -mvme5100_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) -{ - int irq; - - static char pci_irq_table[][4] = - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - { - { 0, 0, 0, 0 }, /* IDSEL 11 - Winbond */ - { 0, 0, 0, 0 }, /* IDSEL 12 - unused */ - { 21, 22, 23, 24 }, /* IDSEL 13 - Universe II */ - { 18, 0, 0, 0 }, /* IDSEL 14 - Enet 1 */ - { 0, 0, 0, 0 }, /* IDSEL 15 - unused */ - { 25, 26, 27, 28 }, /* IDSEL 16 - PMC Slot 1 */ - { 28, 25, 26, 27 }, /* IDSEL 17 - PMC Slot 2 */ - { 0, 0, 0, 0 }, /* IDSEL 18 - unused */ - { 29, 0, 0, 0 }, /* IDSEL 19 - Enet 2 */ - { 0, 0, 0, 0 }, /* IDSEL 20 - PMCSPAN */ - }; - - const long min_idsel = 11, max_idsel = 20, irqs_per_slot = 4; - irq = PCI_IRQ_TABLE_LOOKUP; - /* If lookup is zero, always return 0 */ - if (!irq) - return 0; - else -#ifdef CONFIG_MVME5100_IPMC761_PRESENT - /* If IPMC761 present, return table value */ - return irq; -#else - /* If IPMC761 not present, we don't have an i8259 so adjust */ - return (irq - NUM_8259_INTERRUPTS); -#endif -} - -static void -mvme5100_pcibios_fixup_resources(struct pci_dev *dev) -{ - int i; - - if ((dev->vendor == PCI_VENDOR_ID_MOTOROLA) && - (dev->device == PCI_DEVICE_ID_MOTOROLA_HAWK)) - for (i=0; iresource[i].start = 0; - dev->resource[i].end = 0; - } -} - -void __init -mvme5100_setup_bridge(void) -{ - struct pci_controller* hose; - - hose = pcibios_alloc_controller(); - - if (!hose) - return; - - hose->first_busno = 0; - hose->last_busno = 0xff; - hose->pci_mem_offset = MVME5100_PCI_MEM_OFFSET; - - pci_init_resource(&hose->io_resource, - MVME5100_PCI_LOWER_IO, - MVME5100_PCI_UPPER_IO, - IORESOURCE_IO, - "PCI host bridge"); - - pci_init_resource(&hose->mem_resources[0], - MVME5100_PCI_LOWER_MEM, - MVME5100_PCI_UPPER_MEM, - IORESOURCE_MEM, - "PCI host bridge"); - - hose->io_space.start = MVME5100_PCI_LOWER_IO; - hose->io_space.end = MVME5100_PCI_UPPER_IO; - hose->mem_space.start = MVME5100_PCI_LOWER_MEM; - hose->mem_space.end = MVME5100_PCI_UPPER_MEM; - hose->io_base_virt = (void *)MVME5100_ISA_IO_BASE; - - /* Use indirect method of Hawk */ - setup_indirect_pci(hose, - MVME5100_PCI_CONFIG_ADDR, - MVME5100_PCI_CONFIG_DATA); - - hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); - - ppc_md.pcibios_fixup_resources = mvme5100_pcibios_fixup_resources; - ppc_md.pci_swizzle = common_swizzle; - ppc_md.pci_map_irq = mvme5100_map_irq; -} diff -Nru a/arch/ppc/platforms/mvme5100_serial.h b/arch/ppc/platforms/mvme5100_serial.h --- a/arch/ppc/platforms/mvme5100_serial.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,54 +0,0 @@ -/* - * include/asm-ppc/mvme5100_serial.h - * - * Definitions for Motorola MVME5100 support - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifdef __KERNEL__ -#ifndef __ASM_MVME5100_SERIAL_H__ -#define __ASM_MVME5100_SERIAL_H__ - -#include -#include - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE 4 -#endif - -#define BASE_BAUD ( MVME5100_BASE_BAUD / 16 ) - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#endif - -/* All UART IRQ's are wire-OR'd to one MPIC IRQ */ -#define STD_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, MVME5100_SERIAL_1, \ - MVME5100_SERIAL_IRQ, \ - STD_COM_FLAGS, /* ttyS0 */ \ - iomem_base: (unsigned char *)MVME5100_SERIAL_1, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, \ - { 0, BASE_BAUD, MVME5100_SERIAL_2, \ - MVME5100_SERIAL_IRQ, \ - STD_COM_FLAGS, /* ttyS1 */ \ - iomem_base: (unsigned char *)MVME5100_SERIAL_2, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM }, - -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DFNS - -#endif /* __ASM_MVME5100_SERIAL_H__ */ -#endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/mvme5100_setup.c b/arch/ppc/platforms/mvme5100_setup.c --- a/arch/ppc/platforms/mvme5100_setup.c 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,284 +0,0 @@ -/* - * arch/ppc/platforms/mvme5100_setup.c - * - * Board setup routines for the Motorola MVME5100. - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern char cmd_line[]; - -static u_char mvme5100_openpic_initsenses[] __initdata = { - 0, /* 16: i8259 cascade (active high) */ - 1, /* 17: TL16C550 UART 1,2 */ - 1, /* 18: Enet 1 (front panel or P2) */ - 1, /* 19: Hawk Watchdog 1,2 */ - 1, /* 20: DS1621 thermal alarm */ - 1, /* 21: Universe II LINT0# */ - 1, /* 22: Universe II LINT1# */ - 1, /* 23: Universe II LINT2# */ - 1, /* 24: Universe II LINT3# */ - 1, /* 25: PMC1 INTA#, PMC2 INTB# */ - 1, /* 26: PMC1 INTB#, PMC2 INTC# */ - 1, /* 27: PMC1 INTC#, PMC2 INTD# */ - 1, /* 28: PMC1 INTD#, PMC2 INTA# */ - 1, /* 29: Enet 2 (front panel) */ - 1, /* 30: Abort Switch */ - 1, /* 31: RTC Alarm */ -}; - -static void __init -mvme5100_setup_arch(void) -{ - if ( ppc_md.progress ) - ppc_md.progress("mvme5100_setup_arch: enter", 0); - - loops_per_jiffy = 50000000 / HZ; - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_SDA2; -#endif - -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - - if ( ppc_md.progress ) - ppc_md.progress("mvme5100_setup_arch: find_bridges", 0); - - /* Setup PCI host bridge */ - mvme5100_setup_bridge(); - - /* Find and map our OpenPIC */ - pplus_mpic_init(MVME5100_PCI_MEM_OFFSET); - OpenPIC_InitSenses = mvme5100_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof(mvme5100_openpic_initsenses); - - printk("MVME5100 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n"); - - if ( ppc_md.progress ) - ppc_md.progress("mvme5100_setup_arch: exit", 0); - - return; -} - -static void __init -mvme5100_init2(void) -{ -#ifdef CONFIG_MVME5100_IPMC761_PRESENT - request_region(0x00,0x20,"dma1"); - request_region(0x20,0x20,"pic1"); - request_region(0x40,0x20,"timer"); - request_region(0x80,0x10,"dma page reg"); - request_region(0xa0,0x20,"pic2"); - request_region(0xc0,0x20,"dma2"); -#endif - return; -} - -/* - * Interrupt setup and service. - * Have MPIC on HAWK and cascaded 8259s on Winbond cascaded to MPIC. - */ -static void __init -mvme5100_init_IRQ(void) -{ -#ifdef CONFIG_MVME5100_IPMC761_PRESENT - int i; -#endif - - if ( ppc_md.progress ) - ppc_md.progress("init_irq: enter", 0); - -#ifdef CONFIG_MVME5100_IPMC761_PRESENT - openpic_init(1, NUM_8259_INTERRUPTS, NULL, -1); - openpic_hookup_cascade(NUM_8259_INTERRUPTS,"82c59 cascade",&i8259_irq); - - for(i=0; i < NUM_8259_INTERRUPTS; i++) - irq_desc[i].handler = &i8259_pic; - - i8259_init(NULL); -#else - openpic_init(1, 0, NULL, -1); -#endif - - if ( ppc_md.progress ) - ppc_md.progress("init_irq: exit", 0); - - return; -} - -/* - * Set BAT 3 to map 0xf0000000 to end of physical memory space. - */ -static __inline__ void -mvme5100_set_bat(void) -{ - unsigned long bat3u, bat3l; - static int mapping_set = 0; - - if (!mapping_set) { - - __asm__ __volatile__( - " lis %0,0xf000\n \ - ori %1,%0,0x002a\n \ - ori %0,%0,0x1ffe\n \ - mtspr 0x21e,%0\n \ - mtspr 0x21f,%1\n \ - isync\n \ - sync " - : "=r" (bat3u), "=r" (bat3l)); - - mapping_set = 1; - } - - return; -} - -static unsigned long __init -mvme5100_find_end_of_memory(void) -{ - mvme5100_set_bat(); - return pplus_get_mem_size(MVME5100_HAWK_SMC_BASE); -} - -static void __init -mvme5100_map_io(void) -{ - io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); - ioremap_base = 0xfe000000; -} - -static void -mvme5100_reset_board(void) -{ - local_irq_disable(); - - /* Set exception prefix high - to the firmware */ - _nmask_and_or_msr(0, MSR_IP); - - out_8((u_char *)MVME5100_BOARD_MODRST_REG, 0x01); - - return; -} - -static void -mvme5100_restart(char *cmd) -{ - volatile ulong i = 10000000; - - mvme5100_reset_board(); - - while (i-- > 0); - panic("restart failed\n"); -} - -static void -mvme5100_halt(void) -{ - local_irq_disable(); - while (1); -} - -static void -mvme5100_power_off(void) -{ - mvme5100_halt(); -} - -static int -mvme5100_show_cpuinfo(struct seq_file *m) -{ - seq_printf(m, "vendor\t\t: Motorola\n"); - seq_printf(m, "machine\t\t: MVME5100\n"); - - return 0; -} - -TODC_ALLOC(); - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - parse_bootinfo(find_bootinfo()); - - isa_io_base = MVME5100_ISA_IO_BASE; - isa_mem_base = MVME5100_ISA_MEM_BASE; - pci_dram_offset = MVME5100_PCI_DRAM_OFFSET; - - ppc_md.setup_arch = mvme5100_setup_arch; - ppc_md.show_cpuinfo = mvme5100_show_cpuinfo; - ppc_md.init_IRQ = mvme5100_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - ppc_md.init = mvme5100_init2; - - ppc_md.restart = mvme5100_restart; - ppc_md.power_off = mvme5100_power_off; - ppc_md.halt = mvme5100_halt; - - ppc_md.find_end_of_memory = mvme5100_find_end_of_memory; - ppc_md.setup_io_mappings = mvme5100_map_io; - - TODC_INIT(TODC_TYPE_MK48T37, - MVME5100_NVRAM_AS0, - MVME5100_NVRAM_AS1, - MVME5100_NVRAM_DATA, - 8); - - ppc_md.time_init = todc_time_init; - ppc_md.set_rtc_time = todc_set_rtc_time; - ppc_md.get_rtc_time = todc_get_rtc_time; - ppc_md.calibrate_decr = todc_calibrate_decr; - - ppc_md.nvram_read_val = todc_m48txx_read_val; - ppc_md.nvram_write_val = todc_m48txx_write_val; - - ppc_md.progress = NULL; -} diff -Nru a/arch/ppc/platforms/pcore.c b/arch/ppc/platforms/pcore.c --- a/arch/ppc/platforms/pcore.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/platforms/pcore.c 2004-09-06 16:37:50 -07:00 @@ -228,10 +228,6 @@ ROOT_DEV = Root_SDA2; #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - printk(KERN_INFO "Force PowerCore "); if (board_type == PCORE_TYPE_6750) printk("6750\n"); diff -Nru a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c --- a/arch/ppc/platforms/pmac_setup.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/platforms/pmac_setup.c 2004-09-06 16:37:53 -07:00 @@ -318,9 +318,6 @@ #ifdef CONFIG_NVRAM pmac_nvram_init(); #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; diff -Nru a/arch/ppc/platforms/powerpmc250.h b/arch/ppc/platforms/powerpmc250.h --- a/arch/ppc/platforms/powerpmc250.h 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/platforms/powerpmc250.h 2004-09-06 16:37:53 -07:00 @@ -7,7 +7,7 @@ * * Borrowed heavily from prpmc750.h by Matt Porter * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under * the terms of the GNU General Public License version 2. This program * is licensed "as is" without any warranty of any kind, whether express * or implied. @@ -16,8 +16,6 @@ #ifndef __ASMPPC_POWERPMC250_H #define __ASMPPC_POWERPMC250_H -#include - #define POWERPMC250_PCI_CONFIG_ADDR 0x80000cf8 #define POWERPMC250_PCI_CONFIG_DATA 0x80000cfc @@ -36,5 +34,19 @@ #define POWERPMC250_BASE_BAUD 12288000 #define POWERPMC250_SERIAL 0xff000000 #define POWERPMC250_SERIAL_IRQ 20 + +/* UART Defines. */ +#define RS_TABLE_SIZE 1 + +#define BASE_BAUD (POWERPMC250_BASE_BAUD / 16) + +#define STD_COM_FLAGS ASYNC_BOOT_AUTOCONF + +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, POWERPMC250_SERIAL, POWERPMC250_SERIAL_IRQ, \ + STD_COM_FLAGS, /* ttyS0 */ \ + iomem_base: (u8 *)POWERPMC250_SERIAL, \ + iomem_reg_shift: 0, \ + io_type: SERIAL_IO_MEM } #endif /* __ASMPPC_POWERPMC250_H */ diff -Nru a/arch/ppc/platforms/powerpmc250_serial.h b/arch/ppc/platforms/powerpmc250_serial.h --- a/arch/ppc/platforms/powerpmc250_serial.h 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,40 +0,0 @@ -/* - * include/asm-ppc/platforms/powerpmc250_serial.h - * - * Motorola PrPMC750 serial support - * - * Author: Troy Benjegerdes - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifdef __KERNEL__ -#ifndef __ASMPPC_POWERPMC250_SERIAL_H -#define __ASMPPC_POWERPMC250_SERIAL_H - -#include -#include - -#define RS_TABLE_SIZE 1 - -#define BASE_BAUD (POWERPMC250_BASE_BAUD / 16) - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF) -#endif - -#define SERIAL_PORT_DFNS \ -{ 0, BASE_BAUD, POWERPMC250_SERIAL, POWERPMC250_SERIAL_IRQ, STD_COM_FLAGS, /* ttyS0 */\ - iomem_base: (u8 *)POWERPMC250_SERIAL, \ - iomem_reg_shift: 0, \ - io_type: SERIAL_IO_MEM } - -#endif -#endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c --- a/arch/ppc/platforms/pplus.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/pplus.c 2004-09-06 16:37:55 -07:00 @@ -583,8 +583,6 @@ vgacon_remap_base = (unsigned long)ioremap(PPLUS_ISA_MEM_BASE, 0x08000000); conswitchp = &vga_con; -#elif defined(CONFIG_DUMMY_CONSOLE) - conswitchp = &dummy_con; #endif #ifdef CONFIG_PPCBUG_NVRAM /* Read in NVRAM data */ diff -Nru a/arch/ppc/platforms/pq2ads.c b/arch/ppc/platforms/pq2ads.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/pq2ads.c 2004-09-06 16:37:55 -07:00 @@ -0,0 +1,26 @@ +/* + * arch/ppc/platforms/pq2ads.c + * + * PQ2ADS platform support + * + * Author: Kumar Gala + * Derived from: est8260_setup.c by Allen Curtis + * + * Copyright 2004 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include + +#include + +void __init +m82xx_board_init(void) +{ + /* Enable the 2nd UART port */ + *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2; +} diff -Nru a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h --- a/arch/ppc/platforms/pq2ads.h 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/platforms/pq2ads.h 2004-09-06 16:37:53 -07:00 @@ -23,6 +23,10 @@ #define BOOTROM_RESTART_ADDR ((uint)0xff000104) +/* For our show_cpuinfo hooks. */ +#define CPUINFO_VENDOR "Motorola" +#define CPUINFO_MACHINE "PQ2 ADS PowerPC" + /* The ADS8260 has 16, 32-bit wide control/status registers, accessed * only on word boundaries. * Not all are used (yet), or are interesting to us (yet). diff -Nru a/arch/ppc/platforms/pq2ads_setup.c b/arch/ppc/platforms/pq2ads_setup.c --- a/arch/ppc/platforms/pq2ads_setup.c 2004-09-06 16:37:55 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,66 +0,0 @@ -/* - * arch/ppc/platforms/pq2ads_setup.c - * - * PQ2ADS platform support - * - * Author: Kumar Gala - * Derived from: est8260_setup.c by Allen Curtis - * - * Copyright 2004 Freescale Semiconductor, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include - -#include -#include - -static void (*callback_setup_arch)(void); - -extern unsigned char __res[sizeof(bd_t)]; - -extern void m8260_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7); - -static int -pq2ads_show_cpuinfo(struct seq_file *m) -{ - bd_t *binfo = (bd_t *)__res; - - seq_printf(m, "vendor\t\t: Motorola\n" - "machine\t\t: PQ2 ADS PowerPC\n" - "\n" - "mem size\t\t: 0x%08lx\n" - "console baud\t\t: %ld\n" - "\n", - binfo->bi_memsize, - binfo->bi_baudrate); - return 0; -} - -static void __init -pq2ads_setup_arch(void) -{ - printk("PQ2 ADS Port\n"); - callback_setup_arch(); - *(volatile uint *)(BCSR_ADDR + 4) &= ~BCSR1_RS232_EN2; -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - /* Generic 8260 platform initialization */ - m8260_init(r3, r4, r5, r6, r7); - - /* Anything special for this platform */ - ppc_md.show_cpuinfo = pq2ads_show_cpuinfo; - - callback_setup_arch = ppc_md.setup_arch; - ppc_md.setup_arch = pq2ads_setup_arch; -} diff -Nru a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c --- a/arch/ppc/platforms/prep_pci.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/prep_pci.c 2004-09-06 16:37:55 -07:00 @@ -836,52 +836,59 @@ void __init ibm_prep_init(void) { -#ifdef CONFIG_PREP_RESIDUAL - u32 addr, real_addr, len; - PPC_DEVICE *mpic; - PnP_TAG_PACKET *pkt; - - /* Use the PReP residual data to determine if an OpenPIC is - * present. If so, get the large vendor packet which will - * tell us the base address and length in memory. - * If we are successful, ioremap the memory area and set - * OpenPIC_Addr (this indicates that the OpenPIC was found). - */ - mpic = residual_find_device(-1, NULL, SystemPeripheral, - ProgrammableInterruptController, MPIC, 0); - if (!mpic) - return; + if (have_residual_data) { + u32 addr, real_addr, len, offset; + PPC_DEVICE *mpic; + PnP_TAG_PACKET *pkt; + + /* Use the PReP residual data to determine if an OpenPIC is + * present. If so, get the large vendor packet which will + * tell us the base address and length in memory. + * If we are successful, ioremap the memory area and set + * OpenPIC_Addr (this indicates that the OpenPIC was found). + */ + mpic = residual_find_device(-1, NULL, SystemPeripheral, + ProgrammableInterruptController, MPIC, 0); + if (!mpic) + return; - pkt = PnP_find_large_vendor_packet(res->DevicePnPHeap + - mpic->AllocatedOffset, 9, 0); + pkt = PnP_find_large_vendor_packet(res->DevicePnPHeap + + mpic->AllocatedOffset, 9, 0); - if (!pkt) - return; + if (!pkt) + return; #define p pkt->L4_Pack.L4_Data.L4_PPCPack - if (!((p.PPCData[0] == 2) && (p.PPCData[1] == 32))) - return; /* not a 32-bit memory address */ - - real_addr = ld_le32((unsigned int *) (p.PPCData + 4)); - if (real_addr == 0xffffffff) - return; - - /* Adjust address to be as seen by CPU */ - addr = real_addr + PREP_ISA_MEM_BASE; + if (p.PPCData[1] == 32) { + switch (p.PPCData[0]) { + case 1: offset = PREP_ISA_IO_BASE; break; + case 2: offset = PREP_ISA_MEM_BASE; break; + default: return; /* Not I/O or memory?? */ + } + } + else + return; /* Not a 32-bit address */ - len = ld_le32((unsigned int *) (p.PPCData + 12)); - if (!len) - return; + real_addr = ld_le32((unsigned int *) (p.PPCData + 4)); + if (real_addr == 0xffffffff) + return; + + /* Adjust address to be as seen by CPU */ + addr = real_addr + offset; + + len = ld_le32((unsigned int *) (p.PPCData + 12)); + if (!len) + return; #undef p - OpenPIC_Addr = ioremap(addr, len); - ppc_md.get_irq = openpic_get_irq; + OpenPIC_Addr = ioremap(addr, len); + ppc_md.get_irq = openpic_get_irq; - OpenPIC_InitSenses = prep_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof(prep_openpic_initsenses); + OpenPIC_InitSenses = prep_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof(prep_openpic_initsenses); - printk(KERN_INFO "MPIC at 0x%08x (0x%08x), length 0x%08x " - "mapped to 0x%p\n", addr, real_addr, len, OpenPIC_Addr); -#endif + printk(KERN_INFO "MPIC at 0x%08x (0x%08x), length 0x%08x " + "mapped to 0x%p\n", addr, real_addr, len, OpenPIC_Addr); + } } static void __init @@ -901,6 +908,17 @@ } void __init +prep_residual_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi) +{ + if (have_residual_data) { + Motherboard_map_name = res->VitalProductData.PrintableModel; + Motherboard_map = NULL; + Motherboard_routes = NULL; + residual_irq_mask(irq_edge_mask_lo, irq_edge_mask_hi); + } +} + +void __init prep_sandalfoot_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi) { Motherboard_map_name = "IBM 6015/7020 (Sandalfoot/Sandalbow)"; @@ -1011,21 +1029,31 @@ } } else if ( _prep_type == _PREP_IBM ) { unsigned char irq_edge_mask_lo, irq_edge_mask_hi; + unsigned short irq_edge_mask; + int i; setup_ibm_pci(&irq_edge_mask_lo, &irq_edge_mask_hi); outb(inb(0x04d0)|irq_edge_mask_lo, 0x4d0); /* primary 8259 */ outb(inb(0x04d1)|irq_edge_mask_hi, 0x4d1); /* cascaded 8259 */ + + irq_edge_mask = (irq_edge_mask_hi << 8) | irq_edge_mask_lo; + for (i = 0; i < 16; ++i, irq_edge_mask >>= 1) + if (irq_edge_mask & 1) + irq_desc[i].status |= IRQ_LEVEL; } else { printk("No known machine pci routing!\n"); return; } /* Set up mapping from slots */ - for (i = 1; i <= 4; i++) - ibc_pirq[i-1] = Motherboard_routes[i]; - /* Enable PCI interrupts */ - *ibc_pcicon |= 0x20; + if (Motherboard_routes) { + for (i = 1; i <= 4; i++) + ibc_pirq[i-1] = Motherboard_routes[i]; + + /* Enable PCI interrupts */ + *ibc_pcicon |= 0x20; + } } void __init @@ -1171,38 +1199,52 @@ prep_pcibios_fixup(void) { struct pci_dev *dev = NULL; + int irq; + int have_openpic = (OpenPIC_Addr != NULL); prep_route_pci_interrupts(); printk("Setting PCI interrupts for a \"%s\"\n", Motherboard_map_name); - if (OpenPIC_Addr) { - /* PCI interrupts are controlled by the OpenPIC */ - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { - if (dev->bus->number == 0) { - dev->irq = openpic_to_irq(Motherboard_map[PCI_SLOT(dev->devfn)]); - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); - } else { - if (Motherboard_non0 != NULL) - Motherboard_non0(dev); - } - } - - /* Setup the Winbond or Via PIB */ - prep_pib_init(); - - return; - } - dev = NULL; + /* Iterate through all the PCI devices, setting the IRQ */ while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { /* - * Use our old hard-coded kludge to figure out what - * irq this device uses. This is necessary on things - * without residual data. -- Cort + * If we have residual data, then this is easy: query the + * residual data for the IRQ line allocated to the device. + * This works the same whether we have an OpenPic or not. + */ + if (have_residual_data) { + irq = residual_pcidev_irq(dev); + dev->irq = have_openpic ? openpic_to_irq(irq) : irq; + } + /* + * If we don't have residual data, then we need to use + * tables to determine the IRQ. The table organisation + * is different depending on whether there is an OpenPIC + * or not. The tables are only used for bus 0, so check + * this first. */ - unsigned char d = PCI_SLOT(dev->devfn); - dev->irq = Motherboard_routes[Motherboard_map[d]]; + else if (dev->bus->number == 0) { + irq = Motherboard_map[PCI_SLOT(dev->devfn)]; + dev->irq = have_openpic ? openpic_to_irq(irq) + : Motherboard_routes[irq]; + } + /* + * Finally, if we don't have residual data and the bus is + * non-zero, use the callback (if provided) + */ + else { + if (Motherboard_non0 != NULL) + Motherboard_non0(dev); + + continue; + } + + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); } + + /* Setup the Winbond or Via PIB */ + prep_pib_init(); } static void __init @@ -1262,14 +1304,15 @@ PREP_ISA_IO_BASE + 0xcfc); printk("PReP architecture\n"); -#ifdef CONFIG_PREP_RESIDUAL - { + + if (have_residual_data) { PPC_DEVICE *hostbridge; hostbridge = residual_find_device(PROCESSORDEVICE, NULL, BridgeController, PCIBridge, -1, 0); if (hostbridge && - hostbridge->DeviceId.Interface == PCIBridgeIndirect) { + ((hostbridge->DeviceId.Interface == PCIBridgeIndirect) || + (hostbridge->DeviceId.Interface == PCIBridgeRS6K))) { PnP_TAG_PACKET * pkt; pkt = PnP_find_large_vendor_packet( res->DevicePnPHeap+hostbridge->AllocatedOffset, @@ -1284,7 +1327,6 @@ setup_indirect_pci(hose, 0x80000cf8, 0x80000cfc); } } -#endif /* CONFIG_PREP_RESIDUAL */ ppc_md.pcibios_fixup = prep_pcibios_fixup; ppc_md.pcibios_after_init = prep_pcibios_after_init; diff -Nru a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c --- a/arch/ppc/platforms/prep_setup.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/prep_setup.c 2004-09-06 16:37:54 -07:00 @@ -79,6 +79,7 @@ int _prep_type; +extern void prep_residual_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi); extern void prep_sandalfoot_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi); extern void prep_thinkpad_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi); extern void prep_carolina_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi); @@ -193,9 +194,8 @@ seq_printf(m, "bad"); seq_printf(m, "\n"); -#ifdef CONFIG_PREP_RESIDUAL /* print info about SIMMs */ - if (res->ResidualLength != 0) { + if (have_residual_data) { int i; seq_printf(m, "simms\t\t: "); for (i = 0; (res->ActualNumMemories) && (i < MAX_MEMS); i++) { @@ -207,7 +207,13 @@ } seq_printf(m, "\n"); } -#endif +} + +static int __prep +prep_gen_cpuinfo(struct seq_file *m) +{ + prep_ibm_cpuinfo(m); + return 0; } static int __prep @@ -431,9 +437,8 @@ } no_l2: -#ifdef CONFIG_PREP_RESIDUAL /* print info about SIMMs */ - if (res->ResidualLength != 0) { + if (have_residual_data) { int i; seq_printf(m, "simms\t\t: "); for (i = 0; (res->ActualNumMemories) && (i < MAX_MEMS); i++) { @@ -445,18 +450,11 @@ } seq_printf(m, "\n"); } -#endif return 0; } static void __prep -prep_tiger1_progress(char *msg, unsigned short code) -{ - outw(code, PREP_IBM_DISP); -} - -static void __prep prep_restart(char *cmd) { #define PREP_SP92 0x92 /* Special Port 92 */ @@ -561,14 +559,12 @@ { /* PREP's without residual data will give incorrect values here */ seq_printf(m, "clock\t\t: "); -#ifdef CONFIG_PREP_RESIDUAL - if (res->ResidualLength) + if (have_residual_data) seq_printf(m, "%ldMHz\n", (res->VitalProductData.ProcessorHz > 1024) ? res->VitalProductData.ProcessorHz / 1000000 : res->VitalProductData.ProcessorHz); else -#endif /* CONFIG_PREP_RESIDUAL */ seq_printf(m, "???\n"); return 0; @@ -598,9 +594,10 @@ * Get the needed resource informations from residual data. * */ -#ifdef CONFIG_PREP_RESIDUAL - audiodevice = residual_find_device(~0, NULL, MultimediaController, - AudioController, -1, 0); + if (have_residual_data) + audiodevice = residual_find_device(~0, NULL, + MultimediaController, AudioController, -1, 0); + if (audiodevice != NULL) { PnP_TAG_PACKET *pkt; @@ -613,7 +610,6 @@ if (pkt != NULL) ppc_cs4232_dma2 = masktoint(pkt->S5_Pack.DMAMask); } -#endif /* * These are the PReP specs' defaults for the cs4231. We use these @@ -649,13 +645,14 @@ static void __init prep_init_vesa(void) { -#if defined(CONFIG_PREP_RESIDUAL) && \ - (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \ +#if (defined(CONFIG_FB_VGA16) || defined(CONFIG_FB_VGA_16_MODULE) || \ defined(CONFIG_FB_VESA)) - PPC_DEVICE *vgadev; + PPC_DEVICE *vgadev = NULL; + + if (have_residual_data) + vgadev = residual_find_device(~0, NULL, DisplayController, + SVGAController, -1, 0); - vgadev = residual_find_device(~0, NULL, DisplayController, SVGAController, - -1, 0); if (vgadev != NULL) { PnP_TAG_PACKET *pkt; @@ -680,7 +677,112 @@ } } } -#endif /* CONFIG_PREP_RESIDUAL */ +#endif +} + +/* + * Set DBAT 2 to access 0x80000000 so early progress messages will work + */ +static __inline__ void +prep_set_bat(void) +{ + /* wait for all outstanding memory access to complete */ + mb(); + + /* setup DBATs */ + mtspr(DBAT2U, 0x80001ffe); + mtspr(DBAT2L, 0x8000002a); + + /* wait for updates */ + mb(); +} + +/* + * IBM 3-digit status LED + */ +static unsigned int ibm_statusled_base __prepdata; + +static void __prep +ibm_statusled_progress(char *s, unsigned short hex); + +static int __prep +ibm_statusled_panic(struct notifier_block *dummy1, unsigned long dummy2, + void * dummy3) +{ + ibm_statusled_progress(NULL, 0x505); /* SOS */ + return NOTIFY_DONE; +} + +static struct notifier_block ibm_statusled_block __prepdata = { + ibm_statusled_panic, + NULL, + INT_MAX /* try to do it first */ +}; + +static void __prep +ibm_statusled_progress(char *s, unsigned short hex) +{ + static int notifier_installed; + /* + * Progress uses 4 digits and we have only 3. So, we map 0xffff to + * 0xfff for display switch off. Out of range values are mapped to + * 0xeff, as I'm told 0xf00 and above are reserved for hardware codes. + * Install the panic notifier when the display is first switched off. + */ + if (hex == 0xffff) { + hex = 0xfff; + if (!notifier_installed) { + ++notifier_installed; + notifier_chain_register(&panic_notifier_list, + &ibm_statusled_block); + } + } + else + if (hex > 0xfff) + hex = 0xeff; + + mb(); + outw(hex, ibm_statusled_base); +} + +static void __init +ibm_statusled_init(void) +{ + /* + * The IBM 3-digit LED display is specified in the residual data + * as an operator panel device, type "System Status LED". Find + * that device and determine its address. We validate all the + * other parameters on the off-chance another, similar device + * exists. + */ + if (have_residual_data) { + PPC_DEVICE *led; + PnP_TAG_PACKET *pkt; + + led = residual_find_device(~0, NULL, SystemPeripheral, + OperatorPanel, SystemStatusLED, 0); + if (!led) + return; + + pkt = PnP_find_packet((unsigned char *) + &res->DevicePnPHeap[led->AllocatedOffset], S8_Packet, 0); + if (!pkt) + return; + + if (pkt->S8_Pack.IOInfo != ISAAddr16bit) + return; + if (*(unsigned short *)pkt->S8_Pack.RangeMin != + *(unsigned short *)pkt->S8_Pack.RangeMax) + return; + if (pkt->S8_Pack.IOAlign != 2) + return; + if (pkt->S8_Pack.IONum != 2) + return; + + ibm_statusled_base = ld_le16((unsigned short *) + (pkt->S8_Pack.RangeMin)); + ppc_md.progress = ibm_statusled_progress; + } } static void __init @@ -706,7 +808,7 @@ { case _PREP_IBM: reg = inb(PREP_IBM_PLANAR); - printk(KERN_INFO "IBM planar ID: %08x", reg); + printk(KERN_INFO "IBM planar ID: %02x", reg); switch (reg) { case PREP_IBM_SANDALFOOT: prep_gen_enable_l2(); @@ -721,7 +823,16 @@ ppc_md.show_cpuinfo = prep_thinkpad_cpuinfo; break; default: - printk(" -- unknown! Assuming Carolina"); + if (have_residual_data) { + prep_gen_enable_l2(); + setup_ibm_pci = prep_residual_setup_pci; + ppc_md.power_off = prep_halt; + ppc_md.show_cpuinfo = prep_gen_cpuinfo; + break; + } + else + printk(" - unknown! Assuming Carolina"); + /* fall through */ case PREP_IBM_CAROLINA_IDE_0: case PREP_IBM_CAROLINA_IDE_1: case PREP_IBM_CAROLINA_IDE_2: @@ -745,7 +856,6 @@ setup_ibm_pci = prep_tiger1_setup_pci; ppc_md.power_off = prep_sig750_poweroff; ppc_md.show_cpuinfo = prep_tiger1_cpuinfo; - ppc_md.progress = prep_tiger1_progress; break; } printk("\n"); @@ -808,8 +918,6 @@ /* vgacon.c needs to know where we mapped IO memory in io_block_mapping() */ vgacon_remap_base = 0xf0000000; conswitchp = &vga_con; -#elif defined(CONFIG_DUMMY_CONSOLE) - conswitchp = &dummy_con; #endif } @@ -821,18 +929,19 @@ static void __init prep_calibrate_decr(void) { -#ifdef CONFIG_PREP_RESIDUAL - unsigned long freq, divisor = 4; + if (have_residual_data) { + unsigned long freq, divisor = 4; - if ( res->VitalProductData.ProcessorBusHz ) { - freq = res->VitalProductData.ProcessorBusHz; - printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", - (freq/divisor)/1000000, - (freq/divisor)%1000000); - tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); - tb_ticks_per_jiffy = freq / HZ / divisor; - } else -#endif + if ( res->VitalProductData.ProcessorBusHz ) { + freq = res->VitalProductData.ProcessorBusHz; + printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", + (freq/divisor)/1000000, + (freq/divisor)%1000000); + tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); + tb_ticks_per_jiffy = freq / HZ / divisor; + } + } + else todc_calibrate_decr(); } @@ -863,6 +972,12 @@ } for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) irq_desc[i].handler = &i8259_pic; + + if (have_residual_data) { + i8259_init(residual_isapic_addr()); + return; + } + /* If we have a Raven PCI bridge or a Hawk PCI bridge / Memory * controller, we poll (as they have a different int-ack address). */ early_read_config_dword(NULL, 0, 0, PCI_VENDOR_ID, &pci_viddid); @@ -1000,17 +1115,26 @@ DMA_MODE_WRITE = 0x48; /* figure out what kind of prep workstation we are */ -#ifdef CONFIG_PREP_RESIDUAL - if ( res->ResidualLength != 0 ) { + if (have_residual_data) { if ( !strncmp(res->VitalProductData.PrintableModel,"IBM",3) ) _prep_type = _PREP_IBM; else _prep_type = _PREP_Motorola; - } else /* assume motorola if no residual (netboot?) */ -#endif - { + } + else { + /* assume motorola if no residual (netboot?) */ _prep_type = _PREP_Motorola; } + +#ifdef CONFIG_PREP_PRESIDUAL + /* Switch off all residual data processing if the user requests it */ + if (strstr(cmd_line, "noresidual") != NULL) + res = NULL; +#endif + + /* Initialise progress early to get maximum benefit */ + prep_set_bat(); + ibm_statusled_init(); ppc_md.setup_arch = prep_setup_arch; ppc_md.show_percpuinfo = prep_show_percpuinfo; diff -Nru a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c --- a/arch/ppc/platforms/prpmc750.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/prpmc750.c 2004-09-06 16:37:54 -07:00 @@ -193,10 +193,6 @@ ROOT_DEV = Root_SDA2; #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - OpenPIC_InitSenses = prpmc750_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(prpmc750_openpic_initsenses); diff -Nru a/arch/ppc/platforms/prpmc750.h b/arch/ppc/platforms/prpmc750.h --- a/arch/ppc/platforms/prpmc750.h 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/prpmc750.h 2004-09-06 16:37:51 -07:00 @@ -5,20 +5,16 @@ * * Author: Matt Porter * - * Copyright 2001 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. */ #ifdef __KERNEL__ #ifndef __ASM_PRPMC750_H__ #define __ASM_PRPMC750_H__ -#include - /* * Due to limiations imposed by legacy hardware (primaryily IDE controllers), * the PrPMC750 carrier board operates using a PReP address map. @@ -80,6 +76,20 @@ #define PRPMC750_TBEN_REG 0xfef880c0 #define PRPMC750_TBEN_MASK 0x01 + +/* UART Defines. */ +#define RS_TABLE_SIZE 4 + +/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ +#define BASE_BAUD (PRPMC750_BASE_BAUD / 16) + +#define STD_COM_FLAGS ASYNC_BOOT_AUTOCONF + +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, PRPMC750_SERIAL_0, 1, STD_COM_FLAGS, \ + iomem_base: (unsigned char *)PRPMC750_SERIAL_0, \ + iomem_reg_shift: 4, \ + io_type: SERIAL_IO_MEM } /* ttyS0 */ #endif /* __ASM_PRPMC750_H__ */ #endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/prpmc750_serial.h b/arch/ppc/platforms/prpmc750_serial.h --- a/arch/ppc/platforms/prpmc750_serial.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,43 +0,0 @@ -/* - * include/asm-ppc/platforms/prpmc750_serial.h - * - * Motorola PrPMC750 serial support - * - * Author: Matt Porter - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifdef __KERNEL__ -#ifndef __ASM_PRPMC750_SERIAL_H__ -#define __ASM_PRPMC750_SERIAL_H__ - -#include -#include - -#define RS_TABLE_SIZE 4 - -/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ -#define BASE_BAUD (PRPMC750_BASE_BAUD / 16) - -#ifndef SERIAL_MAGIC_KEY -#define kernel_debugger ppc_kernel_debug -#endif - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#endif - -#define SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, PRPMC750_SERIAL_0, 1, STD_COM_FLAGS, \ - iomem_base: (unsigned char *)PRPMC750_SERIAL_0, \ - iomem_reg_shift: 4, \ - io_type: SERIAL_IO_MEM } /* ttyS0 */ - -#endif /* __ASM_PRPMC750_SERIAL_H__ */ -#endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c --- a/arch/ppc/platforms/prpmc800.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/platforms/prpmc800.c 2004-09-06 16:37:53 -07:00 @@ -309,10 +309,6 @@ ROOT_DEV = Root_SDA2; #endif -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - printk(KERN_INFO "Port by MontaVista Software, Inc. " "(source@mvista.com)\n"); } diff -Nru a/arch/ppc/platforms/prpmc800.h b/arch/ppc/platforms/prpmc800.h --- a/arch/ppc/platforms/prpmc800.h 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc/platforms/prpmc800.h 2004-09-06 16:37:54 -07:00 @@ -5,12 +5,10 @@ * * Author: Dale Farnsworth * - * Copyright 2001 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. */ /* * From Processor to PCI: @@ -62,5 +60,23 @@ */ #define PRPMC800_INT_IRQ 16 #define PRPMC800_INT_PRI 15 + +/* UART Defines. */ +#define RS_TABLE_SIZE 4 + +/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ +#define BASE_BAUD (PRPMC800_BASE_BAUD / 16) + +#define STD_COM_FLAGS ASYNC_BOOT_AUTOCONF + +/* UARTS are at IRQ 16 */ +#define STD_SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, PRPMC800_SERIAL_1, 16, STD_COM_FLAGS, /* ttyS0 */\ + iomem_base: (unsigned char *)PRPMC800_SERIAL_1, \ + iomem_reg_shift: 0, \ + io_type: SERIAL_IO_MEM }, + +#define SERIAL_PORT_DFNS \ + STD_SERIAL_PORT_DFNS #endif /* __ASMPPC_PRPMC800_H */ diff -Nru a/arch/ppc/platforms/prpmc800_serial.h b/arch/ppc/platforms/prpmc800_serial.h --- a/arch/ppc/platforms/prpmc800_serial.h 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,49 +0,0 @@ -/* - * arch/ppc/platforms/prpmc800_serial.h - * - * Definitions for Motorola MCG PRPMC800 cPCI board support - * - * Author: Dale Farnsworth dale.farnsworth@mvista.com - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __ASMPPC_PRPMC800_SERIAL_H -#define __ASMPPC_PRPMC800_SERIAL_H - -#include -#include - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE 4 -#endif - -/* Rate for the 1.8432 Mhz clock for the onboard serial chip */ -#define BASE_BAUD (PRPMC800_BASE_BAUD / 16) - -#ifndef SERIAL_MAGIC_KEY -#define kernel_debugger ppc_kernel_debug -#endif - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#endif - -/* UARTS are at IRQ 16 */ -#define STD_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, PRPMC800_SERIAL_1, 16, STD_COM_FLAGS, /* ttyS0 */\ - iomem_base: (unsigned char *)PRPMC800_SERIAL_1, \ - iomem_reg_shift: 0, \ - io_type: SERIAL_IO_MEM }, - -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DFNS - -#endif /* __ASMPPC_PRPMC800_SERIAL_H */ diff -Nru a/arch/ppc/platforms/residual.c b/arch/ppc/platforms/residual.c --- a/arch/ppc/platforms/residual.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/residual.c 2004-09-06 16:37:51 -07:00 @@ -504,7 +504,7 @@ #define did dev->DeviceId /* make sure we have residual data first */ - if ( res->ResidualLength == 0 ) + if (!have_residual_data) return; printk("Residual: %ld devices\n", res->ActualNumDevices); @@ -639,7 +639,7 @@ #define did dev->DeviceId /* make sure we have residual data first */ - if ( res->ResidualLength == 0 ) + if (!have_residual_data) return; printk("Residual: %ld devices\n", res->ActualNumDevices); for ( i = 0; @@ -790,7 +790,7 @@ int n) { int i; - if ( !res->ResidualLength ) return NULL; + if (!have_residual_data) return NULL; for (i=0; iActualNumDevices; i++) { #define Dev res->Devices[i].DeviceId if ( (Dev.BusId&BusMask) && @@ -813,7 +813,7 @@ int n) { int i; - if ( !res->ResidualLength ) return NULL; + if (!have_residual_data) return NULL; for (i=0; iActualNumDevices; i++) { #define Dev res->Devices[i].DeviceId if ( (Dev.BusId&BusMask) && @@ -827,6 +827,129 @@ return NULL; } +static int __init +residual_scan_pcibridge(PnP_TAG_PACKET * pkt, struct pci_dev *dev) +{ + int irq = -1; + +#define data pkt->L4_Pack.L4_Data.L4_PPCPack.PPCData + if (dev->bus->number == data[16]) { + int i, size; + + size = 3 + ld_le16((u_short *) (&pkt->L4_Pack.Count0)); + for (i = 20; i < size - 4; i += 12) { + unsigned char pin; + int line_irq; + + if (dev->devfn != data[i + 1]) + continue; + + pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); + if (pin) { + line_irq = ld_le16((unsigned short *) + (&data[i + 4 + 2 * (pin - 1)])); + irq = (line_irq == 0xffff) ? 0 + : line_irq & 0x7fff; + } else + irq = 0; + + break; + } + } +#undef data + + return irq; +} + +int __init +residual_pcidev_irq(struct pci_dev *dev) +{ + int i = 0; + int irq = -1; + PPC_DEVICE *bridge; + + while ((bridge = residual_find_device + (-1, NULL, BridgeController, PCIBridge, -1, i++))) { + + PnP_TAG_PACKET *pkt; + if (bridge->AllocatedOffset) { + pkt = PnP_find_large_vendor_packet(res->DevicePnPHeap + + bridge->AllocatedOffset, 3, 0); + if (!pkt) + continue; + + irq = residual_scan_pcibridge(pkt, dev); + if (irq != -1) + break; + } + } + + return (irq < 0) ? 0 : irq; +} + +void __init residual_irq_mask(char *irq_edge_mask_lo, char *irq_edge_mask_hi) +{ + PPC_DEVICE *dev; + int i = 0; + unsigned short irq_mask = 0x000; /* default to edge */ + + while ((dev = residual_find_device(-1, NULL, -1, -1, -1, i++))) { + PnP_TAG_PACKET *pkt; + unsigned short mask; + int size; + int offset = dev->AllocatedOffset; + + if (!offset) + continue; + + pkt = PnP_find_packet(res->DevicePnPHeap + offset, + IRQFormat, 0); + if (!pkt) + continue; + + size = tag_small_count(pkt->S1_Pack.Tag) + 1; + mask = ld_le16((unsigned short *)pkt->S4_Pack.IRQMask); + if (size > 3 && (pkt->S4_Pack.IRQInfo & 0x0c)) + irq_mask |= mask; + } + + *irq_edge_mask_lo = irq_mask & 0xff; + *irq_edge_mask_hi = irq_mask >> 8; +} + +unsigned int __init residual_isapic_addr(void) +{ + PPC_DEVICE *isapic; + PnP_TAG_PACKET *pkt; + unsigned int addr; + + isapic = residual_find_device(~0, NULL, SystemPeripheral, + ProgrammableInterruptController, + ISA_PIC, 0); + if (!isapic) + goto unknown; + + pkt = PnP_find_large_vendor_packet(res->DevicePnPHeap + + isapic->AllocatedOffset, 9, 0); + if (!pkt) + goto unknown; + +#define p pkt->L4_Pack.L4_Data.L4_PPCPack + /* Must be 32-bit memory address */ + if (!((p.PPCData[0] == 2) && (p.PPCData[1] == 32))) + goto unknown; + + /* It doesn't seem to work where length != 1 (what can I say? :-/ ) */ + if (ld_le32((unsigned int *)(p.PPCData + 12)) != 1) + goto unknown; + + addr = ld_le32((unsigned int *) (p.PPCData + 4)); +#undef p + return addr; +unknown: + return 0; +} + PnP_TAG_PACKET *PnP_find_packet(unsigned char *p, unsigned packet_tag, int n) @@ -901,7 +1024,7 @@ int __init proc_prep_residual_init(void) { - if (res->ResidualLength) + if (have_residual_data) create_proc_read_entry("residual", S_IRUGO, NULL, proc_prep_residual_read, NULL); return 0; diff -Nru a/arch/ppc/platforms/rpx8260.c b/arch/ppc/platforms/rpx8260.c --- a/arch/ppc/platforms/rpx8260.c 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,65 +0,0 @@ -/* - * arch/ppc/platforms/rpx8260.c - * - * RPC EP8260 platform support - * - * Author: Dan Malek - * Derived from: pq2ads_setup.c by Kumar - * - * Copyright 2004 Embedded Edge, LLC - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include - -#include -#include - -static void (*callback_setup_arch)(void); - -extern unsigned char __res[sizeof(bd_t)]; - -extern void m8260_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7); - -static int -ep8260_show_cpuinfo(struct seq_file *m) -{ - bd_t *binfo = (bd_t *)__res; - - seq_printf(m, "vendor\t\t: RPC\n" - "machine\t\t: EP8260 PPC\n" - "\n" - "mem size\t\t: 0x%08x\n" - "console baud\t\t: %d\n" - "\n", - binfo->bi_memsize, - binfo->bi_baudrate); - return 0; -} - -static void __init -ep8260_setup_arch(void) -{ - printk("RPC EP8260 Port\n"); - callback_setup_arch(); -} - -void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - /* Generic 8260 platform initialization */ - m8260_init(r3, r4, r5, r6, r7); - - /* Anything special for this platform */ - ppc_md.show_cpuinfo = ep8260_show_cpuinfo; - - callback_setup_arch = ppc_md.setup_arch; - ppc_md.setup_arch = ep8260_setup_arch; -} diff -Nru a/arch/ppc/platforms/rpx8260.h b/arch/ppc/platforms/rpx8260.h --- a/arch/ppc/platforms/rpx8260.h 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/platforms/rpx8260.h 2004-09-06 16:37:52 -07:00 @@ -70,5 +70,12 @@ #define PHY_INTERRUPT SIU_INT_IRQ7 +/* For our show_cpuinfo hooks. */ +#define CPUINFO_VENDOR "Embedded Planet" +#define CPUINFO_MACHINE "EP8260 PowerPC" + +/* Warm reset vector. */ +#define BOOTROM_RESTART_ADDR ((uint)0xfff00104) + #endif /* __ASM_PLATFORMS_RPX8260_H__ */ #endif /* __KERNEL__ */ diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/sandpoint.c 2004-09-06 16:37:55 -07:00 @@ -303,10 +303,6 @@ /* Lookup PCI host bridges */ sandpoint_find_bridges(); -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif - printk(KERN_INFO "Motorola SPS Sandpoint Test Platform\n"); printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); diff -Nru a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c --- a/arch/ppc/platforms/sbc82xx.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/sbc82xx.c 2004-09-06 16:37:51 -07:00 @@ -16,10 +16,10 @@ */ #include -#include #include #include #include +#include #include #include @@ -29,39 +29,12 @@ #include #include -static void (*callback_setup_arch)(void); static void (*callback_init_IRQ)(void); extern unsigned char __res[sizeof(bd_t)]; -extern void m8260_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7); - extern void (*late_time_init)(void); -static int -sbc82xx_show_cpuinfo(struct seq_file *m) -{ - bd_t *binfo = (bd_t *)__res; - - seq_printf(m, "vendor\t\t: Wind River\n" - "machine\t\t: SBC PowerQUICC II\n" - "\n" - "mem size\t\t: 0x%08lx\n" - "console baud\t\t: %ld\n" - "\n", - binfo->bi_memsize, - binfo->bi_baudrate); - return 0; -} - -static void __init -sbc82xx_setup_arch(void) -{ - printk("SBC PowerQUICC II Port\n"); - callback_setup_arch(); -} - #ifdef CONFIG_GEN_RTC TODC_ALLOC(); @@ -237,7 +210,6 @@ return PCI_IRQ_TABLE_LOOKUP; } - static void __devinit quirk_sbc8260_cardbus(struct pci_dev *pdev) { uint32_t ctrl; @@ -259,23 +231,15 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420, quirk_sbc8260_cardbus); void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) +m82xx_board_init(void) { - /* Generic 8260 platform initialization */ - m8260_init(r3, r4, r5, r6, r7); - /* u-boot may be using one of the FCC Ethernet devices. Use the MAC address to the SCC. */ __res[offsetof(bd_t, bi_enetaddr[5])] &= ~3; /* Anything special for this platform */ - ppc_md.show_cpuinfo = sbc82xx_show_cpuinfo; - - callback_setup_arch = ppc_md.setup_arch; callback_init_IRQ = ppc_md.init_IRQ; - ppc_md.setup_arch = sbc82xx_setup_arch; ppc_md.init_IRQ = sbc82xx_init_IRQ; ppc_md.pci_map_irq = sbc82xx_pci_map_irq; #ifdef CONFIG_GEN_RTC diff -Nru a/arch/ppc/platforms/sbc82xx.h b/arch/ppc/platforms/sbc82xx.h --- a/arch/ppc/platforms/sbc82xx.h 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/platforms/sbc82xx.h 2004-09-06 16:37:55 -07:00 @@ -18,6 +18,10 @@ #define SBC82xx_MACADDR_NVRAM_FCC2 0x220000d5 /* JP7A */ #define SBC82xx_MACADDR_NVRAM_FCC3 0x220000db /* JP7B */ +/* For our show_cpuinfo hooks. */ +#define CPUINFO_VENDOR "Wind River" +#define CPUINFO_MACHINE "SBC PowerQUICC II" + #define BOOTROM_RESTART_ADDR ((uint)0x40000104) #define SBC82xx_PC_IRQA (NR_SIU_INTS+0) diff -Nru a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c --- a/arch/ppc/platforms/spruce.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/spruce.c 2004-09-06 16:37:51 -07:00 @@ -228,11 +228,6 @@ ROOT_DEV = Root_SDA1; #endif -#ifdef CONFIG_VT - conswitchp = &dummy_con; -#endif - - /* Identify the system */ printk(KERN_INFO "System Identification: IBM Spruce\n"); printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); diff -Nru a/arch/ppc/platforms/tqm8260.h b/arch/ppc/platforms/tqm8260.h --- a/arch/ppc/platforms/tqm8260.h 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/platforms/tqm8260.h 2004-09-06 16:37:52 -07:00 @@ -14,6 +14,10 @@ #define CPM_MAP_ADDR ((uint)0xFFF00000) #define PHY_INTERRUPT 25 +/* For our show_cpuinfo hooks. */ +#define CPUINFO_VENDOR "IN2 Systems" +#define CPUINFO_MACHINE "TQM8260 PowerPC" + #define BOOTROM_RESTART_ADDR ((uint)0x40000104) #endif /* __TQM8260_PLATFORM */ diff -Nru a/arch/ppc/platforms/tqm8260_setup.c b/arch/ppc/platforms/tqm8260_setup.c --- a/arch/ppc/platforms/tqm8260_setup.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc/platforms/tqm8260_setup.c 2004-09-06 16:37:51 -07:00 @@ -14,33 +14,12 @@ * option) any later version. */ -#include -#include +#include #include #include #include -static void (*callback_setup_arch)(void); - -extern unsigned char __res[sizeof(bd_t)]; - -extern void m8260_init(unsigned long r3, unsigned long r4, - unsigned long r5, unsigned long r6, unsigned long r7); - -static int -tqm8260_show_cpuinfo(struct seq_file *m) -{ - bd_t *binfo = (bd_t *)__res; - - seq_printf(m, "vendor\t\t: IN2 Systems\n" - "machine\t\t: TQM8260 PowerPC\n" - "mem size\t\t: 0x%08x\n" - "\n", - binfo->bi_memsize); - return 0; -} - static int tqm8260_set_rtc_time(unsigned long time) { @@ -56,24 +35,10 @@ return ((cpm2_map_t *)CPM_MAP_ADDR)->im_sit.sit_tmcnt; } -static void __init -tqm8260_setup_arch(void) -{ - printk("IN2 Systems TQM8260 port\n"); - callback_setup_arch(); -} - void __init -platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) +m82xx_board_init(void) { - /* Generic 8260 platform initialization */ - m8260_init(r3, r4, r5, r6, r7); - /* Anything special for this platform */ - ppc_md.show_cpuinfo = tqm8260_show_cpuinfo; ppc_md.set_rtc_time = tqm8260_set_rtc_time; ppc_md.get_rtc_time = tqm8260_get_rtc_time; - - callback_setup_arch = ppc_md.setup_arch; - ppc_md.setup_arch = tqm8260_setup_arch; +} diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/syslib/Makefile 2004-09-06 16:37:50 -07:00 @@ -5,6 +5,8 @@ CFLAGS_prom_init.o += -fPIC CFLAGS_btext.o += -fPIC +wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o + obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o obj-$(CONFIG_PPC_OCP) += ocp.o obj-$(CONFIG_IBM_OCP) += ibm_ocp.o @@ -22,7 +24,7 @@ obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o endif endif -obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o +obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) ifeq ($(CONFIG_8xx),y) obj-$(CONFIG_PCI) += qspan_pci.o i8259.o endif diff -Nru a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c --- a/arch/ppc/syslib/cpm2_pic.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/syslib/cpm2_pic.c 2004-09-06 16:37:53 -07:00 @@ -1,12 +1,3 @@ -#include -#include -#include -#include -#include -#include -#include -#include "cpm2_pic.h" - /* The CPM2 internal interrupt controller. It is usually * the only interrupt controller. * There are two 32-bit registers (high/low) for up to 64 @@ -18,6 +9,18 @@ * We create two tables, indexed by vector number, to indicate * which register to use and which bit in the register to use. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "cpm2_pic.h" + static u_char irq_to_siureg[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -123,9 +126,5 @@ if (irq == 0) return(-1); -#if 0 - irq += ppc8260_pic.irq_offset; -#endif return irq; } - diff -Nru a/arch/ppc/syslib/cpm2_pic.h b/arch/ppc/syslib/cpm2_pic.h --- a/arch/ppc/syslib/cpm2_pic.h 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/syslib/cpm2_pic.h 2004-09-06 16:37:55 -07:00 @@ -1,13 +1,7 @@ #ifndef _PPC_KERNEL_CPM2_H #define _PPC_KERNEL_CPM2_H -#include - extern struct hw_interrupt_type cpm2_pic; - -void cpm2_pic_init(void); -void cpm2_do_IRQ(struct pt_regs *regs, - int cpu); -int cpm2_get_irq(struct pt_regs *regs); +extern int cpm2_get_irq(struct pt_regs *regs); #endif /* _PPC_KERNEL_CPM2_H */ diff -Nru a/arch/ppc/syslib/hawk_common.c b/arch/ppc/syslib/hawk_common.c --- a/arch/ppc/syslib/hawk_common.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc/syslib/hawk_common.c 2004-09-06 16:37:53 -07:00 @@ -285,3 +285,35 @@ return total; } + +int __init +hawk_mpic_init(unsigned int pci_mem_offset) +{ + unsigned short devid; + unsigned int pci_membase; + + /* Check the first PCI device to see if it is a Raven or Hawk. */ + early_read_config_word(0, 0, 0, PCI_DEVICE_ID, &devid); + + switch (devid) { + case PCI_DEVICE_ID_MOTOROLA_RAVEN: + case PCI_DEVICE_ID_MOTOROLA_HAWK: + break; + default: + OpenPIC_Addr = NULL; + return 1; + } + + /* Read the memory base register. */ + early_read_config_dword(0, 0, 0, PCI_BASE_ADDRESS_1, &pci_membase); + + if (pci_membase == 0) { + OpenPIC_Addr = NULL; + return 1; + } + + /* Map the MPIC registers to virtual memory. */ + OpenPIC_Addr = ioremap(pci_membase + pci_mem_offset, 0x22000); + + return 0; +} diff -Nru a/arch/ppc/syslib/m8260_pci.h b/arch/ppc/syslib/m8260_pci.h --- a/arch/ppc/syslib/m8260_pci.h 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/syslib/m8260_pci.h 2004-09-06 16:37:55 -07:00 @@ -66,6 +66,7 @@ #endif #ifdef CONFIG_8260_PCI9 +struct pci_controller; extern void setup_m8260_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data); #else diff -Nru a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c --- a/arch/ppc/syslib/m8260_setup.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/syslib/m8260_setup.c 2004-09-06 16:37:52 -07:00 @@ -1,5 +1,5 @@ /* - * arch/ppc/kernel/setup.c + * arch/ppc/syslib/m8260_setup.c * * Copyright (C) 1995 Linus Torvalds * Adapted from 'alpha' version by Gary Thomas @@ -8,36 +8,20 @@ * Further modified for generic 8xx and 8260 by Dan. */ -/* - * bootup setup stuff.. - */ - #include -#include #include #include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include +#include #include -#include #include #include -#include #include #include #include @@ -46,10 +30,6 @@ #include "cpm2_pic.h" -static int m8260_set_rtc_time(unsigned long time); -static unsigned long m8260_get_rtc_time(void); -static void m8260_calibrate_decr(void); - unsigned char __res[sizeof(bd_t)]; extern void cpm2_reset(void); @@ -59,8 +39,10 @@ static void __init m8260_setup_arch(void) { - /* Reset the Communication Processor Module. - */ + /* Print out Vendor and Machine info. */ + printk(KERN_INFO "%s %s port\n", CPUINFO_VENDOR, CPUINFO_MACHINE); + + /* Reset the Communication Processor Module. */ cpm2_reset(); #ifdef CONFIG_8260_PCI9 /* Initialise IDMA for PCI erratum workaround */ @@ -69,6 +51,10 @@ #ifdef CONFIG_PCI_8260 m8260_find_bridges(); #endif +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; +#endif } /* The decrementer counts at the system (internal) clock frequency @@ -77,7 +63,7 @@ static void __init m8260_calibrate_decr(void) { - bd_t *binfo = (bd_t *)__res; + bd_t *binfo = (bd_t *)__res; int freq, divisor; freq = binfo->bi_busfreq; @@ -145,18 +131,22 @@ } static int -m8260_show_percpuinfo(struct seq_file *m, int i) +m8260_show_cpuinfo(struct seq_file *m) { - bd_t *bp; - - bp = (bd_t *)__res; + bd_t *bp = (bd_t *)__res; - seq_printf(m, "core clock\t: %ld MHz\n" - "CPM clock\t: %ld MHz\n" - "bus clock\t: %ld MHz\n", - bp->bi_intfreq / 1000000, - bp->bi_cpmfreq / 1000000, - bp->bi_busfreq / 1000000); + seq_printf(m, "vendor\t\t: %s\n" + "machine\t\t: %s\n" + "\n" + "mem size\t\t: 0x%08x\n" + "console baud\t\t: %d\n" + "\n" + "core clock\t: %u MHz\n" + "CPM clock\t: %u MHz\n" + "bus clock\t: %u MHz\n", + CPUINFO_VENDOR, CPUINFO_MACHINE, bp->bi_memsize, + bp->bi_baudrate, bp->bi_intfreq / 1000000, + bp->bi_cpmfreq / 1000000, bp->bi_busfreq / 1000000); return 0; } @@ -170,7 +160,6 @@ m8260_init_IRQ(void) { int i; - void cpm_interrupt_init(void); for ( i = 0 ; i < NR_SIU_INTS ; i++ ) irq_desc[i].handler = &cpm2_pic; @@ -190,10 +179,7 @@ static unsigned long __init m8260_find_end_of_memory(void) { - bd_t *binfo; - extern unsigned char __res[]; - - binfo = (bd_t *)__res; + bd_t *binfo = (bd_t *)__res; return binfo->bi_memsize; } @@ -216,6 +202,12 @@ io_block_mapping(IO_VIRT_ADDR, IO_PHYS_ADDR, 0x10000000, _PAGE_IO); } +/* Place-holder for board-specific init */ +void __attribute__ ((weak)) __init +m82xx_board_init(void) +{ +} + /* Inputs: * r3 - Optional pointer to a board information structure. * r4 - Optional pointer to the physical starting address of the init RAM @@ -228,7 +220,7 @@ * command-line parameters. */ void __init -m8260_init(unsigned long r3, unsigned long r4, unsigned long r5, +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); @@ -249,18 +241,18 @@ strcpy(cmd_line, (char *)(r6+KERNELBASE)); } + /* Call back for board-specific settings. */ + m82xx_board_init(); + ppc_md.setup_arch = m8260_setup_arch; - ppc_md.show_percpuinfo = m8260_show_percpuinfo; - ppc_md.irq_canonicalize = NULL; + ppc_md.show_cpuinfo = m8260_show_cpuinfo; ppc_md.init_IRQ = m8260_init_IRQ; ppc_md.get_irq = cpm2_get_irq; - ppc_md.init = NULL; ppc_md.restart = m8260_restart; ppc_md.power_off = m8260_power_off; ppc_md.halt = m8260_halt; - ppc_md.time_init = NULL; ppc_md.set_rtc_time = m8260_set_rtc_time; ppc_md.get_rtc_time = m8260_get_rtc_time; ppc_md.calibrate_decr = m8260_calibrate_decr; diff -Nru a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c --- a/arch/ppc/syslib/m8xx_setup.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc/syslib/m8xx_setup.c 2004-09-06 16:37:52 -07:00 @@ -60,6 +60,11 @@ extern void m8xx_cpm_reset(uint); extern void rpxfb_alloc_pages(void); +void __attribute__ ((weak)) +board_init(void) +{ +} + void __init m8xx_setup_arch(void) { @@ -102,6 +107,7 @@ } #endif #endif + board_init(); } void diff -Nru a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/m8xx_wdt.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,99 @@ +/* + * m8xx_wdt.c - MPC8xx watchdog driver + * + * Author: Florian Schirmer + * + * 2002 (c) Florian Schirmer This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include + +static int wdt_timeout; + +void m8xx_wdt_reset(void) +{ + volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + + imap->im_siu_conf.sc_swsr = 0x556c; /* write magic1 */ + imap->im_siu_conf.sc_swsr = 0xaa39; /* write magic2 */ +} + +static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) +{ + volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + + m8xx_wdt_reset(); + + imap->im_sit.sit_piscr |= PISCR_PS; /* clear irq */ + + return IRQ_HANDLED; +} + +void __init m8xx_wdt_handler_install(bd_t * binfo) +{ + volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + u32 pitc; + u32 sypcr; + u32 pitrtclk; + + sypcr = imap->im_siu_conf.sc_sypcr; + + if (!(sypcr & 0x04)) { + printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", + sypcr); + return; + } + + m8xx_wdt_reset(); + + printk(KERN_NOTICE + "m8xx_wdt: active wdt found (SWTC: 0x%04X, SWP: 0x%01X)\n", + (sypcr >> 16), sypcr & 0x01); + + wdt_timeout = (sypcr >> 16) & 0xFFFF; + + if (!wdt_timeout) + wdt_timeout = 0xFFFF; + + if (sypcr & 0x01) + wdt_timeout *= 2048; + + /* + * Fire trigger if half of the wdt ticked down + */ + + if (imap->im_sit.sit_rtcsc & RTCSC_38K) + pitrtclk = 9600; + else + pitrtclk = 8192; + + if ((wdt_timeout) > (UINT_MAX / pitrtclk)) + pitc = wdt_timeout / binfo->bi_intfreq * pitrtclk / 2; + else + pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; + + imap->im_sit.sit_pitc = pitc << 16; + imap->im_sit.sit_piscr = + (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE; + + if (request_irq(PIT_INTERRUPT, m8xx_wdt_interrupt, 0, "watchdog", NULL)) + panic("m8xx_wdt: could not allocate watchdog irq!"); + + printk(KERN_NOTICE + "m8xx_wdt: keep-alive trigger installed (PITC: 0x%04X)\n", pitc); + + wdt_timeout /= binfo->bi_intfreq; +} + +int m8xx_wdt_get_timeout(void) +{ + return wdt_timeout; +} diff -Nru a/arch/ppc/syslib/m8xx_wdt.h b/arch/ppc/syslib/m8xx_wdt.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/m8xx_wdt.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,16 @@ +/* + * Author: Florian Schirmer + * + * 2002 (c) Florian Schirmer This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ +#ifndef _PPC_SYSLIB_M8XX_WDT_H +#define _PPC_SYSLIB_M8XX_WDT_H + +extern void m8xx_wdt_handler_install(bd_t * binfo); +extern int m8xx_wdt_get_timeout(void); +extern void m8xx_wdt_reset(void); + +#endif /* _PPC_SYSLIB_M8XX_WDT_H */ diff -Nru a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c --- a/arch/ppc/syslib/ppc4xx_setup.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc/syslib/ppc4xx_setup.c 2004-09-06 16:37:50 -07:00 @@ -61,10 +61,6 @@ #ifdef CONFIG_PCI ppc4xx_find_bridges(); #endif - -#if defined(CONFIG_FB) - conswitchp = &dummy_con; -#endif } /* diff -Nru a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c --- a/arch/ppc/syslib/ppc85xx_setup.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc/syslib/ppc85xx_setup.c 2004-09-06 16:37:55 -07:00 @@ -277,7 +277,7 @@ hose_a->io_space.start = MPC85XX_PCI1_LOWER_IO; hose_a->io_space.end = MPC85XX_PCI1_UPPER_IO; hose_a->io_base_phys = MPC85XX_PCI1_IO_BASE; -#if CONFIG_85xx_PCI2 +#ifdef CONFIG_85xx_PCI2 isa_io_base = (unsigned long) ioremap(MPC85XX_PCI1_IO_BASE, MPC85XX_PCI1_IO_SIZE + @@ -304,7 +304,7 @@ hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); -#if CONFIG_85xx_PCI2 +#ifdef CONFIG_85xx_PCI2 hose_b = pcibios_alloc_controller(); if (!hose_b) diff -Nru a/arch/ppc64/Kconfig.debug b/arch/ppc64/Kconfig.debug --- a/arch/ppc64/Kconfig.debug 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/Kconfig.debug 2004-09-06 16:37:54 -07:00 @@ -54,4 +54,16 @@ If in doubt, say N. +config SCHEDSTATS + bool "Collect scheduler statistics" + depends on DEBUG_KERNEL && PROC_FS + help + If you say Y here, additional code will be inserted into the + scheduler and related routines to collect statistics about + scheduler behavior and provide them in /proc/schedstat. These + stats may be useful for both tuning and debugging the scheduler + If you aren't debugging the scheduler or trying to tune a specific + application, you can say N to avoid the very slight overhead + this adds. + endmenu diff -Nru a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig --- a/arch/ppc64/configs/iSeries_defconfig 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/configs/iSeries_defconfig 2004-09-06 16:37:55 -07:00 @@ -16,17 +16,17 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y CONFIG_IKCONFIG=y @@ -34,6 +34,7 @@ # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -41,6 +42,8 @@ CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -62,10 +65,11 @@ CONFIG_PPC=y CONFIG_PPC64=y # CONFIG_POWER4_ONLY is not set -# CONFIG_IOMMU_VMERGE is not set +CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y CONFIG_NR_CPUS=32 # CONFIG_SCHED_SMT is not set +# CONFIG_PREEMPT is not set CONFIG_MSCHUNKS=y CONFIG_LPARCFG=y @@ -97,6 +101,8 @@ # # Generic Driver Options # +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set @@ -125,7 +131,7 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y @@ -168,22 +174,23 @@ # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +CONFIG_SCSI_IBMVSCSI=m # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set @@ -209,11 +216,15 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y +CONFIG_MD_RAID10=m CONFIG_MD_RAID5=y -CONFIG_MD_RAID6=y -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support @@ -259,6 +270,7 @@ CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=y # # IP: Virtual Server Configuration @@ -324,7 +336,13 @@ CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m -# CONFIG_IP_NF_RAW is not set +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -351,6 +369,7 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing @@ -379,7 +398,6 @@ # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set @@ -408,18 +426,32 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # -# Gigabit Ethernet (1000/10000 Mbit) +# Ethernet (1000 Mbit) # -# CONFIG_NET_GIGE is not set +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set # # Token Ring devices # CONFIG_TR=y CONFIG_IBMOL=y -# CONFIG_IBMLS is not set # CONFIG_3C359 is not set # CONFIG_TMS380TR is not set @@ -508,10 +540,11 @@ # # Non-8250 serial port support # +CONFIG_SERIAL_CORE=m +CONFIG_SERIAL_ICOM=m CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -542,6 +575,11 @@ # CONFIG_I2C is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # @@ -592,8 +630,10 @@ CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=y +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set @@ -616,6 +656,7 @@ # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -623,6 +664,8 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -663,19 +706,22 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y +CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y +CONFIG_EXPORTFS=m CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y +CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -691,7 +737,7 @@ # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set @@ -714,7 +760,8 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -748,14 +795,16 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set # CONFIG_IRQSTACKS is not set +# CONFIG_SCHEDSTATS is not set # # Security options @@ -773,6 +822,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WHIRLPOOL=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -780,16 +830,19 @@ CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig --- a/arch/ppc64/configs/pSeries_defconfig 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/configs/pSeries_defconfig 2004-09-06 16:37:55 -07:00 @@ -16,27 +16,34 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y # # General setup # CONFIG_SWAP=y CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -48,6 +55,7 @@ # CONFIG_MODVERSIONS is not set # CONFIG_KMOD is not set CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y # # Platform support @@ -59,14 +67,18 @@ CONFIG_PPC_OF=y CONFIG_ALTIVEC=y # CONFIG_PPC_PMAC is not set +CONFIG_PPC_SPLPAR=y # CONFIG_BOOTX_TEXT is not set # CONFIG_POWER4_ONLY is not set -# CONFIG_IOMMU_VMERGE is not set +CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y CONFIG_IRQ_ALL_CPUS=y -CONFIG_NR_CPUS=32 +CONFIG_NR_CPUS=128 # CONFIG_HMT is not set -# CONFIG_DISCONTIGMEM is not set +CONFIG_DISCONTIGMEM=y +CONFIG_NUMA=y +CONFIG_SCHED_SMT=y +# CONFIG_PREEMPT is not set CONFIG_PPC_RTAS=y CONFIG_RTAS_FLASH=m CONFIG_SCANLOG=m @@ -81,6 +93,7 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y +CONFIG_HOTPLUG_CPU=y # # PCMCIA/CardBus support @@ -107,7 +120,9 @@ # # Generic Driver Options # -CONFIG_FW_LOADER=m +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set # @@ -127,7 +142,7 @@ # # Block devices # -CONFIG_BLK_DEV_FD=y +CONFIG_BLK_DEV_FD=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set @@ -135,7 +150,8 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y @@ -149,9 +165,9 @@ # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set @@ -194,6 +210,7 @@ # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y @@ -219,7 +236,6 @@ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_REPORT_LUNS=y CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_LOGGING is not set @@ -233,28 +249,32 @@ # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +CONFIG_SCSI_IBMVSCSI=m # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set +CONFIG_SCSI_IPR=y +# CONFIG_SCSI_IPR_TRACE is not set +# CONFIG_SCSI_IPR_DUMP is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set @@ -277,11 +297,15 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y +CONFIG_MD_RAID10=m CONFIG_MD_RAID5=y -CONFIG_MD_RAID6=y -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support @@ -296,6 +320,7 @@ # # I2O device support # +# CONFIG_I2O is not set # # Macintosh device drivers @@ -322,19 +347,17 @@ # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set -CONFIG_INET_ECN=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m +CONFIG_INET_TUNNEL=y # # IP: Virtual Server Configuration # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -394,16 +417,24 @@ CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +# CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_XFRM=y CONFIG_XFRM_USER=m # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set CONFIG_LLC=y # CONFIG_LLC2 is not set # CONFIG_IPX is not set @@ -419,28 +450,35 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing # # CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +CONFIG_NETPOLL_RX=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m # # ARCnet devices # # CONFIG_ARCNET is not set -CONFIG_DUMMY=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set CONFIG_NET_VENDOR_3COM=y @@ -452,6 +490,7 @@ # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set +CONFIG_IBMVETH=m CONFIG_NET_PCI=y CONFIG_PCNET32=y # CONFIG_AMD8111_ETH is not set @@ -471,6 +510,7 @@ # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -484,7 +524,6 @@ # 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=y @@ -493,59 +532,40 @@ # CONFIG_IXGB=m # CONFIG_IXGB_NAPI is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_IBMVETH=m -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set +CONFIG_S2IO=m +# CONFIG_S2IO_NAPI is not set # # Token Ring devices # CONFIG_TR=y CONFIG_IBMOL=y -# CONFIG_IBMLS is not set # CONFIG_3C359 is not set # CONFIG_TMS380TR is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set # -# IrDA (infrared) support +# Wireless LAN (non-hamradio) # -# CONFIG_IRDA is not set +# CONFIG_NET_RADIO is not set # -# Bluetooth support +# Wan interfaces # -# CONFIG_BT is not set -CONFIG_NETPOLL=y -CONFIG_NETPOLL_RX=y -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +CONFIG_NETCONSOLE=y # # ISDN subsystem @@ -591,15 +611,16 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set +# 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=y # CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=y # CONFIG_INPUT_UINPUT is not set # @@ -624,16 +645,12 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_PMACZILOG is not set +CONFIG_SERIAL_ICOM=m CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_HVC_CONSOLE=y - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +CONFIG_HVCS=m # # IPMI @@ -656,7 +673,7 @@ # CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 +CONFIG_MAX_RAW_DEVS=1024 # # I2C support @@ -669,11 +686,13 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support # # CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set # CONFIG_I2C_ALI15X3 is not set # CONFIG_I2C_AMD756 is not set # CONFIG_I2C_AMD8111 is not set @@ -691,30 +710,52 @@ # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set # -# I2C Hardware Sensors Chip support +# Hardware Sensors Chip support # # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_FSCHER is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set # CONFIG_SENSORS_LM83 is not set # CONFIG_SENSORS_LM85 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set + +# +# Other I2C Chip support +# +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # @@ -732,12 +773,14 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y # CONFIG_FB_CT65550 is not set +# CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set -# CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_RIVA is not set CONFIG_FB_MATROX=y @@ -765,10 +808,8 @@ # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_PCI_CONSOLE=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -798,11 +839,14 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set # # USB Host Controller Drivers # CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set @@ -814,6 +858,7 @@ # CONFIG_USB_PRINTER is not set CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_RW_DETECT is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set @@ -834,7 +879,10 @@ # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set # # USB Imaging devices @@ -881,6 +929,8 @@ # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_TEST is not set # @@ -905,7 +955,10 @@ CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set -CONFIG_JFS_FS=y +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set @@ -928,6 +981,7 @@ # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -935,6 +989,8 @@ CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -942,6 +998,7 @@ # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set @@ -974,18 +1031,22 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y +CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y +CONFIG_EXPORTFS=m CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1001,7 +1062,7 @@ # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set @@ -1024,7 +1085,8 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -1049,15 +1111,18 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_DEBUG_SLAB is not set -CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_IRQSTACKS=y +# CONFIG_SCHEDSTATS is not set # # Security options @@ -1071,24 +1136,31 @@ CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_WHIRLPOOL=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_TEA=m CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # # Library routines # +CONFIG_CRC_CCITT=m CONFIG_CRC32=y +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c --- a/arch/ppc64/kernel/asm-offsets.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/asm-offsets.c 2004-09-06 16:37:53 -07:00 @@ -58,6 +58,7 @@ DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr)); DEFINE(KSP, offsetof(struct thread_struct, ksp)); + DEFINE(KSP_VSID, offsetof(struct thread_struct, ksp_vsid)); #ifdef CONFIG_ALTIVEC DEFINE(THREAD_VR0, offsetof(struct thread_struct, vr[0])); @@ -98,11 +99,6 @@ DEFINE(PACAHTLBSEGS, offsetof(struct paca_struct, context.htlb_segs)); #endif /* CONFIG_HUGETLB_PAGE */ DEFINE(PACADEFAULTDECR, offsetof(struct paca_struct, default_decr)); - DEFINE(PACAPROFENABLED, offsetof(struct paca_struct, prof_enabled)); - DEFINE(PACAPROFLEN, offsetof(struct paca_struct, prof_len)); - DEFINE(PACAPROFSHIFT, offsetof(struct paca_struct, prof_shift)); - DEFINE(PACAPROFBUFFER, offsetof(struct paca_struct, prof_buffer)); - DEFINE(PACAPROFSTEXT, offsetof(struct paca_struct, prof_stext)); DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb)); diff -Nru a/arch/ppc64/kernel/chrp_setup.c b/arch/ppc64/kernel/chrp_setup.c --- a/arch/ppc64/kernel/chrp_setup.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc64/kernel/chrp_setup.c 2004-09-06 16:37:51 -07:00 @@ -229,10 +229,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { - struct device_node * dn; - char * hypertas; - unsigned int len; - ppc_md.setup_arch = chrp_setup_arch; ppc_md.get_cpuinfo = chrp_get_cpuinfo; if (naca->interrupt_controller == IC_OPEN_PIC) { @@ -261,10 +257,18 @@ ppc_md.progress = chrp_progress; - /* Build up the firmware_features bitmask field - * using contents of device-tree/ibm,hypertas-functions. - * Ultimately this functionality may be moved into prom.c prom_init(). - */ +} + +/* Build up the firmware_features bitmask field + * using contents of device-tree/ibm,hypertas-functions. + * Ultimately this functionality may be moved into prom.c prom_init(). + */ +void __init fw_feature_init(void) +{ + struct device_node * dn; + char * hypertas; + unsigned int len; + cur_cpu_spec->firmware_features = 0; dn = of_find_node_by_path("/rtas"); if (dn == NULL) { diff -Nru a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c --- a/arch/ppc64/kernel/eeh.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/eeh.c 2004-09-06 16:37:53 -07:00 @@ -348,7 +348,7 @@ * ths routine does *not* convert I/O BAR addresses (which start * with 0xE...) to phys addresses! */ -static unsigned long eeh_token_to_phys(unsigned long token) +static inline unsigned long eeh_token_to_phys(unsigned long token) { pte_t *ptep; unsigned long pa, vaddr; @@ -365,24 +365,22 @@ } /** - * eeh_check_failure - check if all 1's data is due to EEH slot freeze - * @token i/o token, should be address in the form 0xA.... - * @val value, should be all 1's (XXX why do we need this arg??) + * eeh_dn_check_failure - check if all 1's data is due to EEH slot freeze + * @dn device node + * @dev pci device, if known * - * Check for an eeh failure at the given token address. - * The given value has been read and it should be 1's (0xff, 0xffff or - * 0xffffffff). + * Check for an EEH failure for the given device node. Call this + * routine if the result of a read was all 0xff's and you want to + * find out if this is due to an EEH slot freeze event. This routine + * will query firmware for the EEH status. * - * Probe to determine if an error actually occurred. If not return val. - * Otherwise panic. + * Returns 0 if there has not been an EEH error; otherwise returns + * an error code. * - * Note this routine might be called in an interrupt context ... + * It is safe to call this routine in an interrupt context. */ -unsigned long eeh_check_failure(void *token, unsigned long val) +int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) { - unsigned long addr; - struct pci_dev *dev; - struct device_node *dn; int ret; int rets[2]; unsigned long flags; @@ -390,30 +388,19 @@ __get_cpu_var(total_mmio_ffs)++; if (!eeh_subsystem_enabled) - return val; - - /* Finding the phys addr + pci device; this is pretty quick. */ - addr = eeh_token_to_phys((unsigned long)token); - dev = pci_get_device_by_addr(addr); - if (!dev) - return val; + return 0; - dn = pci_device_to_OF_node(dev); - if (!dn) { - pci_dev_put(dev); - return val; - } + if (!dn) + return 0; /* Access to IO BARs might get this far and still not want checking. */ if (!(dn->eeh_mode & EEH_MODE_SUPPORTED) || dn->eeh_mode & EEH_MODE_NOCHECK) { - pci_dev_put(dev); - return val; + return 0; } if (!dn->eeh_config_addr) { - pci_dev_put(dev); - return val; + return 0; } /* @@ -439,7 +426,7 @@ BUID_LO(dn->phb->buid), NULL, 0, virt_to_phys(slot_errbuf), eeh_error_buf_size, - 2 /* Permanent Error */); + 1 /* Temporary Error */); if (log_event == 0) log_error(slot_errbuf, ERR_TYPE_RTAS_LOG, @@ -447,6 +434,10 @@ spin_unlock_irqrestore(&slot_errbuf_lock, flags); + printk(KERN_ERR "EEH: MMIO failure (%d) on device:%s %s\n", + rets[0], pci_name(dev), pci_pretty_name(dev)); + WARN_ON(1); + /* * XXX We should create a separate sysctl for this. * @@ -456,19 +447,53 @@ */ if (panic_on_oops) { panic("EEH: MMIO failure (%d) on device:%s %s\n", - rets[0], pci_name(dev), pci_pretty_name(dev)); + rets[0], dn->name, dn->full_name); } else { __get_cpu_var(ignored_failures)++; printk(KERN_INFO "EEH: MMIO failure (%d) on device:%s %s\n", - rets[0], pci_name(dev), pci_pretty_name(dev)); + rets[0], dn->name, dn->full_name); } } else { __get_cpu_var(false_positives)++; } + return 0; +} + +EXPORT_SYMBOL(eeh_dn_check_failure); + +/** + * eeh_check_failure - check if all 1's data is due to EEH slot freeze + * @token i/o token, should be address in the form 0xA.... + * @val value, should be all 1's (XXX why do we need this arg??) + * + * Check for an eeh failure at the given token address. + * Check for an EEH failure at the given token address. Call this + * routine if the result of a read was all 0xff's and you want to + * find out if this is due to an EEH slot freeze event. This routine + * will query firmware for the EEH status. + * + * Note this routine is safe to call in an interrupt context. + */ +unsigned long eeh_check_failure(void *token, unsigned long val) +{ + unsigned long addr; + struct pci_dev *dev; + struct device_node *dn; + + /* Finding the phys addr + pci device; this is pretty quick. */ + addr = eeh_token_to_phys((unsigned long)token); + dev = pci_get_device_by_addr(addr); + if (!dev) + return val; + + dn = pci_device_to_OF_node(dev); + eeh_dn_check_failure (dn, dev); + pci_dev_put(dev); return val; } + EXPORT_SYMBOL(eeh_check_failure); struct eeh_early_enable_info { diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S --- a/arch/ppc64/kernel/entry.S 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc64/kernel/entry.S 2004-09-06 16:37:50 -07:00 @@ -393,9 +393,17 @@ cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */ cror eq,4*cr1+eq,eq beq 2f /* if yes, don't slbie it */ - oris r6,r6,0x0800 /* set C (class) bit */ - slbie r6 - slbie r6 /* Workaround POWER5 < DD2.1 issue */ + oris r0,r6,0x0800 /* set C (class) bit */ + + /* Bolt in the new stack SLB entry */ + ld r7,KSP_VSID(r4) /* Get new stack's VSID */ + oris r6,r6,(SLB_ESID_V)@h + ori r6,r6,(SLB_NUM_BOLTED-1)@l + slbie r0 + slbie r0 /* Workaround POWER5 < DD2.1 issue */ + slbmte r7,r6 + isync + 2: END_FTR_SECTION_IFSET(CPU_FTR_SLB) clrrdi r7,r8,THREAD_SHIFT /* base of new stack */ diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/head.S 2004-09-06 16:37:53 -07:00 @@ -322,36 +322,11 @@ HMT_MEDIUM; \ mtspr SPRG1,r13; /* save r13 */ \ EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ - lbz r10,PACAPROFENABLED(r13); \ - cmpwi r10,0; \ - bne- label##_Iseries_profile; \ -label##_Iseries_prof_ret: \ lbz r10,PACAPROCENABLED(r13); \ cmpwi 0,r10,0; \ beq- label##_Iseries_masked; \ EXCEPTION_PROLOG_ISERIES_2; \ b label##_common; \ -label##_Iseries_profile: \ - ld r12,PACALPPACA+LPPACASRR1(r13); \ - andi. r12,r12,MSR_PR; /* Test if in kernel */ \ - bne label##_Iseries_prof_ret; \ - ld r11,PACALPPACA+LPPACASRR0(r13); \ - ld r12,PACAPROFSTEXT(r13); /* _stext */ \ - subf r11,r12,r11; /* offset into kernel */ \ - lwz r12,PACAPROFSHIFT(r13); \ - srd r11,r11,r12; \ - lwz r12,PACAPROFLEN(r13); /* profile table length - 1 */ \ - cmpd r11,r12; /* off end? */ \ - ble 1f; \ - mr r11,r12; /* force into last entry */ \ -1: sldi r11,r11,2; /* convert to offset */ \ - ld r12,PACAPROFBUFFER(r13);/* profile buffer */ \ - add r12,r12,r11; \ -2: lwarx r11,0,r12; /* atomically increment */ \ - addi r11,r11,1; \ - stwcx. r11,0,r12; \ - bne- 2b; \ - b label##_Iseries_prof_ret #ifdef DO_SOFT_DISABLE #define DISABLE_INTS \ @@ -1037,6 +1012,9 @@ * interrupts if necessary. */ beq .ret_from_except_lite + /* For a hash failure, we don't bother re-enabling interrupts */ + ble- 12f + /* * hash_page couldn't handle it, set soft interrupt enable back * to what it was before the trap. Note that .local_irq_restore @@ -1047,6 +1025,8 @@ b 11f #else beq fast_exception_return /* Return from exception on success */ + ble- 12f /* Failure return from hash_page */ + /* fall through */ #endif @@ -1064,6 +1044,15 @@ addi r3,r1,STACK_FRAME_OVERHEAD lwz r4,_DAR(r1) bl .bad_page_fault + b .ret_from_except + +/* We have a page fault that hash_page could handle but HV refused + * the PTE insertion + */ +12: bl .save_nvgprs + addi r3,r1,STACK_FRAME_OVERHEAD + lwz r4,_DAR(r1) + bl .low_hash_fault b .ret_from_except /* here we have a segment miss */ diff -Nru a/arch/ppc64/kernel/hvconsole.c b/arch/ppc64/kernel/hvconsole.c --- a/arch/ppc64/kernel/hvconsole.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/hvconsole.c 2004-09-06 16:37:53 -07:00 @@ -1,6 +1,10 @@ /* * hvconsole.c * Copyright (C) 2004 Hollis Blanchard, IBM Corporation + * Copyright (C) 2004 IBM Corporation + * + * Additional Author(s): + * Ryan S. Arnold * * LPAR console support. * @@ -22,14 +26,22 @@ #include #include #include -#include #include +#include -int hvc_get_chars(int index, char *buf, int count) +/** + * hvc_get_chars - retrieve characters from firmware for denoted vterm adatper + * @vtermno: The vtermno or unit_address of the adapter from which to fetch the + * data. + * @buf: The character buffer into which to put the character data fetched from + * firmware. + * @count: not used? + */ +int hvc_get_chars(uint32_t vtermno, char *buf, int count) { unsigned long got; - if (plpar_hcall(H_GET_TERM_CHAR, index, 0, 0, 0, &got, + if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) { /* * Work around a HV bug where it gives us a null @@ -53,40 +65,56 @@ EXPORT_SYMBOL(hvc_get_chars); -int hvc_put_chars(int index, const char *buf, int count) +/** + * hvc_put_chars: send characters to firmware for denoted vterm adapter + * @vtermno: The vtermno or unit_address of the adapter from which the data + * originated. + * @buf: The character buffer that contains the character data to send to + * firmware. + * @count: Send this number of characters. + */ +int hvc_put_chars(uint32_t vtermno, const char *buf, int count) { unsigned long *lbuf = (unsigned long *) buf; long ret; - ret = plpar_hcall_norets(H_PUT_TERM_CHAR, index, count, lbuf[0], + ret = plpar_hcall_norets(H_PUT_TERM_CHAR, vtermno, count, lbuf[0], lbuf[1]); if (ret == H_Success) return count; if (ret == H_Busy) return 0; - return -1; + return -EIO; } EXPORT_SYMBOL(hvc_put_chars); -/* return the number of client vterms present */ -/* XXX this requires an interface change to handle multiple discontiguous - * vterms */ -int hvc_count(int *start_termno) +/* + * We hope/assume that the first vty found corresponds to the first console + * device. + */ +int hvc_find_vtys(void) { struct device_node *vty; int num_found = 0; - /* consider only the first vty node. - * we should _always_ be able to find one. */ - vty = of_find_node_by_name(NULL, "vty"); - if (vty && device_is_compatible(vty, "hvterm1")) { - u32 *termno = (u32 *)get_property(vty, "reg", NULL); - - if (termno && start_termno) - *start_termno = *termno; - num_found = 1; - of_node_put(vty); + for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL; + vty = of_find_node_by_name(vty, "vty")) { + uint32_t *vtermno; + + /* We have statically defined space for only a certain number of + * console adapters. */ + if (num_found >= MAX_NR_HVC_CONSOLES) + break; + + vtermno = (uint32_t *)get_property(vty, "reg", NULL); + if (!vtermno) + continue; + + if (device_is_compatible(vty, "hvterm1")) { + hvc_instantiate(*vtermno, num_found); + ++num_found; + } } return num_found; diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c --- a/arch/ppc64/kernel/iSeries_setup.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/iSeries_setup.c 2004-09-06 16:37:54 -07:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "iSeries_setup.h" @@ -54,17 +55,12 @@ #include /* Function Prototypes */ -extern void abort(void); extern void ppcdbg_initialize(void); -extern void iSeries_pcibios_init(void); extern void tce_init_iSeries(void); static void build_iSeries_Memory_Map(void); static void setup_iSeries_cache_sizes(void); static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); -extern void build_valid_hpte(unsigned long vsid, unsigned long ea, unsigned long pa, - pte_t *ptep, unsigned hpteflags, unsigned bolted); -static void iSeries_setup_dprofile(void); extern void iSeries_setup_arch(void); extern void iSeries_pci_final_fixup(void); @@ -77,16 +73,10 @@ static unsigned long tbFreqMhz; static unsigned long tbFreqMhzHundreths; -unsigned long dprof_shift; -unsigned long dprof_len; -unsigned int *dprof_buffer; - int piranha_simulator; int boot_cpuid; -extern char _end[]; - extern int rd_size; /* Defined in drivers/block/rd.c */ extern unsigned long klimit; extern unsigned long embedded_sysmap_start; @@ -366,30 +356,6 @@ } *p = 0; - if (strstr(cmd_line, "dprofile=")) { - for (q = cmd_line; (p = strstr(q, "dprofile=")) != 0; ) { - unsigned long size, new_klimit; - - q = p + 9; - if ((p > cmd_line) && (p[-1] != ' ')) - continue; - dprof_shift = simple_strtoul(q, &q, 0); - dprof_len = (unsigned long)_etext - - (unsigned long)_stext; - dprof_len >>= dprof_shift; - size = ((dprof_len * sizeof(unsigned int)) + - (PAGE_SIZE-1)) & PAGE_MASK; - dprof_buffer = (unsigned int *)((klimit + - (PAGE_SIZE-1)) & PAGE_MASK); - new_klimit = ((unsigned long)dprof_buffer) + size; - lmb_reserve(__pa(klimit), (new_klimit-klimit)); - klimit = new_klimit; - memset(dprof_buffer, 0, size); - } - } - - iSeries_setup_dprofile(); - mf_init(); mf_initialized = 1; mb(); @@ -834,22 +800,6 @@ if (embedded_sysmap_end) klimit = KERNELBASE + ((embedded_sysmap_end + 4095) & 0xfffffffffffff000); - } -} - -static void iSeries_setup_dprofile(void) -{ - if (dprof_buffer) { - unsigned i; - - for (i = 0; i < NR_CPUS; ++i) { - paca[i].prof_shift = dprof_shift; - paca[i].prof_len = dprof_len - 1; - paca[i].prof_buffer = dprof_buffer; - paca[i].prof_stext = (unsigned *)_stext; - mb(); - paca[i].prof_enabled = 1; - } } } diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c --- a/arch/ppc64/kernel/irq.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc64/kernel/irq.c 2004-09-06 16:37:52 -07:00 @@ -363,14 +363,16 @@ int handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action) { int status = 0; - int retval = 0; + int ret, retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - retval |= action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; + retval |= ret; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -758,44 +760,6 @@ return ret; } -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - cpumask_t *mask = (cpumask_t *)data; - unsigned long full_count = count, err; - cpumask_t new_value; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - -#ifdef CONFIG_PPC_ISERIES - { - unsigned i; - for (i=0; inlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. @@ -978,7 +931,7 @@ struct thread_info *tp; int i; - for (i = 0; i < NR_CPUS; i++) { + for_each_cpu(i) { memset((void *)softirq_ctx[i], 0, THREAD_SIZE); tp = softirq_ctx[i]; tp->cpu = i; diff -Nru a/arch/ppc64/kernel/lmb.c b/arch/ppc64/kernel/lmb.c --- a/arch/ppc64/kernel/lmb.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/lmb.c 2004-09-06 16:37:53 -07:00 @@ -20,7 +20,7 @@ #include #include -struct lmb lmb __initdata; +struct lmb lmb; static unsigned long __init lmb_addrs_overlap(unsigned long base1, unsigned long size1, diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/misc.S 2004-09-06 16:37:54 -07:00 @@ -454,12 +454,6 @@ sync blr -_GLOBAL(abs) - cmpi 0,r3,0 - bge 10f - neg r3,r3 -10: blr - _GLOBAL(_get_PVR) mfspr r3,PVR blr diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/kernel/pSeries_lpar.c 2004-09-06 16:37:55 -07:00 @@ -112,6 +112,22 @@ return plpar_hcall_norets(H_PUT_TCE, liobn, ioba, tceval); } +long plpar_tce_put_indirect(unsigned long liobn, + unsigned long ioba, + unsigned long page, + unsigned long count) +{ + return plpar_hcall_norets(H_PUT_TCE_INDIRECT, liobn, ioba, page, count); +} + +long plpar_tce_stuff(unsigned long liobn, + unsigned long ioba, + unsigned long tceval, + unsigned long count) +{ + return plpar_hcall_norets(H_STUFF_TCE, liobn, ioba, tceval, count); +} + long plpar_get_term_char(unsigned long termno, unsigned long *len_ret, char *buf_ret) @@ -161,6 +177,71 @@ } } +DEFINE_PER_CPU(void *, tce_page) = NULL; + +static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, + long npages, unsigned long uaddr, + enum dma_data_direction direction) +{ + u64 rc; + union tce_entry tce, *tcep; + long l, limit; + + if (npages == 1) + return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, + direction); + + tcep = __get_cpu_var(tce_page); + + /* This is safe to do since interrupts are off when we're called + * from iommu_alloc{,_sg}() + */ + if (!tcep) { + tcep = (void *)__get_free_page(GFP_ATOMIC); + /* If allocation fails, fall back to the loop implementation */ + if (!tcep) + return tce_build_pSeriesLP(tbl, tcenum, npages, + uaddr, direction); + __get_cpu_var(tce_page) = tcep; + } + + tce.te_word = 0; + tce.te_rpn = (virt_to_abs(uaddr)) >> PAGE_SHIFT; + tce.te_rdwr = 1; + if (direction != DMA_TO_DEVICE) + tce.te_pciwr = 1; + + /* We can map max one pageful of TCEs at a time */ + do { + /* + * Set up the page with TCE data, looping through and setting + * the values. + */ + limit = min_t(long, npages, PAGE_SIZE/sizeof(union tce_entry)); + + for (l = 0; l < limit; l++) { + tcep[l] = tce; + tce.te_rpn++; + } + + rc = plpar_tce_put_indirect((u64)tbl->it_index, + (u64)tcenum << 12, + (u64)virt_to_abs(tcep), + limit); + + npages -= limit; + tcenum += limit; + } while (npages > 0 && !rc); + + if (rc && printk_ratelimit()) { + printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); + printk("\tindex = 0x%lx\n", (u64)tbl->it_index); + printk("\tnpages = 0x%lx\n", (u64)npages); + printk("\ttce[0] val = 0x%lx\n", tcep[0].te_word); + show_stack(current, (unsigned long *)__get_SP()); + } +} + static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) { u64 rc; @@ -169,23 +250,45 @@ tce.te_word = 0; while (npages--) { - rc = plpar_tce_put((u64)tbl->it_index, + rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, - tce.te_word ); - + tce.te_word); + if (rc && printk_ratelimit()) { - printk("tce_free_pSeriesLP: plpar_tce_put failed\n"); - printk("\trc = %ld\n", rc); + printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); printk("\tindex = 0x%lx\n", (u64)tbl->it_index); printk("\ttcenum = 0x%lx\n", (u64)tcenum); printk("\ttce val = 0x%lx\n", tce.te_word ); show_stack(current, (unsigned long *)__get_SP()); } - + tcenum++; } } + +static void tce_freemulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) +{ + u64 rc; + union tce_entry tce; + + tce.te_word = 0; + + rc = plpar_tce_stuff((u64)tbl->it_index, + (u64)tcenum << 12, + tce.te_word, + npages); + + if (rc && printk_ratelimit()) { + printk("tce_freemulti_pSeriesLP: plpar_tce_stuff failed\n"); + printk("\trc = %ld\n", rc); + printk("\tindex = 0x%lx\n", (u64)tbl->it_index); + printk("\tnpages = 0x%lx\n", (u64)npages); + printk("\ttce val = 0x%lx\n", tce.te_word ); + show_stack(current, (unsigned long *)__get_SP()); + } +} + int vtermno; /* virtual terminal# for udbg */ static void udbg_putcLP(unsigned char c) @@ -315,8 +418,13 @@ tce_init_pSeries(); - ppc_md.tce_build = tce_build_pSeriesLP; - ppc_md.tce_free = tce_free_pSeriesLP; + if (cur_cpu_spec->firmware_features & FW_FEATURE_MULTITCE) { + ppc_md.tce_build = tce_buildmulti_pSeriesLP; + ppc_md.tce_free = tce_freemulti_pSeriesLP; + } else { + ppc_md.tce_build = tce_build_pSeriesLP; + ppc_md.tce_free = tce_free_pSeriesLP; + } pci_iommu_init(); @@ -377,7 +485,7 @@ lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, lhpte.dw0.dword0, lhpte.dw1.dword1, &slot, &dummy0, &dummy1); - if (lpar_rc == H_PTEG_Full) + if (unlikely(lpar_rc == H_PTEG_Full)) return -1; /* @@ -385,7 +493,7 @@ * will fail. However we must catch the failure in hash_page * or we will loop forever, so return -2 in this case. */ - if (lpar_rc != H_Success) + if (unlikely(lpar_rc != H_Success)) return -2; /* Because of iSeries, we have to pass down the secondary @@ -415,9 +523,7 @@ if (lpar_rc == H_Success) return i; - if (lpar_rc != H_Not_Found) - panic("Bad return code from pte remove rc = %lx\n", - lpar_rc); + BUG_ON(lpar_rc != H_Not_Found); slot_offset++; slot_offset &= 0x7; @@ -447,8 +553,7 @@ if (lpar_rc == H_Not_Found) return -1; - if (lpar_rc != H_Success) - panic("bad return code from pte protect rc = %lx\n", lpar_rc); + BUG_ON(lpar_rc != H_Success); return 0; } @@ -464,11 +569,10 @@ /* Do not need RPN to logical page translation */ /* No cross CEC PFT access */ flags = 0; - + lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1); - if (lpar_rc != H_Success) - panic("Error on pte read in get_hpte0 rc = %lx\n", lpar_rc); + BUG_ON(lpar_rc != H_Success); return dword0; } @@ -519,15 +623,12 @@ vpn = va >> PAGE_SHIFT; slot = pSeries_lpar_hpte_find(vpn); - if (slot == -1) - panic("updateboltedpp: Could not find page to bolt\n"); + BUG_ON(slot == -1); flags = newpp & 3; lpar_rc = plpar_pte_protect(flags, slot, 0); - if (lpar_rc != H_Success) - panic("Bad return code from pte bolted protect rc = %lx\n", - lpar_rc); + BUG_ON(lpar_rc != H_Success); } static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, @@ -546,8 +647,7 @@ if (lpar_rc == H_Not_Found) return; - if (lpar_rc != H_Success) - panic("Bad return code from invalidate rc = %lx\n", lpar_rc); + BUG_ON(lpar_rc != H_Success); } /* diff -Nru a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c --- a/arch/ppc64/kernel/pSeries_pci.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/kernel/pSeries_pci.c 2004-09-06 16:37:55 -07:00 @@ -68,7 +68,9 @@ int ret; if (!dn) - return -2; + return PCIBIOS_DEVICE_NOT_FOUND; + if (where & (size - 1)) + return PCIBIOS_BAD_REGISTER_NUMBER; addr = (dn->busno << 16) | (dn->devfn << 8) | where; buid = dn->phb->buid; @@ -79,7 +81,15 @@ ret = rtas_call(read_pci_config, 2, 2, &returnval, addr, size); } *val = returnval; - return ret; + + if (ret) + return PCIBIOS_DEVICE_NOT_FOUND; + + if (returnval == EEH_IO_ERROR_VALUE(size) + && eeh_dn_check_failure (dn, NULL)) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; } static int rtas_pci_read_config(struct pci_bus *bus, @@ -106,7 +116,9 @@ int ret; if (!dn) - return -2; + return PCIBIOS_DEVICE_NOT_FOUND; + if (where & (size - 1)) + return PCIBIOS_BAD_REGISTER_NUMBER; addr = (dn->busno << 16) | (dn->devfn << 8) | where; buid = dn->phb->buid; @@ -115,7 +127,11 @@ } else { ret = rtas_call(write_pci_config, 3, 1, NULL, addr, size, (ulong)val); } - return ret; + + if (ret) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; } static int rtas_pci_write_config(struct pci_bus *bus, diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/pacaData.c 2004-09-06 16:37:54 -07:00 @@ -27,13 +27,6 @@ * field correctly */ extern unsigned long __toc_start; -/* Stack space used when we detect a bad kernel stack pointer, and - * early in SMP boots before relocation is enabled. - * - * ABI requires stack to be 128-byte aligned - */ -char emergency_stack[PAGE_SIZE * NR_CPUS] __attribute__((aligned(128))); - /* The Paca is an array with one entry per processor. Each contains an * ItLpPaca, which contains the information shared between the * hypervisor and Linux. Each also contains an ItLpRegSave area which @@ -55,7 +48,6 @@ .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ .stab_real = (asrr), /* Real pointer to segment table */ \ .stab_addr = (asrv), /* Virt pointer to segment table */ \ - .emergency_sp = &emergency_stack[((number)+1) * PAGE_SIZE], \ .cpu_start = (start), /* Processor start */ \ .lppaca = { \ .xDesc = 0xd397d781, /* "LpPa" */ \ diff -Nru a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c --- a/arch/ppc64/kernel/pmac_feature.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/pmac_feature.c 2004-09-06 16:37:54 -07:00 @@ -611,7 +611,7 @@ device_initcall(pmac_feature_late_init); - +#if 0 static void dump_HT_speeds(char *name, u32 cfg, u32 frq) { int freqs[16] = { 200,300,400,500,600,800,1000,0,0,0,0,0,0,0,0,0 }; @@ -625,6 +625,7 @@ name, freqs[freq], bits[(cfg >> 28) & 0x7], bits[(cfg >> 24) & 0x7]); } +#endif void __init pmac_check_ht_link(void) { diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/kernel/process.c 2004-09-06 16:37:53 -07:00 @@ -356,6 +356,16 @@ kregs = (struct pt_regs *) sp; sp -= STACK_FRAME_OVERHEAD; p->thread.ksp = sp; + if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) { + unsigned long sp_vsid = get_kernel_vsid(sp); + + sp_vsid <<= SLB_VSID_SHIFT; + sp_vsid |= SLB_VSID_KERNEL; + if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + sp_vsid |= SLB_VSID_L; + + p->thread.ksp_vsid = sp_vsid; + } /* * The PPC64 ABI makes use of a TOC to contain function @@ -458,7 +468,7 @@ } } - return do_fork(clone_flags & ~CLONE_IDLETASK, p2, regs, 0, + return do_fork(clone_flags, p2, regs, 0, (int __user *)parent_tidptr, (int __user *)child_tidptr); } diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/prom.c 2004-09-06 16:37:54 -07:00 @@ -919,40 +919,11 @@ unsigned long secondary_hold = virt_to_abs(*PTRRELOC((unsigned long *)__secondary_hold)); struct systemcfg *_systemcfg = RELOC(systemcfg); - struct paca_struct *lpaca = PTRRELOC(&paca[0]); struct prom_t *_prom = PTRRELOC(&prom); #ifdef CONFIG_SMP struct naca_struct *_naca = RELOC(naca); #endif - /* On pmac, we just fill out the various global bitmasks and - * arrays indicating our CPUs are here, they are actually started - * later on from pmac_smp - */ - if (_systemcfg->platform == PLATFORM_POWERMAC) { - for (node = 0; prom_next_node(&node); ) { - type[0] = 0; - prom_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, RELOC("cpu")) != 0) - continue; - reg = -1; - prom_getprop(node, "reg", ®, sizeof(reg)); - lpaca[cpuid].hw_cpu_id = reg; - -#ifdef CONFIG_SMP - cpu_set(cpuid, RELOC(cpu_possible_map)); - cpu_set(cpuid, RELOC(cpu_present_map)); - if (reg == 0) - cpu_set(cpuid, RELOC(cpu_online_map)); -#endif /* CONFIG_SMP */ - cpuid++; - } - return; - } - - /* Initially, we must have one active CPU. */ - _systemcfg->processorCount = 1; - prom_debug("prom_hold_cpus: start...\n"); prom_debug(" 1) spinloop = 0x%x\n", (unsigned long)spinloop); prom_debug(" 1) *spinloop = 0x%x\n", *spinloop); @@ -996,7 +967,6 @@ prom_debug("\ncpuid = 0x%x\n", cpuid); prom_debug("cpu hw idx = 0x%x\n", reg); - lpaca[cpuid].hw_cpu_id = reg; /* Init the acknowledge var which will be reset by * the secondary cpu when it awakens from its OF @@ -1038,23 +1008,13 @@ * even if we never start it. */ if (cpuid >= NR_CPUS) goto next; -#ifdef CONFIG_SMP - /* Set the number of active processors. */ - _systemcfg->processorCount++; - cpu_set(cpuid, RELOC(cpu_possible_map)); - cpu_set(cpuid, RELOC(cpu_present_map)); -#endif } else { prom_printf("... failed: %x\n", *acknowledge); } } #ifdef CONFIG_SMP - else { + else prom_printf("%x : booting cpu %s\n", cpuid, path); - cpu_set(cpuid, RELOC(cpu_possible_map)); - cpu_set(cpuid, RELOC(cpu_online_map)); - cpu_set(cpuid, RELOC(cpu_present_map)); - } #endif next: #ifdef CONFIG_SMP @@ -1063,13 +1023,9 @@ cpuid++; if (cpuid >= NR_CPUS) continue; - lpaca[cpuid].hw_cpu_id = interrupt_server[i]; prom_printf("%x : preparing thread ... ", interrupt_server[i]); if (_naca->smt_state) { - cpu_set(cpuid, RELOC(cpu_present_map)); - cpu_set(cpuid, RELOC(cpu_possible_map)); - _systemcfg->processorCount++; prom_printf("available\n"); } else { prom_printf("not available\n"); @@ -1099,11 +1055,7 @@ pir & 0x3ff; } } -/* cpu_set(i+1, cpu_online_map); */ - cpu_set(i+1, RELOC(cpu_possible_map)); - cpu_set(i+1, RELOC(cpu_present_map)); } - _systemcfg->processorCount *= 2; } else { prom_printf("Processor is not HMT capable\n"); } diff -Nru a/arch/ppc64/kernel/ras.c b/arch/ppc64/kernel/ras.c --- a/arch/ppc64/kernel/ras.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc64/kernel/ras.c 2004-09-06 16:37:51 -07:00 @@ -161,7 +161,8 @@ RAS_VECTOR_OFFSET, virt_irq_to_real(irq_offset_down(irq)), RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, - critical, __pa(&ras_log_buf), RTAS_ERROR_LOG_MAX); + critical, __pa(&ras_log_buf), + rtas_get_error_log_max()); udbg_printf("EPOW <0x%lx 0x%x 0x%x>\n", *((unsigned long *)&ras_log_buf), status, state); @@ -196,7 +197,8 @@ RAS_VECTOR_OFFSET, virt_irq_to_real(irq_offset_down(irq)), RTAS_INTERNAL_ERROR, 1 /*Time Critical */, - __pa(&ras_log_buf), RTAS_ERROR_LOG_MAX); + __pa(&ras_log_buf), + rtas_get_error_log_max()); rtas_elog = (struct rtas_error_log *)ras_log_buf; diff -Nru a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c --- a/arch/ppc64/kernel/rtas.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc64/kernel/rtas.c 2004-09-06 16:37:51 -07:00 @@ -516,6 +516,26 @@ } #endif /* CONFIG_HOTPLUG_CPU */ +/* + * Return the firmware-specified size of the error log buffer + * for all rtas calls that require an error buffer argument. + * This includes 'check-exception' and 'rtas-last-error'. + */ +int rtas_get_error_log_max(void) +{ + static int rtas_error_log_max; + if (rtas_error_log_max) + return rtas_error_log_max; + + rtas_error_log_max = rtas_token ("rtas-error-log-max"); + if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) || + (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) { + printk (KERN_WARNING "RTAS: bad log buffer size %d\n", rtas_error_log_max); + rtas_error_log_max = RTAS_ERROR_LOG_MAX; + } + return rtas_error_log_max; +} + EXPORT_SYMBOL(rtas_firmware_flash_list); EXPORT_SYMBOL(rtas_token); EXPORT_SYMBOL(rtas_call); @@ -526,3 +546,4 @@ EXPORT_SYMBOL(rtas_get_power_level); EXPORT_SYMBOL(rtas_set_power_level); EXPORT_SYMBOL(rtas_set_indicator); +EXPORT_SYMBOL(rtas_get_error_log_max); diff -Nru a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c --- a/arch/ppc64/kernel/rtasd.c 2004-09-06 16:37:51 -07:00 +++ b/arch/ppc64/kernel/rtasd.c 2004-09-06 16:37:51 -07:00 @@ -373,21 +373,8 @@ rtas_event_scan_rate = *ip; DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate); - ip = (int *)get_property(node, "rtas-error-log-max", NULL); - if (ip == NULL) { - printk(KERN_ERR "rtasd: no rtas-error-log-max\n"); - of_node_put(node); - return -1; - } - rtas_error_log_max = *ip; - DEBUG("rtas-error-log-max %d\n", rtas_error_log_max); - - if (rtas_error_log_max > RTAS_ERROR_LOG_MAX) { - printk(KERN_ERR "rtasd: truncated error log from %d to %d bytes\n", rtas_error_log_max, RTAS_ERROR_LOG_MAX); - rtas_error_log_max = RTAS_ERROR_LOG_MAX; - } - /* Make room for the sequence number */ + rtas_error_log_max = rtas_get_error_log_max(); rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); of_node_put(node); diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2004-09-06 16:37:52 -07:00 +++ b/arch/ppc64/kernel/setup.c 2004-09-06 16:37:52 -07:00 @@ -67,6 +67,7 @@ unsigned long r6, unsigned long r7); +extern void fw_feature_init(void); extern void iSeries_init( void ); extern void iSeries_init_early( void ); extern void pSeries_init_early( void ); @@ -155,6 +156,100 @@ early_console_initialized = 0; } +#if !defined(CONFIG_PPC_ISERIES) && defined(CONFIG_SMP) +/** + * setup_cpu_maps - initialize the following cpu maps: + * cpu_possible_map + * cpu_present_map + * cpu_sibling_map + * + * Having the possible map set up early allows us to restrict allocations + * of things like irqstacks to num_possible_cpus() rather than NR_CPUS. + * + * We do not initialize the online map here; cpus set their own bits in + * cpu_online_map as they come up. + * + * This function is valid only for Open Firmware systems. finish_device_tree + * must be called before using this. + * + * While we're here, we may as well set the "physical" cpu ids in the paca. + */ +static void __init setup_cpu_maps(void) +{ + struct device_node *dn = NULL; + int cpu = 0; + + while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { + u32 *intserv; + int j, len = sizeof(u32), nthreads; + + intserv = (u32 *)get_property(dn, "ibm,ppc-interrupt-server#s", + &len); + if (!intserv) + intserv = (u32 *)get_property(dn, "reg", NULL); + + nthreads = len / sizeof(u32); + + for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { + cpu_set(cpu, cpu_possible_map); + cpu_set(cpu, cpu_present_map); + set_hard_smp_processor_id(cpu, intserv[j]); + cpu++; + } + } + + /* + * On pSeries LPAR, we need to know how many cpus + * could possibly be added to this partition. + */ + if (systemcfg->platform == PLATFORM_PSERIES_LPAR && + (dn = of_find_node_by_path("/rtas"))) { + int num_addr_cell, num_size_cell, maxcpus; + unsigned int *ireg; + + num_addr_cell = prom_n_addr_cells(dn); + num_size_cell = prom_n_size_cells(dn); + + ireg = (unsigned int *) + get_property(dn, "ibm,lrdr-capacity", NULL); + + if (!ireg) + goto out; + + maxcpus = ireg[num_addr_cell + num_size_cell]; + + /* Double maxcpus for processors which have SMT capability */ + if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + maxcpus *= 2; + + if (maxcpus > NR_CPUS) { + printk(KERN_WARNING + "Partition configured for %d cpus, " + "operating system maximum is %d.\n", + maxcpus, NR_CPUS); + maxcpus = NR_CPUS; + } else + printk(KERN_INFO "Partition configured for %d cpus.\n", + maxcpus); + + for (cpu = 0; cpu < maxcpus; cpu++) + cpu_set(cpu, cpu_possible_map); + out: + of_node_put(dn); + } + + /* + * Do the sibling map; assume only two threads per processor. + */ + for_each_cpu(cpu) { + cpu_set(cpu, cpu_sibling_map[cpu]); + if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); + } + + systemcfg->processorCount = num_present_cpus(); +} +#endif /* !defined(CONFIG_PPC_ISERIES) && defined(CONFIG_SMP) */ /* * Do some initial setup of the system. The parameters are those which * were passed in from the bootloader. @@ -185,11 +280,13 @@ #ifdef CONFIG_PPC_PSERIES case PLATFORM_PSERIES: + fw_feature_init(); pSeries_init_early(); parse_bootinfo(); break; case PLATFORM_PSERIES_LPAR: + fw_feature_init(); pSeriesLP_init_early(); parse_bootinfo(); break; @@ -220,6 +317,13 @@ } #endif /* CONFIG_BOOTX_TEXT */ +#ifdef CONFIG_PPC_PMAC + if (systemcfg->platform == PLATFORM_POWERMAC) { + finish_device_tree(); + pmac_init(r3, r4, r5, r6, r7); + } +#endif /* CONFIG_PPC_PMAC */ + #ifdef CONFIG_PPC_PSERIES if (systemcfg->platform & PLATFORM_PSERIES) { early_console_initialized = 1; @@ -227,31 +331,32 @@ __irq_offset_value = NUM_ISA_INTERRUPTS; finish_device_tree(); chrp_init(r3, r4, r5, r6, r7); + } +#endif /* CONFIG_PPC_PSERIES */ #ifdef CONFIG_SMP - /* Start secondary threads on SMT systems; primary threads - * are already in the running state. - */ - for_each_present_cpu(i) { - if (query_cpu_stopped - (get_hard_smp_processor_id(i)) == 0) { - printk("%16.16x : starting thread\n", i); - rtas_call(rtas_token("start-cpu"), 3, 1, &ret, - get_hard_smp_processor_id(i), - (u32)*((unsigned long *)pseries_secondary_smp_init), - i); - } +#ifndef CONFIG_PPC_ISERIES + /* + * iSeries has already initialized the cpu maps at this point. + */ + setup_cpu_maps(); +#endif /* CONFIG_PPC_ISERIES */ + +#ifdef CONFIG_PPC_PSERIES + /* Start secondary threads on SMT systems; primary threads + * are already in the running state. + */ + for_each_present_cpu(i) { + if (query_cpu_stopped(get_hard_smp_processor_id(i)) == 0) { + printk("%16.16x : starting thread\n", i); + rtas_call(rtas_token("start-cpu"), 3, 1, &ret, + get_hard_smp_processor_id(i), + (u32)*((unsigned long *)pseries_secondary_smp_init), + i); } -#endif /* CONFIG_SMP */ } #endif /* CONFIG_PPC_PSERIES */ - -#ifdef CONFIG_PPC_PMAC - if (systemcfg->platform == PLATFORM_POWERMAC) { - finish_device_tree(); - pmac_init(r3, r4, r5, r6, r7); - } -#endif /* CONFIG_PPC_PMAC */ +#endif /* CONFIG_SMP */ #if defined(CONFIG_HOTPLUG_CPU) && !defined(CONFIG_PPC_PMAC) rtas_stop_self_args.token = rtas_token("stop-self"); @@ -596,10 +701,13 @@ #ifdef CONFIG_IRQSTACKS static void __init irqstack_early_init(void) { - int i; + unsigned int i; - /* interrupt stacks must be under 256MB, we cannot afford to take SLB misses on them */ - for (i = 0; i < NR_CPUS; i++) { + /* + * interrupt stacks must be under 256MB, we cannot afford to take + * SLB misses on them. + */ + for_each_cpu(i) { softirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, 0x10000000)); hardirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, @@ -611,6 +719,24 @@ #endif /* + * Stack space used when we detect a bad kernel stack pointer, and + * early in SMP boots before relocation is enabled. + */ +static void __init emergency_stack_init(void) +{ + unsigned int i; + + /* + * Emergency stacks must be under 256MB, we cannot afford to take + * SLB misses on them. The ABI also requires them to be 128-byte + * aligned. + */ + for_each_cpu(i) + paca[i].emergency_sp = __va(lmb_alloc_base(PAGE_SIZE, 128, + 0x10000000)) + PAGE_SIZE; +} + +/* * Called into from start_kernel, after lock_kernel has been called. * Initializes bootmem, which is unsed to manage page allocation until * mem_init is called. @@ -656,6 +782,7 @@ *cmdline_p = cmd_line; irqstack_early_init(); + emergency_stack_init(); /* set up the bootmem stuff with available memory */ do_init_bootmem(); diff -Nru a/arch/ppc64/kernel/signal.c b/arch/ppc64/kernel/signal.c --- a/arch/ppc64/kernel/signal.c 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc64/kernel/signal.c 2004-09-06 16:37:50 -07:00 @@ -459,17 +459,13 @@ /* Set up Signal Frame */ setup_rt_frame(sig, ka, info, oldset, regs); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); + sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); sigaddset(¤t->blocked,sig); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); } - return; } static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) @@ -512,6 +508,7 @@ { siginfo_t info; int signr; + struct k_sigaction ka; /* * If the current thread is 32 bit - invoke the @@ -523,14 +520,12 @@ if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { - struct k_sigaction *ka = ¤t->sighand->action[signr-1]; - /* Whee! Actually deliver the signal. */ if (TRAP(regs) == 0x0C00) - syscall_restart(regs, ka); - handle_signal(signr, ka, &info, oldset, regs); + syscall_restart(regs, &ka); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/kernel/signal32.c 2004-09-06 16:37:55 -07:00 @@ -699,9 +699,7 @@ printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n", regs, frame, newsp); #endif - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static long do_setcontext32(struct ucontext32 __user *ucp, struct pt_regs *regs, int sig) @@ -864,9 +862,7 @@ printk("badframe in handle_signal, regs=%p frame=%x newsp=%x\n", regs, frame, *newspp); #endif - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -928,18 +924,16 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs) { siginfo_t info; - struct k_sigaction *ka; unsigned int frame, newsp; int signr, ret; + struct k_sigaction ka; if (!oldset) oldset = ¤t->blocked; newsp = frame = 0; - signr = get_signal_to_deliver(&info, regs, NULL); - - ka = (signr == 0)? NULL: ¤t->sighand->action[signr-1]; + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (TRAP(regs) == 0x0C00 /* System Call! */ && regs->ccr & 0x10000000 /* error signalled */ @@ -950,7 +944,7 @@ if (signr > 0 && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK || (ret == ERESTARTSYS - && !(ka->sa.sa_flags & SA_RESTART)))) { + && !(ka.sa.sa_flags & SA_RESTART)))) { /* make the system call return an EINTR error */ regs->result = -EINTR; regs->gpr[3] = EINTR; @@ -969,7 +963,7 @@ if (signr == 0) return 0; /* no signals delivered */ - if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size + if ((ka.sa.sa_flags & SA_ONSTACK) && current->sas_ss_size && (!on_sig_stack(regs->gpr[1]))) newsp = (current->sas_ss_sp + current->sas_ss_size); else @@ -977,17 +971,15 @@ newsp &= ~0xfUL; /* Whee! Actually deliver the signal. */ - if (ka->sa.sa_flags & SA_SIGINFO) - handle_rt_signal32(signr, ka, &info, oldset, regs, newsp); + if (ka.sa.sa_flags & SA_SIGINFO) + handle_rt_signal32(signr, &ka, &info, oldset, regs, newsp); else - handle_signal32(signr, ka, &info, oldset, regs, newsp); - - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; + handle_signal32(signr, &ka, &info, oldset, regs, newsp); - if (!(ka->sa.sa_flags & SA_NODEFER)) { + if (!(ka.sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); + sigorsets(¤t->blocked, ¤t->blocked, + &ka.sa.sa_mask); sigaddset(¤t->blocked, signr); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/smp.c 2004-09-06 16:37:54 -07:00 @@ -59,6 +59,7 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE; cpumask_t cpu_online_map = CPU_MASK_NONE; +cpumask_t cpu_sibling_map[NR_CPUS] = { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_possible_map); @@ -400,56 +401,11 @@ } return 1; } - -static inline void look_for_more_cpus(void) -{ - int num_addr_cell, num_size_cell, len, i, maxcpus; - struct device_node *np; - unsigned int *ireg; - - /* Find the property which will tell us about how many CPUs - * we're allowed to have. */ - if ((np = find_path_device("/rtas")) == NULL) { - printk(KERN_ERR "Could not find /rtas in device tree!"); - return; - } - num_addr_cell = prom_n_addr_cells(np); - num_size_cell = prom_n_size_cells(np); - - ireg = (unsigned int *)get_property(np, "ibm,lrdr-capacity", &len); - if (ireg == NULL) { - /* FIXME: make sure not marked as lrdr_capable() */ - return; - } - - maxcpus = ireg[num_addr_cell + num_size_cell]; - - /* Double maxcpus for processors which have SMT capability */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) - maxcpus *= 2; - - - if (maxcpus > NR_CPUS) { - printk(KERN_WARNING - "Partition configured for %d cpus, " - "operating system maximum is %d.\n", maxcpus, NR_CPUS); - maxcpus = NR_CPUS; - } else - printk(KERN_INFO "Partition configured for %d cpus.\n", - maxcpus); - - /* Make those cpus (which might appear later) possible too. */ - for (i = 0; i < maxcpus; i++) - cpu_set(i, cpu_possible_map); -} #else /* ... CONFIG_HOTPLUG_CPU */ static inline int __devinit smp_startup_cpu(unsigned int lcpu) { return 1; } -static inline void look_for_more_cpus(void) -{ -} #endif /* CONFIG_HOTPLUG_CPU */ static void smp_pSeries_kick_cpu(int nr) @@ -591,10 +547,7 @@ void smp_local_timer_interrupt(struct pt_regs * regs) { - if (!--(get_paca()->prof_counter)) { - update_process_times(user_mode(regs)); - (get_paca()->prof_counter)=get_paca()->prof_multiplier; - } + update_process_times(user_mode(regs)); } void smp_message_recv(int msg, struct pt_regs *regs) @@ -800,21 +753,12 @@ static void __init smp_create_idle(unsigned int cpu) { - struct pt_regs regs; struct task_struct *p; /* create a process for the processor */ - /* only regs.msr is actually used, and 0 is OK for it */ - memset(®s, 0, sizeof(struct pt_regs)); - p = copy_process(CLONE_VM | CLONE_IDLETASK, - 0, ®s, 0, NULL, NULL); + p = fork_idle(cpu); if (IS_ERR(p)) panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); - - wake_up_forked_process(p); - init_idle(p, cpu); - unhash_process(p); - paca[cpu].__current = p; current_set[cpu] = p->thread_info; } @@ -832,8 +776,6 @@ /* Fixup boot cpu */ smp_store_cpu_info(boot_cpuid); cpu_callin_map[boot_cpuid] = 1; - paca[boot_cpuid].prof_counter = 1; - paca[boot_cpuid].prof_multiplier = 1; #ifndef CONFIG_PPC_ISERIES paca[boot_cpuid].next_jiffy_update_tb = tb_last_stamp = get_tb(); @@ -845,8 +787,6 @@ */ do_gtod.tb_orig_stamp = tb_last_stamp; systemcfg->tb_orig_stamp = tb_last_stamp; - - look_for_more_cpus(); #endif max_cpus = smp_ops->probe(); @@ -865,7 +805,6 @@ { BUG_ON(smp_processor_id() != boot_cpuid); - /* cpu_possible is set up in prom.c */ cpu_set(boot_cpuid, cpu_online_map); paca[boot_cpuid].__current = current; @@ -880,8 +819,6 @@ if (system_state == SYSTEM_BOOTING && !cpu_present(cpu)) return -ENOENT; - paca[cpu].prof_counter = 1; - paca[cpu].prof_multiplier = 1; paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock; if (!(cur_cpu_spec->cpu_features & CPU_FTR_SLB)) { @@ -1007,218 +944,3 @@ set_cpus_allowed(current, old_mask); } - -#ifdef CONFIG_SCHED_SMT -#ifdef CONFIG_NUMA -static struct sched_group sched_group_cpus[NR_CPUS]; -static struct sched_group sched_group_phys[NR_CPUS]; -static struct sched_group sched_group_nodes[MAX_NUMNODES]; -static DEFINE_PER_CPU(struct sched_domain, cpu_domains); -static DEFINE_PER_CPU(struct sched_domain, phys_domains); -static DEFINE_PER_CPU(struct sched_domain, node_domains); -__init void arch_init_sched_domains(void) -{ - int i; - struct sched_group *first = NULL, *last = NULL; - - /* Set up domains */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - struct sched_domain *phys_domain = &per_cpu(phys_domains, i); - struct sched_domain *node_domain = &per_cpu(node_domains, i); - int node = cpu_to_node(i); - cpumask_t nodemask = node_to_cpumask(node); - cpumask_t my_cpumask = cpumask_of_cpu(i); - cpumask_t sibling_cpumask = cpumask_of_cpu(i ^ 0x1); - - *cpu_domain = SD_SIBLING_INIT; - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) - cpus_or(cpu_domain->span, my_cpumask, sibling_cpumask); - else - cpu_domain->span = my_cpumask; - cpu_domain->parent = phys_domain; - cpu_domain->groups = &sched_group_cpus[i]; - - *phys_domain = SD_CPU_INIT; - phys_domain->span = nodemask; - phys_domain->parent = node_domain; - phys_domain->groups = &sched_group_phys[first_cpu(cpu_domain->span)]; - - *node_domain = SD_NODE_INIT; - node_domain->span = cpu_possible_map; - node_domain->groups = &sched_group_nodes[node]; - } - - /* Set up CPU (sibling) groups */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - int j; - first = last = NULL; - - if (i != first_cpu(cpu_domain->span)) - continue; - - for_each_cpu_mask(j, cpu_domain->span) { - struct sched_group *cpu = &sched_group_cpus[j]; - - cpus_clear(cpu->cpumask); - cpu_set(j, cpu->cpumask); - cpu->cpu_power = SCHED_LOAD_SCALE; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - } - - for (i = 0; i < MAX_NUMNODES; i++) { - int j; - cpumask_t nodemask; - struct sched_group *node = &sched_group_nodes[i]; - cpumask_t node_cpumask = node_to_cpumask(i); - cpus_and(nodemask, node_cpumask, cpu_possible_map); - - if (cpus_empty(nodemask)) - continue; - - first = last = NULL; - /* Set up physical groups */ - for_each_cpu_mask(j, nodemask) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, j); - struct sched_group *cpu = &sched_group_phys[j]; - - if (j != first_cpu(cpu_domain->span)) - continue; - - cpu->cpumask = cpu_domain->span; - /* - * Make each extra sibling increase power by 10% of - * the basic CPU. This is very arbitrary. - */ - cpu->cpu_power = SCHED_LOAD_SCALE + SCHED_LOAD_SCALE*(cpus_weight(cpu->cpumask)-1) / 10; - node->cpu_power += cpu->cpu_power; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - } - - /* Set up nodes */ - first = last = NULL; - for (i = 0; i < MAX_NUMNODES; i++) { - struct sched_group *cpu = &sched_group_nodes[i]; - cpumask_t nodemask; - cpumask_t node_cpumask = node_to_cpumask(i); - cpus_and(nodemask, node_cpumask, cpu_possible_map); - - if (cpus_empty(nodemask)) - continue; - - cpu->cpumask = nodemask; - /* ->cpu_power already setup */ - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - - mb(); - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - cpu_attach_domain(cpu_domain, i); - } -} -#else /* !CONFIG_NUMA */ -static struct sched_group sched_group_cpus[NR_CPUS]; -static struct sched_group sched_group_phys[NR_CPUS]; -static DEFINE_PER_CPU(struct sched_domain, cpu_domains); -static DEFINE_PER_CPU(struct sched_domain, phys_domains); -__init void arch_init_sched_domains(void) -{ - int i; - struct sched_group *first = NULL, *last = NULL; - - /* Set up domains */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - struct sched_domain *phys_domain = &per_cpu(phys_domains, i); - cpumask_t my_cpumask = cpumask_of_cpu(i); - cpumask_t sibling_cpumask = cpumask_of_cpu(i ^ 0x1); - - *cpu_domain = SD_SIBLING_INIT; - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) - cpus_or(cpu_domain->span, my_cpumask, sibling_cpumask); - else - cpu_domain->span = my_cpumask; - cpu_domain->parent = phys_domain; - cpu_domain->groups = &sched_group_cpus[i]; - - *phys_domain = SD_CPU_INIT; - phys_domain->span = cpu_possible_map; - phys_domain->groups = &sched_group_phys[first_cpu(cpu_domain->span)]; - } - - /* Set up CPU (sibling) groups */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - int j; - first = last = NULL; - - if (i != first_cpu(cpu_domain->span)) - continue; - - for_each_cpu_mask(j, cpu_domain->span) { - struct sched_group *cpu = &sched_group_cpus[j]; - - cpus_clear(cpu->cpumask); - cpu_set(j, cpu->cpumask); - cpu->cpu_power = SCHED_LOAD_SCALE; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - } - - first = last = NULL; - /* Set up physical groups */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - struct sched_group *cpu = &sched_group_phys[i]; - - if (i != first_cpu(cpu_domain->span)) - continue; - - cpu->cpumask = cpu_domain->span; - /* See SMT+NUMA setup for comment */ - cpu->cpu_power = SCHED_LOAD_SCALE + SCHED_LOAD_SCALE*(cpus_weight(cpu->cpumask)-1) / 10; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - - mb(); - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - cpu_attach_domain(cpu_domain, i); - } -} -#endif /* CONFIG_NUMA */ -#endif /* CONFIG_SCHED_SMT */ diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c --- a/arch/ppc64/kernel/time.c 2004-09-06 16:37:55 -07:00 +++ b/arch/ppc64/kernel/time.c 2004-09-06 16:37:55 -07:00 @@ -108,46 +108,6 @@ static unsigned adjusting_time = 0; -/* - * The profiling function is SMP safe. (nothing can mess - * around with "current", and the profiling counters are - * updated with atomic operations). This is especially - * useful with a profiling multiplier != 1 - */ -static inline void ppc64_do_profile(struct pt_regs *regs) -{ - unsigned long nip; - extern unsigned long prof_cpu_mask; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - if (!prof_buffer) - return; - - nip = instruction_pointer(regs); - - /* - * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. - * (default is all CPUs.) - */ - if (!((1<>= prof_shift; - /* - * Don't ignore out-of-bounds EIP values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (nip > prof_len-1) - nip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[nip]); -} - static __inline__ void timer_check_rtc(void) { /* @@ -198,6 +158,20 @@ } } +#ifdef CONFIG_SMP +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= (unsigned long)&__lock_text_start && + pc <= (unsigned long)&__lock_text_end) + return regs->link; + + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif + #ifdef CONFIG_PPC_ISERIES /* @@ -278,7 +252,7 @@ irq_enter(); #ifndef CONFIG_PPC_ISERIES - ppc64_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #endif lpaca->lppaca.xIntDword.xFields.xDecrInt = 0; diff -Nru a/arch/ppc64/kernel/vmlinux.lds.S b/arch/ppc64/kernel/vmlinux.lds.S --- a/arch/ppc64/kernel/vmlinux.lds.S 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/kernel/vmlinux.lds.S 2004-09-06 16:37:54 -07:00 @@ -14,6 +14,7 @@ .text : { *(.text .text.*) SCHED_TEXT + LOCK_TEXT *(.fixup) . = ALIGN(4096); _etext = .; @@ -59,12 +60,6 @@ __setup_start = .; *(.init.setup) __setup_end = .; - } - - __param : { - __start___param = .; - *(__param) - __stop___param = .; } .initcall.init : { diff -Nru a/arch/ppc64/lib/locks.c b/arch/ppc64/lib/locks.c --- a/arch/ppc64/lib/locks.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/lib/locks.c 2004-09-06 16:37:53 -07:00 @@ -22,26 +22,9 @@ #ifndef CONFIG_SPINLINE -/* - * On a system with shared processors (that is, where a physical - * processor is multiplexed between several virtual processors), - * there is no point spinning on a lock if the holder of the lock - * isn't currently scheduled on a physical processor. Instead - * we detect this situation and ask the hypervisor to give the - * rest of our timeslice to the lock holder. - * - * So that we can tell which virtual processor is holding a lock, - * we put 0x80000000 | smp_processor_id() in the lock when it is - * held. Conveniently, we have a word in the paca that holds this - * value. - */ - /* waiting for a spinlock... */ #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) -/* We only yield to the hypervisor if we are in shared processor mode */ -#define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc) - void __spin_yield(spinlock_t *lock) { unsigned int lock_value, holder_cpu, yield_count; @@ -68,96 +51,11 @@ #endif } -#else /* SPLPAR || ISERIES */ -#define __spin_yield(x) barrier() -#define SHARED_PROCESSOR 0 -#endif - -/* - * This returns the old value in the lock, so we succeeded - * in getting the lock if the return value is 0. - */ -static __inline__ unsigned long __spin_trylock(spinlock_t *lock) -{ - unsigned long tmp, tmp2; - - __asm__ __volatile__( -" lwz %1,%3(13) # __spin_trylock\n\ -1: lwarx %0,0,%2\n\ - cmpwi 0,%0,0\n\ - bne- 2f\n\ - stwcx. %1,0,%2\n\ - bne- 1b\n\ - isync\n\ -2:" : "=&r" (tmp), "=&r" (tmp2) - : "r" (&lock->lock), "i" (offsetof(struct paca_struct, lock_token)) - : "cr0", "memory"); - - return tmp; -} - -int _raw_spin_trylock(spinlock_t *lock) -{ - return __spin_trylock(lock) == 0; -} - -EXPORT_SYMBOL(_raw_spin_trylock); - -void _raw_spin_lock(spinlock_t *lock) -{ - while (1) { - if (likely(__spin_trylock(lock) == 0)) - break; - do { - HMT_low(); - if (SHARED_PROCESSOR) - __spin_yield(lock); - } while (likely(lock->lock != 0)); - HMT_medium(); - } -} - -EXPORT_SYMBOL(_raw_spin_lock); - -void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags) -{ - unsigned long flags_dis; - - while (1) { - if (likely(__spin_trylock(lock) == 0)) - break; - local_save_flags(flags_dis); - local_irq_restore(flags); - do { - HMT_low(); - if (SHARED_PROCESSOR) - __spin_yield(lock); - } while (likely(lock->lock != 0)); - HMT_medium(); - local_irq_restore(flags_dis); - } -} - -EXPORT_SYMBOL(_raw_spin_lock_flags); - -void spin_unlock_wait(spinlock_t *lock) -{ - while (lock->lock) { - HMT_low(); - if (SHARED_PROCESSOR) - __spin_yield(lock); - } - HMT_medium(); -} - -EXPORT_SYMBOL(spin_unlock_wait); - /* * Waiting for a read lock or a write lock on a rwlock... * This turns out to be the same for read and write locks, since * we only know the holder if it is write-locked. */ -#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) void __rw_yield(rwlock_t *rw) { int lock_value; @@ -184,118 +82,18 @@ yield_count); #endif } - -#else /* SPLPAR || ISERIES */ -#define __rw_yield(x) barrier() #endif -/* - * This returns the old value in the lock + 1, - * so we got a read lock if the return value is > 0. - */ -static __inline__ long __read_trylock(rwlock_t *rw) -{ - long tmp; - - __asm__ __volatile__( -"1: lwarx %0,0,%1 # read_trylock\n\ - extsw %0,%0\n\ - addic. %0,%0,1\n\ - ble- 2f\n\ - stwcx. %0,0,%1\n\ - bne- 1b\n\ - isync\n\ -2:" : "=&r" (tmp) - : "r" (&rw->lock) - : "cr0", "xer", "memory"); - - return tmp; -} - -int _raw_read_trylock(rwlock_t *rw) -{ - return __read_trylock(rw) > 0; -} - -EXPORT_SYMBOL(_raw_read_trylock); - -void _raw_read_lock(rwlock_t *rw) -{ - while (1) { - if (likely(__read_trylock(rw) > 0)) - break; - do { - HMT_low(); - if (SHARED_PROCESSOR) - __rw_yield(rw); - } while (likely(rw->lock < 0)); - HMT_medium(); - } -} - -EXPORT_SYMBOL(_raw_read_lock); - -void _raw_read_unlock(rwlock_t *rw) -{ - long tmp; - - __asm__ __volatile__( - "eieio # read_unlock\n\ -1: lwarx %0,0,%1\n\ - addic %0,%0,-1\n\ - stwcx. %0,0,%1\n\ - bne- 1b" - : "=&r"(tmp) - : "r"(&rw->lock) - : "cr0", "memory"); -} - -EXPORT_SYMBOL(_raw_read_unlock); - -/* - * This returns the old value in the lock, - * so we got the write lock if the return value is 0. - */ -static __inline__ long __write_trylock(rwlock_t *rw) -{ - long tmp, tmp2; - - __asm__ __volatile__( -" lwz %1,%3(13) # write_trylock\n\ -1: lwarx %0,0,%2\n\ - cmpwi 0,%0,0\n\ - bne- 2f\n\ - stwcx. %1,0,%2\n\ - bne- 1b\n\ - isync\n\ -2:" : "=&r" (tmp), "=&r" (tmp2) - : "r" (&rw->lock), "i" (offsetof(struct paca_struct, lock_token)) - : "cr0", "memory"); - - return tmp; -} - -int _raw_write_trylock(rwlock_t *rw) -{ - return __write_trylock(rw) == 0; -} - -EXPORT_SYMBOL(_raw_write_trylock); - -void _raw_write_lock(rwlock_t *rw) +void spin_unlock_wait(spinlock_t *lock) { - while (1) { - if (likely(__write_trylock(rw) == 0)) - break; - do { - HMT_low(); - if (SHARED_PROCESSOR) - __rw_yield(rw); - } while (likely(rw->lock != 0)); - HMT_medium(); + while (lock->lock) { + HMT_low(); + if (SHARED_PROCESSOR) + __spin_yield(lock); } + HMT_medium(); } -EXPORT_SYMBOL(_raw_write_lock); +EXPORT_SYMBOL(spin_unlock_wait); #endif /* CONFIG_SPINLINE */ diff -Nru a/arch/ppc64/mm/Makefile b/arch/ppc64/mm/Makefile --- a/arch/ppc64/mm/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/ppc64/mm/Makefile 2004-09-06 16:37:50 -07:00 @@ -5,6 +5,6 @@ EXTRA_CFLAGS += -mno-minimal-toc obj-y := fault.o init.o imalloc.o hash_utils.o hash_low.o tlb.o \ - slb_low.o slb.o stab.o + slb_low.o slb.o stab.o mmap.o obj-$(CONFIG_DISCONTIGMEM) += numa.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o diff -Nru a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S --- a/arch/ppc64/mm/hash_low.S 2004-09-06 16:37:54 -07:00 +++ b/arch/ppc64/mm/hash_low.S 2004-09-06 16:37:54 -07:00 @@ -278,6 +278,10 @@ b bail htab_pte_insert_failure: - b .htab_insert_failure + /* Bail out restoring old PTE */ + ld r6,STK_PARM(r6)(r1) + std r31,0(r6) + li r3,-1 + b bail diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c --- a/arch/ppc64/mm/hash_utils.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/hash_utils.c 2004-09-06 16:37:53 -07:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -236,14 +237,11 @@ return pp; } -/* - * Called by asm hashtable.S in case of critical insert failure +/* Result code is: + * 0 - handled + * 1 - normal page fault + * -1 - critical hash insertion error */ -void htab_insert_failure(void) -{ - panic("hash_page: pte_insert failed\n"); -} - int hash_page(unsigned long ea, unsigned long access, unsigned long trap) { void *pgdir; @@ -369,6 +367,25 @@ *insn_addr = (unsigned int)(0x48000001 | (offset & 0x03fffffc)); flush_icache_range((unsigned long)insn_addr, 4+ (unsigned long)insn_addr); +} + +/* + * low_hash_fault is called when we the low level hash code failed + * to instert a PTE due to an hypervisor error + */ +void low_hash_fault(struct pt_regs *regs, unsigned long address) +{ + if (user_mode(regs)) { + siginfo_t info; + + info.si_signo = SIGBUS; + info.si_errno = 0; + info.si_code = BUS_ADRERR; + info.si_addr = (void *)address; + force_sig_info(SIGBUS, &info, current); + return; + } + bad_page_fault(regs, address, SIGBUS); } void __init htab_finish_init(void) diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2004-09-06 16:37:53 -07:00 @@ -527,6 +527,108 @@ return -ENOMEM; } +/* + * This mmap-allocator allocates new areas top-down from below the + * stack's low limit (the base): + * + * Because we have an exclusive hugepage region which lies within the + * normal user address space, we have to take special measures to make + * non-huge mmap()s evade the hugepage reserved regions. + */ +unsigned long +arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, + const unsigned long len, const unsigned long pgoff, + const unsigned long flags) +{ + struct vm_area_struct *vma, *prev_vma; + struct mm_struct *mm = current->mm; + unsigned long base = mm->mmap_base, addr = addr0; + int first_time = 1; + + /* requested length too big for entire address space */ + if (len > TASK_SIZE) + return -ENOMEM; + + /* dont allow allocations above current base */ + if (mm->free_area_cache > base) + mm->free_area_cache = base; + + /* requesting a specific address */ + if (addr) { + addr = PAGE_ALIGN(addr); + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start) + && !is_hugepage_only_range(addr,len)) + return addr; + } + +try_again: + /* make sure it can fit in the remaining address space */ + if (mm->free_area_cache < len) + goto fail; + + /* either no address requested or cant fit in requested address hole */ + addr = (mm->free_area_cache - len) & PAGE_MASK; + do { +hugepage_recheck: + if (touches_hugepage_low_range(addr, len)) { + addr = (addr & ((~0) << SID_SHIFT)) - len; + goto hugepage_recheck; + } else if (touches_hugepage_high_range(addr, len)) { + addr = TASK_HPAGE_BASE - len; + } + + /* + * Lookup failure means no vma is above this address, + * i.e. return with success: + */ + if (!(vma = find_vma_prev(mm, addr, &prev_vma))) + return addr; + + /* + * new region fits between prev_vma->vm_end and + * vma->vm_start, use it: + */ + if (addr+len <= vma->vm_start && + (!prev_vma || (addr >= prev_vma->vm_end))) + /* remember the address as a hint for next time */ + return (mm->free_area_cache = addr); + else + /* pull free_area_cache down to the first hole */ + if (mm->free_area_cache == vma->vm_end) + mm->free_area_cache = vma->vm_start; + + /* try just below the current vma->vm_start */ + addr = vma->vm_start-len; + } while (len <= vma->vm_start); + +fail: + /* + * if hint left us with no space for the requested + * mapping then try again: + */ + if (first_time) { + mm->free_area_cache = base; + first_time = 0; + goto try_again; + } + /* + * A failed mmap() very likely causes application failure, + * so fall back to the bottom-up function here. This scenario + * can happen with large stack limits and large mmap() + * allocations. + */ + mm->free_area_cache = TASK_UNMAPPED_BASE; + addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); + /* + * Restore the topdown base: + */ + mm->free_area_cache = base; + + return addr; +} + static unsigned long htlb_get_low_area(unsigned long len, u16 segmask) { unsigned long addr = 0; diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/init.c 2004-09-06 16:37:53 -07:00 @@ -85,7 +85,6 @@ /* info on what we think the IO hole is */ unsigned long io_hole_start; unsigned long io_hole_size; -unsigned long top_of_ram; void show_mem(void) { @@ -498,16 +497,12 @@ * So we need some rough way to tell where your big IO hole * is. On pmac, it's between 2G and 4G, on POWER3, it's around * that area as well, on POWER4 we don't have one, etc... - * We need that to implement something approx. decent for - * page_is_ram() so that /dev/mem doesn't map cacheable IO space - * when XFree resquest some IO regions witout using O_SYNC, we - * also need that as a "hint" when sizing the TCE table on POWER3 + * We need that as a "hint" when sizing the TCE table on POWER3 * So far, the simplest way that seem work well enough for us it * to just assume that the first discontinuity in our physical * RAM layout is the IO hole. That may not be correct in the future * (and isn't on iSeries but then we don't care ;) */ - top_of_ram = lmb_end_of_DRAM(); #ifndef CONFIG_PPC_ISERIES for (i = 1; i < lmb.memory.cnt; i++) { @@ -530,22 +525,32 @@ ppc64_boot_msg(0x100, "MM Init Done"); } - /* * This is called by /dev/mem to know if a given address has to * be mapped non-cacheable or not */ -int page_is_ram(unsigned long physaddr) +int page_is_ram(unsigned long pfn) { -#ifdef CONFIG_PPC_ISERIES - return 1; + int i; + unsigned long paddr = (pfn << PAGE_SHIFT); + + for (i=0; i < lmb.memory.cnt; i++) { + unsigned long base; + +#ifdef CONFIG_MSCHUNKS + base = lmb.memory.region[i].physbase; +#else + base = lmb.memory.region[i].base; #endif - if (physaddr >= top_of_ram) - return 0; - return io_hole_start == 0 || physaddr < io_hole_start || - physaddr >= (io_hole_start + io_hole_size); -} + if ((paddr >= base) && + (paddr < (base + lmb.memory.region[i].size))) { + return 1; + } + } + return 0; +} +EXPORT_SYMBOL(page_is_ram); /* * Initialize the bootmem system and give it all the memory we @@ -599,6 +604,7 @@ unsigned long zones_size[MAX_NR_ZONES]; unsigned long zholes_size[MAX_NR_ZONES]; unsigned long total_ram = lmb_phys_mem_size(); + unsigned long top_of_ram = lmb_end_of_DRAM(); printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", top_of_ram, total_ram); @@ -613,7 +619,7 @@ zones_size[ZONE_DMA] = top_of_ram >> PAGE_SHIFT; zholes_size[ZONE_DMA] = (top_of_ram - total_ram) >> PAGE_SHIFT; - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); mem_map = contig_page_data.node_mem_map; } @@ -663,7 +669,7 @@ int nid; for (nid = 0; nid < numnodes; nid++) { - if (node_data[nid].node_spanned_pages != 0) { + if (NODE_DATA(nid)->node_spanned_pages != 0) { printk("freeing bootmem node %x\n", nid); totalram_pages += free_all_bootmem_node(NODE_DATA(nid)); diff -Nru a/arch/ppc64/mm/mmap.c b/arch/ppc64/mm/mmap.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/mm/mmap.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,86 @@ +/* + * linux/arch/ppc64/mm/mmap.c + * + * flexible mmap layout support + * + * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * Started by Ingo Molnar + */ + +#include +#include + +/* + * Top of mmap area (just below the process stack). + * + * Leave an at least ~128 MB hole. + */ +#define MIN_GAP (128*1024*1024) +#define MAX_GAP (TASK_SIZE/6*5) + +static inline unsigned long mmap_base(void) +{ + unsigned long gap = current->rlim[RLIMIT_STACK].rlim_cur; + + if (gap < MIN_GAP) + gap = MIN_GAP; + else if (gap > MAX_GAP) + gap = MAX_GAP; + + return TASK_SIZE - (gap & PAGE_MASK); +} + +static inline int mmap_is_legacy(void) +{ + /* + * Force standard allocation for 64 bit programs. + */ + if (!test_thread_flag(TIF_32BIT)) + return 1; + + if (current->personality & ADDR_COMPAT_LAYOUT) + return 1; + + if (current->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY) + return 1; + + return sysctl_legacy_va_layout; +} + +/* + * This function, called very early during the creation of a new + * process VM image, sets up which VM layout function to use: + */ +void arch_pick_mmap_layout(struct mm_struct *mm) +{ + /* + * Fall back to the standard layout if the personality + * bit is set, or if the expected stack growth is unlimited: + */ + if (mmap_is_legacy()) { + mm->mmap_base = TASK_UNMAPPED_BASE; + mm->get_unmapped_area = arch_get_unmapped_area; + mm->unmap_area = arch_unmap_area; + } else { + mm->mmap_base = mmap_base(); + mm->get_unmapped_area = arch_get_unmapped_area_topdown; + mm->unmap_area = arch_unmap_area_topdown; + } +} diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c --- a/arch/ppc64/mm/numa.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/numa.c 2004-09-06 16:37:53 -07:00 @@ -18,11 +18,8 @@ #include #include -#if 1 -#define dbg(args...) printk(KERN_INFO args) -#else -#define dbg(args...) -#endif +static int numa_debug; +#define dbg(args...) if (numa_debug) { printk(KERN_INFO args); } #ifdef DEBUG_NUMA #define ARRAY_INITIALISER -1 @@ -36,10 +33,19 @@ cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; int nr_cpus_in_node[MAX_NUMNODES] = { [0 ... (MAX_NUMNODES -1)] = 0}; -struct pglist_data node_data[MAX_NUMNODES]; -bootmem_data_t plat_node_bdata[MAX_NUMNODES]; +struct pglist_data *node_data[MAX_NUMNODES]; +bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; static unsigned long node0_io_hole_size; +/* + * We need somewhere to store start/span for each node until we have + * allocated the real node_data structures. + */ +static struct { + unsigned long node_start_pfn; + unsigned long node_spanned_pages; +} init_node_data[MAX_NUMNODES] __initdata; + EXPORT_SYMBOL(node_data); EXPORT_SYMBOL(numa_cpu_lookup_table); EXPORT_SYMBOL(numa_memory_lookup_table); @@ -48,7 +54,6 @@ static inline void map_cpu_to_node(int cpu, int node) { - dbg("cpu %d maps to domain %d\n", cpu, node); numa_cpu_lookup_table[cpu] = node; if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) { cpu_set(cpu, numa_cpumask_lookup_table[node]); @@ -107,8 +112,8 @@ if (tmp && (tmp[0] >= depth)) { numa_domain = tmp[depth]; } else { - printk(KERN_ERR "WARNING: no NUMA information for " - "%s\n", device->full_name); + dbg("WARNING: no NUMA information for %s\n", + device->full_name); numa_domain = 0; } return numa_domain; @@ -137,11 +142,8 @@ rtas_root = of_find_node_by_path("/rtas"); - if (!rtas_root) { - printk(KERN_ERR "WARNING: %s() could not find rtas root\n", - __FUNCTION__); + if (!rtas_root) return -1; - } /* * this property is 2 32-bit integers, each representing a level of @@ -155,8 +157,8 @@ if ((len >= 1) && ref_points) { depth = ref_points[1]; } else { - printk(KERN_ERR "WARNING: could not find NUMA " - "associativity reference point\n"); + dbg("WARNING: could not find NUMA " + "associativity reference point\n"); depth = -1; } of_node_put(rtas_root); @@ -187,6 +189,9 @@ long entries = lmb_end_of_DRAM() >> MEMORY_INCREMENT_SHIFT; unsigned long i; + if (strstr(saved_command_line, "numa=debug")) + numa_debug = 1; + if (strstr(saved_command_line, "numa=off")) { printk(KERN_WARNING "NUMA disabled by user\n"); return -1; @@ -194,13 +199,14 @@ numa_memory_lookup_table = (char *)abs_to_virt(lmb_alloc(entries * sizeof(char), 1)); + memset(numa_memory_lookup_table, 0, entries * sizeof(char)); for (i = 0; i < entries ; i++) numa_memory_lookup_table[i] = ARRAY_INITIALISER; depth = find_min_common_depth(); - printk(KERN_INFO "NUMA associativity depth for CPU/Memory: %d\n", depth); + dbg("NUMA associativity depth for CPU/Memory: %d\n", depth); if (depth < 0) return depth; @@ -225,8 +231,7 @@ numa_domain = 0; } } else { - printk(KERN_ERR "WARNING: no NUMA information for " - "cpu %ld\n", i); + dbg("WARNING: no NUMA information for cpu %ld\n", i); numa_domain = 0; } @@ -281,22 +286,22 @@ * this simple case and complain if there is a gap in * memory */ - if (node_data[numa_domain].node_spanned_pages) { + if (init_node_data[numa_domain].node_spanned_pages) { unsigned long shouldstart = - node_data[numa_domain].node_start_pfn + - node_data[numa_domain].node_spanned_pages; + init_node_data[numa_domain].node_start_pfn + + init_node_data[numa_domain].node_spanned_pages; if (shouldstart != (start / PAGE_SIZE)) { - printk(KERN_ERR "Hole in node, disabling " - "region start %lx length %lx\n", - start, size); + printk(KERN_ERR "WARNING: Hole in node, " + "disabling region start %lx " + "length %lx\n", start, size); continue; } - node_data[numa_domain].node_spanned_pages += + init_node_data[numa_domain].node_spanned_pages += size / PAGE_SIZE; } else { - node_data[numa_domain].node_start_pfn = + init_node_data[numa_domain].node_start_pfn = start / PAGE_SIZE; - node_data[numa_domain].node_spanned_pages = + init_node_data[numa_domain].node_spanned_pages = size / PAGE_SIZE; } @@ -304,9 +309,6 @@ numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = numa_domain; - dbg("memory region %lx to %lx maps to domain %d\n", - start, start+size, numa_domain); - ranges--; if (ranges) goto new_range; @@ -332,6 +334,7 @@ long entries = top_of_ram >> MEMORY_INCREMENT_SHIFT; numa_memory_lookup_table = (char *)abs_to_virt(lmb_alloc(entries * sizeof(char), 1)); + memset(numa_memory_lookup_table, 0, entries * sizeof(char)); for (i = 0; i < entries ; i++) numa_memory_lookup_table[i] = ARRAY_INITIALISER; } @@ -341,8 +344,8 @@ node_set_online(0); - node_data[0].node_start_pfn = 0; - node_data[0].node_spanned_pages = lmb_end_of_DRAM() / PAGE_SIZE; + init_node_data[0].node_start_pfn = 0; + init_node_data[0].node_spanned_pages = lmb_end_of_DRAM() / PAGE_SIZE; for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT) numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0; @@ -350,6 +353,108 @@ node0_io_hole_size = top_of_ram - total_ram; } +static void __init dump_numa_topology(void) +{ + unsigned int node; + unsigned int cpu, count; + + for (node = 0; node < MAX_NUMNODES; node++) { + if (!node_online(node)) + continue; + + printk(KERN_INFO "Node %d CPUs:", node); + + count = 0; + /* + * If we used a CPU iterator here we would miss printing + * the holes in the cpumap. + */ + for (cpu = 0; cpu < NR_CPUS; cpu++) { + if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { + if (count == 0) + printk(" %u", cpu); + ++count; + } else { + if (count > 1) + printk("-%u", cpu - 1); + count = 0; + } + } + + if (count > 1) + printk("-%u", NR_CPUS - 1); + printk("\n"); + } + + for (node = 0; node < MAX_NUMNODES; node++) { + unsigned long i; + + if (!node_online(node)) + continue; + + printk(KERN_INFO "Node %d Memory:", node); + + count = 0; + + for (i = 0; i < lmb_end_of_DRAM(); i += MEMORY_INCREMENT) { + if (numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] == node) { + if (count == 0) + printk(" 0x%lx", i); + ++count; + } else { + if (count > 0) + printk("-0x%lx", i); + count = 0; + } + } + + if (count > 0) + printk("-0x%lx", i); + printk("\n"); + } +} + +/* + * Allocate some memory, satisfying the lmb or bootmem allocator where + * required. nid is the preferred node and end is the physical address of + * the highest address in the node. + * + * Returns the physical address of the memory. + */ +static unsigned long careful_allocation(int nid, unsigned long size, + unsigned long align, unsigned long end) +{ + unsigned long ret = lmb_alloc_base(size, align, end); + + /* retry over all memory */ + if (!ret) + ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); + + if (!ret) + panic("numa.c: cannot allocate %lu bytes on node %d", + size, nid); + + /* + * If the memory came from a previously allocated node, we must + * retry with the bootmem allocator. + */ + if (pa_to_nid(ret) < nid) { + nid = pa_to_nid(ret); + ret = (unsigned long)__alloc_bootmem_node(NODE_DATA(nid), + size, align, 0); + + if (!ret) + panic("numa.c: cannot allocate %lu bytes on node %d", + size, nid); + + ret = virt_to_abs(ret); + + dbg("alloc_bootmem %lx %lx\n", ret, size); + } + + return ret; +} + void __init do_init_bootmem(void) { int nid; @@ -360,6 +465,8 @@ if (parse_numa_properties()) setup_nonnuma(); + else + dump_numa_topology(); for (nid = 0; nid < numnodes; nid++) { unsigned long start_paddr, end_paddr; @@ -367,24 +474,38 @@ unsigned long bootmem_paddr; unsigned long bootmap_pages; - if (node_data[nid].node_spanned_pages == 0) - continue; + start_paddr = init_node_data[nid].node_start_pfn * PAGE_SIZE; + end_paddr = start_paddr + (init_node_data[nid].node_spanned_pages * PAGE_SIZE); - start_paddr = node_data[nid].node_start_pfn * PAGE_SIZE; - end_paddr = start_paddr + - (node_data[nid].node_spanned_pages * PAGE_SIZE); - - dbg("node %d\n", nid); - dbg("start_paddr = %lx\n", start_paddr); - dbg("end_paddr = %lx\n", end_paddr); + /* Allocate the node structure node local if possible */ + NODE_DATA(nid) = (struct pglist_data *)careful_allocation(nid, + sizeof(struct pglist_data), + SMP_CACHE_BYTES, end_paddr); + NODE_DATA(nid) = abs_to_virt(NODE_DATA(nid)); + memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); + + dbg("node %d\n", nid); + dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; + NODE_DATA(nid)->node_start_pfn = + init_node_data[nid].node_start_pfn; + NODE_DATA(nid)->node_spanned_pages = + init_node_data[nid].node_spanned_pages; + + if (init_node_data[nid].node_spanned_pages == 0) + continue; + + dbg("start_paddr = %lx\n", start_paddr); + dbg("end_paddr = %lx\n", end_paddr); bootmap_pages = bootmem_bootmap_pages((end_paddr - start_paddr) >> PAGE_SHIFT); - dbg("bootmap_pages = %lx\n", bootmap_pages); - bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT, + bootmem_paddr = careful_allocation(nid, + bootmap_pages << PAGE_SHIFT, PAGE_SIZE, end_paddr); + memset(abs_to_virt(bootmem_paddr), 0, + bootmap_pages << PAGE_SHIFT); dbg("bootmap_paddr = %lx\n", bootmem_paddr); init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT, @@ -442,7 +563,6 @@ { unsigned long zones_size[MAX_NR_ZONES]; unsigned long zholes_size[MAX_NR_ZONES]; - struct page *node_mem_map; int nid; memset(zones_size, 0, sizeof(zones_size)); @@ -463,17 +583,7 @@ dbg("free_area_init node %d %lx %lx (hole: %lx)\n", nid, zones_size[ZONE_DMA], start_pfn, zholes_size[ZONE_DMA]); - /* - * Give this empty node a dummy struct page to avoid - * us from trying to allocate a node local mem_map - * in free_area_init_node (which will fail). - */ - if (!node_data[nid].node_spanned_pages) - node_mem_map = alloc_bootmem(sizeof(struct page)); - else - node_mem_map = NULL; - - free_area_init_node(nid, NODE_DATA(nid), node_mem_map, - zones_size, start_pfn, zholes_size); + free_area_init_node(nid, NODE_DATA(nid), zones_size, + start_pfn, zholes_size); } } diff -Nru a/arch/ppc64/mm/slb.c b/arch/ppc64/mm/slb.c --- a/arch/ppc64/mm/slb.c 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/slb.c 2004-09-06 16:37:53 -07:00 @@ -24,30 +24,55 @@ extern void slb_allocate(unsigned long ea); +static inline unsigned long mk_esid_data(unsigned long ea, unsigned long slot) +{ + return (ea & ESID_MASK) | SLB_ESID_V | slot; +} + +static inline unsigned long mk_vsid_data(unsigned long ea, unsigned long flags) +{ + return (get_kernel_vsid(ea) << SLB_VSID_SHIFT) | flags; +} + static inline void create_slbe(unsigned long ea, unsigned long vsid, unsigned long flags, unsigned long entry) { - ea = (ea & ESID_MASK) | SLB_ESID_V | entry; - vsid = (vsid << SLB_VSID_SHIFT) | flags; asm volatile("slbmte %0,%1" : - : "r" (vsid), "r" (ea) + : "r" (mk_vsid_data(ea, flags)), + "r" (mk_esid_data(ea, entry)) : "memory" ); } -static void slb_add_bolted(void) +static void slb_flush_and_rebolt(void) { - WARN_ON(!irqs_disabled()); - /* If you change this make sure you change SLB_NUM_BOLTED - * appropriately too */ + * appropriately too. */ + unsigned long ksp_flags = SLB_VSID_KERNEL; + unsigned long ksp_esid_data; - /* Slot 1 - first VMALLOC segment - * Since modules end up there it gets hit very heavily. - */ - create_slbe(VMALLOCBASE, get_kernel_vsid(VMALLOCBASE), - SLB_VSID_KERNEL, 1); + WARN_ON(!irqs_disabled()); - asm volatile("isync":::"memory"); + if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + ksp_flags |= SLB_VSID_L; + + ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); + if ((ksp_esid_data & ESID_MASK) == KERNELBASE) + ksp_esid_data &= ~SLB_ESID_V; + + /* We need to do this all in asm, so we're sure we don't touch + * the stack between the slbia and rebolting it. */ + asm volatile("isync\n" + "slbia\n" + /* Slot 1 - first VMALLOC segment */ + "slbmte %0,%1\n" + /* Slot 2 - kernel stack */ + "slbmte %2,%3\n" + "isync" + :: "r"(mk_vsid_data(VMALLOCBASE, SLB_VSID_KERNEL)), + "r"(mk_esid_data(VMALLOCBASE, 1)), + "r"(mk_vsid_data(ksp_esid_data, ksp_flags)), + "r"(ksp_esid_data) + : "memory"); } /* Flush all user entries from the segment table of the current processor. */ @@ -69,8 +94,7 @@ } asm volatile("isync" : : : "memory"); } else { - asm volatile("isync; slbia; isync" : : : "memory"); - slb_add_bolted(); + slb_flush_and_rebolt(); } /* Workaround POWER5 < DD2.1 issue */ @@ -113,22 +137,27 @@ void slb_initialize(void) { -#ifdef CONFIG_PPC_ISERIES - asm volatile("isync; slbia; isync":::"memory"); -#else + /* On iSeries the bolted entries have already been set up by + * the hypervisor from the lparMap data in head.S */ +#ifndef CONFIG_PPC_ISERIES unsigned long flags = SLB_VSID_KERNEL; - /* Invalidate the entire SLB (even slot 0) & all the ERATS */ - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) - flags |= SLB_VSID_L; + /* Invalidate the entire SLB (even slot 0) & all the ERATS */ + if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + flags |= SLB_VSID_L; - asm volatile("isync":::"memory"); - asm volatile("slbmte %0,%0"::"r" (0) : "memory"); + asm volatile("isync":::"memory"); + asm volatile("slbmte %0,%0"::"r" (0) : "memory"); asm volatile("isync; slbia; isync":::"memory"); - create_slbe(KERNELBASE, get_kernel_vsid(KERNELBASE), - flags, 0); - + create_slbe(KERNELBASE, get_kernel_vsid(KERNELBASE), flags, 0); + create_slbe(VMALLOCBASE, get_kernel_vsid(KERNELBASE), + SLB_VSID_KERNEL, 1); + /* We don't bolt the stack for the time being - we're in boot, + * so the stack is in the bolted segment. By the time it goes + * elsewhere, we'll call _switch() which will bolt in the new + * one. */ + asm volatile("isync":::"memory"); #endif - slb_add_bolted(); + get_paca()->stab_rr = SLB_NUM_BOLTED; } diff -Nru a/arch/ppc64/mm/slb_low.S b/arch/ppc64/mm/slb_low.S --- a/arch/ppc64/mm/slb_low.S 2004-09-06 16:37:53 -07:00 +++ b/arch/ppc64/mm/slb_low.S 2004-09-06 16:37:53 -07:00 @@ -37,8 +37,21 @@ * a free slot first but that took too long. Unfortunately we * dont have any LRU information to help us choose a slot. */ +#ifdef CONFIG_PPC_ISERIES + /* + * On iSeries, the "bolted" stack segment can be cast out on + * shared processor switch so we need to check for a miss on + * it and restore it to the right slot. + */ + ld r9,PACAKSAVE(r13) + clrrdi r9,r9,28 + clrrdi r11,r3,28 + li r10,SLB_NUM_BOLTED-1 /* Stack goes in last bolted slot */ + cmpld r9,r11 + beq 3f +#endif /* CONFIG_PPC_ISERIES */ + ld r10,PACASTABRR(r13) -3: addi r10,r10,1 /* use a cpu feature mask if we ever change our slb size */ cmpldi r10,SLB_NUM_ENTRIES @@ -46,36 +59,9 @@ blt+ 4f li r10,SLB_NUM_BOLTED - /* - * Never cast out the segment for our kernel stack. Since we - * dont invalidate the ERAT we could have a valid translation - * for the kernel stack during the first part of exception exit - * which gets invalidated due to a tlbie from another cpu at a - * non recoverable point (after setting srr0/1) - Anton - */ -4: slbmfee r11,r10 - srdi r11,r11,27 - /* - * Use paca->ksave as the value of the kernel stack pointer, - * because this is valid at all times. - * The >> 27 (rather than >> 28) is so that the LSB is the - * valid bit - this way we check valid and ESID in one compare. - * In order to completely close the tiny race in the context - * switch (between updating r1 and updating paca->ksave), - * we check against both r1 and paca->ksave. - */ - srdi r9,r1,27 - ori r9,r9,1 /* mangle SP for later compare */ - cmpd r11,r9 - beq- 3b - ld r9,PACAKSAVE(r13) - srdi r9,r9,27 - ori r9,r9,1 - cmpd r11,r9 - beq- 3b - +4: std r10,PACASTABRR(r13) - +3: /* r3 = faulting address, r10 = entry */ srdi r9,r3,60 /* get region */ diff -Nru a/arch/s390/Kconfig b/arch/s390/Kconfig --- a/arch/s390/Kconfig 2004-09-06 16:37:52 -07:00 +++ b/arch/s390/Kconfig 2004-09-06 16:37:52 -07:00 @@ -48,33 +48,6 @@ depends on ARCH_S390X = 'n' default y -choice - prompt "Processor type" - default MARCH_G5 - -config MARCH_G5 - bool "S/390 model G5 and G6" - depends on ARCH_S390_31 - help - Select this to build a 31 bit kernel that works - on all S/390 and zSeries machines. - -config MARCH_Z900 - bool "IBM eServer zSeries model z800 and z900" - help - Select this to optimize for zSeries machines. This - will enable some optimizations that are not available - on older 31 bit only CPUs. - -config MARCH_Z990 - bool "IBM eServer zSeries model z890 and z990" - help - Select this enable optimizations for model z890/z990. - This will be slightly faster but does not work on - older machines such as the z900. - -endchoice - config SMP bool "Symmetric multi-processing support" ---help--- @@ -148,6 +121,105 @@ help This allows you to run 32-bit Linux/ELF binaries on your zSeries in 64 bit mode. Everybody wants this; say Y. + +comment "Code generation options" + +choice + prompt "Processor type" + default MARCH_G5 + +config MARCH_G5 + bool "S/390 model G5 and G6" + depends on ARCH_S390_31 + help + Select this to build a 31 bit kernel that works + on all S/390 and zSeries machines. + +config MARCH_Z900 + bool "IBM eServer zSeries model z800 and z900" + help + Select this to optimize for zSeries machines. This + will enable some optimizations that are not available + on older 31 bit only CPUs. + +config MARCH_Z990 + bool "IBM eServer zSeries model z890 and z990" + help + Select this enable optimizations for model z890/z990. + This will be slightly faster but does not work on + older machines such as the z900. + +endchoice + +config PACK_STACK + bool "Pack kernel stack" + help + This option enables the compiler option -mkernel-backchain if it + is available. If the option is available the compiler supports + the new stack layout which dramatically reduces the minimum stack + frame size. With an old compiler a non-leaf function needs a + minimum of 96 bytes on 31 bit and 160 bytes on 64 bit. With + -mkernel-backchain the minimum size drops to 16 byte on 31 bit + and 24 byte on 64 bit. + + Say Y if you are unsure. + +config SMALL_STACK + bool "Use 4kb/8kb for kernel stack instead of 8kb/16kb" + depends on PACK_STACK + help + If you say Y here and the compiler supports the -mkernel-backchain + option the kernel will use a smaller kernel stack size. For 31 bit + the reduced size is 4kb instead of 8kb and for 64 bit it is 8kb + instead of 16kb. This allows to run more thread on a system and + reduces the pressure on the memory management for higher order + page allocations. + + Say N if you are unsure. + + +config CHECK_STACK + bool "Detect kernel stack overflow" + help + This option enables the compiler option -mstack-guard and + -mstack-size if they are available. If the compiler supports them + it will emit additional code to each function prolog to trigger + an illegal operation if the kernel stack is about to overflow. + + Say N if you are unsure. + +config STACK_GUARD + int "Size of the guard area (128-1024)" + range 128 1024 + depends on CHECK_STACK + default "256" + help + This allows you to specify the size of the guard area at the lower + end of the kernel stack. If the kernel stack points into the guard + area on function entry an illegal operation is triggered. The size + needs to be a power of 2. Please keep in mind that the size of an + interrupt frame is 184 bytes for 31 bit and 328 bytes on 64 bit. + The minimum size for the stack guard should be 256 for 31 bit and + 512 for 64 bit. + +config WARN_STACK + bool "Emit compiler warnings for function with broken stack usage" + help + This option enables the compiler options -mwarn-framesize and + -mwarn-dynamicstack. If the compiler supports these options it + will generate warnings for function which either use alloca or + create a stack frame bigger then CONFIG_WARN_STACK_SIZE. + + Say N if you are unsure. + +config WARN_STACK_SIZE + int "Maximum frame size considered safe (128-2048)" + range 128 2048 + depends on WARN_STACK + default "256" + help + This allows you to specify the maximum frame size a function may + have without the compiler complaining about it. comment "I/O subsystem configuration" diff -Nru a/arch/s390/Makefile b/arch/s390/Makefile --- a/arch/s390/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/Makefile 2004-09-06 16:37:51 -07:00 @@ -18,6 +18,7 @@ CFLAGS += -m31 AFLAGS += -m31 UTS_MACHINE := s390 +STACK_SIZE := 8192 endif ifdef CONFIG_ARCH_S390X @@ -26,16 +27,37 @@ CFLAGS += -m64 AFLAGS += -m64 UTS_MACHINE := s390x +STACK_SIZE := 16384 endif cflags-$(CONFIG_MARCH_G5) += $(call cc-option,-march=g5) cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900) cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990) -CFLAGS += $(cflags-y) +ifeq ($(call cc-option-yn,-mkernel-backchain),y) +cflags-$(CONFIG_PACK_STACK) += -mkernel-backchain -D__PACK_STACK +aflags-$(CONFIG_PACK_STACK) += -D__PACK_STACK +cflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK +aflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK +ifdef CONFIG_SMALL_STACK +STACK_SIZE := $(shell echo $$(($(STACK_SIZE)/2)) ) +endif +endif + +ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y) +cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE) +cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD) +endif + +ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) +cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack +cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) +endif + +CFLAGS += -mbackchain $(cflags-y) CFLAGS += $(call cc-option,-finline-limit=10000) CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare -CFLAGS += -mbackchain +AFLAGS += $(aflags-y) OBJCOPYFLAGS := -O binary LDFLAGS_vmlinux := -e start diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig --- a/arch/s390/defconfig 2004-09-06 16:37:54 -07:00 +++ b/arch/s390/defconfig 2004-09-06 16:37:54 -07:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-rc1 +# Mon Aug 30 19:03:48 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -56,15 +58,23 @@ # CONFIG_ARCH_S390X is not set # CONFIG_64BIT is not set CONFIG_ARCH_S390_31=y -CONFIG_MARCH_G5=y -# CONFIG_MARCH_Z900 is not set -# CONFIG_MARCH_Z990 is not set CONFIG_SMP=y CONFIG_NR_CPUS=32 # CONFIG_HOTPLUG_CPU is not set CONFIG_MATHEMU=y # +# Code generation options +# +CONFIG_MARCH_G5=y +# CONFIG_MARCH_Z900 is not set +# CONFIG_MARCH_Z990 is not set +CONFIG_PACK_STACK=y +# CONFIG_SMALL_STACK is not set +# CONFIG_CHECK_STACK is not set +# CONFIG_WARN_STACK is not set + +# # I/O subsystem configuration # CONFIG_MACHCHK_WARNING=y @@ -130,9 +140,7 @@ # # SCSI low-level drivers # -# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_DEBUG is not set CONFIG_ZFCP=y CONFIG_CCW=y @@ -168,6 +176,7 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m +# CONFIG_MD_RAID10 is not set CONFIG_MD_RAID5=m # CONFIG_MD_RAID6 is not set CONFIG_MD_MULTIPATH=m @@ -236,11 +245,13 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set # CONFIG_INET6_IPCOMP is not set +# CONFIG_INET6_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set # CONFIG_NETFILTER is not set CONFIG_XFRM=y @@ -419,7 +430,6 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -443,6 +453,7 @@ CONFIG_EXPORTFS=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set @@ -486,8 +497,8 @@ CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_INFO is not set # # Security options @@ -506,16 +517,18 @@ # CONFIG_CRYPTO_SHA1_Z990 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WHIRLPOOL is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_DES_Z990 is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES_GENERIC is not set +# CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set diff -Nru a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c --- a/arch/s390/kernel/asm-offsets.c 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/kernel/asm-offsets.c 2004-09-06 16:37:51 -07:00 @@ -39,5 +39,9 @@ DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc),); DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap),); DEFINE(__PT_SIZE, sizeof(struct pt_regs),); + BLANK(); + DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain),); + DEFINE(__SF_GPRS, offsetof(struct stack_frame, gprs),); + DEFINE(__SF_EMPTY, offsetof(struct stack_frame, empty1),); return 0; } diff -Nru a/arch/s390/kernel/compat_exec.c b/arch/s390/kernel/compat_exec.c --- a/arch/s390/kernel/compat_exec.c 2004-09-06 16:37:54 -07:00 +++ b/arch/s390/kernel/compat_exec.c 2004-09-06 16:37:54 -07:00 @@ -69,7 +69,7 @@ mpnt->vm_page_prot = PAGE_COPY; mpnt->vm_flags = VM_STACK_FLAGS; insert_vm_struct(mm, mpnt); - mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; + mm->stack_vm = mm->total_vm = vma_pages(mpnt); } for (i = 0 ; i < MAX_ARG_PAGES ; i++) { diff -Nru a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c --- a/arch/s390/kernel/compat_linux.c 2004-09-06 16:37:54 -07:00 +++ b/arch/s390/kernel/compat_linux.c 2004-09-06 16:37:54 -07:00 @@ -725,8 +725,7 @@ int ret; mm_segment_t old_fs = get_fs(); - if (copy_from_user (&info, uinfo, 3*sizeof(int)) || - copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) + if (copy_siginfo_from_user32(&info, uinfo)) return -EFAULT; set_fs (KERNEL_DS); ret = sys_rt_sigqueueinfo(pid, sig, &info); @@ -1219,7 +1218,7 @@ child_tidptr = (int *) (regs.gprs[5] & 0x7fffffffUL); if (!newsp) newsp = regs.gprs[15]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } diff -Nru a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c --- a/arch/s390/kernel/compat_signal.c 2004-09-06 16:37:55 -07:00 +++ b/arch/s390/kernel/compat_signal.c 2004-09-06 16:37:55 -07:00 @@ -218,14 +218,17 @@ struct old_sigaction32 __user *oact) { struct k_sigaction new_ka, old_ka; + unsigned long sa_handler, sa_restorer; int ret; if (act) { compat_old_sigset_t mask; if (verify_area(VERIFY_READ, act, sizeof(*act)) || - __get_user((unsigned long)new_ka.sa.sa_handler, &act->sa_handler) || - __get_user((unsigned long)new_ka.sa.sa_restorer, &act->sa_restorer)) + __get_user(sa_handler, &act->sa_handler) || + __get_user(sa_restorer, &act->sa_restorer)) return -EFAULT; + new_ka.sa.sa_handler = (__sighandler_t) sa_handler; + new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; __get_user(new_ka.sa.sa_flags, &act->sa_flags); __get_user(mask, &act->sa_mask); siginitset(&new_ka.sa.sa_mask, mask); @@ -234,9 +237,11 @@ ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { + sa_handler = (unsigned long) old_ka.sa.sa_handler; + sa_restorer = (unsigned long) old_ka.sa.sa_restorer; if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user((unsigned long)old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user((unsigned long)old_ka.sa.sa_restorer, &oact->sa_restorer)) + __put_user(sa_handler, &oact->sa_handler) || + __put_user(sa_restorer, &oact->sa_restorer)) return -EFAULT; __put_user(old_ka.sa.sa_flags, &oact->sa_flags); __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); @@ -253,6 +258,7 @@ struct sigaction32 __user *oact, size_t sigsetsize) { struct k_sigaction new_ka, old_ka; + unsigned long sa_handler; int ret; compat_sigset_t set32; @@ -261,7 +267,7 @@ return -EINVAL; if (act) { - ret = get_user((unsigned long)new_ka.sa.sa_handler, &act->sa_handler); + ret = get_user(sa_handler, &act->sa_handler); ret |= __copy_from_user(&set32, &act->sa_mask, sizeof(compat_sigset_t)); switch (_NSIG_WORDS) { @@ -278,6 +284,7 @@ if (ret) return -EFAULT; + new_ka.sa.sa_handler = (__sighandler_t) sa_handler; } ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); @@ -311,17 +318,19 @@ struct pt_regs *regs) { stack_t kss, koss; + unsigned long ss_sp; int ret, err = 0; mm_segment_t old_fs = get_fs(); if (uss) { if (!access_ok(VERIFY_READ, uss, sizeof(*uss))) return -EFAULT; - err |= __get_user((unsigned long) kss.ss_sp, &uss->ss_sp); + err |= __get_user(ss_sp, &uss->ss_sp); err |= __get_user(kss.ss_size, &uss->ss_size); err |= __get_user(kss.ss_flags, &uss->ss_flags); if (err) return -EFAULT; + kss.ss_sp = (void *) ss_sp; } set_fs (KERNEL_DS); @@ -333,7 +342,8 @@ if (!ret && uoss) { if (!access_ok(VERIFY_WRITE, uoss, sizeof(*uoss))) return -EFAULT; - err |= __put_user((unsigned long) koss.ss_sp, &uoss->ss_sp); + ss_sp = (unsigned long) koss.ss_sp; + err |= __put_user(ss_sp, &uoss->ss_sp); err |= __put_user(koss.ss_size, &uoss->ss_size); err |= __put_user(koss.ss_flags, &uoss->ss_flags); if (err) @@ -552,9 +562,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -604,9 +612,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -614,19 +620,14 @@ */ void -handle_signal32(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal32(unsigned long sig, struct k_sigaction *ka, + siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) setup_rt_frame32(sig, ka, info, oldset, regs); else setup_frame32(sig, ka, oldset, regs); - - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S --- a/arch/s390/kernel/entry.S 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/kernel/entry.S 2004-09-06 16:37:51 -07:00 @@ -19,6 +19,7 @@ #include #include #include +#include /* * Stack layout for the system_call stack entry. @@ -52,6 +53,9 @@ _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED) +STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER +STACK_SIZE = 1 << STACK_SHIFT + #define BASED(name) name-system_call(%r13) /* @@ -86,10 +90,16 @@ bnz BASED(1f) 0: l %r14,__LC_ASYNC_STACK # are we already on the async stack ? slr %r14,%r15 - sra %r14,13 + sra %r14,STACK_SHIFT be BASED(2f) 1: l %r15,__LC_ASYNC_STACK .endif +#ifdef CONFIG_CHECK_STACK + b BASED(3f) +2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD + bz BASED(stack_overflow) +3: +#endif 2: s %r15,BASED(.Lc_spsize) # make room for registers & psw mvc SP_PSW(8,%r15),0(%r12) # move user PSW to stack la %r12,\psworg @@ -99,7 +109,7 @@ st %r12,SP_ILC(%r15) mvc SP_R12(16,%r15),\savearea # move %r12-%r15 to stack la %r12,0 - st %r12,0(%r15) # clear back chain + st %r12,__SF_BACKCHAIN(%r15) # clear back chain .endm .macro RESTORE_ALL sync @@ -124,19 +134,19 @@ __switch_to_base: tm __THREAD_per(%r3),0xe8 # new process is using per ? bz __switch_to_noper-__switch_to_base(%r1) # if not we're fine - stctl %c9,%c11,24(%r15) # We are using per stuff - clc __THREAD_per(12,%r3),24(%r15) + stctl %c9,%c11,__SF_EMPTY(%r15) # We are using per stuff + clc __THREAD_per(12,%r3),__SF_EMPTY(%r15) be __switch_to_noper-__switch_to_base(%r1) # we got away w/o bashing TLB's lctl %c9,%c11,__THREAD_per(%r3) # Nope we didn't __switch_to_noper: - stm %r6,%r15,24(%r15) # store __switch_to registers of prev task + stm %r6,%r15,__SF_GPRS(%r15)# store __switch_to registers of prev task st %r15,__THREAD_ksp(%r2) # store kernel stack to prev->tss.ksp l %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp - lm %r6,%r15,24(%r15) # load __switch_to registers of next task + lm %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task st %r3,__LC_CURRENT # __LC_CURRENT = current task struct l %r3,__THREAD_info(%r3) # load thread_info from task struct st %r3,__LC_THREAD_INFO - ahi %r3,8192 + ahi %r3,STACK_SIZE st %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack br %r14 @@ -146,24 +156,24 @@ */ .global do_call_softirq do_call_softirq: - stnsm 24(%r15),0xfc - stm %r12,%r15,28(%r15) + stnsm __SF_EMPTY(%r15),0xfc + stm %r12,%r15,__SF_GPRS(%r15) lr %r12,%r15 basr %r13,0 do_call_base: l %r0,__LC_ASYNC_STACK slr %r0,%r15 - sra %r0,13 + sra %r0,STACK_SHIFT be 0f-do_call_base(%r13) l %r15,__LC_ASYNC_STACK 0: sl %r15,.Lc_overhead-do_call_base(%r13) - st %r12,0(%r15) # store backchain + st %r12,__SF_BACKCHAIN(%r15) # store backchain l %r1,.Ldo_softirq-do_call_base(%r13) basr %r14,%r1 - lm %r12,%r15,28(%r12) - ssm 24(%r15) + lm %r12,%r15,__SF_GPRS(%r12) + ssm __SF_EMPTY(%r15) br %r14 - + __critical_start: /* * SVC interrupt handler routine. System calls are synchronous events and @@ -304,9 +314,12 @@ ret_from_fork: l %r13,__LC_SVC_NEW_PSW+4 l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - l %r1,BASED(.Lschedtail) + tm SP_PSW+1(%r15),0x01 # forking a kernel thread ? + bo BASED(0f) + st %r15,SP_R15(%r15) # store stack pointer for new kthread +0: l %r1,BASED(.Lschedtail) basr %r14,%r1 - stosm 24(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts b BASED(sysc_return) # @@ -457,7 +470,7 @@ mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP - stosm 24(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts b BASED(sysc_do_svc) /* @@ -493,16 +506,16 @@ l %r1,SP_R15(%r15) s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) - xc 0(4,%r1),0(%r1) # clear back chain + xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1) # clear back chain lr %r15,%r1 io_resume_loop: tm __TI_flags+3(%r9),_TIF_NEED_RESCHED bno BASED(io_leave) mvc __TI_precount(4,%r9),BASED(.Lc_pactive) - stosm 24(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts l %r1,BASED(.Lschedule) basr %r14,%r1 # call schedule - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts xc __TI_precount(4,%r9),__TI_precount(%r9) b BASED(io_resume_loop) #endif @@ -514,7 +527,7 @@ l %r1,__LC_KERNEL_STACK s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) - xc 0(4,%r1),0(%r1) # clear back chain + xc __SF_BACKCHAIN(4,%r1),__SF_BACKCHAIN(%r1) # clear back chain lr %r15,%r1 # # One of the work bits is on. Find out which one. @@ -532,9 +545,9 @@ # io_reschedule: l %r1,BASED(.Lschedule) - stosm 24(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts basr %r14,%r1 # call scheduler - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts tm __TI_flags+3(%r9),_TIF_WORK_INT bz BASED(io_leave) # there is no work to do b BASED(io_work_loop) @@ -543,12 +556,12 @@ # _TIF_SIGPENDING is set, call do_signal # io_sigpending: - stosm 24(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts la %r2,SP_PTREGS(%r15) # load pt_regs sr %r3,%r3 # clear *oldset l %r1,BASED(.Ldo_signal) basr %r14,%r1 # call do_signal - stnsm 24(%r15),0xfc # disable I/O and ext. interrupts + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts b BASED(io_leave) # out of here, do NOT recheck /* @@ -590,7 +603,7 @@ lctl %c0,%c15,__LC_CREGS_SAVE_AREA # get new ctl regs lam %a0,%a15,__LC_AREGS_SAVE_AREA stosm 0(%r15),0x04 # now we can turn dat on - lm %r6,%r15,24(%r15) # load registers from clone + lm %r6,%r15,__SF_GPRS(%r15) # load registers from clone basr %r14,0 l %r14,restart_addr-.(%r14) br %r14 # branch to start_secondary @@ -609,6 +622,31 @@ restart_crash: .long 0x000a0000,0x00000000 restart_go: +#endif + +#ifdef CONFIG_CHECK_STACK +/* + * The synchronous or the asynchronous stack overflowed. We are dead. + * No need to properly save the registers, we are going to panic anyway. + * Setup a pt_regs so that show_trace can provide a good call trace. + */ +stack_overflow: + l %r15,__LC_PANIC_STACK # change to panic stack + sl %r15,BASED(.Lc_spsize) + mvc SP_PSW(8,%r15),0(%r12) # move user PSW to stack + stm %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack + la %r1,__LC_SAVE_AREA + ch %r12,BASED(.L0x020) # old psw addr == __LC_SVC_OLD_PSW ? + be BASED(0f) + ch %r12,BASED(.L0x028) # old psw addr == __LC_PGM_OLD_PSW ? + be BASED(0f) + la %r1,__LC_SAVE_AREA+16 +0: mvc SP_R12(16,%r15),0(%r1) # move %r12-%r15 to stack + xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear back chain + l %r1,BASED(1f) # branch to kernel_stack_overflow + la %r2,SP_PTREGS(%r15) # load pt_regs + br %r1 +1: .long kernel_stack_overflow #endif cleanup_table_system_call: diff -Nru a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S --- a/arch/s390/kernel/entry64.S 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/kernel/entry64.S 2004-09-06 16:37:51 -07:00 @@ -19,6 +19,7 @@ #include #include #include +#include /* * Stack layout for the system_call stack entry. @@ -48,6 +49,9 @@ SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE +STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER +STACK_SIZE = 1 << STACK_SHIFT + _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED) @@ -85,10 +89,16 @@ jnz 1f 0: lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ? slgr %r14,%r15 - srag %r14,%r14,14 + srag %r14,%r14,STACK_SHIFT jz 2f 1: lg %r15,__LC_ASYNC_STACK # load async stack .endif +#ifdef CONFIG_CHECK_STACK + j 3f +2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD + jz stack_overflow +3: +#endif 2: aghi %r15,-SP_SIZE # make room for registers & psw mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack la %r12,\psworg @@ -98,7 +108,7 @@ st %r12,SP_ILC(%r15) mvc SP_R12(32,%r15),\savearea # move %r12-%r15 to stack la %r12,0 - stg %r12,0(%r15) + stg %r12,__SF_BACKCHAIN(%r15) .endm .macro RESTORE_ALL sync @@ -121,19 +131,19 @@ __switch_to: tm __THREAD_per+4(%r3),0xe8 # is the new process using per ? jz __switch_to_noper # if not we're fine - stctg %c9,%c11,48(%r15) # We are using per stuff - clc __THREAD_per(24,%r3),48(%r15) + stctg %c9,%c11,__SF_EMPTY(%r15)# We are using per stuff + clc __THREAD_per(24,%r3),__SF_EMPTY(%r15) je __switch_to_noper # we got away without bashing TLB's lctlg %c9,%c11,__THREAD_per(%r3) # Nope we didn't __switch_to_noper: - stmg %r6,%r15,48(%r15) # store __switch_to registers of prev task + stmg %r6,%r15,__SF_GPRS(%r15)# store __switch_to registers of prev task stg %r15,__THREAD_ksp(%r2) # store kernel stack to prev->tss.ksp lg %r15,__THREAD_ksp(%r3) # load kernel stack from next->tss.ksp - lmg %r6,%r15,48(%r15) # load __switch_to registers of next task + lmg %r6,%r15,__SF_GPRS(%r15)# load __switch_to registers of next task stg %r3,__LC_CURRENT # __LC_CURRENT = current task struct lg %r3,__THREAD_info(%r3) # load thread_info from task struct stg %r3,__LC_THREAD_INFO - aghi %r3,16384 + aghi %r3,STACK_SIZE stg %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack br %r14 @@ -143,19 +153,19 @@ */ .global do_call_softirq do_call_softirq: - stnsm 48(%r15),0xfc - stmg %r12,%r15,56(%r15) + stnsm __SF_EMPTY(%r15),0xfc + stmg %r12,%r15,__SF_GPRS(%r15) lgr %r12,%r15 lg %r0,__LC_ASYNC_STACK slgr %r0,%r15 - srag %r0,%r0,14 + srag %r0,%r0,STACK_SHIFT je 0f lg %r15,__LC_ASYNC_STACK 0: aghi %r15,-STACK_FRAME_OVERHEAD - stg %r12,0(%r15) # store back chain + stg %r12,__SF_BACKCHAIN(%r15) # store back chain brasl %r14,do_softirq - lmg %r12,%r15,56(%r12) - ssm 48(%r15) + lmg %r12,%r15,__SF_GPRS(%r12) + ssm __SF_EMPTY(%r15) br %r14 __critical_start: @@ -304,7 +314,10 @@ ret_from_fork: lg %r13,__LC_SVC_NEW_PSW+8 lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - brasl %r14,schedule_tail + tm SP_PSW+1(%r15),0x01 # forking a kernel thread ? + jo 0f + stg %r15,SP_R15(%r15) # store stack pointer for new kthread +0: brasl %r14,schedule_tail stosm 24(%r15),0x03 # reenable interrupts j sysc_return @@ -504,7 +517,7 @@ mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP - stosm 48(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts j sysc_do_svc /* @@ -539,16 +552,16 @@ lg %r1,SP_R15(%r15) aghi %r1,-SP_SIZE mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) - xc 0(8,%r1),0(%r1) # clear back chain + xc __SF_BACKCHAIN(8,%r1),__SF_BACKCHAIN(%r1) # clear back chain lgr %r15,%r1 io_resume_loop: tm __TI_flags+7(%r9),_TIF_NEED_RESCHED jno io_leave larl %r1,.Lc_pactive mvc __TI_precount(4,%r9),0(%r1) - stosm 48(%r15),0x03 # reenable interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts brasl %r14,schedule # call schedule - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts xc __TI_precount(4,%r9),__TI_precount(%r9) j io_resume_loop #endif @@ -560,7 +573,7 @@ lg %r1,__LC_KERNEL_STACK aghi %r1,-SP_SIZE mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) - xc 0(8,%r1),0(%r1) # clear back chain + xc __SF_BACKCHAIN(8,%r1),__SF_BACKCHAIN(%r1) # clear back chain lgr %r15,%r1 # # One of the work bits is on. Find out which one. @@ -577,23 +590,23 @@ # _TIF_NEED_RESCHED is set, call schedule # io_reschedule: - stosm 48(%r15),0x03 # reenable interrupts - brasl %r14,schedule # call scheduler - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts + brasl %r14,schedule # call scheduler + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts tm __TI_flags+7(%r9),_TIF_WORK_INT - jz io_leave # there is no work to do + jz io_leave # there is no work to do j io_work_loop # # _TIF_SIGPENDING is set, call do_signal # io_sigpending: - stosm 48(%r15),0x03 # reenable interrupts - la %r2,SP_PTREGS(%r15) # load pt_regs - slgr %r3,%r3 # clear *oldset - brasl %r14,do_signal # call do_signal - stnsm 48(%r15),0xfc # disable I/O and ext. interrupts - j sysc_leave # out of here, do NOT recheck + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts + la %r2,SP_PTREGS(%r15) # load pt_regs + slgr %r3,%r3 # clear *oldset + brasl %r14,do_signal # call do_signal + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts + j sysc_leave # out of here, do NOT recheck /* * External interrupt handler routine @@ -632,7 +645,7 @@ lghi %r10,__LC_AREGS_SAVE_AREA lam %a0,%a15,0(%r10) stosm 0(%r15),0x04 # now we can turn dat on - lmg %r6,%r15,48(%r15) # load registers from clone + lmg %r6,%r15,__SF_GPRS(%r15) # load registers from clone jg start_secondary #else /* @@ -647,6 +660,29 @@ restart_crash: .long 0x000a0000,0x00000000,0x00000000,0x00000000 restart_go: +#endif + +#ifdef CONFIG_CHECK_STACK +/* + * The synchronous or the asynchronous stack overflowed. We are dead. + * No need to properly save the registers, we are going to panic anyway. + * Setup a pt_regs so that show_trace can provide a good call trace. + */ +stack_overflow: + lg %r15,__LC_PANIC_STACK # change to panic stack + aghi %r1,-SP_SIZE + mvc SP_PSW(16,%r15),0(%r12) # move user PSW to stack + stmg %r0,%r11,SP_R0(%r15) # store gprs %r0-%r11 to kernel stack + la %r1,__LC_SAVE_AREA + chi %r12,__LC_SVC_OLD_PSW + je 0f + chi %r12,__LC_PGM_OLD_PSW + je 0f + la %r1,__LC_SAVE_AREA+16 +0: mvc SP_R12(32,%r15),0(%r1) # move %r12-%r15 to stack + xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) # clear back chain + la %r2,SP_PTREGS(%r15) # load pt_regs + jg kernel_stack_overflow #endif cleanup_table_system_call: diff -Nru a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S --- a/arch/s390/kernel/head.S 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/kernel/head.S 2004-09-06 16:37:51 -07:00 @@ -31,6 +31,8 @@ #include #include #include +#include +#include #ifndef CONFIG_IPL .org 0 @@ -741,10 +743,10 @@ # l %r15,.Linittu-.LPG2(%r13) mvc __LC_CURRENT(4),__TI_task(%r15) - ahi %r15,8192 # init_task_union + 8192 + ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union + THREAD_SIZE st %r15,__LC_KERNEL_STACK # set end of kernel stack ahi %r15,-96 - xc 0(4,%r15),0(%r15) # set backchain to zero + xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain # check control registers stctl %c0,%c15,0(%r15) diff -Nru a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S --- a/arch/s390/kernel/head64.S 2004-09-06 16:37:51 -07:00 +++ b/arch/s390/kernel/head64.S 2004-09-06 16:37:51 -07:00 @@ -31,6 +31,8 @@ #include #include #include +#include +#include #ifndef CONFIG_IPL .org 0 @@ -741,10 +743,10 @@ larl %r15,init_thread_union lg %r14,__TI_task(%r15) # cache current in lowcore stg %r14,__LC_CURRENT - aghi %r15,16384 # init_task_union + 16384 + aghi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union + THREAD_SIZE stg %r15,__LC_KERNEL_STACK # set end of kernel stack aghi %r15,-160 - xc 0(8,%r15),0(%r15) # set backchain to zero + xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain # check control registers stctg %c0,%c15,0(%r15) diff -Nru a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c --- a/arch/s390/kernel/process.c 2004-09-06 16:37:54 -07:00 +++ b/arch/s390/kernel/process.c 2004-09-06 16:37:54 -07:00 @@ -58,14 +58,11 @@ */ unsigned long thread_saved_pc(struct task_struct *tsk) { - unsigned long bc; + struct stack_frame *sf; - bc = *((unsigned long *) tsk->thread.ksp); -#ifndef CONFIG_ARCH_S390X - return *((unsigned long *) (bc+56)); -#else - return *((unsigned long *) (bc+112)); -#endif + sf = (struct stack_frame *) tsk->thread.ksp; + sf = (struct stack_frame *) sf->back_chain; + return sf->gprs[8]; } /* @@ -186,41 +183,20 @@ extern void kernel_thread_starter(void); -#ifndef CONFIG_ARCH_S390X - __asm__(".align 4\n" "kernel_thread_starter:\n" - " l 15,0(8)\n" - " sr 15,7\n" - " stosm 24(15),3\n" - " lr 2,10\n" + " la 2,0(10)\n" " basr 14,9\n" - " sr 2,2\n" + " la 2,0\n" " br 11\n"); -#else /* CONFIG_ARCH_S390X */ - -__asm__(".align 4\n" - "kernel_thread_starter:\n" - " lg 15,0(8)\n" - " sgr 15,7\n" - " stosm 48(15),3\n" - " lgr 2,10\n" - " basr 14,9\n" - " sgr 2,2\n" - " br 11\n"); - -#endif /* CONFIG_ARCH_S390X */ - int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { struct pt_regs regs; memset(®s, 0, sizeof(regs)); - regs.psw.mask = PSW_KERNEL_BITS; + regs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_IO | PSW_MASK_EXT; regs.psw.addr = (unsigned long) kernel_thread_starter | PSW_ADDR_AMODE; - regs.gprs[7] = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs); - regs.gprs[8] = __LC_KERNEL_STACK; regs.gprs[9] = (unsigned long) fn; regs.gprs[10] = (unsigned long) arg; regs.gprs[11] = (unsigned long) do_exit; @@ -253,20 +229,13 @@ unsigned long unused, struct task_struct * p, struct pt_regs * regs) { - struct stack_frame + struct fake_frame { - unsigned long back_chain; - unsigned long eos; - unsigned long glue1; - unsigned long glue2; - unsigned long scratch[2]; - unsigned long gprs[10]; /* gprs 6 -15 */ - unsigned int fprs[4]; /* fpr 4 and 6 */ - unsigned int empty[4]; + struct stack_frame sf; struct pt_regs childregs; } *frame; - frame = ((struct stack_frame *) + frame = ((struct fake_frame *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; p->thread.ksp = (unsigned long) frame; p->set_child_tid = p->clear_child_tid = NULL; @@ -274,13 +243,13 @@ frame->childregs = *regs; frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ frame->childregs.gprs[15] = new_stackp; - frame->back_chain = frame->eos = 0; + frame->sf.back_chain = 0; /* new return point is ret_from_fork */ - frame->gprs[8] = (unsigned long) ret_from_fork; + frame->sf.gprs[8] = (unsigned long) ret_from_fork; /* fake return stack for resume(), don't go back to schedule */ - frame->gprs[9] = (unsigned long) frame; + frame->sf.gprs[9] = (unsigned long) frame; /* Save access registers to new thread structure. */ save_access_regs(&p->thread.acrs[0]); @@ -336,7 +305,7 @@ child_tidptr = (int __user *) regs.gprs[5]; if (!newsp) newsp = regs.gprs[15]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } @@ -423,30 +392,26 @@ unsigned long get_wchan(struct task_struct *p) { - unsigned long r14, r15, bc; - unsigned long stack_page; - int count = 0; - if (!p || p == current || p->state == TASK_RUNNING) + struct stack_frame *sf, *low, *high; + unsigned long return_address; + int count; + + if (!p || p == current || p->state == TASK_RUNNING || !p->thread_info) return 0; - stack_page = (unsigned long) p->thread_info; - r15 = p->thread.ksp; - if (!stack_page || r15 < stack_page || - r15 >= THREAD_SIZE - sizeof(unsigned long) + stack_page) + low = (struct stack_frame *) p->thread_info; + high = (struct stack_frame *) + ((unsigned long) p->thread_info + THREAD_SIZE) - 1; + sf = (struct stack_frame *) (p->thread.ksp & PSW_ADDR_INSN); + if (sf <= low || sf > high) return 0; - bc = (*(unsigned long *) r15) & PSW_ADDR_INSN; - do { - if (bc < stack_page || - bc >= THREAD_SIZE - sizeof(unsigned long) + stack_page) + for (count = 0; count < 16; count++) { + sf = (struct stack_frame *) (sf->back_chain & PSW_ADDR_INSN); + if (sf <= low || sf > high) return 0; -#ifndef CONFIG_ARCH_S390X - r14 = (*(unsigned long *) (bc+56)) & PSW_ADDR_INSN; -#else - r14 = *(unsigned long *) (bc+112); -#endif - if (!in_sched_functions(r14)) - return r14; - bc = (*(unsigned long *) bc) & PSW_ADDR_INSN; - } while (count++ < 16); + return_address = sf->gprs[8] & PSW_ADDR_INSN; + if (!in_sched_functions(return_address)) + return return_address; + } return 0; } diff -Nru a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c --- a/arch/s390/kernel/profile.c 2004-09-06 16:37:53 -07:00 +++ b/arch/s390/kernel/profile.c 2004-09-06 16:37:53 -07:00 @@ -6,52 +6,15 @@ * */ #include +#include static struct proc_dir_entry * root_irq_dir; -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, - const char __user *buffer, - unsigned long count, void *data) -{ - cpumask_t *mask = (cpumask_t *)data; - unsigned long full_count = count, err; - cpumask_t new_value; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - -cpumask_t prof_cpu_mask = CPU_MASK_ALL; - void init_irq_proc(void) { - struct proc_dir_entry *entry; - /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", 0); /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - if (!entry) - return; - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); } diff -Nru a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c --- a/arch/s390/kernel/setup.c 2004-09-06 16:37:50 -07:00 +++ b/arch/s390/kernel/setup.c 2004-09-06 16:37:50 -07:00 @@ -503,6 +503,10 @@ lc->kernel_stack = ((unsigned long) &init_thread_union) + THREAD_SIZE; lc->async_stack = (unsigned long) __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0) + ASYNC_SIZE; +#ifdef CONFIG_CHECK_STACK + lc->panic_stack = (unsigned long) + __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0) + PAGE_SIZE; +#endif lc->current_task = (unsigned long) init_thread_union.thread_info.task; lc->thread_info = (unsigned long) &init_thread_union; #ifdef CONFIG_ARCH_S390X diff -Nru a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c --- a/arch/s390/kernel/signal.c 2004-09-06 16:37:54 -07:00 +++ b/arch/s390/kernel/signal.c 2004-09-06 16:37:54 -07:00 @@ -358,9 +358,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -414,9 +412,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -424,20 +420,15 @@ */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal(unsigned long sig, struct k_sigaction *ka, + siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Set up the stack frame */ if (ka->sa.sa_flags & SA_SIGINFO) setup_rt_frame(sig, ka, info, oldset, regs); else setup_frame(sig, ka, oldset, regs); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -461,6 +452,7 @@ unsigned long retval = 0, continue_addr = 0, restart_addr = 0; siginfo_t info; int signr; + struct k_sigaction ka; /* * We want the common case to go fast, which @@ -494,7 +486,7 @@ /* Get signal to deliver. When running under ptrace, at this point the debugger may change all our registers ... */ - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); /* Depending on the signal settings we may need to revert the decision to restart the system call. */ @@ -513,14 +505,15 @@ #ifdef CONFIG_S390_SUPPORT if (test_thread_flag(TIF_31BIT)) { extern void handle_signal32(unsigned long sig, + struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset, struct pt_regs *regs); - handle_signal32(signr, &info, oldset, regs); + handle_signal32(signr, &ka, &info, oldset, regs); return 1; } #endif - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } diff -Nru a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c --- a/arch/s390/kernel/smp.c 2004-09-06 16:37:50 -07:00 +++ b/arch/s390/kernel/smp.c 2004-09-06 16:37:50 -07:00 @@ -562,21 +562,15 @@ static void __init smp_create_idle(unsigned int cpu) { - struct pt_regs regs; struct task_struct *p; /* * don't care about the psw and regs settings since we'll never * reschedule the forked task. */ - memset(®s, 0, sizeof(struct pt_regs)); - p = copy_process(CLONE_VM | CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); + p = fork_idle(cpu); if (IS_ERR(p)) panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); - - wake_up_forked_process(p); - init_idle(p, cpu); - unhash_process(p); current_set[cpu] = p; } @@ -747,7 +741,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) { - unsigned long async_stack; + unsigned long stack; unsigned int cpu; int i; @@ -767,12 +761,18 @@ lowcore_ptr[i] = (struct _lowcore *) __get_free_pages(GFP_KERNEL|GFP_DMA, sizeof(void*) == 8 ? 1 : 0); - async_stack = __get_free_pages(GFP_KERNEL,ASYNC_ORDER); - if (lowcore_ptr[i] == NULL || async_stack == 0ULL) + stack = __get_free_pages(GFP_KERNEL,ASYNC_ORDER); + if (lowcore_ptr[i] == NULL || stack == 0ULL) panic("smp_boot_cpus failed to allocate memory\n"); *(lowcore_ptr[i]) = S390_lowcore; - lowcore_ptr[i]->async_stack = async_stack + (ASYNC_SIZE); + lowcore_ptr[i]->async_stack = stack + (ASYNC_SIZE); +#ifdef CONFIG_CHECK_STACK + stack = __get_free_pages(GFP_KERNEL,0); + if (stack == 0ULL) + panic("smp_boot_cpus failed to allocate memory\n"); + lowcore_ptr[i]->panic_stack = stack + (PAGE_SIZE); +#endif } set_prefix((u32)(unsigned long) lowcore_ptr[smp_processor_id()]); diff -Nru a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c --- a/arch/s390/kernel/time.c 2004-09-06 16:37:50 -07:00 +++ b/arch/s390/kernel/time.c 2004-09-06 16:37:50 -07:00 @@ -174,47 +174,7 @@ #ifdef CONFIG_PROFILING -extern char _stext, _etext; - -/* - * The profiling function is SMP safe. (nothing can mess - * around with "current", and the profiling counters are - * updated with atomic operations). This is especially - * useful with a profiling multiplier != 1 - */ -static inline void s390_do_profile(struct pt_regs * regs) -{ - unsigned long eip; - extern cpumask_t prof_cpu_mask; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - if (!prof_buffer) - return; - - eip = instruction_pointer(regs); - - /* - * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. - * (default is all CPUs.) - */ - if (!cpu_isset(smp_processor_id(), prof_cpu_mask)) - return; - - eip -= (unsigned long) &_stext; - eip >>= prof_shift; - /* - * Don't ignore out-of-bounds EIP values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (eip > prof_len-1) - eip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[eip]); -} +#define s390_do_profile(regs) profile_tick(CPU_PROFILING, regs) #else #define s390_do_profile(regs) do { ; } while(0) #endif /* CONFIG_PROFILING */ diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c --- a/arch/s390/kernel/traps.c 2004-09-06 16:37:52 -07:00 +++ b/arch/s390/kernel/traps.c 2004-09-06 16:37:52 -07:00 @@ -67,54 +67,93 @@ #define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) #ifndef CONFIG_ARCH_S390X -#define RET_ADDR 56 #define FOURLONG "%08lx %08lx %08lx %08lx\n" static int kstack_depth_to_print = 12; - #else /* CONFIG_ARCH_S390X */ -#define RET_ADDR 112 #define FOURLONG "%016lx %016lx %016lx %016lx\n" static int kstack_depth_to_print = 20; - #endif /* CONFIG_ARCH_S390X */ -void show_trace(struct task_struct *task, unsigned long * stack) +/* + * For show_trace we have tree different stack to consider: + * - the panic stack which is used if the kernel stack has overflown + * - the asynchronous interrupt stack (cpu related) + * - the synchronous kernel stack (process related) + * The stack trace can start at any of the three stack and can potentially + * touch all of them. The order is: panic stack, async stack, sync stack. + */ +static unsigned long +__show_trace(unsigned long sp, unsigned long low, unsigned long high) { - unsigned long backchain, low_addr, high_addr, ret_addr; + struct stack_frame *sf; + struct pt_regs *regs; - if (!stack) - stack = (task == NULL) ? *stack_pointer : &(task->thread.ksp); + while (1) { + sp = sp & PSW_ADDR_INSN; + if (sp < low || sp > high - sizeof(*sf)) + return sp; + sf = (struct stack_frame *) sp; + printk("([<%016lx>] ", sf->gprs[8] & PSW_ADDR_INSN); + print_symbol("%s)\n", sf->gprs[8] & PSW_ADDR_INSN); + /* Follow the backchain. */ + while (1) { + low = sp; + sp = sf->back_chain & PSW_ADDR_INSN; + if (!sp) + break; + if (sp <= low || sp > high - sizeof(*sf)) + return sp; + sf = (struct stack_frame *) sp; + printk(" [<%016lx>] ", sf->gprs[8] & PSW_ADDR_INSN); + print_symbol("%s\n", sf->gprs[8] & PSW_ADDR_INSN); + } + /* Zero backchain detected, check for interrupt frame. */ + sp = (unsigned long) (sf + 1); + if (sp <= low || sp > high - sizeof(*regs)) + return sp; + regs = (struct pt_regs *) sp; + printk(" [<%016lx>] ", regs->psw.addr & PSW_ADDR_INSN); + print_symbol("%s\n", regs->psw.addr & PSW_ADDR_INSN); + low = sp; + sp = regs->gprs[15]; + } +} +void show_trace(struct task_struct *task, unsigned long * stack) +{ + register unsigned long __r15 asm ("15"); + unsigned long sp; + + sp = (unsigned long) stack; + if (!sp) + sp = task ? task->thread.ksp : __r15; printk("Call Trace:\n"); - low_addr = ((unsigned long) stack) & PSW_ADDR_INSN; - high_addr = (low_addr & (-THREAD_SIZE)) + THREAD_SIZE; - /* Skip the first frame (biased stack) */ - backchain = *((unsigned long *) low_addr) & PSW_ADDR_INSN; - /* Print up to 8 lines */ - while (backchain > low_addr && backchain <= high_addr) { - ret_addr = *((unsigned long *) (backchain+RET_ADDR)) & PSW_ADDR_INSN; - printk(" [<%016lx>] ", ret_addr); - print_symbol("%s\n", ret_addr); - low_addr = backchain; - backchain = *((unsigned long *) backchain) & PSW_ADDR_INSN; - } +#ifdef CONFIG_CHECK_STACK + sp = __show_trace(sp, S390_lowcore.panic_stack - 4096, + S390_lowcore.panic_stack); +#endif + sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE, + S390_lowcore.async_stack); + if (task) + __show_trace(sp, (unsigned long) task->thread_info, + (unsigned long) task->thread_info + THREAD_SIZE); + else + __show_trace(sp, S390_lowcore.thread_info - THREAD_SIZE, + S390_lowcore.thread_info); printk("\n"); } void show_stack(struct task_struct *task, unsigned long *sp) { + register unsigned long * __r15 asm ("15"); unsigned long *stack; int i; // debugging aid: "show_stack(NULL);" prints the // back trace for this cpu. - if (!sp) { - if (task) - sp = (unsigned long *) task->thread.ksp; - else - sp = *stack_pointer; - } + if (!sp) + sp = task ? (unsigned long *) task->thread.ksp : __r15; stack = sp; for (i = 0; i < kstack_depth_to_print; i++) { @@ -591,6 +630,11 @@ } } +asmlinkage void kernel_stack_overflow(struct pt_regs * regs) +{ + die("Kernel stack overflow", regs, 0); + panic("Corrupt kernel stack, can't continue."); +} /* init is done in lowcore.S and head.S */ diff -Nru a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S --- a/arch/s390/kernel/vmlinux.lds.S 2004-09-06 16:37:52 -07:00 +++ b/arch/s390/kernel/vmlinux.lds.S 2004-09-06 16:37:52 -07:00 @@ -24,6 +24,7 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) } = 0x0700 @@ -78,9 +79,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c --- a/arch/s390/kernel/vtime.c 2004-09-06 16:37:55 -07:00 +++ b/arch/s390/kernel/vtime.c 2004-09-06 16:37:55 -07:00 @@ -21,7 +21,7 @@ #include #include -#define VTIMER_MAGIC (0x4b87ad6e + 1) +#define VTIMER_MAGIC (TIMER_MAGIC + 1) static ext_int_info_t ext_int_info_timer; DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); diff -Nru a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile --- a/arch/s390/mm/Makefile 2004-09-06 16:37:55 -07:00 +++ b/arch/s390/mm/Makefile 2004-09-06 16:37:55 -07:00 @@ -2,6 +2,6 @@ # Makefile for the linux s390-specific parts of the memory manager. # -obj-y := init.o fault.o ioremap.o extmem.o +obj-y := init.o fault.o ioremap.o extmem.o mmap.o obj-$(CONFIG_CMM) += cmm.o diff -Nru a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c --- a/arch/s390/mm/fault.c 2004-09-06 16:37:56 -07:00 +++ b/arch/s390/mm/fault.c 2004-09-06 16:37:56 -07:00 @@ -126,8 +126,8 @@ * Send SIGSEGV to task. This is an external routine * to keep the stack usage of do_page_fault small. */ -static void force_sigsegv(struct pt_regs *regs, unsigned long error_code, - int si_code, unsigned long address) +static void do_sigsegv(struct pt_regs *regs, unsigned long error_code, + int si_code, unsigned long address) { struct siginfo si; @@ -282,7 +282,7 @@ if (regs->psw.mask & PSW_MASK_PSTATE) { tsk->thread.prot_addr = address; tsk->thread.trap_no = error_code; - force_sigsegv(regs, error_code, si_code, address); + do_sigsegv(regs, error_code, si_code, address); return; } diff -Nru a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/s390/mm/mmap.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,83 @@ +/* + * linux/arch/s390/mm/mmap.c + * + * flexible mmap layout support + * + * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * Started by Ingo Molnar + */ + +#include +#include + +/* + * Top of mmap area (just below the process stack). + * + * Leave an at least ~128 MB hole. + */ +#define MIN_GAP (128*1024*1024) +#define MAX_GAP (TASK_SIZE/6*5) + +static inline unsigned long mmap_base(void) +{ + unsigned long gap = current->rlim[RLIMIT_STACK].rlim_cur; + + if (gap < MIN_GAP) + gap = MIN_GAP; + else if (gap > MAX_GAP) + gap = MAX_GAP; + + return TASK_SIZE - (gap & PAGE_MASK); +} + +static inline int mmap_is_legacy(void) +{ +#ifdef CONFIG_ARCH_S390X + /* + * Force standard allocation for 64 bit programs. + */ + if (!test_thread_flag(TIF_31BIT)) + return 1; +#endif + return sysctl_legacy_va_layout || + (current->personality & ADDR_COMPAT_LAYOUT) || + current->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY; +} + +/* + * This function, called very early during the creation of a new + * process VM image, sets up which VM layout function to use: + */ +void arch_pick_mmap_layout(struct mm_struct *mm) +{ + /* + * Fall back to the standard layout if the personality + * bit is set, or if the expected stack growth is unlimited: + */ + if (mmap_is_legacy()) { + mm->mmap_base = TASK_UNMAPPED_BASE; + mm->get_unmapped_area = arch_get_unmapped_area; + mm->unmap_area = arch_unmap_area; + } else { + mm->mmap_base = mmap_base(); + mm->get_unmapped_area = arch_get_unmapped_area_topdown; + mm->unmap_area = arch_unmap_area_topdown; + } +} diff -Nru a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c --- a/arch/sh/kernel/irq.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sh/kernel/irq.c 2004-09-06 16:37:52 -07:00 @@ -137,14 +137,16 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ - int retval = 0; + int ret, retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - retval |= action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; + retval |= ret; action = action->next; } while (action); diff -Nru a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c --- a/arch/sh/kernel/process.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sh/kernel/process.c 2004-09-06 16:37:54 -07:00 @@ -440,7 +440,7 @@ { if (!newsp) newsp = regs.regs[15]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, + return do_fork(clone_flags, newsp, ®s, 0, (int __user *)parent_tidptr, (int __user *)child_tidptr); } diff -Nru a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c --- a/arch/sh/kernel/signal.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sh/kernel/signal.c 2004-09-06 16:37:55 -07:00 @@ -413,9 +413,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -490,9 +488,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* diff -Nru a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c --- a/arch/sh/kernel/smp.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sh/kernel/smp.c 2004-09-06 16:37:52 -07:00 @@ -98,18 +98,11 @@ int __cpu_up(unsigned int cpu) { struct task_struct *tsk; - struct pt_regs regs; - memset(®s, 0, sizeof(struct pt_regs)); - tsk = copy_process(CLONE_VM | CLONE_IDLETASK, 0, ®s, 0, 0, 0); + tsk = fork_idle(cpu); if (IS_ERR(tsk)) panic("Failed forking idle task for cpu %d\n", cpu); - - wake_up_forked_process(tsk); - - init_idle(tsk, cpu); - unhash_process(tsk); tsk->thread_info->cpu = cpu; diff -Nru a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c --- a/arch/sh/kernel/time.c 2004-09-06 16:37:50 -07:00 +++ b/arch/sh/kernel/time.c 2004-09-06 16:37:50 -07:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -250,36 +251,6 @@ /* last time the RTC clock got updated */ static long last_rtc_update; -/* Profiling definitions */ -extern unsigned long prof_cpu_mask; -extern unsigned int * prof_buffer; -extern unsigned long prof_len; -extern unsigned long prof_shift; -extern char _stext; - -static inline void sh_do_profile(unsigned long pc) -{ - /* Don't profile cpu_idle.. */ - if (!prof_buffer || !current->pid) - return; - - if (pc >= 0xa0000000UL && pc < 0xc0000000UL) - pc -= 0x20000000; - - pc -= (unsigned long)&_stext; - pc >>= prof_shift; - - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (pc > prof_len - 1) - pc = prof_len - 1; - - atomic_inc((atomic_t *)&prof_buffer[pc]); -} - /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -287,9 +258,7 @@ static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { do_timer(regs); - - if (!user_mode(regs)) - sh_do_profile(regs->pc); + profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT if (sh_mv.mv_heartbeat != NULL) diff -Nru a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S --- a/arch/sh/kernel/vmlinux.lds.S 2004-09-06 16:37:53 -07:00 +++ b/arch/sh/kernel/vmlinux.lds.S 2004-09-06 16:37:53 -07:00 @@ -23,6 +23,7 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) } = 0x0009 @@ -75,9 +76,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/sh/mm/init.c b/arch/sh/mm/init.c --- a/arch/sh/mm/init.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sh/mm/init.c 2004-09-06 16:37:54 -07:00 @@ -214,8 +214,8 @@ */ disable_mmu(); #endif - - free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START >> PAGE_SHIFT, 0); + NODE_DATA(0)->node_mem_map = NULL; + free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); /* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/ mem_map = NODE_DATA(0)->node_mem_map; @@ -225,7 +225,7 @@ */ zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT; zones_size[ZONE_NORMAL] = 0; - free_area_init_node(1, NODE_DATA(1), 0, zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0); + free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0); #endif } diff -Nru a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c --- a/arch/sh64/kernel/irq.c 2004-09-06 16:37:51 -07:00 +++ b/arch/sh64/kernel/irq.c 2004-09-06 16:37:51 -07:00 @@ -148,6 +148,7 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status; + int ret; status = 1; /* Force the "do bottom halves" bit */ @@ -155,8 +156,9 @@ local_irq_enable(); do { - status |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) diff -Nru a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c --- a/arch/sh64/kernel/process.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sh64/kernel/process.c 2004-09-06 16:37:55 -07:00 @@ -820,7 +820,7 @@ { if (!newsp) newsp = pregs->regs[15]; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, pregs, 0, 0, 0); + return do_fork(clone_flags, newsp, pregs, 0, 0, 0); } /* @@ -901,7 +901,7 @@ */ pc = thread_saved_pc(p); -#if CONFIG_FRAME_POINTER +#ifdef CONFIG_FRAME_POINTER if (in_sh64_switch_to(pc)) { sh64_switch_to_fp = (long) p->thread.sp; /* r14 is saved at offset 4 in the sh64_switch_to frame */ diff -Nru a/arch/sh64/kernel/signal.c b/arch/sh64/kernel/signal.c --- a/arch/sh64/kernel/signal.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sh64/kernel/signal.c 2004-09-06 16:37:52 -07:00 @@ -520,9 +520,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -628,9 +626,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* diff -Nru a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c --- a/arch/sh64/kernel/time.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sh64/kernel/time.c 2004-09-06 16:37:53 -07:00 @@ -298,37 +298,6 @@ /* last time the RTC clock got updated */ static long last_rtc_update = 0; -static inline void sh64_do_profile(struct pt_regs *regs) -{ - extern int _stext; - unsigned long pc; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - /* Don't profile cpu_idle.. */ - if (!prof_buffer || !current->pid) - return; - - pc = instruction_pointer(regs); - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - - /* - * Don't ignore out-of-bounds PC values silently, put them into the - * last histogram slot, so if present, they will show up as a sharp - * peak. - */ - if (pc > prof_len - 1) - pc = prof_len - 1; - - /* We could just be sloppy and not lock against a re-entry on this - increment, but the profiling code won't always be linked in anyway. */ - atomic_inc((atomic_t *)&prof_buffer[pc]); -} - /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -340,8 +309,7 @@ ctc_last_interrupt = (unsigned long) current_ctc; do_timer(regs); - - sh64_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #ifdef CONFIG_HEARTBEAT { diff -Nru a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S --- a/arch/sh64/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 +++ b/arch/sh64/kernel/vmlinux.lds.S 2004-09-06 16:37:51 -07:00 @@ -59,6 +59,7 @@ *(.text64) *(.text..SHmedia32) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) #ifdef CONFIG_LITTLE_ENDIAN @@ -106,9 +107,6 @@ __setup_start = .; .init.setup : C_PHYS(.init.setup) { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : C_PHYS(__param) { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : C_PHYS(.initcall.init) { *(.initcall1.init) diff -Nru a/arch/sh64/mm/init.c b/arch/sh64/mm/init.c --- a/arch/sh64/mm/init.c 2004-09-06 16:37:56 -07:00 +++ b/arch/sh64/mm/init.c 2004-09-06 16:37:56 -07:00 @@ -122,8 +122,8 @@ * All memory is good as ZONE_NORMAL (fall-through) and ZONE_DMA. */ zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN; - - free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START >> PAGE_SHIFT, 0); + NODE_DATA(0)->node_mem_map = NULL; + free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); /* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/ mem_map = NODE_DATA(0)->node_mem_map; diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig --- a/arch/sparc/Kconfig 2004-09-06 16:37:49 -07:00 +++ b/arch/sparc/Kconfig 2004-09-06 16:37:49 -07:00 @@ -23,7 +23,7 @@ source "init/Kconfig" -menu "General setup" +menu "General machine setup" config VT bool diff -Nru a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c --- a/arch/sparc/kernel/process.c 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc/kernel/process.c 2004-09-06 16:37:51 -07:00 @@ -435,8 +435,6 @@ { unsigned long parent_tid_ptr, child_tid_ptr; - clone_flags &= ~CLONE_IDLETASK; - parent_tid_ptr = regs->u_regs[UREG_I2]; child_tid_ptr = regs->u_regs[UREG_I4]; diff -Nru a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c --- a/arch/sparc/kernel/signal.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc/kernel/signal.c 2004-09-06 16:37:54 -07:00 @@ -274,7 +274,7 @@ return; segv_and_exit: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } asmlinkage void do_sigreturn(struct pt_regs *regs) @@ -341,7 +341,7 @@ return; segv_and_exit: - send_sig(SIGSEGV, current, 1); + force_sig(SIGSEGV, current); } asmlinkage void do_rt_sigreturn(struct pt_regs *regs) @@ -401,7 +401,7 @@ spin_unlock_irq(¤t->sighand->siglock); return; segv: - send_sig(SIGSEGV, current, 1); + force_sig(SIGSEGV, current); } /* Checks if the fp is valid */ @@ -549,7 +549,7 @@ sigill_and_return: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signr, current); } @@ -663,7 +663,7 @@ sigill_and_return: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signo, current); } static inline void @@ -746,7 +746,7 @@ sigill: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signo, current); } /* Setup a Solaris stack frame */ @@ -876,7 +876,7 @@ sigill_and_return: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signr, current); } asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs) @@ -889,7 +889,7 @@ synchronize_user_stack(); if (current_thread_info()->w_saved) - goto sigsegv_and_return; + return -EFAULT; err = clear_user(uc, sizeof(*uc)); if (err) @@ -930,9 +930,6 @@ * we have already stuffed all of it with sync_user_stack */ return (err ? -EFAULT : 0); - -sigsegv_and_return: - do_exit(SIGSEGV); } /* Set the context for a svr4 application, this is Solaris way to sigreturn */ @@ -1018,7 +1015,7 @@ return (err ? -EFAULT : 0); sigsegv_and_return: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } static inline void @@ -1036,8 +1033,6 @@ else setup_frame(&ka->sa, regs, signr, oldset, info); } - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; if (!(ka->sa.sa_flags & SA_NOMASK)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -1077,6 +1072,7 @@ { siginfo_t info; struct sparc_deliver_cookie cookie; + struct k_sigaction ka; int signr; /* @@ -1096,15 +1092,12 @@ if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, &cookie); + signr = get_signal_to_deliver(&info, &ka, regs, &cookie); if (signr > 0) { - struct k_sigaction *ka; - - ka = ¤t->sighand->action[signr-1]; - if (cookie.restart_syscall) - syscall_restart(cookie.orig_i0, regs, &ka->sa); - handle_signal(signr, ka, &info, oldset, regs, svr4_signal); + syscall_restart(cookie.orig_i0, regs, &ka.sa); + handle_signal(signr, &ka, &info, oldset, + regs, svr4_signal); return 1; } if (cookie.restart_syscall && diff -Nru a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c --- a/arch/sparc/kernel/sparc_ksyms.c 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc/kernel/sparc_ksyms.c 2004-09-06 16:37:50 -07:00 @@ -214,6 +214,10 @@ EXPORT_SYMBOL(pci_dma_sync_single_for_device); EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); EXPORT_SYMBOL(pci_dma_sync_sg_for_device); +EXPORT_SYMBOL(pci_map_sg); +EXPORT_SYMBOL(pci_unmap_sg); +EXPORT_SYMBOL(pci_map_page); +EXPORT_SYMBOL(pci_unmap_page); /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */ EXPORT_SYMBOL(ioremap); EXPORT_SYMBOL(iounmap); @@ -297,6 +301,9 @@ /* Cache flushing. */ EXPORT_SYMBOL(sparc_flush_page_to_ram); + +/* For when serial stuff is built as modules. */ +EXPORT_SYMBOL(sun_do_break); EXPORT_SYMBOL(__ret_efault); diff -Nru a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c --- a/arch/sparc/kernel/sun4d_smp.c 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc/kernel/sun4d_smp.c 2004-09-06 16:37:51 -07:00 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -201,18 +202,9 @@ int no; /* Cook up an idler for this guy. */ - kernel_thread(start_secondary, NULL, CLONE_IDLETASK); - + p = fork_idle(i); cpucount++; - - p = prev_task(&init_task); - - init_idle(p, i); - current_set[i] = p->thread_info; - - unhash_process(p); - for (no = 0; !cpu_find_by_instance(no, NULL, &mid) && mid != i; no++) ; @@ -418,8 +410,6 @@ panic("Bogon SMP message pass."); } -extern void sparc_do_profile(unsigned long pc, unsigned long o7); - void smp4d_percpu_timer_interrupt(struct pt_regs *regs) { int cpu = hard_smp4d_processor_id(); @@ -437,8 +427,7 @@ show_leds(cpu); } - if(!user_mode(regs)) - sparc_do_profile(regs->pc, regs->u_regs[UREG_RETPC]); + profile_tick(CPU_PROFILING, regs); if(!--prof_counter(cpu)) { int user = user_mode(regs); diff -Nru a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c --- a/arch/sparc/kernel/sun4m_smp.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc/kernel/sun4m_smp.c 2004-09-06 16:37:54 -07:00 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -173,18 +174,9 @@ int timeout; /* Cook up an idler for this guy. */ - kernel_thread(start_secondary, NULL, CLONE_IDLETASK); - + p = fork_idle(i); cpucount++; - - p = prev_task(&init_task); - - init_idle(p, i); - current_set[i] = p->thread_info; - - unhash_process(p); - /* See trampoline.S for details... */ entry += ((i-1) * 3); @@ -400,16 +392,13 @@ ccall_info.processors_out[i] = 1; } -extern void sparc_do_profile(unsigned long pc, unsigned long o7); - void smp4m_percpu_timer_interrupt(struct pt_regs *regs) { int cpu = smp_processor_id(); clear_profile_irq(cpu); - if(!user_mode(regs)) - sparc_do_profile(regs->pc, regs->u_regs[UREG_RETPC]); + profile_tick(CPU_PROFILING, regs); if(!--prof_counter(cpu)) { int user = user_mode(regs); diff -Nru a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S --- a/arch/sparc/kernel/systbls.S 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc/kernel/systbls.S 2004-09-06 16:37:52 -07:00 @@ -74,7 +74,7 @@ /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink -/*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_ni_syscall +/*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid /*280*/ .long sys_ni_syscall, sys_ni_syscall, sys_ni_syscall #ifdef CONFIG_SUNOS_EMUL diff -Nru a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c --- a/arch/sparc/kernel/time.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc/kernel/time.c 2004-09-06 16:37:53 -07:00 @@ -79,38 +79,24 @@ #endif -static spinlock_t ticker_lock = SPIN_LOCK_UNLOCKED; - -/* 32-bit Sparc specific profiling function. */ -void sparc_do_profile(unsigned long pc, unsigned long o7) +unsigned long profile_pc(struct pt_regs *regs) { - if(prof_buffer && current->pid) { - extern int _stext; - extern int __copy_user_begin, __copy_user_end; - extern int __atomic_begin, __atomic_end; - extern int __bzero_begin, __bzero_end; - extern int __bitops_begin, __bitops_end; - - if ((pc >= (unsigned long) &__copy_user_begin && - pc < (unsigned long) &__copy_user_end) || - (pc >= (unsigned long) &__atomic_begin && - pc < (unsigned long) &__atomic_end) || - (pc >= (unsigned long) &__bzero_begin && - pc < (unsigned long) &__bzero_end) || - (pc >= (unsigned long) &__bitops_begin && - pc < (unsigned long) &__bitops_end)) - pc = o7; - - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - - spin_lock(&ticker_lock); - if(pc < prof_len) - prof_buffer[pc]++; - else - prof_buffer[prof_len - 1]++; - spin_unlock(&ticker_lock); - } + extern int __copy_user_begin, __copy_user_end; + extern int __atomic_begin, __atomic_end; + extern int __bzero_begin, __bzero_end; + extern int __bitops_begin, __bitops_end; + unsigned long pc = regs->pc; + + if ((pc >= (unsigned long) &__copy_user_begin && + pc < (unsigned long) &__copy_user_end) || + (pc >= (unsigned long) &__atomic_begin && + pc < (unsigned long) &__atomic_end) || + (pc >= (unsigned long) &__bzero_begin && + pc < (unsigned long) &__bzero_end) || + (pc >= (unsigned long) &__bitops_begin && + pc < (unsigned long) &__bitops_end)) + pc = regs->u_regs[UREG_RETPC]; + return pc; } __volatile__ unsigned int *master_l10_counter; @@ -129,8 +115,7 @@ static long last_rtc_update; #ifndef CONFIG_SMP - if(!user_mode(regs)) - sparc_do_profile(regs->pc, regs->u_regs[UREG_RETPC]); + profile_tick(CPU_PROFILING, regs); #endif /* Protect counter clear so that do_gettimeoffset works */ diff -Nru a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S --- a/arch/sparc/kernel/vmlinux.lds.S 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc/kernel/vmlinux.lds.S 2004-09-06 16:37:50 -07:00 @@ -13,6 +13,7 @@ { *(.text) SCHED_TEXT + LOCK_TEXT *(.gnu.warning) } =0 _etext = .; @@ -46,9 +47,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc/mm/srmmu.c 2004-09-06 16:37:53 -07:00 @@ -1341,7 +1341,7 @@ zones_size[ZONE_HIGHMEM] = npages; zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, pfn_base, zholes_size); mem_map = contig_page_data.node_mem_map; } diff -Nru a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c --- a/arch/sparc/mm/sun4c.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc/mm/sun4c.c 2004-09-06 16:37:54 -07:00 @@ -2114,7 +2114,7 @@ zones_size[ZONE_HIGHMEM] = npages; zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, pfn_base, zholes_size); mem_map = contig_page_data.node_mem_map; } diff -Nru a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug --- a/arch/sparc64/Kconfig.debug 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/Kconfig.debug 2004-09-06 16:37:52 -07:00 @@ -11,6 +11,16 @@ This option will slow down process creation somewhat. +config KPROBES + bool "Kprobes" + depends on DEBUG_KERNEL + help + Kprobes allows you to trap at almost any kernel address and + execute a callback function. register_kprobe() establishes + a probepoint and specifies the callback. Kprobes is useful + for kernel debugging, non-intrusive instrumentation and testing. + If in doubt, say "N". + config DEBUG_DCFLUSH bool "D-cache flush debugging" depends on DEBUG_KERNEL diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/defconfig 2004-09-06 16:37:51 -07:00 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9-rc1 +# Thu Sep 2 23:38:33 2004 # CONFIG_64BIT=y CONFIG_MMU=y @@ -33,6 +35,8 @@ CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -46,7 +50,7 @@ CONFIG_STOP_MACHINE=y # -# General setup +# General machine setup # CONFIG_BBC_I2C=m CONFIG_VT=y @@ -65,6 +69,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m # CONFIG_CPU_FREQ_24_API is not set CONFIG_SPARC64=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -118,6 +123,7 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_CIRRUS is not set CONFIG_FB_PM2=y # CONFIG_FB_PM2_FIFO_DISCONNECT is not set @@ -153,7 +159,6 @@ # # Console display driver support # -# CONFIG_MDA_CONSOLE is not set # CONFIG_PROM_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -217,6 +222,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_SX8=m +CONFIG_BLK_DEV_UB=m # CONFIG_BLK_DEV_RAM is not set # @@ -328,7 +334,8 @@ # CONFIG_AIC79XX_DEBUG_ENABLE is not set CONFIG_AIC79XX_DEBUG_MASK=0 # CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y CONFIG_SCSI_SATA_SVW=m CONFIG_SCSI_ATA_PIIX=m @@ -353,9 +360,7 @@ CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set -CONFIG_SCSI_IPR=m -# CONFIG_SCSI_IPR_TRACE is not set -# CONFIG_SCSI_IPR_DUMP is not set +# CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_ISP=m CONFIG_SCSI_QLOGIC_FC=y CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y @@ -398,6 +403,7 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m CONFIG_MD_RAID5=m CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m @@ -412,7 +418,6 @@ # CONFIG_FUSION=m CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_ISENSE=m CONFIG_FUSION_CTL=m CONFIG_FUSION_LAN=m @@ -475,6 +480,7 @@ CONFIG_INET_AH=y CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y +CONFIG_INET_TUNNEL=y # # IP: Virtual Server Configuration @@ -514,6 +520,7 @@ CONFIG_INET6_AH=m CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -523,6 +530,8 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m @@ -548,8 +557,14 @@ CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_PHYSDEV=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m @@ -568,18 +583,13 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m # # IPv6: Netfilter Configuration @@ -704,6 +714,8 @@ CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y # # Network testing @@ -1096,6 +1108,7 @@ # CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m # # I2C Hardware Bus support @@ -1120,6 +1133,7 @@ CONFIG_I2C_VIA=m CONFIG_I2C_VIAPRO=m CONFIG_I2C_VOODOO3=m +CONFIG_I2C_PCA_ISA=m # # Hardware Sensors Chip support @@ -1141,6 +1155,7 @@ CONFIG_SENSORS_LM85=m CONFIG_SENSORS_LM90=m CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_SMSC47M1=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_W83781D=m CONFIG_SENSORS_W83L785TS=m @@ -1263,6 +1278,7 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_RPCSEC_GSS_SPKM3=m CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m @@ -1474,6 +1490,7 @@ CONFIG_SND_AC97_CODEC=m CONFIG_SND_ALI5451=m CONFIG_SND_ATIIXP=m +CONFIG_SND_ATIIXP_MODEM=m CONFIG_SND_AU8810=m CONFIG_SND_AU8820=m CONFIG_SND_AU8830=m @@ -1513,6 +1530,7 @@ # ALSA USB devices # # CONFIG_SND_USB_AUDIO is not set +CONFIG_SND_USB_USX2Y=m # # ALSA Sparc devices @@ -1532,6 +1550,7 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set # # USB Host Controller Drivers @@ -1597,7 +1616,6 @@ # CONFIG_USB_IBMCAM is not set # CONFIG_USB_KONICAWC is not set # CONFIG_USB_OV511 is not set -CONFIG_USB_PWC=m # CONFIG_USB_SE401 is not set CONFIG_USB_SN9C102=m # CONFIG_USB_STV680 is not set @@ -1734,14 +1752,15 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_DCFLUSH is not set # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_KPROBES=y +# CONFIG_DEBUG_DCFLUSH is not set # CONFIG_STACK_DEBUG is not set # CONFIG_DEBUG_BOOTMEM is not set CONFIG_HAVE_DEC_LOCK=y @@ -1762,6 +1781,7 @@ CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WHIRLPOOL=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m diff -Nru a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile --- a/arch/sparc64/kernel/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/kernel/Makefile 2004-09-06 16:37:51 -07:00 @@ -22,6 +22,7 @@ obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o +obj-$(CONFIG_KPROBES) += kprobes.o ifdef CONFIG_SUNOS_EMUL obj-y += sys_sunos32.o sunos_ioctl32.o diff -Nru a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S --- a/arch/sparc64/kernel/head.S 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/kernel/head.S 2004-09-06 16:37:52 -07:00 @@ -50,6 +50,7 @@ */ .global root_flags, ram_flags, root_dev .global sparc_ramdisk_image, sparc_ramdisk_size + .global sparc_ramdisk_image64 .ascii "HdrS" .word LINUX_VERSION_CODE @@ -60,7 +61,7 @@ * 0x0202 : Supports kernel params string * 0x0201 : Supports reboot_command */ - .half 0x0300 /* HdrS version */ + .half 0x0301 /* HdrS version */ root_flags: .half 1 @@ -74,6 +75,8 @@ .word 0 .xword reboot_command .xword bootstr_info +sparc_ramdisk_image64: + .xword 0 .word _end /* We must be careful, 32-bit OpenBOOT will get confused if it diff -Nru a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c --- a/arch/sparc64/kernel/irq.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/kernel/irq.c 2004-09-06 16:37:55 -07:00 @@ -791,16 +791,24 @@ #endif if ((flags & IBF_MULTI) == 0) { struct irqaction *ap = bp->irq_info; - ap->handler(__irq(bp), ap->dev_id, regs); - random |= ap->flags & SA_SAMPLE_RANDOM; + int ret; + + ret = ap->handler(__irq(bp), ap->dev_id, regs); + if (ret == IRQ_HANDLED) + random |= ap->flags; } else { void **vector = (void **)bp->irq_info; int ent; for (ent = 0; ent < 4; ent++) { struct irqaction *ap = vector[ent]; if (ap != NULL) { - ap->handler(__irq(bp), ap->dev_id, regs); - random |= ap->flags & SA_SAMPLE_RANDOM; + int ret; + + ret = ap->handler(__irq(bp), + ap->dev_id, + regs); + if (ret == IRQ_HANDLED) + random |= ap->flags; } } } @@ -813,8 +821,9 @@ } #endif upa_writel(ICLR_IDLE, bp->iclr); + /* Test and add entropy */ - if (random) + if (random & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); } } else diff -Nru a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/sparc64/kernel/kprobes.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,276 @@ +/* arch/sparc64/kernel/kprobes.c + * + * Copyright (C) 2004 David S. Miller + */ + +#include +#include +#include + +#include +#include + +/* We do not have hardware single-stepping, so in order + * to implement post handlers correctly we use two breakpoint + * instructions. + * + * 1) ta 0x70 --> 0x91d02070 + * 2) ta 0x71 --> 0x91d02071 + * + * When these are hit, control is transferred to kprobe_trap() + * below. The arg 'level' tells us which of the two traps occurred. + * + * Initially, the instruction at p->addr gets set to "ta 0x70" + * by code in register_kprobe() by setting that memory address + * to BREAKPOINT_INSTRUCTION. When this breakpoint is hit + * the following happens: + * + * 1) We run the pre-handler + * 2) We replace p->addr with the original opcode + * 3) We set the instruction at "regs->npc" to "ta 0x71" + * 4) We mark that we are waiting for the second breakpoint + * to hit and return from the trap. + * + * At this point we wait for the second breakpoint to hit. + * When it does: + * + * 1) We run the post-handler + * 2) We re-install "ta 0x70" at p->addr + * 3) We restore the opcode at the "ta 0x71" breakpoint + * 4) We reset our "waiting for "ta 0x71" state + * 5) We return from the trap + * + * We could use the trick used by the i386 kprobe code but I + * think that scheme has problems with exception tables. On i386 + * they single-step over the original instruction stored at + * kprobe->insn. So they set the processor to single step, and + * set the program counter to kprobe->insn. + * + * But that explodes if the original opcode is a user space + * access instruction and that faults. It will go wrong because + * since the location of the instruction being executed is + * different from that recorded in the exception tables, the + * kernel will not find it and this will cause an erroneous + * kernel OOPS. + */ + +void arch_prepare_kprobe(struct kprobe *p) +{ + p->insn[0] = *p->addr; + p->insn[1] = 0xdeadbeef; +} + +static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) +{ + u32 *insn2 = (u32 *) regs->tpc; + + p->insn[1] = *insn2; + + *insn2 = BREAKPOINT_INSTRUCTION_2; + flushi(insn2); +} + +static void undo_singlestep(struct kprobe *p, struct pt_regs *regs) +{ + u32 *insn2 = (u32 *) regs->tpc; + + BUG_ON(p->insn[1] == 0xdeadbeef); + + *insn2 = p->insn[1]; + flushi(insn2); + + p->insn[1] = 0xdeadbeef; +} + +/* kprobe_status settings */ +#define KPROBE_HIT_ACTIVE 0x00000001 +#define KPROBE_HIT_SS 0x00000002 + +static struct kprobe *current_kprobe; +static unsigned int kprobe_status; + +static int kprobe_handler(struct pt_regs *regs) +{ + struct kprobe *p; + void *addr = (void *) regs->tpc; + int ret = 0; + + preempt_disable(); + + if (kprobe_running()) { + p = get_kprobe(addr); + if (p) { + *p->addr = p->opcode; + flushi(p->addr); + ret = 1; + } else { + p = current_kprobe; + if (p->break_handler && p->break_handler(p, regs)) + goto ss_probe; + } + goto no_kprobe; + } + + lock_kprobes(); + p = get_kprobe(addr); + if (!p) { + unlock_kprobes(); + if (*(u32 *)addr != BREAKPOINT_INSTRUCTION) + ret = 1; + goto no_kprobe; + } + + kprobe_status = KPROBE_HIT_ACTIVE; + current_kprobe = p; + if (p->pre_handler(p, regs)) + return 1; + +ss_probe: + prepare_singlestep(p, regs); + kprobe_status = KPROBE_HIT_SS; + return 1; + +no_kprobe: + preempt_enable_no_resched(); + return ret; +} + +static int post_kprobe_handler(struct pt_regs *regs) +{ + u32 *insn_p = (u32 *) regs->tpc; + + if (!kprobe_running() || (*insn_p != BREAKPOINT_INSTRUCTION_2)) + return 0; + + if (current_kprobe->post_handler) + current_kprobe->post_handler(current_kprobe, regs, 0); + + undo_singlestep(current_kprobe, regs); + + unlock_kprobes(); + preempt_enable_no_resched(); + + return 1; +} + +/* Interrupts disabled, kprobe_lock held. */ +static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) +{ + if (current_kprobe->fault_handler + && current_kprobe->fault_handler(current_kprobe, regs, trapnr)) + return 1; + + if (kprobe_status & KPROBE_HIT_SS) { + undo_singlestep(current_kprobe, regs); + + unlock_kprobes(); + preempt_enable_no_resched(); + } + return 0; +} + +/* + * Wrapper routine to for handling exceptions. + */ +int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, + void *data) +{ + struct die_args *args = (struct die_args *)data; + switch (val) { + case DIE_DEBUG: + if (kprobe_handler(args->regs)) + return NOTIFY_OK; + break; + case DIE_DEBUG_2: + if (post_kprobe_handler(args->regs)) + return NOTIFY_OK; + break; + case DIE_GPF: + if (kprobe_running() && + kprobe_fault_handler(args->regs, args->trapnr)) + return NOTIFY_OK; + break; + case DIE_PAGE_FAULT: + if (kprobe_running() && + kprobe_fault_handler(args->regs, args->trapnr)) + return NOTIFY_OK; + break; + default: + break; + } + return NOTIFY_BAD; +} + +asmlinkage void kprobe_trap(unsigned long trap_level, struct pt_regs *regs) +{ + BUG_ON(trap_level != 0x170 && trap_level != 0x171); + + if (user_mode(regs)) { + local_irq_enable(); + bad_trap(regs, trap_level); + return; + } + + /* trap_level == 0x170 --> ta 0x70 + * trap_level == 0x171 --> ta 0x71 + */ + if (notify_die((trap_level == 0x170) ? DIE_DEBUG : DIE_DEBUG_2, + (trap_level == 0x170) ? "debug" : "debug_2", + regs, 0, trap_level, SIGTRAP) != NOTIFY_OK) + bad_trap(regs, trap_level); +} + +/* Jprobes support. */ +static struct pt_regs jprobe_saved_regs; +static struct sparc_stackf jprobe_saved_stack; + +int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) +{ + struct jprobe *jp = container_of(p, struct jprobe, kp); + + memcpy(&jprobe_saved_regs, regs, sizeof(*regs)); + + /* Save a whole stack frame, this gets arguments + * pushed onto the stack after using up all the + * arg registers. + */ + memcpy(&jprobe_saved_stack, + (char *) (regs->u_regs[UREG_FP] + STACK_BIAS), + sizeof(jprobe_saved_stack)); + + regs->tpc = (unsigned long) jp->entry; + regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; + + return 1; +} + +void jprobe_return(void) +{ + preempt_enable_no_resched(); + __asm__ __volatile__( + ".globl jprobe_return_trap_instruction\n" +"jprobe_return_trap_instruction:\n\t" + "ta 0x70"); +} + +extern void jprobe_return_trap_instruction(void); + +int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) +{ + u32 *addr = (u32 *) regs->tpc; + + if (addr == (u32 *) jprobe_return_trap_instruction) { + /* Restore old register state. Do pt_regs + * first so that UREG_FP is the original one for + * the stack frame restore. + */ + memcpy(regs, &jprobe_saved_regs, sizeof(*regs)); + + memcpy((char *) (regs->u_regs[UREG_FP] + STACK_BIAS), + &jprobe_saved_stack, + sizeof(jprobe_saved_stack)); + + return 1; + } + return 0; +} diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc64/kernel/pci.c 2004-09-06 16:37:50 -07:00 @@ -41,7 +41,6 @@ #else /* List of all PCI controllers found in the system. */ -spinlock_t pci_controller_lock = SPIN_LOCK_UNLOCKED; struct pci_controller_info *pci_controller_root = NULL; /* Each PCI controller found gets a unique index. */ @@ -298,12 +297,9 @@ static void __init pci_scan_each_controller_bus(void) { struct pci_controller_info *p; - unsigned long flags; - spin_lock_irqsave(&pci_controller_lock, flags); for (p = pci_controller_root; p; p = p->next) p->scan_bus(p); - spin_unlock_irqrestore(&pci_controller_lock, flags); } /* Reorder the pci_dev chain, so that onboard devices come first diff -Nru a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c --- a/arch/sparc64/kernel/pci_common.c 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/kernel/pci_common.c 2004-09-06 16:37:51 -07:00 @@ -15,18 +15,13 @@ */ void __init pci_fixup_host_bridge_self(struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; - - walk = walk->next; - while (walk != &pbus->devices) { - struct pci_dev *pdev = pci_dev_b(walk); + struct pci_dev *pdev; + list_for_each_entry(pdev, &pbus->devices, bus_list) { if (pdev->class >> 8 == PCI_CLASS_BRIDGE_HOST) { pbus->self = pdev; return; } - - walk = walk->next; } prom_printf("PCI: Critical error, cannot find host bridge PDEV.\n"); @@ -217,31 +212,18 @@ struct pci_pbm_info *pbm, int prom_node) { - struct list_head *walk = &pbus->devices; - - /* This loop is coded like this because the cookie - * fillin routine can delete devices from the tree. - */ - walk = walk->next; - while (walk != &pbus->devices) { - struct pci_dev *pdev = pci_dev_b(walk); - struct list_head *walk_next = walk->next; + struct pci_dev *pdev, *pdev_next; + struct pci_bus *this_pbus, *pbus_next; + /* This must be _safe because the cookie fillin + routine can delete devices from the tree. */ + list_for_each_entry_safe(pdev, pdev_next, &pbus->devices, bus_list) pdev_cookie_fillin(pbm, pdev, prom_node); - walk = walk_next; - } - - walk = &pbus->children; - walk = walk->next; - while (walk != &pbus->children) { - struct pci_bus *this_pbus = pci_bus_b(walk); + list_for_each_entry_safe(this_pbus, pbus_next, &pbus->children, node) { struct pcidev_cookie *pcp = this_pbus->self->sysdata; - struct list_head *walk_next = walk->next; pci_fill_in_pbm_cookies(this_pbus, pbm, pcp->prom_node); - - walk = walk_next; } } @@ -431,14 +413,14 @@ void __init pci_record_assignments(struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *dev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) - pdev_record_assignments(pbm, pci_dev_b(walk)); + list_for_each_entry(dev, &pbus->devices, bus_list) + pdev_record_assignments(pbm, dev); - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_record_assignments(pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_record_assignments(pbm, bus); } /* Return non-zero if PDEV has implicit I/O resources even @@ -549,14 +531,14 @@ void __init pci_assign_unassigned(struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *dev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) - pdev_assign_unassigned(pbm, pci_dev_b(walk)); + list_for_each_entry(dev, &pbus->devices, bus_list) + pdev_assign_unassigned(pbm, dev); - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_assign_unassigned(pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_assign_unassigned(pbm, bus); } static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt) @@ -797,14 +779,14 @@ void __init pci_fixup_irq(struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *dev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) - pdev_fixup_irq(pci_dev_b(walk)); + list_for_each_entry(dev, &pbus->devices, bus_list) + pdev_fixup_irq(dev); - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_fixup_irq(pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_fixup_irq(pbm, bus); } static void pdev_setup_busmastering(struct pci_dev *pdev, int is_66mhz) @@ -897,7 +879,7 @@ void pci_determine_66mhz_disposition(struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk; + struct pci_dev *pdev; int all_are_66mhz; u16 status; @@ -906,11 +888,8 @@ goto out; } - walk = &pbus->devices; all_are_66mhz = 1; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) { - struct pci_dev *pdev = pci_dev_b(walk); - + list_for_each_entry(pdev, &pbus->devices, bus_list) { pci_read_config_word(pdev, PCI_STATUS, &status); if (!(status & PCI_STATUS_66MHZ)) { all_are_66mhz = 0; @@ -929,17 +908,17 @@ void pci_setup_busmastering(struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *dev; + struct pci_bus *bus; int is_66mhz; is_66mhz = pbm->is_66mhz_capable && pbm->all_devs_66mhz; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) - pdev_setup_busmastering(pci_dev_b(walk), is_66mhz); + list_for_each_entry(dev, &pbus->devices, bus_list) + pdev_setup_busmastering(dev, is_66mhz); - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_setup_busmastering(pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_setup_busmastering(pbm, bus); } void pci_register_legacy_regions(struct resource *io_res, @@ -987,10 +966,10 @@ struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *pdev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) { - struct pci_dev *pdev = pci_dev_b(walk); + list_for_each_entry(pdev, &pbus->devices, bus_list) { u16 status, error_bits; pci_read_config_word(pdev, PCI_STATUS, &status); @@ -1005,19 +984,18 @@ } } - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_scan_for_target_abort(p, pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_scan_for_target_abort(p, pbm, bus); } void pci_scan_for_master_abort(struct pci_controller_info *p, struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *pdev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) { - struct pci_dev *pdev = pci_dev_b(walk); + list_for_each_entry(pdev, &pbus->devices, bus_list) { u16 status, error_bits; pci_read_config_word(pdev, PCI_STATUS, &status); @@ -1031,19 +1009,18 @@ } } - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_scan_for_master_abort(p, pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_scan_for_master_abort(p, pbm, bus); } void pci_scan_for_parity_error(struct pci_controller_info *p, struct pci_pbm_info *pbm, struct pci_bus *pbus) { - struct list_head *walk = &pbus->devices; + struct pci_dev *pdev; + struct pci_bus *bus; - for (walk = walk->next; walk != &pbus->devices; walk = walk->next) { - struct pci_dev *pdev = pci_dev_b(walk); + list_for_each_entry(pdev, &pbus->devices, bus_list) { u16 status, error_bits; pci_read_config_word(pdev, PCI_STATUS, &status); @@ -1058,7 +1035,6 @@ } } - walk = &pbus->children; - for (walk = walk->next; walk != &pbus->children; walk = walk->next) - pci_scan_for_parity_error(p, pbm, pci_bus_b(walk)); + list_for_each_entry(bus, &pbus->children, node) + pci_scan_for_parity_error(p, pbm, bus); } diff -Nru a/arch/sparc64/kernel/pci_impl.h b/arch/sparc64/kernel/pci_impl.h --- a/arch/sparc64/kernel/pci_impl.h 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/pci_impl.h 2004-09-06 16:37:53 -07:00 @@ -11,7 +11,6 @@ #include #include -extern spinlock_t pci_controller_lock; extern struct pci_controller_info *pci_controller_root; extern int pci_num_controllers; diff -Nru a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c --- a/arch/sparc64/kernel/pci_psycho.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/pci_psycho.c 2004-09-06 16:37:53 -07:00 @@ -1487,22 +1487,18 @@ struct linux_prom64_registers pr_regs[3]; struct pci_controller_info *p; struct pci_iommu *iommu; - unsigned long flags; u32 upa_portid; int is_pbm_a, err; upa_portid = prom_getintdefault(node, "upa-portid", 0xff); - spin_lock_irqsave(&pci_controller_lock, flags); for(p = pci_controller_root; p; p = p->next) { if (p->pbm_A.portid == upa_portid) { - spin_unlock_irqrestore(&pci_controller_lock, flags); is_pbm_a = (p->pbm_A.prom_node == 0); psycho_pbm_init(p, node, is_pbm_a); return; } } - spin_unlock_irqrestore(&pci_controller_lock, flags); p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); if (!p) { @@ -1518,10 +1514,8 @@ memset(iommu, 0, sizeof(*iommu)); p->pbm_A.iommu = p->pbm_B.iommu = iommu; - spin_lock_irqsave(&pci_controller_lock, flags); p->next = pci_controller_root; pci_controller_root = p; - spin_unlock_irqrestore(&pci_controller_lock, flags); p->pbm_A.portid = upa_portid; p->pbm_B.portid = upa_portid; diff -Nru a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c --- a/arch/sparc64/kernel/pci_sabre.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/kernel/pci_sabre.c 2004-09-06 16:37:55 -07:00 @@ -1113,10 +1113,9 @@ static void __init apb_init(struct pci_controller_info *p, struct pci_bus *sabre_bus) { - struct list_head *walk = &sabre_bus->devices; + struct pci_dev *pdev; - for (walk = walk->next; walk != &sabre_bus->devices; walk = walk->next) { - struct pci_dev *pdev = pci_dev_b(walk); + list_for_each_entry(pdev, &sabre_bus->devices, bus_list) { if (pdev->vendor == PCI_VENDOR_ID_SUN && pdev->device == PCI_DEVICE_ID_SUN_SIMBA) { @@ -1178,10 +1177,9 @@ static void __init sabre_scan_bus(struct pci_controller_info *p) { static int once; - struct pci_bus *sabre_bus; + struct pci_bus *sabre_bus, *pbus; struct pci_pbm_info *pbm; struct pcidev_cookie *cookie; - struct list_head *walk; int sabres_scanned; /* The APB bridge speaks to the Sabre host PCI bridge @@ -1217,9 +1215,7 @@ sabres_scanned = 0; - walk = &sabre_bus->children; - for (walk = walk->next; walk != &sabre_bus->children; walk = walk->next) { - struct pci_bus *pbus = pci_bus_b(walk); + list_for_each_entry(pbus, &sabre_bus->children, node) { if (pbus->number == p->pbm_A.pci_first_busno) { pbm = &p->pbm_A; @@ -1554,7 +1550,6 @@ struct linux_prom64_registers pr_regs[2]; struct pci_controller_info *p; struct pci_iommu *iommu; - unsigned long flags; int tsbsize, err; u32 busrange[2]; u32 vdma[2]; @@ -1602,10 +1597,8 @@ upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff); - spin_lock_irqsave(&pci_controller_lock, flags); p->next = pci_controller_root; pci_controller_root = p; - spin_unlock_irqrestore(&pci_controller_lock, flags); p->pbm_A.portid = upa_portid; p->pbm_B.portid = upa_portid; diff -Nru a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c --- a/arch/sparc64/kernel/pci_schizo.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/pci_schizo.c 2004-09-06 16:37:53 -07:00 @@ -2081,13 +2081,11 @@ { struct pci_controller_info *p; struct pci_iommu *iommu; - unsigned long flags; int is_pbm_a; u32 portid; portid = prom_getintdefault(node, "portid", 0xff); - spin_lock_irqsave(&pci_controller_lock, flags); for(p = pci_controller_root; p; p = p->next) { struct pci_pbm_info *pbm; @@ -2099,13 +2097,11 @@ &p->pbm_B); if (portid_compare(pbm->portid, portid, chip_type)) { - spin_unlock_irqrestore(&pci_controller_lock, flags); is_pbm_a = (p->pbm_A.prom_node == 0); schizo_pbm_init(p, node, portid, chip_type); return; } } - spin_unlock_irqrestore(&pci_controller_lock, flags); p = kmalloc(sizeof(struct pci_controller_info), GFP_ATOMIC); if (!p) { @@ -2130,10 +2126,8 @@ memset(iommu, 0, sizeof(*iommu)); p->pbm_B.iommu = iommu; - spin_lock_irqsave(&pci_controller_lock, flags); p->next = pci_controller_root; pci_controller_root = p; - spin_unlock_irqrestore(&pci_controller_lock, flags); p->index = pci_num_controllers++; p->pbms_same_domain = 0; diff -Nru a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c --- a/arch/sparc64/kernel/process.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/kernel/process.c 2004-09-06 16:37:52 -07:00 @@ -588,8 +588,6 @@ { int __user *parent_tid_ptr, *child_tid_ptr; - clone_flags &= ~CLONE_IDLETASK; - #ifdef CONFIG_COMPAT if (test_thread_flag(TIF_32BIT)) { parent_tid_ptr = compat_ptr(regs->u_regs[UREG_I2]); diff -Nru a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c --- a/arch/sparc64/kernel/signal.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/signal.c 2004-09-06 16:37:53 -07:00 @@ -84,8 +84,8 @@ regs->tnpc = npc; err |= __get_user(regs->y, &((*grp)[MC_Y])); err |= __get_user(tstate, &((*grp)[MC_TSTATE])); - regs->tstate &= ~(TSTATE_ICC | TSTATE_XCC); - regs->tstate |= (tstate & (TSTATE_ICC | TSTATE_XCC)); + regs->tstate &= ~(TSTATE_ASI | TSTATE_ICC | TSTATE_XCC); + regs->tstate |= (tstate & (TSTATE_ASI | TSTATE_ICC | TSTATE_XCC)); err |= __get_user(regs->u_regs[UREG_G1], (&(*grp)[MC_G1])); err |= __get_user(regs->u_regs[UREG_G2], (&(*grp)[MC_G2])); err |= __get_user(regs->u_regs[UREG_G3], (&(*grp)[MC_G3])); @@ -135,7 +135,7 @@ return; do_sigsegv: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } asmlinkage void sparc64_get_context(struct pt_regs *regs) @@ -226,7 +226,7 @@ return; do_sigsegv: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } struct rt_signal_frame { @@ -408,9 +408,9 @@ err |= __get_user(tstate, &sf->regs.tstate); err |= copy_from_user(regs->u_regs, sf->regs.u_regs, sizeof(regs->u_regs)); - /* User can only change condition codes in %tstate. */ - regs->tstate &= ~(TSTATE_ICC | TSTATE_XCC); - regs->tstate |= (tstate & (TSTATE_ICC | TSTATE_XCC)); + /* User can only change condition codes and %asi in %tstate. */ + regs->tstate &= ~(TSTATE_ASI | TSTATE_ICC | TSTATE_XCC); + regs->tstate |= (tstate & (TSTATE_ASI | TSTATE_ICC | TSTATE_XCC)); err |= __get_user(fpu_save, &sf->fpu_save); if (fpu_save) @@ -439,7 +439,7 @@ spin_unlock_irq(¤t->sighand->siglock); return; segv: - send_sig(SIGSEGV, current, 1); + force_sig(SIGSEGV, current); } /* Checks if the fp is valid */ @@ -565,7 +565,7 @@ sigill: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signo, current); } static inline void handle_signal(unsigned long signr, struct k_sigaction *ka, @@ -574,8 +574,6 @@ { setup_rt_frame(ka, regs, signr, oldset, (ka->sa.sa_flags & SA_SIGINFO) ? info : NULL); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; if (!(ka->sa.sa_flags & SA_NOMASK)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -615,6 +613,7 @@ { siginfo_t info; struct signal_deliver_cookie cookie; + struct k_sigaction ka; int signr; cookie.restart_syscall = restart_syscall; @@ -632,15 +631,11 @@ } #endif - signr = get_signal_to_deliver(&info, regs, &cookie); + signr = get_signal_to_deliver(&info, &ka, regs, &cookie); if (signr > 0) { - struct k_sigaction *ka; - - ka = ¤t->sighand->action[signr-1]; - if (cookie.restart_syscall) - syscall_restart(orig_i0, regs, &ka->sa); - handle_signal(signr, ka, &info, oldset, regs); + syscall_restart(orig_i0, regs, &ka.sa); + handle_signal(signr, &ka, &info, oldset, regs); return 1; } if (cookie.restart_syscall && diff -Nru a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c --- a/arch/sparc64/kernel/signal32.c 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc64/kernel/signal32.c 2004-09-06 16:37:50 -07:00 @@ -59,6 +59,16 @@ unsigned int extramask[_COMPAT_NSIG_WORDS - 1]; }; +/* This magic should be in g_upper[0] for all upper parts + * to be valid. + */ +#define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269 +typedef struct { + unsigned int g_upper[8]; + unsigned int o_upper[8]; + unsigned int asi; +} siginfo_extra_v8plus_t; + /* * And the new one, intended to be used for Linux applications only * (we have enough in there to work with clone). @@ -76,9 +86,62 @@ __siginfo_fpu_t fpu_state; }; +struct siginfo32 { + int si_signo; + int si_errno; + int si_code; + + union { + int _pad[SI_PAD_SIZE32]; + + /* kill() */ + struct { + compat_pid_t _pid; /* sender's pid */ + unsigned int _uid; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { + timer_t _tid; /* timer id */ + int _overrun; /* overrun count */ + sigval_t32 _sigval; /* same as below */ + int _sys_private; /* not to be passed to user */ + } _timer; + + /* POSIX.1b signals */ + struct { + compat_pid_t _pid; /* sender's pid */ + unsigned int _uid; /* sender's uid */ + sigval_t32 _sigval; + } _rt; + + /* SIGCHLD */ + struct { + compat_pid_t _pid; /* which child */ + unsigned int _uid; /* sender's uid */ + int _status; /* exit code */ + compat_clock_t _utime; + compat_clock_t _stime; + struct compat_rusage _rusage; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */ + struct { + u32 _addr; /* faulting insn/memory ref. */ + int _trapno; + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; + } _sifields; +}; + struct rt_signal_frame32 { struct sparc_stackf32 ss; - siginfo_t32 info; + struct siginfo32 info; struct pt_regs32 regs; compat_sigset_t mask; /* __siginfo_fpu32_t * */ u32 fpu_save; @@ -95,11 +158,11 @@ #define NF_ALIGNEDSZ (((sizeof(struct new_signal_frame32) + 7) & (~7))) #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame32) + 7) & (~7))) -int copy_siginfo_to_user32(siginfo_t32 __user *to, siginfo_t *from) +int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from) { int err; - if (!access_ok(VERIFY_WRITE, to, sizeof(siginfo_t32))) + if (!access_ok(VERIFY_WRITE, to, sizeof(struct siginfo32))) return -EFAULT; /* If you change siginfo_t structure, please be sure @@ -125,6 +188,8 @@ err |= __put_user(from->si_utime, &to->si_utime); err |= __put_user(from->si_stime, &to->si_stime); err |= __put_user(from->si_status, &to->si_status); + err |= put_compat_rusage(&from->si_rusage, + &to->si_rusage); default: err |= __put_user(from->si_pid, &to->si_pid); err |= __put_user(from->si_uid, &to->si_uid); @@ -145,6 +210,22 @@ return err; } +/* CAUTION: This is just a very minimalist implementation for the + * sake of compat_sys_rt_sigqueueinfo() + */ +int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from) +{ + if (!access_ok(VERIFY_WRITE, from, sizeof(struct siginfo32))) + return -EFAULT; + + if (copy_from_user(to, from, 3*sizeof(int)) || + copy_from_user(to->_sifields._pad, from->_sifields._pad, + SI_PAD_SIZE)) + return -EFAULT; + + return 0; +} + /* * atomically swap in the new signal mask, and wait for a signal. * This is really tricky on the Sparc, watch out... @@ -299,8 +380,13 @@ if ((psr & (PSR_VERS|PSR_IMPL)) == PSR_V8PLUS) { err |= __get_user(i, &sf->v8plus.g_upper[0]); if (i == SIGINFO_EXTRA_V8PLUS_MAGIC) { + unsigned long asi; + for (i = UREG_G1; i <= UREG_I7; i++) err |= __get_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); + err |= __get_user(asi, &sf->v8plus.asi); + regs->tstate &= ~TSTATE_ASI; + regs->tstate |= ((asi & 0xffUL) << 24UL); } } @@ -330,7 +416,7 @@ return; segv: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } asmlinkage void do_sigreturn32(struct pt_regs *regs) @@ -400,7 +486,7 @@ return; segv: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) @@ -447,8 +533,13 @@ if ((psr & (PSR_VERS|PSR_IMPL)) == PSR_V8PLUS) { err |= __get_user(i, &sf->v8plus.g_upper[0]); if (i == SIGINFO_EXTRA_V8PLUS_MAGIC) { + unsigned long asi; + for (i = UREG_G1; i <= UREG_I7; i++) err |= __get_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); + err |= __get_user(asi, &sf->v8plus.asi); + regs->tstate &= ~TSTATE_ASI; + regs->tstate |= ((asi & 0xffUL) << 24UL); } } @@ -487,7 +578,7 @@ spin_unlock_irq(¤t->sighand->siglock); return; segv: - do_exit(SIGSEGV); + force_sig(SIGSEGV, current); } /* Checks if the fp is valid */ @@ -648,7 +739,7 @@ return; sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signr, current); } @@ -715,7 +806,10 @@ err |= __put_user(sizeof(siginfo_extra_v8plus_t), &sf->extra_size); err |= __put_user(SIGINFO_EXTRA_V8PLUS_MAGIC, &sf->v8plus.g_upper[0]); for (i = 1; i < 16; i++) - err |= __put_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); + err |= __put_user(((u32 *)regs->u_regs)[2*i], + &sf->v8plus.g_upper[i]); + err |= __put_user((regs->tstate & TSTATE_ASI) >> 24UL, + &sf->v8plus.asi); if (psr & PSR_EF) { err |= save_fpu_state32(regs, &sf->fpu_state); @@ -796,7 +890,7 @@ sigill: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signo, current); } /* Setup a Solaris stack frame */ @@ -920,7 +1014,7 @@ return; sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signr, current); } asmlinkage int @@ -1071,7 +1165,7 @@ return -EINTR; sigsegv: - do_exit(SIGSEGV); + return -EFAULT; } static void setup_rt_frame32(struct k_sigaction *ka, struct pt_regs *regs, @@ -1120,6 +1214,8 @@ for (i = 1; i < 16; i++) err |= __put_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); + err |= __put_user((regs->tstate & TSTATE_ASI) >> 24UL, + &sf->v8plus.asi); if (psr & PSR_EF) { err |= save_fpu_state32(regs, &sf->fpu_state); @@ -1208,7 +1304,7 @@ sigill: do_exit(SIGILL); sigsegv: - do_exit(SIGSEGV); + force_sigsegv(signr, current); } static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka, @@ -1227,8 +1323,6 @@ else setup_frame32(&ka->sa, regs, signr, oldset, info); } - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; if (!(ka->sa.sa_flags & SA_NOMASK)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -1268,21 +1362,19 @@ { siginfo_t info; struct signal_deliver_cookie cookie; + struct k_sigaction ka; int signr; int svr4_signal = current->personality == PER_SVR4; cookie.restart_syscall = restart_syscall; cookie.orig_i0 = orig_i0; - signr = get_signal_to_deliver(&info, regs, &cookie); + signr = get_signal_to_deliver(&info, &ka, regs, &cookie); if (signr > 0) { - struct k_sigaction *ka; - - ka = ¤t->sighand->action[signr-1]; - if (cookie.restart_syscall) - syscall_restart32(orig_i0, regs, &ka->sa); - handle_signal32(signr, ka, &info, oldset, regs, svr4_signal); + syscall_restart32(orig_i0, regs, &ka.sa); + handle_signal32(signr, &ka, &info, oldset, + regs, svr4_signal); return 1; } if (cookie.restart_syscall && diff -Nru a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c --- a/arch/sparc64/kernel/smp.c 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc64/kernel/smp.c 2004-09-06 16:37:50 -07:00 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -303,14 +304,7 @@ struct task_struct *p; int timeout, ret, cpu_node; - kernel_thread(NULL, NULL, CLONE_IDLETASK); - - p = prev_task(&init_task); - - init_idle(p, cpu); - - unhash_process(p); - + p = fork_idle(cpu); callin_flag = 0; cpu_new_thread = p->thread_info; cpu_set(cpu, cpu_callout_map); @@ -981,8 +975,6 @@ smp_cross_call(&xcall_promstop, 0, 0, 0); } -extern void sparc64_do_profile(struct pt_regs *regs); - #define prof_multiplier(__cpu) cpu_data(__cpu).multiplier #define prof_counter(__cpu) cpu_data(__cpu).counter @@ -1008,7 +1000,7 @@ } do { - sparc64_do_profile(regs); + profile_tick(CPU_PROFILING, regs); if (!--prof_counter(cpu)) { irq_enter(); diff -Nru a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c --- a/arch/sparc64/kernel/sparc64_ksyms.c 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc64/kernel/sparc64_ksyms.c 2004-09-06 16:37:54 -07:00 @@ -372,6 +372,12 @@ EXPORT_SYMBOL_NOVERS(memmove); EXPORT_SYMBOL_NOVERS(strncmp); +/* Delay routines. */ +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); +EXPORT_SYMBOL(__const_udelay); +EXPORT_SYMBOL(__delay); + void VISenter(void); /* RAID code needs this */ EXPORT_SYMBOL_NOVERS(VISenter); diff -Nru a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S --- a/arch/sparc64/kernel/sys32.S 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/kernel/sys32.S 2004-09-06 16:37:51 -07:00 @@ -120,7 +120,7 @@ SIGN2(sys32_setpgid, sys_setpgid, %o0, %o1) SIGN3(sys32_setpriority, sys_setpriority, %o0, %o1, %o2) SIGN1(sys32_ssetmask, sys_ssetmask, %o0) -SIGN2(sys32_syslog, sys_syslog, %o0, %o1) +SIGN2(sys32_syslog, sys_syslog, %o0, %o2) SIGN1(sys32_umask, sys_umask, %o0) SIGN3(sys32_tgkill, sys_tgkill, %o0, %o1, %o2) SIGN1(sys32_sendto, sys_sendto, %o0) diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/sys_sparc32.c 2004-09-06 16:37:53 -07:00 @@ -1045,7 +1045,7 @@ } asmlinkage long sys32_rt_sigtimedwait(compat_sigset_t __user *uthese, - siginfo_t32 __user *uinfo, + struct siginfo32 __user *uinfo, struct compat_timespec __user *uts, compat_size_t sigsetsize) { @@ -1130,15 +1130,15 @@ } asmlinkage long compat_sys_rt_sigqueueinfo(int pid, int sig, - siginfo_t32 __user *uinfo) + struct siginfo32 __user *uinfo) { siginfo_t info; int ret; mm_segment_t old_fs = get_fs(); - if (copy_from_user (&info, uinfo, 3*sizeof(int)) || - copy_from_user (info._sifields._pad, uinfo->_sifields._pad, SI_PAD_SIZE)) + if (copy_siginfo_to_kernel32(&info, uinfo)) return -EFAULT; + set_fs (KERNEL_DS); ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); set_fs (old_fs); @@ -1736,3 +1736,23 @@ return err; } +asmlinkage long compat_sys_waitid(u32 which, u32 pid, + struct siginfo32 __user *uinfo, u32 options) +{ + siginfo_t info; + long ret; + mm_segment_t old_fs = get_fs(); + + memset(&info, 0, sizeof(info)); + + set_fs (KERNEL_DS); + ret = sys_waitid((int)which, (compat_pid_t) pid, + (siginfo_t __user *) &info, (int) options); + set_fs (old_fs); + + if (ret < 0 || info.si_signo == 0) + return ret; + BUG_ON(info.si_code & __SI_MASK); + info.si_code |= __SI_CHLD; + return copy_siginfo_to_user32(uinfo, &info); +} diff -Nru a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S --- a/arch/sparc64/kernel/systbls.S 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/kernel/systbls.S 2004-09-06 16:37:52 -07:00 @@ -75,7 +75,7 @@ /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_timer_gettime, sys_timer_getoverrun .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink - .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, sys_ni_syscall + .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid /*280*/ .word sys_ni_syscall, sys_ni_syscall, sys_ni_syscall #endif /* CONFIG_COMPAT */ @@ -141,7 +141,7 @@ /*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink - .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_ni_syscall + .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid /*280*/ .word sys_ni_syscall, sys_ni_syscall, sys_ni_syscall #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ diff -Nru a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c --- a/arch/sparc64/kernel/time.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/kernel/time.c 2004-09-06 16:37:52 -07:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,19 @@ #define TICK_PRIV_BIT (1UL << 63) +#ifdef CONFIG_SMP +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= (unsigned long)&__lock_text_start && + pc <= (unsigned long)&__lock_text_end) + return regs->u_regs[UREG_RETPC]; + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif + static void tick_disable_protection(void) { /* Set things up so user can access tick register for profiling @@ -441,28 +455,6 @@ } } -void sparc64_do_profile(struct pt_regs *regs) -{ - unsigned long pc; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - if (!prof_buffer) - return; - - pc = regs->tpc; - - pc -= (unsigned long) _stext; - pc >>= prof_shift; - - if(pc >= prof_len) - pc = prof_len - 1; - atomic_inc((atomic_t *)&prof_buffer[pc]); -} - static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) { unsigned long ticks, pstate; @@ -471,7 +463,7 @@ do { #ifndef CONFIG_SMP - sparc64_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #endif do_timer(regs); diff -Nru a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c --- a/arch/sparc64/kernel/traps.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/kernel/traps.c 2004-09-06 16:37:55 -07:00 @@ -36,10 +36,24 @@ #include #include #include +#include #ifdef CONFIG_KMOD #include #endif +struct notifier_block *sparc64die_chain; +static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED; + +int register_die_notifier(struct notifier_block *nb) +{ + int err = 0; + unsigned long flags; + spin_lock_irqsave(&die_notifier_lock, flags); + err = notifier_chain_register(&sparc64die_chain, nb); + spin_unlock_irqrestore(&die_notifier_lock, flags); + return err; +} + /* When an irrecoverable trap occurs at tl > 0, the trap entry * code logs the trap state registers at every level in the trap * stack. It is found at (pt_regs + sizeof(pt_regs)) and the layout @@ -71,11 +85,20 @@ } } -void bad_trap (struct pt_regs *regs, long lvl) +void do_call_debug(struct pt_regs *regs) +{ + notify_die(DIE_CALL, "debug call", regs, 0, 255, SIGINT); +} + +void bad_trap(struct pt_regs *regs, long lvl) { char buffer[32]; siginfo_t info; + if (notify_die(DIE_TRAP, "bad trap", regs, + 0, lvl, SIGTRAP) == NOTIFY_OK) + return; + if (lvl < 0x100) { sprintf(buffer, "Bad hw trap %lx at tl0\n", lvl); die_if_kernel(buffer, regs); @@ -84,7 +107,7 @@ lvl -= 0x100; if (regs->tstate & TSTATE_PRIV) { sprintf(buffer, "Kernel bad sw trap %lx", lvl); - die_if_kernel (buffer, regs); + die_if_kernel(buffer, regs); } if (test_thread_flag(TIF_32BIT)) { regs->tpc &= 0xffffffff; @@ -98,10 +121,14 @@ force_sig_info(SIGILL, &info, current); } -void bad_trap_tl1 (struct pt_regs *regs, long lvl) +void bad_trap_tl1(struct pt_regs *regs, long lvl) { char buffer[32]; + if (notify_die(DIE_TRAP_TL1, "bad trap tl1", regs, + 0, lvl, SIGTRAP) == NOTIFY_OK) + return; + dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); sprintf (buffer, "Bad trap %lx at tl>0", lvl); @@ -121,6 +148,10 @@ { siginfo_t info; + if (notify_die(DIE_TRAP, "instruction access exception", regs, + 0, 0x8, SIGTRAP) == NOTIFY_OK) + return; + if (regs->tstate & TSTATE_PRIV) { printk("instruction_access_exception: SFSR[%016lx] SFAR[%016lx], going.\n", sfsr, sfar); @@ -141,15 +172,23 @@ void instruction_access_exception_tl1(struct pt_regs *regs, unsigned long sfsr, unsigned long sfar) { + if (notify_die(DIE_TRAP_TL1, "instruction access exception tl1", regs, + 0, 0x8, SIGTRAP) == NOTIFY_OK) + return; + dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); instruction_access_exception(regs, sfsr, sfar); } -void data_access_exception (struct pt_regs *regs, - unsigned long sfsr, unsigned long sfar) +void data_access_exception(struct pt_regs *regs, + unsigned long sfsr, unsigned long sfar) { siginfo_t info; + if (notify_die(DIE_TRAP, "data access exception", regs, + 0, 0x30, SIGTRAP) == NOTIFY_OK) + return; + if (regs->tstate & TSTATE_PRIV) { /* Test if this comes from uaccess places. */ unsigned long fixup; @@ -220,6 +259,10 @@ spitfire_clean_and_reenable_l1_caches(); + if (notify_die(DIE_TRAP, "instruction access exception", regs, + 0, 0x8, SIGTRAP) == NOTIFY_OK) + return; + info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_OBJERR; @@ -230,6 +273,8 @@ void do_dae(struct pt_regs *regs) { + siginfo_t info; + #ifdef CONFIG_PCI if (pci_poke_in_progress && pci_poke_cpu == smp_processor_id()) { spitfire_clean_and_reenable_l1_caches(); @@ -244,7 +289,18 @@ return; } #endif - do_iae(regs); + spitfire_clean_and_reenable_l1_caches(); + + if (notify_die(DIE_TRAP, "data access exception", regs, + 0, 0x30, SIGTRAP) == NOTIFY_OK) + return; + + info.si_signo = SIGBUS; + info.si_errno = 0; + info.si_code = BUS_OBJERR; + info.si_addr = (void *)0; + info.si_trapno = 0; + force_sig_info(SIGBUS, &info, current); } static char ecc_syndrome_table[] = { @@ -1638,6 +1694,10 @@ void do_fpieee(struct pt_regs *regs) { + if (notify_die(DIE_TRAP, "fpu exception ieee", regs, + 0, 0x24, SIGFPE) == NOTIFY_OK) + return; + do_fpe_common(regs); } @@ -1648,6 +1708,10 @@ struct fpustate *f = FPUSTATE; int ret = 0; + if (notify_die(DIE_TRAP, "fpu exception other", regs, + 0, 0x25, SIGFPE) == NOTIFY_OK) + return; + switch ((current_thread_info()->xfsr[0] & 0x1c000)) { case (2 << 14): /* unfinished_FPop */ case (3 << 14): /* unimplemented_FPop */ @@ -1663,6 +1727,10 @@ { siginfo_t info; + if (notify_die(DIE_TRAP, "tagged arithmetic overflow", regs, + 0, 0x26, SIGEMT) == NOTIFY_OK) + return; + if (regs->tstate & TSTATE_PRIV) die_if_kernel("Penguin overflow trap from kernel mode", regs); if (test_thread_flag(TIF_32BIT)) { @@ -1681,6 +1749,10 @@ { siginfo_t info; + if (notify_die(DIE_TRAP, "integer division by zero", regs, + 0, 0x28, SIGFPE) == NOTIFY_OK) + return; + if (regs->tstate & TSTATE_PRIV) die_if_kernel("TL0: Kernel divide by zero.", regs); if (test_thread_flag(TIF_32BIT)) { @@ -1786,6 +1858,7 @@ " \\__U_/\n"); printk("%s(%d): %s [#%d]\n", current->comm, current->pid, str, ++die_counter); + notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); __asm__ __volatile__("flushw"); __show_regs(regs); if (regs->tstate & TSTATE_PRIV) { @@ -1834,6 +1907,10 @@ u32 insn; siginfo_t info; + if (notify_die(DIE_TRAP, "illegal instruction", regs, + 0, 0x10, SIGILL) == NOTIFY_OK) + return; + if (tstate & TSTATE_PRIV) die_if_kernel("Kernel illegal instruction", regs); if (test_thread_flag(TIF_32BIT)) @@ -1859,6 +1936,10 @@ { siginfo_t info; + if (notify_die(DIE_TRAP, "memory address unaligned", regs, + 0, 0x34, SIGSEGV) == NOTIFY_OK) + return; + if (regs->tstate & TSTATE_PRIV) { extern void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn, @@ -1880,6 +1961,10 @@ void do_privop(struct pt_regs *regs) { siginfo_t info; + + if (notify_die(DIE_TRAP, "privileged operation", regs, + 0, 0x11, SIGILL) == NOTIFY_OK) + return; if (test_thread_flag(TIF_32BIT)) { regs->tpc &= 0xffffffff; diff -Nru a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S --- a/arch/sparc64/kernel/ttable.S 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/kernel/ttable.S 2004-09-06 16:37:53 -07:00 @@ -158,7 +158,7 @@ tl0_resv169: BTRAP(0x169) BTRAP(0x16a) BTRAP(0x16b) BTRAP(0x16c) tl0_linux64: LINUX_64BIT_SYSCALL_TRAP tl0_gsctx: TRAP(sparc64_get_context) TRAP(sparc64_set_context) -tl0_resv170: BTRAP(0x170) BTRAP(0x171) BTRAP(0x172) +tl0_resv170: KPROBES_TRAP(0x170) KPROBES_TRAP(0x171) BTRAP(0x172) tl0_resv173: BTRAP(0x173) BTRAP(0x174) BTRAP(0x175) BTRAP(0x176) BTRAP(0x177) tl0_resv178: BTRAP(0x178) BTRAP(0x179) BTRAP(0x17a) BTRAP(0x17b) BTRAP(0x17c) tl0_resv17d: BTRAP(0x17d) BTRAP(0x17e) BTRAP(0x17f) diff -Nru a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S --- a/arch/sparc64/kernel/vmlinux.lds.S 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc64/kernel/vmlinux.lds.S 2004-09-06 16:37:54 -07:00 @@ -16,6 +16,7 @@ { *(.text) SCHED_TEXT + LOCK_TEXT *(.gnu.warning) } =0 _etext = .; @@ -52,9 +53,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile --- a/arch/sparc64/lib/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc64/lib/Makefile 2004-09-06 16:37:50 -07:00 @@ -8,11 +8,11 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \ memscan.o strncpy_from_user.o strlen_user.o memcmp.o checksum.o \ VISbzero.o VISmemset.o VIScsum.o VIScsumcopy.o \ - VIScsumcopyusr.o VISsave.o atomic.o rwlock.o bitops.o \ + VIScsumcopyusr.o VISsave.o atomic.o bitops.o \ U1memcpy.o U1copy_from_user.o U1copy_to_user.o \ U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o \ copy_in_user.o user_fixup.o memmove.o \ - mcount.o ipcsum.o rwsem.o xor.o splock.o find_bit.o + mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o lib-$(CONFIG_DEBUG_SPINLOCK) += debuglocks.o lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o diff -Nru a/arch/sparc64/lib/U1memcpy.S b/arch/sparc64/lib/U1memcpy.S --- a/arch/sparc64/lib/U1memcpy.S 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/lib/U1memcpy.S 2004-09-06 16:37:51 -07:00 @@ -117,6 +117,7 @@ .align 64 .globl FUNC_NAME + .type FUNC_NAME,#function FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ PREAMBLE mov %o0, %g5 @@ -550,3 +551,5 @@ add %o1, 1, %o1 retl mov EX_RETVAL(%g5), %o0 + + .size FUNC_NAME, .-FUNC_NAME diff -Nru a/arch/sparc64/lib/U3memcpy.S b/arch/sparc64/lib/U3memcpy.S --- a/arch/sparc64/lib/U3memcpy.S 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/lib/U3memcpy.S 2004-09-06 16:37:55 -07:00 @@ -78,6 +78,7 @@ */ .globl FUNC_NAME + .type FUNC_NAME,#function FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ PREAMBLE mov %o0, %g5 @@ -412,3 +413,5 @@ add %o1, 1, %o1 retl mov EX_RETVAL(%g5), %o0 + + .size FUNC_NAME, .-FUNC_NAME diff -Nru a/arch/sparc64/lib/U3patch.S b/arch/sparc64/lib/U3patch.S --- a/arch/sparc64/lib/U3patch.S 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/lib/U3patch.S 2004-09-06 16:37:52 -07:00 @@ -22,9 +22,11 @@ flush %g2; .globl cheetah_patch_copyops + .type cheetah_patch_copyops,#function cheetah_patch_copyops: ULTRA3_DO_PATCH(memcpy, U3memcpy) ULTRA3_DO_PATCH(___copy_from_user, U3copy_from_user) ULTRA3_DO_PATCH(___copy_to_user, U3copy_to_user) retl nop + .size cheetah_patch_copyops,.-cheetah_patch_copyops diff -Nru a/arch/sparc64/lib/atomic.S b/arch/sparc64/lib/atomic.S --- a/arch/sparc64/lib/atomic.S 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc64/lib/atomic.S 2004-09-06 16:37:54 -07:00 @@ -10,6 +10,7 @@ .align 64 .globl __atomic_add + .type __atomic_add,#function __atomic_add: /* %o0 = increment, %o1 = atomic_ptr */ lduw [%o1], %g5 add %g5, %o0, %g7 @@ -19,8 +20,10 @@ membar #StoreLoad | #StoreStore retl add %g7, %o0, %o0 + .size __atomic_add, .-__atomic_add .globl __atomic_sub + .type __atomic_sub,#function __atomic_sub: /* %o0 = increment, %o1 = atomic_ptr */ lduw [%o1], %g5 sub %g5, %o0, %g7 @@ -30,8 +33,10 @@ membar #StoreLoad | #StoreStore retl sub %g7, %o0, %o0 + .size __atomic_sub, .-__atomic_sub .globl __atomic64_add + .type __atomic64_add,#function __atomic64_add: /* %o0 = increment, %o1 = atomic_ptr */ ldx [%o1], %g5 add %g5, %o0, %g7 @@ -41,8 +46,10 @@ membar #StoreLoad | #StoreStore retl add %g7, %o0, %o0 + .size __atomic64_add, .-__atomic64_add .globl __atomic64_sub + .type __atomic64_sub,#function __atomic64_sub: /* %o0 = increment, %o1 = atomic_ptr */ ldx [%o1], %g5 sub %g5, %o0, %g7 @@ -52,4 +59,4 @@ membar #StoreLoad | #StoreStore retl sub %g7, %o0, %o0 - + .size __atomic64_sub, .-__atomic64_sub diff -Nru a/arch/sparc64/lib/bitops.S b/arch/sparc64/lib/bitops.S --- a/arch/sparc64/lib/bitops.S 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc64/lib/bitops.S 2004-09-06 16:37:54 -07:00 @@ -9,6 +9,7 @@ .text .align 64 .globl ___test_and_set_bit + .type ___test_and_set_bit,#function ___test_and_set_bit: /* %o0=nr, %o1=addr */ srlx %o0, 6, %g1 mov 1, %g5 @@ -26,8 +27,10 @@ ldx [%o1], %g7 2: retl membar #StoreLoad | #StoreStore + .size ___test_and_set_bit, .-___test_and_set_bit .globl ___test_and_clear_bit + .type ___test_and_clear_bit,#function ___test_and_clear_bit: /* %o0=nr, %o1=addr */ srlx %o0, 6, %g1 mov 1, %g5 @@ -45,8 +48,10 @@ ldx [%o1], %g7 2: retl membar #StoreLoad | #StoreStore + .size ___test_and_clear_bit, .-___test_and_clear_bit .globl ___test_and_change_bit + .type ___test_and_change_bit,#function ___test_and_change_bit: /* %o0=nr, %o1=addr */ srlx %o0, 6, %g1 mov 1, %g5 @@ -64,3 +69,4 @@ 2: retl membar #StoreLoad | #StoreStore nop + .size ___test_and_change_bit, .-___test_and_change_bit diff -Nru a/arch/sparc64/lib/copy_in_user.S b/arch/sparc64/lib/copy_in_user.S --- a/arch/sparc64/lib/copy_in_user.S 2004-09-06 16:37:50 -07:00 +++ b/arch/sparc64/lib/copy_in_user.S 2004-09-06 16:37:50 -07:00 @@ -31,7 +31,8 @@ * to copy register windows around during thread cloning. */ - .globl ___copy_in_user + .globl ___copy_in_user + .type ___copy_in_user,#function ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ /* Writing to %asi is _expensive_ so we hardcode it. * Reading %asi to check for KERNEL_DS is comparatively @@ -99,11 +100,14 @@ retl clr %o0 + .size ___copy_in_user, .-___copy_in_user + /* Act like copy_{to,in}_user(), ie. return zero instead * of original destination pointer. This is invoked when * copy_{to,in}_user() finds that %asi is kernel space. */ .globl memcpy_user_stub + .type memcpy_user_stub,#function memcpy_user_stub: save %sp, -192, %sp mov %i0, %o0 @@ -112,3 +116,4 @@ mov %i2, %o2 ret restore %g0, %g0, %o0 + .size memcpy_user_stub, .-memcpy_user_stub diff -Nru a/arch/sparc64/lib/copy_page.S b/arch/sparc64/lib/copy_page.S --- a/arch/sparc64/lib/copy_page.S 2004-09-06 16:37:54 -07:00 +++ b/arch/sparc64/lib/copy_page.S 2004-09-06 16:37:54 -07:00 @@ -45,6 +45,7 @@ .align 32 .globl copy_user_page + .type copy_user_page,#function copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ lduw [%g6 + TI_PRE_COUNT], %o4 sethi %uhi(PAGE_OFFSET), %g2 @@ -237,3 +238,5 @@ retl stw %o4, [%g6 + TI_PRE_COUNT] + + .size copy_user_page, .-copy_user_page diff -Nru a/arch/sparc64/lib/debuglocks.c b/arch/sparc64/lib/debuglocks.c --- a/arch/sparc64/lib/debuglocks.c 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/lib/debuglocks.c 2004-09-06 16:37:53 -07:00 @@ -84,7 +84,7 @@ put_cpu(); } -int _spin_trylock(spinlock_t *lock) +int _do_spin_trylock(spinlock_t *lock) { unsigned long val, caller; int cpu = get_cpu(); diff -Nru a/arch/sparc64/lib/delay.c b/arch/sparc64/lib/delay.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/sparc64/lib/delay.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,49 @@ +/* delay.c: Delay loops for sparc64 + * + * Copyright (C) 2004 David S. Miller + * + * Based heavily upon x86 variant which is: + * Copyright (C) 1993 Linus Torvalds + * Copyright (C) 1997 Martin Mares + */ + +#include + +void __delay(unsigned long loops) +{ + __asm__ __volatile__( +" b,pt %%xcc, 1f\n" +" cmp %0, 0\n" +" .align 32\n" +"1:\n" +" bne,pt %%xcc, 1b\n" +" subcc %0, 1, %0\n" + : "=&r" (loops) + : "0" (loops) + : "cc"); +} + +/* We used to multiply by HZ after shifting down by 32 bits + * but that runs into problems for higher values of HZ and + * slow cpus. + */ +void __const_udelay(unsigned long n) +{ + n *= 4; + + n *= (cpu_data(smp_processor_id()).udelay_val * (HZ/4)); + n >>= 32; + + __delay(n + 1); +} + +void __udelay(unsigned long n) +{ + __const_udelay(n * 0x10c7UL); +} + + +void __ndelay(unsigned long n) +{ + __const_udelay(n * 0x5UL); +} diff -Nru a/arch/sparc64/lib/ipcsum.S b/arch/sparc64/lib/ipcsum.S --- a/arch/sparc64/lib/ipcsum.S 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/lib/ipcsum.S 2004-09-06 16:37:52 -07:00 @@ -1,6 +1,7 @@ .text - .align 32 - .globl ip_fast_csum + .align 32 + .globl ip_fast_csum + .type ip_fast_csum,#function ip_fast_csum: /* %o0 = iph, %o1 = ihl */ sub %o1, 4, %g7 lduw [%o0 + 0x00], %o2 @@ -30,3 +31,4 @@ set 0xffff, %o1 retl and %o2, %o1, %o0 + .size ip_fast_csum, .-ip_fast_csum diff -Nru a/arch/sparc64/lib/memmove.S b/arch/sparc64/lib/memmove.S --- a/arch/sparc64/lib/memmove.S 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/lib/memmove.S 2004-09-06 16:37:55 -07:00 @@ -5,8 +5,9 @@ */ .text - .align 32 - .globl memmove + .align 32 + .globl memmove + .type memmove,#function memmove: mov %o0, %g1 cmp %o0, %o1 @@ -29,3 +30,4 @@ retl mov %g1, %o0 + .size memmove, .-memmove diff -Nru a/arch/sparc64/lib/rwlock.S b/arch/sparc64/lib/rwlock.S --- a/arch/sparc64/lib/rwlock.S 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,85 +0,0 @@ -/* $Id: rwlock.S,v 1.4 2000/09/09 00:00:34 davem Exp $ - * rwlocks.S: These things are too big to do inline. - * - * Copyright (C) 1999 David S. Miller (davem@redhat.com) - */ - - .text - .align 64 - - /* The non-contention read lock usage is 2 cache lines. */ - - .globl __read_lock, __read_unlock -__read_lock: /* %o0 = lock_ptr */ - ldsw [%o0], %g5 - brlz,pn %g5, __read_wait_for_writer -4: add %g5, 1, %g7 - cas [%o0], %g5, %g7 - cmp %g5, %g7 - bne,pn %icc, __read_lock - membar #StoreLoad | #StoreStore -99: retl - nop -__read_unlock: /* %o0 = lock_ptr */ - lduw [%o0], %g5 - sub %g5, 1, %g7 - cas [%o0], %g5, %g7 - cmp %g5, %g7 - be,pt %xcc, 99b - membar #StoreLoad | #StoreStore - ba,a,pt %xcc, __read_unlock - -__read_wait_for_writer: - ldsw [%o0], %g5 - brlz,pt %g5, __read_wait_for_writer - membar #LoadLoad - ba,a,pt %xcc, 4b -__write_wait_for_any: - lduw [%o0], %g5 - brnz,pt %g5, __write_wait_for_any - membar #LoadLoad - ba,a,pt %xcc, 4f - - .align 64 - .globl __write_unlock -__write_unlock: /* %o0 = lock_ptr */ - membar #LoadStore | #StoreStore - retl - stw %g0, [%o0] - - .globl __write_lock -__write_lock: /* %o0 = lock_ptr */ - sethi %hi(0x80000000), %g2 - -1: lduw [%o0], %g5 - brnz,pn %g5, __write_wait_for_any -4: or %g5, %g2, %g7 - cas [%o0], %g5, %g7 - - cmp %g5, %g7 - be,pt %icc, 99b - membar #StoreLoad | #StoreStore - ba,a,pt %xcc, 1b - - .globl __write_trylock -__write_trylock: /* %o0 = lock_ptr */ - sethi %hi(0x80000000), %g2 -1: lduw [%o0], %g5 - brnz,pn %g5, __write_trylock_fail -4: or %g5, %g2, %g7 - - cas [%o0], %g5, %g7 - cmp %g5, %g7 - be,pt %icc, __write_trylock_succeed - membar #StoreLoad | #StoreStore - - ba,pt %xcc, 1b - nop -__write_trylock_succeed: - retl - mov 1, %o0 - -__write_trylock_fail: - retl - mov 0, %o0 - diff -Nru a/arch/sparc64/lib/splock.S b/arch/sparc64/lib/splock.S --- a/arch/sparc64/lib/splock.S 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,35 +0,0 @@ -/* splock.S: Spinlock primitives too large to inline. - * - * Copyright (C) 2004 David S. Miller (davem@redhat.com) - */ - - .text - .align 64 - - .globl _raw_spin_lock -_raw_spin_lock: /* %o0 = lock_ptr */ -1: ldstub [%o0], %g7 - brnz,pn %g7, 2f - membar #StoreLoad | #StoreStore - retl - nop -2: ldub [%o0], %g7 - brnz,pt %g7, 2b - membar #LoadLoad - ba,a,pt %xcc, 1b - - .globl _raw_spin_lock_flags -_raw_spin_lock_flags: /* %o0 = lock_ptr, %o1 = irq_flags */ -1: ldstub [%o0], %g7 - brnz,pn %g7, 2f - membar #StoreLoad | #StoreStore - retl - nop - -2: rdpr %pil, %g2 ! Save PIL - wrpr %o1, %pil ! Set previous PIL -3: ldub [%o0], %g7 ! Spin on lock set - brnz,pt %g7, 3b - membar #LoadLoad - ba,pt %xcc, 1b ! Retry lock acquire - wrpr %g2, %pil ! Restore PIL diff -Nru a/arch/sparc64/lib/strlen.S b/arch/sparc64/lib/strlen.S --- a/arch/sparc64/lib/strlen.S 2004-09-06 16:37:51 -07:00 +++ b/arch/sparc64/lib/strlen.S 2004-09-06 16:37:51 -07:00 @@ -9,7 +9,8 @@ #define HI_MAGIC 0x80808080 .align 32 - .global strlen + .globl strlen + .type strlen,#function strlen: mov %o0, %o1 andcc %o0, 3, %g0 @@ -75,3 +76,5 @@ 13: retl mov 2, %o0 + + .size strlen, .-strlen diff -Nru a/arch/sparc64/lib/strncmp.S b/arch/sparc64/lib/strncmp.S --- a/arch/sparc64/lib/strncmp.S 2004-09-06 16:37:53 -07:00 +++ b/arch/sparc64/lib/strncmp.S 2004-09-06 16:37:53 -07:00 @@ -7,8 +7,9 @@ #include .text - .align 4 - .global strncmp + .align 32 + .globl strncmp + .type strncmp,#function strncmp: brlez,pn %o2, 3f lduba [%o0] (ASI_PNF), %o3 @@ -28,3 +29,4 @@ 3: retl clr %o0 + .size strncmp, .-strncmp diff -Nru a/arch/sparc64/lib/strncpy_from_user.S b/arch/sparc64/lib/strncpy_from_user.S --- a/arch/sparc64/lib/strncpy_from_user.S 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/lib/strncpy_from_user.S 2004-09-06 16:37:55 -07:00 @@ -12,7 +12,7 @@ 0: .xword 0x0101010101010101 .text - .align 4 + .align 32 /* Must return: * @@ -31,6 +31,7 @@ */ .globl __strncpy_from_user + .type __strncpy_from_user,#function __strncpy_from_user: /* %o0=dest, %o1=src, %o2=count */ sethi %hi(0b), %o5 ! IEU0 Group @@ -122,6 +123,7 @@ mov %o2, %o0 2: retl add %o2, %o3, %o0 + .size __strncpy_from_user, .-__strncpy_from_user .section .fixup,#alloc,#execinstr .align 4 diff -Nru a/arch/sparc64/lib/xor.S b/arch/sparc64/lib/xor.S --- a/arch/sparc64/lib/xor.S 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/lib/xor.S 2004-09-06 16:37:55 -07:00 @@ -18,8 +18,9 @@ * !(len & 127) && len >= 256 */ .text - .globl xor_vis_2 - .type xor_vis_2,@function + .align 32 + .globl xor_vis_2 + .type xor_vis_2,#function xor_vis_2: rd %fprs, %o5 andcc %o5, FPRS_FEF|FPRS_DU, %g0 @@ -87,11 +88,10 @@ wr %g1, %g0, %asi retl wr %g0, 0, %fprs - .size xor_vis_2, .-xor_vis_2 + .size xor_vis_2, .-xor_vis_2 - - .globl xor_vis_3 - .type xor_vis_3,@function + .globl xor_vis_3 + .type xor_vis_3,#function xor_vis_3: rd %fprs, %o5 andcc %o5, FPRS_FEF|FPRS_DU, %g0 @@ -156,11 +156,10 @@ wr %g1, %g0, %asi retl wr %g0, 0, %fprs - .size xor_vis_3, .-xor_vis_3 - + .size xor_vis_3, .-xor_vis_3 - .globl xor_vis_4 - .type xor_vis_4,@function + .globl xor_vis_4 + .type xor_vis_4,#function xor_vis_4: rd %fprs, %o5 andcc %o5, FPRS_FEF|FPRS_DU, %g0 @@ -244,11 +243,10 @@ wr %g1, %g0, %asi retl wr %g0, 0, %fprs - .size xor_vis_4, .-xor_vis_4 - + .size xor_vis_4, .-xor_vis_4 - .globl xor_vis_5 - .type xor_vis_5,@function + .globl xor_vis_5 + .type xor_vis_5,#function xor_vis_5: mov %o5, %g5 rd %fprs, %o5 @@ -353,4 +351,4 @@ wr %g1, %g0, %asi retl wr %g0, 0, %fprs - .size xor_vis_5, .-xor_vis_5 + .size xor_vis_5, .-xor_vis_5 diff -Nru a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c --- a/arch/sparc64/mm/fault.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/mm/fault.c 2004-09-06 16:37:55 -07:00 @@ -27,6 +27,7 @@ #include #include #include +#include #define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0])) @@ -147,6 +148,9 @@ printk(KERN_ALERT "tsk->{mm,active_mm}->pgd = %016lx\n", (tsk->mm ? (unsigned long) tsk->mm->pgd : (unsigned long) tsk->active_mm->pgd)); + if (notify_die(DIE_GPF, "general protection fault", regs, + 0, 0, SIGSEGV) == NOTIFY_OK) + return; die_if_kernel("Oops", regs); } @@ -318,8 +322,13 @@ int si_code, fault_code; unsigned long address; - si_code = SEGV_MAPERR; fault_code = get_thread_fault_code(); + + if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, + fault_code, 0, SIGSEGV) == NOTIFY_OK) + return; + + si_code = SEGV_MAPERR; address = current_thread_info()->fault_address; if ((fault_code & FAULT_CODE_ITLB) && diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c 2004-09-06 16:37:52 -07:00 +++ b/arch/sparc64/mm/init.c 2004-09-06 16:37:52 -07:00 @@ -68,6 +68,7 @@ extern char _start[], _end[]; /* Initial ramdisk setup */ +extern unsigned long sparc_ramdisk_image64; extern unsigned int sparc_ramdisk_image; extern unsigned int sparc_ramdisk_size; @@ -1279,10 +1280,12 @@ #ifdef CONFIG_BLK_DEV_INITRD /* Now have to check initial ramdisk, so that bootmap does not overwrite it */ - if (sparc_ramdisk_image) { - if (sparc_ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) - sparc_ramdisk_image -= KERNBASE; - initrd_start = sparc_ramdisk_image + phys_base; + if (sparc_ramdisk_image || sparc_ramdisk_image64) { + unsigned long ramdisk_image = sparc_ramdisk_image ? + sparc_ramdisk_image : sparc_ramdisk_image64; + if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) + ramdisk_image -= KERNBASE; + initrd_start = ramdisk_image + phys_base; initrd_end = initrd_start + sparc_ramdisk_size; if (initrd_end > end_of_phys_memory) { printk(KERN_CRIT "initrd extends beyond end of memory " @@ -1325,6 +1328,10 @@ size = initrd_end - initrd_start; /* Resert the initrd image area. */ +#ifdef CONFIG_DEBUG_BOOTMEM + prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n", + initrd_start, initrd_end); +#endif reserve_bootmem(initrd_start, size); *pages_avail -= PAGE_ALIGN(size) >> PAGE_SHIFT; @@ -1377,7 +1384,7 @@ if ((real_end > ((unsigned long)KERNBASE + 0x400000))) bigkernel = 1; #ifdef CONFIG_BLK_DEV_INITRD - if (sparc_ramdisk_image) + if (sparc_ramdisk_image || sparc_ramdisk_image64) real_end = (PAGE_ALIGN(real_end) + PAGE_ALIGN(sparc_ramdisk_size)); #endif @@ -1502,7 +1509,7 @@ zones_size[ZONE_DMA] = npages; zholes_size[ZONE_DMA] = npages - pages_avail; - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, phys_base >> PAGE_SHIFT, zholes_size); mem_map = contig_page_data.node_mem_map; } diff -Nru a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c --- a/arch/sparc64/solaris/misc.c 2004-09-06 16:37:55 -07:00 +++ b/arch/sparc64/solaris/misc.c 2004-09-06 16:37:55 -07:00 @@ -137,21 +137,34 @@ return sunos_brk(brk); } -#define set_utsfield(to, from, dotchop, countfrom) { \ - char *p; \ - int i, len = (countfrom) ? \ - ((sizeof(to) > sizeof(from) ? \ - sizeof(from) : sizeof(to))) : sizeof(to); \ - if (copy_to_user(to, from, len)) \ - return -EFAULT; \ - if (dotchop) \ - for (p=from,i=0; *p && *p != '.' && --len; p++,i++); \ - else \ - i = len - 1; \ - if (__put_user('\0', (char __user *)((to)+i))) \ - return -EFAULT; \ +static int __set_utsfield(char __user *to, int to_size, + const char *from, int from_size, + int dotchop, int countfrom) +{ + int len = countfrom ? (to_size > from_size ? + from_size : to_size) : to_size; + int off; + + if (copy_to_user(to, from, len)) + return -EFAULT; + + if (dotchop) { + off = (strnchr(from, len, '.') - from); + } else{ + off = len - 1; + } + + if (__put_user('\0', to + off)) + return -EFAULT; + + return 0; } +#define set_utsfield(to, from, dotchop, countfrom) \ + __set_utsfield((to), sizeof(to), \ + (from), sizeof(from), \ + (dotchop), (countfrom)) + struct sol_uname { char sysname[9]; char nodename[9]; @@ -219,17 +232,20 @@ asmlinkage int solaris_utssys(u32 buf, u32 flags, int which, u32 buf2) { struct sol_uname __user *v = A(buf); + int err; + switch (which) { case 0: /* old uname */ /* Let's cheat */ - set_utsfield(v->sysname, "SunOS", 1, 0); + err = set_utsfield(v->sysname, "SunOS", 1, 0); down_read(&uts_sem); - set_utsfield(v->nodename, system_utsname.nodename, 1, 1); + err |= set_utsfield(v->nodename, system_utsname.nodename, + 1, 1); up_read(&uts_sem); - set_utsfield(v->release, "2.6", 0, 0); - set_utsfield(v->version, "Generic", 0, 0); - set_utsfield(v->machine, machine(), 0, 0); - return 0; + err |= set_utsfield(v->release, "2.6", 0, 0); + err |= set_utsfield(v->version, "Generic", 0, 0); + err |= set_utsfield(v->machine, machine(), 0, 0); + return (err ? -EFAULT : 0); case 2: /* ustat */ return -ENOSYS; case 3: /* fusers */ @@ -242,15 +258,18 @@ asmlinkage int solaris_utsname(u32 buf) { struct sol_utsname __user *v = A(buf); + int err; + /* Why should we not lie a bit? */ down_read(&uts_sem); - set_utsfield(v->sysname, "SunOS", 0, 0); - set_utsfield(v->nodename, system_utsname.nodename, 1, 1); - set_utsfield(v->release, "5.6", 0, 0); - set_utsfield(v->version, "Generic", 0, 0); - set_utsfield(v->machine, machine(), 0, 0); + err = set_utsfield(v->sysname, "SunOS", 0, 0); + err |= set_utsfield(v->nodename, system_utsname.nodename, 1, 1); + err |= set_utsfield(v->release, "5.6", 0, 0); + err |= set_utsfield(v->version, "Generic", 0, 0); + err |= set_utsfield(v->machine, machine(), 0, 0); up_read(&uts_sem); - return 0; + + return (err ? -EFAULT : 0); } #define SI_SYSNAME 1 /* return name of operating system */ diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig --- a/arch/um/Kconfig 2004-09-06 16:37:52 -07:00 +++ b/arch/um/Kconfig 2004-09-06 16:37:52 -07:00 @@ -61,6 +61,20 @@ config NET bool "Networking support" + help + Unless you really know what you are doing, you should say Y here. + The reason is that some programs need kernel networking support even + when running on a stand-alone machine that isn't connected to any + other computer. If you are upgrading from an older kernel, you + should consider updating your networking tools too because changes + in the kernel and the tools often go hand in hand. The tools are + contained in the package net-tools, the location and version number + of which are given in Documentation/Changes. + + For a general introduction to Linux networking, it is highly + recommended to read the NET-HOWTO, available from + . + source "fs/Kconfig.binfmt" @@ -85,6 +99,19 @@ If you'd like to be able to work with files stored on the host, say Y or M here; otherwise say N. +config HPPFS + tristate "HoneyPot ProcFS" + help + hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc + entries to be overridden, removed, or fabricated from the host. + Its purpose is to allow a UML to appear to be a physical machine + by removing or changing anything in /proc which gives away the + identity of a UML. + + See http://user-mode-linux.sf.net/hppfs.html for more information. + + You only need this if you are setting up a UML honeypot. Otherwise, + it is safe to say 'N' here. config MCONSOLE bool "Management console" @@ -163,6 +190,17 @@ This option determines the size of UML kernel stacks. They will be 1 << order pages. The default is OK unless you're running Valgrind on UML, in which case, set this to 3. + +config UML_REAL_TIME_CLOCK + bool "Real-time Clock" + default y + help + This option makes UML time deltas match wall clock deltas. This should + normally be enabled. The exception would be if you are debugging with + UML and spend long times with UML stopped at a breakpoint. In this + case, when UML is restarted, it will call the timer enough times to make + up for the time spent at the breakpoint. This could result in a + noticable lag. If this is a problem, then disable this option. endmenu diff -Nru a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug --- a/arch/um/Kconfig.debug 2004-09-06 16:37:51 -07:00 +++ b/arch/um/Kconfig.debug 2004-09-06 16:37:51 -07:00 @@ -9,6 +9,10 @@ config PT_PROXY bool "Enable ptrace proxy" depends on XTERM_CHAN && DEBUG_INFO + help + This option enables a debugging interface which allows gdb to debug + the kernel without needing to actually attach to kernel threads. + If you want to do kernel debugging, say Y here; otherwise say N. config GPROF bool "Enable gprof support" diff -Nru a/arch/um/Kconfig_block b/arch/um/Kconfig_block --- a/arch/um/Kconfig_block 2004-09-06 16:37:53 -07:00 +++ b/arch/um/Kconfig_block 2004-09-06 16:37:53 -07:00 @@ -29,6 +29,10 @@ wise choice too. In all other cases (for example, if you're just playing around with User-Mode Linux) you can choose N. +config BLK_DEV_COW_COMMON + bool + default BLK_DEV_UBD + config BLK_DEV_LOOP tristate "Loopback device support" diff -Nru a/arch/um/Kconfig_char b/arch/um/Kconfig_char --- a/arch/um/Kconfig_char 2004-09-06 16:37:52 -07:00 +++ b/arch/um/Kconfig_char 2004-09-06 16:37:52 -07:00 @@ -108,11 +108,60 @@ config UNIX98_PTYS bool "Unix98 PTY support" + ---help--- + A pseudo terminal (PTY) is a software device consisting of two + halves: a master and a slave. The slave device behaves identical to + a physical terminal; the master device is used by a process to + read data from and write data to the slave, thereby emulating a + terminal. Typical programs for the master side are telnet servers + and xterms. -config UNIX98_PTY_COUNT - int "Maximum number of Unix98 PTYs in use (0-2048)" - depends on UNIX98_PTYS + Linux has traditionally used the BSD-like names /dev/ptyxx for + masters and /dev/ttyxx for slaves of pseudo terminals. This scheme + has a number of problems. The GNU C library glibc 2.1 and later, + however, supports the Unix98 naming standard: in order to acquire a + pseudo terminal, a process opens /dev/ptmx; the number of the pseudo + terminal is then made available to the process and the pseudo + terminal slave can be accessed as /dev/pts/. What was + traditionally /dev/ttyp2 will then be /dev/pts/2, for example. + + All modern Linux systems use the Unix98 ptys. Say Y unless + you're on an embedded system and want to conserve memory. + +config LEGACY_PTYS + bool "Legacy (BSD) PTY support" + default y + ---help--- + A pseudo terminal (PTY) is a software device consisting of two + halves: a master and a slave. The slave device behaves identical to + a physical terminal; the master device is used by a process to + read data from and write data to the slave, thereby emulating a + terminal. Typical programs for the master side are telnet servers + and xterms. + + Linux has traditionally used the BSD-like names /dev/ptyxx + for masters and /dev/ttyxx for slaves of pseudo + terminals. This scheme has a number of problems, including + security. This option enables these legacy devices; on most + systems, it is safe to say N. + + +config LEGACY_PTY_COUNT + int "Maximum number of legacy PTY in use" + depends on LEGACY_PTYS default "256" + ---help--- + The maximum number of legacy PTYs that can be used at any one time. + The default is 256, and should be more than enough. Embedded + systems may want to reduce this to save memory. + + When not in use, each legacy PTY occupies 12 bytes on 32-bit + architectures and 24 bytes on 64-bit architectures. + +#config UNIX98_PTY_COUNT +# int "Maximum number of Unix98 PTYs in use (0-2048)" +# depends on UNIX98_PTYS +# default "256" config WATCHDOG bool "Watchdog Timer Support" diff -Nru a/arch/um/Kconfig_net b/arch/um/Kconfig_net --- a/arch/um/Kconfig_net 2004-09-06 16:37:53 -07:00 +++ b/arch/um/Kconfig_net 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ -menu "Network Devices" +menu "UML Network Devices" depends on NET # UML virtual driver @@ -175,74 +175,6 @@ don't need UML networking, say N. Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" - - -# Below are hardware-independent drivers mirrored from -# drivers/net/Config.in. It would be nice if Linux -# had HW independent drivers separated from the other -# but it does not. Until then each non-ISA/PCI arch -# needs to provide it's own menu of network drivers -config DUMMY - tristate "Dummy net driver support" - -config BONDING - tristate "Bonding driver support" - -config EQUALIZER - tristate "EQL (serial line load balancing) support" - -config TUN - tristate "Universal TUN/TAP device driver support" - -config ETHERTAP - tristate "Ethertap network tap (OBSOLETE)" - depends on EXPERIMENTAL && NETLINK - -config PPP - tristate "PPP (point-to-point protocol) support" - -config PPP_MULTILINK - bool "PPP multilink support (EXPERIMENTAL)" - depends on PPP && EXPERIMENTAL - -config PPP_FILTER - bool "PPP filtering" - depends on PPP && FILTER - -config PPP_ASYNC - tristate "PPP support for async serial ports" - depends on PPP - -config PPP_SYNC_TTY - tristate "PPP support for sync tty ports" - depends on PPP - -config PPP_DEFLATE - tristate "PPP Deflate compression" - depends on PPP - -config PPP_BSDCOMP - tristate "PPP BSD-Compress compression" - depends on PPP - -config PPPOE - tristate "PPP over Ethernet (EXPERIMENTAL)" - depends on PPP && EXPERIMENTAL - -config SLIP - tristate "SLIP (serial line) support" - -config SLIP_COMPRESSED - bool "CSLIP compressed headers" - depends on SLIP=y - -config SLIP_SMART - bool "Keepalive and linefill" - depends on SLIP=y - -config SLIP_MODE_SLIP6 - bool "Six bit SLIP encapsulation" - depends on SLIP=y endmenu diff -Nru a/arch/um/Makefile b/arch/um/Makefile --- a/arch/um/Makefile 2004-09-06 16:37:53 -07:00 +++ b/arch/um/Makefile 2004-09-06 16:37:53 -07:00 @@ -22,17 +22,21 @@ $(ARCH_DIR)/sys-$(SUBARCH)/ # Have to precede the include because the included Makefiles reference them. -SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \ - include/asm-um/sigcontext.h include/asm-um/processor.h \ - include/asm-um/ptrace.h include/asm-um/arch-signal.h +SYMLINK_HEADERS = archparam.h system.h sigcontext.h processor.h ptrace.h \ + arch-signal.h module.h +SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header)) ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \ $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h GEN_HEADERS += $(ARCH_DIR)/include/task.h $(ARCH_DIR)/include/kern_constants.h -include $(ARCH_DIR)/Makefile-$(SUBARCH) -include $(ARCH_DIR)/Makefile-os-$(OS) +# This target adds dependencies to "prepare". They are defined in the included +# Makefiles (see Makefile-i386). + +.PHONY: sys_prepare +sys_prepare: + @: MAKEFILE-$(CONFIG_MODE_TT) += Makefile-tt MAKEFILE-$(CONFIG_MODE_SKAS) += Makefile-skas @@ -41,6 +45,9 @@ include $(addprefix $(ARCH_DIR)/,$(MAKEFILE-y)) endif +include $(ARCH_DIR)/Makefile-$(SUBARCH) +include $(ARCH_DIR)/Makefile-os-$(OS) + EXTRAVERSION := $(EXTRAVERSION)-1um ARCH_INCLUDE = -I$(ARCH_DIR)/include @@ -52,14 +59,22 @@ CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ -D_LARGEFILE64_SOURCE $(ARCH_INCLUDE) -Derrno=kernel_errno \ - $(MODE_INCLUDE) + -Dsigprocmask=kernel_sigprocmask $(MODE_INCLUDE) + +CFLAGS += $(call check_gcc,-fno-unit-at-a-time,) LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc +# These are needed for clean and mrproper, since in that case .config is not +# included; the values here are meaningless + +CONFIG_NEST_LEVEL ?= 0 +CONFIG_KERNEL_HALF_GIGS ?= 0 + SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) ifeq ($(CONFIG_MODE_SKAS), y) -$(SYS_HEADERS) : $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h +$(SYS_HEADERS) : $(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h endif include/linux/version.h: arch/$(ARCH)/Makefile @@ -71,8 +86,6 @@ LDFLAGS_vmlinux = -r -vmlinux: $(ARCH_DIR)/main.o - # These aren't in Makefile-tt because they are needed in the !CONFIG_MODE_TT + # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case. @@ -98,55 +111,58 @@ CONFIG_KERNEL_STACK_ORDER ?= 2 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) -CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \ +CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \ -DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \ -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \ - -DKERNEL_STACK_SIZE=$(STACK_SIZE) - -CPPFLAGS_$(LD_SCRIPT-y) = $(CPPFLAGS_vmlinux.lds) -P -C -Uum + -DKERNEL_STACK_SIZE=$(STACK_SIZE)) -LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y) +export CPPFLAGS_$(LD_SCRIPT-y) = $(CPPFLAGS_vmlinux.lds) -P -C -Uum -$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE - $(call if_changed_dep,as_s_S) +LD_SCRIPT-y := $(ARCH_DIR)/kernel/$(LD_SCRIPT-y) linux: vmlinux $(LD_SCRIPT-y) $(CC) -Wl,-T,$(LD_SCRIPT-y) $(LINK-y) $(LINK_WRAPS) \ - -o linux $(ARCH_DIR)/main.o vmlinux -L/usr/lib -lutil + -o linux vmlinux -L/usr/lib -lutil USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS)) +USER_CFLAGS := $(patsubst -Dsigprocmask=kernel_sigprocmask,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ $(MODE_INCLUDE) # To get a definition of F_SETSIG USER_CFLAGS += -D_GNU_SOURCE +# From main Makefile, these options are set after including the ARCH makefile. +# So copy them here. + +ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE +USER_CFLAGS += -Os +else +USER_CFLAGS += -O2 +endif + +ifndef CONFIG_FRAME_POINTER +USER_CFLAGS += -fomit-frame-pointer +endif + +ifdef CONFIG_DEBUG_INFO +USER_CFLAGS += -g +endif + CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds \ - $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS) + $(ARCH_DIR)/dyn_link.ld.s $(ARCH_DIR)/include/uml-config.h \ + $(GEN_HEADERS) -$(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c - $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< +MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \ + $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) archmrproper: - for d in $(ARCH_SUBDIRS) $(ARCH_DIR)/util; \ - do \ - $(MAKE) -C $$d archmrproper; \ - done - rm -f $(CLEAN_FILES) $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) include/asm \ - $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) - -archclean: sysclean - for d in $(ARCH_SUBDIRS) $(ARCH_DIR)/util; \ - do \ - $(MAKE) -C $$d clean; \ - done - find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ - -o -name '*.gcov' \) -type f -print | xargs rm -f - rm -f linux x.i gmon.out $(ARCH_DIR)/link.ld $(GEN_HEADERS) + @: -archdep: - for d in $(ARCH_SUBDIRS); do $(MAKE) -C $$d fastdep; done +archclean: + @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ + -o -name '*.gcov' \) -type f -print | xargs rm -f $(SYMLINK_HEADERS): cd $(TOPDIR)/$(dir $@) ; \ @@ -161,19 +177,32 @@ $(ARCH_DIR)/os: cd $(ARCH_DIR) && ln -sf os-$(OS) os -$(ARCH_DIR)/include/uml-config.h : - sed 's/ CONFIG/ UML_CONFIG/' $(TOPDIR)/include/linux/autoconf.h > $@ +# Generated files +define filechk_umlconfig + sed 's/ CONFIG/ UML_CONFIG/' +endef + +$(ARCH_DIR)/include/uml-config.h : $(TOPDIR)/include/linux/autoconf.h + $(call filechk,umlconfig) + +filechk_gen_header = $< $(ARCH_DIR)/include/task.h : $(ARCH_DIR)/util/mk_task - $< > $@ + $(call filechk,gen_header) $(ARCH_DIR)/include/kern_constants.h : $(ARCH_DIR)/util/mk_constants - $< > $@ + $(call filechk,gen_header) -$(ARCH_DIR)/util/mk_task : $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h \ - $(ARCH_DIR)/util FORCE ; +$(ARCH_DIR)/util/mk_task $(ARCH_DIR)/util/mk_constants : $(ARCH_DIR)/util \ + sys_prepare FORCE ; $(ARCH_DIR)/util: FORCE - @$(call descend,$@,) + $(Q)$(MAKE) $(build)=$@ export SUBARCH USER_CFLAGS OS + +all: linux + +define archhelp + echo '* linux - Binary kernel image (./linux)' +endef diff -Nru a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 --- a/arch/um/Makefile-i386 2004-09-06 16:37:54 -07:00 +++ b/arch/um/Makefile-i386 2004-09-06 16:37:54 -07:00 @@ -16,22 +16,27 @@ SYS_HEADERS = $(SYS_DIR)/sc.h $(SYS_DIR)/thread.h +sys_prepare: $(SYS_DIR)/sc.h + prepare: $(SYS_HEADERS) +filechk_$(SYS_DIR)/sc.h := $(SYS_UTIL_DIR)/mk_sc + $(SYS_DIR)/sc.h: $(SYS_UTIL_DIR)/mk_sc - $< > $@ + $(call filechk,$@) + +filechk_$(SYS_DIR)/thread.h := $(SYS_UTIL_DIR)/mk_thread $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread - $< > $@ + $(call filechk,$@) -$(SYS_UTIL_DIR)/mk_sc: FORCE ; - @$(call descend,$(SYS_UTIL_DIR),$@) +$(SYS_UTIL_DIR)/mk_sc: scripts/basic/fixdep include/config/MARKER FORCE ; + $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@ -$(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) FORCE ; - @$(call descend,$(SYS_UTIL_DIR),$@) +$(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) sys_prepare FORCE ; + $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@ $(SYS_UTIL_DIR): include/asm FORCE - @$(call descend,$@,) + $(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) -sysclean : - rm -f $(SYS_HEADERS) +CLEAN_FILES += $(SYS_HEADERS) diff -Nru a/arch/um/Makefile-skas b/arch/um/Makefile-skas --- a/arch/um/Makefile-skas 2004-09-06 16:37:52 -07:00 +++ b/arch/um/Makefile-skas 2004-09-06 16:37:52 -07:00 @@ -14,7 +14,7 @@ LINK_SKAS = -Wl,-rpath,/lib LD_SCRIPT_SKAS = dyn.lds -GEN_HEADERS += $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h +GEN_HEADERS += $(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h -$(ARCH_DIR)/kernel/skas/include/skas_ptregs.h : - $(MAKE) -C $(ARCH_DIR)/kernel/skas include/skas_ptregs.h +$(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h : + $(Q)$(MAKE) $(build)=$(ARCH_DIR)/kernel/skas $@ diff -Nru a/arch/um/config.release b/arch/um/config.release --- a/arch/um/config.release 2004-09-06 16:37:55 -07:00 +++ b/arch/um/config.release 2004-09-06 16:37:55 -07:00 @@ -227,7 +227,6 @@ CONFIG_EXT2_FS=y CONFIG_SYSV_FS=m CONFIG_UDF_FS=m -# CONFIG_UDF_RW is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set diff -Nru a/arch/um/defconfig b/arch/um/defconfig --- a/arch/um/defconfig 2004-09-06 16:37:53 -07:00 +++ b/arch/um/defconfig 2004-09-06 16:37:53 -07:00 @@ -1,47 +1,77 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.8.1-mm3 +# Fri Aug 20 13:03:03 2004 # CONFIG_USERMODE=y CONFIG_MMU=y -CONFIG_SWAP=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_CONFIG_LOG_BUF_SHIFT=14 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y # -# General Setup +# UML-specific options # CONFIG_MODE_TT=y CONFIG_MODE_SKAS=y CONFIG_NET=y -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_SYSCTL=y -CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y CONFIG_HOSTFS=y +CONFIG_HPPFS=y CONFIG_MCONSOLE=y -CONFIG_MAGIC_SYSRQ=y # CONFIG_HOST_2G_2G is not set # CONFIG_UML_SMP is not set # CONFIG_SMP is not set CONFIG_NEST_LEVEL=0 CONFIG_KERNEL_HALF_GIGS=1 # CONFIG_HIGHMEM is not set -CONFIG_PROC_MM=y CONFIG_KERNEL_STACK_ORDER=2 +CONFIG_UML_REAL_TIME_CLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_HOTPLUG is not set +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_FUTEX=y +CONFIG_EPOLL=y +# CONFIG_CPUSETS is not set +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # # Loadable module support # -CONFIG_MODULES=y -# CONFIG_KMOD is not set +# CONFIG_MODULES is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEBUG_DRIVER is not set # # Character Devices @@ -58,7 +88,8 @@ CONFIG_CON_CHAN="xterm" CONFIG_SSL_CHAN="pty" CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_WATCHDOG is not set CONFIG_UML_SOUND=y CONFIG_SOUND=y @@ -69,6 +100,7 @@ # CONFIG_BLK_DEV_UBD=y # CONFIG_BLK_DEV_UBD_SYNC is not set +CONFIG_BLK_DEV_COW_COMMON=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_RAM=y @@ -78,7 +110,7 @@ CONFIG_NETDEVICES=y # -# Network Devices +# UML Network Devices # CONFIG_UML_NET=y CONFIG_UML_NET_ETHERTAP=y @@ -88,22 +120,6 @@ CONFIG_UML_NET_MCAST=y # CONFIG_UML_NET_PCAP is not set CONFIG_UML_NET_SLIRP=y -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=y -# CONFIG_ETHERTAP is not set -CONFIG_PPP=y -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_ASYNC is not set -# CONFIG_PPP_SYNC_TTY is not set -# CONFIG_PPP_DEFLATE is not set -# CONFIG_PPP_BSDCOMP is not set -# CONFIG_PPPOE is not set -CONFIG_SLIP=y -# CONFIG_SLIP_COMPRESSED is not set -# CONFIG_SLIP_SMART is not set -# CONFIG_SLIP_MODE_SLIP6 is not set # # Networking support @@ -115,8 +131,6 @@ CONFIG_PACKET=y CONFIG_PACKET_MMAP=y # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -126,23 +140,24 @@ # 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 is not set # CONFIG_INET_ESP is not set -# CONFIG_XFRM_USER is not set +# CONFIG_INET_IPCOMP is not set # CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE 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 @@ -154,11 +169,24 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_KGDBOE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=y # # Ethernet (10 or 100Mbit) @@ -170,83 +198,125 @@ # # -# Wireless LAN (non-hamradio) +# Ethernet (10000 Mbit) # -# CONFIG_NET_RADIO is not set # -# Token Ring devices (depends on LLC=y) +# Token Ring devices # -# CONFIG_SHAPER is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_ASYNC is not set +# CONFIG_PPP_SYNC_TTY is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPPOE is not set +CONFIG_SLIP=y +# CONFIG_SLIP_COMPRESSED is not set +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # File systems # +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +CONFIG_REISER4_FS=y +CONFIG_REISER4_LARGE_KEY=y +# CONFIG_REISER4_CHECK is not set +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_AUTOFS_FS=y +CONFIG_AUTOFS4_FS=y + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# 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 is not set # CONFIG_BFS_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m # CONFIG_EFS_FS is not set CONFIG_JFFS_FS=y CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y +# CONFIG_JFFS_PROC_FS is not set # CONFIG_JFFS2_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=m # 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=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set # CONFIG_SYSV_FS is not set -# CONFIG_UDF_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_XFS_FS is not set # # Network File Systems # -# CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set # CONFIG_EXPORTFS is not set -# CONFIG_CIFS is not set # CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # @@ -254,11 +324,11 @@ # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_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 @@ -283,6 +353,7 @@ # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -301,6 +372,7 @@ # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -311,33 +383,14 @@ # # Library routines # +# CONFIG_CRC_CCITT is not set # CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set # # SCSI support # -CONFIG_SCSI=y -CONFIG_GENERIC_ISA_DMA=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -CONFIG_SD_EXTRA_DEVS=40 -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_SR_EXTRA_DEVS=2 -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_DEBUG_QUEUES=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_DEBUG=y +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -359,34 +412,46 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set +# CONFIG_INFTL is not set # # RAM/ROM/Flash chip drivers # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # +# CONFIG_MTD_COMPLEX_MAPPINGS is not set # # Self-contained MTD device drivers # # CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLKMTD=m +CONFIG_MTD_BLKMTD=y # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC1000 is not set # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set # # NAND Flash Device Drivers @@ -396,6 +461,7 @@ # # Kernel hacking # +CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_INFO=y diff -Nru a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile --- a/arch/um/drivers/Makefile 2004-09-06 16:37:53 -07:00 +++ b/arch/um/drivers/Makefile 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ # -# Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com) +# Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com) # Licensed under the GPL # @@ -15,7 +15,7 @@ #pcap-objs := pcap_kern.o pcap_user.o $(PCAP) net-objs := net_kern.o net_user.o mconsole-objs := mconsole_kern.o mconsole_user.o -hostaudio-objs := hostaudio_kern.o hostaudio_user.o +hostaudio-objs := hostaudio_kern.o ubd-objs := ubd_kern.o ubd_user.o port-objs := port_kern.o port_user.o harddog-objs := harddog_kern.o harddog_user.o @@ -39,6 +39,7 @@ obj-$(CONFIG_TTY_CHAN) += tty.o obj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o obj-$(CONFIG_UML_WATCHDOG) += harddog.o +obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o obj-y += stdio_console.o $(CHAN_OBJS) @@ -46,18 +47,7 @@ USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \ null.o pty.o tty.o xterm.o -USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/drivers/$(file)) +USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -clean: - -modules: - -fastdep: - -dep: - -archmrproper: clean - diff -Nru a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c --- a/arch/um/drivers/chan_kern.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/drivers/chan_kern.c 2004-09-06 16:37:55 -07:00 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "chan_kern.h" @@ -16,6 +17,7 @@ #include "irq_user.h" #include "sigio.h" #include "line.h" +#include "os.h" static void *not_configged_init(char *str, int device, struct chan_opts *opts) { @@ -86,6 +88,52 @@ .winch = 0, }; +void generic_close(int fd, void *unused) +{ + os_close_file(fd); +} + +int generic_read(int fd, char *c_out, void *unused) +{ + int n; + + n = os_read_file(fd, c_out, sizeof(*c_out)); + + if(n == -EAGAIN) + return(0); + else if(n == 0) + return(-EIO); + return(n); +} + +int generic_write(int fd, const char *buf, int n, void *unused) +{ + return(os_write_file(fd, buf, n)); +} + +int generic_window_size(int fd, void *unused, unsigned short *rows_out, + unsigned short *cols_out) +{ + int rows, cols; + int ret; + + ret = os_window_size(fd, &rows, &cols); + if(ret < 0) + return(ret); + + ret = ((*rows_out != rows) || (*cols_out != cols)); + + *rows_out = rows; + *cols_out = cols; + + return(ret); +} + +void generic_free(void *data) +{ + kfree(data); +} + static void tty_receive_char(struct tty_struct *tty, char ch) { if(tty == NULL) return; @@ -265,6 +313,11 @@ { int n = 0; + if(chan == NULL){ + CONFIG_CHUNK(str, size, n, "none", 1); + return(n); + } + CONFIG_CHUNK(str, size, n, chan->ops->type, 0); if(chan->dev == NULL){ @@ -420,7 +473,8 @@ INIT_LIST_HEAD(chans); } - if((out = strchr(str, ',')) != NULL){ + out = strchr(str, ','); + if(out != NULL){ in = str; *out = '\0'; out++; @@ -475,12 +529,15 @@ goto out; } err = chan->ops->read(chan->fd, &c, chan->data); - if(err > 0) tty_receive_char(tty, c); + if(err > 0) + tty_receive_char(tty, c); } while(err > 0); + if(err == 0) reactivate_fd(chan->fd, irq); if(err == -EIO){ if(chan->primary){ - if(tty != NULL) tty_hangup(tty); + if(tty != NULL) + tty_hangup(tty); line_disable(dev, irq); close_chan(chans); free_chan(chans); diff -Nru a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c --- a/arch/um/drivers/chan_user.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/drivers/chan_user.c 2004-09-06 16:37:50 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -22,33 +21,6 @@ #include "choose-mode.h" #include "mode.h" -void generic_close(int fd, void *unused) -{ - close(fd); -} - -int generic_read(int fd, char *c_out, void *unused) -{ - int n; - - n = read(fd, c_out, sizeof(*c_out)); - if(n < 0){ - if(errno == EAGAIN) return(0); - return(-errno); - } - else if(n == 0) return(-EIO); - return(1); -} - -int generic_write(int fd, const char *buf, int n, void *unused) -{ - int count; - - count = write(fd, buf, n); - if(count < 0) return(-errno); - return(count); -} - int generic_console_write(int fd, const char *buf, int n, void *unused) { struct termios save, new; @@ -65,26 +37,6 @@ return(err); } -int generic_window_size(int fd, void *unused, unsigned short *rows_out, - unsigned short *cols_out) -{ - struct winsize size; - int ret = 0; - - if(ioctl(fd, TIOCGWINSZ, &size) == 0){ - ret = ((*rows_out != size.ws_row) || - (*cols_out != size.ws_col)); - *rows_out = size.ws_row; - *cols_out = size.ws_col; - } - return(ret); -} - -void generic_free(void *data) -{ - kfree(data); -} - static void winch_handler(int sig) { } @@ -100,14 +52,16 @@ struct winch_data *data = arg; sigset_t sigs; int pty_fd, pipe_fd; + int count, err; char c = 1; - close(data->close_me); + os_close_file(data->close_me); pty_fd = data->pty_fd; pipe_fd = data->pipe_fd; - if(write(pipe_fd, &c, sizeof(c)) != sizeof(c)) + count = os_write_file(pipe_fd, &c, sizeof(c)); + if(count != sizeof(c)) printk("winch_thread : failed to write synchronization " - "byte, errno = %d\n", errno); + "byte, err = %d\n", -count); signal(SIGWINCH, winch_handler); sigfillset(&sigs); @@ -123,26 +77,24 @@ exit(1); } - if(ioctl(pty_fd, TIOCSCTTY, 0) < 0){ - printk("winch_thread : TIOCSCTTY failed, errno = %d\n", errno); - exit(1); - } - if(tcsetpgrp(pty_fd, os_getpid()) < 0){ - printk("winch_thread : tcsetpgrp failed, errno = %d\n", errno); + err = os_new_tty_pgrp(pty_fd, os_getpid()); + if(err < 0){ + printk("winch_thread : new_tty_pgrp failed, err = %d\n", -err); exit(1); } - if(read(pipe_fd, &c, sizeof(c)) != sizeof(c)) + count = os_read_file(pipe_fd, &c, sizeof(c)); + if(count != sizeof(c)) printk("winch_thread : failed to read synchronization byte, " - "errno = %d\n", errno); + "err = %d\n", -count); while(1){ pause(); - if(write(pipe_fd, &c, sizeof(c)) != sizeof(c)){ - printk("winch_thread : write failed, errno = %d\n", - errno); - } + count = os_write_file(pipe_fd, &c, sizeof(c)); + if(count != sizeof(c)) + printk("winch_thread : write failed, err = %d\n", + -count); } } @@ -154,8 +106,8 @@ char c; err = os_pipe(fds, 1, 1); - if(err){ - printk("winch_tramp : os_pipe failed, errno = %d\n", -err); + if(err < 0){ + printk("winch_tramp : os_pipe failed, err = %d\n", -err); return(err); } @@ -168,12 +120,12 @@ return(pid); } - close(fds[1]); + os_close_file(fds[1]); *fd_out = fds[0]; - n = read(fds[0], &c, sizeof(c)); + n = os_read_file(fds[0], &c, sizeof(c)); if(n != sizeof(c)){ printk("winch_tramp : failed to read synchronization byte\n"); - printk("read returned %d, errno = %d\n", n, errno); + printk("read failed, err = %d\n", -n); printk("fd %d will not support SIGWINCH\n", fd); *fd_out = -1; } @@ -183,20 +135,24 @@ void register_winch(int fd, void *device_data) { int pid, thread, thread_fd; + int count; char c = 1; - if(!isatty(fd)) return; + if(!isatty(fd)) + return; pid = tcgetpgrp(fd); - if(!CHOOSE_MODE(is_tracer_winch(pid, fd, device_data), 0) && - (pid == -1)){ + if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, + device_data) && (pid == -1)){ thread = winch_tramp(fd, device_data, &thread_fd); if(fd != -1){ register_winch_irq(thread_fd, fd, thread, device_data); - if(write(thread_fd, &c, sizeof(c)) != sizeof(c)) + count = os_write_file(thread_fd, &c, sizeof(c)); + if(count != sizeof(c)) printk("register_winch : failed to write " - "synchronization byte\n"); + "synchronization byte, err = %d\n", + -count); } } } diff -Nru a/arch/um/drivers/cow.h b/arch/um/drivers/cow.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/drivers/cow.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,41 @@ +#ifndef __COW_H__ +#define __COW_H__ + +#include + +#if __BYTE_ORDER == __BIG_ENDIAN +# define ntohll(x) (x) +# define htonll(x) (x) +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define ntohll(x) bswap_64(x) +# define htonll(x) bswap_64(x) +#else +#error "__BYTE_ORDER not defined" +#endif + +extern int init_cow_file(int fd, char *cow_file, char *backing_file, + int sectorsize, int alignment, int *bitmap_offset_out, + unsigned long *bitmap_len_out, int *data_offset_out); + +extern int file_reader(__u64 offset, char *buf, int len, void *arg); +extern int read_cow_header(int (*reader)(__u64, char *, int, void *), + void *arg, __u32 *version_out, + char **backing_file_out, time_t *mtime_out, + __u64 *size_out, int *sectorsize_out, + __u32 *align_out, int *bitmap_offset_out); + +extern int write_cow_header(char *cow_file, int fd, char *backing_file, + int sectorsize, int alignment, long long *size); + +extern void cow_sizes(int version, __u64 size, int sectorsize, int align, + int bitmap_offset, unsigned long *bitmap_len_out, + int *data_offset_out); + +#endif + +/* + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/drivers/cow_sys.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,48 @@ +#ifndef __COW_SYS_H__ +#define __COW_SYS_H__ + +#include "kern_util.h" +#include "user_util.h" +#include "os.h" +#include "user.h" + +static inline void *cow_malloc(int size) +{ + return(um_kmalloc(size)); +} + +static inline void cow_free(void *ptr) +{ + kfree(ptr); +} + +#define cow_printf printk + +static inline char *cow_strdup(char *str) +{ + return(uml_strdup(str)); +} + +static inline int cow_seek_file(int fd, __u64 offset) +{ + return(os_seek_file(fd, offset)); +} + +static inline int cow_file_size(char *file, __u64 *size_out) +{ + return(os_file_size(file, size_out)); +} + +static inline int cow_write_file(int fd, char *buf, int size) +{ + return(os_write_file(fd, buf, size)); +} + +#endif + +/* + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/drivers/cow_user.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,375 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "os.h" + +#include "cow.h" +#include "cow_sys.h" + +#define PATH_LEN_V1 256 + +struct cow_header_v1 { + int magic; + int version; + char backing_file[PATH_LEN_V1]; + time_t mtime; + __u64 size; + int sectorsize; +}; + +#define PATH_LEN_V2 MAXPATHLEN + +struct cow_header_v2 { + unsigned long magic; + unsigned long version; + char backing_file[PATH_LEN_V2]; + time_t mtime; + __u64 size; + int sectorsize; +}; + +/* Define PATH_LEN_V3 as the usual value of MAXPATHLEN, just hard-code it in + * case other systems have different values for MAXPATHLEN + */ +#define PATH_LEN_V3 4096 + +/* Changes from V2 - + * PATH_LEN_V3 as described above + * Explicitly specify field bit lengths for systems with different + * lengths for the usual C types. Not sure whether char or + * time_t should be changed, this can be changed later without + * breaking compatibility + * Add alignment field so that different alignments can be used for the + * bitmap and data + * Add cow_format field to allow for the possibility of different ways + * of specifying the COW blocks. For now, the only value is 0, + * for the traditional COW bitmap. + * Move the backing_file field to the end of the header. This allows + * for the possibility of expanding it into the padding required + * by the bitmap alignment. + * The bitmap and data portions of the file will be aligned as specified + * by the alignment field. This is to allow COW files to be + * put on devices with restrictions on access alignments, such as + * /dev/raw, with a 512 byte alignment restriction. This also + * allows the data to be more aligned more strictly than on + * sector boundaries. This is needed for ubd-mmap, which needs + * the data to be page aligned. + * Fixed (finally!) the rounding bug + */ + +struct cow_header_v3 { + __u32 magic; + __u32 version; + time_t mtime; + __u64 size; + __u32 sectorsize; + __u32 alignment; + __u32 cow_format; + char backing_file[PATH_LEN_V3]; +}; + +/* COW format definitions - for now, we have only the usual COW bitmap */ +#define COW_BITMAP 0 + +union cow_header { + struct cow_header_v1 v1; + struct cow_header_v2 v2; + struct cow_header_v3 v3; +}; + +#define COW_MAGIC 0x4f4f4f4d /* MOOO */ +#define COW_VERSION 3 + +#define DIV_ROUND(x, len) (((x) + (len) - 1) / (len)) +#define ROUND_UP(x, align) DIV_ROUND(x, align) * (align) + +void cow_sizes(int version, __u64 size, int sectorsize, int align, + int bitmap_offset, unsigned long *bitmap_len_out, + int *data_offset_out) +{ + if(version < 3){ + *bitmap_len_out = (size + sectorsize - 1) / (8 * sectorsize); + + *data_offset_out = bitmap_offset + *bitmap_len_out; + *data_offset_out = (*data_offset_out + sectorsize - 1) / + sectorsize; + *data_offset_out *= sectorsize; + } + else { + *bitmap_len_out = DIV_ROUND(size, sectorsize); + *bitmap_len_out = DIV_ROUND(*bitmap_len_out, 8); + + *data_offset_out = bitmap_offset + *bitmap_len_out; + *data_offset_out = ROUND_UP(*data_offset_out, align); + } +} + +static int absolutize(char *to, int size, char *from) +{ + char save_cwd[256], *slash; + int remaining; + + if(getcwd(save_cwd, sizeof(save_cwd)) == NULL) { + cow_printf("absolutize : unable to get cwd - errno = %d\n", + errno); + return(-1); + } + slash = strrchr(from, '/'); + if(slash != NULL){ + *slash = '\0'; + if(chdir(from)){ + *slash = '/'; + cow_printf("absolutize : Can't cd to '%s' - " + "errno = %d\n", from, errno); + return(-1); + } + *slash = '/'; + if(getcwd(to, size) == NULL){ + cow_printf("absolutize : unable to get cwd of '%s' - " + "errno = %d\n", from, errno); + return(-1); + } + remaining = size - strlen(to); + if(strlen(slash) + 1 > remaining){ + cow_printf("absolutize : unable to fit '%s' into %d " + "chars\n", from, size); + return(-1); + } + strcat(to, slash); + } + else { + if(strlen(save_cwd) + 1 + strlen(from) + 1 > size){ + cow_printf("absolutize : unable to fit '%s' into %d " + "chars\n", from, size); + return(-1); + } + strcpy(to, save_cwd); + strcat(to, "/"); + strcat(to, from); + } + chdir(save_cwd); + return(0); +} + +int write_cow_header(char *cow_file, int fd, char *backing_file, + int sectorsize, int alignment, long long *size) +{ + struct cow_header_v3 *header; + unsigned long modtime; + int err; + + err = cow_seek_file(fd, 0); + if(err < 0){ + cow_printf("write_cow_header - lseek failed, err = %d\n", -err); + goto out; + } + + err = -ENOMEM; + header = cow_malloc(sizeof(*header)); + if(header == NULL){ + cow_printf("Failed to allocate COW V3 header\n"); + goto out; + } + header->magic = htonl(COW_MAGIC); + header->version = htonl(COW_VERSION); + + err = -EINVAL; + if(strlen(backing_file) > sizeof(header->backing_file) - 1){ + cow_printf("Backing file name \"%s\" is too long - names are " + "limited to %d characters\n", backing_file, + sizeof(header->backing_file) - 1); + goto out_free; + } + + if(absolutize(header->backing_file, sizeof(header->backing_file), + backing_file)) + goto out_free; + + err = os_file_modtime(header->backing_file, &modtime); + if(err < 0){ + cow_printf("Backing file '%s' mtime request failed, " + "err = %d\n", header->backing_file, -err); + goto out_free; + } + + err = cow_file_size(header->backing_file, size); + if(err < 0){ + cow_printf("Couldn't get size of backing file '%s', " + "err = %d\n", header->backing_file, -err); + goto out_free; + } + + header->mtime = htonl(modtime); + header->size = htonll(*size); + header->sectorsize = htonl(sectorsize); + header->alignment = htonl(alignment); + header->cow_format = COW_BITMAP; + + err = os_write_file(fd, header, sizeof(*header)); + if(err != sizeof(*header)){ + cow_printf("Write of header to new COW file '%s' failed, " + "err = %d\n", cow_file, -err); + goto out_free; + } + err = 0; + out_free: + cow_free(header); + out: + return(err); +} + +int file_reader(__u64 offset, char *buf, int len, void *arg) +{ + int fd = *((int *) arg); + + return(pread(fd, buf, len, offset)); +} + +/* XXX Need to sanity-check the values read from the header */ + +int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg, + __u32 *version_out, char **backing_file_out, + time_t *mtime_out, __u64 *size_out, + int *sectorsize_out, __u32 *align_out, + int *bitmap_offset_out) +{ + union cow_header *header; + char *file; + int err, n; + unsigned long version, magic; + + header = cow_malloc(sizeof(*header)); + if(header == NULL){ + cow_printf("read_cow_header - Failed to allocate header\n"); + return(-ENOMEM); + } + err = -EINVAL; + n = (*reader)(0, (char *) header, sizeof(*header), arg); + if(n < offsetof(typeof(header->v1), backing_file)){ + cow_printf("read_cow_header - short header\n"); + goto out; + } + + magic = header->v1.magic; + if(magic == COW_MAGIC) { + version = header->v1.version; + } + else if(magic == ntohl(COW_MAGIC)){ + version = ntohl(header->v1.version); + } + /* No error printed because the non-COW case comes through here */ + else goto out; + + *version_out = version; + + if(version == 1){ + if(n < sizeof(header->v1)){ + cow_printf("read_cow_header - failed to read V1 " + "header\n"); + goto out; + } + *mtime_out = header->v1.mtime; + *size_out = header->v1.size; + *sectorsize_out = header->v1.sectorsize; + *bitmap_offset_out = sizeof(header->v1); + *align_out = *sectorsize_out; + file = header->v1.backing_file; + } + else if(version == 2){ + if(n < sizeof(header->v2)){ + cow_printf("read_cow_header - failed to read V2 " + "header\n"); + goto out; + } + *mtime_out = ntohl(header->v2.mtime); + *size_out = ntohll(header->v2.size); + *sectorsize_out = ntohl(header->v2.sectorsize); + *bitmap_offset_out = sizeof(header->v2); + *align_out = *sectorsize_out; + file = header->v2.backing_file; + } + else if(version == 3){ + if(n < sizeof(header->v3)){ + cow_printf("read_cow_header - failed to read V2 " + "header\n"); + goto out; + } + *mtime_out = ntohl(header->v3.mtime); + *size_out = ntohll(header->v3.size); + *sectorsize_out = ntohl(header->v3.sectorsize); + *align_out = ntohl(header->v3.alignment); + *bitmap_offset_out = ROUND_UP(sizeof(header->v3), *align_out); + file = header->v3.backing_file; + } + else { + cow_printf("read_cow_header - invalid COW version\n"); + goto out; + } + err = -ENOMEM; + *backing_file_out = cow_strdup(file); + if(*backing_file_out == NULL){ + cow_printf("read_cow_header - failed to allocate backing " + "file\n"); + goto out; + } + err = 0; + out: + cow_free(header); + return(err); +} + +int init_cow_file(int fd, char *cow_file, char *backing_file, int sectorsize, + int alignment, int *bitmap_offset_out, + unsigned long *bitmap_len_out, int *data_offset_out) +{ + __u64 size, offset; + char zero = 0; + int err; + + err = write_cow_header(cow_file, fd, backing_file, sectorsize, + alignment, &size); + if(err) + goto out; + + *bitmap_offset_out = ROUND_UP(sizeof(struct cow_header_v3), alignment); + cow_sizes(COW_VERSION, size, sectorsize, alignment, *bitmap_offset_out, + bitmap_len_out, data_offset_out); + + offset = *data_offset_out + size - sizeof(zero); + err = cow_seek_file(fd, offset); + if(err < 0){ + cow_printf("cow bitmap lseek failed : err = %d\n", -err); + goto out; + } + + /* does not really matter how much we write it is just to set EOF + * this also sets the entire COW bitmap + * to zero without having to allocate it + */ + err = cow_write_file(fd, &zero, sizeof(zero)); + if(err != sizeof(zero)){ + cow_printf("Write of bitmap to new COW file '%s' failed, " + "err = %d\n", cow_file, -err); + err = -EINVAL; + goto out; + } + + return(0); + + out: + return(err); +} + +/* + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c --- a/arch/um/drivers/daemon_user.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/drivers/daemon_user.c 2004-09-06 16:37:52 -07:00 @@ -53,7 +53,8 @@ struct request_v3 req; int fd, n, err; - if((pri->control = socket(AF_UNIX, SOCK_STREAM, 0)) < 0){ + pri->control = socket(AF_UNIX, SOCK_STREAM, 0); + if(pri->control < 0){ printk("daemon_open : control socket failed, errno = %d\n", errno); return(-errno); @@ -67,7 +68,8 @@ goto out; } - if((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0){ + fd = socket(AF_UNIX, SOCK_DGRAM, 0); + if(fd < 0){ printk("daemon_open : data socket failed, errno = %d\n", errno); err = -errno; @@ -91,18 +93,18 @@ req.version = SWITCH_VERSION; req.type = REQ_NEW_CONTROL; req.sock = *local_addr; - n = write(pri->control, &req, sizeof(req)); + n = os_write_file(pri->control, &req, sizeof(req)); if(n != sizeof(req)){ - printk("daemon_open : control setup request returned %d, " - "errno = %d\n", n, errno); + printk("daemon_open : control setup request failed, err = %d\n", + -n); err = -ENOTCONN; goto out; } - n = read(pri->control, sun, sizeof(*sun)); + n = os_read_file(pri->control, sun, sizeof(*sun)); if(n != sizeof(*sun)){ - printk("daemon_open : read of data socket returned %d, " - "errno = %d\n", n, errno); + printk("daemon_open : read of data socket failed, err = %d\n", + -n); err = -ENOTCONN; goto out_close; } @@ -111,9 +113,9 @@ return(fd); out_close: - close(fd); + os_close_file(fd); out: - close(pri->control); + os_close_file(pri->control); return(err); } @@ -153,8 +155,8 @@ { struct daemon_data *pri = data; - close(pri->fd); - close(pri->control); + os_close_file(pri->fd); + os_close_file(pri->control); if(pri->data_addr != NULL) kfree(pri->data_addr); if(pri->ctl_addr != NULL) kfree(pri->ctl_addr); if(pri->local_addr != NULL) kfree(pri->local_addr); diff -Nru a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c --- a/arch/um/drivers/fd.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/drivers/fd.c 2004-09-06 16:37:55 -07:00 @@ -35,7 +35,8 @@ printk("fd_init : couldn't parse file descriptor '%s'\n", str); return(NULL); } - if((data = um_kmalloc(sizeof(*data))) == NULL) return(NULL); + data = um_kmalloc(sizeof(*data)); + if(data == NULL) return(NULL); *data = ((struct fd_chan) { .fd = n, .raw = opts->raw }); return(data); diff -Nru a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c --- a/arch/um/drivers/harddog_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/harddog_user.c 2004-09-06 16:37:51 -07:00 @@ -27,10 +27,10 @@ dup2(data->stdin, 0); dup2(data->stdout, 1); dup2(data->stdout, 2); - close(data->stdin); - close(data->stdout); - close(data->close_me[0]); - close(data->close_me[1]); + os_close_file(data->stdin); + os_close_file(data->stdout); + os_close_file(data->close_me[0]); + os_close_file(data->close_me[1]); } int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) @@ -44,15 +44,15 @@ char **args = NULL; err = os_pipe(in_fds, 1, 0); - if(err){ - printk("harddog_open - os_pipe failed, errno = %d\n", -err); - return(err); + if(err < 0){ + printk("harddog_open - os_pipe failed, err = %d\n", -err); + goto out; } err = os_pipe(out_fds, 1, 0); - if(err){ - printk("harddog_open - os_pipe failed, errno = %d\n", -err); - return(err); + if(err < 0){ + printk("harddog_open - os_pipe failed, err = %d\n", -err); + goto out_close_in; } data.stdin = out_fds[0]; @@ -72,42 +72,47 @@ pid = run_helper(pre_exec, &data, args, NULL); - close(out_fds[0]); - close(in_fds[1]); + os_close_file(out_fds[0]); + os_close_file(in_fds[1]); if(pid < 0){ err = -pid; - printk("harddog_open - run_helper failed, errno = %d\n", err); - goto out; + printk("harddog_open - run_helper failed, errno = %d\n", -err); + goto out_close_out; } - n = read(in_fds[0], &c, sizeof(c)); + n = os_read_file(in_fds[0], &c, sizeof(c)); if(n == 0){ printk("harddog_open - EOF on watchdog pipe\n"); helper_wait(pid); err = -EIO; - goto out; + goto out_close_out; } else if(n < 0){ printk("harddog_open - read of watchdog pipe failed, " - "errno = %d\n", errno); + "err = %d\n", -n); helper_wait(pid); - err = -errno; - goto out; + err = n; + goto out_close_out; } *in_fd_ret = in_fds[0]; *out_fd_ret = out_fds[1]; return(0); + + out_close_in: + os_close_file(in_fds[0]); + os_close_file(in_fds[1]); + out_close_out: + os_close_file(out_fds[0]); + os_close_file(out_fds[1]); out: - close(out_fds[1]); - close(in_fds[0]); return(err); } void stop_watchdog(int in_fd, int out_fd) { - close(in_fd); - close(out_fd); + os_close_file(in_fd); + os_close_file(out_fd); } int ping_watchdog(int fd) @@ -115,11 +120,12 @@ int n; char c = '\n'; - n = write(fd, &c, sizeof(c)); - if(n < sizeof(c)){ - printk("ping_watchdog - write failed, errno = %d\n", - errno); - return(-errno); + n = os_write_file(fd, &c, sizeof(c)); + if(n != sizeof(c)){ + printk("ping_watchdog - write failed, err = %d\n", -n); + if(n < 0) + return(n); + return(-EIO); } return 1; diff -Nru a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c --- a/arch/um/drivers/hostaudio_kern.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/drivers/hostaudio_kern.c 2004-09-06 16:37:55 -07:00 @@ -5,44 +5,64 @@ #include "linux/config.h" #include "linux/module.h" -#include "linux/version.h" #include "linux/init.h" #include "linux/slab.h" #include "linux/fs.h" #include "linux/sound.h" #include "linux/soundcard.h" +#include "asm/uaccess.h" #include "kern_util.h" #include "init.h" -#include "hostaudio.h" +#include "os.h" + +struct hostaudio_state { + int fd; +}; + +struct hostmixer_state { + int fd; +}; + +#define HOSTAUDIO_DEV_DSP "/dev/sound/dsp" +#define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer" /* Only changed from linux_main at boot time */ char *dsp = HOSTAUDIO_DEV_DSP; char *mixer = HOSTAUDIO_DEV_MIXER; +#define DSP_HELP \ +" This is used to specify the host dsp device to the hostaudio driver.\n" \ +" The default is \"" HOSTAUDIO_DEV_DSP "\".\n\n" + +#define MIXER_HELP \ +" This is used to specify the host mixer device to the hostaudio driver.\n" \ +" The default is \"" HOSTAUDIO_DEV_MIXER "\".\n\n" + #ifndef MODULE static int set_dsp(char *name, int *add) { - dsp = uml_strdup(name); + dsp = name; return(0); } -__uml_setup("dsp=", set_dsp, -"dsp=\n" -" This is used to specify the host dsp device to the hostaudio driver.\n" -" The default is \"" HOSTAUDIO_DEV_DSP "\".\n\n" -); +__uml_setup("dsp=", set_dsp, "dsp=\n" DSP_HELP); static int set_mixer(char *name, int *add) { - mixer = uml_strdup(name); + mixer = name; return(0); } -__uml_setup("mixer=", set_mixer, -"mixer=\n" -" This is used to specify the host mixer device to the hostaudio driver.\n" -" The default is \"" HOSTAUDIO_DEV_MIXER "\".\n\n" -); +__uml_setup("mixer=", set_mixer, "mixer=\n" MIXER_HELP); + +#else /*MODULE*/ + +MODULE_PARM(dsp, "s"); +MODULE_PARM_DESC(dsp, DSP_HELP); + +MODULE_PARM(mixer, "s"); +MODULE_PARM_DESC(mixer, MIXER_HELP); + #endif /* /dev/dsp file operations */ @@ -51,23 +71,55 @@ loff_t *ppos) { struct hostaudio_state *state = file->private_data; + void *kbuf; + int ret; #ifdef DEBUG printk("hostaudio: read called, count = %d\n", count); #endif - return(hostaudio_read_user(state, buffer, count, ppos)); + kbuf = kmalloc(count, GFP_KERNEL); + if(kbuf == NULL) + return(-ENOMEM); + + ret = os_read_file(state->fd, kbuf, count); + if(ret < 0) + goto out; + + if(copy_to_user(buffer, kbuf, ret)) + ret = -EFAULT; + + out: + kfree(kbuf); + return(ret); } static ssize_t hostaudio_write(struct file *file, const char *buffer, size_t count, loff_t *ppos) { struct hostaudio_state *state = file->private_data; + void *kbuf; + int ret; #ifdef DEBUG printk("hostaudio: write called, count = %d\n", count); #endif - return(hostaudio_write_user(state, buffer, count, ppos)); + + kbuf = kmalloc(count, GFP_KERNEL); + if(kbuf == NULL) + return(-ENOMEM); + + ret = -EFAULT; + if(copy_from_user(kbuf, buffer, count)) + goto out; + + ret = os_write_file(state->fd, kbuf, count); + if(ret < 0) + goto out; + + out: + kfree(kbuf); + return(ret); } static unsigned int hostaudio_poll(struct file *file, @@ -86,12 +138,43 @@ unsigned int cmd, unsigned long arg) { struct hostaudio_state *state = file->private_data; + unsigned long data = 0; + int ret; #ifdef DEBUG printk("hostaudio: ioctl called, cmd = %u\n", cmd); #endif + switch(cmd){ + case SNDCTL_DSP_SPEED: + case SNDCTL_DSP_STEREO: + case SNDCTL_DSP_GETBLKSIZE: + case SNDCTL_DSP_CHANNELS: + case SNDCTL_DSP_SUBDIVIDE: + case SNDCTL_DSP_SETFRAGMENT: + if(get_user(data, (int *) arg)) + return(-EFAULT); + break; + default: + break; + } + + ret = os_ioctl_generic(state->fd, cmd, (unsigned long) &data); + + switch(cmd){ + case SNDCTL_DSP_SPEED: + case SNDCTL_DSP_STEREO: + case SNDCTL_DSP_GETBLKSIZE: + case SNDCTL_DSP_CHANNELS: + case SNDCTL_DSP_SUBDIVIDE: + case SNDCTL_DSP_SETFRAGMENT: + if(put_user(data, (int *) arg)) + return(-EFAULT); + break; + default: + break; + } - return(hostaudio_ioctl_user(state, cmd, arg)); + return(ret); } static int hostaudio_open(struct inode *inode, struct file *file) @@ -110,12 +193,17 @@ if(file->f_mode & FMODE_READ) r = 1; if(file->f_mode & FMODE_WRITE) w = 1; - ret = hostaudio_open_user(state, r, w, dsp); + ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); + if(ret < 0){ + printk("hostaudio_open failed to open '%s', err = %d\n", + dsp, -ret); kfree(state); return(ret); } + state->fd = ret; + file->private_data = state; return(0); } @@ -123,16 +211,19 @@ static int hostaudio_release(struct inode *inode, struct file *file) { struct hostaudio_state *state = file->private_data; - int ret; #ifdef DEBUG printk("hostaudio: release called\n"); #endif - ret = hostaudio_release_user(state); + if(state->fd >= 0){ + os_close_file(state->fd); + state->fd = -1; + } + kfree(state); - return(ret); + return(0); } /* /dev/mixer file operations */ @@ -146,7 +237,7 @@ printk("hostmixer: ioctl called\n"); #endif - return(hostmixer_ioctl_mixdev_user(state, cmd, arg)); + return(os_ioctl_generic(state->fd, cmd, arg)); } static int hostmixer_open_mixdev(struct inode *inode, struct file *file) @@ -165,13 +256,17 @@ if(file->f_mode & FMODE_READ) r = 1; if(file->f_mode & FMODE_WRITE) w = 1; - ret = hostmixer_open_mixdev_user(state, r, w, mixer); + ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); if(ret < 0){ + printk("hostaudio_open_mixdev failed to open '%s', err = %d\n", + dsp, -ret); kfree(state); return(ret); } + state->fd = ret; + file->private_data = state; return(0); } @@ -179,16 +274,18 @@ static int hostmixer_release(struct inode *inode, struct file *file) { struct hostmixer_state *state = file->private_data; - int ret; #ifdef DEBUG printk("hostmixer: release called\n"); #endif - ret = hostmixer_release_mixdev_user(state); + if(state->fd >= 0){ + os_close_file(state->fd); + state->fd = -1; + } kfree(state); - return(ret); + return(0); } @@ -225,7 +322,8 @@ static int __init hostaudio_init_module(void) { - printk(KERN_INFO "UML Audio Relay\n"); + printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", + dsp, mixer); module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); if(module_data.dev_audio < 0){ diff -Nru a/arch/um/drivers/hostaudio_user.c b/arch/um/drivers/hostaudio_user.c --- a/arch/um/drivers/hostaudio_user.c 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2002 Steve Schmidtke - * Licensed under the GPL - */ - -#include -#include -#include -#include -#include -#include -#include "hostaudio.h" -#include "user_util.h" -#include "kern_util.h" -#include "user.h" -#include "os.h" - -/* /dev/dsp file operations */ - -ssize_t hostaudio_read_user(struct hostaudio_state *state, char *buffer, - size_t count, loff_t *ppos) -{ - ssize_t ret; - -#ifdef DEBUG - printk("hostaudio: read_user called, count = %d\n", count); -#endif - - ret = read(state->fd, buffer, count); - - if(ret < 0) return(-errno); - return(ret); -} - -ssize_t hostaudio_write_user(struct hostaudio_state *state, const char *buffer, - size_t count, loff_t *ppos) -{ - ssize_t ret; - -#ifdef DEBUG - printk("hostaudio: write_user called, count = %d\n", count); -#endif - - ret = write(state->fd, buffer, count); - - if(ret < 0) return(-errno); - return(ret); -} - -int hostaudio_ioctl_user(struct hostaudio_state *state, unsigned int cmd, - unsigned long arg) -{ - int ret; -#ifdef DEBUG - printk("hostaudio: ioctl_user called, cmd = %u\n", cmd); -#endif - - ret = ioctl(state->fd, cmd, arg); - - if(ret < 0) return(-errno); - return(ret); -} - -int hostaudio_open_user(struct hostaudio_state *state, int r, int w, char *dsp) -{ -#ifdef DEBUG - printk("hostaudio: open_user called\n"); -#endif - - state->fd = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); - - if(state->fd >= 0) return(0); - - printk("hostaudio_open_user failed to open '%s', errno = %d\n", - dsp, errno); - - return(-errno); -} - -int hostaudio_release_user(struct hostaudio_state *state) -{ -#ifdef DEBUG - printk("hostaudio: release called\n"); -#endif - if(state->fd >= 0){ - close(state->fd); - state->fd=-1; - } - - return(0); -} - -/* /dev/mixer file operations */ - -int hostmixer_ioctl_mixdev_user(struct hostmixer_state *state, - unsigned int cmd, unsigned long arg) -{ - int ret; -#ifdef DEBUG - printk("hostmixer: ioctl_user called cmd = %u\n",cmd); -#endif - - ret = ioctl(state->fd, cmd, arg); - if(ret < 0) - return(-errno); - return(ret); -} - -int hostmixer_open_mixdev_user(struct hostmixer_state *state, int r, int w, - char *mixer) -{ -#ifdef DEBUG - printk("hostmixer: open_user called\n"); -#endif - - state->fd = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); - - if(state->fd >= 0) return(0); - - printk("hostaudio_open_mixdev_user failed to open '%s', errno = %d\n", - mixer, errno); - - return(-errno); -} - -int hostmixer_release_mixdev_user(struct hostmixer_state *state) -{ -#ifdef DEBUG - printk("hostmixer: release_user called\n"); -#endif - - if(state->fd >= 0){ - close(state->fd); - state->fd = -1; - } - - return 0; -} - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/drivers/line.c b/arch/um/drivers/line.c --- a/arch/um/drivers/line.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/drivers/line.c 2004-09-06 16:37:54 -07:00 @@ -6,8 +6,8 @@ #include "linux/sched.h" #include "linux/slab.h" #include "linux/list.h" +#include "linux/interrupt.h" #include "linux/devfs_fs_kernel.h" -#include "asm/irq.h" #include "asm/uaccess.h" #include "chan_kern.h" #include "irq_user.h" @@ -16,38 +16,55 @@ #include "user_util.h" #include "kern_util.h" #include "os.h" +#include "irq_kern.h" #define LINE_BUFSIZE 4096 -void line_interrupt(int irq, void *data, struct pt_regs *unused) +static irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused) { struct line *dev = data; if(dev->count > 0) chan_interrupt(&dev->chan_list, &dev->task, dev->tty, irq, dev); + return IRQ_HANDLED; } -void line_timer_cb(void *arg) +static void line_timer_cb(void *arg) { struct line *dev = arg; line_interrupt(dev->driver->read_irq, dev, NULL); } -static void buffer_data(struct line *line, const char *buf, int len) +static int write_room(struct line *dev) { - int end; + int n; + + if(dev->buffer == NULL) return(LINE_BUFSIZE - 1); + + n = dev->head - dev->tail; + if(n <= 0) n = LINE_BUFSIZE + n; + return(n - 1); +} + +static int buffer_data(struct line *line, const char *buf, int len) +{ + int end, room; if(line->buffer == NULL){ line->buffer = kmalloc(LINE_BUFSIZE, GFP_ATOMIC); if(line->buffer == NULL){ printk("buffer_data - atomic allocation failed\n"); - return; + return(0); } line->head = line->buffer; line->tail = line->buffer; } + + room = write_room(line); + len = (len > room) ? room : len; + end = line->buffer + LINE_BUFSIZE - line->tail; if(len < end){ memcpy(line->tail, buf, len); @@ -60,6 +77,8 @@ memcpy(line->buffer, buf, len); line->tail = line->buffer + len; } + + return(len); } static int flush_buffer(struct line *line) @@ -95,7 +114,7 @@ struct line *line; char *new; unsigned long flags; - int n, err, i; + int n, err, i, ret = 0; if(tty->stopped) return 0; @@ -104,9 +123,13 @@ if(new == NULL) return(0); n = copy_from_user(new, buf, len); - if(n == len) - return(-EFAULT); buf = new; + if(n == len){ + len = -EFAULT; + goto out_free; + } + + len -= n; } i = tty->index; @@ -115,41 +138,50 @@ down(&line->sem); if(line->head != line->tail){ local_irq_save(flags); - buffer_data(line, buf, len); + ret += buffer_data(line, buf, len); err = flush_buffer(line); local_irq_restore(flags); if(err <= 0) - goto out; + goto out_up; } else { n = write_chan(&line->chan_list, buf, len, line->driver->write_irq); if(n < 0){ - len = n; - goto out; + ret = n; + goto out_up; } - if(n < len) - buffer_data(line, buf + n, len - n); + + len -= n; + ret += n; + if(len > 0) + ret += buffer_data(line, buf + n, len); } - out: + out_up: up(&line->sem); - return(len); + out_free: + if(from_user) + kfree(buf); + return(ret); } -void line_write_interrupt(int irq, void *data, struct pt_regs *unused) +static irqreturn_t line_write_interrupt(int irq, void *data, + struct pt_regs *unused) { struct line *dev = data; struct tty_struct *tty = dev->tty; int err; err = flush_buffer(dev); - if(err == 0) return; + if(err == 0) + return(IRQ_NONE); else if(err < 0){ dev->head = dev->buffer; dev->tail = dev->buffer; } - if(tty == NULL) return; + if(tty == NULL) + return(IRQ_NONE); if(test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && (tty->ldisc.write_wakeup != NULL)) @@ -161,21 +193,9 @@ * writes. */ - if (waitqueue_active(&tty->write_wait)) + if(waitqueue_active(&tty->write_wait)) wake_up_interruptible(&tty->write_wait); - -} - -int line_write_room(struct tty_struct *tty) -{ - struct line *dev = tty->driver_data; - int n; - - if(dev->buffer == NULL) return(LINE_BUFSIZE - 1); - - n = dev->head - dev->tail; - if(n <= 0) n = LINE_BUFSIZE + n; - return(n - 1); + return(IRQ_HANDLED); } int line_setup_irq(int fd, int input, int output, void *data) @@ -305,7 +325,7 @@ if(*end != '='){ printk(KERN_ERR "line_setup failed to parse \"%s\"\n", init); - return(1); + return(0); } init = end; } @@ -313,12 +333,12 @@ if((n >= 0) && (n >= num)){ printk("line_setup - %d out of range ((0 ... %d) allowed)\n", n, num); - return(1); + return(0); } else if(n >= 0){ if(lines[n].count > 0){ printk("line_setup - device %d is open\n", n); - return(1); + return(0); } if(lines[n].init_pri <= INIT_ONE){ lines[n].init_pri = INIT_ONE; @@ -332,7 +352,7 @@ else if(!all_allowed){ printk("line_setup - can't configure all devices from " "mconsole\n"); - return(1); + return(0); } else { for(i = 0; i < num; i++){ @@ -346,7 +366,7 @@ } } } - return(0); + return(1); } int line_config(struct line *lines, int num, char *str) @@ -357,7 +377,7 @@ printk("line_config - uml_strdup failed\n"); return(-ENOMEM); } - return(line_setup(lines, num, new, 0)); + return(!line_setup(lines, num, new, 0)); } int line_get_config(char *name, struct line *lines, int num, char *str, @@ -369,7 +389,7 @@ dev = simple_strtoul(name, &end, 0); if((*end != '\0') || (end == name)){ - *error_out = "line_setup failed to parse device number"; + *error_out = "line_get_config failed to parse device number"; return(0); } @@ -379,15 +399,15 @@ } line = &lines[dev]; + down(&line->sem); - if(!line->valid) CONFIG_CHUNK(str, size, n, "none", 1); else if(line->count == 0) CONFIG_CHUNK(str, size, n, line->init_str, 1); else n = chan_config_string(&line->chan_list, str, size, error_out); - up(&line->sem); + return(n); } @@ -396,7 +416,14 @@ char config[sizeof("conxxxx=none\0")]; sprintf(config, "%s=none", str); - return(line_setup(lines, num, config, 0)); + return(!line_setup(lines, num, config, 0)); +} + +int line_write_room(struct tty_struct *tty) +{ + struct line *dev = tty->driver_data; + + return(write_room(dev)); } struct tty_driver *line_register_devfs(struct lines *set, @@ -412,7 +439,8 @@ return NULL; driver->driver_name = line_driver->name; - driver->name = line_driver->devfs_name; + driver->name = line_driver->device_name; + driver->devfs_name = line_driver->devfs_name; driver->major = line_driver->major; driver->minor_start = line_driver->minor_start; driver->type = line_driver->type; @@ -432,7 +460,7 @@ for(i = 0; i < nlines; i++){ if(!lines[i].valid) - tty_unregister_devfs(driver, i); + tty_unregister_device(driver, i); } mconsole_register_dev(&line_driver->mc); @@ -465,24 +493,25 @@ struct line *line; }; -void winch_interrupt(int irq, void *data, struct pt_regs *unused) +irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) { struct winch *winch = data; struct tty_struct *tty; int err; char c; - err = generic_read(winch->fd, &c, NULL); - if(err < 0){ - if(err != -EAGAIN){ - printk("winch_interrupt : read failed, errno = %d\n", - -err); - printk("fd %d is losing SIGWINCH support\n", - winch->tty_fd); - free_irq(irq, data); - return; + if(winch->fd != -1){ + err = generic_read(winch->fd, &c, NULL); + if(err < 0){ + if(err != -EAGAIN){ + printk("winch_interrupt : read failed, " + "errno = %d\n", -err); + printk("fd %d is losing SIGWINCH support\n", + winch->tty_fd); + return(IRQ_HANDLED); + } + goto out; } - goto out; } tty = winch->line->tty; if(tty != NULL){ @@ -492,7 +521,9 @@ kill_pg(tty->pgrp, SIGWINCH, 1); } out: - reactivate_fd(winch->fd, WINCH_IRQ); + if(winch->fd != -1) + reactivate_fd(winch->fd, WINCH_IRQ); + return(IRQ_HANDLED); } DECLARE_MUTEX(winch_handler_sem); @@ -529,7 +560,10 @@ list_for_each(ele, &winch_handlers){ winch = list_entry(ele, struct winch, list); - close(winch->fd); + if(winch->fd != -1){ + deactivate_fd(winch->fd, WINCH_IRQ); + os_close_file(winch->fd); + } if(winch->pid != -1) os_kill_process(winch->pid, 1); } diff -Nru a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c --- a/arch/um/drivers/mcast_user.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/drivers/mcast_user.c 2004-09-06 16:37:53 -07:00 @@ -23,6 +23,7 @@ #include "kern_util.h" #include "user_util.h" #include "user.h" +#include "os.h" #define MAX_PACKET (ETH_MAX_PACKET + ETH_HEADER_OTHER) @@ -62,7 +63,8 @@ goto out; } - if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){ + fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd < 0){ printk("mcast_open : data socket failed, errno = %d\n", errno); fd = -ENOMEM; @@ -72,7 +74,7 @@ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { printk("mcast_open: SO_REUSEADDR failed, errno = %d\n", errno); - close(fd); + os_close_file(fd); fd = -EINVAL; goto out; } @@ -82,7 +84,7 @@ sizeof(pri->ttl)) < 0) { printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n", errno); - close(fd); + os_close_file(fd); fd = -EINVAL; goto out; } @@ -91,7 +93,7 @@ if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) { printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n", errno); - close(fd); + os_close_file(fd); fd = -EINVAL; goto out; } @@ -99,7 +101,7 @@ /* bind socket to mcast address */ if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) { printk("mcast_open : data bind failed, errno = %d\n", errno); - close(fd); + os_close_file(fd); fd = -EINVAL; goto out; } @@ -115,7 +117,7 @@ "interface on the host.\n"); printk("eth0 should be configured in order to use the " "multicast transport.\n"); - close(fd); + os_close_file(fd); fd = -EINVAL; } @@ -137,7 +139,7 @@ errno); } - close(fd); + os_close_file(fd); } int mcast_user_write(int fd, void *buf, int len, struct mcast_data *pri) diff -Nru a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c --- a/arch/um/drivers/mconsole_kern.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/drivers/mconsole_kern.c 2004-09-06 16:37:50 -07:00 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) - * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -15,6 +15,9 @@ #include "linux/sysrq.h" #include "linux/workqueue.h" #include "linux/module.h" +#include "linux/file.h" +#include "linux/fs.h" +#include "linux/namei.h" #include "linux/proc_fs.h" #include "asm/irq.h" #include "asm/uaccess.h" @@ -27,6 +30,7 @@ #include "init.h" #include "os.h" #include "umid.h" +#include "irq_kern.h" static int do_unlink_socket(struct notifier_block *notifier, unsigned long what, void *data) @@ -67,7 +71,7 @@ DECLARE_WORK(mconsole_work, mc_work_proc, NULL); -void mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs) { int fd; struct mconsole_entry *new; @@ -75,9 +79,10 @@ fd = (int) dev_id; while (mconsole_get_request(fd, &req)){ - if(req.cmd->as_interrupt) (*req.cmd->handler)(&req); + if(req.cmd->context == MCONSOLE_INTR) + (*req.cmd->handler)(&req); else { - new = kmalloc(sizeof(req), GFP_ATOMIC); + new = kmalloc(sizeof(*new), GFP_ATOMIC); if(new == NULL) mconsole_reply(&req, "Out of memory", 1, 0); else { @@ -88,6 +93,7 @@ } if(!list_empty(&mc_requests)) schedule_work(&mconsole_work); reactivate_fd(fd, MCONSOLE_IRQ); + return(IRQ_HANDLED); } void mconsole_version(struct mc_request *req) @@ -100,20 +106,109 @@ mconsole_reply(req, version, 0, 0); } +void mconsole_log(struct mc_request *req) +{ + int len; + char *ptr = req->request.data; + + ptr += strlen("log "); + + len = req->len - (ptr - req->request.data); + printk("%.*s", len, ptr); + mconsole_reply(req, "", 0, 0); +} + +void mconsole_proc(struct mc_request *req) +{ + struct nameidata nd; + struct file_system_type *proc; + struct super_block *super; + struct file *file; + int n, err; + char *ptr = req->request.data, *buf; + + ptr += strlen("proc"); + while(isspace(*ptr)) ptr++; + + proc = get_fs_type("proc"); + if(proc == NULL){ + mconsole_reply(req, "procfs not registered", 1, 0); + goto out; + } + + super = (*proc->get_sb)(proc, 0, NULL, NULL); + put_filesystem(proc); + if(super == NULL){ + mconsole_reply(req, "Failed to get procfs superblock", 1, 0); + goto out; + } + up_write(&super->s_umount); + + nd.dentry = super->s_root; + nd.mnt = NULL; + nd.flags = O_RDONLY + 1; + nd.last_type = LAST_ROOT; + + err = link_path_walk(ptr, &nd); + if(err){ + mconsole_reply(req, "Failed to look up file", 1, 0); + goto out_kill; + } + + file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); + if(IS_ERR(file)){ + mconsole_reply(req, "Failed to open file", 1, 0); + goto out_kill; + } + + buf = kmalloc(PAGE_SIZE, GFP_KERNEL); + if(buf == NULL){ + mconsole_reply(req, "Failed to allocate buffer", 1, 0); + goto out_fput; + } + + if((file->f_op != NULL) && (file->f_op->read != NULL)){ + do { + n = (*file->f_op->read)(file, buf, PAGE_SIZE - 1, + &file->f_pos); + if(n >= 0){ + buf[n] = '\0'; + mconsole_reply(req, buf, 0, (n > 0)); + } + else { + mconsole_reply(req, "Read of file failed", + 1, 0); + goto out_free; + } + } while(n > 0); + } + else mconsole_reply(req, "", 0, 0); + + out_free: + kfree(buf); + out_fput: + fput(file); + out_kill: + deactivate_super(super); + out: ; +} + #define UML_MCONSOLE_HELPTEXT \ -"Commands: - version - Get kernel version - help - Print this message - halt - Halt UML - reboot - Reboot UML - config = - Add a new device to UML; - same syntax as command line - config - Query the configuration of a device - remove - Remove a device from UML - sysrq - Performs the SysRq action controlled by the letter - cad - invoke the Ctl-Alt-Del handler - stop - pause the UML; it will do nothing until it receives a 'go' - go - continue the UML after a 'stop' +"Commands: \n\ + version - Get kernel version \n\ + help - Print this message \n\ + halt - Halt UML \n\ + reboot - Reboot UML \n\ + config = - Add a new device to UML; \n\ + same syntax as command line \n\ + config - Query the configuration of a device \n\ + remove - Remove a device from UML \n\ + sysrq - Performs the SysRq action controlled by the letter \n\ + cad - invoke the Ctl-Alt-Del handler \n\ + stop - pause the UML; it will do nothing until it receives a 'go' \n\ + go - continue the UML after a 'stop' \n\ + log - make UML enter into the kernel log\n\ + proc - returns the contents of the UML's /proc/\n\ " void mconsole_help(struct mc_request *req) @@ -302,7 +397,7 @@ if(umid_file_name("mconsole", file, sizeof(file))) return(-1); snprintf(mconsole_socket_name, sizeof(file), "%s", file); - sock = create_unix_socket(file, sizeof(file)); + sock = os_create_unix_socket(file, sizeof(file), 1); if (sock < 0){ printk("Failed to initialize management console\n"); return(1); @@ -344,11 +439,16 @@ if(buf == NULL) return(-ENOMEM); - if(copy_from_user(buf, buffer, count)) - return(-EFAULT); + if(copy_from_user(buf, buffer, count)){ + count = -EFAULT; + goto out; + } + buf[count] = '\0'; mconsole_notify(notify_socket, MCONSOLE_USER_NOTIFY, buf, count); + out: + kfree(buf); return(count); } diff -Nru a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c --- a/arch/um/drivers/mconsole_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/mconsole_user.c 2004-09-06 16:37:51 -07:00 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) - * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -18,16 +18,18 @@ #include "umid.h" static struct mconsole_command commands[] = { - { "version", mconsole_version, 1 }, - { "halt", mconsole_halt, 0 }, - { "reboot", mconsole_reboot, 0 }, - { "config", mconsole_config, 0 }, - { "remove", mconsole_remove, 0 }, - { "sysrq", mconsole_sysrq, 1 }, - { "help", mconsole_help, 1 }, - { "cad", mconsole_cad, 1 }, - { "stop", mconsole_stop, 0 }, - { "go", mconsole_go, 1 }, + { "version", mconsole_version, MCONSOLE_INTR }, + { "halt", mconsole_halt, MCONSOLE_PROC }, + { "reboot", mconsole_reboot, MCONSOLE_PROC }, + { "config", mconsole_config, MCONSOLE_PROC }, + { "remove", mconsole_remove, MCONSOLE_PROC }, + { "sysrq", mconsole_sysrq, MCONSOLE_INTR }, + { "help", mconsole_help, MCONSOLE_INTR }, + { "cad", mconsole_cad, MCONSOLE_INTR }, + { "stop", mconsole_stop, MCONSOLE_PROC }, + { "go", mconsole_go, MCONSOLE_INTR }, + { "log", mconsole_log, MCONSOLE_INTR }, + { "proc", mconsole_proc, MCONSOLE_PROC }, }; /* Initialized in mconsole_init, which is an initcall */ @@ -139,6 +141,7 @@ memcpy(reply.data, str, len); reply.data[len] = '\0'; total -= len; + str += len; reply.len = len + 1; len = sizeof(reply) + reply.len - sizeof(reply.data); diff -Nru a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c --- a/arch/um/drivers/mmapper_kern.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/mmapper_kern.c 2004-09-06 16:37:51 -07:00 @@ -120,7 +120,10 @@ printk(KERN_INFO "Mapper v0.1\n"); v_buf = (char *) find_iomem("mmapper", &mmapper_size); - if(mmapper_size == 0) return(0); + if(mmapper_size == 0){ + printk(KERN_ERR "mmapper_init - find_iomem failed\n"); + return(0); + } p_buf = __pa(v_buf); diff -Nru a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c --- a/arch/um/drivers/net_kern.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/drivers/net_kern.c 2004-09-06 16:37:52 -07:00 @@ -26,6 +26,7 @@ #include "mconsole_kern.h" #include "init.h" #include "irq_user.h" +#include "irq_kern.h" static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED; LIST_HEAD(opened); @@ -37,7 +38,8 @@ struct sk_buff *skb; /* If we can't allocate memory, try again next round. */ - if ((skb = dev_alloc_skb(dev->mtu)) == NULL) { + skb = dev_alloc_skb(dev->mtu); + if (skb == NULL) { lp->stats.rx_dropped++; return 0; } @@ -61,14 +63,14 @@ return pkt_len; } -void uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs) +irqreturn_t uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; struct uml_net_private *lp = dev->priv; int err; if(!netif_running(dev)) - return; + return(IRQ_NONE); spin_lock(&lp->lock); while((err = uml_net_rx(dev)) > 0) ; @@ -83,6 +85,7 @@ out: spin_unlock(&lp->lock); + return(IRQ_HANDLED); } static int uml_net_open(struct net_device *dev) @@ -250,37 +253,6 @@ #endif } -/* - * default do nothing hard header packet routines for struct net_device init. - * real ethernet transports will overwrite with real routines. - */ -static int uml_net_hard_header(struct sk_buff *skb, struct net_device *dev, - unsigned short type, void *daddr, void *saddr, unsigned len) -{ - return(0); /* no change */ -} - -static int uml_net_rebuild_header(struct sk_buff *skb) -{ - return(0); /* ignore */ -} - -static int uml_net_header_cache(struct neighbour *neigh, struct hh_cache *hh) -{ - return(-1); /* fail */ -} - -static void uml_net_header_cache_update(struct hh_cache *hh, - struct net_device *dev, unsigned char * haddr) -{ - /* ignore */ -} - -static int uml_net_header_parse(struct sk_buff *skb, unsigned char *haddr) -{ - return(0); /* nothing */ -} - static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED; static struct list_head devices = LIST_HEAD_INIT(devices); @@ -290,7 +262,7 @@ struct uml_net *device; struct net_device *dev; struct uml_net_private *lp; - int err, size; + int save, err, size; size = transport->private_size + sizeof(struct uml_net_private) + sizeof(((struct uml_net_private *) 0)->user); @@ -332,12 +304,6 @@ snprintf(dev->name, sizeof(dev->name), "eth%d", n); device->dev = dev; - dev->hard_header = uml_net_hard_header; - dev->rebuild_header = uml_net_rebuild_header; - dev->hard_header_cache = uml_net_header_cache; - dev->header_cache_update= uml_net_header_cache_update; - dev->hard_header_parse = uml_net_header_parse; - (*transport->kern->init)(dev, init); dev->mtu = transport->user->max_packet; @@ -364,21 +330,29 @@ } lp = dev->priv; - INIT_LIST_HEAD(&lp->list); - spin_lock_init(&lp->lock); - lp->dev = dev; - lp->fd = -1; - lp->mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0 }; - lp->have_mac = device->have_mac; - lp->protocol = transport->kern->protocol; - lp->open = transport->user->open; - lp->close = transport->user->close; - lp->remove = transport->user->remove; - lp->read = transport->kern->read; - lp->write = transport->kern->write; - lp->add_address = transport->user->add_address; - lp->delete_address = transport->user->delete_address; - lp->set_mtu = transport->user->set_mtu; + /* lp.user is the first four bytes of the transport data, which + * has already been initialized. This structure assignment will + * overwrite that, so we make sure that .user gets overwritten with + * what it already has. + */ + save = lp->user[0]; + *lp = ((struct uml_net_private) + { .list = LIST_HEAD_INIT(lp->list), + .lock = SPIN_LOCK_UNLOCKED, + .dev = dev, + .fd = -1, + .mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0}, + .have_mac = device->have_mac, + .protocol = transport->kern->protocol, + .open = transport->user->open, + .close = transport->user->close, + .remove = transport->user->remove, + .read = transport->kern->read, + .write = transport->kern->write, + .add_address = transport->user->add_address, + .delete_address = transport->user->delete_address, + .set_mtu = transport->user->set_mtu, + .user = { save } }); init_timer(&lp->tl); lp->tl.function = uml_net_user_timer_expire; @@ -611,7 +585,8 @@ unregister_netdev(dev); list_del(&device->list); - free_netdev(device); + kfree(device); + free_netdev(dev); return(0); } diff -Nru a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c --- a/arch/um/drivers/net_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/net_user.c 2004-09-06 16:37:51 -07:00 @@ -26,8 +26,7 @@ if(gate_addr == NULL) return(0); if(sscanf(gate_addr, "%d.%d.%d.%d", &tap_addr[0], &tap_addr[1], &tap_addr[2], &tap_addr[3]) != 4){ - printk("Invalid tap IP address - '%s'\n", - gate_addr); + printk("Invalid tap IP address - '%s'\n", gate_addr); return(-EINVAL); } return(0); @@ -60,18 +59,18 @@ } *output = '\0'; - if(read(fd, &remain, sizeof(remain)) != sizeof(remain)){ - printk("read_output - read of length failed, errno = %d\n", - errno); + n = os_read_file(fd, &remain, sizeof(remain)); + if(n != sizeof(remain)){ + printk("read_output - read of length failed, err = %d\n", -n); return; } while(remain != 0){ n = (remain < len) ? remain : len; - actual = read(fd, output, n); + actual = os_read_file(fd, output, n); if(actual != n){ printk("read_output - read of data failed, " - "errno = %d\n", errno); + "err = %d\n", -actual); return; } remain -= actual; @@ -83,13 +82,12 @@ { int n; - while(((n = read(fd, buf, len)) < 0) && (errno == EINTR)) ; + n = os_read_file(fd, buf, len); - if(n < 0){ - if(errno == EAGAIN) return(0); - return(-errno); - } - else if(n == 0) return(-ENOTCONN); + if(n == -EAGAIN) + return(0); + else if(n == 0) + return(-ENOTCONN); return(n); } @@ -112,13 +110,13 @@ { int n; - while(((n = write(fd, buf, len)) < 0) && (errno == EINTR)) ; - if(n < 0){ - if(errno == EAGAIN) return(0); - return(-errno); - } - else if(n == 0) return(-ENOTCONN); - return(n); + n = os_write_file(fd, buf, len); + + if(n == -EAGAIN) + return(0); + else if(n == 0) + return(-ENOTCONN); + return(n); } int net_send(int fd, void *buf, int len) @@ -157,7 +155,7 @@ { struct change_pre_exec_data *data = arg; - close(data->close_me); + os_close_file(data->close_me); dup2(data->stdout, 1); } @@ -167,17 +165,18 @@ struct change_pre_exec_data pe_data; err = os_pipe(fds, 1, 0); - if(err){ - printk("change_tramp - pipe failed, errno = %d\n", -err); + if(err < 0){ + printk("change_tramp - pipe failed, err = %d\n", -err); return(err); } pe_data.close_me = fds[0]; pe_data.stdout = fds[1]; pid = run_helper(change_pre_exec, &pe_data, argv, NULL); - close(fds[1]); + os_close_file(fds[1]); read_output(fds[0], output, output_len); - waitpid(pid, NULL, 0); + + CATCH_EINTR(err = waitpid(pid, NULL, 0)); return(pid); } diff -Nru a/arch/um/drivers/null.c b/arch/um/drivers/null.c --- a/arch/um/drivers/null.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/drivers/null.c 2004-09-06 16:37:50 -07:00 @@ -5,7 +5,6 @@ #include #include -#include #include "chan_user.h" #include "os.h" diff -Nru a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c --- a/arch/um/drivers/port_kern.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/drivers/port_kern.c 2004-09-06 16:37:50 -07:00 @@ -6,6 +6,7 @@ #include "linux/list.h" #include "linux/sched.h" #include "linux/slab.h" +#include "linux/interrupt.h" #include "linux/irq.h" #include "linux/spinlock.h" #include "linux/errno.h" @@ -14,6 +15,7 @@ #include "kern_util.h" #include "kern.h" #include "irq_user.h" +#include "irq_kern.h" #include "port.h" #include "init.h" #include "os.h" @@ -38,21 +40,21 @@ struct connection { struct list_head list; int fd; - int helper_pid; + int helper_pid; int socket[2]; int telnetd_pid; struct port_list *port; }; -static void pipe_interrupt(int irq, void *data, struct pt_regs *regs) +static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs) { struct connection *conn = data; int fd; - fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); + fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); if(fd < 0){ if(fd == -EAGAIN) - return; + return(IRQ_NONE); printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", -fd); @@ -65,6 +67,7 @@ list_add(&conn->list, &conn->port->connections); up(&conn->port->sem); + return(IRQ_HANDLED); } static int port_accept(struct port_list *port) @@ -102,8 +105,7 @@ } list_add(&conn->list, &port->pending); - ret = 1; - goto out; + return(1); out_free: kfree(conn); @@ -138,12 +140,13 @@ DECLARE_WORK(port_work, port_work_proc, NULL); -static void port_interrupt(int irq, void *data, struct pt_regs *regs) +static irqreturn_t port_interrupt(int irq, void *data, struct pt_regs *regs) { struct port_list *port = data; port->has_connection = 1; schedule_work(&port_work); + return(IRQ_HANDLED); } void *port_data(int port_num) diff -Nru a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c --- a/arch/um/drivers/port_user.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/drivers/port_user.c 2004-09-06 16:37:53 -07:00 @@ -47,10 +47,12 @@ return(NULL); } - if((kern_data = port_data(port)) == NULL) + kern_data = port_data(port); + if(kern_data == NULL) return(NULL); - if((data = um_kmalloc(sizeof(*data))) == NULL) + data = um_kmalloc(sizeof(*data)); + if(data == NULL) goto err; *data = ((struct port_chan) { .raw = opts->raw, @@ -90,7 +92,7 @@ struct port_chan *data = d; port_remove_dev(data->kernel_data); - close(fd); + os_close_file(fd); } int port_console_write(int fd, const char *buf, int n, void *d) @@ -130,11 +132,15 @@ goto out; } - if((listen(fd, 1) < 0) || (os_set_fd_block(fd, 0))){ + if(listen(fd, 1) < 0){ err = -errno; goto out; } + err = os_set_fd_block(fd, 0); + if(err < 0) + goto out; + return(fd); out: os_close_file(fd); @@ -153,10 +159,10 @@ dup2(data->sock_fd, 0); dup2(data->sock_fd, 1); dup2(data->sock_fd, 2); - close(data->sock_fd); + os_close_file(data->sock_fd); dup2(data->pipe_fd, 3); os_shutdown_socket(3, 1, 0); - close(data->pipe_fd); + os_close_file(data->pipe_fd); } int port_connection(int fd, int *socket, int *pid_out) @@ -166,11 +172,12 @@ "/usr/lib/uml/port-helper", NULL }; struct port_pre_exec_data data; - if((new = os_accept_connection(fd)) < 0) - return(-errno); + new = os_accept_connection(fd); + if(new < 0) + return(new); err = os_pipe(socket, 0, 0); - if(err) + if(err < 0) goto out_close; data = ((struct port_pre_exec_data) @@ -186,11 +193,11 @@ out_shutdown: os_shutdown_socket(socket[0], 1, 1); - close(socket[0]); + os_close_file(socket[0]); os_shutdown_socket(socket[1], 1, 1); - close(socket[1]); + os_close_file(socket[1]); out_close: - close(new); + os_close_file(new); return(err); } diff -Nru a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c --- a/arch/um/drivers/pty.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/drivers/pty.c 2004-09-06 16:37:54 -07:00 @@ -7,12 +7,12 @@ #include #include #include -#include #include #include "chan_user.h" #include "user.h" #include "user_util.h" #include "kern_util.h" +#include "os.h" struct pty_chan { void (*announce)(char *dev_name, int dev); @@ -26,7 +26,8 @@ { struct pty_chan *data; - if((data = um_kmalloc(sizeof(*data))) == NULL) return(NULL); + data = um_kmalloc(sizeof(*data)); + if(data == NULL) return(NULL); *data = ((struct pty_chan) { .announce = opts->announce, .dev = device, .raw = opts->raw }); @@ -39,7 +40,8 @@ char *dev; int fd; - if((fd = get_pty()) < 0){ + fd = get_pty(); + if(fd < 0){ printk("open_pts : Failed to open pts\n"); return(-errno); } @@ -57,29 +59,27 @@ int getmaster(char *line) { - struct stat stb; char *pty, *bank, *cp; - int master; + int master, err; pty = &line[strlen("/dev/ptyp")]; for (bank = "pqrs"; *bank; bank++) { line[strlen("/dev/pty")] = *bank; *pty = '0'; - if (stat(line, &stb) < 0) + if (os_stat_file(line, NULL) < 0) break; for (cp = "0123456789abcdef"; *cp; cp++) { *pty = *cp; - master = open(line, O_RDWR); + master = os_open_file(line, of_rdwr(OPENFLAGS()), 0); if (master >= 0) { char *tp = &line[strlen("/dev/")]; - int ok; /* verify slave side is usable */ *tp = 't'; - ok = access(line, R_OK|W_OK) == 0; + err = os_access(line, OS_ACC_RW_OK); *tp = 'p'; - if (ok) return(master); - (void) close(master); + if(err == 0) return(master); + (void) os_close_file(master); } } } diff -Nru a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c --- a/arch/um/drivers/slip_user.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/drivers/slip_user.c 2004-09-06 16:37:54 -07:00 @@ -4,11 +4,9 @@ #include #include #include -#include -#include +#include #include #include -#include #include #include "user_util.h" #include "kern_util.h" @@ -65,9 +63,9 @@ { struct slip_pre_exec_data *data = arg; - if(data->stdin != -1) dup2(data->stdin, 0); + if(data->stdin >= 0) dup2(data->stdin, 0); dup2(data->stdout, 1); - if(data->close_me != -1) close(data->close_me); + if(data->close_me >= 0) os_close_file(data->close_me); } static int slip_tramp(char **argv, int fd) @@ -77,8 +75,8 @@ int status, pid, fds[2], err, output_len; err = os_pipe(fds, 1, 0); - if(err){ - printk("slip_tramp : pipe failed, errno = %d\n", -err); + if(err < 0){ + printk("slip_tramp : pipe failed, err = %d\n", -err); return(err); } @@ -96,16 +94,18 @@ printk("slip_tramp : failed to allocate output " "buffer\n"); - close(fds[1]); + os_close_file(fds[1]); read_output(fds[0], output, output_len); if(output != NULL){ printk("%s", output); kfree(output); } - if(waitpid(pid, &status, 0) < 0) err = errno; + CATCH_EINTR(err = waitpid(pid, &status, 0)); + if(err < 0) + err = errno; else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)){ printk("'%s' didn't exit with status 0\n", argv[0]); - err = EINVAL; + err = -EINVAL; } } return(err); @@ -118,15 +118,17 @@ char gate_buf[sizeof("nnn.nnn.nnn.nnn\0")]; char *argv[] = { "uml_net", version_buf, "slip", "up", gate_buf, NULL }; - int sfd, mfd, disc, sencap, err; + int sfd, mfd, err; - if((mfd = get_pty()) < 0){ - printk("umn : Failed to open pty\n"); - return(-1); - } - if((sfd = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0)) < 0){ - printk("Couldn't open tty for slip line\n"); - return(-1); + mfd = get_pty(); + if(mfd < 0){ + printk("umn : Failed to open pty, err = %d\n", -mfd); + return(mfd); + } + sfd = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0); + if(sfd < 0){ + printk("Couldn't open tty for slip line, err = %d\n", -sfd); + return(sfd); } if(set_up_tty(sfd)) return(-1); pri->slave = sfd; @@ -138,28 +140,23 @@ err = slip_tramp(argv, sfd); - if(err != 0){ - printk("slip_tramp failed - errno = %d\n", err); - return(-err); - } - if(ioctl(pri->slave, SIOCGIFNAME, pri->name) < 0){ - printk("SIOCGIFNAME failed, errno = %d\n", errno); - return(-errno); + if(err < 0){ + printk("slip_tramp failed - err = %d\n", -err); + return(err); + } + err = os_get_ifname(pri->slave, pri->name); + if(err < 0){ + printk("get_ifname failed, err = %d\n", -err); + return(err); } iter_addresses(pri->dev, open_addr, pri->name); } else { - disc = N_SLIP; - if(ioctl(sfd, TIOCSETD, &disc) < 0){ - printk("Failed to set slip line discipline - " - "errno = %d\n", errno); - return(-errno); - } - sencap = 0; - if(ioctl(sfd, SIOCSIFENCAP, &sencap) < 0){ - printk("Failed to set slip encapsulation - " - "errno = %d\n", errno); - return(-errno); + err = os_set_slip(sfd); + if(err < 0){ + printk("Failed to set slip discipline encapsulation - " + "err = %d\n", -err); + return(err); } } return(mfd); @@ -181,9 +178,9 @@ err = slip_tramp(argv, -1); if(err != 0) - printk("slip_tramp failed - errno = %d\n", err); - close(fd); - close(pri->slave); + printk("slip_tramp failed - errno = %d\n", -err); + os_close_file(fd); + os_close_file(pri->slave); pri->slave = -1; } @@ -243,7 +240,7 @@ { struct slip_data *pri = data; - if(pri->slave == -1) return; + if(pri->slave < 0) return; open_addr(addr, netmask, pri->name); } @@ -252,7 +249,7 @@ { struct slip_data *pri = data; - if(pri->slave == -1) return; + if(pri->slave < 0) return; close_addr(addr, netmask, pri->name); } diff -Nru a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c --- a/arch/um/drivers/slirp_user.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/drivers/slirp_user.c 2004-09-06 16:37:53 -07:00 @@ -4,8 +4,7 @@ #include #include #include -#include -#include +#include #include #include #include "user_util.h" @@ -48,15 +47,15 @@ return(pid); } - + +/* XXX This is just a trivial wrapper around os_pipe */ static int slirp_datachan(int *mfd, int *sfd) { int fds[2], err; err = os_pipe(fds, 1, 1); - if(err){ - printk("slirp_datachan: Failed to open pipe, errno = %d\n", - -err); + if(err < 0){ + printk("slirp_datachan: Failed to open pipe, err = %d\n", -err); return(err); } @@ -77,7 +76,7 @@ pid = slirp_tramp(pri->argw.argv, sfd); if(pid < 0){ - printk("slirp_tramp failed - errno = %d\n", pid); + printk("slirp_tramp failed - errno = %d\n", -pid); os_close_file(sfd); os_close_file(mfd); return(pid); @@ -97,8 +96,8 @@ struct slirp_data *pri = data; int status,err; - close(fd); - close(pri->slave); + os_close_file(fd); + os_close_file(pri->slave); pri->slave = -1; @@ -114,13 +113,13 @@ } #endif - err = waitpid(pri->pid, &status, WNOHANG); - if(err<0) { + CATCH_EINTR(err = waitpid(pri->pid, &status, WNOHANG)); + if(err < 0) { printk("slirp_close: waitpid returned %d\n", errno); return; } - if(err==0) { + if(err == 0) { printk("slirp_close: process %d has not exited\n"); return; } diff -Nru a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c --- a/arch/um/drivers/ssl.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/drivers/ssl.c 2004-09-06 16:37:52 -07:00 @@ -10,6 +10,7 @@ #include "linux/major.h" #include "linux/mm.h" #include "linux/init.h" +#include "linux/console.h" #include "asm/termbits.h" #include "asm/irq.h" #include "line.h" @@ -53,8 +54,9 @@ static struct line_driver driver = { .name = "UML serial line", - .devfs_name = "tts/%d", - .major = TTYAUX_MAJOR, + .device_name = "ttS", + .devfs_name = "tts/", + .major = TTY_MAJOR, .minor_start = 64, .type = TTY_DRIVER_TYPE_SERIAL, .subtype = 0, @@ -149,6 +151,9 @@ case TCSETSW: case TCGETA: case TIOCMGET: + case TCSBRK: + case TCSBRKP: + case TIOCMSET: ret = -ENOIOCTLCMD; break; default: @@ -212,6 +217,37 @@ */ static int ssl_init_done = 0; +static void ssl_console_write(struct console *c, const char *string, + unsigned len) +{ + struct line *line = &serial_lines[c->index]; + if(ssl_init_done) + down(&line->sem); + console_write_chan(&line->chan_list, string, len); + if(ssl_init_done) + up(&line->sem); +} + +static struct tty_driver *ssl_console_device(struct console *c, int *index) +{ + *index = c->index; + return ssl_driver; +} + +static int ssl_console_setup(struct console *co, char *options) +{ + return(0); +} + +static struct console ssl_cons = { + name: "ttyS", + write: ssl_console_write, + device: ssl_console_device, + setup: ssl_console_setup, + flags: CON_PRINTBUFFER, + index: -1, +}; + int ssl_init(void) { char *new_title; @@ -227,17 +263,18 @@ new_title = add_xterm_umid(opts.xterm_title); if(new_title != NULL) opts.xterm_title = new_title; + register_console(&ssl_cons); ssl_init_done = 1; return(0); } -__initcall(ssl_init); +late_initcall(ssl_init); static int ssl_chan_setup(char *str) { - line_setup(serial_lines, sizeof(serial_lines)/sizeof(serial_lines[0]), - str, 1); - return(1); + return(line_setup(serial_lines, + sizeof(serial_lines)/sizeof(serial_lines[0]), + str, 1)); } __setup("ssl", ssl_chan_setup); diff -Nru a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c --- a/arch/um/drivers/stdio_console.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/stdio_console.c 2004-09-06 16:37:51 -07:00 @@ -83,7 +83,8 @@ static struct line_driver driver = { .name = "UML console", - .devfs_name = "vc/%d", + .device_name = "tty", + .devfs_name = "vc/", .major = TTY_MAJOR, .minor_start = 0, .type = TTY_DRIVER_TYPE_CONSOLE, @@ -159,6 +160,15 @@ static int con_init_done = 0; +static struct tty_operations console_ops = { + .open = con_open, + .close = con_close, + .write = con_write, + .chars_in_buffer = chars_in_buffer, + .set_termios = set_termios, + .write_room = line_write_room, +}; + int stdio_init(void) { char *new_title; @@ -166,7 +176,8 @@ printk(KERN_INFO "Initializing stdio console driver\n"); console_driver = line_register_devfs(&console_lines, &driver, - &console_ops, vts, sizeof(vts)/sizeof(vts[0])); + &console_ops, vts, + sizeof(vts)/sizeof(vts[0])); lines_init(vts, sizeof(vts)/sizeof(vts[0])); @@ -178,26 +189,21 @@ return(0); } -__initcall(stdio_init); +late_initcall(stdio_init); static void console_write(struct console *console, const char *string, unsigned len) { - if(con_init_done) down(&vts[console->index].sem); - console_write_chan(&vts[console->index].chan_list, string, len); - if(con_init_done) up(&vts[console->index].sem); -} + struct line *line = &vts[console->index]; -static struct tty_operations console_ops = { - .open = con_open, - .close = con_close, - .write = con_write, - .chars_in_buffer = chars_in_buffer, - .set_termios = set_termios, - .write_room = line_write_room, -}; + if(con_init_done) + down(&line->sem); + console_write_chan(&line->chan_list, string, len); + if(con_init_done) + up(&line->sem); +} -static struct tty_driver *console_device(struct console *c, int *index) +static struct tty_driver *um_console_device(struct console *c, int *index) { *index = c->index; return console_driver; @@ -208,22 +214,28 @@ return(0); } -static struct console stdiocons = INIT_CONSOLE("tty", console_write, - console_device, console_setup, - CON_PRINTBUFFER); +static struct console stdiocons = { + name: "tty", + write: console_write, + device: um_console_device, + setup: console_setup, + flags: CON_PRINTBUFFER, + index: -1, +}; -static void __init stdio_console_init(void) +static int __init stdio_console_init(void) { INIT_LIST_HEAD(&vts[0].chan_list); list_add(&init_console_chan.list, &vts[0].chan_list); register_console(&stdiocons); + return(0); } + console_initcall(stdio_console_init); static int console_chan_setup(char *str) { - line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1); - return(1); + return(line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1)); } __setup("con", console_chan_setup); diff -Nru a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c --- a/arch/um/drivers/tty.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/drivers/tty.c 2004-09-06 16:37:52 -07:00 @@ -5,7 +5,6 @@ #include #include -#include #include #include #include "chan_user.h" @@ -30,7 +29,8 @@ } str++; - if((data = um_kmalloc(sizeof(*data))) == NULL) + data = um_kmalloc(sizeof(*data)); + if(data == NULL) return(NULL); *data = ((struct tty_chan) { .dev = str, .raw = opts->raw }); diff -Nru a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c --- a/arch/um/drivers/ubd_kern.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/drivers/ubd_kern.c 2004-09-06 16:37:52 -07:00 @@ -8,6 +8,13 @@ * old style ubd by setting UBD_SHIFT to 0 * 2002-09-27...2002-10-18 massive tinkering for 2.5 * partitions have changed in 2.5 + * 2003-01-29 more tinkering for 2.5.59-1 + * This should now address the sysfs problems and has + * the symlink for devfs to allow for booting with + * the common /dev/ubd/discX/... names rather than + * only /dev/ubdN/discN this version also has lots of + * clean ups preparing for ubd-many. + * James McMechan */ #define MAJOR_NR UBD_MAJOR @@ -40,9 +47,12 @@ #include "mconsole_kern.h" #include "init.h" #include "irq_user.h" +#include "irq_kern.h" #include "ubd_user.h" #include "2_5compat.h" #include "os.h" +#include "mem.h" +#include "mem_kern.h" static spinlock_t ubd_io_lock = SPIN_LOCK_UNLOCKED; static spinlock_t ubd_lock = SPIN_LOCK_UNLOCKED; @@ -56,6 +66,10 @@ #define MAX_DEV (8) +/* Changed in early boot */ +static int ubd_do_mmap = 0; +#define UBD_MMAP_BLOCK_SIZE PAGE_SIZE + static struct block_device_operations ubd_blops = { .owner = THIS_MODULE, .open = ubd_open, @@ -67,7 +81,7 @@ static request_queue_t *ubd_queue; /* Protected by ubd_lock */ -static int fake_major = 0; +static int fake_major = MAJOR_NR; static struct gendisk *ubd_gendisk[MAX_DEV]; static struct gendisk *fake_gendisk[MAX_DEV]; @@ -96,13 +110,19 @@ struct ubd { char *file; - int is_dir; int count; int fd; __u64 size; struct openflags boot_openflags; struct openflags openflags; + int no_cow; struct cow cow; + + int map_writes; + int map_reads; + int nomap_writes; + int nomap_reads; + int write_maps; }; #define DEFAULT_COW { \ @@ -115,21 +135,28 @@ #define DEFAULT_UBD { \ .file = NULL, \ - .is_dir = 0, \ .count = 0, \ .fd = -1, \ .size = -1, \ .boot_openflags = OPEN_FLAGS, \ .openflags = OPEN_FLAGS, \ + .no_cow = 0, \ .cow = DEFAULT_COW, \ + .map_writes = 0, \ + .map_reads = 0, \ + .nomap_writes = 0, \ + .nomap_reads = 0, \ + .write_maps = 0, \ } struct ubd ubd_dev[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; static int ubd0_init(void) { - if(ubd_dev[0].file == NULL) - ubd_dev[0].file = "root_fs"; + struct ubd *dev = &ubd_dev[0]; + + if(dev->file == NULL) + dev->file = "root_fs"; return(0); } @@ -196,19 +223,46 @@ " Create ide0 entries that map onto ubd devices.\n\n" ); +static int parse_unit(char **ptr) +{ + char *str = *ptr, *end; + int n = -1; + + if(isdigit(*str)) { + n = simple_strtoul(str, &end, 0); + if(end == str) + return(-1); + *ptr = end; + } + else if (('a' <= *str) && (*str <= 'h')) { + n = *str - 'a'; + str++; + *ptr = str; + } + return(n); +} + static int ubd_setup_common(char *str, int *index_out) { + struct ubd *dev; struct openflags flags = global_openflags; char *backing_file; int n, err; if(index_out) *index_out = -1; - n = *str++; + n = *str; if(n == '='){ - static int fake_major_allowed = 1; char *end; int major; + str++; + if(!strcmp(str, "mmap")){ + CHOOSE_MODE(printk("mmap not supported by the ubd " + "driver in tt mode\n"), + ubd_do_mmap = 1); + return(0); + } + if(!strcmp(str, "sync")){ global_openflags.s = 1; return(0); @@ -220,20 +274,14 @@ return(1); } - if(!fake_major_allowed){ - printk(KERN_ERR "Can't assign a fake major twice\n"); - return(1); - } - err = 1; spin_lock(&ubd_lock); - if(!fake_major_allowed){ + if(fake_major != MAJOR_NR){ printk(KERN_ERR "Can't assign a fake major twice\n"); goto out1; } fake_major = major; - fake_major_allowed = 0; printk(KERN_INFO "Setting extra ubd major number to %d\n", major); @@ -243,25 +291,23 @@ return(err); } - if(n < '0'){ - printk(KERN_ERR "ubd_setup : index out of range\n"); } - - if((n >= '0') && (n <= '9')) n -= '0'; - else if((n >= 'a') && (n <= 'z')) n -= 'a'; - else { - printk(KERN_ERR "ubd_setup : device syntax invalid\n"); + n = parse_unit(&str); + if(n < 0){ + printk(KERN_ERR "ubd_setup : couldn't parse unit number " + "'%s'\n", str); return(1); } if(n >= MAX_DEV){ - printk(KERN_ERR "ubd_setup : index out of range " - "(%d devices)\n", MAX_DEV); + printk(KERN_ERR "ubd_setup : index %d out of range " + "(%d devices)\n", n, MAX_DEV); return(1); } err = 1; spin_lock(&ubd_lock); - if(ubd_dev[n].file != NULL){ + dev = &ubd_dev[n]; + if(dev->file != NULL){ printk(KERN_ERR "ubd_setup : device already configured\n"); goto out2; } @@ -276,6 +322,11 @@ flags.s = 1; str++; } + if (*str == 'd'){ + dev->no_cow = 1; + str++; + } + if(*str++ != '='){ printk(KERN_ERR "ubd_setup : Expected '='\n"); goto out2; @@ -284,14 +335,17 @@ err = 0; backing_file = strchr(str, ','); if(backing_file){ - *backing_file = '\0'; - backing_file++; + if(dev->no_cow) + printk(KERN_ERR "Can't specify both 'd' and a " + "cow file\n"); + else { + *backing_file = '\0'; + backing_file++; + } } - ubd_dev[n].file = str; - if(ubd_is_dir(ubd_dev[n].file)) - ubd_dev[n].is_dir = 1; - ubd_dev[n].cow.file = backing_file; - ubd_dev[n].boot_openflags = flags; + dev->file = str; + dev->cow.file = backing_file; + dev->boot_openflags = flags; out2: spin_unlock(&ubd_lock); return(err); @@ -321,8 +375,7 @@ static int fakehd_set = 0; static int fakehd(char *str) { - printk(KERN_INFO - "fakehd : Changing ubd name to \"hd\".\n"); + printk(KERN_INFO "fakehd : Changing ubd name to \"hd\".\n"); fakehd_set = 1; return 1; } @@ -368,32 +421,42 @@ { struct io_thread_req req; struct request *rq = elv_next_request(ubd_queue); - int n; + int n, err; do_ubd = NULL; intr_count++; n = read_ubd_fs(thread_fd, &req, sizeof(req)); if(n != sizeof(req)){ printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, " - "errno = %d\n", os_getpid(), -n); + "err = %d\n", os_getpid(), -n); spin_lock(&ubd_io_lock); end_request(rq, 0); spin_unlock(&ubd_io_lock); return; } - if((req.offset != ((__u64) (rq->sector)) << 9) || - (req.length != (rq->current_nr_sectors) << 9)) + if((req.op != UBD_MMAP) && + ((req.offset != ((__u64) (rq->sector)) << 9) || + (req.length != (rq->current_nr_sectors) << 9))) panic("I/O op mismatch"); + if(req.map_fd != -1){ + err = physmem_subst_mapping(req.buffer, req.map_fd, + req.map_offset, 1); + if(err) + printk("ubd_handler - physmem_subst_mapping failed, " + "err = %d\n", -err); + } + ubd_finish(rq, req.error); reactivate_fd(thread_fd, UBD_IRQ); do_ubd_request(ubd_queue); } -static void ubd_intr(int irq, void *dev, struct pt_regs *unused) +static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) { ubd_handler(); + return(IRQ_HANDLED); } /* Only changed by ubd_init, which is an initcall. */ @@ -417,10 +480,14 @@ static void ubd_close(struct ubd *dev) { + if(ubd_do_mmap) + physmem_forget_descriptor(dev->fd); os_close_file(dev->fd); if(dev->cow.file == NULL) return; + if(ubd_do_mmap) + physmem_forget_descriptor(dev->cow.fd); os_close_file(dev->cow.fd); vfree(dev->cow.bitmap); dev->cow.bitmap = NULL; @@ -429,18 +496,20 @@ static int ubd_open_dev(struct ubd *dev) { struct openflags flags; - int err, n, create_cow, *create_ptr; + char **back_ptr; + int err, create_cow, *create_ptr; + dev->openflags = dev->boot_openflags; create_cow = 0; create_ptr = (dev->cow.file != NULL) ? &create_cow : NULL; - dev->fd = open_ubd_file(dev->file, &dev->openflags, &dev->cow.file, + back_ptr = dev->no_cow ? NULL : &dev->cow.file; + dev->fd = open_ubd_file(dev->file, &dev->openflags, back_ptr, &dev->cow.bitmap_offset, &dev->cow.bitmap_len, &dev->cow.data_offset, create_ptr); if((dev->fd == -ENOENT) && create_cow){ - n = dev - ubd_dev; dev->fd = create_cow_file(dev->file, dev->cow.file, - dev->openflags, 1 << 9, + dev->openflags, 1 << 9, PAGE_SIZE, &dev->cow.bitmap_offset, &dev->cow.bitmap_len, &dev->cow.data_offset); @@ -455,13 +524,17 @@ if(dev->cow.file != NULL){ err = -ENOMEM; dev->cow.bitmap = (void *) vmalloc(dev->cow.bitmap_len); - if(dev->cow.bitmap == NULL) goto error; + if(dev->cow.bitmap == NULL){ + printk(KERN_ERR "Failed to vmalloc COW bitmap\n"); + goto error; + } flush_tlb_kernel_vm(); err = read_cow_bitmap(dev->fd, dev->cow.bitmap, dev->cow.bitmap_offset, dev->cow.bitmap_len); - if(err) goto error; + if(err < 0) + goto error; flags = dev->openflags; flags.w = 0; @@ -481,17 +554,31 @@ { struct gendisk *disk; + char from[sizeof("ubd/nnnnn\0")], to[sizeof("discnnnnn/disc\0")]; + int err; disk = alloc_disk(1 << UBD_SHIFT); - if (!disk) - return -ENOMEM; + if(disk == NULL) + return(-ENOMEM); disk->major = major; disk->first_minor = unit << UBD_SHIFT; disk->fops = &ubd_blops; set_capacity(disk, size / 512); - sprintf(disk->disk_name, "ubd"); - sprintf(disk->devfs_name, "ubd/disc%d", unit); + if(major == MAJOR_NR){ + sprintf(disk->disk_name, "ubd%c", 'a' + unit); + sprintf(disk->devfs_name, "ubd/disc%d", unit); + sprintf(from, "ubd/%d", unit); + sprintf(to, "disc%d/disc", unit); + err = devfs_mk_symlink(from, to); + if(err) + printk("ubd_new_disk failed to make link from %s to " + "%s, error = %d\n", from, to, err); + } + else { + sprintf(disk->disk_name, "ubd_fake%d", unit); + sprintf(disk->devfs_name, "ubd_fake/disc%d", unit); + } disk->private_data = &ubd_dev[unit]; disk->queue = ubd_queue; @@ -506,24 +593,21 @@ struct ubd *dev = &ubd_dev[n]; int err; - if(dev->is_dir) - return(-EISDIR); - - if (!dev->file) + if(dev->file == NULL) return(-ENODEV); if (ubd_open_dev(dev)) return(-ENODEV); err = ubd_file_size(dev, &dev->size); - if(err) + if(err < 0) return(err); err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); if(err) return(err); - if(fake_major) + if(fake_major != MAJOR_NR) ubd_new_disk(fake_major, dev->size, n, &fake_gendisk[n]); @@ -561,42 +645,42 @@ return(err); } -static int ubd_get_config(char *dev, char *str, int size, char **error_out) +static int ubd_get_config(char *name, char *str, int size, char **error_out) { - struct ubd *ubd; + struct ubd *dev; char *end; - int major, n = 0; + int n, len = 0; - major = simple_strtoul(dev, &end, 0); - if((*end != '\0') || (end == dev)){ - *error_out = "ubd_get_config : didn't parse major number"; + n = simple_strtoul(name, &end, 0); + if((*end != '\0') || (end == name)){ + *error_out = "ubd_get_config : didn't parse device number"; return(-1); } - if((major >= MAX_DEV) || (major < 0)){ - *error_out = "ubd_get_config : major number out of range"; + if((n >= MAX_DEV) || (n < 0)){ + *error_out = "ubd_get_config : device number out of range"; return(-1); } - ubd = &ubd_dev[major]; + dev = &ubd_dev[n]; spin_lock(&ubd_lock); - if(ubd->file == NULL){ - CONFIG_CHUNK(str, size, n, "", 1); + if(dev->file == NULL){ + CONFIG_CHUNK(str, size, len, "", 1); goto out; } - CONFIG_CHUNK(str, size, n, ubd->file, 0); + CONFIG_CHUNK(str, size, len, dev->file, 0); - if(ubd->cow.file != NULL){ - CONFIG_CHUNK(str, size, n, ",", 0); - CONFIG_CHUNK(str, size, n, ubd->cow.file, 1); + if(dev->cow.file != NULL){ + CONFIG_CHUNK(str, size, len, ",", 0); + CONFIG_CHUNK(str, size, len, dev->cow.file, 1); } - else CONFIG_CHUNK(str, size, n, "", 1); + else CONFIG_CHUNK(str, size, len, "", 1); out: spin_unlock(&ubd_lock); - return(n); + return(len); } static int ubd_remove(char *str) @@ -604,11 +688,9 @@ struct ubd *dev; int n, err = -ENODEV; - if(!isdigit(*str)) - return(err); /* it should be a number 0-7/a-h */ + n = parse_unit(&str); - n = *str - '0'; - if(n >= MAX_DEV) + if((n < 0) || (n >= MAX_DEV)) return(err); dev = &ubd_dev[n]; @@ -669,7 +751,7 @@ elevator_init(ubd_queue, &elevator_noop); - if (fake_major != 0) { + if (fake_major != MAJOR_NR) { char name[sizeof("ubd_nnn\0")]; snprintf(name, sizeof(name), "ubd_%d", fake_major); @@ -696,6 +778,7 @@ io_pid = start_io_thread(stack + PAGE_SIZE - sizeof(void *), &thread_fd); if(io_pid < 0){ + io_pid = -1; printk(KERN_ERR "ubd : Failed to start I/O thread (errno = %d) - " "falling back to synchronous I/O\n", -io_pid); @@ -703,8 +786,8 @@ } err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, SA_INTERRUPT, "ubd", ubd_dev); - if(err != 0) printk(KERN_ERR - "um_request_irq failed - errno = %d\n", -err); + if(err != 0) + printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); return(err); } @@ -714,15 +797,9 @@ { struct gendisk *disk = inode->i_bdev->bd_disk; struct ubd *dev = disk->private_data; - int err = -EISDIR; + int err = 0; - if(dev->is_dir == 1) - goto out; - - err = 0; if(dev->count == 0){ - dev->openflags = dev->boot_openflags; - err = ubd_open_dev(dev); if(err){ printk(KERN_ERR "%s: Can't open \"%s\": errno = %d\n", @@ -749,62 +826,156 @@ return(0); } -void cowify_req(struct io_thread_req *req, struct ubd *dev) +static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask, + __u64 *cow_offset, unsigned long *bitmap, + __u64 bitmap_offset, unsigned long *bitmap_words, + __u64 bitmap_len) +{ + __u64 sector = io_offset >> 9; + int i, update_bitmap = 0; + + for(i = 0; i < length >> 9; i++){ + if(cow_mask != NULL) + ubd_set_bit(i, (unsigned char *) cow_mask); + if(ubd_test_bit(sector + i, (unsigned char *) bitmap)) + continue; + + update_bitmap = 1; + ubd_set_bit(sector + i, (unsigned char *) bitmap); + } + + if(!update_bitmap) + return; + + *cow_offset = sector / (sizeof(unsigned long) * 8); + + /* This takes care of the case where we're exactly at the end of the + * device, and *cow_offset + 1 is off the end. So, just back it up + * by one word. Thanks to Lynn Kerby for the fix and James McMechan + * for the original diagnosis. + */ + if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) / + sizeof(unsigned long) - 1)) + (*cow_offset)--; + + bitmap_words[0] = bitmap[*cow_offset]; + bitmap_words[1] = bitmap[*cow_offset + 1]; + + *cow_offset *= sizeof(unsigned long); + *cow_offset += bitmap_offset; +} + +static void cowify_req(struct io_thread_req *req, unsigned long *bitmap, + __u64 bitmap_offset, __u64 bitmap_len) { - int i, update_bitmap, sector = req->offset >> 9; + __u64 sector = req->offset >> 9; + int i; if(req->length > (sizeof(req->sector_mask) * 8) << 9) panic("Operation too long"); + if(req->op == UBD_READ) { for(i = 0; i < req->length >> 9; i++){ - if(ubd_test_bit(sector + i, (unsigned char *) - dev->cow.bitmap)){ + if(ubd_test_bit(sector + i, (unsigned char *) bitmap)) ubd_set_bit(i, (unsigned char *) &req->sector_mask); - } } - } - else { - update_bitmap = 0; - for(i = 0; i < req->length >> 9; i++){ - ubd_set_bit(i, (unsigned char *) - &req->sector_mask); - if(!ubd_test_bit(sector + i, (unsigned char *) - dev->cow.bitmap)) - update_bitmap = 1; - ubd_set_bit(sector + i, (unsigned char *) - dev->cow.bitmap); - } - if(update_bitmap){ - req->cow_offset = sector / (sizeof(unsigned long) * 8); - req->bitmap_words[0] = - dev->cow.bitmap[req->cow_offset]; - req->bitmap_words[1] = - dev->cow.bitmap[req->cow_offset + 1]; - req->cow_offset *= sizeof(unsigned long); - req->cow_offset += dev->cow.bitmap_offset; + } + else cowify_bitmap(req->offset, req->length, &req->sector_mask, + &req->cow_offset, bitmap, bitmap_offset, + req->bitmap_words, bitmap_len); +} + +static int mmap_fd(struct request *req, struct ubd *dev, __u64 offset) +{ + __u64 sector; + unsigned char *bitmap; + int bit, i; + + /* mmap must have been requested on the command line */ + if(!ubd_do_mmap) + return(-1); + + /* The buffer must be page aligned */ + if(((unsigned long) req->buffer % UBD_MMAP_BLOCK_SIZE) != 0) + return(-1); + + /* The request must be a page long */ + if((req->current_nr_sectors << 9) != PAGE_SIZE) + return(-1); + + if(dev->cow.file == NULL) + return(dev->fd); + + sector = offset >> 9; + bitmap = (unsigned char *) dev->cow.bitmap; + bit = ubd_test_bit(sector, bitmap); + + for(i = 1; i < req->current_nr_sectors; i++){ + if(ubd_test_bit(sector + i, bitmap) != bit) + return(-1); + } + + if(bit || (rq_data_dir(req) == WRITE)) + offset += dev->cow.data_offset; + + /* The data on disk must be page aligned */ + if((offset % UBD_MMAP_BLOCK_SIZE) != 0) + return(-1); + + return(bit ? dev->fd : dev->cow.fd); +} + +static int prepare_mmap_request(struct ubd *dev, int fd, __u64 offset, + struct request *req, + struct io_thread_req *io_req) +{ + int err; + + if(rq_data_dir(req) == WRITE){ + /* Writes are almost no-ops since the new data is already in the + * host page cache + */ + dev->map_writes++; + if(dev->cow.file != NULL) + cowify_bitmap(io_req->offset, io_req->length, + &io_req->sector_mask, &io_req->cow_offset, + dev->cow.bitmap, dev->cow.bitmap_offset, + io_req->bitmap_words, + dev->cow.bitmap_len); + } + else { + int w; + + if((dev->cow.file != NULL) && (fd == dev->cow.fd)) + w = 0; + else w = dev->openflags.w; + + if((dev->cow.file != NULL) && (fd == dev->fd)) + offset += dev->cow.data_offset; + + err = physmem_subst_mapping(req->buffer, fd, offset, w); + if(err){ + printk("physmem_subst_mapping failed, err = %d\n", + -err); + return(1); } + dev->map_reads++; } + io_req->op = UBD_MMAP; + io_req->buffer = req->buffer; + return(0); } static int prepare_request(struct request *req, struct io_thread_req *io_req) { struct gendisk *disk = req->rq_disk; struct ubd *dev = disk->private_data; - __u64 block; - int nsect; + __u64 offset; + int len, fd; if(req->rq_status == RQ_INACTIVE) return(1); - if(dev->is_dir){ - strcpy(req->buffer, "HOSTFS:"); - strcat(req->buffer, dev->file); - spin_lock(&ubd_io_lock); - end_request(req, 1); - spin_unlock(&ubd_io_lock); - return(1); - } - if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ printk("Write attempted on readonly ubd device %s\n", disk->disk_name); @@ -814,23 +985,49 @@ return(1); } - block = req->sector; - nsect = req->current_nr_sectors; + offset = ((__u64) req->sector) << 9; + len = req->current_nr_sectors << 9; - io_req->op = rq_data_dir(req) == READ ? UBD_READ : UBD_WRITE; io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd; io_req->fds[1] = dev->fd; + io_req->map_fd = -1; + io_req->cow_offset = -1; + io_req->offset = offset; + io_req->length = len; + io_req->error = 0; + io_req->sector_mask = 0; + + fd = mmap_fd(req, dev, io_req->offset); + if(fd > 0){ + /* If mmapping is otherwise OK, but the first access to the + * page is a write, then it's not mapped in yet. So we have + * to write the data to disk first, then we can map the disk + * page in and continue normally from there. + */ + if((rq_data_dir(req) == WRITE) && !is_remapped(req->buffer)){ + io_req->map_fd = dev->fd; + io_req->map_offset = io_req->offset + + dev->cow.data_offset; + dev->write_maps++; + } + else return(prepare_mmap_request(dev, fd, io_req->offset, req, + io_req)); + } + + if(rq_data_dir(req) == READ) + dev->nomap_reads++; + else dev->nomap_writes++; + + io_req->op = (rq_data_dir(req) == READ) ? UBD_READ : UBD_WRITE; io_req->offsets[0] = 0; io_req->offsets[1] = dev->cow.data_offset; - io_req->offset = ((__u64) block) << 9; - io_req->length = nsect << 9; io_req->buffer = req->buffer; io_req->sectorsize = 1 << 9; - io_req->sector_mask = 0; - io_req->cow_offset = -1; - io_req->error = 0; - if(dev->cow.file != NULL) cowify_req(io_req, dev); + if(dev->cow.file != NULL) + cowify_req(io_req, dev->cow.bitmap, dev->cow.bitmap_offset, + dev->cow.bitmap_len); + return(0); } @@ -841,7 +1038,7 @@ int err, n; if(thread_fd == -1){ - while(!list_empty(&q->queue_head)){ + while(!elv_queue_empty(q)){ req = elv_next_request(q); err = prepare_request(req, &io_req); if(!err){ @@ -851,7 +1048,8 @@ } } else { - if(do_ubd || list_empty(&q->queue_head)) return; + if(do_ubd || elv_queue_empty(q)) + return; req = elv_next_request(q); err = prepare_request(req, &io_req); if(!err){ @@ -885,7 +1083,7 @@ g.heads = 128; g.sectors = 32; g.cylinders = dev->size / (128 * 32 * 512); - g.start = 2; + g.start = get_start_sect(inode->i_bdev); return(copy_to_user(loc, &g, sizeof(g)) ? -EFAULT : 0); case HDIO_SET_UNMASKINTR: @@ -934,6 +1132,142 @@ } return(-EINVAL); } + +static int ubd_check_remapped(int fd, unsigned long address, int is_write, + __u64 offset) +{ + __u64 bitmap_offset; + unsigned long new_bitmap[2]; + int i, err, n; + + /* If it's not a write access, we can't do anything about it */ + if(!is_write) + return(0); + + /* We have a write */ + for(i = 0; i < sizeof(ubd_dev) / sizeof(ubd_dev[0]); i++){ + struct ubd *dev = &ubd_dev[i]; + + if((dev->fd != fd) && (dev->cow.fd != fd)) + continue; + + /* It's a write to a ubd device */ + + if(!dev->openflags.w){ + /* It's a write access on a read-only device - probably + * shouldn't happen. If the kernel is trying to change + * something with no intention of writing it back out, + * then this message will clue us in that this needs + * fixing + */ + printk("Write access to mapped page from readonly ubd " + "device %d\n", i); + return(0); + } + + /* It's a write to a writeable ubd device - it must be COWed + * because, otherwise, the page would have been mapped in + * writeable + */ + + if(!dev->cow.file) + panic("Write fault on writeable non-COW ubd device %d", + i); + + /* It should also be an access to the backing file since the + * COW pages should be mapped in read-write + */ + + if(fd == dev->fd) + panic("Write fault on a backing page of ubd " + "device %d\n", i); + + /* So, we do the write, copying the backing data to the COW + * file... + */ + + err = os_seek_file(dev->fd, offset + dev->cow.data_offset); + if(err < 0) + panic("Couldn't seek to %lld in COW file of ubd " + "device %d, err = %d", + offset + dev->cow.data_offset, i, -err); + + n = os_write_file(dev->fd, (void *) address, PAGE_SIZE); + if(n != PAGE_SIZE) + panic("Couldn't copy data to COW file of ubd " + "device %d, err = %d", i, -n); + + /* ... updating the COW bitmap... */ + + cowify_bitmap(offset, PAGE_SIZE, NULL, &bitmap_offset, + dev->cow.bitmap, dev->cow.bitmap_offset, + new_bitmap, dev->cow.bitmap_len); + + err = os_seek_file(dev->fd, bitmap_offset); + if(err < 0) + panic("Couldn't seek to %lld in COW file of ubd " + "device %d, err = %d", bitmap_offset, i, -err); + + n = os_write_file(dev->fd, new_bitmap, sizeof(new_bitmap)); + if(n != sizeof(new_bitmap)) + panic("Couldn't update bitmap of ubd device %d, " + "err = %d", i, -n); + + /* Maybe we can map the COW page in, and maybe we can't. If + * it is a pre-V3 COW file, we can't, since the alignment will + * be wrong. If it is a V3 or later COW file which has been + * moved to a system with a larger page size, then maybe we + * can't, depending on the exact location of the page. + */ + + offset += dev->cow.data_offset; + + /* Remove the remapping, putting the original anonymous page + * back. If the COW file can be mapped in, that is done. + * Otherwise, the COW page is read in. + */ + + if(!physmem_remove_mapping((void *) address)) + panic("Address 0x%lx not remapped by ubd device %d", + address, i); + if((offset % UBD_MMAP_BLOCK_SIZE) == 0) + physmem_subst_mapping((void *) address, dev->fd, + offset, 1); + else { + err = os_seek_file(dev->fd, offset); + if(err < 0) + panic("Couldn't seek to %lld in COW file of " + "ubd device %d, err = %d", offset, i, + -err); + + n = os_read_file(dev->fd, (void *) address, PAGE_SIZE); + if(n != PAGE_SIZE) + panic("Failed to read page from offset %llx of " + "COW file of ubd device %d, err = %d", + offset, i, -n); + } + + return(1); + } + + /* It's not a write on a ubd device */ + return(0); +} + +static struct remapper ubd_remapper = { + .list = LIST_HEAD_INIT(ubd_remapper.list), + .proc = ubd_check_remapped, +}; + +static int ubd_remapper_setup(void) +{ + if(ubd_do_mmap) + register_remapper(&ubd_remapper); + + return(0); +} + +__initcall(ubd_remapper_setup); /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c --- a/arch/um/drivers/ubd_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/drivers/ubd_user.c 2004-09-06 16:37:51 -07:00 @@ -11,11 +11,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include "asm/types.h" @@ -24,146 +21,30 @@ #include "user.h" #include "ubd_user.h" #include "os.h" +#include "cow.h" #include #include -#if __BYTE_ORDER == __BIG_ENDIAN -# define ntohll(x) (x) -# define htonll(x) (x) -#elif __BYTE_ORDER == __LITTLE_ENDIAN -# define ntohll(x) bswap_64(x) -# define htonll(x) bswap_64(x) -#else -#error "__BYTE_ORDER not defined" -#endif - -#define PATH_LEN_V1 256 - -struct cow_header_v1 { - int magic; - int version; - char backing_file[PATH_LEN_V1]; - time_t mtime; - __u64 size; - int sectorsize; -}; - -#define PATH_LEN_V2 MAXPATHLEN - -struct cow_header_v2 { - unsigned long magic; - unsigned long version; - char backing_file[PATH_LEN_V2]; - time_t mtime; - __u64 size; - int sectorsize; -}; - -union cow_header { - struct cow_header_v1 v1; - struct cow_header_v2 v2; -}; - -#define COW_MAGIC 0x4f4f4f4d /* MOOO */ -#define COW_VERSION 2 - -static void sizes(__u64 size, int sectorsize, int bitmap_offset, - unsigned long *bitmap_len_out, int *data_offset_out) -{ - *bitmap_len_out = (size + sectorsize - 1) / (8 * sectorsize); - - *data_offset_out = bitmap_offset + *bitmap_len_out; - *data_offset_out = (*data_offset_out + sectorsize - 1) / sectorsize; - *data_offset_out *= sectorsize; -} - -static int read_cow_header(int fd, int *magic_out, char **backing_file_out, - time_t *mtime_out, __u64 *size_out, - int *sectorsize_out, int *bitmap_offset_out) -{ - union cow_header *header; - char *file; - int err, n; - unsigned long version, magic; - - header = um_kmalloc(sizeof(*header)); - if(header == NULL){ - printk("read_cow_header - Failed to allocate header\n"); - return(-ENOMEM); - } - err = -EINVAL; - n = read(fd, header, sizeof(*header)); - if(n < offsetof(typeof(header->v1), backing_file)){ - printk("read_cow_header - short header\n"); - goto out; - } - - magic = header->v1.magic; - if(magic == COW_MAGIC) { - version = header->v1.version; - } - else if(magic == ntohl(COW_MAGIC)){ - version = ntohl(header->v1.version); - } - else goto out; - - *magic_out = COW_MAGIC; - - if(version == 1){ - if(n < sizeof(header->v1)){ - printk("read_cow_header - failed to read V1 header\n"); - goto out; - } - *mtime_out = header->v1.mtime; - *size_out = header->v1.size; - *sectorsize_out = header->v1.sectorsize; - *bitmap_offset_out = sizeof(header->v1); - file = header->v1.backing_file; - } - else if(version == 2){ - if(n < sizeof(header->v2)){ - printk("read_cow_header - failed to read V2 header\n"); - goto out; - } - *mtime_out = ntohl(header->v2.mtime); - *size_out = ntohll(header->v2.size); - *sectorsize_out = ntohl(header->v2.sectorsize); - *bitmap_offset_out = sizeof(header->v2); - file = header->v2.backing_file; - } - else { - printk("read_cow_header - invalid COW version\n"); - goto out; - } - err = -ENOMEM; - *backing_file_out = uml_strdup(file); - if(*backing_file_out == NULL){ - printk("read_cow_header - failed to allocate backing file\n"); - goto out; - } - err = 0; - out: - kfree(header); - return(err); -} static int same_backing_files(char *from_cmdline, char *from_cow, char *cow) { - struct stat buf1, buf2; + struct uml_stat buf1, buf2; + int err; if(from_cmdline == NULL) return(1); if(!strcmp(from_cmdline, from_cow)) return(1); - if(stat(from_cmdline, &buf1) < 0){ - printk("Couldn't stat '%s', errno = %d\n", from_cmdline, - errno); + err = os_stat_file(from_cmdline, &buf1); + if(err < 0){ + printk("Couldn't stat '%s', err = %d\n", from_cmdline, -err); return(1); } - if(stat(from_cow, &buf2) < 0){ - printk("Couldn't stat '%s', errno = %d\n", from_cow, errno); + err = os_stat_file(from_cow, &buf2); + if(err < 0){ + printk("Couldn't stat '%s', err = %d\n", from_cow, -err); return(1); } - if((buf1.st_dev == buf2.st_dev) && (buf1.st_ino == buf2.st_ino)) + if((buf1.ust_dev == buf2.ust_dev) && (buf1.ust_ino == buf2.ust_ino)) return(1); printk("Backing file mismatch - \"%s\" requested,\n" @@ -174,20 +55,21 @@ static int backing_file_mismatch(char *file, __u64 size, time_t mtime) { - struct stat64 buf; + unsigned long modtime; long long actual; int err; - if(stat64(file, &buf) < 0){ - printk("Failed to stat backing file \"%s\", errno = %d\n", - file, errno); - return(-errno); + err = os_file_modtime(file, &modtime); + if(err < 0){ + printk("Failed to get modification time of backing file " + "\"%s\", err = %d\n", file, -err); + return(err); } err = os_file_size(file, &actual); - if(err){ + if(err < 0){ printk("Failed to get size of backing file \"%s\", " - "errno = %d\n", file, -err); + "err = %d\n", file, -err); return(err); } @@ -196,9 +78,9 @@ "file\n", size, actual); return(-EINVAL); } - if(buf.st_mtime != mtime){ + if(modtime != mtime){ printk("mtime mismatch (%ld vs %ld) of COW header vs backing " - "file\n", mtime, buf.st_mtime); + "file\n", mtime, modtime); return(-EINVAL); } return(0); @@ -209,124 +91,16 @@ int err; err = os_seek_file(fd, offset); - if(err != 0) return(-errno); - err = read(fd, buf, len); - if(err < 0) return(-errno); - return(0); -} + if(err < 0) + return(err); -static int absolutize(char *to, int size, char *from) -{ - char save_cwd[256], *slash; - int remaining; + err = os_read_file(fd, buf, len); + if(err < 0) + return(err); - if(getcwd(save_cwd, sizeof(save_cwd)) == NULL) { - printk("absolutize : unable to get cwd - errno = %d\n", errno); - return(-1); - } - slash = strrchr(from, '/'); - if(slash != NULL){ - *slash = '\0'; - if(chdir(from)){ - *slash = '/'; - printk("absolutize : Can't cd to '%s' - errno = %d\n", - from, errno); - return(-1); - } - *slash = '/'; - if(getcwd(to, size) == NULL){ - printk("absolutize : unable to get cwd of '%s' - " - "errno = %d\n", from, errno); - return(-1); - } - remaining = size - strlen(to); - if(strlen(slash) + 1 > remaining){ - printk("absolutize : unable to fit '%s' into %d " - "chars\n", from, size); - return(-1); - } - strcat(to, slash); - } - else { - if(strlen(save_cwd) + 1 + strlen(from) + 1 > size){ - printk("absolutize : unable to fit '%s' into %d " - "chars\n", from, size); - return(-1); - } - strcpy(to, save_cwd); - strcat(to, "/"); - strcat(to, from); - } - chdir(save_cwd); return(0); } -static int write_cow_header(char *cow_file, int fd, char *backing_file, - int sectorsize, long long *size) -{ - struct cow_header_v2 *header; - struct stat64 buf; - int err; - - err = os_seek_file(fd, 0); - if(err != 0){ - printk("write_cow_header - lseek failed, errno = %d\n", errno); - return(-errno); - } - - err = -ENOMEM; - header = um_kmalloc(sizeof(*header)); - if(header == NULL){ - printk("Failed to allocate COW V2 header\n"); - goto out; - } - header->magic = htonl(COW_MAGIC); - header->version = htonl(COW_VERSION); - - err = -EINVAL; - if(strlen(backing_file) > sizeof(header->backing_file) - 1){ - printk("Backing file name \"%s\" is too long - names are " - "limited to %d characters\n", backing_file, - sizeof(header->backing_file) - 1); - goto out_free; - } - - if(absolutize(header->backing_file, sizeof(header->backing_file), - backing_file)) - goto out_free; - - err = stat64(header->backing_file, &buf); - if(err < 0){ - printk("Stat of backing file '%s' failed, errno = %d\n", - header->backing_file, errno); - err = -errno; - goto out_free; - } - - err = os_file_size(header->backing_file, size); - if(err){ - printk("Couldn't get size of backing file '%s', errno = %d\n", - header->backing_file, -*size); - goto out_free; - } - - header->mtime = htonl(buf.st_mtime); - header->size = htonll(*size); - header->sectorsize = htonl(sectorsize); - - err = write(fd, header, sizeof(*header)); - if(err != sizeof(*header)){ - printk("Write of header to new COW file '%s' failed, " - "errno = %d\n", cow_file, errno); - goto out_free; - } - err = 0; - out_free: - kfree(header); - out: - return(err); -} - int open_ubd_file(char *file, struct openflags *openflags, char **backing_file_out, int *bitmap_offset_out, unsigned long *bitmap_len_out, int *data_offset_out, @@ -334,26 +108,36 @@ { time_t mtime; __u64 size; + __u32 version, align; char *backing_file; - int fd, err, sectorsize, magic, same, mode = 0644; + int fd, err, sectorsize, same, mode = 0644; - if((fd = os_open_file(file, *openflags, mode)) < 0){ + fd = os_open_file(file, *openflags, mode); + if(fd < 0){ if((fd == -ENOENT) && (create_cow_out != NULL)) *create_cow_out = 1; if(!openflags->w || ((errno != EROFS) && (errno != EACCES))) return(-errno); openflags->w = 0; - if((fd = os_open_file(file, *openflags, mode)) < 0) + fd = os_open_file(file, *openflags, mode); + if(fd < 0) return(fd); } + + err = os_lock_file(fd, openflags->w); + if(err < 0){ + printk("Failed to lock '%s', err = %d\n", file, -err); + goto out_close; + } + if(backing_file_out == NULL) return(fd); - err = read_cow_header(fd, &magic, &backing_file, &mtime, &size, - §orsize, bitmap_offset_out); + err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime, + &size, §orsize, &align, bitmap_offset_out); if(err && (*backing_file_out != NULL)){ printk("Failed to read COW header from COW file \"%s\", " - "errno = %d\n", file, err); - goto error; + "errno = %d\n", file, -err); + goto out_close; } if(err) return(fd); @@ -363,36 +147,33 @@ if(!same && !backing_file_mismatch(*backing_file_out, size, mtime)){ printk("Switching backing file to '%s'\n", *backing_file_out); - err = write_cow_header(file, fd, *backing_file_out, - sectorsize, &size); + err = write_cow_header(file, fd, *backing_file_out, + sectorsize, align, &size); if(err){ - printk("Switch failed, errno = %d\n", err); + printk("Switch failed, errno = %d\n", -err); return(err); } } else { *backing_file_out = backing_file; err = backing_file_mismatch(*backing_file_out, size, mtime); - if(err) goto error; + if(err) goto out_close; } - sizes(size, sectorsize, *bitmap_offset_out, bitmap_len_out, - data_offset_out); + cow_sizes(version, size, sectorsize, align, *bitmap_offset_out, + bitmap_len_out, data_offset_out); return(fd); - error: - close(fd); + out_close: + os_close_file(fd); return(err); } int create_cow_file(char *cow_file, char *backing_file, struct openflags flags, - int sectorsize, int *bitmap_offset_out, + int sectorsize, int alignment, int *bitmap_offset_out, unsigned long *bitmap_len_out, int *data_offset_out) { - __u64 blocks; - long zero; - int err, fd, i; - long long size; + int err, fd; flags.c = 1; fd = open_ubd_file(cow_file, &flags, NULL, NULL, NULL, NULL, NULL); @@ -403,57 +184,49 @@ goto out; } - err = write_cow_header(cow_file, fd, backing_file, sectorsize, &size); - if(err) goto out_close; - - blocks = (size + sectorsize - 1) / sectorsize; - blocks = (blocks + sizeof(long) * 8 - 1) / (sizeof(long) * 8); - zero = 0; - for(i = 0; i < blocks; i++){ - err = write(fd, &zero, sizeof(zero)); - if(err != sizeof(zero)){ - printk("Write of bitmap to new COW file '%s' failed, " - "errno = %d\n", cow_file, errno); - goto out_close; - } - } - - sizes(size, sectorsize, sizeof(struct cow_header_v2), - bitmap_len_out, data_offset_out); - *bitmap_offset_out = sizeof(struct cow_header_v2); - - return(fd); - - out_close: - close(fd); + err = init_cow_file(fd, cow_file, backing_file, sectorsize, alignment, + bitmap_offset_out, bitmap_len_out, + data_offset_out); + if(!err) + return(fd); + os_close_file(fd); out: return(err); } +/* XXX Just trivial wrappers around os_read_file and os_write_file */ int read_ubd_fs(int fd, void *buffer, int len) { - int n; - - n = read(fd, buffer, len); - if(n < 0) return(-errno); - else return(n); + return(os_read_file(fd, buffer, len)); } int write_ubd_fs(int fd, char *buffer, int len) { - int n; - - n = write(fd, buffer, len); - if(n < 0) return(-errno); - else return(n); + return(os_write_file(fd, buffer, len)); } -int ubd_is_dir(char *file) +static int update_bitmap(struct io_thread_req *req) { - struct stat64 buf; + int n; + + if(req->cow_offset == -1) + return(0); + + n = os_seek_file(req->fds[1], req->cow_offset); + if(n < 0){ + printk("do_io - bitmap lseek failed : err = %d\n", -n); + return(1); + } + + n = os_write_file(req->fds[1], &req->bitmap_words, + sizeof(req->bitmap_words)); + if(n != sizeof(req->bitmap_words)){ + printk("do_io - bitmap update failed, err = %d fd = %d\n", -n, + req->fds[1]); + return(1); + } - if(stat64(file, &buf) < 0) return(0); - return(S_ISDIR(buf.st_mode)); + return(0); } void do_io(struct io_thread_req *req) @@ -461,8 +234,18 @@ char *buf; unsigned long len; int n, nsectors, start, end, bit; + int err; __u64 off; + if(req->op == UBD_MMAP){ + /* Touch the page to force the host to do any necessary IO to + * get it into memory + */ + n = *((volatile int *) req->buffer); + req->error = update_bitmap(req); + return; + } + nsectors = req->length / req->sectorsize; start = 0; do { @@ -473,15 +256,14 @@ &req->sector_mask) == bit)) end++; - if(end != nsectors) - printk("end != nsectors\n"); off = req->offset + req->offsets[bit] + start * req->sectorsize; len = (end - start) * req->sectorsize; buf = &req->buffer[start * req->sectorsize]; - if(os_seek_file(req->fds[bit], off) != 0){ - printk("do_io - lseek failed : errno = %d\n", errno); + err = os_seek_file(req->fds[bit], off); + if(err < 0){ + printk("do_io - lseek failed : err = %d\n", -err); req->error = 1; return; } @@ -490,11 +272,10 @@ do { buf = &buf[n]; len -= n; - n = read(req->fds[bit], buf, len); + n = os_read_file(req->fds[bit], buf, len); if (n < 0) { - printk("do_io - read returned %d : " - "errno = %d fd = %d\n", n, - errno, req->fds[bit]); + printk("do_io - read failed, err = %d " + "fd = %d\n", -n, req->fds[bit]); req->error = 1; return; } @@ -502,11 +283,10 @@ if (n < len) memset(&buf[n], 0, len - n); } else { - n = write(req->fds[bit], buf, len); + n = os_write_file(req->fds[bit], buf, len); if(n != len){ - printk("do_io - write returned %d : " - "errno = %d fd = %d\n", n, - errno, req->fds[bit]); + printk("do_io - write failed err = %d " + "fd = %d\n", -n, req->fds[bit]); req->error = 1; return; } @@ -515,24 +295,7 @@ start = end; } while(start < nsectors); - if(req->cow_offset != -1){ - if(os_seek_file(req->fds[1], req->cow_offset) != 0){ - printk("do_io - bitmap lseek failed : errno = %d\n", - errno); - req->error = 1; - return; - } - n = write(req->fds[1], &req->bitmap_words, - sizeof(req->bitmap_words)); - if(n != sizeof(req->bitmap_words)){ - printk("do_io - bitmap update returned %d : " - "errno = %d fd = %d\n", n, errno, req->fds[1]); - req->error = 1; - return; - } - } - req->error = 0; - return; + req->error = update_bitmap(req); } /* Changed in start_io_thread, which is serialized by being called only @@ -550,19 +313,23 @@ signal(SIGWINCH, SIG_IGN); while(1){ - n = read(kernel_fd, &req, sizeof(req)); - if(n < 0) printk("io_thread - read returned %d, errno = %d\n", - n, errno); - else if(n < sizeof(req)){ - printk("io_thread - short read : length = %d\n", n); + n = os_read_file(kernel_fd, &req, sizeof(req)); + if(n != sizeof(req)){ + if(n < 0) + printk("io_thread - read failed, fd = %d, " + "err = %d\n", kernel_fd, -n); + else { + printk("io_thread - short read, fd = %d, " + "length = %d\n", kernel_fd, n); + } continue; } io_count++; do_io(&req); - n = write(kernel_fd, &req, sizeof(req)); + n = os_write_file(kernel_fd, &req, sizeof(req)); if(n != sizeof(req)) - printk("io_thread - write failed, errno = %d\n", - errno); + printk("io_thread - write failed, fd = %d, err = %d\n", + kernel_fd, -n); } } @@ -571,10 +338,11 @@ int pid, fds[2], err; err = os_pipe(fds, 1, 1); - if(err){ - printk("start_io_thread - os_pipe failed, errno = %d\n", -err); - return(-1); + if(err < 0){ + printk("start_io_thread - os_pipe failed, err = %d\n", -err); + goto out; } + kernel_fd = fds[0]; *fd_out = fds[1]; @@ -582,32 +350,19 @@ NULL); if(pid < 0){ printk("start_io_thread - clone failed : errno = %d\n", errno); - return(-errno); + goto out_close; } - return(pid); -} - -#ifdef notdef -int start_io_thread(unsigned long sp, int *fd_out) -{ - int pid; - if((kernel_fd = get_pty()) < 0) return(-1); - raw(kernel_fd, 0); - if((*fd_out = open(ptsname(kernel_fd), O_RDWR)) < 0){ - printk("Couldn't open tty for IO\n"); - return(-1); - } - - pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD, - NULL); - if(pid < 0){ - printk("start_io_thread - clone failed : errno = %d\n", errno); - return(-errno); - } return(pid); + + out_close: + os_close_file(fds[0]); + os_close_file(fds[1]); + kernel_fd = -1; + *fd_out = -1; + out: + return(err); } -#endif /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c --- a/arch/um/drivers/xterm.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/drivers/xterm.c 2004-09-06 16:37:50 -07:00 @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,8 @@ { struct xterm_chan *data; - if((data = malloc(sizeof(*data))) == NULL) return(NULL); + data = malloc(sizeof(*data)); + if(data == NULL) return(NULL); *data = ((struct xterm_chan) { .pid = -1, .helper_pid = -1, .device = device, @@ -93,7 +93,7 @@ "/usr/lib/uml/port-helper", "-uml-socket", file, NULL }; - if(access(argv[4], X_OK)) + if(os_access(argv[4], OS_ACC_X_OK) < 0) argv[4] = "port-helper"; fd = mkstemp(file); @@ -106,13 +106,13 @@ printk("xterm_open : unlink failed, errno = %d\n", errno); return(-errno); } - close(fd); + os_close_file(fd); - fd = create_unix_socket(file, sizeof(file)); + fd = os_create_unix_socket(file, sizeof(file), 1); if(fd < 0){ printk("xterm_open : create_unix_socket failed, errno = %d\n", -fd); - return(-fd); + return(fd); } sprintf(title, data->title, data->device); @@ -128,15 +128,16 @@ if(data->direct_rcv) new = os_rcv_fd(fd, &data->helper_pid); else { - if((err = os_set_fd_block(fd, 0)) != 0){ + err = os_set_fd_block(fd, 0); + if(err < 0){ printk("xterm_open : failed to set descriptor " - "non-blocking, errno = %d\n", err); + "non-blocking, err = %d\n", -err); return(err); } new = xterm_fd(fd, &data->helper_pid); } if(new < 0){ - printk("xterm_open : os_rcv_fd failed, errno = %d\n", -new); + printk("xterm_open : os_rcv_fd failed, err = %d\n", -new); goto out; } @@ -160,7 +161,7 @@ if(data->helper_pid != -1) os_kill_process(data->helper_pid, 0); data->helper_pid = -1; - close(fd); + os_close_file(fd); } void xterm_free(void *d) diff -Nru a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c --- a/arch/um/drivers/xterm_kern.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/drivers/xterm_kern.c 2004-09-06 16:37:54 -07:00 @@ -5,9 +5,12 @@ #include "linux/errno.h" #include "linux/slab.h" +#include "linux/signal.h" +#include "linux/interrupt.h" #include "asm/semaphore.h" #include "asm/irq.h" #include "irq_user.h" +#include "irq_kern.h" #include "kern_util.h" #include "os.h" #include "xterm.h" @@ -19,17 +22,18 @@ int new_fd; }; -static void xterm_interrupt(int irq, void *data, struct pt_regs *regs) +static irqreturn_t xterm_interrupt(int irq, void *data, struct pt_regs *regs) { struct xterm_wait *xterm = data; int fd; fd = os_rcv_fd(xterm->fd, &xterm->pid); if(fd == -EAGAIN) - return; + return(IRQ_NONE); xterm->new_fd = fd; up(&xterm->sem); + return(IRQ_HANDLED); } int xterm_fd(int socket, int *pid_out) @@ -54,7 +58,8 @@ if(err){ printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " "err = %d\n", err); - return(err); + ret = err; + goto out; } down(&data->sem); @@ -62,6 +67,7 @@ ret = data->new_fd; *pid_out = data->pid; + out: kfree(data); return(ret); diff -Nru a/arch/um/dyn.lds.S b/arch/um/dyn.lds.S --- a/arch/um/dyn.lds.S 2004-09-06 16:37:53 -07:00 +++ b/arch/um/dyn.lds.S 2004-09-06 16:37:53 -07:00 @@ -1,3 +1,5 @@ +#include + OUTPUT_FORMAT(ELF_FORMAT) OUTPUT_ARCH(ELF_ARCH) ENTRY(_start) @@ -10,12 +12,15 @@ { . = START + SIZEOF_HEADERS; .interp : { *(.interp) } - . = ALIGN(4096); __binary_start = .; . = ALIGN(4096); /* Init code and data */ _stext = .; __init_begin = .; - .text.init : { *(.text.init) } + .init.text : { + _sinittext = .; + *(.init.text) + _einittext = .; + } . = ALIGN(4096); @@ -55,7 +60,9 @@ } =0x90909090 .plt : { *(.plt) } .text : { - *(.text .stub .text.* .gnu.linkonce.t.*) + *(.text) + SCHED_TEXT + *(.stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) } =0x90909090 @@ -67,7 +74,7 @@ #include "asm/common.lds.S" - .data.init : { *(.data.init) } + init.data : { *(.init.data) } /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but diff -Nru a/arch/um/include/2_5compat.h b/arch/um/include/2_5compat.h --- a/arch/um/include/2_5compat.h 2004-09-06 16:37:52 -07:00 +++ b/arch/um/include/2_5compat.h 2004-09-06 16:37:52 -07:00 @@ -6,20 +6,6 @@ #ifndef __2_5_COMPAT_H__ #define __2_5_COMPAT_H__ -#include "linux/version.h" - -#define INIT_CONSOLE(dev_name, write_proc, device_proc, setup_proc, f) { \ - name : dev_name, \ - write : write_proc, \ - read : NULL, \ - device : device_proc, \ - setup : setup_proc, \ - flags : f, \ - index : -1, \ - cflag : 0, \ - next : NULL \ -} - #define INIT_HARDSECT(arr, maj, sizes) #define SET_PRI(task) do ; while(0) diff -Nru a/arch/um/include/hostaudio.h b/arch/um/include/hostaudio.h --- a/arch/um/include/hostaudio.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2002 Steve Schmidtke - * Licensed under the GPL - */ - -#ifndef HOSTAUDIO_H -#define HOSTAUDIO_H - -#define HOSTAUDIO_DEV_DSP "/dev/sound/dsp" -#define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer" - -struct hostaudio_state { - int fd; -}; - -struct hostmixer_state { - int fd; -}; - -/* UML user-side protoypes */ -extern ssize_t hostaudio_read_user(struct hostaudio_state *state, char *buffer, - size_t count, loff_t *ppos); -extern ssize_t hostaudio_write_user(struct hostaudio_state *state, - const char *buffer, size_t count, - loff_t *ppos); -extern int hostaudio_ioctl_user(struct hostaudio_state *state, - unsigned int cmd, unsigned long arg); -extern int hostaudio_open_user(struct hostaudio_state *state, int r, int w, - char *dsp); -extern int hostaudio_release_user(struct hostaudio_state *state); -extern int hostmixer_ioctl_mixdev_user(struct hostmixer_state *state, - unsigned int cmd, unsigned long arg); -extern int hostmixer_open_mixdev_user(struct hostmixer_state *state, int r, - int w, char *mixer); -extern int hostmixer_release_mixdev_user(struct hostmixer_state *state); - -#endif /* HOSTAUDIO_H */ - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Nru a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/include/irq_kern.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#ifndef __IRQ_KERN_H__ +#define __IRQ_KERN_H__ + +#include "linux/interrupt.h" + +extern int um_request_irq(unsigned int irq, int fd, int type, + irqreturn_t (*handler)(int, void *, + struct pt_regs *), + unsigned long irqflags, const char * devname, + void *dev_id); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h --- a/arch/um/include/kern_util.h 2004-09-06 16:37:52 -07:00 +++ b/arch/um/include/kern_util.h 2004-09-06 16:37:52 -07:00 @@ -60,12 +60,11 @@ extern void paging_init(void); extern void init_flush_vm(void); extern void *syscall_sp(void *t); -extern void syscall_trace(void); +extern void syscall_trace(union uml_pt_regs *regs, int entryexit); extern int hz(void); -extern void idle_timer(void); +extern void uml_idle_timer(void); extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs); extern int external_pid(void *t); -extern int pid_to_processor_id(int pid); extern void boot_timer_handler(int sig); extern void interrupt_end(void); extern void initial_thread_cb(void (*proc)(void *), void *arg); @@ -89,9 +88,7 @@ extern char *uml_strdup(char *string); extern void unprotect_kernel_mem(void); extern void protect_kernel_mem(void); -extern void set_kmem_end(unsigned long); extern void uml_cleanup(void); -extern int pid_to_processor_id(int pid); extern void set_current(void *t); extern void lock_signalled_task(void *t); extern void IPI_handler(int cpu); @@ -100,7 +97,9 @@ extern int clear_user_proc(void *buf, int size); extern int copy_to_user_proc(void *to, void *from, int size); extern int copy_from_user_proc(void *to, void *from, int size); +extern int strlen_user_proc(char *str); extern void bus_handler(int sig, union uml_pt_regs *regs); +extern void winch(int sig, union uml_pt_regs *regs); extern long execute_syscall(void *r); extern int smp_sigio_handler(void); extern void *get_current(void); @@ -111,6 +110,8 @@ extern void free_irq(unsigned int, void *); extern int um_in_interrupt(void); extern int cpu(void); +extern unsigned long long time_stamp(void); + #endif /* diff -Nru a/arch/um/include/line.h b/arch/um/include/line.h --- a/arch/um/include/line.h 2004-09-06 16:37:54 -07:00 +++ b/arch/um/include/line.h 2004-09-06 16:37:54 -07:00 @@ -9,12 +9,14 @@ #include "linux/list.h" #include "linux/workqueue.h" #include "linux/tty.h" +#include "linux/interrupt.h" #include "asm/semaphore.h" #include "chan_user.h" #include "mconsole_kern.h" struct line_driver { char *name; + char *device_name; char *devfs_name; short major; short minor_start; @@ -67,8 +69,6 @@ #define LINES_INIT(n) { num : n } -extern void line_interrupt(int irq, void *data, struct pt_regs *unused); -extern void line_write_interrupt(int irq, void *data, struct pt_regs *unused); extern void line_close(struct line *lines, struct tty_struct *tty); extern int line_open(struct line *lines, struct tty_struct *tty, struct chan_opts *opts); diff -Nru a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h --- a/arch/um/include/mconsole.h 2004-09-06 16:37:52 -07:00 +++ b/arch/um/include/mconsole.h 2004-09-06 16:37:52 -07:00 @@ -41,11 +41,13 @@ struct mc_request; +enum mc_context { MCONSOLE_INTR, MCONSOLE_PROC }; + struct mconsole_command { char *command; void (*handler)(struct mc_request *req); - int as_interrupt; + enum mc_context context; }; struct mc_request @@ -77,6 +79,8 @@ extern void mconsole_cad(struct mc_request *req); extern void mconsole_stop(struct mc_request *req); extern void mconsole_go(struct mc_request *req); +extern void mconsole_log(struct mc_request *req); +extern void mconsole_proc(struct mc_request *req); extern int mconsole_get_request(int fd, struct mc_request *req); extern int mconsole_notify(char *sock_name, int type, const void *data, diff -Nru a/arch/um/include/mem.h b/arch/um/include/mem.h --- a/arch/um/include/mem.h 2004-09-06 16:37:55 -07:00 +++ b/arch/um/include/mem.h 2004-09-06 16:37:55 -07:00 @@ -1,19 +1,18 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002, 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ #ifndef __MEM_H__ #define __MEM_H__ -struct vm_reserved { - struct list_head list; - unsigned long start; - unsigned long end; -}; +#include "linux/types.h" -extern void set_usable_vm(unsigned long start, unsigned long end); -extern void set_kmem_end(unsigned long new); +extern int phys_mapping(unsigned long phys, __u64 *offset_out); +extern int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w); +extern int is_remapped(void *virt); +extern int physmem_remove_mapping(void *virt); +extern void physmem_forget_descriptor(int fd); #endif diff -Nru a/arch/um/include/mem_kern.h b/arch/um/include/mem_kern.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/include/mem_kern.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#ifndef __MEM_KERN_H__ +#define __MEM_KERN_H__ + +#include "linux/list.h" +#include "linux/types.h" + +struct remapper { + struct list_head list; + int (*proc)(int, unsigned long, int, __u64); +}; + +extern void register_remapper(struct remapper *info); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h --- a/arch/um/include/mem_user.h 2004-09-06 16:37:53 -07:00 +++ b/arch/um/include/mem_user.h 2004-09-06 16:37:53 -07:00 @@ -32,43 +32,38 @@ #ifndef _MEM_USER_H #define _MEM_USER_H -struct mem_region { +struct iomem_region { + struct iomem_region *next; char *driver; - unsigned long start_pfn; - unsigned long start; - unsigned long len; - void *mem_map; int fd; + int size; + unsigned long phys; + unsigned long virt; }; -extern struct mem_region *regions[]; -extern struct mem_region physmem_region; +extern struct iomem_region *iomem_regions; +extern int iomem_size; #define ROUND_4M(n) ((((unsigned long) (n)) + (1 << 22)) & ~((1 << 22) - 1)) extern unsigned long host_task_size; extern unsigned long task_size; +extern void check_devanon(void); extern int init_mem_user(void); extern int create_mem_file(unsigned long len); -extern void setup_range(int fd, char *driver, unsigned long start, - unsigned long pfn, unsigned long total, int need_vm, - struct mem_region *region, void *reserved); extern void setup_memory(void *entry); extern unsigned long find_iomem(char *driver, unsigned long *len_out); -extern int init_maps(struct mem_region *region); -extern int nregions(void); -extern int reserve_vm(unsigned long start, unsigned long end, void *e); +extern int init_maps(unsigned long physmem, unsigned long iomem, + unsigned long highmem); extern unsigned long get_vm(unsigned long len); extern void setup_physmem(unsigned long start, unsigned long usable, - unsigned long len); -extern int setup_region(struct mem_region *region, void *entry); + unsigned long len, unsigned long highmem); extern void add_iomem(char *name, int fd, unsigned long size); -extern struct mem_region *phys_region(unsigned long phys); extern unsigned long phys_offset(unsigned long phys); extern void unmap_physmem(void); -extern int map_memory(unsigned long virt, unsigned long phys, - unsigned long len, int r, int w, int x); +extern void map_memory(unsigned long virt, unsigned long phys, + unsigned long len, int r, int w, int x); extern int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, int must_succeed); extern unsigned long get_kmem_end(void); diff -Nru a/arch/um/include/os.h b/arch/um/include/os.h --- a/arch/um/include/os.h 2004-09-06 16:37:51 -07:00 +++ b/arch/um/include/os.h 2004-09-06 16:37:51 -07:00 @@ -17,6 +17,32 @@ #define OS_TYPE_FIFO 6 #define OS_TYPE_SOCK 7 +/* os_access() flags */ +#define OS_ACC_F_OK 0 /* Test for existence. */ +#define OS_ACC_X_OK 1 /* Test for execute permission. */ +#define OS_ACC_W_OK 2 /* Test for write permission. */ +#define OS_ACC_R_OK 4 /* Test for read permission. */ +#define OS_ACC_RW_OK (OS_ACC_W_OK | OS_ACC_R_OK) /* Test for RW permission */ + +/* + * types taken from stat_file() in hostfs_user.c + * (if they are wrong here, they are wrong there...). + */ +struct uml_stat { + int ust_dev; /* device */ + unsigned long long ust_ino; /* inode */ + int ust_mode; /* protection */ + int ust_nlink; /* number of hard links */ + int ust_uid; /* user ID of owner */ + int ust_gid; /* group ID of owner */ + unsigned long long ust_size; /* total size, in bytes */ + int ust_blksize; /* blocksize for filesystem I/O */ + unsigned long long ust_blocks; /* number of blocks allocated */ + unsigned long ust_atime; /* time of last access */ + unsigned long ust_mtime; /* time of last modification */ + unsigned long ust_ctime; /* time of last change */ +}; + struct openflags { unsigned int r : 1; unsigned int w : 1; @@ -84,29 +110,47 @@ flags.e = 1; return(flags); } - + static inline struct openflags of_cloexec(struct openflags flags) { flags.cl = 1; return(flags); } +extern int os_stat_file(const char *file_name, struct uml_stat *buf); +extern int os_stat_fd(const int fd, struct uml_stat *buf); +extern int os_access(const char *file, int mode); +extern void os_print_error(int error, const char* str); +extern int os_get_exec_close(int fd, int *close_on_exec); +extern int os_set_exec_close(int fd, int close_on_exec); +extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); +extern int os_window_size(int fd, int *rows, int *cols); +extern int os_new_tty_pgrp(int fd, int pid); +extern int os_get_ifname(int fd, char *namebuf); +extern int os_set_slip(int fd); +extern int os_set_owner(int fd, int pid); +extern int os_sigio_async(int master, int slave); +extern int os_mode_fd(int fd, int mode); + extern int os_seek_file(int fd, __u64 offset); extern int os_open_file(char *file, struct openflags flags, int mode); extern int os_read_file(int fd, void *buf, int len); -extern int os_write_file(int fd, void *buf, int count); +extern int os_write_file(int fd, const void *buf, int count); extern int os_file_size(char *file, long long *size_out); +extern int os_file_modtime(char *file, unsigned long *modtime); extern int os_pipe(int *fd, int stream, int close_on_exec); extern int os_set_fd_async(int fd, int owner); extern int os_set_fd_block(int fd, int blocking); extern int os_accept_connection(int fd); +extern int os_create_unix_socket(char *file, int len, int close_on_exec); extern int os_shutdown_socket(int fd, int r, int w); extern void os_close_file(int fd); extern int os_rcv_fd(int fd, int *helper_pid_out); -extern int create_unix_socket(char *file, int len); +extern int create_unix_socket(char *file, int len, int close_on_exec); extern int os_connect_socket(char *name); extern int os_file_type(char *file); extern int os_file_mode(char *file, struct openflags *mode_out); +extern int os_lock_file(int fd, int excl); extern unsigned long os_process_pc(int pid); extern int os_process_parent(int pid); @@ -115,11 +159,12 @@ extern void os_usr1_process(int pid); extern int os_getpid(void); -extern int os_map_memory(void *virt, int fd, unsigned long off, +extern int os_map_memory(void *virt, int fd, unsigned long long off, unsigned long len, int r, int w, int x); extern int os_protect_memory(void *addr, unsigned long len, int r, int w, int x); extern int os_unmap_memory(void *addr, int len); +extern void os_flush_stdout(void); #endif diff -Nru a/arch/um/include/signal_user.h b/arch/um/include/signal_user.h --- a/arch/um/include/signal_user.h 2004-09-06 16:37:50 -07:00 +++ b/arch/um/include/signal_user.h 2004-09-06 16:37:50 -07:00 @@ -11,6 +11,8 @@ extern int change_sig(int signal, int on); extern void set_sigstack(void *stack, int size); extern void set_handler(int sig, void (*handler)(int), int flags, ...); +extern int set_signals(int enable); +extern int get_signals(void); #endif diff -Nru a/arch/um/include/skas_ptrace.h b/arch/um/include/skas_ptrace.h --- a/arch/um/include/skas_ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/arch/um/include/skas_ptrace.h 2004-09-06 16:37:54 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ diff -Nru a/arch/um/include/sysdep-i386/checksum.h b/arch/um/include/sysdep-i386/checksum.h --- a/arch/um/include/sysdep-i386/checksum.h 2004-09-06 16:37:55 -07:00 +++ b/arch/um/include/sysdep-i386/checksum.h 2004-09-06 16:37:55 -07:00 @@ -5,6 +5,7 @@ #ifndef __UM_SYSDEP_CHECKSUM_H #define __UM_SYSDEP_CHECKSUM_H +#include "linux/in6.h" #include "linux/string.h" /* diff -Nru a/arch/um/include/sysdep-i386/frame_user.h b/arch/um/include/sysdep-i386/frame_user.h --- a/arch/um/include/sysdep-i386/frame_user.h 2004-09-06 16:37:55 -07:00 +++ b/arch/um/include/sysdep-i386/frame_user.h 2004-09-06 16:37:55 -07:00 @@ -56,26 +56,26 @@ * it would have to be __builtin_frame_address(1). */ -static inline unsigned long frame_restorer(void) -{ - unsigned long *fp; - - fp = __builtin_frame_address(0); - return((unsigned long) (fp + 1)); -} +#define frame_restorer() \ +({ \ + unsigned long *fp; \ +\ + fp = __builtin_frame_address(0); \ + ((unsigned long) (fp + 1)); \ +}) /* Similarly, this returns the value of sp when the handler was first * entered. This is used to calculate the proper sp when delivering * signals. */ -static inline unsigned long frame_sp(void) -{ - unsigned long *fp; - - fp = __builtin_frame_address(0); - return((unsigned long) (fp + 1)); -} +#define frame_sp() \ +({ \ + unsigned long *fp; \ +\ + fp = __builtin_frame_address(0); \ + ((unsigned long) (fp + 1)); \ +}) #endif diff -Nru a/arch/um/include/sysdep-i386/sigcontext.h b/arch/um/include/sysdep-i386/sigcontext.h --- a/arch/um/include/sysdep-i386/sigcontext.h 2004-09-06 16:37:54 -07:00 +++ b/arch/um/include/sysdep-i386/sigcontext.h 2004-09-06 16:37:54 -07:00 @@ -28,8 +28,8 @@ */ #define SC_START_SYSCALL(sc) do SC_EAX(sc) = -ENOSYS; while(0) -/* These are General Protection and Page Fault */ -#define SEGV_IS_FIXABLE(trap) ((trap == 13) || (trap == 14)) +/* This is Page Fault */ +#define SEGV_IS_FIXABLE(trap) (trap == 14) #define SC_SEGV_IS_FIXABLE(sc) (SEGV_IS_FIXABLE(SC_TRAPNO(sc))) diff -Nru a/arch/um/include/sysdep-i386/syscalls.h b/arch/um/include/sysdep-i386/syscalls.h --- a/arch/um/include/sysdep-i386/syscalls.h 2004-09-06 16:37:51 -07:00 +++ b/arch/um/include/sysdep-i386/syscalls.h 2004-09-06 16:37:51 -07:00 @@ -11,39 +11,34 @@ #define EXECUTE_SYSCALL(syscall, regs) \ ((long (*)(struct syscall_args)) (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs)) -extern syscall_handler_t sys_modify_ldt; -extern syscall_handler_t old_mmap_i386; -extern syscall_handler_t old_select; -extern syscall_handler_t sys_ni_syscall; - #define ARCH_SYSCALLS \ - [ __NR_mmap ] = old_mmap_i386, \ - [ __NR_select ] = old_select, \ - [ __NR_vm86old ] = sys_ni_syscall, \ - [ __NR_modify_ldt ] = sys_modify_ldt, \ - [ __NR_lchown32 ] = sys_lchown, \ - [ __NR_getuid32 ] = sys_getuid, \ - [ __NR_getgid32 ] = sys_getgid, \ - [ __NR_geteuid32 ] = sys_geteuid, \ - [ __NR_getegid32 ] = sys_getegid, \ - [ __NR_setreuid32 ] = sys_setreuid, \ - [ __NR_setregid32 ] = sys_setregid, \ - [ __NR_getgroups32 ] = sys_getgroups, \ - [ __NR_setgroups32 ] = sys_setgroups, \ - [ __NR_fchown32 ] = sys_fchown, \ - [ __NR_setresuid32 ] = sys_setresuid, \ - [ __NR_getresuid32 ] = sys_getresuid, \ - [ __NR_setresgid32 ] = sys_setresgid, \ - [ __NR_getresgid32 ] = sys_getresgid, \ - [ __NR_chown32 ] = sys_chown, \ - [ __NR_setuid32 ] = sys_setuid, \ - [ __NR_setgid32 ] = sys_setgid, \ - [ __NR_setfsuid32 ] = sys_setfsuid, \ - [ __NR_setfsgid32 ] = sys_setfsgid, \ - [ __NR_pivot_root ] = sys_pivot_root, \ - [ __NR_mincore ] = sys_mincore, \ - [ __NR_madvise ] = sys_madvise, \ - [ 222 ] = sys_ni_syscall, + [ __NR_mmap ] = (syscall_handler_t *) old_mmap_i386, \ + [ __NR_select ] = (syscall_handler_t *) old_select, \ + [ __NR_vm86old ] = (syscall_handler_t *) sys_ni_syscall, \ + [ __NR_modify_ldt ] = (syscall_handler_t *) sys_modify_ldt, \ + [ __NR_lchown32 ] = (syscall_handler_t *) sys_lchown, \ + [ __NR_getuid32 ] = (syscall_handler_t *) sys_getuid, \ + [ __NR_getgid32 ] = (syscall_handler_t *) sys_getgid, \ + [ __NR_geteuid32 ] = (syscall_handler_t *) sys_geteuid, \ + [ __NR_getegid32 ] = (syscall_handler_t *) sys_getegid, \ + [ __NR_setreuid32 ] = (syscall_handler_t *) sys_setreuid, \ + [ __NR_setregid32 ] = (syscall_handler_t *) sys_setregid, \ + [ __NR_getgroups32 ] = (syscall_handler_t *) sys_getgroups, \ + [ __NR_setgroups32 ] = (syscall_handler_t *) sys_setgroups, \ + [ __NR_fchown32 ] = (syscall_handler_t *) sys_fchown, \ + [ __NR_setresuid32 ] = (syscall_handler_t *) sys_setresuid, \ + [ __NR_getresuid32 ] = (syscall_handler_t *) sys_getresuid, \ + [ __NR_setresgid32 ] = (syscall_handler_t *) sys_setresgid, \ + [ __NR_getresgid32 ] = (syscall_handler_t *) sys_getresgid, \ + [ __NR_chown32 ] = (syscall_handler_t *) sys_chown, \ + [ __NR_setuid32 ] = (syscall_handler_t *) sys_setuid, \ + [ __NR_setgid32 ] = (syscall_handler_t *) sys_setgid, \ + [ __NR_setfsuid32 ] = (syscall_handler_t *) sys_setfsuid, \ + [ __NR_setfsgid32 ] = (syscall_handler_t *) sys_setfsgid, \ + [ __NR_pivot_root ] = (syscall_handler_t *) sys_pivot_root, \ + [ __NR_mincore ] = (syscall_handler_t *) sys_mincore, \ + [ __NR_madvise ] = (syscall_handler_t *) sys_madvise, \ + [ 222 ] = (syscall_handler_t *) sys_ni_syscall, /* 222 doesn't yet have a name in include/asm-i386/unistd.h */ diff -Nru a/arch/um/include/ubd_user.h b/arch/um/include/ubd_user.h --- a/arch/um/include/ubd_user.h 2004-09-06 16:37:53 -07:00 +++ b/arch/um/include/ubd_user.h 2004-09-06 16:37:53 -07:00 @@ -9,7 +9,7 @@ #include "os.h" -enum ubd_req { UBD_READ, UBD_WRITE }; +enum ubd_req { UBD_READ, UBD_WRITE, UBD_MMAP }; struct io_thread_req { enum ubd_req op; @@ -20,8 +20,10 @@ char *buffer; int sectorsize; unsigned long sector_mask; - unsigned long cow_offset; + unsigned long long cow_offset; unsigned long bitmap_words[2]; + int map_fd; + unsigned long long map_offset; int error; }; @@ -31,7 +33,7 @@ int *create_cow_out); extern int create_cow_file(char *cow_file, char *backing_file, struct openflags flags, int sectorsize, - int *bitmap_offset_out, + int alignment, int *bitmap_offset_out, unsigned long *bitmap_len_out, int *data_offset_out); extern int read_cow_bitmap(int fd, void *buf, int offset, int len); @@ -39,7 +41,6 @@ extern int write_ubd_fs(int fd, char *buffer, int len); extern int start_io_thread(unsigned long sp, int *fds_out); extern void do_io(struct io_thread_req *req); -extern int ubd_is_dir(char *file); static inline int ubd_test_bit(__u64 bit, unsigned char *data) { diff -Nru a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h --- a/arch/um/include/um_uaccess.h 2004-09-06 16:37:54 -07:00 +++ b/arch/um/include/um_uaccess.h 2004-09-06 16:37:54 -07:00 @@ -38,22 +38,73 @@ from, n)); } +/* + * strncpy_from_user: - Copy a NUL terminated string from userspace. + * @dst: Destination address, in kernel space. This buffer must be at + * least @count bytes long. + * @src: Source address, in user space. + * @count: Maximum number of bytes to copy, including the trailing NUL. + * + * Copies a NUL-terminated string from userspace to kernel space. + * + * On success, returns the length of the string (not including the trailing + * NUL). + * + * If access to userspace fails, returns -EFAULT (some data may have been + * copied). + * + * If @count is smaller than the length of the string, copies @count bytes + * and returns @count. + */ + static inline int strncpy_from_user(char *dst, const char *src, int count) { return(CHOOSE_MODE_PROC(strncpy_from_user_tt, strncpy_from_user_skas, dst, src, count)); } +/* + * __clear_user: - Zero a block of memory in user space, with less checking. + * @to: Destination address, in user space. + * @n: Number of bytes to zero. + * + * Zero a block of memory in user space. Caller must check + * the specified block with access_ok() before calling this function. + * + * Returns number of bytes that could not be cleared. + * On success, this will be zero. + */ static inline int __clear_user(void *mem, int len) { return(CHOOSE_MODE_PROC(__clear_user_tt, __clear_user_skas, mem, len)); } +/* + * clear_user: - Zero a block of memory in user space. + * @to: Destination address, in user space. + * @n: Number of bytes to zero. + * + * Zero a block of memory in user space. + * + * Returns number of bytes that could not be cleared. + * On success, this will be zero. + */ static inline int clear_user(void *mem, int len) { return(CHOOSE_MODE_PROC(clear_user_tt, clear_user_skas, mem, len)); } +/* + * strlen_user: - Get the size of a string in user space. + * @str: The string to measure. + * @n: The maximum valid length + * + * Get the size of a NUL-terminated string in user space. + * + * Returns the size of the string INCLUDING the terminating NUL. + * On exception, returns 0. + * If the string is too long, returns a value greater than @n. + */ static inline int strnlen_user(const void *str, int len) { return(CHOOSE_MODE_PROC(strnlen_user_tt, strnlen_user_skas, str, len)); diff -Nru a/arch/um/include/user.h b/arch/um/include/user.h --- a/arch/um/include/user.h 2004-09-06 16:37:50 -07:00 +++ b/arch/um/include/user.h 2004-09-06 16:37:50 -07:00 @@ -14,6 +14,9 @@ extern void kfree(void *ptr); extern int in_aton(char *str); extern int open_gdb_chan(void); +extern int strlcpy(char *, const char *, int); +extern void *um_vmalloc(int size); +extern void vfree(void *ptr); #endif diff -Nru a/arch/um/include/user_util.h b/arch/um/include/user_util.h --- a/arch/um/include/user_util.h 2004-09-06 16:37:51 -07:00 +++ b/arch/um/include/user_util.h 2004-09-06 16:37:51 -07:00 @@ -14,8 +14,6 @@ extern int unlockpt(int __fd); extern char *ptsname(int __fd); -enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; - struct cpu_task { int pid; void *task; @@ -59,13 +57,11 @@ extern void *add_signal_handler(int sig, void (*handler)(int)); extern int start_fork_tramp(void *arg, unsigned long temp_stack, int clone_flags, int (*tramp)(void *)); -extern int clone_and_wait(int (*fn)(void *), void *arg, void *sp, int flags); extern int linux_main(int argc, char **argv); extern void set_cmdline(char *cmd); extern void input_cb(void (*proc)(void *), void *arg, int arg_len); extern int get_pty(void); extern void *um_kmalloc(int size); -extern int raw(int fd, int complain); extern int switcheroo(int fd, int prot, void *from, void *to, int size); extern void setup_machinename(char *machine_out); extern void setup_hostinfo(void); @@ -86,11 +82,17 @@ extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); extern void write_sigio_workaround(void); extern void arch_check_bugs(void); +extern int cpu_feature(char *what, char *buf, int len); extern int arch_handle_signal(int sig, union uml_pt_regs *regs); extern int arch_fixup(unsigned long address, void *sc_ptr); extern void forward_pending_sigio(int target); extern int can_do_skas(void); - +extern void arch_init_thread(void); + +extern int __raw(int fd, int complain, int now); +#define raw(fd, complain) __raw((fd), (complain), 1) + +#define CATCH_EINTR(expr) while ( ((expr) < 0) && errno == EINTR) #endif /* diff -Nru a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile --- a/arch/um/kernel/Makefile 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/Makefile 2004-09-06 16:37:53 -07:00 @@ -3,15 +3,15 @@ # Licensed under the GPL # -extra-y := vmlinux.lds +extra-y := vmlinux.lds uml.lds obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \ - helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \ - process.o process_kern.o ptrace.o reboot.o resource.o sigio_user.o \ - sigio_kern.o signal_kern.o signal_user.o smp.o syscall_kern.o \ - syscall_user.o sysrq.o sys_call_table.o tempfile.o time.o \ - time_kern.o tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o \ - umid.o user_syms.o user_util.o + helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ + physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ + sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ + syscall_kern.o syscall_user.o sysrq.o sys_call_table.o tempfile.o \ + time.o time_kern.o tlb.o trap_kern.o trap_user.o uaccess_user.o \ + um_arch.o umid.o user_util.o obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o obj-$(CONFIG_GPROF) += gprof_syms.o @@ -24,43 +24,27 @@ user-objs-$(CONFIG_TTY_LOG) += tty_log.o USER_OBJS := $(filter %_user.o,$(obj-y)) $(user-objs-y) config.o helper.o \ - process.o tempfile.o time.o tty_log.o umid.o user_util.o user_syms.o + main.o process.o tempfile.o time.o tty_log.o umid.o user_util.o USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -DMODULES-$(CONFIG_MODULES) = -D__CONFIG_MODULES__ -DMODVERSIONS-$(CONFIG_MODVERSIONS) = -D__CONFIG_MODVERSIONS__ - - -CFLAGS_user_syms.o = -D__AUTOCONF_INCLUDED__ $(DMODULES-y) $(DMODVERSIONS-y) \ - -I/usr/include -I../include - CFLAGS_frame.o := $(patsubst -fomit-frame-pointer,,$(USER_CFLAGS)) -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - # This has to be separate because it needs be compiled with frame pointers # regardless of how the rest of the kernel is built. $(obj)/frame.o: $(src)/frame.c $(CC) $(CFLAGS_$(notdir $@)) -c -o $@ $< -QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; while() { $$_ =~ s/CONFIG/$$config/; print $$_ }' +$(USER_OBJS) : %.o: %.c + $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< -$(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config - $(PERL) -e $(QUOTE) < $(src)/config.c.in > $@ +QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while() { $$_ =~ s/CONFIG/$$config/; print $$_ }' $(obj)/config.o : $(obj)/config.c -clean: - rm -f config.c - for dir in $(subdir-y) ; do $(MAKE) -C $$dir clean; done - -modules: - -fastdep: - -dep: - -archmrproper: clean +quiet_cmd_quote = QUOTE $@ +cmd_quote = $(PERL) -e $(QUOTE) < $< > $@ +targets += config.c +$(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config FORCE + $(call if_changed,quote) diff -Nru a/arch/um/kernel/config.c.in b/arch/um/kernel/config.c.in --- a/arch/um/kernel/config.c.in 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/config.c.in 2004-09-06 16:37:54 -07:00 @@ -7,9 +7,7 @@ #include #include "init.h" -static __initdata char *config = " -CONFIG -"; +static __initdata char *config = "CONFIG"; static int __init print_config(char *line, int *add) { diff -Nru a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c --- a/arch/um/kernel/exec_kern.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/exec_kern.c 2004-09-06 16:37:51 -07:00 @@ -32,10 +32,15 @@ CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp); } +extern void log_exec(char **argv, void *tty); + static int execve1(char *file, char **argv, char **env) { int error; +#ifdef CONFIG_TTY_LOG + log_exec(argv, current->tty); +#endif error = do_execve(file, argv, env, ¤t->thread.regs); if (error == 0){ current->ptrace &= ~PT_DTRACE; diff -Nru a/arch/um/kernel/frame.c b/arch/um/kernel/frame.c --- a/arch/um/kernel/frame.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/frame.c 2004-09-06 16:37:52 -07:00 @@ -21,6 +21,7 @@ #include "sysdep/sigcontext.h" #include "frame_user.h" #include "kern_util.h" +#include "user_util.h" #include "ptrace_user.h" #include "os.h" @@ -40,7 +41,7 @@ /* Wait for it to stop itself and continue it with a SIGUSR1 to force * it into the signal handler. */ - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0){ printf("capture_stack : waitpid failed - errno = %d\n", errno); exit(1); @@ -60,7 +61,7 @@ * At this point, the handler has stuffed the addresses of * sig, sc, and SA_RESTORER in raw. */ - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0){ printf("capture_stack : waitpid failed - errno = %d\n", errno); exit(1); @@ -82,7 +83,8 @@ errno); exit(1); } - if(waitpid(pid, &status, 0) < 0){ + CATCH_EINTR(n = waitpid(pid, &status, 0)); + if(n < 0){ printf("capture_stack : waitpid failed - errno = %d\n", errno); exit(1); } @@ -279,7 +281,7 @@ struct sc_frame_raw raw_sc; struct si_frame_raw raw_si; void *stack, *sigstack; - unsigned long top, sig_top, base; + unsigned long top, base; stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); @@ -292,7 +294,6 @@ } top = (unsigned long) stack + PAGE_SIZE - sizeof(void *); - sig_top = (unsigned long) sigstack + PAGE_SIZE; /* Get the sigcontext, no sigrestorer layout */ raw_sc.restorer = 0; diff -Nru a/arch/um/kernel/frame_kern.c b/arch/um/kernel/frame_kern.c --- a/arch/um/kernel/frame_kern.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/frame_kern.c 2004-09-06 16:37:55 -07:00 @@ -6,7 +6,6 @@ #include "asm/ptrace.h" #include "asm/uaccess.h" #include "asm/signal.h" -#include "asm/uaccess.h" #include "asm/ucontext.h" #include "frame_kern.h" #include "sigcontext.h" @@ -29,12 +28,15 @@ sizeof(restorer))); } +extern int userspace_pid[]; + static int copy_sc_to_user(void *to, void *fp, struct pt_regs *from, struct arch_frame_data *arch) { return(CHOOSE_MODE(copy_sc_to_user_tt(to, fp, UPT_SC(&from->regs), arch), - copy_sc_to_user_skas(to, fp, &from->regs, + copy_sc_to_user_skas(userspace_pid[0], to, fp, + &from->regs, current->thread.cr2, current->thread.err))); } diff -Nru a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c --- a/arch/um/kernel/helper.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/helper.c 2004-09-06 16:37:52 -07:00 @@ -7,12 +7,12 @@ #include #include #include -#include #include #include #include #include "user.h" #include "kern_util.h" +#include "user_util.h" #include "os.h" struct helper_data { @@ -33,6 +33,7 @@ { struct helper_data *data = arg; char **argv = data->argv; + int errval; if(helper_pause){ signal(SIGHUP, helper_hup); @@ -41,8 +42,9 @@ if(data->pre_exec != NULL) (*data->pre_exec)(data->pre_data); execvp(argv[0], argv); + errval = errno; printk("execvp of '%s' failed - errno = %d\n", argv[0], errno); - write(data->fd, &errno, sizeof(errno)); + os_write_file(data->fd, &errval, sizeof(errval)); os_kill_process(os_getpid(), 0); return(0); } @@ -59,17 +61,20 @@ if((stack_out != NULL) && (*stack_out != 0)) stack = *stack_out; else stack = alloc_stack(0, um_in_interrupt()); - if(stack == 0) return(-ENOMEM); + if(stack == 0) + return(-ENOMEM); err = os_pipe(fds, 1, 0); - if(err){ - printk("run_helper : pipe failed, errno = %d\n", -err); - return(err); + if(err < 0){ + printk("run_helper : pipe failed, err = %d\n", -err); + goto out_free; } - if(fcntl(fds[1], F_SETFD, 1) != 0){ - printk("run_helper : setting FD_CLOEXEC failed, errno = %d\n", - errno); - return(-errno); + + err = os_set_exec_close(fds[1], 1); + if(err < 0){ + printk("run_helper : setting FD_CLOEXEC failed, err = %d\n", + -err); + goto out_close; } sp = stack + page_size() - sizeof(void *); @@ -80,23 +85,34 @@ pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); if(pid < 0){ printk("run_helper : clone failed, errno = %d\n", errno); - return(-errno); + err = -errno; + goto out_close; } - close(fds[1]); - n = read(fds[0], &err, sizeof(err)); + + os_close_file(fds[1]); + n = os_read_file(fds[0], &err, sizeof(err)); if(n < 0){ - printk("run_helper : read on pipe failed, errno = %d\n", - errno); - return(-errno); + printk("run_helper : read on pipe failed, err = %d\n", -n); + err = n; + goto out_kill; } else if(n != 0){ - waitpid(pid, NULL, 0); - pid = -err; + CATCH_EINTR(n = waitpid(pid, NULL, 0)); + pid = -errno; } if(stack_out == NULL) free_stack(stack, 0); else *stack_out = stack; return(pid); + + out_kill: + os_kill_process(pid, 1); + out_close: + os_close_file(fds[0]); + os_close_file(fds[1]); + out_free: + free_stack(stack, 0); + return(err); } int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, @@ -117,9 +133,11 @@ } if(stack_out == NULL){ pid = waitpid(pid, &status, 0); - if(pid < 0) + if(pid < 0){ printk("run_helper_thread - wait failed, errno = %d\n", - pid); + errno); + pid = -errno; + } if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) printk("run_helper_thread - thread returned status " "0x%x\n", status); diff -Nru a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c --- a/arch/um/kernel/init_task.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/init_task.c 2004-09-06 16:37:55 -07:00 @@ -8,7 +8,6 @@ #include "linux/module.h" #include "linux/sched.h" #include "linux/init_task.h" -#include "linux/version.h" #include "linux/mqueue.h" #include "asm/uaccess.h" #include "asm/pgtable.h" @@ -19,7 +18,7 @@ struct mm_struct init_mm = INIT_MM(init_mm); static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS(init_signals); - +static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); EXPORT_SYMBOL(init_mm); /* @@ -44,24 +43,10 @@ __attribute__((__section__(".data.init_task"))) = { INIT_THREAD_INFO(init_task) }; -struct task_struct *alloc_task_struct(void) -{ - return((struct task_struct *) - __get_free_pages(GFP_KERNEL, CONFIG_KERNEL_STACK_ORDER)); -} - void unprotect_stack(unsigned long stack) { protect_memory(stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, 1, 1, 0, 1); -} - -void free_task_struct(struct task_struct *task) -{ - /* free_pages decrements the page counter and only actually frees - * the pages if they are now not accessed by anything. - */ - free_pages((unsigned long) task, CONFIG_KERNEL_STACK_ORDER); } /* diff -Nru a/arch/um/kernel/initrd_user.c b/arch/um/kernel/initrd_user.c --- a/arch/um/kernel/initrd_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/initrd_user.c 2004-09-06 16:37:51 -07:00 @@ -6,7 +6,6 @@ #include #include #include -#include #include #include "user_util.h" @@ -19,13 +18,15 @@ { int fd, n; - if((fd = os_open_file(filename, of_read(OPENFLAGS()), 0)) < 0){ - printk("Opening '%s' failed - errno = %d\n", filename, errno); + fd = os_open_file(filename, of_read(OPENFLAGS()), 0); + if(fd < 0){ + printk("Opening '%s' failed - err = %d\n", filename, -fd); return(-1); } - if((n = read(fd, buf, size)) != size){ - printk("Read of %d bytes from '%s' returned %d, errno = %d\n", - size, filename, n, errno); + n = os_read_file(fd, buf, size); + if(n != size){ + printk("Read of %d bytes from '%s' failed, err = %d\n", size, + filename, -n); return(-1); } return(0); diff -Nru a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c --- a/arch/um/kernel/irq.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/irq.c 2004-09-06 16:37:54 -07:00 @@ -18,6 +18,7 @@ #include "linux/proc_fs.h" #include "linux/init.h" #include "linux/seq_file.h" +#include "linux/profile.h" #include "asm/irq.h" #include "asm/hw_irq.h" #include "asm/hardirq.h" @@ -29,6 +30,7 @@ #include "user_util.h" #include "kern_util.h" #include "irq_user.h" +#include "irq_kern.h" static void register_irq_proc (unsigned int irq); @@ -83,65 +85,55 @@ end_none }; -/* Not changed */ -volatile unsigned long irq_err_count; - /* * Generic, controller-independent functions: */ -int get_irq_list(char *buf) +int show_interrupts(struct seq_file *p, void *v) { - int i, j; - unsigned long flags; + int i = *(loff_t *) v, j; struct irqaction * action; - char *p = buf; + unsigned long flags; - p += sprintf(p, " "); - for (j=0; jtypename); - p += sprintf(p, " %s", action->name); + seq_printf(p, " %14s", irq_desc[i].handler->typename); + seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) - p += sprintf(p, ", %s", action->name); - *p++ = '\n'; - end: + seq_printf(p, ", %s", action->name); + + seq_putc(p, '\n'); +skip: spin_unlock_irqrestore(&irq_desc[i].lock, flags); + } else if (i == NR_IRQS) { + seq_printf(p, "NMI: "); + for (j = 0; j < NR_CPUS; j++) + if (cpu_online(j)) + seq_printf(p, "%10u ", nmi_count(j)); + seq_putc(p, '\n'); } - p += sprintf(p, "\n"); -#ifdef notdef -#ifdef CONFIG_SMP - p += sprintf(p, "LOC: "); - for (j = 0; j < num_online_cpus(); j++) - p += sprintf(p, "%10u ", - apic_timer_irqs[cpu_logical_map(j)]); - p += sprintf(p, "\n"); -#endif -#endif - p += sprintf(p, "ERR: %10lu\n", irq_err_count); - return p - buf; -} - -int show_interrupts(struct seq_file *p, void *v) -{ - return(0); + return 0; } /* @@ -155,13 +147,15 @@ struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ + int ret; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -282,13 +276,12 @@ * 0 return value means that this irq is already being * handled by some other CPU. (or is disabled) */ - int cpu = smp_processor_id(); irq_desc_t *desc = irq_desc + irq; struct irqaction * action; unsigned int status; irq_enter(); - kstat_cpu(cpu).irqs[irq]++; + kstat_this_cpu.irqs[irq]++; spin_lock(&desc->lock); desc->handler->ack(irq); /* @@ -385,7 +378,7 @@ */ int request_irq(unsigned int irq, - void (*handler)(int, void *, struct pt_regs *), + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) @@ -433,15 +426,19 @@ EXPORT_SYMBOL(request_irq); int um_request_irq(unsigned int irq, int fd, int type, - void (*handler)(int, void *, struct pt_regs *), + irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id) { - int retval; + int err; - retval = request_irq(irq, handler, irqflags, devname, dev_id); - if(retval) return(retval); - return(activate_fd(irq, fd, type, dev_id)); + err = request_irq(irq, handler, irqflags, devname, dev_id); + if(err) + return(err); + + if(fd != -1) + err = activate_fd(irq, fd, type, dev_id); + return(err); } /* this was setup_x86_irq but it seems pretty generic */ @@ -474,7 +471,8 @@ */ spin_lock_irqsave(&desc->lock,flags); p = &desc->action; - if ((old = *p) != NULL) { + old = *p; + if (old != NULL) { /* Can't share interrupts unless both agree to */ if (!(old->flags & new->flags & SA_SHIRQ)) { spin_unlock_irqrestore(&desc->lock,flags); @@ -586,12 +584,14 @@ unsigned long count, void *data) { int irq = (long) data, full_count = count, err; - cpumask_t new_value, tmp; + cpumask_t new_value; if (!irq_desc[irq].handler->set_affinity) return -EIO; err = cpumask_parse(buffer, count, new_value); + if(err) + return(err); #ifdef CONFIG_SMP /* @@ -599,9 +599,11 @@ * way to make the system unusable accidentally :-) At least * one online CPU still has to be targeted. */ - cpus_and(tmp, new_value, cpu_online_map); - if (cpus_empty(tmp)) - return -EINVAL; + { cpumask_t tmp; + cpus_and(tmp, new_value, cpu_online_map); + if (cpus_empty(tmp)) + return -EINVAL; + } #endif irq_affinity[irq] = new_value; @@ -610,30 +612,6 @@ return full_count; } -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer, - unsigned long count, void *data) -{ - cpumask_t *mask = (cpumask_t *)data, new_value; - unsigned long full_count = count, err; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - #define MAX_NAMELEN 10 static void register_irq_proc (unsigned int irq) @@ -662,24 +640,15 @@ smp_affinity_entry[irq] = entry; } -/* Read and written as a long */ -cpumask_t prof_cpu_mask = CPU_MASK_ALL; - void __init init_irq_proc (void) { - struct proc_dir_entry *entry; int i; /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", 0); /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. diff -Nru a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c --- a/arch/um/kernel/irq_user.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/irq_user.c 2004-09-06 16:37:52 -07:00 @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -49,7 +48,8 @@ if(smp_sigio_handler()) return; while(1){ - if((n = poll(pollfds, pollfds_num, 0)) < 0){ + n = poll(pollfds, pollfds_num, 0); + if(n < 0){ if(errno == EINTR) continue; printk("sigio_handler : poll returned %d, " "errno = %d\n", n, errno); @@ -366,34 +366,31 @@ void forward_ipi(int fd, int pid) { - if(fcntl(fd, F_SETOWN, pid) < 0){ - int save_errno = errno; - if(fcntl(fd, F_GETOWN, 0) != pid){ - printk("forward_ipi: F_SETOWN failed, fd = %d, " - "me = %d, target = %d, errno = %d\n", fd, - os_getpid(), pid, save_errno); - } - } + int err; + + err = os_set_owner(fd, pid); + if(err < 0) + printk("forward_ipi: set_owner failed, fd = %d, me = %d, " + "target = %d, err = %d\n", fd, os_getpid(), pid, -err); } void forward_interrupts(int pid) { struct irq_fd *irq; unsigned long flags; + int err; flags = irq_lock(); for(irq=active_fds;irq != NULL;irq = irq->next){ - if(fcntl(irq->fd, F_SETOWN, pid) < 0){ - int save_errno = errno; - if(fcntl(irq->fd, F_GETOWN, 0) != pid){ - /* XXX Just remove the irq rather than - * print out an infinite stream of these - */ - printk("Failed to forward %d to pid %d, " - "errno = %d\n", irq->fd, pid, - save_errno); - } + err = os_set_owner(irq->fd, pid); + if(err < 0){ + /* XXX Just remove the irq rather than + * print out an infinite stream of these + */ + printk("Failed to forward %d to pid %d, err = %d\n", + irq->fd, pid, -err); } + irq->pid = pid; } irq_unlock(flags); diff -Nru a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c --- a/arch/um/kernel/ksyms.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/ksyms.c 2004-09-06 16:37:50 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2001 - 2004 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -8,7 +8,7 @@ #include "linux/string.h" #include "linux/smp_lock.h" #include "linux/spinlock.h" -#include +#include "linux/highmem.h" #include "asm/current.h" #include "asm/delay.h" #include "asm/processor.h" @@ -19,6 +19,7 @@ #include "asm/tlbflush.h" #include "kern_util.h" #include "user_util.h" +#include "mem_user.h" #include "os.h" #include "helper.h" @@ -34,34 +35,66 @@ EXPORT_SYMBOL(flush_tlb_range); EXPORT_SYMBOL(host_task_size); EXPORT_SYMBOL(arch_validate); +EXPORT_SYMBOL(get_kmem_end); -EXPORT_SYMBOL(region_pa); -EXPORT_SYMBOL(region_va); -EXPORT_SYMBOL(phys_mem_map); -EXPORT_SYMBOL(page_mem_map); EXPORT_SYMBOL(page_to_phys); EXPORT_SYMBOL(phys_to_page); EXPORT_SYMBOL(high_physmem); EXPORT_SYMBOL(empty_zero_page); EXPORT_SYMBOL(um_virt_to_phys); +EXPORT_SYMBOL(__virt_to_page); +EXPORT_SYMBOL(to_phys); +EXPORT_SYMBOL(to_virt); EXPORT_SYMBOL(mode_tt); EXPORT_SYMBOL(handle_page_fault); +EXPORT_SYMBOL(find_iomem); +#ifdef CONFIG_MODE_TT +EXPORT_SYMBOL(strncpy_from_user_tt); +EXPORT_SYMBOL(copy_from_user_tt); +EXPORT_SYMBOL(copy_to_user_tt); +#endif + +#ifdef CONFIG_MODE_SKAS +EXPORT_SYMBOL(strncpy_from_user_skas); +EXPORT_SYMBOL(copy_to_user_skas); +EXPORT_SYMBOL(copy_from_user_skas); +#endif + +EXPORT_SYMBOL(os_stat_fd); +EXPORT_SYMBOL(os_stat_file); +EXPORT_SYMBOL(os_access); +EXPORT_SYMBOL(os_print_error); +EXPORT_SYMBOL(os_get_exec_close); +EXPORT_SYMBOL(os_set_exec_close); EXPORT_SYMBOL(os_getpid); EXPORT_SYMBOL(os_open_file); EXPORT_SYMBOL(os_read_file); EXPORT_SYMBOL(os_write_file); EXPORT_SYMBOL(os_seek_file); +EXPORT_SYMBOL(os_lock_file); +EXPORT_SYMBOL(os_ioctl_generic); EXPORT_SYMBOL(os_pipe); EXPORT_SYMBOL(os_file_type); +EXPORT_SYMBOL(os_file_mode); +EXPORT_SYMBOL(os_file_size); +EXPORT_SYMBOL(os_flush_stdout); EXPORT_SYMBOL(os_close_file); +EXPORT_SYMBOL(os_set_fd_async); +EXPORT_SYMBOL(os_set_fd_block); EXPORT_SYMBOL(helper_wait); EXPORT_SYMBOL(os_shutdown_socket); +EXPORT_SYMBOL(os_create_unix_socket); EXPORT_SYMBOL(os_connect_socket); +EXPORT_SYMBOL(os_accept_connection); +EXPORT_SYMBOL(os_rcv_fd); EXPORT_SYMBOL(run_helper); EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(dump_thread); +EXPORT_SYMBOL(do_gettimeofday); +EXPORT_SYMBOL(do_settimeofday); + /* This is here because UML expands open to sys_open, not to a system * call instruction. */ @@ -90,3 +123,13 @@ EXPORT_SYMBOL(kmap_atomic_to_page); #endif +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/main.c b/arch/um/kernel/main.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/main.c 2004-09-06 16:37:54 -07:00 @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "user_util.h" +#include "kern_util.h" +#include "mem_user.h" +#include "signal_user.h" +#include "user.h" +#include "init.h" +#include "mode.h" +#include "choose-mode.h" +#include "uml-config.h" + +/* Set in set_stklim, which is called from main and __wrap_malloc. + * __wrap_malloc only calls it if main hasn't started. + */ +unsigned long stacksizelim; + +/* Set in main */ +char *linux_prog; + +#define PGD_BOUND (4 * 1024 * 1024) +#define STACKSIZE (8 * 1024 * 1024) +#define THREAD_NAME_LEN (256) + +static void set_stklim(void) +{ + struct rlimit lim; + + if(getrlimit(RLIMIT_STACK, &lim) < 0){ + perror("getrlimit"); + exit(1); + } + if((lim.rlim_cur == RLIM_INFINITY) || (lim.rlim_cur > STACKSIZE)){ + lim.rlim_cur = STACKSIZE; + if(setrlimit(RLIMIT_STACK, &lim) < 0){ + perror("setrlimit"); + exit(1); + } + } + stacksizelim = (lim.rlim_cur + PGD_BOUND - 1) & ~(PGD_BOUND - 1); +} + +static __init void do_uml_initcalls(void) +{ + initcall_t *call; + + call = &__uml_initcall_start; + while (call < &__uml_initcall_end){; + (*call)(); + call++; + } +} + +static void last_ditch_exit(int sig) +{ + CHOOSE_MODE(kmalloc_ok = 0, (void) 0); + signal(SIGINT, SIG_DFL); + signal(SIGTERM, SIG_DFL); + signal(SIGHUP, SIG_DFL); + uml_cleanup(); + exit(1); +} + +extern int uml_exitcode; + +int main(int argc, char **argv, char **envp) +{ + char **new_argv; + sigset_t mask; + int ret, i; + + /* Enable all signals except SIGIO - in some environments, we can + * enter with some signals blocked + */ + + sigemptyset(&mask); + sigaddset(&mask, SIGIO); + if(sigprocmask(SIG_SETMASK, &mask, NULL) < 0){ + perror("sigprocmask"); + exit(1); + } + +#ifdef UML_CONFIG_MODE_TT + /* Allocate memory for thread command lines */ + if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){ + + char padding[THREAD_NAME_LEN] = { + [ 0 ... THREAD_NAME_LEN - 2] = ' ', '\0' + }; + + new_argv = malloc((argc + 2) * sizeof(char*)); + if(!new_argv) { + perror("Allocating extended argv"); + exit(1); + } + + new_argv[0] = argv[0]; + new_argv[1] = padding; + + for(i = 2; i <= argc; i++) + new_argv[i] = argv[i - 1]; + new_argv[argc + 1] = NULL; + + execvp(new_argv[0], new_argv); + perror("execing with extended args"); + exit(1); + } +#endif + + linux_prog = argv[0]; + + set_stklim(); + + new_argv = malloc((argc + 1) * sizeof(char *)); + if(new_argv == NULL){ + perror("Mallocing argv"); + exit(1); + } + for(i=0;i= uml_physmem) && (addr <= high_physmem)) + kfree(ptr); + else if((addr >= start_vm) && (addr <= end_vm)) + vfree(ptr); + else + __real_free(ptr); + } + else __real_free(ptr); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c --- a/arch/um/kernel/mem.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/mem.c 2004-09-06 16:37:52 -07:00 @@ -1,74 +1,66 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ -#include "linux/config.h" -#include "linux/module.h" -#include "linux/types.h" +#include "linux/stddef.h" +#include "linux/kernel.h" #include "linux/mm.h" -#include "linux/fs.h" -#include "linux/init.h" #include "linux/bootmem.h" #include "linux/swap.h" -#include "linux/slab.h" -#include "linux/vmalloc.h" #include "linux/highmem.h" +#include "linux/gfp.h" #include "asm/page.h" -#include "asm/pgtable.h" +#include "asm/fixmap.h" #include "asm/pgalloc.h" -#include "asm/bitops.h" -#include "asm/uaccess.h" -#include "asm/tlb.h" #include "user_util.h" #include "kern_util.h" -#include "mem_user.h" -#include "mem.h" #include "kern.h" -#include "init.h" -#include "os.h" -#include "mode_kern.h" +#include "mem_user.h" #include "uml_uaccess.h" +#include "os.h" + +extern char __binary_start; /* Changed during early boot */ -pgd_t swapper_pg_dir[1024]; -unsigned long high_physmem; -unsigned long vm_start; -unsigned long vm_end; -unsigned long highmem; unsigned long *empty_zero_page = NULL; unsigned long *empty_bad_page = NULL; - -/* Not modified */ -const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n"; - -extern char __init_begin, __init_end; -extern long physmem_size; - -/* Not changed by UML */ -DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); - -/* Changed during early boot */ +pgd_t swapper_pg_dir[1024]; +unsigned long highmem; int kmalloc_ok = 0; -#define NREGIONS (phys_region_index(0xffffffff) - phys_region_index(0x0) + 1) -struct mem_region *regions[NREGIONS] = { [ 0 ... NREGIONS - 1 ] = NULL }; -#define REGION_SIZE ((0xffffffff & ~REGION_MASK) + 1) - -/* Changed during early boot */ static unsigned long brk_end; +void unmap_physmem(void) +{ + os_unmap_memory((void *) brk_end, uml_reserved - brk_end); +} + static void map_cb(void *unused) { map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0); } -void unmap_physmem(void) +#ifdef CONFIG_HIGHMEM +static void setup_highmem(unsigned long highmem_start, + unsigned long highmem_len) { - os_unmap_memory((void *) brk_end, uml_reserved - brk_end); -} + struct page *page; + unsigned long highmem_pfn; + int i; -extern char __binary_start; + highmem_start_page = virt_to_page(highmem_start); + + highmem_pfn = __pa(highmem_start) >> PAGE_SHIFT; + for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ + page = &mem_map[highmem_pfn + i]; + ClearPageReserved(page); + set_bit(PG_highmem, &page->flags); + set_page_count(page, 1); + __free_page(page); + } +} +#endif void mem_init(void) { @@ -103,50 +95,15 @@ totalhigh_pages = highmem >> PAGE_SHIFT; totalram_pages += totalhigh_pages; num_physpages = totalram_pages; - max_mapnr = totalram_pages; max_pfn = totalram_pages; printk(KERN_INFO "Memory: %luk available\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT-10)); kmalloc_ok = 1; -} - -/* Changed during early boot */ -static unsigned long kmem_top = 0; - -unsigned long get_kmem_end(void) -{ - if(kmem_top == 0) - kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas); - return(kmem_top); -} - -void set_kmem_end(unsigned long new) -{ - kmem_top = new; -} #ifdef CONFIG_HIGHMEM -/* Changed during early boot */ -pte_t *kmap_pte; -pgprot_t kmap_prot; - -EXPORT_SYMBOL(kmap_prot); -EXPORT_SYMBOL(kmap_pte); - -#define kmap_get_fixmap_pte(vaddr) \ - pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)) - -void __init kmap_init(void) -{ - unsigned long kmap_vstart; - - /* cache the first kmap pte */ - kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); - kmap_pte = kmap_get_fixmap_pte(kmap_vstart); - - kmap_prot = PAGE_KERNEL; + setup_highmem(end_iomem, highmem); +#endif } -#endif /* CONFIG_HIGHMEM */ static void __init fixrange_init(unsigned long start, unsigned long end, pgd_t *pgd_base) @@ -178,76 +135,24 @@ } } -int init_maps(struct mem_region *region) -{ - struct page *p, *map; - int i, n, len; - - if(region == &physmem_region){ - region->mem_map = mem_map; - return(0); - } - else if(region->mem_map != NULL) return(0); - - n = region->len >> PAGE_SHIFT; - len = n * sizeof(struct page); - if(kmalloc_ok){ - map = kmalloc(len, GFP_KERNEL); - if(map == NULL) map = vmalloc(len); - } - else map = alloc_bootmem_low_pages(len); - - if(map == NULL) - return(-ENOMEM); - for(i = 0; i < n; i++){ - p = &map[i]; - set_page_count(p, 0); - SetPageReserved(p); - INIT_LIST_HEAD(&p->list); - } - region->mem_map = map; - return(0); -} +#if CONFIG_HIGHMEM +pte_t *kmap_pte; +pgprot_t kmap_prot; -DECLARE_MUTEX(regions_sem); +#define kmap_get_fixmap_pte(vaddr) \ + pte_offset(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)) -static int setup_one_range(int fd, char *driver, unsigned long start, - unsigned long pfn, int len, - struct mem_region *region) +void __init kmap_init(void) { - int i; - - down(®ions_sem); - for(i = 0; i < NREGIONS; i++){ - if(regions[i] == NULL) break; - } - if(i == NREGIONS){ - printk("setup_range : no free regions\n"); - i = -1; - goto out; - } - - if(fd == -1) - fd = create_mem_file(len); + unsigned long kmap_vstart; - if(region == NULL){ - region = alloc_bootmem_low_pages(sizeof(*region)); - if(region == NULL) - panic("Failed to allocating mem_region"); - } + /* cache the first kmap pte */ + kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); + kmap_pte = kmap_get_fixmap_pte(kmap_vstart); - *region = ((struct mem_region) { .driver = driver, - .start_pfn = pfn, - .start = start, - .len = len, - .fd = fd } ); - regions[i] = region; - out: - up(®ions_sem); - return(i); + kmap_prot = PAGE_KERNEL; } -#ifdef CONFIG_HIGHMEM static void init_highmem(void) { pgd_t *pgd; @@ -268,63 +173,20 @@ kmap_init(); } - -void setup_highmem(unsigned long len) -{ - struct mem_region *region; - struct page *page, *map; - unsigned long phys; - int i, cur, index; - - phys = physmem_size; - do { - cur = min(len, (unsigned long) REGION_SIZE); - i = setup_one_range(-1, NULL, -1, phys >> PAGE_SHIFT, cur, - NULL); - if(i == -1){ - printk("setup_highmem - setup_one_range failed\n"); - return; - } - region = regions[i]; - index = phys / PAGE_SIZE; - region->mem_map = &mem_map[index]; - - map = region->mem_map; - for(i = 0; i < (cur >> PAGE_SHIFT); i++){ - page = &map[i]; - ClearPageReserved(page); - set_bit(PG_highmem, &page->flags); - set_page_count(page, 1); - __free_page(page); - } - phys += cur; - len -= cur; - } while(len > 0); -} -#endif +#endif /* CONFIG_HIGHMEM */ void paging_init(void) { - struct mem_region *region; - unsigned long zones_size[MAX_NR_ZONES], start, end, vaddr; - int i, index; + unsigned long zones_size[MAX_NR_ZONES], vaddr; + int i; empty_zero_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE); empty_bad_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE); for(i=0;i> PAGE_SHIFT) - - (uml_physmem >> PAGE_SHIFT); + zones_size[0] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT); zones_size[2] = highmem >> PAGE_SHIFT; free_area_init(zones_size); - start = phys_region_index(__pa(uml_physmem)); - end = phys_region_index(__pa(high_physmem - 1)); - for(i = start; i <= end; i++){ - region = regions[i]; - index = (region->start - uml_physmem) / PAGE_SIZE; - region->mem_map = &mem_map[index]; - if(i > start) free_bootmem(__pa(region->start), region->len); - } /* * Fixed mappings, only the page table structure has to be @@ -335,15 +197,33 @@ #ifdef CONFIG_HIGHMEM init_highmem(); - setup_highmem(highmem); #endif } -pte_t __bad_page(void) +struct page *arch_validate(struct page *page, int mask, int order) { - clear_page(empty_bad_page); - return pte_mkdirty(mk_pte((struct page *) empty_bad_page, - PAGE_SHARED)); + unsigned long addr, zero = 0; + int i; + + again: + if(page == NULL) return(page); + if(PageHighMem(page)) return(page); + + addr = (unsigned long) page_address(page); + for(i = 0; i < (1 << order); i++){ + current->thread.fault_addr = (void *) addr; + if(__do_copy_to_user((void *) addr, &zero, + sizeof(zero), + ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)){ + if(!(mask & __GFP_WAIT)) return(NULL); + else break; + } + addr += PAGE_SIZE; + } + if(i == (1 << order)) return(page); + page = alloc_pages(mask, order); + goto again; } /* This can't do anything because nothing in the kernel image can be freed @@ -400,395 +280,6 @@ printk("%d pages shared\n", shared); printk("%d pages swap cached\n", cached); } - -static int __init uml_mem_setup(char *line, int *add) -{ - char *retptr; - physmem_size = memparse(line,&retptr); - return 0; -} -__uml_setup("mem=", uml_mem_setup, -"mem=\n" -" This controls how much \"physical\" memory the kernel allocates\n" -" for the system. The size is specified as a number followed by\n" -" one of 'k', 'K', 'm', 'M', which have the obvious meanings.\n" -" This is not related to the amount of memory in the physical\n" -" machine. It can be more, and the excess, if it's ever used, will\n" -" just be swapped out.\n Example: mem=64M\n\n" -); - -struct page *arch_validate(struct page *page, int mask, int order) -{ - unsigned long addr, zero = 0; - int i; - - again: - if(page == NULL) return(page); - if(PageHighMem(page)) return(page); - - addr = (unsigned long) page_address(page); - for(i = 0; i < (1 << order); i++){ - current->thread.fault_addr = (void *) addr; - if(__do_copy_to_user((void *) addr, &zero, - sizeof(zero), - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher)){ - if(!(mask & __GFP_WAIT)) return(NULL); - else break; - } - addr += PAGE_SIZE; - } - if(i == (1 << order)) return(page); - page = alloc_pages(mask, order); - goto again; -} - -DECLARE_MUTEX(vm_reserved_sem); -static struct list_head vm_reserved = LIST_HEAD_INIT(vm_reserved); - -/* Static structures, linked in to the list in early boot */ -static struct vm_reserved head = { - .list = LIST_HEAD_INIT(head.list), - .start = 0, - .end = 0xffffffff -}; - -static struct vm_reserved tail = { - .list = LIST_HEAD_INIT(tail.list), - .start = 0, - .end = 0xffffffff -}; - -void set_usable_vm(unsigned long start, unsigned long end) -{ - list_add(&head.list, &vm_reserved); - list_add(&tail.list, &head.list); - head.end = start; - tail.start = end; -} - -int reserve_vm(unsigned long start, unsigned long end, void *e) - -{ - struct vm_reserved *entry = e, *reserved, *prev; - struct list_head *ele; - int err; - - down(&vm_reserved_sem); - list_for_each(ele, &vm_reserved){ - reserved = list_entry(ele, struct vm_reserved, list); - if(reserved->start >= end) goto found; - } - panic("Reserved vm out of range"); - found: - prev = list_entry(ele->prev, struct vm_reserved, list); - if(prev->end > start) - panic("Can't reserve vm"); - if(entry == NULL) - entry = kmalloc(sizeof(*entry), GFP_KERNEL); - if(entry == NULL){ - printk("reserve_vm : Failed to allocate entry\n"); - err = -ENOMEM; - goto out; - } - *entry = ((struct vm_reserved) - { .list = LIST_HEAD_INIT(entry->list), - .start = start, - .end = end }); - list_add(&entry->list, &prev->list); - err = 0; - out: - up(&vm_reserved_sem); - return(0); -} - -unsigned long get_vm(unsigned long len) -{ - struct vm_reserved *this, *next; - struct list_head *ele; - unsigned long start; - int err; - - down(&vm_reserved_sem); - list_for_each(ele, &vm_reserved){ - this = list_entry(ele, struct vm_reserved, list); - next = list_entry(ele->next, struct vm_reserved, list); - if((this->start < next->start) && - (this->end + len + PAGE_SIZE <= next->start)) - goto found; - } - up(&vm_reserved_sem); - return(0); - found: - up(&vm_reserved_sem); - start = (unsigned long) UML_ROUND_UP(this->end) + PAGE_SIZE; - err = reserve_vm(start, start + len, NULL); - if(err) return(0); - return(start); -} - -int nregions(void) -{ - return(NREGIONS); -} - -void setup_range(int fd, char *driver, unsigned long start, unsigned long pfn, - unsigned long len, int need_vm, struct mem_region *region, - void *reserved) -{ - int i, cur; - - do { - cur = min(len, (unsigned long) REGION_SIZE); - i = setup_one_range(fd, driver, start, pfn, cur, region); - region = regions[i]; - if(need_vm && setup_region(region, reserved)){ - kfree(region); - regions[i] = NULL; - return; - } - start += cur; - if(pfn != -1) pfn += cur; - len -= cur; - } while(len > 0); -} - -struct iomem { - char *name; - int fd; - unsigned long size; -}; - -/* iomem regions can only be added on the command line at the moment. - * Locking will be needed when they can be added via mconsole. - */ - -struct iomem iomem_regions[NREGIONS] = { [ 0 ... NREGIONS - 1 ] = - { .name = NULL, - .fd = -1, - .size = 0 } }; - -int num_iomem_regions = 0; - -void add_iomem(char *name, int fd, unsigned long size) -{ - if(num_iomem_regions == sizeof(iomem_regions)/sizeof(iomem_regions[0])) - return; - size = (size + PAGE_SIZE - 1) & PAGE_MASK; - iomem_regions[num_iomem_regions++] = - ((struct iomem) { .name = name, - .fd = fd, - .size = size } ); -} - -int setup_iomem(void) -{ - struct iomem *iomem; - int i; - - for(i = 0; i < num_iomem_regions; i++){ - iomem = &iomem_regions[i]; - setup_range(iomem->fd, iomem->name, -1, -1, iomem->size, 1, - NULL, NULL); - } - return(0); -} - -__initcall(setup_iomem); - -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) -#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) - -/* Changed during early boot */ -static struct mem_region physmem_region; -static struct vm_reserved physmem_reserved; - -void setup_physmem(unsigned long start, unsigned long reserve_end, - unsigned long len) -{ - struct mem_region *region = &physmem_region; - struct vm_reserved *reserved = &physmem_reserved; - unsigned long cur, pfn = 0; - int do_free = 1, bootmap_size; - - do { - cur = min(len, (unsigned long) REGION_SIZE); - if(region == NULL) - region = alloc_bootmem_low_pages(sizeof(*region)); - if(reserved == NULL) - reserved = alloc_bootmem_low_pages(sizeof(*reserved)); - if((region == NULL) || (reserved == NULL)) - panic("Couldn't allocate physmem region or vm " - "reservation\n"); - setup_range(-1, NULL, start, pfn, cur, 1, region, reserved); - - if(do_free){ - unsigned long reserve = reserve_end - start; - int pfn = PFN_UP(__pa(reserve_end)); - int delta = (len - reserve) >> PAGE_SHIFT; - - bootmap_size = init_bootmem(pfn, pfn + delta); - free_bootmem(__pa(reserve_end) + bootmap_size, - cur - bootmap_size - reserve); - do_free = 0; - } - start += cur; - pfn += cur >> PAGE_SHIFT; - len -= cur; - region = NULL; - reserved = NULL; - } while(len > 0); -} - -struct mem_region *phys_region(unsigned long phys) -{ - unsigned int n = phys_region_index(phys); - - if(regions[n] == NULL) - panic("Physical address in uninitialized region"); - return(regions[n]); -} - -unsigned long phys_offset(unsigned long phys) -{ - return(phys_addr(phys)); -} - -struct page *phys_mem_map(unsigned long phys) -{ - return((struct page *) phys_region(phys)->mem_map); -} - -struct page *pte_mem_map(pte_t pte) -{ - return(phys_mem_map(pte_val(pte))); -} - -struct mem_region *page_region(struct page *page, int *index_out) -{ - int i; - struct mem_region *region; - struct page *map; - - for(i = 0; i < NREGIONS; i++){ - region = regions[i]; - if(region == NULL) continue; - map = region->mem_map; - if((page >= map) && (page < &map[region->len >> PAGE_SHIFT])){ - if(index_out != NULL) *index_out = i; - return(region); - } - } - panic("No region found for page"); - return(NULL); -} - -unsigned long page_to_pfn(struct page *page) -{ - struct mem_region *region = page_region(page, NULL); - - return(region->start_pfn + (page - (struct page *) region->mem_map)); -} - -struct mem_region *pfn_to_region(unsigned long pfn, int *index_out) -{ - struct mem_region *region; - int i; - - for(i = 0; i < NREGIONS; i++){ - region = regions[i]; - if(region == NULL) - continue; - - if((region->start_pfn <= pfn) && - (region->start_pfn + (region->len >> PAGE_SHIFT) > pfn)){ - if(index_out != NULL) - *index_out = i; - return(region); - } - } - return(NULL); -} - -struct page *pfn_to_page(unsigned long pfn) -{ - struct mem_region *region = pfn_to_region(pfn, NULL); - struct page *mem_map = (struct page *) region->mem_map; - - return(&mem_map[pfn - region->start_pfn]); -} - -unsigned long phys_to_pfn(unsigned long p) -{ - struct mem_region *region = regions[phys_region_index(p)]; - - return(region->start_pfn + (phys_addr(p) >> PAGE_SHIFT)); -} - -unsigned long pfn_to_phys(unsigned long pfn) -{ - int n; - struct mem_region *region = pfn_to_region(pfn, &n); - - return(mk_phys((pfn - region->start_pfn) << PAGE_SHIFT, n)); -} - -struct page *page_mem_map(struct page *page) -{ - return((struct page *) page_region(page, NULL)->mem_map); -} - -extern unsigned long region_pa(void *virt) -{ - struct mem_region *region; - unsigned long addr = (unsigned long) virt; - int i; - - for(i = 0; i < NREGIONS; i++){ - region = regions[i]; - if(region == NULL) continue; - if((region->start <= addr) && - (addr <= region->start + region->len)) - return(mk_phys(addr - region->start, i)); - } - panic("region_pa : no region for virtual address"); - return(0); -} - -extern void *region_va(unsigned long phys) -{ - return((void *) (phys_region(phys)->start + phys_addr(phys))); -} - -unsigned long page_to_phys(struct page *page) -{ - int n; - struct mem_region *region = page_region(page, &n); - struct page *map = region->mem_map; - return(mk_phys((page - map) << PAGE_SHIFT, n)); -} - -struct page *phys_to_page(unsigned long phys) -{ - struct page *mem_map; - - mem_map = phys_mem_map(phys); - return(mem_map + (phys_offset(phys) >> PAGE_SHIFT)); -} - -static int setup_mem_maps(void) -{ - struct mem_region *region; - int i; - - for(i = 0; i < NREGIONS; i++){ - region = regions[i]; - if((region != NULL) && (region->fd > 0)) init_maps(region); - } - return(0); -} - -__initcall(setup_mem_maps); /* * Allocate and free page tables. diff -Nru a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c --- a/arch/um/kernel/mem_user.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/mem_user.c 2004-09-06 16:37:53 -07:00 @@ -34,10 +34,9 @@ #include #include #include -#include #include #include -#include +#include #include #include #include "kern_util.h" @@ -47,105 +46,145 @@ #include "init.h" #include "os.h" #include "tempfile.h" +#include "kern_constants.h" extern struct mem_region physmem_region; #define TEMPNAME_TEMPLATE "vm_file-XXXXXX" -int create_mem_file(unsigned long len) +static int create_tmp_file(unsigned long len) { - int fd; + int fd, err; char zero; fd = make_tempfile(TEMPNAME_TEMPLATE, NULL, 1); - if (fchmod(fd, 0777) < 0){ - perror("fchmod"); + if(fd < 0) { + os_print_error(fd, "make_tempfile"); + exit(1); + } + + err = os_mode_fd(fd, 0777); + if(err < 0){ + os_print_error(err, "os_mode_fd"); exit(1); } - if(os_seek_file(fd, len) < 0){ - perror("lseek"); + err = os_seek_file(fd, len); + if(err < 0){ + os_print_error(err, "os_seek_file"); exit(1); } zero = 0; - if(write(fd, &zero, 1) != 1){ - perror("write"); + err = os_write_file(fd, &zero, 1); + if(err != 1){ + os_print_error(err, "os_write_file"); exit(1); } - if(fcntl(fd, F_SETFD, 1) != 0) - perror("Setting FD_CLOEXEC failed"); + return(fd); } -int setup_region(struct mem_region *region, void *entry) +static int have_devanon = 0; + +void check_devanon(void) +{ + int fd; + + printk("Checking for /dev/anon on the host..."); + fd = open("/dev/anon", O_RDWR); + if(fd < 0){ + printk("Not available (open failed with errno %d)\n", errno); + return; + } + + printk("OK\n"); + have_devanon = 1; +} + +static int create_anon_file(unsigned long len) { - void *loc, *start; - char *driver; - int err, offset; - - if(region->start != -1){ - err = reserve_vm(region->start, - region->start + region->len, entry); - if(err){ - printk("setup_region : failed to reserve " - "0x%x - 0x%x for driver '%s'\n", - region->start, - region->start + region->len, - region->driver); - return(-1); - } - } - else region->start = get_vm(region->len); - if(region->start == 0){ - if(region->driver == NULL) driver = "physmem"; - else driver = region->driver; - printk("setup_region : failed to find vm for " - "driver '%s' (length %d)\n", driver, region->len); - return(-1); - } - if(region->start == uml_physmem){ - start = (void *) uml_reserved; - offset = uml_reserved - uml_physmem; - } - else { - start = (void *) region->start; - offset = 0; - } - - loc = mmap(start, region->len - offset, PROT_READ | PROT_WRITE, - MAP_SHARED | MAP_FIXED, region->fd, offset); - if(loc != start){ - perror("Mapping memory"); + void *addr; + int fd; + + fd = open("/dev/anon", O_RDWR); + if(fd < 0) { + os_print_error(fd, "opening /dev/anon"); exit(1); } - return(0); + + addr = mmap(NULL, len, PROT_READ | PROT_WRITE , MAP_PRIVATE, fd, 0); + if(addr == MAP_FAILED){ + os_print_error((int) addr, "mapping physmem file"); + exit(1); + } + munmap(addr, len); + + return(fd); +} + +int create_mem_file(unsigned long len) +{ + int err, fd; + + if(have_devanon) + fd = create_anon_file(len); + else fd = create_tmp_file(len); + + err = os_set_exec_close(fd, 1); + if(err < 0) + os_print_error(err, "exec_close"); + return(fd); } +struct iomem_region *iomem_regions = NULL; +int iomem_size = 0; + static int __init parse_iomem(char *str, int *add) { - struct stat buf; + struct iomem_region *new; + struct uml_stat buf; char *file, *driver; - int fd; + int fd, err; driver = str; file = strchr(str,','); if(file == NULL){ - printk("parse_iomem : failed to parse iomem\n"); - return(1); + printf("parse_iomem : failed to parse iomem\n"); + goto out; } *file = '\0'; file++; fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0); if(fd < 0){ - printk("parse_iomem - Couldn't open io file, errno = %d\n", - errno); - return(1); - } - if(fstat(fd, &buf) < 0) { - printk("parse_iomem - cannot fstat file, errno = %d\n", errno); - return(1); + os_print_error(fd, "parse_iomem - Couldn't open io file"); + goto out; } - add_iomem(driver, fd, buf.st_size); + + err = os_stat_fd(fd, &buf); + if(err < 0){ + os_print_error(err, "parse_iomem - cannot stat_fd file"); + goto out_close; + } + + new = malloc(sizeof(*new)); + if(new == NULL){ + perror("Couldn't allocate iomem_region struct"); + goto out_close; + } + + *new = ((struct iomem_region) { .next = iomem_regions, + .driver = driver, + .fd = fd, + .size = buf.ust_size, + .phys = 0, + .virt = 0 }); + iomem_regions = new; + iomem_size += new->size + UM_KERN_PAGE_SIZE; + return(0); + out_close: + os_close_file(fd); + out: + return(1); } __uml_setup("iomem=", parse_iomem, @@ -153,71 +192,18 @@ " Configure as an IO memory region named .\n\n" ); -#ifdef notdef -int logging = 0; -int logging_fd = -1; - -int logging_line = 0; -char logging_buf[256]; - -void log(char *fmt, ...) -{ - va_list ap; - struct timeval tv; - struct openflags flags; - - if(logging == 0) return; - if(logging_fd < 0){ - flags = of_create(of_trunc(of_rdrw(OPENFLAGS()))); - logging_fd = os_open_file("log", flags, 0644); - } - gettimeofday(&tv, NULL); - sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec, - tv.tv_usec); - va_start(ap, fmt); - vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap); - va_end(ap); - write(logging_fd, logging_buf, strlen(logging_buf)); -} -#endif - -int map_memory(unsigned long virt, unsigned long phys, unsigned long len, - int r, int w, int x) -{ - struct mem_region *region = phys_region(phys); - - return(os_map_memory((void *) virt, region->fd, phys_offset(phys), len, - r, w, x)); -} - int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, int must_succeed) { - if(os_protect_memory((void *) addr, len, r, w, x) < 0){ + int err; + + err = os_protect_memory((void *) addr, len, r, w, x); + if(err < 0){ if(must_succeed) - panic("protect failed, errno = %d", errno); - else return(-errno); + panic("protect failed, err = %d", -err); + else return(err); } return(0); -} - -unsigned long find_iomem(char *driver, unsigned long *len_out) -{ - struct mem_region *region; - int i, n; - - n = nregions(); - for(i = 0; i < n; i++){ - region = regions[i]; - if(region == NULL) continue; - if((region->driver != NULL) && - !strcmp(region->driver, driver)){ - *len_out = region->len; - return(region->start); - } - } - *len_out = 0; - return 0; } /* diff -Nru a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/physmem.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,468 @@ +/* + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#include "linux/mm.h" +#include "linux/ghash.h" +#include "linux/slab.h" +#include "linux/vmalloc.h" +#include "linux/bootmem.h" +#include "asm/types.h" +#include "asm/pgtable.h" +#include "kern_util.h" +#include "user_util.h" +#include "mode_kern.h" +#include "mem.h" +#include "mem_user.h" +#include "os.h" +#include "kern.h" +#include "init.h" + +#if 0 +static pgd_t physmem_pgd[PTRS_PER_PGD]; + +static struct phys_desc *lookup_mapping(void *addr) +{ + pgd = &physmem_pgd[pgd_index(addr)]; + if(pgd_none(pgd)) + return(NULL); + + pmd = pmd_offset(pgd, addr); + if(pmd_none(pmd)) + return(NULL); + + pte = pte_offset_kernel(pmd, addr); + return((struct phys_desc *) pte_val(pte)); +} + +static struct add_mapping(void *addr, struct phys_desc *new) +{ +} +#endif + +#define PHYS_HASHSIZE (8192) + +struct phys_desc; + +DEF_HASH_STRUCTS(virtmem, PHYS_HASHSIZE, struct phys_desc); + +struct phys_desc { + struct virtmem_ptrs virt_ptrs; + int fd; + __u64 offset; + void *virt; + unsigned long phys; + struct list_head list; +}; + +struct virtmem_table virtmem_hash; + +static int virt_cmp(void *virt1, void *virt2) +{ + return(virt1 != virt2); +} + +static int virt_hash(void *virt) +{ + unsigned long addr = ((unsigned long) virt) >> PAGE_SHIFT; + return(addr % PHYS_HASHSIZE); +} + +DEF_HASH(static, virtmem, struct phys_desc, virt_ptrs, void *, virt, virt_cmp, + virt_hash); + +LIST_HEAD(descriptor_mappings); + +struct desc_mapping { + int fd; + struct list_head list; + struct list_head pages; +}; + +static struct desc_mapping *find_mapping(int fd) +{ + struct desc_mapping *desc; + struct list_head *ele; + + list_for_each(ele, &descriptor_mappings){ + desc = list_entry(ele, struct desc_mapping, list); + if(desc->fd == fd) + return(desc); + } + + return(NULL); +} + +static struct desc_mapping *descriptor_mapping(int fd) +{ + struct desc_mapping *desc; + + desc = find_mapping(fd); + if(desc != NULL) + return(desc); + + desc = kmalloc(sizeof(*desc), GFP_ATOMIC); + if(desc == NULL) + return(NULL); + + *desc = ((struct desc_mapping) + { .fd = fd, + .list = LIST_HEAD_INIT(desc->list), + .pages = LIST_HEAD_INIT(desc->pages) }); + list_add(&desc->list, &descriptor_mappings); + + return(desc); +} + +int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) +{ + struct desc_mapping *fd_maps; + struct phys_desc *desc; + unsigned long phys; + int err; + + fd_maps = descriptor_mapping(fd); + if(fd_maps == NULL) + return(-ENOMEM); + + phys = __pa(virt); + if(find_virtmem_hash(&virtmem_hash, virt) != NULL) + panic("Address 0x%p is already substituted\n", virt); + + err = -ENOMEM; + desc = kmalloc(sizeof(*desc), GFP_ATOMIC); + if(desc == NULL) + goto out; + + *desc = ((struct phys_desc) + { .virt_ptrs = { NULL, NULL }, + .fd = fd, + .offset = offset, + .virt = virt, + .phys = __pa(virt), + .list = LIST_HEAD_INIT(desc->list) }); + insert_virtmem_hash(&virtmem_hash, desc); + + list_add(&desc->list, &fd_maps->pages); + + virt = (void *) ((unsigned long) virt & PAGE_MASK); + err = os_map_memory(virt, fd, offset, PAGE_SIZE, 1, w, 0); + if(!err) + goto out; + + remove_virtmem_hash(&virtmem_hash, desc); + kfree(desc); + out: + return(err); +} + +static int physmem_fd = -1; + +static void remove_mapping(struct phys_desc *desc) +{ + void *virt = desc->virt; + int err; + + remove_virtmem_hash(&virtmem_hash, desc); + list_del(&desc->list); + kfree(desc); + + err = os_map_memory(virt, physmem_fd, __pa(virt), PAGE_SIZE, 1, 1, 0); + if(err) + panic("Failed to unmap block device page from physical memory, " + "errno = %d", -err); +} + +int physmem_remove_mapping(void *virt) +{ + struct phys_desc *desc; + + virt = (void *) ((unsigned long) virt & PAGE_MASK); + desc = find_virtmem_hash(&virtmem_hash, virt); + if(desc == NULL) + return(0); + + remove_mapping(desc); + return(1); +} + +void physmem_forget_descriptor(int fd) +{ + struct desc_mapping *desc; + struct phys_desc *page; + struct list_head *ele, *next; + __u64 offset; + void *addr; + int err; + + desc = find_mapping(fd); + if(desc == NULL) + return; + + list_for_each_safe(ele, next, &desc->pages){ + page = list_entry(ele, struct phys_desc, list); + offset = page->offset; + addr = page->virt; + remove_mapping(page); + err = os_seek_file(fd, offset); + if(err) + panic("physmem_forget_descriptor - failed to seek " + "to %lld in fd %d, error = %d\n", + offset, fd, -err); + err = os_read_file(fd, addr, PAGE_SIZE); + if(err < 0) + panic("physmem_forget_descriptor - failed to read " + "from fd %d to 0x%p, error = %d\n", + fd, addr, -err); + } + + list_del(&desc->list); + kfree(desc); +} + +void arch_free_page(struct page *page, int order) +{ + void *virt; + int i; + + for(i = 0; i < (1 << order); i++){ + virt = __va(page_to_phys(page + i)); + physmem_remove_mapping(virt); + } +} + +int is_remapped(void *virt) +{ + return(find_virtmem_hash(&virtmem_hash, virt) != NULL); +} + +/* Changed during early boot */ +unsigned long high_physmem; + +extern unsigned long physmem_size; + +void *to_virt(unsigned long phys) +{ + return((void *) uml_physmem + phys); +} + +unsigned long to_phys(void *virt) +{ + return(((unsigned long) virt) - uml_physmem); +} + +int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) +{ + struct page *p, *map; + unsigned long phys_len, phys_pages, highmem_len, highmem_pages; + unsigned long iomem_len, iomem_pages, total_len, total_pages; + int i; + + phys_pages = physmem >> PAGE_SHIFT; + phys_len = phys_pages * sizeof(struct page); + + iomem_pages = iomem >> PAGE_SHIFT; + iomem_len = iomem_pages * sizeof(struct page); + + highmem_pages = highmem >> PAGE_SHIFT; + highmem_len = highmem_pages * sizeof(struct page); + + total_pages = phys_pages + iomem_pages + highmem_pages; + total_len = phys_len + iomem_pages + highmem_len; + + if(kmalloc_ok){ + map = kmalloc(total_len, GFP_KERNEL); + if(map == NULL) + map = vmalloc(total_len); + } + else map = alloc_bootmem_low_pages(total_len); + + if(map == NULL) + return(-ENOMEM); + + for(i = 0; i < total_pages; i++){ + p = &map[i]; + set_page_count(p, 0); + SetPageReserved(p); + INIT_LIST_HEAD(&p->lru); + } + + mem_map = map; + max_mapnr = total_pages; + return(0); +} + +struct page *phys_to_page(const unsigned long phys) +{ + return(&mem_map[phys >> PAGE_SHIFT]); +} + +struct page *__virt_to_page(const unsigned long virt) +{ + return(&mem_map[__pa(virt) >> PAGE_SHIFT]); +} + +unsigned long page_to_phys(struct page *page) +{ + return((page - mem_map) << PAGE_SHIFT); +} + +pte_t mk_pte(struct page *page, pgprot_t pgprot) +{ + pte_t pte; + + pte_val(pte) = page_to_phys(page) + pgprot_val(pgprot); + if(pte_present(pte)) pte_mknewprot(pte_mknewpage(pte)); + return(pte); +} + +/* Changed during early boot */ +static unsigned long kmem_top = 0; + +unsigned long get_kmem_end(void) +{ + if(kmem_top == 0) + kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas); + return(kmem_top); +} + +void map_memory(unsigned long virt, unsigned long phys, unsigned long len, + int r, int w, int x) +{ + __u64 offset; + int fd, err; + + fd = phys_mapping(phys, &offset); + err = os_map_memory((void *) virt, fd, offset, len, r, w, x); + if(err) + panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, " + "err = %d\n", virt, fd, offset, len, r, w, x, err); +} + +#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) + +void setup_physmem(unsigned long start, unsigned long reserve_end, + unsigned long len, unsigned long highmem) +{ + unsigned long reserve = reserve_end - start; + int pfn = PFN_UP(__pa(reserve_end)); + int delta = (len - reserve) >> PAGE_SHIFT; + int err, offset, bootmap_size; + + physmem_fd = create_mem_file(len + highmem); + + offset = uml_reserved - uml_physmem; + err = os_map_memory((void *) uml_reserved, physmem_fd, offset, + len - offset, 1, 1, 0); + if(err < 0){ + os_print_error(err, "Mapping memory"); + exit(1); + } + + bootmap_size = init_bootmem(pfn, pfn + delta); + free_bootmem(__pa(reserve_end) + bootmap_size, + len - bootmap_size - reserve); +} + +int phys_mapping(unsigned long phys, __u64 *offset_out) +{ + struct phys_desc *desc = find_virtmem_hash(&virtmem_hash, + __va(phys & PAGE_MASK)); + int fd = -1; + + if(desc != NULL){ + fd = desc->fd; + *offset_out = desc->offset; + } + else if(phys < physmem_size){ + fd = physmem_fd; + *offset_out = phys; + } + else if(phys < __pa(end_iomem)){ + struct iomem_region *region = iomem_regions; + + while(region != NULL){ + if((phys >= region->phys) && + (phys < region->phys + region->size)){ + fd = region->fd; + *offset_out = phys - region->phys; + break; + } + region = region->next; + } + } + else if(phys < __pa(end_iomem) + highmem){ + fd = physmem_fd; + *offset_out = phys - iomem_size; + } + + return(fd); +} + +static int __init uml_mem_setup(char *line, int *add) +{ + char *retptr; + physmem_size = memparse(line,&retptr); + return 0; +} +__uml_setup("mem=", uml_mem_setup, +"mem=\n" +" This controls how much \"physical\" memory the kernel allocates\n" +" for the system. The size is specified as a number followed by\n" +" one of 'k', 'K', 'm', 'M', which have the obvious meanings.\n" +" This is not related to the amount of memory in the host. It can\n" +" be more, and the excess, if it's ever used, will just be swapped out.\n" +" Example: mem=64M\n\n" +); + +unsigned long find_iomem(char *driver, unsigned long *len_out) +{ + struct iomem_region *region = iomem_regions; + + while(region != NULL){ + if(!strcmp(region->driver, driver)){ + *len_out = region->size; + return(region->virt); + } + } + + return(0); +} + +int setup_iomem(void) +{ + struct iomem_region *region = iomem_regions; + unsigned long iomem_start = high_physmem + PAGE_SIZE; + int err; + + while(region != NULL){ + err = os_map_memory((void *) iomem_start, region->fd, 0, + region->size, 1, 1, 0); + if(err) + printk("Mapping iomem region for driver '%s' failed, " + "errno = %d\n", region->driver, -err); + else { + region->virt = iomem_start; + region->phys = __pa(region->virt); + } + + iomem_start += region->size + PAGE_SIZE; + region = region->next; + } + + return(0); +} + +__initcall(setup_iomem); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/process.c b/arch/um/kernel/process.c --- a/arch/um/kernel/process.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/process.c 2004-09-06 16:37:54 -07:00 @@ -9,18 +9,17 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include #include #include #include +#include #include "user_util.h" #include "kern_util.h" #include "user.h" @@ -58,7 +57,11 @@ { int flags = altstack ? SA_ONSTACK : 0; - set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, + /* NODEFER is set here because SEGV isn't turned back on when the + * handler is ready to receive signals. This causes any segfault + * during a copy_user to kill the process because the fault is blocked. + */ + set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags | SA_NODEFER, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); @@ -72,7 +75,6 @@ SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); set_handler(SIGUSR2, (__sighandler_t) sig_handler, SA_NOMASK | flags, -1); - (void) CHOOSE_MODE(signal(SIGCHLD, SIG_IGN), (void *) 0); signal(SIGHUP, SIG_IGN); init_irq_signals(altstack); @@ -122,12 +124,17 @@ /* Start the process and wait for it to kill itself */ new_pid = clone(outer_tramp, (void *) sp, clone_flags, &arg); - if(new_pid < 0) return(-errno); - while((err = waitpid(new_pid, &status, 0) < 0) && (errno == EINTR)) ; - if(err < 0) panic("Waiting for outer trampoline failed - errno = %d", - errno); + if(new_pid < 0) + return(new_pid); + + CATCH_EINTR(err = waitpid(new_pid, &status, 0)); + if(err < 0) + panic("Waiting for outer trampoline failed - errno = %d", + errno); + if(!WIFSIGNALED(status) || (WTERMSIG(status) != SIGKILL)) - panic("outer trampoline didn't exit with SIGKILL"); + panic("outer trampoline didn't exit with SIGKILL, " + "status = %d", status); return(arg.pid); } @@ -138,7 +145,7 @@ os_stop_process(os_getpid()); - if(read(fd, &c, sizeof(c)) != sizeof(c)) + if(os_read_file(fd, &c, sizeof(c)) != sizeof(c)) panic("read failed in suspend_new_thread"); } @@ -168,7 +175,7 @@ pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); if(pid < 0) panic("check_ptrace : clone failed, errno = %d", errno); - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0) panic("check_ptrace : wait failed, errno = %d", errno); if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) @@ -185,7 +192,7 @@ if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) panic("check_ptrace : ptrace failed, errno = %d", errno); - n = waitpid(pid, &status, 0); + CATCH_EINTR(n = waitpid(pid, &status, 0)); if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) panic("check_ptrace : child exited with status 0x%x", status); @@ -193,6 +200,66 @@ panic("check_ptrace : munmap failed, errno = %d", errno); } +static int force_sysemu_disabled = 0; + +static int __init nosysemu_cmd_param(char *str, int* add) +{ + force_sysemu_disabled = 1; + return 0; +} + +__uml_setup("nosysemu", nosysemu_cmd_param, + "nosysemu\n" + " Turns off syscall emulation patch for ptrace (SYSEMU) on.\n" + " SYSEMU is a performance-patch introduced by Laurent Vivier. It changes\n" + " behaviour of ptrace() and helps reducing host context switch rate.\n" + " To make it working, you need a kernel patch for your host, too.\n" + " See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n"); + +static void __init check_sysemu(void) +{ + void *stack; + int pid, n, status; + + if (mode_tt) + return; + + printk("Checking syscall emulation patch for ptrace..."); + sysemu_supported = 0; + pid = start_ptraced_child(&stack); + if(ptrace(PTRACE_SYSEMU, pid, 0, 0) >= 0) { + struct user_regs_struct regs; + + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); + if (n < 0) + panic("check_ptrace : wait failed, errno = %d", errno); + if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) + panic("check_ptrace : expected SIGTRAP, " + "got status = %d", status); + + if (ptrace(PTRACE_GETREGS, pid, 0, ®s) < 0) + panic("check_ptrace : failed to read child " + "registers, errno = %d", errno); + regs.orig_eax = pid; + if (ptrace(PTRACE_SETREGS, pid, 0, ®s) < 0) + panic("check_ptrace : failed to modify child " + "registers, errno = %d", errno); + + stop_ptraced_child(pid, stack, 0); + + sysemu_supported = 1; + printk("found\n"); + } + else + { + stop_ptraced_child(pid, stack, 1); + sysemu_supported = 0; + printk("missing\n"); + } + + set_using_sysemu(!force_sysemu_disabled); +} + void __init check_ptrace(void) { void *stack; @@ -205,7 +272,7 @@ if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) panic("check_ptrace : ptrace failed, errno = %d", errno); - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0) panic("check_ptrace : wait failed, errno = %d", errno); if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) @@ -225,6 +292,7 @@ } stop_ptraced_child(pid, stack, 0); printk("OK\n"); + check_sysemu(); } int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) @@ -233,7 +301,7 @@ int n; *jmp_ptr = &buf; - n = setjmp(buf); + n = sigsetjmp(buf, 1); if(n != 0) return(n); (*fn)(arg); @@ -273,7 +341,7 @@ stop_ptraced_child(pid, stack, 1); printf("Checking for /proc/mm..."); - if(access("/proc/mm", W_OK)){ + if(os_access("/proc/mm", OS_ACC_W_OK) < 0){ printf("not found\n"); ret = 0; } diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c --- a/arch/um/kernel/process_kern.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/process_kern.c 2004-09-06 16:37:53 -07:00 @@ -16,6 +16,8 @@ #include "linux/module.h" #include "linux/init.h" #include "linux/capability.h" +#include "linux/vmalloc.h" +#include "linux/spinlock.h" #include "asm/unistd.h" #include "asm/mman.h" #include "asm/segment.h" @@ -23,7 +25,6 @@ #include "asm/pgtable.h" #include "asm/processor.h" #include "asm/tlbflush.h" -#include "asm/spinlock.h" #include "asm/uaccess.h" #include "asm/user.h" #include "user_util.h" @@ -52,17 +53,12 @@ struct task_struct *get_task(int pid, int require) { - struct task_struct *task, *ret; + struct task_struct *ret; - ret = NULL; read_lock(&tasklist_lock); - for_each_process(task){ - if(task->pid == pid){ - ret = task; - break; - } - } + ret = find_task_by_pid(pid); read_unlock(&tasklist_lock); + if(require && (ret == NULL)) panic("get_task couldn't find a task\n"); return(ret); } @@ -95,7 +91,8 @@ int flags = GFP_KERNEL; if(atomic) flags |= GFP_ATOMIC; - if((page = __get_free_pages(flags, order)) == 0) + page = __get_free_pages(flags, order); + if(page == 0) return(0); stack_protections(page); return(page); @@ -103,22 +100,25 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { - struct task_struct *p; + int pid; current->thread.request.u.thread.proc = fn; current->thread.request.u.thread.arg = arg; - p = do_fork(CLONE_VM | flags, 0, NULL, 0, NULL, NULL); - if(IS_ERR(p)) panic("do_fork failed in kernel_thread"); - return(p->pid); + pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0, NULL, 0, NULL, + NULL); + if(pid < 0) + panic("do_fork failed in kernel_thread, errno = %d", pid); + return(pid); } void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { - unsigned cpu = smp_processor_id(); + int cpu = smp_processor_id(); + if (prev != next) - clear_bit(cpu, &prev->cpu_vm_mask); - set_bit(cpu, &next->cpu_vm_mask); + cpu_clear(cpu, prev->cpu_vm_mask); + cpu_set(cpu, next->cpu_vm_mask); } void set_current(void *t) @@ -129,7 +129,7 @@ { external_pid(task), task }); } -void *switch_to(void *prev, void *next, void *last) +void *_switch_to(void *prev, void *next, void *last) { return(CHOOSE_MODE(switch_to_tt(prev, next), switch_to_skas(prev, next))); @@ -149,7 +149,7 @@ void exit_thread(void) { CHOOSE_MODE(exit_thread_tt(), exit_thread_skas()); - unprotect_stack((unsigned long) current->thread_info); + unprotect_stack((unsigned long) current_thread); } void *get_current(void) @@ -157,6 +157,10 @@ return(current); } +void prepare_to_copy(struct task_struct *tsk) +{ +} + int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, unsigned long stack_top, struct task_struct * p, struct pt_regs *regs) @@ -190,7 +194,7 @@ void default_idle(void) { - idle_timer(); + uml_idle_timer(); atomic_inc(&init_mm.mm_count); current->mm = &init_mm; @@ -299,6 +303,11 @@ return(kmalloc(size, GFP_ATOMIC)); } +void *um_vmalloc(int size) +{ + return(vmalloc(size)); +} + unsigned long get_fault_addr(void) { return((unsigned long) current->thread.fault_addr); @@ -367,10 +376,15 @@ return(clear_user(buf, size)); } +int strlen_user_proc(char *str) +{ + return(strlen_user(str)); +} + int smp_sigio_handler(void) { #ifdef CONFIG_SMP - int cpu = current->thread_info->cpu; + int cpu = current_thread->cpu; IPI_handler(cpu); if(cpu != 0) return(1); @@ -385,7 +399,7 @@ int cpu(void) { - return(current->thread_info->cpu); + return(current_thread->cpu); } /* diff -Nru a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c --- a/arch/um/kernel/ptrace.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/ptrace.c 2004-09-06 16:37:55 -07:00 @@ -24,11 +24,6 @@ { } -extern long do_mmap2(struct task_struct *task, unsigned long addr, - unsigned long len, unsigned long prot, - unsigned long flags, unsigned long fd, - unsigned long pgoff); - int sys_ptrace(long request, long pid, long addr, long data) { struct task_struct *child; @@ -302,8 +297,17 @@ return ret; } -void syscall_trace(void) +void syscall_trace(union uml_pt_regs *regs, int entryexit) { + if (unlikely(current->audit_context)) { + if (!entryexit) + audit_syscall_entry(current, regs->orig_eax, + regs->ebx, regs->ecx, + regs->edx, regs->esi); + else + audit_syscall_exit(current, regs->eax); + } + if (!test_thread_flag(TIF_SYSCALL_TRACE)) return; if (!(current->ptrace & PT_PTRACED)) @@ -311,11 +315,8 @@ /* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ - current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0); - current->state = TASK_STOPPED; - notify_parent(current, SIGCHLD); - schedule(); + ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) + ? 0x80 : 0)); /* * this isn't the same as continuing with a signal, but it will do diff -Nru a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c --- a/arch/um/kernel/reboot.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/reboot.c 2004-09-06 16:37:53 -07:00 @@ -15,6 +15,7 @@ #ifdef CONFIG_SMP static void kill_idlers(int me) { +#ifdef CONFIG_MODE_TT struct task_struct *p; int i; @@ -23,6 +24,7 @@ if((p != NULL) && (p->thread.mode.tt.extern_pid != me)) os_kill_process(p->thread.mode.tt.extern_pid, 0); } +#endif } #endif diff -Nru a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c --- a/arch/um/kernel/sigio_kern.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/sigio_kern.c 2004-09-06 16:37:51 -07:00 @@ -6,18 +6,21 @@ #include "linux/kernel.h" #include "linux/list.h" #include "linux/slab.h" -#include "asm/irq.h" +#include "linux/signal.h" +#include "linux/interrupt.h" #include "init.h" #include "sigio.h" #include "irq_user.h" +#include "irq_kern.h" /* Protected by sigio_lock() called from write_sigio_workaround */ static int sigio_irq_fd = -1; -void sigio_interrupt(int irq, void *data, struct pt_regs *unused) +irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused) { read_sigio_fd(sigio_irq_fd); reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); + return(IRQ_HANDLED); } int write_sigio_irq(int fd) diff -Nru a/arch/um/kernel/sigio_user.c b/arch/um/kernel/sigio_user.c --- a/arch/um/kernel/sigio_user.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/sigio_user.c 2004-09-06 16:37:55 -07:00 @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include "init.h" #include "user.h" #include "kern_util.h" +#include "user_util.h" #include "sigio.h" #include "helper.h" #include "os.h" @@ -26,7 +26,7 @@ int pty_close_sigio = 0; /* Used as a flag during SIGIO testing early in boot */ -static int got_sigio = 0; +static volatile int got_sigio = 0; void __init handler(int sig) { @@ -45,19 +45,18 @@ info->err = 0; if(openpty(&info->master, &info->slave, NULL, NULL, NULL)) - info->err = errno; + info->err = -errno; } void __init check_one_sigio(void (*proc)(int, int)) { struct sigaction old, new; - struct termios tt; struct openpty_arg pty = { .master = -1, .slave = -1 }; - int master, slave, flags; + int master, slave, err; initial_thread_cb(openpty_cb, &pty); if(pty.err){ - printk("openpty failed, errno = %d\n", pty.err); + printk("openpty failed, errno = %d\n", -pty.err); return; } @@ -69,23 +68,13 @@ return; } - if(tcgetattr(master, &tt) < 0) - panic("check_sigio : tcgetattr failed, errno = %d\n", errno); - cfmakeraw(&tt); - if(tcsetattr(master, TCSADRAIN, &tt) < 0) - panic("check_sigio : tcsetattr failed, errno = %d\n", errno); - - if((flags = fcntl(master, F_GETFL)) < 0) - panic("tty_fds : fcntl F_GETFL failed, errno = %d\n", errno); - - if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || - (fcntl(master, F_SETOWN, os_getpid()) < 0)) - panic("check_sigio : fcntl F_SETFL or F_SETOWN failed, " - "errno = %d\n", errno); - - if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) - panic("check_sigio : fcntl F_SETFL failed, errno = %d\n", - errno); + err = __raw(master, 1, 0); //Not now, but complain so we now where we failed. + if (err < 0) + panic("check_sigio : __raw failed, errno = %d\n", -err); + + err = os_sigio_async(master, slave); + if(err < 0) + panic("tty_fds : sigio_async failed, err = %d\n", -err); if(sigaction(SIGIO, NULL, &old) < 0) panic("check_sigio : sigaction 1 failed, errno = %d\n", errno); @@ -97,8 +86,8 @@ got_sigio = 0; (*proc)(master, slave); - close(master); - close(slave); + os_close_file(master); + os_close_file(slave); if(sigaction(SIGIO, &old, NULL) < 0) panic("check_sigio : sigaction 3 failed, errno = %d\n", errno); @@ -112,25 +101,25 @@ printk("Checking that host ptys support output SIGIO..."); memset(buf, 0, sizeof(buf)); - while(write(master, buf, sizeof(buf)) > 0) ; + + while(os_write_file(master, buf, sizeof(buf)) > 0) ; if(errno != EAGAIN) panic("check_sigio : write failed, errno = %d\n", errno); - - while(((n = read(slave, buf, sizeof(buf))) > 0) && !got_sigio) ; + while(((n = os_read_file(slave, buf, sizeof(buf))) > 0) && !got_sigio) ; if(got_sigio){ printk("Yes\n"); pty_output_sigio = 1; } - else if(errno == EAGAIN) printk("No, enabling workaround\n"); - else panic("check_sigio : read failed, errno = %d\n", errno); + else if(n == -EAGAIN) printk("No, enabling workaround\n"); + else panic("check_sigio : read failed, err = %d\n", n); } static void tty_close(int master, int slave) { printk("Checking that host ptys support SIGIO on close..."); - close(slave); + os_close_file(slave); if(got_sigio){ printk("Yes\n"); pty_close_sigio = 1; @@ -140,7 +129,8 @@ void __init check_sigio(void) { - if(access("/dev/ptmx", R_OK) && access("/dev/ptyp0", R_OK)){ + if((os_access("/dev/ptmx", OS_ACC_R_OK) < 0) && + (os_access("/dev/ptyp0", OS_ACC_R_OK) < 0)){ printk("No pseudo-terminals available - skipping pty SIGIO " "check\n"); return; @@ -201,11 +191,10 @@ p = &fds->poll[i]; if(p->revents == 0) continue; if(p->fd == sigio_private[1]){ - n = read(sigio_private[1], &c, sizeof(c)); + n = os_read_file(sigio_private[1], &c, sizeof(c)); if(n != sizeof(c)) printk("write_sigio_thread : " - "read failed, errno = %d\n", - errno); + "read failed, err = %d\n", -n); tmp = current_poll; current_poll = next_poll; next_poll = tmp; @@ -218,10 +207,10 @@ (fds->used - i) * sizeof(*fds->poll)); } - n = write(respond_fd, &c, sizeof(c)); + n = os_write_file(respond_fd, &c, sizeof(c)); if(n != sizeof(c)) printk("write_sigio_thread : write failed, " - "errno = %d\n", errno); + "err = %d\n", -n); } } } @@ -252,15 +241,15 @@ char c; flags = set_signals(0); - n = write(sigio_private[0], &c, sizeof(c)); + n = os_write_file(sigio_private[0], &c, sizeof(c)); if(n != sizeof(c)){ - printk("update_thread : write failed, errno = %d\n", errno); + printk("update_thread : write failed, err = %d\n", -n); goto fail; } - n = read(sigio_private[0], &c, sizeof(c)); + n = os_read_file(sigio_private[0], &c, sizeof(c)); if(n != sizeof(c)){ - printk("update_thread : read failed, errno = %d\n", errno); + printk("update_thread : read failed, err = %d\n", -n); goto fail; } @@ -271,10 +260,10 @@ if(write_sigio_pid != -1) os_kill_process(write_sigio_pid, 1); write_sigio_pid = -1; - close(sigio_private[0]); - close(sigio_private[1]); - close(write_sigio_fds[0]); - close(write_sigio_fds[1]); + os_close_file(sigio_private[0]); + os_close_file(sigio_private[1]); + os_close_file(write_sigio_fds[0]); + os_close_file(write_sigio_fds[1]); sigio_unlock(); set_signals(flags); } @@ -369,15 +358,15 @@ goto out; err = os_pipe(write_sigio_fds, 1, 1); - if(err){ + if(err < 0){ printk("write_sigio_workaround - os_pipe 1 failed, " - "errno = %d\n", -err); + "err = %d\n", -err); goto out; } err = os_pipe(sigio_private, 1, 1); - if(err){ + if(err < 0){ printk("write_sigio_workaround - os_pipe 2 failed, " - "errno = %d\n", -err); + "err = %d\n", -err); goto out_close1; } if(setup_initial_poll(sigio_private[1])) @@ -399,11 +388,11 @@ os_kill_process(write_sigio_pid, 1); write_sigio_pid = -1; out_close2: - close(sigio_private[0]); - close(sigio_private[1]); + os_close_file(sigio_private[0]); + os_close_file(sigio_private[1]); out_close1: - close(write_sigio_fds[0]); - close(write_sigio_fds[1]); + os_close_file(write_sigio_fds[0]); + os_close_file(write_sigio_fds[1]); sigio_unlock(); } @@ -412,10 +401,16 @@ int n; char c; - n = read(fd, &c, sizeof(c)); + n = os_read_file(fd, &c, sizeof(c)); if(n != sizeof(c)){ - printk("read_sigio_fd - read failed, errno = %d\n", errno); - return(-errno); + if(n < 0) { + printk("read_sigio_fd - read failed, err = %d\n", -n); + return(n); + } + else { + printk("read_sigio_fd - short read, bytes = %d\n", n); + return(-EIO); + } } return(n); } diff -Nru a/arch/um/kernel/signal_kern.c b/arch/um/kernel/signal_kern.c --- a/arch/um/kernel/signal_kern.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/signal_kern.c 2004-09-06 16:37:53 -07:00 @@ -31,17 +31,6 @@ EXPORT_SYMBOL(block_signals); EXPORT_SYMBOL(unblock_signals); -static void force_segv(int sig) -{ - if(sig == SIGSEGV){ - struct k_sigaction *ka; - - ka = ¤t->sig->action[SIGSEGV - 1]; - ka->sa.sa_handler = SIG_DFL; - } - force_sig(SIGSEGV, current); -} - #define _S(nr) (1<<((nr)-1)) #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP))) @@ -60,10 +49,10 @@ int err, ret; ret = 0; + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; switch(error){ case -ERESTART_RESTARTBLOCK: - current_thread_info()->restart_block.fn = - do_no_restart_syscall; case -ERESTARTNOHAND: ret = -EINTR; break; @@ -124,27 +113,27 @@ return(0); segv: - force_segv(signr); + force_sigsegv(signr, current); return(1); } static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error) { + struct k_sigaction ka_copy; siginfo_t info; - struct k_sigaction *ka; int err, sig; if (!oldset) oldset = ¤t->blocked; - sig = get_signal_to_deliver(&info, regs, NULL); + sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL); if(sig == 0) return(0); /* Whee! Actually deliver the signal. */ - ka = ¤t->sig->action[sig -1 ]; - err = handle_signal(regs, sig, ka, &info, oldset, error); - if(!err) return(1); + err = handle_signal(regs, sig, &ka_copy, &info, oldset, error); + if(!err) + return(1); /* Did we come from a system call? */ if(PT_REGS_SYSCALL_NR(regs) >= 0){ @@ -201,7 +190,7 @@ } } -int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize) +int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) { sigset_t saveset, newset; @@ -227,20 +216,59 @@ } } +int sys_sigaction(int sig, const struct old_sigaction __user *act, + struct old_sigaction __user *oact) +{ + struct k_sigaction new_ka, old_ka; + int ret; + + if (act) { + old_sigset_t mask; + if (verify_area(VERIFY_READ, act, sizeof(*act)) || + __get_user(new_ka.sa.sa_handler, &act->sa_handler) || + __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) + return -EFAULT; + __get_user(new_ka.sa.sa_flags, &act->sa_flags); + __get_user(mask, &act->sa_mask); + siginitset(&new_ka.sa.sa_mask, mask); + } + + ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); + + if (!ret && oact) { + if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || + __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || + __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) + return -EFAULT; + __put_user(old_ka.sa.sa_flags, &oact->sa_flags); + __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); + } + + return ret; +} + +int sys_sigaltstack(const stack_t *uss, stack_t *uoss) +{ + return(do_sigaltstack(uss, uoss, PT_REGS_SP(¤t->thread.regs))); +} + +extern int userspace_pid[]; + static int copy_sc_from_user(struct pt_regs *to, void *from, struct arch_frame_data *arch) { int ret; ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from, arch), - copy_sc_from_user_skas(&to->regs, from)); + copy_sc_from_user_skas(userspace_pid[0], + &to->regs, from)); return(ret); } int sys_sigreturn(struct pt_regs regs) { - void *sc = sp_to_sc(PT_REGS_SP(¤t->thread.regs)); - void *mask = sp_to_mask(PT_REGS_SP(¤t->thread.regs)); + void __user *sc = sp_to_sc(PT_REGS_SP(¤t->thread.regs)); + void __user *mask = sp_to_mask(PT_REGS_SP(¤t->thread.regs)); int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); spin_lock_irq(¤t->sighand->siglock); @@ -257,8 +285,8 @@ int sys_rt_sigreturn(struct pt_regs regs) { - struct ucontext *uc = sp_to_uc(PT_REGS_SP(¤t->thread.regs)); - void *fp; + unsigned long sp = PT_REGS_SP(¤t->thread.regs); + struct ucontext __user *uc = sp_to_uc(sp); int sig_size = _NSIG_WORDS * sizeof(unsigned long); spin_lock_irq(¤t->sighand->siglock); @@ -266,7 +294,6 @@ sigdelsetmask(¤t->blocked, ~_BLOCKABLE); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - fp = (void *) (((unsigned long) uc) + sizeof(struct ucontext)); copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext, &signal_frame_si.common.arch); return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); diff -Nru a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile --- a/arch/um/kernel/skas/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/skas/Makefile 2004-09-06 16:37:51 -07:00 @@ -5,20 +5,24 @@ obj-y = exec_kern.o exec_user.o mem.o mem_user.o mmu.o process.o \ process_kern.o syscall_kern.o syscall_user.o time.o tlb.o trap_user.o \ - sys-$(SUBARCH)/ + uaccess.o sys-$(SUBARCH)/ + +hostprogs-y := util/mk_ptregs +clean-files := include/skas_ptregs.h USER_OBJS = $(filter %_user.o,$(obj-y)) process.o time.o USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -include/skas_ptregs.h : util/mk_ptregs - util/mk_ptregs > $@ - -util/mk_ptregs : - $(MAKE) -C util +$(TOPDIR)/arch/um/include/skas_ptregs.h : $(src)/util/mk_ptregs + @echo -n ' Generating $@' + @$< > $@.tmp + @if [ -r $@ ] && cmp -s $@ $@.tmp; then \ + echo ' (unchanged)'; \ + rm -f $@.tmp; \ + else \ + echo ' (updated)'; \ + mv -f $@.tmp $@; \ + fi $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -clean : - $(MAKE) -C util clean - $(RM) -f include/skas_ptregs.h diff -Nru a/arch/um/kernel/skas/exec_user.c b/arch/um/kernel/skas/exec_user.c --- a/arch/um/kernel/skas/exec_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/skas/exec_user.c 2004-09-06 16:37:51 -07:00 @@ -11,6 +11,7 @@ #include #include "user.h" #include "kern_util.h" +#include "user_util.h" #include "os.h" #include "time_user.h" @@ -26,7 +27,7 @@ int user_thread(unsigned long stack, int flags) { - int pid, status; + int pid, status, err; pid = clone(user_thread_tramp, (void *) stack_sp(stack), flags | CLONE_FILES | SIGCHLD, NULL); @@ -35,7 +36,8 @@ return(pid); } - if(waitpid(pid, &status, WUNTRACED) < 0){ + CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); + if(err < 0){ printk("user_thread - waitpid failed, errno = %d\n", errno); return(-errno); } diff -Nru a/arch/um/kernel/skas/include/mode.h b/arch/um/kernel/skas/include/mode.h --- a/arch/um/kernel/skas/include/mode.h 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/skas/include/mode.h 2004-09-06 16:37:53 -07:00 @@ -12,14 +12,16 @@ extern int have_fpx_regs; extern void user_time_init_skas(void); -extern int copy_sc_from_user_skas(union uml_pt_regs *regs, void *from_ptr); -extern int copy_sc_to_user_skas(void *to_ptr, void *fp, +extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, + void *from_ptr); +extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, union uml_pt_regs *regs, unsigned long fault_addr, int fault_type); extern void sig_handler_common_skas(int sig, void *sc_ptr); extern void halt_skas(void); extern void reboot_skas(void); extern void kill_off_processes_skas(void); +extern int is_skas_winch(int pid, int fd, void *data); #endif diff -Nru a/arch/um/kernel/skas/include/ptrace-skas.h b/arch/um/kernel/skas/include/ptrace-skas.h --- a/arch/um/kernel/skas/include/ptrace-skas.h 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/skas/include/ptrace-skas.h 2004-09-06 16:37:51 -07:00 @@ -10,6 +10,16 @@ #ifdef UML_CONFIG_MODE_SKAS +/* syscall emulation path in ptrace */ + +#ifndef PTRACE_SYSEMU +#define PTRACE_SYSEMU 31 +#endif + +void set_using_sysemu(int value); +int get_using_sysemu(void); +extern int sysemu_supported; + #include "skas_ptregs.h" #define HOST_FRAME_SIZE 17 diff -Nru a/arch/um/kernel/skas/include/skas.h b/arch/um/kernel/skas/include/skas.h --- a/arch/um/kernel/skas/include/skas.h 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/skas/include/skas.h 2004-09-06 16:37:51 -07:00 @@ -8,7 +8,7 @@ #include "sysdep/ptrace.h" -extern int userspace_pid; +extern int userspace_pid[]; extern void switch_threads(void *me, void *next); extern void thread_wait(void *sw, void *fb); @@ -32,7 +32,7 @@ extern int new_mm(int from); extern void save_registers(union uml_pt_regs *regs); extern void restore_registers(union uml_pt_regs *regs); -extern void start_userspace(void); +extern void start_userspace(int cpu); extern void init_registers(int pid); #endif diff -Nru a/arch/um/kernel/skas/include/uaccess.h b/arch/um/kernel/skas/include/uaccess.h --- a/arch/um/kernel/skas/include/uaccess.h 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/skas/include/uaccess.h 2004-09-06 16:37:52 -07:00 @@ -6,20 +6,12 @@ #ifndef __SKAS_UACCESS_H #define __SKAS_UACCESS_H -#include "linux/string.h" -#include "linux/sched.h" -#include "linux/err.h" -#include "asm/processor.h" -#include "asm/pgtable.h" #include "asm/errno.h" -#include "asm/current.h" -#include "asm/a.out.h" -#include "kern_util.h" #define access_ok_skas(type, addr, size) \ ((segment_eq(get_fs(), KERNEL_DS)) || \ (((unsigned long) (addr) < TASK_SIZE) && \ - ((unsigned long) (addr) + (size) < TASK_SIZE))) + ((unsigned long) (addr) + (size) <= TASK_SIZE))) static inline int verify_area_skas(int type, const void * addr, unsigned long size) @@ -27,197 +19,12 @@ return(access_ok_skas(type, addr, size) ? 0 : -EFAULT); } -static inline unsigned long maybe_map(unsigned long virt, int is_write) -{ - pte_t pte; - - void *phys = um_virt_to_phys(current, virt, &pte); - int dummy_code; - - if(IS_ERR(phys) || (is_write && !pte_write(pte))){ - if(handle_page_fault(virt, 0, is_write, 0, &dummy_code)) - return(0); - phys = um_virt_to_phys(current, virt, NULL); - } - return((unsigned long) __va((unsigned long) phys)); -} - -static inline int buffer_op(unsigned long addr, int len, - int (*op)(unsigned long addr, int len, void *arg), - void *arg) -{ - int size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len); - int remain = len, n; - - n = (*op)(addr, size, arg); - if(n != 0) - return(n < 0 ? remain : 0); - - addr += size; - remain -= size; - if(remain == 0) - return(0); - - while(addr < ((addr + remain) & PAGE_MASK)){ - n = (*op)(addr, PAGE_SIZE, arg); - if(n != 0) - return(n < 0 ? remain : 0); - - addr += PAGE_SIZE; - remain -= PAGE_SIZE; - } - if(remain == 0) - return(0); - - n = (*op)(addr, remain, arg); - if(n != 0) - return(n < 0 ? remain : 0); - return(0); -} - -static inline int copy_chunk_from_user(unsigned long from, int len, void *arg) -{ - unsigned long *to_ptr = arg, to = *to_ptr; - - from = maybe_map(from, 0); - if(from == 0) - return(-1); - - memcpy((void *) to, (void *) from, len); - *to_ptr += len; - return(0); -} - -static inline int copy_from_user_skas(void *to, const void *from, int n) -{ - if(segment_eq(get_fs(), KERNEL_DS)){ - memcpy(to, from, n); - return(0); - } - - return(access_ok_skas(VERIFY_READ, from, n) ? - buffer_op((unsigned long) from, n, copy_chunk_from_user, &to) : - n); -} - -static inline int copy_chunk_to_user(unsigned long to, int len, void *arg) -{ - unsigned long *from_ptr = arg, from = *from_ptr; - - to = maybe_map(to, 1); - if(to == 0) - return(-1); - - memcpy((void *) to, (void *) from, len); - *from_ptr += len; - return(0); -} - -static inline int copy_to_user_skas(void *to, const void *from, int n) -{ - if(segment_eq(get_fs(), KERNEL_DS)){ - memcpy(to, from, n); - return(0); - } - - return(access_ok_skas(VERIFY_WRITE, to, n) ? - buffer_op((unsigned long) to, n, copy_chunk_to_user, &from) : - n); -} - -static inline int strncpy_chunk_from_user(unsigned long from, int len, - void *arg) -{ - char **to_ptr = arg, *to = *to_ptr; - int n; - - from = maybe_map(from, 0); - if(from == 0) - return(-1); - - strncpy(to, (void *) from, len); - n = strnlen(to, len); - *to_ptr += n; - - if(n < len) - return(1); - return(0); -} - -static inline int strncpy_from_user_skas(char *dst, const char *src, int count) -{ - int n; - char *ptr = dst; - - if(segment_eq(get_fs(), KERNEL_DS)){ - strncpy(dst, src, count); - return(strnlen(dst, count)); - } - - if(!access_ok_skas(VERIFY_READ, src, 1)) - return(-EFAULT); - - n = buffer_op((unsigned long) src, count, strncpy_chunk_from_user, - &ptr); - if(n != 0) - return(-EFAULT); - return(strnlen(dst, count)); -} - -static inline int clear_chunk(unsigned long addr, int len, void *unused) -{ - addr = maybe_map(addr, 1); - if(addr == 0) - return(-1); - - memset((void *) addr, 0, len); - return(0); -} - -static inline int __clear_user_skas(void *mem, int len) -{ - return(buffer_op((unsigned long) mem, len, clear_chunk, NULL)); -} - -static inline int clear_user_skas(void *mem, int len) -{ - if(segment_eq(get_fs(), KERNEL_DS)){ - memset(mem, 0, len); - return(0); - } - - return(access_ok_skas(VERIFY_WRITE, mem, len) ? - buffer_op((unsigned long) mem, len, clear_chunk, NULL) : len); -} - -static inline int strnlen_chunk(unsigned long str, int len, void *arg) -{ - int *len_ptr = arg, n; - - str = maybe_map(str, 0); - if(str == 0) - return(-1); - - n = strnlen((void *) str, len); - *len_ptr += n; - - if(n < len) - return(1); - return(0); -} - -static inline int strnlen_user_skas(const void *str, int len) -{ - int count = 0, n; - - if(segment_eq(get_fs(), KERNEL_DS)) - return(strnlen(str, len) + 1); - - n = buffer_op((unsigned long) str, len, strnlen_chunk, &count); - if(n == 0) - return(count + 1); - return(-EFAULT); -} +extern int copy_from_user_skas(void *to, const void *from, int n); +extern int copy_to_user_skas(void *to, const void *from, int n); +extern int strncpy_from_user_skas(char *dst, const char *src, int count); +extern int __clear_user_skas(void *mem, int len); +extern int clear_user_skas(void *mem, int len); +extern int strnlen_user_skas(const void *str, int len); #endif diff -Nru a/arch/um/kernel/skas/mem_user.c b/arch/um/kernel/skas/mem_user.c --- a/arch/um/kernel/skas/mem_user.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/skas/mem_user.c 2004-09-06 16:37:52 -07:00 @@ -7,6 +7,7 @@ #include #include #include "mem_user.h" +#include "mem.h" #include "user.h" #include "os.h" #include "proc_mm.h" @@ -15,12 +16,12 @@ int r, int w, int x) { struct proc_mm_op map; - struct mem_region *region; - int prot, n; + __u64 offset; + int prot, n, phys_fd; prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | (x ? PROT_EXEC : 0); - region = phys_region(phys); + phys_fd = phys_mapping(phys, &offset); map = ((struct proc_mm_op) { .op = MM_MMAP, .u = @@ -30,12 +31,12 @@ .prot = prot, .flags = MAP_SHARED | MAP_FIXED, - .fd = region->fd, - .offset = phys_offset(phys) + .fd = phys_fd, + .offset = offset } } } ); n = os_write_file(fd, &map, sizeof(map)); if(n != sizeof(map)) - printk("map : /proc/mm map failed, errno = %d\n", errno); + printk("map : /proc/mm map failed, err = %d\n", -n); } int unmap(int fd, void *addr, int len) @@ -49,8 +50,13 @@ { .addr = (unsigned long) addr, .len = len } } } ); n = os_write_file(fd, &unmap, sizeof(unmap)); - if((n != 0) && (n != sizeof(unmap))) - return(-errno); + if(n != sizeof(unmap)) { + if(n < 0) + return(n); + else if(n > 0) + return(-EIO); + } + return(0); } @@ -71,11 +77,15 @@ .prot = prot } } } ); n = os_write_file(fd, &protect, sizeof(protect)); - if((n != 0) && (n != sizeof(protect))){ + if(n != sizeof(protect)) { + if(n == 0) return(0); + if(must_succeed) - panic("protect failed, errno = %d", errno); - return(-errno); + panic("protect failed, err = %d", -n); + + return(-EIO); } + return(0); } diff -Nru a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c --- a/arch/um/kernel/skas/mmu.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/skas/mmu.c 2004-09-06 16:37:55 -07:00 @@ -22,9 +22,11 @@ else from = -1; mm->context.skas.mm_fd = new_mm(from); - if(mm->context.skas.mm_fd < 0) - panic("init_new_context_skas - new_mm failed, errno = %d\n", - mm->context.skas.mm_fd); + if(mm->context.skas.mm_fd < 0){ + printk("init_new_context_skas - new_mm failed, errno = %d\n", + mm->context.skas.mm_fd); + return(mm->context.skas.mm_fd); + } return(0); } diff -Nru a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c --- a/arch/um/kernel/skas/process.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/skas/process.c 2004-09-06 16:37:55 -07:00 @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -24,6 +25,19 @@ #include "os.h" #include "proc_mm.h" #include "skas_ptrace.h" +#include "chan_user.h" +#include "signal_user.h" + +int is_skas_winch(int pid, int fd, void *data) +{ + if(pid != getpid()) + return(0); + + register_winch_irq(-1, fd, -1, data); + return(1); +} + +/* These are set once at boot time and not changed thereafter */ unsigned long exec_regs[FRAME_SIZE]; unsigned long exec_fp_regs[HOST_FP_SIZE]; @@ -43,37 +57,39 @@ segv(fault.addr, 0, FAULT_WRITE(fault.is_write), 1, NULL); } -static void handle_trap(int pid, union uml_pt_regs *regs) +/*To use the same value of using_sysemu as the caller, ask it that value (in local_using_sysemu)*/ +static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu) { int err, syscall_nr, status; syscall_nr = PT_SYSCALL_NR(regs->skas.regs); + UPT_SYSCALL_NR(regs) = syscall_nr; if(syscall_nr < 1){ relay_signal(SIGTRAP, regs); return; } - UPT_SYSCALL_NR(regs) = syscall_nr; - err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid); - if(err < 0) - panic("handle_trap - nullifying syscall failed errno = %d\n", - errno); + if (!local_using_sysemu) + { + err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid); + if(err < 0) + panic("handle_trap - nullifying syscall failed errno = %d\n", + errno); + + err = ptrace(PTRACE_SYSCALL, pid, 0, 0); + if(err < 0) + panic("handle_trap - continuing to end of syscall failed, " + "errno = %d\n", errno); - err = ptrace(PTRACE_SYSCALL, pid, 0, 0); - if(err < 0) - panic("handle_trap - continuing to end of syscall failed, " - "errno = %d\n", errno); - - err = waitpid(pid, &status, WUNTRACED); - if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) - panic("handle_trap - failed to wait at end of syscall, " - "errno = %d, status = %d\n", errno, status); + CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); + if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) + panic("handle_trap - failed to wait at end of syscall, " + "errno = %d, status = %d\n", errno, status); + } handle_syscall(regs); } -int userspace_pid; - static int userspace_tramp(void *arg) { init_new_thread_signals(0); @@ -83,7 +99,11 @@ return(0); } -void start_userspace(void) +/* Each element set once, and only accessed by a single processor anyway */ +#define NR_CPUS 1 +int userspace_pid[NR_CPUS]; + +void start_userspace(int cpu) { void *stack; unsigned long sp; @@ -101,7 +121,7 @@ panic("start_userspace : clone failed, errno = %d", errno); do { - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0) panic("start_userspace : wait failed, errno = %d", errno); @@ -114,21 +134,27 @@ if(munmap(stack, PAGE_SIZE) < 0) panic("start_userspace : munmap failed, errno = %d\n", errno); - userspace_pid = pid; + userspace_pid[cpu] = pid; } void userspace(union uml_pt_regs *regs) { - int err, status, op; + int err, status, op, pid = userspace_pid[0]; + int local_using_sysemu; /*To prevent races if using_sysemu changes under us.*/ restore_registers(regs); - err = ptrace(PTRACE_SYSCALL, userspace_pid, 0, 0); + local_using_sysemu = get_using_sysemu(); + + if (local_using_sysemu) + err = ptrace(PTRACE_SYSEMU, pid, 0, 0); + else + err = ptrace(PTRACE_SYSCALL, pid, 0, 0); if(err) - panic("userspace - PTRACE_SYSCALL failed, errno = %d\n", - errno); + panic("userspace - PTRACE_%s failed, errno = %d\n", + local_using_sysemu ? "SYSEMU" : "SYSCALL", errno); while(1){ - err = waitpid(userspace_pid, &status, WUNTRACED); + CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); if(err < 0) panic("userspace - waitpid failed, errno = %d\n", errno); @@ -139,16 +165,17 @@ if(WIFSTOPPED(status)){ switch(WSTOPSIG(status)){ case SIGSEGV: - handle_segv(userspace_pid); + handle_segv(pid); break; case SIGTRAP: - handle_trap(userspace_pid, regs); + handle_trap(pid, regs, local_using_sysemu); break; case SIGIO: case SIGVTALRM: case SIGILL: case SIGBUS: case SIGFPE: + case SIGWINCH: user_signal(WSTOPSIG(status), regs); break; default: @@ -160,25 +187,46 @@ restore_registers(regs); - op = singlestepping_skas() ? PTRACE_SINGLESTEP : - PTRACE_SYSCALL; - err = ptrace(op, userspace_pid, 0, 0); + /*Now we ended the syscall, so re-read local_using_sysemu.*/ + local_using_sysemu = get_using_sysemu(); + + if (local_using_sysemu) + op = singlestepping_skas() ? PTRACE_SINGLESTEP : + PTRACE_SYSEMU; + else + op = singlestepping_skas() ? PTRACE_SINGLESTEP : + PTRACE_SYSCALL; + + err = ptrace(op, pid, 0, 0); if(err) - panic("userspace - PTRACE_SYSCALL failed, " - "errno = %d\n", errno); + panic("userspace - PTRACE_%s failed, " + "errno = %d\n", + local_using_sysemu ? "SYSEMU" : "SYSCALL", errno); } } void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, void (*handler)(int)) { + unsigned long flags; jmp_buf switch_buf, fork_buf; *switch_buf_ptr = &switch_buf; *fork_buf_ptr = &fork_buf; - if(setjmp(fork_buf) == 0) + /* Somewhat subtle - siglongjmp restores the signal mask before doing + * the longjmp. This means that when jumping from one stack to another + * when the target stack has interrupts enabled, an interrupt may occur + * on the source stack. This is bad when starting up a process because + * it's not supposed to get timer ticks until it has been scheduled. + * So, we disable interrupts around the sigsetjmp to ensure that + * they can't happen until we get back here where they are safe. + */ + flags = get_signals(); + block_signals(); + if(sigsetjmp(fork_buf, 1) == 0) new_thread_proc(stack, handler); + set_signals(flags); remove_sigstack(); } @@ -189,16 +237,16 @@ *switch_buf = &buf; fork_buf = fb; - if(setjmp(buf) == 0) - longjmp(*fork_buf, 1); + if(sigsetjmp(buf, 1) == 0) + siglongjmp(*fork_buf, 1); } -static int move_registers(int int_op, int fp_op, union uml_pt_regs *regs, - unsigned long *fp_regs) +static int move_registers(int pid, int int_op, int fp_op, + union uml_pt_regs *regs, unsigned long *fp_regs) { - if(ptrace(int_op, userspace_pid, 0, regs->skas.regs) < 0) + if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) return(-errno); - if(ptrace(fp_op, userspace_pid, 0, fp_regs) < 0) + if(ptrace(fp_op, pid, 0, fp_regs) < 0) return(-errno); return(0); } @@ -217,10 +265,11 @@ fp_regs = regs->skas.fp; } - err = move_registers(PTRACE_GETREGS, fp_op, regs, fp_regs); + err = move_registers(userspace_pid[0], PTRACE_GETREGS, fp_op, regs, + fp_regs); if(err) panic("save_registers - saving registers failed, errno = %d\n", - err); + -err); } void restore_registers(union uml_pt_regs *regs) @@ -237,10 +286,11 @@ fp_regs = regs->skas.fp; } - err = move_registers(PTRACE_SETREGS, fp_op, regs, fp_regs); + err = move_registers(userspace_pid[0], PTRACE_SETREGS, fp_op, regs, + fp_regs); if(err) panic("restore_registers - saving registers failed, " - "errno = %d\n", err); + "errno = %d\n", -err); } void switch_threads(void *me, void *next) @@ -248,8 +298,8 @@ jmp_buf my_buf, **me_ptr = me, *next_buf = next; *me_ptr = &my_buf; - if(setjmp(my_buf) == 0) - longjmp(*next_buf, 1); + if(sigsetjmp(my_buf, 1) == 0) + siglongjmp(*next_buf, 1); } static jmp_buf initial_jmpbuf; @@ -265,14 +315,14 @@ int n; *fork_buf_ptr = &initial_jmpbuf; - n = setjmp(initial_jmpbuf); + n = sigsetjmp(initial_jmpbuf, 1); if(n == 0) new_thread_proc((void *) stack, new_thread_handler); else if(n == 1) remove_sigstack(); else if(n == 2){ (*cb_proc)(cb_arg); - longjmp(*cb_back, 1); + siglongjmp(*cb_back, 1); } else if(n == 3){ kmalloc_ok = 0; @@ -282,7 +332,7 @@ kmalloc_ok = 0; return(1); } - longjmp(**switch_buf, 1); + siglongjmp(**switch_buf, 1); } void remove_sigstack(void) @@ -304,8 +354,8 @@ cb_back = &here; block_signals(); - if(setjmp(here) == 0) - longjmp(initial_jmpbuf, 2); + if(sigsetjmp(here, 1) == 0) + siglongjmp(initial_jmpbuf, 2); unblock_signals(); cb_proc = NULL; @@ -316,22 +366,23 @@ void halt_skas(void) { block_signals(); - longjmp(initial_jmpbuf, 3); + siglongjmp(initial_jmpbuf, 3); } void reboot_skas(void) { block_signals(); - longjmp(initial_jmpbuf, 4); + siglongjmp(initial_jmpbuf, 4); } int new_mm(int from) { struct proc_mm_op copy; - int n, fd = os_open_file("/proc/mm", of_write(OPENFLAGS()), 0); + int n, fd = os_open_file("/proc/mm", + of_cloexec(of_write(OPENFLAGS())), 0); if(fd < 0) - return(-errno); + return(fd); if(from != -1){ copy = ((struct proc_mm_op) { .op = MM_COPY_SEGMENTS, @@ -340,8 +391,9 @@ n = os_write_file(fd, ©, sizeof(copy)); if(n != sizeof(copy)) printk("new_mm : /proc/mm copy_segments failed, " - "errno = %d\n", errno); + "err = %d\n", -n); } + return(fd); } @@ -349,7 +401,8 @@ { int err; - err = ptrace(PTRACE_SWITCH_MM, userspace_pid, 0, mm_fd); +#warning need cpu pid in switch_mm_skas + err = ptrace(PTRACE_SWITCH_MM, userspace_pid[0], 0, mm_fd); if(err) panic("switch_mm_skas - PTRACE_SWITCH_MM failed, errno = %d\n", errno); @@ -357,7 +410,8 @@ void kill_off_processes_skas(void) { - os_kill_process(userspace_pid, 1); +#warning need to loop over userspace_pids in kill_off_processes_skas + os_kill_process(userspace_pid[0], 1); } void init_registers(int pid) diff -Nru a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c --- a/arch/um/kernel/skas/process_kern.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/skas/process_kern.c 2004-09-06 16:37:55 -07:00 @@ -6,6 +6,12 @@ #include "linux/sched.h" #include "linux/slab.h" #include "linux/ptrace.h" +#include "linux/proc_fs.h" +#include "linux/file.h" +#include "linux/errno.h" +#include "linux/init.h" +#include "asm/uaccess.h" +#include "asm/atomic.h" #include "kern_util.h" #include "time_user.h" #include "signal_user.h" @@ -17,6 +23,61 @@ #include "kern.h" #include "mode.h" +static atomic_t using_sysemu; +int sysemu_supported; + +void set_using_sysemu(int value) +{ + atomic_set(&using_sysemu, sysemu_supported && value); +} + +int get_using_sysemu(void) +{ + return atomic_read(&using_sysemu); +} + +int proc_read_sysemu(char *buf, char **start, off_t offset, int size,int *eof, void *data) +{ + if (snprintf(buf, size, "%d\n", get_using_sysemu()) < size) /*No overflow*/ + *eof = 1; + + return strlen(buf); +} + +int proc_write_sysemu(struct file *file,const char *buf, unsigned long count,void *data) +{ + char tmp[2]; + + if (copy_from_user(tmp, buf, 1)) + return -EFAULT; + + if (tmp[0] == '0' || tmp[0] == '1') + set_using_sysemu(tmp[0] - '0'); + return count; /*We use the first char, but pretend to write everything*/ +} + +int __init make_proc_sysemu(void) +{ + struct proc_dir_entry *ent; + if (mode_tt || !sysemu_supported) + return 0; + + ent = create_proc_entry("sysemu", 0600, &proc_root); + + if (ent == NULL) + { + printk("Failed to register /proc/sysemu\n"); + return(0); + } + + ent->read_proc = proc_read_sysemu; + ent->write_proc = proc_write_sysemu; + + return 0; +} + +late_initcall(make_proc_sysemu); + int singlestepping_skas(void) { int ret = current->ptrace & PT_DTRACE; @@ -61,11 +122,13 @@ thread_wait(¤t->thread.mode.skas.switch_buf, current->thread.mode.skas.fork_buf); -#ifdef CONFIG_SMP - schedule_tail(NULL); -#endif + if(current->thread.prev_sched != NULL) + schedule_tail(current->thread.prev_sched); current->thread.prev_sched = NULL; + /* The return value is 1 if the kernel thread execs a process, + * 0 if it just exits + */ n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf); if(n == 1) userspace(¤t->thread.regs.regs); @@ -93,11 +156,11 @@ current->thread.mode.skas.fork_buf); force_flush_all(); -#ifdef CONFIG_SMP + if(current->thread.prev_sched == NULL) + panic("blech"); + schedule_tail(current->thread.prev_sched); -#endif current->thread.prev_sched = NULL; - unblock_signals(); userspace(¤t->thread.regs.regs); } @@ -136,7 +199,7 @@ void init_idle_skas(void) { - cpu_tasks[current->thread_info->cpu].pid = os_getpid(); + cpu_tasks[current_thread->cpu].pid = os_getpid(); default_idle(); } @@ -160,11 +223,11 @@ int start_uml_skas(void) { - start_userspace(); + start_userspace(0); capture_signal_stack(); + uml_idle_timer(); init_new_thread_signals(1); - idle_timer(); init_task.thread.request.u.thread.proc = start_kernel_proc; init_task.thread.request.u.thread.arg = NULL; @@ -175,12 +238,14 @@ int external_pid_skas(struct task_struct *task) { - return(userspace_pid); +#warning Need to look up userspace_pid by cpu + return(userspace_pid[0]); } int thread_pid_skas(struct task_struct *task) { - return(userspace_pid); +#warning Need to look up userspace_pid by cpu + return(userspace_pid[0]); } /* diff -Nru a/arch/um/kernel/skas/sys-i386/Makefile b/arch/um/kernel/skas/sys-i386/Makefile --- a/arch/um/kernel/skas/sys-i386/Makefile 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/skas/sys-i386/Makefile 2004-09-06 16:37:54 -07:00 @@ -10,5 +10,3 @@ $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -clean : diff -Nru a/arch/um/kernel/skas/sys-i386/sigcontext.c b/arch/um/kernel/skas/sys-i386/sigcontext.c --- a/arch/um/kernel/skas/sys-i386/sigcontext.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/skas/sys-i386/sigcontext.c 2004-09-06 16:37:50 -07:00 @@ -12,10 +12,9 @@ #include "kern_util.h" #include "user.h" #include "sigcontext.h" +#include "mode.h" -extern int userspace_pid; - -int copy_sc_from_user_skas(union uml_pt_regs *regs, void *from_ptr) +int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, void *from_ptr) { struct sigcontext sc, *from = from_ptr; unsigned long fpregs[FP_FRAME_SIZE]; @@ -41,13 +40,12 @@ regs->skas.regs[EIP] = sc.eip; regs->skas.regs[CS] = sc.cs; regs->skas.regs[EFL] = sc.eflags; - regs->skas.regs[UESP] = sc.esp_at_signal; regs->skas.regs[SS] = sc.ss; regs->skas.fault_addr = sc.cr2; regs->skas.fault_type = FAULT_WRITE(sc.err); regs->skas.trap_type = sc.trapno; - err = ptrace(PTRACE_SETFPREGS, userspace_pid, 0, fpregs); + err = ptrace(PTRACE_SETFPREGS, pid, 0, fpregs); if(err < 0){ printk("copy_sc_to_user - PTRACE_SETFPREGS failed, " "errno = %d\n", errno); @@ -57,8 +55,9 @@ return(0); } -int copy_sc_to_user_skas(void *to_ptr, void *fp, union uml_pt_regs *regs, - unsigned long fault_addr, int fault_type) +int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp, + union uml_pt_regs *regs, unsigned long fault_addr, + int fault_type) { struct sigcontext sc, *to = to_ptr; struct _fpstate *to_fp; @@ -86,7 +85,7 @@ sc.err = TO_SC_ERR(fault_type); sc.trapno = regs->skas.trap_type; - err = ptrace(PTRACE_GETFPREGS, userspace_pid, 0, fpregs); + err = ptrace(PTRACE_GETFPREGS, pid, 0, fpregs); if(err < 0){ printk("copy_sc_to_user - PTRACE_GETFPREGS failed, " "errno = %d\n", errno); diff -Nru a/arch/um/kernel/skas/syscall_kern.c b/arch/um/kernel/skas/syscall_kern.c --- a/arch/um/kernel/skas/syscall_kern.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/skas/syscall_kern.c 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ diff -Nru a/arch/um/kernel/skas/syscall_user.c b/arch/um/kernel/skas/syscall_user.c --- a/arch/um/kernel/skas/syscall_user.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/skas/syscall_user.c 2004-09-06 16:37:55 -07:00 @@ -22,7 +22,7 @@ index = record_syscall_start(UPT_SYSCALL_NR(regs)); - syscall_trace(); + syscall_trace(regs, 1); result = execute_syscall(regs); REGS_SET_SYSCALL_RETURN(regs->skas.regs, result); @@ -30,7 +30,7 @@ (result == -ERESTARTNOINTR)) do_signal(result); - syscall_trace(); + syscall_trace(regs, 0); record_syscall_end(index, result); } diff -Nru a/arch/um/kernel/skas/trap_user.c b/arch/um/kernel/skas/trap_user.c --- a/arch/um/kernel/skas/trap_user.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/skas/trap_user.c 2004-09-06 16:37:52 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -35,14 +35,10 @@ errno = save_errno; } -extern int missed_ticks[]; - void user_signal(int sig, union uml_pt_regs *regs) { struct signal_info *info; - if(sig == SIGVTALRM) - missed_ticks[cpu()]++; regs->skas.is_user = 1; regs->skas.fault_addr = 0; regs->skas.fault_type = 0; diff -Nru a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/skas/uaccess.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#include "linux/stddef.h" +#include "linux/kernel.h" +#include "linux/string.h" +#include "linux/fs.h" +#include "linux/highmem.h" +#include "asm/page.h" +#include "asm/pgtable.h" +#include "asm/uaccess.h" +#include "kern_util.h" + +extern void *um_virt_to_phys(struct task_struct *task, unsigned long addr, + pte_t *pte_out); + +static unsigned long maybe_map(unsigned long virt, int is_write) +{ + pte_t pte; + int err; + + void *phys = um_virt_to_phys(current, virt, &pte); + int dummy_code; + + if(IS_ERR(phys) || (is_write && !pte_write(pte))){ + err = handle_page_fault(virt, 0, is_write, 1, &dummy_code); + if(err) + return(0); + phys = um_virt_to_phys(current, virt, NULL); + } + return((unsigned long) phys); +} + +static int do_op(unsigned long addr, int len, int is_write, + int (*op)(unsigned long addr, int len, void *arg), void *arg) +{ + struct page *page; + int n; + + addr = maybe_map(addr, is_write); + if(addr == -1) + return(-1); + + page = phys_to_page(addr); + addr = (unsigned long) kmap(page) + (addr & ~PAGE_MASK); + n = (*op)(addr, len, arg); + kunmap(page); + + return(n); +} + +static int buffer_op(unsigned long addr, int len, int is_write, + int (*op)(unsigned long addr, int len, void *arg), + void *arg) +{ + int size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len); + int remain = len, n; + + n = do_op(addr, size, is_write, op, arg); + if(n != 0) + return(n < 0 ? remain : 0); + + addr += size; + remain -= size; + if(remain == 0) + return(0); + + while(addr < ((addr + remain) & PAGE_MASK)){ + n = do_op(addr, PAGE_SIZE, is_write, op, arg); + if(n != 0) + return(n < 0 ? remain : 0); + + addr += PAGE_SIZE; + remain -= PAGE_SIZE; + } + if(remain == 0) + return(0); + + n = do_op(addr, remain, is_write, op, arg); + if(n != 0) + return(n < 0 ? remain : 0); + return(0); +} + +static int copy_chunk_from_user(unsigned long from, int len, void *arg) +{ + unsigned long *to_ptr = arg, to = *to_ptr; + + memcpy((void *) to, (void *) from, len); + *to_ptr += len; + return(0); +} + +int copy_from_user_skas(void *to, const void *from, int n) +{ + if(segment_eq(get_fs(), KERNEL_DS)){ + memcpy(to, from, n); + return(0); + } + + return(access_ok_skas(VERIFY_READ, from, n) ? + buffer_op((unsigned long) from, n, 0, copy_chunk_from_user, &to): + n); +} + +static int copy_chunk_to_user(unsigned long to, int len, void *arg) +{ + unsigned long *from_ptr = arg, from = *from_ptr; + + memcpy((void *) to, (void *) from, len); + *from_ptr += len; + return(0); +} + +int copy_to_user_skas(void *to, const void *from, int n) +{ + if(segment_eq(get_fs(), KERNEL_DS)){ + memcpy(to, from, n); + return(0); + } + + return(access_ok_skas(VERIFY_WRITE, to, n) ? + buffer_op((unsigned long) to, n, 1, copy_chunk_to_user, &from) : + n); +} + +static int strncpy_chunk_from_user(unsigned long from, int len, void *arg) +{ + char **to_ptr = arg, *to = *to_ptr; + int n; + + strncpy(to, (void *) from, len); + n = strnlen(to, len); + *to_ptr += n; + + if(n < len) + return(1); + return(0); +} + +int strncpy_from_user_skas(char *dst, const char *src, int count) +{ + int n; + char *ptr = dst; + + if(segment_eq(get_fs(), KERNEL_DS)){ + strncpy(dst, src, count); + return(strnlen(dst, count)); + } + + if(!access_ok_skas(VERIFY_READ, src, 1)) + return(-EFAULT); + + n = buffer_op((unsigned long) src, count, 0, strncpy_chunk_from_user, + &ptr); + if(n != 0) + return(-EFAULT); + return(strnlen(dst, count)); +} + +static int clear_chunk(unsigned long addr, int len, void *unused) +{ + memset((void *) addr, 0, len); + return(0); +} + +int __clear_user_skas(void *mem, int len) +{ + return(buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL)); +} + +int clear_user_skas(void *mem, int len) +{ + if(segment_eq(get_fs(), KERNEL_DS)){ + memset(mem, 0, len); + return(0); + } + + return(access_ok_skas(VERIFY_WRITE, mem, len) ? + buffer_op((unsigned long) mem, len, 1, clear_chunk, NULL) : len); +} + +static int strnlen_chunk(unsigned long str, int len, void *arg) +{ + int *len_ptr = arg, n; + + n = strnlen((void *) str, len); + *len_ptr += n; + + if(n < len) + return(1); + return(0); +} + +int strnlen_user_skas(const void *str, int len) +{ + int count = 0, n; + + if(segment_eq(get_fs(), KERNEL_DS)) + return(strnlen(str, len) + 1); + + n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); + if(n == 0) + return(count + 1); + return(-EFAULT); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/skas/util/Makefile b/arch/um/kernel/skas/util/Makefile --- a/arch/um/kernel/skas/util/Makefile 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/skas/util/Makefile 2004-09-06 16:37:54 -07:00 @@ -1,10 +1,9 @@ all: mk_ptregs mk_ptregs : mk_ptregs.o - $(CC) -o mk_ptregs mk_ptregs.o + $(HOSTCC) -o mk_ptregs mk_ptregs.o mk_ptregs.o : mk_ptregs.c - $(CC) -c $< + $(HOSTCC) -c $< -clean : - $(RM) -f mk_ptregs *.o *~ +clean-files := mk_ptregs *.o *~ diff -Nru a/arch/um/kernel/skas/util/mk_ptregs.c b/arch/um/kernel/skas/util/mk_ptregs.c --- a/arch/um/kernel/skas/util/mk_ptregs.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/skas/util/mk_ptregs.c 2004-09-06 16:37:52 -07:00 @@ -1,3 +1,4 @@ +#include #include #include diff -Nru a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c --- a/arch/um/kernel/smp.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/smp.c 2004-09-06 16:37:51 -07:00 @@ -1,9 +1,15 @@ /* - * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ #include "linux/config.h" +#include "linux/percpu.h" +#include "asm/pgalloc.h" +#include "asm/tlb.h" + +/* For some reason, mmu_gathers are referenced when CONFIG_SMP is off. */ +DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); #ifdef CONFIG_SMP @@ -23,7 +29,7 @@ #include "os.h" /* CPU online map, set by smp_boot_cpus */ -unsigned long cpu_online_map = cpumask_of_cpu(0); +unsigned long cpu_online_map = CPU_MASK_NONE; EXPORT_SYMBOL(cpu_online_map); @@ -33,14 +39,6 @@ */ struct cpuinfo_um cpu_data[NR_CPUS]; -spinlock_t um_bh_lock = SPIN_LOCK_UNLOCKED; - -atomic_t global_bh_count; - -/* Not used by UML */ -unsigned char global_irq_holder = NO_PROC_ID; -unsigned volatile long global_irq_lock; - /* Set when the idlers are all forked */ int smp_threads_ready = 0; @@ -55,80 +53,44 @@ void smp_send_reschedule(int cpu) { - write(cpu_data[cpu].ipi_pipe[1], "R", 1); + os_write_file(cpu_data[cpu].ipi_pipe[1], "R", 1); num_reschedules_sent++; } -static void show(char * str) -{ - int cpu = smp_processor_id(); - - printk(KERN_INFO "\n%s, CPU %d:\n", str, cpu); -} - -#define MAXCOUNT 100000000 - -static inline void wait_on_bh(void) -{ - int count = MAXCOUNT; - do { - if (!--count) { - show("wait_on_bh"); - count = ~0; - } - /* nothing .. wait for the other bh's to go away */ - } while (atomic_read(&global_bh_count) != 0); -} - -/* - * This is called when we want to synchronize with - * bottom half handlers. We need to wait until - * no other CPU is executing any bottom half handler. - * - * Don't wait if we're already running in an interrupt - * context or are inside a bh handler. - */ -void synchronize_bh(void) -{ - if (atomic_read(&global_bh_count) && !in_interrupt()) - wait_on_bh(); -} - void smp_send_stop(void) { int i; printk(KERN_INFO "Stopping all CPUs..."); for(i = 0; i < num_online_cpus(); i++){ - if(i == current->thread_info->cpu) + if(i == current_thread->cpu) continue; - write(cpu_data[i].ipi_pipe[1], "S", 1); + os_write_file(cpu_data[i].ipi_pipe[1], "S", 1); } printk("done\n"); } -static cpumask_t smp_commenced_mask; -static cpumask_t smp_callin_map = CPU_MASK_NONE; +static cpumask_t smp_commenced_mask = CPU_MASK_NONE; +static cpumask_t cpu_callin_map = CPU_MASK_NONE; static int idle_proc(void *cpup) { int cpu = (int) cpup, err; err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1); - if(err) - panic("CPU#%d failed to create IPI pipe, errno = %d", cpu, - -err); + if(err < 0) + panic("CPU#%d failed to create IPI pipe, err = %d", cpu, -err); activate_ipi(cpu_data[cpu].ipi_pipe[0], current->thread.mode.tt.extern_pid); wmb(); - if (cpu_test_and_set(cpu, &smp_callin_map)) { + if (cpu_test_and_set(cpu, cpu_callin_map)) { printk("huh, CPU#%d already present??\n", cpu); BUG(); } - while (!cpu_isset(cpu, &smp_commenced_mask)) + while (!cpu_isset(cpu, smp_commenced_mask)) cpu_relax(); cpu_set(cpu, cpu_online_map); @@ -143,14 +105,16 @@ current->thread.request.u.thread.proc = idle_proc; current->thread.request.u.thread.arg = (void *) cpu; - new_task = do_fork(CLONE_VM | CLONE_IDLETASK, 0, NULL, 0, NULL, NULL); - if(IS_ERR(new_task)) panic("do_fork failed in idle_thread"); + new_task = fork_idle(cpu); + if(IS_ERR(new_task)) + panic("copy_process failed in idle_thread, error = %ld", + PTR_ERR(new_task)); cpu_tasks[cpu] = ((struct cpu_task) { .pid = new_task->thread.mode.tt.extern_pid, .task = new_task } ); idle_threads[cpu] = new_task; - CHOOSE_MODE(write(new_task->thread.mode.tt.switch_pipe[1], &c, + CHOOSE_MODE(os_write_file(new_task->thread.mode.tt.switch_pipe[1], &c, sizeof(c)), ({ panic("skas mode doesn't support SMP"); })); return(new_task); @@ -160,15 +124,17 @@ { struct task_struct *idle; unsigned long waittime; - int err, cpu; + int err, cpu, me = smp_processor_id(); - cpu_set(0, cpu_online_map); - cpu_set(0, smp_callin_map); + cpu_clear(me, cpu_online_map); + cpu_set(me, cpu_online_map); + cpu_set(me, cpu_callin_map); - err = os_pipe(cpu_data[0].ipi_pipe, 1, 1); - if(err) panic("CPU#0 failed to create IPI pipe, errno = %d", -err); + err = os_pipe(cpu_data[me].ipi_pipe, 1, 1); + if(err < 0) + panic("CPU#0 failed to create IPI pipe, errno = %d", -err); - activate_ipi(cpu_data[0].ipi_pipe[0], + activate_ipi(cpu_data[me].ipi_pipe[0], current->thread.mode.tt.extern_pid); for(cpu = 1; cpu < ncpus; cpu++){ @@ -180,10 +146,10 @@ unhash_process(idle); waittime = 200000000; - while (waittime-- && !cpu_isset(cpu, smp_callin_map)) + while (waittime-- && !cpu_isset(cpu, cpu_callin_map)) cpu_relax(); - if (cpu_isset(cpu, smp_callin_map)) + if (cpu_isset(cpu, cpu_callin_map)) printk("done\n"); else printk("failed\n"); } @@ -216,7 +182,7 @@ int fd; fd = cpu_data[cpu].ipi_pipe[0]; - while (read(fd, &c, 1) == 1) { + while (os_read_file(fd, &c, 1) == 1) { switch (c) { case 'C': smp_call_function_slave(cpu); @@ -276,9 +242,9 @@ info = _info; for (i=0;ithread_info->cpu) && + if((i != current_thread->cpu) && cpu_isset(i, cpu_online_map)) - write(cpu_data[i].ipi_pipe[1], "C", 1); + os_write_file(cpu_data[i].ipi_pipe[1], "C", 1); while (atomic_read(&scf_started) != cpus) barrier(); diff -Nru a/arch/um/kernel/sys_call_table.c b/arch/um/kernel/sys_call_table.c --- a/arch/um/kernel/sys_call_table.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/sys_call_table.c 2004-09-06 16:37:54 -07:00 @@ -5,7 +5,6 @@ #include "linux/config.h" #include "linux/unistd.h" -#include "linux/version.h" #include "linux/sys.h" #include "linux/swap.h" #include "linux/syscalls.h" @@ -14,251 +13,50 @@ #include "sysdep/syscalls.h" #include "kern_util.h" -extern syscall_handler_t sys_restart_syscall; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_exit; +#ifdef CONFIG_NFSD +#define NFSSERVCTL sys_nfsservctl +#else +#define NFSSERVCTL sys_ni_syscall +#endif + +#define LAST_GENERIC_SYSCALL __NR_vserver + +#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL +#define LAST_SYSCALL LAST_GENERIC_SYSCALL +#else +#define LAST_SYSCALL LAST_ARCH_SYSCALL +#endif + extern syscall_handler_t sys_fork; -extern syscall_handler_t sys_creat; -extern syscall_handler_t sys_link; -extern syscall_handler_t sys_unlink; -extern syscall_handler_t sys_chdir; -extern syscall_handler_t sys_mknod; -extern syscall_handler_t sys_chmod; -extern syscall_handler_t sys_lchown16; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_stat; -extern syscall_handler_t sys_getpid; -extern syscall_handler_t sys_oldumount; -extern syscall_handler_t sys_setuid16; -extern syscall_handler_t sys_getuid16; +extern syscall_handler_t sys_execve; +extern syscall_handler_t um_time; +extern syscall_handler_t um_mount; +extern syscall_handler_t um_stime; extern syscall_handler_t sys_ptrace; -extern syscall_handler_t sys_alarm; -extern syscall_handler_t sys_fstat; -extern syscall_handler_t sys_pause; -extern syscall_handler_t sys_utime; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_access; -extern syscall_handler_t sys_nice; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_sync; -extern syscall_handler_t sys_kill; -extern syscall_handler_t sys_rename; -extern syscall_handler_t sys_mkdir; -extern syscall_handler_t sys_rmdir; extern syscall_handler_t sys_pipe; -extern syscall_handler_t sys_times; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_brk; -extern syscall_handler_t sys_setgid16; -extern syscall_handler_t sys_getgid16; -extern syscall_handler_t sys_signal; -extern syscall_handler_t sys_geteuid16; -extern syscall_handler_t sys_getegid16; -extern syscall_handler_t sys_acct; -extern syscall_handler_t sys_umount; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_ioctl; -extern syscall_handler_t sys_fcntl; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_setpgid; -extern syscall_handler_t sys_ni_syscall; extern syscall_handler_t sys_olduname; -extern syscall_handler_t sys_umask; -extern syscall_handler_t sys_chroot; -extern syscall_handler_t sys_ustat; -extern syscall_handler_t sys_dup2; -extern syscall_handler_t sys_getppid; -extern syscall_handler_t sys_getpgrp; extern syscall_handler_t sys_sigaction; -extern syscall_handler_t sys_sgetmask; -extern syscall_handler_t sys_ssetmask; -extern syscall_handler_t sys_setreuid16; -extern syscall_handler_t sys_setregid16; extern syscall_handler_t sys_sigsuspend; -extern syscall_handler_t sys_sigpending; -extern syscall_handler_t sys_sethostname; -extern syscall_handler_t sys_setrlimit; -extern syscall_handler_t sys_old_getrlimit; -extern syscall_handler_t sys_getrusage; -extern syscall_handler_t sys_gettimeofday; -extern syscall_handler_t sys_settimeofday; -extern syscall_handler_t sys_getgroups16; -extern syscall_handler_t sys_setgroups16; -extern syscall_handler_t sys_symlink; -extern syscall_handler_t sys_lstat; -extern syscall_handler_t sys_readlink; -extern syscall_handler_t sys_swapon; -extern syscall_handler_t sys_uselib; -extern syscall_handler_t sys_reboot; extern syscall_handler_t old_readdir; -extern syscall_handler_t sys_munmap; -extern syscall_handler_t sys_truncate; -extern syscall_handler_t sys_ftruncate; -extern syscall_handler_t sys_fchmod; -extern syscall_handler_t sys_fchown16; -extern syscall_handler_t sys_getpriority; -extern syscall_handler_t sys_setpriority; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_statfs; -extern syscall_handler_t sys_fstatfs; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_socketcall; -extern syscall_handler_t sys_syslog; -extern syscall_handler_t sys_setitimer; -extern syscall_handler_t sys_getitimer; -extern syscall_handler_t sys_newstat; -extern syscall_handler_t sys_newlstat; -extern syscall_handler_t sys_newfstat; extern syscall_handler_t sys_uname; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_vhangup; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_swapoff; -extern syscall_handler_t sys_sysinfo; extern syscall_handler_t sys_ipc; -extern syscall_handler_t sys_fsync; extern syscall_handler_t sys_sigreturn; -extern syscall_handler_t sys_rt_sigreturn; extern syscall_handler_t sys_clone; -extern syscall_handler_t sys_setdomainname; -extern syscall_handler_t sys_newuname; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_adjtimex; -extern syscall_handler_t sys_mprotect; -extern syscall_handler_t sys_sigprocmask; -extern syscall_handler_t sys_init_module; -extern syscall_handler_t sys_delete_module; -extern syscall_handler_t sys_quotactl; -extern syscall_handler_t sys_getpgid; -extern syscall_handler_t sys_fchdir; -extern syscall_handler_t sys_bdflush; -extern syscall_handler_t sys_sysfs; -extern syscall_handler_t sys_personality; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_setfsuid16; -extern syscall_handler_t sys_setfsgid16; -extern syscall_handler_t sys_llseek; -extern syscall_handler_t sys_getdents; -extern syscall_handler_t sys_flock; -extern syscall_handler_t sys_msync; -extern syscall_handler_t sys_readv; -extern syscall_handler_t sys_writev; -extern syscall_handler_t sys_getsid; -extern syscall_handler_t sys_fdatasync; -extern syscall_handler_t sys_mlock; -extern syscall_handler_t sys_munlock; -extern syscall_handler_t sys_mlockall; -extern syscall_handler_t sys_munlockall; -extern syscall_handler_t sys_sched_setparam; -extern syscall_handler_t sys_sched_getparam; -extern syscall_handler_t sys_sched_setscheduler; -extern syscall_handler_t sys_sched_getscheduler; -extern syscall_handler_t sys_sched_get_priority_max; -extern syscall_handler_t sys_sched_get_priority_min; -extern syscall_handler_t sys_sched_rr_get_interval; -extern syscall_handler_t sys_nanosleep; -extern syscall_handler_t sys_mremap; -extern syscall_handler_t sys_setresuid16; -extern syscall_handler_t sys_getresuid16; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_poll; -extern syscall_handler_t sys_nfsservctl; -extern syscall_handler_t sys_setresgid16; -extern syscall_handler_t sys_getresgid16; -extern syscall_handler_t sys_prctl; -extern syscall_handler_t sys_ni_syscall; +extern syscall_handler_t sys_rt_sigreturn; extern syscall_handler_t sys_rt_sigaction; -extern syscall_handler_t sys_rt_sigprocmask; -extern syscall_handler_t sys_rt_sigpending; -extern syscall_handler_t sys_rt_sigtimedwait; -extern syscall_handler_t sys_rt_sigqueueinfo; -extern syscall_handler_t sys_rt_sigsuspend; -extern syscall_handler_t sys_pread64; -extern syscall_handler_t sys_pwrite64; -extern syscall_handler_t sys_chown16; -extern syscall_handler_t sys_getcwd; -extern syscall_handler_t sys_capget; -extern syscall_handler_t sys_capset; extern syscall_handler_t sys_sigaltstack; -extern syscall_handler_t sys_sendfile; -extern syscall_handler_t sys_ni_syscall; -extern syscall_handler_t sys_ni_syscall; extern syscall_handler_t sys_vfork; -extern syscall_handler_t sys_getrlimit; extern syscall_handler_t sys_mmap2; -extern syscall_handler_t sys_truncate64; -extern syscall_handler_t sys_ftruncate64; -extern syscall_handler_t sys_stat64; -extern syscall_handler_t sys_lstat64; -extern syscall_handler_t sys_fstat64; -extern syscall_handler_t sys_lchown; -extern syscall_handler_t sys_getuid; -extern syscall_handler_t sys_getgid; -extern syscall_handler_t sys_geteuid; -extern syscall_handler_t sys_getegid; -extern syscall_handler_t sys_setreuid; -extern syscall_handler_t sys_setregid; -extern syscall_handler_t sys_getgroups; -extern syscall_handler_t sys_setgroups; -extern syscall_handler_t sys_fchown; -extern syscall_handler_t sys_setresuid; -extern syscall_handler_t sys_getresuid; -extern syscall_handler_t sys_setresgid; -extern syscall_handler_t sys_getresgid; -extern syscall_handler_t sys_chown; -extern syscall_handler_t sys_setuid; -extern syscall_handler_t sys_setgid; -extern syscall_handler_t sys_setfsuid; -extern syscall_handler_t sys_setfsgid; -extern syscall_handler_t sys_pivot_root; -extern syscall_handler_t sys_mincore; -extern syscall_handler_t sys_madvise; -extern syscall_handler_t sys_fcntl64; -extern syscall_handler_t sys_getdents64; -extern syscall_handler_t sys_gettid; -extern syscall_handler_t sys_readahead; -extern syscall_handler_t sys_tkill; -extern syscall_handler_t sys_sendfile64; -extern syscall_handler_t sys_futex; -extern syscall_handler_t sys_sched_setaffinity; -extern syscall_handler_t sys_sched_getaffinity; -extern syscall_handler_t sys_io_setup; -extern syscall_handler_t sys_io_destroy; -extern syscall_handler_t sys_io_getevents; -extern syscall_handler_t sys_io_submit; -extern syscall_handler_t sys_io_cancel; -extern syscall_handler_t sys_exit_group; -extern syscall_handler_t sys_lookup_dcookie; -extern syscall_handler_t sys_epoll_create; -extern syscall_handler_t sys_epoll_ctl; -extern syscall_handler_t sys_epoll_wait; -extern syscall_handler_t sys_remap_file_pages; -extern syscall_handler_t sys_set_tid_address; - -#ifdef CONFIG_NFSD -#define NFSSERVCTL sys_nfsservctl -#else -#define NFSSERVCTL sys_ni_syscall -#endif - -extern syscall_handler_t um_mount; -extern syscall_handler_t um_time; -extern syscall_handler_t um_stime; - -#define LAST_GENERIC_SYSCALL __NR_set_tid_address - -#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL -#define LAST_SYSCALL LAST_GENERIC_SYSCALL -#else -#define LAST_SYSCALL LAST_ARCH_SYSCALL -#endif +extern syscall_handler_t sys_timer_create; +extern syscall_handler_t old_mmap_i386; +extern syscall_handler_t old_select; +extern syscall_handler_t sys_modify_ldt; +extern syscall_handler_t sys_rt_sigsuspend; syscall_handler_t *sys_call_table[] = { - [ __NR_restart_syscall ] = sys_restart_syscall, - [ __NR_exit ] = sys_exit, - [ __NR_fork ] = sys_fork, + [ __NR_restart_syscall ] = (syscall_handler_t *) sys_restart_syscall, + [ __NR_exit ] (syscall_handler_t *) sys_exit, + [ __NR_fork ] (syscall_handler_t *) sys_fork, [ __NR_read ] = (syscall_handler_t *) sys_read, [ __NR_write ] = (syscall_handler_t *) sys_write, @@ -266,229 +64,249 @@ [ __NR_open ] = (syscall_handler_t *) sys_open, [ __NR_close ] = (syscall_handler_t *) sys_close, [ __NR_waitpid ] = (syscall_handler_t *) sys_waitpid, - [ __NR_creat ] = sys_creat, - [ __NR_link ] = sys_link, - [ __NR_unlink ] = sys_unlink, + [ __NR_creat ] (syscall_handler_t *) sys_creat, + [ __NR_link ] (syscall_handler_t *) sys_link, + [ __NR_unlink ] (syscall_handler_t *) sys_unlink, [ __NR_execve ] = (syscall_handler_t *) sys_execve, /* declared differently in kern_util.h */ - [ __NR_chdir ] = sys_chdir, + [ __NR_chdir ] (syscall_handler_t *) sys_chdir, [ __NR_time ] = um_time, - [ __NR_mknod ] = sys_mknod, - [ __NR_chmod ] = sys_chmod, - [ __NR_lchown ] = sys_lchown16, - [ __NR_break ] = sys_ni_syscall, - [ __NR_oldstat ] = sys_stat, + [ __NR_mknod ] (syscall_handler_t *) sys_mknod, + [ __NR_chmod ] (syscall_handler_t *) sys_chmod, + [ __NR_lchown ] (syscall_handler_t *) sys_lchown16, + [ __NR_break ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_oldstat ] (syscall_handler_t *) sys_stat, [ __NR_lseek ] = (syscall_handler_t *) sys_lseek, - [ __NR_getpid ] = sys_getpid, + [ __NR_getpid ] (syscall_handler_t *) sys_getpid, [ __NR_mount ] = um_mount, - [ __NR_umount ] = sys_oldumount, - [ __NR_setuid ] = sys_setuid16, - [ __NR_getuid ] = sys_getuid16, + [ __NR_umount ] (syscall_handler_t *) sys_oldumount, + [ __NR_setuid ] (syscall_handler_t *) sys_setuid16, + [ __NR_getuid ] (syscall_handler_t *) sys_getuid16, [ __NR_stime ] = um_stime, - [ __NR_ptrace ] = sys_ptrace, - [ __NR_alarm ] = sys_alarm, - [ __NR_oldfstat ] = sys_fstat, - [ __NR_pause ] = sys_pause, - [ __NR_utime ] = sys_utime, - [ __NR_stty ] = sys_ni_syscall, - [ __NR_gtty ] = sys_ni_syscall, - [ __NR_access ] = sys_access, - [ __NR_nice ] = sys_nice, - [ __NR_ftime ] = sys_ni_syscall, - [ __NR_sync ] = sys_sync, - [ __NR_kill ] = sys_kill, - [ __NR_rename ] = sys_rename, - [ __NR_mkdir ] = sys_mkdir, - [ __NR_rmdir ] = sys_rmdir, + [ __NR_ptrace ] (syscall_handler_t *) sys_ptrace, + [ __NR_alarm ] (syscall_handler_t *) sys_alarm, + [ __NR_oldfstat ] (syscall_handler_t *) sys_fstat, + [ __NR_pause ] (syscall_handler_t *) sys_pause, + [ __NR_utime ] (syscall_handler_t *) sys_utime, + [ __NR_stty ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_gtty ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_access ] (syscall_handler_t *) sys_access, + [ __NR_nice ] (syscall_handler_t *) sys_nice, + [ __NR_ftime ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_sync ] (syscall_handler_t *) sys_sync, + [ __NR_kill ] (syscall_handler_t *) sys_kill, + [ __NR_rename ] (syscall_handler_t *) sys_rename, + [ __NR_mkdir ] (syscall_handler_t *) sys_mkdir, + [ __NR_rmdir ] (syscall_handler_t *) sys_rmdir, /* Declared differently in asm/unistd.h */ [ __NR_dup ] = (syscall_handler_t *) sys_dup, - [ __NR_pipe ] = sys_pipe, - [ __NR_times ] = sys_times, - [ __NR_prof ] = sys_ni_syscall, - [ __NR_brk ] = sys_brk, - [ __NR_setgid ] = sys_setgid16, - [ __NR_getgid ] = sys_getgid16, - [ __NR_signal ] = sys_signal, - [ __NR_geteuid ] = sys_geteuid16, - [ __NR_getegid ] = sys_getegid16, - [ __NR_acct ] = sys_acct, - [ __NR_umount2 ] = sys_umount, - [ __NR_lock ] = sys_ni_syscall, - [ __NR_ioctl ] = sys_ioctl, - [ __NR_fcntl ] = sys_fcntl, - [ __NR_mpx ] = sys_ni_syscall, - [ __NR_setpgid ] = sys_setpgid, - [ __NR_ulimit ] = sys_ni_syscall, - [ __NR_oldolduname ] = sys_olduname, - [ __NR_umask ] = sys_umask, - [ __NR_chroot ] = sys_chroot, - [ __NR_ustat ] = sys_ustat, - [ __NR_dup2 ] = sys_dup2, - [ __NR_getppid ] = sys_getppid, - [ __NR_getpgrp ] = sys_getpgrp, + [ __NR_pipe ] (syscall_handler_t *) sys_pipe, + [ __NR_times ] (syscall_handler_t *) sys_times, + [ __NR_prof ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_brk ] (syscall_handler_t *) sys_brk, + [ __NR_setgid ] (syscall_handler_t *) sys_setgid16, + [ __NR_getgid ] (syscall_handler_t *) sys_getgid16, + [ __NR_signal ] (syscall_handler_t *) sys_signal, + [ __NR_geteuid ] (syscall_handler_t *) sys_geteuid16, + [ __NR_getegid ] (syscall_handler_t *) sys_getegid16, + [ __NR_acct ] (syscall_handler_t *) sys_acct, + [ __NR_umount2 ] (syscall_handler_t *) sys_umount, + [ __NR_lock ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_ioctl ] (syscall_handler_t *) sys_ioctl, + [ __NR_fcntl ] (syscall_handler_t *) sys_fcntl, + [ __NR_mpx ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_setpgid ] (syscall_handler_t *) sys_setpgid, + [ __NR_ulimit ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_oldolduname ] (syscall_handler_t *) sys_olduname, + [ __NR_umask ] (syscall_handler_t *) sys_umask, + [ __NR_chroot ] (syscall_handler_t *) sys_chroot, + [ __NR_ustat ] (syscall_handler_t *) sys_ustat, + [ __NR_dup2 ] (syscall_handler_t *) sys_dup2, + [ __NR_getppid ] (syscall_handler_t *) sys_getppid, + [ __NR_getpgrp ] (syscall_handler_t *) sys_getpgrp, [ __NR_setsid ] = (syscall_handler_t *) sys_setsid, - [ __NR_sigaction ] = sys_sigaction, - [ __NR_sgetmask ] = sys_sgetmask, - [ __NR_ssetmask ] = sys_ssetmask, - [ __NR_setreuid ] = sys_setreuid16, - [ __NR_setregid ] = sys_setregid16, - [ __NR_sigsuspend ] = sys_sigsuspend, - [ __NR_sigpending ] = sys_sigpending, - [ __NR_sethostname ] = sys_sethostname, - [ __NR_setrlimit ] = sys_setrlimit, - [ __NR_getrlimit ] = sys_old_getrlimit, - [ __NR_getrusage ] = sys_getrusage, - [ __NR_gettimeofday ] = sys_gettimeofday, - [ __NR_settimeofday ] = sys_settimeofday, - [ __NR_getgroups ] = sys_getgroups16, - [ __NR_setgroups ] = sys_setgroups16, - [ __NR_symlink ] = sys_symlink, - [ __NR_oldlstat ] = sys_lstat, - [ __NR_readlink ] = sys_readlink, - [ __NR_uselib ] = sys_uselib, + [ __NR_sigaction ] (syscall_handler_t *) sys_sigaction, + [ __NR_sgetmask ] (syscall_handler_t *) sys_sgetmask, + [ __NR_ssetmask ] (syscall_handler_t *) sys_ssetmask, + [ __NR_setreuid ] (syscall_handler_t *) sys_setreuid16, + [ __NR_setregid ] (syscall_handler_t *) sys_setregid16, + [ __NR_sigsuspend ] (syscall_handler_t *) sys_sigsuspend, + [ __NR_sigpending ] (syscall_handler_t *) sys_sigpending, + [ __NR_sethostname ] (syscall_handler_t *) sys_sethostname, + [ __NR_setrlimit ] (syscall_handler_t *) sys_setrlimit, + [ __NR_getrlimit ] (syscall_handler_t *) sys_old_getrlimit, + [ __NR_getrusage ] (syscall_handler_t *) sys_getrusage, + [ __NR_gettimeofday ] (syscall_handler_t *) sys_gettimeofday, + [ __NR_settimeofday ] (syscall_handler_t *) sys_settimeofday, + [ __NR_getgroups ] (syscall_handler_t *) sys_getgroups16, + [ __NR_setgroups ] (syscall_handler_t *) sys_setgroups16, + [ __NR_symlink ] (syscall_handler_t *) sys_symlink, + [ __NR_oldlstat ] (syscall_handler_t *) sys_lstat, + [ __NR_readlink ] (syscall_handler_t *) sys_readlink, + [ __NR_uselib ] (syscall_handler_t *) sys_uselib, [ __NR_swapon ] = (syscall_handler_t *) sys_swapon, - [ __NR_reboot ] = sys_reboot, + [ __NR_reboot ] (syscall_handler_t *) sys_reboot, [ __NR_readdir ] = old_readdir, - [ __NR_munmap ] = sys_munmap, - [ __NR_truncate ] = sys_truncate, - [ __NR_ftruncate ] = sys_ftruncate, - [ __NR_fchmod ] = sys_fchmod, - [ __NR_fchown ] = sys_fchown16, - [ __NR_getpriority ] = sys_getpriority, - [ __NR_setpriority ] = sys_setpriority, - [ __NR_profil ] = sys_ni_syscall, - [ __NR_statfs ] = sys_statfs, - [ __NR_fstatfs ] = sys_fstatfs, - [ __NR_ioperm ] = sys_ni_syscall, - [ __NR_socketcall ] = sys_socketcall, - [ __NR_syslog ] = sys_syslog, - [ __NR_setitimer ] = sys_setitimer, - [ __NR_getitimer ] = sys_getitimer, - [ __NR_stat ] = sys_newstat, - [ __NR_lstat ] = sys_newlstat, - [ __NR_fstat ] = sys_newfstat, - [ __NR_olduname ] = sys_uname, - [ __NR_iopl ] = sys_ni_syscall, - [ __NR_vhangup ] = sys_vhangup, - [ __NR_idle ] = sys_ni_syscall, + [ __NR_munmap ] (syscall_handler_t *) sys_munmap, + [ __NR_truncate ] (syscall_handler_t *) sys_truncate, + [ __NR_ftruncate ] (syscall_handler_t *) sys_ftruncate, + [ __NR_fchmod ] (syscall_handler_t *) sys_fchmod, + [ __NR_fchown ] (syscall_handler_t *) sys_fchown16, + [ __NR_getpriority ] (syscall_handler_t *) sys_getpriority, + [ __NR_setpriority ] (syscall_handler_t *) sys_setpriority, + [ __NR_profil ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_statfs ] (syscall_handler_t *) sys_statfs, + [ __NR_fstatfs ] (syscall_handler_t *) sys_fstatfs, + [ __NR_ioperm ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_socketcall ] (syscall_handler_t *) sys_socketcall, + [ __NR_syslog ] (syscall_handler_t *) sys_syslog, + [ __NR_setitimer ] (syscall_handler_t *) sys_setitimer, + [ __NR_getitimer ] (syscall_handler_t *) sys_getitimer, + [ __NR_stat ] (syscall_handler_t *) sys_newstat, + [ __NR_lstat ] (syscall_handler_t *) sys_newlstat, + [ __NR_fstat ] (syscall_handler_t *) sys_newfstat, + [ __NR_olduname ] (syscall_handler_t *) sys_uname, + [ __NR_iopl ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_vhangup ] (syscall_handler_t *) sys_vhangup, + [ __NR_idle ] (syscall_handler_t *) sys_ni_syscall, [ __NR_wait4 ] = (syscall_handler_t *) sys_wait4, [ __NR_swapoff ] = (syscall_handler_t *) sys_swapoff, - [ __NR_sysinfo ] = sys_sysinfo, - [ __NR_ipc ] = sys_ipc, - [ __NR_fsync ] = sys_fsync, - [ __NR_sigreturn ] = sys_sigreturn, - [ __NR_clone ] = sys_clone, - [ __NR_setdomainname ] = sys_setdomainname, - [ __NR_uname ] = sys_newuname, - [ __NR_adjtimex ] = sys_adjtimex, - [ __NR_mprotect ] = sys_mprotect, - [ __NR_sigprocmask ] = sys_sigprocmask, - [ __NR_create_module ] = sys_ni_syscall, - [ __NR_init_module ] = sys_init_module, - [ __NR_delete_module ] = sys_delete_module, - [ __NR_get_kernel_syms ] = sys_ni_syscall, - [ __NR_quotactl ] = sys_quotactl, - [ __NR_getpgid ] = sys_getpgid, - [ __NR_fchdir ] = sys_fchdir, - [ __NR_bdflush ] = sys_bdflush, - [ __NR_sysfs ] = sys_sysfs, - [ __NR_personality ] = sys_personality, - [ __NR_afs_syscall ] = sys_ni_syscall, - [ __NR_setfsuid ] = sys_setfsuid16, - [ __NR_setfsgid ] = sys_setfsgid16, - [ __NR__llseek ] = sys_llseek, - [ __NR_getdents ] = sys_getdents, + [ __NR_sysinfo ] (syscall_handler_t *) sys_sysinfo, + [ __NR_ipc ] (syscall_handler_t *) sys_ipc, + [ __NR_fsync ] (syscall_handler_t *) sys_fsync, + [ __NR_sigreturn ] (syscall_handler_t *) sys_sigreturn, + [ __NR_clone ] (syscall_handler_t *) sys_clone, + [ __NR_setdomainname ] (syscall_handler_t *) sys_setdomainname, + [ __NR_uname ] (syscall_handler_t *) sys_newuname, + [ __NR_adjtimex ] (syscall_handler_t *) sys_adjtimex, + [ __NR_mprotect ] (syscall_handler_t *) sys_mprotect, + [ __NR_sigprocmask ] (syscall_handler_t *) sys_sigprocmask, + [ __NR_create_module ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_init_module ] (syscall_handler_t *) sys_init_module, + [ __NR_delete_module ] (syscall_handler_t *) sys_delete_module, + [ __NR_get_kernel_syms ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_quotactl ] (syscall_handler_t *) sys_quotactl, + [ __NR_getpgid ] (syscall_handler_t *) sys_getpgid, + [ __NR_fchdir ] (syscall_handler_t *) sys_fchdir, + [ __NR_bdflush ] (syscall_handler_t *) sys_bdflush, + [ __NR_sysfs ] (syscall_handler_t *) sys_sysfs, + [ __NR_personality ] (syscall_handler_t *) sys_personality, + [ __NR_afs_syscall ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_setfsuid ] (syscall_handler_t *) sys_setfsuid16, + [ __NR_setfsgid ] (syscall_handler_t *) sys_setfsgid16, + [ __NR__llseek ] (syscall_handler_t *) sys_llseek, + [ __NR_getdents ] (syscall_handler_t *) sys_getdents, [ __NR__newselect ] = (syscall_handler_t *) sys_select, - [ __NR_flock ] = sys_flock, - [ __NR_msync ] = sys_msync, - [ __NR_readv ] = sys_readv, - [ __NR_writev ] = sys_writev, - [ __NR_getsid ] = sys_getsid, - [ __NR_fdatasync ] = sys_fdatasync, + [ __NR_flock ] (syscall_handler_t *) sys_flock, + [ __NR_msync ] (syscall_handler_t *) sys_msync, + [ __NR_readv ] (syscall_handler_t *) sys_readv, + [ __NR_writev ] (syscall_handler_t *) sys_writev, + [ __NR_getsid ] (syscall_handler_t *) sys_getsid, + [ __NR_fdatasync ] (syscall_handler_t *) sys_fdatasync, [ __NR__sysctl ] = (syscall_handler_t *) sys_sysctl, - [ __NR_mlock ] = sys_mlock, - [ __NR_munlock ] = sys_munlock, - [ __NR_mlockall ] = sys_mlockall, - [ __NR_munlockall ] = sys_munlockall, - [ __NR_sched_setparam ] = sys_sched_setparam, - [ __NR_sched_getparam ] = sys_sched_getparam, - [ __NR_sched_setscheduler ] = sys_sched_setscheduler, - [ __NR_sched_getscheduler ] = sys_sched_getscheduler, + [ __NR_mlock ] (syscall_handler_t *) sys_mlock, + [ __NR_munlock ] (syscall_handler_t *) sys_munlock, + [ __NR_mlockall ] (syscall_handler_t *) sys_mlockall, + [ __NR_munlockall ] (syscall_handler_t *) sys_munlockall, + [ __NR_sched_setparam ] (syscall_handler_t *) sys_sched_setparam, + [ __NR_sched_getparam ] (syscall_handler_t *) sys_sched_getparam, + [ __NR_sched_setscheduler ] (syscall_handler_t *) sys_sched_setscheduler, + [ __NR_sched_getscheduler ] (syscall_handler_t *) sys_sched_getscheduler, [ __NR_sched_yield ] = (syscall_handler_t *) yield, - [ __NR_sched_get_priority_max ] = sys_sched_get_priority_max, - [ __NR_sched_get_priority_min ] = sys_sched_get_priority_min, - [ __NR_sched_rr_get_interval ] = sys_sched_rr_get_interval, - [ __NR_nanosleep ] = sys_nanosleep, - [ __NR_mremap ] = sys_mremap, - [ __NR_setresuid ] = sys_setresuid16, - [ __NR_getresuid ] = sys_getresuid16, - [ __NR_vm86 ] = sys_ni_syscall, - [ __NR_query_module ] = sys_ni_syscall, - [ __NR_poll ] = sys_poll, - [ __NR_nfsservctl ] = NFSSERVCTL, - [ __NR_setresgid ] = sys_setresgid16, - [ __NR_getresgid ] = sys_getresgid16, - [ __NR_prctl ] = sys_prctl, - [ __NR_rt_sigreturn ] = sys_rt_sigreturn, - [ __NR_rt_sigaction ] = sys_rt_sigaction, - [ __NR_rt_sigprocmask ] = sys_rt_sigprocmask, - [ __NR_rt_sigpending ] = sys_rt_sigpending, - [ __NR_rt_sigtimedwait ] = sys_rt_sigtimedwait, - [ __NR_rt_sigqueueinfo ] = sys_rt_sigqueueinfo, - [ __NR_rt_sigsuspend ] = sys_rt_sigsuspend, - [ __NR_pread64 ] = sys_pread64, - [ __NR_pwrite64 ] = sys_pwrite64, - [ __NR_chown ] = sys_chown16, - [ __NR_getcwd ] = sys_getcwd, - [ __NR_capget ] = sys_capget, - [ __NR_capset ] = sys_capset, - [ __NR_sigaltstack ] = sys_sigaltstack, - [ __NR_sendfile ] = sys_sendfile, - [ __NR_getpmsg ] = sys_ni_syscall, - [ __NR_putpmsg ] = sys_ni_syscall, - [ __NR_vfork ] = sys_vfork, - [ __NR_ugetrlimit ] = sys_getrlimit, - [ __NR_mmap2 ] = sys_mmap2, - [ __NR_truncate64 ] = sys_truncate64, - [ __NR_ftruncate64 ] = sys_ftruncate64, - [ __NR_stat64 ] = sys_stat64, - [ __NR_lstat64 ] = sys_lstat64, - [ __NR_fstat64 ] = sys_fstat64, - [ __NR_fcntl64 ] = sys_fcntl64, - [ __NR_getdents64 ] = sys_getdents64, - [ __NR_gettid ] = sys_gettid, - [ __NR_readahead ] = sys_readahead, - [ __NR_setxattr ] = sys_ni_syscall, - [ __NR_lsetxattr ] = sys_ni_syscall, - [ __NR_fsetxattr ] = sys_ni_syscall, - [ __NR_getxattr ] = sys_ni_syscall, - [ __NR_lgetxattr ] = sys_ni_syscall, - [ __NR_fgetxattr ] = sys_ni_syscall, - [ __NR_listxattr ] = sys_ni_syscall, - [ __NR_llistxattr ] = sys_ni_syscall, - [ __NR_flistxattr ] = sys_ni_syscall, - [ __NR_removexattr ] = sys_ni_syscall, - [ __NR_lremovexattr ] = sys_ni_syscall, - [ __NR_fremovexattr ] = sys_ni_syscall, - [ __NR_tkill ] = sys_tkill, - [ __NR_sendfile64 ] = sys_sendfile64, - [ __NR_futex ] = sys_futex, - [ __NR_sched_setaffinity ] = sys_sched_setaffinity, - [ __NR_sched_getaffinity ] = sys_sched_getaffinity, - [ __NR_io_setup ] = sys_io_setup, - [ __NR_io_destroy ] = sys_io_destroy, - [ __NR_io_getevents ] = sys_io_getevents, - [ __NR_io_submit ] = sys_io_submit, - [ __NR_io_cancel ] = sys_io_cancel, - [ __NR_exit_group ] = sys_exit_group, - [ __NR_lookup_dcookie ] = sys_lookup_dcookie, - [ __NR_epoll_create ] = sys_epoll_create, - [ __NR_epoll_ctl ] = sys_epoll_ctl, - [ __NR_epoll_wait ] = sys_epoll_wait, - [ __NR_remap_file_pages ] = sys_remap_file_pages, - [ __NR_set_tid_address ] = sys_set_tid_address, + [ __NR_sched_get_priority_max ] (syscall_handler_t *) sys_sched_get_priority_max, + [ __NR_sched_get_priority_min ] (syscall_handler_t *) sys_sched_get_priority_min, + [ __NR_sched_rr_get_interval ] (syscall_handler_t *) sys_sched_rr_get_interval, + [ __NR_nanosleep ] (syscall_handler_t *) sys_nanosleep, + [ __NR_mremap ] (syscall_handler_t *) sys_mremap, + [ __NR_setresuid ] (syscall_handler_t *) sys_setresuid16, + [ __NR_getresuid ] (syscall_handler_t *) sys_getresuid16, + [ __NR_vm86 ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_query_module ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_poll ] (syscall_handler_t *) sys_poll, + [ __NR_nfsservctl ] = (syscall_handler_t *) NFSSERVCTL, + [ __NR_setresgid ] (syscall_handler_t *) sys_setresgid16, + [ __NR_getresgid ] (syscall_handler_t *) sys_getresgid16, + [ __NR_prctl ] (syscall_handler_t *) sys_prctl, + [ __NR_rt_sigreturn ] (syscall_handler_t *) sys_rt_sigreturn, + [ __NR_rt_sigaction ] (syscall_handler_t *) sys_rt_sigaction, + [ __NR_rt_sigprocmask ] (syscall_handler_t *) sys_rt_sigprocmask, + [ __NR_rt_sigpending ] (syscall_handler_t *) sys_rt_sigpending, + [ __NR_rt_sigtimedwait ] (syscall_handler_t *) sys_rt_sigtimedwait, + [ __NR_rt_sigqueueinfo ] (syscall_handler_t *) sys_rt_sigqueueinfo, + [ __NR_rt_sigsuspend ] (syscall_handler_t *) sys_rt_sigsuspend, + [ __NR_pread64 ] (syscall_handler_t *) sys_pread64, + [ __NR_pwrite64 ] (syscall_handler_t *) sys_pwrite64, + [ __NR_chown ] (syscall_handler_t *) sys_chown16, + [ __NR_getcwd ] (syscall_handler_t *) sys_getcwd, + [ __NR_capget ] (syscall_handler_t *) sys_capget, + [ __NR_capset ] (syscall_handler_t *) sys_capset, + [ __NR_sigaltstack ] (syscall_handler_t *) sys_sigaltstack, + [ __NR_sendfile ] (syscall_handler_t *) sys_sendfile, + [ __NR_getpmsg ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_putpmsg ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_vfork ] (syscall_handler_t *) sys_vfork, + [ __NR_ugetrlimit ] (syscall_handler_t *) sys_getrlimit, + [ __NR_mmap2 ] (syscall_handler_t *) sys_mmap2, + [ __NR_truncate64 ] (syscall_handler_t *) sys_truncate64, + [ __NR_ftruncate64 ] (syscall_handler_t *) sys_ftruncate64, + [ __NR_stat64 ] (syscall_handler_t *) sys_stat64, + [ __NR_lstat64 ] (syscall_handler_t *) sys_lstat64, + [ __NR_fstat64 ] (syscall_handler_t *) sys_fstat64, + [ __NR_getdents64 ] (syscall_handler_t *) sys_getdents64, + [ __NR_fcntl64 ] (syscall_handler_t *) sys_fcntl64, + [ 223 ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_gettid ] (syscall_handler_t *) sys_gettid, + [ __NR_readahead ] (syscall_handler_t *) sys_readahead, + [ __NR_setxattr ] (syscall_handler_t *) sys_setxattr, + [ __NR_lsetxattr ] (syscall_handler_t *) sys_lsetxattr, + [ __NR_fsetxattr ] (syscall_handler_t *) sys_fsetxattr, + [ __NR_getxattr ] (syscall_handler_t *) sys_getxattr, + [ __NR_lgetxattr ] (syscall_handler_t *) sys_lgetxattr, + [ __NR_fgetxattr ] (syscall_handler_t *) sys_fgetxattr, + [ __NR_listxattr ] (syscall_handler_t *) sys_listxattr, + [ __NR_llistxattr ] (syscall_handler_t *) sys_llistxattr, + [ __NR_flistxattr ] (syscall_handler_t *) sys_flistxattr, + [ __NR_removexattr ] (syscall_handler_t *) sys_removexattr, + [ __NR_lremovexattr ] (syscall_handler_t *) sys_lremovexattr, + [ __NR_fremovexattr ] (syscall_handler_t *) sys_fremovexattr, + [ __NR_tkill ] (syscall_handler_t *) sys_tkill, + [ __NR_sendfile64 ] (syscall_handler_t *) sys_sendfile64, + [ __NR_futex ] (syscall_handler_t *) sys_futex, + [ __NR_sched_setaffinity ] (syscall_handler_t *) sys_sched_setaffinity, + [ __NR_sched_getaffinity ] (syscall_handler_t *) sys_sched_getaffinity, + [ __NR_set_thread_area ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_get_thread_area ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_io_setup ] (syscall_handler_t *) sys_io_setup, + [ __NR_io_destroy ] (syscall_handler_t *) sys_io_destroy, + [ __NR_io_getevents ] (syscall_handler_t *) sys_io_getevents, + [ __NR_io_submit ] (syscall_handler_t *) sys_io_submit, + [ __NR_io_cancel ] (syscall_handler_t *) sys_io_cancel, + [ __NR_fadvise64 ] (syscall_handler_t *) sys_fadvise64, + [ 251 ] (syscall_handler_t *) sys_ni_syscall, + [ __NR_exit_group ] (syscall_handler_t *) sys_exit_group, + [ __NR_lookup_dcookie ] (syscall_handler_t *) sys_lookup_dcookie, + [ __NR_epoll_create ] (syscall_handler_t *) sys_epoll_create, + [ __NR_epoll_ctl ] (syscall_handler_t *) sys_epoll_ctl, + [ __NR_epoll_wait ] (syscall_handler_t *) sys_epoll_wait, + [ __NR_remap_file_pages ] (syscall_handler_t *) sys_remap_file_pages, + [ __NR_set_tid_address ] (syscall_handler_t *) sys_set_tid_address, + [ __NR_timer_create ] (syscall_handler_t *) sys_timer_create, + [ __NR_timer_settime ] (syscall_handler_t *) sys_timer_settime, + [ __NR_timer_gettime ] (syscall_handler_t *) sys_timer_gettime, + [ __NR_timer_getoverrun ] (syscall_handler_t *) sys_timer_getoverrun, + [ __NR_timer_delete ] (syscall_handler_t *) sys_timer_delete, + [ __NR_clock_settime ] (syscall_handler_t *) sys_clock_settime, + [ __NR_clock_gettime ] (syscall_handler_t *) sys_clock_gettime, + [ __NR_clock_getres ] (syscall_handler_t *) sys_clock_getres, + [ __NR_clock_nanosleep ] (syscall_handler_t *) sys_clock_nanosleep, + [ __NR_statfs64 ] (syscall_handler_t *) sys_statfs64, + [ __NR_fstatfs64 ] (syscall_handler_t *) sys_fstatfs64, + [ __NR_tgkill ] (syscall_handler_t *) sys_tgkill, + [ __NR_utimes ] (syscall_handler_t *) sys_utimes, + [ __NR_fadvise64_64 ] (syscall_handler_t *) sys_fadvise64_64, + [ __NR_vserver ] (syscall_handler_t *) sys_ni_syscall, ARCH_SYSCALLS [ LAST_SYSCALL + 1 ... NR_syscalls ] = diff -Nru a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c --- a/arch/um/kernel/syscall_kern.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/syscall_kern.c 2004-09-06 16:37:54 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -36,32 +36,34 @@ long sys_fork(void) { - struct task_struct *p; + long ret; current->thread.forking = 1; - p = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL); + ret = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL); current->thread.forking = 0; - return(IS_ERR(p) ? PTR_ERR(p) : p->pid); + return(ret); } -long sys_clone(unsigned long clone_flags, unsigned long newsp) +long sys_clone(unsigned long clone_flags, unsigned long newsp, + int *parent_tid, int *child_tid) { - struct task_struct *p; + long ret; current->thread.forking = 1; - p = do_fork(clone_flags, newsp, NULL, 0, NULL, NULL); + ret = do_fork(clone_flags, newsp, NULL, 0, parent_tid, child_tid); current->thread.forking = 0; - return(IS_ERR(p) ? PTR_ERR(p) : p->pid); + return(ret); } long sys_vfork(void) { - struct task_struct *p; + long ret; current->thread.forking = 1; - p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, NULL); + ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, + NULL); current->thread.forking = 0; - return(IS_ERR(p) ? PTR_ERR(p) : p->pid); + return(ret); } /* common code for old and new mmaps */ @@ -136,43 +138,12 @@ error = do_pipe(fd); if (!error) { - if (copy_to_user(fildes, fd, 2*sizeof(int))) + if (copy_to_user(fildes, fd, sizeof(fd))) error = -EFAULT; } return error; } -int sys_sigaction(int sig, const struct old_sigaction *act, - struct old_sigaction *oact) -{ - struct k_sigaction new_ka, old_ka; - int ret; - - if (act) { - old_sigset_t mask; - if (verify_area(VERIFY_READ, act, sizeof(*act)) || - __get_user(new_ka.sa.sa_handler, &act->sa_handler) || - __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) - return -EFAULT; - __get_user(new_ka.sa.sa_flags, &act->sa_flags); - __get_user(mask, &act->sa_mask); - siginitset(&new_ka.sa.sa_mask, mask); - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) - return -EFAULT; - __put_user(old_ka.sa.sa_flags, &oact->sa_flags); - __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); - } - - return ret; -} - /* * sys_ipc() is the de-multiplexer for the SysV IPC calls.. * @@ -254,7 +225,7 @@ return sys_shmctl (first, second, (struct shmid_ds *) ptr); default: - return -EINVAL; + return -ENOSYS; } } @@ -301,11 +272,6 @@ error = error ? -EFAULT : 0; return error; -} - -int sys_sigaltstack(const stack_t *uss, stack_t *uoss) -{ - return(do_sigaltstack(uss, uoss, PT_REGS_SP(¤t->thread.regs))); } long execute_syscall(void *r) diff -Nru a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c --- a/arch/um/kernel/sysrq.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/sysrq.c 2004-09-06 16:37:51 -07:00 @@ -44,6 +44,11 @@ } EXPORT_SYMBOL(dump_stack); +void show_stack(struct task_struct *task, unsigned long *sp) +{ + show_trace(sp); +} + /* * Overrides for Emacs so that we follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically diff -Nru a/arch/um/kernel/tempfile.c b/arch/um/kernel/tempfile.c --- a/arch/um/kernel/tempfile.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tempfile.c 2004-09-06 16:37:53 -07:00 @@ -28,6 +28,7 @@ } if((dir == NULL) || (*dir == '\0')) dir = "/tmp"; + tempdir = malloc(strlen(dir) + 2); if(tempdir == NULL){ fprintf(stderr, "Failed to malloc tempdir, " @@ -49,7 +50,8 @@ else *tempname = 0; strcat(tempname, template); - if((fd = mkstemp(tempname)) < 0){ + fd = mkstemp(tempname); + if(fd < 0){ fprintf(stderr, "open - cannot create %s: %s\n", tempname, strerror(errno)); return -1; @@ -59,7 +61,8 @@ return -1; } if(out_tempname){ - if((*out_tempname = strdup(tempname)) == NULL){ + *out_tempname = strdup(tempname); + if(*out_tempname == NULL){ perror("strdup"); return -1; } diff -Nru a/arch/um/kernel/time.c b/arch/um/kernel/time.c --- a/arch/um/kernel/time.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/time.c 2004-09-06 16:37:51 -07:00 @@ -4,24 +4,34 @@ */ #include +#include #include #include #include #include #include -#include "linux/module.h" +#include #include "user_util.h" #include "kern_util.h" #include "user.h" #include "process.h" #include "signal_user.h" #include "time_user.h" +#include "kern_constants.h" + +/* XXX This really needs to be declared and initialized in a kernel file since + * it's in + */ +extern struct timespec wall_to_monotonic; extern struct timeval xtime; +struct timeval local_offset = { 0, 0 }; + void timer(void) { gettimeofday(&xtime, NULL); + timeradd(&xtime, &local_offset, &xtime); } void set_interval(int timer_type) @@ -66,7 +76,7 @@ errno); } -void idle_timer(void) +void uml_idle_timer(void) { if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) panic("Couldn't unset SIGVTALRM handler"); @@ -76,14 +86,60 @@ set_interval(ITIMER_REAL); } +static unsigned long long get_host_hz(void) +{ + char mhzline[16], *end; + unsigned long long mhz; + int ret, mult, rest, len; + + ret = cpu_feature("cpu MHz", mhzline, + sizeof(mhzline) / sizeof(mhzline[0])); + if(!ret) + panic ("Could not get host MHZ"); + + mhz = strtoul(mhzline, &end, 10); + + /* This business is to parse a floating point number without using + * floating types. + */ + + rest = 0; + mult = 0; + if(*end == '.'){ + end++; + len = strlen(end); + if(len < 6) + mult = 6 - len; + else if(len > 6) + end[6] = '\0'; + rest = strtoul(end, NULL, 10); + while(mult-- > 0) + rest *= 10; + } + + return(1000000 * mhz + rest); +} + +unsigned long long host_hz = 0; + +extern int do_posix_clock_monotonic_gettime(struct timespec *tp); + void time_init(void) { + struct timespec now; + + host_hz = get_host_hz(); if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) panic("Couldn't set SIGVTALRM handler"); set_interval(ITIMER_VIRTUAL); + + do_posix_clock_monotonic_gettime(&now); + wall_to_monotonic.tv_sec = -now.tv_sec; + wall_to_monotonic.tv_nsec = -now.tv_nsec; } -struct timeval local_offset = { 0, 0 }; +/* Declared in linux/time.h, which can't be included here */ +extern void clock_was_set(void); void do_gettimeofday(struct timeval *tv) { @@ -96,15 +152,13 @@ clock_was_set(); } -EXPORT_SYMBOL(do_gettimeofday); - int do_settimeofday(struct timespec *tv) { struct timeval now; unsigned long flags; struct timeval tv_in; - if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) + if ((unsigned long) tv->tv_nsec >= UM_NSEC_PER_SEC) return -EINVAL; tv_in.tv_sec = tv->tv_sec; @@ -114,9 +168,9 @@ gettimeofday(&now, NULL); timersub(&tv_in, &now, &local_offset); time_unlock(flags); -} -EXPORT_SYMBOL(do_settimeofday); + return(0); +} void idle_sleep(int secs) { diff -Nru a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c --- a/arch/um/kernel/time_kern.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/time_kern.c 2004-09-06 16:37:53 -07:00 @@ -30,22 +30,60 @@ return(HZ); } +/* + * Scheduler clock - returns current time in nanosec units. + */ +unsigned long long sched_clock(void) +{ + return (unsigned long long)jiffies_64 * (1000000000 / HZ); +} + /* Changed at early boot */ int timer_irq_inited = 0; -/* missed_ticks will be modified after kernel memory has been - * write-protected, so this puts it in a section which will be left - * write-enabled. - */ -int __attribute__ ((__section__ (".unprotected"))) missed_ticks[NR_CPUS]; +static int first_tick; +static unsigned long long prev_tsc; +#ifdef CONFIG_UML_REAL_TIME_CLOCK +static long long delta; /* Deviation per interval */ +#endif + +extern unsigned long long host_hz; void timer_irq(union uml_pt_regs *regs) { - int cpu = current->thread_info->cpu, ticks = missed_ticks[cpu]; + unsigned long long ticks = 0; + + if(!timer_irq_inited){ + /* This is to ensure that ticks don't pile up when + * the timer handler is suspended */ + first_tick = 0; + return; + } - if(!timer_irq_inited) return; - missed_ticks[cpu] = 0; - while(ticks--) do_IRQ(TIMER_IRQ, regs); + if(first_tick){ +#ifdef CONFIG_UML_REAL_TIME_CLOCK + unsigned long long tsc; + /* We've had 1 tick */ + tsc = time_stamp(); + + delta += tsc - prev_tsc; + prev_tsc = tsc; + + ticks += (delta * HZ) / host_hz; + delta -= (ticks * host_hz) / HZ; +#else + ticks = 1; +#endif + } + else { + prev_tsc = time_stamp(); + first_tick = 1; + } + + while(ticks > 0){ + do_IRQ(TIMER_IRQ, regs); + ticks--; + } } void boot_timer_handler(int sig) @@ -58,12 +96,15 @@ do_timer(®s); } -void um_timer(int irq, void *dev, struct pt_regs *regs) +irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) { + unsigned long flags; + do_timer(regs); - write_seqlock(&xtime_lock); + write_seqlock_irqsave(&xtime_lock, flags); timer(); - write_sequnlock(&xtime_lock); + write_sequnlock_irqrestore(&xtime_lock, flags); + return(IRQ_HANDLED); } long um_time(int * tloc) @@ -81,12 +122,12 @@ long um_stime(int * tptr) { int value; - struct timeval new; + struct timespec new; if (get_user(value, tptr)) return -EFAULT; new.tv_sec = value; - new.tv_usec = 0; + new.tv_nsec = 0; do_settimeofday(&new); return 0; } @@ -125,9 +166,11 @@ void timer_handler(int sig, union uml_pt_regs *regs) { #ifdef CONFIG_SMP + local_irq_disable(); update_process_times(user_context(UPT_SP(regs))); + local_irq_enable(); #endif - if(current->thread_info->cpu == 0) + if(current_thread->cpu == 0) timer_irq(regs); } @@ -136,6 +179,7 @@ unsigned long time_lock(void) { unsigned long flags; + spin_lock_irqsave(&timer_spinlock, flags); return(flags); } @@ -150,8 +194,8 @@ int err; CHOOSE_MODE(user_time_init_tt(), user_time_init_skas()); - if((err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", - NULL)) != 0) + err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); + if(err != 0) printk(KERN_ERR "timer_init : request_irq failed - " "errno = %d\n", -err); timer_irq_inited = 1; @@ -159,7 +203,6 @@ } __initcall(timer_init); - /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c --- a/arch/um/kernel/trap_kern.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/trap_kern.c 2004-09-06 16:37:50 -07:00 @@ -16,12 +16,15 @@ #include "asm/tlbflush.h" #include "asm/a.out.h" #include "asm/current.h" +#include "asm/irq.h" #include "user_util.h" #include "kern_util.h" #include "kern.h" #include "chan_kern.h" #include "mconsole_kern.h" #include "2_5compat.h" +#include "mem.h" +#include "mem_kern.h" int handle_page_fault(unsigned long address, unsigned long ip, int is_write, int is_user, int *code_out) @@ -51,12 +54,10 @@ if(is_write && !(vma->vm_flags & VM_WRITE)) goto out; page = address & PAGE_MASK; - if(page == (unsigned long) current->thread_info + PAGE_SIZE) - panic("Kernel stack overflow"); pgd = pgd_offset(mm, page); pmd = pmd_offset(pgd, page); - survive: do { + survive: switch (handle_mm_fault(mm, vma, address, is_write)){ case VM_FAULT_MINOR: current->min_flt++; @@ -75,10 +76,10 @@ } pte = pte_offset_kernel(pmd, page); } while(!pte_present(*pte)); + err = 0; *pte = pte_mkyoung(*pte); if(pte_write(*pte)) *pte = pte_mkdirty(*pte); flush_tlb_page(vma, page); - err = 0; out: up_read(&mm->mmap_sem); return(err); @@ -94,10 +95,36 @@ down_read(&mm->mmap_sem); goto survive; } - err = -ENOMEM; goto out; } +LIST_HEAD(physmem_remappers); + +void register_remapper(struct remapper *info) +{ + list_add(&info->list, &physmem_remappers); +} + +static int check_remapped_addr(unsigned long address, int is_write) +{ + struct remapper *remapper; + struct list_head *ele; + __u64 offset; + int fd; + + fd = phys_mapping(__pa(address), &offset); + if(fd == -1) + return(0); + + list_for_each(ele, &physmem_remappers){ + remapper = list_entry(ele, struct remapper, list); + if((*remapper->proc)(fd, address, is_write, offset)) + return(1); + } + + return(0); +} + unsigned long segv(unsigned long address, unsigned long ip, int is_write, int is_user, void *sc) { @@ -109,7 +136,9 @@ flush_tlb_kernel_vm(); return(0); } - if(current->mm == NULL) + else if(check_remapped_addr(address & PAGE_MASK, is_write)) + return(0); + else if(current->mm == NULL) panic("Segfault with no mm"); err = handle_page_fault(address, ip, is_write, is_user, &si.si_code); @@ -120,9 +149,8 @@ current->thread.fault_addr = (void *) address; do_longjmp(catcher, 1); } - else if(current->thread.fault_addr != NULL){ + else if(current->thread.fault_addr != NULL) panic("fault_addr set but no fault catcher"); - } else if(arch_fixup(ip, sc)) return(0); @@ -155,8 +183,6 @@ { struct siginfo si; - printk(KERN_ERR "Unfixable SEGV in '%s' (pid %d) at 0x%lx " - "(ip 0x%lx)\n", current->comm, current->pid, address, ip); si.si_signo = SIGSEGV; si.si_code = SEGV_ACCERR; si.si_addr = (void *) address; @@ -178,6 +204,11 @@ if(current->thread.fault_catcher != NULL) do_longjmp(current->thread.fault_catcher, 1); else relay_signal(sig, regs); +} + +void winch(int sig, union uml_pt_regs *regs) +{ + do_IRQ(WINCH_IRQ, regs); } void trap_init(void) diff -Nru a/arch/um/kernel/trap_user.c b/arch/um/kernel/trap_user.c --- a/arch/um/kernel/trap_user.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/trap_user.c 2004-09-06 16:37:52 -07:00 @@ -5,11 +5,9 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -34,7 +32,14 @@ { kill(pid, SIGKILL); kill(pid, SIGCONT); - while(waitpid(pid, NULL, 0) > 0) kill(pid, SIGCONT); + do { + int n; + CATCH_EINTR(n = waitpid(pid, NULL, 0)); + if (n > 0) + kill(pid, SIGCONT); + else + break; + } while(1); } /* Unlocked - don't care if this is a bit off */ @@ -82,6 +87,8 @@ .is_irq = 0 }, [ SIGILL ] { .handler = relay_signal, .is_irq = 0 }, + [ SIGWINCH ] { .handler = winch, + .is_irq = 1 }, [ SIGBUS ] { .handler = bus_handler, .is_irq = 0 }, [ SIGSEGV] { .handler = segv_handler, @@ -102,12 +109,11 @@ sig, &sc); } -extern int timer_irq_inited, missed_ticks[]; +extern int timer_irq_inited; void alarm_handler(int sig, struct sigcontext sc) { if(!timer_irq_inited) return; - missed_ticks[cpu()]++; if(sig == SIGALRM) switch_timers(0); @@ -123,7 +129,7 @@ { jmp_buf *buf = b; - longjmp(*buf, val); + siglongjmp(*buf, val); } /* diff -Nru a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile --- a/arch/um/kernel/tt/Makefile 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tt/Makefile 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ # -# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) +# Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) # Licensed under the GPL # @@ -7,7 +7,7 @@ obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ - uaccess_user.o sys-$(SUBARCH)/ + uaccess.o uaccess_user.o sys-$(SUBARCH)/ obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ @@ -27,5 +27,3 @@ $(obj)/unmap_fin.o : $(src)/unmap.o ld -r -o $@ $< -lc -L/usr/lib - -clean : diff -Nru a/arch/um/kernel/tt/exec_kern.c b/arch/um/kernel/tt/exec_kern.c --- a/arch/um/kernel/tt/exec_kern.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/tt/exec_kern.c 2004-09-06 16:37:51 -07:00 @@ -17,6 +17,7 @@ #include "mem_user.h" #include "os.h" #include "tlb.h" +#include "mode.h" static int exec_tramp(void *sig_stack) { @@ -47,17 +48,17 @@ do_exit(SIGKILL); } - if(current->thread_info->cpu == 0) + if(current_thread->cpu == 0) forward_interrupts(new_pid); current->thread.request.op = OP_EXEC; current->thread.request.u.exec.pid = new_pid; - unprotect_stack((unsigned long) current->thread_info); + unprotect_stack((unsigned long) current_thread); os_usr1_process(os_getpid()); enable_timer(); free_page(stack); protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 1, 0, 1); - task_protections((unsigned long) current->thread_info); + task_protections((unsigned long) current_thread); force_flush_all(); unblock_signals(); } diff -Nru a/arch/um/kernel/tt/exec_user.c b/arch/um/kernel/tt/exec_user.c --- a/arch/um/kernel/tt/exec_user.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/tt/exec_user.c 2004-09-06 16:37:54 -07:00 @@ -19,11 +19,16 @@ void do_exec(int old_pid, int new_pid) { unsigned long regs[FRAME_SIZE]; + int err; if((ptrace(PTRACE_ATTACH, new_pid, 0, 0) < 0) || - (ptrace(PTRACE_CONT, new_pid, 0, 0) < 0) || - (waitpid(new_pid, 0, WUNTRACED) < 0)) + (ptrace(PTRACE_CONT, new_pid, 0, 0) < 0)) tracer_panic("do_exec failed to attach proc - errno = %d", + errno); + + CATCH_EINTR(err = waitpid(new_pid, 0, WUNTRACED)); + if (err < 0) + tracer_panic("do_exec failed to attach proc in waitpid - errno = %d", errno); if(ptrace_getregs(old_pid, regs) < 0) diff -Nru a/arch/um/kernel/tt/include/mode.h b/arch/um/kernel/tt/include/mode.h --- a/arch/um/kernel/tt/include/mode.h 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tt/include/mode.h 2004-09-06 16:37:53 -07:00 @@ -8,6 +8,8 @@ #include "sysdep/ptrace.h" +enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; + extern int tracing_pid; extern int tracer(int (*init_proc)(void *), void *sp); diff -Nru a/arch/um/kernel/tt/include/uaccess.h b/arch/um/kernel/tt/include/uaccess.h --- a/arch/um/kernel/tt/include/uaccess.h 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tt/include/uaccess.h 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -43,65 +43,19 @@ extern int __do_copy_from_user(void *to, const void *from, int n, void **fault_addr, void **fault_catcher); - -static inline int copy_from_user_tt(void *to, const void *from, int n) -{ - return(access_ok_tt(VERIFY_READ, from, n) ? - __do_copy_from_user(to, from, n, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher) : n); -} - -static inline int copy_to_user_tt(void *to, const void *from, int n) -{ - return(access_ok_tt(VERIFY_WRITE, to, n) ? - __do_copy_to_user(to, from, n, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher) : n); -} - extern int __do_strncpy_from_user(char *dst, const char *src, size_t n, void **fault_addr, void **fault_catcher); - -static inline int strncpy_from_user_tt(char *dst, const char *src, int count) -{ - int n; - - if(!access_ok_tt(VERIFY_READ, src, 1)) return(-EFAULT); - n = __do_strncpy_from_user(dst, src, count, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher); - if(n < 0) return(-EFAULT); - return(n); -} - extern int __do_clear_user(void *mem, size_t len, void **fault_addr, void **fault_catcher); - -static inline int __clear_user_tt(void *mem, int len) -{ - return(__do_clear_user(mem, len, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher)); -} - -static inline int clear_user_tt(void *mem, int len) -{ - return(access_ok_tt(VERIFY_WRITE, mem, len) ? - __do_clear_user(mem, len, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher) : len); -} - extern int __do_strnlen_user(const char *str, unsigned long n, void **fault_addr, void **fault_catcher); -static inline int strnlen_user_tt(const void *str, int len) -{ - return(__do_strnlen_user(str, len, - ¤t->thread.fault_addr, - ¤t->thread.fault_catcher)); -} +extern int copy_from_user_tt(void *to, const void *from, int n); +extern int copy_to_user_tt(void *to, const void *from, int n); +extern int strncpy_from_user_tt(char *dst, const char *src, int count); +extern int __clear_user_tt(void *mem, int len); +extern int clear_user_tt(void *mem, int len); +extern int strnlen_user_tt(const void *str, int len); #endif diff -Nru a/arch/um/kernel/tt/mem.c b/arch/um/kernel/tt/mem.c --- a/arch/um/kernel/tt/mem.c 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/tt/mem.c 2004-09-06 16:37:52 -07:00 @@ -18,7 +18,7 @@ if(!jail || debug) remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1); remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1); - remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(brk_start), 1); + remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1); } #ifdef CONFIG_HOST_2G_2G diff -Nru a/arch/um/kernel/tt/mem_user.c b/arch/um/kernel/tt/mem_user.c --- a/arch/um/kernel/tt/mem_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/tt/mem_user.c 2004-09-06 16:37:51 -07:00 @@ -25,14 +25,13 @@ size = (unsigned long) segment_end - (unsigned long) segment_start; data = create_mem_file(size); - if((addr = mmap(NULL, size, PROT_WRITE | PROT_READ, - MAP_SHARED, data, 0)) == MAP_FAILED){ + addr = mmap(NULL, size, PROT_WRITE | PROT_READ, MAP_SHARED, data, 0); + if(addr == MAP_FAILED){ perror("mapping new data segment"); exit(1); } memcpy(addr, segment_start, size); - if(switcheroo(data, prot, addr, segment_start, - size) < 0){ + if(switcheroo(data, prot, addr, segment_start, size) < 0){ printf("switcheroo failed\n"); exit(1); } diff -Nru a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c --- a/arch/um/kernel/tt/process_kern.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/tt/process_kern.c 2004-09-06 16:37:54 -07:00 @@ -62,7 +62,7 @@ reading = 0; err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); if(err != sizeof(c)) - panic("write of switch_pipe failed, errno = %d", -err); + panic("write of switch_pipe failed, err = %d", -err); reading = 1; if((from->state == TASK_ZOMBIE) || (from->state == TASK_DEAD)) @@ -104,48 +104,72 @@ void release_thread_tt(struct task_struct *task) { - os_kill_process(task->thread.mode.tt.extern_pid, 0); + int pid = task->thread.mode.tt.extern_pid; + + if(os_getpid() != pid) + os_kill_process(pid, 0); } void exit_thread_tt(void) { - close(current->thread.mode.tt.switch_pipe[0]); - close(current->thread.mode.tt.switch_pipe[1]); + os_close_file(current->thread.mode.tt.switch_pipe[0]); + os_close_file(current->thread.mode.tt.switch_pipe[1]); } void schedule_tail(task_t *prev); static void new_thread_handler(int sig) { + unsigned long disable; int (*fn)(void *); void *arg; fn = current->thread.request.u.thread.proc; arg = current->thread.request.u.thread.arg; + UPT_SC(¤t->thread.regs.regs) = (void *) (&sig + 1); + disable = (1 << (SIGVTALRM - 1)) | (1 << (SIGALRM - 1)) | + (1 << (SIGIO - 1)) | (1 << (SIGPROF - 1)); + SC_SIGMASK(UPT_SC(¤t->thread.regs.regs)) &= ~disable; + suspend_new_thread(current->thread.mode.tt.switch_pipe[0]); - block_signals(); + force_flush_all(); + if(current->thread.prev_sched != NULL) + schedule_tail(current->thread.prev_sched); + current->thread.prev_sched = NULL; + init_new_thread_signals(1); -#ifdef CONFIG_SMP - schedule_tail(current->thread.prev_sched); -#endif enable_timer(); free_page(current->thread.temp_stack); set_cmdline("(kernel thread)"); - force_flush_all(); - current->thread.prev_sched = NULL; change_sig(SIGUSR1, 1); change_sig(SIGVTALRM, 1); change_sig(SIGPROF, 1); - unblock_signals(); + local_irq_enable(); if(!run_kernel_thread(fn, arg, ¤t->thread.exec_buf)) do_exit(0); } static int new_thread_proc(void *stack) { + /* local_irq_disable is needed to block out signals until this thread is + * properly scheduled. Otherwise, the tracing thread will get mighty + * upset about any signals that arrive before that. + * This has the complication that it sets the saved signal mask in + * the sigcontext to block signals. This gets restored when this + * thread (or a descendant, since they get a copy of this sigcontext) + * returns to userspace. + * So, this is compensated for elsewhere. + * XXX There is still a small window until local_irq_disable() actually + * finishes where signals are possible - shouldn't be a problem in + * practice since SIGIO hasn't been forwarded here yet, and the + * local_irq_disable should finish before a SIGVTALRM has time to be + * delivered. + */ + + local_irq_disable(); init_new_thread_stack(stack, new_thread_handler); os_usr1_process(os_getpid()); return(0); @@ -156,7 +180,7 @@ * itself with a SIGUSR1. set_user_mode has to be run with SIGUSR1 off, * so it is blocked before it's called. They are re-enabled on sigreturn * despite the fact that they were blocked when the SIGUSR1 was issued because - * copy_thread copies the parent's signcontext, including the signal mask + * copy_thread copies the parent's sigcontext, including the signal mask * onto the signal frame. */ @@ -165,35 +189,32 @@ UPT_SC(¤t->thread.regs.regs) = (void *) (&sig + 1); suspend_new_thread(current->thread.mode.tt.switch_pipe[0]); -#ifdef CONFIG_SMP - schedule_tail(NULL); -#endif + force_flush_all(); + if(current->thread.prev_sched != NULL) + schedule_tail(current->thread.prev_sched); + current->thread.prev_sched = NULL; + enable_timer(); change_sig(SIGVTALRM, 1); local_irq_enable(); - force_flush_all(); if(current->mm != current->parent->mm) protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 1, 0, 1); - task_protections((unsigned long) current->thread_info); - - current->thread.prev_sched = NULL; + task_protections((unsigned long) current_thread); free_page(current->thread.temp_stack); + local_irq_disable(); change_sig(SIGUSR1, 0); set_user_mode(current); } -static int sigusr1 = SIGUSR1; - int fork_tramp(void *stack) { - int sig = sigusr1; - local_irq_disable(); + arch_init_thread(); init_new_thread_stack(stack, finish_fork_handler); - kill(os_getpid(), sig); + os_usr1_process(os_getpid()); return(0); } @@ -213,8 +234,8 @@ } err = os_pipe(p->thread.mode.tt.switch_pipe, 1, 1); - if(err){ - printk("copy_thread : pipe failed, errno = %d\n", -err); + if(err < 0){ + printk("copy_thread : pipe failed, err = %d\n", -err); return(err); } @@ -377,8 +398,8 @@ pages = (1 << CONFIG_KERNEL_STACK_ORDER); - start = (unsigned long) current->thread_info + PAGE_SIZE; - end = (unsigned long) current + PAGE_SIZE * pages; + start = (unsigned long) current_thread + PAGE_SIZE; + end = (unsigned long) current_thread + PAGE_SIZE * pages; protect_memory(uml_reserved, start - uml_reserved, 1, w, 1, 1); protect_memory(end, high_physmem - end, 1, w, 1, 1); @@ -391,7 +412,7 @@ protect_memory(start, end - start, 1, w, 1, 1); start = (unsigned long) UML_ROUND_DOWN(&__bss_start); - end = (unsigned long) UML_ROUND_UP(brk_start); + end = (unsigned long) UML_ROUND_UP(&_end); protect_memory(start, end - start, 1, w, 1, 1); mprotect_kernel_vm(w); @@ -454,8 +475,9 @@ init_task.thread.mode.tt.extern_pid = pid; err = os_pipe(init_task.thread.mode.tt.switch_pipe, 1, 1); - if(err) panic("Can't create switch pipe for init_task, errno = %d", - err); + if(err) + panic("Can't create switch pipe for init_task, errno = %d", + -err); } int singlestepping_tt(void *t) diff -Nru a/arch/um/kernel/tt/ptproxy/Makefile b/arch/um/kernel/tt/ptproxy/Makefile --- a/arch/um/kernel/tt/ptproxy/Makefile 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/tt/ptproxy/Makefile 2004-09-06 16:37:52 -07:00 @@ -9,5 +9,3 @@ $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -clean: diff -Nru a/arch/um/kernel/tt/ptproxy/proxy.c b/arch/um/kernel/tt/ptproxy/proxy.c --- a/arch/um/kernel/tt/ptproxy/proxy.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tt/ptproxy/proxy.c 2004-09-06 16:37:53 -07:00 @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -273,7 +272,7 @@ child_proxy(1, W_EXITCODE(0, 0)); while(debugger.waiting == 1){ - pid = waitpid(debugger.pid, &status, WUNTRACED); + CATCH_EINTR(pid = waitpid(debugger.pid, &status, WUNTRACED)); if(pid != debugger.pid){ printk("fake_child_exit - waitpid failed, " "errno = %d\n", errno); @@ -281,7 +280,7 @@ } debugger_proxy(status, debugger.pid); } - pid = waitpid(debugger.pid, &status, WUNTRACED); + CATCH_EINTR(pid = waitpid(debugger.pid, &status, WUNTRACED)); if(pid != debugger.pid){ printk("fake_child_exit - waitpid failed, " "errno = %d\n", errno); @@ -293,10 +292,10 @@ } char gdb_init_string[] = -"att 1 -b panic -b stop -handle SIGWINCH nostop noprint pass +"att 1 \n\ +b panic \n\ +b stop \n\ +handle SIGWINCH nostop noprint pass \n\ "; int start_debugger(char *prog, int startup, int stop, int *fd_out) @@ -304,7 +303,8 @@ int slave, child; slave = open_gdb_chan(); - if((child = fork()) == 0){ + child = fork(); + if(child == 0){ char *tempname = NULL; int fd; @@ -327,18 +327,19 @@ exit(1); #endif } - if((fd = make_tempfile("/tmp/gdb_init-XXXXXX", &tempname, 0)) < 0){ - printk("start_debugger : make_tempfile failed, errno = %d\n", - errno); + fd = make_tempfile("/tmp/gdb_init-XXXXXX", &tempname, 0); + if(fd < 0){ + printk("start_debugger : make_tempfile failed," + "err = %d\n", -fd); exit(1); } - write(fd, gdb_init_string, sizeof(gdb_init_string) - 1); + os_write_file(fd, gdb_init_string, sizeof(gdb_init_string) - 1); if(startup){ if(stop){ - write(fd, "b start_kernel\n", + os_write_file(fd, "b start_kernel\n", strlen("b start_kernel\n")); } - write(fd, "c\n", strlen("c\n")); + os_write_file(fd, "c\n", strlen("c\n")); } if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){ printk("start_debugger : PTRACE_TRACEME failed, " diff -Nru a/arch/um/kernel/tt/ptproxy/sysdep.c b/arch/um/kernel/tt/ptproxy/sysdep.c --- a/arch/um/kernel/tt/ptproxy/sysdep.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/tt/ptproxy/sysdep.c 2004-09-06 16:37:54 -07:00 @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff -Nru a/arch/um/kernel/tt/ptproxy/wait.c b/arch/um/kernel/tt/ptproxy/wait.c --- a/arch/um/kernel/tt/ptproxy/wait.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/tt/ptproxy/wait.c 2004-09-06 16:37:54 -07:00 @@ -56,21 +56,23 @@ int real_wait_return(struct debugger *debugger) { unsigned long ip; - int err, pid; + int pid; pid = debugger->pid; + ip = ptrace(PTRACE_PEEKUSER, pid, PT_IP_OFFSET, 0); - ip = IP_RESTART_SYSCALL(ip); - err = ptrace(PTRACE_POKEUSER, pid, PT_IP_OFFSET, ip); + IP_RESTART_SYSCALL(ip); + if(ptrace(PTRACE_POKEUSER, pid, PT_IP_OFFSET, ip) < 0) tracer_panic("real_wait_return : Failed to restart system " - "call, errno = %d\n"); + "call, errno = %d\n", errno); + if((ptrace(PTRACE_SYSCALL, debugger->pid, 0, SIGCHLD) < 0) || (ptrace(PTRACE_SYSCALL, debugger->pid, 0, 0) < 0) || (ptrace(PTRACE_SYSCALL, debugger->pid, 0, 0) < 0) || debugger_normal_return(debugger, -1)) tracer_panic("real_wait_return : gdb failed to wait, " - "errno = %d\n"); + "errno = %d\n", errno); return(0); } diff -Nru a/arch/um/kernel/tt/sys-i386/Makefile b/arch/um/kernel/tt/sys-i386/Makefile --- a/arch/um/kernel/tt/sys-i386/Makefile 2004-09-06 16:37:52 -07:00 +++ b/arch/um/kernel/tt/sys-i386/Makefile 2004-09-06 16:37:52 -07:00 @@ -10,5 +10,3 @@ $(USER_OBJS) : %.o: %.c $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - -clean : diff -Nru a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c --- a/arch/um/kernel/tt/syscall_kern.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/tt/syscall_kern.c 2004-09-06 16:37:50 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ diff -Nru a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c --- a/arch/um/kernel/tt/syscall_user.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tt/syscall_user.c 2004-09-06 16:37:53 -07:00 @@ -33,7 +33,7 @@ SC_START_SYSCALL(sc); index = record_syscall_start(syscall); - syscall_trace(); + syscall_trace(regs, 1); result = execute_syscall(regs); /* regs->sc may have changed while the system call ran (there may @@ -46,7 +46,7 @@ (result == -ERESTARTNOINTR)) do_signal(result); - syscall_trace(); + syscall_trace(regs, 0); record_syscall_end(index, result); } diff -Nru a/arch/um/kernel/tt/tlb.c b/arch/um/kernel/tt/tlb.c --- a/arch/um/kernel/tt/tlb.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/tt/tlb.c 2004-09-06 16:37:50 -07:00 @@ -10,6 +10,7 @@ #include "asm/page.h" #include "asm/pgtable.h" #include "asm/uaccess.h" +#include "asm/tlbflush.h" #include "user_util.h" #include "mem_user.h" #include "os.h" diff -Nru a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c --- a/arch/um/kernel/tt/tracer.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/kernel/tt/tracer.c 2004-09-06 16:37:50 -07:00 @@ -39,16 +39,17 @@ return(0); register_winch_irq(tracer_winch[0], fd, -1, data); - return(0); + return(1); } static void tracer_winch_handler(int sig) { + int n; char c = 1; - if(write(tracer_winch[1], &c, sizeof(c)) != sizeof(c)) - printk("tracer_winch_handler - write failed, errno = %d\n", - errno); + n = os_write_file(tracer_winch[1], &c, sizeof(c)); + if(n != sizeof(c)) + printk("tracer_winch_handler - write failed, err = %d\n", -n); } /* Called only by the tracing thread during initialization */ @@ -58,9 +59,8 @@ int err; err = os_pipe(tracer_winch, 1, 1); - if(err){ - printk("setup_tracer_winch : os_pipe failed, errno = %d\n", - -err); + if(err < 0){ + printk("setup_tracer_winch : os_pipe failed, err = %d\n", -err); return; } signal(SIGWINCH, tracer_winch_handler); @@ -130,8 +130,8 @@ case SIGTSTP: if(ptrace(PTRACE_CONT, pid, 0, sig) < 0) tracer_panic("sleeping_process_signal : Failed to " - "continue pid %d, errno = %d\n", pid, - sig); + "continue pid %d, signal = %d, " + "errno = %d\n", pid, sig, errno); break; /* This happens when the debugger (e.g. strace) is doing system call @@ -145,7 +145,7 @@ if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) tracer_panic("sleeping_process_signal : Failed to " "PTRACE_SYSCALL pid %d, errno = %d\n", - pid, sig); + pid, errno); break; case SIGSTOP: break; @@ -192,7 +192,7 @@ printf("tracing thread pid = %d\n", tracing_pid); pid = clone(signal_tramp, sp, CLONE_FILES | SIGCHLD, init_proc); - n = waitpid(pid, &status, WUNTRACED); + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); if(n < 0){ printf("waitpid on idle thread failed, errno = %d\n", errno); exit(1); @@ -218,7 +218,7 @@ err = attach(debugger_parent); if(err){ printf("Failed to attach debugger parent %d, " - "errno = %d\n", debugger_parent, err); + "errno = %d\n", debugger_parent, -err); debugger_parent = -1; } else { @@ -233,7 +233,8 @@ } set_cmdline("(tracing thread)"); while(1){ - if((pid = waitpid(-1, &status, WUNTRACED)) <= 0){ + CATCH_EINTR(pid = waitpid(-1, &status, WUNTRACED)); + if(pid <= 0){ if(errno != ECHILD){ printf("wait failed - errno = %d\n", errno); } @@ -401,7 +402,7 @@ if(!strcmp(line, "go")) debug_stop = 0; else if(!strcmp(line, "parent")) debug_parent = 1; - else printk("Unknown debug option : '%s'\n", line); + else printf("Unknown debug option : '%s'\n", line); line = next; } diff -Nru a/arch/um/kernel/tt/uaccess.c b/arch/um/kernel/tt/uaccess.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/tt/uaccess.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#include "linux/sched.h" +#include "asm/uaccess.h" + +int copy_from_user_tt(void *to, const void *from, int n) +{ + if(!access_ok_tt(VERIFY_READ, from, n)) + return(n); + + return(__do_copy_from_user(to, from, n, ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)); +} + +int copy_to_user_tt(void *to, const void *from, int n) +{ + if(!access_ok_tt(VERIFY_WRITE, to, n)) + return(n); + + return(__do_copy_to_user(to, from, n, ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)); +} + +int strncpy_from_user_tt(char *dst, const char *src, int count) +{ + int n; + + if(!access_ok_tt(VERIFY_READ, src, 1)) + return(-EFAULT); + + n = __do_strncpy_from_user(dst, src, count, + ¤t->thread.fault_addr, + ¤t->thread.fault_catcher); + if(n < 0) return(-EFAULT); + return(n); +} + +int __clear_user_tt(void *mem, int len) +{ + return(__do_clear_user(mem, len, + ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)); +} + +int clear_user_tt(void *mem, int len) +{ + if(!access_ok_tt(VERIFY_WRITE, mem, len)) + return(len); + + return(__do_clear_user(mem, len, ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)); +} + +int strnlen_user_tt(const void *str, int len) +{ + return(__do_strnlen_user(str, len, + ¤t->thread.fault_addr, + ¤t->thread.fault_catcher)); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/kernel/tt/uaccess_user.c b/arch/um/kernel/tt/uaccess_user.c --- a/arch/um/kernel/tt/uaccess_user.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/tt/uaccess_user.c 2004-09-06 16:37:51 -07:00 @@ -8,15 +8,20 @@ #include #include "user_util.h" #include "uml_uaccess.h" +#include "task.h" +#include "kern_util.h" int __do_copy_from_user(void *to, const void *from, int n, void **fault_addr, void **fault_catcher) { + struct tt_regs save = TASK_REGS(get_current())->tt; unsigned long fault; int faulted; fault = __do_user_copy(to, from, n, fault_addr, fault_catcher, __do_copy, &faulted); + TASK_REGS(get_current())->tt = save; + if(!faulted) return(0); else return(n - (fault - (unsigned long) from)); } @@ -29,11 +34,14 @@ int __do_strncpy_from_user(char *dst, const char *src, unsigned long count, void **fault_addr, void **fault_catcher) { + struct tt_regs save = TASK_REGS(get_current())->tt; unsigned long fault; int faulted; fault = __do_user_copy(dst, src, count, fault_addr, fault_catcher, __do_strncpy, &faulted); + TASK_REGS(get_current())->tt = save; + if(!faulted) return(strlen(dst)); else return(-1); } @@ -46,11 +54,14 @@ int __do_clear_user(void *mem, unsigned long len, void **fault_addr, void **fault_catcher) { + struct tt_regs save = TASK_REGS(get_current())->tt; unsigned long fault; int faulted; fault = __do_user_copy(mem, NULL, len, fault_addr, fault_catcher, __do_clear, &faulted); + TASK_REGS(get_current())->tt = save; + if(!faulted) return(0); else return(len - (fault - (unsigned long) mem)); } @@ -58,19 +69,20 @@ int __do_strnlen_user(const char *str, unsigned long n, void **fault_addr, void **fault_catcher) { + struct tt_regs save = TASK_REGS(get_current())->tt; int ret; unsigned long *faddrp = (unsigned long *)fault_addr; jmp_buf jbuf; *fault_catcher = &jbuf; - if(setjmp(jbuf) == 0){ + if(sigsetjmp(jbuf, 1) == 0) ret = strlen(str) + 1; - } - else { - ret = *faddrp - (unsigned long) str; - } + else ret = *faddrp - (unsigned long) str; + *fault_addr = NULL; *fault_catcher = NULL; + + TASK_REGS(get_current())->tt = save; return ret; } diff -Nru a/arch/um/kernel/tt/unmap.c b/arch/um/kernel/tt/unmap.c --- a/arch/um/kernel/tt/unmap.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/tt/unmap.c 2004-09-06 16:37:54 -07:00 @@ -3,10 +3,7 @@ * Licensed under the GPL */ -#include -#include #include -#include "user.h" int switcheroo(int fd, int prot, void *from, void *to, int size) { diff -Nru a/arch/um/kernel/tty_log.c b/arch/um/kernel/tty_log.c --- a/arch/um/kernel/tty_log.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/kernel/tty_log.c 2004-09-06 16:37:53 -07:00 @@ -9,10 +9,10 @@ #include #include #include -#include #include #include "init.h" #include "user.h" +#include "kern_util.h" #include "os.h" #define TTY_LOG_DIR "./" @@ -24,29 +24,40 @@ #define TTY_LOG_OPEN 1 #define TTY_LOG_CLOSE 2 #define TTY_LOG_WRITE 3 +#define TTY_LOG_EXEC 4 + +#define TTY_READ 1 +#define TTY_WRITE 2 struct tty_log_buf { int what; unsigned long tty; int len; + int direction; + unsigned long sec; + unsigned long usec; }; -int open_tty_log(void *tty) +int open_tty_log(void *tty, void *current_tty) { struct timeval tv; struct tty_log_buf data; char buf[strlen(tty_log_dir) + sizeof("01234567890-01234567\0")]; int fd; + gettimeofday(&tv, NULL); if(tty_log_fd != -1){ - data = ((struct tty_log_buf) { what : TTY_LOG_OPEN, - tty : (unsigned long) tty, - len : 0 }); - write(tty_log_fd, &data, sizeof(data)); + data = ((struct tty_log_buf) { .what = TTY_LOG_OPEN, + .tty = (unsigned long) tty, + .len = sizeof(current_tty), + .direction = 0, + .sec = tv.tv_sec, + .usec = tv.tv_usec } ); + os_write_file(tty_log_fd, &data, sizeof(data)); + os_write_file(tty_log_fd, ¤t_tty, data.len); return(tty_log_fd); } - gettimeofday(&tv, NULL); sprintf(buf, "%s/%0u-%0u", tty_log_dir, (unsigned int) tv.tv_sec, (unsigned int) tv.tv_usec); @@ -62,30 +73,117 @@ void close_tty_log(int fd, void *tty) { struct tty_log_buf data; + struct timeval tv; if(tty_log_fd != -1){ - data = ((struct tty_log_buf) { what : TTY_LOG_CLOSE, - tty : (unsigned long) tty, - len : 0 }); - write(tty_log_fd, &data, sizeof(data)); + gettimeofday(&tv, NULL); + data = ((struct tty_log_buf) { .what = TTY_LOG_CLOSE, + .tty = (unsigned long) tty, + .len = 0, + .direction = 0, + .sec = tv.tv_sec, + .usec = tv.tv_usec } ); + os_write_file(tty_log_fd, &data, sizeof(data)); return; } - close(fd); + os_close_file(fd); } -int write_tty_log(int fd, char *buf, int len, void *tty) +static int log_chunk(int fd, const char *buf, int len) { + int total = 0, try, missed, n; + char chunk[64]; + + while(len > 0){ + try = (len > sizeof(chunk)) ? sizeof(chunk) : len; + missed = copy_from_user_proc(chunk, (char *) buf, try); + try -= missed; + n = os_write_file(fd, chunk, try); + if(n != try) { + if(n < 0) + return(n); + return(-EIO); + } + if(missed != 0) + return(-EFAULT); + + len -= try; + total += try; + buf += try; + } + + return(total); +} + +int write_tty_log(int fd, const char *buf, int len, void *tty, int is_read) +{ + struct timeval tv; struct tty_log_buf data; + int direction; if(fd == tty_log_fd){ - data = ((struct tty_log_buf) { what : TTY_LOG_WRITE, - tty : (unsigned long) tty, - len : len }); - write(tty_log_fd, &data, sizeof(data)); + gettimeofday(&tv, NULL); + direction = is_read ? TTY_READ : TTY_WRITE; + data = ((struct tty_log_buf) { .what = TTY_LOG_WRITE, + .tty = (unsigned long) tty, + .len = len, + .direction = direction, + .sec = tv.tv_sec, + .usec = tv.tv_usec } ); + os_write_file(tty_log_fd, &data, sizeof(data)); + } + + return(log_chunk(fd, buf, len)); +} + +void log_exec(char **argv, void *tty) +{ + struct timeval tv; + struct tty_log_buf data; + char **ptr,*arg; + int len; + + if(tty_log_fd == -1) return; + + gettimeofday(&tv, NULL); + + len = 0; + for(ptr = argv; ; ptr++){ + if(copy_from_user_proc(&arg, ptr, sizeof(arg))) + return; + if(arg == NULL) break; + len += strlen_user_proc(arg); + } + + data = ((struct tty_log_buf) { .what = TTY_LOG_EXEC, + .tty = (unsigned long) tty, + .len = len, + .direction = 0, + .sec = tv.tv_sec, + .usec = tv.tv_usec } ); + os_write_file(tty_log_fd, &data, sizeof(data)); + + for(ptr = argv; ; ptr++){ + if(copy_from_user_proc(&arg, ptr, sizeof(arg))) + return; + if(arg == NULL) break; + log_chunk(tty_log_fd, arg, strlen_user_proc(arg)); } - return(write(fd, buf, len)); } +extern void register_tty_logger(int (*opener)(void *, void *), + int (*writer)(int, const char *, int, + void *, int), + void (*closer)(int, void *)); + +static int register_logger(void) +{ + register_tty_logger(open_tty_log, write_tty_log, close_tty_log); + return(0); +} + +__uml_initcall(register_logger); + static int __init set_tty_log_dir(char *name, int *add) { tty_log_dir = name; @@ -104,7 +202,7 @@ tty_log_fd = strtoul(name, &end, 0); if((*end != '\0') || (end == name)){ - printk("set_tty_log_fd - strtoul failed on '%s'\n", name); + printf("set_tty_log_fd - strtoul failed on '%s'\n", name); tty_log_fd = -1; } return 0; diff -Nru a/arch/um/kernel/uaccess_user.c b/arch/um/kernel/uaccess_user.c --- a/arch/um/kernel/uaccess_user.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/uaccess_user.c 2004-09-06 16:37:54 -07:00 @@ -20,7 +20,7 @@ jmp_buf jbuf; *fault_catcher = &jbuf; - if(setjmp(jbuf) == 0){ + if(sigsetjmp(jbuf, 1) == 0){ (*op)(to, from, n); ret = 0; *faulted_out = 0; diff -Nru a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c --- a/arch/um/kernel/um_arch.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/kernel/um_arch.c 2004-09-06 16:37:54 -07:00 @@ -38,13 +38,18 @@ #include "mode_kern.h" #include "mode.h" -#define DEFAULT_COMMAND_LINE "root=6200" +#define DEFAULT_COMMAND_LINE "root=98:0" struct cpuinfo_um boot_cpu_data = { .loops_per_jiffy = 0, .ipi_pipe = { -1, -1 } }; +/* Placeholder to make UML link until the vsyscall stuff is actually + * implemented + */ +void *__kernel_vsyscall; + unsigned long thread_saved_pc(struct task_struct *task) { return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas, @@ -53,18 +58,22 @@ static int show_cpuinfo(struct seq_file *m, void *v) { - int index; + int index = 0; - index = (struct cpuinfo_um *)v - cpu_data; #ifdef CONFIG_SMP + index = (struct cpuinfo_um *) v - cpu_data; if (!cpu_online(index)) return 0; #endif - seq_printf(m, "bogomips\t: %lu.%02lu\n", + seq_printf(m, "processor\t: %d\n", index); + seq_printf(m, "vendor_id\t: User Mode Linux\n"); + seq_printf(m, "model name\t: UML\n"); + seq_printf(m, "mode\t\t: %s\n", CHOOSE_MODE("tt", "skas")); + seq_printf(m, "host\t\t: %s\n", host_info); + seq_printf(m, "bogomips\t: %lu.%02lu\n\n", loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100); - seq_printf(m, "host\t\t: %s\n", host_info); return(0); } @@ -134,12 +143,12 @@ if(umid != NULL){ snprintf(argv1_begin, (argv1_end - argv1_begin) * sizeof(*ptr), - "(%s)", umid); + "(%s) ", umid); ptr = &argv1_begin[strlen(argv1_begin)]; } else ptr = argv1_begin; - snprintf(ptr, (argv1_end - ptr) * sizeof(*ptr), " [%s]", cmd); + snprintf(ptr, (argv1_end - ptr) * sizeof(*ptr), "[%s]", cmd); memset(argv1_begin + strlen(argv1_begin), '\0', argv1_end - argv1_begin - strlen(argv1_begin)); #endif @@ -179,7 +188,7 @@ static int __init uml_ncpus_setup(char *line, int *add) { if (!sscanf(line, "%d", &ncpus)) { - printk("Couldn't parse [%s]\n", line); + printf("Couldn't parse [%s]\n", line); return -1; } @@ -210,7 +219,7 @@ static int __init mode_tt_setup(char *line, int *add) { - printk("CONFIG_MODE_TT disabled - 'mode=tt' ignored\n"); + printf("CONFIG_MODE_TT disabled - 'mode=tt' ignored\n"); return(0); } @@ -221,7 +230,7 @@ static int __init mode_tt_setup(char *line, int *add) { - printk("CONFIG_MODE_SKAS disabled - 'mode=tt' redundant\n"); + printf("CONFIG_MODE_SKAS disabled - 'mode=tt' redundant\n"); return(0); } @@ -291,7 +300,7 @@ /* Set during early boot */ unsigned long brk_start; -static struct vm_reserved kernel_vm_reserved; +unsigned long end_iomem; #define MIN_VMALLOC (32 * 1024 * 1024) @@ -299,7 +308,7 @@ { unsigned long avail; unsigned long virtmem_size, max_physmem; - unsigned int i, add, err; + unsigned int i, add; for (i = 1; i < argc; i++){ if((i == 1) && (argv[i][0] == ' ')) continue; @@ -328,12 +337,16 @@ argv1_end = &argv[1][strlen(argv[1])]; #endif - set_usable_vm(uml_physmem, get_kmem_end()); - highmem = 0; - max_physmem = get_kmem_end() - uml_physmem - MIN_VMALLOC; - if(physmem_size > max_physmem){ - highmem = physmem_size - max_physmem; + iomem_size = (iomem_size + PAGE_SIZE - 1) & PAGE_MASK; + max_physmem = get_kmem_end() - uml_physmem - iomem_size - MIN_VMALLOC; + + /* Zones have to begin on a 1 << MAX_ORDER page boundary, + * so this makes sure that's true for highmem + */ + max_physmem &= ~((1 << (PAGE_SHIFT + MAX_ORDER)) - 1); + if(physmem_size + iomem_size > max_physmem){ + highmem = physmem_size + iomem_size - max_physmem; physmem_size -= highmem; #ifndef CONFIG_HIGHMEM highmem = 0; @@ -343,11 +356,19 @@ } high_physmem = uml_physmem + physmem_size; - high_memory = (void *) high_physmem; + end_iomem = high_physmem + iomem_size; + high_memory = (void *) end_iomem; start_vm = VMALLOC_START; - setup_physmem(uml_physmem, uml_reserved, physmem_size); + setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem); + if(init_maps(physmem_size, iomem_size, highmem)){ + printf("Failed to allocate mem_map for %ld bytes of physical " + "memory and %ld bytes of highmem\n", physmem_size, + highmem); + exit(1); + } + virtmem_size = physmem_size; avail = get_kmem_end() - start_vm; if(physmem_size > avail) virtmem_size = avail; @@ -357,28 +378,26 @@ printf("Kernel virtual memory size shrunk to %ld bytes\n", virtmem_size); - err = reserve_vm(high_physmem, end_vm, &kernel_vm_reserved); - if(err){ - printf("Failed to reserve VM area for kernel VM\n"); - exit(1); - } - uml_postsetup(); init_task.thread.kernel_stack = (unsigned long) &init_thread_info + 2 * PAGE_SIZE; task_protections((unsigned long) &init_thread_info); + os_flush_stdout(); return(CHOOSE_MODE(start_uml_tt(), start_uml_skas())); } +extern int uml_exitcode; + static int panic_exit(struct notifier_block *self, unsigned long unused1, void *unused2) { #ifdef CONFIG_MAGIC_SYSRQ - handle_sysrq('p', ¤t->thread.regs, NULL, NULL); + handle_sysrq('p', ¤t->thread.regs, NULL); #endif + uml_exitcode = 1; machine_halt(); return(0); } @@ -403,6 +422,11 @@ arch_check_bugs(); check_ptrace(); check_sigio(); + check_devanon(); +} + +void apply_alternatives(void *start, void *end) +{ } /* diff -Nru a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c --- a/arch/um/kernel/umid.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/kernel/umid.c 2004-09-06 16:37:55 -07:00 @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -33,18 +32,19 @@ static int umid_is_random = 1; static int umid_inited = 0; -static int make_umid(void); +static int make_umid(int (*printer)(const char *fmt, ...)); -static int __init set_umid(char *name, int is_random) +static int __init set_umid(char *name, int is_random, + int (*printer)(const char *fmt, ...)) { if(umid_inited){ - printk("Unique machine name can't be set twice\n"); + (*printer)("Unique machine name can't be set twice\n"); return(-1); } if(strlen(name) > UMID_LEN - 1) - printk("Unique machine name is being truncated to %s " - "characters\n", UMID_LEN); + (*printer)("Unique machine name is being truncated to %s " + "characters\n", UMID_LEN); strlcpy(umid, name, sizeof(umid)); umid_is_random = is_random; @@ -54,7 +54,7 @@ static int __init set_umid_arg(char *name, int *add) { - return(set_umid(name, 0)); + return(set_umid(name, 0, printf)); } __uml_setup("umid=", set_umid_arg, @@ -67,7 +67,7 @@ { int n; - if(!umid_inited && make_umid()) return(-1); + if(!umid_inited && make_umid(printk)) return(-1); n = strlen(uml_dir) + strlen(umid) + strlen(name) + 1; if(n > len){ @@ -85,22 +85,23 @@ { char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; char pid[sizeof("nnnnn\0")]; - int fd; + int fd, n; if(umid_file_name("pid", file, sizeof(file))) return 0; fd = os_open_file(file, of_create(of_excl(of_rdwr(OPENFLAGS()))), 0644); if(fd < 0){ - printk("Open of machine pid file \"%s\" failed - " - "errno = %d\n", file, -fd); + printf("Open of machine pid file \"%s\" failed - " + "err = %d\n", file, -fd); return 0; } sprintf(pid, "%d\n", os_getpid()); - if(write(fd, pid, strlen(pid)) != strlen(pid)) - printk("Write of pid file failed - errno = %d\n", errno); - close(fd); + n = os_write_file(fd, pid, strlen(pid)); + if(n != strlen(pid)) + printf("Write of pid file failed - err = %d\n", -n); + os_close_file(fd); return 0; } @@ -111,7 +112,8 @@ int len; char file[256]; - if((directory = opendir(dir)) == NULL){ + directory = opendir(dir); + if(directory == NULL){ printk("actually_do_remove : couldn't open directory '%s', " "errno = %d\n", dir, errno); return(1); @@ -160,22 +162,24 @@ { char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; char pid[sizeof("nnnnn\0")], *end; - int dead, fd, p; + int dead, fd, p, n; sprintf(file, "%s/pid", dir); dead = 0; - if((fd = os_open_file(file, of_read(OPENFLAGS()), 0)) < 0){ + fd = os_open_file(file, of_read(OPENFLAGS()), 0); + if(fd < 0){ if(fd != -ENOENT){ printk("not_dead_yet : couldn't open pid file '%s', " - "errno = %d\n", file, -fd); + "err = %d\n", file, -fd); return(1); } dead = 1; } if(fd > 0){ - if(read(fd, pid, sizeof(pid)) < 0){ + n = os_read_file(fd, pid, sizeof(pid)); + if(n < 0){ printk("not_dead_yet : couldn't read pid file '%s', " - "errno = %d\n", file, errno); + "err = %d\n", file, -n); return(1); } p = strtoul(pid, &end, 0); @@ -197,7 +201,7 @@ if((strlen(name) > 0) && (name[strlen(name) - 1] != '/')){ uml_dir = malloc(strlen(name) + 1); if(uml_dir == NULL){ - printk("Failed to malloc uml_dir - error = %d\n", + printf("Failed to malloc uml_dir - error = %d\n", errno); uml_dir = name; return(0); @@ -217,7 +221,7 @@ char *home = getenv("HOME"); if(home == NULL){ - printk("make_uml_dir : no value in environment for " + printf("make_uml_dir : no value in environment for " "$HOME\n"); exit(1); } @@ -232,57 +236,59 @@ dir[len + 1] = '\0'; } - if((uml_dir = malloc(strlen(dir) + 1)) == NULL){ + uml_dir = malloc(strlen(dir) + 1); + if(uml_dir == NULL){ printf("make_uml_dir : malloc failed, errno = %d\n", errno); exit(1); } strcpy(uml_dir, dir); if((mkdir(uml_dir, 0777) < 0) && (errno != EEXIST)){ - printk("Failed to mkdir %s - errno = %i\n", uml_dir, errno); + printf("Failed to mkdir %s - errno = %i\n", uml_dir, errno); return(-1); } return 0; } -static int __init make_umid(void) +static int __init make_umid(int (*printer)(const char *fmt, ...)) { int fd, err; char tmp[strlen(uml_dir) + UMID_LEN + 1]; strlcpy(tmp, uml_dir, sizeof(tmp)); - if(*umid == 0){ + if(!umid_inited){ strcat(tmp, "XXXXXX"); fd = mkstemp(tmp); if(fd < 0){ - printk("make_umid - mkstemp failed, errno = %d\n", - errno); + (*printer)("make_umid - mkstemp failed, errno = %d\n", + errno); return(1); } - close(fd); + os_close_file(fd); /* There's a nice tiny little race between this unlink and * the mkdir below. It'd be nice if there were a mkstemp * for directories. */ unlink(tmp); - set_umid(&tmp[strlen(uml_dir)], 1); + set_umid(&tmp[strlen(uml_dir)], 1, printer); } sprintf(tmp, "%s%s", uml_dir, umid); - if((err = mkdir(tmp, 0777)) < 0){ + err = mkdir(tmp, 0777); + if(err < 0){ if(errno == EEXIST){ if(not_dead_yet(tmp)){ - printk("umid '%s' is in use\n", umid); + (*printer)("umid '%s' is in use\n", umid); return(-1); } err = mkdir(tmp, 0777); } } if(err < 0){ - printk("Failed to create %s - errno = %d\n", umid, errno); + (*printer)("Failed to create %s - errno = %d\n", umid, errno); return(-1); } @@ -295,7 +301,13 @@ ); __uml_postsetup(make_uml_dir); -__uml_postsetup(make_umid); + +static int __init make_umid_setup(void) +{ + return(make_umid(printf)); +} + +__uml_postsetup(make_umid_setup); __uml_postsetup(create_pid_file); /* diff -Nru a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/kernel/uml.lds.S 2004-09-06 16:37:52 -07:00 @@ -0,0 +1,96 @@ +#include + +OUTPUT_FORMAT(ELF_FORMAT) +OUTPUT_ARCH(ELF_ARCH) +ENTRY(_start) +jiffies = jiffies_64; + +SECTIONS +{ + . = START + SIZEOF_HEADERS; + + __binary_start = .; +#ifdef MODE_TT + .thread_private : { + __start_thread_private = .; + errno = .; + . += 4; + arch/um/kernel/tt/unmap_fin.o (.data) + __end_thread_private = .; + } + . = ALIGN(4096); + .remap : { arch/um/kernel/tt/unmap_fin.o (.text) } +#endif + + . = ALIGN(4096); /* Init code and data */ + _stext = .; + __init_begin = .; + .init.text : { + _sinittext = .; + *(.init.text) + _einittext = .; + } + . = ALIGN(4096); + .text : + { + *(.text) + SCHED_TEXT + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } + + #include "asm/common.lds.S" + + init.data : { *(init.data) } + .data : + { + . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ + *(.data.init_task) + *(.data) + *(.gnu.linkonce.d*) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .ctors : + { + *(.ctors) + } + .dtors : + { + *(.dtors) + } + + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + PROVIDE (edata = .); + . = ALIGN(0x1000); + .sbss : + { + __bss_start = .; + PROVIDE(_bss_start = .); + *(.sbss) + *(.scommon) + } + .bss : + { + *(.dynbss) + *(.bss) + *(COMMON) + } + _end = . ; + PROVIDE (end = .); + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} diff -Nru a/arch/um/kernel/user_syms.c b/arch/um/kernel/user_syms.c --- a/arch/um/kernel/user_syms.c 2004-09-06 16:37:55 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,113 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "user_util.h" -#include "mem_user.h" -#include "uml-config.h" - -/* Had to steal this from linux/module.h because that file can't be included - * since this includes various user-level headers. - */ - -struct module_symbol -{ - unsigned long value; - const char *name; -}; - -/* Indirect stringification. */ - -#define __MODULE_STRING_1(x) #x -#define __MODULE_STRING(x) __MODULE_STRING_1(x) - -#if !defined(__AUTOCONF_INCLUDED__) - -#define __EXPORT_SYMBOL(sym,str) error config_must_be_included_before_module -#define EXPORT_SYMBOL(var) error config_must_be_included_before_module -#define EXPORT_SYMBOL_NOVERS(var) error config_must_be_included_before_module - -#elif !defined(UML_CONFIG_MODULES) - -#define __EXPORT_SYMBOL(sym,str) -#define EXPORT_SYMBOL(var) -#define EXPORT_SYMBOL_NOVERS(var) - -#else - -#define __EXPORT_SYMBOL(sym, str) \ -const char __kstrtab_##sym[] \ -__attribute__((section(".kstrtab"))) = str; \ -const struct module_symbol __ksymtab_##sym \ -__attribute__((section("__ksymtab"))) = \ -{ (unsigned long)&sym, __kstrtab_##sym } - -#if defined(__MODVERSIONS__) || !defined(UML_CONFIG_MODVERSIONS) -#define EXPORT_SYMBOL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(var)) -#else -#define EXPORT_SYMBOL(var) __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var))) -#endif - -#define EXPORT_SYMBOL_NOVERS(var) __EXPORT_SYMBOL(var, __MODULE_STRING(var)) - -#endif - -EXPORT_SYMBOL(__errno_location); - -EXPORT_SYMBOL(access); -EXPORT_SYMBOL(open); -EXPORT_SYMBOL(open64); -EXPORT_SYMBOL(close); -EXPORT_SYMBOL(read); -EXPORT_SYMBOL(write); -EXPORT_SYMBOL(dup2); -EXPORT_SYMBOL(__xstat); -EXPORT_SYMBOL(__lxstat); -EXPORT_SYMBOL(__lxstat64); -EXPORT_SYMBOL(lseek); -EXPORT_SYMBOL(lseek64); -EXPORT_SYMBOL(chown); -EXPORT_SYMBOL(truncate); -EXPORT_SYMBOL(utime); -EXPORT_SYMBOL(chmod); -EXPORT_SYMBOL(rename); -EXPORT_SYMBOL(__xmknod); - -EXPORT_SYMBOL(symlink); -EXPORT_SYMBOL(link); -EXPORT_SYMBOL(unlink); -EXPORT_SYMBOL(readlink); - -EXPORT_SYMBOL(mkdir); -EXPORT_SYMBOL(rmdir); -EXPORT_SYMBOL(opendir); -EXPORT_SYMBOL(readdir); -EXPORT_SYMBOL(closedir); -EXPORT_SYMBOL(seekdir); -EXPORT_SYMBOL(telldir); - -EXPORT_SYMBOL(ioctl); - -extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset); -extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, - __off64_t __offset); -EXPORT_SYMBOL(pread64); -EXPORT_SYMBOL(pwrite64); - -EXPORT_SYMBOL(statfs); -EXPORT_SYMBOL(statfs64); - -EXPORT_SYMBOL(memcpy); -EXPORT_SYMBOL(getuid); - -EXPORT_SYMBOL(memset); -EXPORT_SYMBOL(strstr); - -EXPORT_SYMBOL(find_iomem); diff -Nru a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c --- a/arch/um/kernel/user_util.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/kernel/user_util.c 2004-09-06 16:37:51 -07:00 @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -81,10 +80,10 @@ int status, ret; while(1){ - if(((ret = waitpid(pid, &status, WUNTRACED)) < 0) || + CATCH_EINTR(ret = waitpid(pid, &status, WUNTRACED)); + if((ret < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != sig)){ if(ret < 0){ - if(errno == EINTR) continue; printk("wait failed, errno = %d\n", errno); } @@ -118,29 +117,36 @@ } } -int clone_and_wait(int (*fn)(void *), void *arg, void *sp, int flags) -{ - int pid; - - pid = clone(fn, sp, flags, arg); - if(pid < 0) return(-1); - wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL); - ptrace(PTRACE_CONT, pid, 0, 0); - return(pid); -} - -int raw(int fd, int complain) +int __raw(int fd, int complain, int now) { struct termios tt; int err; + int when; + + CATCH_EINTR(err = tcgetattr(fd, &tt)); + + if (err < 0) { + if (complain) + printk("tcgetattr failed, errno = %d\n", errno); + return(-errno); + } - tcgetattr(fd, &tt); cfmakeraw(&tt); - err = tcsetattr(fd, TCSANOW, &tt); - if((err < 0) && complain){ - printk("tcsetattr failed, errno = %d\n", errno); + + if (now) + when = TCSANOW; + else + when = TCSADRAIN; + + CATCH_EINTR(err = tcsetattr(fd, when, &tt)); + + if (err < 0) { + if (complain) + printk("tcsetattr failed, errno = %d\n", errno); return(-errno); } + /*XXX: tcsetattr could have applied only some changes + * (and cfmakeraw() is a set of changes) */ return(0); } diff -Nru a/arch/um/main.c b/arch/um/main.c --- a/arch/um/main.c 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,195 +0,0 @@ -/* - * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "user_util.h" -#include "kern_util.h" -#include "mem_user.h" -#include "signal_user.h" -#include "user.h" -#include "init.h" -#include "mode.h" -#include "choose-mode.h" -#include "uml-config.h" - -/* Set in set_stklim, which is called from main and __wrap_malloc. - * __wrap_malloc only calls it if main hasn't started. - */ -unsigned long stacksizelim; - -/* Set in main */ -char *linux_prog; - -#define PGD_BOUND (4 * 1024 * 1024) -#define STACKSIZE (8 * 1024 * 1024) -#define THREAD_NAME_LEN (256) - -static void set_stklim(void) -{ - struct rlimit lim; - - if(getrlimit(RLIMIT_STACK, &lim) < 0){ - perror("getrlimit"); - exit(1); - } - if((lim.rlim_cur == RLIM_INFINITY) || (lim.rlim_cur > STACKSIZE)){ - lim.rlim_cur = STACKSIZE; - if(setrlimit(RLIMIT_STACK, &lim) < 0){ - perror("setrlimit"); - exit(1); - } - } - stacksizelim = (lim.rlim_cur + PGD_BOUND - 1) & ~(PGD_BOUND - 1); -} - -static __init void do_uml_initcalls(void) -{ - initcall_t *call; - - call = &__uml_initcall_start; - while (call < &__uml_initcall_end){; - (*call)(); - call++; - } -} - -static void last_ditch_exit(int sig) -{ - CHOOSE_MODE(kmalloc_ok = 0, (void) 0); - signal(SIGINT, SIG_DFL); - signal(SIGTERM, SIG_DFL); - signal(SIGHUP, SIG_DFL); - uml_cleanup(); - exit(1); -} - -extern int uml_exitcode; - -int main(int argc, char **argv, char **envp) -{ - char **new_argv; - sigset_t mask; - int ret, i; - - /* Enable all signals except SIGIO - in some environments, we can - * enter with some signals blocked - */ - - sigemptyset(&mask); - sigaddset(&mask, SIGIO); - if(sigprocmask(SIG_SETMASK, &mask, NULL) < 0){ - perror("sigprocmask"); - exit(1); - } - -#ifdef UML_CONFIG_MODE_TT - /* Allocate memory for thread command lines */ - if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){ - - char padding[THREAD_NAME_LEN] = { - [ 0 ... THREAD_NAME_LEN - 2] = ' ', '\0' - }; - - new_argv = malloc((argc + 2) * sizeof(char*)); - if(!new_argv) { - perror("Allocating extended argv"); - exit(1); - } - - new_argv[0] = argv[0]; - new_argv[1] = padding; - - for(i = 2; i <= argc; i++) - new_argv[i] = argv[i - 1]; - new_argv[argc + 1] = NULL; - - execvp(new_argv[0], new_argv); - perror("execing with extended args"); - exit(1); - } -#endif - - linux_prog = argv[0]; - - set_stklim(); - - if((new_argv = malloc((argc + 1) * sizeof(char *))) == NULL){ - perror("Mallocing argv"); - exit(1); - } - for(i=0;i #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include #include "user.h" #include "kern_util.h" +#include "user_util.h" #include "net_user.h" #include "etap.h" #include "helper.h" @@ -42,13 +42,14 @@ { struct addr_change change; void *output; + int n; change.what = op; memcpy(change.addr, addr, sizeof(change.addr)); memcpy(change.netmask, netmask, sizeof(change.netmask)); - if(write(fd, &change, sizeof(change)) != sizeof(change)) - printk("etap_change - request failed, errno = %d\n", - errno); + n = os_write_file(fd, &change, sizeof(change)); + if(n != sizeof(change)) + printk("etap_change - request failed, err = %d\n", -n); output = um_kmalloc(page_size()); if(output == NULL) printk("etap_change : Failed to allocate output buffer\n"); @@ -82,15 +83,15 @@ struct etap_pre_exec_data *data = arg; dup2(data->control_remote, 1); - close(data->data_me); - close(data->control_me); + os_close_file(data->data_me); + os_close_file(data->control_me); } static int etap_tramp(char *dev, char *gate, int control_me, int control_remote, int data_me, int data_remote) { struct etap_pre_exec_data pe_data; - int pid, status, err; + int pid, status, err, n; char version_buf[sizeof("nnnnn\0")]; char data_fd_buf[sizeof("nnnnnn\0")]; char gate_buf[sizeof("nnn.nnn.nnn.nnn\0")]; @@ -114,21 +115,22 @@ pe_data.data_me = data_me; pid = run_helper(etap_pre_exec, &pe_data, args, NULL); - if(pid < 0) err = errno; - close(data_remote); - close(control_remote); - if(read(control_me, &c, sizeof(c)) != sizeof(c)){ - printk("etap_tramp : read of status failed, errno = %d\n", - errno); - return(EINVAL); + if(pid < 0) err = pid; + os_close_file(data_remote); + os_close_file(control_remote); + n = os_read_file(control_me, &c, sizeof(c)); + if(n != sizeof(c)){ + printk("etap_tramp : read of status failed, err = %d\n", -n); + return(-EINVAL); } if(c != 1){ printk("etap_tramp : uml_net failed\n"); - err = EINVAL; - if(waitpid(pid, &status, 0) < 0) err = errno; - else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 1)){ + err = -EINVAL; + CATCH_EINTR(n = waitpid(pid, &status, 0)); + if(n < 0) + err = -errno; + else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 1)) printk("uml_net didn't exit with status 1\n"); - } } return(err); } @@ -143,14 +145,14 @@ if(err) return(err); err = os_pipe(data_fds, 0, 0); - if(err){ - printk("data os_pipe failed - errno = %d\n", -err); + if(err < 0){ + printk("data os_pipe failed - err = %d\n", -err); return(err); } err = os_pipe(control_fds, 1, 0); - if(err){ - printk("control os_pipe failed - errno = %d\n", -err); + if(err < 0){ + printk("control os_pipe failed - err = %d\n", -err); return(err); } @@ -167,9 +169,9 @@ kfree(output); } - if(err != 0){ - printk("etap_tramp failed - errno = %d\n", err); - return(-err); + if(err < 0){ + printk("etap_tramp failed - err = %d\n", -err); + return(err); } pri->data_fd = data_fds[0]; @@ -183,11 +185,11 @@ struct ethertap_data *pri = data; iter_addresses(pri->dev, etap_close_addr, &pri->control_fd); - close(fd); + os_close_file(fd); os_shutdown_socket(pri->data_fd, 1, 1); - close(pri->data_fd); + os_close_file(pri->data_fd); pri->data_fd = -1; - close(pri->control_fd); + os_close_file(pri->control_fd); pri->control_fd = -1; } diff -Nru a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c --- a/arch/um/os-Linux/drivers/tuntap_user.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/os-Linux/drivers/tuntap_user.c 2004-09-06 16:37:55 -07:00 @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -19,6 +18,7 @@ #include "net_user.h" #include "tuntap.h" #include "kern_util.h" +#include "user_util.h" #include "user.h" #include "helper.h" #include "os.h" @@ -61,7 +61,7 @@ struct tuntap_pre_exec_data *data = arg; dup2(data->stdout, 1); - close(data->close_me); + os_close_file(data->close_me); } static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, @@ -86,7 +86,7 @@ if(pid < 0) return(-pid); - close(remote); + os_close_file(remote); msg.msg_name = NULL; msg.msg_namelen = 0; @@ -107,19 +107,19 @@ if(n < 0){ printk("tuntap_open_tramp : recvmsg failed - errno = %d\n", errno); - return(errno); + return(-errno); } - waitpid(pid, NULL, 0); + CATCH_EINTR(waitpid(pid, NULL, 0)); cmsg = CMSG_FIRSTHDR(&msg); if(cmsg == NULL){ printk("tuntap_open_tramp : didn't receive a message\n"); - return(EINVAL); + return(-EINVAL); } if((cmsg->cmsg_level != SOL_SOCKET) || (cmsg->cmsg_type != SCM_RIGHTS)){ printk("tuntap_open_tramp : didn't receive a descriptor\n"); - return(EINVAL); + return(-EINVAL); } *fd_out = ((int *) CMSG_DATA(cmsg))[0]; return(0); @@ -133,27 +133,29 @@ int err, fds[2], len, used; err = tap_open_common(pri->dev, pri->gate_addr); - if(err) return(err); + if(err < 0) + return(err); if(pri->fixed_config){ - if((pri->fd = open("/dev/net/tun", O_RDWR)) < 0){ - printk("Failed to open /dev/net/tun, errno = %d\n", - errno); - return(-errno); + pri->fd = os_open_file("/dev/net/tun", of_rdwr(OPENFLAGS()), 0); + if(pri->fd < 0){ + printk("Failed to open /dev/net/tun, err = %d\n", + -pri->fd); + return(pri->fd); } memset(&ifr, 0, sizeof(ifr)); - ifr.ifr_flags = IFF_TAP; + ifr.ifr_flags = IFF_TAP | IFF_NO_PI; strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){ - printk("TUNSETIFF failed, errno = %d", errno); - close(pri->fd); + printk("TUNSETIFF failed, errno = %d\n", errno); + os_close_file(pri->fd); return(-errno); } } else { err = os_pipe(fds, 0, 0); - if(err){ - printk("tuntap_open : os_pipe failed - errno = %d\n", + if(err < 0){ + printk("tuntap_open : os_pipe failed - err = %d\n", -err); return(err); } @@ -166,19 +168,19 @@ fds[1], buffer, len, &used); output = buffer; - if(err == 0){ - pri->dev_name = uml_strdup(buffer); - output += IFNAMSIZ; - printk(output); - free_output_buffer(buffer); - } - else { - printk(output); + if(err < 0) { + printk("%s", output); free_output_buffer(buffer); - printk("tuntap_open_tramp failed - errno = %d\n", err); - return(-err); + printk("tuntap_open_tramp failed - err = %d\n", -err); + return(err); } - close(fds[0]); + + pri->dev_name = uml_strdup(buffer); + output += IFNAMSIZ; + printk("%s", output); + free_output_buffer(buffer); + + os_close_file(fds[0]); iter_addresses(pri->dev, open_addr, pri->dev_name); } @@ -191,7 +193,7 @@ if(!pri->fixed_config) iter_addresses(pri->dev, close_addr, pri->dev_name); - close(fd); + os_close_file(fd); pri->fd = -1; } diff -Nru a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c --- a/arch/um/os-Linux/file.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/os-Linux/file.c 2004-09-06 16:37:55 -07:00 @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include #include @@ -17,33 +19,235 @@ #include "user.h" #include "kern_util.h" -int os_file_type(char *file) +static void copy_stat(struct uml_stat *dst, struct stat64 *src) +{ + *dst = ((struct uml_stat) { + .ust_dev = src->st_dev, /* device */ + .ust_ino = src->st_ino, /* inode */ + .ust_mode = src->st_mode, /* protection */ + .ust_nlink = src->st_nlink, /* number of hard links */ + .ust_uid = src->st_uid, /* user ID of owner */ + .ust_gid = src->st_gid, /* group ID of owner */ + .ust_size = src->st_size, /* total size, in bytes */ + .ust_blksize = src->st_blksize, /* blocksize for filesys I/O */ + .ust_blocks = src->st_blocks, /* number of blocks allocated */ + .ust_atime = src->st_atime, /* time of last access */ + .ust_mtime = src->st_mtime, /* time of last modification */ + .ust_ctime = src->st_ctime, /* time of last change */ + }); +} + +int os_stat_fd(const int fd, struct uml_stat *ubuf) +{ + struct stat64 sbuf; + int err; + + do { + err = fstat64(fd, &sbuf); + } while((err < 0) && (errno == EINTR)) ; + + if(err < 0) + return(-errno); + + if(ubuf != NULL) + copy_stat(ubuf, &sbuf); + return(err); +} + +int os_stat_file(const char *file_name, struct uml_stat *ubuf) +{ + struct stat64 sbuf; + int err; + + do { + err = stat64(file_name, &sbuf); + } while((err < 0) && (errno == EINTR)) ; + + if(err < 0) + return(-errno); + + if(ubuf != NULL) + copy_stat(ubuf, &sbuf); + return(err); +} + +int os_access(const char* file, int mode) +{ + int amode, err; + + amode=(mode&OS_ACC_R_OK ? R_OK : 0) | (mode&OS_ACC_W_OK ? W_OK : 0) | + (mode&OS_ACC_X_OK ? X_OK : 0) | (mode&OS_ACC_F_OK ? F_OK : 0) ; + + err = access(file, amode); + if(err < 0) + return(-errno); + + return(0); +} + +void os_print_error(int error, const char* str) +{ + errno = error < 0 ? -error : error; + + perror(str); +} + +/* FIXME? required only by hostaudio (because it passes ioctls verbatim) */ +int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) +{ + int err; + + err = ioctl(fd, cmd, arg); + if(err < 0) + return(-errno); + + return(err); +} + +int os_window_size(int fd, int *rows, int *cols) +{ + struct winsize size; + + if(ioctl(fd, TIOCGWINSZ, &size) < 0) + return(-errno); + + *rows = size.ws_row; + *cols = size.ws_col; + + return(0); +} + +int os_new_tty_pgrp(int fd, int pid) { - struct stat64 buf; + if(ioctl(fd, TIOCSCTTY, 0) < 0){ + printk("TIOCSCTTY failed, errno = %d\n", errno); + return(-errno); + } + + if(tcsetpgrp(fd, pid) < 0){ + printk("tcsetpgrp failed, errno = %d\n", errno); + return(-errno); + } + + return(0); +} + +/* FIXME: ensure namebuf in os_get_if_name is big enough */ +int os_get_ifname(int fd, char* namebuf) +{ + if(ioctl(fd, SIOCGIFNAME, namebuf) < 0) + return(-errno); + + return(0); +} + +int os_set_slip(int fd) +{ + int disc, sencap; + + disc = N_SLIP; + if(ioctl(fd, TIOCSETD, &disc) < 0){ + printk("Failed to set slip line discipline - " + "errno = %d\n", errno); + return(-errno); + } + + sencap = 0; + if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0){ + printk("Failed to set slip encapsulation - " + "errno = %d\n", errno); + return(-errno); + } + + return(0); +} + +int os_set_owner(int fd, int pid) +{ + if(fcntl(fd, F_SETOWN, pid) < 0){ + int save_errno = errno; + + if(fcntl(fd, F_GETOWN, 0) != pid) + return(-save_errno); + } + + return(0); +} + +/* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */ +int os_sigio_async(int master, int slave) +{ + int flags; - if(stat64(file, &buf) == -1) + flags = fcntl(master, F_GETFL); + if(flags < 0) { + printk("fcntl F_GETFL failed, errno = %d\n", errno); return(-errno); + } + + if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || + (fcntl(master, F_SETOWN, os_getpid()) < 0)){ + printk("fcntl F_SETFL or F_SETOWN failed, errno = %d\n", errno); + return(-errno); + } + + if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)){ + printk("fcntl F_SETFL failed, errno = %d\n", errno); + return(-errno); + } - if(S_ISDIR(buf.st_mode)) return(OS_TYPE_DIR); - else if(S_ISLNK(buf.st_mode)) return(OS_TYPE_SYMLINK); - else if(S_ISCHR(buf.st_mode)) return(OS_TYPE_CHARDEV); - else if(S_ISBLK(buf.st_mode)) return(OS_TYPE_BLOCKDEV); - else if(S_ISFIFO(buf.st_mode)) return(OS_TYPE_FIFO); - else if(S_ISSOCK(buf.st_mode)) return(OS_TYPE_SOCK); + return(0); +} + +int os_mode_fd(int fd, int mode) +{ + int err; + + do { + err = fchmod(fd, mode); + } while((err < 0) && (errno==EINTR)) ; + + if(err < 0) + return(-errno); + + return(0); +} + +int os_file_type(char *file) +{ + struct uml_stat buf; + int err; + + err = os_stat_file(file, &buf); + if(err < 0) + return(err); + + if(S_ISDIR(buf.ust_mode)) return(OS_TYPE_DIR); + else if(S_ISLNK(buf.ust_mode)) return(OS_TYPE_SYMLINK); + else if(S_ISCHR(buf.ust_mode)) return(OS_TYPE_CHARDEV); + else if(S_ISBLK(buf.ust_mode)) return(OS_TYPE_BLOCKDEV); + else if(S_ISFIFO(buf.ust_mode)) return(OS_TYPE_FIFO); + else if(S_ISSOCK(buf.ust_mode)) return(OS_TYPE_SOCK); else return(OS_TYPE_FILE); } int os_file_mode(char *file, struct openflags *mode_out) { + int err; + *mode_out = OPENFLAGS(); - if(!access(file, W_OK)) *mode_out = of_write(*mode_out); - else if(errno != EACCES) - return(-errno); + err = os_access(file, OS_ACC_W_OK); + if((err < 0) && (err != -EACCES)) + return(err); - if(!access(file, R_OK)) *mode_out = of_read(*mode_out); - else if(errno != EACCES) - return(-errno); + *mode_out = of_write(*mode_out); + + err = os_access(file, OS_ACC_R_OK); + if((err < 0) && (err != -EACCES)) + return(err); + + *mode_out = of_read(*mode_out); return(0); } @@ -63,16 +267,14 @@ if(flags.e) f |= O_EXCL; fd = open64(file, f, mode); - if(fd < 0) return(-errno); - - if(flags.cl){ - if(fcntl(fd, F_SETFD, 1)){ - close(fd); - return(-errno); - } + if(fd < 0) + return(-errno); + + if(flags.cl && fcntl(fd, F_SETFD, 1)){ + os_close_file(fd); + return(-errno); } - return(fd); return(fd); } @@ -90,7 +292,7 @@ err = connect(fd, (struct sockaddr *) &sock, sizeof(sock)); if(err) - return(err); + return(-errno); return(fd); } @@ -109,88 +311,162 @@ return(0); } -int os_read_file(int fd, void *buf, int len) +static int fault_buffer(void *start, int len, + int (*copy_proc)(void *addr, void *buf, int len)) { - int n; + int page = getpagesize(), i; + char c; - /* Force buf into memory if it's not already. */ + for(i = 0; i < len; i += page){ + if((*copy_proc)(start + i, &c, sizeof(c))) + return(-EFAULT); + } + if((len % page) != 0){ + if((*copy_proc)(start + len - 1, &c, sizeof(c))) + return(-EFAULT); + } + return(0); +} - /* XXX This fails if buf is kernel memory */ -#ifdef notdef - if(copy_to_user_proc(buf, &c, sizeof(c))) - return(-EFAULT); -#endif +static int file_io(int fd, void *buf, int len, + int (*io_proc)(int fd, void *buf, int len), + int (*copy_user_proc)(void *addr, void *buf, int len)) +{ + int n, err; + + do { + n = (*io_proc)(fd, buf, len); + if((n < 0) && (errno == EFAULT)){ + err = fault_buffer(buf, len, copy_user_proc); + if(err) + return(err); + n = (*io_proc)(fd, buf, len); + } + } while((n < 0) && (errno == EINTR)); - n = read(fd, buf, len); if(n < 0) return(-errno); return(n); } -int os_write_file(int fd, void *buf, int count) +int os_read_file(int fd, void *buf, int len) { - int n; - - /* Force buf into memory if it's not already. */ - - /* XXX This fails if buf is kernel memory */ -#ifdef notdef - if(copy_to_user_proc(buf, buf, buf[0])) - return(-EFAULT); -#endif + return(file_io(fd, buf, len, (int (*)(int, void *, int)) read, + copy_from_user_proc)); +} - n = write(fd, buf, count); - if(n < 0) - return(-errno); - return(n); +int os_write_file(int fd, const void *buf, int len) +{ + return(file_io(fd, (void *) buf, len, + (int (*)(int, void *, int)) write, copy_to_user_proc)); } int os_file_size(char *file, long long *size_out) { - struct stat64 buf; + struct uml_stat buf; + int err; - if(stat64(file, &buf) == -1){ - printk("Couldn't stat \"%s\" : errno = %d\n", file, errno); - return(-errno); + err = os_stat_file(file, &buf); + if(err < 0){ + printk("Couldn't stat \"%s\" : err = %d\n", file, -err); + return(err); } - if(S_ISBLK(buf.st_mode)){ + + if(S_ISBLK(buf.ust_mode)){ int fd, blocks; - if((fd = open64(file, O_RDONLY)) < 0){ - printk("Couldn't open \"%s\", errno = %d\n", file, - errno); - return(-errno); + fd = os_open_file(file, of_read(OPENFLAGS()), 0); + if(fd < 0){ + printk("Couldn't open \"%s\", errno = %d\n", file, -fd); + return(fd); } if(ioctl(fd, BLKGETSIZE, &blocks) < 0){ printk("Couldn't get the block size of \"%s\", " "errno = %d\n", file, errno); - close(fd); - return(-errno); + err = -errno; + os_close_file(fd); + return(err); } *size_out = ((long long) blocks) * 512; - close(fd); + os_close_file(fd); return(0); } - *size_out = buf.st_size; + *size_out = buf.ust_size; + return(0); +} + +int os_file_modtime(char *file, unsigned long *modtime) +{ + struct uml_stat buf; + int err; + + err = os_stat_file(file, &buf); + if(err < 0){ + printk("Couldn't stat \"%s\" : err = %d\n", file, -err); + return(err); + } + + *modtime = buf.ust_mtime; return(0); } +int os_get_exec_close(int fd, int* close_on_exec) +{ + int ret; + + do { + ret = fcntl(fd, F_GETFD); + } while((ret < 0) && (errno == EINTR)) ; + + if(ret < 0) + return(-errno); + + *close_on_exec = (ret&FD_CLOEXEC) ? 1 : 0; + return(ret); +} + +int os_set_exec_close(int fd, int close_on_exec) +{ + int flag, err; + + if(close_on_exec) flag = FD_CLOEXEC; + else flag = 0; + + do { + err = fcntl(fd, F_SETFD, flag); + } while((err < 0) && (errno == EINTR)) ; + + if(err < 0) + return(-errno); + return(err); +} + int os_pipe(int *fds, int stream, int close_on_exec) { int err, type = stream ? SOCK_STREAM : SOCK_DGRAM; err = socketpair(AF_UNIX, type, 0, fds); - if(err) + if(err < 0) return(-errno); if(!close_on_exec) return(0); - if((fcntl(fds[0], F_SETFD, 1) < 0) || (fcntl(fds[1], F_SETFD, 1) < 0)) - printk("os_pipe : Setting FD_CLOEXEC failed, errno = %d", - errno); + err = os_set_exec_close(fds[0], 1); + if(err < 0) + goto error; + + err = os_set_exec_close(fds[1], 1); + if(err < 0) + goto error; return(0); + + error: + printk("os_pipe : Setting FD_CLOEXEC failed, err = %d\n", -err); + os_close_file(fds[1]); + os_close_file(fds[0]); + return(err); } int os_set_fd_async(int fd, int owner) @@ -270,7 +546,7 @@ return(-EINVAL); } err = shutdown(fd, what); - if(err) + if(err < 0) return(-errno); return(0); } @@ -315,7 +591,7 @@ return(new); } -int create_unix_socket(char *file, int len) +int os_create_unix_socket(char *file, int len, int close_on_exec) { struct sockaddr_un addr; int sock, err; @@ -327,6 +603,13 @@ return(-errno); } + if(close_on_exec) { + err = os_set_exec_close(sock, 1); + if(err < 0) + printk("create_unix_socket : close_on_exec failed, " + "err = %d", -err); + } + addr.sun_family = AF_UNIX; /* XXX Be more careful about overflow */ @@ -334,12 +617,43 @@ err = bind(sock, (struct sockaddr *) &addr, sizeof(addr)); if (err < 0){ - printk("create_listening_socket - bind failed, errno = %d\n", - errno); + printk("create_listening_socket at '%s' - bind failed, " + "errno = %d\n", file, errno); return(-errno); } return(sock); +} + +void os_flush_stdout(void) +{ + fflush(stdout); +} + +int os_lock_file(int fd, int excl) +{ + int type = excl ? F_WRLCK : F_RDLCK; + struct flock lock = ((struct flock) { .l_type = type, + .l_whence = SEEK_SET, + .l_start = 0, + .l_len = 0 } ); + int err, save; + + err = fcntl(fd, F_SETLK, &lock); + if(!err) + goto out; + + save = -errno; + err = fcntl(fd, F_GETLK, &lock); + if(err){ + err = -errno; + goto out; + } + + printk("F_SETLK failed, file already locked by pid %d\n", lock.l_pid); + err = save; + out: + return(err); } /* diff -Nru a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c --- a/arch/um/os-Linux/process.c 2004-09-06 16:37:51 -07:00 +++ b/arch/um/os-Linux/process.c 2004-09-06 16:37:51 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -7,35 +7,44 @@ #include #include #include +#include #include #include #include "os.h" #include "user.h" +#include "user_util.h" + +#define ARBITRARY_ADDR -1 +#define FAILURE_PID -1 + +#define STAT_PATH_LEN sizeof("/proc/#######/stat\0") +#define COMM_SCANF "%*[^)])" unsigned long os_process_pc(int pid) { - char proc_stat[sizeof("/proc/#####/stat\0")], buf[256]; + char proc_stat[STAT_PATH_LEN], buf[256]; unsigned long pc; - int fd; + int fd, err; sprintf(proc_stat, "/proc/%d/stat", pid); fd = os_open_file(proc_stat, of_read(OPENFLAGS()), 0); if(fd < 0){ - printk("os_process_pc - couldn't open '%s', errno = %d\n", - proc_stat, errno); - return(-1); + printk("os_process_pc - couldn't open '%s', err = %d\n", + proc_stat, -fd); + return(ARBITRARY_ADDR); } - if(read(fd, buf, sizeof(buf)) < 0){ - printk("os_process_pc - couldn't read '%s', errno = %d\n", - proc_stat, errno); - close(fd); - return(-1); + err = os_read_file(fd, buf, sizeof(buf)); + if(err < 0){ + printk("os_process_pc - couldn't read '%s', err = %d\n", + proc_stat, -err); + os_close_file(fd); + return(ARBITRARY_ADDR); } - close(fd); - pc = -1; - if(sscanf(buf, "%*d %*s %*c %*d %*d %*d %*d %*d %*d %*d %*d " + os_close_file(fd); + pc = ARBITRARY_ADDR; + if(sscanf(buf, "%*d " COMM_SCANF " %*c %*d %*d %*d %*d %*d %*d %*d %*d " "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d " - "%*d %*d %*d %*d %ld", &pc) != 1){ + "%*d %*d %*d %*d %lu", &pc) != 1){ printk("os_process_pc - couldn't find pc in '%s'\n", buf); } return(pc); @@ -43,7 +52,7 @@ int os_process_parent(int pid) { - char stat[sizeof("/proc/nnnnn/stat\0")]; + char stat[STAT_PATH_LEN]; char data[256]; int parent, n, fd; @@ -52,22 +61,22 @@ snprintf(stat, sizeof(stat), "/proc/%d/stat", pid); fd = os_open_file(stat, of_read(OPENFLAGS()), 0); if(fd < 0){ - printk("Couldn't open '%s', errno = %d\n", stat, -fd); - return(-1); + printk("Couldn't open '%s', err = %d\n", stat, -fd); + return(FAILURE_PID); } - n = read(fd, data, sizeof(data)); - close(fd); + n = os_read_file(fd, data, sizeof(data)); + os_close_file(fd); if(n < 0){ - printk("Couldn't read '%s', errno = %d\n", stat); - return(-1); + printk("Couldn't read '%s', err = %d\n", stat, -n); + return(FAILURE_PID); } - parent = -1; - /* XXX This will break if there is a space in the command */ - n = sscanf(data, "%*d %*s %*c %d", &parent); - if(n != 1) printk("Failed to scan '%s'\n", data); + parent = FAILURE_PID; + n = sscanf(data, "%*d " COMM_SCANF " %*c %d", &parent); + if(n != 1) + printk("Failed to scan '%s'\n", data); return(parent); } @@ -81,13 +90,17 @@ { kill(pid, SIGKILL); if(reap_child) - waitpid(pid, NULL, 0); + CATCH_EINTR(waitpid(pid, NULL, 0)); } void os_usr1_process(int pid) { +#ifdef __NR_tkill + syscall(__NR_tkill, pid, SIGUSR1); +#else kill(pid, SIGUSR1); +#endif } int os_getpid(void) @@ -95,7 +108,7 @@ return(getpid()); } -int os_map_memory(void *virt, int fd, unsigned long off, unsigned long len, +int os_map_memory(void *virt, int fd, unsigned long long off, unsigned long len, int r, int w, int x) { void *loc; @@ -104,8 +117,8 @@ prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | (x ? PROT_EXEC : 0); - loc = mmap((void *) virt, len, prot, MAP_SHARED | MAP_FIXED, - fd, off); + loc = mmap64((void *) virt, len, prot, MAP_SHARED | MAP_FIXED, + fd, off); if(loc == MAP_FAILED) return(-errno); return(0); @@ -126,7 +139,8 @@ int err; err = munmap(addr, len); - if(err < 0) return(-errno); + if(err < 0) + return(-errno); return(0); } diff -Nru a/arch/um/os-Linux/tty.c b/arch/um/os-Linux/tty.c --- a/arch/um/os-Linux/tty.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/os-Linux/tty.c 2004-09-06 16:37:53 -07:00 @@ -28,10 +28,10 @@ struct grantpt_info info; int fd; - if((fd = os_open_file("/dev/ptmx", of_rdwr(OPENFLAGS()), 0)) < 0){ - printk("get_pty : Couldn't open /dev/ptmx - errno = %d\n", - errno); - return(-1); + fd = os_open_file("/dev/ptmx", of_rdwr(OPENFLAGS()), 0); + if(fd < 0){ + printk("get_pty : Couldn't open /dev/ptmx - err = %d\n", -fd); + return(fd); } info.fd = fd; @@ -39,7 +39,7 @@ if(info.res < 0){ printk("get_pty : Couldn't grant pty - errno = %d\n", - info.err); + -info.err); return(-1); } if(unlockpt(fd) < 0){ diff -Nru a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/os-Linux/user_syms.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,88 @@ +#include "linux/types.h" +#include "linux/module.h" + +/* Some of this are builtin function (some are not but could in the future), + * so I *must* declare good prototypes for them and then EXPORT them. + * The kernel code uses the macro defined by include/linux/string.h, + * so I undef macros; the userspace code does not include that and I + * add an EXPORT for the glibc one.*/ + +#undef strlen +#undef strstr +#undef memcpy +#undef memset + +extern size_t strlen(const char *); +extern void *memcpy(void *, const void *, size_t); +extern void *memset(void *, int, size_t); +extern int printf(const char *, ...); + +EXPORT_SYMBOL(strlen); +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(printf); + +EXPORT_SYMBOL(strstr); + +/* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. + * However, the modules will use the CRC defined *here*, no matter if it is + * good; so the versions of these symbols will always match + */ +#define EXPORT_SYMBOL_PROTO(sym) \ + int sym(void); \ + EXPORT_SYMBOL(sym); + +EXPORT_SYMBOL_PROTO(__errno_location); + +EXPORT_SYMBOL_PROTO(access); +EXPORT_SYMBOL_PROTO(open); +EXPORT_SYMBOL_PROTO(open64); +EXPORT_SYMBOL_PROTO(close); +EXPORT_SYMBOL_PROTO(read); +EXPORT_SYMBOL_PROTO(write); +EXPORT_SYMBOL_PROTO(dup2); +EXPORT_SYMBOL_PROTO(__xstat); +EXPORT_SYMBOL_PROTO(__lxstat); +EXPORT_SYMBOL_PROTO(__lxstat64); +EXPORT_SYMBOL_PROTO(lseek); +EXPORT_SYMBOL_PROTO(lseek64); +EXPORT_SYMBOL_PROTO(chown); +EXPORT_SYMBOL_PROTO(truncate); +EXPORT_SYMBOL_PROTO(utime); +EXPORT_SYMBOL_PROTO(chmod); +EXPORT_SYMBOL_PROTO(rename); +EXPORT_SYMBOL_PROTO(__xmknod); + +EXPORT_SYMBOL_PROTO(symlink); +EXPORT_SYMBOL_PROTO(link); +EXPORT_SYMBOL_PROTO(unlink); +EXPORT_SYMBOL_PROTO(readlink); + +EXPORT_SYMBOL_PROTO(mkdir); +EXPORT_SYMBOL_PROTO(rmdir); +EXPORT_SYMBOL_PROTO(opendir); +EXPORT_SYMBOL_PROTO(readdir); +EXPORT_SYMBOL_PROTO(closedir); +EXPORT_SYMBOL_PROTO(seekdir); +EXPORT_SYMBOL_PROTO(telldir); + +EXPORT_SYMBOL_PROTO(ioctl); + +EXPORT_SYMBOL_PROTO(pread64); +EXPORT_SYMBOL_PROTO(pwrite64); + +EXPORT_SYMBOL_PROTO(statfs); +EXPORT_SYMBOL_PROTO(statfs64); + +EXPORT_SYMBOL_PROTO(getuid); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile --- a/arch/um/sys-i386/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/um/sys-i386/Makefile 2004-09-06 16:37:51 -07:00 @@ -1,14 +1,18 @@ -obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o module.o \ - ptrace.o ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o +obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \ + ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o time.o obj-$(CONFIG_HIGHMEM) += highmem.o +obj-$(CONFIG_MODULES) += module.o USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) -SYMLINKS = semaphore.c highmem.c module.c +SYMLINKS = bitops.c semaphore.c highmem.c module.c SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) +clean-files := $(SYMLINKS) + +bitops.c-dir = lib semaphore.c-dir = kernel highmem.c-dir = mm module.c-dir = kernel @@ -24,19 +28,4 @@ $(SYMLINKS): $(call make_link,$@) -clean: - $(MAKE) -C util clean - -fastdep: - -dep: - -archmrproper: - rm -f $(SYMLINKS) - -archclean: - -archdep: - -modules: - +subdir- := util diff -Nru a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c --- a/arch/um/sys-i386/bugs.c 2004-09-06 16:37:56 -07:00 +++ b/arch/um/sys-i386/bugs.c 2004-09-06 16:37:56 -07:00 @@ -4,20 +4,21 @@ */ #include -#include #include #include #include +#include #include "kern_util.h" #include "user.h" #include "sysdep/ptrace.h" #include "task.h" +#include "os.h" #define MAXTOKEN 64 /* Set during early boot */ -int cpu_has_cmov = 1; -int cpu_has_xmm = 0; +int host_has_cmov = 1; +int host_has_xmm = 0; static char token(int fd, char *buf, int len, char stop) { @@ -27,13 +28,15 @@ ptr = buf; end = &buf[len]; do { - n = read(fd, ptr, sizeof(*ptr)); + n = os_read_file(fd, ptr, sizeof(*ptr)); c = *ptr++; - if(n == 0) return(0); - else if(n != sizeof(*ptr)){ - printk("Reading /proc/cpuinfo failed, " - "errno = %d\n", errno); - return(-errno); + if(n != sizeof(*ptr)){ + if(n == 0) return(0); + printk("Reading /proc/cpuinfo failed, err = %d\n", -n); + if(n < 0) + return(n); + else + return(-EIO); } } while((c != '\n') && (c != stop) && (ptr < end)); @@ -45,45 +48,79 @@ return(c); } -static int check_cpu_feature(char *feature, int *have_it) +static int find_cpuinfo_line(int fd, char *key, char *scratch, int len) { - char buf[MAXTOKEN], c; - int fd, len = sizeof(buf)/sizeof(buf[0]), n; - - printk("Checking for host processor %s support...", feature); - fd = open("/proc/cpuinfo", O_RDONLY); - if(fd < 0){ - printk("Couldn't open /proc/cpuinfo, errno = %d\n", errno); - return(0); - } + int n; + char c; - *have_it = 0; - buf[len - 1] = '\0'; + scratch[len - 1] = '\0'; while(1){ - c = token(fd, buf, len - 1, ':'); - if(c <= 0) goto out; + c = token(fd, scratch, len - 1, ':'); + if(c <= 0) + return(0); else if(c != ':'){ printk("Failed to find ':' in /proc/cpuinfo\n"); - goto out; + return(0); } - if(!strncmp(buf, "flags", strlen("flags"))) break; + if(!strncmp(scratch, key, strlen(key))) + return(1); do { - n = read(fd, &c, sizeof(c)); + n = os_read_file(fd, &c, sizeof(c)); if(n != sizeof(c)){ printk("Failed to find newline in " - "/proc/cpuinfo, n = %d, errno = %d\n", - n, errno); - goto out; + "/proc/cpuinfo, err = %d\n", -n); + return(0); } } while(c != '\n'); } + return(0); +} + +int cpu_feature(char *what, char *buf, int len) +{ + int fd, ret = 0; + + fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0); + if(fd < 0){ + printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd); + return(0); + } + + if(!find_cpuinfo_line(fd, what, buf, len)){ + printk("Couldn't find '%s' line in /proc/cpuinfo\n", what); + goto out_close; + } + + token(fd, buf, len, '\n'); + ret = 1; + + out_close: + os_close_file(fd); + return(ret); +} + +static int check_cpu_flag(char *feature, int *have_it) +{ + char buf[MAXTOKEN], c; + int fd, len = sizeof(buf)/sizeof(buf[0]); + + printk("Checking for host processor %s support...", feature); + fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0); + if(fd < 0){ + printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd); + return(0); + } + + *have_it = 0; + if(!find_cpuinfo_line(fd, "flags", buf, sizeof(buf) / sizeof(buf[0]))) + goto out; c = token(fd, buf, len - 1, ' '); if(c < 0) goto out; else if(c != ' '){ - printk("Failed to find ':' in /proc/cpuinfo\n"); + printk("Failed to find ' ' in /proc/cpuinfo\n"); goto out; } @@ -100,21 +137,48 @@ out: if(*have_it == 0) printk("No\n"); else if(*have_it == 1) printk("Yes\n"); - close(fd); + os_close_file(fd); return(1); } +#if 0 /* This doesn't work in tt mode, plus it's causing compilation problems + * for some people. + */ +static void disable_lcall(void) +{ + struct modify_ldt_ldt_s ldt; + int err; + + bzero(&ldt, sizeof(ldt)); + ldt.entry_number = 7; + ldt.base_addr = 0; + ldt.limit = 0; + err = modify_ldt(1, &ldt, sizeof(ldt)); + if(err) + printk("Failed to disable lcall7 - errno = %d\n", errno); +} +#endif + +void arch_init_thread(void) +{ +#if 0 + disable_lcall(); +#endif +} + void arch_check_bugs(void) { int have_it; - if(access("/proc/cpuinfo", R_OK)){ + if(os_access("/proc/cpuinfo", OS_ACC_R_OK) < 0){ printk("/proc/cpuinfo not available - skipping CPU capability " "checks\n"); return; } - if(check_cpu_feature("cmov", &have_it)) cpu_has_cmov = have_it; - if(check_cpu_feature("xmm", &have_it)) cpu_has_xmm = have_it; + if(check_cpu_flag("cmov", &have_it)) + host_has_cmov = have_it; + if(check_cpu_flag("xmm", &have_it)) + host_has_xmm = have_it; } int arch_handle_signal(int sig, union uml_pt_regs *regs) @@ -130,18 +194,18 @@ if((*((char *) ip) != 0x0f) || ((*((char *) (ip + 1)) & 0xf0) != 0x40)) return(0); - if(cpu_has_cmov == 0) + if(host_has_cmov == 0) panic("SIGILL caused by cmov, which this processor doesn't " "implement, boot a filesystem compiled for older " "processors"); - else if(cpu_has_cmov == 1) + else if(host_has_cmov == 1) panic("SIGILL caused by cmov, which this processor claims to " "implement"); - else if(cpu_has_cmov == -1) + else if(host_has_cmov == -1) panic("SIGILL caused by cmov, couldn't tell if this processor " "implements it, boot a filesystem compiled for older " "processors"); - else panic("Bad value for cpu_has_cmov (%d)", cpu_has_cmov); + else panic("Bad value for host_has_cmov (%d)", host_has_cmov); return(0); } diff -Nru a/arch/um/sys-i386/extable.c b/arch/um/sys-i386/extable.c --- a/arch/um/sys-i386/extable.c 2004-09-06 16:37:55 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,30 +0,0 @@ -/* - * linux/arch/i386/mm/extable.c - */ - -#include -#include -#include -#include - -/* Simple binary search */ -const struct exception_table_entry * -search_extable(const struct exception_table_entry *first, - const struct exception_table_entry *last, - unsigned long value) -{ - while (first <= last) { - const struct exception_table_entry *mid; - long diff; - - mid = (last - first) / 2 + first; - diff = mid->insn - value; - if (diff == 0) - return mid; - else if (diff < 0) - first = mid+1; - else - last = mid-1; - } - return NULL; -} diff -Nru a/arch/um/sys-i386/fault.c b/arch/um/sys-i386/fault.c --- a/arch/um/sys-i386/fault.c 2004-09-06 16:37:53 -07:00 +++ b/arch/um/sys-i386/fault.c 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2004 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -7,16 +7,24 @@ #include "sysdep/ptrace.h" #include "sysdep/sigcontext.h" -extern unsigned long search_exception_table(unsigned long addr); +/* These two are from asm-um/uaccess.h and linux/module.h, check them. */ +struct exception_table_entry +{ + unsigned long insn; + unsigned long fixup; +}; +const struct exception_table_entry *search_exception_tables(unsigned long add); + +/* Compare this to arch/i386/mm/extable.c:fixup_exception() */ int arch_fixup(unsigned long address, void *sc_ptr) { struct sigcontext *sc = sc_ptr; - unsigned long fixup; + const struct exception_table_entry *fixup; fixup = search_exception_tables(address); if(fixup != 0){ - sc->eip = fixup; + sc->eip = fixup->fixup; return(1); } return(0); diff -Nru a/arch/um/sys-i386/ptrace_user.c b/arch/um/sys-i386/ptrace_user.c --- a/arch/um/sys-i386/ptrace_user.c 2004-09-06 16:37:55 -07:00 +++ b/arch/um/sys-i386/ptrace_user.c 2004-09-06 16:37:55 -07:00 @@ -39,10 +39,10 @@ nregs = sizeof(dummy->u_debugreg)/sizeof(dummy->u_debugreg[0]); for(i = 0; i < nregs; i++){ if((i == 4) || (i == 5)) continue; - if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i], + if(ptrace(PTRACE_POKEUSER, pid, &dummy->u_debugreg[i], regs[i]) < 0) - printk("write_debugregs - ptrace failed, " - "errno = %d\n", errno); + printk("write_debugregs - ptrace failed on " + "register %d, errno = %d\n", errno); } } @@ -54,7 +54,7 @@ dummy = NULL; nregs = sizeof(dummy->u_debugreg)/sizeof(dummy->u_debugreg[0]); for(i = 0; i < nregs; i++){ - regs[i] = ptrace(PTRACE_PEEKUSR, pid, + regs[i] = ptrace(PTRACE_PEEKUSER, pid, &dummy->u_debugreg[i], 0); } } diff -Nru a/arch/um/sys-i386/time.c b/arch/um/sys-i386/time.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/um/sys-i386/time.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,24 @@ +/* + * sys-i386/time.c + * Created 25.9.2002 Sapan Bhatia + * + */ + +unsigned long long time_stamp(void) +{ + unsigned long low, high; + + asm("rdtsc" : "=a" (low), "=d" (high)); + return((((unsigned long long) high) << 32) + low); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/arch/um/sys-i386/util/Makefile b/arch/um/sys-i386/util/Makefile --- a/arch/um/sys-i386/util/Makefile 2004-09-06 16:37:55 -07:00 +++ b/arch/um/sys-i386/util/Makefile 2004-09-06 16:37:55 -07:00 @@ -1,15 +1,11 @@ -hostprogs-y := mk_sc -always := $(hostprogs-y) mk_thread -targets := mk_thread_kern.o mk_thread_user.o +hostprogs-y := mk_sc mk_thread +always := $(hostprogs-y) -mk_sc-objs := mk_sc.o +mk_thread-objs := mk_thread_kern.o mk_thread_user.o -$(obj)/mk_thread : $(obj)/mk_thread_kern.o $(obj)/mk_thread_user.o - $(CC) $(CFLAGS) -o $@ $^ - -$(obj)/mk_thread_user.o : $(src)/mk_thread_user.c - $(CC) $(USER_CFLAGS) -c -o $@ $< +HOSTCFLAGS_mk_thread_kern.o := $(CFLAGS) $(CPPFLAGS) +HOSTCFLAGS_mk_thread_user.o := $(USER_CFLAGS) clean : $(RM) -f $(build-targets) diff -Nru a/arch/um/sys-i386/util/mk_sc.c b/arch/um/sys-i386/util/mk_sc.c --- a/arch/um/sys-i386/util/mk_sc.c 2004-09-06 16:37:54 -07:00 +++ b/arch/um/sys-i386/util/mk_sc.c 2004-09-06 16:37:54 -07:00 @@ -38,6 +38,7 @@ SC_OFFSET("SC_ERR", err); SC_OFFSET("SC_CR2", cr2); SC_OFFSET("SC_FPSTATE", fpstate); + SC_OFFSET("SC_SIGMASK", oldmask); SC_FP_OFFSET("SC_FP_CW", cw); SC_FP_OFFSET("SC_FP_SW", sw); SC_FP_OFFSET("SC_FP_TAG", tag); diff -Nru a/arch/um/sys-ia64/Makefile b/arch/um/sys-ia64/Makefile --- a/arch/um/sys-ia64/Makefile 2004-09-06 16:37:50 -07:00 +++ b/arch/um/sys-ia64/Makefile 2004-09-06 16:37:50 -07:00 @@ -7,18 +7,5 @@ $(OBJ): $(OBJS) rm -f $@ $(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@ -clean: - rm -f $(OBJS) -fastdep: - -archmrproper: - -archclean: - rm -f link.ld - @$(MAKEBOOT) clean - -archdep: - @$(MAKEBOOT) dep - -modules: +clean-files := $(OBJS) link.ld diff -Nru a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile --- a/arch/um/sys-ppc/Makefile 2004-09-06 16:37:52 -07:00 +++ b/arch/um/sys-ppc/Makefile 2004-09-06 16:37:52 -07:00 @@ -66,13 +66,4 @@ $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm -clean: - rm -f $(OBJS) - rm -f ppc_defs.h - rm -f checksum.S semaphore.c mk_defs.c - -fastdep: - -dep: - -modules: +clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c diff -Nru a/arch/um/uml.lds.S b/arch/um/uml.lds.S --- a/arch/um/uml.lds.S 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,92 +0,0 @@ -#include - -OUTPUT_FORMAT(ELF_FORMAT) -OUTPUT_ARCH(ELF_ARCH) -ENTRY(_start) -jiffies = jiffies_64; - -SECTIONS -{ - . = START + SIZEOF_HEADERS; - - . = ALIGN(4096); - __binary_start = .; -#ifdef MODE_TT - .thread_private : { - __start_thread_private = .; - errno = .; - . += 4; - arch/um/kernel/tt/unmap_fin.o (.data) - __end_thread_private = .; - } - . = ALIGN(4096); - .remap : { arch/um/kernel/tt/unmap_fin.o (.text) } -#endif - - . = ALIGN(4096); /* Init code and data */ - _stext = .; - __init_begin = .; - .text.init : { *(.text.init) } - . = ALIGN(4096); - .text : - { - *(.text) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t*) - } - - #include "asm/common.lds.S" - - .data.init : { *(.data.init) } - .data : - { - . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ - *(.data.init_task) - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS - } - .data1 : { *(.data1) } - .ctors : - { - *(.ctors) - } - .dtors : - { - *(.dtors) - } - - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; - PROVIDE (edata = .); - . = ALIGN(0x1000); - .sbss : - { - __bss_start = .; - PROVIDE(_bss_start = .); - *(.sbss) - *(.scommon) - } - .bss : - { - *(.dynbss) - *(.bss) - *(COMMON) - } - _end = . ; - PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } -} diff -Nru a/arch/um/util/Makefile b/arch/um/util/Makefile --- a/arch/um/util/Makefile 2004-09-06 16:37:55 -07:00 +++ b/arch/um/util/Makefile 2004-09-06 16:37:55 -07:00 @@ -1,23 +1,8 @@ -always := mk_task mk_constants -targets := mk_task_user.o mk_task_kern.o \ - mk_constants_user.o mk_constants_kern.o +hostprogs-y := mk_task mk_constants +always := $(hostprogs-y) -$(obj)/mk_task: $(obj)/mk_task_user.o $(obj)/mk_task_kern.o - $(CC) -o $@ $^ +mk_task-objs := mk_task_user.o mk_task_kern.o +mk_constants-objs := mk_constants_user.o mk_constants_kern.o -$(obj)/mk_task_user.o: $(src)/mk_task_user.c - $(CC) -o $@ -c $< - -$(obj)/mk_constants : $(obj)/mk_constants_user.o $(obj)/mk_constants_kern.o - $(CC) -o $@ $^ - -$(obj)/mk_constants_user.o : $(src)/mk_constants_user.c - $(CC) -c $< -o $@ - -$(obj)/mk_constants_kern.o : $(src)/mk_constants_kern.c - $(CC) $(CFLAGS) -c $< -o $@ - -clean: - $(RM) $(build-targets) - -archmrproper: +HOSTCFLAGS_mk_task_kern.o := $(CFLAGS) $(CPPFLAGS) +HOSTCFLAGS_mk_constants_kern.o := $(CFLAGS) $(CPPFLAGS) diff -Nru a/arch/um/util/mk_constants_kern.c b/arch/um/util/mk_constants_kern.c --- a/arch/um/util/mk_constants_kern.c 2004-09-06 16:37:50 -07:00 +++ b/arch/um/util/mk_constants_kern.c 2004-09-06 16:37:50 -07:00 @@ -1,5 +1,6 @@ #include "linux/kernel.h" #include "linux/stringify.h" +#include "linux/time.h" #include "asm/page.h" extern void print_head(void); @@ -11,6 +12,7 @@ { print_head(); print_constant_int("UM_KERN_PAGE_SIZE", PAGE_SIZE); + print_constant_str("UM_KERN_EMERG", KERN_EMERG); print_constant_str("UM_KERN_ALERT", KERN_ALERT); print_constant_str("UM_KERN_CRIT", KERN_CRIT); @@ -19,6 +21,8 @@ print_constant_str("UM_KERN_NOTICE", KERN_NOTICE); print_constant_str("UM_KERN_INFO", KERN_INFO); print_constant_str("UM_KERN_DEBUG", KERN_DEBUG); + + print_constant_int("UM_NSEC_PER_SEC", NSEC_PER_SEC); print_tail(); return(0); } diff -Nru a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c --- a/arch/v850/kernel/irq.c 2004-09-06 16:37:54 -07:00 +++ b/arch/v850/kernel/irq.c 2004-09-06 16:37:54 -07:00 @@ -141,13 +141,15 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ + int ret; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) diff -Nru a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c --- a/arch/v850/kernel/setup.c 2004-09-06 16:37:52 -07:00 +++ b/arch/v850/kernel/setup.c 2004-09-06 16:37:52 -07:00 @@ -280,8 +280,8 @@ #if ((PAGE_OFFSET >> PAGE_SHIFT) & ((1UL << (MAX_ORDER - 1)) - 1)) #error MAX_ORDER is too large for given PAGE_OFFSET (use CONFIG_FORCE_MAX_ZONEORDER to change it) #endif - - free_area_init_node (0, NODE_DATA(0), 0, zones_size, + NODE_DATA(0)->node_mem_map = NULL; + free_area_init_node (0, NODE_DATA(0), zones_size, ADDR_TO_PAGE (PAGE_OFFSET), 0); mem_map = NODE_DATA(0)->node_mem_map; } diff -Nru a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c --- a/arch/v850/kernel/signal.c 2004-09-06 16:37:55 -07:00 +++ b/arch/v850/kernel/signal.c 2004-09-06 16:37:55 -07:00 @@ -344,9 +344,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -421,9 +419,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* diff -Nru a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c --- a/arch/v850/kernel/time.c 2004-09-06 16:37:53 -07:00 +++ b/arch/v850/kernel/time.c 2004-09-06 16:37:53 -07:00 @@ -40,24 +40,6 @@ return (unsigned long long)jiffies * (1000000000 / HZ); } -static inline void do_profile (unsigned long pc) -{ - if (prof_buffer && current->pid) { - extern int _stext; - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - if (pc < prof_len) - ++prof_buffer[pc]; - else - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - ++prof_buffer[prof_len-1]; - } -} - /* * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick @@ -74,10 +56,7 @@ mach_tick (); do_timer (regs); - - if (! user_mode (regs)) - do_profile (regs->pc); - + profile_tick(CPU_PROFILING, regs); #if 0 /* * If we have an externally synchronized Linux clock, then update diff -Nru a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S --- a/arch/v850/kernel/vmlinux.lds.S 2004-09-06 16:37:53 -07:00 +++ b/arch/v850/kernel/vmlinux.lds.S 2004-09-06 16:37:53 -07:00 @@ -111,9 +111,6 @@ *(.init.setup) /* 2.5 convention */ \ *(.setup.init) /* 2.4 convention */ \ ___setup_end = . ; \ - ___start___param = . ; \ - *(__param) \ - ___stop___param = . ; \ ___initcall_start = . ; \ *(.initcall.init) \ *(.initcall1.init) \ diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/Kconfig 2004-09-06 16:37:54 -07:00 @@ -347,6 +347,17 @@ depends on PCI select ACPI_BOOT +config UNORDERED_IO + bool "Unordered IO mapping access" + depends on EXPERIMENTAL + select UNORDERED_IO + help + Use unordered stores to access IO memory mappings in device drivers. + Still very experimental. When a driver works on IA64/ppc64/pa-risc it should + work with this option, but it makes the drivers behave differently + from i386. Requires that the driver writer used memory barriers + properly. + source "drivers/pci/Kconfig" source "drivers/pcmcia/Kconfig" diff -Nru a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug --- a/arch/x86_64/Kconfig.debug 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/Kconfig.debug 2004-09-06 16:37:51 -07:00 @@ -18,6 +18,18 @@ Fill __init and __initdata at the end of boot. This helps debugging illegal uses of __init and __initdata after initialization. +config SCHEDSTATS + bool "Collect scheduler statistics" + depends on DEBUG_KERNEL && PROC_FS + help + If you say Y here, additional code will be inserted into the + scheduler and related routines to collect statistics about + scheduler behavior and provide them in /proc/schedstat. These + stats may be useful for both tuning and debugging the scheduler + If you aren't debugging the scheduler or trying to tune a specific + application, you can say N to avoid the very slight overhead + this adds. + config FRAME_POINTER bool "Compile the kernel with frame pointers" help diff -Nru a/arch/x86_64/Makefile b/arch/x86_64/Makefile --- a/arch/x86_64/Makefile 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/Makefile 2004-09-06 16:37:54 -07:00 @@ -77,6 +77,7 @@ all: bzImage BOOTIMAGE := arch/x86_64/boot/bzImage +KBUILD_IMAGE := $(BOOTIMAGE) bzImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE) diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig 2004-09-06 16:37:53 -07:00 +++ b/arch/x86_64/defconfig 2004-09-06 16:37:53 -07:00 @@ -17,7 +17,6 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y # # General setup @@ -29,12 +28,13 @@ CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=18 -# CONFIG_HOTPLUG is not set +CONFIG_HOTPLUG=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -104,8 +104,8 @@ CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set -CONFIG_ACPI_TOSHIBA=y -CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_TOSHIBA is not set +# CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y @@ -115,7 +115,23 @@ # # CPU Frequency scaling # -# CONFIG_CPU_FREQ is not set +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_PROC_INTF=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_24_API is not set +CONFIG_CPU_FREQ_TABLE=y + +# +# CPUFreq processor drivers +# +CONFIG_X86_POWERNOW_K8=y +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +CONFIG_X86_ACPI_CPUFREQ=y +CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y # # Bus options (PCI etc.) @@ -123,10 +139,27 @@ CONFIG_PCI=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y +CONFIG_UNORDERED_IO=y +CONFIG_PCI_MSI=y # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set # +# PCMCIA/CardBus support +# +# CONFIG_PCMCIA is not set + +# +# PCI Hotplug Support +# +CONFIG_HOTPLUG_PCI=y +# CONFIG_HOTPLUG_PCI_FAKE is not set +# CONFIG_HOTPLUG_PCI_ACPI is not set +# CONFIG_HOTPLUG_PCI_CPCI is not set +# CONFIG_HOTPLUG_PCI_PCIE is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set + +# # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y @@ -144,6 +177,9 @@ # # Generic Driver Options # +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # @@ -171,7 +207,7 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y @@ -186,10 +222,10 @@ # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y -# CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set @@ -234,7 +270,7 @@ # CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set +CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -273,16 +309,24 @@ # SCSI low-level drivers # CONFIG_BLK_DEV_3W_XXXX_RAID=y +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set +CONFIG_SCSI_AIC79XX=y +CONFIG_AIC79XX_CMDS_PER_DEVICE=32 +CONFIG_AIC79XX_RESET_DELAY_MS=2000 +# CONFIG_AIC79XX_BUILD_FIRMWARE is not set +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y # CONFIG_SCSI_MEGARAID is not set CONFIG_SCSI_SATA=y # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y +# CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set @@ -290,7 +334,6 @@ CONFIG_SCSI_SATA_VIA=y # CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set @@ -392,6 +435,7 @@ # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -431,8 +475,7 @@ # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set -CONFIG_AMD8111_ETH=y -# CONFIG_AMD8111E_NAPI is not set +# CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set CONFIG_FORCEDETH=y @@ -442,16 +485,13 @@ # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -# CONFIG_8139TOO_8129 is not set -# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -602,6 +642,9 @@ # CONFIG_DRM is not set # CONFIG_MWAVE is not set CONFIG_RAW_DRIVER=y +CONFIG_HPET=y +# CONFIG_HPET_RTC_IRQ is not set +CONFIG_HPET_MMAP=y CONFIG_MAX_RAW_DEVS=256 CONFIG_HANGCHECK_TIMER=y @@ -611,6 +654,11 @@ # CONFIG_I2C is not set # +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# # Misc devices # # CONFIG_IBM_ASM is not set @@ -703,17 +751,8 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_MIDI is not set # CONFIG_USB_ACM is not set -CONFIG_USB_PRINTER=y -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_HP8200e is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_STORAGE is not set # # USB Human Interface Devices (HID) @@ -830,7 +869,8 @@ # # DOS/FAT/NT Filesystems # -# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # @@ -856,6 +896,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -909,10 +950,11 @@ # CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_INIT_DEBUG is not set +CONFIG_INIT_DEBUG=y # CONFIG_DEBUG_INFO is not set # CONFIG_FRAME_POINTER is not set -# CONFIG_IOMMU_DEBUG is not set +CONFIG_IOMMU_DEBUG=y +# CONFIG_IOMMU_LEAK is not set # # Security options @@ -927,5 +969,6 @@ # # Library routines # +# CONFIG_CRC_CCITT is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c --- a/arch/x86_64/ia32/ia32_binfmt.c 2004-09-06 16:37:50 -07:00 +++ b/arch/x86_64/ia32/ia32_binfmt.c 2004-09-06 16:37:50 -07:00 @@ -301,6 +301,9 @@ #define elf_addr_t __u32 +#undef TASK_SIZE +#define TASK_SIZE 0xffffffff + static void elf32_init(struct pt_regs *); #include "../../../fs/binfmt_elf.c" @@ -365,7 +368,7 @@ mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? PAGE_COPY_EXEC : PAGE_COPY; insert_vm_struct(mm, mpnt); - mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; + mm->stack_vm = mm->total_vm = vma_pages(mpnt); } for (i = 0 ; i < MAX_ARG_PAGES ; i++) { diff -Nru a/arch/x86_64/ia32/ia32_ioctl.c b/arch/x86_64/ia32/ia32_ioctl.c --- a/arch/x86_64/ia32/ia32_ioctl.c 2004-09-06 16:37:53 -07:00 +++ b/arch/x86_64/ia32/ia32_ioctl.c 2004-09-06 16:37:53 -07:00 @@ -171,23 +171,8 @@ COMPATIBLE_IOCTL(HDIO_SET_KEEPSETTINGS) COMPATIBLE_IOCTL(HDIO_SCAN_HWIF) COMPATIBLE_IOCTL(BLKRASET) -COMPATIBLE_IOCTL(BLKFRASET) COMPATIBLE_IOCTL(0x4B50) /* KDGHWCLK - not in the kernel, but don't complain */ COMPATIBLE_IOCTL(0x4B51) /* KDSHWCLK - not in the kernel, but don't complain */ -COMPATIBLE_IOCTL(RTC_AIE_ON) -COMPATIBLE_IOCTL(RTC_AIE_OFF) -COMPATIBLE_IOCTL(RTC_UIE_ON) -COMPATIBLE_IOCTL(RTC_UIE_OFF) -COMPATIBLE_IOCTL(RTC_PIE_ON) -COMPATIBLE_IOCTL(RTC_PIE_OFF) -COMPATIBLE_IOCTL(RTC_WIE_ON) -COMPATIBLE_IOCTL(RTC_WIE_OFF) -COMPATIBLE_IOCTL(RTC_ALM_SET) -COMPATIBLE_IOCTL(RTC_ALM_READ) -COMPATIBLE_IOCTL(RTC_RD_TIME) -COMPATIBLE_IOCTL(RTC_SET_TIME) -COMPATIBLE_IOCTL(RTC_WKALM_SET) -COMPATIBLE_IOCTL(RTC_WKALM_RD) COMPATIBLE_IOCTL(FIOQSIZE) /* And these ioctls need translation */ diff -Nru a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c --- a/arch/x86_64/ia32/ia32_signal.c 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/ia32/ia32_signal.c 2004-09-06 16:37:55 -07:00 @@ -74,6 +74,8 @@ err |= __put_user(from->si_utime, &to->si_utime); err |= __put_user(from->si_stime, &to->si_stime); err |= __put_user(from->si_status, &to->si_status); + err |= put_compat_rusage(&from->si_rusage, + &to->si_rusage); default: case __SI_KILL >> 16: err |= __put_user(from->si_uid, &to->si_uid); @@ -115,7 +117,8 @@ } asmlinkage long -sys32_sigsuspend(int history0, int history1, old_sigset_t mask, struct pt_regs regs) +sys32_sigsuspend(int history0, int history1, old_sigset_t mask, + struct pt_regs *regs) { sigset_t saveset; @@ -126,11 +129,11 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - regs.rax = -EINTR; + regs->rax = -EINTR; while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(®s, &saveset)) + if (do_signal(regs, &saveset)) return -EINTR; } } @@ -138,7 +141,7 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr, stack_ia32_t __user *uoss_ptr, - struct pt_regs regs) + struct pt_regs *regs) { stack_t uss,uoss; int ret; @@ -155,7 +158,7 @@ } seg = get_fs(); set_fs(KERNEL_DS); - ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs.rsp); + ret = do_sigaltstack(uss_ptr ? &uss : NULL, &uoss, regs->rsp); set_fs(seg); if (ret >= 0 && uoss_ptr) { if (!access_ok(VERIFY_WRITE,uoss_ptr,sizeof(stack_ia32_t)) || @@ -274,9 +277,9 @@ return 1; } -asmlinkage long sys32_sigreturn(struct pt_regs regs) +asmlinkage long sys32_sigreturn(struct pt_regs *regs) { - struct sigframe __user *frame = (struct sigframe __user *)(regs.rsp-8); + struct sigframe __user *frame = (struct sigframe __user *)(regs->rsp-8); sigset_t set; unsigned int eax; @@ -294,20 +297,23 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (ia32_restore_sigcontext(®s, &frame->sc, &eax)) + if (ia32_restore_sigcontext(regs, &frame->sc, &eax)) goto badframe; return eax; badframe: - signal_fault(®s, frame, "32bit sigreturn"); + signal_fault(regs, frame, "32bit sigreturn"); return 0; } -asmlinkage long sys32_rt_sigreturn(struct pt_regs regs) +asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) { - struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs.rsp - 4); + struct rt_sigframe __user *frame; sigset_t set; unsigned int eax; + struct pt_regs tregs; + + frame = (struct rt_sigframe __user *)(regs->rsp - 4); if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; @@ -320,16 +326,17 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (ia32_restore_sigcontext(®s, &frame->uc.uc_mcontext, &eax)) + if (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax)) goto badframe; - if (sys32_sigaltstack(&frame->uc.uc_stack, NULL, regs) == -EFAULT) + tregs = *regs; + if (sys32_sigaltstack(&frame->uc.uc_stack, NULL, &tregs) == -EFAULT) goto badframe; return eax; badframe: - signal_fault(®s,frame,"32bit rt sigreturn"); + signal_fault(regs,frame,"32bit rt sigreturn"); return 0; } @@ -494,9 +501,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - signal_fault(regs,frame,"32bit signal deliver"); + force_sigsegv(sig, current); } void ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -590,8 +595,6 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - signal_fault(regs, frame, "32bit rt signal setup"); + force_sigsegv(sig, current); } diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S --- a/arch/x86_64/ia32/ia32entry.S 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/ia32/ia32entry.S 2004-09-06 16:37:52 -07:00 @@ -270,35 +270,32 @@ ret CFI_ENDPROC - .macro PTREGSCALL label, func + .macro PTREGSCALL label, func, arg .globl \label \label: leaq \func(%rip),%rax + leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */ jmp ia32_ptregs_common .endm - PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn - PTREGSCALL stub32_sigreturn, sys32_sigreturn - PTREGSCALL stub32_sigaltstack, sys32_sigaltstack - PTREGSCALL stub32_sigsuspend, sys32_sigsuspend - PTREGSCALL stub32_execve, sys32_execve - PTREGSCALL stub32_fork, sys_fork - PTREGSCALL stub32_clone, sys32_clone - PTREGSCALL stub32_vfork, sys_vfork - PTREGSCALL stub32_iopl, sys_iopl - PTREGSCALL stub32_rt_sigsuspend, sys_rt_sigsuspend + PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi + PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi + PTREGSCALL stub32_sigaltstack, sys32_sigaltstack, %rdx + PTREGSCALL stub32_sigsuspend, sys32_sigsuspend, %rcx + PTREGSCALL stub32_execve, sys32_execve, %rcx + PTREGSCALL stub32_fork, sys_fork, %rdi + PTREGSCALL stub32_clone, sys32_clone, %rdx + PTREGSCALL stub32_vfork, sys_vfork, %rdi + PTREGSCALL stub32_iopl, sys_iopl, %rsi + PTREGSCALL stub32_rt_sigsuspend, sys_rt_sigsuspend, %rdx ENTRY(ia32_ptregs_common) CFI_STARTPROC popq %r11 SAVE_REST - movq %r11, %r15 call *%rax - movq %r15, %r11 RESTORE_REST - leaq ia32_sysret(%rip),%r11 - pushq %r11 - ret + jmp ia32_sysret /* misbalances the return cache */ CFI_ENDPROC .data @@ -332,7 +329,7 @@ .quad sys_getuid16 .quad sys_stime /* stime */ /* 25 */ .quad sys32_ptrace /* ptrace */ - .quad sys_alarm /* XXX sign extension??? */ + .quad sys_alarm .quad sys_fstat /* (old)fstat */ .quad sys_pause .quad compat_sys_utime /* 30 */ @@ -558,7 +555,7 @@ .quad sys_fadvise64 /* 250 */ .quad quiet_ni_syscall /* free_huge_pages */ .quad sys_exit_group - .quad sys_lookup_dcookie + .quad sys32_lookup_dcookie .quad sys_epoll_create .quad sys_epoll_ctl /* 255 */ .quad sys_epoll_wait @@ -589,6 +586,7 @@ .quad compat_sys_mq_notify .quad compat_sys_mq_getsetattr .quad quiet_ni_syscall /* reserved for kexec */ + .quad sys32_waitid /* don't forget to change IA32_NR_syscalls */ ia32_syscall_end: .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 diff -Nru a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c --- a/arch/x86_64/ia32/ptrace32.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/ia32/ptrace32.c 2004-09-06 16:37:51 -07:00 @@ -249,8 +249,8 @@ case PTRACE_GETFPREGS: case PTRACE_SETFPXREGS: case PTRACE_GETFPXREGS: + case PTRACE_GETEVENTMSG: break; - } child = find_target(request, pid, &ret); @@ -362,6 +362,10 @@ ret = 0; break; } + + case PTRACE_GETEVENTMSG: + ret = put_user(child->ptrace_message,(unsigned int __user *)(u64)data); + break; default: ret = -EINVAL; diff -Nru a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c --- a/arch/x86_64/ia32/sys_ia32.c 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/ia32/sys_ia32.c 2004-09-06 16:37:52 -07:00 @@ -1125,7 +1125,7 @@ } asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv, - compat_uptr_t __user *envp, struct pt_regs regs) + compat_uptr_t __user *envp, struct pt_regs *regs) { long error; char * filename; @@ -1134,21 +1134,40 @@ error = PTR_ERR(filename); if (IS_ERR(filename)) return error; - error = compat_do_execve(filename, argv, envp, ®s); + error = compat_do_execve(filename, argv, envp, regs); if (error == 0) current->ptrace &= ~PT_DTRACE; putname(filename); return error; } -asmlinkage long sys32_clone(unsigned int clone_flags, unsigned int newsp, struct pt_regs regs) +asmlinkage long sys32_clone(unsigned int clone_flags, unsigned int newsp, + struct pt_regs *regs) { - void __user *parent_tid = (void __user *)regs.rdx; - void __user *child_tid = (void __user *)regs.rdi; + void __user *parent_tid = (void __user *)regs->rdx; + void __user *child_tid = (void __user *)regs->rdi; if (!newsp) - newsp = regs.rsp; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, - parent_tid, child_tid); + newsp = regs->rsp; + return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); +} + +asmlinkage long sys32_waitid(int which, compat_pid_t pid, + siginfo_t32 __user *uinfo, int options) +{ + siginfo_t info; + long ret; + mm_segment_t old_fs = get_fs(); + + info.si_signo = 0; + set_fs (KERNEL_DS); + ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options); + set_fs (old_fs); + + if (ret < 0 || info.si_signo == 0) + return ret; + BUG_ON(info.si_code & __SI_MASK); + info.si_code |= __SI_CHLD; + return ia32_copy_siginfo_to_user(uinfo, &info); } /* @@ -1336,6 +1355,12 @@ } return -ENOSYS; } + +long sys32_lookup_dcookie(u32 addr_low, u32 addr_high, + char __user * buf, size_t len) +{ + return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len); +} cond_syscall(sys32_ipc) diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile --- a/arch/x86_64/kernel/Makefile 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/kernel/Makefile 2004-09-06 16:37:54 -07:00 @@ -25,7 +25,6 @@ obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o pci-dma.o obj-$(CONFIG_SWIOTLB) += swiotlb.o -obj-$(CONFIG_SCHED_SMT) += domain.o obj-$(CONFIG_MODULES) += module.o diff -Nru a/arch/x86_64/kernel/Makefile-HEAD b/arch/x86_64/kernel/Makefile-HEAD --- a/arch/x86_64/kernel/Makefile-HEAD 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,38 +0,0 @@ -# -# Makefile for the linux kernel. -# - -extra-y := head.o head64.o init_task.o vmlinux.lds -EXTRA_AFLAGS := -traditional -obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \ - x8664_ksyms.o i387.o syscall.o vsyscall.o \ - setup64.o bootflag.o e820.o reboot.o warmreboot.o -obj-y += mce.o - -obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ -obj-$(CONFIG_ACPI_BOOT) += acpi/ -obj-$(CONFIG_X86_MSR) += msr.o -obj-$(CONFIG_MICROCODE) += microcode.o -obj-$(CONFIG_X86_CPUID) += cpuid.o -obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o -obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o -obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o -obj-$(CONFIG_PM) += suspend.o -obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o -obj-$(CONFIG_CPU_FREQ) += cpufreq/ -obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o -obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o pci-dma.o -obj-$(CONFIG_SWIOTLB) += swiotlb.o -obj-$(CONFIG_SCHED_SMT) += domain.o - -obj-$(CONFIG_MODULES) += module.o - -obj-y += topology.o - -bootflag-y += ../../i386/kernel/bootflag.o -cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o -topology-y += ../../i386/mach-default/topology.o -swiotlb-$(CONFIG_SWIOTLB) += ../../ia64/lib/swiotlb.o -microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o diff -Nru a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c --- a/arch/x86_64/kernel/aperture.c 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/kernel/aperture.c 2004-09-06 16:37:54 -07:00 @@ -31,6 +31,8 @@ int fallback_aper_order __initdata = 1; /* 64MB */ int fallback_aper_force __initdata = 0; +int fix_aperture __initdata = 1; + /* This code runs before the PCI subsystem is initialized, so just access the northbridge directly. */ @@ -202,7 +204,7 @@ u64 aper_base; int valid_agp = 0; - if (iommu_aperture_disabled) + if (iommu_aperture_disabled || !fix_aperture) return; printk("Checking aperture...\n"); @@ -241,20 +243,15 @@ /* Got the aperture from the AGP bridge */ } else if ((!no_iommu && end_pfn >= 0xffffffff>>PAGE_SHIFT) || force_iommu || - valid_agp || + valid_agp || fallback_aper_force) { - /* When there is a AGP bridge in the system assume the - user wants to use the AGP driver too and needs an - aperture. However this case (AGP but no good - aperture) should only happen with a more broken than - usual BIOS, because it would even break Windows. */ - - printk("Your BIOS doesn't leave a aperture memory hole\n"); - printk("Please enable the IOMMU option in the BIOS setup\n"); - printk("This costs you %d MB of RAM\n", 32 << fallback_aper_order); - + printk("Your BIOS doesn't leave a aperture memory hole\n"); + printk("Please enable the IOMMU option in the BIOS setup\n"); + printk("This costs you %d MB of RAM\n", + 32 << fallback_aper_order); + aper_order = fallback_aper_order; - aper_alloc = allocate_aperture(); + aper_alloc = allocate_aperture(); if (!aper_alloc) { /* Could disable AGP and IOMMU here, but it's probably not worth it. But the later users cannot deal with diff -Nru a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c --- a/arch/x86_64/kernel/apic.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/apic.c 2004-09-06 16:37:51 -07:00 @@ -836,8 +836,7 @@ { int cpu = smp_processor_id(); - x86_do_profile(regs); - + profile_tick(CPU_PROFILING, regs); if (--per_cpu(prof_counter, cpu) <= 0) { /* * The multiplier may have changed since the last time we got diff -Nru a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig --- a/arch/x86_64/kernel/cpufreq/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/kernel/cpufreq/Kconfig 2004-09-06 16:37:55 -07:00 @@ -46,4 +46,53 @@ depends on ((X86_POWERNOW_K8 = "m" && ACPI_PROCESSOR) || (X86_POWERNOW_K8 = "y" && ACPI_PROCESSOR = "y")) default y +config X86_SPEEDSTEP_CENTRINO + tristate "Intel Enhanced SpeedStep" + depends on CPU_FREQ_TABLE + help + This adds the CPUFreq driver for Enhanced SpeedStep enabled + mobile CPUs. This means Intel Pentium M (Centrino) CPUs + or 64bit enabled Intel Xeons. + + For details, take a look at . + + If in doubt, say N. + +config X86_SPEEDSTEP_CENTRINO_TABLE + bool + depends on X86_SPEEDSTEP_CENTRINO + default y + +config X86_SPEEDSTEP_CENTRINO_ACPI + bool "Use ACPI tables to decode valid frequency/voltage pairs (EXPERIMENTAL)" + depends on EXPERIMENTAL + depends on ((X86_SPEEDSTEP_CENTRINO = "m" && ACPI_PROCESSOR) || (X86_SPEEDSTEP_CENTRINO = "y" && ACPI_PROCESSOR = "y")) + help + Use primarily the information provided in the BIOS ACPI tables + to determine valid CPU frequency and voltage pairings. + + If in doubt, say Y. + +config X86_ACPI_CPUFREQ + tristate "ACPI Processor P-States driver" + depends on CPU_FREQ_TABLE && ACPI_PROCESSOR + help + This driver adds a CPUFreq driver which utilizes the ACPI + Processor Performance States. + + For details, take a look at . + + If in doubt, say N. + +config X86_ACPI_CPUFREQ_PROC_INTF + bool "/proc/acpi/processor/../performance interface (deprecated)" + depends on X86_ACPI_CPUFREQ && PROC_FS + help + This enables the deprecated /proc/acpi/processor/../performance + interface. While it is helpful for debugging, the generic, + cross-architecture cpufreq interfaces should be used. + + If in doubt, say N. + endmenu + diff -Nru a/arch/x86_64/kernel/cpufreq/Makefile b/arch/x86_64/kernel/cpufreq/Makefile --- a/arch/x86_64/kernel/cpufreq/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/cpufreq/Makefile 2004-09-06 16:37:51 -07:00 @@ -2,6 +2,12 @@ # Reuse the i386 cpufreq drivers # +SRCDIR := ../../../i386/kernel/cpu/cpufreq + obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o +obj-$(CONFIG_X86_SPEEDSTEP_CENTRINO) += speedstep-centrino.o +obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi.o -powernow-k8-objs := ../../../i386/kernel/cpu/cpufreq/powernow-k8.o +powernow-k8-objs := ${SRCDIR}/powernow-k8.o +speedstep-centrino-objs := ${SRCDIR}/speedstep-centrino.o +acpi-objs := ${SRCDIR}/acpi.o diff -Nru a/arch/x86_64/kernel/domain.c b/arch/x86_64/kernel/domain.c --- a/arch/x86_64/kernel/domain.c 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,93 +0,0 @@ -#include -#include - -/* Don't do any NUMA setup on Opteron right now. They seem to be - better off with flat scheduling. This is just for SMT. */ - -#ifdef CONFIG_SCHED_SMT - -static struct sched_group sched_group_cpus[NR_CPUS]; -static struct sched_group sched_group_phys[NR_CPUS]; -static DEFINE_PER_CPU(struct sched_domain, cpu_domains); -static DEFINE_PER_CPU(struct sched_domain, phys_domains); -__init void arch_init_sched_domains(void) -{ - int i; - struct sched_group *first = NULL, *last = NULL; - - /* Set up domains */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - struct sched_domain *phys_domain = &per_cpu(phys_domains, i); - - *cpu_domain = SD_SIBLING_INIT; - /* Disable SMT NICE for CMP */ - /* RED-PEN use a generic flag */ - if (cpu_data[i].x86_vendor == X86_VENDOR_AMD) - cpu_domain->flags &= ~SD_SHARE_CPUPOWER; - cpu_domain->span = cpu_sibling_map[i]; - cpu_domain->parent = phys_domain; - cpu_domain->groups = &sched_group_cpus[i]; - - *phys_domain = SD_CPU_INIT; - phys_domain->span = cpu_possible_map; - phys_domain->groups = &sched_group_phys[first_cpu(cpu_domain->span)]; - } - - /* Set up CPU (sibling) groups */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - int j; - first = last = NULL; - - if (i != first_cpu(cpu_domain->span)) - continue; - - for_each_cpu_mask(j, cpu_domain->span) { - struct sched_group *cpu = &sched_group_cpus[j]; - - cpus_clear(cpu->cpumask); - cpu_set(j, cpu->cpumask); - cpu->cpu_power = SCHED_LOAD_SCALE; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - } - - first = last = NULL; - /* Set up physical groups */ - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - struct sched_group *cpu = &sched_group_phys[i]; - - if (i != first_cpu(cpu_domain->span)) - continue; - - cpu->cpumask = cpu_domain->span; - /* - * Make each extra sibling increase power by 10% of - * the basic CPU. This is very arbitrary. - */ - cpu->cpu_power = SCHED_LOAD_SCALE + SCHED_LOAD_SCALE*(cpus_weight(cpu->cpumask)-1) / 10; - - if (!first) - first = cpu; - if (last) - last->next = cpu; - last = cpu; - } - last->next = first; - - mb(); - for_each_cpu(i) { - struct sched_domain *cpu_domain = &per_cpu(cpu_domains, i); - cpu_attach_domain(cpu_domain, i); - } -} - -#endif diff -Nru a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c --- a/arch/x86_64/kernel/early_printk.c 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/kernel/early_printk.c 2004-09-06 16:37:54 -07:00 @@ -8,7 +8,7 @@ /* Simple VGA output */ #ifdef __i386__ -#define VGABASE __pa(__PAGE_OFFSET + 0xb8000UL) +#define VGABASE __pa((void *)(__PAGE_OFFSET + 0xb8000UL)) #else #define VGABASE 0xffffffff800b8000UL #endif @@ -99,18 +99,17 @@ #define DEFAULT_BAUD 9600 -static __init void early_serial_init(char *opt) +static __init void early_serial_init(char *s) { unsigned char c; unsigned divisor; unsigned baud = DEFAULT_BAUD; - char *s, *e; + char *e; - if (*opt == ',') - ++opt; + if (*s == ',') + ++s; - s = strsep(&opt, ","); - if (s != NULL) { + if (*s) { unsigned port; if (!strncmp(s,"0x",2)) { early_serial_base = simple_strtoul(s, &e, 16); @@ -124,6 +123,9 @@ port = 0; early_serial_base = bases[port]; } + s += strcspn(s, ","); + if (*s == ',') + s++; } outb(0x3, early_serial_base + LCR); /* 8n1 */ @@ -131,8 +133,7 @@ outb(0, early_serial_base + FCR); /* no fifo */ outb(0x3, early_serial_base + MCR); /* DTR + RTS */ - s = strsep(&opt, ","); - if (s != NULL) { + if (*s) { baud = simple_strtoul(s, &e, 0); if (baud == 0 || s == e) baud = DEFAULT_BAUD; diff -Nru a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S --- a/arch/x86_64/kernel/entry.S 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/kernel/entry.S 2004-09-06 16:37:52 -07:00 @@ -324,19 +324,20 @@ * Certain special system calls that need to save a complete full stack frame. */ - .macro PTREGSCALL label,func + .macro PTREGSCALL label,func,arg .globl \label \label: leaq \func(%rip),%rax + leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */ jmp ptregscall_common .endm - PTREGSCALL stub_clone, sys_clone - PTREGSCALL stub_fork, sys_fork - PTREGSCALL stub_vfork, sys_vfork - PTREGSCALL stub_rt_sigsuspend, sys_rt_sigsuspend - PTREGSCALL stub_sigaltstack, sys_sigaltstack - PTREGSCALL stub_iopl, sys_iopl + PTREGSCALL stub_clone, sys_clone, %r8 + PTREGSCALL stub_fork, sys_fork, %rdi + PTREGSCALL stub_vfork, sys_vfork, %rdi + PTREGSCALL stub_rt_sigsuspend, sys_rt_sigsuspend, %rdx + PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx + PTREGSCALL stub_iopl, sys_iopl, %rsi ENTRY(ptregscall_common) CFI_STARTPROC @@ -386,6 +387,7 @@ CFI_STARTPROC addq $8, %rsp SAVE_REST + movq %rsp,%rdi FIXUP_TOP_OF_STACK %r11 call sys_rt_sigreturn movq %rax,RAX(%rsp) # fixme, this could be done at the higher layer diff -Nru a/arch/x86_64/kernel/ioport.c b/arch/x86_64/kernel/ioport.c --- a/arch/x86_64/kernel/ioport.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/ioport.c 2004-09-06 16:37:51 -07:00 @@ -83,9 +83,9 @@ * code. */ -asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs) +asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs) { - unsigned int old = (regs.eflags >> 12) & 3; + unsigned int old = (regs->eflags >> 12) & 3; if (level > 3) return -EINVAL; @@ -94,6 +94,6 @@ if (!capable(CAP_SYS_RAWIO)) return -EPERM; } - regs.eflags = (regs.eflags &~ 0x3000UL) | (level << 12); + regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12); return 0; } diff -Nru a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c --- a/arch/x86_64/kernel/irq.c 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/kernel/irq.c 2004-09-06 16:37:52 -07:00 @@ -213,13 +213,15 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action) { int status = 1; /* Force the "do bottom halves" bit */ + int ret; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -862,31 +864,6 @@ #endif -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, - const char __user *buffer, - unsigned long count, void *data) -{ - unsigned long full_count = count, err; - cpumask_t new_value, *mask = (cpumask_t *)data; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - #define MAX_NAMELEN 10 static void register_irq_proc (unsigned int irq) @@ -922,26 +899,15 @@ #endif } -unsigned long prof_cpu_mask = -1; - void init_irq_proc (void) { - struct proc_dir_entry *entry; int i; /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", NULL); /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - if (!entry) - return; - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. @@ -949,4 +915,3 @@ for (i = 0; i < NR_IRQS; i++) register_irq_proc(i); } - diff -Nru a/arch/x86_64/kernel/ldt.c b/arch/x86_64/kernel/ldt.c --- a/arch/x86_64/kernel/ldt.c 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/kernel/ldt.c 2004-09-06 16:37:55 -07:00 @@ -135,6 +135,7 @@ return 0; if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES) bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES; + down(&mm->context.sem); size = mm->context.size*LDT_ENTRY_SIZE; if (size > bytecount) @@ -145,12 +146,17 @@ err = -EFAULT; up(&mm->context.sem); if (err < 0) - return err; + goto error_return; if (size != bytecount) { /* zero-fill the rest */ - clear_user(ptr+size, bytecount-size); + if (clear_user(ptr+size, bytecount-size) != 0) { + err = -EFAULT; + goto error_return; + } } return bytecount; +error_return: + return err; } static int read_default_ldt(void __user * ptr, unsigned long bytecount) diff -Nru a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c --- a/arch/x86_64/kernel/mce.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/mce.c 2004-09-06 16:37:51 -07:00 @@ -24,7 +24,8 @@ #define MISC_MCELOG_MINOR 227 #define NR_BANKS 5 -static int mce_disabled __initdata; +static int mce_dont_init; + /* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic, 3: never panic or exit (for testing only) */ static int tolerant = 1; @@ -113,9 +114,8 @@ static int mce_available(struct cpuinfo_x86 *c) { - return !mce_disabled && - test_bit(X86_FEATURE_MCE, &c->x86_capability) && - test_bit(X86_FEATURE_MCA, &c->x86_capability); + return test_bit(X86_FEATURE_MCE, &c->x86_capability) && + test_bit(X86_FEATURE_MCA, &c->x86_capability); } /* @@ -127,8 +127,9 @@ struct mce m, panicm; int nowayout = (tolerant < 1); int kill_it = 0; - u64 mcestart; + u64 mcestart = 0; int i; + int panicm_found = 0; if (regs) notify_die(DIE_NMI, "machine check", regs, error_code, 255, SIGKILL); @@ -138,17 +139,11 @@ memset(&m, 0, sizeof(struct mce)); m.cpu = hard_smp_processor_id(); rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus); - if (!regs && (m.mcgstatus & MCG_STATUS_MCIP)) - return; if (!(m.mcgstatus & MCG_STATUS_RIPV)) kill_it = 1; - if (regs) { - m.rip = regs->rip; - m.cs = regs->cs; - } rdtscll(mcestart); - mb(); + barrier(); for (i = 0; i < banks; i++) { if (!bank[i]) @@ -156,52 +151,62 @@ m.misc = 0; m.addr = 0; + m.bank = i; + m.tsc = 0; rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status); if ((m.status & MCI_STATUS_VAL) == 0) continue; - /* Should be implied by the banks check above, but - check it anyways */ - if ((m.status & MCI_STATUS_EN) == 0) - continue; - /* Did this bank cause the exception? */ - /* Assume that the bank with uncorrectable errors did it, - and that there is only a single one. */ - if (m.status & MCI_STATUS_UC) { - panicm = m; - } else { - m.rip = 0; - m.cs = 0; + if (m.status & MCI_STATUS_EN) { + /* In theory _OVER could be a nowayout too, but + assume any overflowed errors were no fatal. */ + nowayout |= !!(m.status & MCI_STATUS_PCC); + kill_it |= !!(m.status & MCI_STATUS_UC); } - /* In theory _OVER could be a nowayout too, but - assume any overflowed errors were no fatal. */ - nowayout |= !!(m.status & MCI_STATUS_PCC); - kill_it |= !!(m.status & MCI_STATUS_UC); - m.bank = i; - if (m.status & MCI_STATUS_MISCV) rdmsrl(MSR_IA32_MC0_MISC + i*4, m.misc); if (m.status & MCI_STATUS_ADDRV) rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr); - rdtscll(m.tsc); + if (regs && (m.mcgstatus & MCG_STATUS_RIPV)) { + m.rip = regs->rip; + m.cs = regs->cs; + } else { + m.rip = 0; + m.cs = 0; + } + + if (error_code != -1) + rdtscll(m.tsc); wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0); mce_log(&m); + + /* Did this bank cause the exception? */ + /* Assume that the bank with uncorrectable errors did it, + and that there is only a single one. */ + if ((m.status & MCI_STATUS_UC) && (m.status & MCI_STATUS_EN)) { + panicm = m; + panicm_found = 1; + } } - wrmsrl(MSR_IA32_MCG_STATUS, 0); /* Never do anything final in the polling timer */ if (!regs) - return; + goto out; + + /* If we didn't find an uncorrectable error, pick + the last one (shouldn't happen, just being safe). */ + if (!panicm_found) + panicm = m; if (nowayout) - mce_panic("Machine check", &m, mcestart); + mce_panic("Machine check", &panicm, mcestart); if (kill_it) { int user_space = 0; if (m.mcgstatus & MCG_STATUS_RIPV) - user_space = m.rip && (m.cs & 3); + user_space = panicm.rip && (panicm.cs & 3); /* When the machine was in user space and the CPU didn't get confused it's normally not necessary to panic, unless you @@ -214,18 +219,15 @@ (unsigned)current->pid <= 1) mce_panic("Uncorrected machine check", &panicm, mcestart); - /* do_exit takes an awful lot of locks and has as slight risk - of deadlocking. If you don't want that don't set tolerant >= 2 */ + /* do_exit takes an awful lot of locks and has as + slight risk of deadlocking. If you don't want that + don't set tolerant >= 2 */ if (tolerant < 3) do_exit(SIGBUS); } -} -static void mce_clear_all(void) -{ - int i; - for (i = 0; i < banks; i++) - wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0); + out: + /* Last thing done in the machine check exception to clear state. */ wrmsrl(MSR_IA32_MCG_STATUS, 0); } @@ -268,22 +270,25 @@ int i; rdmsrl(MSR_IA32_MCG_CAP, cap); - if (cap & MCG_CTL_P) - wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); - banks = cap & 0xff; if (banks > NR_BANKS) { printk(KERN_INFO "MCE: warning: using only %d banks\n", banks); banks = NR_BANKS; } - mce_clear_all(); + /* Log the machine checks left over from the previous reset. + This also clears all registers */ + do_machine_check(NULL, -1); + + set_in_cr4(X86_CR4_MCE); + + if (cap & MCG_CTL_P) + wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); + for (i = 0; i < banks; i++) { wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]); wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); } - - set_in_cr4(X86_CR4_MCE); } /* Add per CPU specific workarounds here */ @@ -307,7 +312,9 @@ mce_cpu_quirks(c); - if (test_and_set_bit(smp_processor_id(), &mce_cpus) || !mce_available(c)) + if (mce_dont_init || + test_and_set_bit(smp_processor_id(), &mce_cpus) || + !mce_available(c)) return; mce_init(NULL); @@ -410,15 +417,16 @@ static int __init mcheck_disable(char *str) { - mce_disabled = 1; + mce_dont_init = 1; return 0; } -/* mce=off disable machine check */ +/* mce=off disables machine check. Note you can reenable it later + using sysfs */ static int __init mcheck_enable(char *str) { if (!strcmp(str, "off")) - mce_disabled = 1; + mce_dont_init = 1; else printk("mce= argument %s ignored. Please use /sys", str); return 0; @@ -434,7 +442,6 @@ /* On resume clear all MCE state. Don't want to see leftovers from the BIOS. */ static int mce_resume(struct sys_device *dev) { - mce_clear_all(); on_each_cpu(mce_init, NULL, 1, 1); return 0; } @@ -492,7 +499,7 @@ if (!err) err = sysdev_register(&device_mce); if (!err) { - /* could create per CPU objects, but is not worth it. */ + /* could create per CPU objects, but it is not worth it. */ sysdev_create_file(&device_mce, &attr_bank0ctl); sysdev_create_file(&device_mce, &attr_bank1ctl); sysdev_create_file(&device_mce, &attr_bank2ctl); diff -Nru a/arch/x86_64/kernel/msr.c b/arch/x86_64/kernel/msr.c --- a/arch/x86_64/kernel/msr.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/msr.c 2004-09-06 16:37:51 -07:00 @@ -46,234 +46,229 @@ static inline int wrmsr_eio(u32 reg, u32 eax, u32 edx) { - int err; + int err; - asm volatile( - "1: wrmsr\n" - "2:\n" - ".section .fixup,\"ax\"\n" - "3: movl %4,%0\n" - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 8\n" - " .quad 1b,3b\n" - ".previous" - : "=&bDS" (err) - : "a" (eax), "d" (edx), "c" (reg), "i" (-EIO), "0" (0)); + asm volatile ("1: wrmsr\n" + "2:\n" + ".section .fixup,\"ax\"\n" + "3: movl %4,%0\n" + " jmp 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 8\n" " .quad 1b,3b\n" ".previous":"=&bDS" (err) + :"a"(eax), "d"(edx), "c"(reg), "i"(-EIO), "0"(0)); - return err; + return err; } static inline int rdmsr_eio(u32 reg, u32 *eax, u32 *edx) { - int err; + int err; - asm volatile( - "1: rdmsr\n" - "2:\n" - ".section .fixup,\"ax\"\n" - "3: movl %4,%0\n" - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 8\n" - " .quad 1b,3b\n" - ".previous" - : "=&bDS" (err), "=a" (*eax), "=d" (*edx) - : "c" (reg), "i" (-EIO), "0" (0)); + asm volatile ("1: rdmsr\n" + "2:\n" + ".section .fixup,\"ax\"\n" + "3: movl %4,%0\n" + " jmp 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 8\n" + " .quad 1b,3b\n" + ".previous":"=&bDS" (err), "=a"(*eax), "=d"(*edx) + :"c"(reg), "i"(-EIO), "0"(0)); - return err; + return err; } #ifdef CONFIG_SMP struct msr_command { - int cpu; - int err; - u32 reg; - u32 data[2]; + int cpu; + int err; + u32 reg; + u32 data[2]; }; static void msr_smp_wrmsr(void *cmd_block) { - struct msr_command *cmd = (struct msr_command *) cmd_block; - - if ( cmd->cpu == smp_processor_id() ) - cmd->err = wrmsr_eio(cmd->reg, cmd->data[0], cmd->data[1]); + struct msr_command *cmd = (struct msr_command *)cmd_block; + + if (cmd->cpu == smp_processor_id()) + cmd->err = wrmsr_eio(cmd->reg, cmd->data[0], cmd->data[1]); } static void msr_smp_rdmsr(void *cmd_block) { - struct msr_command *cmd = (struct msr_command *) cmd_block; - - if ( cmd->cpu == smp_processor_id() ) - cmd->err = rdmsr_eio(cmd->reg, &cmd->data[0], &cmd->data[1]); + struct msr_command *cmd = (struct msr_command *)cmd_block; + + if (cmd->cpu == smp_processor_id()) + cmd->err = rdmsr_eio(cmd->reg, &cmd->data[0], &cmd->data[1]); } static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx) { - struct msr_command cmd; - int ret; + struct msr_command cmd; + int ret; + + preempt_disable(); + if (cpu == smp_processor_id()) { + ret = wrmsr_eio(reg, eax, edx); + } else { + cmd.cpu = cpu; + cmd.reg = reg; + cmd.data[0] = eax; + cmd.data[1] = edx; - preempt_disable(); - if ( cpu == smp_processor_id() ) { - ret = wrmsr_eio(reg, eax, edx); - } else { - cmd.cpu = cpu; - cmd.reg = reg; - cmd.data[0] = eax; - cmd.data[1] = edx; - - smp_call_function(msr_smp_wrmsr, &cmd, 1, 1); - ret = cmd.err; - } - preempt_enable(); - return ret; + smp_call_function(msr_smp_wrmsr, &cmd, 1, 1); + ret = cmd.err; + } + preempt_enable(); + return ret; } -static inline int do_rdmsr(int cpu, u32 reg, u32 *eax, u32 *edx) +static inline int do_rdmsr(int cpu, u32 reg, u32 * eax, u32 * edx) { - struct msr_command cmd; - int ret; + struct msr_command cmd; + int ret; + + preempt_disable(); + if (cpu == smp_processor_id()) { + ret = rdmsr_eio(reg, eax, edx); + } else { + cmd.cpu = cpu; + cmd.reg = reg; + + smp_call_function(msr_smp_rdmsr, &cmd, 1, 1); - preempt_disable(); - if ( cpu == smp_processor_id() ) { - ret = rdmsr_eio(reg, eax, edx); - } else { - cmd.cpu = cpu; - cmd.reg = reg; - - smp_call_function(msr_smp_rdmsr, &cmd, 1, 1); - - *eax = cmd.data[0]; - *edx = cmd.data[1]; - - ret = cmd.err; - } - preempt_enable(); - return ret; + *eax = cmd.data[0]; + *edx = cmd.data[1]; + + ret = cmd.err; + } + preempt_enable(); + return ret; } -#else /* ! CONFIG_SMP */ +#else /* ! CONFIG_SMP */ static inline int do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx) { - return wrmsr_eio(reg, eax, edx); + return wrmsr_eio(reg, eax, edx); } static inline int do_rdmsr(int cpu, u32 reg, u32 *eax, u32 *edx) { - return rdmsr_eio(reg, eax, edx); + return rdmsr_eio(reg, eax, edx); } -#endif /* ! CONFIG_SMP */ +#endif /* ! CONFIG_SMP */ static loff_t msr_seek(struct file *file, loff_t offset, int orig) { - loff_t ret = -EINVAL; - lock_kernel(); - switch (orig) { - case 0: - file->f_pos = offset; - ret = file->f_pos; - break; - case 1: - file->f_pos += offset; - ret = file->f_pos; - } - unlock_kernel(); - return ret; -} - -static ssize_t msr_read(struct file * file, char __user * buf, - size_t count, loff_t *ppos) -{ - char __user *tmp = buf; - u32 data[2]; - size_t rv; - u32 reg = *ppos; - int cpu = iminor(file->f_dentry->d_inode); - int err; - - if ( count % 8 ) - return -EINVAL; /* Invalid chunk size */ - - for ( rv = 0 ; count ; count -= 8 ) { - err = do_rdmsr(cpu, reg, &data[0], &data[1]); - if ( err ) - return err; - if ( copy_to_user(tmp,&data,8) ) - return -EFAULT; - tmp += 8; - } + loff_t ret = -EINVAL; + + lock_kernel(); + switch (orig) { + case 0: + file->f_pos = offset; + ret = file->f_pos; + break; + case 1: + file->f_pos += offset; + ret = file->f_pos; + } + unlock_kernel(); + return ret; +} + +static ssize_t msr_read(struct file *file, char __user * buf, + size_t count, loff_t * ppos) +{ + u32 __user *tmp = (u32 __user *) buf; + u32 data[2]; + size_t rv; + u32 reg = *ppos; + int cpu = iminor(file->f_dentry->d_inode); + int err; + + if (count % 8) + return -EINVAL; /* Invalid chunk size */ + + for (rv = 0; count; count -= 8) { + err = do_rdmsr(cpu, reg, &data[0], &data[1]); + if (err) + return err; + if (copy_to_user(tmp, &data, 8)) + return -EFAULT; + tmp += 2; + } - return tmp - buf; + return ((char __user *)tmp) - buf; } -static ssize_t msr_write(struct file * file, const char __user * buf, +static ssize_t msr_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - const char __user *tmp = buf; - u32 data[2]; - size_t rv; - u32 reg = *ppos; - int cpu = iminor(file->f_dentry->d_inode); - int err; - - if ( count % 8 ) - return -EINVAL; /* Invalid chunk size */ - - for ( rv = 0 ; count ; count -= 8 ) { - if ( copy_from_user(&data,tmp,8) ) - return -EFAULT; - err = do_wrmsr(cpu, reg, data[0], data[1]); - if ( err ) - return err; - tmp += 8; - } + const u32 __user *tmp = (const u32 __user *)buf; + u32 data[2]; + size_t rv; + u32 reg = *ppos; + int cpu = iminor(file->f_dentry->d_inode); + int err; + + if (count % 8) + return -EINVAL; /* Invalid chunk size */ + + for (rv = 0; count; count -= 8) { + if (copy_from_user(&data, tmp, 8)) + return -EFAULT; + err = do_wrmsr(cpu, reg, data[0], data[1]); + if (err) + return err; + tmp += 2; + } - return tmp - buf; + return ((char __user *)tmp) - buf; } static int msr_open(struct inode *inode, struct file *file) { - int cpu = iminor(file->f_dentry->d_inode); - struct cpuinfo_x86 *c = &(cpu_data)[cpu]; - - if (cpu >= NR_CPUS || !cpu_online(cpu)) - return -ENXIO; /* No such CPU */ - if ( !cpu_has(c, X86_FEATURE_MSR) ) - return -EIO; /* MSR not supported */ - - return 0; + unsigned int cpu = iminor(file->f_dentry->d_inode); + struct cpuinfo_x86 *c = &(cpu_data)[cpu]; + + if (cpu >= NR_CPUS || !cpu_online(cpu)) + return -ENXIO; /* No such CPU */ + if (!cpu_has(c, X86_FEATURE_MSR)) + return -EIO; /* MSR not supported */ + + return 0; } /* * File operations we support */ static struct file_operations msr_fops = { - .owner = THIS_MODULE, - .llseek = msr_seek, - .read = msr_read, - .write = msr_write, - .open = msr_open, + .owner = THIS_MODULE, + .llseek = msr_seek, + .read = msr_read, + .write = msr_write, + .open = msr_open, }; int __init msr_init(void) { - if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) { - printk(KERN_ERR "msr: unable to get major %d for msr\n", - MSR_MAJOR); - return -EBUSY; - } - - return 0; + if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) { + printk(KERN_ERR "msr: unable to get major %d for msr\n", + MSR_MAJOR); + return -EBUSY; + } + + return 0; } void __exit msr_exit(void) { - unregister_chrdev(MSR_MAJOR, "cpu/msr"); + unregister_chrdev(MSR_MAJOR, "cpu/msr"); } module_init(msr_init); diff -Nru a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c --- a/arch/x86_64/kernel/pci-dma.c 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/kernel/pci-dma.c 2004-09-06 16:37:55 -07:00 @@ -1,5 +1,5 @@ /* - * Dynamic DMA mapping support. Common code + * Dynamic DMA mapping support. */ #include @@ -24,38 +24,37 @@ * Device ownership issues as mentioned above for pci_map_single are * the same here. */ -int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents, int direction) +int dma_map_sg(struct device *hwdev, struct scatterlist *sg, + int nents, int direction) { int i; - BUG_ON(direction == PCI_DMA_NONE); + BUG_ON(direction == DMA_NONE); for (i = 0; i < nents; i++ ) { struct scatterlist *s = &sg[i]; BUG_ON(!s->page); - s->dma_address = pci_map_page(hwdev, s->page, s->offset, - s->length, direction); + s->dma_address = virt_to_bus(page_address(s->page) +s->offset); s->dma_length = s->length; } return nents; } -EXPORT_SYMBOL(pci_map_sg); +EXPORT_SYMBOL(dma_map_sg); /* Unmap a set of streaming mode DMA translations. * Again, cpu read rules concerning calls here are the same as for * pci_unmap_single() above. */ -void pci_unmap_sg(struct pci_dev *dev, struct scatterlist *sg, - int nents, int dir) +void dma_unmap_sg(struct device *dev, struct scatterlist *sg, + int nents, int dir) { int i; for (i = 0; i < nents; i++) { struct scatterlist *s = &sg[i]; BUG_ON(s->page == NULL); BUG_ON(s->dma_address == 0); - pci_unmap_single(dev, s->dma_address, s->dma_length, dir); + dma_unmap_single(dev, s->dma_address, s->dma_length, dir); } } -EXPORT_SYMBOL(pci_unmap_sg); +EXPORT_SYMBOL(dma_unmap_sg); diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c --- a/arch/x86_64/kernel/pci-gart.c 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/kernel/pci-gart.c 2004-09-06 16:37:52 -07:00 @@ -31,12 +31,6 @@ #include #include -#ifdef CONFIG_PREEMPT -#define preempt_atomic() in_atomic() -#else -#define preempt_atomic() 1 -#endif - dma_addr_t bad_dma_address; unsigned long iommu_bus_base; /* GART remapping area (physical) */ @@ -54,7 +48,7 @@ int panic_on_overflow = 0; int force_iommu = 0; #endif -int iommu_merge = 0; +int iommu_merge = 1; int iommu_sac_force = 0; /* If this is disabled the IOMMU will use an optimized flushing strategy @@ -64,6 +58,10 @@ also seen with Qlogic at least). */ int iommu_fullflush = 1; +/* This tells the BIO block layer to assume merging. Default to off + because we cannot guarantee merging later. */ +int iommu_bio_merge = 0; + #define MAX_NB 8 /* Allocation bitmap for the remapping area */ @@ -104,8 +102,16 @@ static unsigned long next_bit; /* protected by iommu_bitmap_lock */ static int need_flush; /* global flush state. set for each gart wrap */ -static dma_addr_t pci_map_area(struct pci_dev *dev, unsigned long phys_mem, - size_t size, int dir); +static dma_addr_t dma_map_area(struct device *dev, unsigned long phys_mem, + size_t size, int dir, int do_panic); + +/* Dummy device used for NULL arguments (normally ISA). Better would + be probably a smaller DMA mask, but this is bug-to-bug compatible to i386. */ +static struct device fallback_dev = { + .bus_id = "fallback device", + .coherent_dma_mask = 0xffffffff, + .dma_mask = &fallback_dev.coherent_dma_mask, +}; static unsigned long alloc_iommu(int size) { @@ -146,25 +152,31 @@ /* * Use global flush state to avoid races with multiple flushers. */ -static void flush_gart(struct pci_dev *dev) +static void flush_gart(struct device *dev) { unsigned long flags; int flushed = 0; - int i; + int i, max; spin_lock_irqsave(&iommu_bitmap_lock, flags); if (need_flush) { + max = 0; for (i = 0; i < MAX_NB; i++) { - u32 w; if (!northbridges[i]) continue; pci_write_config_dword(northbridges[i], 0x9c, northbridge_flush_word[i] | 1); + flushed++; + max = i; + } + for (i = 0; i <= max; i++) { + u32 w; + if (!northbridges[i]) + continue; /* Make sure the hardware actually executed the flush. */ do { pci_read_config_dword(northbridges[i], 0x9c, &w); } while (w & 1); - flushed++; } if (!flushed) printk("nothing to flush?\n"); @@ -173,31 +185,47 @@ spin_unlock_irqrestore(&iommu_bitmap_lock, flags); } +/* Allocate DMA memory on node near device */ +noinline +static void *dma_alloc_pages(struct device *dev, unsigned gfp, unsigned order) +{ + struct page *page; + int node; + if (dev->bus == &pci_bus_type) { + cpumask_t mask; + mask = pcibus_to_cpumask(to_pci_dev(dev)->bus->number); + node = cpu_to_node(first_cpu(mask)); + } else + node = numa_node_id(); + page = alloc_pages_node(node, gfp, order); + return page ? page_address(page) : NULL; +} + /* - * Allocate memory for a consistent mapping. + * Allocate memory for a coherent mapping. */ -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) +void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + unsigned gfp) { void *memory; - int gfp = preempt_atomic() ? GFP_ATOMIC : GFP_KERNEL; unsigned long dma_mask = 0; u64 bus; - if (hwdev) - dma_mask = hwdev->dev.coherent_dma_mask; + if (!dev) + dev = &fallback_dev; + dma_mask = dev->coherent_dma_mask; if (dma_mask == 0) dma_mask = 0xffffffff; /* Kludge to make it bug-to-bug compatible with i386. i386 - uses the normal dma_mask for alloc_consistent. */ - if (hwdev) - dma_mask &= hwdev->dma_mask; + uses the normal dma_mask for alloc_coherent. */ + dma_mask &= *dev->dma_mask; again: - memory = (void *)__get_free_pages(gfp, get_order(size)); + memory = dma_alloc_pages(dev, gfp, get_order(size)); if (memory == NULL) - return NULL; + return NULL; { int high, mmu; @@ -223,28 +251,29 @@ } } - *dma_handle = pci_map_area(hwdev, bus, size, PCI_DMA_BIDIRECTIONAL); + *dma_handle = dma_map_area(dev, bus, size, PCI_DMA_BIDIRECTIONAL, 0); if (*dma_handle == bad_dma_address) goto error; - flush_gart(hwdev); + flush_gart(dev); return memory; error: if (panic_on_overflow) - panic("pci_alloc_consistent: overflow %lu bytes\n", size); + panic("dma_alloc_coherent: IOMMU overflow by %lu bytes\n", size); free: free_pages((unsigned long)memory, get_order(size)); + /* XXX Could use the swiotlb pool here too */ return NULL; } /* - * Unmap consistent memory. + * Unmap coherent memory. * The caller must ensure that the device has finished accessing the mapping. */ -void pci_free_consistent(struct pci_dev *hwdev, size_t size, +void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t bus) { - pci_unmap_single(hwdev, bus, size, 0); + dma_unmap_single(dev, bus, size, 0); free_pages((unsigned long)vaddr, get_order(size)); } @@ -280,7 +309,7 @@ #define CLEAR_LEAK(x) #endif -static void iommu_full(struct pci_dev *dev, size_t size, int dir) +static void iommu_full(struct device *dev, size_t size, int dir, int do_panic) { /* * Ran out of IOMMU space for this operation. This is very bad. @@ -293,14 +322,14 @@ */ printk(KERN_ERR - "PCI-DMA: Out of IOMMU space for %lu bytes at device %s[%s]\n", - size, dev ? pci_pretty_name(dev) : "", dev ? dev->slot_name : "?"); + "PCI-DMA: Out of IOMMU space for %lu bytes at device %s\n", + size, dev->bus_id); - if (size > PAGE_SIZE*EMERGENCY_PAGES) { + if (size > PAGE_SIZE*EMERGENCY_PAGES && do_panic) { if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) - panic("PCI-DMA: Memory will be corrupted\n"); + panic("PCI-DMA: Memory would be corrupted\n"); if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL) - panic("PCI-DMA: Random memory will be DMAed\n"); + panic("PCI-DMA: Random memory would be DMAed\n"); } #ifdef CONFIG_IOMMU_LEAK @@ -308,9 +337,9 @@ #endif } -static inline int need_iommu(struct pci_dev *dev, unsigned long addr, size_t size) +static inline int need_iommu(struct device *dev, unsigned long addr, size_t size) { - u64 mask = dev ? dev->dma_mask : 0xffffffff; + u64 mask = *dev->dma_mask; int high = addr + size >= mask; int mmu = high; if (force_iommu) @@ -323,9 +352,9 @@ return mmu; } -static inline int nonforced_iommu(struct pci_dev *dev, unsigned long addr, size_t size) +static inline int nonforced_iommu(struct device *dev, unsigned long addr, size_t size) { - u64 mask = dev ? dev->dma_mask : 0xffffffff; + u64 mask = *dev->dma_mask; int high = addr + size >= mask; int mmu = high; if (no_iommu) { @@ -339,8 +368,8 @@ /* Map a single continuous physical area into the IOMMU. * Caller needs to check if the iommu is needed and flush. */ -static dma_addr_t pci_map_area(struct pci_dev *dev, unsigned long phys_mem, - size_t size, int dir) +static dma_addr_t dma_map_area(struct device *dev, unsigned long phys_mem, + size_t size, int dir, int do_panic) { unsigned long npages = to_pages(phys_mem, size); unsigned long iommu_page = alloc_iommu(npages); @@ -349,8 +378,8 @@ if (!nonforced_iommu(dev, phys_mem, size)) return phys_mem; if (panic_on_overflow) - panic("pci_map_area overflow %lu bytes\n", size); - iommu_full(dev, size, dir); + panic("dma_map_area overflow %lu bytes\n", size); + iommu_full(dev, size, dir, do_panic); return bad_dma_address; } @@ -363,44 +392,44 @@ } /* Map a single area into the IOMMU */ -dma_addr_t pci_map_single(struct pci_dev *dev, void *addr, size_t size, int dir) -{ +dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size, int dir) +{ unsigned long phys_mem, bus; - BUG_ON(dir == PCI_DMA_NONE); + BUG_ON(dir == DMA_NONE); -#ifdef CONFIG_SWIOTLB if (swiotlb) - return swiotlb_map_single(&dev->dev,addr,size,dir); -#endif + return swiotlb_map_single(dev,addr,size,dir); + if (!dev) + dev = &fallback_dev; phys_mem = virt_to_phys(addr); if (!need_iommu(dev, phys_mem, size)) return phys_mem; - bus = pci_map_area(dev, phys_mem, size, dir); + bus = dma_map_area(dev, phys_mem, size, dir, 1); flush_gart(dev); return bus; } -/* Fallback for pci_map_sg in case of overflow */ -static int pci_map_sg_nonforce(struct pci_dev *dev, struct scatterlist *sg, +/* Fallback for dma_map_sg in case of overflow */ +static int dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, int nents, int dir) { int i; #ifdef CONFIG_IOMMU_DEBUG - printk(KERN_DEBUG "pci_map_sg overflow\n"); + printk(KERN_DEBUG "dma_map_sg overflow\n"); #endif for (i = 0; i < nents; i++ ) { struct scatterlist *s = &sg[i]; unsigned long addr = page_to_phys(s->page) + s->offset; if (nonforced_iommu(dev, addr, s->length)) { - addr = pci_map_area(dev, addr, s->length, dir); + addr = dma_map_area(dev, addr, s->length, dir, 0); if (addr == bad_dma_address) { if (i > 0) - pci_unmap_sg(dev, sg, i, dir); + dma_unmap_sg(dev, sg, i, dir); nents = 0; sg[0].dma_length = 0; break; @@ -414,7 +443,7 @@ } /* Map multiple scatterlist entries continuous into the first. */ -static int __pci_map_cont(struct scatterlist *sg, int start, int stopat, +static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, struct scatterlist *sout, unsigned long pages) { unsigned long iommu_start = alloc_iommu(pages); @@ -452,7 +481,7 @@ return 0; } -static inline int pci_map_cont(struct scatterlist *sg, int start, int stopat, +static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, struct scatterlist *sout, unsigned long pages, int need) { @@ -462,14 +491,14 @@ sout->dma_length = sg[start].length; return 0; } - return __pci_map_cont(sg, start, stopat, sout, pages); + return __dma_map_cont(sg, start, stopat, sout, pages); } /* * DMA map all entries in a scatterlist. * Merge chunks that have page aligned sizes into a continuous mapping. - */ -int pci_map_sg(struct pci_dev *dev, struct scatterlist *sg, int nents, int dir) + */ +int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) { int i; int out; @@ -477,19 +506,14 @@ unsigned long pages = 0; int need = 0, nextneed; -#ifdef CONFIG_SWIOTLB - if (swiotlb) - return swiotlb_map_sg(&dev->dev,sg,nents,dir); -#endif - - BUG_ON(dir == PCI_DMA_NONE); + BUG_ON(dir == DMA_NONE); if (nents == 0) return 0; -#ifdef CONFIG_SWIOTLB if (swiotlb) - return swiotlb_map_sg(&dev->dev,sg,nents,dir); -#endif + return swiotlb_map_sg(dev,sg,nents,dir); + if (!dev) + dev = &fallback_dev; out = 0; start = 0; @@ -508,19 +532,19 @@ boundary and the new one doesn't have an offset. */ if (!iommu_merge || !nextneed || !need || s->offset || (ps->offset + ps->length) % PAGE_SIZE) { - if (pci_map_cont(sg, start, i, sg+out, pages, + if (dma_map_cont(sg, start, i, sg+out, pages, need) < 0) goto error; out++; pages = 0; start = i; } - } + } need = nextneed; pages += to_pages(s->offset, s->length); } - if (pci_map_cont(sg, start, i, sg+out, pages, need) < 0) + if (dma_map_cont(sg, start, i, sg+out, pages, need) < 0) goto error; out++; flush_gart(dev); @@ -530,34 +554,32 @@ error: flush_gart(NULL); - pci_unmap_sg(dev, sg, nents, dir); + dma_unmap_sg(dev, sg, nents, dir); /* When it was forced try again unforced */ if (force_iommu) - return pci_map_sg_nonforce(dev, sg, nents, dir); + return dma_map_sg_nonforce(dev, sg, nents, dir); if (panic_on_overflow) - panic("pci_map_sg: overflow on %lu pages\n", pages); - iommu_full(dev, pages << PAGE_SHIFT, dir); + panic("dma_map_sg: overflow on %lu pages\n", pages); + iommu_full(dev, pages << PAGE_SHIFT, dir, 0); for (i = 0; i < nents; i++) sg[i].dma_address = bad_dma_address; return 0; } /* - * Free a PCI mapping. + * Free a DMA mapping. */ -void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, +void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, int direction) { unsigned long iommu_page; int npages; int i; -#ifdef CONFIG_SWIOTLB if (swiotlb) { - swiotlb_unmap_single(&hwdev->dev,dma_addr,size,direction); + swiotlb_unmap_single(dev,dma_addr,size,direction); return; } -#endif if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE || dma_addr >= iommu_bus_base + iommu_size) @@ -574,22 +596,25 @@ /* * Wrapper for pci_unmap_single working with scatterlists. */ -void pci_unmap_sg(struct pci_dev *dev, struct scatterlist *sg, int nents, - int dir) +void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) { int i; + if (swiotlb) { + swiotlb_unmap_sg(dev,sg,nents,dir); + return; + } for (i = 0; i < nents; i++) { struct scatterlist *s = &sg[i]; if (!s->dma_length || !s->length) break; - pci_unmap_single(dev, s->dma_address, s->dma_length, dir); + dma_unmap_single(dev, s->dma_address, s->dma_length, dir); } } -int pci_dma_supported(struct pci_dev *dev, u64 mask) +int dma_supported(struct device *dev, u64 mask) { /* Copied from i386. Doesn't make much sense, because it will - only work for pci_alloc_consistent. + only work for pci_alloc_coherent. The caller just has to use GFP_DMA in this case. */ if (mask < 0x00ffffff) return 0; @@ -605,22 +630,31 @@ Assume all masks <= 40 bits are of this type. Normally this doesn't make any difference, but gives more gentle handling of IOMMU overflow. */ if (iommu_sac_force && (mask >= 0xffffffffffULL)) { - printk(KERN_INFO "%s: Force SAC with mask %Lx\n", dev->slot_name,mask); + printk(KERN_INFO "%s: Force SAC with mask %Lx\n", dev->bus_id,mask); return 0; } return 1; } -EXPORT_SYMBOL(pci_unmap_sg); -EXPORT_SYMBOL(pci_map_sg); -EXPORT_SYMBOL(pci_map_single); -EXPORT_SYMBOL(pci_unmap_single); -EXPORT_SYMBOL(pci_dma_supported); +int dma_get_cache_alignment(void) +{ + return boot_cpu_data.x86_clflush_size; +} + +EXPORT_SYMBOL(dma_unmap_sg); +EXPORT_SYMBOL(dma_map_sg); +EXPORT_SYMBOL(dma_map_single); +EXPORT_SYMBOL(dma_unmap_single); +EXPORT_SYMBOL(dma_supported); EXPORT_SYMBOL(no_iommu); EXPORT_SYMBOL(force_iommu); EXPORT_SYMBOL(bad_dma_address); -EXPORT_SYMBOL(iommu_merge); +EXPORT_SYMBOL(iommu_bio_merge); +EXPORT_SYMBOL(iommu_sac_force); +EXPORT_SYMBOL(dma_get_cache_alignment); +EXPORT_SYMBOL(dma_alloc_coherent); +EXPORT_SYMBOL(dma_free_coherent); static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) { @@ -747,7 +781,7 @@ if (swiotlb) { no_iommu = 1; - printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); + printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); return -1; } @@ -851,7 +885,7 @@ fs_initcall(pci_iommu_init); /* iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge] - [,forcesac][,fullflush][,nomerge] + [,forcesac][,fullflush][,nomerge][,biomerge] size set size of iommu (in bytes) noagp don't initialize the AGP driver and use full aperture. off don't use the IOMMU @@ -859,60 +893,73 @@ memaper[=order] allocate an own aperture over RAM with size 32MB^order. noforce don't force IOMMU usage. Default. force Force IOMMU. - merge Do SG merging. Implies force (experimental) + merge Do lazy merging. This may improve performance on some block devices. + Implies force (experimental) + biomerge Do merging at the BIO layer. This is more efficient than merge, + but should be only done with very big IOMMUs. Implies merge,force. nomerge Don't do SG merging. forcesac For SAC mode for masks <40bits (experimental) fullflush Flush IOMMU on each allocation (default) nofullflush Don't use IOMMU fullflush allowed overwrite iommu off workarounds for specific chipsets. soft Use software bounce buffering (default for Intel machines) + noaperture Don't touch the aperture for AGP. */ -__init int iommu_setup(char *opt) +__init int iommu_setup(char *p) { int arg; - char *p = opt; - - for (;;) { - if (!memcmp(p,"noagp", 5)) + + while (*p) { + if (!strncmp(p,"noagp",5)) no_agp = 1; - if (!memcmp(p,"off", 3)) + if (!strncmp(p,"off",3)) no_iommu = 1; - if (!memcmp(p,"force", 5)) { + if (!strncmp(p,"force",5)) { force_iommu = 1; iommu_aperture_allowed = 1; } - if (!memcmp(p,"allowed",7)) + if (!strncmp(p,"allowed",7)) iommu_aperture_allowed = 1; - if (!memcmp(p,"noforce", 7)) { + if (!strncmp(p,"noforce",7)) { iommu_merge = 0; force_iommu = 0; } - if (!memcmp(p, "memaper", 7)) { + if (!strncmp(p, "memaper", 7)) { fallback_aper_force = 1; p += 7; - if (*p == '=' && get_option(&p, &arg)) - fallback_aper_order = arg; + if (*p == '=') { + ++p; + if (get_option(&p, &arg)) + fallback_aper_order = arg; + } } - if (!memcmp(p, "panic", 5)) + if (!strncmp(p, "biomerge",8)) { + iommu_bio_merge = 4096; + iommu_merge = 1; + force_iommu = 1; + } + if (!strncmp(p, "panic",5)) panic_on_overflow = 1; - if (!memcmp(p, "nopanic", 7)) + if (!strncmp(p, "nopanic",7)) panic_on_overflow = 0; - if (!memcmp(p, "merge", 5)) { + if (!strncmp(p, "merge",5)) { iommu_merge = 1; force_iommu = 1; } - if (!memcmp(p, "nomerge", 7)) + if (!strncmp(p, "nomerge",7)) iommu_merge = 0; - if (!memcmp(p, "forcesac", 8)) + if (!strncmp(p, "forcesac",8)) iommu_sac_force = 1; - if (!memcmp(p, "fullflush", 9)) + if (!strncmp(p, "fullflush",8)) iommu_fullflush = 1; - if (!memcmp(p, "nofullflush", 11)) + if (!strncmp(p, "nofullflush",11)) iommu_fullflush = 0; - if (!memcmp(p, "soft", 4)) + if (!strncmp(p, "soft",4)) swiotlb = 1; + if (!strncmp(p, "noaperture",10)) + fix_aperture = 0; #ifdef CONFIG_IOMMU_LEAK - if (!memcmp(p,"leak", 4)) { + if (!strncmp(p,"leak",4)) { leak_trace = 1; p += 4; if (*p == '=') ++p; @@ -922,10 +969,9 @@ #endif if (isdigit(*p) && get_option(&p, &arg)) iommu_size = arg; - do { - if (*p == ' ' || *p == 0) - return 0; - } while (*p++ != ','); + p += strcspn(p, ","); + if (*p == ',') + ++p; } return 1; } diff -Nru a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c --- a/arch/x86_64/kernel/pci-nommu.c 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/kernel/pci-nommu.c 2004-09-06 16:37:55 -07:00 @@ -1,8 +1,11 @@ +/* Fallback functions when the main IOMMU code is not compiled in. This + code is roughly equivalent to i386. */ #include #include #include #include #include +#include int iommu_merge = 0; EXPORT_SYMBOL(iommu_merge); @@ -10,57 +13,80 @@ dma_addr_t bad_dma_address; EXPORT_SYMBOL(bad_dma_address); +int iommu_bio_merge = 0; +EXPORT_SYMBOL(iommu_bio_merge); + +int iommu_sac_force = 0; +EXPORT_SYMBOL(iommu_sac_force); + /* * Dummy IO MMU functions */ -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) +void *dma_alloc_coherent(struct device *hwdev, size_t size, + dma_addr_t *dma_handle, unsigned gfp) { void *ret; - int gfp = GFP_ATOMIC; - - if (hwdev == NULL || - end_pfn > (hwdev->dma_mask>>PAGE_SHIFT) || /* XXX */ - (u32)hwdev->dma_mask < 0xffffffff) - gfp |= GFP_DMA; - ret = (void *)__get_free_pages(gfp, get_order(size)); + u64 mask; + int order = get_order(size); - if (ret != NULL) { - memset(ret, 0, size); + if (hwdev) + mask = hwdev->coherent_dma_mask & *hwdev->dma_mask; + else + mask = 0xffffffff; + for (;;) { + ret = (void *)__get_free_pages(gfp, order); + if (ret == NULL) + return NULL; *dma_handle = virt_to_bus(ret); + if ((*dma_handle & ~mask) == 0) + break; + free_pages((unsigned long)ret, order); + if (gfp & GFP_DMA) + return NULL; + gfp |= GFP_DMA; } + + memset(ret, 0, size); return ret; } +EXPORT_SYMBOL(dma_alloc_coherent); -void pci_free_consistent(struct pci_dev *hwdev, size_t size, +void dma_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { free_pages((unsigned long)vaddr, get_order(size)); } +EXPORT_SYMBOL(dma_free_coherent); -int pci_dma_supported(struct pci_dev *hwdev, u64 mask) +int dma_supported(struct device *hwdev, u64 mask) { /* * we fall back to GFP_DMA when the mask isn't all 1s, * so we can't guarantee allocations that must be * within a tighter range than GFP_DMA.. - * RED-PEN this won't work for pci_map_single. Caller has to - * use GFP_DMA in the first place. + * RED-PEN this won't work for pci_map_single. Caller has to + * use GFP_DMA in the first place. */ if (mask < 0x00ffffff) return 0; return 1; } +EXPORT_SYMBOL(dma_supported); -EXPORT_SYMBOL(pci_dma_supported); +int dma_get_cache_alignment(void) +{ + return boot_cpu_data.x86_clflush_size; +} +EXPORT_SYMBOL(dma_get_cache_alignment); static int __init check_ram(void) { if (end_pfn >= 0xffffffff>>PAGE_SHIFT) { - printk(KERN_ERR "WARNING more than 4GB of memory but no IOMMU.\n" - KERN_ERR "WARNING 32bit PCI may malfunction.\n"); + printk( + KERN_ERR "WARNING more than 4GB of memory but IOMMU not compiled in.\n" + KERN_ERR "WARNING 32bit PCI may malfunction.\n"); } return 0; } diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c 2004-09-06 16:37:53 -07:00 +++ b/arch/x86_64/kernel/process.c 2004-09-06 16:37:53 -07:00 @@ -168,9 +168,7 @@ if (cpu_has(c, X86_FEATURE_MWAIT)) { /* * Skip, if setup has overridden idle. - * Also, take care of system with asymmetric CPUs. - * Use, mwait_idle only if all cpus support it. - * If not, we fallback to default_idle() + * One CPU supports mwait => All CPUs supports mwait */ if (!pm_idle) { if (!printed) { @@ -179,10 +177,7 @@ } pm_idle = mwait_idle; } - return; } - pm_idle = default_idle; - return; } static int __init idle_setup (char *str) @@ -546,17 +541,16 @@ clear_thread_flag(TIF_IA32); } -asmlinkage long sys_fork(struct pt_regs regs) +asmlinkage long sys_fork(struct pt_regs *regs) { - return do_fork(SIGCHLD, regs.rsp, ®s, 0, NULL, NULL); + return do_fork(SIGCHLD, regs->rsp, regs, 0, NULL, NULL); } -asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp, void __user *parent_tid, void __user *child_tid, struct pt_regs regs) +asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp, void __user *parent_tid, void __user *child_tid, struct pt_regs *regs) { if (!newsp) - newsp = regs.rsp; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, - parent_tid, child_tid); + newsp = regs->rsp; + return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); } /* @@ -569,9 +563,9 @@ * do not have enough call-clobbered registers to hold all * the information you need. */ -asmlinkage long sys_vfork(struct pt_regs regs) +asmlinkage long sys_vfork(struct pt_regs *regs) { - return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.rsp, ®s, 0, + return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->rsp, regs, 0, NULL, NULL); } diff -Nru a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c --- a/arch/x86_64/kernel/ptrace.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/ptrace.c 2004-09-06 16:37:51 -07:00 @@ -433,30 +433,32 @@ break; case PTRACE_GETREGS: { /* Get all gp regs from the child. */ - if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, FRAME_SIZE)) { + if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, + sizeof(struct user_regs_struct))) { ret = -EIO; break; } + ret = 0; for (ui = 0; ui < sizeof(struct user_regs_struct); ui += sizeof(long)) { - __put_user(getreg(child, ui),(unsigned long __user *) data); + ret |= __put_user(getreg(child, ui),(unsigned long __user *) data); data += sizeof(long); } - ret = 0; break; } case PTRACE_SETREGS: { /* Set all gp regs in the child. */ unsigned long tmp; - if (!access_ok(VERIFY_READ, (unsigned __user *)data, FRAME_SIZE)) { + if (!access_ok(VERIFY_READ, (unsigned __user *)data, + sizeof(struct user_regs_struct))) { ret = -EIO; break; } + ret = 0; for (ui = 0; ui < sizeof(struct user_regs_struct); ui += sizeof(long)) { - __get_user(tmp, (unsigned long __user *) data); + ret |= __get_user(tmp, (unsigned long __user *) data); putreg(child, ui, tmp); data += sizeof(long); } - ret = 0; break; } diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c 2004-09-06 16:37:50 -07:00 +++ b/arch/x86_64/kernel/setup.c 2004-09-06 16:37:50 -07:00 @@ -79,8 +79,10 @@ unsigned long saved_video_mode; +#ifdef CONFIG_SWIOTLB int swiotlb; EXPORT_SYMBOL(swiotlb); +#endif /* * Setup options @@ -105,7 +107,8 @@ struct resource standard_io_resources[] = { { "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO }, { "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO }, - { "timer", 0x40, 0x5f, IORESOURCE_BUSY | IORESOURCE_IO }, + { "timer0", 0x40, 0x43, IORESOURCE_BUSY | IORESOURCE_IO }, + { "timer1", 0x50, 0x53, IORESOURCE_BUSY | IORESOURCE_IO }, { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO }, { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO }, { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO }, @@ -679,6 +682,26 @@ } } display_cacheinfo(c); + + if (c->cpuid_level >= 0x80000008) { + c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; + if (c->x86_num_cores & (c->x86_num_cores - 1)) + c->x86_num_cores = 1; + +#ifdef CONFIG_NUMA + /* On a dual core setup the lower bits of apic id + distingush the cores. Fix up the CPU<->node mappings + here based on that. + Assumes number of cores is a power of two. */ + if (c->x86_num_cores > 1) { + int cpu = c->x86_apicid; + cpu_to_node[cpu] = cpu >> hweight32(c->x86_num_cores - 1); + printk(KERN_INFO "CPU %d -> Node %d\n", + cpu, cpu_to_node[cpu]); + } +#endif + } + return r; } @@ -765,6 +788,7 @@ { 0x43, LVL_2, 512 }, { 0x44, LVL_2, 1024 }, { 0x45, LVL_2, 2048 }, + { 0x60, LVL_1_DATA, 16 }, { 0x66, LVL_1_DATA, 8 }, { 0x67, LVL_1_DATA, 16 }, { 0x68, LVL_1_DATA, 32 }, @@ -902,6 +926,8 @@ c->x86_model_id[0] = '\0'; /* Unset */ c->x86_clflush_size = 64; c->x86_cache_alignment = c->x86_clflush_size; + c->x86_num_cores = 1; + c->x86_apicid = c == &boot_cpu_data ? 0 : c - cpu_data; memset(&c->x86_capability, 0, sizeof c->x86_capability); /* Get vendor name */ @@ -929,6 +955,7 @@ } if (c->x86_capability[0] & (1<<19)) c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; + c->x86_apicid = misc >> 24; } else { /* Have CPUID level 0 only - unheard of */ c->x86 = 4; @@ -948,8 +975,10 @@ /* AMD-defined flags: level 0x80000001 */ xlvl = cpuid_eax(0x80000000); if ( (xlvl & 0xffff0000) == 0x80000000 ) { - if ( xlvl >= 0x80000001 ) + if ( xlvl >= 0x80000001 ) { c->x86_capability[1] = cpuid_edx(0x80000001); + c->x86_capability[5] = cpuid_ecx(0x80000001); + } if ( xlvl >= 0x80000004 ) get_model_name(c); /* Default name */ } @@ -1059,8 +1088,8 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* Intel-defined (#2) */ - "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2", - "est", NULL, "cid", NULL, NULL, "cmpxchg16b", NULL, NULL, + "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est", + "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; @@ -1148,6 +1177,9 @@ seq_printf(m, " [%d]", i); } } + + if (c->x86_num_cores > 1) + seq_printf(m, "cpu cores\t: %d\n", c->x86_num_cores); seq_printf(m, "\n\n"); diff -Nru a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c --- a/arch/x86_64/kernel/setup64.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/setup64.c 2004-09-06 16:37:51 -07:00 @@ -60,12 +60,12 @@ */ static int __init nonx_setup(char *str) { - if (!strncmp(str, "on",3)) { + if (!strcmp(str, "on")) { __supported_pte_mask |= _PAGE_NX; do_not_nx = 0; vm_data_default_flags &= ~VM_EXEC; vm_stack_flags &= ~VM_EXEC; - } else if (!strncmp(str, "noforce",7) || !strncmp(str,"off",3)) { + } else if (!strcmp(str, "noforce") || !strcmp(str, "off")) { do_not_nx = (str[0] == 'o'); if (do_not_nx) __supported_pte_mask &= ~_PAGE_NX; @@ -91,26 +91,28 @@ compat (default) Imply PROT_EXEC for PROT_READ */ - static int __init nonx32_setup(char *str) + static int __init nonx32_setup(char *s) { - char *s; - while ((s = strsep(&str, ",")) != NULL) { - if (!strcmp(s, "all") || !strcmp(s,"on")) { + while (*s) { + if (!strncmp(s, "all", 3) || !strncmp(s,"on",2)) { vm_data_default_flags32 &= ~VM_EXEC; vm_stack_flags32 &= ~VM_EXEC; - } else if (!strcmp(s, "off")) { + } else if (!strncmp(s, "off",3)) { vm_data_default_flags32 |= VM_EXEC; vm_stack_flags32 |= VM_EXEC; - } else if (!strcmp(s, "stack")) { + } else if (!strncmp(s, "stack", 5)) { vm_data_default_flags32 |= VM_EXEC; vm_stack_flags32 &= ~VM_EXEC; - } else if (!strcmp(s, "force")) { + } else if (!strncmp(s, "force",5)) { vm_force_exec32 = 0; - } else if (!strcmp(s, "compat")) { + } else if (!strncmp(s, "compat",5)) { vm_force_exec32 = PROT_EXEC; } - } - return 1; + s += strcspn(s, ","); + if (*s == ',') + ++s; + } + return 1; } __setup("noexec32=", nonx32_setup); diff -Nru a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c --- a/arch/x86_64/kernel/signal.c 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/kernel/signal.c 2004-09-06 16:37:54 -07:00 @@ -40,7 +40,7 @@ sigset_t *set, struct pt_regs * regs); asmlinkage long -sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs regs) +sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *regs) { sigset_t saveset, newset; @@ -59,21 +59,22 @@ spin_unlock_irq(¤t->sighand->siglock); #ifdef DEBUG_SIG printk("rt_sigsuspend savset(%lx) newset(%lx) regs(%p) rip(%lx)\n", - saveset, newset, ®s, regs.rip); + saveset, newset, regs, regs->rip); #endif - regs.rax = -EINTR; + regs->rax = -EINTR; while (1) { current->state = TASK_INTERRUPTIBLE; schedule(); - if (do_signal(®s, &saveset)) + if (do_signal(regs, &saveset)) return -EINTR; } } asmlinkage long -sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, struct pt_regs regs) +sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, + struct pt_regs *regs) { - return do_sigaltstack(uss, uoss, regs.rsp); + return do_sigaltstack(uss, uoss, regs->rsp); } @@ -134,13 +135,13 @@ return 1; } -asmlinkage long sys_rt_sigreturn(struct pt_regs regs) +asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) { struct rt_sigframe __user *frame; sigset_t set; long eax; - frame = (struct rt_sigframe __user *)(regs.rsp - 8); + frame = (struct rt_sigframe __user *)(regs->rsp - 8); if (verify_area(VERIFY_READ, frame, sizeof(*frame))) { goto badframe; } @@ -154,7 +155,7 @@ recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (restore_sigcontext(®s, &frame->uc.uc_mcontext, &eax)) { + if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax)) { goto badframe; } @@ -162,13 +163,13 @@ printk("%d sigreturn rip:%lx rsp:%lx frame:%p rax:%lx\n",current->pid,regs.rip,regs.rsp,frame,eax); #endif - if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs.rsp) == -EFAULT) + if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->rsp) == -EFAULT) goto badframe; return eax; badframe: - signal_fault(®s,frame,"sigreturn"); + signal_fault(regs,frame,"sigreturn"); return 0; } @@ -287,7 +288,7 @@ if (ka->sa.sa_flags & SA_RESTORER) { err |= __put_user(ka->sa.sa_restorer, &frame->pretcode); } else { - printk("%s forgot to set SA_RESTORER for signal %d.\n", me->comm, sig); + /* could use a vstub here */ goto give_sigsegv; } @@ -328,9 +329,7 @@ return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - signal_fault(regs,frame,"signal deliver"); + force_sigsegv(sig, current); } /* @@ -338,11 +337,9 @@ */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs *regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - #ifdef DEBUG_SIG printk("handle_signal pid:%d sig:%lu rip:%lx rsp:%lx regs=%p\n", current->pid, sig, regs->rip, regs->rsp, regs); @@ -379,9 +376,6 @@ #endif setup_rt_frame(sig, ka, info, oldset, regs); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -398,6 +392,7 @@ */ int do_signal(struct pt_regs *regs, sigset_t *oldset) { + struct k_sigaction ka; siginfo_t info; int signr; @@ -419,7 +414,7 @@ if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Reenable any watchpoints before delivering the * signal to user space. The processor register will @@ -430,7 +425,7 @@ asm volatile("movq %0,%%db7" : : "r" (current->thread.debugreg7)); /* Whee! Actually deliver the signal. */ - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &info, &ka, oldset, regs); return 1; } diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c --- a/arch/x86_64/kernel/smpboot.c 2004-09-06 16:37:55 -07:00 +++ b/arch/x86_64/kernel/smpboot.c 2004-09-06 16:37:55 -07:00 @@ -392,16 +392,6 @@ extern volatile unsigned long init_rsp; extern void (*initial_code)(void); -static struct task_struct * __init fork_by_hand(void) -{ - struct pt_regs regs; - /* - * don't care about the eip and regs settings since - * we'll never reschedule the forked task. - */ - return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL); -} - #if APIC_DEBUG static inline void inquire_remote_apic(int apicid) { @@ -575,19 +565,10 @@ * We can't use kernel_thread since we must avoid to * reschedule the child. */ - idle = fork_by_hand(); + idle = fork_idle(cpu); if (IS_ERR(idle)) panic("failed fork for CPU %d", cpu); - wake_up_forked_process(idle); x86_cpu_to_apicid[cpu] = apicid; - - /* - * We remove it from the pidhash and the runqueue - * once we got the process: - */ - init_idle(idle,cpu); - - unhash_process(idle); cpu_pda[cpu].pcurrent = idle; diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/kernel/time.c 2004-09-06 16:37:54 -07:00 @@ -11,7 +11,6 @@ * Copyright (c) 2002 Vojtech Pavlik * Copyright (c) 2003 Andi Kleen * RTC support code taken from arch/i386/kernel/timers/time_hpet.c - * */ #include @@ -42,6 +41,10 @@ EXPORT_SYMBOL(jiffies_64); +#ifdef CONFIG_CPU_FREQ +static void cpufreq_delayed_get(void); +#endif + extern int using_apic_timer; spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; @@ -82,7 +85,7 @@ * timer interrupt has happened already, but vxtime.trigger wasn't updated yet. * This is not a problem, because jiffies hasn't updated either. They are bound * together by xtime_lock. - */ + */ static inline unsigned int do_gettimeoffset_tsc(void) { @@ -119,7 +122,7 @@ usec = xtime.tv_nsec / 1000; /* i386 does some correction here to keep the clock - monotonus even when ntpd is fixing drift. + monotonous even when ntpd is fixing drift. But they didn't work for me, there is a non monotonic clock anyways with ntp. I dropped all corrections now until a real solution can @@ -176,6 +179,19 @@ EXPORT_SYMBOL(do_settimeofday); +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= (unsigned long)&__lock_text_start && + pc <= (unsigned long)&__lock_text_end) + return *(unsigned long *)regs->rbp; + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif + /* * In order to set the CMOS clock precisely, set_rtc_mmss has to be called 500 * ms after the second nowtime has started, because when nowtime is written @@ -214,7 +230,7 @@ * overflow. This avoids messing with unknown time zones but requires your RTC * not to be off by more than 15 minutes. Since we're calling it only when * our clock is externally synchronized using NTP, this shouldn't be a problem. - */ + */ real_seconds = nowtime % 60; real_minutes = nowtime / 60; @@ -297,15 +313,15 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { static unsigned long rtc_update = 0; - unsigned long tsc, lost = 0; - int delay, offset = 0; + unsigned long tsc; + int delay, offset = 0, lost = 0; /* * Here we are in the timer irq handler. We have irqs locally disabled (so we * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running * on the other CPU, so we need a lock. We also need to lock the vsyscall * variables, because both do_timer() and us change them -arca+vojtech - */ + */ write_seqlock(&xtime_lock); @@ -354,12 +370,29 @@ (((long) offset << 32) / vxtime.tsc_quot) - 1; } - if (lost) { + if (lost > 0) { + static long lost_count; + if (report_lost_ticks) { - printk(KERN_WARNING "time.c: Lost %ld timer " + printk(KERN_WARNING "time.c: Lost %d timer " "tick(s)! ", lost); print_symbol("rip %s)\n", regs->rip); } + + if (lost_count == 100) { + printk(KERN_WARNING + "warning: many lost ticks.\n" + KERN_WARNING "Your time source seems to be instable or some driver is hogging interupts\n"); + print_symbol("rip %s\n", regs->rip); + lost_count = 0; + } else + lost_count++; + + if ((lost_count % 25) == 0) { +#ifdef CONFIG_CPU_FREQ + cpufreq_delayed_get(); +#endif + } jiffies += lost; } @@ -376,7 +409,7 @@ */ #ifndef CONFIG_X86_LOCAL_APIC - x86_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #else if (!using_apic_timer) smp_local_timer_interrupt(regs); @@ -509,6 +542,34 @@ Should fix up last_tsc too. Currently gettimeofday in the first tick after the change will be slightly wrong. */ +#include + +static unsigned int cpufreq_delayed_issched = 0; +static unsigned int cpufreq_init = 0; +static struct work_struct cpufreq_delayed_get_work; + +static void handle_cpufreq_delayed_get(void *v) +{ + unsigned int cpu; + for_each_online_cpu(cpu) { + cpufreq_get(cpu); + } + cpufreq_delayed_issched = 0; +} + +/* if we notice lost ticks, schedule a call to cpufreq_get() as it tries + * to verify the CPU frequency the timing core thinks the CPU is running + * at is still correct. + */ +static void cpufreq_delayed_get(void) +{ + if (cpufreq_init && !cpufreq_delayed_issched) { + cpufreq_delayed_issched = 1; + printk(KERN_DEBUG "Losing some ticks... checking if CPU frequency changed.\n"); + schedule_work(&cpufreq_delayed_get_work); + } +} + static unsigned int ref_freq = 0; static unsigned long loops_per_jiffy_ref = 0; @@ -518,14 +579,18 @@ void *data) { struct cpufreq_freqs *freq = data; - unsigned long *lpj; + unsigned long *lpj, dummy; + lpj = &dummy; + if (!(freq->flags & CPUFREQ_CONST_LOOPS)) #ifdef CONFIG_SMP lpj = &cpu_data[freq->cpu].loops_per_jiffy; #else lpj = &boot_cpu_data.loops_per_jiffy; #endif + + if (!ref_freq) { ref_freq = freq->old; loops_per_jiffy_ref = *lpj; @@ -538,7 +603,8 @@ cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new); cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new); - vxtime.tsc_quot = (1000L << 32) / cpu_khz; + if (!(freq->flags & CPUFREQ_CONST_LOOPS)) + vxtime.tsc_quot = (1000L << 32) / cpu_khz; } set_cyc2ns_scale(cpu_khz_ref / 1000); @@ -549,6 +615,18 @@ static struct notifier_block time_cpufreq_notifier_block = { .notifier_call = time_cpufreq_notifier }; + +static int __init cpufreq_tsc(void) +{ + INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL); + if (!cpufreq_register_notifier(&time_cpufreq_notifier_block, + CPUFREQ_TRANSITION_NOTIFIER)) + cpufreq_init = 1; + return 0; +} + +core_initcall(cpufreq_tsc); + #endif /* @@ -725,8 +803,8 @@ cpu_khz = hpet_calibrate_tsc(); timename = "HPET"; } else { - pit_init(); - cpu_khz = pit_calibrate_tsc(); + pit_init(); + cpu_khz = pit_calibrate_tsc(); timename = "PIT"; } @@ -742,11 +820,6 @@ setup_irq(0, &irq0); set_cyc2ns_scale(cpu_khz / 1000); - -#ifdef CONFIG_CPU_FREQ - cpufreq_register_notifier(&time_cpufreq_notifier_block, - CPUFREQ_TRANSITION_NOTIFIER); -#endif } void __init time_init_smp(void) @@ -1037,6 +1110,8 @@ return IRQ_HANDLED; } #endif + + static int __init nohpet_setup(char *s) { diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c --- a/arch/x86_64/kernel/traps.c 2004-09-06 16:37:50 -07:00 +++ b/arch/x86_64/kernel/traps.c 2004-09-06 16:37:50 -07:00 @@ -352,7 +352,7 @@ #ifdef CONFIG_DEBUG_PAGEALLOC printk("DEBUG_PAGEALLOC"); #endif - printk("\n"); + printk("\n"); notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); show_registers(regs); /* Executive summary in case the oops scrolled away */ @@ -513,7 +513,7 @@ tsk->thread.error_code = error_code; tsk->thread.trap_no = 13; force_sig(SIGSEGV, tsk); - return; + return; } /* kernel gp */ @@ -670,7 +670,6 @@ return regs; clear_TF_reenable: - printk("clear_tf_reenable\n"); set_tsk_thread_flag(tsk, TIF_SINGLESTEP); clear_TF: @@ -681,16 +680,43 @@ return regs; } +static int kernel_math_error(struct pt_regs *regs, char *str) +{ + const struct exception_table_entry *fixup; + fixup = search_exception_tables(regs->rip); + if (fixup) { + regs->rip = fixup->fixup; + return 1; + } + notify_die(DIE_GPF, str, regs, 0, 16, SIGFPE); +#if 0 + /* This should be a die, but warn only for now */ + die(str, regs, 0); +#else + printk(KERN_DEBUG "%s: %s at ", current->comm, str); + printk_address(regs->rip); + printk("\n"); +#endif + return 0; +} + /* * Note that we play around with the 'TS' bit in an attempt to get * the correct behaviour even in the presence of the asynchronous * IRQ13 behaviour */ -void math_error(void __user *rip) +asmlinkage void do_coprocessor_error(struct pt_regs *regs) { + void __user *rip = (void __user *)(regs->rip); struct task_struct * task; siginfo_t info; unsigned short cwd, swd; + + conditional_sti(regs); + if ((regs->cs & 3) == 0 && + kernel_math_error(regs, "kernel x87 math error")) + return; + /* * Save the info for the exception handler and clear the error. */ @@ -740,23 +766,23 @@ force_sig_info(SIGFPE, &info, task); } -asmlinkage void do_coprocessor_error(struct pt_regs * regs) -{ - conditional_sti(regs); - math_error((void __user *)regs->rip); -} - asmlinkage void bad_intr(void) { printk("bad interrupt"); } -static inline void simd_math_error(void __user *rip) +asmlinkage void do_simd_coprocessor_error(struct pt_regs *regs) { + void __user *rip = (void __user *)(regs->rip); struct task_struct * task; siginfo_t info; unsigned short mxcsr; + conditional_sti(regs); + if ((regs->cs & 3) == 0 && + kernel_math_error(regs, "simd math error")) + return; + /* * Save the info for the exception handler and clear the error. */ @@ -797,12 +823,6 @@ break; } force_sig_info(SIGFPE, &info, task); -} - -asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs) -{ - conditional_sti(regs); - simd_math_error((void __user *)regs->rip); } asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs) diff -Nru a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S --- a/arch/x86_64/kernel/vmlinux.lds.S 2004-09-06 16:37:50 -07:00 +++ b/arch/x86_64/kernel/vmlinux.lds.S 2004-09-06 16:37:50 -07:00 @@ -16,6 +16,7 @@ .text : { *(.text) SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) } = 0x9090 @@ -91,9 +92,6 @@ __setup_start = .; .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; __initcall_start = .; .initcall.init : { *(.initcall1.init) diff -Nru a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c --- a/arch/x86_64/kernel/x8664_ksyms.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/kernel/x8664_ksyms.c 2004-09-06 16:37:51 -07:00 @@ -108,11 +108,8 @@ EXPORT_SYMBOL(pci_mem_start); #endif -#ifdef CONFIG_X86_USE_3DNOW -EXPORT_SYMBOL(_mmx_memcpy); -EXPORT_SYMBOL(mmx_clear_page); -EXPORT_SYMBOL(mmx_copy_page); -#endif +EXPORT_SYMBOL(copy_page); +EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(cpu_pda); #ifdef CONFIG_SMP @@ -182,10 +179,17 @@ EXPORT_SYMBOL_NOVERS(__memcpy); EXPORT_SYMBOL_NOVERS(memcmp); -/* syscall export needed for misdesigned sound drivers. */ -EXPORT_SYMBOL(sys_read); -EXPORT_SYMBOL(sys_lseek); -EXPORT_SYMBOL(sys_open); +#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM +/* prototypes are wrong, these are assembly with custom calling functions */ +extern void rwsem_down_read_failed_thunk(void); +extern void rwsem_wake_thunk(void); +extern void rwsem_downgrade_thunk(void); +extern void rwsem_down_write_failed_thunk(void); +EXPORT_SYMBOL(rwsem_down_read_failed_thunk); +EXPORT_SYMBOL(rwsem_wake_thunk); +EXPORT_SYMBOL(rwsem_downgrade_thunk); +EXPORT_SYMBOL(rwsem_down_write_failed_thunk); +#endif EXPORT_SYMBOL(empty_zero_page); @@ -211,10 +215,9 @@ extern unsigned long __supported_pte_mask; EXPORT_SYMBOL(__supported_pte_mask); -EXPORT_SYMBOL(clear_page); - #ifdef CONFIG_SMP EXPORT_SYMBOL(flush_tlb_page); EXPORT_SYMBOL_GPL(flush_tlb_all); #endif +EXPORT_SYMBOL(cpu_khz); diff -Nru a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile --- a/arch/x86_64/lib/Makefile 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/lib/Makefile 2004-09-06 16:37:51 -07:00 @@ -8,7 +8,7 @@ lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ usercopy.o getuser.o putuser.o \ - thunk.o clear_page.o copy_page.o bitstr.o + thunk.o clear_page.o copy_page.o bitstr.o bitops.o lib-y += memcpy.o memmove.o memset.o copy_user.o lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o diff -Nru a/arch/x86_64/lib/bitops.c b/arch/x86_64/lib/bitops.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/x86_64/lib/bitops.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,140 @@ +#include +#include + +#undef find_first_zero_bit +#undef find_next_zero_bit +#undef find_first_bit +#undef find_next_bit + +/** + * find_first_zero_bit - find the first zero bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit-number of the first zero bit, not the number of the byte + * containing a bit. + */ +inline long find_first_zero_bit(const unsigned long * addr, unsigned long size) +{ + long d0, d1, d2; + long res; + + if (!size) + return 0; + asm volatile( + " repe; scasq\n" + " je 1f\n" + " xorq -8(%%rdi),%%rax\n" + " subq $8,%%rdi\n" + " bsfq %%rax,%%rdx\n" + "1: subq %[addr],%%rdi\n" + " shlq $3,%%rdi\n" + " addq %%rdi,%%rdx" + :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) + :"0" (0ULL), "1" ((size + 63) >> 6), "2" (addr), "3" (-1ULL), + [addr] "r" (addr) : "memory"); + return res; +} + +/** + * find_next_zero_bit - find the first zero bit in a memory region + * @addr: The address to base the search on + * @offset: The bitnumber to start searching at + * @size: The maximum size to search + */ +long find_next_zero_bit (const unsigned long * addr, long size, long offset) +{ + unsigned long * p = ((unsigned long *) addr) + (offset >> 6); + unsigned long set = 0; + unsigned long res, bit = offset&63; + + if (bit) { + /* + * Look for zero in first word + */ + asm("bsfq %1,%0\n\t" + "cmoveq %2,%0" + : "=r" (set) + : "r" (~(*p >> bit)), "r"(64L)); + if (set < (64 - bit)) + return set + offset; + set = 64 - bit; + p++; + } + /* + * No zero yet, search remaining full words for a zero + */ + res = find_first_zero_bit ((const unsigned long *)p, + size - 64 * (p - (unsigned long *) addr)); + return (offset + set + res); +} + +static inline long +__find_first_bit(const unsigned long * addr, unsigned long size) +{ + long d0, d1; + long res; + + asm volatile( + " repe; scasq\n" + " jz 1f\n" + " subq $8,%%rdi\n" + " bsfq (%%rdi),%%rax\n" + "1: subq %[addr],%%rdi\n" + " shlq $3,%%rdi\n" + " addq %%rdi,%%rax" + :"=a" (res), "=&c" (d0), "=&D" (d1) + :"0" (0ULL), + "1" ((size + 63) >> 6), "2" (addr), + [addr] "r" (addr) : "memory"); + return res; +} + +/** + * find_first_bit - find the first set bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit-number of the first set bit, not the number of the byte + * containing a bit. + */ +long find_first_bit(const unsigned long * addr, unsigned long size) +{ + return __find_first_bit(addr,size); +} + +/** + * find_next_bit - find the first set bit in a memory region + * @addr: The address to base the search on + * @offset: The bitnumber to start searching at + * @size: The maximum size to search + */ +long find_next_bit(const unsigned long * addr, long size, long offset) +{ + const unsigned long * p = addr + (offset >> 6); + unsigned long set = 0, bit = offset & 63, res; + + if (bit) { + /* + * Look for nonzero in the first 64 bits: + */ + asm("bsfq %1,%0\n\t" + "cmoveq %2,%0\n\t" + : "=r" (set) + : "r" (*p >> bit), "r" (64L)); + if (set < (64 - bit)) + return set + offset; + set = 64 - bit; + p++; + } + /* + * No set bit yet, search remaining full words for a bit + */ + res = __find_first_bit (p, size - 64 * (p - addr)); + return (offset + set + res); +} + +EXPORT_SYMBOL(find_next_bit); +EXPORT_SYMBOL(find_first_bit); +EXPORT_SYMBOL(find_first_zero_bit); +EXPORT_SYMBOL(find_next_zero_bit); diff -Nru a/arch/x86_64/lib/bitstr.c b/arch/x86_64/lib/bitstr.c --- a/arch/x86_64/lib/bitstr.c 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/lib/bitstr.c 2004-09-06 16:37:52 -07:00 @@ -1,3 +1,4 @@ +#include #include /* Find string of zero bits in a bitmap */ @@ -23,3 +24,5 @@ } return n; } + +EXPORT_SYMBOL(find_next_zero_string); diff -Nru a/arch/x86_64/lib/memmove.c b/arch/x86_64/lib/memmove.c --- a/arch/x86_64/lib/memmove.c 2004-09-06 16:37:52 -07:00 +++ b/arch/x86_64/lib/memmove.c 2004-09-06 16:37:52 -07:00 @@ -10,18 +10,10 @@ if (dest < src) { __inline_memcpy(dest,src,count); } else { - /* Could be more clever and move longs */ - unsigned long d0, d1, d2; - __asm__ __volatile__( - "std\n\t" - "rep\n\t" - "movsb\n\t" - "cld" - : "=&c" (d0), "=&S" (d1), "=&D" (d2) - :"0" (count), - "1" (count-1+(const char *)src), - "2" (count-1+(char *)dest) - :"memory"); + char *p = (char *) dest + count; + char *s = (char *) src + count; + while (count--) + *--p = *--s; } return dest; } diff -Nru a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c --- a/arch/x86_64/mm/fault.c 2004-09-06 16:37:50 -07:00 +++ b/arch/x86_64/mm/fault.c 2004-09-06 16:37:50 -07:00 @@ -58,16 +58,17 @@ /* Sometimes the CPU reports invalid exceptions on prefetch. Check that here and ignore. Opcode checker based on code by Richard Brunner */ -static int is_prefetch(struct pt_regs *regs, unsigned long addr) +static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr, + unsigned long error_code) { unsigned char *instr = (unsigned char *)(regs->rip); int scan_more = 1; int prefetch = 0; unsigned char *max_instr = instr + 15; - /* Avoid recursive faults for this common case */ - if (regs->rip == addr) - return 0; + /* If it was a exec fault ignore */ + if (error_code & (1<<4)) + return 0; /* Code segments in LDT could have a non zero base. Don't check when that's possible */ @@ -218,6 +219,18 @@ (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL); } +static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs, + unsigned long error_code) +{ + oops_begin(); + printk(KERN_ALERT "%s: Corrupted page table at address %lx\n", + current->comm, address); + dump_pagetable(address); + __die("Bad pagetable", regs, error_code); + oops_end(); + do_exit(SIGKILL); +} + int page_fault_trace; int exception_trace = 1; @@ -268,11 +281,32 @@ mm = tsk->mm; info.si_code = SEGV_MAPERR; - /* 5 => page not present and from supervisor mode */ - if (unlikely(!(error_code & 5) && - ((address >= VMALLOC_START && address <= VMALLOC_END) || - (address >= MODULES_VADDR && address <= MODULES_END)))) - goto vmalloc_fault; + + /* + * We fault-in kernel-space virtual memory on-demand. The + * 'reference' page table is init_mm.pgd. + * + * NOTE! We MUST NOT take any locks for this case. We may + * be in an interrupt or a critical region, and should + * only copy the information from the master page table, + * nothing more. + * + * This verifies that the fault happens in kernel space + * (error_code & 4) == 0, and that the fault was not a + * protection error (error_code & 1) == 0. + */ + if (unlikely(address >= TASK_SIZE)) { + if (!(error_code & 5)) + goto vmalloc_fault; + /* + * Don't take the mm semaphore here. If we fixup a prefetch + * fault we could otherwise deadlock. + */ + goto bad_area_nosemaphore; + } + + if (unlikely(error_code & (1 << 3))) + goto page_table_corruption; /* * If we're in an interrupt or have no user @@ -351,18 +385,18 @@ bad_area_nosemaphore: #ifdef CONFIG_IA32_EMULATION - /* 32bit vsyscall. map on demand. */ - if (test_thread_flag(TIF_IA32) && + /* 32bit vsyscall. map on demand. */ + if (test_thread_flag(TIF_IA32) && address >= 0xffffe000 && address < 0xffffe000 + PAGE_SIZE) { - if (map_syscall32(mm, address) < 0) - goto out_of_memory2; - return; - } + if (map_syscall32(mm, address) < 0) + goto out_of_memory2; + return; + } #endif /* User mode accesses just cause a SIGSEGV */ if (error_code & 4) { - if (is_prefetch(regs, address)) + if (is_prefetch(regs, address, error_code)) return; /* Work around K8 erratum #100 K8 in compat mode @@ -376,7 +410,7 @@ return; if (exception_trace && unhandled_signal(tsk, SIGSEGV)) { - printk(KERN_INFO + printk(KERN_INFO "%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n", tsk->comm, tsk->pid, address, regs->rip, regs->rsp, error_code); @@ -407,7 +441,7 @@ * Hall of shame of CPU/BIOS bugs. */ - if (is_prefetch(regs, address)) + if (is_prefetch(regs, address, error_code)) return; if (is_errata93(regs, address)) @@ -481,10 +515,8 @@ * is really there and when yes flush the local TLB. */ pgd = pgd_offset_k(address); - if (pgd != current_pgd_offset_k(address)) - BUG(); if (!pgd_present(*pgd)) - goto bad_area_nosemaphore; + goto bad_area_nosemaphore; pmd = pmd_offset(pgd, address); if (!pmd_present(*pmd)) goto bad_area_nosemaphore; @@ -495,4 +527,7 @@ __flush_tlb_all(); return; } + +page_table_corruption: + pgtable_bad(address, regs, error_code); } diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c --- a/arch/x86_64/mm/init.c 2004-09-06 16:37:51 -07:00 +++ b/arch/x86_64/mm/init.c 2004-09-06 16:37:51 -07:00 @@ -41,6 +41,10 @@ #define Dprintk(x...) #endif +#ifdef CONFIG_GART_IOMMU +extern int swiotlb; +#endif + extern char _stext[]; DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); @@ -396,6 +400,8 @@ return 0; } +extern int swiotlb_force; + static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules, kcore_vsyscall; @@ -405,7 +411,10 @@ int tmp; #ifdef CONFIG_SWIOTLB - if (!iommu_aperture && end_pfn >= 0xffffffff>>PAGE_SHIFT) + if (swiotlb_force) + swiotlb = 1; + if (!iommu_aperture && + (end_pfn >= 0xffffffff>>PAGE_SHIFT || force_iommu)) swiotlb = 1; if (swiotlb) swiotlb_init(); @@ -596,7 +605,16 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk) { - return test_tsk_thread_flag(tsk, TIF_IA32) ? &gate32_vma : &gate_vma; +#ifdef CONFIG_IA32_EMULATION + if (test_tsk_thread_flag(tsk, TIF_IA32)) { + /* lookup code assumes the pages are present. set them up + now */ + if (map_syscall32(tsk->mm, 0xfffe000) < 0) + return NULL; + return &gate32_vma; + } +#endif + return &gate_vma; } int in_gate_area(struct task_struct *task, unsigned long addr) diff -Nru a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c --- a/arch/x86_64/mm/numa.c 2004-09-06 16:37:54 -07:00 +++ b/arch/x86_64/mm/numa.c 2004-09-06 16:37:54 -07:00 @@ -135,7 +135,7 @@ zones[ZONE_NORMAL] = end_pfn - start_pfn; } - free_area_init_node(nodeid, NODE_DATA(nodeid), NULL, zones, + free_area_init_node(nodeid, NODE_DATA(nodeid), zones, start_pfn, NULL); } @@ -162,10 +162,58 @@ set_bit(0, &node_to_cpumask[cpu_to_node(0)]); } +int numa_fake __initdata = 0; + +/* Numa emulation */ +static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn) +{ + int i; + struct node nodes[MAXNODE]; + unsigned long sz = ((end_pfn - start_pfn)< 1) { + unsigned long x = 1; + while ((x << 1) < sz) + x <<= 1; + if (x < sz/2) + printk("Numa emulation unbalanced. Complain to maintainer\n"); + sz = x; + } + + memset(&nodes,0,sizeof(nodes)); + for (i = 0; i < numa_fake; i++) { + nodes[i].start = (start_pfn<> 20); + } + numnodes = numa_fake; + memnode_shift = compute_hash_shift(nodes); + if (memnode_shift < 0) { + memnode_shift = 0; + printk(KERN_ERR "No NUMA hash function found. Emulation disabled.\n"); + return -1; + } + for (i = 0; i < numa_fake; i++) + setup_node_bootmem(i, nodes[i].start, nodes[i].end); + numa_init_array(); + return 0; +} + void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn) { int i; + if (numa_fake && !numa_emulation(start_pfn, end_pfn)) + return; + #ifdef CONFIG_K8_NUMA if (!numa_off && !k8_scan_nodes(start_pfn< #include #include +#include #include "tcrypt.h" /* @@ -61,7 +62,8 @@ static char *check[] = { "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", - "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", NULL + "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", + "whirlpool", NULL }; static void @@ -680,6 +682,7 @@ test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); + test_hash("whirlpool", whirlpool_tv_template, WHIRLPOOL_TEST_VECTORS); test_deflate(); test_crc32c(); #ifdef CONFIG_CRYPTO_HMAC @@ -791,6 +794,11 @@ test_cipher ("khazad", MODE_ECB, DECRYPT, khazad_dec_tv_template, KHAZAD_DEC_TEST_VECTORS); break; + case 22: + test_hash("whirlpool", whirlpool_tv_template, WHIRLPOOL_TEST_VECTORS); + break; + + #ifdef CONFIG_CRYPTO_HMAC case 100: test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS); @@ -846,7 +854,7 @@ module_init(init); module_exit(fini); -MODULE_PARM(mode, "i"); +module_param(mode, int, 0); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Quick & dirty crypto testing module"); diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h --- a/crypto/tcrypt.h 2004-09-06 16:37:55 -07:00 +++ b/crypto/tcrypt.h 2004-09-06 16:37:55 -07:00 @@ -301,6 +301,110 @@ }, }; + +/* + * WHIRLPOOL test vectors from Whirlpool package + * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE + * submission + */ +#define WHIRLPOOL_TEST_VECTORS 8 + +struct hash_testvec whirlpool_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x19, 0xFA, 0x61, 0xD7, 0x55, 0x22, 0xA4, 0x66, + 0x9B, 0x44, 0xE3, 0x9C, 0x1D, 0x2E, 0x17, 0x26, + 0xC5, 0x30, 0x23, 0x21, 0x30, 0xD4, 0x07, 0xF8, + 0x9A, 0xFE, 0xE0, 0x96, 0x49, 0x97, 0xF7, 0xA7, + 0x3E, 0x83, 0xBE, 0x69, 0x8B, 0x28, 0x8F, 0xEB, + 0xCF, 0x88, 0xE3, 0xE0, 0x3C, 0x4F, 0x07, 0x57, + 0xEA, 0x89, 0x64, 0xE5, 0x9B, 0x63, 0xD9, 0x37, + 0x08, 0xB1, 0x38, 0xCC, 0x42, 0xA6, 0x6E, 0xB3 }, + + + }, { + .plaintext = "a", + .psize = 1, + .digest = { 0x8A, 0xCA, 0x26, 0x02, 0x79, 0x2A, 0xEC, 0x6F, + 0x11, 0xA6, 0x72, 0x06, 0x53, 0x1F, 0xB7, 0xD7, + 0xF0, 0xDF, 0xF5, 0x94, 0x13, 0x14, 0x5E, 0x69, + 0x73, 0xC4, 0x50, 0x01, 0xD0, 0x08, 0x7B, 0x42, + 0xD1, 0x1B, 0xC6, 0x45, 0x41, 0x3A, 0xEF, 0xF6, + 0x3A, 0x42, 0x39, 0x1A, 0x39, 0x14, 0x5A, 0x59, + 0x1A, 0x92, 0x20, 0x0D, 0x56, 0x01, 0x95, 0xE5, + 0x3B, 0x47, 0x85, 0x84, 0xFD, 0xAE, 0x23, 0x1A }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0x4E, 0x24, 0x48, 0xA4, 0xC6, 0xF4, 0x86, 0xBB, + 0x16, 0xB6, 0x56, 0x2C, 0x73, 0xB4, 0x02, 0x0B, + 0xF3, 0x04, 0x3E, 0x3A, 0x73, 0x1B, 0xCE, 0x72, + 0x1A, 0xE1, 0xB3, 0x03, 0xD9, 0x7E, 0x6D, 0x4C, + 0x71, 0x81, 0xEE, 0xBD, 0xB6, 0xC5, 0x7E, 0x27, + 0x7D, 0x0E, 0x34, 0x95, 0x71, 0x14, 0xCB, 0xD6, + 0xC7, 0x97, 0xFC, 0x9D, 0x95, 0xD8, 0xB5, 0x82, + 0xD2, 0x25, 0x29, 0x20, 0x76, 0xD4, 0xEE, 0xF5 }, + }, { + .plaintext = "message digest", + .psize = 14, + .digest = { 0x37, 0x8C, 0x84, 0xA4, 0x12, 0x6E, 0x2D, 0xC6, + 0xE5, 0x6D, 0xCC, 0x74, 0x58, 0x37, 0x7A, 0xAC, + 0x83, 0x8D, 0x00, 0x03, 0x22, 0x30, 0xF5, 0x3C, + 0xE1, 0xF5, 0x70, 0x0C, 0x0F, 0xFB, 0x4D, 0x3B, + 0x84, 0x21, 0x55, 0x76, 0x59, 0xEF, 0x55, 0xC1, + 0x06, 0xB4, 0xB5, 0x2A, 0xC5, 0xA4, 0xAA, 0xA6, + 0x92, 0xED, 0x92, 0x00, 0x52, 0x83, 0x8F, 0x33, + 0x62, 0xE8, 0x6D, 0xBD, 0x37, 0xA8, 0x90, 0x3E }, + }, { + .plaintext = "abcdefghijklmnopqrstuvwxyz", + .psize = 26, + .digest = { 0xF1, 0xD7, 0x54, 0x66, 0x26, 0x36, 0xFF, 0xE9, + 0x2C, 0x82, 0xEB, 0xB9, 0x21, 0x2A, 0x48, 0x4A, + 0x8D, 0x38, 0x63, 0x1E, 0xAD, 0x42, 0x38, 0xF5, + 0x44, 0x2E, 0xE1, 0x3B, 0x80, 0x54, 0xE4, 0x1B, + 0x08, 0xBF, 0x2A, 0x92, 0x51, 0xC3, 0x0B, 0x6A, + 0x0B, 0x8A, 0xAE, 0x86, 0x17, 0x7A, 0xB4, 0xA6, + 0xF6, 0x8F, 0x67, 0x3E, 0x72, 0x07, 0x86, 0x5D, + 0x5D, 0x98, 0x19, 0xA3, 0xDB, 0xA4, 0xEB, 0x3B }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz0123456789", + .psize = 62, + .digest = { 0xDC, 0x37, 0xE0, 0x08, 0xCF, 0x9E, 0xE6, 0x9B, + 0xF1, 0x1F, 0x00, 0xED, 0x9A, 0xBA, 0x26, 0x90, + 0x1D, 0xD7, 0xC2, 0x8C, 0xDE, 0xC0, 0x66, 0xCC, + 0x6A, 0xF4, 0x2E, 0x40, 0xF8, 0x2F, 0x3A, 0x1E, + 0x08, 0xEB, 0xA2, 0x66, 0x29, 0x12, 0x9D, 0x8F, + 0xB7, 0xCB, 0x57, 0x21, 0x1B, 0x92, 0x81, 0xA6, + 0x55, 0x17, 0xCC, 0x87, 0x9D, 0x7B, 0x96, 0x21, + 0x42, 0xC6, 0x5F, 0x5A, 0x7A, 0xF0, 0x14, 0x67 }, + }, { + .plaintext = "1234567890123456789012345678901234567890" + "1234567890123456789012345678901234567890", + .psize = 80, + .digest = { 0x46, 0x6E, 0xF1, 0x8B, 0xAB, 0xB0, 0x15, 0x4D, + 0x25, 0xB9, 0xD3, 0x8A, 0x64, 0x14, 0xF5, 0xC0, + 0x87, 0x84, 0x37, 0x2B, 0xCC, 0xB2, 0x04, 0xD6, + 0x54, 0x9C, 0x4A, 0xFA, 0xDB, 0x60, 0x14, 0x29, + 0x4D, 0x5B, 0xD8, 0xDF, 0x2A, 0x6C, 0x44, 0xE5, + 0x38, 0xCD, 0x04, 0x7B, 0x26, 0x81, 0xA5, 0x1A, + 0x2C, 0x60, 0x48, 0x1E, 0x88, 0xC5, 0xA2, 0x0B, + 0x2C, 0x2A, 0x80, 0xCF, 0x3A, 0x9A, 0x08, 0x3B }, + }, { + .plaintext = "abcdbcdecdefdefgefghfghighijhijk", + .psize = 32, + .digest = { 0x2A, 0x98, 0x7E, 0xA4, 0x0F, 0x91, 0x70, 0x61, + 0xF5, 0xD6, 0xF0, 0xA0, 0xE4, 0x64, 0x4F, 0x48, + 0x8A, 0x7A, 0x5A, 0x52, 0xDE, 0xEE, 0x65, 0x62, + 0x07, 0xC5, 0x62, 0xF9, 0x88, 0xE9, 0x5C, 0x69, + 0x16, 0xBD, 0xC8, 0x03, 0x1B, 0xC5, 0xBE, 0x1B, + 0x7B, 0x94, 0x76, 0x39, 0xFE, 0x05, 0x0B, 0x56, + 0x93, 0x9B, 0xAA, 0xA0, 0xAD, 0xFF, 0x9A, 0xE6, + 0x74, 0x5B, 0x7B, 0x18, 0x1C, 0x3B, 0xE3, 0xFD }, + }, +}; + #ifdef CONFIG_CRYPTO_HMAC /* * HMAC-MD5 test vectors from RFC2202 diff -Nru a/crypto/whirlpool.c b/crypto/whirlpool.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/crypto/whirlpool.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1131 @@ +/* + * Cryptographic API. + * + * Whirlpool hashing Algorithm + * + * The Whirlpool algorithm was developed by Paulo S. L. M. Barreto and + * Vincent Rijmen. It has been selected as one of cryptographic + * primitives by the NESSIE project http://www.cryptonessie.org/ + * + * The original authors have disclaimed all copyright interest in this + * code and thus put it in the public domain. The subsequent authors + * have put this under the GNU General Public License. + * + * By Aaron Grothe ajgrothe@yahoo.com, August 23, 2004 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#include +#include +#include +#include +#include + +#define WHIRLPOOL_DIGEST_SIZE 64 +#define WHIRLPOOL_BLOCK_SIZE 64 +#define WHIRLPOOL_LENGTHBYTES 32 + +#define WHIRLPOOL_ROUNDS 10 + +struct whirlpool_ctx { + u8 bitLength[WHIRLPOOL_LENGTHBYTES]; + u8 buffer[WHIRLPOOL_BLOCK_SIZE]; + int bufferBits; + int bufferPos; + u64 hash[WHIRLPOOL_DIGEST_SIZE/8]; +}; + +/* + * Though Whirlpool is endianness-neutral, the encryption tables are listed + * in BIG-ENDIAN format, which is adopted throughout this implementation + * (but little-endian notation would be equally suitable if consistently + * employed). + */ + +static const u64 C0[256] = { + 0x18186018c07830d8ULL, 0x23238c2305af4626ULL, 0xc6c63fc67ef991b8ULL, + 0xe8e887e8136fcdfbULL, 0x878726874ca113cbULL, 0xb8b8dab8a9626d11ULL, + 0x0101040108050209ULL, 0x4f4f214f426e9e0dULL, 0x3636d836adee6c9bULL, + 0xa6a6a2a6590451ffULL, 0xd2d26fd2debdb90cULL, 0xf5f5f3f5fb06f70eULL, + 0x7979f979ef80f296ULL, 0x6f6fa16f5fcede30ULL, 0x91917e91fcef3f6dULL, + 0x52525552aa07a4f8ULL, 0x60609d6027fdc047ULL, 0xbcbccabc89766535ULL, + 0x9b9b569baccd2b37ULL, 0x8e8e028e048c018aULL, 0xa3a3b6a371155bd2ULL, + 0x0c0c300c603c186cULL, 0x7b7bf17bff8af684ULL, 0x3535d435b5e16a80ULL, + 0x1d1d741de8693af5ULL, 0xe0e0a7e05347ddb3ULL, 0xd7d77bd7f6acb321ULL, + 0xc2c22fc25eed999cULL, 0x2e2eb82e6d965c43ULL, 0x4b4b314b627a9629ULL, + 0xfefedffea321e15dULL, 0x575741578216aed5ULL, 0x15155415a8412abdULL, + 0x7777c1779fb6eee8ULL, 0x3737dc37a5eb6e92ULL, 0xe5e5b3e57b56d79eULL, + 0x9f9f469f8cd92313ULL, 0xf0f0e7f0d317fd23ULL, 0x4a4a354a6a7f9420ULL, + 0xdada4fda9e95a944ULL, 0x58587d58fa25b0a2ULL, 0xc9c903c906ca8fcfULL, + 0x2929a429558d527cULL, 0x0a0a280a5022145aULL, 0xb1b1feb1e14f7f50ULL, + 0xa0a0baa0691a5dc9ULL, 0x6b6bb16b7fdad614ULL, 0x85852e855cab17d9ULL, + 0xbdbdcebd8173673cULL, 0x5d5d695dd234ba8fULL, 0x1010401080502090ULL, + 0xf4f4f7f4f303f507ULL, 0xcbcb0bcb16c08bddULL, 0x3e3ef83eedc67cd3ULL, + 0x0505140528110a2dULL, 0x676781671fe6ce78ULL, 0xe4e4b7e47353d597ULL, + 0x27279c2725bb4e02ULL, 0x4141194132588273ULL, 0x8b8b168b2c9d0ba7ULL, + 0xa7a7a6a7510153f6ULL, 0x7d7de97dcf94fab2ULL, 0x95956e95dcfb3749ULL, + 0xd8d847d88e9fad56ULL, 0xfbfbcbfb8b30eb70ULL, 0xeeee9fee2371c1cdULL, + 0x7c7ced7cc791f8bbULL, 0x6666856617e3cc71ULL, 0xdddd53dda68ea77bULL, + 0x17175c17b84b2eafULL, 0x4747014702468e45ULL, 0x9e9e429e84dc211aULL, + 0xcaca0fca1ec589d4ULL, 0x2d2db42d75995a58ULL, 0xbfbfc6bf9179632eULL, + 0x07071c07381b0e3fULL, 0xadad8ead012347acULL, 0x5a5a755aea2fb4b0ULL, + 0x838336836cb51befULL, 0x3333cc3385ff66b6ULL, 0x636391633ff2c65cULL, + 0x02020802100a0412ULL, 0xaaaa92aa39384993ULL, 0x7171d971afa8e2deULL, + 0xc8c807c80ecf8dc6ULL, 0x19196419c87d32d1ULL, 0x494939497270923bULL, + 0xd9d943d9869aaf5fULL, 0xf2f2eff2c31df931ULL, 0xe3e3abe34b48dba8ULL, + 0x5b5b715be22ab6b9ULL, 0x88881a8834920dbcULL, 0x9a9a529aa4c8293eULL, + 0x262698262dbe4c0bULL, 0x3232c8328dfa64bfULL, 0xb0b0fab0e94a7d59ULL, + 0xe9e983e91b6acff2ULL, 0x0f0f3c0f78331e77ULL, 0xd5d573d5e6a6b733ULL, + 0x80803a8074ba1df4ULL, 0xbebec2be997c6127ULL, 0xcdcd13cd26de87ebULL, + 0x3434d034bde46889ULL, 0x48483d487a759032ULL, 0xffffdbffab24e354ULL, + 0x7a7af57af78ff48dULL, 0x90907a90f4ea3d64ULL, 0x5f5f615fc23ebe9dULL, + 0x202080201da0403dULL, 0x6868bd6867d5d00fULL, 0x1a1a681ad07234caULL, + 0xaeae82ae192c41b7ULL, 0xb4b4eab4c95e757dULL, 0x54544d549a19a8ceULL, + 0x93937693ece53b7fULL, 0x222288220daa442fULL, 0x64648d6407e9c863ULL, + 0xf1f1e3f1db12ff2aULL, 0x7373d173bfa2e6ccULL, 0x12124812905a2482ULL, + 0x40401d403a5d807aULL, 0x0808200840281048ULL, 0xc3c32bc356e89b95ULL, + 0xecec97ec337bc5dfULL, 0xdbdb4bdb9690ab4dULL, 0xa1a1bea1611f5fc0ULL, + 0x8d8d0e8d1c830791ULL, 0x3d3df43df5c97ac8ULL, 0x97976697ccf1335bULL, + 0x0000000000000000ULL, 0xcfcf1bcf36d483f9ULL, 0x2b2bac2b4587566eULL, + 0x7676c57697b3ece1ULL, 0x8282328264b019e6ULL, 0xd6d67fd6fea9b128ULL, + 0x1b1b6c1bd87736c3ULL, 0xb5b5eeb5c15b7774ULL, 0xafaf86af112943beULL, + 0x6a6ab56a77dfd41dULL, 0x50505d50ba0da0eaULL, 0x45450945124c8a57ULL, + 0xf3f3ebf3cb18fb38ULL, 0x3030c0309df060adULL, 0xefef9bef2b74c3c4ULL, + 0x3f3ffc3fe5c37edaULL, 0x55554955921caac7ULL, 0xa2a2b2a2791059dbULL, + 0xeaea8fea0365c9e9ULL, 0x656589650fecca6aULL, 0xbabad2bab9686903ULL, + 0x2f2fbc2f65935e4aULL, 0xc0c027c04ee79d8eULL, 0xdede5fdebe81a160ULL, + 0x1c1c701ce06c38fcULL, 0xfdfdd3fdbb2ee746ULL, 0x4d4d294d52649a1fULL, + 0x92927292e4e03976ULL, 0x7575c9758fbceafaULL, 0x06061806301e0c36ULL, + 0x8a8a128a249809aeULL, 0xb2b2f2b2f940794bULL, 0xe6e6bfe66359d185ULL, + 0x0e0e380e70361c7eULL, 0x1f1f7c1ff8633ee7ULL, 0x6262956237f7c455ULL, + 0xd4d477d4eea3b53aULL, 0xa8a89aa829324d81ULL, 0x96966296c4f43152ULL, + 0xf9f9c3f99b3aef62ULL, 0xc5c533c566f697a3ULL, 0x2525942535b14a10ULL, + 0x59597959f220b2abULL, 0x84842a8454ae15d0ULL, 0x7272d572b7a7e4c5ULL, + 0x3939e439d5dd72ecULL, 0x4c4c2d4c5a619816ULL, 0x5e5e655eca3bbc94ULL, + 0x7878fd78e785f09fULL, 0x3838e038ddd870e5ULL, 0x8c8c0a8c14860598ULL, + 0xd1d163d1c6b2bf17ULL, 0xa5a5aea5410b57e4ULL, 0xe2e2afe2434dd9a1ULL, + 0x616199612ff8c24eULL, 0xb3b3f6b3f1457b42ULL, 0x2121842115a54234ULL, + 0x9c9c4a9c94d62508ULL, 0x1e1e781ef0663ceeULL, 0x4343114322528661ULL, + 0xc7c73bc776fc93b1ULL, 0xfcfcd7fcb32be54fULL, 0x0404100420140824ULL, + 0x51515951b208a2e3ULL, 0x99995e99bcc72f25ULL, 0x6d6da96d4fc4da22ULL, + 0x0d0d340d68391a65ULL, 0xfafacffa8335e979ULL, 0xdfdf5bdfb684a369ULL, + 0x7e7ee57ed79bfca9ULL, 0x242490243db44819ULL, 0x3b3bec3bc5d776feULL, + 0xabab96ab313d4b9aULL, 0xcece1fce3ed181f0ULL, 0x1111441188552299ULL, + 0x8f8f068f0c890383ULL, 0x4e4e254e4a6b9c04ULL, 0xb7b7e6b7d1517366ULL, + 0xebeb8beb0b60cbe0ULL, 0x3c3cf03cfdcc78c1ULL, 0x81813e817cbf1ffdULL, + 0x94946a94d4fe3540ULL, 0xf7f7fbf7eb0cf31cULL, 0xb9b9deb9a1676f18ULL, + 0x13134c13985f268bULL, 0x2c2cb02c7d9c5851ULL, 0xd3d36bd3d6b8bb05ULL, + 0xe7e7bbe76b5cd38cULL, 0x6e6ea56e57cbdc39ULL, 0xc4c437c46ef395aaULL, + 0x03030c03180f061bULL, 0x565645568a13acdcULL, 0x44440d441a49885eULL, + 0x7f7fe17fdf9efea0ULL, 0xa9a99ea921374f88ULL, 0x2a2aa82a4d825467ULL, + 0xbbbbd6bbb16d6b0aULL, 0xc1c123c146e29f87ULL, 0x53535153a202a6f1ULL, + 0xdcdc57dcae8ba572ULL, 0x0b0b2c0b58271653ULL, 0x9d9d4e9d9cd32701ULL, + 0x6c6cad6c47c1d82bULL, 0x3131c43195f562a4ULL, 0x7474cd7487b9e8f3ULL, + 0xf6f6fff6e309f115ULL, 0x464605460a438c4cULL, 0xacac8aac092645a5ULL, + 0x89891e893c970fb5ULL, 0x14145014a04428b4ULL, 0xe1e1a3e15b42dfbaULL, + 0x16165816b04e2ca6ULL, 0x3a3ae83acdd274f7ULL, 0x6969b9696fd0d206ULL, + 0x09092409482d1241ULL, 0x7070dd70a7ade0d7ULL, 0xb6b6e2b6d954716fULL, + 0xd0d067d0ceb7bd1eULL, 0xeded93ed3b7ec7d6ULL, 0xcccc17cc2edb85e2ULL, + 0x424215422a578468ULL, 0x98985a98b4c22d2cULL, 0xa4a4aaa4490e55edULL, + 0x2828a0285d885075ULL, 0x5c5c6d5cda31b886ULL, 0xf8f8c7f8933fed6bULL, + 0x8686228644a411c2ULL, +}; + +static const u64 C1[256] = { + 0xd818186018c07830ULL, 0x2623238c2305af46ULL, 0xb8c6c63fc67ef991ULL, + 0xfbe8e887e8136fcdULL, 0xcb878726874ca113ULL, 0x11b8b8dab8a9626dULL, + 0x0901010401080502ULL, 0x0d4f4f214f426e9eULL, 0x9b3636d836adee6cULL, + 0xffa6a6a2a6590451ULL, 0x0cd2d26fd2debdb9ULL, 0x0ef5f5f3f5fb06f7ULL, + 0x967979f979ef80f2ULL, 0x306f6fa16f5fcedeULL, 0x6d91917e91fcef3fULL, + 0xf852525552aa07a4ULL, 0x4760609d6027fdc0ULL, 0x35bcbccabc897665ULL, + 0x379b9b569baccd2bULL, 0x8a8e8e028e048c01ULL, 0xd2a3a3b6a371155bULL, + 0x6c0c0c300c603c18ULL, 0x847b7bf17bff8af6ULL, 0x803535d435b5e16aULL, + 0xf51d1d741de8693aULL, 0xb3e0e0a7e05347ddULL, 0x21d7d77bd7f6acb3ULL, + 0x9cc2c22fc25eed99ULL, 0x432e2eb82e6d965cULL, 0x294b4b314b627a96ULL, + 0x5dfefedffea321e1ULL, 0xd5575741578216aeULL, 0xbd15155415a8412aULL, + 0xe87777c1779fb6eeULL, 0x923737dc37a5eb6eULL, 0x9ee5e5b3e57b56d7ULL, + 0x139f9f469f8cd923ULL, 0x23f0f0e7f0d317fdULL, 0x204a4a354a6a7f94ULL, + 0x44dada4fda9e95a9ULL, 0xa258587d58fa25b0ULL, 0xcfc9c903c906ca8fULL, + 0x7c2929a429558d52ULL, 0x5a0a0a280a502214ULL, 0x50b1b1feb1e14f7fULL, + 0xc9a0a0baa0691a5dULL, 0x146b6bb16b7fdad6ULL, 0xd985852e855cab17ULL, + 0x3cbdbdcebd817367ULL, 0x8f5d5d695dd234baULL, 0x9010104010805020ULL, + 0x07f4f4f7f4f303f5ULL, 0xddcbcb0bcb16c08bULL, 0xd33e3ef83eedc67cULL, + 0x2d0505140528110aULL, 0x78676781671fe6ceULL, 0x97e4e4b7e47353d5ULL, + 0x0227279c2725bb4eULL, 0x7341411941325882ULL, 0xa78b8b168b2c9d0bULL, + 0xf6a7a7a6a7510153ULL, 0xb27d7de97dcf94faULL, 0x4995956e95dcfb37ULL, + 0x56d8d847d88e9fadULL, 0x70fbfbcbfb8b30ebULL, 0xcdeeee9fee2371c1ULL, + 0xbb7c7ced7cc791f8ULL, 0x716666856617e3ccULL, 0x7bdddd53dda68ea7ULL, + 0xaf17175c17b84b2eULL, 0x454747014702468eULL, 0x1a9e9e429e84dc21ULL, + 0xd4caca0fca1ec589ULL, 0x582d2db42d75995aULL, 0x2ebfbfc6bf917963ULL, + 0x3f07071c07381b0eULL, 0xacadad8ead012347ULL, 0xb05a5a755aea2fb4ULL, + 0xef838336836cb51bULL, 0xb63333cc3385ff66ULL, 0x5c636391633ff2c6ULL, + 0x1202020802100a04ULL, 0x93aaaa92aa393849ULL, 0xde7171d971afa8e2ULL, + 0xc6c8c807c80ecf8dULL, 0xd119196419c87d32ULL, 0x3b49493949727092ULL, + 0x5fd9d943d9869aafULL, 0x31f2f2eff2c31df9ULL, 0xa8e3e3abe34b48dbULL, + 0xb95b5b715be22ab6ULL, 0xbc88881a8834920dULL, 0x3e9a9a529aa4c829ULL, + 0x0b262698262dbe4cULL, 0xbf3232c8328dfa64ULL, 0x59b0b0fab0e94a7dULL, + 0xf2e9e983e91b6acfULL, 0x770f0f3c0f78331eULL, 0x33d5d573d5e6a6b7ULL, + 0xf480803a8074ba1dULL, 0x27bebec2be997c61ULL, 0xebcdcd13cd26de87ULL, + 0x893434d034bde468ULL, 0x3248483d487a7590ULL, 0x54ffffdbffab24e3ULL, + 0x8d7a7af57af78ff4ULL, 0x6490907a90f4ea3dULL, 0x9d5f5f615fc23ebeULL, + 0x3d202080201da040ULL, 0x0f6868bd6867d5d0ULL, 0xca1a1a681ad07234ULL, + 0xb7aeae82ae192c41ULL, 0x7db4b4eab4c95e75ULL, 0xce54544d549a19a8ULL, + 0x7f93937693ece53bULL, 0x2f222288220daa44ULL, 0x6364648d6407e9c8ULL, + 0x2af1f1e3f1db12ffULL, 0xcc7373d173bfa2e6ULL, 0x8212124812905a24ULL, + 0x7a40401d403a5d80ULL, 0x4808082008402810ULL, 0x95c3c32bc356e89bULL, + 0xdfecec97ec337bc5ULL, 0x4ddbdb4bdb9690abULL, 0xc0a1a1bea1611f5fULL, + 0x918d8d0e8d1c8307ULL, 0xc83d3df43df5c97aULL, 0x5b97976697ccf133ULL, + 0x0000000000000000ULL, 0xf9cfcf1bcf36d483ULL, 0x6e2b2bac2b458756ULL, + 0xe17676c57697b3ecULL, 0xe68282328264b019ULL, 0x28d6d67fd6fea9b1ULL, + 0xc31b1b6c1bd87736ULL, 0x74b5b5eeb5c15b77ULL, 0xbeafaf86af112943ULL, + 0x1d6a6ab56a77dfd4ULL, 0xea50505d50ba0da0ULL, 0x5745450945124c8aULL, + 0x38f3f3ebf3cb18fbULL, 0xad3030c0309df060ULL, 0xc4efef9bef2b74c3ULL, + 0xda3f3ffc3fe5c37eULL, 0xc755554955921caaULL, 0xdba2a2b2a2791059ULL, + 0xe9eaea8fea0365c9ULL, 0x6a656589650feccaULL, 0x03babad2bab96869ULL, + 0x4a2f2fbc2f65935eULL, 0x8ec0c027c04ee79dULL, 0x60dede5fdebe81a1ULL, + 0xfc1c1c701ce06c38ULL, 0x46fdfdd3fdbb2ee7ULL, 0x1f4d4d294d52649aULL, + 0x7692927292e4e039ULL, 0xfa7575c9758fbceaULL, 0x3606061806301e0cULL, + 0xae8a8a128a249809ULL, 0x4bb2b2f2b2f94079ULL, 0x85e6e6bfe66359d1ULL, + 0x7e0e0e380e70361cULL, 0xe71f1f7c1ff8633eULL, 0x556262956237f7c4ULL, + 0x3ad4d477d4eea3b5ULL, 0x81a8a89aa829324dULL, 0x5296966296c4f431ULL, + 0x62f9f9c3f99b3aefULL, 0xa3c5c533c566f697ULL, 0x102525942535b14aULL, + 0xab59597959f220b2ULL, 0xd084842a8454ae15ULL, 0xc57272d572b7a7e4ULL, + 0xec3939e439d5dd72ULL, 0x164c4c2d4c5a6198ULL, 0x945e5e655eca3bbcULL, + 0x9f7878fd78e785f0ULL, 0xe53838e038ddd870ULL, 0x988c8c0a8c148605ULL, + 0x17d1d163d1c6b2bfULL, 0xe4a5a5aea5410b57ULL, 0xa1e2e2afe2434dd9ULL, + 0x4e616199612ff8c2ULL, 0x42b3b3f6b3f1457bULL, 0x342121842115a542ULL, + 0x089c9c4a9c94d625ULL, 0xee1e1e781ef0663cULL, 0x6143431143225286ULL, + 0xb1c7c73bc776fc93ULL, 0x4ffcfcd7fcb32be5ULL, 0x2404041004201408ULL, + 0xe351515951b208a2ULL, 0x2599995e99bcc72fULL, 0x226d6da96d4fc4daULL, + 0x650d0d340d68391aULL, 0x79fafacffa8335e9ULL, 0x69dfdf5bdfb684a3ULL, + 0xa97e7ee57ed79bfcULL, 0x19242490243db448ULL, 0xfe3b3bec3bc5d776ULL, + 0x9aabab96ab313d4bULL, 0xf0cece1fce3ed181ULL, 0x9911114411885522ULL, + 0x838f8f068f0c8903ULL, 0x044e4e254e4a6b9cULL, 0x66b7b7e6b7d15173ULL, + 0xe0ebeb8beb0b60cbULL, 0xc13c3cf03cfdcc78ULL, 0xfd81813e817cbf1fULL, + 0x4094946a94d4fe35ULL, 0x1cf7f7fbf7eb0cf3ULL, 0x18b9b9deb9a1676fULL, + 0x8b13134c13985f26ULL, 0x512c2cb02c7d9c58ULL, 0x05d3d36bd3d6b8bbULL, + 0x8ce7e7bbe76b5cd3ULL, 0x396e6ea56e57cbdcULL, 0xaac4c437c46ef395ULL, + 0x1b03030c03180f06ULL, 0xdc565645568a13acULL, 0x5e44440d441a4988ULL, + 0xa07f7fe17fdf9efeULL, 0x88a9a99ea921374fULL, 0x672a2aa82a4d8254ULL, + 0x0abbbbd6bbb16d6bULL, 0x87c1c123c146e29fULL, 0xf153535153a202a6ULL, + 0x72dcdc57dcae8ba5ULL, 0x530b0b2c0b582716ULL, 0x019d9d4e9d9cd327ULL, + 0x2b6c6cad6c47c1d8ULL, 0xa43131c43195f562ULL, 0xf37474cd7487b9e8ULL, + 0x15f6f6fff6e309f1ULL, 0x4c464605460a438cULL, 0xa5acac8aac092645ULL, + 0xb589891e893c970fULL, 0xb414145014a04428ULL, 0xbae1e1a3e15b42dfULL, + 0xa616165816b04e2cULL, 0xf73a3ae83acdd274ULL, 0x066969b9696fd0d2ULL, + 0x4109092409482d12ULL, 0xd77070dd70a7ade0ULL, 0x6fb6b6e2b6d95471ULL, + 0x1ed0d067d0ceb7bdULL, 0xd6eded93ed3b7ec7ULL, 0xe2cccc17cc2edb85ULL, + 0x68424215422a5784ULL, 0x2c98985a98b4c22dULL, 0xeda4a4aaa4490e55ULL, + 0x752828a0285d8850ULL, 0x865c5c6d5cda31b8ULL, 0x6bf8f8c7f8933fedULL, + 0xc28686228644a411ULL, +}; + +static const u64 C2[256] = { + 0x30d818186018c078ULL, 0x462623238c2305afULL, 0x91b8c6c63fc67ef9ULL, + 0xcdfbe8e887e8136fULL, 0x13cb878726874ca1ULL, 0x6d11b8b8dab8a962ULL, + 0x0209010104010805ULL, 0x9e0d4f4f214f426eULL, 0x6c9b3636d836adeeULL, + 0x51ffa6a6a2a65904ULL, 0xb90cd2d26fd2debdULL, 0xf70ef5f5f3f5fb06ULL, + 0xf2967979f979ef80ULL, 0xde306f6fa16f5fceULL, 0x3f6d91917e91fcefULL, + 0xa4f852525552aa07ULL, 0xc04760609d6027fdULL, 0x6535bcbccabc8976ULL, + 0x2b379b9b569baccdULL, 0x018a8e8e028e048cULL, 0x5bd2a3a3b6a37115ULL, + 0x186c0c0c300c603cULL, 0xf6847b7bf17bff8aULL, 0x6a803535d435b5e1ULL, + 0x3af51d1d741de869ULL, 0xddb3e0e0a7e05347ULL, 0xb321d7d77bd7f6acULL, + 0x999cc2c22fc25eedULL, 0x5c432e2eb82e6d96ULL, 0x96294b4b314b627aULL, + 0xe15dfefedffea321ULL, 0xaed5575741578216ULL, 0x2abd15155415a841ULL, + 0xeee87777c1779fb6ULL, 0x6e923737dc37a5ebULL, 0xd79ee5e5b3e57b56ULL, + 0x23139f9f469f8cd9ULL, 0xfd23f0f0e7f0d317ULL, 0x94204a4a354a6a7fULL, + 0xa944dada4fda9e95ULL, 0xb0a258587d58fa25ULL, 0x8fcfc9c903c906caULL, + 0x527c2929a429558dULL, 0x145a0a0a280a5022ULL, 0x7f50b1b1feb1e14fULL, + 0x5dc9a0a0baa0691aULL, 0xd6146b6bb16b7fdaULL, 0x17d985852e855cabULL, + 0x673cbdbdcebd8173ULL, 0xba8f5d5d695dd234ULL, 0x2090101040108050ULL, + 0xf507f4f4f7f4f303ULL, 0x8bddcbcb0bcb16c0ULL, 0x7cd33e3ef83eedc6ULL, + 0x0a2d050514052811ULL, 0xce78676781671fe6ULL, 0xd597e4e4b7e47353ULL, + 0x4e0227279c2725bbULL, 0x8273414119413258ULL, 0x0ba78b8b168b2c9dULL, + 0x53f6a7a7a6a75101ULL, 0xfab27d7de97dcf94ULL, 0x374995956e95dcfbULL, + 0xad56d8d847d88e9fULL, 0xeb70fbfbcbfb8b30ULL, 0xc1cdeeee9fee2371ULL, + 0xf8bb7c7ced7cc791ULL, 0xcc716666856617e3ULL, 0xa77bdddd53dda68eULL, + 0x2eaf17175c17b84bULL, 0x8e45474701470246ULL, 0x211a9e9e429e84dcULL, + 0x89d4caca0fca1ec5ULL, 0x5a582d2db42d7599ULL, 0x632ebfbfc6bf9179ULL, + 0x0e3f07071c07381bULL, 0x47acadad8ead0123ULL, 0xb4b05a5a755aea2fULL, + 0x1bef838336836cb5ULL, 0x66b63333cc3385ffULL, 0xc65c636391633ff2ULL, + 0x041202020802100aULL, 0x4993aaaa92aa3938ULL, 0xe2de7171d971afa8ULL, + 0x8dc6c8c807c80ecfULL, 0x32d119196419c87dULL, 0x923b494939497270ULL, + 0xaf5fd9d943d9869aULL, 0xf931f2f2eff2c31dULL, 0xdba8e3e3abe34b48ULL, + 0xb6b95b5b715be22aULL, 0x0dbc88881a883492ULL, 0x293e9a9a529aa4c8ULL, + 0x4c0b262698262dbeULL, 0x64bf3232c8328dfaULL, 0x7d59b0b0fab0e94aULL, + 0xcff2e9e983e91b6aULL, 0x1e770f0f3c0f7833ULL, 0xb733d5d573d5e6a6ULL, + 0x1df480803a8074baULL, 0x6127bebec2be997cULL, 0x87ebcdcd13cd26deULL, + 0x68893434d034bde4ULL, 0x903248483d487a75ULL, 0xe354ffffdbffab24ULL, + 0xf48d7a7af57af78fULL, 0x3d6490907a90f4eaULL, 0xbe9d5f5f615fc23eULL, + 0x403d202080201da0ULL, 0xd00f6868bd6867d5ULL, 0x34ca1a1a681ad072ULL, + 0x41b7aeae82ae192cULL, 0x757db4b4eab4c95eULL, 0xa8ce54544d549a19ULL, + 0x3b7f93937693ece5ULL, 0x442f222288220daaULL, 0xc86364648d6407e9ULL, + 0xff2af1f1e3f1db12ULL, 0xe6cc7373d173bfa2ULL, 0x248212124812905aULL, + 0x807a40401d403a5dULL, 0x1048080820084028ULL, 0x9b95c3c32bc356e8ULL, + 0xc5dfecec97ec337bULL, 0xab4ddbdb4bdb9690ULL, 0x5fc0a1a1bea1611fULL, + 0x07918d8d0e8d1c83ULL, 0x7ac83d3df43df5c9ULL, 0x335b97976697ccf1ULL, + 0x0000000000000000ULL, 0x83f9cfcf1bcf36d4ULL, 0x566e2b2bac2b4587ULL, + 0xece17676c57697b3ULL, 0x19e68282328264b0ULL, 0xb128d6d67fd6fea9ULL, + 0x36c31b1b6c1bd877ULL, 0x7774b5b5eeb5c15bULL, 0x43beafaf86af1129ULL, + 0xd41d6a6ab56a77dfULL, 0xa0ea50505d50ba0dULL, 0x8a5745450945124cULL, + 0xfb38f3f3ebf3cb18ULL, 0x60ad3030c0309df0ULL, 0xc3c4efef9bef2b74ULL, + 0x7eda3f3ffc3fe5c3ULL, 0xaac755554955921cULL, 0x59dba2a2b2a27910ULL, + 0xc9e9eaea8fea0365ULL, 0xca6a656589650fecULL, 0x6903babad2bab968ULL, + 0x5e4a2f2fbc2f6593ULL, 0x9d8ec0c027c04ee7ULL, 0xa160dede5fdebe81ULL, + 0x38fc1c1c701ce06cULL, 0xe746fdfdd3fdbb2eULL, 0x9a1f4d4d294d5264ULL, + 0x397692927292e4e0ULL, 0xeafa7575c9758fbcULL, 0x0c3606061806301eULL, + 0x09ae8a8a128a2498ULL, 0x794bb2b2f2b2f940ULL, 0xd185e6e6bfe66359ULL, + 0x1c7e0e0e380e7036ULL, 0x3ee71f1f7c1ff863ULL, 0xc4556262956237f7ULL, + 0xb53ad4d477d4eea3ULL, 0x4d81a8a89aa82932ULL, 0x315296966296c4f4ULL, + 0xef62f9f9c3f99b3aULL, 0x97a3c5c533c566f6ULL, 0x4a102525942535b1ULL, + 0xb2ab59597959f220ULL, 0x15d084842a8454aeULL, 0xe4c57272d572b7a7ULL, + 0x72ec3939e439d5ddULL, 0x98164c4c2d4c5a61ULL, 0xbc945e5e655eca3bULL, + 0xf09f7878fd78e785ULL, 0x70e53838e038ddd8ULL, 0x05988c8c0a8c1486ULL, + 0xbf17d1d163d1c6b2ULL, 0x57e4a5a5aea5410bULL, 0xd9a1e2e2afe2434dULL, + 0xc24e616199612ff8ULL, 0x7b42b3b3f6b3f145ULL, 0x42342121842115a5ULL, + 0x25089c9c4a9c94d6ULL, 0x3cee1e1e781ef066ULL, 0x8661434311432252ULL, + 0x93b1c7c73bc776fcULL, 0xe54ffcfcd7fcb32bULL, 0x0824040410042014ULL, + 0xa2e351515951b208ULL, 0x2f2599995e99bcc7ULL, 0xda226d6da96d4fc4ULL, + 0x1a650d0d340d6839ULL, 0xe979fafacffa8335ULL, 0xa369dfdf5bdfb684ULL, + 0xfca97e7ee57ed79bULL, 0x4819242490243db4ULL, 0x76fe3b3bec3bc5d7ULL, + 0x4b9aabab96ab313dULL, 0x81f0cece1fce3ed1ULL, 0x2299111144118855ULL, + 0x03838f8f068f0c89ULL, 0x9c044e4e254e4a6bULL, 0x7366b7b7e6b7d151ULL, + 0xcbe0ebeb8beb0b60ULL, 0x78c13c3cf03cfdccULL, 0x1ffd81813e817cbfULL, + 0x354094946a94d4feULL, 0xf31cf7f7fbf7eb0cULL, 0x6f18b9b9deb9a167ULL, + 0x268b13134c13985fULL, 0x58512c2cb02c7d9cULL, 0xbb05d3d36bd3d6b8ULL, + 0xd38ce7e7bbe76b5cULL, 0xdc396e6ea56e57cbULL, 0x95aac4c437c46ef3ULL, + 0x061b03030c03180fULL, 0xacdc565645568a13ULL, 0x885e44440d441a49ULL, + 0xfea07f7fe17fdf9eULL, 0x4f88a9a99ea92137ULL, 0x54672a2aa82a4d82ULL, + 0x6b0abbbbd6bbb16dULL, 0x9f87c1c123c146e2ULL, 0xa6f153535153a202ULL, + 0xa572dcdc57dcae8bULL, 0x16530b0b2c0b5827ULL, 0x27019d9d4e9d9cd3ULL, + 0xd82b6c6cad6c47c1ULL, 0x62a43131c43195f5ULL, 0xe8f37474cd7487b9ULL, + 0xf115f6f6fff6e309ULL, 0x8c4c464605460a43ULL, 0x45a5acac8aac0926ULL, + 0x0fb589891e893c97ULL, 0x28b414145014a044ULL, 0xdfbae1e1a3e15b42ULL, + 0x2ca616165816b04eULL, 0x74f73a3ae83acdd2ULL, 0xd2066969b9696fd0ULL, + 0x124109092409482dULL, 0xe0d77070dd70a7adULL, 0x716fb6b6e2b6d954ULL, + 0xbd1ed0d067d0ceb7ULL, 0xc7d6eded93ed3b7eULL, 0x85e2cccc17cc2edbULL, + 0x8468424215422a57ULL, 0x2d2c98985a98b4c2ULL, 0x55eda4a4aaa4490eULL, + 0x50752828a0285d88ULL, 0xb8865c5c6d5cda31ULL, 0xed6bf8f8c7f8933fULL, + 0x11c28686228644a4ULL, +}; + +static const u64 C3[256] = { + 0x7830d818186018c0ULL, 0xaf462623238c2305ULL, 0xf991b8c6c63fc67eULL, + 0x6fcdfbe8e887e813ULL, 0xa113cb878726874cULL, 0x626d11b8b8dab8a9ULL, + 0x0502090101040108ULL, 0x6e9e0d4f4f214f42ULL, 0xee6c9b3636d836adULL, + 0x0451ffa6a6a2a659ULL, 0xbdb90cd2d26fd2deULL, 0x06f70ef5f5f3f5fbULL, + 0x80f2967979f979efULL, 0xcede306f6fa16f5fULL, 0xef3f6d91917e91fcULL, + 0x07a4f852525552aaULL, 0xfdc04760609d6027ULL, 0x766535bcbccabc89ULL, + 0xcd2b379b9b569bacULL, 0x8c018a8e8e028e04ULL, 0x155bd2a3a3b6a371ULL, + 0x3c186c0c0c300c60ULL, 0x8af6847b7bf17bffULL, 0xe16a803535d435b5ULL, + 0x693af51d1d741de8ULL, 0x47ddb3e0e0a7e053ULL, 0xacb321d7d77bd7f6ULL, + 0xed999cc2c22fc25eULL, 0x965c432e2eb82e6dULL, 0x7a96294b4b314b62ULL, + 0x21e15dfefedffea3ULL, 0x16aed55757415782ULL, 0x412abd15155415a8ULL, + 0xb6eee87777c1779fULL, 0xeb6e923737dc37a5ULL, 0x56d79ee5e5b3e57bULL, + 0xd923139f9f469f8cULL, 0x17fd23f0f0e7f0d3ULL, 0x7f94204a4a354a6aULL, + 0x95a944dada4fda9eULL, 0x25b0a258587d58faULL, 0xca8fcfc9c903c906ULL, + 0x8d527c2929a42955ULL, 0x22145a0a0a280a50ULL, 0x4f7f50b1b1feb1e1ULL, + 0x1a5dc9a0a0baa069ULL, 0xdad6146b6bb16b7fULL, 0xab17d985852e855cULL, + 0x73673cbdbdcebd81ULL, 0x34ba8f5d5d695dd2ULL, 0x5020901010401080ULL, + 0x03f507f4f4f7f4f3ULL, 0xc08bddcbcb0bcb16ULL, 0xc67cd33e3ef83eedULL, + 0x110a2d0505140528ULL, 0xe6ce78676781671fULL, 0x53d597e4e4b7e473ULL, + 0xbb4e0227279c2725ULL, 0x5882734141194132ULL, 0x9d0ba78b8b168b2cULL, + 0x0153f6a7a7a6a751ULL, 0x94fab27d7de97dcfULL, 0xfb374995956e95dcULL, + 0x9fad56d8d847d88eULL, 0x30eb70fbfbcbfb8bULL, 0x71c1cdeeee9fee23ULL, + 0x91f8bb7c7ced7cc7ULL, 0xe3cc716666856617ULL, 0x8ea77bdddd53dda6ULL, + 0x4b2eaf17175c17b8ULL, 0x468e454747014702ULL, 0xdc211a9e9e429e84ULL, + 0xc589d4caca0fca1eULL, 0x995a582d2db42d75ULL, 0x79632ebfbfc6bf91ULL, + 0x1b0e3f07071c0738ULL, 0x2347acadad8ead01ULL, 0x2fb4b05a5a755aeaULL, + 0xb51bef838336836cULL, 0xff66b63333cc3385ULL, 0xf2c65c636391633fULL, + 0x0a04120202080210ULL, 0x384993aaaa92aa39ULL, 0xa8e2de7171d971afULL, + 0xcf8dc6c8c807c80eULL, 0x7d32d119196419c8ULL, 0x70923b4949394972ULL, + 0x9aaf5fd9d943d986ULL, 0x1df931f2f2eff2c3ULL, 0x48dba8e3e3abe34bULL, + 0x2ab6b95b5b715be2ULL, 0x920dbc88881a8834ULL, 0xc8293e9a9a529aa4ULL, + 0xbe4c0b262698262dULL, 0xfa64bf3232c8328dULL, 0x4a7d59b0b0fab0e9ULL, + 0x6acff2e9e983e91bULL, 0x331e770f0f3c0f78ULL, 0xa6b733d5d573d5e6ULL, + 0xba1df480803a8074ULL, 0x7c6127bebec2be99ULL, 0xde87ebcdcd13cd26ULL, + 0xe468893434d034bdULL, 0x75903248483d487aULL, 0x24e354ffffdbffabULL, + 0x8ff48d7a7af57af7ULL, 0xea3d6490907a90f4ULL, 0x3ebe9d5f5f615fc2ULL, + 0xa0403d202080201dULL, 0xd5d00f6868bd6867ULL, 0x7234ca1a1a681ad0ULL, + 0x2c41b7aeae82ae19ULL, 0x5e757db4b4eab4c9ULL, 0x19a8ce54544d549aULL, + 0xe53b7f93937693ecULL, 0xaa442f222288220dULL, 0xe9c86364648d6407ULL, + 0x12ff2af1f1e3f1dbULL, 0xa2e6cc7373d173bfULL, 0x5a24821212481290ULL, + 0x5d807a40401d403aULL, 0x2810480808200840ULL, 0xe89b95c3c32bc356ULL, + 0x7bc5dfecec97ec33ULL, 0x90ab4ddbdb4bdb96ULL, 0x1f5fc0a1a1bea161ULL, + 0x8307918d8d0e8d1cULL, 0xc97ac83d3df43df5ULL, 0xf1335b97976697ccULL, + 0x0000000000000000ULL, 0xd483f9cfcf1bcf36ULL, 0x87566e2b2bac2b45ULL, + 0xb3ece17676c57697ULL, 0xb019e68282328264ULL, 0xa9b128d6d67fd6feULL, + 0x7736c31b1b6c1bd8ULL, 0x5b7774b5b5eeb5c1ULL, 0x2943beafaf86af11ULL, + 0xdfd41d6a6ab56a77ULL, 0x0da0ea50505d50baULL, 0x4c8a574545094512ULL, + 0x18fb38f3f3ebf3cbULL, 0xf060ad3030c0309dULL, 0x74c3c4efef9bef2bULL, + 0xc37eda3f3ffc3fe5ULL, 0x1caac75555495592ULL, 0x1059dba2a2b2a279ULL, + 0x65c9e9eaea8fea03ULL, 0xecca6a656589650fULL, 0x686903babad2bab9ULL, + 0x935e4a2f2fbc2f65ULL, 0xe79d8ec0c027c04eULL, 0x81a160dede5fdebeULL, + 0x6c38fc1c1c701ce0ULL, 0x2ee746fdfdd3fdbbULL, 0x649a1f4d4d294d52ULL, + 0xe0397692927292e4ULL, 0xbceafa7575c9758fULL, 0x1e0c360606180630ULL, + 0x9809ae8a8a128a24ULL, 0x40794bb2b2f2b2f9ULL, 0x59d185e6e6bfe663ULL, + 0x361c7e0e0e380e70ULL, 0x633ee71f1f7c1ff8ULL, 0xf7c4556262956237ULL, + 0xa3b53ad4d477d4eeULL, 0x324d81a8a89aa829ULL, 0xf4315296966296c4ULL, + 0x3aef62f9f9c3f99bULL, 0xf697a3c5c533c566ULL, 0xb14a102525942535ULL, + 0x20b2ab59597959f2ULL, 0xae15d084842a8454ULL, 0xa7e4c57272d572b7ULL, + 0xdd72ec3939e439d5ULL, 0x6198164c4c2d4c5aULL, 0x3bbc945e5e655ecaULL, + 0x85f09f7878fd78e7ULL, 0xd870e53838e038ddULL, 0x8605988c8c0a8c14ULL, + 0xb2bf17d1d163d1c6ULL, 0x0b57e4a5a5aea541ULL, 0x4dd9a1e2e2afe243ULL, + 0xf8c24e616199612fULL, 0x457b42b3b3f6b3f1ULL, 0xa542342121842115ULL, + 0xd625089c9c4a9c94ULL, 0x663cee1e1e781ef0ULL, 0x5286614343114322ULL, + 0xfc93b1c7c73bc776ULL, 0x2be54ffcfcd7fcb3ULL, 0x1408240404100420ULL, + 0x08a2e351515951b2ULL, 0xc72f2599995e99bcULL, 0xc4da226d6da96d4fULL, + 0x391a650d0d340d68ULL, 0x35e979fafacffa83ULL, 0x84a369dfdf5bdfb6ULL, + 0x9bfca97e7ee57ed7ULL, 0xb44819242490243dULL, 0xd776fe3b3bec3bc5ULL, + 0x3d4b9aabab96ab31ULL, 0xd181f0cece1fce3eULL, 0x5522991111441188ULL, + 0x8903838f8f068f0cULL, 0x6b9c044e4e254e4aULL, 0x517366b7b7e6b7d1ULL, + 0x60cbe0ebeb8beb0bULL, 0xcc78c13c3cf03cfdULL, 0xbf1ffd81813e817cULL, + 0xfe354094946a94d4ULL, 0x0cf31cf7f7fbf7ebULL, 0x676f18b9b9deb9a1ULL, + 0x5f268b13134c1398ULL, 0x9c58512c2cb02c7dULL, 0xb8bb05d3d36bd3d6ULL, + 0x5cd38ce7e7bbe76bULL, 0xcbdc396e6ea56e57ULL, 0xf395aac4c437c46eULL, + 0x0f061b03030c0318ULL, 0x13acdc565645568aULL, 0x49885e44440d441aULL, + 0x9efea07f7fe17fdfULL, 0x374f88a9a99ea921ULL, 0x8254672a2aa82a4dULL, + 0x6d6b0abbbbd6bbb1ULL, 0xe29f87c1c123c146ULL, 0x02a6f153535153a2ULL, + 0x8ba572dcdc57dcaeULL, 0x2716530b0b2c0b58ULL, 0xd327019d9d4e9d9cULL, + 0xc1d82b6c6cad6c47ULL, 0xf562a43131c43195ULL, 0xb9e8f37474cd7487ULL, + 0x09f115f6f6fff6e3ULL, 0x438c4c464605460aULL, 0x2645a5acac8aac09ULL, + 0x970fb589891e893cULL, 0x4428b414145014a0ULL, 0x42dfbae1e1a3e15bULL, + 0x4e2ca616165816b0ULL, 0xd274f73a3ae83acdULL, 0xd0d2066969b9696fULL, + 0x2d12410909240948ULL, 0xade0d77070dd70a7ULL, 0x54716fb6b6e2b6d9ULL, + 0xb7bd1ed0d067d0ceULL, 0x7ec7d6eded93ed3bULL, 0xdb85e2cccc17cc2eULL, + 0x578468424215422aULL, 0xc22d2c98985a98b4ULL, 0x0e55eda4a4aaa449ULL, + 0x8850752828a0285dULL, 0x31b8865c5c6d5cdaULL, 0x3fed6bf8f8c7f893ULL, + 0xa411c28686228644ULL, +}; + +static const u64 C4[256] = { + 0xc07830d818186018ULL, 0x05af462623238c23ULL, 0x7ef991b8c6c63fc6ULL, + 0x136fcdfbe8e887e8ULL, 0x4ca113cb87872687ULL, 0xa9626d11b8b8dab8ULL, + 0x0805020901010401ULL, 0x426e9e0d4f4f214fULL, 0xadee6c9b3636d836ULL, + 0x590451ffa6a6a2a6ULL, 0xdebdb90cd2d26fd2ULL, 0xfb06f70ef5f5f3f5ULL, + 0xef80f2967979f979ULL, 0x5fcede306f6fa16fULL, 0xfcef3f6d91917e91ULL, + 0xaa07a4f852525552ULL, 0x27fdc04760609d60ULL, 0x89766535bcbccabcULL, + 0xaccd2b379b9b569bULL, 0x048c018a8e8e028eULL, 0x71155bd2a3a3b6a3ULL, + 0x603c186c0c0c300cULL, 0xff8af6847b7bf17bULL, 0xb5e16a803535d435ULL, + 0xe8693af51d1d741dULL, 0x5347ddb3e0e0a7e0ULL, 0xf6acb321d7d77bd7ULL, + 0x5eed999cc2c22fc2ULL, 0x6d965c432e2eb82eULL, 0x627a96294b4b314bULL, + 0xa321e15dfefedffeULL, 0x8216aed557574157ULL, 0xa8412abd15155415ULL, + 0x9fb6eee87777c177ULL, 0xa5eb6e923737dc37ULL, 0x7b56d79ee5e5b3e5ULL, + 0x8cd923139f9f469fULL, 0xd317fd23f0f0e7f0ULL, 0x6a7f94204a4a354aULL, + 0x9e95a944dada4fdaULL, 0xfa25b0a258587d58ULL, 0x06ca8fcfc9c903c9ULL, + 0x558d527c2929a429ULL, 0x5022145a0a0a280aULL, 0xe14f7f50b1b1feb1ULL, + 0x691a5dc9a0a0baa0ULL, 0x7fdad6146b6bb16bULL, 0x5cab17d985852e85ULL, + 0x8173673cbdbdcebdULL, 0xd234ba8f5d5d695dULL, 0x8050209010104010ULL, + 0xf303f507f4f4f7f4ULL, 0x16c08bddcbcb0bcbULL, 0xedc67cd33e3ef83eULL, + 0x28110a2d05051405ULL, 0x1fe6ce7867678167ULL, 0x7353d597e4e4b7e4ULL, + 0x25bb4e0227279c27ULL, 0x3258827341411941ULL, 0x2c9d0ba78b8b168bULL, + 0x510153f6a7a7a6a7ULL, 0xcf94fab27d7de97dULL, 0xdcfb374995956e95ULL, + 0x8e9fad56d8d847d8ULL, 0x8b30eb70fbfbcbfbULL, 0x2371c1cdeeee9feeULL, + 0xc791f8bb7c7ced7cULL, 0x17e3cc7166668566ULL, 0xa68ea77bdddd53ddULL, + 0xb84b2eaf17175c17ULL, 0x02468e4547470147ULL, 0x84dc211a9e9e429eULL, + 0x1ec589d4caca0fcaULL, 0x75995a582d2db42dULL, 0x9179632ebfbfc6bfULL, + 0x381b0e3f07071c07ULL, 0x012347acadad8eadULL, 0xea2fb4b05a5a755aULL, + 0x6cb51bef83833683ULL, 0x85ff66b63333cc33ULL, 0x3ff2c65c63639163ULL, + 0x100a041202020802ULL, 0x39384993aaaa92aaULL, 0xafa8e2de7171d971ULL, + 0x0ecf8dc6c8c807c8ULL, 0xc87d32d119196419ULL, 0x7270923b49493949ULL, + 0x869aaf5fd9d943d9ULL, 0xc31df931f2f2eff2ULL, 0x4b48dba8e3e3abe3ULL, + 0xe22ab6b95b5b715bULL, 0x34920dbc88881a88ULL, 0xa4c8293e9a9a529aULL, + 0x2dbe4c0b26269826ULL, 0x8dfa64bf3232c832ULL, 0xe94a7d59b0b0fab0ULL, + 0x1b6acff2e9e983e9ULL, 0x78331e770f0f3c0fULL, 0xe6a6b733d5d573d5ULL, + 0x74ba1df480803a80ULL, 0x997c6127bebec2beULL, 0x26de87ebcdcd13cdULL, + 0xbde468893434d034ULL, 0x7a75903248483d48ULL, 0xab24e354ffffdbffULL, + 0xf78ff48d7a7af57aULL, 0xf4ea3d6490907a90ULL, 0xc23ebe9d5f5f615fULL, + 0x1da0403d20208020ULL, 0x67d5d00f6868bd68ULL, 0xd07234ca1a1a681aULL, + 0x192c41b7aeae82aeULL, 0xc95e757db4b4eab4ULL, 0x9a19a8ce54544d54ULL, + 0xece53b7f93937693ULL, 0x0daa442f22228822ULL, 0x07e9c86364648d64ULL, + 0xdb12ff2af1f1e3f1ULL, 0xbfa2e6cc7373d173ULL, 0x905a248212124812ULL, + 0x3a5d807a40401d40ULL, 0x4028104808082008ULL, 0x56e89b95c3c32bc3ULL, + 0x337bc5dfecec97ecULL, 0x9690ab4ddbdb4bdbULL, 0x611f5fc0a1a1bea1ULL, + 0x1c8307918d8d0e8dULL, 0xf5c97ac83d3df43dULL, 0xccf1335b97976697ULL, + 0x0000000000000000ULL, 0x36d483f9cfcf1bcfULL, 0x4587566e2b2bac2bULL, + 0x97b3ece17676c576ULL, 0x64b019e682823282ULL, 0xfea9b128d6d67fd6ULL, + 0xd87736c31b1b6c1bULL, 0xc15b7774b5b5eeb5ULL, 0x112943beafaf86afULL, + 0x77dfd41d6a6ab56aULL, 0xba0da0ea50505d50ULL, 0x124c8a5745450945ULL, + 0xcb18fb38f3f3ebf3ULL, 0x9df060ad3030c030ULL, 0x2b74c3c4efef9befULL, + 0xe5c37eda3f3ffc3fULL, 0x921caac755554955ULL, 0x791059dba2a2b2a2ULL, + 0x0365c9e9eaea8feaULL, 0x0fecca6a65658965ULL, 0xb9686903babad2baULL, + 0x65935e4a2f2fbc2fULL, 0x4ee79d8ec0c027c0ULL, 0xbe81a160dede5fdeULL, + 0xe06c38fc1c1c701cULL, 0xbb2ee746fdfdd3fdULL, 0x52649a1f4d4d294dULL, + 0xe4e0397692927292ULL, 0x8fbceafa7575c975ULL, 0x301e0c3606061806ULL, + 0x249809ae8a8a128aULL, 0xf940794bb2b2f2b2ULL, 0x6359d185e6e6bfe6ULL, + 0x70361c7e0e0e380eULL, 0xf8633ee71f1f7c1fULL, 0x37f7c45562629562ULL, + 0xeea3b53ad4d477d4ULL, 0x29324d81a8a89aa8ULL, 0xc4f4315296966296ULL, + 0x9b3aef62f9f9c3f9ULL, 0x66f697a3c5c533c5ULL, 0x35b14a1025259425ULL, + 0xf220b2ab59597959ULL, 0x54ae15d084842a84ULL, 0xb7a7e4c57272d572ULL, + 0xd5dd72ec3939e439ULL, 0x5a6198164c4c2d4cULL, 0xca3bbc945e5e655eULL, + 0xe785f09f7878fd78ULL, 0xddd870e53838e038ULL, 0x148605988c8c0a8cULL, + 0xc6b2bf17d1d163d1ULL, 0x410b57e4a5a5aea5ULL, 0x434dd9a1e2e2afe2ULL, + 0x2ff8c24e61619961ULL, 0xf1457b42b3b3f6b3ULL, 0x15a5423421218421ULL, + 0x94d625089c9c4a9cULL, 0xf0663cee1e1e781eULL, 0x2252866143431143ULL, + 0x76fc93b1c7c73bc7ULL, 0xb32be54ffcfcd7fcULL, 0x2014082404041004ULL, + 0xb208a2e351515951ULL, 0xbcc72f2599995e99ULL, 0x4fc4da226d6da96dULL, + 0x68391a650d0d340dULL, 0x8335e979fafacffaULL, 0xb684a369dfdf5bdfULL, + 0xd79bfca97e7ee57eULL, 0x3db4481924249024ULL, 0xc5d776fe3b3bec3bULL, + 0x313d4b9aabab96abULL, 0x3ed181f0cece1fceULL, 0x8855229911114411ULL, + 0x0c8903838f8f068fULL, 0x4a6b9c044e4e254eULL, 0xd1517366b7b7e6b7ULL, + 0x0b60cbe0ebeb8bebULL, 0xfdcc78c13c3cf03cULL, 0x7cbf1ffd81813e81ULL, + 0xd4fe354094946a94ULL, 0xeb0cf31cf7f7fbf7ULL, 0xa1676f18b9b9deb9ULL, + 0x985f268b13134c13ULL, 0x7d9c58512c2cb02cULL, 0xd6b8bb05d3d36bd3ULL, + 0x6b5cd38ce7e7bbe7ULL, 0x57cbdc396e6ea56eULL, 0x6ef395aac4c437c4ULL, + 0x180f061b03030c03ULL, 0x8a13acdc56564556ULL, 0x1a49885e44440d44ULL, + 0xdf9efea07f7fe17fULL, 0x21374f88a9a99ea9ULL, 0x4d8254672a2aa82aULL, + 0xb16d6b0abbbbd6bbULL, 0x46e29f87c1c123c1ULL, 0xa202a6f153535153ULL, + 0xae8ba572dcdc57dcULL, 0x582716530b0b2c0bULL, 0x9cd327019d9d4e9dULL, + 0x47c1d82b6c6cad6cULL, 0x95f562a43131c431ULL, 0x87b9e8f37474cd74ULL, + 0xe309f115f6f6fff6ULL, 0x0a438c4c46460546ULL, 0x092645a5acac8aacULL, + 0x3c970fb589891e89ULL, 0xa04428b414145014ULL, 0x5b42dfbae1e1a3e1ULL, + 0xb04e2ca616165816ULL, 0xcdd274f73a3ae83aULL, 0x6fd0d2066969b969ULL, + 0x482d124109092409ULL, 0xa7ade0d77070dd70ULL, 0xd954716fb6b6e2b6ULL, + 0xceb7bd1ed0d067d0ULL, 0x3b7ec7d6eded93edULL, 0x2edb85e2cccc17ccULL, + 0x2a57846842421542ULL, 0xb4c22d2c98985a98ULL, 0x490e55eda4a4aaa4ULL, + 0x5d8850752828a028ULL, 0xda31b8865c5c6d5cULL, 0x933fed6bf8f8c7f8ULL, + 0x44a411c286862286ULL, +}; + +static const u64 C5[256] = { + 0x18c07830d8181860ULL, 0x2305af462623238cULL, 0xc67ef991b8c6c63fULL, + 0xe8136fcdfbe8e887ULL, 0x874ca113cb878726ULL, 0xb8a9626d11b8b8daULL, + 0x0108050209010104ULL, 0x4f426e9e0d4f4f21ULL, 0x36adee6c9b3636d8ULL, + 0xa6590451ffa6a6a2ULL, 0xd2debdb90cd2d26fULL, 0xf5fb06f70ef5f5f3ULL, + 0x79ef80f2967979f9ULL, 0x6f5fcede306f6fa1ULL, 0x91fcef3f6d91917eULL, + 0x52aa07a4f8525255ULL, 0x6027fdc04760609dULL, 0xbc89766535bcbccaULL, + 0x9baccd2b379b9b56ULL, 0x8e048c018a8e8e02ULL, 0xa371155bd2a3a3b6ULL, + 0x0c603c186c0c0c30ULL, 0x7bff8af6847b7bf1ULL, 0x35b5e16a803535d4ULL, + 0x1de8693af51d1d74ULL, 0xe05347ddb3e0e0a7ULL, 0xd7f6acb321d7d77bULL, + 0xc25eed999cc2c22fULL, 0x2e6d965c432e2eb8ULL, 0x4b627a96294b4b31ULL, + 0xfea321e15dfefedfULL, 0x578216aed5575741ULL, 0x15a8412abd151554ULL, + 0x779fb6eee87777c1ULL, 0x37a5eb6e923737dcULL, 0xe57b56d79ee5e5b3ULL, + 0x9f8cd923139f9f46ULL, 0xf0d317fd23f0f0e7ULL, 0x4a6a7f94204a4a35ULL, + 0xda9e95a944dada4fULL, 0x58fa25b0a258587dULL, 0xc906ca8fcfc9c903ULL, + 0x29558d527c2929a4ULL, 0x0a5022145a0a0a28ULL, 0xb1e14f7f50b1b1feULL, + 0xa0691a5dc9a0a0baULL, 0x6b7fdad6146b6bb1ULL, 0x855cab17d985852eULL, + 0xbd8173673cbdbdceULL, 0x5dd234ba8f5d5d69ULL, 0x1080502090101040ULL, + 0xf4f303f507f4f4f7ULL, 0xcb16c08bddcbcb0bULL, 0x3eedc67cd33e3ef8ULL, + 0x0528110a2d050514ULL, 0x671fe6ce78676781ULL, 0xe47353d597e4e4b7ULL, + 0x2725bb4e0227279cULL, 0x4132588273414119ULL, 0x8b2c9d0ba78b8b16ULL, + 0xa7510153f6a7a7a6ULL, 0x7dcf94fab27d7de9ULL, 0x95dcfb374995956eULL, + 0xd88e9fad56d8d847ULL, 0xfb8b30eb70fbfbcbULL, 0xee2371c1cdeeee9fULL, + 0x7cc791f8bb7c7cedULL, 0x6617e3cc71666685ULL, 0xdda68ea77bdddd53ULL, + 0x17b84b2eaf17175cULL, 0x4702468e45474701ULL, 0x9e84dc211a9e9e42ULL, + 0xca1ec589d4caca0fULL, 0x2d75995a582d2db4ULL, 0xbf9179632ebfbfc6ULL, + 0x07381b0e3f07071cULL, 0xad012347acadad8eULL, 0x5aea2fb4b05a5a75ULL, + 0x836cb51bef838336ULL, 0x3385ff66b63333ccULL, 0x633ff2c65c636391ULL, + 0x02100a0412020208ULL, 0xaa39384993aaaa92ULL, 0x71afa8e2de7171d9ULL, + 0xc80ecf8dc6c8c807ULL, 0x19c87d32d1191964ULL, 0x497270923b494939ULL, + 0xd9869aaf5fd9d943ULL, 0xf2c31df931f2f2efULL, 0xe34b48dba8e3e3abULL, + 0x5be22ab6b95b5b71ULL, 0x8834920dbc88881aULL, 0x9aa4c8293e9a9a52ULL, + 0x262dbe4c0b262698ULL, 0x328dfa64bf3232c8ULL, 0xb0e94a7d59b0b0faULL, + 0xe91b6acff2e9e983ULL, 0x0f78331e770f0f3cULL, 0xd5e6a6b733d5d573ULL, + 0x8074ba1df480803aULL, 0xbe997c6127bebec2ULL, 0xcd26de87ebcdcd13ULL, + 0x34bde468893434d0ULL, 0x487a75903248483dULL, 0xffab24e354ffffdbULL, + 0x7af78ff48d7a7af5ULL, 0x90f4ea3d6490907aULL, 0x5fc23ebe9d5f5f61ULL, + 0x201da0403d202080ULL, 0x6867d5d00f6868bdULL, 0x1ad07234ca1a1a68ULL, + 0xae192c41b7aeae82ULL, 0xb4c95e757db4b4eaULL, 0x549a19a8ce54544dULL, + 0x93ece53b7f939376ULL, 0x220daa442f222288ULL, 0x6407e9c86364648dULL, + 0xf1db12ff2af1f1e3ULL, 0x73bfa2e6cc7373d1ULL, 0x12905a2482121248ULL, + 0x403a5d807a40401dULL, 0x0840281048080820ULL, 0xc356e89b95c3c32bULL, + 0xec337bc5dfecec97ULL, 0xdb9690ab4ddbdb4bULL, 0xa1611f5fc0a1a1beULL, + 0x8d1c8307918d8d0eULL, 0x3df5c97ac83d3df4ULL, 0x97ccf1335b979766ULL, + 0x0000000000000000ULL, 0xcf36d483f9cfcf1bULL, 0x2b4587566e2b2bacULL, + 0x7697b3ece17676c5ULL, 0x8264b019e6828232ULL, 0xd6fea9b128d6d67fULL, + 0x1bd87736c31b1b6cULL, 0xb5c15b7774b5b5eeULL, 0xaf112943beafaf86ULL, + 0x6a77dfd41d6a6ab5ULL, 0x50ba0da0ea50505dULL, 0x45124c8a57454509ULL, + 0xf3cb18fb38f3f3ebULL, 0x309df060ad3030c0ULL, 0xef2b74c3c4efef9bULL, + 0x3fe5c37eda3f3ffcULL, 0x55921caac7555549ULL, 0xa2791059dba2a2b2ULL, + 0xea0365c9e9eaea8fULL, 0x650fecca6a656589ULL, 0xbab9686903babad2ULL, + 0x2f65935e4a2f2fbcULL, 0xc04ee79d8ec0c027ULL, 0xdebe81a160dede5fULL, + 0x1ce06c38fc1c1c70ULL, 0xfdbb2ee746fdfdd3ULL, 0x4d52649a1f4d4d29ULL, + 0x92e4e03976929272ULL, 0x758fbceafa7575c9ULL, 0x06301e0c36060618ULL, + 0x8a249809ae8a8a12ULL, 0xb2f940794bb2b2f2ULL, 0xe66359d185e6e6bfULL, + 0x0e70361c7e0e0e38ULL, 0x1ff8633ee71f1f7cULL, 0x6237f7c455626295ULL, + 0xd4eea3b53ad4d477ULL, 0xa829324d81a8a89aULL, 0x96c4f43152969662ULL, + 0xf99b3aef62f9f9c3ULL, 0xc566f697a3c5c533ULL, 0x2535b14a10252594ULL, + 0x59f220b2ab595979ULL, 0x8454ae15d084842aULL, 0x72b7a7e4c57272d5ULL, + 0x39d5dd72ec3939e4ULL, 0x4c5a6198164c4c2dULL, 0x5eca3bbc945e5e65ULL, + 0x78e785f09f7878fdULL, 0x38ddd870e53838e0ULL, 0x8c148605988c8c0aULL, + 0xd1c6b2bf17d1d163ULL, 0xa5410b57e4a5a5aeULL, 0xe2434dd9a1e2e2afULL, + 0x612ff8c24e616199ULL, 0xb3f1457b42b3b3f6ULL, 0x2115a54234212184ULL, + 0x9c94d625089c9c4aULL, 0x1ef0663cee1e1e78ULL, 0x4322528661434311ULL, + 0xc776fc93b1c7c73bULL, 0xfcb32be54ffcfcd7ULL, 0x0420140824040410ULL, + 0x51b208a2e3515159ULL, 0x99bcc72f2599995eULL, 0x6d4fc4da226d6da9ULL, + 0x0d68391a650d0d34ULL, 0xfa8335e979fafacfULL, 0xdfb684a369dfdf5bULL, + 0x7ed79bfca97e7ee5ULL, 0x243db44819242490ULL, 0x3bc5d776fe3b3becULL, + 0xab313d4b9aabab96ULL, 0xce3ed181f0cece1fULL, 0x1188552299111144ULL, + 0x8f0c8903838f8f06ULL, 0x4e4a6b9c044e4e25ULL, 0xb7d1517366b7b7e6ULL, + 0xeb0b60cbe0ebeb8bULL, 0x3cfdcc78c13c3cf0ULL, 0x817cbf1ffd81813eULL, + 0x94d4fe354094946aULL, 0xf7eb0cf31cf7f7fbULL, 0xb9a1676f18b9b9deULL, + 0x13985f268b13134cULL, 0x2c7d9c58512c2cb0ULL, 0xd3d6b8bb05d3d36bULL, + 0xe76b5cd38ce7e7bbULL, 0x6e57cbdc396e6ea5ULL, 0xc46ef395aac4c437ULL, + 0x03180f061b03030cULL, 0x568a13acdc565645ULL, 0x441a49885e44440dULL, + 0x7fdf9efea07f7fe1ULL, 0xa921374f88a9a99eULL, 0x2a4d8254672a2aa8ULL, + 0xbbb16d6b0abbbbd6ULL, 0xc146e29f87c1c123ULL, 0x53a202a6f1535351ULL, + 0xdcae8ba572dcdc57ULL, 0x0b582716530b0b2cULL, 0x9d9cd327019d9d4eULL, + 0x6c47c1d82b6c6cadULL, 0x3195f562a43131c4ULL, 0x7487b9e8f37474cdULL, + 0xf6e309f115f6f6ffULL, 0x460a438c4c464605ULL, 0xac092645a5acac8aULL, + 0x893c970fb589891eULL, 0x14a04428b4141450ULL, 0xe15b42dfbae1e1a3ULL, + 0x16b04e2ca6161658ULL, 0x3acdd274f73a3ae8ULL, 0x696fd0d2066969b9ULL, + 0x09482d1241090924ULL, 0x70a7ade0d77070ddULL, 0xb6d954716fb6b6e2ULL, + 0xd0ceb7bd1ed0d067ULL, 0xed3b7ec7d6eded93ULL, 0xcc2edb85e2cccc17ULL, + 0x422a578468424215ULL, 0x98b4c22d2c98985aULL, 0xa4490e55eda4a4aaULL, + 0x285d8850752828a0ULL, 0x5cda31b8865c5c6dULL, 0xf8933fed6bf8f8c7ULL, + 0x8644a411c2868622ULL, +}; + +static const u64 C6[256] = { + 0x6018c07830d81818ULL, 0x8c2305af46262323ULL, 0x3fc67ef991b8c6c6ULL, + 0x87e8136fcdfbe8e8ULL, 0x26874ca113cb8787ULL, 0xdab8a9626d11b8b8ULL, + 0x0401080502090101ULL, 0x214f426e9e0d4f4fULL, 0xd836adee6c9b3636ULL, + 0xa2a6590451ffa6a6ULL, 0x6fd2debdb90cd2d2ULL, 0xf3f5fb06f70ef5f5ULL, + 0xf979ef80f2967979ULL, 0xa16f5fcede306f6fULL, 0x7e91fcef3f6d9191ULL, + 0x5552aa07a4f85252ULL, 0x9d6027fdc0476060ULL, 0xcabc89766535bcbcULL, + 0x569baccd2b379b9bULL, 0x028e048c018a8e8eULL, 0xb6a371155bd2a3a3ULL, + 0x300c603c186c0c0cULL, 0xf17bff8af6847b7bULL, 0xd435b5e16a803535ULL, + 0x741de8693af51d1dULL, 0xa7e05347ddb3e0e0ULL, 0x7bd7f6acb321d7d7ULL, + 0x2fc25eed999cc2c2ULL, 0xb82e6d965c432e2eULL, 0x314b627a96294b4bULL, + 0xdffea321e15dfefeULL, 0x41578216aed55757ULL, 0x5415a8412abd1515ULL, + 0xc1779fb6eee87777ULL, 0xdc37a5eb6e923737ULL, 0xb3e57b56d79ee5e5ULL, + 0x469f8cd923139f9fULL, 0xe7f0d317fd23f0f0ULL, 0x354a6a7f94204a4aULL, + 0x4fda9e95a944dadaULL, 0x7d58fa25b0a25858ULL, 0x03c906ca8fcfc9c9ULL, + 0xa429558d527c2929ULL, 0x280a5022145a0a0aULL, 0xfeb1e14f7f50b1b1ULL, + 0xbaa0691a5dc9a0a0ULL, 0xb16b7fdad6146b6bULL, 0x2e855cab17d98585ULL, + 0xcebd8173673cbdbdULL, 0x695dd234ba8f5d5dULL, 0x4010805020901010ULL, + 0xf7f4f303f507f4f4ULL, 0x0bcb16c08bddcbcbULL, 0xf83eedc67cd33e3eULL, + 0x140528110a2d0505ULL, 0x81671fe6ce786767ULL, 0xb7e47353d597e4e4ULL, + 0x9c2725bb4e022727ULL, 0x1941325882734141ULL, 0x168b2c9d0ba78b8bULL, + 0xa6a7510153f6a7a7ULL, 0xe97dcf94fab27d7dULL, 0x6e95dcfb37499595ULL, + 0x47d88e9fad56d8d8ULL, 0xcbfb8b30eb70fbfbULL, 0x9fee2371c1cdeeeeULL, + 0xed7cc791f8bb7c7cULL, 0x856617e3cc716666ULL, 0x53dda68ea77bddddULL, + 0x5c17b84b2eaf1717ULL, 0x014702468e454747ULL, 0x429e84dc211a9e9eULL, + 0x0fca1ec589d4cacaULL, 0xb42d75995a582d2dULL, 0xc6bf9179632ebfbfULL, + 0x1c07381b0e3f0707ULL, 0x8ead012347acadadULL, 0x755aea2fb4b05a5aULL, + 0x36836cb51bef8383ULL, 0xcc3385ff66b63333ULL, 0x91633ff2c65c6363ULL, + 0x0802100a04120202ULL, 0x92aa39384993aaaaULL, 0xd971afa8e2de7171ULL, + 0x07c80ecf8dc6c8c8ULL, 0x6419c87d32d11919ULL, 0x39497270923b4949ULL, + 0x43d9869aaf5fd9d9ULL, 0xeff2c31df931f2f2ULL, 0xabe34b48dba8e3e3ULL, + 0x715be22ab6b95b5bULL, 0x1a8834920dbc8888ULL, 0x529aa4c8293e9a9aULL, + 0x98262dbe4c0b2626ULL, 0xc8328dfa64bf3232ULL, 0xfab0e94a7d59b0b0ULL, + 0x83e91b6acff2e9e9ULL, 0x3c0f78331e770f0fULL, 0x73d5e6a6b733d5d5ULL, + 0x3a8074ba1df48080ULL, 0xc2be997c6127bebeULL, 0x13cd26de87ebcdcdULL, + 0xd034bde468893434ULL, 0x3d487a7590324848ULL, 0xdbffab24e354ffffULL, + 0xf57af78ff48d7a7aULL, 0x7a90f4ea3d649090ULL, 0x615fc23ebe9d5f5fULL, + 0x80201da0403d2020ULL, 0xbd6867d5d00f6868ULL, 0x681ad07234ca1a1aULL, + 0x82ae192c41b7aeaeULL, 0xeab4c95e757db4b4ULL, 0x4d549a19a8ce5454ULL, + 0x7693ece53b7f9393ULL, 0x88220daa442f2222ULL, 0x8d6407e9c8636464ULL, + 0xe3f1db12ff2af1f1ULL, 0xd173bfa2e6cc7373ULL, 0x4812905a24821212ULL, + 0x1d403a5d807a4040ULL, 0x2008402810480808ULL, 0x2bc356e89b95c3c3ULL, + 0x97ec337bc5dfececULL, 0x4bdb9690ab4ddbdbULL, 0xbea1611f5fc0a1a1ULL, + 0x0e8d1c8307918d8dULL, 0xf43df5c97ac83d3dULL, 0x6697ccf1335b9797ULL, + 0x0000000000000000ULL, 0x1bcf36d483f9cfcfULL, 0xac2b4587566e2b2bULL, + 0xc57697b3ece17676ULL, 0x328264b019e68282ULL, 0x7fd6fea9b128d6d6ULL, + 0x6c1bd87736c31b1bULL, 0xeeb5c15b7774b5b5ULL, 0x86af112943beafafULL, + 0xb56a77dfd41d6a6aULL, 0x5d50ba0da0ea5050ULL, 0x0945124c8a574545ULL, + 0xebf3cb18fb38f3f3ULL, 0xc0309df060ad3030ULL, 0x9bef2b74c3c4efefULL, + 0xfc3fe5c37eda3f3fULL, 0x4955921caac75555ULL, 0xb2a2791059dba2a2ULL, + 0x8fea0365c9e9eaeaULL, 0x89650fecca6a6565ULL, 0xd2bab9686903babaULL, + 0xbc2f65935e4a2f2fULL, 0x27c04ee79d8ec0c0ULL, 0x5fdebe81a160dedeULL, + 0x701ce06c38fc1c1cULL, 0xd3fdbb2ee746fdfdULL, 0x294d52649a1f4d4dULL, + 0x7292e4e039769292ULL, 0xc9758fbceafa7575ULL, 0x1806301e0c360606ULL, + 0x128a249809ae8a8aULL, 0xf2b2f940794bb2b2ULL, 0xbfe66359d185e6e6ULL, + 0x380e70361c7e0e0eULL, 0x7c1ff8633ee71f1fULL, 0x956237f7c4556262ULL, + 0x77d4eea3b53ad4d4ULL, 0x9aa829324d81a8a8ULL, 0x6296c4f431529696ULL, + 0xc3f99b3aef62f9f9ULL, 0x33c566f697a3c5c5ULL, 0x942535b14a102525ULL, + 0x7959f220b2ab5959ULL, 0x2a8454ae15d08484ULL, 0xd572b7a7e4c57272ULL, + 0xe439d5dd72ec3939ULL, 0x2d4c5a6198164c4cULL, 0x655eca3bbc945e5eULL, + 0xfd78e785f09f7878ULL, 0xe038ddd870e53838ULL, 0x0a8c148605988c8cULL, + 0x63d1c6b2bf17d1d1ULL, 0xaea5410b57e4a5a5ULL, 0xafe2434dd9a1e2e2ULL, + 0x99612ff8c24e6161ULL, 0xf6b3f1457b42b3b3ULL, 0x842115a542342121ULL, + 0x4a9c94d625089c9cULL, 0x781ef0663cee1e1eULL, 0x1143225286614343ULL, + 0x3bc776fc93b1c7c7ULL, 0xd7fcb32be54ffcfcULL, 0x1004201408240404ULL, + 0x5951b208a2e35151ULL, 0x5e99bcc72f259999ULL, 0xa96d4fc4da226d6dULL, + 0x340d68391a650d0dULL, 0xcffa8335e979fafaULL, 0x5bdfb684a369dfdfULL, + 0xe57ed79bfca97e7eULL, 0x90243db448192424ULL, 0xec3bc5d776fe3b3bULL, + 0x96ab313d4b9aababULL, 0x1fce3ed181f0ceceULL, 0x4411885522991111ULL, + 0x068f0c8903838f8fULL, 0x254e4a6b9c044e4eULL, 0xe6b7d1517366b7b7ULL, + 0x8beb0b60cbe0ebebULL, 0xf03cfdcc78c13c3cULL, 0x3e817cbf1ffd8181ULL, + 0x6a94d4fe35409494ULL, 0xfbf7eb0cf31cf7f7ULL, 0xdeb9a1676f18b9b9ULL, + 0x4c13985f268b1313ULL, 0xb02c7d9c58512c2cULL, 0x6bd3d6b8bb05d3d3ULL, + 0xbbe76b5cd38ce7e7ULL, 0xa56e57cbdc396e6eULL, 0x37c46ef395aac4c4ULL, + 0x0c03180f061b0303ULL, 0x45568a13acdc5656ULL, 0x0d441a49885e4444ULL, + 0xe17fdf9efea07f7fULL, 0x9ea921374f88a9a9ULL, 0xa82a4d8254672a2aULL, + 0xd6bbb16d6b0abbbbULL, 0x23c146e29f87c1c1ULL, 0x5153a202a6f15353ULL, + 0x57dcae8ba572dcdcULL, 0x2c0b582716530b0bULL, 0x4e9d9cd327019d9dULL, + 0xad6c47c1d82b6c6cULL, 0xc43195f562a43131ULL, 0xcd7487b9e8f37474ULL, + 0xfff6e309f115f6f6ULL, 0x05460a438c4c4646ULL, 0x8aac092645a5acacULL, + 0x1e893c970fb58989ULL, 0x5014a04428b41414ULL, 0xa3e15b42dfbae1e1ULL, + 0x5816b04e2ca61616ULL, 0xe83acdd274f73a3aULL, 0xb9696fd0d2066969ULL, + 0x2409482d12410909ULL, 0xdd70a7ade0d77070ULL, 0xe2b6d954716fb6b6ULL, + 0x67d0ceb7bd1ed0d0ULL, 0x93ed3b7ec7d6ededULL, 0x17cc2edb85e2ccccULL, + 0x15422a5784684242ULL, 0x5a98b4c22d2c9898ULL, 0xaaa4490e55eda4a4ULL, + 0xa0285d8850752828ULL, 0x6d5cda31b8865c5cULL, 0xc7f8933fed6bf8f8ULL, + 0x228644a411c28686ULL, +}; + +static const u64 C7[256] = { + 0x186018c07830d818ULL, 0x238c2305af462623ULL, 0xc63fc67ef991b8c6ULL, + 0xe887e8136fcdfbe8ULL, 0x8726874ca113cb87ULL, 0xb8dab8a9626d11b8ULL, + 0x0104010805020901ULL, 0x4f214f426e9e0d4fULL, 0x36d836adee6c9b36ULL, + 0xa6a2a6590451ffa6ULL, 0xd26fd2debdb90cd2ULL, 0xf5f3f5fb06f70ef5ULL, + 0x79f979ef80f29679ULL, 0x6fa16f5fcede306fULL, 0x917e91fcef3f6d91ULL, + 0x525552aa07a4f852ULL, 0x609d6027fdc04760ULL, 0xbccabc89766535bcULL, + 0x9b569baccd2b379bULL, 0x8e028e048c018a8eULL, 0xa3b6a371155bd2a3ULL, + 0x0c300c603c186c0cULL, 0x7bf17bff8af6847bULL, 0x35d435b5e16a8035ULL, + 0x1d741de8693af51dULL, 0xe0a7e05347ddb3e0ULL, 0xd77bd7f6acb321d7ULL, + 0xc22fc25eed999cc2ULL, 0x2eb82e6d965c432eULL, 0x4b314b627a96294bULL, + 0xfedffea321e15dfeULL, 0x5741578216aed557ULL, 0x155415a8412abd15ULL, + 0x77c1779fb6eee877ULL, 0x37dc37a5eb6e9237ULL, 0xe5b3e57b56d79ee5ULL, + 0x9f469f8cd923139fULL, 0xf0e7f0d317fd23f0ULL, 0x4a354a6a7f94204aULL, + 0xda4fda9e95a944daULL, 0x587d58fa25b0a258ULL, 0xc903c906ca8fcfc9ULL, + 0x29a429558d527c29ULL, 0x0a280a5022145a0aULL, 0xb1feb1e14f7f50b1ULL, + 0xa0baa0691a5dc9a0ULL, 0x6bb16b7fdad6146bULL, 0x852e855cab17d985ULL, + 0xbdcebd8173673cbdULL, 0x5d695dd234ba8f5dULL, 0x1040108050209010ULL, + 0xf4f7f4f303f507f4ULL, 0xcb0bcb16c08bddcbULL, 0x3ef83eedc67cd33eULL, + 0x05140528110a2d05ULL, 0x6781671fe6ce7867ULL, 0xe4b7e47353d597e4ULL, + 0x279c2725bb4e0227ULL, 0x4119413258827341ULL, 0x8b168b2c9d0ba78bULL, + 0xa7a6a7510153f6a7ULL, 0x7de97dcf94fab27dULL, 0x956e95dcfb374995ULL, + 0xd847d88e9fad56d8ULL, 0xfbcbfb8b30eb70fbULL, 0xee9fee2371c1cdeeULL, + 0x7ced7cc791f8bb7cULL, 0x66856617e3cc7166ULL, 0xdd53dda68ea77bddULL, + 0x175c17b84b2eaf17ULL, 0x47014702468e4547ULL, 0x9e429e84dc211a9eULL, + 0xca0fca1ec589d4caULL, 0x2db42d75995a582dULL, 0xbfc6bf9179632ebfULL, + 0x071c07381b0e3f07ULL, 0xad8ead012347acadULL, 0x5a755aea2fb4b05aULL, + 0x8336836cb51bef83ULL, 0x33cc3385ff66b633ULL, 0x6391633ff2c65c63ULL, + 0x020802100a041202ULL, 0xaa92aa39384993aaULL, 0x71d971afa8e2de71ULL, + 0xc807c80ecf8dc6c8ULL, 0x196419c87d32d119ULL, 0x4939497270923b49ULL, + 0xd943d9869aaf5fd9ULL, 0xf2eff2c31df931f2ULL, 0xe3abe34b48dba8e3ULL, + 0x5b715be22ab6b95bULL, 0x881a8834920dbc88ULL, 0x9a529aa4c8293e9aULL, + 0x2698262dbe4c0b26ULL, 0x32c8328dfa64bf32ULL, 0xb0fab0e94a7d59b0ULL, + 0xe983e91b6acff2e9ULL, 0x0f3c0f78331e770fULL, 0xd573d5e6a6b733d5ULL, + 0x803a8074ba1df480ULL, 0xbec2be997c6127beULL, 0xcd13cd26de87ebcdULL, + 0x34d034bde4688934ULL, 0x483d487a75903248ULL, 0xffdbffab24e354ffULL, + 0x7af57af78ff48d7aULL, 0x907a90f4ea3d6490ULL, 0x5f615fc23ebe9d5fULL, + 0x2080201da0403d20ULL, 0x68bd6867d5d00f68ULL, 0x1a681ad07234ca1aULL, + 0xae82ae192c41b7aeULL, 0xb4eab4c95e757db4ULL, 0x544d549a19a8ce54ULL, + 0x937693ece53b7f93ULL, 0x2288220daa442f22ULL, 0x648d6407e9c86364ULL, + 0xf1e3f1db12ff2af1ULL, 0x73d173bfa2e6cc73ULL, 0x124812905a248212ULL, + 0x401d403a5d807a40ULL, 0x0820084028104808ULL, 0xc32bc356e89b95c3ULL, + 0xec97ec337bc5dfecULL, 0xdb4bdb9690ab4ddbULL, 0xa1bea1611f5fc0a1ULL, + 0x8d0e8d1c8307918dULL, 0x3df43df5c97ac83dULL, 0x976697ccf1335b97ULL, + 0x0000000000000000ULL, 0xcf1bcf36d483f9cfULL, 0x2bac2b4587566e2bULL, + 0x76c57697b3ece176ULL, 0x82328264b019e682ULL, 0xd67fd6fea9b128d6ULL, + 0x1b6c1bd87736c31bULL, 0xb5eeb5c15b7774b5ULL, 0xaf86af112943beafULL, + 0x6ab56a77dfd41d6aULL, 0x505d50ba0da0ea50ULL, 0x450945124c8a5745ULL, + 0xf3ebf3cb18fb38f3ULL, 0x30c0309df060ad30ULL, 0xef9bef2b74c3c4efULL, + 0x3ffc3fe5c37eda3fULL, 0x554955921caac755ULL, 0xa2b2a2791059dba2ULL, + 0xea8fea0365c9e9eaULL, 0x6589650fecca6a65ULL, 0xbad2bab9686903baULL, + 0x2fbc2f65935e4a2fULL, 0xc027c04ee79d8ec0ULL, 0xde5fdebe81a160deULL, + 0x1c701ce06c38fc1cULL, 0xfdd3fdbb2ee746fdULL, 0x4d294d52649a1f4dULL, + 0x927292e4e0397692ULL, 0x75c9758fbceafa75ULL, 0x061806301e0c3606ULL, + 0x8a128a249809ae8aULL, 0xb2f2b2f940794bb2ULL, 0xe6bfe66359d185e6ULL, + 0x0e380e70361c7e0eULL, 0x1f7c1ff8633ee71fULL, 0x62956237f7c45562ULL, + 0xd477d4eea3b53ad4ULL, 0xa89aa829324d81a8ULL, 0x966296c4f4315296ULL, + 0xf9c3f99b3aef62f9ULL, 0xc533c566f697a3c5ULL, 0x25942535b14a1025ULL, + 0x597959f220b2ab59ULL, 0x842a8454ae15d084ULL, 0x72d572b7a7e4c572ULL, + 0x39e439d5dd72ec39ULL, 0x4c2d4c5a6198164cULL, 0x5e655eca3bbc945eULL, + 0x78fd78e785f09f78ULL, 0x38e038ddd870e538ULL, 0x8c0a8c148605988cULL, + 0xd163d1c6b2bf17d1ULL, 0xa5aea5410b57e4a5ULL, 0xe2afe2434dd9a1e2ULL, + 0x6199612ff8c24e61ULL, 0xb3f6b3f1457b42b3ULL, 0x21842115a5423421ULL, + 0x9c4a9c94d625089cULL, 0x1e781ef0663cee1eULL, 0x4311432252866143ULL, + 0xc73bc776fc93b1c7ULL, 0xfcd7fcb32be54ffcULL, 0x0410042014082404ULL, + 0x515951b208a2e351ULL, 0x995e99bcc72f2599ULL, 0x6da96d4fc4da226dULL, + 0x0d340d68391a650dULL, 0xfacffa8335e979faULL, 0xdf5bdfb684a369dfULL, + 0x7ee57ed79bfca97eULL, 0x2490243db4481924ULL, 0x3bec3bc5d776fe3bULL, + 0xab96ab313d4b9aabULL, 0xce1fce3ed181f0ceULL, 0x1144118855229911ULL, + 0x8f068f0c8903838fULL, 0x4e254e4a6b9c044eULL, 0xb7e6b7d1517366b7ULL, + 0xeb8beb0b60cbe0ebULL, 0x3cf03cfdcc78c13cULL, 0x813e817cbf1ffd81ULL, + 0x946a94d4fe354094ULL, 0xf7fbf7eb0cf31cf7ULL, 0xb9deb9a1676f18b9ULL, + 0x134c13985f268b13ULL, 0x2cb02c7d9c58512cULL, 0xd36bd3d6b8bb05d3ULL, + 0xe7bbe76b5cd38ce7ULL, 0x6ea56e57cbdc396eULL, 0xc437c46ef395aac4ULL, + 0x030c03180f061b03ULL, 0x5645568a13acdc56ULL, 0x440d441a49885e44ULL, + 0x7fe17fdf9efea07fULL, 0xa99ea921374f88a9ULL, 0x2aa82a4d8254672aULL, + 0xbbd6bbb16d6b0abbULL, 0xc123c146e29f87c1ULL, 0x535153a202a6f153ULL, + 0xdc57dcae8ba572dcULL, 0x0b2c0b582716530bULL, 0x9d4e9d9cd327019dULL, + 0x6cad6c47c1d82b6cULL, 0x31c43195f562a431ULL, 0x74cd7487b9e8f374ULL, + 0xf6fff6e309f115f6ULL, 0x4605460a438c4c46ULL, 0xac8aac092645a5acULL, + 0x891e893c970fb589ULL, 0x145014a04428b414ULL, 0xe1a3e15b42dfbae1ULL, + 0x165816b04e2ca616ULL, 0x3ae83acdd274f73aULL, 0x69b9696fd0d20669ULL, + 0x092409482d124109ULL, 0x70dd70a7ade0d770ULL, 0xb6e2b6d954716fb6ULL, + 0xd067d0ceb7bd1ed0ULL, 0xed93ed3b7ec7d6edULL, 0xcc17cc2edb85e2ccULL, + 0x4215422a57846842ULL, 0x985a98b4c22d2c98ULL, 0xa4aaa4490e55eda4ULL, + 0x28a0285d88507528ULL, 0x5c6d5cda31b8865cULL, 0xf8c7f8933fed6bf8ULL, + 0x86228644a411c286ULL, +}; + +static const u64 rc[WHIRLPOOL_ROUNDS + 1] = { + 0x0000000000000000ULL, 0x1823c6e887b8014fULL, 0x36a6d2f5796f9152ULL, + 0x60bc9b8ea30c7b35ULL, 0x1de0d7c22e4bfe57ULL, 0x157737e59ff04adaULL, + 0x58c9290ab1a06b85ULL, 0xbd5d10f4cb3e0567ULL, 0xe427418ba77d95d8ULL, + 0xfbee7c66dd17479eULL, 0xca2dbf07ad5a8333ULL, +}; + +/** + * The core Whirlpool transform. + */ + +static void whirlpool_process_buffer(struct whirlpool_ctx *wctx) { + int i, r; + u64 K[8]; /* the round key */ + u64 block[8]; /* mu(buffer) */ + u64 state[8]; /* the cipher state */ + u64 L[8]; + u8 *buffer = wctx->buffer; + + for (i = 0; i < 8; i++, buffer += 8) { + block[i] = + (((u64)buffer[0] ) << 56) ^ + (((u64)buffer[1] & 0xffL) << 48) ^ + (((u64)buffer[2] & 0xffL) << 40) ^ + (((u64)buffer[3] & 0xffL) << 32) ^ + (((u64)buffer[4] & 0xffL) << 24) ^ + (((u64)buffer[5] & 0xffL) << 16) ^ + (((u64)buffer[6] & 0xffL) << 8) ^ + (((u64)buffer[7] & 0xffL) ); + } + + state[0] = block[0] ^ (K[0] = wctx->hash[0]); + state[1] = block[1] ^ (K[1] = wctx->hash[1]); + state[2] = block[2] ^ (K[2] = wctx->hash[2]); + state[3] = block[3] ^ (K[3] = wctx->hash[3]); + state[4] = block[4] ^ (K[4] = wctx->hash[4]); + state[5] = block[5] ^ (K[5] = wctx->hash[5]); + state[6] = block[6] ^ (K[6] = wctx->hash[6]); + state[7] = block[7] ^ (K[7] = wctx->hash[7]); + + for (r = 1; r <= WHIRLPOOL_ROUNDS; r++) { + + L[0] = C0[(int)(K[0] >> 56) ] ^ + C1[(int)(K[7] >> 48) & 0xff] ^ + C2[(int)(K[6] >> 40) & 0xff] ^ + C3[(int)(K[5] >> 32) & 0xff] ^ + C4[(int)(K[4] >> 24) & 0xff] ^ + C5[(int)(K[3] >> 16) & 0xff] ^ + C6[(int)(K[2] >> 8) & 0xff] ^ + C7[(int)(K[1] ) & 0xff] ^ + rc[r]; + + L[1] = C0[(int)(K[1] >> 56) ] ^ + C1[(int)(K[0] >> 48) & 0xff] ^ + C2[(int)(K[7] >> 40) & 0xff] ^ + C3[(int)(K[6] >> 32) & 0xff] ^ + C4[(int)(K[5] >> 24) & 0xff] ^ + C5[(int)(K[4] >> 16) & 0xff] ^ + C6[(int)(K[3] >> 8) & 0xff] ^ + C7[(int)(K[2] ) & 0xff]; + + L[2] = C0[(int)(K[2] >> 56) ] ^ + C1[(int)(K[1] >> 48) & 0xff] ^ + C2[(int)(K[0] >> 40) & 0xff] ^ + C3[(int)(K[7] >> 32) & 0xff] ^ + C4[(int)(K[6] >> 24) & 0xff] ^ + C5[(int)(K[5] >> 16) & 0xff] ^ + C6[(int)(K[4] >> 8) & 0xff] ^ + C7[(int)(K[3] ) & 0xff]; + + L[3] = C0[(int)(K[3] >> 56) ] ^ + C1[(int)(K[2] >> 48) & 0xff] ^ + C2[(int)(K[1] >> 40) & 0xff] ^ + C3[(int)(K[0] >> 32) & 0xff] ^ + C4[(int)(K[7] >> 24) & 0xff] ^ + C5[(int)(K[6] >> 16) & 0xff] ^ + C6[(int)(K[5] >> 8) & 0xff] ^ + C7[(int)(K[4] ) & 0xff]; + + L[4] = C0[(int)(K[4] >> 56) ] ^ + C1[(int)(K[3] >> 48) & 0xff] ^ + C2[(int)(K[2] >> 40) & 0xff] ^ + C3[(int)(K[1] >> 32) & 0xff] ^ + C4[(int)(K[0] >> 24) & 0xff] ^ + C5[(int)(K[7] >> 16) & 0xff] ^ + C6[(int)(K[6] >> 8) & 0xff] ^ + C7[(int)(K[5] ) & 0xff]; + + L[5] = C0[(int)(K[5] >> 56) ] ^ + C1[(int)(K[4] >> 48) & 0xff] ^ + C2[(int)(K[3] >> 40) & 0xff] ^ + C3[(int)(K[2] >> 32) & 0xff] ^ + C4[(int)(K[1] >> 24) & 0xff] ^ + C5[(int)(K[0] >> 16) & 0xff] ^ + C6[(int)(K[7] >> 8) & 0xff] ^ + C7[(int)(K[6] ) & 0xff]; + + L[6] = C0[(int)(K[6] >> 56) ] ^ + C1[(int)(K[5] >> 48) & 0xff] ^ + C2[(int)(K[4] >> 40) & 0xff] ^ + C3[(int)(K[3] >> 32) & 0xff] ^ + C4[(int)(K[2] >> 24) & 0xff] ^ + C5[(int)(K[1] >> 16) & 0xff] ^ + C6[(int)(K[0] >> 8) & 0xff] ^ + C7[(int)(K[7] ) & 0xff]; + + L[7] = C0[(int)(K[7] >> 56) ] ^ + C1[(int)(K[6] >> 48) & 0xff] ^ + C2[(int)(K[5] >> 40) & 0xff] ^ + C3[(int)(K[4] >> 32) & 0xff] ^ + C4[(int)(K[3] >> 24) & 0xff] ^ + C5[(int)(K[2] >> 16) & 0xff] ^ + C6[(int)(K[1] >> 8) & 0xff] ^ + C7[(int)(K[0] ) & 0xff]; + + K[0] = L[0]; + K[1] = L[1]; + K[2] = L[2]; + K[3] = L[3]; + K[4] = L[4]; + K[5] = L[5]; + K[6] = L[6]; + K[7] = L[7]; + + L[0] = C0[(int)(state[0] >> 56) ] ^ + C1[(int)(state[7] >> 48) & 0xff] ^ + C2[(int)(state[6] >> 40) & 0xff] ^ + C3[(int)(state[5] >> 32) & 0xff] ^ + C4[(int)(state[4] >> 24) & 0xff] ^ + C5[(int)(state[3] >> 16) & 0xff] ^ + C6[(int)(state[2] >> 8) & 0xff] ^ + C7[(int)(state[1] ) & 0xff] ^ + K[0]; + + L[1] = C0[(int)(state[1] >> 56) ] ^ + C1[(int)(state[0] >> 48) & 0xff] ^ + C2[(int)(state[7] >> 40) & 0xff] ^ + C3[(int)(state[6] >> 32) & 0xff] ^ + C4[(int)(state[5] >> 24) & 0xff] ^ + C5[(int)(state[4] >> 16) & 0xff] ^ + C6[(int)(state[3] >> 8) & 0xff] ^ + C7[(int)(state[2] ) & 0xff] ^ + K[1]; + + L[2] = C0[(int)(state[2] >> 56) ] ^ + C1[(int)(state[1] >> 48) & 0xff] ^ + C2[(int)(state[0] >> 40) & 0xff] ^ + C3[(int)(state[7] >> 32) & 0xff] ^ + C4[(int)(state[6] >> 24) & 0xff] ^ + C5[(int)(state[5] >> 16) & 0xff] ^ + C6[(int)(state[4] >> 8) & 0xff] ^ + C7[(int)(state[3] ) & 0xff] ^ + K[2]; + + L[3] = C0[(int)(state[3] >> 56) ] ^ + C1[(int)(state[2] >> 48) & 0xff] ^ + C2[(int)(state[1] >> 40) & 0xff] ^ + C3[(int)(state[0] >> 32) & 0xff] ^ + C4[(int)(state[7] >> 24) & 0xff] ^ + C5[(int)(state[6] >> 16) & 0xff] ^ + C6[(int)(state[5] >> 8) & 0xff] ^ + C7[(int)(state[4] ) & 0xff] ^ + K[3]; + + L[4] = C0[(int)(state[4] >> 56) ] ^ + C1[(int)(state[3] >> 48) & 0xff] ^ + C2[(int)(state[2] >> 40) & 0xff] ^ + C3[(int)(state[1] >> 32) & 0xff] ^ + C4[(int)(state[0] >> 24) & 0xff] ^ + C5[(int)(state[7] >> 16) & 0xff] ^ + C6[(int)(state[6] >> 8) & 0xff] ^ + C7[(int)(state[5] ) & 0xff] ^ + K[4]; + + L[5] = C0[(int)(state[5] >> 56) ] ^ + C1[(int)(state[4] >> 48) & 0xff] ^ + C2[(int)(state[3] >> 40) & 0xff] ^ + C3[(int)(state[2] >> 32) & 0xff] ^ + C4[(int)(state[1] >> 24) & 0xff] ^ + C5[(int)(state[0] >> 16) & 0xff] ^ + C6[(int)(state[7] >> 8) & 0xff] ^ + C7[(int)(state[6] ) & 0xff] ^ + K[5]; + + L[6] = C0[(int)(state[6] >> 56) ] ^ + C1[(int)(state[5] >> 48) & 0xff] ^ + C2[(int)(state[4] >> 40) & 0xff] ^ + C3[(int)(state[3] >> 32) & 0xff] ^ + C4[(int)(state[2] >> 24) & 0xff] ^ + C5[(int)(state[1] >> 16) & 0xff] ^ + C6[(int)(state[0] >> 8) & 0xff] ^ + C7[(int)(state[7] ) & 0xff] ^ + K[6]; + + L[7] = C0[(int)(state[7] >> 56) ] ^ + C1[(int)(state[6] >> 48) & 0xff] ^ + C2[(int)(state[5] >> 40) & 0xff] ^ + C3[(int)(state[4] >> 32) & 0xff] ^ + C4[(int)(state[3] >> 24) & 0xff] ^ + C5[(int)(state[2] >> 16) & 0xff] ^ + C6[(int)(state[1] >> 8) & 0xff] ^ + C7[(int)(state[0] ) & 0xff] ^ + K[7]; + + state[0] = L[0]; + state[1] = L[1]; + state[2] = L[2]; + state[3] = L[3]; + state[4] = L[4]; + state[5] = L[5]; + state[6] = L[6]; + state[7] = L[7]; + } + /* + * apply the Miyaguchi-Preneel compression function: + */ + wctx->hash[0] ^= state[0] ^ block[0]; + wctx->hash[1] ^= state[1] ^ block[1]; + wctx->hash[2] ^= state[2] ^ block[2]; + wctx->hash[3] ^= state[3] ^ block[3]; + wctx->hash[4] ^= state[4] ^ block[4]; + wctx->hash[5] ^= state[5] ^ block[5]; + wctx->hash[6] ^= state[6] ^ block[6]; + wctx->hash[7] ^= state[7] ^ block[7]; + +} + +static void whirlpool_init (void *ctx) { + int i; + struct whirlpool_ctx *wctx = ctx; + + memset(wctx->bitLength, 0, 32); + wctx->bufferBits = wctx->bufferPos = 0; + wctx->buffer[0] = 0; + for (i = 0; i < 8; i++) { + wctx->hash[i] = 0L; + } +} + +static void whirlpool_update(void *ctx, const u8 *source, unsigned int len) +{ + + struct whirlpool_ctx *wctx = ctx; + int sourcePos = 0; + unsigned int bits_len = len * 8; // convert to number of bits + int sourceGap = (8 - ((int)bits_len & 7)) & 7; + int bufferRem = wctx->bufferBits & 7; + int i; + u32 b, carry; + u8 *buffer = wctx->buffer; + u8 *bitLength = wctx->bitLength; + int bufferBits = wctx->bufferBits; + int bufferPos = wctx->bufferPos; + + u64 value = bits_len; + for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != 0ULL); i--) { + carry += bitLength[i] + ((u32)value & 0xff); + bitLength[i] = (u8)carry; + carry >>= 8; + value >>= 8; + } + while (bits_len > 8) { + b = ((source[sourcePos] << sourceGap) & 0xff) | + ((source[sourcePos + 1] & 0xff) >> (8 - sourceGap)); + buffer[bufferPos++] |= (u8)(b >> bufferRem); + bufferBits += 8 - bufferRem; + if (bufferBits == WHIRLPOOL_DIGEST_SIZE * 8) { + whirlpool_process_buffer(wctx); + bufferBits = bufferPos = 0; + } + buffer[bufferPos] = b << (8 - bufferRem); + bufferBits += bufferRem; + bits_len -= 8; + sourcePos++; + } + if (bits_len > 0) { + b = (source[sourcePos] << sourceGap) & 0xff; + buffer[bufferPos] |= b >> bufferRem; + } else { + b = 0; + } + if (bufferRem + bits_len < 8) { + bufferBits += bits_len; + } else { + bufferPos++; + bufferBits += 8 - bufferRem; + bits_len -= 8 - bufferRem; + if (bufferBits == WHIRLPOOL_DIGEST_SIZE * 8) { + whirlpool_process_buffer(wctx); + bufferBits = bufferPos = 0; + } + buffer[bufferPos] = b << (8 - bufferRem); + bufferBits += (int)bits_len; + } + + wctx->bufferBits = bufferBits; + wctx->bufferPos = bufferPos; + +} + +static void whirlpool_final(void *ctx, u8 *out) +{ + struct whirlpool_ctx *wctx = ctx; + int i; + u8 *buffer = wctx->buffer; + u8 *bitLength = wctx->bitLength; + int bufferBits = wctx->bufferBits; + int bufferPos = wctx->bufferPos; + u8 *digest = out; + + buffer[bufferPos] |= 0x80U >> (bufferBits & 7); + bufferPos++; + if (bufferPos > WHIRLPOOL_BLOCK_SIZE - WHIRLPOOL_LENGTHBYTES) { + if (bufferPos < WHIRLPOOL_BLOCK_SIZE) { + memset(&buffer[bufferPos], 0, WHIRLPOOL_BLOCK_SIZE - bufferPos); + } + whirlpool_process_buffer(wctx); + bufferPos = 0; + } + if (bufferPos < WHIRLPOOL_BLOCK_SIZE - WHIRLPOOL_LENGTHBYTES) { + memset(&buffer[bufferPos], 0, + (WHIRLPOOL_BLOCK_SIZE - WHIRLPOOL_LENGTHBYTES) - bufferPos); + } + bufferPos = WHIRLPOOL_BLOCK_SIZE - WHIRLPOOL_LENGTHBYTES; + memcpy(&buffer[WHIRLPOOL_BLOCK_SIZE - WHIRLPOOL_LENGTHBYTES], + bitLength, WHIRLPOOL_LENGTHBYTES); + whirlpool_process_buffer(wctx); + for (i = 0; i < WHIRLPOOL_DIGEST_SIZE/8; i++) { + digest[0] = (u8)(wctx->hash[i] >> 56); + digest[1] = (u8)(wctx->hash[i] >> 48); + digest[2] = (u8)(wctx->hash[i] >> 40); + digest[3] = (u8)(wctx->hash[i] >> 32); + digest[4] = (u8)(wctx->hash[i] >> 24); + digest[5] = (u8)(wctx->hash[i] >> 16); + digest[6] = (u8)(wctx->hash[i] >> 8); + digest[7] = (u8)(wctx->hash[i] ); + digest += 8; + } + wctx->bufferBits = bufferBits; + wctx->bufferPos = bufferPos; +} + +static struct crypto_alg alg = { + .cra_name = "whirlpool", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = WHIRLPOOL_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct whirlpool_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(alg.cra_list), + .cra_u = { .digest = { + .dia_digestsize = WHIRLPOOL_DIGEST_SIZE, + .dia_init = whirlpool_init, + .dia_update = whirlpool_update, + .dia_final = whirlpool_final } } +}; + +static int __init init(void) +{ + return crypto_register_alg(&alg); +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&alg); +} + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Whirlpool Message Digest Algorithm"); diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c --- a/drivers/acpi/processor.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/acpi/processor.c 2004-09-06 16:37:53 -07:00 @@ -1123,7 +1123,7 @@ PDE(inode)->data); } -static int +static ssize_t acpi_processor_write_performance ( struct file *file, const char __user *buffer, diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/atm/idt77252.c 2004-09-06 16:37:52 -07:00 @@ -3681,18 +3681,25 @@ struct idt77252_dev *card; struct atm_dev *dev; ushort revision = 0; - int i; + int i, err; + if (pci_enable_device(pcidev)) { + printk("idt77252: can't enable PCI device at %s\n", pci_name(pcidev)); + return -ENODEV; + } + if (pci_read_config_word(pcidev, PCI_REVISION_ID, &revision)) { printk("idt77252-%d: can't read PCI_REVISION_ID\n", index); - return -ENODEV; + err = -ENODEV; + goto err_out_disable_pdev; } card = kmalloc(sizeof(struct idt77252_dev), GFP_KERNEL); if (!card) { printk("idt77252-%d: can't allocate private data\n", index); - return -ENOMEM; + err = -ENOMEM; + goto err_out_disable_pdev; } memset(card, 0, sizeof(struct idt77252_dev)); @@ -3718,23 +3725,21 @@ card->membase = (unsigned long) ioremap(membase, 1024); if (!card->membase) { printk("%s: can't ioremap() membase\n", card->name); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_free_card; } if (idt77252_preset(card)) { printk("%s: preset failed\n", card->name); - iounmap((void *) card->membase); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_iounmap; } dev = atm_dev_register("idt77252", &idt77252_ops, -1, NULL); if (!dev) { printk("%s: can't register atm device\n", card->name); - iounmap((void *) card->membase); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_iounmap; } dev->dev_data = card; card->atmdev = dev; @@ -3743,9 +3748,8 @@ suni_init(dev); if (!dev->phy) { printk("%s: can't init SUNI\n", card->name); - deinit_card(card); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_deinit_card; } #endif /* CONFIG_ATM_IDT77252_USE_SUNI */ @@ -3756,9 +3760,8 @@ ioremap(srambase | 0x200000 | (i << 18), 4); if (!card->fbq[i]) { printk("%s: can't ioremap() FBQ%d\n", card->name, i); - deinit_card(card); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_deinit_card; } } @@ -3769,9 +3772,8 @@ if (init_card(dev)) { printk("%s: init_card failed\n", card->name); - deinit_card(card); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_deinit_card; } dev->ci_range.vpi_bits = card->vpibits; @@ -3783,12 +3785,8 @@ if (idt77252_dev_open(card)) { printk("%s: dev_open failed\n", card->name); - - if (dev->phy->stop) - dev->phy->stop(dev); - deinit_card(card); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_stop; } *last = card; @@ -3796,6 +3794,23 @@ index++; return 0; + +err_out_stop: + if (dev->phy->stop) + dev->phy->stop(dev); + +err_out_deinit_card: + deinit_card(card); + +err_out_iounmap: + iounmap((void *) card->membase); + +err_out_free_card: + kfree(card); + +err_out_disable_pdev: + pci_disable_device(pcidev); + return err; } static struct pci_device_id idt77252_pci_tbl[] = @@ -3848,6 +3863,7 @@ if (dev->phy->stop) dev->phy->stop(dev); deinit_card(card); + pci_disable_device(card->pcidev); kfree(card); } diff -Nru a/drivers/base/class.c b/drivers/base/class.c --- a/drivers/base/class.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/base/class.c 2004-09-06 16:37:55 -07:00 @@ -349,13 +349,18 @@ int class_device_add(struct class_device *class_dev) { - struct class * parent; + struct class * parent = NULL; struct class_interface * class_intf; int error; class_dev = class_device_get(class_dev); - if (!class_dev || !strlen(class_dev->class_id)) + if (!class_dev) return -EINVAL; + + if (!strlen(class_dev->class_id)) { + error = -EINVAL; + goto register_done; + } parent = class_get(class_dev->class); diff -Nru a/drivers/base/node.c b/drivers/base/node.c --- a/drivers/base/node.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/base/node.c 2004-09-06 16:37:51 -07:00 @@ -19,7 +19,7 @@ static ssize_t node_read_cpumap(struct sys_device * dev, char * buf) { struct node *node_dev = to_node(dev); - cpumask_t mask = node_dev->cpumap; + cpumask_t mask = node_to_cpumask(node_dev->sysdev.id); int len; /* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */ @@ -38,11 +38,19 @@ int n; int nid = dev->id; struct sysinfo i; + unsigned long inactive; + unsigned long active; + unsigned long free; + si_meminfo_node(&i, nid); + __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); + n = sprintf(buf, "\n" "Node %d MemTotal: %8lu kB\n" "Node %d MemFree: %8lu kB\n" "Node %d MemUsed: %8lu kB\n" + "Node %d Active: %8lu kB\n" + "Node %d Inactive: %8lu kB\n" "Node %d HighTotal: %8lu kB\n" "Node %d HighFree: %8lu kB\n" "Node %d LowTotal: %8lu kB\n" @@ -50,6 +58,8 @@ nid, K(i.totalram), nid, K(i.freeram), nid, K(i.totalram - i.freeram), + nid, K(active), + nid, K(inactive), nid, K(i.totalhigh), nid, K(i.freehigh), nid, K(i.totalram - i.totalhigh), @@ -111,7 +121,6 @@ { int error; - node->cpumap = node_to_cpumask(num); node->sysdev.id = num; node->sysdev.cls = &node_class; error = sysdev_register(&node->sysdev); diff -Nru a/drivers/block/DAC960.c b/drivers/block/DAC960.c --- a/drivers/block/DAC960.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/block/DAC960.c 2004-09-06 16:37:54 -07:00 @@ -288,12 +288,17 @@ Controller->PCIDevice, DAC960_V2_ScatterGatherLimit * sizeof(DAC960_V2_ScatterGatherSegment_T), sizeof(DAC960_V2_ScatterGatherSegment_T), 0); + if (ScatterGatherPool == NULL) + return DAC960_Failure(Controller, + "AUXILIARY STRUCTURE CREATION (SG)"); RequestSensePool = pci_pool_create("DAC960_V2_RequestSense", Controller->PCIDevice, sizeof(DAC960_SCSI_RequestSense_T), sizeof(int), 0); - if (ScatterGatherPool == NULL || RequestSensePool == NULL) + if (RequestSensePool == NULL) { + pci_pool_destroy(ScatterGatherPool); return DAC960_Failure(Controller, "AUXILIARY STRUCTURE CREATION (SG)"); + } Controller->ScatterGatherPool = ScatterGatherPool; Controller->V2.RequestSensePool = RequestSensePool; } diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c --- a/drivers/block/ll_rw_blk.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/block/ll_rw_blk.c 2004-09-06 16:37:50 -07:00 @@ -2535,6 +2535,7 @@ sector_t maxsector; int ret, nr_sectors = bio_sectors(bio); + might_sleep(); /* Test device or partition size, when known. */ maxsector = bio->bi_bdev->bd_inode->i_size >> 9; if (maxsector) { diff -Nru a/drivers/block/rd.c b/drivers/block/rd.c --- a/drivers/block/rd.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/block/rd.c 2004-09-06 16:37:53 -07:00 @@ -349,13 +349,17 @@ if (rd_bdev[unit] == NULL) { struct block_device *bdev = inode->i_bdev; struct address_space *mapping; + unsigned bsize; int gfp_mask; inode = igrab(bdev->bd_inode); rd_bdev[unit] = bdev; bdev->bd_openers++; - bdev->bd_block_size = rd_blocksize; - inode->i_size = get_capacity(rd_disks[unit])<<9; + bsize = bdev_hardsect_size(bdev); + bdev->bd_block_size = bsize; + inode->i_blkbits = blksize_bits(bsize); + inode->i_size = get_capacity(bdev->bd_disk)<<9; + mapping = inode->i_mapping; mapping->a_ops = &ramdisk_aops; mapping->backing_dev_info = &rd_backing_dev_info; @@ -449,6 +453,7 @@ goto out_queue; blk_queue_make_request(rd_queue[i], &rd_make_request); + blk_queue_hardsect_size(rd_queue[i], rd_blocksize); /* rd_size is given in kB */ disk->major = RAMDISK_MAJOR; diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c --- a/drivers/block/scsi_ioctl.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/block/scsi_ioctl.c 2004-09-06 16:37:55 -07:00 @@ -178,6 +178,7 @@ safe_for_write(GPCMD_SEND_EVENT), safe_for_write(GPCMD_SEND_KEY), safe_for_write(GPCMD_SEND_OPC), + safe_for_write(GPCMD_SEND_CUE_SHEET), safe_for_write(GPCMD_SET_SPEED), safe_for_write(GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL), safe_for_write(GPCMD_LOAD_UNLOAD), @@ -537,6 +538,7 @@ * old junk scsi send command ioctl */ case SCSI_IOCTL_SEND_COMMAND: + printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm); err = -EINVAL; if (!arg) break; diff -Nru a/drivers/block/ub.c b/drivers/block/ub.c --- a/drivers/block/ub.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/block/ub.c 2004-09-06 16:37:55 -07:00 @@ -107,6 +107,8 @@ * A second ought to be enough for a 32K transfer (UB_MAX_SECTORS) * even if a webcam hogs the bus (famous last words). * Some CDs need a second to spin up though. + * ZIP drive rejects commands when it's not spinning, + * so it does not need long timeouts either. */ #define UB_URB_TIMEOUT (HZ*2) #define UB_CTRL_TIMEOUT (HZ/2) /* 500ms ought to be enough to clear a stall */ @@ -287,6 +289,7 @@ struct ub_completion work_done; struct urb work_urb; + struct timer_list work_timer; int last_pipe; /* What might need clearing */ struct bulk_cb_wrap work_bcb; struct bulk_cs_wrap work_bcs; @@ -776,16 +779,20 @@ sc->last_pipe = sc->send_bulk_pipe; usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->send_bulk_pipe, bcb, US_BULK_CB_WRAP_LEN, ub_urb_complete, sc); - sc->work_urb.timeout = UB_URB_TIMEOUT; + sc->work_urb.transfer_flags = URB_ASYNC_UNLINK; /* Fill what we shouldn't be filling, because usb-storage did so. */ sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + sc->work_timer.expires = jiffies + UB_URB_TIMEOUT; + add_timer(&sc->work_timer); + if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) { /* XXX Clear stalls */ printk("ub: cmd #%d start failed (%d)\n", cmd->tag, rc); /* P3 */ + del_timer(&sc->work_timer); ub_complete(&sc->work_done); return rc; } @@ -796,6 +803,19 @@ } /* + * Timeout handler. + */ +static void ub_urb_timeout(unsigned long arg) +{ + struct ub_dev *sc = (struct ub_dev *) arg; + unsigned long flags; + + spin_lock_irqsave(&sc->lock, flags); + usb_unlink_urb(&sc->work_urb); + spin_unlock_irqrestore(&sc->lock, flags); +} + +/* * Completion routine for the work URB. * * This can be called directly from usb_submit_urb (while we have @@ -943,14 +963,18 @@ sc->last_pipe = pipe; usb_fill_bulk_urb(&sc->work_urb, sc->dev, pipe, cmd->data, cmd->len, ub_urb_complete, sc); - sc->work_urb.timeout = UB_URB_TIMEOUT; + sc->work_urb.transfer_flags = URB_ASYNC_UNLINK; sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + sc->work_timer.expires = jiffies + UB_URB_TIMEOUT; + add_timer(&sc->work_timer); + if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) { /* XXX Clear stalls */ printk("ub: data #%d submit failed (%d)\n", cmd->tag, rc); /* P3 */ + del_timer(&sc->work_timer); ub_complete(&sc->work_done); ub_state_done(sc, cmd, rc); return; @@ -1034,16 +1058,20 @@ usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->recv_bulk_pipe, &sc->work_bcs, US_BULK_CS_WRAP_LEN, ub_urb_complete, sc); - sc->work_urb.timeout = UB_URB_TIMEOUT; + sc->work_urb.transfer_flags = URB_ASYNC_UNLINK; sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + sc->work_timer.expires = jiffies + UB_URB_TIMEOUT; + add_timer(&sc->work_timer); + rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC); if (rc != 0) { /* XXX Clear stalls */ printk("%s: CSW #%d submit failed (%d)\n", sc->name, cmd->tag, rc); /* P3 */ + del_timer(&sc->work_timer); ub_complete(&sc->work_done); ub_state_done(sc, cmd, rc); return; @@ -1153,14 +1181,18 @@ sc->last_pipe = sc->recv_bulk_pipe; usb_fill_bulk_urb(&sc->work_urb, sc->dev, sc->recv_bulk_pipe, &sc->work_bcs, US_BULK_CS_WRAP_LEN, ub_urb_complete, sc); - sc->work_urb.timeout = UB_URB_TIMEOUT; + sc->work_urb.transfer_flags = URB_ASYNC_UNLINK; sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + sc->work_timer.expires = jiffies + UB_URB_TIMEOUT; + add_timer(&sc->work_timer); + if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) { /* XXX Clear stalls */ printk("ub: CSW #%d submit failed (%d)\n", cmd->tag, rc); /* P3 */ + del_timer(&sc->work_timer); ub_complete(&sc->work_done); ub_state_done(sc, cmd, rc); return; @@ -1233,14 +1265,17 @@ UB_INIT_COMPLETION(sc->work_done); usb_fill_control_urb(&sc->work_urb, sc->dev, sc->send_ctrl_pipe, - (unsigned char*) cr, NULL, 0, - ub_urb_complete, sc); - sc->work_urb.timeout = UB_CTRL_TIMEOUT; + (unsigned char*) cr, NULL, 0, ub_urb_complete, sc); + sc->work_urb.transfer_flags = URB_ASYNC_UNLINK; sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + sc->work_timer.expires = jiffies + UB_CTRL_TIMEOUT; + add_timer(&sc->work_timer); + if ((rc = usb_submit_urb(&sc->work_urb, GFP_ATOMIC)) != 0) { + del_timer(&sc->work_timer); ub_complete(&sc->work_done); return rc; } @@ -1653,6 +1688,12 @@ complete(cop); } +static void ub_probe_timeout(unsigned long arg) +{ + struct completion *cop = (struct completion *) arg; + complete(cop); +} + /* * Clear initial stalls. */ @@ -1661,6 +1702,7 @@ int endp; struct usb_ctrlrequest *cr; struct completion compl; + struct timer_list timer; int rc; init_completion(&compl); @@ -1677,21 +1719,35 @@ cr->wLength = cpu_to_le16(0); usb_fill_control_urb(&sc->work_urb, sc->dev, sc->send_ctrl_pipe, - (unsigned char*) cr, NULL, 0, - ub_probe_urb_complete, &compl); - sc->work_urb.timeout = UB_CTRL_TIMEOUT; + (unsigned char*) cr, NULL, 0, ub_probe_urb_complete, &compl); + sc->work_urb.transfer_flags = 0; sc->work_urb.actual_length = 0; sc->work_urb.error_count = 0; sc->work_urb.status = 0; + init_timer(&timer); + timer.function = ub_probe_timeout; + timer.data = (unsigned long) &compl; + timer.expires = jiffies + UB_CTRL_TIMEOUT; + add_timer(&timer); + if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) { printk(KERN_WARNING "%s: Unable to submit a probe clear (%d)\n", sc->name, rc); + del_timer_sync(&timer); return rc; } wait_for_completion(&compl); + del_timer_sync(&timer); + /* + * Most of the time, URB was done and dev set to NULL, and so + * the unlink bounces out with ENODEV. We do not call usb_kill_urb + * because we still think about a backport to 2.4. + */ + usb_unlink_urb(&sc->work_urb); + /* reset the endpoint toggle */ usb_settoggle(sc->dev, endp, usb_pipeout(sc->last_pipe), 0); @@ -1766,6 +1822,10 @@ usb_init_urb(&sc->work_urb); tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc); atomic_set(&sc->poison, 0); + + init_timer(&sc->work_timer); + sc->work_timer.data = (unsigned long) sc; + sc->work_timer.function = ub_urb_timeout; ub_init_completion(&sc->work_done); sc->work_done.done = 1; /* A little yuk, but oh well... */ diff -Nru a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c --- a/drivers/cdrom/cdu31a.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/cdrom/cdu31a.c 2004-09-06 16:37:54 -07:00 @@ -729,8 +729,7 @@ res_reg[1]); } - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(2 * HZ); + msleep(2000); sony_get_toc(); } @@ -960,8 +959,7 @@ if (((result_buffer[0] & 0xf0) == 0x20) && (num_retries < MAX_CDU31A_RETRIES)) { num_retries++; - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ / 10); /* Wait .1 seconds on retries */ + msleep(100): goto retry_cd_operation; } diff -Nru a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c --- a/drivers/cdrom/mcd.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/cdrom/mcd.c 2004-09-06 16:37:53 -07:00 @@ -1021,10 +1021,9 @@ st = statusCmd(); /* check drive status */ if (st == -1) goto err_out; /* drive doesn't respond */ - if ((st & MST_READY) == 0) { /* no disk? wait a sec... */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ); - } + if ((st & MST_READY) == 0) /* no disk? wait a sec... */ + msleep(1000); + } while (((st & MST_READY) == 0) && count++ < MCD_RETRY_ATTEMPTS); if (updateToc() < 0) diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig --- a/drivers/char/Kconfig 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/Kconfig 2004-09-06 16:37:50 -07:00 @@ -595,39 +595,6 @@ which will also be compiled when this driver is built as a module. -config QIC02_TAPE - tristate "QIC-02 tape support" - help - If you have a non-SCSI tape drive like that, say Y. - - To compile this driver as a module, choose M here: the - module will be called tpqic02. - -config QIC02_DYNCONF - bool "Do you want runtime configuration for QIC-02" - depends on QIC02_TAPE - help - You can either configure this driver once and for all by editing a - header file (), in which case you - should say N, or you can fetch a program via anonymous FTP which is - able to configure this driver during runtime. The program to do - this is called 'qic02conf' and it is part of the - tpqic02-support-X.Y.tar.gz support package. - - If you want to use the qic02conf program, say Y. - -comment "Edit configuration parameters in ./include/linux/tpqic02.h!" - depends on QIC02_TAPE && !QIC02_DYNCONF - -comment "Setting runtime QIC-02 configuration is done with qic02conf" - depends on QIC02_TAPE && QIC02_DYNCONF - -comment "from the tpqic02-support package. It is available at" - depends on QIC02_TAPE && QIC02_DYNCONF - -comment "metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/" - depends on QIC02_TAPE && QIC02_DYNCONF - source "drivers/char/ipmi/Kconfig" source "drivers/char/watchdog/Kconfig" @@ -786,7 +753,7 @@ config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 + depends on RTC!=y && !IA64 && !ARM ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile --- a/drivers/char/Makefile 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/Makefile 2004-09-06 16:37:55 -07:00 @@ -7,8 +7,11 @@ # FONTMAPFILE = cp437.uni -obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o +obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o +obj-$(CONFIG_LEGACY_PTYS) += pty.o +obj-$(CONFIG_UNIX98_PTYS) += pty.o +obj-y += misc.o obj-$(CONFIG_VT) += vt_ioctl.o vc_screen.o consolemap.o \ consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o diff -Nru a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig --- a/drivers/char/agp/Kconfig 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/agp/Kconfig 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ config AGP - tristate "/dev/agpgart (AGP Support)" if !GART_IOMMU && !M68K + tristate "/dev/agpgart (AGP Support)" if !GART_IOMMU && !M68K && !ARM default y if GART_IOMMU ---help--- AGP (Accelerated Graphics Port) is a bus system mainly used to diff -Nru a/drivers/char/amiserial.c b/drivers/char/amiserial.c --- a/drivers/char/amiserial.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/amiserial.c 2004-09-06 16:37:55 -07:00 @@ -118,10 +118,6 @@ #define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state)) -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* * tmp_buf is used as a temporary buffer by serial_write. We need to * lock it in case the copy_from_user blocks while swapping in a page, @@ -430,7 +426,7 @@ if ((info->flags & ASYNC_CHECK_CD) && (dstatus & SER_DCD)) { #if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR)) - printk("ttyS%02d CD now %s...", info->line, + printk("ttyS%d CD now %s...", info->line, (!(status & SER_DCD)) ? "on" : "off"); #endif if (!(status & SER_DCD)) @@ -1610,7 +1606,7 @@ if (char_time == 0) char_time = 1; if (timeout) - char_time = MIN(char_time, timeout); + char_time = min_t(unsigned long, char_time, timeout); /* * If the transmitter hasn't cleared in twice the approximate * amount of time to send the entire FIFO, it probably won't @@ -2095,7 +2091,7 @@ continue; */ - printk(KERN_INFO "ttyS%02d is the amiga builtin serial port\n", + printk(KERN_INFO "ttyS%d is the amiga builtin serial port\n", state->line); /* Hardware set up */ diff -Nru a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig --- a/drivers/char/drm/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/Kconfig 2004-09-06 16:37:54 -07:00 @@ -24,7 +24,7 @@ config DRM_GAMMA tristate "3dlabs GMX 2000" - depends on DRM + depends on DRM && BROKEN help This is the old gamma driver, please tell me if it might actually work. @@ -62,7 +62,18 @@ Choose this option if you have a system that has Intel 830M, 845G, 852GM, 855GM or 865G integrated graphics. If M is selected, the module will be called i830. AGP support is required for this driver - to work. + to work. This driver will eventually be replaced by the i915 one. + +config DRM_I915 + tristate "Intel 830M, 845G, 852GM, 855GM, 865G, 915G" + depends on DRM && AGP && AGP_INTEL + help + Choose this option if you have a system that has Intel 830M, 845G, + 852GM, 855GM 865G or 915G integrated graphics. If M is selected, the + module will be called i915. AGP support is required for this driver + to work. This driver will eventually replace the I830 driver, when + later release of X start to use the new DDX and DRI. + config DRM_MGA tristate "Matrox g200/g400" diff -Nru a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile --- a/drivers/char/drm/Makefile 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/Makefile 2004-09-06 16:37:55 -07:00 @@ -8,6 +8,7 @@ mga-objs := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o i810-objs := i810_drv.o i810_dma.o i830-objs := i830_drv.o i830_dma.o i830_irq.o +i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o ffb-objs := ffb_drv.o ffb_context.o sis-objs := sis_drv.o sis_ds.o sis_mm.o @@ -19,6 +20,7 @@ obj-$(CONFIG_DRM_MGA) += mga.o obj-$(CONFIG_DRM_I810) += i810.o obj-$(CONFIG_DRM_I830) += i830.o +obj-$(CONFIG_DRM_I915) += i915.o obj-$(CONFIG_DRM_FFB) += ffb.o obj-$(CONFIG_DRM_SIS) += sis.o diff -Nru a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h --- a/drivers/char/drm/drmP.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/drmP.h 2004-09-06 16:37:54 -07:00 @@ -73,42 +73,26 @@ #include #include "drm.h" -#include "drm_os_linux.h" +#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) +#define __OS_HAS_MTRR (defined(CONFIG_MTRR)) +#include "drm_os_linux.h" /***********************************************************************/ /** \name DRM template customization defaults */ /*@{*/ -#ifndef __HAVE_AGP -#define __HAVE_AGP 0 -#endif -#ifndef __HAVE_MTRR -#define __HAVE_MTRR 0 -#endif -#ifndef __HAVE_CTX_BITMAP -#define __HAVE_CTX_BITMAP 0 -#endif -#ifndef __HAVE_DMA -#define __HAVE_DMA 0 -#endif -#ifndef __HAVE_IRQ -#define __HAVE_IRQ 0 -#endif -#ifndef __HAVE_DMA_WAITLIST -#define __HAVE_DMA_WAITLIST 0 -#endif -#ifndef __HAVE_DMA_FREELIST -#define __HAVE_DMA_FREELIST 0 -#endif - -#define __REALLY_HAVE_AGP (__HAVE_AGP && (defined(CONFIG_AGP) || \ - defined(CONFIG_AGP_MODULE))) -#define __REALLY_HAVE_MTRR (__HAVE_MTRR && defined(CONFIG_MTRR)) -#define __REALLY_HAVE_SG (__HAVE_SG) - -/*@}*/ - +/* driver capabilities and requirements mask */ +#define DRIVER_USE_AGP 0x1 +#define DRIVER_REQUIRE_AGP 0x2 +#define DRIVER_USE_MTRR 0x4 +#define DRIVER_PCI_DMA 0x8 +#define DRIVER_SG 0x10 +#define DRIVER_HAVE_DMA 0x20 +#define DRIVER_HAVE_IRQ 0x40 +#define DRIVER_IRQ_SHARED 0x80 +#define DRIVER_IRQ_VBL 0x100 +#define DRIVER_DMA_QUEUE 0x200 /***********************************************************************/ /** \name Begin the DRM... */ @@ -266,54 +250,6 @@ /***********************************************************************/ -/** \name Mapping helper macros */ -/*@{*/ - -#define DRM_IOREMAP(map, dev) \ - (map)->handle = DRM(ioremap)( (map)->offset, (map)->size, (dev) ) - -#define DRM_IOREMAP_NOCACHE(map, dev) \ - (map)->handle = DRM(ioremap_nocache)((map)->offset, (map)->size, (dev)) - -#define DRM_IOREMAPFREE(map, dev) \ - do { \ - if ( (map)->handle && (map)->size ) \ - DRM(ioremapfree)( (map)->handle, (map)->size, (dev) ); \ - } while (0) - -/** - * Find mapping. - * - * \param _map matching mapping if found, untouched otherwise. - * \param _o offset. - * - * Expects the existence of a local variable named \p dev pointing to the - * drm_device structure. - */ -#define DRM_FIND_MAP(_map, _o) \ -do { \ - struct list_head *_list; \ - list_for_each( _list, &dev->maplist->head ) { \ - drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head ); \ - if ( _entry->map && \ - _entry->map->offset == (_o) ) { \ - (_map) = _entry->map; \ - break; \ - } \ - } \ -} while(0) - -/** - * Drop mapping. - * - * \sa #DRM_FIND_MAP. - */ -#define DRM_DROP_MAP(_map) - -/*@}*/ - - -/***********************************************************************/ /** \name Internal types and structures */ /*@{*/ @@ -473,9 +409,7 @@ struct drm_device *dev; int remove_auth_on_close; unsigned long lock_count; -#ifdef DRIVER_FILE_FIELDS - DRIVER_FILE_FIELDS; -#endif + void *driver_priv; } drm_file_t; /** Wait queue */ @@ -533,7 +467,6 @@ /*@}*/ } drm_device_dma_t; -#if __REALLY_HAVE_AGP /** * AGP memory entry. Stored as a doubly linked list. */ @@ -562,7 +495,6 @@ int cant_use_aperture; unsigned long page_mask; } drm_agp_head_t; -#endif /** * Scatter-gather memory. @@ -599,7 +531,6 @@ drm_file_t *tag; /**< associated fd private data */ } drm_ctx_list_t; -#ifdef __HAVE_VBL_IRQ typedef struct drm_vbl_sig { struct list_head head; @@ -608,8 +539,40 @@ struct task_struct *task; } drm_vbl_sig_t; -#endif +/** + * DRM device functions structure + */ +struct drm_device; + +struct drm_driver_fn { + int (*preinit)(struct drm_device *); + int (*postinit)(struct drm_device *); + void (*prerelease)(struct drm_device *, struct file *filp); + void (*pretakedown)(struct drm_device *); + int (*postcleanup)(struct drm_device *); + int (*presetup)(struct drm_device *); + int (*postsetup)(struct drm_device *); + int (*open_helper)(struct drm_device *, drm_file_t *); + void (*free_filp_priv)(struct drm_device *, drm_file_t *); + void (*release)(struct drm_device *, struct file *filp); + void (*dma_ready)(struct drm_device *); + int (*dma_quiescent)(struct drm_device *); + int (*context_ctor)(struct drm_device *dev, int context); + int (*context_dtor)(struct drm_device *dev, int context); + int (*kernel_context_switch)(struct drm_device *dev, int old, int new); + void (*kernel_context_switch_unlock)(struct drm_device *dev, drm_lock_t *lock); + int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence); + /* these have to be filled in */ + irqreturn_t (*irq_handler)( DRM_IRQ_ARGS ); + void (*irq_preinstall)(struct drm_device *dev); + void (*irq_postinstall)(struct drm_device *dev); + void (*irq_uninstall)(struct drm_device *dev); + void (*reclaim_buffers)(struct file *filp); + unsigned long (*get_map_ofs)(drm_map_t *map); + unsigned long (*get_reg_ofs)(struct drm_device *dev); + void (*set_version)(struct drm_device *dev, drm_set_version_t *sv); +}; /** * DRM device structure. */ @@ -698,13 +661,13 @@ struct work_struct work; /** \name VBLANK IRQ support */ /*@{*/ -#ifdef __HAVE_VBL_IRQ + wait_queue_head_t vbl_queue; /**< VBLANK wait queue */ atomic_t vbl_received; spinlock_t vbl_lock; drm_vbl_sig_t vbl_sigs; /**< signal list to send on VBLANK */ unsigned int vbl_pending; -#endif + /*@}*/ cycles_t ctx_start; cycles_t lck_start; @@ -717,9 +680,7 @@ wait_queue_head_t buf_readers; /**< Processes waiting to read */ wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ -#if __REALLY_HAVE_AGP drm_agp_head_t *agp; /**< AGP data */ -#endif struct pci_dev *pdev; /**< PCI device structure */ int pci_domain; /**< PCI bus domain number */ @@ -738,8 +699,37 @@ void *dev_private; /**< device private data */ drm_sigdata_t sigdata; /**< For block_all_signals */ sigset_t sigmask; + + struct drm_driver_fn fn_tbl; + drm_local_map_t *agp_buffer_map; + int dev_priv_size; + u32 driver_features; } drm_device_t; +static __inline__ int drm_core_check_feature(struct drm_device *dev, int feature) +{ + return ((dev->driver_features & feature) ? 1 : 0); +} + +#if __OS_HAS_AGP +static inline int drm_core_has_AGP(struct drm_device *dev) +{ + return drm_core_check_feature(dev, DRIVER_USE_AGP); +} +#else +#define drm_core_has_AGP(dev) (0) +#endif + +#if __OS_HAS_MTRR +static inline int drm_core_has_MTRR(struct drm_device *dev) +{ + return drm_core_check_feature(dev, DRIVER_USE_MTRR); +} +#else +#define drm_core_has_MTRR(dev) (0) +#endif + +extern void DRM(driver_register_fns)(struct drm_device *dev); /******************************************************************/ /** \name Internal function definitions */ @@ -795,12 +785,10 @@ drm_device_t *dev); extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev); -#if __REALLY_HAVE_AGP extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type); extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages); extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start); extern int DRM(unbind_agp)(DRM_AGP_MEM *handle); -#endif /* Misc. IOCTL support (drm_ioctl.h) */ extern int DRM(irq_by_busid)(struct inode *inode, struct file *filp, @@ -837,10 +825,8 @@ extern int DRM(context_switch)(drm_device_t *dev, int old, int new); extern int DRM(context_switch_complete)(drm_device_t *dev, int new); -#if __HAVE_CTX_BITMAP extern int DRM(ctxbitmap_init)( drm_device_t *dev ); extern void DRM(ctxbitmap_cleanup)( drm_device_t *dev ); -#endif extern int DRM(setsareactx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); @@ -884,7 +870,6 @@ unsigned int cmd, unsigned long arg ); extern int DRM(rmmap)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); -#if __HAVE_DMA extern int DRM(addbufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); extern int DRM(infobufs)( struct inode *inode, struct file *filp, @@ -901,33 +886,22 @@ extern void DRM(dma_takedown)(drm_device_t *dev); extern void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf); extern void DRM(reclaim_buffers)( struct file *filp ); -#endif /* __HAVE_DMA */ /* IRQ support (drm_irq.h) */ -#if __HAVE_IRQ || __HAVE_DMA extern int DRM(control)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); -#endif -#if __HAVE_IRQ extern int DRM(irq_install)( drm_device_t *dev ); extern int DRM(irq_uninstall)( drm_device_t *dev ); extern irqreturn_t DRM(irq_handler)( DRM_IRQ_ARGS ); extern void DRM(driver_irq_preinstall)( drm_device_t *dev ); extern void DRM(driver_irq_postinstall)( drm_device_t *dev ); extern void DRM(driver_irq_uninstall)( drm_device_t *dev ); -#ifdef __HAVE_VBL_IRQ + extern int DRM(wait_vblank)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int DRM(vblank_wait)(drm_device_t *dev, unsigned int *vbl_seq); extern void DRM(vbl_send_signals)( drm_device_t *dev ); -#endif -#ifdef __HAVE_IRQ_BH -extern void DRM(irq_immediate_bh)( void *dev ); -#endif -#endif - -#if __REALLY_HAVE_AGP /* AGP/GART support (drm_agpsupport.h) */ extern drm_agp_head_t *DRM(agp_init)(void); extern void DRM(agp_uninit)(void); @@ -952,7 +926,6 @@ extern int DRM(agp_free_memory)(DRM_AGP_MEM *handle); extern int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start); extern int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle); -#endif /* Stub support (drm_stub.h) */ int DRM(stub_register)(const char *name, @@ -969,14 +942,12 @@ struct proc_dir_entry *root, struct proc_dir_entry *dev_root); -#ifdef __HAVE_SG /* Scatter Gather Support (drm_scatter.h) */ extern void DRM(sg_cleanup)(drm_sg_mem_t *entry); extern int DRM(sg_alloc)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int DRM(sg_free)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); -#endif /* ATI PCIGART support (ati_pcigart.h) */ extern int DRM(ati_pcigart_init)(drm_device_t *dev, @@ -986,7 +957,44 @@ unsigned long addr, dma_addr_t bus_addr); + +/* Inline replacements for DRM_IOREMAP macros */ +static __inline__ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev) +{ + map->handle = DRM(ioremap)( map->offset, map->size, dev ); +} + +static __inline__ void drm_core_ioremap_nocache(struct drm_map *map, struct drm_device *dev) +{ + map->handle = DRM(ioremap_nocache)(map->offset, map->size, dev); +} + +static __inline__ void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev) +{ + if ( map->handle && map->size ) + DRM(ioremapfree)( map->handle, map->size, dev ); +} + +static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned long offset) +{ + struct list_head *_list; + list_for_each( _list, &dev->maplist->head ) { + drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head ); + if ( _entry->map && + _entry->map->offset == offset ) { + return _entry->map; + } + } + return NULL; +} + +static __inline__ void drm_core_dropmap(struct drm_map *map) +{ +} /*@}*/ + +extern unsigned long DRM(core_get_map_ofs)(drm_map_t *map); +extern unsigned long DRM(core_get_reg_ofs)(struct drm_device *dev); #endif /* __KERNEL__ */ #endif diff -Nru a/drivers/char/drm/drm_agpsupport.h b/drivers/char/drm/drm_agpsupport.h --- a/drivers/char/drm/drm_agpsupport.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/drm_agpsupport.h 2004-09-06 16:37:50 -07:00 @@ -34,8 +34,7 @@ #include "drmP.h" #include -#if __REALLY_HAVE_AGP - +#if __OS_HAS_AGP #define DRM_AGP_GET (drm_agp_t *)inter_module_get("drm_agp") #define DRM_AGP_PUT inter_module_put("drm_agp") @@ -466,4 +465,4 @@ return drm_agp->unbind_memory(handle); } -#endif /* __REALLY_HAVE_AGP */ +#endif /* __OS_HAS_AGP */ diff -Nru a/drivers/char/drm/drm_bufs.h b/drivers/char/drm/drm_bufs.h --- a/drivers/char/drm/drm_bufs.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/drm_bufs.h 2004-09-06 16:37:51 -07:00 @@ -36,26 +36,6 @@ #include #include "drmP.h" -#ifndef __HAVE_PCI_DMA -#define __HAVE_PCI_DMA 0 -#endif - -#ifndef __HAVE_SG -#define __HAVE_SG 0 -#endif - -#ifndef DRIVER_BUF_PRIV_T -#define DRIVER_BUF_PRIV_T u32 -#endif -#ifndef DRIVER_AGP_BUFFERS_MAP -#if __HAVE_AGP && __HAVE_DMA -#error "You must define DRIVER_AGP_BUFFERS_MAP()" -#else -#define DRIVER_AGP_BUFFERS_MAP( dev ) NULL -#endif -#endif - - /** * Compute size order. Returns the exponent of the smaller power of two which * is greater or equal to given number. @@ -142,13 +122,13 @@ #ifdef __alpha__ map->offset += dev->hose->mem_space->start; #endif -#if __REALLY_HAVE_MTRR - if ( map->type == _DRM_FRAME_BUFFER || - (map->flags & _DRM_WRITE_COMBINING) ) { - map->mtrr = mtrr_add( map->offset, map->size, - MTRR_TYPE_WRCOMB, 1 ); + if (drm_core_has_MTRR(dev)) { + if ( map->type == _DRM_FRAME_BUFFER || + (map->flags & _DRM_WRITE_COMBINING) ) { + map->mtrr = mtrr_add( map->offset, map->size, + MTRR_TYPE_WRCOMB, 1 ); + } } -#endif if (map->type == _DRM_REGISTERS) map->handle = DRM(ioremap)( map->offset, map->size, dev ); @@ -174,15 +154,15 @@ dev->lock.hw_lock = map->handle; /* Pointer to lock */ } break; -#if __REALLY_HAVE_AGP case _DRM_AGP: + if (drm_core_has_AGP(dev)) { #ifdef __alpha__ - map->offset += dev->hose->mem_space->start; + map->offset += dev->hose->mem_space->start; #endif - map->offset += dev->agp->base; - map->mtrr = dev->agp->agp_mtrr; /* for getmap */ + map->offset += dev->agp->base; + map->mtrr = dev->agp->agp_mtrr; /* for getmap */ + } break; -#endif case _DRM_SCATTER_GATHER: if (!dev->sg) { DRM(free)(map, sizeof(*map), DRM_MEM_MAPS); @@ -282,15 +262,15 @@ switch (map->type) { case _DRM_REGISTERS: case _DRM_FRAME_BUFFER: -#if __REALLY_HAVE_MTRR - if (map->mtrr >= 0) { - int retcode; - retcode = mtrr_del(map->mtrr, - map->offset, - map->size); - DRM_DEBUG("mtrr_del = %d\n", retcode); + if (drm_core_has_MTRR(dev)) { + if (map->mtrr >= 0) { + int retcode; + retcode = mtrr_del(map->mtrr, + map->offset, + map->size); + DRM_DEBUG("mtrr_del = %d\n", retcode); + } } -#endif DRM(ioremapfree)(map->handle, map->size, dev); break; case _DRM_SHM: @@ -306,8 +286,6 @@ return 0; } -#if __HAVE_DMA - /** * Cleanup after an error on one of the addbufs() functions. * @@ -348,15 +326,11 @@ sizeof(*entry->buflist), DRM_MEM_BUFS); -#if __HAVE_DMA_FREELIST - DRM(freelist_destroy)(&entry->freelist); -#endif - entry->buf_count = 0; } } -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP /** * Add AGP buffers for DMA transfers (ioctl). * @@ -473,8 +447,8 @@ init_waitqueue_head( &buf->dma_wait ); buf->filp = NULL; - buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T); - buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T), + buf->dev_priv_size = dev->dev_priv_size; + buf->dev_private = DRM(alloc)( buf->dev_priv_size, DRM_MEM_BUFS ); if(!buf->dev_private) { /* Set count correctly so we free the proper amount. */ @@ -520,12 +494,6 @@ DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count ); -#if __HAVE_DMA_FREELIST - DRM(freelist_create)( &entry->freelist, entry->buf_count ); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - DRM(freelist_put)( dev, &entry->freelist, &entry->buflist[i] ); - } -#endif up( &dev->struct_sem ); request.count = entry->buf_count; @@ -539,9 +507,8 @@ atomic_dec( &dev->buf_alloc ); return 0; } -#endif /* __REALLY_HAVE_AGP */ +#endif /* __OS_HAS_AGP */ -#if __HAVE_PCI_DMA int DRM(addbufs_pci)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ) { @@ -566,6 +533,7 @@ drm_buf_t **temp_buflist; drm_buf_desc_t __user *argp = (void __user *)arg; + if (!drm_core_check_feature(dev, DRIVER_PCI_DMA)) return -EINVAL; if ( !dma ) return -EINVAL; if ( copy_from_user( &request, argp, sizeof(request) ) ) @@ -691,14 +659,17 @@ buf->used = 0; buf->offset = (dma->byte_count + byte_count + offset); buf->address = (void *)(page + offset); +#ifndef __sparc__ + buf->bus_address = virt_to_bus(buf->address); +#endif buf->next = NULL; buf->waiting = 0; buf->pending = 0; init_waitqueue_head( &buf->dma_wait ); buf->filp = NULL; - buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T); - buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T), + buf->dev_priv_size = dev->dev_priv_size; + buf->dev_private = DRM(alloc)( dev->dev_priv_size, DRM_MEM_BUFS ); if(!buf->dev_private) { /* Set count correctly so we free the proper amount. */ @@ -758,12 +729,6 @@ dma->page_count += entry->seg_count << page_order; dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order); -#if __HAVE_DMA_FREELIST - DRM(freelist_create)( &entry->freelist, entry->buf_count ); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - DRM(freelist_put)( dev, &entry->freelist, &entry->buflist[i] ); - } -#endif up( &dev->struct_sem ); request.count = entry->buf_count; @@ -776,9 +741,7 @@ return 0; } -#endif /* __HAVE_PCI_DMA */ -#if __HAVE_SG int DRM(addbufs_sg)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ) { @@ -801,6 +764,8 @@ int i; drm_buf_t **temp_buflist; + if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; + if ( !dma ) return -EINVAL; if ( copy_from_user( &request, argp, sizeof(request) ) ) @@ -881,8 +846,8 @@ init_waitqueue_head( &buf->dma_wait ); buf->filp = NULL; - buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T); - buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T), + buf->dev_priv_size = dev->dev_priv_size; + buf->dev_private = DRM(alloc)( dev->dev_priv_size, DRM_MEM_BUFS ); if(!buf->dev_private) { /* Set count correctly so we free the proper amount. */ @@ -929,12 +894,6 @@ DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count ); -#if __HAVE_DMA_FREELIST - DRM(freelist_create)( &entry->freelist, entry->buf_count ); - for ( i = 0 ; i < entry->buf_count ; i++ ) { - DRM(freelist_put)( dev, &entry->freelist, &entry->buflist[i] ); - } -#endif up( &dev->struct_sem ); request.count = entry->buf_count; @@ -948,7 +907,6 @@ atomic_dec( &dev->buf_alloc ); return 0; } -#endif /* __HAVE_SG */ /** * Add buffers for DMA transfers (ioctl). @@ -968,26 +926,25 @@ unsigned int cmd, unsigned long arg ) { drm_buf_desc_t request; + drm_file_t *priv = filp->private_data; + drm_device_t *dev = priv->dev; + + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + return -EINVAL; if ( copy_from_user( &request, (drm_buf_desc_t __user *)arg, sizeof(request) ) ) return -EFAULT; -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( request.flags & _DRM_AGP_BUFFER ) return DRM(addbufs_agp)( inode, filp, cmd, arg ); else #endif -#if __HAVE_SG if ( request.flags & _DRM_SG_BUFFER ) return DRM(addbufs_sg)( inode, filp, cmd, arg ); else -#endif -#if __HAVE_PCI_DMA return DRM(addbufs_pci)( inode, filp, cmd, arg ); -#else - return -EINVAL; -#endif } @@ -1019,6 +976,9 @@ int i; int count; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + return -EINVAL; + if ( !dma ) return -EINVAL; spin_lock( &dev->count_lock ); @@ -1100,6 +1060,9 @@ int order; drm_buf_entry_t *entry; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + return -EINVAL; + if ( !dma ) return -EINVAL; if ( copy_from_user( &request, @@ -1147,6 +1110,9 @@ int idx; drm_buf_t *buf; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + return -EINVAL; + if ( !dma ) return -EINVAL; if ( copy_from_user( &request, @@ -1204,6 +1170,9 @@ drm_buf_map_t request; int i; + if (!drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + return -EINVAL; + if ( !dma ) return -EINVAL; spin_lock( &dev->count_lock ); @@ -1218,9 +1187,9 @@ return -EFAULT; if ( request.count >= dma->buf_count ) { - if ( (__HAVE_AGP && (dma->flags & _DRM_DMA_USE_AGP)) || - (__HAVE_SG && (dma->flags & _DRM_DMA_USE_SG)) ) { - drm_map_t *map = DRIVER_AGP_BUFFERS_MAP( dev ); + if ((drm_core_has_AGP(dev) && (dma->flags & _DRM_DMA_USE_AGP)) || + (drm_core_check_feature(dev, DRIVER_SG) && (dma->flags & _DRM_DMA_USE_SG)) ) { + drm_map_t *map = dev->agp_buffer_map; if ( !map ) { retcode = -EINVAL; @@ -1301,4 +1270,3 @@ return retcode; } -#endif /* __HAVE_DMA */ diff -Nru a/drivers/char/drm/drm_context.h b/drivers/char/drm/drm_context.h --- a/drivers/char/drm/drm_context.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/drm_context.h 2004-09-06 16:37:50 -07:00 @@ -42,11 +42,6 @@ #include "drmP.h" -#if !__HAVE_CTX_BITMAP -#error "__HAVE_CTX_BITMAP must be defined" -#endif - - /******************************************************************/ /** \name Context bitmap support */ /*@{*/ @@ -419,10 +414,13 @@ /* Should this return -EBUSY instead? */ return -ENOMEM; } -#ifdef DRIVER_CTX_CTOR + if ( ctx.handle != DRM_KERNEL_CONTEXT ) - DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */ -#endif + { + if (dev->fn_tbl.context_ctor) + dev->fn_tbl.context_ctor(dev, ctx.handle); + } + ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST ); if ( !ctx_entry ) { DRM_DEBUG("out of memory\n"); @@ -554,9 +552,8 @@ priv->remove_auth_on_close = 1; } if ( ctx.handle != DRM_KERNEL_CONTEXT ) { -#ifdef DRIVER_CTX_DTOR - DRIVER_CTX_DTOR(ctx.handle); /* XXX: also pass dev ? */ -#endif + if (dev->fn_tbl.context_dtor) + dev->fn_tbl.context_dtor(dev, ctx.handle); DRM(ctxbitmap_free)( dev, ctx.handle ); } @@ -578,3 +575,4 @@ } /*@}*/ + diff -Nru a/drivers/char/drm/drm_dma.h b/drivers/char/drm/drm_dma.h --- a/drivers/char/drm/drm_dma.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/drm_dma.h 2004-09-06 16:37:53 -07:00 @@ -35,16 +35,6 @@ #include "drmP.h" - -#ifndef __HAVE_DMA_WAITQUEUE -#define __HAVE_DMA_WAITQUEUE 0 -#endif -#ifndef __HAVE_DMA_RECLAIM -#define __HAVE_DMA_RECLAIM 0 -#endif - -#if __HAVE_DMA - /** * Initialize the DMA data. * @@ -116,9 +106,6 @@ dma->bufs[i].buf_count * sizeof(*dma->bufs[0].buflist), DRM_MEM_BUFS); -#if __HAVE_DMA_FREELIST - DRM(freelist_destroy)(&dma->bufs[i].freelist); -#endif } } @@ -155,22 +142,11 @@ buf->filp = NULL; buf->used = 0; - if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) { + if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && waitqueue_active(&buf->dma_wait)) { wake_up_interruptible(&buf->dma_wait); } -#if __HAVE_DMA_FREELIST - else { - drm_device_dma_t *dma = dev->dma; - /* If processes are waiting, the last one - to wake will put the buffer on the free - list. If no processes are waiting, we - put the buffer on the freelist here. */ - DRM(freelist_put)(dev, &dma->bufs[buf->order].freelist, buf); - } -#endif } -#if !__HAVE_DMA_RECLAIM /** * Reclaim the buffers. * @@ -178,7 +154,7 @@ * * Frees each buffer associated with \p filp not already on the hardware. */ -void DRM(reclaim_buffers)( struct file *filp ) +void DRM(core_reclaim_buffers)( struct file *filp ) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; @@ -202,29 +178,4 @@ } } } -#endif - -#if !__HAVE_IRQ -/* This stub DRM_IOCTL_CONTROL handler is for the drivers that used to require - * IRQs for DMA but no longer do. It maintains compatibility with the X Servers - * that try to use the control ioctl by simply returning success. - */ -int DRM(control)( struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg ) -{ - drm_control_t ctl; - - if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) ) - return -EFAULT; - - switch ( ctl.func ) { - case DRM_INST_HANDLER: - case DRM_UNINST_HANDLER: - return 0; - default: - return -EINVAL; - } -} -#endif -#endif /* __HAVE_DMA */ diff -Nru a/drivers/char/drm/drm_drv.h b/drivers/char/drm/drm_drv.h --- a/drivers/char/drm/drm_drv.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/drm_drv.h 2004-09-06 16:37:54 -07:00 @@ -52,97 +52,13 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __MUST_HAVE_AGP -#define __MUST_HAVE_AGP 0 -#endif -#ifndef __HAVE_CTX_BITMAP -#define __HAVE_CTX_BITMAP 0 -#endif -#ifndef __HAVE_IRQ -#define __HAVE_IRQ 0 -#endif -#ifndef __HAVE_DMA_QUEUE -#define __HAVE_DMA_QUEUE 0 -#endif -#ifndef __HAVE_MULTIPLE_DMA_QUEUES -#define __HAVE_MULTIPLE_DMA_QUEUES 0 -#endif -#ifndef __HAVE_DMA_SCHEDULE -#define __HAVE_DMA_SCHEDULE 0 -#endif -#ifndef __HAVE_DMA_FLUSH -#define __HAVE_DMA_FLUSH 0 -#endif -#ifndef __HAVE_DMA_READY -#define __HAVE_DMA_READY 0 -#endif -#ifndef __HAVE_DMA_QUIESCENT -#define __HAVE_DMA_QUIESCENT 0 -#endif -#ifndef __HAVE_RELEASE -#define __HAVE_RELEASE 0 -#endif #ifndef __HAVE_COUNTERS #define __HAVE_COUNTERS 0 #endif -#ifndef __HAVE_SG -#define __HAVE_SG 0 -#endif -/* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm modules in - * the DRI cvs tree, but it is required by the kernel tree's sparc - * driver. - */ -#ifndef __HAVE_KERNEL_CTX_SWITCH -#define __HAVE_KERNEL_CTX_SWITCH 0 -#endif -#ifndef __HAVE_DRIVER_FOPS_READ -#define __HAVE_DRIVER_FOPS_READ 0 -#endif -#ifndef __HAVE_DRIVER_FOPS_POLL -#define __HAVE_DRIVER_FOPS_POLL 0 -#endif -#ifndef DRIVER_PREINIT -#define DRIVER_PREINIT() -#endif -#ifndef DRIVER_POSTINIT -#define DRIVER_POSTINIT() -#endif -#ifndef DRIVER_PRERELEASE -#define DRIVER_PRERELEASE() -#endif -#ifndef DRIVER_PRETAKEDOWN -#define DRIVER_PRETAKEDOWN() -#endif -#ifndef DRIVER_POSTCLEANUP -#define DRIVER_POSTCLEANUP() -#endif -#ifndef DRIVER_PRESETUP -#define DRIVER_PRESETUP() -#endif -#ifndef DRIVER_POSTSETUP -#define DRIVER_POSTSETUP() -#endif #ifndef DRIVER_IOCTLS #define DRIVER_IOCTLS #endif -#ifndef DRIVER_OPEN_HELPER -#define DRIVER_OPEN_HELPER( priv, dev ) -#endif -#ifndef DRIVER_FOPS -#define DRIVER_FOPS \ -static struct file_operations DRM(fops) = { \ - .owner = THIS_MODULE, \ - .open = DRM(open), \ - .flush = DRM(flush), \ - .release = DRM(release), \ - .ioctl = DRM(ioctl), \ - .mmap = DRM(mmap), \ - .fasync = DRM(fasync), \ - .poll = DRM(poll), \ - .read = DRM(read), \ -} -#endif #ifndef MODULE /** Use an additional macro to avoid preprocessor troubles */ @@ -166,16 +82,24 @@ static drm_device_t DRM(device)[MAX_DEVICES]; static int DRM(numdevs) = 0; -DRIVER_FOPS; +struct file_operations DRM(fops) = { + .owner = THIS_MODULE, + .open = DRM(open), + .flush = DRM(flush), + .release = DRM(release), + .ioctl = DRM(ioctl), + .mmap = DRM(mmap), + .fasync = DRM(fasync), + .poll = DRM(poll), + .read = DRM(read), +}; /** Ioctl table */ -static drm_ioctl_desc_t DRM(ioctls)[] = { +drm_ioctl_desc_t DRM(ioctls)[] = { [DRM_IOCTL_NR(DRM_IOCTL_VERSION)] = { DRM(version), 0, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_GET_UNIQUE)] = { DRM(getunique), 0, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_GET_MAGIC)] = { DRM(getmagic), 0, 0 }, -#if __HAVE_IRQ [DRM_IOCTL_NR(DRM_IOCTL_IRQ_BUSID)] = { DRM(irq_by_busid), 0, 1 }, -#endif [DRM_IOCTL_NR(DRM_IOCTL_GET_MAP)] = { DRM(getmap), 0, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_GET_CLIENT)] = { DRM(getclient), 0, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_GET_STATS)] = { DRM(getstats), 0, 0 }, @@ -189,10 +113,8 @@ [DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { DRM(addmap), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_RM_MAP)] = { DRM(rmmap), 1, 0 }, -#if __HAVE_CTX_BITMAP [DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)] = { DRM(setsareactx), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)] = { DRM(getsareactx), 1, 0 }, -#endif [DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { DRM(addctx), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { DRM(rmctx), 1, 1 }, @@ -208,26 +130,18 @@ [DRM_IOCTL_NR(DRM_IOCTL_LOCK)] = { DRM(lock), 1, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_UNLOCK)] = { DRM(unlock), 1, 0 }, -#if __HAVE_DMA_FLUSH - /* Gamma only, really */ - [DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { DRM(finish), 1, 0 }, -#else [DRM_IOCTL_NR(DRM_IOCTL_FINISH)] = { DRM(noop), 1, 0 }, -#endif -#if __HAVE_DMA [DRM_IOCTL_NR(DRM_IOCTL_ADD_BUFS)] = { DRM(addbufs), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_MARK_BUFS)] = { DRM(markbufs), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_INFO_BUFS)] = { DRM(infobufs), 1, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_MAP_BUFS)] = { DRM(mapbufs), 1, 0 }, [DRM_IOCTL_NR(DRM_IOCTL_FREE_BUFS)] = { DRM(freebufs), 1, 0 }, /* The DRM_IOCTL_DMA ioctl should be defined by the driver. */ -#endif -#if __HAVE_IRQ || __HAVE_DMA + [DRM_IOCTL_NR(DRM_IOCTL_CONTROL)] = { DRM(control), 1, 1 }, -#endif -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP [DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { DRM(agp_acquire), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_AGP_RELEASE)] = { DRM(agp_release), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_AGP_ENABLE)] = { DRM(agp_enable), 1, 1 }, @@ -238,14 +152,10 @@ [DRM_IOCTL_NR(DRM_IOCTL_AGP_UNBIND)] = { DRM(agp_unbind), 1, 1 }, #endif -#if __HAVE_SG [DRM_IOCTL_NR(DRM_IOCTL_SG_ALLOC)] = { DRM(sg_alloc), 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_SG_FREE)] = { DRM(sg_free), 1, 1 }, -#endif -#ifdef __HAVE_VBL_IRQ [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)] = { DRM(wait_vblank), 0, 0 }, -#endif DRIVER_IOCTLS }; @@ -264,18 +174,26 @@ static int DRM(setup)( drm_device_t *dev ) { int i; + int ret; + + if (dev->fn_tbl.presetup) + { + ret=dev->fn_tbl.presetup(dev); + if (ret!=0) + return ret; + } - DRIVER_PRESETUP(); atomic_set( &dev->ioctl_count, 0 ); atomic_set( &dev->vma_count, 0 ); dev->buf_use = 0; atomic_set( &dev->buf_alloc, 0 ); -#if __HAVE_DMA - i = DRM(dma_setup)( dev ); - if ( i < 0 ) - return i; -#endif + if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + { + i = DRM(dma_setup)( dev ); + if ( i < 0 ) + return i; + } dev->counters = 6 + __HAVE_COUNTERS; dev->types[0] = _DRM_STAT_LOCK; @@ -311,9 +229,6 @@ #ifdef __HAVE_COUNTER14 dev->types[14] = __HAVE_COUNTER14; #endif -#ifdef __HAVE_COUNTER15 - dev->types[14] = __HAVE_COUNTER14; -#endif for ( i = 0 ; i < DRM_ARRAY_SIZE(dev->counts) ; i++ ) atomic_set( &dev->counts[i], 0 ); @@ -371,7 +286,9 @@ * drm_select_queue fails between the time the interrupt is * initialized and the time the queues are initialized. */ - DRIVER_POSTSETUP(); + if (dev->fn_tbl.postsetup) + dev->fn_tbl.postsetup(dev); + return 0; } @@ -396,10 +313,10 @@ DRM_DEBUG( "\n" ); - DRIVER_PRETAKEDOWN(); -#if __HAVE_IRQ + if (dev->fn_tbl.pretakedown) + dev->fn_tbl.pretakedown(dev); + if ( dev->irq_enabled ) DRM(irq_uninstall)( dev ); -#endif down( &dev->struct_sem ); del_timer( &dev->timer ); @@ -425,9 +342,8 @@ dev->magiclist[i].head = dev->magiclist[i].tail = NULL; } -#if __REALLY_HAVE_AGP /* Clear AGP information */ - if ( dev->agp ) { + if (drm_core_has_AGP(dev) && dev->agp) { drm_agp_mem_t *entry; drm_agp_mem_t *nexte; @@ -446,7 +362,6 @@ dev->agp->acquired = 0; dev->agp->enabled = 0; } -#endif /* Clear vma list (only built for debugging) */ if ( dev->vmalist ) { @@ -465,15 +380,15 @@ switch ( map->type ) { case _DRM_REGISTERS: case _DRM_FRAME_BUFFER: -#if __REALLY_HAVE_MTRR - if ( map->mtrr >= 0 ) { - int retcode; - retcode = mtrr_del( map->mtrr, - map->offset, - map->size ); - DRM_DEBUG( "mtrr_del=%d\n", retcode ); + if (drm_core_has_MTRR(dev)) { + if ( map->mtrr >= 0 ) { + int retcode; + retcode = mtrr_del( map->mtrr, + map->offset, + map->size ); + DRM_DEBUG( "mtrr_del=%d\n", retcode ); + } } -#endif DRM(ioremapfree)( map->handle, map->size, dev ); break; case _DRM_SHM: @@ -486,15 +401,11 @@ */ break; case _DRM_SCATTER_GATHER: - /* Handle it, but do nothing, if HAVE_SG - * isn't defined. - */ -#if __HAVE_SG - if(dev->sg) { + /* Handle it */ + if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg) { DRM(sg_cleanup)(dev->sg); dev->sg = NULL; } -#endif break; } DRM(free)(map, sizeof(*map), DRM_MEM_MAPS); @@ -506,12 +417,8 @@ dev->maplist = NULL; } -#if __HAVE_DMA_QUEUE || __HAVE_MULTIPLE_DMA_QUEUES - if ( dev->queuelist ) { + if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist ) { for ( i = 0 ; i < dev->queue_count ; i++ ) { -#if __HAVE_DMA_WAITLIST - DRM(waitlist_destroy)( &dev->queuelist[i]->waitlist ); -#endif if ( dev->queuelist[i] ) { DRM(free)( dev->queuelist[i], sizeof(*dev->queuelist[0]), @@ -525,11 +432,10 @@ dev->queuelist = NULL; } dev->queue_count = 0; -#endif -#if __HAVE_DMA - DRM(dma_takedown)( dev ); -#endif + if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + DRM(dma_takedown)( dev ); + if ( dev->lock.hw_lock ) { dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */ dev->lock.filp = NULL; @@ -540,6 +446,13 @@ return 0; } +static void DRM(init_fn_table)(struct drm_device *dev) +{ + dev->fn_tbl.reclaim_buffers = DRM(core_reclaim_buffers); + dev->fn_tbl.get_map_ofs = DRM(core_get_map_ofs); + dev->fn_tbl.get_reg_ofs = DRM(core_get_reg_ofs); +} + #include "drm_pciids.h" static struct pci_device_id DRM(pciidlist)[] = { @@ -549,9 +462,7 @@ static int DRM(probe)(struct pci_dev *pdev) { drm_device_t *dev; -#if __HAVE_CTX_BITMAP int retcode; -#endif int i; int is_compat = 0; @@ -594,36 +505,42 @@ dev->pci_func = PCI_FUNC(pdev->devfn); dev->irq = pdev->irq; - DRIVER_PREINIT(); + /* dev_priv_size can be changed by a driver in driver_register_fns */ + dev->dev_priv_size = sizeof(u32); + + DRM(init_fn_table)(dev); -#if __REALLY_HAVE_AGP - dev->agp = DRM(agp_init)(); -#if __MUST_HAVE_AGP - if ( dev->agp == NULL ) { - DRM_ERROR( "Cannot initialize the agpgart module.\n" ); - DRM(stub_unregister)(dev->minor); - DRM(takedown)( dev ); - return -EINVAL; + DRM(driver_register_fns)(dev); + + if (dev->fn_tbl.preinit) + dev->fn_tbl.preinit(dev); + + if (drm_core_has_AGP(dev)) + { + dev->agp = DRM(agp_init)(); + if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) { + DRM_ERROR( "Cannot initialize the agpgart module.\n" ); + DRM(stub_unregister)(dev->minor); + DRM(takedown)( dev ); + return -EINVAL; + } + if (drm_core_has_MTRR(dev)) { + if (dev->agp) + dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base, + dev->agp->agp_info.aper_size*1024*1024, + MTRR_TYPE_WRCOMB, + 1 ); + } } -#endif -#if __REALLY_HAVE_MTRR - if (dev->agp) - dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base, - dev->agp->agp_info.aper_size*1024*1024, - MTRR_TYPE_WRCOMB, - 1 ); -#endif -#endif -#if __HAVE_CTX_BITMAP retcode = DRM(ctxbitmap_init)( dev ); if( retcode ) { DRM_ERROR( "Cannot allocate memory for context bitmap.\n" ); DRM(stub_unregister)(dev->minor); DRM(takedown)( dev ); return retcode; - } -#endif + } + DRM(numdevs)++; /* no errors, mark it reserved */ DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n", @@ -635,7 +552,8 @@ dev->minor, pci_pretty_name(pdev)); - DRIVER_POSTINIT(); + if (dev->fn_tbl.postinit) + dev->fn_tbl.postinit(dev); return 0; } @@ -695,31 +613,30 @@ DRM_INFO( "Module unloaded\n" ); } } -#if __HAVE_CTX_BITMAP + DRM(ctxbitmap_cleanup)( dev ); -#endif -#if __REALLY_HAVE_AGP && __REALLY_HAVE_MTRR - if ( dev->agp && dev->agp->agp_mtrr >= 0) { + if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && + dev->agp && dev->agp->agp_mtrr >= 0) { int retval; retval = mtrr_del( dev->agp->agp_mtrr, dev->agp->agp_info.aper_base, dev->agp->agp_info.aper_size*1024*1024 ); DRM_DEBUG( "mtrr_del=%d\n", retval ); } -#endif DRM(takedown)( dev ); -#if __REALLY_HAVE_AGP - if ( dev->agp ) { + if (drm_core_has_AGP(dev) && dev->agp ) { DRM(agp_uninit)(); DRM(free)( dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS ); dev->agp = NULL; } -#endif + + if (dev->fn_tbl.postcleanup) + dev->fn_tbl.postcleanup(dev); + } - DRIVER_POSTCLEANUP(); DRM(numdevs) = 0; } @@ -834,7 +751,8 @@ DRM_DEBUG( "open_count = %d\n", dev->open_count ); - DRIVER_PRERELEASE(); + if (dev->fn_tbl.prerelease) + dev->fn_tbl.prerelease(dev, filp); /* ======================================================== * Begin inline drm_release @@ -849,9 +767,10 @@ DRM_DEBUG( "File %p released, freeing lock for context %d\n", filp, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) ); -#if __HAVE_RELEASE - DRIVER_RELEASE(); -#endif + + if (dev->fn_tbl.release) + dev->fn_tbl.release(dev, filp); + DRM(lock_free)( dev, &dev->lock.hw_lock->lock, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock) ); @@ -860,8 +779,7 @@ processed via a callback to the X server. */ } -#if __HAVE_RELEASE - else if ( priv->lock_count && dev->lock.hw_lock ) { + else if ( dev->fn_tbl.release && priv->lock_count && dev->lock.hw_lock ) { /* The lock is required to reclaim buffers */ DECLARE_WAITQUEUE( entry, current ); @@ -890,14 +808,17 @@ current->state = TASK_RUNNING; remove_wait_queue( &dev->lock.lock_queue, &entry ); if( !retcode ) { - DRIVER_RELEASE(); + if (dev->fn_tbl.release) + dev->fn_tbl.release(dev, filp); DRM(lock_free)( dev, &dev->lock.hw_lock->lock, DRM_KERNEL_CONTEXT ); } } -#elif __HAVE_DMA - DRM(reclaim_buffers)( filp ); -#endif + + if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) + { + dev->fn_tbl.reclaim_buffers(filp); + } DRM(fasync)( -1, filp, 0 ); @@ -908,12 +829,11 @@ list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) { if ( pos->tag == priv && pos->handle != DRM_KERNEL_CONTEXT ) { -#ifdef DRIVER_CTX_DTOR - DRIVER_CTX_DTOR(pos->handle); -#endif -#if __HAVE_CTX_BITMAP + if (dev->fn_tbl.context_dtor) + dev->fn_tbl.context_dtor(dev, pos->handle); + DRM(ctxbitmap_free)( dev, pos->handle ); -#endif + list_del( &pos->head ); DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST ); } @@ -941,6 +861,9 @@ } up( &dev->struct_sem ); + if (dev->fn_tbl.free_filp_priv) + dev->fn_tbl.free_filp_priv(dev, priv); + DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES ); /* ======================================================== @@ -1039,9 +962,6 @@ DECLARE_WAITQUEUE( entry, current ); drm_lock_t lock; int ret = 0; -#if __HAVE_MULTIPLE_DMA_QUEUES - drm_queue_t *q; -#endif ++priv->lock_count; @@ -1058,83 +978,61 @@ lock.context, current->pid, dev->lock.hw_lock->lock, lock.flags ); -#if __HAVE_DMA_QUEUE - if ( lock.context < 0 ) - return -EINVAL; -#elif __HAVE_MULTIPLE_DMA_QUEUES - if ( lock.context < 0 || lock.context >= dev->queue_count ) - return -EINVAL; - q = dev->queuelist[lock.context]; -#endif - -#if __HAVE_DMA_FLUSH - ret = DRM(flush_block_and_flush)( dev, lock.context, lock.flags ); -#endif - if ( !ret ) { - add_wait_queue( &dev->lock.lock_queue, &entry ); - for (;;) { - current->state = TASK_INTERRUPTIBLE; - if ( !dev->lock.hw_lock ) { - /* Device has been unregistered */ - ret = -EINTR; - break; - } - if ( DRM(lock_take)( &dev->lock.hw_lock->lock, - lock.context ) ) { - dev->lock.filp = filp; - dev->lock.lock_time = jiffies; - atomic_inc( &dev->counts[_DRM_STAT_LOCKS] ); - break; /* Got lock */ - } - - /* Contention */ - schedule(); - if ( signal_pending( current ) ) { - ret = -ERESTARTSYS; - break; - } - } - current->state = TASK_RUNNING; - remove_wait_queue( &dev->lock.lock_queue, &entry ); - } - -#if __HAVE_DMA_FLUSH - DRM(flush_unblock)( dev, lock.context, lock.flags ); /* cleanup phase */ -#endif - - if ( !ret ) { - sigemptyset( &dev->sigmask ); - sigaddset( &dev->sigmask, SIGSTOP ); - sigaddset( &dev->sigmask, SIGTSTP ); - sigaddset( &dev->sigmask, SIGTTIN ); - sigaddset( &dev->sigmask, SIGTTOU ); - dev->sigdata.context = lock.context; - dev->sigdata.lock = dev->lock.hw_lock; - block_all_signals( DRM(notifier), - &dev->sigdata, &dev->sigmask ); - -#if __HAVE_DMA_READY - if ( lock.flags & _DRM_LOCK_READY ) { - DRIVER_DMA_READY(); + if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE)) + if ( lock.context < 0 ) + return -EINVAL; + + add_wait_queue( &dev->lock.lock_queue, &entry ); + for (;;) { + current->state = TASK_INTERRUPTIBLE; + if ( !dev->lock.hw_lock ) { + /* Device has been unregistered */ + ret = -EINTR; + break; } -#endif -#if __HAVE_DMA_QUIESCENT - if ( lock.flags & _DRM_LOCK_QUIESCENT ) { - DRIVER_DMA_QUIESCENT(); + if ( DRM(lock_take)( &dev->lock.hw_lock->lock, + lock.context ) ) { + dev->lock.filp = filp; + dev->lock.lock_time = jiffies; + atomic_inc( &dev->counts[_DRM_STAT_LOCKS] ); + break; /* Got lock */ } -#endif - /* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the - * drm modules in the DRI cvs tree, but it is required - * by the Sparc driver. - */ -#if __HAVE_KERNEL_CTX_SWITCH - if ( dev->last_context != lock.context ) { - DRM(context_switch)(dev, dev->last_context, - lock.context); + + /* Contention */ + schedule(); + if ( signal_pending( current ) ) { + ret = -ERESTARTSYS; + break; } -#endif - } + } + current->state = TASK_RUNNING; + remove_wait_queue( &dev->lock.lock_queue, &entry ); + sigemptyset( &dev->sigmask ); + sigaddset( &dev->sigmask, SIGSTOP ); + sigaddset( &dev->sigmask, SIGTSTP ); + sigaddset( &dev->sigmask, SIGTTIN ); + sigaddset( &dev->sigmask, SIGTTOU ); + dev->sigdata.context = lock.context; + dev->sigdata.lock = dev->lock.hw_lock; + block_all_signals( DRM(notifier), + &dev->sigdata, &dev->sigmask ); + + if (dev->fn_tbl.dma_ready && (lock.flags & _DRM_LOCK_READY)) + dev->fn_tbl.dma_ready(dev); + + if ( dev->fn_tbl.dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT )) + return dev->fn_tbl.dma_quiescent(dev); + + /* dev->fn_tbl.kernel_context_switch isn't used by any of the x86 + * drivers but is used by the Sparc driver. + */ + + if (dev->fn_tbl.kernel_context_switch && + dev->last_context != lock.context) { + dev->fn_tbl.kernel_context_switch(dev, dev->last_context, + lock.context); + } DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" ); return ret; @@ -1169,40 +1067,20 @@ atomic_inc( &dev->counts[_DRM_STAT_UNLOCKS] ); - /* __HAVE_KERNEL_CTX_SWITCH isn't used by any of the drm - * modules in the DRI cvs tree, but it is required by the - * Sparc driver. - */ -#if __HAVE_KERNEL_CTX_SWITCH - /* We no longer really hold it, but if we are the next - * agent to request it then we should just be able to - * take it immediately and not eat the ioctl. + /* kernel_context_switch isn't used by any of the x86 drm + * modules but is required by the Sparc driver. */ - dev->lock.filp = NULL; - { - __volatile__ unsigned int *plock = &dev->lock.hw_lock->lock; - unsigned int old, new, prev, ctx; - - ctx = lock.context; - do { - old = *plock; - new = ctx; - prev = cmpxchg(plock, old, new); - } while (prev != old); - } - wake_up_interruptible(&dev->lock.lock_queue); -#else - DRM(lock_transfer)( dev, &dev->lock.hw_lock->lock, - DRM_KERNEL_CONTEXT ); -#if __HAVE_DMA_SCHEDULE - DRM(dma_schedule)( dev, 1 ); -#endif - - if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, - DRM_KERNEL_CONTEXT ) ) { - DRM_ERROR( "\n" ); + if (dev->fn_tbl.kernel_context_switch_unlock) + dev->fn_tbl.kernel_context_switch_unlock(dev, &lock); + else { + DRM(lock_transfer)( dev, &dev->lock.hw_lock->lock, + DRM_KERNEL_CONTEXT ); + + if ( DRM(lock_free)( dev, &dev->lock.hw_lock->lock, + DRM_KERNEL_CONTEXT ) ) { + DRM_ERROR( "\n" ); + } } -#endif /* !__HAVE_KERNEL_CTX_SWITCH */ unblock_all_signals(); return 0; diff -Nru a/drivers/char/drm/drm_fops.h b/drivers/char/drm/drm_fops.h --- a/drivers/char/drm/drm_fops.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/drm_fops.h 2004-09-06 16:37:53 -07:00 @@ -53,6 +53,7 @@ { int minor = iminor(inode); drm_file_t *priv; + int ret; if (filp->f_flags & O_EXCL) return -EBUSY; /* No exclusive opens */ if (!DRM(cpu_valid)()) return -EINVAL; @@ -72,7 +73,11 @@ priv->authenticated = capable(CAP_SYS_ADMIN); priv->lock_count = 0; - DRIVER_OPEN_HELPER( priv, dev ); + if (dev->fn_tbl.open_helper) { + ret=dev->fn_tbl.open_helper(dev, priv); + if (ret < 0) + goto out_free; + } down(&dev->struct_sem); if (!dev->file_last) { @@ -104,6 +109,10 @@ #endif return 0; +out_free: + DRM(free)(priv, sizeof(*priv), DRM_MEM_FILES); + filp->private_data=NULL; + return ret; } /** No-op. */ @@ -130,19 +139,15 @@ return 0; } -#if !__HAVE_DRIVER_FOPS_POLL /** No-op. */ unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait) { return 0; } -#endif -#if !__HAVE_DRIVER_FOPS_READ /** No-op. */ ssize_t DRM(read)(struct file *filp, char __user *buf, size_t count, loff_t *off) { return 0; } -#endif diff -Nru a/drivers/char/drm/drm_ioctl.h b/drivers/char/drm/drm_ioctl.h --- a/drivers/char/drm/drm_ioctl.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/drm_ioctl.h 2004-09-06 16:37:51 -07:00 @@ -341,9 +341,9 @@ if (sv.drm_dd_major != DRIVER_MAJOR || sv.drm_dd_minor < 0 || sv.drm_dd_minor > DRIVER_MINOR) return EINVAL; -#ifdef DRIVER_SETVERSION - DRIVER_SETVERSION(dev, &sv); -#endif + + if (dev->fn_tbl.set_version) + dev->fn_tbl.set_version(dev, &sv); } return 0; } diff -Nru a/drivers/char/drm/drm_irq.h b/drivers/char/drm/drm_irq.h --- a/drivers/char/drm/drm_irq.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/drm_irq.h 2004-09-06 16:37:53 -07:00 @@ -37,16 +37,6 @@ #include /* For task queue support */ -#ifndef __HAVE_SHARED_IRQ -#define __HAVE_SHARED_IRQ 0 -#endif - -#if __HAVE_SHARED_IRQ -#define DRM_IRQ_TYPE SA_SHIRQ -#else -#define DRM_IRQ_TYPE 0 -#endif - /** * Get interrupt from bus id. * @@ -68,6 +58,9 @@ drm_irq_busid_t __user *argp = (void __user *)arg; drm_irq_busid_t p; + if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + return -EINVAL; + if (copy_from_user(&p, argp, sizeof(p))) return -EFAULT; @@ -86,8 +79,6 @@ return 0; } -#if __HAVE_IRQ - /** * Install IRQ handler. * @@ -101,7 +92,11 @@ int DRM(irq_install)( drm_device_t *dev ) { int ret; - + unsigned long sh_flags=0; + + if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + return -EINVAL; + if ( dev->irq == 0 ) return -EINVAL; @@ -122,32 +117,29 @@ DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq ); -#if __HAVE_DMA dev->dma->next_buffer = NULL; dev->dma->next_queue = NULL; dev->dma->this_buffer = NULL; -#endif - -#ifdef __HAVE_IRQ_BH - INIT_WORK(&dev->work, DRM(irq_immediate_bh), dev); -#endif - -#ifdef __HAVE_VBL_IRQ - init_waitqueue_head(&dev->vbl_queue); - - spin_lock_init( &dev->vbl_lock ); - - INIT_LIST_HEAD( &dev->vbl_sigs.head ); - dev->vbl_pending = 0; -#endif + if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { + init_waitqueue_head(&dev->vbl_queue); + + spin_lock_init( &dev->vbl_lock ); + + INIT_LIST_HEAD( &dev->vbl_sigs.head ); + + dev->vbl_pending = 0; + } /* Before installing handler */ - DRM(driver_irq_preinstall)(dev); + dev->fn_tbl.irq_preinstall(dev); /* Install handler */ - ret = request_irq( dev->irq, DRM(irq_handler), - DRM_IRQ_TYPE, dev->devname, dev ); + if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) + sh_flags = SA_SHIRQ; + + ret = request_irq( dev->irq, dev->fn_tbl.irq_handler, + sh_flags, dev->devname, dev ); if ( ret < 0 ) { down( &dev->struct_sem ); dev->irq_enabled = 0; @@ -156,7 +148,7 @@ } /* After installing handler */ - DRM(driver_irq_postinstall)(dev); + dev->fn_tbl.irq_postinstall(dev); return 0; } @@ -172,6 +164,9 @@ { int irq_enabled; + if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + return -EINVAL; + down( &dev->struct_sem ); irq_enabled = dev->irq_enabled; dev->irq_enabled = 0; @@ -182,7 +177,7 @@ DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq ); - DRM(driver_irq_uninstall)( dev ); + dev->fn_tbl.irq_uninstall(dev); free_irq( dev->irq, dev ); @@ -206,25 +201,29 @@ drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; drm_control_t ctl; + + /* if we haven't irq we fallback for compatibility reasons - this used to be a separate function in drm_dma.h */ if ( copy_from_user( &ctl, (drm_control_t __user *)arg, sizeof(ctl) ) ) return -EFAULT; switch ( ctl.func ) { case DRM_INST_HANDLER: + if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + return 0; if (dev->if_version < DRM_IF_VERSION(1, 2) && ctl.irq != dev->irq) return -EINVAL; return DRM(irq_install)( dev ); case DRM_UNINST_HANDLER: + if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + return 0; return DRM(irq_uninstall)( dev ); default: return -EINVAL; } } -#ifdef __HAVE_VBL_IRQ - /** * Wait for VBLANK. * @@ -254,6 +253,9 @@ int ret = 0; unsigned int flags; + if (!drm_core_check_feature(dev, DRIVER_IRQ_VBL)) + return -EINVAL; + if (!dev->irq) return -EINVAL; @@ -318,7 +320,8 @@ spin_unlock_irqrestore( &dev->vbl_lock, irqflags ); } else { - ret = DRM(vblank_wait)( dev, &vblwait.request.sequence ); + if (dev->fn_tbl.vblank_wait) + ret = dev->fn_tbl.vblank_wait( dev, &vblwait.request.sequence ); do_gettimeofday( &now ); vblwait.reply.tval_sec = now.tv_sec; @@ -366,6 +369,4 @@ spin_unlock_irqrestore( &dev->vbl_lock, flags ); } -#endif /* __HAVE_VBL_IRQ */ -#endif /* __HAVE_IRQ */ diff -Nru a/drivers/char/drm/drm_memory.h b/drivers/char/drm/drm_memory.h --- a/drivers/char/drm/drm_memory.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/drm_memory.h 2004-09-06 16:37:51 -07:00 @@ -44,7 +44,7 @@ */ #define DEBUG_MEMORY 0 -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP #include @@ -130,46 +130,56 @@ return pte_pfn(*ptep) << PAGE_SHIFT; } -#endif /* __REALLY_HAVE_AGP */ +#else /* __OS_HAS_AGP */ + +static inline drm_map_t *drm_lookup_map(unsigned long offset, unsigned long size, drm_device_t *dev) +{ + return NULL; +} + +static inline void *agp_remap(unsigned long offset, unsigned long size, drm_device_t *dev) +{ + return NULL; +} + +static inline unsigned long drm_follow_page (void *vaddr) +{ + return 0; +} + +#endif static inline void *drm_ioremap(unsigned long offset, unsigned long size, drm_device_t *dev) { -#if __REALLY_HAVE_AGP - if (dev->agp && dev->agp->cant_use_aperture) { + if (drm_core_has_AGP(dev) && dev->agp && dev->agp->cant_use_aperture) { drm_map_t *map = drm_lookup_map(offset, size, dev); if (map && map->type == _DRM_AGP) return agp_remap(offset, size, dev); } -#endif - return ioremap(offset, size); } static inline void *drm_ioremap_nocache(unsigned long offset, unsigned long size, drm_device_t *dev) { -#if __REALLY_HAVE_AGP - if (dev->agp && dev->agp->cant_use_aperture) { + if (drm_core_has_AGP(dev) && dev->agp && dev->agp->cant_use_aperture) { drm_map_t *map = drm_lookup_map(offset, size, dev); if (map && map->type == _DRM_AGP) return agp_remap(offset, size, dev); } -#endif - return ioremap_nocache(offset, size); } static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev) { -#if __REALLY_HAVE_AGP /* * This is a bit ugly. It would be much cleaner if the DRM API would use separate * routines for handling mappings in the AGP space. Hopefully this can be done in * a future revision of the interface... */ - if (dev->agp && dev->agp->cant_use_aperture + if (drm_core_has_AGP(dev) && dev->agp && dev->agp->cant_use_aperture && ((unsigned long) pt >= VMALLOC_START && (unsigned long) pt < VMALLOC_END)) { unsigned long offset; @@ -182,11 +192,11 @@ return; } } -#endif iounmap(pt); } + #if DEBUG_MEMORY #include "drm_memory_debug.h" #else @@ -331,7 +341,7 @@ drm_ioremapfree(pt, size, dev); } -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP /** Wrapper around agp_allocate_memory() */ DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type) { 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 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/drm_memory_debug.h 2004-09-06 16:37:51 -07:00 @@ -352,7 +352,7 @@ } } -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type) { diff -Nru a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h --- a/drivers/char/drm/drm_os_linux.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/drm_os_linux.h 2004-09-06 16:37:55 -07:00 @@ -17,10 +17,14 @@ #define DRM_UDELAY(d) udelay(d) /** Read a byte from a MMIO region */ #define DRM_READ8(map, offset) readb(((unsigned long)(map)->handle) + (offset)) +/** Read a word from a MMIO region */ +#define DRM_READ16(map, offset) readw(((unsigned long)(map)->handle) + (offset)) /** Read a dword from a MMIO region */ #define DRM_READ32(map, offset) readl(((unsigned long)(map)->handle) + (offset)) /** Write a byte into a MMIO region */ #define DRM_WRITE8(map, offset, val) writeb(val, ((unsigned long)(map)->handle) + (offset)) +/** Write a word into a MMIO region */ +#define DRM_WRITE16(map, offset, val) writew(val, ((unsigned long)(map)->handle) + (offset)) /** Write a dword into a MMIO region */ #define DRM_WRITE32(map, offset, val) writel(val, ((unsigned long)(map)->handle) + (offset)) /** Read memory barrier */ @@ -37,8 +41,34 @@ #define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs /** AGP types */ +#if __OS_HAS_AGP #define DRM_AGP_MEM struct agp_memory #define DRM_AGP_KERN struct agp_kern_info +#else +/* define some dummy types for non AGP supporting kernels */ +struct no_agp_kern { + unsigned long aper_base; + unsigned long aper_size; +}; +#define DRM_AGP_MEM int +#define DRM_AGP_KERN struct no_agp_kern +#endif + +#if !(__OS_HAS_MTRR) +static __inline__ int mtrr_add (unsigned long base, unsigned long size, + unsigned int type, char increment) +{ + return -ENODEV; +} + +static __inline__ int mtrr_del (int reg, unsigned long base, + unsigned long size) +{ + return -ENODEV; +} +#define MTRR_TYPE_WRCOMB 1 + +#endif /** Task queue handler arguments */ #define DRM_TASKQUEUE_ARGS void *arg diff -Nru a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h --- a/drivers/char/drm/drm_pciids.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/drm_pciids.h 2004-09-06 16:37:52 -07:00 @@ -201,3 +201,11 @@ #define ffb_PCI_IDS \ {0, 0, 0} +#define i915_PCI_IDS \ + {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0x8086, 0x2562, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ + {0, 0, 0} + diff -Nru a/drivers/char/drm/drm_scatter.h b/drivers/char/drm/drm_scatter.h --- a/drivers/char/drm/drm_scatter.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/drm_scatter.h 2004-09-06 16:37:53 -07:00 @@ -73,6 +73,9 @@ DRM_DEBUG( "%s\n", __FUNCTION__ ); + if (drm_core_check_feature(dev, DRIVER_SG)) + return -EINVAL; + if ( dev->sg ) return -EINVAL; @@ -205,6 +208,9 @@ drm_device_t *dev = priv->dev; drm_scatter_gather_t request; drm_sg_mem_t *entry; + + if (drm_core_check_feature(dev, DRIVER_SG)) + return -EINVAL; if ( copy_from_user( &request, (drm_scatter_gather_t __user *)arg, diff -Nru a/drivers/char/drm/drm_vm.h b/drivers/char/drm/drm_vm.h --- a/drivers/char/drm/drm_vm.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/drm_vm.h 2004-09-06 16:37:55 -07:00 @@ -46,10 +46,10 @@ * Find the right map and if it's AGP memory find the real physical page to * map, get the page, increment the use count and return it. */ +#if __OS_HAS_AGP static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma, unsigned long address) { -#if __REALLY_HAVE_AGP drm_file_t *priv = vma->vm_file->private_data; drm_device_t *dev = priv->dev; drm_map_t *map = NULL; @@ -59,6 +59,8 @@ /* * Find the right map */ + if (!drm_core_has_AGP(dev)) + goto vm_nopage_error; if(!dev->agp || !dev->agp->cant_use_aperture) goto vm_nopage_error; @@ -107,10 +109,15 @@ return page; } vm_nopage_error: -#endif /* __REALLY_HAVE_AGP */ - return NOPAGE_SIGBUS; /* Disallow mremap */ } +#else /* __OS_HAS_AGP */ +static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma, + unsigned long address) +{ + return NOPAGE_SIGBUS; +} +#endif /* __OS_HAS_AGP */ /** * \c nopage method for shared virtual memory. @@ -201,15 +208,13 @@ switch (map->type) { case _DRM_REGISTERS: case _DRM_FRAME_BUFFER: -#if __REALLY_HAVE_MTRR - if (map->mtrr >= 0) { + if (drm_core_has_MTRR(dev) && map->mtrr >= 0) { int retcode; retcode = mtrr_del(map->mtrr, map->offset, map->size); DRM_DEBUG("mtrr_del = %d\n", retcode); } -#endif DRM(ioremapfree)(map->handle, map->size, dev); break; case _DRM_SHM: @@ -488,18 +493,19 @@ return 0; } -#ifndef DRIVER_GET_MAP_OFS -#define DRIVER_GET_MAP_OFS() (map->offset) -#endif +unsigned long DRM(core_get_map_ofs)(drm_map_t *map) +{ + return map->offset; +} -#ifndef DRIVER_GET_REG_OFS +unsigned long DRM(core_get_reg_ofs)(struct drm_device *dev) +{ #ifdef __alpha__ -#define DRIVER_GET_REG_OFS() (dev->hose->dense_mem_base - \ - dev->hose->mem_space->start) + return dev->hose->dense_mem_base - dev->hose->mem_space->start; #else -#define DRIVER_GET_REG_OFS() 0 -#endif + return 0; #endif +} /** * mmap DMA memory. @@ -533,7 +539,7 @@ * --BenH. */ if (!VM_OFFSET(vma) -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP && (!dev->agp || dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE) #endif ) @@ -552,7 +558,7 @@ r_list = list_entry(list, drm_map_list_t, head); map = r_list->map; if (!map) continue; - off = DRIVER_GET_MAP_OFS(); + off = dev->fn_tbl.get_map_ofs(map); if (off == VM_OFFSET(vma)) break; } @@ -577,8 +583,7 @@ switch (map->type) { case _DRM_AGP: -#if __REALLY_HAVE_AGP - if (dev->agp->cant_use_aperture) { + if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) { /* * On some platforms we can't talk to bus dma address from the CPU, so for * memory of type DRM_AGP, we'll deal with sorting out the real physical @@ -590,7 +595,6 @@ vma->vm_ops = &DRM(vm_ops); break; } -#endif /* fall through to _DRM_FRAME_BUFFER... */ case _DRM_FRAME_BUFFER: case _DRM_REGISTERS: @@ -609,7 +613,7 @@ if (map->type != _DRM_AGP) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #endif - offset = DRIVER_GET_REG_OFS(); + offset = dev->fn_tbl.get_reg_ofs(dev); #ifdef __sparc__ if (io_remap_page_range(DRM_RPR_ARG(vma) vma->vm_start, VM_OFFSET(vma) + offset, diff -Nru a/drivers/char/drm/ffb.h b/drivers/char/drm/ffb.h --- a/drivers/char/drm/ffb.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/ffb.h 2004-09-06 16:37:53 -07:00 @@ -8,9 +8,5 @@ */ #define DRM(x) ffb_##x -/* General customization: - */ -#define __HAVE_KERNEL_CTX_SWITCH 1 -#define __HAVE_RELEASE 1 #endif diff -Nru a/drivers/char/drm/ffb_context.c b/drivers/char/drm/ffb_context.c --- a/drivers/char/drm/ffb_context.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/ffb_context.c 2004-09-06 16:37:53 -07:00 @@ -354,7 +354,7 @@ } while (--limit); } -int DRM(context_switch)(drm_device_t *dev, int old, int new) +int ffb_driver_context_switch(drm_device_t *dev, int old, int new) { ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private; @@ -380,7 +380,7 @@ return 0; } -int DRM(resctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_resctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_ctx_res_t res; @@ -407,7 +407,7 @@ } -int DRM(addctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_addctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -428,7 +428,7 @@ return 0; } -int DRM(modctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_modctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -457,7 +457,7 @@ return 0; } -int DRM(getctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_getctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -489,7 +489,7 @@ return 0; } -int DRM(switchctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_switchctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_file_t *priv = filp->private_data; @@ -499,10 +499,10 @@ if (copy_from_user(&ctx, (drm_ctx_t __user *)arg, sizeof(ctx))) return -EFAULT; DRM_DEBUG("%d\n", ctx.handle); - return DRM(context_switch)(dev, dev->last_context, ctx.handle); + return ffb_driver_context_switch(dev, dev->last_context, ctx.handle); } -int DRM(newctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_newctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_ctx_t ctx; @@ -514,7 +514,7 @@ return 0; } -int DRM(rmctx)(struct inode *inode, struct file *filp, unsigned int cmd, +int ffb_driver_rmctx(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { drm_ctx_t ctx; @@ -536,4 +536,16 @@ fpriv->hw_state[idx] = NULL; } return 0; +} + +void ffb_set_context_ioctls(void) +{ + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)].func = ffb_driver_addctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)].func = ffb_driver_rmctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)].func = ffb_driver_modctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_GET_CTX)].func = ffb_driver_getctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_SWITCH_CTX)].func = ffb_driver_switchctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_NEW_CTX)].func = ffb_driver_newctx; + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_RES_CTX)].func = ffb_driver_resctx; + } diff -Nru a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c --- a/drivers/char/drm/ffb_drv.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/ffb_drv.c 2004-09-06 16:37:55 -07:00 @@ -26,58 +26,6 @@ #define DRIVER_MINOR 0 #define DRIVER_PATCHLEVEL 1 -#define DRIVER_FOPS \ -static struct file_operations DRM(fops) = { \ - .owner = THIS_MODULE, \ - .open = DRM(open), \ - .flush = DRM(flush), \ - .release = DRM(release), \ - .ioctl = DRM(ioctl), \ - .mmap = DRM(mmap), \ - .read = DRM(read), \ - .fasync = DRM(fasync), \ - .poll = DRM(poll), \ - .get_unmapped_area = ffb_get_unmapped_area, \ -} - -#define DRIVER_COUNT_CARDS() ffb_count_card_instances() -/* Allocate private structure and fill it */ -#define DRIVER_PRESETUP() do { \ - int _ret; \ - _ret = ffb_presetup(dev); \ - if (_ret != 0) return _ret; \ -} while(0) - -/* Free private structure */ -#define DRIVER_PRETAKEDOWN() do { \ - if (dev->dev_private) kfree(dev->dev_private); \ -} while(0) - -#define DRIVER_POSTCLEANUP() do { \ - if (ffb_position != NULL) kfree(ffb_position); \ -} while(0) - -/* We have to free up the rogue hw context state holding error or - * else we will leak it. - */ -#define DRIVER_RELEASE() do { \ - ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private; \ - int context = _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock); \ - int idx; \ - \ - idx = context - 1; \ - if (fpriv && \ - context != DRM_KERNEL_CONTEXT && \ - fpriv->hw_state[idx] != NULL) { \ - kfree(fpriv->hw_state[idx]); \ - fpriv->hw_state[idx] = NULL; \ - } \ -} while(0) - -/* For mmap customization */ -#define DRIVER_GET_MAP_OFS() (map->offset & 0xffffffff) -#define DRIVER_GET_REG_OFS() ffb_get_reg_offset(dev) - typedef struct _ffb_position_t { int node; int root; @@ -192,63 +140,6 @@ return 0; } -static int __init ffb_count_siblings(int root) -{ - int node, child, count = 0; - - child = prom_getchild(root); - for (node = prom_searchsiblings(child, "SUNW,ffb"); node; - node = prom_searchsiblings(prom_getsibling(node), "SUNW,ffb")) - count++; - - return count; -} - -static int __init ffb_scan_siblings(int root, int instance) -{ - int node, child; - - child = prom_getchild(root); - for (node = prom_searchsiblings(child, "SUNW,ffb"); node; - node = prom_searchsiblings(prom_getsibling(node), "SUNW,ffb")) { - ffb_position[instance].node = node; - ffb_position[instance].root = root; - instance++; - } - - return instance; -} - -static int ffb_presetup(drm_device_t *); - -static int __init ffb_count_card_instances(void) -{ - int root, total, instance; - - total = ffb_count_siblings(prom_root_node); - root = prom_getchild(prom_root_node); - for (root = prom_searchsiblings(root, "upa"); root; - root = prom_searchsiblings(prom_getsibling(root), "upa")) - total += ffb_count_siblings(root); - - ffb_position = kmalloc(sizeof(ffb_position_t) * total, GFP_KERNEL); - - /* Actual failure will be caught during ffb_presetup b/c we can't catch - * it easily here. - */ - if (!ffb_position) - return -ENOMEM; - - instance = ffb_scan_siblings(prom_root_node, 0); - - root = prom_getchild(prom_root_node); - for (root = prom_searchsiblings(root, "upa"); root; - root = prom_searchsiblings(prom_getsibling(root), "upa")) - instance = ffb_scan_siblings(root, instance); - - return total; -} - static drm_map_t *ffb_find_map(struct file *filp, unsigned long off) { drm_file_t *priv = filp->private_data; @@ -275,11 +166,11 @@ return NULL; } -static unsigned long ffb_get_unmapped_area(struct file *filp, - unsigned long hint, - unsigned long len, - unsigned long pgoff, - unsigned long flags) +unsigned long ffb_get_unmapped_area(struct file *filp, + unsigned long hint, + unsigned long len, + unsigned long pgoff, + unsigned long flags) { drm_map_t *map = ffb_find_map(filp, pgoff << PAGE_SHIFT); unsigned long addr = -ENOMEM; @@ -319,18 +210,9 @@ return addr; } -static unsigned long ffb_get_reg_offset(drm_device_t *dev) -{ - ffb_dev_priv_t *ffb_priv = (ffb_dev_priv_t *)dev->dev_private; - - if (ffb_priv) - return ffb_priv->card_phys_base; - - return 0; -} - #include "drm_auth.h" #include "drm_bufs.h" +#include "drm_context.h" #include "drm_dma.h" #include "drm_drawable.h" #include "drm_drv.h" @@ -375,8 +257,83 @@ #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" +#include "drm_irq.h" #include "drm_lock.h" #include "drm_memory.h" #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" + + +static void ffb_driver_release(drm_device_t *dev, struct file *filp) +{ + ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private; + int context = _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock); + int idx; + + idx = context - 1; + if (fpriv && + context != DRM_KERNEL_CONTEXT && + fpriv->hw_state[idx] != NULL) { + kfree(fpriv->hw_state[idx]); + fpriv->hw_state[idx] = NULL; + } +} + +static void ffb_driver_pretakedown(drm_device_t *dev) +{ + if (dev->dev_private) kfree(dev->dev_private); +} + +static int ffb_driver_postcleanup(drm_device_t *dev) +{ + if (ffb_position != NULL) kfree(ffb_position); + return 0; +} + +static void ffb_driver_kernel_context_switch_unlock(struct drm_device *dev, drm_lock_t *lock) +{ + dev->lock.filp = 0; + { + __volatile__ unsigned int *plock = &dev->lock.hw_lock->lock; + unsigned int old, new, prev, ctx; + + ctx = lock->context; + do { + old = *plock; + new = ctx; + prev = cmpxchg(plock, old, new); + } while (prev != old); + } + wake_up_interruptible(&dev->lock.lock_queue); +} + +static unsigned long ffb_driver_get_map_ofs(drm_map_t *map) +{ + return (map->offset & 0xffffffff); +} + +static unsigned long ffb_driver_get_reg_ofs(drm_device_t *dev) +{ + ffb_dev_priv_t *ffb_priv = (ffb_dev_priv_t *)dev->dev_private; + + if (ffb_priv) + return ffb_priv->card_phys_base; + + return 0; +} + +void ffb_driver_register_fns(drm_device_t *dev) +{ + ffb_set_context_ioctls(); + DRM(fops).get_unmapped_area = ffb_get_unmapped_area; + dev->fn_tbl.release = ffb_driver_release; + dev->fn_tbl.presetup = ffb_presetup; + dev->fn_tbl.pretakedown = ffb_driver_pretakedown; + dev->fn_tbl.postcleanup = ffb_driver_postcleanup; + dev->fn_tbl.kernel_context_switch = ffb_context_switch; + dev->fn_tbl.kernel_context_switch_unlock = ffb_driver_kernel_context_switch_unlock; + dev->fn_tbl.get_map_ofs = ffb_driver_get_map_ofs; + dev->fn_tbl.get_reg_ofs = ffb_driver_get_reg_ofs; +} diff -Nru a/drivers/char/drm/ffb_drv.h b/drivers/char/drm/ffb_drv.h --- a/drivers/char/drm/ffb_drv.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/ffb_drv.h 2004-09-06 16:37:51 -07:00 @@ -274,3 +274,13 @@ /* Context table. */ struct ffb_hw_context *hw_state[FFB_MAX_CTXS]; } ffb_dev_priv_t; + +extern struct file_operations DRM(fops); +extern unsigned long ffb_get_unmapped_area(struct file *filp, + unsigned long hint, + unsigned long len, + unsigned long pgoff, + unsigned long flags); +extern void ffb_set_context_ioctls(void); +extern drm_ioctl_desc_t DRM(ioctls)[]; + diff -Nru a/drivers/char/drm/gamma.h b/drivers/char/drm/gamma.h --- a/drivers/char/drm/gamma.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/gamma.h 2004-09-06 16:37:50 -07:00 @@ -36,8 +36,6 @@ /* General customization: */ -#define __HAVE_MTRR 1 - #define DRIVER_AUTHOR "VA Linux Systems Inc." #define DRIVER_NAME "gamma" @@ -71,44 +69,9 @@ /* DMA customization: */ -#define __HAVE_DMA 1 -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 0 -#define __HAVE_OLD_DMA 1 -#define __HAVE_PCI_DMA 1 - -#define __HAVE_DRIVER_FOPS_READ 1 -#define __HAVE_DRIVER_FOPS_POLL 1 - #define __HAVE_MULTIPLE_DMA_QUEUES 1 #define __HAVE_DMA_WAITQUEUE 1 -#define __HAVE_DMA_WAITLIST 1 -#define __HAVE_DMA_FREELIST 1 - -#define __HAVE_DMA_FLUSH 1 -#define __HAVE_DMA_SCHEDULE 1 - -#define __HAVE_DMA_READY 1 -#define DRIVER_DMA_READY() do { \ - gamma_dma_ready(dev); \ -} while (0) - -#define __HAVE_DMA_QUIESCENT 1 -#define DRIVER_DMA_QUIESCENT() do { \ - drm_gamma_private_t *dev_priv = \ - (drm_gamma_private_t *)dev->dev_private; \ - if (dev_priv->num_rast == 2) \ - gamma_dma_quiescent_dual(dev); \ - else gamma_dma_quiescent_single(dev); \ - return 0; \ -} while (0) - -#define __HAVE_IRQ 1 -#define __HAVE_IRQ_BH 1 - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_gamma_private_t *)((dev)->dev_private))->buffers - +/* removed from DRM HAVE_DMA_FREELIST & HAVE_DMA_SCHEDULE */ #endif /* __GAMMA_H__ */ diff -Nru a/drivers/char/drm/gamma_context.h b/drivers/char/drm/gamma_context.h --- a/drivers/char/drm/gamma_context.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/gamma_context.h 2004-09-06 16:37:52 -07:00 @@ -42,7 +42,7 @@ the circular buffer), is based on Alessandro Rubini's LINUX DEVICE DRIVERS (Cambridge: O'Reilly, 1998), pages 111-113. */ -ssize_t DRM(read)(struct file *filp, char __user *buf, size_t count, loff_t *off) +ssize_t gamma_fops_read(struct file *filp, char __user *buf, size_t count, loff_t *off) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; @@ -128,7 +128,7 @@ return 0; } -unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait) +unsigned int gamma_fops_poll(struct file *filp, struct poll_table_struct *wait) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; diff -Nru a/drivers/char/drm/gamma_dma.c b/drivers/char/drm/gamma_dma.c --- a/drivers/char/drm/gamma_dma.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/gamma_dma.c 2004-09-06 16:37:55 -07:00 @@ -116,7 +116,7 @@ return (!GAMMA_READ(GAMMA_DMACOUNT)); } -irqreturn_t gamma_irq_handler( DRM_IRQ_ARGS ) +irqreturn_t gamma_driver_irq_handler( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *)arg; drm_device_dma_t *dma = dev->dma; @@ -639,12 +639,12 @@ break; } } - - DRM_FIND_MAP( dev_priv->mmio0, init->mmio0 ); - DRM_FIND_MAP( dev_priv->mmio1, init->mmio1 ); - DRM_FIND_MAP( dev_priv->mmio2, init->mmio2 ); - DRM_FIND_MAP( dev_priv->mmio3, init->mmio3 ); - + + dev_priv->mmio0 = drm_core_findmap(dev, init->mmio0); + dev_priv->mmio1 = drm_core_findmap(dev, init->mmio1); + dev_priv->mmio2 = drm_core_findmap(dev, init->mmio2); + dev_priv->mmio3 = drm_core_findmap(dev, init->mmio3); + dev_priv->sarea_priv = (drm_gamma_sarea_t *) ((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); @@ -661,9 +661,8 @@ buf = dma->buflist[GLINT_DRI_BUF_COUNT]; } else { - DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset ); - - DRM_IOREMAP( dev_priv->buffers, dev ); + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + drm_core_ioremap( dev->agp_buffer_map, dev); buf = dma->buflist[GLINT_DRI_BUF_COUNT]; pgt = buf->address; @@ -690,19 +689,18 @@ { DRM_DEBUG( "%s\n", __FUNCTION__ ); -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ - if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif + if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) + if ( dev->irq_enabled ) + DRM(irq_uninstall)(dev); if ( dev->dev_private ) { - drm_gamma_private_t *dev_priv = dev->dev_private; - if ( dev_priv->buffers != NULL ) - DRM_IOREMAPFREE( dev_priv->buffers, dev ); + if ( dev->agp_buffer_map != NULL ) + drm_core_ioremapfree( dev->agp_buffer_map, dev ); DRM(free)( dev->dev_private, sizeof(drm_gamma_private_t), DRM_MEM_DRIVER ); @@ -868,7 +866,7 @@ return 0; } -void DRM(driver_irq_preinstall)( drm_device_t *dev ) { +void gamma_driver_irq_preinstall( drm_device_t *dev ) { drm_gamma_private_t *dev_priv = (drm_gamma_private_t *)dev->dev_private; @@ -879,7 +877,7 @@ GAMMA_WRITE( GAMMA_GDMACONTROL, 0x00000000 ); } -void DRM(driver_irq_postinstall)( drm_device_t *dev ) { +void gamma_driver_irq_postinstall( drm_device_t *dev ) { drm_gamma_private_t *dev_priv = (drm_gamma_private_t *)dev->dev_private; @@ -891,7 +889,7 @@ GAMMA_WRITE( GAMMA_GDELAYTIMER, 0x00039090 ); } -void DRM(driver_irq_uninstall)( drm_device_t *dev ) { +void gamma_driver_irq_uninstall( drm_device_t *dev ) { drm_gamma_private_t *dev_priv = (drm_gamma_private_t *)dev->dev_private; if (!dev_priv) @@ -903,4 +901,46 @@ GAMMA_WRITE( GAMMA_GDELAYTIMER, 0x00000000 ); GAMMA_WRITE( GAMMA_COMMANDINTENABLE, 0x00000000 ); GAMMA_WRITE( GAMMA_GINTENABLE, 0x00000000 ); +} + +extern drm_ioctl_desc_t DRM(ioctls)[]; + +static int gamma_driver_preinit(drm_device_t *dev) +{ + /* reset the finish ioctl */ + DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_FINISH)].func = DRM(finish); + return 0; +} + +static void gamma_driver_pretakedown(drm_device_t *dev) +{ + gamma_do_cleanup_dma(dev); +} + +static void gamma_driver_dma_ready(drm_device_t *dev) +{ + gamma_dma_ready(dev); +} + +static int gamma_driver_dma_quiescent(drm_device_t *dev) +{ + drm_gamma_private_t *dev_priv = ( + drm_gamma_private_t *)dev->dev_private; + if (dev_priv->num_rast == 2) + gamma_dma_quiescent_dual(dev); + else gamma_dma_quiescent_single(dev); + return 0; +} + +void gamma_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ; + DRM(fops).read = gamma_fops_read; + DRM(fops).poll = gamma_fops_poll; + dev->fn_tbl.preinit = gamma_driver_preinit; + dev->fn_tbl.pretakedown = gamma_driver_pretakedown; + dev->fn_tbl.dma_ready = gamma_driver_dma_ready; + dev->fn_tbl.dma_quiescent = gamma_driver_dma_quiescent; + dev->fn_tbl.dma_flush_block_and_flush = gamma_flush_block_and_flush; + dev->fn_tbl.dma_flush_unblock = gamma_flush_unblock; } diff -Nru a/drivers/char/drm/gamma_drv.c b/drivers/char/drm/gamma_drv.c --- a/drivers/char/drm/gamma_drv.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/gamma_drv.c 2004-09-06 16:37:54 -07:00 @@ -56,3 +56,4 @@ #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" diff -Nru a/drivers/char/drm/gamma_drv.h b/drivers/char/drm/gamma_drv.h --- a/drivers/char/drm/gamma_drv.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/gamma_drv.h 2004-09-06 16:37:52 -07:00 @@ -35,7 +35,6 @@ typedef struct drm_gamma_private { drm_gamma_sarea_t *sarea_priv; drm_map_t *sarea; - drm_map_t *buffers; drm_map_t *mmio0; drm_map_t *mmio1; drm_map_t *mmio2; @@ -91,6 +90,10 @@ drm_buf_t *buf); extern drm_buf_t *DRM(freelist_get)(drm_freelist_t *bl, int block); +/* externs for gamma changes to the ops */ +extern struct file_operations DRM(fops); +extern unsigned int gamma_fops_poll(struct file *filp, struct poll_table_struct *wait); +extern ssize_t gamma_fops_read(struct file *filp, char __user *buf, size_t count, loff_t *off); #define GLINT_DRI_BUF_COUNT 256 diff -Nru a/drivers/char/drm/i810.h b/drivers/char/drm/i810.h --- a/drivers/char/drm/i810.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/i810.h 2004-09-06 16:37:51 -07:00 @@ -36,10 +36,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 1 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 #define DRIVER_AUTHOR "VA Linux Systems Inc." @@ -83,42 +79,5 @@ #define __HAVE_COUNTER7 _DRM_STAT_PRIMARY #define __HAVE_COUNTER8 _DRM_STAT_SECONDARY #define __HAVE_COUNTER9 _DRM_STAT_DMA - -/* Driver customization: - */ -#define __HAVE_RELEASE 1 -#define DRIVER_RELEASE() do { \ - i810_reclaim_buffers( filp ); \ -} while (0) - -#define DRIVER_PRETAKEDOWN() do { \ - i810_dma_cleanup( dev ); \ -} while (0) - -/* DMA customization: - */ -#define __HAVE_DMA 1 -#define __HAVE_DMA_QUEUE 1 -#define __HAVE_DMA_WAITLIST 0 -#define __HAVE_DMA_RECLAIM 1 - -#define __HAVE_DMA_QUIESCENT 1 -#define DRIVER_DMA_QUIESCENT() do { \ - i810_dma_quiescent( dev ); \ -} while (0) - -/* Don't need an irq any more. The template code will make sure that - * a noop stub is generated for compatibility. - */ -/* XXX: Add vblank support? */ -#define __HAVE_IRQ 0 - -/* Buffer customization: - */ - -#define DRIVER_BUF_PRIV_T drm_i810_buf_priv_t - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_i810_private_t *)((dev)->dev_private))->buffer_map #endif diff -Nru a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c --- a/drivers/char/drm/i810_dma.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/i810_dma.c 2004-09-06 16:37:51 -07:00 @@ -232,13 +232,12 @@ { drm_device_dma_t *dma = dev->dma; -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ - if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif + if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ) && dev->irq_enabled) + DRM(irq_uninstall)(dev); if (dev->dev_private) { int i; @@ -364,15 +363,15 @@ DRM_ERROR("can not find sarea!\n"); return -EINVAL; } - DRM_FIND_MAP( dev_priv->mmio_map, init->mmio_offset ); + dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset); if (!dev_priv->mmio_map) { dev->dev_private = (void *)dev_priv; i810_dma_cleanup(dev); DRM_ERROR("can not find mmio map!\n"); return -EINVAL; } - DRM_FIND_MAP( dev_priv->buffer_map, init->buffers_offset ); - if (!dev_priv->buffer_map) { + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + if (!dev->agp_buffer_map) { dev->dev_private = (void *)dev_priv; i810_dma_cleanup(dev); DRM_ERROR("can not find dma buffer map!\n"); @@ -844,13 +843,10 @@ if (buf_priv->currently_mapped == I810_BUF_MAPPED) { unsigned int prim = (sarea_priv->vertex_prim & PR_MASK); - put_user((GFX_OP_PRIMITIVE | prim | - ((used/4)-2)), - (u32 __user *)buf_priv->virtual); + *(u32 *)buf_priv->kernel_virtual = ((GFX_OP_PRIMITIVE | prim | ((used/4)-2))); if (used & 4) { - put_user(0, - (u32 __user *)((u32)buf_priv->virtual + used)); + *(u32 *)((u32)buf_priv->kernel_virtual + used) = 0; used += 4; } @@ -1391,3 +1387,30 @@ i810_dma_dispatch_flip( dev ); return 0; } + +static void i810_driver_pretakedown(drm_device_t *dev) +{ + i810_dma_cleanup( dev ); +} + +static void i810_driver_release(drm_device_t *dev, struct file *filp) +{ + i810_reclaim_buffers(filp); +} + +static int i810_driver_dma_quiescent(drm_device_t *dev) +{ + i810_dma_quiescent( dev ); + return 0; +} + +void i810_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE; + dev->dev_priv_size = sizeof(drm_i810_buf_priv_t); + dev->fn_tbl.pretakedown = i810_driver_pretakedown; + dev->fn_tbl.release = i810_driver_release; + dev->fn_tbl.dma_quiescent = i810_driver_dma_quiescent; + dev->fn_tbl.reclaim_buffers = i810_reclaim_buffers; +} + diff -Nru a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c --- a/drivers/char/drm/i810_drv.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/i810_drv.c 2004-09-06 16:37:55 -07:00 @@ -48,8 +48,10 @@ #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" +#include "drm_irq.h" #include "drm_lock.h" #include "drm_memory.h" #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" diff -Nru a/drivers/char/drm/i810_drv.h b/drivers/char/drm/i810_drv.h --- a/drivers/char/drm/i810_drv.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/i810_drv.h 2004-09-06 16:37:55 -07:00 @@ -53,7 +53,6 @@ typedef struct drm_i810_private { drm_map_t *sarea_map; - drm_map_t *buffer_map; drm_map_t *mmio_map; drm_i810_sarea_t *sarea_priv; diff -Nru a/drivers/char/drm/i830.h b/drivers/char/drm/i830.h --- a/drivers/char/drm/i830.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/i830.h 2004-09-06 16:37:51 -07:00 @@ -36,10 +36,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 1 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 #define DRIVER_AUTHOR "VA Linux Systems Inc." @@ -83,51 +79,11 @@ #define __HAVE_COUNTER8 _DRM_STAT_SECONDARY #define __HAVE_COUNTER9 _DRM_STAT_DMA -/* Driver customization: - */ -#define __HAVE_RELEASE 1 -#define DRIVER_RELEASE() do { \ - i830_reclaim_buffers( filp ); \ -} while (0) - -#define DRIVER_PRETAKEDOWN() do { \ - i830_dma_cleanup( dev ); \ -} while (0) - -/* DMA customization: - */ -#define __HAVE_DMA 1 -#define __HAVE_DMA_QUEUE 1 -#define __HAVE_DMA_WAITLIST 0 -#define __HAVE_DMA_RECLAIM 1 - -#define __HAVE_DMA_QUIESCENT 1 -#define DRIVER_DMA_QUIESCENT() do { \ - i830_dma_quiescent( dev ); \ -} while (0) - - /* Driver will work either way: IRQ's save cpu time when waiting for * the card, but are subject to subtle interactions between bios, * hardware and the driver. */ /* XXX: Add vblank support? */ #define USE_IRQS 0 - -#if USE_IRQS -#define __HAVE_IRQ 1 -#define __HAVE_SHARED_IRQ 1 -#else -#define __HAVE_IRQ 0 -#endif - - -/* Buffer customization: - */ - -#define DRIVER_BUF_PRIV_T drm_i830_buf_priv_t - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_i830_private_t *)((dev)->dev_private))->buffer_map #endif diff -Nru a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c --- a/drivers/char/drm/i830_dma.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/i830_dma.c 2004-09-06 16:37:50 -07:00 @@ -233,13 +233,11 @@ { drm_device_dma_t *dma = dev->dma; -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif if (dev->dev_private) { int i; @@ -371,15 +369,15 @@ DRM_ERROR("can not find sarea!\n"); return -EINVAL; } - DRM_FIND_MAP( dev_priv->mmio_map, init->mmio_offset ); + dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio_map) { dev->dev_private = (void *)dev_priv; i830_dma_cleanup(dev); DRM_ERROR("can not find mmio map!\n"); return -EINVAL; } - DRM_FIND_MAP( dev_priv->buffer_map, init->buffers_offset ); - if(!dev_priv->buffer_map) { + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + if(!dev->agp_buffer_map) { dev->dev_private = (void *)dev_priv; i830_dma_cleanup(dev); DRM_ERROR("can not find dma buffer map!\n"); @@ -1166,19 +1164,19 @@ DRM_DEBUG( "start + used - 4 : %ld\n", start + used - 4); if (buf_priv->currently_mapped == I830_BUF_MAPPED) { - u32 __user *vp = buf_priv->virtual; + u32 *vp = buf_priv->kernel_virtual; - put_user( (GFX_OP_PRIMITIVE | - sarea_priv->vertex_prim | - ((used/4)-2)), &vp[0]); + vp[0] = (GFX_OP_PRIMITIVE | + sarea_priv->vertex_prim | + ((used/4)-2)); if (dev_priv->use_mi_batchbuffer_start) { - put_user(MI_BATCH_BUFFER_END, &vp[used/4]); + vp[used/4] = MI_BATCH_BUFFER_END; used += 4; } if (used & 4) { - put_user(0, &vp[used/4]); + vp[used/4] = 0; used += 4; } @@ -1582,3 +1580,40 @@ return 0; } + + +static void i830_driver_pretakedown(drm_device_t *dev) +{ + i830_dma_cleanup( dev ); +} + +static void i830_driver_release(drm_device_t *dev, struct file *filp) +{ + i830_reclaim_buffers(filp); +} + +static int i830_driver_dma_quiescent(drm_device_t *dev) +{ + i830_dma_quiescent( dev ); + return 0; +} + +void i830_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_DMA_QUEUE; +#if USE_IRQS + dev->driver_features |= DRIVER_HAVE_IRQ | DRIVER_SHARED_IRQ; +#endif + dev->dev_priv_size = sizeof(drm_i830_buf_priv_t); + dev->fn_tbl.pretakedown = i830_driver_pretakedown; + dev->fn_tbl.release = i830_driver_release; + dev->fn_tbl.dma_quiescent = i830_driver_dma_quiescent; + dev->fn_tbl.reclaim_buffers = i830_reclaim_buffers; +#if USE_IRQS + dev->fn_tbl.irq_preinstall = i830_driver_irq_preinstall; + dev->fn_tbl.irq_postinstall = i830_driver_irq_postinstall; + dev->fn_tbl.irq_uninstall = i830_driver_irq_uninstall; + dev->fn_tbl.irq_handler = i830_driver_irq_handler; +#endif +} + diff -Nru a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c --- a/drivers/char/drm/i830_drv.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/i830_drv.c 2004-09-06 16:37:51 -07:00 @@ -56,3 +56,4 @@ #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" diff -Nru a/drivers/char/drm/i830_drv.h b/drivers/char/drm/i830_drv.h --- a/drivers/char/drm/i830_drv.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/i830_drv.h 2004-09-06 16:37:53 -07:00 @@ -53,7 +53,6 @@ typedef struct drm_i830_private { drm_map_t *sarea_map; - drm_map_t *buffer_map; drm_map_t *mmio_map; drm_i830_sarea_t *sarea_priv; @@ -137,6 +136,10 @@ extern int i830_wait_irq(drm_device_t *dev, int irq_nr); extern int i830_emit_irq(drm_device_t *dev); +extern irqreturn_t i830_driver_irq_handler( DRM_IRQ_ARGS ); +extern void i830_driver_irq_preinstall( drm_device_t *dev ); +extern void i830_driver_irq_postinstall( drm_device_t *dev ); +extern void i830_driver_irq_uninstall( drm_device_t *dev ); #define I830_BASE(reg) ((unsigned long) \ dev_priv->mmio_map->handle) diff -Nru a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c --- a/drivers/char/drm/i830_irq.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/i830_irq.c 2004-09-06 16:37:54 -07:00 @@ -35,7 +35,7 @@ #include -irqreturn_t DRM(irq_handler)( DRM_IRQ_ARGS ) +irqreturn_t i830_driver_irq_handler( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *)arg; drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private; @@ -178,7 +178,7 @@ /* drm_dma.h hooks */ -void DRM(driver_irq_preinstall)( drm_device_t *dev ) { +void i830_driver_irq_preinstall( drm_device_t *dev ) { drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private; @@ -190,14 +190,14 @@ init_waitqueue_head(&dev_priv->irq_queue); } -void DRM(driver_irq_postinstall)( drm_device_t *dev ) { +void i830_driver_irq_postinstall( drm_device_t *dev ) { drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private; I830_WRITE16( I830REG_INT_ENABLE_R, 0x2 ); } -void DRM(driver_irq_uninstall)( drm_device_t *dev ) { +void i830_driver_irq_uninstall( drm_device_t *dev ) { drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private; if (!dev_priv) diff -Nru a/drivers/char/drm/i915.h b/drivers/char/drm/i915.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,59 @@ +/* i915.h -- Intel I915 DRM template customization -*- linux-c -*- + */ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#ifndef __I915_H__ +#define __I915_H__ + +/* This remains constant for all DRM template files. + */ +#define DRM(x) i915_##x + +/* General customization: + */ + +#define DRIVER_AUTHOR "Tungsten Graphics, Inc." + +#define DRIVER_NAME "i915" +#define DRIVER_DESC "Intel Graphics" +#define DRIVER_DATE "20040405" + +/* Interface history: + * + * 1.1: Original. + */ +#define DRIVER_MAJOR 1 +#define DRIVER_MINOR 1 +#define DRIVER_PATCHLEVEL 0 + +#define DRIVER_IOCTLS \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_INIT)] = { i915_dma_init, 1, 1 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_FLUSH)] = { i915_flush_ioctl, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_FLIP)] = { i915_flip_bufs, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_BATCHBUFFER)] = { i915_batchbuffer, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_IRQ_EMIT)] = { i915_irq_emit, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_IRQ_WAIT)] = { i915_irq_wait, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_GETPARAM)] = { i915_getparam, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_SETPARAM)] = { i915_setparam, 1, 1 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_ALLOC)] = { i915_mem_alloc, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_FREE)] = { i915_mem_free, 1, 0 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_INIT_HEAP)] = { i915_mem_init_heap, 1, 1 }, \ + [DRM_IOCTL_NR(DRM_IOCTL_I915_CMDBUFFER)] = { i915_cmdbuffer, 1, 0 } + +#define __HAVE_COUNTERS 4 +#define __HAVE_COUNTER6 _DRM_STAT_IRQ +#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY +#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY +#define __HAVE_COUNTER9 _DRM_STAT_DMA + +/* We use our own dma mechanisms, not the drm template code. However, + * the shared IRQ code is useful to us: + */ +#define __HAVE_PM 1 + +#endif diff -Nru a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_dma.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,742 @@ +/* i915_dma.c -- DMA support for the I915 -*- linux-c -*- + */ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#include "i915.h" +#include "drmP.h" +#include "drm.h" +#include "i915_drm.h" +#include "i915_drv.h" + +static inline void i915_print_status_page(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + u32 *temp = dev_priv->hw_status_page; + + if (!temp) { + DRM_DEBUG("no status page\n"); + return; + } + + DRM_DEBUG("hw_status: Interrupt Status : %x\n", temp[0]); + DRM_DEBUG("hw_status: LpRing Head ptr : %x\n", temp[1]); + DRM_DEBUG("hw_status: IRing Head ptr : %x\n", temp[2]); + DRM_DEBUG("hw_status: Reserved : %x\n", temp[3]); + DRM_DEBUG("hw_status: Driver Counter : %d\n", temp[5]); + +} + +/* Really want an OS-independent resettable timer. Would like to have + * this loop run for (eg) 3 sec, but have the timer reset every time + * the head pointer changes, so that EBUSY only happens if the ring + * actually stalls for (eg) 3 seconds. + */ +int i915_wait_ring(drm_device_t * dev, int n, const char *caller) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_ring_buffer_t *ring = &(dev_priv->ring); + u32 last_head = I915_READ(LP_RING + RING_HEAD) & HEAD_ADDR; + int i; + + for (i = 0; i < 10000; i++) { + ring->head = I915_READ(LP_RING + RING_HEAD) & HEAD_ADDR; + ring->space = ring->head - (ring->tail + 8); + if (ring->space < 0) + ring->space += ring->Size; + if (ring->space >= n) + return 0; + + dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; + + if (ring->head != last_head) + i = 0; + + last_head = ring->head; + } + + return DRM_ERR(EBUSY); +} + +void i915_kernel_lost_context(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_ring_buffer_t *ring = &(dev_priv->ring); + + ring->head = I915_READ(LP_RING + RING_HEAD) & HEAD_ADDR; + ring->tail = I915_READ(LP_RING + RING_TAIL) & TAIL_ADDR; + ring->space = ring->head - (ring->tail + 8); + if (ring->space < 0) + ring->space += ring->Size; + + if (ring->head == ring->tail) + dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY; +} + +int i915_dma_cleanup(drm_device_t * dev) +{ + /* Make sure interrupts are disabled here because the uninstall ioctl + * may not have been called from userspace and after dev_private + * is freed, it's too late. + */ + if (dev->irq) + DRM(irq_uninstall) (dev); + + if (dev->dev_private) { + drm_i915_private_t *dev_priv = + (drm_i915_private_t *) dev->dev_private; + + if (dev_priv->ring.virtual_start) { + drm_core_ioremapfree( &dev_priv->ring.map, dev); + } + + if (dev_priv->hw_status_page) { + pci_free_consistent(dev->pdev, PAGE_SIZE, + dev_priv->hw_status_page, + dev_priv->dma_status_page); + /* Need to rewrite hardware status page */ + I915_WRITE(0x02080, 0x1ffff000); + } + + DRM(free) (dev->dev_private, sizeof(drm_i915_private_t), + DRM_MEM_DRIVER); + + dev->dev_private = NULL; + } + + return 0; +} + +static int i915_initialize(drm_device_t * dev, + drm_i915_private_t * dev_priv, + drm_i915_init_t * init) +{ + memset(dev_priv, 0, sizeof(drm_i915_private_t)); + + DRM_GETSAREA(); + if (!dev_priv->sarea) { + DRM_ERROR("can not find sarea!\n"); + dev->dev_private = (void *)dev_priv; + i915_dma_cleanup(dev); + return DRM_ERR(EINVAL); + } + + dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset); + if (!dev_priv->mmio_map) { + dev->dev_private = (void *)dev_priv; + i915_dma_cleanup(dev); + DRM_ERROR("can not find mmio map!\n"); + return DRM_ERR(EINVAL); + } + + dev_priv->sarea_priv = (drm_i915_sarea_t *) + ((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset); + + dev_priv->ring.Start = init->ring_start; + dev_priv->ring.End = init->ring_end; + dev_priv->ring.Size = init->ring_size; + dev_priv->ring.tail_mask = dev_priv->ring.Size - 1; + + dev_priv->ring.map.offset = init->ring_start; + dev_priv->ring.map.size = init->ring_size; + dev_priv->ring.map.type = 0; + dev_priv->ring.map.flags = 0; + dev_priv->ring.map.mtrr = 0; + + drm_core_ioremap( &dev_priv->ring.map, dev ); + + if (dev_priv->ring.map.handle == NULL) { + dev->dev_private = (void *)dev_priv; + i915_dma_cleanup(dev); + DRM_ERROR("can not ioremap virtual address for" + " ring buffer\n"); + return DRM_ERR(ENOMEM); + } + + dev_priv->ring.virtual_start = dev_priv->ring.map.handle; + + dev_priv->back_offset = init->back_offset; + dev_priv->front_offset = init->front_offset; + dev_priv->current_page = 0; + dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; + + /* We are using separate values as placeholders for mechanisms for + * private backbuffer/depthbuffer usage. + */ + dev_priv->use_mi_batchbuffer_start = 0; + + /* Allow hardware batchbuffers unless told otherwise. + */ + dev_priv->allow_batchbuffer = 1; + + /* Program Hardware Status Page */ + dev_priv->hw_status_page = + pci_alloc_consistent(dev->pdev, PAGE_SIZE, + &dev_priv->dma_status_page); + + if (!dev_priv->hw_status_page) { + dev->dev_private = (void *)dev_priv; + i915_dma_cleanup(dev); + DRM_ERROR("Can not allocate hardware status page\n"); + return DRM_ERR(ENOMEM); + } + memset(dev_priv->hw_status_page, 0, PAGE_SIZE); + DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); + + I915_WRITE(0x02080, dev_priv->dma_status_page); + DRM_DEBUG("Enabled hardware status page\n"); + + dev->dev_private = (void *)dev_priv; + + return 0; +} + +static int i915_resume(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + + DRM_DEBUG("%s\n", __FUNCTION__); + + if (!dev_priv->sarea) { + DRM_ERROR("can not find sarea!\n"); + return DRM_ERR(EINVAL); + } + + if (!dev_priv->mmio_map) { + DRM_ERROR("can not find mmio map!\n"); + return DRM_ERR(EINVAL); + } + + if (dev_priv->ring.map.handle == NULL) { + DRM_ERROR("can not ioremap virtual address for" + " ring buffer\n"); + return DRM_ERR(ENOMEM); + } + + /* Program Hardware Status Page */ + if (!dev_priv->hw_status_page) { + DRM_ERROR("Can not find hardware status page\n"); + return DRM_ERR(EINVAL); + } + DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); + + I915_WRITE(0x02080, dev_priv->dma_status_page); + DRM_DEBUG("Enabled hardware status page\n"); + + return 0; +} + +int i915_dma_init(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv; + drm_i915_init_t init; + int retcode = 0; + + DRM_COPY_FROM_USER_IOCTL(init, (drm_i915_init_t __user *) data, + sizeof(init)); + + switch (init.func) { + case I915_INIT_DMA: + dev_priv = DRM(alloc) (sizeof(drm_i915_private_t), + DRM_MEM_DRIVER); + if (dev_priv == NULL) + return DRM_ERR(ENOMEM); + retcode = i915_initialize(dev, dev_priv, &init); + break; + case I915_CLEANUP_DMA: + retcode = i915_dma_cleanup(dev); + break; + case I915_RESUME_DMA: + retcode = i915_resume(dev); + break; + default: + retcode = -EINVAL; + break; + } + + return retcode; +} + +/* Implement basically the same security restrictions as hardware does + * for MI_BATCH_NON_SECURE. These can be made stricter at any time. + * + * Most of the calculations below involve calculating the size of a + * particular instruction. It's important to get the size right as + * that tells us where the next instruction to check is. Any illegal + * instruction detected will be given a size of zero, which is a + * signal to abort the rest of the buffer. + */ +static int do_validate_cmd(int cmd) +{ + switch (((cmd >> 29) & 0x7)) { + case 0x0: + switch ((cmd >> 23) & 0x3f) { + case 0x0: + return 1; /* MI_NOOP */ + case 0x4: + return 1; /* MI_FLUSH */ + default: + return 0; /* disallow everything else */ + } + break; + case 0x1: + return 0; /* reserved */ + case 0x2: + return (cmd & 0xff) + 2; /* 2d commands */ + case 0x3: + if (((cmd >> 24) & 0x1f) <= 0x18) + return 1; + + switch ((cmd >> 24) & 0x1f) { + case 0x1c: + return 1; + case 0x1d: + return (cmd & 0xffff) + 2; + case 0x1e: + if (cmd & (1 << 23)) + return (cmd & 0xffff) + 1; + else + return 1; + case 0x1f: + if ((cmd & (1 << 23)) == 0) /* inline vertices */ + return (cmd & 0x1ffff) + 2; + else if (cmd & (1 << 17)) /* indirect random */ + if ((cmd & 0xffff) == 0) + return 0; /* unknown length, too hard */ + else + return (((cmd & 0xffff) + 1) / 2) + 1; + else + return 2; /* indirect sequential */ + default: + return 0; + } + default: + return 0; + } + + return 0; +} + +static int validate_cmd(int cmd) +{ + int ret = do_validate_cmd(cmd); + +/* printk("validate_cmd( %x ): %d\n", cmd, ret); */ + + return ret; +} + +static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + int i; + RING_LOCALS; + + for (i = 0; i < dwords;) { + int cmd, sz; + + if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], sizeof(cmd))) + return DRM_ERR(EINVAL); + +/* printk("%d/%d ", i, dwords); */ + + if ((sz = validate_cmd(cmd)) == 0 || i + sz > dwords) + return DRM_ERR(EINVAL); + + BEGIN_LP_RING(sz); + OUT_RING(cmd); + + while (++i, --sz) { + if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], + sizeof(cmd))) { + return DRM_ERR(EINVAL); + } + OUT_RING(cmd); + } + ADVANCE_LP_RING(); + } + + return 0; +} + +static int i915_emit_box(drm_device_t * dev, + drm_clip_rect_t __user * boxes, + int i, int DR1, int DR4) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + drm_clip_rect_t box; + RING_LOCALS; + + if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) { + return EFAULT; + } + + if (box.y2 <= box.y1 || box.x2 <= box.x1 || box.y2 <= 0 || box.x2 <= 0) { + DRM_ERROR("Bad box %d,%d..%d,%d\n", + box.x1, box.y1, box.x2, box.y2); + return DRM_ERR(EINVAL); + } + + BEGIN_LP_RING(6); + OUT_RING(GFX_OP_DRAWRECT_INFO); + OUT_RING(DR1); + OUT_RING((box.x1 & 0xffff) | (box.y1 << 16)); + OUT_RING(((box.x2 - 1) & 0xffff) | ((box.y2 - 1) << 16)); + OUT_RING(DR4); + OUT_RING(0); + ADVANCE_LP_RING(); + + return 0; +} + +static int i915_dispatch_cmdbuffer(drm_device_t * dev, + drm_i915_cmdbuffer_t * cmd) +{ + int nbox = cmd->num_cliprects; + int i = 0, count, ret; + + if (cmd->sz & 0x3) { + DRM_ERROR("alignment"); + return DRM_ERR(EINVAL); + } + + i915_kernel_lost_context(dev); + + count = nbox ? nbox : 1; + + for (i = 0; i < count; i++) { + if (i < nbox) { + ret = i915_emit_box(dev, cmd->cliprects, i, + cmd->DR1, cmd->DR4); + if (ret) + return ret; + } + + ret = i915_emit_cmds(dev, (int __user *)cmd->buf, cmd->sz / 4); + if (ret) + return ret; + } + + return 0; +} + +static int i915_dispatch_batchbuffer(drm_device_t * dev, + drm_i915_batchbuffer_t * batch) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + drm_clip_rect_t __user *boxes = batch->cliprects; + int nbox = batch->num_cliprects; + int i = 0, count; + RING_LOCALS; + + if ((batch->start | batch->used) & 0x7) { + DRM_ERROR("alignment"); + return DRM_ERR(EINVAL); + } + + i915_kernel_lost_context(dev); + + count = nbox ? nbox : 1; + + for (i = 0; i < count; i++) { + if (i < nbox) { + int ret = i915_emit_box(dev, boxes, i, + batch->DR1, batch->DR4); + if (ret) + return ret; + } + + if (dev_priv->use_mi_batchbuffer_start) { + BEGIN_LP_RING(2); + OUT_RING(MI_BATCH_BUFFER_START | (2 << 6)); + OUT_RING(batch->start | MI_BATCH_NON_SECURE); + ADVANCE_LP_RING(); + } else { + BEGIN_LP_RING(4); + OUT_RING(MI_BATCH_BUFFER); + OUT_RING(batch->start | MI_BATCH_NON_SECURE); + OUT_RING(batch->start + batch->used - 4); + OUT_RING(0); + ADVANCE_LP_RING(); + } + } + + dev_priv->sarea_priv->last_enqueue = dev_priv->counter++; + + BEGIN_LP_RING(4); + OUT_RING(CMD_STORE_DWORD_IDX); + OUT_RING(20); + OUT_RING(dev_priv->counter); + OUT_RING(0); + ADVANCE_LP_RING(); + + return 0; +} + +static int i915_dispatch_flip(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + RING_LOCALS; + + DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", + __FUNCTION__, + dev_priv->current_page, + dev_priv->sarea_priv->pf_current_page); + + i915_kernel_lost_context(dev); + + BEGIN_LP_RING(2); + OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); + OUT_RING(0); + ADVANCE_LP_RING(); + + BEGIN_LP_RING(6); + OUT_RING(CMD_OP_DISPLAYBUFFER_INFO | ASYNC_FLIP); + OUT_RING(0); + if (dev_priv->current_page == 0) { + OUT_RING(dev_priv->back_offset); + dev_priv->current_page = 1; + } else { + OUT_RING(dev_priv->front_offset); + dev_priv->current_page = 0; + } + OUT_RING(0); + ADVANCE_LP_RING(); + + BEGIN_LP_RING(2); + OUT_RING(MI_WAIT_FOR_EVENT | MI_WAIT_FOR_PLANE_A_FLIP); + OUT_RING(0); + ADVANCE_LP_RING(); + + dev_priv->sarea_priv->last_enqueue = dev_priv->counter++; + + BEGIN_LP_RING(4); + OUT_RING(CMD_STORE_DWORD_IDX); + OUT_RING(20); + OUT_RING(dev_priv->counter); + OUT_RING(0); + ADVANCE_LP_RING(); + + dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; + return 0; +} + +static int i915_quiescent(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + + i915_kernel_lost_context(dev); + return i915_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__); +} + +int i915_flush_ioctl(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { + DRM_ERROR("i915_flush_ioctl called without lock held\n"); + return DRM_ERR(EINVAL); + } + + return i915_quiescent(dev); +} + +int i915_batchbuffer(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + u32 *hw_status = dev_priv->hw_status_page; + drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) + dev_priv->sarea_priv; + drm_i915_batchbuffer_t batch; + int ret; + + if (!dev_priv->allow_batchbuffer) { + DRM_ERROR("Batchbuffer ioctl disabled\n"); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(batch, (drm_i915_batchbuffer_t __user *) data, + sizeof(batch)); + + DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n", + batch.start, batch.used, batch.num_cliprects); + + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { + DRM_ERROR("i915_batchbuffer called without lock held\n"); + return DRM_ERR(EINVAL); + } + + if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, + batch.num_cliprects * + sizeof(drm_clip_rect_t))) + return DRM_ERR(EFAULT); + + ret = i915_dispatch_batchbuffer(dev, &batch); + + sarea_priv->last_dispatch = (int)hw_status[5]; + return ret; +} + +int i915_cmdbuffer(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + u32 *hw_status = dev_priv->hw_status_page; + drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) + dev_priv->sarea_priv; + drm_i915_cmdbuffer_t cmdbuf; + int ret; + + DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_i915_cmdbuffer_t __user *) data, + sizeof(cmdbuf)); + + DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n", + cmdbuf.buf, cmdbuf.sz, cmdbuf.num_cliprects); + + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { + DRM_ERROR("i915_cmdbuffer called without lock held\n"); + return DRM_ERR(EINVAL); + } + + if (cmdbuf.num_cliprects && + DRM_VERIFYAREA_READ(cmdbuf.cliprects, + cmdbuf.num_cliprects * + sizeof(drm_clip_rect_t))) { + DRM_ERROR("Fault accessing cliprects\n"); + return DRM_ERR(EFAULT); + } + + ret = i915_dispatch_cmdbuffer(dev, &cmdbuf); + if (ret) { + DRM_ERROR("i915_dispatch_cmdbuffer failed\n"); + return ret; + } + + sarea_priv->last_dispatch = (int)hw_status[5]; + return 0; +} + +int i915_do_cleanup_pageflip(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + + DRM_DEBUG("%s\n", __FUNCTION__); + if (dev_priv->current_page != 0) + i915_dispatch_flip(dev); + + return 0; +} + +int i915_flip_bufs(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + + DRM_DEBUG("%s\n", __FUNCTION__); + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { + DRM_ERROR("i915_flip_buf called without lock held\n"); + return DRM_ERR(EINVAL); + } + + return i915_dispatch_flip(dev); +} + +int i915_getparam(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_getparam_t param; + int value; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(param, (drm_i915_getparam_t __user *) data, + sizeof(param)); + + switch (param.param) { + case I915_PARAM_IRQ_ACTIVE: + value = dev->irq ? 1 : 0; + break; + case I915_PARAM_ALLOW_BATCHBUFFER: + value = dev_priv->allow_batchbuffer ? 1 : 0; + break; + default: + DRM_ERROR("Unkown parameter %d\n", param.param); + return DRM_ERR(EINVAL); + } + + if (DRM_COPY_TO_USER(param.value, &value, sizeof(int))) { + DRM_ERROR("DRM_COPY_TO_USER failed\n"); + return DRM_ERR(EFAULT); + } + + return 0; +} + +int i915_setparam(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_setparam_t param; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(param, (drm_i915_setparam_t __user *) data, + sizeof(param)); + + switch (param.param) { + case I915_SETPARAM_USE_MI_BATCHBUFFER_START: + dev_priv->use_mi_batchbuffer_start = param.value; + break; + case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY: + dev_priv->tex_lru_log_granularity = param.value; + break; + case I915_SETPARAM_ALLOW_BATCHBUFFER: + dev_priv->allow_batchbuffer = param.value; + break; + default: + DRM_ERROR("unknown parameter %d\n", param.param); + return DRM_ERR(EINVAL); + } + + return 0; +} + +static void i915_driver_pretakedown(drm_device_t *dev) +{ + if ( dev->dev_private ) { + drm_i915_private_t *dev_priv = dev->dev_private; + i915_mem_takedown( &(dev_priv->agp_heap) ); + } + i915_dma_cleanup( dev ); +} + +static void i915_driver_prerelease(drm_device_t *dev, DRMFILE filp) +{ + if ( dev->dev_private ) { + drm_i915_private_t *dev_priv = dev->dev_private; + i915_mem_release( dev, filp, dev_priv->agp_heap ); + } +} + +void i915_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED; + dev->fn_tbl.pretakedown = i915_driver_pretakedown; + dev->fn_tbl.prerelease = i915_driver_prerelease; + dev->fn_tbl.irq_preinstall = i915_driver_irq_preinstall; + dev->fn_tbl.irq_postinstall = i915_driver_irq_postinstall; + dev->fn_tbl.irq_uninstall = i915_driver_irq_uninstall; + dev->fn_tbl.irq_handler = i915_driver_irq_handler; +} diff -Nru a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_drm.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,154 @@ +#ifndef _I915_DRM_H_ +#define _I915_DRM_H_ + +/* Please note that modifications to all structs defined here are + * subject to backwards-compatibility constraints. + */ + +#include "drm.h" + +/* Each region is a minimum of 16k, and there are at most 255 of them. + */ +#define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use + * of chars for next/prev indices */ +#define I915_LOG_MIN_TEX_REGION_SIZE 14 + +typedef struct _drm_i915_init { + enum { + I915_INIT_DMA = 0x01, + I915_CLEANUP_DMA = 0x02, + I915_RESUME_DMA = 0x03 + } func; + unsigned int mmio_offset; + int sarea_priv_offset; + unsigned int ring_start; + unsigned int ring_end; + unsigned int ring_size; + unsigned int front_offset; + unsigned int back_offset; + unsigned int depth_offset; + unsigned int w; + unsigned int h; + unsigned int pitch; + unsigned int pitch_bits; + unsigned int back_pitch; + unsigned int depth_pitch; + unsigned int cpp; + unsigned int chipset; +} drm_i915_init_t; + +typedef struct _drm_i915_sarea { + drm_tex_region_t texList[I915_NR_TEX_REGIONS + 1]; + int last_upload; /* last time texture was uploaded */ + int last_enqueue; /* last time a buffer was enqueued */ + int last_dispatch; /* age of the most recently dispatched buffer */ + int ctxOwner; /* last context to upload state */ + int texAge; + int pf_enabled; /* is pageflipping allowed? */ + int pf_active; + int pf_current_page; /* which buffer is being displayed? */ + int perf_boxes; /* performance boxes to be displayed */ +} drm_i915_sarea_t; + +/* Flags for perf_boxes + */ +#define I915_BOX_RING_EMPTY 0x1 +#define I915_BOX_FLIP 0x2 +#define I915_BOX_WAIT 0x4 +#define I915_BOX_TEXTURE_LOAD 0x8 +#define I915_BOX_LOST_CONTEXT 0x10 + +/* I915 specific ioctls + * The device specific ioctl range is 0x40 to 0x79. + */ +#define DRM_IOCTL_I915_INIT DRM_IOW( 0x40, drm_i915_init_t) +#define DRM_IOCTL_I915_FLUSH DRM_IO ( 0x41) +#define DRM_IOCTL_I915_FLIP DRM_IO ( 0x42) +#define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( 0x43, drm_i915_batchbuffer_t) +#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(0x44, drm_i915_irq_emit_t) +#define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( 0x45, drm_i915_irq_wait_t) +#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(0x46, drm_i915_getparam_t) +#define DRM_IOCTL_I915_SETPARAM DRM_IOW( 0x47, drm_i915_setparam_t) +#define DRM_IOCTL_I915_ALLOC DRM_IOWR(0x48, drm_i915_mem_alloc_t) +#define DRM_IOCTL_I915_FREE DRM_IOW( 0x49, drm_i915_mem_free_t) +#define DRM_IOCTL_I915_INIT_HEAP DRM_IOW( 0x4a, drm_i915_mem_init_heap_t) +#define DRM_IOCTL_I915_CMDBUFFER DRM_IOW( 0x4b, drm_i915_cmdbuffer_t) + +/* Allow drivers to submit batchbuffers directly to hardware, relying + * on the security mechanisms provided by hardware. + */ +typedef struct _drm_i915_batchbuffer { + int start; /* agp offset */ + int used; /* nr bytes in use */ + int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */ + int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */ + int num_cliprects; /* mulitpass with multiple cliprects? */ + drm_clip_rect_t __user *cliprects; /* pointer to userspace cliprects */ +} drm_i915_batchbuffer_t; + +/* As above, but pass a pointer to userspace buffer which can be + * validated by the kernel prior to sending to hardware. + */ +typedef struct _drm_i915_cmdbuffer { + char __user *buf; /* pointer to userspace command buffer */ + int sz; /* nr bytes in buf */ + int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */ + int DR4; /* window origin for GFX_OP_DRAWRECT_INFO */ + int num_cliprects; /* mulitpass with multiple cliprects? */ + drm_clip_rect_t __user *cliprects; /* pointer to userspace cliprects */ +} drm_i915_cmdbuffer_t; + +/* Userspace can request & wait on irq's: + */ +typedef struct drm_i915_irq_emit { + int __user *irq_seq; +} drm_i915_irq_emit_t; + +typedef struct drm_i915_irq_wait { + int irq_seq; +} drm_i915_irq_wait_t; + +/* Ioctl to query kernel params: + */ +#define I915_PARAM_IRQ_ACTIVE 1 +#define I915_PARAM_ALLOW_BATCHBUFFER 2 + +typedef struct drm_i915_getparam { + int param; + int __user *value; +} drm_i915_getparam_t; + +/* Ioctl to set kernel params: + */ +#define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 +#define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 +#define I915_SETPARAM_ALLOW_BATCHBUFFER 3 + +typedef struct drm_i915_setparam { + int param; + int value; +} drm_i915_setparam_t; + +/* A memory manager for regions of shared memory: + */ +#define I915_MEM_REGION_AGP 1 + +typedef struct drm_i915_mem_alloc { + int region; + int alignment; + int size; + int __user *region_offset; /* offset from start of fb or agp */ +} drm_i915_mem_alloc_t; + +typedef struct drm_i915_mem_free { + int region; + int region_offset; +} drm_i915_mem_free_t; + +typedef struct drm_i915_mem_init_heap { + int region; + int size; + int start; +} drm_i915_mem_init_heap_t; + +#endif /* _I915_DRM_H_ */ diff -Nru a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_drv.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,33 @@ +/* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*- + */ + +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#include "i915.h" +#include "drmP.h" +#include "drm.h" +#include "i915_drm.h" +#include "i915_drv.h" + +#include "drm_agpsupport.h" +#include "drm_auth.h" /* is this needed? */ +#include "drm_bufs.h" +#include "drm_context.h" /* is this needed? */ +#include "drm_drawable.h" /* is this needed? */ +#include "drm_dma.h" +#include "drm_drv.h" +#include "drm_fops.h" +#include "drm_init.h" +#include "drm_irq.h" +#include "drm_ioctl.h" +#include "drm_lock.h" +#include "drm_memory.h" /* */ +#include "drm_proc.h" +#include "drm_vm.h" +#include "drm_stub.h" +#include "drm_scatter.h" diff -Nru a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_drv.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,219 @@ +/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- + */ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#ifndef _I915_DRV_H_ +#define _I915_DRV_H_ + +typedef struct _drm_i915_ring_buffer { + int tail_mask; + unsigned long Start; + unsigned long End; + unsigned long Size; + u8 *virtual_start; + int head; + int tail; + int space; + drm_local_map_t map; +} drm_i915_ring_buffer_t; + +struct mem_block { + struct mem_block *next; + struct mem_block *prev; + int start; + int size; + DRMFILE filp; /* 0: free, -1: heap, other: real files */ +}; + +typedef struct drm_i915_private { + drm_local_map_t *sarea; + drm_local_map_t *mmio_map; + + drm_i915_sarea_t *sarea_priv; + drm_i915_ring_buffer_t ring; + + void *hw_status_page; + unsigned long counter; + dma_addr_t dma_status_page; + + int back_offset; + int front_offset; + int current_page; + int page_flipping; + int use_mi_batchbuffer_start; + + wait_queue_head_t irq_queue; + atomic_t irq_received; + atomic_t irq_emitted; + + int tex_lru_log_granularity; + int allow_batchbuffer; + struct mem_block *agp_heap; +} drm_i915_private_t; + + /* i915_dma.c */ +extern int i915_dma_init(DRM_IOCTL_ARGS); +extern int i915_dma_cleanup(drm_device_t * dev); +extern int i915_flush_ioctl(DRM_IOCTL_ARGS); +extern int i915_batchbuffer(DRM_IOCTL_ARGS); +extern int i915_flip_bufs(DRM_IOCTL_ARGS); +extern int i915_getparam(DRM_IOCTL_ARGS); +extern int i915_setparam(DRM_IOCTL_ARGS); +extern int i915_cmdbuffer(DRM_IOCTL_ARGS); +extern void i915_kernel_lost_context(drm_device_t * dev); + +/* i915_irq.c */ +extern int i915_irq_emit(DRM_IOCTL_ARGS); +extern int i915_irq_wait(DRM_IOCTL_ARGS); +extern int i915_wait_irq(drm_device_t * dev, int irq_nr); +extern int i915_emit_irq(drm_device_t * dev); + +extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); +extern void i915_driver_irq_preinstall(drm_device_t *dev); +extern void i915_driver_irq_postinstall(drm_device_t *dev); +extern void i915_driver_irq_uninstall(drm_device_t *dev); + +/* i915_mem.c */ +extern int i915_mem_alloc(DRM_IOCTL_ARGS); +extern int i915_mem_free(DRM_IOCTL_ARGS); +extern int i915_mem_init_heap(DRM_IOCTL_ARGS); +extern void i915_mem_takedown(struct mem_block **heap); +extern void i915_mem_release(drm_device_t * dev, + DRMFILE filp, struct mem_block *heap); + +#define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) +#define I915_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, reg, val) +#define I915_READ16(reg) DRM_READ16(dev_priv->mmio_map, reg) +#define I915_WRITE16(reg,val) DRM_WRITE16(dev_priv->mmio_map, reg, val) + +#define I915_VERBOSE 0 + +#define RING_LOCALS unsigned int outring, ringmask, outcount; \ + volatile char *virt; + +#define BEGIN_LP_RING(n) do { \ + if (I915_VERBOSE) \ + DRM_DEBUG("BEGIN_LP_RING(%d) in %s\n", \ + n, __FUNCTION__); \ + if (dev_priv->ring.space < n*4) \ + i915_wait_ring(dev, n*4, __FUNCTION__); \ + outcount = 0; \ + outring = dev_priv->ring.tail; \ + ringmask = dev_priv->ring.tail_mask; \ + virt = dev_priv->ring.virtual_start; \ +} while (0) + +#define OUT_RING(n) do { \ + if (I915_VERBOSE) DRM_DEBUG(" OUT_RING %x\n", (int)(n)); \ + *(volatile unsigned int *)(virt + outring) = n; \ + outcount++; \ + outring += 4; \ + outring &= ringmask; \ +} while (0) + +#define ADVANCE_LP_RING() do { \ + if (I915_VERBOSE) DRM_DEBUG("ADVANCE_LP_RING %x\n", outring); \ + dev_priv->ring.tail = outring; \ + dev_priv->ring.space -= outcount * 4; \ + I915_WRITE(LP_RING + RING_TAIL, outring); \ +} while(0) + +extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); + +#define GFX_OP_USER_INTERRUPT ((0<<29)|(2<<23)) +#define GFX_OP_BREAKPOINT_INTERRUPT ((0<<29)|(1<<23)) +#define CMD_REPORT_HEAD (7<<23) +#define CMD_STORE_DWORD_IDX ((0x21<<23) | 0x1) +#define CMD_OP_BATCH_BUFFER ((0x0<<29)|(0x30<<23)|0x1) + +#define INST_PARSER_CLIENT 0x00000000 +#define INST_OP_FLUSH 0x02000000 +#define INST_FLUSH_MAP_CACHE 0x00000001 + +#define BB1_START_ADDR_MASK (~0x7) +#define BB1_PROTECTED (1<<0) +#define BB1_UNPROTECTED (0<<0) +#define BB2_END_ADDR_MASK (~0x7) + +#define I915REG_HWSTAM 0x02098 +#define I915REG_INT_IDENTITY_R 0x020a4 +#define I915REG_INT_MASK_R 0x020a8 +#define I915REG_INT_ENABLE_R 0x020a0 + +#define SRX_INDEX 0x3c4 +#define SRX_DATA 0x3c5 +#define SR01 1 +#define SR01_SCREEN_OFF (1<<5) + +#define PPCR 0x61204 +#define PPCR_ON (1<<0) + +#define ADPA 0x61100 +#define ADPA_DPMS_MASK (~(3<<10)) +#define ADPA_DPMS_ON (0<<10) +#define ADPA_DPMS_SUSPEND (1<<10) +#define ADPA_DPMS_STANDBY (2<<10) +#define ADPA_DPMS_OFF (3<<10) + +#define NOPID 0x2094 +#define LP_RING 0x2030 +#define HP_RING 0x2040 +#define RING_TAIL 0x00 +#define TAIL_ADDR 0x001FFFF8 +#define RING_HEAD 0x04 +#define HEAD_WRAP_COUNT 0xFFE00000 +#define HEAD_WRAP_ONE 0x00200000 +#define HEAD_ADDR 0x001FFFFC +#define RING_START 0x08 +#define START_ADDR 0x0xFFFFF000 +#define RING_LEN 0x0C +#define RING_NR_PAGES 0x001FF000 +#define RING_REPORT_MASK 0x00000006 +#define RING_REPORT_64K 0x00000002 +#define RING_REPORT_128K 0x00000004 +#define RING_NO_REPORT 0x00000000 +#define RING_VALID_MASK 0x00000001 +#define RING_VALID 0x00000001 +#define RING_INVALID 0x00000000 + +#define GFX_OP_SCISSOR ((0x3<<29)|(0x1c<<24)|(0x10<<19)) +#define SC_UPDATE_SCISSOR (0x1<<1) +#define SC_ENABLE_MASK (0x1<<0) +#define SC_ENABLE (0x1<<0) + +#define GFX_OP_SCISSOR_INFO ((0x3<<29)|(0x1d<<24)|(0x81<<16)|(0x1)) +#define SCI_YMIN_MASK (0xffff<<16) +#define SCI_XMIN_MASK (0xffff<<0) +#define SCI_YMAX_MASK (0xffff<<16) +#define SCI_XMAX_MASK (0xffff<<0) + +#define GFX_OP_SCISSOR_ENABLE ((0x3<<29)|(0x1c<<24)|(0x10<<19)) +#define GFX_OP_SCISSOR_RECT ((0x3<<29)|(0x1d<<24)|(0x81<<16)|1) +#define GFX_OP_COLOR_FACTOR ((0x3<<29)|(0x1d<<24)|(0x1<<16)|0x0) +#define GFX_OP_STIPPLE ((0x3<<29)|(0x1d<<24)|(0x83<<16)) +#define GFX_OP_MAP_INFO ((0x3<<29)|(0x1d<<24)|0x4) +#define GFX_OP_DESTBUFFER_VARS ((0x3<<29)|(0x1d<<24)|(0x85<<16)|0x0) +#define GFX_OP_DRAWRECT_INFO ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3)) + +#define MI_BATCH_BUFFER ((0x30<<23)|1) +#define MI_BATCH_BUFFER_START (0x31<<23) +#define MI_BATCH_BUFFER_END (0xA<<23) +#define MI_BATCH_NON_SECURE (1) + +#define MI_WAIT_FOR_EVENT ((0x3<<23)) +#define MI_WAIT_FOR_PLANE_A_FLIP (1<<2) +#define MI_WAIT_FOR_PLANE_A_SCANLINES (1<<1) + +#define MI_LOAD_SCAN_LINES_INCL ((0x12<<23)) + +#define CMD_OP_DISPLAYBUFFER_INFO ((0x0<<29)|(0x14<<23)|2) +#define ASYNC_FLIP (1<<22) + +#define CMD_OP_DESTBUFFER_INFO ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1) + +#endif diff -Nru a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_irq.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,165 @@ +/* i915_dma.c -- DMA support for the I915 -*- linux-c -*- + */ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#include "i915.h" +#include "drmP.h" +#include "drm.h" +#include "i915_drm.h" +#include "i915_drv.h" + +#define USER_INT_FLAG 0x2 +#define MAX_NOPID ((u32)~0) +#define READ_BREADCRUMB(dev_priv) (((u32*)(dev_priv->hw_status_page))[5]) + +irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) +{ + drm_device_t *dev = (drm_device_t *) arg; + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + u16 temp; + + temp = I915_READ16(I915REG_INT_IDENTITY_R); + temp &= USER_INT_FLAG; + + DRM_DEBUG("%s flag=%08x\n", __FUNCTION__, temp); + + if (temp == 0) + return IRQ_NONE; + + I915_WRITE16(I915REG_INT_IDENTITY_R, temp); + DRM_WAKEUP(&dev_priv->irq_queue); + + return IRQ_HANDLED; +} + +int i915_emit_irq(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + u32 ret; + RING_LOCALS; + + i915_kernel_lost_context(dev); + + DRM_DEBUG("%s\n", __FUNCTION__); + + ret = dev_priv->counter; + + BEGIN_LP_RING(2); + OUT_RING(0); + OUT_RING(GFX_OP_USER_INTERRUPT); + ADVANCE_LP_RING(); + + return ret; +} + +int i915_wait_irq(drm_device_t * dev, int irq_nr) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + int ret = 0; + + DRM_DEBUG("%s irq_nr=%d breadcrumb=%d\n", __FUNCTION__, irq_nr, + READ_BREADCRUMB(dev_priv)); + + if (READ_BREADCRUMB(dev_priv) >= irq_nr) + return 0; + + dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; + + DRM_WAIT_ON(ret, dev_priv->irq_queue, 3 * DRM_HZ, + READ_BREADCRUMB(dev_priv) >= irq_nr); + + if (ret == DRM_ERR(EBUSY)) { + DRM_ERROR("%s: EBUSY -- rec: %d emitted: %d\n", + __FUNCTION__, + READ_BREADCRUMB(dev_priv), (int)dev_priv->counter); + } + + dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); + return ret; +} + +/* Needs the lock as it touches the ring. + */ +int i915_irq_emit(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_irq_emit_t emit; + int result; + + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { + DRM_ERROR("i915_irq_emit called without lock held\n"); + return DRM_ERR(EINVAL); + } + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(emit, (drm_i915_irq_emit_t __user *) data, + sizeof(emit)); + + result = i915_emit_irq(dev); + + if (DRM_COPY_TO_USER(emit.irq_seq, &result, sizeof(int))) { + DRM_ERROR("copy_to_user\n"); + return DRM_ERR(EFAULT); + } + + return 0; +} + +/* Doesn't need the hardware lock. + */ +int i915_irq_wait(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_irq_wait_t irqwait; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(irqwait, (drm_i915_irq_wait_t __user *) data, + sizeof(irqwait)); + + return i915_wait_irq(dev, irqwait.irq_seq); +} + +/* drm_dma.h hooks +*/ +void i915_driver_irq_preinstall(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + + I915_WRITE16(I915REG_HWSTAM, 0xfffe); + I915_WRITE16(I915REG_INT_MASK_R, 0x0); + I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); +} + +void i915_driver_irq_postinstall(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + + I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG); + DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); +} + +void i915_driver_irq_uninstall(drm_device_t * dev) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + if (!dev_priv) + return; + + I915_WRITE16(I915REG_HWSTAM, 0xffff); + I915_WRITE16(I915REG_INT_MASK_R, 0xffff); + I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); +} diff -Nru a/drivers/char/drm/i915_mem.c b/drivers/char/drm/i915_mem.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/drm/i915_mem.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,347 @@ +/* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*- + */ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + **************************************************************************/ + +#include "i915.h" +#include "drmP.h" +#include "drm.h" +#include "i915_drm.h" +#include "i915_drv.h" + +/* This memory manager is integrated into the global/local lru + * mechanisms used by the clients. Specifically, it operates by + * setting the 'in_use' fields of the global LRU to indicate whether + * this region is privately allocated to a client. + * + * This does require the client to actually respect that field. + * + * Currently no effort is made to allocate 'private' memory in any + * clever way - the LRU information isn't used to determine which + * block to allocate, and the ring is drained prior to allocations -- + * in other words allocation is expensive. + */ +static void mark_block(drm_device_t * dev, struct mem_block *p, int in_use) +{ + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv; + drm_tex_region_t *list; + unsigned shift, nr; + unsigned start; + unsigned end; + unsigned i; + int age; + + shift = dev_priv->tex_lru_log_granularity; + nr = I915_NR_TEX_REGIONS; + + start = p->start >> shift; + end = (p->start + p->size - 1) >> shift; + + age = ++sarea_priv->texAge; + list = sarea_priv->texList; + + /* Mark the regions with the new flag and update their age. Move + * them to head of list to preserve LRU semantics. + */ + for (i = start; i <= end; i++) { + list[i].in_use = in_use; + list[i].age = age; + + /* remove_from_list(i) + */ + list[(unsigned)list[i].next].prev = list[i].prev; + list[(unsigned)list[i].prev].next = list[i].next; + + /* insert_at_head(list, i) + */ + list[i].prev = nr; + list[i].next = list[nr].next; + list[(unsigned)list[nr].next].prev = i; + list[nr].next = i; + } +} + +/* Very simple allocator for agp memory, working on a static range + * already mapped into each client's address space. + */ + +static struct mem_block *split_block(struct mem_block *p, int start, int size, + DRMFILE filp) +{ + /* Maybe cut off the start of an existing block */ + if (start > p->start) { + struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock)); + if (!newblock) + goto out; + newblock->start = start; + newblock->size = p->size - (start - p->start); + newblock->filp = NULL; + newblock->next = p->next; + newblock->prev = p; + p->next->prev = newblock; + p->next = newblock; + p->size -= newblock->size; + p = newblock; + } + + /* Maybe cut off the end of an existing block */ + if (size < p->size) { + struct mem_block *newblock = DRM_MALLOC(sizeof(*newblock)); + if (!newblock) + goto out; + newblock->start = start + size; + newblock->size = p->size - size; + newblock->filp = NULL; + newblock->next = p->next; + newblock->prev = p; + p->next->prev = newblock; + p->next = newblock; + p->size = size; + } + + out: + /* Our block is in the middle */ + p->filp = filp; + return p; +} + +static struct mem_block *alloc_block(struct mem_block *heap, int size, + int align2, DRMFILE filp) +{ + struct mem_block *p; + int mask = (1 << align2) - 1; + + for (p = heap->next; p != heap; p = p->next) { + int start = (p->start + mask) & ~mask; + if (p->filp == NULL && start + size <= p->start + p->size) + return split_block(p, start, size, filp); + } + + return NULL; +} + +static struct mem_block *find_block(struct mem_block *heap, int start) +{ + struct mem_block *p; + + for (p = heap->next; p != heap; p = p->next) + if (p->start == start) + return p; + + return NULL; +} + +static void free_block(struct mem_block *p) +{ + p->filp = NULL; + + /* Assumes a single contiguous range. Needs a special filp in + * 'heap' to stop it being subsumed. + */ + if (p->next->filp == NULL) { + struct mem_block *q = p->next; + p->size += q->size; + p->next = q->next; + p->next->prev = p; + DRM_FREE(q, sizeof(*q)); + } + + if (p->prev->filp == NULL) { + struct mem_block *q = p->prev; + q->size += p->size; + q->next = p->next; + q->next->prev = q; + DRM_FREE(p, sizeof(*q)); + } +} + +/* Initialize. How to check for an uninitialized heap? + */ +static int init_heap(struct mem_block **heap, int start, int size) +{ + struct mem_block *blocks = DRM_MALLOC(sizeof(*blocks)); + + if (!blocks) + return -ENOMEM; + + *heap = DRM_MALLOC(sizeof(**heap)); + if (!*heap) { + DRM_FREE(blocks, sizeof(*blocks)); + return -ENOMEM; + } + + blocks->start = start; + blocks->size = size; + blocks->filp = NULL; + blocks->next = blocks->prev = *heap; + + memset(*heap, 0, sizeof(**heap)); + (*heap)->filp = (DRMFILE) - 1; + (*heap)->next = (*heap)->prev = blocks; + return 0; +} + +/* Free all blocks associated with the releasing file. + */ +void i915_mem_release(drm_device_t * dev, DRMFILE filp, struct mem_block *heap) +{ + struct mem_block *p; + + if (!heap || !heap->next) + return; + + for (p = heap->next; p != heap; p = p->next) { + if (p->filp == filp) { + p->filp = NULL; + mark_block(dev, p, 0); + } + } + + /* Assumes a single contiguous range. Needs a special filp in + * 'heap' to stop it being subsumed. + */ + for (p = heap->next; p != heap; p = p->next) { + while (p->filp == NULL && p->next->filp == NULL) { + struct mem_block *q = p->next; + p->size += q->size; + p->next = q->next; + p->next->prev = p; + DRM_FREE(q, sizeof(*q)); + } + } +} + +/* Shutdown. + */ +void i915_mem_takedown(struct mem_block **heap) +{ + struct mem_block *p; + + if (!*heap) + return; + + for (p = (*heap)->next; p != *heap;) { + struct mem_block *q = p; + p = p->next; + DRM_FREE(q, sizeof(*q)); + } + + DRM_FREE(*heap, sizeof(**heap)); + *heap = NULL; +} + +static struct mem_block **get_heap(drm_i915_private_t * dev_priv, int region) +{ + switch (region) { + case I915_MEM_REGION_AGP: + return &dev_priv->agp_heap; + default: + return NULL; + } +} + +/* IOCTL HANDLERS */ + +int i915_mem_alloc(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_mem_alloc_t alloc; + struct mem_block *block, **heap; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(alloc, (drm_i915_mem_alloc_t __user *) data, + sizeof(alloc)); + + heap = get_heap(dev_priv, alloc.region); + if (!heap || !*heap) + return DRM_ERR(EFAULT); + + /* Make things easier on ourselves: all allocations at least + * 4k aligned. + */ + if (alloc.alignment < 12) + alloc.alignment = 12; + + block = alloc_block(*heap, alloc.size, alloc.alignment, filp); + + if (!block) + return DRM_ERR(ENOMEM); + + mark_block(dev, block, 1); + + if (DRM_COPY_TO_USER(alloc.region_offset, &block->start, sizeof(int))) { + DRM_ERROR("copy_to_user\n"); + return DRM_ERR(EFAULT); + } + + return 0; +} + +int i915_mem_free(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_mem_free_t memfree; + struct mem_block *block, **heap; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(memfree, (drm_i915_mem_free_t __user *) data, + sizeof(memfree)); + + heap = get_heap(dev_priv, memfree.region); + if (!heap || !*heap) + return DRM_ERR(EFAULT); + + block = find_block(*heap, memfree.region_offset); + if (!block) + return DRM_ERR(EFAULT); + + if (block->filp != filp) + return DRM_ERR(EPERM); + + mark_block(dev, block, 0); + free_block(block); + return 0; +} + +int i915_mem_init_heap(DRM_IOCTL_ARGS) +{ + DRM_DEVICE; + drm_i915_private_t *dev_priv = dev->dev_private; + drm_i915_mem_init_heap_t initheap; + struct mem_block **heap; + + if (!dev_priv) { + DRM_ERROR("%s called with no initialization\n", __FUNCTION__); + return DRM_ERR(EINVAL); + } + + DRM_COPY_FROM_USER_IOCTL(initheap, + (drm_i915_mem_init_heap_t __user *) data, + sizeof(initheap)); + + heap = get_heap(dev_priv, initheap.region); + if (!heap) + return DRM_ERR(EFAULT); + + if (*heap) { + DRM_ERROR("heap already initialized?"); + return DRM_ERR(EFAULT); + } + + return init_heap(heap, initheap.start, initheap.size); +} diff -Nru a/drivers/char/drm/mga.h b/drivers/char/drm/mga.h --- a/drivers/char/drm/mga.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/mga.h 2004-09-06 16:37:55 -07:00 @@ -36,10 +36,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 1 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 #define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc." @@ -68,31 +64,5 @@ #define __HAVE_COUNTER6 _DRM_STAT_IRQ #define __HAVE_COUNTER7 _DRM_STAT_PRIMARY #define __HAVE_COUNTER8 _DRM_STAT_SECONDARY - -/* Driver customization: - */ -#define DRIVER_PRETAKEDOWN() do { \ - mga_do_cleanup_dma( dev ); \ -} while (0) - -/* DMA customization: - */ -#define __HAVE_DMA 1 -#define __HAVE_IRQ 1 -#define __HAVE_VBL_IRQ 1 -#define __HAVE_SHARED_IRQ 1 - -#define __HAVE_DMA_QUIESCENT 1 -#define DRIVER_DMA_QUIESCENT() do { \ - drm_mga_private_t *dev_priv = dev->dev_private; \ - return mga_do_wait_for_idle( dev_priv ); \ -} while (0) - -/* Buffer customization: - */ -#define DRIVER_BUF_PRIV_T drm_mga_buf_priv_t - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_mga_private_t *)((dev)->dev_private))->buffers #endif diff -Nru a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c --- a/drivers/char/drm/mga_dma.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/mga_dma.c 2004-09-06 16:37:54 -07:00 @@ -500,7 +500,7 @@ return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR( "failed to find mmio region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -508,7 +508,7 @@ mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->status, init->status_offset ); + dev_priv->status = drm_core_findmap(dev, init->status_offset); if(!dev_priv->status) { DRM_ERROR( "failed to find status page!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -516,8 +516,7 @@ mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - - DRM_FIND_MAP( dev_priv->warp, init->warp_offset ); + dev_priv->warp = drm_core_findmap(dev, init->warp_offset); if(!dev_priv->warp) { DRM_ERROR( "failed to find warp microcode region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -525,7 +524,7 @@ mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->primary, init->primary_offset ); + dev_priv->primary = drm_core_findmap(dev, init->primary_offset); if(!dev_priv->primary) { DRM_ERROR( "failed to find primary dma region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -533,8 +532,8 @@ mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset ); - if(!dev_priv->buffers) { + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + if(!dev->agp_buffer_map) { DRM_ERROR( "failed to find dma buffer region!\n" ); /* Assign dev_private so we can do cleanup. */ dev->dev_private = (void *)dev_priv; @@ -546,13 +545,13 @@ (drm_mga_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); - DRM_IOREMAP( dev_priv->warp, dev ); - DRM_IOREMAP( dev_priv->primary, dev ); - DRM_IOREMAP( dev_priv->buffers, dev ); + drm_core_ioremap( dev_priv->warp, dev ); + drm_core_ioremap( dev_priv->primary, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->warp->handle || !dev_priv->primary->handle || - !dev_priv->buffers->handle ) { + !dev->agp_buffer_map->handle ) { DRM_ERROR( "failed to ioremap agp regions!\n" ); /* Assign dev_private so we can do cleanup. */ dev->dev_private = (void *)dev_priv; @@ -631,23 +630,21 @@ { DRM_DEBUG( "\n" ); -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif if ( dev->dev_private ) { drm_mga_private_t *dev_priv = dev->dev_private; if ( dev_priv->warp != NULL ) - DRM_IOREMAPFREE( dev_priv->warp, dev ); + drm_core_ioremapfree( dev_priv->warp, dev ); if ( dev_priv->primary != NULL ) - DRM_IOREMAPFREE( dev_priv->primary, dev ); - if ( dev_priv->buffers != NULL ) - DRM_IOREMAPFREE( dev_priv->buffers, dev ); + drm_core_ioremapfree( dev_priv->primary, dev ); + if ( dev->agp_buffer_map != NULL ) + drm_core_ioremapfree( dev->agp_buffer_map, dev ); if ( dev_priv->head != NULL ) { mga_freelist_cleanup( dev ); @@ -799,4 +796,27 @@ DRM_COPY_TO_USER_IOCTL( argp, d, sizeof(d) ); return ret; +} + +static void mga_driver_pretakedown(drm_device_t *dev) +{ + mga_do_cleanup_dma( dev ); +} + +static int mga_driver_dma_quiescent(drm_device_t *dev) +{ + drm_mga_private_t *dev_priv = dev->dev_private; + return mga_do_wait_for_idle( dev_priv ); +} + +void mga_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL; + dev->fn_tbl.pretakedown = mga_driver_pretakedown; + dev->fn_tbl.dma_quiescent = mga_driver_dma_quiescent; + dev->fn_tbl.vblank_wait = mga_driver_vblank_wait; + dev->fn_tbl.irq_preinstall = mga_driver_irq_preinstall; + dev->fn_tbl.irq_postinstall = mga_driver_irq_postinstall; + dev->fn_tbl.irq_uninstall = mga_driver_irq_uninstall; + dev->fn_tbl.irq_handler = mga_driver_irq_handler; } diff -Nru a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c --- a/drivers/char/drm/mga_drv.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/mga_drv.c 2004-09-06 16:37:52 -07:00 @@ -51,3 +51,4 @@ #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" diff -Nru a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h --- a/drivers/char/drm/mga_drv.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/mga_drv.h 2004-09-06 16:37:54 -07:00 @@ -130,6 +130,12 @@ extern int mga_warp_install_microcode( drm_mga_private_t *dev_priv ); extern int mga_warp_init( drm_mga_private_t *dev_priv ); +extern int mga_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence); +extern irqreturn_t mga_driver_irq_handler( DRM_IRQ_ARGS ); +extern void mga_driver_irq_preinstall( drm_device_t *dev ); +extern void mga_driver_irq_postinstall( drm_device_t *dev ); +extern void mga_driver_irq_uninstall( drm_device_t *dev ); + #define mga_flush_write_combine() DRM_WRITEMEMORYBARRIER() #if defined(__linux__) && defined(__alpha__) diff -Nru a/drivers/char/drm/mga_irq.c b/drivers/char/drm/mga_irq.c --- a/drivers/char/drm/mga_irq.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/mga_irq.c 2004-09-06 16:37:50 -07:00 @@ -36,7 +36,7 @@ #include "mga_drm.h" #include "mga_drv.h" -irqreturn_t mga_irq_handler( DRM_IRQ_ARGS ) +irqreturn_t mga_driver_irq_handler( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_mga_private_t *dev_priv = @@ -56,7 +56,7 @@ return IRQ_NONE; } -int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence) +int mga_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) { unsigned int cur_vblank; int ret = 0; diff -Nru a/drivers/char/drm/r128.h b/drivers/char/drm/r128.h --- a/drivers/char/drm/r128.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/r128.h 2004-09-06 16:37:52 -07:00 @@ -36,13 +36,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 0 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 -#define __HAVE_SG 1 -#define __HAVE_PCI_DMA 1 - #define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc." #define DRIVER_NAME "r128" @@ -78,43 +71,5 @@ [DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 }, \ [DRM_IOCTL_NR(DRM_IOCTL_R128_GETPARAM)] = { r128_getparam, 1, 0 }, - -/* Driver customization: - */ -#define DRIVER_PRERELEASE() do { \ - if ( dev->dev_private ) { \ - drm_r128_private_t *dev_priv = dev->dev_private; \ - if ( dev_priv->page_flipping ) { \ - r128_do_cleanup_pageflip( dev ); \ - } \ - } \ -} while (0) - -#define DRIVER_PRETAKEDOWN() do { \ - r128_do_cleanup_cce( dev ); \ -} while (0) - -/* DMA customization: - */ -#define __HAVE_DMA 1 -#define __HAVE_IRQ 1 -#define __HAVE_VBL_IRQ 1 -#define __HAVE_SHARED_IRQ 1 - -#if 0 -/* GH: Remove this for now... */ -#define __HAVE_DMA_QUIESCENT 1 -#define DRIVER_DMA_QUIESCENT() do { \ - drm_r128_private_t *dev_priv = dev->dev_private; \ - return r128_do_cce_idle( dev_priv ); \ -} while (0) -#endif - -/* Buffer customization: - */ -#define DRIVER_BUF_PRIV_T drm_r128_buf_priv_t - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_r128_private_t *)((dev)->dev_private))->buffers #endif diff -Nru a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c --- a/drivers/char/drm/r128_cce.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/r128_cce.c 2004-09-06 16:37:51 -07:00 @@ -322,7 +322,7 @@ /* The manual (p. 2) says this address is in "VM space". This * means it's an offset from the start of AGP space. */ -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) ring_start = dev_priv->cce_ring->offset - dev->agp->base; else @@ -467,29 +467,29 @@ return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->cce_ring, init->ring_offset ); + dev_priv->cce_ring = drm_core_findmap(dev, init->ring_offset); if(!dev_priv->cce_ring) { DRM_ERROR("could not find cce ring region!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->ring_rptr, init->ring_rptr_offset ); + dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); if(!dev_priv->ring_rptr) { DRM_ERROR("could not find ring read pointer!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset ); - if(!dev_priv->buffers) { + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + if(!dev->agp_buffer_map) { DRM_ERROR("could not find dma buffer region!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); @@ -497,8 +497,7 @@ } if ( !dev_priv->is_pci ) { - DRM_FIND_MAP( dev_priv->agp_textures, - init->agp_textures_offset ); + dev_priv->agp_textures = drm_core_findmap(dev, init->agp_textures_offset); if(!dev_priv->agp_textures) { DRM_ERROR("could not find agp texture region!\n"); dev->dev_private = (void *)dev_priv; @@ -511,14 +510,14 @@ (drm_r128_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { - DRM_IOREMAP( dev_priv->cce_ring, dev ); - DRM_IOREMAP( dev_priv->ring_rptr, dev ); - DRM_IOREMAP( dev_priv->buffers, dev ); + drm_core_ioremap( dev_priv->cce_ring, dev ); + drm_core_ioremap( dev_priv->ring_rptr, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->cce_ring->handle || !dev_priv->ring_rptr->handle || - !dev_priv->buffers->handle) { + !dev->agp_buffer_map->handle) { DRM_ERROR("Could not ioremap agp regions!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); @@ -531,10 +530,10 @@ (void *)dev_priv->cce_ring->offset; dev_priv->ring_rptr->handle = (void *)dev_priv->ring_rptr->offset; - dev_priv->buffers->handle = (void *)dev_priv->buffers->offset; + dev->agp_buffer_map->handle = (void *)dev->agp_buffer_map->offset; } -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) dev_priv->cce_buffers_offset = dev->agp->base; else @@ -559,7 +558,7 @@ R128_WRITE( R128_LAST_DISPATCH_REG, dev_priv->sarea_priv->last_dispatch ); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( dev_priv->is_pci ) { #endif if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart, @@ -570,7 +569,7 @@ return DRM_ERR(ENOMEM); } R128_WRITE( R128_PCI_GART_PAGE, dev_priv->bus_pci_gart ); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP } #endif @@ -587,25 +586,23 @@ int r128_do_cleanup_cce( drm_device_t *dev ) { -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif if ( dev->dev_private ) { drm_r128_private_t *dev_priv = dev->dev_private; -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { if ( dev_priv->cce_ring != NULL ) - DRM_IOREMAPFREE( dev_priv->cce_ring, dev ); + drm_core_ioremapfree( dev_priv->cce_ring, dev ); if ( dev_priv->ring_rptr != NULL ) - DRM_IOREMAPFREE( dev_priv->ring_rptr, dev ); - if ( dev_priv->buffers != NULL ) - DRM_IOREMAPFREE( dev_priv->buffers, dev ); + drm_core_ioremapfree( dev_priv->ring_rptr, dev ); + if ( dev->agp_buffer_map != NULL ) + drm_core_ioremapfree( dev->agp_buffer_map, dev ); } else #endif { diff -Nru a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h --- a/drivers/char/drm/r128_drv.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/r128_drv.h 2004-09-06 16:37:55 -07:00 @@ -100,7 +100,6 @@ drm_local_map_t *mmio; drm_local_map_t *cce_ring; drm_local_map_t *ring_rptr; - drm_local_map_t *buffers; drm_local_map_t *agp_textures; } drm_r128_private_t; @@ -143,6 +142,12 @@ extern int r128_cce_stipple( DRM_IOCTL_ARGS ); extern int r128_cce_indirect( DRM_IOCTL_ARGS ); +extern int r128_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence); + +extern irqreturn_t r128_driver_irq_handler( DRM_IRQ_ARGS ); +extern void r128_driver_irq_preinstall( drm_device_t *dev ); +extern void r128_driver_irq_postinstall( drm_device_t *dev ); +extern void r128_driver_irq_uninstall( drm_device_t *dev ); /* Register definitions, register access macros and drmAddMap constants * for Rage 128 kernel driver. diff -Nru a/drivers/char/drm/r128_irq.c b/drivers/char/drm/r128_irq.c --- a/drivers/char/drm/r128_irq.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/r128_irq.c 2004-09-06 16:37:55 -07:00 @@ -36,7 +36,7 @@ #include "r128_drm.h" #include "r128_drv.h" -irqreturn_t r128_irq_handler( DRM_IRQ_ARGS ) +irqreturn_t r128_driver_irq_handler( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_r128_private_t *dev_priv = @@ -56,7 +56,7 @@ return IRQ_NONE; } -int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) +int r128_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) { unsigned int cur_vblank; int ret = 0; diff -Nru a/drivers/char/drm/r128_state.c b/drivers/char/drm/r128_state.c --- a/drivers/char/drm/r128_state.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/r128_state.c 2004-09-06 16:37:51 -07:00 @@ -667,7 +667,7 @@ */ if ( dwords & 1 ) { u32 *data = (u32 *) - ((char *)dev_priv->buffers->handle + ((char *)dev->agp_buffer_map->handle + buf->offset + start); data[dwords++] = cpu_to_le32( R128_CCE_PACKET2 ); } @@ -713,7 +713,7 @@ drm_r128_buf_priv_t *buf_priv = buf->dev_private; drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; int format = sarea_priv->vc_format; - int offset = dev_priv->buffers->offset - dev_priv->cce_buffers_offset; + int offset = dev->agp_buffer_map->offset - dev_priv->cce_buffers_offset; int prim = buf_priv->prim; u32 *data; int dwords; @@ -733,7 +733,7 @@ dwords = (end - start + 3) / sizeof(u32); - data = (u32 *)((char *)dev_priv->buffers->handle + data = (u32 *)((char *)dev->agp_buffer_map->handle + buf->offset + start); data[0] = cpu_to_le32( CCE_PACKET3( R128_3D_RNDR_GEN_INDX_PRIM, @@ -857,7 +857,7 @@ dwords = (blit->width * blit->height) >> dword_shift; - data = (u32 *)((char *)dev_priv->buffers->handle + buf->offset); + data = (u32 *)((char *)dev->agp_buffer_map->handle + buf->offset); data[0] = cpu_to_le32( CCE_PACKET3( R128_CNTL_HOSTDATA_BLT, dwords + 6 ) ); data[1] = cpu_to_le32( (R128_GMC_DST_PITCH_OFFSET_CNTL | @@ -1693,4 +1693,32 @@ } return 0; +} + +static void r128_driver_prerelease(drm_device_t *dev, DRMFILE filp) +{ + if ( dev->dev_private ) { + drm_r128_private_t *dev_priv = dev->dev_private; + if ( dev_priv->page_flipping ) { + r128_do_cleanup_pageflip( dev ); + } + } +} + +static void r128_driver_pretakedown(drm_device_t *dev) +{ + r128_do_cleanup_cce( dev ); +} + +void r128_driver_register_fns(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL; + dev->dev_priv_size = sizeof(drm_r128_buf_priv_t); + dev->fn_tbl.prerelease = r128_driver_prerelease; + dev->fn_tbl.pretakedown = r128_driver_pretakedown; + dev->fn_tbl.vblank_wait = r128_driver_vblank_wait; + dev->fn_tbl.irq_preinstall = r128_driver_irq_preinstall; + dev->fn_tbl.irq_postinstall = r128_driver_irq_postinstall; + dev->fn_tbl.irq_uninstall = r128_driver_irq_uninstall; + dev->fn_tbl.irq_handler = r128_driver_irq_handler; } diff -Nru a/drivers/char/drm/radeon.h b/drivers/char/drm/radeon.h --- a/drivers/char/drm/radeon.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/radeon.h 2004-09-06 16:37:54 -07:00 @@ -37,12 +37,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 0 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 -#define __HAVE_SG 1 -#define __HAVE_PCI_DMA 1 #define DRIVER_AUTHOR "Gareth Hughes, Keith Whitwell, others." @@ -114,60 +108,5 @@ [DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_EMIT)] = { radeon_irq_emit, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_RADEON_IRQ_WAIT)] = { radeon_irq_wait, 1, 0 }, \ [DRM_IOCTL_NR(DRM_IOCTL_RADEON_SETPARAM)] = { radeon_cp_setparam, 1, 0 }, \ - -#define DRIVER_FILE_FIELDS \ - int64_t radeon_fb_delta; \ - -#define DRIVER_OPEN_HELPER( filp_priv, dev ) \ -do { \ - drm_radeon_private_t *dev_priv = dev->dev_private; \ - if ( dev_priv ) \ - filp_priv->radeon_fb_delta = dev_priv->fb_location; \ - else \ - filp_priv->radeon_fb_delta = 0; \ -} while( 0 ) - -/* When a client dies: - * - Check for and clean up flipped page state - * - Free any alloced GART memory. - * - * DRM infrastructure takes care of reclaiming dma buffers. - */ -#define DRIVER_PRERELEASE() \ -do { \ - if ( dev->dev_private ) { \ - drm_radeon_private_t *dev_priv = dev->dev_private; \ - if ( dev_priv->page_flipping ) { \ - radeon_do_cleanup_pageflip( dev ); \ - } \ - radeon_mem_release( filp, dev_priv->gart_heap ); \ - radeon_mem_release( filp, dev_priv->fb_heap ); \ - } \ -} while (0) - -/* When the last client dies, shut down the CP and free dev->dev_priv. - */ -/* #define __HAVE_RELEASE 1 */ -#define DRIVER_PRETAKEDOWN() \ -do { \ - radeon_do_release( dev ); \ -} while (0) - - - -/* DMA customization: - */ -#define __HAVE_DMA 1 -#define __HAVE_IRQ 1 -#define __HAVE_VBL_IRQ 1 -#define __HAVE_SHARED_IRQ 1 - - -/* Buffer customization: - */ -#define DRIVER_BUF_PRIV_T drm_radeon_buf_priv_t - -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_radeon_private_t *)((dev)->dev_private))->buffers #endif diff -Nru a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c --- a/drivers/char/drm/radeon_cp.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/radeon_cp.c 2004-09-06 16:37:51 -07:00 @@ -858,7 +858,7 @@ ( ( dev_priv->gart_vm_start - 1 ) & 0xffff0000 ) | ( dev_priv->fb_location >> 16 ) ); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { RADEON_WRITE( RADEON_MC_AGP_LOCATION, (((dev_priv->gart_vm_start - 1 + @@ -885,7 +885,7 @@ SET_RING_HEAD( dev_priv, cur_read_ptr ); dev_priv->ring.tail = cur_read_ptr; -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR, dev_priv->ring_rptr->offset @@ -1118,29 +1118,29 @@ return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->cp_ring, init->ring_offset ); + dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset); if(!dev_priv->cp_ring) { DRM_ERROR("could not find cp ring region!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->ring_rptr, init->ring_rptr_offset ); + dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); if(!dev_priv->ring_rptr) { DRM_ERROR("could not find ring read pointer!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset ); - if(!dev_priv->buffers) { + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); + if(!dev->agp_buffer_map) { DRM_ERROR("could not find dma buffer region!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); @@ -1148,7 +1148,7 @@ } if ( init->gart_textures_offset ) { - DRM_FIND_MAP( dev_priv->gart_textures, init->gart_textures_offset ); + dev_priv->gart_textures = drm_core_findmap(dev, init->gart_textures_offset); if ( !dev_priv->gart_textures ) { DRM_ERROR("could not find GART texture region!\n"); dev->dev_private = (void *)dev_priv; @@ -1161,14 +1161,14 @@ (drm_radeon_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { - DRM_IOREMAP( dev_priv->cp_ring, dev ); - DRM_IOREMAP( dev_priv->ring_rptr, dev ); - DRM_IOREMAP( dev_priv->buffers, dev ); + drm_core_ioremap( dev_priv->cp_ring, dev ); + drm_core_ioremap( dev_priv->ring_rptr, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->cp_ring->handle || !dev_priv->ring_rptr->handle || - !dev_priv->buffers->handle) { + !dev->agp_buffer_map->handle) { DRM_ERROR("could not find ioremap agp regions!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); @@ -1181,14 +1181,14 @@ (void *)dev_priv->cp_ring->offset; dev_priv->ring_rptr->handle = (void *)dev_priv->ring_rptr->offset; - dev_priv->buffers->handle = (void *)dev_priv->buffers->offset; + dev->agp_buffer_map->handle = (void *)dev->agp_buffer_map->offset; DRM_DEBUG( "dev_priv->cp_ring->handle %p\n", dev_priv->cp_ring->handle ); DRM_DEBUG( "dev_priv->ring_rptr->handle %p\n", dev_priv->ring_rptr->handle ); - DRM_DEBUG( "dev_priv->buffers->handle %p\n", - dev_priv->buffers->handle ); + DRM_DEBUG( "dev->agp_buffer_map->handle %p\n", + dev->agp_buffer_map->handle ); } dev_priv->fb_location = ( RADEON_READ( RADEON_MC_FB_LOCATION ) @@ -1211,14 +1211,14 @@ dev_priv->gart_vm_start = dev_priv->fb_location + RADEON_READ( RADEON_CONFIG_APER_SIZE ); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) - dev_priv->gart_buffers_offset = (dev_priv->buffers->offset + dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset - dev->agp->base + dev_priv->gart_vm_start); else #endif - dev_priv->gart_buffers_offset = (dev_priv->buffers->offset + dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset - dev->sg->handle + dev_priv->gart_vm_start); @@ -1240,7 +1240,7 @@ dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK; -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { /* Turn off PCI GART */ radeon_set_pcigart( dev_priv, 0 ); @@ -1275,25 +1275,23 @@ { DRM_DEBUG( "\n" ); -#if __HAVE_IRQ /* Make sure interrupts are disabled here because the uninstall ioctl * may not have been called from userspace and after dev_private * is freed, it's too late. */ if ( dev->irq_enabled ) DRM(irq_uninstall)(dev); -#endif if ( dev->dev_private ) { drm_radeon_private_t *dev_priv = dev->dev_private; -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { if ( dev_priv->cp_ring != NULL ) - DRM_IOREMAPFREE( dev_priv->cp_ring, dev ); + drm_core_ioremapfree( dev_priv->cp_ring, dev ); if ( dev_priv->ring_rptr != NULL ) - DRM_IOREMAPFREE( dev_priv->ring_rptr, dev ); - if ( dev_priv->buffers != NULL ) - DRM_IOREMAPFREE( dev_priv->buffers, dev ); + drm_core_ioremapfree( dev_priv->ring_rptr, dev ); + if ( dev->agp_buffer_map != NULL ) + drm_core_ioremapfree( dev->agp_buffer_map, dev ); } else #endif { @@ -1329,7 +1327,7 @@ DRM_DEBUG("Starting radeon_do_resume_cp()\n"); -#if __REALLY_HAVE_AGP +#if __OS_HAS_AGP if ( !dev_priv->is_pci ) { /* Turn off PCI GART */ radeon_set_pcigart( dev_priv, 0 ); diff -Nru a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h --- a/drivers/char/drm/radeon_drv.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/drm/radeon_drv.h 2004-09-06 16:37:53 -07:00 @@ -60,6 +60,9 @@ u32 se_cntl; } drm_radeon_depth_clear_t; +struct drm_radeon_driver_file_fields { + int64_t radeon_fb_delta; +}; struct mem_block { struct mem_block *next; @@ -138,7 +141,6 @@ drm_local_map_t *mmio; drm_local_map_t *cp_ring; drm_local_map_t *ring_rptr; - drm_local_map_t *buffers; drm_local_map_t *gart_textures; struct mem_block *gart_heap; @@ -203,6 +205,11 @@ extern int radeon_emit_irq(drm_device_t *dev); extern void radeon_do_release(drm_device_t *dev); +extern int radeon_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence); +extern irqreturn_t radeon_driver_irq_handler( DRM_IRQ_ARGS ); +extern void radeon_driver_irq_preinstall( drm_device_t *dev ); +extern void radeon_driver_irq_postinstall( drm_device_t *dev ); +extern void radeon_driver_irq_uninstall( drm_device_t *dev ); /* Flags for stats.boxes */ diff -Nru a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c --- a/drivers/char/drm/radeon_irq.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/radeon_irq.c 2004-09-06 16:37:55 -07:00 @@ -54,7 +54,7 @@ * tied to dma at all, this is just a hangover from dri prehistory. */ -irqreturn_t DRM(irq_handler)( DRM_IRQ_ARGS ) +irqreturn_t radeon_driver_irq_handler( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *) arg; drm_radeon_private_t *dev_priv = @@ -141,7 +141,7 @@ } -int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) +int radeon_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) { drm_radeon_private_t *dev_priv = (drm_radeon_private_t *)dev->dev_private; diff -Nru a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c --- a/drivers/char/drm/radeon_state.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/drm/radeon_state.c 2004-09-06 16:37:54 -07:00 @@ -43,12 +43,14 @@ drm_file_t *filp_priv, u32 *offset ) { u32 off = *offset; + struct drm_radeon_driver_file_fields *radeon_priv; if ( off >= dev_priv->fb_location && off < ( dev_priv->gart_vm_start + dev_priv->gart_size ) ) return 0; - off += filp_priv->radeon_fb_delta; + radeon_priv = filp_priv->driver_priv; + off += radeon_priv->radeon_fb_delta; DRM_DEBUG( "offset fixed up to 0x%x\n", off ); @@ -1247,7 +1249,7 @@ */ if ( dwords & 1 ) { u32 *data = (u32 *) - ((char *)dev_priv->buffers->handle + ((char *)dev->agp_buffer_map->handle + buf->offset + start); data[dwords++] = RADEON_CP_PACKET2; } @@ -1301,7 +1303,7 @@ dwords = (prim->finish - prim->start + 3) / sizeof(u32); - data = (u32 *)((char *)dev_priv->buffers->handle + + data = (u32 *)((char *)dev->agp_buffer_map->handle + elt_buf->offset + prim->start); data[0] = CP_PACKET3( RADEON_3D_RNDR_GEN_INDX_PRIM, dwords-2 ); @@ -1445,7 +1447,7 @@ /* Dispatch the indirect buffer. */ - buffer = (u32*)((char*)dev_priv->buffers->handle + buf->offset); + buffer = (u32*)((char*)dev->agp_buffer_map->handle + buf->offset); dwords = size / 4; buffer[0] = CP_PACKET3( RADEON_CNTL_HOSTDATA_BLT, dwords + 6 ); buffer[1] = (RADEON_GMC_DST_PITCH_OFFSET_CNTL | @@ -2525,6 +2527,7 @@ drm_radeon_private_t *dev_priv = dev->dev_private; drm_file_t *filp_priv; drm_radeon_setparam_t sp; + struct drm_radeon_driver_file_fields *radeon_priv; if ( !dev_priv ) { DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); @@ -2538,7 +2541,8 @@ switch( sp.param ) { case RADEON_SETPARAM_FB_LOCATION: - filp_priv->radeon_fb_delta = dev_priv->fb_location - sp.value; + radeon_priv = filp_priv->driver_priv; + radeon_priv->radeon_fb_delta = dev_priv->fb_location - sp.value; break; default: DRM_DEBUG( "Invalid parameter %d\n", sp.param ); @@ -2546,4 +2550,68 @@ } return 0; +} + +/* When a client dies: + * - Check for and clean up flipped page state + * - Free any alloced GART memory. + * + * DRM infrastructure takes care of reclaiming dma buffers. + */ +static void radeon_driver_prerelease(drm_device_t *dev, DRMFILE filp) +{ + if ( dev->dev_private ) { + drm_radeon_private_t *dev_priv = dev->dev_private; + if ( dev_priv->page_flipping ) { + radeon_do_cleanup_pageflip( dev ); + } + radeon_mem_release( filp, dev_priv->gart_heap ); + radeon_mem_release( filp, dev_priv->fb_heap ); + } +} + +static void radeon_driver_pretakedown(drm_device_t *dev) +{ + radeon_do_release(dev); +} + +static int radeon_driver_open_helper(drm_device_t *dev, drm_file_t *filp_priv) +{ + drm_radeon_private_t *dev_priv = dev->dev_private; + struct drm_radeon_driver_file_fields *radeon_priv; + + radeon_priv = (struct drm_radeon_driver_file_fields *)DRM(alloc)(sizeof(*radeon_priv), DRM_MEM_FILES); + + if (!radeon_priv) + return -ENOMEM; + + filp_priv->driver_priv = radeon_priv; + if ( dev_priv ) + radeon_priv->radeon_fb_delta = dev_priv->fb_location; + else + radeon_priv->radeon_fb_delta = 0; + return 0; +} + + +static void radeon_driver_free_filp_priv(drm_device_t *dev, drm_file_t *filp_priv) +{ + struct drm_radeon_driver_file_fields *radeon_priv = filp_priv->driver_priv; + + DRM(free)(radeon_priv, sizeof(*radeon_priv), DRM_MEM_FILES); +} + +void radeon_driver_register_fns(struct drm_device *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL; + dev->dev_priv_size = sizeof(drm_radeon_buf_priv_t); + dev->fn_tbl.prerelease = radeon_driver_prerelease; + dev->fn_tbl.pretakedown = radeon_driver_pretakedown; + dev->fn_tbl.open_helper = radeon_driver_open_helper; + dev->fn_tbl.free_filp_priv = radeon_driver_free_filp_priv; + dev->fn_tbl.vblank_wait = radeon_driver_vblank_wait; + dev->fn_tbl.irq_preinstall = radeon_driver_irq_preinstall; + dev->fn_tbl.irq_postinstall = radeon_driver_irq_postinstall; + dev->fn_tbl.irq_uninstall = radeon_driver_irq_uninstall; + dev->fn_tbl.irq_handler = radeon_driver_irq_handler; } diff -Nru a/drivers/char/drm/sis.h b/drivers/char/drm/sis.h --- a/drivers/char/drm/sis.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/drm/sis.h 2004-09-06 16:37:55 -07:00 @@ -41,10 +41,6 @@ /* General customization: */ -#define __HAVE_AGP 1 -#define __MUST_HAVE_AGP 0 -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 #define DRIVER_AUTHOR "SIS" #define DRIVER_NAME "sis" @@ -63,16 +59,5 @@ [DRM_IOCTL_NR(DRM_IOCTL_SIS_FB_INIT)] = { sis_fb_init, 1, 1 } #define __HAVE_COUNTERS 5 - -/* Buffer customization: - */ -#define DRIVER_AGP_BUFFERS_MAP( dev ) \ - ((drm_sis_private_t *)((dev)->dev_private))->buffers - -extern int sis_init_context(int context); -extern int sis_final_context(int context); - -#define DRIVER_CTX_CTOR sis_init_context -#define DRIVER_CTX_DTOR sis_final_context #endif diff -Nru a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c --- a/drivers/char/drm/sis_drv.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/drm/sis_drv.c 2004-09-06 16:37:50 -07:00 @@ -40,9 +40,12 @@ #include "drm_drv.h" #include "drm_fops.h" #include "drm_init.h" +#include "drm_irq.h" #include "drm_ioctl.h" #include "drm_lock.h" #include "drm_memory.h" #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" + diff -Nru a/drivers/char/drm/sis_drv.h b/drivers/char/drm/sis_drv.h --- a/drivers/char/drm/sis_drv.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/drm/sis_drv.h 2004-09-06 16:37:51 -07:00 @@ -31,8 +31,6 @@ #include "sis_ds.h" typedef struct drm_sis_private { - drm_map_t *buffers; - memHeap_t *AGPHeap; memHeap_t *FBHeap; } drm_sis_private_t; diff -Nru a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c --- a/drivers/char/drm/sis_mm.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/sis_mm.c 2004-09-06 16:37:53 -07:00 @@ -90,9 +90,10 @@ { drm_sis_mem_t fb; struct sis_memreq req; + drm_sis_mem_t __user *argp = (void __user *)data; int retval = 0; - DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_mem_t *)data, sizeof(fb)); + DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); req.size = fb.size; sis_malloc(&req); @@ -111,7 +112,7 @@ fb.free = 0; } - DRM_COPY_TO_USER_IOCTL((drm_sis_mem_t *)data, fb, sizeof(fb)); + DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb)); DRM_DEBUG("alloc fb, size = %d, offset = %d\n", fb.size, req.offset); @@ -123,7 +124,7 @@ drm_sis_mem_t fb; int retval = 0; - DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_mem_t *)data, sizeof(fb)); + DRM_COPY_FROM_USER_IOCTL(fb, (drm_sis_mem_t __user *)data, sizeof(fb)); if (!fb.free) return DRM_ERR(EINVAL); @@ -325,7 +326,7 @@ return 0; } -int sis_init_context(int context) +int sis_init_context(struct drm_device *dev, int context) { int i; @@ -357,7 +358,7 @@ return 1; } -int sis_final_context(int context) +int sis_final_context(struct drm_device *dev, int context) { int i; @@ -402,4 +403,11 @@ } return 1; +} + +void DRM(driver_register_fns)(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR; + dev->fn_tbl.context_ctor = sis_init_context; + dev->fn_tbl.context_dtor = sis_final_context; } diff -Nru a/drivers/char/drm/tdfx.h b/drivers/char/drm/tdfx.h --- a/drivers/char/drm/tdfx.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/tdfx.h 2004-09-06 16:37:53 -07:00 @@ -36,8 +36,6 @@ /* General customization: */ -#define __HAVE_MTRR 1 -#define __HAVE_CTX_BITMAP 1 #define DRIVER_AUTHOR "VA Linux Systems Inc." diff -Nru a/drivers/char/drm/tdfx_drv.c b/drivers/char/drm/tdfx_drv.c --- a/drivers/char/drm/tdfx_drv.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/drm/tdfx_drv.c 2004-09-06 16:37:53 -07:00 @@ -34,6 +34,7 @@ #include "tdfx.h" #include "drmP.h" +#include "drm_agpsupport.h" #include "drm_auth.h" #include "drm_bufs.h" #include "drm_context.h" @@ -44,8 +45,16 @@ #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" +#include "drm_irq.h" #include "drm_lock.h" #include "drm_memory.h" #include "drm_proc.h" #include "drm_vm.h" #include "drm_stub.h" +#include "drm_scatter.h" + +void DRM(driver_register_fns)(drm_device_t *dev) +{ + dev->driver_features = DRIVER_USE_MTRR; +} + diff -Nru a/drivers/char/ds1620.c b/drivers/char/ds1620.c --- a/drivers/char/ds1620.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/ds1620.c 2004-09-06 16:37:50 -07:00 @@ -373,8 +373,7 @@ th_start.hi = 1; ds1620_write_state(&th_start); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(2*HZ); + msleep(2000); ds1620_write_state(&th); diff -Nru a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c --- a/drivers/char/dsp56k.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/dsp56k.c 2004-09-06 16:37:52 -07:00 @@ -58,12 +58,6 @@ #define DSP56K_TRANSMIT (dsp56k_host_interface.isr & DSP56K_ISR_TXDE) #define DSP56K_RECEIVE (dsp56k_host_interface.isr & DSP56K_ISR_RXDF) -#define wait_some(n) \ -{ \ - set_current_state(TASK_INTERRUPTIBLE); \ - schedule_timeout(n); \ -} - #define handshake(count, maxio, timeout, ENABLE, f) \ { \ long i, t, m; \ @@ -71,13 +65,13 @@ m = min_t(unsigned long, count, maxio); \ for (i = 0; i < m; i++) { \ for (t = 0; t < timeout && !ENABLE; t++) \ - wait_some(HZ/50); \ + msleep(20); \ if(!ENABLE) \ return -EIO; \ f; \ } \ count -= m; \ - if (m == maxio) wait_some(HZ/50); \ + if (m == maxio) msleep(20); \ } \ } @@ -85,7 +79,7 @@ { \ int t; \ for(t = 0; t < n && !DSP56K_TRANSMIT; t++) \ - wait_some(HZ/100); \ + msleep(10); \ if(!DSP56K_TRANSMIT) { \ return -EIO; \ } \ @@ -95,7 +89,7 @@ { \ int t; \ for(t = 0; t < n && !DSP56K_RECEIVE; t++) \ - wait_some(HZ/100); \ + msleep(10); \ if(!DSP56K_RECEIVE) { \ return -EIO; \ } \ diff -Nru a/drivers/char/ec3104_keyb.c b/drivers/char/ec3104_keyb.c --- a/drivers/char/ec3104_keyb.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/ec3104_keyb.c 2004-09-06 16:37:52 -07:00 @@ -412,7 +412,7 @@ k->last_msr = 0; for (;;) { - schedule_timeout(HZ/10); + msleep(100); msr = ctrl_inb(EC3104_SER4_MSR); diff -Nru a/drivers/char/epca.c b/drivers/char/epca.c --- a/drivers/char/epca.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/epca.c 2004-09-06 16:37:53 -07:00 @@ -74,7 +74,6 @@ #define DIGIINFOMAJOR 35 /* For Digi specific ioctl */ -#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAXCARDS 7 #define epcaassert(x, msg) if (!(x)) epca_error(__LINE__, msg) @@ -826,7 +825,7 @@ bytesAvailable will then take on this newly calculated value. ---------------------------------------------------------------------- */ - bytesAvailable = MIN(dataLen, bytesAvailable); + bytesAvailable = min(dataLen, bytesAvailable); /* First we read the data in from the file system into a temp buffer */ @@ -912,7 +911,7 @@ space; reduce the amount of data to fit the space. ---------------------------------------------------------------------- */ - bytesAvailable = MIN(remain, bytesAvailable); + bytesAvailable = min(remain, bytesAvailable); txwinon(ch); while (bytesAvailable > 0) @@ -923,7 +922,7 @@ data copy fills to the end of card buffer. ------------------------------------------------------------------- */ - dataLen = MIN(bytesAvailable, dataLen); + dataLen = min(bytesAvailable, dataLen); memcpy(ch->txptr + head, buf, dataLen); buf += dataLen; head += dataLen; diff -Nru a/drivers/char/esp.c b/drivers/char/esp.c --- a/drivers/char/esp.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/esp.c 2004-09-06 16:37:50 -07:00 @@ -19,7 +19,7 @@ * * rs_set_termios fixed to look also for changes of the input * flags INPCK, BRKINT, PARMRK, IGNPAR and IGNBRK. - * Bernd Anhäupl 05/17/96. + * Bernd Anh�pl 05/17/96. * * --- End of notices from serial.c --- * @@ -140,7 +140,7 @@ static void change_speed(struct esp_struct *info); static void rs_wait_until_sent(struct tty_struct *, int); - + /* * The ESP card has a clock rate of 14.7456 MHz (that is, 2**ESPC_SCALE * times the normal 1.8432 Mhz clock of most serial boards). @@ -149,10 +149,6 @@ /* Standard COM flags (except for COM4, because of the 8514 problem) */ #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) - -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif /* * tmp_buf is used as a temporary buffer by serial_write. We need to diff -Nru a/drivers/char/ftape/lowlevel/ftape-calibr.c b/drivers/char/ftape/lowlevel/ftape-calibr.c --- a/drivers/char/ftape/lowlevel/ftape-calibr.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/ftape/lowlevel/ftape-calibr.c 2004-09-06 16:37:51 -07:00 @@ -31,7 +31,10 @@ #include #if defined(__alpha__) # include -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(__x86_64__) +# include +# include +#elif defined(__i386__) # include #endif #include @@ -45,7 +48,7 @@ # error Ftape is not implemented for this architecture! #endif -#if defined(__alpha__) +#if defined(__alpha__) || defined(__x86_64__) static unsigned long ps_per_cycle = 0; #endif @@ -72,7 +75,18 @@ asm volatile ("rpcc %0" : "=r" (r)); return r; -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(__x86_64__) + unsigned long r; + rdtscl(r); + return r; +#elif defined(__i386__) + +/* + * Note that there is some time between counter underflowing and jiffies + * increasing, so the code below won't always give correct output. + * -Vojtech + */ + unsigned long flags; __u16 lo; __u16 hi; @@ -89,9 +103,9 @@ static unsigned int short_ftape_timestamp(void) { -#if defined(__alpha__) +#if defined(__alpha__) || defined(__x86_64__) return ftape_timestamp(); -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(__i386__) unsigned int count; unsigned long flags; @@ -106,9 +120,9 @@ static unsigned int diff(unsigned int t0, unsigned int t1) { -#if defined(__alpha__) - return (t1 <= t0) ? t1 + (1UL << 32) - t0 : t1 - t0; -#elif defined(__i386__) || defined(__x86_64__) +#if defined(__alpha__) || defined(__x86_64__) + return (t1 - t0); +#elif defined(__i386__) /* * This is tricky: to work for both short and full ftape_timestamps * we'll have to discriminate between these. @@ -122,9 +136,9 @@ static unsigned int usecs(unsigned int count) { -#if defined(__alpha__) +#if defined(__alpha__) || defined(__x86_64__) return (ps_per_cycle * count) / 1000000UL; -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(__i386__) return (10000 * count) / ((CLOCK_TICK_RATE + 50) / 100); #endif } @@ -163,38 +177,13 @@ static void init_clock(void) { -#if defined(__i386__) || defined(__x86_64__) - unsigned int t; - int i; TRACE_FUN(ft_t_any); - /* Haven't studied on why, but there sometimes is a problem - * with the tick timer readout. The two bytes get swapped. - * This hack solves that problem by doing one extra input. - */ - for (i = 0; i < 1000; ++i) { - t = short_ftape_timestamp(); - if (t > LATCH) { - inb_p(0x40); /* get in sync again */ - TRACE(ft_t_warn, "clock counter fixed"); - break; - } - } +#if defined(__x86_64__) + ps_per_cycle = 1000000000UL / cpu_khz; #elif defined(__alpha__) -#if CONFIG_FT_ALPHA_CLOCK == 0 -#error You must define and set CONFIG_FT_ALPHA_CLOCK in 'make config' ! -#endif extern struct hwrpb_struct *hwrpb; - TRACE_FUN(ft_t_any); - - if (hwrpb->cycle_freq != 0) { - ps_per_cycle = (1000*1000*1000*1000UL) / hwrpb->cycle_freq; - } else { - /* - * HELP: Linux 2.0.x doesn't set cycle_freq on my noname ! - */ - ps_per_cycle = (1000*1000*1000*1000UL) / CONFIG_FT_ALPHA_CLOCK; - } + ps_per_cycle = (1000*1000*1000*1000UL) / hwrpb->cycle_freq; #endif TRACE_EXIT; } @@ -213,7 +202,7 @@ unsigned int tc = 0; unsigned int count; unsigned int time; -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) unsigned int old_tc = 0; unsigned int old_count = 1; unsigned int old_time = 1; @@ -255,7 +244,7 @@ tc = (1000 * time) / (count - 1); TRACE(ft_t_any, "once:%3d us,%6d times:%6d us, TC:%5d ns", usecs(once), count - 1, usecs(multiple), tc); -#if defined(__alpha__) +#if defined(__alpha__) || defined(__x86_64__) /* * Increase the calibration count exponentially until the * calibration time exceeds 100 ms. @@ -263,7 +252,7 @@ if (time >= 100*1000) { break; } -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(__i386__) /* * increase the count until the resulting time nears 2/HZ, * then the tc will drop sharply because we lose LATCH counts. diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c --- a/drivers/char/hpet.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/hpet.c 2004-09-06 16:37:53 -07:00 @@ -789,6 +789,7 @@ size_t siz; struct hpet *hpet; static struct hpets *last __initdata = (struct hpets *)0; + unsigned long ns; /* * hpet_alloc can be called by platform dependent code. @@ -840,6 +841,18 @@ hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >> HPET_COUNTER_CLK_PERIOD_SHIFT; + printk(KERN_INFO "hpet%d: at MMIO 0x%p, IRQ%s", + hpetp->hp_which, hpet, hpetp->hp_ntimer > 1 ? "s" : ""); + for (i = 0; i < hpetp->hp_ntimer; i++) + printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); + printk("\n"); + + ns = hpetp->hp_period; /* femptoseconds, 10^-15 */ + do_div(ns, 1000000); /* convert to nanoseconds, 10^-9 */ + printk(KERN_INFO "hpet%d: %ldns tick, %d %d-bit timers\n", + hpetp->hp_which, ns, hpetp->hp_ntimer, + cap & HPET_COUNTER_SIZE_MASK ? 64 : 32); + mcfg = readq(&hpet->hpet_config); if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) { write_counter(0L, &hpet->hpet_mc); @@ -946,7 +959,6 @@ static struct acpi_driver hpet_acpi_driver __initdata = { .name = "hpet", - .class = "", .ids = "PNP0103", .ops = { .add = hpet_acpi_add, diff -Nru a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c --- a/drivers/char/hvc_console.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/hvc_console.c 2004-09-06 16:37:54 -07:00 @@ -1,6 +1,11 @@ /* * Copyright (C) 2001 Anton Blanchard , IBM * Copyright (C) 2001 Paul Mackerras , IBM + * Copyright (C) 2004 Benjamin Herrenschmidt , IBM Corp. + * Copyright (C) 2004 IBM Corporation + * + * Additional Author(s): + * Ryan S. Arnold * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,38 +22,51 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include #include +#include +#include +#include +#include +#include #include -#include #include -#include #include #include #include #include -#include -#include #include -#include - -extern int hvc_count(int *); -extern int hvc_get_chars(int index, char *buf, int count); -extern int hvc_put_chars(int index, const char *buf, int count); +#include +#include +#include #define HVC_MAJOR 229 #define HVC_MINOR 0 -#define MAX_NR_HVC_CONSOLES 4 - #define TIMEOUT ((HZ + 99) / 100) +/* + * Wait this long per iteration while trying to push buffered data to the + * hypervisor before allowing the tty to complete a close operation. + */ +#define HVC_CLOSE_WAIT (HZ/100) /* 1/10 of a second */ + +/* + * The Linux TTY code does not support dynamic addition of tty derived devices + * so we need to know how many tty devices we might need when space is allocated + * for the tty device. Since this driver supports hotplug of vty adapters we + * need to make sure we have enough allocated. + */ +#define HVC_ALLOC_TTY_ADAPTERS 8 + static struct tty_driver *hvc_driver; -static int hvc_offset; #ifdef CONFIG_MAGIC_SYSRQ static int sysrq_pressed; #endif #define N_OUTBUF 16 +#define N_INBUF 16 #define __ALIGNED__ __attribute__((__aligned__(8))) @@ -60,59 +78,244 @@ int do_wakeup; char outbuf[N_OUTBUF] __ALIGNED__; int n_outbuf; + uint32_t vtermno; + int irq_requested; + int irq; + struct list_head next; + struct kobject kobj; /* ref count & hvc_struct lifetime */ + struct vio_dev *vdev; }; -struct hvc_struct hvc_struct[MAX_NR_HVC_CONSOLES]; +/* dynamic list of hvc_struct instances */ +static struct list_head hvc_structs = LIST_HEAD_INIT(hvc_structs); -static int hvc_open(struct tty_struct *tty, struct file * filp) +/* + * Protect the list of hvc_struct instances from inserts and removals during + * list traversal. + */ +static spinlock_t hvc_structs_lock = SPIN_LOCK_UNLOCKED; + +/* + * Initial console vtermnos for console API usage prior to full console + * initialization. Any vty adapter outside this range will not have usable + * console interfaces but can still be used as a tty device. This has to be + * static because kmalloc will not work during early console init. + */ +static uint32_t vtermnos[MAX_NR_HVC_CONSOLES]; + +/* Used for accounting purposes */ +static int num_vterms = 0; + +static struct task_struct *hvc_task; + +/* + * This value is used to associate a tty->index value to a hvc_struct based + * upon order of exposure via hvc_probe(). + */ +static int hvc_count = -1; + +/* Picks up late kicks after list walk but before schedule() */ +static int hvc_kicked; + +/* Wake the sleeping khvcd */ +static void hvc_kick(void) +{ + hvc_kicked = 1; + wake_up_process(hvc_task); +} + +/* + * NOTE: This API isn't used if the console adapter doesn't support interrupts. + * In this case the console is poll driven. + */ +static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +{ + hvc_kick(); + return IRQ_HANDLED; +} + +static void hvc_unthrottle(struct tty_struct *tty) +{ + hvc_kick(); +} + +/* + * Do not call this function with either the hvc_strucst_lock or the hvc_struct + * lock held. If successful, this function increments the kobject reference + * count against the target hvc_struct so it should be released when finished. + */ +struct hvc_struct *hvc_get_by_index(int index) { - int line = tty->index; struct hvc_struct *hp; unsigned long flags; - if (line < 0 || line >= MAX_NR_HVC_CONSOLES) + spin_lock(&hvc_structs_lock); + + list_for_each_entry(hp, &hvc_structs, next) { + spin_lock_irqsave(&hp->lock, flags); + if (hp->index == index) { + kobject_get(&hp->kobj); + spin_unlock_irqrestore(&hp->lock, flags); + spin_unlock(&hvc_structs_lock); + return hp; + } + spin_unlock_irqrestore(&hp->lock, flags); + } + hp = NULL; + + spin_unlock(&hvc_structs_lock); + return hp; +} + +/* + * The TTY interface won't be used until after the vio layer has exposed the vty + * adapter to the kernel. + */ +static int hvc_open(struct tty_struct *tty, struct file * filp) +{ + struct hvc_struct *hp; + unsigned long flags; + int irq = NO_IRQ; + int rc = 0; + struct kobject *kobjp; + + /* Auto increments kobject reference if found. */ + if (!(hp = hvc_get_by_index(tty->index))) { + printk(KERN_WARNING "hvc_console: tty open failed, no vty associated with tty.\n"); return -ENODEV; - hp = &hvc_struct[line]; + } - tty->driver_data = hp; spin_lock_irqsave(&hp->lock, flags); + /* Check and then increment for fast path open. */ + if (hp->count++ > 0) { + spin_unlock_irqrestore(&hp->lock, flags); + hvc_kick(); + return 0; + } /* else count == 0 */ + + tty->driver_data = hp; hp->tty = tty; - hp->count++; + /* Save for request_irq outside of spin_lock. */ + irq = hp->irq; + if (irq != NO_IRQ) + hp->irq_requested = 1; + + kobjp = &hp->kobj; + spin_unlock_irqrestore(&hp->lock, flags); + /* check error, fallback to non-irq */ + if (irq != NO_IRQ) + rc = request_irq(irq, hvc_handle_interrupt, SA_INTERRUPT, "hvc_console", hp); + + /* + * If the request_irq() fails and we return an error. The tty layer + * will call hvc_close() after a failed open but we don't want to clean + * up there so we'll clean up here and clear out the previously set + * tty fields and return the kobject reference. + */ + if (rc) { + spin_lock_irqsave(&hp->lock, flags); + hp->tty = NULL; + hp->irq_requested = 0; + spin_unlock_irqrestore(&hp->lock, flags); + tty->driver_data = NULL; + kobject_put(kobjp); + } + /* Force wakeup of the polling thread */ + hvc_kick(); - return 0; + return rc; } static void hvc_close(struct tty_struct *tty, struct file * filp) { - struct hvc_struct *hp = tty->driver_data; + struct hvc_struct *hp; + struct kobject *kobjp; + int irq = NO_IRQ; unsigned long flags; if (tty_hung_up_p(filp)) return; + + /* + * No driver_data means that this close was issued after a failed + * hvcs_open by the tty layer's release_dev() function and we can just + * exit cleanly because the kobject reference wasn't made. + */ + if (!tty->driver_data) + return; + + hp = tty->driver_data; spin_lock_irqsave(&hp->lock, flags); - if (--hp->count == 0) + + kobjp = &hp->kobj; + if (--hp->count == 0) { + if (hp->irq_requested) + irq = hp->irq; + hp->irq_requested = 0; + + /* We are done with the tty pointer now. */ hp->tty = NULL; - else if (hp->count < 0) - printk(KERN_ERR "hvc_close %lu: oops, count is %d\n", - hp - hvc_struct, hp->count); - spin_unlock_irqrestore(&hp->lock, flags); + spin_unlock_irqrestore(&hp->lock, flags); + + /* + * Chain calls chars_in_buffer() and returns immediately if + * there is no buffered data otherwise sleeps on a wait queue + * waking periodically to check chars_in_buffer(). + */ + tty_wait_until_sent(tty, HVC_CLOSE_WAIT); + + tty->driver_data = NULL; + + if (irq != NO_IRQ) + free_irq(irq, hp); + + } else { + if (hp->count < 0) + printk(KERN_ERR "hvc_close %X: oops, count is %d\n", + hp->vtermno, hp->count); + spin_unlock_irqrestore(&hp->lock, flags); + } + + kobject_put(kobjp); } static void hvc_hangup(struct tty_struct *tty) { struct hvc_struct *hp = tty->driver_data; + unsigned long flags; + int irq = NO_IRQ; + int temp_open_count; + struct kobject *kobjp; + spin_lock_irqsave(&hp->lock, flags); + kobjp = &hp->kobj; + temp_open_count = hp->count; hp->count = 0; + hp->n_outbuf = 0; hp->tty = NULL; + if (hp->irq_requested) + /* Saved for use outside of spin_lock. */ + irq = hp->irq; + hp->irq_requested = 0; + spin_unlock_irqrestore(&hp->lock, flags); + if (irq != NO_IRQ) + free_irq(irq, hp); + while(temp_open_count) { + --temp_open_count; + kobject_put(kobjp); + } } -/* called with hp->lock held */ +/* + * Push buffered characters whether they were just recently buffered or waiting + * on a blocked hypervisor. Call this function with hp->lock held. + */ static void hvc_push(struct hvc_struct *hp) { int n; - n = hvc_put_chars(hp->index + hvc_offset, hp->outbuf, hp->n_outbuf); + n = hvc_put_chars(hp->vtermno, hp->outbuf, hp->n_outbuf); if (n <= 0) { if (n == 0) return; @@ -127,77 +330,122 @@ hp->do_wakeup = 1; } -static int hvc_write(struct tty_struct *tty, int from_user, - const unsigned char *buf, int count) +static inline int __hvc_write_user(struct hvc_struct *hp, + const unsigned char *buf, int count) { - struct hvc_struct *hp = tty->driver_data; char *tbuf, *p; int tbsize, rsize, written = 0; unsigned long flags; - if (from_user) { - tbsize = min(count, (int)PAGE_SIZE); - if (!(tbuf = kmalloc(tbsize, GFP_KERNEL))) - return -ENOMEM; - - while ((rsize = count - written) > 0) { - int wsize; - if (rsize > tbsize) - rsize = tbsize; - - p = tbuf; - rsize -= copy_from_user(p, buf, rsize); - if (!rsize) { - if (written == 0) - written = -EFAULT; - break; - } - buf += rsize; - written += rsize; - - spin_lock_irqsave(&hp->lock, flags); - for (wsize = N_OUTBUF - hp->n_outbuf; rsize && wsize; - wsize = N_OUTBUF - hp->n_outbuf) { - if (wsize > rsize) - wsize = rsize; - memcpy(hp->outbuf + hp->n_outbuf, p, wsize); - hp->n_outbuf += wsize; - hvc_push(hp); - rsize -= wsize; - p += wsize; - } - spin_unlock_irqrestore(&hp->lock, flags); - - if (rsize) - break; + tbsize = min(count, (int)PAGE_SIZE); + if (!(tbuf = kmalloc(tbsize, GFP_KERNEL))) + return -ENOMEM; - if (count < tbsize) - tbsize = count; + while ((rsize = count - written) > 0) { + int wsize; + if (rsize > tbsize) + rsize = tbsize; + + p = tbuf; + rsize -= copy_from_user(p, buf, rsize); + if (!rsize) { + if (written == 0) + written = -EFAULT; + break; } + buf += rsize; - kfree(tbuf); - } else { spin_lock_irqsave(&hp->lock, flags); - while (count > 0 && (rsize = N_OUTBUF - hp->n_outbuf) > 0) { - if (rsize > count) - rsize = count; - memcpy(hp->outbuf + hp->n_outbuf, buf, rsize); - count -= rsize; - buf += rsize; - hp->n_outbuf += rsize; - written += rsize; + + /* Push pending writes: make some room in buffer */ + if (hp->n_outbuf > 0) + hvc_push(hp); + + for (wsize = N_OUTBUF - hp->n_outbuf; rsize && wsize; + wsize = N_OUTBUF - hp->n_outbuf) { + if (wsize > rsize) + wsize = rsize; + memcpy(hp->outbuf + hp->n_outbuf, p, wsize); + hp->n_outbuf += wsize; hvc_push(hp); + rsize -= wsize; + p += wsize; + written += wsize; } spin_unlock_irqrestore(&hp->lock, flags); + + if (rsize) + break; + + if (count < tbsize) + tbsize = count; } + kfree(tbuf); + return written; } +static inline int __hvc_write_kernel(struct hvc_struct *hp, + const unsigned char *buf, int count) +{ + unsigned long flags; + int rsize, written = 0; + + spin_lock_irqsave(&hp->lock, flags); + + /* Push pending writes */ + if (hp->n_outbuf > 0) + hvc_push(hp); + + while (count > 0 && (rsize = N_OUTBUF - hp->n_outbuf) > 0) { + if (rsize > count) + rsize = count; + memcpy(hp->outbuf + hp->n_outbuf, buf, rsize); + count -= rsize; + buf += rsize; + hp->n_outbuf += rsize; + written += rsize; + hvc_push(hp); + } + spin_unlock_irqrestore(&hp->lock, flags); + + return written; +} +static int hvc_write(struct tty_struct *tty, int from_user, + const unsigned char *buf, int count) +{ + struct hvc_struct *hp = tty->driver_data; + int written; + + if (from_user) + written = __hvc_write_user(hp, buf, count); + else + written = __hvc_write_kernel(hp, buf, count); + + /* + * Racy, but harmless, kick thread if there is still pending data. + * There really is nothing wrong with kicking the thread, even if there + * is no buffered data. + */ + if (hp->n_outbuf) + hvc_kick(); + + return written; +} + +/* + * This is actually a contract between the driver and the tty layer outlining + * how much write room the driver can guarentee will be sent OR BUFFERED. This + * driver MUST honor the return value. + */ static int hvc_write_room(struct tty_struct *tty) { struct hvc_struct *hp = tty->driver_data; + if (!hp) + return -1; + return N_OUTBUF - hp->n_outbuf; } @@ -205,57 +453,111 @@ { struct hvc_struct *hp = tty->driver_data; + if (!hp) + return -1; return hp->n_outbuf; } -static void hvc_poll(int index) +#define HVC_POLL_READ 0x00000001 +#define HVC_POLL_WRITE 0x00000002 +#define HVC_POLL_QUICK 0x00000004 + +static int hvc_poll(struct hvc_struct *hp) { - struct hvc_struct *hp = &hvc_struct[index]; struct tty_struct *tty; - int i, n; - char buf[16] __ALIGNED__; + int i, n, poll_mask = 0; + char buf[N_INBUF] __ALIGNED__; unsigned long flags; + int read_total = 0; spin_lock_irqsave(&hp->lock, flags); + /* Push pending writes */ if (hp->n_outbuf > 0) hvc_push(hp); + /* Reschedule us if still some write pending */ + if (hp->n_outbuf > 0) + poll_mask |= HVC_POLL_WRITE; + /* No tty attached, just skip */ tty = hp->tty; - if (tty) { - for (;;) { - if (TTY_FLIPBUF_SIZE - tty->flip.count < sizeof(buf)) - break; - n = hvc_get_chars(index + hvc_offset, buf, sizeof(buf)); - if (n <= 0) - break; - for (i = 0; i < n; ++i) { -#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */ - if (buf[i] == '\x0f') { /* ^O -- should support a sequence */ - sysrq_pressed = 1; - continue; - } else if (sysrq_pressed) { - handle_sysrq(buf[i], NULL, tty); - sysrq_pressed = 0; - continue; - } -#endif - tty_insert_flip_char(tty, buf[i], 0); + if (tty == NULL) + goto bail; + + /* Now check if we can get data (are we throttled ?) */ + if (test_bit(TTY_THROTTLED, &tty->flags)) + goto throttled; + + /* If we aren't interrupt driven and aren't throttled, we always + * request a reschedule + */ + if (hp->irq == NO_IRQ) + poll_mask |= HVC_POLL_READ; + + /* Read data if any */ + for (;;) { + int count = N_INBUF; + if (count > (TTY_FLIPBUF_SIZE - tty->flip.count)) + count = TTY_FLIPBUF_SIZE - tty->flip.count; + + /* If flip is full, just reschedule a later read */ + if (count == 0) { + poll_mask |= HVC_POLL_READ; + break; + } + + n = hvc_get_chars(hp->vtermno, buf, count); + if (n <= 0) { + /* Hangup the tty when disconnected from host */ + if (n == -EPIPE) { + spin_unlock_irqrestore(&hp->lock, flags); + tty_hangup(tty); + spin_lock_irqsave(&hp->lock, flags); + } + break; + } + for (i = 0; i < n; ++i) { +#ifdef CONFIG_MAGIC_SYSRQ + /* Handle the SysRq Hack */ + if (buf[i] == '\x0f') { /* ^O -- should support a sequence */ + sysrq_pressed = 1; + continue; + } else if (sysrq_pressed) { + handle_sysrq(buf[i], NULL, tty); + sysrq_pressed = 0; + continue; } +#endif /* CONFIG_MAGIC_SYSRQ */ + tty_insert_flip_char(tty, buf[i], 0); } + if (tty->flip.count) tty_schedule_flip(tty); - if (hp->do_wakeup) { - hp->do_wakeup = 0; - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) - && tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); - wake_up_interruptible(&tty->write_wait); + /* + * Account for the total amount read in one loop, and if above + * 64 bytes, we do a quick schedule loop to let the tty grok the + * data and eventually throttle us. + */ + read_total += n; + if (read_total >= 64) { + poll_mask |= HVC_POLL_QUICK; + break; } } - + throttled: + /* Wakeup write queue if necessary */ + if (hp->do_wakeup) { + hp->do_wakeup = 0; + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) + && tty->ldisc.write_wakeup) + (tty->ldisc.write_wakeup)(tty); + wake_up_interruptible(&tty->write_wait); + } + bail: spin_unlock_irqrestore(&hp->lock, flags); + + return poll_mask; } #if defined(CONFIG_XMON) && defined(CONFIG_SMP) @@ -264,21 +566,47 @@ static const cpumask_t cpus_in_xmon = CPU_MASK_NONE; #endif - +/* + * This kthread is either polling or interrupt driven. This is determined by + * calling hvc_poll() who determines whether a console adapter support + * interrupts. + */ int khvcd(void *unused) { - int i; - - daemonize("khvcd"); + int poll_mask; + struct hvc_struct *hp; - for (;;) { + __set_current_state(TASK_RUNNING); + do { + poll_mask = 0; + hvc_kicked = 0; + wmb(); if (cpus_empty(cpus_in_xmon)) { - for (i = 0; i < MAX_NR_HVC_CONSOLES; ++i) - hvc_poll(i); + spin_lock(&hvc_structs_lock); + list_for_each_entry(hp, &hvc_structs, next) { + /*hp = list_entry(node, struct hvc_struct, * next); */ + poll_mask |= hvc_poll(hp); + } + spin_unlock(&hvc_structs_lock); + } else + poll_mask |= HVC_POLL_READ; + if (hvc_kicked) + continue; + if (poll_mask & HVC_POLL_QUICK) { + yield(); + continue; } set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(TIMEOUT); - } + if (!hvc_kicked) { + if (poll_mask == 0) + schedule(); + else + schedule_timeout(TIMEOUT); + } + __set_current_state(TASK_RUNNING); + } while (!kthread_should_stop()); + + return 0; } static struct tty_operations hvc_ops = { @@ -286,19 +614,124 @@ .close = hvc_close, .write = hvc_write, .hangup = hvc_hangup, + .unthrottle = hvc_unthrottle, .write_room = hvc_write_room, .chars_in_buffer = hvc_chars_in_buffer, }; -int __init hvc_init(void) +char hvc_driver_name[] = "hvc_console"; + +static struct vio_device_id hvc_driver_table[] __devinitdata= { + {"serial", "hvterm1"}, + { 0, } +}; +MODULE_DEVICE_TABLE(vio, hvc_driver_table); + +/* callback when the kboject ref count reaches zero. */ +static void destroy_hvc_struct(struct kobject *kobj) { - int num = hvc_count(&hvc_offset); - int i; + struct hvc_struct *hp = container_of(kobj, struct hvc_struct, kobj); + unsigned long flags; - if (num > MAX_NR_HVC_CONSOLES) - num = MAX_NR_HVC_CONSOLES; + spin_lock(&hvc_structs_lock); - hvc_driver = alloc_tty_driver(num); + spin_lock_irqsave(&hp->lock, flags); + list_del(&(hp->next)); + spin_unlock_irqrestore(&hp->lock, flags); + + spin_unlock(&hvc_structs_lock); + + kfree(hp); +} + +static struct kobj_type hvc_kobj_type = { + .release = destroy_hvc_struct, +}; + +static int __devinit hvc_probe( + struct vio_dev *dev, + const struct vio_device_id *id) +{ + struct hvc_struct *hp; + + /* probed with invalid parameters. */ + if (!dev || !id) + return -EPERM; + + hp = kmalloc(sizeof(*hp), GFP_KERNEL); + if (!hp) + return -ENOMEM; + + memset(hp, 0x00, sizeof(*hp)); + hp->vtermno = dev->unit_address; + hp->vdev = dev; + hp->vdev->dev.driver_data = hp; + hp->irq = dev->irq; + + kobject_init(&hp->kobj); + hp->kobj.ktype = &hvc_kobj_type; + + hp->lock = SPIN_LOCK_UNLOCKED; + spin_lock(&hvc_structs_lock); + hp->index = ++hvc_count; + list_add_tail(&(hp->next), &hvc_structs); + spin_unlock(&hvc_structs_lock); + + return 0; +} + +static int __devexit hvc_remove(struct vio_dev *dev) +{ + struct hvc_struct *hp = dev->dev.driver_data; + unsigned long flags; + struct kobject *kobjp; + struct tty_struct *tty; + + spin_lock_irqsave(&hp->lock, flags); + tty = hp->tty; + kobjp = &hp->kobj; + + if (hp->index < MAX_NR_HVC_CONSOLES) + vtermnos[hp->index] = -1; + + /* Don't whack hp->irq because tty_hangup() will need to free the irq. */ + + spin_unlock_irqrestore(&hp->lock, flags); + + /* + * We 'put' the instance that was grabbed when the kobject instance + * was intialized using kobject_init(). Let the last holder of this + * kobject cause it to be removed, which will probably be the tty_hangup + * below. + */ + kobject_put(kobjp); + + /* + * This function call will auto chain call hvc_hangup. The tty should + * always be valid at this time unless a simultaneous tty close already + * cleaned up the hvc_struct. + */ + if (tty) + tty_hangup(tty); + return 0; +} + +static struct vio_driver hvc_vio_driver = { + .name = hvc_driver_name, + .id_table = hvc_driver_table, + .probe = hvc_probe, + .remove = hvc_remove, +}; + +/* Driver initialization. Follow console initialization. This is where the TTY + * interfaces start to become available. */ +int __init hvc_init(void) +{ + int rc; + + /* We need more than num_vterms adapters due to hotplug additions. */ + hvc_driver = alloc_tty_driver(HVC_ALLOC_TTY_ADAPTERS); + /* hvc_driver = alloc_tty_driver(num_vterms); */ if (!hvc_driver) return -ENOMEM; @@ -312,31 +745,73 @@ hvc_driver->init_termios = tty_std_termios; hvc_driver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(hvc_driver, &hvc_ops); - for (i = 0; i < num; i++) { - hvc_struct[i].lock = SPIN_LOCK_UNLOCKED; - hvc_struct[i].index = i; - } if (tty_register_driver(hvc_driver)) panic("Couldn't register hvc console driver\n"); - if (num > 0) - kernel_thread(khvcd, NULL, CLONE_KERNEL); + /* Always start the kthread because there can be hotplug vty adapters + * added later. */ + hvc_task = kthread_run(khvcd, NULL, "khvcd"); + if (IS_ERR(hvc_task)) { + panic("Couldn't create kthread for console.\n"); + put_tty_driver(hvc_driver); + return -EIO; + } - return 0; + /* Register as a vio device to receive callbacks */ + rc = vio_register_driver(&hvc_vio_driver); + + return rc; } +/* This isn't particularily necessary due to this being a console driver but it + * is nice to be thorough */ static void __exit hvc_exit(void) { + kthread_stop(hvc_task); + + vio_unregister_driver(&hvc_vio_driver); + tty_unregister_driver(hvc_driver); + /* return tty_struct instances allocated in hvc_init(). */ + put_tty_driver(hvc_driver); +} + +/* + * Console APIs, NOT TTY. These APIs are available immediately when + * hvc_console_setup() finds adapters. + */ + +/* + * hvc_instantiate() is an early console discovery method which locates consoles + * prior to the vio subsystem discovering them. Hotplugged vty adapters do NOT + * get an hvc_instantiate() callback since the appear after early console init. + */ +int hvc_instantiate(uint32_t vtermno, int index) +{ + if (index < 0 || index >= MAX_NR_HVC_CONSOLES) + return -1; + + if (vtermnos[index] != -1) + return -1; + + vtermnos[index] = vtermno; + return 0; } void hvc_console_print(struct console *co, const char *b, unsigned count) { char c[16] __ALIGNED__; - unsigned i, n; + unsigned i, n = 0; int r, donecr = 0; - i = n = 0; + /* Console access attempt outside of acceptable console range. */ + if (co->index >= MAX_NR_HVC_CONSOLES) + return; + + /* This console adapter was removed so it is not useable. */ + if (vtermnos[co->index] < 0) + return; + while (count > 0 || i > 0) { if (count > 0 && i < sizeof(c)) { if (b[n] == '\n' && !donecr) { @@ -348,7 +823,7 @@ --count; } } else { - r = hvc_put_chars(co->index + hvc_offset, c, i); + r = hvc_put_chars(vtermnos[co->index], c, i); if (r < 0) { /* throw away chars on error */ i = 0; @@ -369,9 +844,6 @@ static int __init hvc_console_setup(struct console *co, char *options) { - if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES - || co->index >= hvc_count(&hvc_offset)) - return -1; return 0; } @@ -384,8 +856,14 @@ .index = -1, }; +/* Early console initialization. Preceeds driver initialization. */ static int __init hvc_console_init(void) { + int i; + + for (i=0; i /* - * 1.0.0 -> 1.1.0 Added kernel_thread scheduling methodology to driver to - * replace wait_task constructs. - * - * 1.1.0 -> 1.2.0 Moved pi_buff initialization out of arch code into driver code - * and added locking to share this buffer between hvcs_struct instances. This - * is because the page_size kmalloc can't be done with a spin_lock held. - * - * Also added sysfs attribute to manually disconnect the vty-server from the vty - * due to stupid firmware behavior when opening the connection then sending data - * then then quickly closing the connection would cause data loss on the - * receiving side. This required some reordering of the termination code. - * - * Fixed the hangup scenario and fixed memory leaks on module_exit. - * - * 1.2.0 -> 1.3.0 Moved from manual kernel thread creation & execution to - * kthread construct which replaced in-kernel IPC for thread termination with - * kthread_stop and kthread_should_stop. Explicit wait_queue handling was - * removed because kthread handles this. Minor bug fix to postpone partner_info - * clearing on hvcs_close until adapter removal to preserve context data for - * printk on partner connection free. Added lock to protect hvcs_structs so - * that hvcs_struct instances aren't added or removed during list traversal. - * Cleaned up comment style, added spaces after commas, and broke function - * declaration lines to be under 80 columns. - * * 1.3.0 -> 1.3.1 In hvcs_open memset(..,0x00,..) instead of memset(..,0x3F,00). * Removed braces around single statements following conditionals. Removed '= * 0' after static int declarations since these default to zero. Removed @@ -123,17 +99,28 @@ * SPIN_LOCK_UNLOCKED at declaration time rather than in hvcs_module_init(). * Added spin_lock around list_del() in destroy_hvcs_struct() to protect the * list traversals from a deletion. Removed '= NULL' from pointer declaration - * statements since they are initialized NULL by default. In hvcs_probe() - * changed kmalloc(sizeof(*hvcsd),...) to kmalloc(sizeof(struct - * hvcs_struct),...) because otherwise allocation would only be the size of a - * pointer. Removed wmb() instances from hvcs_try_write(). They probably - * aren't needed with locking in place. Added check and cleanup for - * hvcs_pi_buff = kmalloc() in hvcs_module_init(). Exposed hvcs_struct.index - * via a sysfs attribute so that the coupling between /dev/hvcs* and a - * vty-server can be automatically determined. Moved kobject_put() in hvcs_open - * outside of the spin_unlock_irqrestore(). + * statements since they are initialized NULL by default. Removed wmb() + * instances from hvcs_try_write(). They probably aren't needed with locking in + * place. Added check and cleanup for hvcs_pi_buff = kmalloc() in + * hvcs_module_init(). Exposed hvcs_struct.index via a sysfs attribute so that + * the coupling between /dev/hvcs* and a vty-server can be automatically + * determined. Moved kobject_put() in hvcs_open outside of the + * spin_unlock_irqrestore(). + * + * 1.3.1 -> 1.3.2 Changed method for determining hvcs_struct->index and had it + * align with how the tty layer always assigns the lowest index available. This + * change resulted in a list of ints that denotes which indexes are available. + * Device additions and removals use the new hvcs_get_index() and + * hvcs_return_index() helper functions. The list is created with + * hvsc_alloc_index_list() and it is destroyed with hvcs_free_index_list(). + * Without these fixes hotplug vty-server adapter support goes crazy with this + * driver if the user removes a vty-server adapter. Moved free_irq() outside of + * the hvcs_final_close() function in order to get it out of the spinlock. + * Rearranged hvcs_close(). Cleaned up some printks and did some housekeeping + * on the changelog. Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from + * arch/ppc64/hvcserver.h. */ -#define HVCS_DRIVER_VERSION "1.3.1" +#define HVCS_DRIVER_VERSION "1.3.2" MODULE_AUTHOR("Ryan S. Arnold "); MODULE_DESCRIPTION("IBM hvcs (Hypervisor Virtual Console Server) Driver"); @@ -159,9 +146,9 @@ /* * We let Linux assign us a major number and we start the minors at zero. There - * is no intuitive mapping between minor number and the target partition. The - * mapping of minor number is related to the order the vty-servers are exposed - * to this driver via the hvcs_probe function. + * is no intuitive mapping between minor number and the target vty-server + * adapter except that each new vty-server adapter is always assigned to the + * smallest minor number available. */ #define HVCS_MINOR_START 0 @@ -173,9 +160,6 @@ */ #define __ALIGNED__ __attribute__((__aligned__(8))) -/* Converged location code string length + 1 null terminator */ -#define CLC_LENGTH 80 - /* * How much data can firmware send with each hvc_put_chars()? Maybe this * should be moved into an architecture specific area. @@ -220,14 +204,25 @@ static struct tty_driver *hvcs_tty_driver; /* - * This is used to associate a vty-server, as it is exposed to this driver, with - * a preallocated tty_struct.index. The dev node and hvcs index numbers are not - * re-used after device removal otherwise removing and adding a new one would - * link a /dev/hvcs* entry to a different vty-server than it did before the - * removal. Incidentally, a newly exposed vty-server will always map to an - * incrementally higher /dev/hvcs* entry than the last exposed vty-server. + * In order to be somewhat sane this driver always associates the hvcs_struct + * index element with the numerically equal tty->index. This means that a + * hotplugged vty-server adapter will always map to the lowest index valued + * device node. If vty-servers were hotplug removed from the system and then + * new ones added the new vty-server may have the largest slot number of all + * the vty-server adapters in the partition but it may have the lowest dev node + * index of all the adapters due to the hole left by the hotplug removed + * adapter. There are a set of functions provided to get the lowest index for + * a new device as well as return the index to the list. This list is allocated + * with a number of elements equal to the number of device nodes requested when + * the module was inserted. */ -static int hvcs_struct_count = -1; +static int *hvcs_index_list; + +/* + * How large is the list? This is kept for traversal since the list is + * dynamically created. + */ +static int hvcs_index_count; /* * Used by the khvcsd to pick up I/O operations when the kernel_thread is @@ -235,7 +230,10 @@ */ static int hvcs_kicked; -/* Used the the kthread construct for task operations */ +/* + * Use by the kthread construct for task operations like waking the sleeping + * thread and stopping the kthread. + */ static struct task_struct *hvcs_task; /* @@ -244,6 +242,7 @@ */ static unsigned long *hvcs_pi_buff; +/* Only allow one hvcs_struct to use the hvcs_pi_buff at a time. */ static spinlock_t hvcs_pi_lock = SPIN_LOCK_UNLOCKED; /* One vty-server per hvcs_struct */ @@ -286,7 +285,7 @@ int connected; /* is the vty-server currently connected to a vty? */ uint32_t p_unit_address; /* partner unit address */ uint32_t p_partition_ID; /* partner partition ID */ - char p_location_code[CLC_LENGTH]; + char p_location_code[HVCS_CLC_LENGTH + 1]; /* CLC + Null Term */ struct list_head next; /* list management */ struct vio_dev *vdev; }; @@ -522,6 +521,19 @@ }; MODULE_DEVICE_TABLE(vio, hvcs_driver_table); +static void hvcs_return_index(int index) +{ + /* Paranoia check */ + if (!hvcs_index_list) + return; + if (index < 0 || index >= hvcs_index_count) + return; + if (hvcs_index_list[index] == -1) + return; + else + hvcs_index_list[index] = -1; +} + /* callback when the kboject ref count reaches zero */ static void destroy_hvcs_struct(struct kobject *kobj) { @@ -551,7 +563,8 @@ hvcsd->p_unit_address = 0; hvcsd->p_partition_ID = 0; - memset(&hvcsd->p_location_code[0], 0x00, CLC_LENGTH); + hvcs_return_index(hvcsd->index); + memset(&hvcsd->p_location_code[0], 0x00, HVCS_CLC_LENGTH + 1); spin_unlock_irqrestore(&hvcsd->lock, flags); spin_unlock(&hvcs_structs_lock); @@ -561,11 +574,13 @@ kfree(hvcsd); } -/* This function must be called with hvcsd->lock held. */ +/* + * This function must be called with hvcsd->lock held. Do not free the irq in + * this function since it is called with the spinlock held. + */ static void hvcs_final_close(struct hvcs_struct *hvcsd) { vio_disable_interrupts(hvcsd->vdev); - free_irq(hvcsd->vdev->irq, hvcsd); hvcsd->todo_mask = 0; @@ -585,18 +600,43 @@ .release = destroy_hvcs_struct, }; +static int hvcs_get_index(void) +{ + int i; + /* Paranoia check */ + if (!hvcs_index_list) { + printk(KERN_ERR "HVCS: hvcs_index_list NOT valid!.\n"); + return -EFAULT; + } + /* Find the numerically lowest first free index. */ + for(i = 0; i < hvcs_index_count; i++) { + if (hvcs_index_list[i] == -1) { + hvcs_index_list[i] = 0; + return i; + } + } + return -1; +} + static int __devinit hvcs_probe( struct vio_dev *dev, const struct vio_device_id *id) { struct hvcs_struct *hvcsd; + int index; if (!dev || !id) { printk(KERN_ERR "HVCS: probed with invalid parameter.\n"); return -EPERM; } - hvcsd = kmalloc(sizeof(struct hvcs_struct), GFP_KERNEL); + /* early to avoid cleanup on failure */ + index = hvcs_get_index(); + if (index < 0) { + return -EFAULT; + } + + hvcsd = kmalloc(sizeof(*hvcsd), GFP_KERNEL); if (!hvcsd) return -ENODEV; @@ -612,7 +652,9 @@ hvcsd->vdev = dev; dev->dev.driver_data = hvcsd; - hvcsd->index = ++hvcs_struct_count; + hvcsd->index = index; + + /* hvcsd->index = ++hvcs_struct_count; */ hvcsd->chars_in_buffer = 0; hvcsd->todo_mask = 0; hvcsd->connected = 0; @@ -641,7 +683,7 @@ hvcs_create_device_attrs(hvcsd); - printk(KERN_INFO "HVCS: Added vty-server@%X.\n", dev->unit_address); + printk(KERN_INFO "HVCS: vty-server@%X added to the vio bus.\n", dev->unit_address); /* * DON'T enable interrupts here because there is no user to receive the @@ -650,6 +692,8 @@ return 0; } + + static int __devexit hvcs_remove(struct vio_dev *dev) { struct hvcs_struct *hvcsd = dev->dev.driver_data; @@ -704,8 +748,8 @@ hvcsd->p_unit_address = pi->unit_address; hvcsd->p_partition_ID = pi->partition_ID; clclength = strlen(&pi->location_code[0]); - if (clclength > CLC_LENGTH - 1) - clclength = CLC_LENGTH - 1; + if (clclength > HVCS_CLC_LENGTH) + clclength = HVCS_CLC_LENGTH; /* copy the null-term char too */ strncpy(&hvcsd->p_location_code[0], @@ -946,7 +990,8 @@ * This function increments the kobject index. */ if (!(hvcsd = hvcs_get_by_index(tty->index))) { - printk(KERN_WARNING "HVCS: open failed, no index.\n"); + printk(KERN_WARNING "HVCS: open failed, no device associated" + " with tty->index %d.\n", tty->index); return -ENODEV; } @@ -984,7 +1029,7 @@ /* * This must be done outside of the spinlock because it requests irqs - * and will grab the spinlcok and free the connection if it fails. + * and will grab the spinlock and free the connection if it fails. */ if (((rc = hvcs_enable_device(hvcsd, unit_address, irq, vdev)))) { kobject_put(&hvcsd->kobj); @@ -1012,7 +1057,7 @@ open_success: hvcs_kick(); - printk(KERN_INFO "HVCS: vty-server@%X opened.\n", + printk(KERN_INFO "HVCS: vty-server@%X connection opened.\n", hvcsd->vdev->unit_address ); return 0; @@ -1022,7 +1067,7 @@ spin_unlock_irqrestore(&hvcsd->lock, flags); kobject_put(&hvcsd->kobj); - printk(KERN_WARNING "HVCS: HVCS partner connect failed.\n"); + printk(KERN_WARNING "HVCS: partner connect failed.\n"); return retval; } @@ -1031,6 +1076,7 @@ struct hvcs_struct *hvcsd; unsigned long flags; struct kobject *kobjp; + int irq = NO_IRQ; /* * Is someone trying to close the file associated with this device after @@ -1050,6 +1096,7 @@ hvcsd = tty->driver_data; spin_lock_irqsave(&hvcsd->lock, flags); + kobjp = &hvcsd->kobj; if (--hvcsd->open_count == 0) { /* @@ -1084,16 +1131,18 @@ } hvcs_final_close(hvcsd); - + irq = hvcsd->vdev->irq; + spin_unlock_irqrestore(&hvcsd->lock, flags); + free_irq(irq, hvcsd); + kobject_put(kobjp); + return; } else if (hvcsd->open_count < 0) { printk(KERN_ERR "HVCS: vty-server@%X open_count: %d" " is missmanaged.\n", - hvcsd->vdev->unit_address, hvcsd->open_count); + hvcsd->vdev->unit_address, hvcsd->open_count); } - kobjp = &hvcsd->kobj; spin_unlock_irqrestore(&hvcsd->lock, flags); - kobject_put(kobjp); } @@ -1103,6 +1152,7 @@ unsigned long flags; int temp_open_count; struct kobject *kobjp; + int irq = NO_IRQ; spin_lock_irqsave(&hvcsd->lock, flags); /* Preserve this so that we know how many kobject refs to put */ @@ -1118,9 +1168,12 @@ /* Calling this will drop any buffered data on the floor. */ hvcs_final_close(hvcsd); + irq = hvcsd->vdev->irq; spin_unlock_irqrestore(&hvcsd->lock, flags); + free_irq(irq, hvcsd); + /* * We need to kobject_put() for every open_count we have since the * tty_hangup() function doesn't invoke a close per open connection on a @@ -1305,6 +1358,28 @@ .throttle = hvcs_throttle, }; +static int hvcs_alloc_index_list(int n) +{ + int i; + hvcs_index_list = kmalloc(n * sizeof(hvcs_index_count),GFP_KERNEL); + if (!hvcs_index_list) + return -ENOMEM; + hvcs_index_count = n; + for(i = 0; i < hvcs_index_count; i++) + hvcs_index_list[i] = -1; + return 0; +} + +static void hvcs_free_index_list(void) +{ + /* Paranoia check to be thorough. */ + if (hvcs_index_list) { + kfree(hvcs_index_list); + hvcs_index_list = NULL; + hvcs_index_count = 0; + } +} + static int __init hvcs_module_init(void) { int rc; @@ -1323,6 +1398,9 @@ if (!hvcs_tty_driver) return -ENOMEM; + if (hvcs_alloc_index_list(num_ttys_to_alloc)) + return -ENOMEM; + hvcs_tty_driver->owner = THIS_MODULE; hvcs_tty_driver->driver_name = hvcs_driver_name; @@ -1353,6 +1431,7 @@ if (tty_register_driver(hvcs_tty_driver)) { printk(KERN_ERR "HVCS: registration " " as a tty driver failed.\n"); + hvcs_free_index_list(); put_tty_driver(hvcs_tty_driver); return rc; } @@ -1360,14 +1439,17 @@ hvcs_pi_buff = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!hvcs_pi_buff) { tty_unregister_driver(hvcs_tty_driver); + hvcs_free_index_list(); put_tty_driver(hvcs_tty_driver); return -ENOMEM; } hvcs_task = kthread_run(khvcsd, NULL, "khvcsd"); if (IS_ERR(hvcs_task)) { - printk("khvcsd creation failed. Driver not loaded.\n"); + printk(KERN_ERR "HVCS: khvcsd creation failed. Driver not loaded.\n"); kfree(hvcs_pi_buff); + tty_unregister_driver(hvcs_tty_driver); + hvcs_free_index_list(); put_tty_driver(hvcs_tty_driver); return -EIO; } @@ -1408,6 +1490,8 @@ vio_unregister_driver(&hvcs_vio_driver); tty_unregister_driver(hvcs_tty_driver); + + hvcs_free_index_list(); put_tty_driver(hvcs_tty_driver); diff -Nru a/drivers/char/ip2/ip2types.h b/drivers/char/ip2/ip2types.h --- a/drivers/char/ip2/ip2types.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/ip2/ip2types.h 2004-09-06 16:37:54 -07:00 @@ -49,6 +49,9 @@ short irq[IP2_MAX_BOARDS]; unsigned short addr[IP2_MAX_BOARDS]; int type[IP2_MAX_BOARDS]; +#ifdef CONFIG_PCI + struct pci_dev *pci_dev[IP2_MAX_BOARDS]; +#endif } ip2config_t; #endif diff -Nru a/drivers/char/ip2main.c b/drivers/char/ip2main.c --- a/drivers/char/ip2main.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/ip2main.c 2004-09-06 16:37:55 -07:00 @@ -440,6 +440,12 @@ // free memory for (i = 0; i < IP2_MAX_BOARDS; i++) { void *pB; +#ifdef CONFIG_PCI + if (ip2config.type[i] == PCI && ip2config.pci_dev[i]) { + pci_disable_device(ip2config.pci_dev[i]); + ip2config.pci_dev[i] = NULL; + } +#endif if ((pB = i2BoardPtrTable[i]) != 0 ) { kfree ( pB ); i2BoardPtrTable[i] = NULL; @@ -594,9 +600,14 @@ PCI_DEVICE_ID_COMPUTONE_IP2EX, pci_dev_i); if (pci_dev_i != NULL) { unsigned int addr; - unsigned char pci_irq; + if (pci_enable_device(pci_dev_i)) { + printk( KERN_ERR "IP2: can't enable PCI device at %s\n", + pci_name(pci_dev_i)); + break; + } ip2config.type[i] = PCI; + ip2config.pci_dev[i] = pci_dev_i; status = pci_read_config_dword(pci_dev_i, PCI_BASE_ADDRESS_1, &addr); if ( addr & 1 ) { @@ -604,8 +615,6 @@ } else { printk( KERN_ERR "IP2: PCI I/O address error\n"); } - status = - pci_read_config_byte(pci_dev_i, PCI_INTERRUPT_LINE, &pci_irq); // If the PCI BIOS assigned it, lets try and use it. If we // can't acquire it or it screws up, deal with it then. @@ -614,7 +623,7 @@ // printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq); // pci_irq = 0; // } - ip2config.irq[i] = pci_irq; + ip2config.irq[i] = pci_dev_i->irq; } else { // ann error ip2config.addr[i] = 0; if (status == PCIBIOS_DEVICE_NOT_FOUND) { diff -Nru a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c --- a/drivers/char/ipmi/ipmi_poweroff.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/ipmi/ipmi_poweroff.c 2004-09-06 16:37:53 -07:00 @@ -424,7 +424,7 @@ if (ready) return; - rv = ipmi_create_user(if_num, &ipmi_poweroff_handler, 0, &ipmi_user); + rv = ipmi_create_user(if_num, &ipmi_poweroff_handler, NULL, &ipmi_user); if (rv) { printk(KERN_ERR PFX "could not create IPMI user, error %d\n", rv); diff -Nru a/drivers/char/isicom.c b/drivers/char/isicom.c --- a/drivers/char/isicom.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/isicom.c 2004-09-06 16:37:50 -07:00 @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -389,7 +390,7 @@ tty = port->tty; save_flags(flags); cli(); - txcount = MIN(TX_SIZE, port->xmit_cnt); + txcount = min_t(short, TX_SIZE, port->xmit_cnt); if ((txcount <= 0) || tty->stopped || tty->hw_stopped) { restore_flags(flags); continue; @@ -421,7 +422,7 @@ residue = NO; wrd = 0; while (1) { - cnt = MIN(txcount, (SERIAL_XMIT_SIZE - port->xmit_tail)); + cnt = min_t(int, txcount, (SERIAL_XMIT_SIZE - port->xmit_tail)); if (residue == YES) { residue = NO; if (cnt > 0) { @@ -650,7 +651,7 @@ } } else { /* Data Packet */ - count = MIN(byte_count, (TTY_FLIPBUF_SIZE - tty->flip.count)); + count = min_t(unsigned short, byte_count, (TTY_FLIPBUF_SIZE - tty->flip.count)); #ifdef ISICOM_DEBUG printk(KERN_DEBUG "ISICOM: Intr: Can rx %d of %d bytes.\n", count, byte_count); @@ -1163,8 +1164,8 @@ save_flags(flags); while(1) { cli(); - cnt = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); + cnt = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); if (cnt <= 0) break; @@ -1180,8 +1181,8 @@ return -EFAULT; } cli(); - cnt = MIN(cnt, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); + cnt = min_t(int, cnt, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); memcpy(port->xmit_buf + port->xmit_head, tmp_buf, cnt); } else @@ -1906,8 +1907,7 @@ void cleanup_module(void) { re_schedule = 0; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + msleep(1000); #ifdef ISICOM_DEBUG printk("ISICOM: isicom_tx tx_count = %ld.\n", tx_count); diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/mem.c 2004-09-06 16:37:53 -07:00 @@ -86,7 +86,7 @@ * above the IO hole... Ah, and of course, XFree86 doesn't pass * O_SYNC when mapping us to tap IO space. Surprised ? */ - return !page_is_ram(addr); + return !page_is_ram(addr >> PAGE_SHIFT); #else /* * Accessing memory above the top the kernel knows about or through a file pointer @@ -416,7 +416,7 @@ if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) goto out_up; - if (vma->vm_flags & VM_SHARED) + if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) break; count = vma->vm_end - addr; if (count > size) diff -Nru a/drivers/char/mxser.c b/drivers/char/mxser.c --- a/drivers/char/mxser.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/mxser.c 2004-09-06 16:37:53 -07:00 @@ -101,10 +101,6 @@ #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* * Define the Moxa PCI vendor and device IDs. */ @@ -849,7 +845,7 @@ if (from_user) { down(&mxvar_tmp_buf_sem); while (1) { - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) break; @@ -862,7 +858,7 @@ } cli(); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); memcpy(info->xmit_buf + info->xmit_head, mxvar_tmp_buf, c); info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE - 1); @@ -877,7 +873,7 @@ } else { while (1) { cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) { restore_flags(flags); diff -Nru a/drivers/char/nwflash.c b/drivers/char/nwflash.c --- a/drivers/char/nwflash.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/nwflash.c 2004-09-06 16:37:55 -07:00 @@ -60,15 +60,6 @@ extern spinlock_t gpio_lock; -/* - * the delay routine - it is often required to let the flash "breeze"... - */ -void flash_wait(int timeout) -{ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(timeout); -} - static int get_flash_id(void) { volatile unsigned int c1, c2; @@ -401,7 +392,7 @@ /* * wait 10 ms */ - flash_wait(HZ / 100); + msleep(10); /* * wait while erasing in process (up to 10 sec) @@ -409,7 +400,7 @@ timeout = jiffies + 10 * HZ; c1 = 0; while (!(c1 & 0x80) && time_before(jiffies, timeout)) { - flash_wait(HZ / 100); + msleep(10); /* * read any address */ @@ -440,7 +431,7 @@ /* * just to make sure - verify if erased OK... */ - flash_wait(HZ / 100); + msleep(10); pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + (nBlock << 16))); @@ -587,7 +578,7 @@ /* * wait couple ms */ - flash_wait(HZ / 100); + msleep(10); /* * red LED == write */ @@ -612,7 +603,7 @@ leds_event(led_amber_off); leds_event(led_green_on); - flash_wait(HZ / 100); + msleep(10); pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + p)); diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c --- a/drivers/char/pcmcia/synclink_cs.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/pcmcia/synclink_cs.c 2004-09-06 16:37:52 -07:00 @@ -1,7 +1,7 @@ /* * linux/drivers/char/pcmcia/synclink_cs.c * - * $Id: synclink_cs.c,v 4.22 2004/06/01 20:27:46 paulkf Exp $ + * $Id: synclink_cs.c,v 4.26 2004/08/11 19:30:02 paulkf Exp $ * * Device driver for Microgate SyncLink PC Card * multiprotocol serial adapter. @@ -68,6 +68,7 @@ #include #include #include +#include #include #include @@ -76,12 +77,8 @@ #include #include -#ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE -#define CONFIG_SYNCLINK_SYNCPPP 1 -#endif - -#ifdef CONFIG_SYNCLINK_SYNCPPP -#include +#ifdef CONFIG_HDLC_MODULE +#define CONFIG_HDLC 1 #endif #define GET_USER(error,value,addr) error = get_user(value,addr) @@ -239,12 +236,11 @@ int netcount; int dosyncppp; spinlock_t netlock; -#ifdef CONFIG_SYNCLINK_SYNCPPP - struct ppp_device pppdev; - char netname[10]; + +#ifdef CONFIG_HDLC struct net_device *netdev; - struct net_device_stats netstats; #endif + } MGSLPC_INFO; #define MGSLPC_MAGIC 0x5402 @@ -262,7 +258,7 @@ * FIXME: PPC has PVR defined in asm/reg.h. For now we just undef it. */ #undef PVR - + #define RXFIFO 0 #define TXFIFO 0 #define STAR 0x20 @@ -398,18 +394,12 @@ static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg); -#ifdef CONFIG_SYNCLINK_SYNCPPP -/* SPPP/HDLC stuff */ -static void mgslpc_sppp_init(MGSLPC_INFO *info); -static void mgslpc_sppp_delete(MGSLPC_INFO *info); -static int mgslpc_sppp_open(struct net_device *d); -static int mgslpc_sppp_close(struct net_device *d); -static void mgslpc_sppp_tx_timeout(struct net_device *d); -static int mgslpc_sppp_tx(struct sk_buff *skb, struct net_device *d); -static void mgslpc_sppp_rx_done(MGSLPC_INFO *info, char *buf, int size); -static void mgslpc_sppp_tx_done(MGSLPC_INFO *info); -static int mgslpc_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -struct net_device_stats *mgslpc_net_stats(struct net_device *dev); +#ifdef CONFIG_HDLC +#define dev_to_port(D) (dev_to_hdlc(D)->priv) +static void hdlcdev_tx_done(MGSLPC_INFO *info); +static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size); +static int hdlcdev_init(MGSLPC_INFO *info); +static void hdlcdev_exit(MGSLPC_INFO *info); #endif static void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit); @@ -494,7 +484,7 @@ MODULE_LICENSE("GPL"); static char *driver_name = "SyncLink PC Card driver"; -static char *driver_version = "$Revision: 4.22 $"; +static char *driver_version = "$Revision: 4.26 $"; static struct tty_driver *serial_driver; @@ -504,10 +494,6 @@ static void mgslpc_change_params(MGSLPC_INFO *info); static void mgslpc_wait_until_sent(struct tty_struct *tty, int timeout); -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* PCMCIA prototypes */ static void mgslpc_config(dev_link_t *link); @@ -1163,9 +1149,9 @@ info->drop_rts_on_tx_done = 0; } -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - mgslpc_sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif { @@ -1201,7 +1187,7 @@ return; while (info->tx_count && fifo_count) { - c = MIN(2, MIN(fifo_count, MIN(info->tx_count, TXBUFSIZE - info->tx_get))); + c = min(2, min_t(int, fifo_count, min(info->tx_count, TXBUFSIZE - info->tx_get))); if (c == 1) { write_reg(info, CHA + TXFIFO, *(info->tx_buf + info->tx_get)); @@ -1271,13 +1257,13 @@ info->icount.dcd++; if (info->serial_signals & SerialSignal_DCD) { info->input_signal_events.dcd_up++; -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) - sppp_reopen(info->netdev); -#endif } else info->input_signal_events.dcd_down++; +#ifdef CONFIG_HDLC + if (info->netcount) + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, info->netdev); +#endif wake_up_interruptible(&info->status_event_wait_q); wake_up_interruptible(&info->event_wait_q); @@ -1764,8 +1750,8 @@ } for (;;) { - c = MIN(count, - MIN(TXBUFSIZE - info->tx_count - 1, + c = min(count, + min(TXBUFSIZE - info->tx_count - 1, TXBUFSIZE - info->tx_put)); if (c <= 0) break; @@ -2651,7 +2637,7 @@ char_time = 1; if (timeout) - char_time = MIN(char_time, timeout); + char_time = min_t(unsigned long, char_time, timeout); if (info->params.mode == MGSL_MODE_HDLC) { while (info->tx_active) { @@ -2876,7 +2862,7 @@ cleanup: if (retval) { if (tty->count == 1) - info->tty = NULL;/* tty layer will release tty struct */ + info->tty = NULL; /* tty layer will release tty struct */ if(info->count) info->count--; } @@ -2931,7 +2917,7 @@ if (info->icount.rxover) ret += sprintf(buf+ret, " rxover:%d", info->icount.rxover); if (info->icount.rxcrc) - ret += sprintf(buf+ret, " rxlong:%d", info->icount.rxcrc); + ret += sprintf(buf+ret, " rxcrc:%d", info->icount.rxcrc); } else { ret += sprintf(buf+ret, " ASYNC tx:%d rx:%d", info->icount.tx, info->icount.rx); @@ -3070,12 +3056,8 @@ printk( "SyncLink PC Card %s:IO=%04X IRQ=%d\n", info->device_name, info->io_base, info->irq_level); - -#ifdef CONFIG_SYNCLINK_SYNCPPP -#ifdef MODULE - if (info->dosyncppp) -#endif - mgslpc_sppp_init(info); +#ifdef CONFIG_HDLC + hdlcdev_init(info); #endif } @@ -3090,9 +3072,8 @@ last->next_device = info->next_device; else mgslpc_device_list = info->next_device; -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->dosyncppp) - mgslpc_sppp_delete(info); +#ifdef CONFIG_HDLC + hdlcdev_exit(info); #endif release_resources(info); kfree(info); @@ -4021,9 +4002,12 @@ return_frame = 1; } framesize = 0; -#ifdef CONFIG_SYNCLINK_SYNCPPP - info->netstats.rx_errors++; - info->netstats.rx_frame_errors++; +#ifdef CONFIG_HDLC + { + struct net_device_stats *stats = hdlc_stats(info->netdev); + stats->rx_errors++; + stats->rx_frame_errors++; + } #endif } else return_frame = 1; @@ -4052,11 +4036,9 @@ ++framesize; } -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) { - /* pass frame to syncppp device */ - mgslpc_sppp_rx_done(info, buf->data, framesize); - } +#ifdef CONFIG_HDLC + if (info->netcount) + hdlcdev_rx(info, buf->data, framesize); else #endif { @@ -4215,88 +4197,134 @@ spin_unlock_irqrestore(&info->lock,flags); -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - mgslpc_sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif bh_transmit(info); } -#ifdef CONFIG_SYNCLINK_SYNCPPP -/* syncppp net device routines +#ifdef CONFIG_HDLC + +/** + * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) + * set encoding and frame check sequence (FCS) options + * + * dev pointer to network device structure + * encoding serial encoding setting + * parity FCS setting + * + * returns 0 if success, otherwise error code */ - -static void mgslpc_setup(struct net_device *dev) +static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, + unsigned short parity) { - dev->open = mgslpc_sppp_open; - dev->stop = mgslpc_sppp_close; - dev->hard_start_xmit = mgslpc_sppp_tx; - dev->do_ioctl = mgslpc_sppp_ioctl; - dev->get_stats = mgslpc_net_stats; - dev->tx_timeout = mgslpc_sppp_tx_timeout; - dev->watchdog_timeo = 10*HZ; -} + MGSLPC_INFO *info = dev_to_port(dev); + unsigned char new_encoding; + unsigned short new_crctype; -void mgslpc_sppp_init(MGSLPC_INFO *info) -{ - struct net_device *d; + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - sprintf(info->netname,"mgslp%d",info->line); - - d = alloc_netdev(0, info->netname, mgslpc_setup); - if (!d) { - printk(KERN_WARNING "%s: alloc_netdev failed.\n", - info->netname); - return; + switch (encoding) + { + case ENCODING_NRZ: new_encoding = HDLC_ENCODING_NRZ; break; + case ENCODING_NRZI: new_encoding = HDLC_ENCODING_NRZI_SPACE; break; + case ENCODING_FM_MARK: new_encoding = HDLC_ENCODING_BIPHASE_MARK; break; + case ENCODING_FM_SPACE: new_encoding = HDLC_ENCODING_BIPHASE_SPACE; break; + case ENCODING_MANCHESTER: new_encoding = HDLC_ENCODING_BIPHASE_LEVEL; break; + default: return -EINVAL; } - info->if_ptr = &info->pppdev; - info->netdev = info->pppdev.dev = d; - - d->base_addr = info->io_base; - d->irq = info->irq_level; - d->priv = info; - - sppp_attach(&info->pppdev); - mgslpc_setup(d); - - if (register_netdev(d)) { - printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); - sppp_detach(info->netdev); - info->netdev = NULL; - info->pppdev.dev = NULL; - free_netdev(d); - return; + switch (parity) + { + case PARITY_NONE: new_crctype = HDLC_CRC_NONE; break; + case PARITY_CRC16_PR1_CCITT: new_crctype = HDLC_CRC_16_CCITT; break; + case PARITY_CRC32_PR1_CCITT: new_crctype = HDLC_CRC_32_CCITT; break; + default: return -EINVAL; } - if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_init()\n"); + info->params.encoding = new_encoding; + info->params.crc_type = new_crctype;; + + /* if network interface up, reprogram hardware */ + if (info->netcount) + mgslpc_program_hw(info); + + return 0; } -void mgslpc_sppp_delete(MGSLPC_INFO *info) +/** + * called by generic HDLC layer to send frame + * + * skb socket buffer containing HDLC frame + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) { + MGSLPC_INFO *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); + unsigned long flags; + if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_delete(%s)\n",info->netname); - unregister_netdev(info->netdev); - sppp_detach(info->netdev); - free_netdev(info->netdev); - info->netdev = NULL; - info->pppdev.dev = NULL; + printk(KERN_INFO "%s:hdlc_xmit(%s)\n",__FILE__,dev->name); + + /* stop sending until this frame completes */ + netif_stop_queue(dev); + + /* copy data to device buffers */ + memcpy(info->tx_buf, skb->data, skb->len); + info->tx_get = 0; + info->tx_put = info->tx_count = skb->len; + + /* update network statistics */ + stats->tx_packets++; + stats->tx_bytes += skb->len; + + /* done with socket buffer, so free it */ + dev_kfree_skb(skb); + + /* save start time for transmit timeout detection */ + dev->trans_start = jiffies; + + /* start hardware transmitter if necessary */ + spin_lock_irqsave(&info->lock,flags); + if (!info->tx_active) + tx_start(info); + spin_unlock_irqrestore(&info->lock,flags); + + return 0; } -int mgslpc_sppp_open(struct net_device *d) +/** + * called by network layer when interface enabled + * claim resources and initialize hardware + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_open(struct net_device *dev) { - MGSLPC_INFO *info = d->priv; - int err; + MGSLPC_INFO *info = dev_to_port(dev); + int rc; unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_open(%s)\n",info->netname); + printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); + + /* generic HDLC layer open processing */ + if ((rc = hdlc_open(dev))) + return rc; + /* arbitrate between network and tty opens */ spin_lock_irqsave(&info->netlock, flags); if (info->count != 0 || info->netcount != 0) { - printk(KERN_WARNING "%s: sppp_open returning busy\n", info->netname); + printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name); spin_unlock_irqrestore(&info->netlock, flags); return -EBUSY; } @@ -4304,142 +4332,297 @@ spin_unlock_irqrestore(&info->netlock, flags); /* claim resources and init adapter */ - if ((err = startup(info)) != 0) - goto open_fail; - - /* allow syncppp module to do open processing */ - if ((err = sppp_open(d)) != 0) { - shutdown(info); - goto open_fail; + if ((rc = startup(info)) != 0) { + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + return rc; } + /* assert DTR and RTS, apply hardware settings */ info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; mgslpc_program_hw(info); - d->trans_start = jiffies; - netif_start_queue(d); - return 0; + /* enable network layer transmit */ + dev->trans_start = jiffies; + netif_start_queue(dev); -open_fail: - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return err; + /* inform generic HDLC layer of current DCD status */ + spin_lock_irqsave(&info->lock, flags); + get_signals(info); + spin_unlock_irqrestore(&info->lock, flags); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + + return 0; } -void mgslpc_sppp_tx_timeout(struct net_device *dev) +/** + * called by network layer when interface is disabled + * shutdown hardware and release resources + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_close(struct net_device *dev) { - MGSLPC_INFO *info = dev->priv; + MGSLPC_INFO *info = dev_to_port(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_tx_timeout(%s)\n",info->netname); + printk("%s:hdlcdev_close(%s)\n",__FILE__,dev->name); - info->netstats.tx_errors++; - info->netstats.tx_aborted_errors++; + netif_stop_queue(dev); - spin_lock_irqsave(&info->lock,flags); - tx_stop(info); - spin_unlock_irqrestore(&info->lock,flags); + /* shutdown adapter and release resources */ + shutdown(info); - netif_wake_queue(dev); + hdlc_close(dev); + + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + + return 0; } -int mgslpc_sppp_tx(struct sk_buff *skb, struct net_device *dev) +/** + * called by network layer to process IOCTL call to network device + * + * dev pointer to network device structure + * ifr pointer to network interface request structure + * cmd IOCTL command code + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - MGSLPC_INFO *info = dev->priv; - unsigned long flags; + const size_t size = sizeof(sync_serial_settings); + sync_serial_settings new_line; + sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; + MGSLPC_INFO *info = dev_to_port(dev); + unsigned int flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_tx(%s)\n",info->netname); + printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name); - netif_stop_queue(dev); + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - info->tx_count = skb->len; + if (cmd != SIOCWANDEV) + return hdlc_ioctl(dev, ifr, cmd); - memcpy(info->tx_buf, skb->data, skb->len); - info->tx_get = 0; - info->tx_put = info->tx_count = skb->len; + switch(ifr->ifr_settings.type) { + case IF_GET_IFACE: /* return current sync_serial_settings */ - info->netstats.tx_packets++; - info->netstats.tx_bytes += skb->len; - dev_kfree_skb(skb); + ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; + if (ifr->ifr_settings.size < size) { + ifr->ifr_settings.size = size; /* data size wanted */ + return -ENOBUFS; + } - dev->trans_start = jiffies; + flags = info->params.flags & (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + + switch (flags){ + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN): new_line.clock_type = CLOCK_EXT; break; + case (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_INT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_TXINT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN): new_line.clock_type = CLOCK_TXFROMRX; break; + default: new_line.clock_type = CLOCK_DEFAULT; + } - spin_lock_irqsave(&info->lock,flags); - if (!info->tx_active) - tx_start(info); - spin_unlock_irqrestore(&info->lock,flags); + new_line.clock_rate = info->params.clock_speed; + new_line.loopback = info->params.loopback ? 1:0; - return 0; + if (copy_to_user(line, &new_line, size)) + return -EFAULT; + return 0; + + case IF_IFACE_SYNC_SERIAL: /* set sync_serial_settings */ + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (copy_from_user(&new_line, line, size)) + return -EFAULT; + + switch (new_line.clock_type) + { + case CLOCK_EXT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN; break; + case CLOCK_TXFROMRX: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN; break; + case CLOCK_INT: flags = HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG; break; + case CLOCK_TXINT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG; break; + case CLOCK_DEFAULT: flags = info->params.flags & + (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); break; + default: return -EINVAL; + } + + if (new_line.loopback != 0 && new_line.loopback != 1) + return -EINVAL; + + info->params.flags &= ~(HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + info->params.flags |= flags; + + info->params.loopback = new_line.loopback; + + if (flags & (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG)) + info->params.clock_speed = new_line.clock_rate; + else + info->params.clock_speed = 0; + + /* if network interface up, reprogram hardware */ + if (info->netcount) + mgslpc_program_hw(info); + return 0; + + default: + return hdlc_ioctl(dev, ifr, cmd); + } } -int mgslpc_sppp_close(struct net_device *d) +/** + * called by network layer when transmit timeout is detected + * + * dev pointer to network device structure + */ +static void hdlcdev_tx_timeout(struct net_device *dev) { - MGSLPC_INFO *info = d->priv; + MGSLPC_INFO *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_close(%s)\n",info->netname); + printk("hdlcdev_tx_timeout(%s)\n",dev->name); - /* shutdown adapter and release resources */ - shutdown(info); + stats->tx_errors++; + stats->tx_aborted_errors++; + + spin_lock_irqsave(&info->lock,flags); + tx_stop(info); + spin_unlock_irqrestore(&info->lock,flags); - /* allow syncppp to do close processing */ - sppp_close(d); - netif_stop_queue(d); + netif_wake_queue(dev); +} - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return 0; +/** + * called by device driver when transmit completes + * reenable network layer transmit if stopped + * + * info pointer to device instance information + */ +static void hdlcdev_tx_done(MGSLPC_INFO *info) +{ + if (netif_queue_stopped(info->netdev)) + netif_wake_queue(info->netdev); } -void mgslpc_sppp_rx_done(MGSLPC_INFO *info, char *buf, int size) +/** + * called by device driver when frame received + * pass frame to network layer + * + * info pointer to device instance information + * buf pointer to buffer contianing frame data + * size count of data bytes in buf + */ +static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size) { struct sk_buff *skb = dev_alloc_skb(size); + struct net_device *dev = info->netdev; + struct net_device_stats *stats = hdlc_stats(dev); + if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_sppp_rx_done(%s)\n",info->netname); + printk("hdlcdev_rx(%s)\n",dev->name); + if (skb == NULL) { - printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", - info->netname); - info->netstats.rx_dropped++; + printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); + stats->rx_dropped++; return; } memcpy(skb_put(skb, size),buf,size); - skb->protocol = htons(ETH_P_WAN_PPP); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - info->netstats.rx_packets++; - info->netstats.rx_bytes += size; + skb->dev = info->netdev; + skb->mac.raw = skb->data; + skb->protocol = hdlc_type_trans(skb, skb->dev); + + stats->rx_packets++; + stats->rx_bytes += size; + netif_rx(skb); - info->netdev->trans_start = jiffies; -} -void mgslpc_sppp_tx_done(MGSLPC_INFO *info) -{ - if (netif_queue_stopped(info->netdev)) - netif_wake_queue(info->netdev); + info->netdev->last_rx = jiffies; } -struct net_device_stats *mgslpc_net_stats(struct net_device *dev) +/** + * called by device driver when adding device instance + * do generic HDLC initialization + * + * info pointer to device instance information + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_init(MGSLPC_INFO *info) { - MGSLPC_INFO *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgslpc_net_stats(%s)\n",info->netname); - return &info->netstats; + int rc; + struct net_device *dev; + hdlc_device *hdlc; + + /* allocate and initialize network and HDLC layer objects */ + + if (!(dev = alloc_hdlcdev(info))) { + printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); + return -ENOMEM; + } + + /* for network layer reporting purposes only */ + dev->base_addr = info->io_base; + dev->irq = info->irq_level; + + /* network layer callbacks and settings */ + dev->do_ioctl = hdlcdev_ioctl; + dev->open = hdlcdev_open; + dev->stop = hdlcdev_close; + dev->tx_timeout = hdlcdev_tx_timeout; + dev->watchdog_timeo = 10*HZ; + dev->tx_queue_len = 50; + + /* generic HDLC layer callbacks and settings */ + hdlc = dev_to_hdlc(dev); + hdlc->attach = hdlcdev_attach; + hdlc->xmit = hdlcdev_xmit; + + /* register objects with HDLC layer */ + if ((rc = register_hdlc_device(dev))) { + printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); + free_netdev(dev); + return rc; + } + + info->netdev = dev; + return 0; } -int mgslpc_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +/** + * called by device driver when removing device instance + * do generic HDLC cleanup + * + * info pointer to device instance information + */ +static void hdlcdev_exit(MGSLPC_INFO *info) { - MGSLPC_INFO *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("%s(%d):mgslpc_ioctl %s cmd=%08X\n", __FILE__,__LINE__, - info->netname, cmd ); - return sppp_do_ioctl(dev, ifr, cmd); + unregister_hdlc_device(info->netdev); + free_netdev(info->netdev); + info->netdev = NULL; } -#endif /* ifdef CONFIG_SYNCLINK_SYNCPPP */ +#endif /* CONFIG_HDLC */ + diff -Nru a/drivers/char/pcxx.c b/drivers/char/pcxx.c --- a/drivers/char/pcxx.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/pcxx.c 2004-09-06 16:37:53 -07:00 @@ -130,7 +130,6 @@ int pcxx_ncook=sizeof(pcxx_cook); int pcxx_nbios=sizeof(pcxx_bios); -#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define pcxxassert(x, msg) if(!(x)) pcxx_error(__LINE__, msg) #define FEPTIMEOUT 200000 @@ -206,7 +205,7 @@ { unsigned long flags; - int e1, e2; + int e1; printk(KERN_NOTICE "Unloading PC/Xx version %s\n", VERSION); @@ -223,12 +222,6 @@ restore_flags(flags); } -/* - * pcxe_init() is our init_module(): - */ -module_init(pcxe_init); -module_cleanup(pcxe_cleanup); - static inline struct channel *chan(register struct tty_struct *tty) { if (tty) { @@ -626,7 +619,7 @@ tail &= (size - 1); stlen = (head >= tail) ? (size - (head - tail) - 1) : (tail - head - 1); - count = MIN(stlen, count); + count = min(stlen, count); memoff(ch); restore_flags(flags); @@ -658,11 +651,11 @@ remain = tail - head - 1; stlen = remain; } - count = MIN(remain, count); + count = min(remain, count); txwinon(ch); while (count > 0) { - stlen = MIN(count, stlen); + stlen = min(count, stlen); memcpy(ch->txptr + head, buf, stlen); buf += stlen; count -= stlen; @@ -1013,9 +1006,6 @@ } #endif -module_init(pcxe_init) -module_exit(pcxe_exit) - static struct tty_operations pcxe_ops = { .open = pcxe_open, .close = pcxe_close, @@ -1561,6 +1551,8 @@ return ret; } +module_init(pcxe_init) +module_exit(pcxe_cleanup) static void pcxxpoll(unsigned long dummy) { @@ -1995,6 +1987,7 @@ volatile struct board_chan *bc; unsigned long flags; int mflag = 0; + int mstat; if(ch) bc = ch->brdchan; @@ -2069,6 +2062,7 @@ pcxxparam(tty,ch); memoff(ch); restore_flags(flags); + return 0; } diff -Nru a/drivers/char/pty.c b/drivers/char/pty.c --- a/drivers/char/pty.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/pty.c 2004-09-06 16:37:51 -07:00 @@ -32,12 +32,6 @@ #include #include -#if defined(CONFIG_LEGACY_PTYS) || defined(CONFIG_UNIX98_PTYS) - -#ifdef CONFIG_LEGACY_PTYS -static struct tty_driver *pty_driver, *pty_slave_driver; -#endif - /* These are global because they are accessed in tty_io.c */ #ifdef CONFIG_UNIX98_PTYS struct tty_driver *ptm_driver; @@ -205,19 +199,6 @@ return ((count < N_TTY_BUF_SIZE/2) ? 0 : count); } -/* - * Return the device number of a Unix98 PTY (only!). This lets us open a - * master pty with the multi-headed ptmx device, then find out which - * one we got after it is open, with an ioctl. - */ -#ifdef CONFIG_UNIX98_PTYS -static int pty_get_device_number(struct tty_struct *tty, unsigned __user *value) -{ - unsigned int result = tty->index; - return put_user(result, value); -} -#endif - /* Set the lock flag on a pty */ static int pty_set_lock(struct tty_struct *tty, int __user * arg) { @@ -231,41 +212,6 @@ return 0; } -#ifdef CONFIG_LEGACY_PTYS -static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, - unsigned int cmd, unsigned long arg) -{ - if (!tty) { - printk("pty_ioctl called with NULL tty!\n"); - return -EIO; - } - switch(cmd) { - case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */ - return pty_set_lock(tty, (int __user *) arg); - } - return -ENOIOCTLCMD; -} -#endif - -#ifdef CONFIG_UNIX98_PTYS -static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, - unsigned int cmd, unsigned long arg) -{ - if (!tty) { - printk("pty_unix98_ioctl called with NULL tty!\n"); - return -EIO; - } - switch(cmd) { - case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */ - return pty_set_lock(tty, (int __user *)arg); - case TIOCGPTN: /* Get PT Number */ - return pty_get_device_number(tty, (unsigned int __user *)arg); - } - - return -ENOIOCTLCMD; -} -#endif - static void pty_flush_buffer(struct tty_struct *tty) { struct tty_struct *to = tty->link; @@ -322,42 +268,22 @@ .set_termios = pty_set_termios, }; -/* sysctl support for setting limits on the number of Unix98 ptys allocated. - Otherwise one can eat up all kernel memory by opening /dev/ptmx repeatedly. */ -#ifdef CONFIG_UNIX98_PTYS -int pty_limit = NR_UNIX98_PTY_DEFAULT; -static int pty_limit_min = 0; -static int pty_limit_max = NR_UNIX98_PTY_MAX; +/* Traditional BSD devices */ +#ifdef CONFIG_LEGACY_PTYS +static struct tty_driver *pty_driver, *pty_slave_driver; -ctl_table pty_table[] = { - { - .ctl_name = PTY_MAX, - .procname = "max", - .maxlen = sizeof(int), - .mode = 0644, - .data = &pty_limit, - .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, - .extra1 = &pty_limit_min, - .extra2 = &pty_limit_max, - }, { - .ctl_name = PTY_NR, - .procname = "nr", - .maxlen = sizeof(int), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, { - .ctl_name = 0 +static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg) +{ + switch (cmd) { + case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */ + return pty_set_lock(tty, (int __user *) arg); } -}; -#endif - -/* Initialization */ + return -ENOIOCTLCMD; +} -static int __init pty_init(void) +static void __init legacy_pty_init(void) { -#ifdef CONFIG_LEGACY_PTYS - /* Traditional BSD devices */ pty_driver = alloc_tty_driver(NR_PTYS); if (!pty_driver) @@ -404,11 +330,58 @@ panic("Couldn't register pty driver"); if (tty_register_driver(pty_slave_driver)) panic("Couldn't register pty slave driver"); +} +#else +static inline void legacy_pty_init(void) { } +#endif -#endif /* CONFIG_LEGACY_PTYS */ - +/* Unix98 devices */ #ifdef CONFIG_UNIX98_PTYS - /* Unix98 devices */ +/* + * sysctl support for setting limits on the number of Unix98 ptys allocated. + * Otherwise one can eat up all kernel memory by opening /dev/ptmx repeatedly. + */ +int pty_limit = NR_UNIX98_PTY_DEFAULT; +static int pty_limit_min = 0; +static int pty_limit_max = NR_UNIX98_PTY_MAX; + +ctl_table pty_table[] = { + { + .ctl_name = PTY_MAX, + .procname = "max", + .maxlen = sizeof(int), + .mode = 0644, + .data = &pty_limit, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &pty_limit_min, + .extra2 = &pty_limit_max, + }, { + .ctl_name = PTY_NR, + .procname = "nr", + .maxlen = sizeof(int), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, { + .ctl_name = 0 + } +}; + +static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg) +{ + switch (cmd) { + case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */ + return pty_set_lock(tty, (int __user *)arg); + case TIOCGPTN: /* Get PT Number */ + return put_user(tty->index, (unsigned int __user *)arg); + } + + return -ENOIOCTLCMD; +} + +static void __init unix98_pty_init(void) +{ devfs_mk_dir("pts"); ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); if (!ptm_driver) @@ -455,10 +428,15 @@ panic("Couldn't register Unix98 pts driver"); pty_table[1].data = &ptm_driver->refcount; -#endif /* CONFIG_UNIX98_PTYS */ +} +#else +static inline void unix98_pty_init(void) { } +#endif +static int __init pty_init(void) +{ + legacy_pty_init(); + unix98_pty_init(); return 0; } module_init(pty_init); - -#endif /* CONFIG_LEGACY_PTYS || CONFIG_UNIX98_PTYS */ diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/random.c 2004-09-06 16:37:50 -07:00 @@ -401,6 +401,7 @@ */ static struct entropy_store *random_state; /* The default global store */ static struct entropy_store *sec_random_state; /* secondary store */ +static struct entropy_store *urandom_state; /* For urandom */ static DECLARE_WAIT_QUEUE_HEAD(random_read_wait); static DECLARE_WAIT_QUEUE_HEAD(random_write_wait); @@ -493,6 +494,7 @@ /* mostly-read data: */ struct poolinfo poolinfo; __u32 *pool; + const char *name; /* read-write data: */ spinlock_t lock ____cacheline_aligned_in_smp; @@ -507,7 +509,8 @@ * * Returns an negative error if there is a problem. */ -static int create_entropy_store(int size, struct entropy_store **ret_bucket) +static int create_entropy_store(int size, const char *name, + struct entropy_store **ret_bucket) { struct entropy_store *r; struct poolinfo *p; @@ -538,6 +541,7 @@ } memset(r->pool, 0, POOLBYTES); r->lock = SPIN_LOCK_UNLOCKED; + r->name = name; *ret_bucket = r; return 0; } @@ -643,12 +647,8 @@ } else { r->entropy_count += nbits; if (nbits) - DEBUG_ENT("%04d %04d : added %d bits to %s\n", - random_state->entropy_count, - sec_random_state->entropy_count, - nbits, - r == sec_random_state ? "secondary" : - r == random_state ? "primary" : "unknown"); + DEBUG_ENT("Added %d entropy credits to %s, now %d\n", + nbits, r->name, r->entropy_count); } spin_unlock_irqrestore(&r->lock, flags); @@ -781,8 +781,8 @@ /* There is one of these per entropy source */ struct timer_rand_state { - __u32 last_time; - __s32 last_delta,last_delta2; + cycles_t last_time; + long last_delta,last_delta2; unsigned dont_count_entropy:1; }; @@ -799,14 +799,12 @@ * The number "num" is also added to the pool - it should somehow describe * the type of event which just happened. This is currently 0-255 for * keyboard scan codes, and 256 upwards for interrupts. - * On the i386, this is assumed to be at most 16 bits, and the high bits - * are used for a high-resolution timer. * */ static void add_timer_randomness(struct timer_rand_state *state, unsigned num) { - __u32 time; - __s32 delta, delta2, delta3; + cycles_t time; + long delta, delta2, delta3; int entropy = 0; /* if over the trickle threshold, use only 1 in 4096 samples */ @@ -814,22 +812,17 @@ (__get_cpu_var(trickle_count)++ & 0xfff)) return; -#if defined (__i386__) || defined (__x86_64__) - if (cpu_has_tsc) { - __u32 high; - rdtsc(time, high); - num ^= high; + /* + * Use get_cycles() if implemented, otherwise fall back to + * jiffies. + */ + time = get_cycles(); + if (time != 0) { + if (sizeof(time) > 4) + num ^= (u32)(time >> 32); } else { time = jiffies; } -#elif defined (__sparc_v9__) - unsigned long tick = tick_ops->get_tick(); - - time = (unsigned int) tick; - num ^= (tick >> 32UL); -#else - time = jiffies; -#endif /* * Calculate number of bits of randomness we probably added. @@ -1328,8 +1321,7 @@ "(%d of %d requested)\n", random_state->entropy_count, sec_random_state->entropy_count, - r == sec_random_state ? "secondary" : "unknown", - bytes * 8, nbytes * 8, r->entropy_count); + r->name, bytes * 8, nbytes * 8, r->entropy_count); bytes=extract_entropy(random_state, tmp, bytes, EXTRACT_ENTROPY_LIMIT); @@ -1373,9 +1365,7 @@ DEBUG_ENT("%04d %04d : trying to extract %d bits from %s\n", random_state->entropy_count, sec_random_state->entropy_count, - nbytes * 8, - r == sec_random_state ? "secondary" : - r == random_state ? "primary" : "unknown"); + nbytes * 8, r->name); if (flags & EXTRACT_ENTROPY_LIMIT && nbytes >= r->entropy_count / 8) nbytes = r->entropy_count / 8; @@ -1388,12 +1378,8 @@ if (r->entropy_count < random_write_wakeup_thresh) wake_up_interruptible(&random_write_wait); - DEBUG_ENT("%04d %04d : debiting %d bits from %s%s\n", - random_state->entropy_count, - sec_random_state->entropy_count, - nbytes * 8, - r == sec_random_state ? "secondary" : - r == random_state ? "primary" : "unknown", + DEBUG_ENT("Debiting %d entropy credits from %s%s\n", + nbytes * 8, r->name, flags & EXTRACT_ENTROPY_LIMIT ? "" : " (unlimited)"); spin_unlock_irqrestore(&r->lock, cpuflags); @@ -1482,14 +1468,21 @@ */ void get_random_bytes(void *buf, int nbytes) { - if (sec_random_state) - extract_entropy(sec_random_state, (char *) buf, nbytes, - EXTRACT_ENTROPY_SECONDARY); - else if (random_state) - extract_entropy(random_state, (char *) buf, nbytes, 0); - else + struct entropy_store *r = urandom_state; + int flags = EXTRACT_ENTROPY_SECONDARY; + + if (!r) + r = sec_random_state; + if (!r) { + r = random_state; + flags = 0; + } + if (!r) { printk(KERN_NOTICE "get_random_bytes called before " "random driver initialization\n"); + return; + } + extract_entropy(r, (char *) buf, nbytes, flags); } EXPORT_SYMBOL(get_random_bytes); @@ -1533,16 +1526,22 @@ { int i; - if (create_entropy_store(DEFAULT_POOL_SIZE, &random_state)) + if (create_entropy_store(DEFAULT_POOL_SIZE, "primary", &random_state)) goto err; if (batch_entropy_init(BATCH_ENTROPY_SIZE, random_state)) goto err; - if (create_entropy_store(SECONDARY_POOL_SIZE, &sec_random_state)) + if (create_entropy_store(SECONDARY_POOL_SIZE, "secondary", + &sec_random_state)) + goto err; + if (create_entropy_store(SECONDARY_POOL_SIZE, "urandom", + &urandom_state)) goto err; clear_entropy_store(random_state); clear_entropy_store(sec_random_state); + clear_entropy_store(urandom_state); init_std_data(random_state); init_std_data(sec_random_state); + init_std_data(urandom_state); #ifdef CONFIG_SYSCTL sysctl_init_random(random_state); #endif @@ -1675,9 +1674,15 @@ urandom_read(struct file * file, char __user * buf, size_t nbytes, loff_t *ppos) { - return extract_entropy(sec_random_state, buf, nbytes, - EXTRACT_ENTROPY_USER | - EXTRACT_ENTROPY_SECONDARY); + int flags = EXTRACT_ENTROPY_USER; + unsigned long cpuflags; + + spin_lock_irqsave(&random_state->lock, cpuflags); + if (random_state->entropy_count > random_state->poolinfo.POOLBITS) + flags |= EXTRACT_ENTROPY_SECONDARY; + spin_unlock_irqrestore(&random_state->lock, cpuflags); + + return extract_entropy(urandom_state, buf, nbytes, flags); } static unsigned int @@ -1731,10 +1736,9 @@ random_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg) { - int *tmp, size, ent_count; + int size, ent_count; int __user *p = (int __user *)arg; int retval; - unsigned long flags; switch (cmd) { case RNDGETENTCNT: @@ -1755,40 +1759,6 @@ if (random_state->entropy_count >= random_read_wakeup_thresh) wake_up_interruptible(&random_read_wait); return 0; - case RNDGETPOOL: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - if (get_user(size, p) || - put_user(random_state->poolinfo.poolwords, p++)) - return -EFAULT; - if (size < 0) - return -EFAULT; - if (size > random_state->poolinfo.poolwords) - size = random_state->poolinfo.poolwords; - - /* prepare to atomically snapshot pool */ - - tmp = kmalloc(size * sizeof(__u32), GFP_KERNEL); - - if (!tmp) - return -ENOMEM; - - spin_lock_irqsave(&random_state->lock, flags); - ent_count = random_state->entropy_count; - memcpy(tmp, random_state->pool, size * sizeof(__u32)); - spin_unlock_irqrestore(&random_state->lock, flags); - - if (!copy_to_user(p, tmp, size * sizeof(__u32))) { - kfree(tmp); - return -EFAULT; - } - - kfree(tmp); - - if(put_user(ent_count, p++)) - return -EFAULT; - - return 0; case RNDADDENTROPY: if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -1885,7 +1855,8 @@ struct entropy_store *new_store, *old_store; int ret; - if ((ret = create_entropy_store(poolsize, &new_store))) + if ((ret = create_entropy_store(poolsize, random_state->name, + &new_store))) return ret; add_entropy_words(new_store, random_state->pool, @@ -2247,30 +2218,35 @@ static spinlock_t ip_lock = SPIN_LOCK_UNLOCKED; static unsigned int ip_cnt; -static struct keydata *__check_and_rekey(time_t time) +static void rekey_seq_generator(void *private_) { struct keydata *keyptr; + struct timeval tv; + + do_gettimeofday(&tv); + spin_lock_bh(&ip_lock); keyptr = &ip_keydata[ip_cnt&1]; - if (!keyptr->rekey_time || (time - keyptr->rekey_time) > REKEY_INTERVAL) { - keyptr = &ip_keydata[1^(ip_cnt&1)]; - keyptr->rekey_time = time; - get_random_bytes(keyptr->secret, sizeof(keyptr->secret)); - keyptr->count = (ip_cnt&COUNT_MASK)<rekey_time = tv.tv_sec; + get_random_bytes(keyptr->secret, sizeof(keyptr->secret)); + keyptr->count = (ip_cnt&COUNT_MASK)<rekey_time || (time - keyptr->rekey_time) > REKEY_INTERVAL) { - keyptr = __check_and_rekey(time); + schedule_work(&rekey_work); } return keyptr; diff -Nru a/drivers/char/riscom8.c b/drivers/char/riscom8.c --- a/drivers/char/riscom8.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/riscom8.c 2004-09-06 16:37:52 -07:00 @@ -75,10 +75,6 @@ ASYNC_SPD_HI | ASYNC_SPEED_VHI | ASYNC_SESSION_LOCKOUT | \ ASYNC_PGRP_LOCKOUT | ASYNC_CALLOUT_NOHUP) -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #define RS_EVENT_WRITE_WAKEUP 0 static struct riscom_board * IRQ_to_board[16]; @@ -107,7 +103,7 @@ }; static struct riscom_port rc_port[RC_NBOARD * RC_NPORT]; - + /* RISCom/8 I/O ports addresses (without address translation) */ static unsigned short rc_ioport[] = { #if 1 @@ -483,7 +479,7 @@ rc_out(bp, CD180_TDR, CD180_C_SBRK); port->COR2 &= ~COR2_ETC; } - count = MIN(port->break_length, 0xff); + count = min_t(int, port->break_length, 0xff); rc_out(bp, CD180_TDR, CD180_C_ESC); rc_out(bp, CD180_TDR, CD180_C_DELAY); rc_out(bp, CD180_TDR, count); @@ -1165,8 +1161,8 @@ down(&tmp_buf_sem); while (1) { cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); if (c <= 0) break; @@ -1178,8 +1174,8 @@ } cli(); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); + c = min_t(c, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c); port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); port->xmit_cnt += c; @@ -1193,8 +1189,8 @@ } else { while (1) { cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); if (c <= 0) { restore_flags(flags); break; diff -Nru a/drivers/char/rocket.c b/drivers/char/rocket.c --- a/drivers/char/rocket.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/rocket.c 2004-09-06 16:37:54 -07:00 @@ -389,7 +389,7 @@ while (1) { if (tty->stopped || tty->hw_stopped) break; - c = MIN(info->xmit_fifo_room, MIN(info->xmit_cnt, XMIT_BUF_SIZE - info->xmit_tail)); + c = min(info->xmit_fifo_room, min(info->xmit_cnt, XMIT_BUF_SIZE - info->xmit_tail)); if (c <= 0 || info->xmit_fifo_room <= 0) break; sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) (info->xmit_buf + info->xmit_tail), c / 2); @@ -1283,11 +1283,7 @@ if (copy_from_user(&new_serial, new_info, sizeof (new_serial))) return -EFAULT; -#ifdef CAP_SYS_ADMIN if (!capable(CAP_SYS_ADMIN)) -#else - if (!suser()) -#endif { if ((new_serial.flags & ~ROCKET_USR_MASK) != (info->flags & ~ROCKET_USR_MASK)) return -EPERM; @@ -1662,7 +1658,7 @@ * into FIFO. Use the write queue for temp storage. */ if (!tty->stopped && !tty->hw_stopped && info->xmit_cnt == 0 && info->xmit_fifo_room > 0) { - c = MIN(count, info->xmit_fifo_room); + c = min(count, info->xmit_fifo_room); b = buf; if (from_user) { if (copy_from_user(info->xmit_buf, buf, c)) { @@ -1672,7 +1668,7 @@ if (info->tty == 0) goto end; b = info->xmit_buf; - c = MIN(c, info->xmit_fifo_room); + c = min(c, info->xmit_fifo_room); } /* Push data into FIFO, 2 bytes at a time */ @@ -1700,7 +1696,7 @@ if (info->tty == 0) /* Seemingly obligatory check... */ goto end; - c = MIN(count, MIN(XMIT_BUF_SIZE - info->xmit_cnt - 1, XMIT_BUF_SIZE - info->xmit_head)); + c = min(count, min(XMIT_BUF_SIZE - info->xmit_cnt - 1, XMIT_BUF_SIZE - info->xmit_head)); if (c <= 0) break; diff -Nru a/drivers/char/rocket_int.h b/drivers/char/rocket_int.h --- a/drivers/char/rocket_int.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/rocket_int.h 2004-09-06 16:37:51 -07:00 @@ -1241,10 +1241,6 @@ #define TTY_ROCKET_MAJOR 46 #define CUA_ROCKET_MAJOR 47 -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #ifdef PCI_VENDOR_ID_RP #undef PCI_VENDOR_ID_RP #undef PCI_DEVICE_ID_RP8OCTA diff -Nru a/drivers/char/selection.c b/drivers/char/selection.c --- a/drivers/char/selection.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/char/selection.c 2004-09-06 16:37:55 -07:00 @@ -26,10 +26,6 @@ #include #include -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* Don't take this from : 011-015 on the screen aren't spaces */ #define isspace(c) ((c) == ' ') @@ -295,7 +291,7 @@ continue; } count = sel_buffer_lth - pasted; - count = MIN(count, tty->ldisc.receive_room(tty)); + count = min(count, tty->ldisc.receive_room(tty)); tty->ldisc.receive_buf(tty, sel_buffer + pasted, NULL, count); pasted += count; } diff -Nru a/drivers/char/serial167.c b/drivers/char/serial167.c --- a/drivers/char/serial167.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/serial167.c 2004-09-06 16:37:52 -07:00 @@ -83,10 +83,6 @@ #undef CYCLOM_16Y_HACK #define CYCLOM_ENABLE_MONITORING -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #define WAKEUP_CHARS 256 #define STD_COM_FLAGS (0) @@ -1238,8 +1234,8 @@ if (from_user) { down(&tmp_buf_sem); while (1) { - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) break; @@ -1251,8 +1247,8 @@ } local_irq_save(flags); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c); info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); info->xmit_cnt += c; @@ -1266,8 +1262,8 @@ } else { while (1) { local_irq_save(flags); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) { local_irq_restore(flags); break; @@ -2379,7 +2375,7 @@ | CyPARITY| CyFRAME| CyOVERRUN; /* info->timeout */ - printk("ttyS%1d ", info->line); + printk("ttyS%d ", info->line); port_num++;info++; if(!(port_num & 7)){ printk("\n "); diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c --- a/drivers/char/sonypi.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/sonypi.c 2004-09-06 16:37:54 -07:00 @@ -67,7 +67,7 @@ static inline void sonypi_initq(void) { sonypi_device.queue.head = sonypi_device.queue.tail = 0; sonypi_device.queue.len = 0; - sonypi_device.queue.s_lock = (spinlock_t)SPIN_LOCK_UNLOCKED; + sonypi_device.queue.s_lock = SPIN_LOCK_UNLOCKED; init_waitqueue_head(&sonypi_device.queue.proc_list); } diff -Nru a/drivers/char/specialix.c b/drivers/char/specialix.c --- a/drivers/char/specialix.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/specialix.c 2004-09-06 16:37:54 -07:00 @@ -135,10 +135,6 @@ ASYNC_SPD_HI | ASYNC_SPEED_VHI | ASYNC_SESSION_LOCKOUT | \ ASYNC_PGRP_LOCKOUT | ASYNC_CALLOUT_NOHUP) -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #undef RS_EVENT_WRITE_WAKEUP #define RS_EVENT_WRITE_WAKEUP 0 @@ -159,7 +155,7 @@ }; static struct specialix_port sx_port[SX_NBOARD * SX_NPORT]; - + #ifdef SPECIALIX_TIMER static struct timer_list missed_irq_timer; @@ -715,7 +711,7 @@ sx_out(bp, CD186x_TDR, CD186x_C_SBRK); port->COR2 &= ~COR2_ETC; } - count = MIN(port->break_length, 0xff); + count = min_t(int, port->break_length, 0xff); sx_out(bp, CD186x_TDR, CD186x_C_ESC); sx_out(bp, CD186x_TDR, CD186x_C_DELAY); sx_out(bp, CD186x_TDR, count); @@ -1506,7 +1502,7 @@ if (from_user) { down(&tmp_buf_sem); while (1) { - c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, SERIAL_XMIT_SIZE - port->xmit_head)); if (c <= 0) break; @@ -1519,7 +1515,7 @@ } cli(); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + c = min_t(int, c, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, SERIAL_XMIT_SIZE - port->xmit_head)); memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c); port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); @@ -1534,7 +1530,7 @@ } else { while (1) { cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, SERIAL_XMIT_SIZE - port->xmit_head)); if (c <= 0) { restore_flags(flags); diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c --- a/drivers/char/synclink.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/char/synclink.c 2004-09-06 16:37:52 -07:00 @@ -1,7 +1,7 @@ /* * linux/drivers/char/synclink.c * - * $Id: synclink.c,v 4.24 2004/06/03 14:50:09 paulkf Exp $ + * $Id: synclink.c,v 4.28 2004/08/11 19:30:01 paulkf Exp $ * * Device driver for Microgate SyncLink ISA and PCI * high speed multiprotocol serial adapters. @@ -100,13 +100,10 @@ #include #include #include +#include -#ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE -#define CONFIG_SYNCLINK_SYNCPPP 1 -#endif - -#ifdef CONFIG_SYNCLINK_SYNCPPP -#include +#ifdef CONFIG_HDLC_MODULE +#define CONFIG_HDLC 1 #endif #define GET_USER(error,value,addr) error = get_user(value,addr) @@ -187,7 +184,6 @@ */ struct mgsl_struct { - void *if_ptr; /* General purpose pointer (used by SPPP) */ int magic; int flags; int count; /* count of opens */ @@ -318,15 +314,13 @@ struct _input_signal_events input_signal_events; - /* SPPP/Cisco HDLC device parts */ + /* generic HDLC device parts */ int netcount; int dosyncppp; spinlock_t netlock; -#ifdef CONFIG_SYNCLINK_SYNCPPP - struct ppp_device pppdev; - char netname[10]; + +#ifdef CONFIG_HDLC struct net_device *netdev; - struct net_device_stats netstats; #endif }; @@ -734,18 +728,12 @@ int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg); -#ifdef CONFIG_SYNCLINK_SYNCPPP -/* SPPP/HDLC stuff */ -static void mgsl_sppp_init(struct mgsl_struct *info); -static void mgsl_sppp_delete(struct mgsl_struct *info); -int mgsl_sppp_open(struct net_device *d); -int mgsl_sppp_close(struct net_device *d); -void mgsl_sppp_tx_timeout(struct net_device *d); -int mgsl_sppp_tx(struct sk_buff *skb, struct net_device *d); -void mgsl_sppp_rx_done(struct mgsl_struct *info, char *buf, int size); -void mgsl_sppp_tx_done(struct mgsl_struct *info); -int mgsl_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -struct net_device_stats *mgsl_net_stats(struct net_device *dev); +#ifdef CONFIG_HDLC +#define dev_to_port(D) (dev_to_hdlc(D)->priv) +static void hdlcdev_tx_done(struct mgsl_struct *info); +static void hdlcdev_rx(struct mgsl_struct *info, char *buf, int size); +static int hdlcdev_init(struct mgsl_struct *info); +static void hdlcdev_exit(struct mgsl_struct *info); #endif /* @@ -863,8 +851,6 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user *mask); static int mgsl_loopmode_send_done( struct mgsl_struct * info ); -#define jiffies_from_ms(a) ((((a) * HZ)/1000)+1) - /* set non-zero on successful registration with PCI subsystem */ static int pci_registered; @@ -911,7 +897,7 @@ MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); static char *driver_name = "SyncLink serial driver"; -static char *driver_version = "$Revision: 4.24 $"; +static char *driver_version = "$Revision: 4.28 $"; static int synclink_init_one (struct pci_dev *dev, const struct pci_device_id *ent); @@ -942,10 +928,6 @@ static void mgsl_change_params(struct mgsl_struct *info); static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout); -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* * 1st function defined in .text section. Calling this function in * init_module() followed by a breakpoint allows a remote debugger @@ -1289,9 +1271,9 @@ info->drop_rts_on_tx_done = 0; } -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - mgsl_sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif { @@ -1352,12 +1334,12 @@ icount->dcd++; if (status & MISCSTATUS_DCD) { info->input_signal_events.dcd_up++; -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) - sppp_reopen(info->netdev); -#endif } else info->input_signal_events.dcd_down++; +#ifdef CONFIG_HDLC + if (info->netcount) + hdlc_set_carrier(status & MISCSTATUS_DCD, info->netdev); +#endif } if (status & MISCSTATUS_CTS_LATCHED) { @@ -2258,8 +2240,8 @@ if (from_user) { down(&tmp_buf_sem); while (1) { - c = MIN(count, - MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, count, + min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) break; @@ -2272,7 +2254,7 @@ break; } spin_lock_irqsave(&info->irq_spinlock,flags); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c); info->xmit_head = ((info->xmit_head + c) & @@ -2287,8 +2269,8 @@ } else { while (1) { spin_lock_irqsave(&info->irq_spinlock,flags); - c = MIN(count, - MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + c = min_t(int, count, + min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) { spin_unlock_irqrestore(&info->irq_spinlock,flags); @@ -3326,7 +3308,7 @@ char_time = 1; if (timeout) - char_time = MIN(char_time, timeout); + char_time = min_t(unsigned long, char_time, timeout); if ( info->params.mode == MGSL_MODE_HDLC || info->params.mode == MGSL_MODE_RAW ) { @@ -3592,7 +3574,7 @@ cleanup: if (retval) { if (tty->count == 1) - info->tty = NULL;/* tty layer will release tty struct */ + info->tty = NULL; /* tty layer will release tty struct */ if(info->count) info->count--; } @@ -4187,7 +4169,7 @@ info->get_tx_holding_index=0; /* restart transmit timer */ - mod_timer(&info->tx_timer, jiffies + jiffies_from_ms(5000)); + mod_timer(&info->tx_timer, jiffies + msecs_to_jiffies(5000)); ret = 1; } @@ -4415,12 +4397,10 @@ info->max_frame_size ); } -#ifdef CONFIG_SYNCLINK_SYNCPPP -#ifdef MODULE - if (info->dosyncppp) -#endif - mgsl_sppp_init(info); +#ifdef CONFIG_HDLC + hdlcdev_init(info); #endif + } /* end of mgsl_add_device() */ /* mgsl_allocate_device() @@ -4575,9 +4555,8 @@ info = mgsl_device_list; while(info) { -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->dosyncppp) - mgsl_sppp_delete(info); +#ifdef CONFIG_HDLC + hdlcdev_exit(info); #endif mgsl_release_resources(info); tmp = info; @@ -5819,7 +5798,7 @@ usc_TCmd( info, TCmd_SendFrame ); - info->tx_timer.expires = jiffies + jiffies_from_ms(5000); + info->tx_timer.expires = jiffies + msecs_to_jiffies(5000); add_timer(&info->tx_timer); } info->tx_active = 1; @@ -6750,9 +6729,12 @@ return_frame = 1; } framesize = 0; -#ifdef CONFIG_SYNCLINK_SYNCPPP - info->netstats.rx_errors++; - info->netstats.rx_frame_errors++; +#ifdef CONFIG_HDLC + { + struct net_device_stats *stats = hdlc_stats(info->netdev); + stats->rx_errors++; + stats->rx_frame_errors++; + } #endif } else return_frame = 1; @@ -6779,7 +6761,7 @@ if ( debug_level >= DEBUG_LEVEL_DATA ) mgsl_trace_block(info,info->rx_buffer_list[StartIndex].virt_addr, - MIN(framesize,DMABUFFERSIZE),0); + min_t(int, framesize, DMABUFFERSIZE),0); if (framesize) { if ( ( (info->params.crc_type & HDLC_CRC_RETURN_EX) && @@ -6823,11 +6805,9 @@ *ptmp); } -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) { - /* pass frame to syncppp device */ - mgsl_sppp_rx_done(info,info->intermediate_rxbuffer,framesize); - } +#ifdef CONFIG_HDLC + if (info->netcount) + hdlcdev_rx(info,info->intermediate_rxbuffer,framesize); else #endif { @@ -6996,7 +6976,7 @@ if ( debug_level >= DEBUG_LEVEL_DATA ) mgsl_trace_block(info,info->rx_buffer_list[CurrentIndex].virt_addr, - MIN(framesize,DMABUFFERSIZE),0); + min_t(int, framesize, DMABUFFERSIZE),0); if (framesize) { /* copy dma buffer(s) to contiguous intermediate buffer */ @@ -7056,7 +7036,7 @@ DMABUFFERENTRY *pBufEntry; if ( debug_level >= DEBUG_LEVEL_DATA ) - mgsl_trace_block(info,Buffer, MIN(BufferSize,DMABUFFERSIZE), 1); + mgsl_trace_block(info,Buffer, min_t(int, BufferSize, DMABUFFERSIZE), 1); if (info->params.flags & HDLC_FLAG_HDLC_LOOPMODE) { /* set CMR:13 to start transmit when @@ -7214,7 +7194,7 @@ EndTime=100; while( EndTime-- && !info->irq_occurred ) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(jiffies_from_ms(10)); + schedule_timeout(msecs_to_jiffies(10)); } spin_lock_irqsave(&info->irq_spinlock,flags); @@ -7353,7 +7333,7 @@ /*************************************************************/ /* Wait 100ms for interrupt. */ - EndTime = jiffies + jiffies_from_ms(100); + EndTime = jiffies + msecs_to_jiffies(100); for(;;) { if (time_after(jiffies, EndTime)) { @@ -7409,7 +7389,7 @@ /**********************************/ /* Wait 100ms */ - EndTime = jiffies + jiffies_from_ms(100); + EndTime = jiffies + msecs_to_jiffies(100); for(;;) { if (time_after(jiffies, EndTime)) { @@ -7451,7 +7431,7 @@ /******************************/ /* Wait 100ms */ - EndTime = jiffies + jiffies_from_ms(100); + EndTime = jiffies + msecs_to_jiffies(100); /* While timer not expired wait for transmit complete */ @@ -7482,7 +7462,7 @@ /* WAIT FOR RECEIVE COMPLETE */ /* Wait 100ms */ - EndTime = jiffies + jiffies_from_ms(100); + EndTime = jiffies + msecs_to_jiffies(100); /* Wait for 16C32 to write receive status to buffer entry. */ status=info->rx_buffer_list[0].status; @@ -7736,9 +7716,9 @@ spin_unlock_irqrestore(&info->irq_spinlock,flags); -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - mgsl_sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif mgsl_bh_transmit(info); @@ -7819,79 +7799,125 @@ return usc_InReg( info, CCSR ) & BIT6 ? 1 : 0 ; } -#ifdef CONFIG_SYNCLINK_SYNCPPP -/* syncppp net device routines +#ifdef CONFIG_HDLC + +/** + * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) + * set encoding and frame check sequence (FCS) options + * + * dev pointer to network device structure + * encoding serial encoding setting + * parity FCS setting + * + * returns 0 if success, otherwise error code */ -static void mgsl_setup(struct net_device *dev) +static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, + unsigned short parity) { - dev->open = mgsl_sppp_open; - dev->stop = mgsl_sppp_close; - dev->hard_start_xmit = mgsl_sppp_tx; - dev->do_ioctl = mgsl_sppp_ioctl; - dev->get_stats = mgsl_net_stats; - dev->tx_timeout = mgsl_sppp_tx_timeout; - dev->watchdog_timeo = 10*HZ; -} + struct mgsl_struct *info = dev_to_port(dev); + unsigned char new_encoding; + unsigned short new_crctype; -static void mgsl_sppp_init(struct mgsl_struct *info) -{ - struct net_device *d; + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - sprintf(info->netname,"mgsl%d",info->line); + switch (encoding) + { + case ENCODING_NRZ: new_encoding = HDLC_ENCODING_NRZ; break; + case ENCODING_NRZI: new_encoding = HDLC_ENCODING_NRZI_SPACE; break; + case ENCODING_FM_MARK: new_encoding = HDLC_ENCODING_BIPHASE_MARK; break; + case ENCODING_FM_SPACE: new_encoding = HDLC_ENCODING_BIPHASE_SPACE; break; + case ENCODING_MANCHESTER: new_encoding = HDLC_ENCODING_BIPHASE_LEVEL; break; + default: return -EINVAL; + } - d = alloc_netdev(0, info->netname, mgsl_setup); - if (!d) { - printk(KERN_WARNING "%s: alloc_netdev failed.\n", - info->netname); - return; + switch (parity) + { + case PARITY_NONE: new_crctype = HDLC_CRC_NONE; break; + case PARITY_CRC16_PR1_CCITT: new_crctype = HDLC_CRC_16_CCITT; break; + case PARITY_CRC32_PR1_CCITT: new_crctype = HDLC_CRC_32_CCITT; break; + default: return -EINVAL; } - info->if_ptr = &info->pppdev; - info->netdev = info->pppdev.dev = d; + info->params.encoding = new_encoding; + info->params.crc_type = new_crctype;; - d->base_addr = info->io_base; - d->irq = info->irq_level; - d->dma = info->dma_level; - d->priv = info; - - sppp_attach(&info->pppdev); - mgsl_setup(d); - - if (register_netdev(d)) { - printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); - sppp_detach(info->netdev); - info->netdev = NULL; - free_netdev(d); - return; - } + /* if network interface up, reprogram hardware */ + if (info->netcount) + mgsl_program_hw(info); - if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_init()\n"); + return 0; } -void mgsl_sppp_delete(struct mgsl_struct *info) +/** + * called by generic HDLC layer to send frame + * + * skb socket buffer containing HDLC frame + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) { + struct mgsl_struct *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); + unsigned long flags; + if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_delete(%s)\n",info->netname); - unregister_netdev(info->netdev); - sppp_detach(info->netdev); - free_netdev(info->netdev); - info->netdev = NULL; - info->pppdev.dev = NULL; + printk(KERN_INFO "%s:hdlc_xmit(%s)\n",__FILE__,dev->name); + + /* stop sending until this frame completes */ + netif_stop_queue(dev); + + /* copy data to device buffers */ + info->xmit_cnt = skb->len; + mgsl_load_tx_dma_buffer(info, skb->data, skb->len); + + /* update network statistics */ + stats->tx_packets++; + stats->tx_bytes += skb->len; + + /* done with socket buffer, so free it */ + dev_kfree_skb(skb); + + /* save start time for transmit timeout detection */ + dev->trans_start = jiffies; + + /* start hardware transmitter if necessary */ + spin_lock_irqsave(&info->irq_spinlock,flags); + if (!info->tx_active) + usc_start_transmitter(info); + spin_unlock_irqrestore(&info->irq_spinlock,flags); + + return 0; } -int mgsl_sppp_open(struct net_device *d) +/** + * called by network layer when interface enabled + * claim resources and initialize hardware + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_open(struct net_device *dev) { - struct mgsl_struct *info = d->priv; - int err; + struct mgsl_struct *info = dev_to_port(dev); + int rc; unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_open(%s)\n",info->netname); + printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); + + /* generic HDLC layer open processing */ + if ((rc = hdlc_open(dev))) + return rc; + /* arbitrate between network and tty opens */ spin_lock_irqsave(&info->netlock, flags); if (info->count != 0 || info->netcount != 0) { - printk(KERN_WARNING "%s: sppp_open returning busy\n", info->netname); + printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name); spin_unlock_irqrestore(&info->netlock, flags); return -EBUSY; } @@ -7899,141 +7925,301 @@ spin_unlock_irqrestore(&info->netlock, flags); /* claim resources and init adapter */ - if ((err = startup(info)) != 0) - goto open_fail; - - /* allow syncppp module to do open processing */ - if ((err = sppp_open(d)) != 0) { - shutdown(info); - goto open_fail; + if ((rc = startup(info)) != 0) { + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + return rc; } + /* assert DTR and RTS, apply hardware settings */ info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; mgsl_program_hw(info); - d->trans_start = jiffies; - netif_start_queue(d); - return 0; + /* enable network layer transmit */ + dev->trans_start = jiffies; + netif_start_queue(dev); -open_fail: - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return err; + /* inform generic HDLC layer of current DCD status */ + spin_lock_irqsave(&info->irq_spinlock, flags); + usc_get_serial_signals(info); + spin_unlock_irqrestore(&info->irq_spinlock, flags); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + + return 0; } -void mgsl_sppp_tx_timeout(struct net_device *dev) +/** + * called by network layer when interface is disabled + * shutdown hardware and release resources + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_close(struct net_device *dev) { - struct mgsl_struct *info = dev->priv; + struct mgsl_struct *info = dev_to_port(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_tx_timeout(%s)\n",info->netname); + printk("%s:hdlcdev_close(%s)\n",__FILE__,dev->name); - info->netstats.tx_errors++; - info->netstats.tx_aborted_errors++; + netif_stop_queue(dev); - spin_lock_irqsave(&info->irq_spinlock,flags); - usc_stop_transmitter(info); - spin_unlock_irqrestore(&info->irq_spinlock,flags); + /* shutdown adapter and release resources */ + shutdown(info); - netif_wake_queue(dev); + hdlc_close(dev); + + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + + return 0; } -int mgsl_sppp_tx(struct sk_buff *skb, struct net_device *dev) +/** + * called by network layer to process IOCTL call to network device + * + * dev pointer to network device structure + * ifr pointer to network interface request structure + * cmd IOCTL command code + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct mgsl_struct *info = dev->priv; - unsigned long flags; + const size_t size = sizeof(sync_serial_settings); + sync_serial_settings new_line; + sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; + struct mgsl_struct *info = dev_to_port(dev); + unsigned int flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_tx(%s)\n",info->netname); + printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name); - netif_stop_queue(dev); + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - info->xmit_cnt = skb->len; - mgsl_load_tx_dma_buffer(info, skb->data, skb->len); - info->netstats.tx_packets++; - info->netstats.tx_bytes += skb->len; - dev_kfree_skb(skb); + if (cmd != SIOCWANDEV) + return hdlc_ioctl(dev, ifr, cmd); - dev->trans_start = jiffies; + switch(ifr->ifr_settings.type) { + case IF_GET_IFACE: /* return current sync_serial_settings */ - spin_lock_irqsave(&info->irq_spinlock,flags); - if (!info->tx_active) - usc_start_transmitter(info); - spin_unlock_irqrestore(&info->irq_spinlock,flags); + ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; + if (ifr->ifr_settings.size < size) { + ifr->ifr_settings.size = size; /* data size wanted */ + return -ENOBUFS; + } - return 0; + flags = info->params.flags & (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + + switch (flags){ + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN): new_line.clock_type = CLOCK_EXT; break; + case (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_INT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_TXINT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN): new_line.clock_type = CLOCK_TXFROMRX; break; + default: new_line.clock_type = CLOCK_DEFAULT; + } + + new_line.clock_rate = info->params.clock_speed; + new_line.loopback = info->params.loopback ? 1:0; + + if (copy_to_user(line, &new_line, size)) + return -EFAULT; + return 0; + + case IF_IFACE_SYNC_SERIAL: /* set sync_serial_settings */ + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (copy_from_user(&new_line, line, size)) + return -EFAULT; + + switch (new_line.clock_type) + { + case CLOCK_EXT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN; break; + case CLOCK_TXFROMRX: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN; break; + case CLOCK_INT: flags = HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG; break; + case CLOCK_TXINT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG; break; + case CLOCK_DEFAULT: flags = info->params.flags & + (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); break; + default: return -EINVAL; + } + + if (new_line.loopback != 0 && new_line.loopback != 1) + return -EINVAL; + + info->params.flags &= ~(HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + info->params.flags |= flags; + + info->params.loopback = new_line.loopback; + + if (flags & (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG)) + info->params.clock_speed = new_line.clock_rate; + else + info->params.clock_speed = 0; + + /* if network interface up, reprogram hardware */ + if (info->netcount) + mgsl_program_hw(info); + return 0; + + default: + return hdlc_ioctl(dev, ifr, cmd); + } } -int mgsl_sppp_close(struct net_device *d) +/** + * called by network layer when transmit timeout is detected + * + * dev pointer to network device structure + */ +static void hdlcdev_tx_timeout(struct net_device *dev) { - struct mgsl_struct *info = d->priv; + struct mgsl_struct *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_close(%s)\n",info->netname); + printk("hdlcdev_tx_timeout(%s)\n",dev->name); - /* shutdown adapter and release resources */ - shutdown(info); + stats->tx_errors++; + stats->tx_aborted_errors++; - /* allow syncppp to do close processing */ - sppp_close(d); - netif_stop_queue(d); + spin_lock_irqsave(&info->irq_spinlock,flags); + usc_stop_transmitter(info); + spin_unlock_irqrestore(&info->irq_spinlock,flags); - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return 0; + netif_wake_queue(dev); } -void mgsl_sppp_rx_done(struct mgsl_struct *info, char *buf, int size) +/** + * called by device driver when transmit completes + * reenable network layer transmit if stopped + * + * info pointer to device instance information + */ +static void hdlcdev_tx_done(struct mgsl_struct *info) +{ + if (netif_queue_stopped(info->netdev)) + netif_wake_queue(info->netdev); +} + +/** + * called by device driver when frame received + * pass frame to network layer + * + * info pointer to device instance information + * buf pointer to buffer contianing frame data + * size count of data bytes in buf + */ +static void hdlcdev_rx(struct mgsl_struct *info, char *buf, int size) { struct sk_buff *skb = dev_alloc_skb(size); + struct net_device *dev = info->netdev; + struct net_device_stats *stats = hdlc_stats(dev); + if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_sppp_rx_done(%s)\n",info->netname); + printk("hdlcdev_rx(%s)\n",dev->name); + if (skb == NULL) { - printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", - info->netname); - info->netstats.rx_dropped++; + printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); + stats->rx_dropped++; return; } memcpy(skb_put(skb, size),buf,size); - skb->protocol = htons(ETH_P_WAN_PPP); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - info->netstats.rx_packets++; - info->netstats.rx_bytes += size; + skb->dev = info->netdev; + skb->mac.raw = skb->data; + skb->protocol = hdlc_type_trans(skb, skb->dev); + + stats->rx_packets++; + stats->rx_bytes += size; + netif_rx(skb); - info->netdev->trans_start = jiffies; -} -void mgsl_sppp_tx_done(struct mgsl_struct *info) -{ - if (netif_queue_stopped(info->netdev)) - netif_wake_queue(info->netdev); + info->netdev->last_rx = jiffies; } -struct net_device_stats *mgsl_net_stats(struct net_device *dev) +/** + * called by device driver when adding device instance + * do generic HDLC initialization + * + * info pointer to device instance information + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_init(struct mgsl_struct *info) { - struct mgsl_struct *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("mgsl_net_stats(%s)\n",info->netname); - return &info->netstats; + int rc; + struct net_device *dev; + hdlc_device *hdlc; + + /* allocate and initialize network and HDLC layer objects */ + + if (!(dev = alloc_hdlcdev(info))) { + printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); + return -ENOMEM; + } + + /* for network layer reporting purposes only */ + dev->base_addr = info->io_base; + dev->irq = info->irq_level; + dev->dma = info->dma_level; + + /* network layer callbacks and settings */ + dev->do_ioctl = hdlcdev_ioctl; + dev->open = hdlcdev_open; + dev->stop = hdlcdev_close; + dev->tx_timeout = hdlcdev_tx_timeout; + dev->watchdog_timeo = 10*HZ; + dev->tx_queue_len = 50; + + /* generic HDLC layer callbacks and settings */ + hdlc = dev_to_hdlc(dev); + hdlc->attach = hdlcdev_attach; + hdlc->xmit = hdlcdev_xmit; + + /* register objects with HDLC layer */ + if ((rc = register_hdlc_device(dev))) { + printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); + free_netdev(dev); + return rc; + } + + info->netdev = dev; + return 0; } -int mgsl_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +/** + * called by device driver when removing device instance + * do generic HDLC cleanup + * + * info pointer to device instance information + */ +static void hdlcdev_exit(struct mgsl_struct *info) { - struct mgsl_struct *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__, - info->netname, cmd ); - return sppp_do_ioctl(dev, ifr, cmd); + unregister_hdlc_device(info->netdev); + free_netdev(info->netdev); + info->netdev = NULL; } -#endif /* ifdef CONFIG_SYNCLINK_SYNCPPP */ +#endif /* CONFIG_HDLC */ + static int __devinit synclink_init_one (struct pci_dev *dev, const struct pci_device_id *ent) diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c --- a/drivers/char/synclinkmp.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/char/synclinkmp.c 2004-09-06 16:37:51 -07:00 @@ -1,5 +1,5 @@ /* - * $Id: synclinkmp.c,v 4.22 2004/06/03 14:50:10 paulkf Exp $ + * $Id: synclinkmp.c,v 4.29 2004/08/27 20:06:41 paulkf Exp $ * * Device driver for Microgate SyncLink Multiport * high speed multiprotocol serial adapter. @@ -67,13 +67,10 @@ #include #include #include +#include -#ifdef CONFIG_SYNCLINK_SYNCPPP_MODULE -#define CONFIG_SYNCLINK_SYNCPPP 1 -#endif - -#ifdef CONFIG_SYNCLINK_SYNCPPP -#include +#ifdef CONFIG_HDLC_MODULE +#define CONFIG_HDLC 1 #endif #define GET_USER(error,value,addr) error = get_user(value,addr) @@ -284,12 +281,11 @@ int netcount; int dosyncppp; spinlock_t netlock; -#ifdef CONFIG_SYNCLINK_SYNCPPP - struct ppp_device pppdev; - char netname[10]; + +#ifdef CONFIG_HDLC struct net_device *netdev; - struct net_device_stats netstats; #endif + } SLMP_INFO; #define MGSL_MAGIC 0x5401 @@ -361,12 +357,7 @@ #define TMCS 0x64 #define TEPR 0x65 -/* - * FIXME: DAR here clashed with asm-ppc/reg.h and asm-sh/.../dma.h - */ -#undef DAR /* DMA Controller Register macros */ -#define DAR 0x80 #define DARL 0x80 #define DARH 0x81 #define DARB 0x82 @@ -498,7 +489,7 @@ MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICES) "i"); static char *driver_name = "SyncLink MultiPort driver"; -static char *driver_version = "$Revision: 4.22 $"; +static char *driver_version = "$Revision: 4.29 $"; static int synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent); static void synclinkmp_remove_one(struct pci_dev *dev); @@ -524,10 +515,6 @@ /* number of characters left in xmit buffer before we ask for more */ #define WAKEUP_CHARS 256 -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* tty callbacks */ @@ -553,20 +540,12 @@ static void unthrottle(struct tty_struct * tty); static void set_break(struct tty_struct *tty, int break_state); -/* sppp support and callbacks */ - -#ifdef CONFIG_SYNCLINK_SYNCPPP -static void sppp_init(SLMP_INFO *info); -static void sppp_delete(SLMP_INFO *info); -static void sppp_rx_done(SLMP_INFO *info, char *buf, int size); -static void sppp_tx_done(SLMP_INFO *info); - -static int sppp_cb_open(struct net_device *d); -static int sppp_cb_close(struct net_device *d); -static int sppp_cb_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); -static int sppp_cb_tx(struct sk_buff *skb, struct net_device *dev); -static void sppp_cb_tx_timeout(struct net_device *dev); -static struct net_device_stats *sppp_cb_net_stats(struct net_device *dev); +#ifdef CONFIG_HDLC +#define dev_to_port(D) (dev_to_hdlc(D)->priv) +static void hdlcdev_tx_done(SLMP_INFO *info); +static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size); +static int hdlcdev_init(SLMP_INFO *info); +static void hdlcdev_exit(SLMP_INFO *info); #endif /* ioctl handlers */ @@ -668,7 +647,7 @@ static unsigned char tx_negate_fifo_level = 32; // tx request FIFO negation level in bytes static u32 misc_ctrl_value = 0x007e4040; -static u32 lcr1_brdr_value = 0x0080002d; +static u32 lcr1_brdr_value = 0x00800029; static u32 read_ahead_count = 8; @@ -800,7 +779,7 @@ cleanup: if (retval) { if (tty->count == 1) - info->tty = NULL;/* tty layer will release tty struct */ + info->tty = NULL; /* tty layer will release tty struct */ if(info->count) info->count--; } @@ -1017,8 +996,8 @@ } for (;;) { - c = MIN(count, - MIN(info->max_frame_size - info->tx_count - 1, + c = min_t(int, count, + min(info->max_frame_size - info->tx_count - 1, info->max_frame_size - info->tx_put)); if (c <= 0) break; @@ -1161,7 +1140,7 @@ char_time = 1; if (timeout) - char_time = MIN(char_time, timeout); + char_time = min_t(unsigned long, char_time, timeout); if ( info->params.mode == MGSL_MODE_HDLC ) { while (info->tx_active) { @@ -1627,79 +1606,125 @@ spin_unlock_irqrestore(&info->lock,flags); } -#ifdef CONFIG_SYNCLINK_SYNCPPP - -/* syncppp support and callbacks */ +#ifdef CONFIG_HDLC -static void cb_setup(struct net_device *dev) -{ - dev->open = sppp_cb_open; - dev->stop = sppp_cb_close; - dev->hard_start_xmit = sppp_cb_tx; - dev->do_ioctl = sppp_cb_ioctl; - dev->get_stats = sppp_cb_net_stats; - dev->tx_timeout = sppp_cb_tx_timeout; - dev->watchdog_timeo = 10*HZ; -} - -static void sppp_init(SLMP_INFO *info) +/** + * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) + * set encoding and frame check sequence (FCS) options + * + * dev pointer to network device structure + * encoding serial encoding setting + * parity FCS setting + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_attach(struct net_device *dev, unsigned short encoding, + unsigned short parity) { - struct net_device *d; + SLMP_INFO *info = dev_to_port(dev); + unsigned char new_encoding; + unsigned short new_crctype; - sprintf(info->netname,"mgslm%dp%d",info->adapter_num,info->port_num); + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - d = alloc_netdev(0, info->netname, cb_setup); - if (!d) { - printk(KERN_WARNING "%s: alloc_netdev failed.\n", - info->netname); - return; + switch (encoding) + { + case ENCODING_NRZ: new_encoding = HDLC_ENCODING_NRZ; break; + case ENCODING_NRZI: new_encoding = HDLC_ENCODING_NRZI_SPACE; break; + case ENCODING_FM_MARK: new_encoding = HDLC_ENCODING_BIPHASE_MARK; break; + case ENCODING_FM_SPACE: new_encoding = HDLC_ENCODING_BIPHASE_SPACE; break; + case ENCODING_MANCHESTER: new_encoding = HDLC_ENCODING_BIPHASE_LEVEL; break; + default: return -EINVAL; } - info->if_ptr = &info->pppdev; - info->netdev = info->pppdev.dev = d; - - d->irq = info->irq_level; - d->priv = info; + switch (parity) + { + case PARITY_NONE: new_crctype = HDLC_CRC_NONE; break; + case PARITY_CRC16_PR1_CCITT: new_crctype = HDLC_CRC_16_CCITT; break; + case PARITY_CRC32_PR1_CCITT: new_crctype = HDLC_CRC_32_CCITT; break; + default: return -EINVAL; + } - sppp_attach(&info->pppdev); - cb_setup(d); + info->params.encoding = new_encoding; + info->params.crc_type = new_crctype;; - if (register_netdev(d)) { - printk(KERN_WARNING "%s: register_netdev failed.\n", d->name); - sppp_detach(info->netdev); - info->netdev = NULL; - info->pppdev.dev = NULL; - free_netdev(d); - return; - } + /* if network interface up, reprogram hardware */ + if (info->netcount) + program_hw(info); - if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_init(%s)\n",info->netname); + return 0; } -static void sppp_delete(SLMP_INFO *info) +/** + * called by generic HDLC layer to send frame + * + * skb socket buffer containing HDLC frame + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev) { + SLMP_INFO *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); + unsigned long flags; + if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_delete(%s)\n",info->netname); - unregister_netdev(info->netdev); - sppp_detach(info->netdev); - free_netdev(info->netdev); - info->netdev = NULL; - info->pppdev.dev = NULL; + printk(KERN_INFO "%s:hdlc_xmit(%s)\n",__FILE__,dev->name); + + /* stop sending until this frame completes */ + netif_stop_queue(dev); + + /* copy data to device buffers */ + info->tx_count = skb->len; + tx_load_dma_buffer(info, skb->data, skb->len); + + /* update network statistics */ + stats->tx_packets++; + stats->tx_bytes += skb->len; + + /* done with socket buffer, so free it */ + dev_kfree_skb(skb); + + /* save start time for transmit timeout detection */ + dev->trans_start = jiffies; + + /* start hardware transmitter if necessary */ + spin_lock_irqsave(&info->lock,flags); + if (!info->tx_active) + tx_start(info); + spin_unlock_irqrestore(&info->lock,flags); + + return 0; } -static int sppp_cb_open(struct net_device *d) +/** + * called by network layer when interface enabled + * claim resources and initialize hardware + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_open(struct net_device *dev) { - SLMP_INFO *info = d->priv; - int err; + SLMP_INFO *info = dev_to_port(dev); + int rc; unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_cb_open(%s)\n",info->netname); + printk("%s:hdlcdev_open(%s)\n",__FILE__,dev->name); + + /* generic HDLC layer open processing */ + if ((rc = hdlc_open(dev))) + return rc; + /* arbitrate between network and tty opens */ spin_lock_irqsave(&info->netlock, flags); if (info->count != 0 || info->netcount != 0) { - printk(KERN_WARNING "%s: sppp_cb_open returning busy\n", info->netname); + printk(KERN_WARNING "%s: hdlc_open returning busy\n", dev->name); spin_unlock_irqrestore(&info->netlock, flags); return -EBUSY; } @@ -1707,141 +1732,300 @@ spin_unlock_irqrestore(&info->netlock, flags); /* claim resources and init adapter */ - if ((err = startup(info)) != 0) - goto open_fail; - - /* allow syncppp module to do open processing */ - if ((err = sppp_open(d)) != 0) { - shutdown(info); - goto open_fail; + if ((rc = startup(info)) != 0) { + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + return rc; } + /* assert DTR and RTS, apply hardware settings */ info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; program_hw(info); - d->trans_start = jiffies; - netif_start_queue(d); - return 0; + /* enable network layer transmit */ + dev->trans_start = jiffies; + netif_start_queue(dev); -open_fail: - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return err; + /* inform generic HDLC layer of current DCD status */ + spin_lock_irqsave(&info->lock, flags); + get_signals(info); + spin_unlock_irqrestore(&info->lock, flags); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + + return 0; } -static void sppp_cb_tx_timeout(struct net_device *dev) +/** + * called by network layer when interface is disabled + * shutdown hardware and release resources + * + * dev pointer to network device structure + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_close(struct net_device *dev) { - SLMP_INFO *info = dev->priv; + SLMP_INFO *info = dev_to_port(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_tx_timeout(%s)\n",info->netname); + printk("%s:hdlcdev_close(%s)\n",__FILE__,dev->name); - info->netstats.tx_errors++; - info->netstats.tx_aborted_errors++; + netif_stop_queue(dev); - spin_lock_irqsave(&info->lock,flags); - tx_stop(info); - spin_unlock_irqrestore(&info->lock,flags); + /* shutdown adapter and release resources */ + shutdown(info); - netif_wake_queue(dev); + hdlc_close(dev); + + spin_lock_irqsave(&info->netlock, flags); + info->netcount=0; + spin_unlock_irqrestore(&info->netlock, flags); + + return 0; } -static int sppp_cb_tx(struct sk_buff *skb, struct net_device *dev) +/** + * called by network layer to process IOCTL call to network device + * + * dev pointer to network device structure + * ifr pointer to network interface request structure + * cmd IOCTL command code + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - SLMP_INFO *info = dev->priv; - unsigned long flags; + const size_t size = sizeof(sync_serial_settings); + sync_serial_settings new_line; + sync_serial_settings __user *line = ifr->ifr_settings.ifs_ifsu.sync; + SLMP_INFO *info = dev_to_port(dev); + unsigned int flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_tx(%s)\n",info->netname); + printk("%s:hdlcdev_ioctl(%s)\n",__FILE__,dev->name); - netif_stop_queue(dev); + /* return error if TTY interface open */ + if (info->count) + return -EBUSY; - info->tx_count = skb->len; - tx_load_dma_buffer(info, skb->data, skb->len); - info->netstats.tx_packets++; - info->netstats.tx_bytes += skb->len; - dev_kfree_skb(skb); + if (cmd != SIOCWANDEV) + return hdlc_ioctl(dev, ifr, cmd); - dev->trans_start = jiffies; + switch(ifr->ifr_settings.type) { + case IF_GET_IFACE: /* return current sync_serial_settings */ - spin_lock_irqsave(&info->lock,flags); - if (!info->tx_active) - tx_start(info); - spin_unlock_irqrestore(&info->lock,flags); + ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL; + if (ifr->ifr_settings.size < size) { + ifr->ifr_settings.size = size; /* data size wanted */ + return -ENOBUFS; + } - return 0; + flags = info->params.flags & (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + + switch (flags){ + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN): new_line.clock_type = CLOCK_EXT; break; + case (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_INT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG): new_line.clock_type = CLOCK_TXINT; break; + case (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN): new_line.clock_type = CLOCK_TXFROMRX; break; + default: new_line.clock_type = CLOCK_DEFAULT; + } + + new_line.clock_rate = info->params.clock_speed; + new_line.loopback = info->params.loopback ? 1:0; + + if (copy_to_user(line, &new_line, size)) + return -EFAULT; + return 0; + + case IF_IFACE_SYNC_SERIAL: /* set sync_serial_settings */ + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (copy_from_user(&new_line, line, size)) + return -EFAULT; + + switch (new_line.clock_type) + { + case CLOCK_EXT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_TXCPIN; break; + case CLOCK_TXFROMRX: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_RXCPIN; break; + case CLOCK_INT: flags = HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG; break; + case CLOCK_TXINT: flags = HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_TXC_BRG; break; + case CLOCK_DEFAULT: flags = info->params.flags & + (HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); break; + default: return -EINVAL; + } + + if (new_line.loopback != 0 && new_line.loopback != 1) + return -EINVAL; + + info->params.flags &= ~(HDLC_FLAG_RXC_RXCPIN | HDLC_FLAG_RXC_DPLL | + HDLC_FLAG_RXC_BRG | HDLC_FLAG_RXC_TXCPIN | + HDLC_FLAG_TXC_TXCPIN | HDLC_FLAG_TXC_DPLL | + HDLC_FLAG_TXC_BRG | HDLC_FLAG_TXC_RXCPIN); + info->params.flags |= flags; + + info->params.loopback = new_line.loopback; + + if (flags & (HDLC_FLAG_RXC_BRG | HDLC_FLAG_TXC_BRG)) + info->params.clock_speed = new_line.clock_rate; + else + info->params.clock_speed = 0; + + /* if network interface up, reprogram hardware */ + if (info->netcount) + program_hw(info); + return 0; + + default: + return hdlc_ioctl(dev, ifr, cmd); + } } -static int sppp_cb_close(struct net_device *d) +/** + * called by network layer when transmit timeout is detected + * + * dev pointer to network device structure + */ +static void hdlcdev_tx_timeout(struct net_device *dev) { - SLMP_INFO *info = d->priv; + SLMP_INFO *info = dev_to_port(dev); + struct net_device_stats *stats = hdlc_stats(dev); unsigned long flags; if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_cb_close(%s)\n",info->netname); + printk("hdlcdev_tx_timeout(%s)\n",dev->name); - /* shutdown adapter and release resources */ - shutdown(info); + stats->tx_errors++; + stats->tx_aborted_errors++; - /* allow syncppp to do close processing */ - sppp_close(d); - netif_stop_queue(d); + spin_lock_irqsave(&info->lock,flags); + tx_stop(info); + spin_unlock_irqrestore(&info->lock,flags); - spin_lock_irqsave(&info->netlock, flags); - info->netcount=0; - spin_unlock_irqrestore(&info->netlock, flags); - return 0; + netif_wake_queue(dev); } -static void sppp_rx_done(SLMP_INFO *info, char *buf, int size) +/** + * called by device driver when transmit completes + * reenable network layer transmit if stopped + * + * info pointer to device instance information + */ +static void hdlcdev_tx_done(SLMP_INFO *info) +{ + if (netif_queue_stopped(info->netdev)) + netif_wake_queue(info->netdev); +} + +/** + * called by device driver when frame received + * pass frame to network layer + * + * info pointer to device instance information + * buf pointer to buffer contianing frame data + * size count of data bytes in buf + */ +static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size) { struct sk_buff *skb = dev_alloc_skb(size); + struct net_device *dev = info->netdev; + struct net_device_stats *stats = hdlc_stats(dev); + if (debug_level >= DEBUG_LEVEL_INFO) - printk("sppp_rx_done(%s)\n",info->netname); + printk("hdlcdev_rx(%s)\n",dev->name); + if (skb == NULL) { - printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", - info->netname); - info->netstats.rx_dropped++; + printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); + stats->rx_dropped++; return; } memcpy(skb_put(skb, size),buf,size); - skb->protocol = htons(ETH_P_WAN_PPP); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - info->netstats.rx_packets++; - info->netstats.rx_bytes += size; + skb->dev = info->netdev; + skb->mac.raw = skb->data; + skb->protocol = hdlc_type_trans(skb, skb->dev); + + stats->rx_packets++; + stats->rx_bytes += size; + netif_rx(skb); - info->netdev->trans_start = jiffies; -} -static void sppp_tx_done(SLMP_INFO *info) -{ - if (netif_queue_stopped(info->netdev)) - netif_wake_queue(info->netdev); + info->netdev->last_rx = jiffies; } -static struct net_device_stats *sppp_cb_net_stats(struct net_device *dev) +/** + * called by device driver when adding device instance + * do generic HDLC initialization + * + * info pointer to device instance information + * + * returns 0 if success, otherwise error code + */ +static int hdlcdev_init(SLMP_INFO *info) { - SLMP_INFO *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("net_stats(%s)\n",info->netname); - return &info->netstats; + int rc; + struct net_device *dev; + hdlc_device *hdlc; + + /* allocate and initialize network and HDLC layer objects */ + + if (!(dev = alloc_hdlcdev(info))) { + printk(KERN_ERR "%s:hdlc device allocation failure\n",__FILE__); + return -ENOMEM; + } + + /* for network layer reporting purposes only */ + dev->mem_start = info->phys_sca_base; + dev->mem_end = info->phys_sca_base + SCA_BASE_SIZE - 1; + dev->irq = info->irq_level; + + /* network layer callbacks and settings */ + dev->do_ioctl = hdlcdev_ioctl; + dev->open = hdlcdev_open; + dev->stop = hdlcdev_close; + dev->tx_timeout = hdlcdev_tx_timeout; + dev->watchdog_timeo = 10*HZ; + dev->tx_queue_len = 50; + + /* generic HDLC layer callbacks and settings */ + hdlc = dev_to_hdlc(dev); + hdlc->attach = hdlcdev_attach; + hdlc->xmit = hdlcdev_xmit; + + /* register objects with HDLC layer */ + if ((rc = register_hdlc_device(dev))) { + printk(KERN_WARNING "%s:unable to register hdlc device\n",__FILE__); + free_netdev(dev); + return rc; + } + + info->netdev = dev; + return 0; } -static int sppp_cb_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +/** + * called by device driver when removing device instance + * do generic HDLC cleanup + * + * info pointer to device instance information + */ +static void hdlcdev_exit(SLMP_INFO *info) { - SLMP_INFO *info = dev->priv; - if (debug_level >= DEBUG_LEVEL_INFO) - printk("%s(%d):ioctl %s cmd=%08X\n", __FILE__,__LINE__, - info->netname, cmd ); - return sppp_do_ioctl(dev, ifr, cmd); + unregister_hdlc_device(info->netdev); + free_netdev(info->netdev); + info->netdev = NULL; } -#endif /* ifdef CONFIG_SYNCLINK_SYNCPPP */ +#endif /* CONFIG_HDLC */ /* Return next bottom half action to perform. @@ -1994,16 +2178,15 @@ { struct tty_struct *tty = info->tty; struct mgsl_icount *icount = &info->icount; - unsigned char status = read_reg(info, SR1); - unsigned char status2 = read_reg(info, SR2); + unsigned char status = read_reg(info, SR1) & info->ie1_value & (FLGD + IDLD + CDCD + BRKD); + unsigned char status2 = read_reg(info, SR2) & info->ie2_value & OVRN; /* clear status bits */ - if ( status & (FLGD + IDLD + CDCD + BRKD) ) - write_reg(info, SR1, - (unsigned char)(status & (FLGD + IDLD + CDCD + BRKD))); + if (status) + write_reg(info, SR1, status); - if ( status2 & OVRN ) - write_reg(info, SR2, (unsigned char)(status2 & OVRN)); + if (status2) + write_reg(info, SR2, status2); if ( debug_level >= DEBUG_LEVEL_ISR ) printk("%s(%d):%s isr_rxint status=%02X %02x\n", @@ -2140,15 +2323,22 @@ printk("%s(%d):%s isr_txeom status=%02x\n", __FILE__,__LINE__,info->device_name,status); - /* disable and clear MSCI interrupts */ - info->ie1_value &= ~(IDLE + UDRN); - write_reg(info, IE1, info->ie1_value); - write_reg(info, SR1, (unsigned char)(UDRN + IDLE)); - write_reg(info, TXDMA + DIR, 0x00); /* disable Tx DMA IRQs */ write_reg(info, TXDMA + DSR, 0xc0); /* clear IRQs and disable DMA */ write_reg(info, TXDMA + DCMD, SWABORT); /* reset/init DMA channel */ + if (status & UDRN) { + write_reg(info, CMD, TXRESET); + write_reg(info, CMD, TXENABLE); + } else + write_reg(info, CMD, TXBUFCLR); + + /* disable and clear tx interrupts */ + info->ie0_value &= ~TXRDYE; + info->ie1_value &= ~(IDLE + UDRN); + write_reg16(info, IE0, (unsigned short)((info->ie1_value << 8) + info->ie0_value)); + write_reg(info, SR1, (unsigned char)(UDRN + IDLE)); + if ( info->tx_active ) { if (info->params.mode != MGSL_MODE_ASYNC) { if (status & UDRN) @@ -2168,9 +2358,9 @@ set_signals(info); } -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif { @@ -2189,10 +2379,10 @@ */ void isr_txint(SLMP_INFO * info) { - unsigned char status = read_reg(info, SR1); + unsigned char status = read_reg(info, SR1) & info->ie1_value & (UDRN + IDLE + CCTS); /* clear status bits */ - write_reg(info, SR1, (unsigned char)(status & (UDRN + IDLE + CCTS))); + write_reg(info, SR1, status); if ( debug_level >= DEBUG_LEVEL_ISR ) printk("%s(%d):%s isr_txint status=%02x\n", @@ -2221,6 +2411,14 @@ printk("%s(%d):%s isr_txrdy() tx_count=%d\n", __FILE__,__LINE__,info->device_name,info->tx_count); + if (info->params.mode != MGSL_MODE_ASYNC) { + /* disable TXRDY IRQ, enable IDLE IRQ */ + info->ie0_value &= ~TXRDYE; + info->ie1_value |= IDLE; + write_reg16(info, IE0, (unsigned short)((info->ie1_value << 8) + info->ie0_value)); + return; + } + if (info->tty && (info->tty->stopped || info->tty->hw_stopped)) { tx_stop(info); return; @@ -2275,13 +2473,6 @@ void isr_txdmaok(SLMP_INFO * info) { - /* BIT7 = EOT (end of transfer, used for async mode) - * BIT6 = EOM (end of message/frame, used for sync mode) - * - * We don't look at DMA status because only EOT is enabled - * and we always clear and disable all tx DMA IRQs. - */ -// unsigned char dma_status = read_reg(info,TXDMA + DSR) & 0xc0; unsigned char status_reg1 = read_reg(info, SR1); write_reg(info, TXDMA + DIR, 0x00); /* disable Tx DMA IRQs */ @@ -2292,19 +2483,10 @@ printk("%s(%d):%s isr_txdmaok(), status=%02x\n", __FILE__,__LINE__,info->device_name,status_reg1); - /* If transmitter already idle, do end of frame processing, - * otherwise enable interrupt for tx IDLE. - */ - if (status_reg1 & IDLE) - isr_txeom(info, IDLE); - else { - /* disable and clear underrun IRQ, enable IDLE interrupt */ - info->ie1_value |= IDLE; - info->ie1_value &= ~UDRN; - write_reg(info, IE1, info->ie1_value); - - write_reg(info, SR1, UDRN); - } + /* program TXRDY as FIFO empty flag, enable TXRDY IRQ */ + write_reg16(info, TRC0, 0); + info->ie0_value |= TXRDYE; + write_reg(info, IE0, info->ie0_value); } void isr_txdmaerror(SLMP_INFO * info) @@ -2358,12 +2540,12 @@ icount->dcd++; if (status & SerialSignal_DCD) { info->input_signal_events.dcd_up++; -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) - sppp_reopen(info->netdev); -#endif } else info->input_signal_events.dcd_down++; +#ifdef CONFIG_HDLC + if (info->netcount) + hdlc_set_carrier(status & SerialSignal_DCD, info->netdev); +#endif } if (status & MISCSTATUS_CTS_LATCHED) { @@ -2988,7 +3170,7 @@ unsigned char oldval = info->ie1_value; unsigned char newval = oldval + (mask & MgslEvent_ExitHuntMode ? FLGD:0) + - (mask & MgslEvent_IdleReceived ? IDLE:0); + (mask & MgslEvent_IdleReceived ? IDLD:0); if ( oldval != newval ) { info->ie1_value = newval; write_reg(info, IE1, info->ie1_value); @@ -3055,7 +3237,7 @@ spin_lock_irqsave(&info->lock,flags); if (!waitqueue_active(&info->event_wait_q)) { /* disable enable exit hunt mode/idle rcvd IRQs */ - info->ie1_value &= ~(FLGD|IDLE); + info->ie1_value &= ~(FLGD|IDLD); write_reg(info, IE1, info->ie1_value); } spin_unlock_irqrestore(&info->lock,flags); @@ -3449,9 +3631,10 @@ int claim_resources(SLMP_INFO *info) { - if (request_mem_region(info->phys_memory_base,0x40000,"synclinkmp") == NULL) { + if (request_mem_region(info->phys_memory_base,SCA_MEM_SIZE,"synclinkmp") == NULL) { printk( "%s(%d):%s mem addr conflict, Addr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_memory_base); + info->init_error = DiagStatus_AddressConflict; goto errout; } else @@ -3460,22 +3643,25 @@ if (request_mem_region(info->phys_lcr_base + info->lcr_offset,128,"synclinkmp") == NULL) { printk( "%s(%d):%s lcr mem addr conflict, Addr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_lcr_base); + info->init_error = DiagStatus_AddressConflict; goto errout; } else info->lcr_mem_requested = 1; - if (request_mem_region(info->phys_sca_base + info->sca_offset,512,"synclinkmp") == NULL) { + if (request_mem_region(info->phys_sca_base + info->sca_offset,SCA_BASE_SIZE,"synclinkmp") == NULL) { printk( "%s(%d):%s sca mem addr conflict, Addr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_sca_base); + info->init_error = DiagStatus_AddressConflict; goto errout; } else info->sca_base_requested = 1; - if (request_mem_region(info->phys_statctrl_base + info->statctrl_offset,16,"synclinkmp") == NULL) { + if (request_mem_region(info->phys_statctrl_base + info->statctrl_offset,SCA_REG_SIZE,"synclinkmp") == NULL) { printk( "%s(%d):%s stat/ctrl mem addr conflict, Addr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_statctrl_base); + info->init_error = DiagStatus_AddressConflict; goto errout; } else @@ -3485,33 +3671,41 @@ if (!info->memory_base) { printk( "%s(%d):%s Cant map shared memory, MemAddr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_memory_base ); + info->init_error = DiagStatus_CantAssignPciResources; goto errout; } - if ( !memory_test(info) ) { - printk( "%s(%d):Shared Memory Test failed for device %s MemAddr=%08X\n", - __FILE__,__LINE__,info->device_name, info->phys_memory_base ); - goto errout; - } - - info->lcr_base = ioremap(info->phys_lcr_base,PAGE_SIZE) + info->lcr_offset; + info->lcr_base = ioremap(info->phys_lcr_base,PAGE_SIZE); if (!info->lcr_base) { printk( "%s(%d):%s Cant map LCR memory, MemAddr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_lcr_base ); + info->init_error = DiagStatus_CantAssignPciResources; goto errout; } + info->lcr_base += info->lcr_offset; - info->sca_base = ioremap(info->phys_sca_base,PAGE_SIZE) + info->sca_offset; + info->sca_base = ioremap(info->phys_sca_base,PAGE_SIZE); if (!info->sca_base) { printk( "%s(%d):%s Cant map SCA memory, MemAddr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_sca_base ); + info->init_error = DiagStatus_CantAssignPciResources; goto errout; } + info->sca_base += info->sca_offset; - info->statctrl_base = ioremap(info->phys_statctrl_base,PAGE_SIZE) + info->statctrl_offset; + info->statctrl_base = ioremap(info->phys_statctrl_base,PAGE_SIZE); if (!info->statctrl_base) { printk( "%s(%d):%s Cant map SCA Status/Control memory, MemAddr=%08X\n", __FILE__,__LINE__,info->device_name, info->phys_statctrl_base ); + info->init_error = DiagStatus_CantAssignPciResources; + goto errout; + } + info->statctrl_base += info->statctrl_offset; + + if ( !memory_test(info) ) { + printk( "%s(%d):Shared Memory Test failed for device %s MemAddr=%08X\n", + __FILE__,__LINE__,info->device_name, info->phys_memory_base ); + info->init_error = DiagStatus_MemoryError; goto errout; } @@ -3534,7 +3728,7 @@ } if ( info->shared_mem_requested ) { - release_mem_region(info->phys_memory_base,0x40000); + release_mem_region(info->phys_memory_base,SCA_MEM_SIZE); info->shared_mem_requested = 0; } if ( info->lcr_mem_requested ) { @@ -3542,11 +3736,11 @@ info->lcr_mem_requested = 0; } if ( info->sca_base_requested ) { - release_mem_region(info->phys_sca_base + info->sca_offset,512); + release_mem_region(info->phys_sca_base + info->sca_offset,SCA_BASE_SIZE); info->sca_base_requested = 0; } if ( info->sca_statctrl_requested ) { - release_mem_region(info->phys_statctrl_base + info->statctrl_offset,16); + release_mem_region(info->phys_statctrl_base + info->statctrl_offset,SCA_REG_SIZE); info->sca_statctrl_requested = 0; } @@ -3616,9 +3810,8 @@ info->irq_level, info->max_frame_size ); -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->dosyncppp) - sppp_init(info); +#ifdef CONFIG_HDLC + hdlcdev_init(info); #endif } @@ -3788,7 +3981,6 @@ static void synclinkmp_cleanup(void) { - unsigned long flags; int rc; SLMP_INFO *info; SLMP_INFO *tmp; @@ -3802,34 +3994,24 @@ put_tty_driver(serial_driver); } + /* reset devices */ info = synclinkmp_device_list; while(info) { -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->dosyncppp) - sppp_delete(info); -#endif reset_port(info); - if ( info->port_num == 0 ) { - if ( info->irq_requested ) { - free_irq(info->irq_level, info); - info->irq_requested = 0; - } - } info = info->next_device; } - /* port 0 of each adapter originally claimed - * all resources, release those now - */ + /* release devices */ info = synclinkmp_device_list; while(info) { +#ifdef CONFIG_HDLC + hdlcdev_exit(info); +#endif free_dma_bufs(info); free_tmp_rx_buf(info); if ( info->port_num == 0 ) { - spin_lock_irqsave(&info->lock,flags); - reset_adapter(info); - write_reg(info, LPR, 1); /* set low power mode */ - spin_unlock_irqrestore(&info->lock,flags); + if (info->sca_base) + write_reg(info, LPR, 1); /* set low power mode */ release_resources(info); } tmp = info; @@ -4112,6 +4294,9 @@ } } + write_reg16(info, TRC0, + (unsigned short)(((tx_negate_fifo_level-1)<<8) + tx_active_fifo_level)); + write_reg(info, TXDMA + DSR, 0); /* disable DMA channel */ write_reg(info, TXDMA + DCMD, SWABORT); /* reset/init DMA channel */ @@ -4123,11 +4308,10 @@ write_reg16(info, TXDMA + EDA, info->tx_buf_list_ex[info->last_tx_buf].phys_entry); - /* clear IDLE and UDRN status bit */ - info->ie1_value &= ~(IDLE + UDRN); - if (info->params.mode != MGSL_MODE_ASYNC) - info->ie1_value |= UDRN; /* HDLC, IRQ on underrun */ - write_reg(info, IE1, info->ie1_value); /* enable MSCI interrupts */ + /* enable underrun IRQ */ + info->ie1_value &= ~IDLE; + info->ie1_value |= UDRN; + write_reg(info, IE1, info->ie1_value); write_reg(info, SR1, (unsigned char)(IDLE + UDRN)); write_reg(info, TXDMA + DIR, 0x40); /* enable Tx DMA interrupts (EOM) */ @@ -4823,10 +5007,12 @@ info->icount.rxcrc++; framesize = 0; - -#ifdef CONFIG_SYNCLINK_SYNCPPP - info->netstats.rx_errors++; - info->netstats.rx_frame_errors++; +#ifdef CONFIG_HDLC + { + struct net_device_stats *stats = hdlc_stats(info->netdev); + stats->rx_errors++; + stats->rx_frame_errors++; + } #endif } @@ -4836,7 +5022,7 @@ if ( debug_level >= DEBUG_LEVEL_DATA ) trace_block(info,info->rx_buf_list_ex[StartIndex].virt_addr, - MIN(framesize,SCABUFSIZE),0); + min_t(int, framesize,SCABUFSIZE),0); if (framesize) { if (framesize > info->max_frame_size) @@ -4851,7 +5037,7 @@ info->icount.rxok++; while(copy_count) { - int partial_count = MIN(copy_count,SCABUFSIZE); + int partial_count = min(copy_count,SCABUFSIZE); memcpy( ptmp, info->rx_buf_list_ex[index].virt_addr, partial_count ); @@ -4862,11 +5048,9 @@ index = 0; } -#ifdef CONFIG_SYNCLINK_SYNCPPP - if (info->netcount) { - /* pass frame to syncppp device */ - sppp_rx_done(info,info->tmp_rx_buf,framesize); - } +#ifdef CONFIG_HDLC + if (info->netcount) + hdlcdev_rx(info,info->tmp_rx_buf,framesize); else #endif { @@ -4910,14 +5094,14 @@ SCADESC_EX *desc_ex; if ( debug_level >= DEBUG_LEVEL_DATA ) - trace_block(info,buf, MIN(count,SCABUFSIZE), 1); + trace_block(info,buf, min_t(int, count,SCABUFSIZE), 1); /* Copy source buffer to one or more DMA buffers, starting with * the first transmit dma buffer. */ for(i=0;;) { - copy_count = MIN(count,SCABUFSIZE); + copy_count = min_t(unsigned short,count,SCABUFSIZE); desc = &info->tx_buf_list[i]; desc_ex = &info->tx_buf_list_ex[i]; @@ -5384,9 +5568,9 @@ spin_unlock_irqrestore(&info->lock,flags); -#ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef CONFIG_HDLC if (info->netcount) - sppp_tx_done(info); + hdlcdev_tx_done(info); else #endif bh_transmit(info); diff -Nru a/drivers/char/tty_io.c b/drivers/char/tty_io.c --- a/drivers/char/tty_io.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/tty_io.c 2004-09-06 16:37:53 -07:00 @@ -142,6 +142,7 @@ ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *); static unsigned int tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); +static int ptmx_open(struct inode *, struct file *); static int tty_release(struct inode *, struct file *); int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); @@ -377,6 +378,19 @@ .fasync = tty_fasync, }; +#ifdef CONFIG_UNIX98_PTYS +static struct file_operations ptmx_fops = { + .llseek = no_llseek, + .read = tty_read, + .write = tty_write, + .poll = tty_poll, + .ioctl = tty_ioctl, + .open = ptmx_open, + .release = tty_release, + .fasync = tty_fasync, +}; +#endif + static struct file_operations console_fops = { .llseek = no_llseek, .read = tty_read, @@ -410,7 +424,6 @@ struct file * cons_filp = NULL; struct file *filp, *f = NULL; struct task_struct *p; - struct pid *pid; int closecount = 0, n; if (!tty) @@ -481,8 +494,7 @@ read_lock(&tasklist_lock); if (tty->session > 0) { - struct list_head *l; - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) { + do_each_task_pid(tty->session, PIDTYPE_SID, p) { if (p->signal->tty == tty) p->signal->tty = NULL; if (!p->signal->leader) @@ -491,7 +503,7 @@ send_group_sig_info(SIGCONT, SEND_SIG_PRIV, p); if (tty->pgrp > 0) p->signal->tty_old_pgrp = tty->pgrp; - } + } while_each_task_pid(tty->session, PIDTYPE_SID, p); } read_unlock(&tasklist_lock); @@ -563,8 +575,6 @@ { struct tty_struct *tty; struct task_struct *p; - struct list_head *l; - struct pid *pid; int tty_pgrp = -1; lock_kernel(); @@ -593,8 +603,9 @@ tty->pgrp = -1; read_lock(&tasklist_lock); - for_each_task_pid(current->signal->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(current->signal->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(current->signal->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); unlock_kernel(); } @@ -749,6 +760,17 @@ return tty_write(file, buf, count, ppos); } +static char ptychar[] = "pqrstuvwxyzabcde"; + +static inline void pty_line_name(struct tty_driver *driver, int index, char *p) +{ + int i = index + driver->name_base; + /* ->name is initialized to "ttyp", but "tty" is expected */ + sprintf(p, "%s%c%x", + driver->subtype == PTY_TYPE_SLAVE ? "tty" : driver->name, + ptychar[i >> 4 & 0xf], i & 0xf); +} + static inline void tty_line_name(struct tty_driver *driver, int index, char *p) { sprintf(p, "%s%d", driver->name, index + driver->name_base); @@ -1235,15 +1257,15 @@ */ if (tty_closing || o_tty_closing) { struct task_struct *p; - struct list_head *l; - struct pid *pid; read_lock(&tasklist_lock); - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); if (o_tty) - for_each_task_pid(o_tty->session, PIDTYPE_SID, p,l, pid) + do_each_task_pid(o_tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(o_tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); } @@ -1358,53 +1380,13 @@ return -ENODEV; } -#ifdef CONFIG_UNIX98_PTYS - if (device == MKDEV(TTYAUX_MAJOR,2)) { - int idr_ret; - - /* find a device that is not in use. */ - down(&allocated_ptys_lock); - if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) { - up(&allocated_ptys_lock); - return -ENOMEM; - } - idr_ret = idr_get_new(&allocated_ptys, NULL, &index); - if (idr_ret < 0) { - up(&allocated_ptys_lock); - if (idr_ret == -EAGAIN) - return -ENOMEM; - return -EIO; - } - if (index >= pty_limit) { - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - return -EIO; - } - up(&allocated_ptys_lock); - - driver = ptm_driver; - retval = init_dev(driver, index, &tty); - if (retval) { - down(&allocated_ptys_lock); - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - return retval; - } - - set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ - if (devpts_pty_new(tty->link)) - retval = -ENOMEM; - } else -#endif - { - driver = get_tty_driver(device, &index); - if (!driver) - return -ENODEV; + driver = get_tty_driver(device, &index); + if (!driver) + return -ENODEV; got_driver: - retval = init_dev(driver, index, &tty); - if (retval) - return retval; - } + retval = init_dev(driver, index, &tty); + if (retval) + return retval; filp->private_data = tty; file_move(filp, &tty->tty_files); @@ -1431,15 +1413,6 @@ printk(KERN_DEBUG "error %d in opening %s...", retval, tty->name); #endif - -#ifdef CONFIG_UNIX98_PTYS - if (index != -1) { - down(&allocated_ptys_lock); - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - } -#endif - release_dev(filp); if (retval != -ERESTARTSYS) return retval; @@ -1467,6 +1440,62 @@ return 0; } +#ifdef CONFIG_UNIX98_PTYS +static int ptmx_open(struct inode * inode, struct file * filp) +{ + struct tty_struct *tty; + int retval; + int index; + int idr_ret; + + nonseekable_open(inode, filp); + + /* find a device that is not in use. */ + down(&allocated_ptys_lock); + if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) { + up(&allocated_ptys_lock); + return -ENOMEM; + } + idr_ret = idr_get_new(&allocated_ptys, NULL, &index); + if (idr_ret < 0) { + up(&allocated_ptys_lock); + if (idr_ret == -EAGAIN) + return -ENOMEM; + return -EIO; + } + if (index >= pty_limit) { + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return -EIO; + } + up(&allocated_ptys_lock); + + retval = init_dev(ptm_driver, index, &tty); + if (retval) + goto out; + + set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ + filp->private_data = tty; + file_move(filp, &tty->tty_files); + + retval = -ENOMEM; + if (devpts_pty_new(tty->link)) + goto out1; + + check_tty_count(tty, "tty_open"); + retval = ptm_driver->open(tty, filp); + if (!retval) + return 0; +out1: + release_dev(filp); +out: + down(&allocated_ptys_lock); + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return retval; +} +#endif + static int tty_release(struct inode * inode, struct file * filp) { lock_kernel(); @@ -1606,8 +1635,6 @@ static int tiocsctty(struct tty_struct *tty, int arg) { - struct list_head *l; - struct pid *pid; task_t *p; if (current->signal->leader && @@ -1630,8 +1657,9 @@ */ read_lock(&tasklist_lock); - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); } else return -EPERM; @@ -1938,8 +1966,6 @@ #else struct tty_struct *tty = arg; struct task_struct *p; - struct list_head *l; - struct pid *pid; int session; int i; struct file *filp; @@ -1952,7 +1978,7 @@ if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); read_lock(&tasklist_lock); - for_each_task_pid(session, PIDTYPE_SID, p, l, pid) { + do_each_task_pid(session, PIDTYPE_SID, p) { if (p->signal->tty == tty || session > 0) { printk(KERN_NOTICE "SAK: killed process %d" " (%s): p->signal->session==tty->session\n", @@ -1979,7 +2005,7 @@ spin_unlock(&p->files->file_lock); } task_unlock(p); - } + } while_each_task_pid(session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); #endif } @@ -2154,6 +2180,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index, struct device *device) { + char name[64]; dev_t dev = MKDEV(driver->major, driver->minor_start) + index; if (index >= driver->num) { @@ -2165,13 +2192,11 @@ devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, "%s%d", driver->devfs_name, index + driver->name_base); - /* we don't care about the ptys */ - /* how nice to hide this behind some crappy interface.. */ - if (driver->type != TTY_DRIVER_TYPE_PTY) { - char name[64]; + if (driver->type == TTY_DRIVER_TYPE_PTY) + pty_line_name(driver, index, name); + else tty_line_name(driver, index, name); - class_simple_device_add(tty_class, dev, device, name); - } + class_simple_device_add(tty_class, dev, device, name); } /** @@ -2441,7 +2466,7 @@ class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); #ifdef CONFIG_UNIX98_PTYS - cdev_init(&ptmx_cdev, &tty_fops); + cdev_init(&ptmx_cdev, &ptmx_fops); if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) panic("Couldn't register /dev/ptmx driver\n"); diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c --- a/drivers/char/vt.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/vt.c 2004-09-06 16:37:54 -07:00 @@ -1981,12 +1981,16 @@ hide_cursor(currcons); while (!tty->stopped && count) { - c = *buf; + int orig = *buf; + c = orig; buf++; n++; count--; - if (utf) { + /* Do no translation at all in control states */ + if (vc_state != ESnormal) { + tc = c; + } else if (utf) { /* Combine UTF-8 into Unicode */ /* Incomplete characters silently ignored */ if(c > 0x7f) { @@ -2086,7 +2090,7 @@ continue; } FLUSH - do_con_trol(tty, currcons, c); + do_con_trol(tty, currcons, orig); } FLUSH console_conditional_schedule(); diff -Nru a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig --- a/drivers/char/watchdog/Kconfig 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/watchdog/Kconfig 2004-09-06 16:37:53 -07:00 @@ -319,6 +319,12 @@ To compile this driver as a module, choose M here: the module will be called machzwd. +# PowerPC Architecture + +config 8xx_WDT + tristate "MPC8xx Watchdog Timer" + depends on WATCHDOG && 8xx + # MIPS Architecture config INDYDOG diff -Nru a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile --- a/drivers/char/watchdog/Makefile 2004-09-06 16:37:54 -07:00 +++ b/drivers/char/watchdog/Makefile 2004-09-06 16:37:54 -07:00 @@ -37,3 +37,4 @@ obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o +obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o diff -Nru a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/watchdog/mpc8xx_wdt.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,164 @@ +/* + * mpc8xx_wdt.c - MPC8xx watchdog userspace interface + * + * Author: Florian Schirmer + * + * 2002 (c) Florian Schirmer This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long wdt_opened; +static int wdt_status; + +static void mpc8xx_wdt_handler_disable(void) +{ + volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + + imap->im_sit.sit_piscr &= ~(PISCR_PIE | PISCR_PTE); + + printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n"); +} + +static void mpc8xx_wdt_handler_enable(void) +{ + volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; + + imap->im_sit.sit_piscr |= PISCR_PIE | PISCR_PTE; + + printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n"); +} + +static int mpc8xx_wdt_open(struct inode *inode, struct file *file) +{ + if (test_and_set_bit(0, &wdt_opened)) + return -EBUSY; + + m8xx_wdt_reset(); + mpc8xx_wdt_handler_disable(); + + return 0; +} + +static int mpc8xx_wdt_release(struct inode *inode, struct file *file) +{ + m8xx_wdt_reset(); + +#if !defined(CONFIG_WATCHDOG_NOWAYOUT) + mpc8xx_wdt_handler_enable(); +#endif + + clear_bit(0, &wdt_opened); + + return 0; +} + +static ssize_t mpc8xx_wdt_write(struct file *file, const char *data, size_t len, + loff_t * ppos) +{ + if (ppos != &file->f_pos) + return -ESPIPE; + + if (len) + m8xx_wdt_reset(); + + return len; +} + +static int mpc8xx_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int timeout; + static struct watchdog_info info = { + .options = WDIOF_KEEPALIVEPING, + .firmware_version = 0, + .identity = "MPC8xx watchdog", + }; + + switch (cmd) { + case WDIOC_GETSUPPORT: + if (copy_to_user((void *)arg, &info, sizeof(info))) + return -EFAULT; + break; + + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + if (put_user(wdt_status, (int *)arg)) + return -EFAULT; + wdt_status &= ~WDIOF_KEEPALIVEPING; + break; + + case WDIOC_GETTEMP: + return -EOPNOTSUPP; + + case WDIOC_SETOPTIONS: + return -EOPNOTSUPP; + + case WDIOC_KEEPALIVE: + m8xx_wdt_reset(); + wdt_status |= WDIOF_KEEPALIVEPING; + break; + + case WDIOC_SETTIMEOUT: + return -EOPNOTSUPP; + + case WDIOC_GETTIMEOUT: + timeout = m8xx_wdt_get_timeout(); + if (put_user(timeout, (int *)arg)) + return -EFAULT; + break; + + default: + return -ENOIOCTLCMD; + } + + return 0; +} + +static struct file_operations mpc8xx_wdt_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .write = mpc8xx_wdt_write, + .ioctl = mpc8xx_wdt_ioctl, + .open = mpc8xx_wdt_open, + .release = mpc8xx_wdt_release, +}; + +static struct miscdevice mpc8xx_wdt_miscdev = { + .minor = WATCHDOG_MINOR, + .name = "watchdog", + .fops = &mpc8xx_wdt_fops, +}; + +static int __init mpc8xx_wdt_init(void) +{ + return misc_register(&mpc8xx_wdt_miscdev); +} + +static void __exit mpc8xx_wdt_exit(void) +{ + misc_deregister(&mpc8xx_wdt_miscdev); + + m8xx_wdt_reset(); + mpc8xx_wdt_handler_enable(); +} + +module_init(mpc8xx_wdt_init); +module_exit(mpc8xx_wdt_exit); + +MODULE_AUTHOR("Florian Schirmer "); +MODULE_DESCRIPTION("MPC8xx watchdog driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c --- a/drivers/char/watchdog/pcwd.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/char/watchdog/pcwd.c 2004-09-06 16:37:50 -07:00 @@ -859,8 +859,7 @@ /* Not an 'ff' from a floating bus, so must be a card! */ for (i = 0; i < 4; ++i) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 2); + msleep(500); last_port0 = port0; last_port1 = port1; diff -Nru a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c --- a/drivers/char/watchdog/wdt_pci.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/char/watchdog/wdt_pci.c 2004-09-06 16:37:53 -07:00 @@ -674,8 +674,8 @@ out_misc: #ifdef CONFIG_WDT_501_PCI misc_deregister(&temp_miscdev); -#endif /* CONFIG_WDT_501_PCI */ out_rbt: +#endif /* CONFIG_WDT_501_PCI */ unregister_reboot_notifier(&wdtpci_notifier); out_irq: free_irq(irq, &wdtpci_miscdev); diff -Nru a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig --- a/drivers/cpufreq/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/drivers/cpufreq/Kconfig 2004-09-06 16:37:54 -07:00 @@ -69,6 +69,21 @@ If in doubt, say Y. +config CPU_FREQ_GOV_ONDEMAND + tristate "'ondemand' cpufreq policy governor" + depends on CPU_FREQ + help + 'ondemand' - This driver adds a dynamic cpufreq policy governor. + The governor does a periodic polling and + changes frequency based on the CPU utilization. + The support for this governor depends on CPU capability to + do fast frequency switching (i.e, very low latency frequency + transitions). + + For details, take a look at linux/Documentation/cpu-freq. + + If in doubt, say N. + config CPU_FREQ_24_API bool "/proc/sys/cpu/ interface (2.4. / OLD)" depends on CPU_FREQ && SYSCTL && CPU_FREQ_GOV_USERSPACE diff -Nru a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile --- a/drivers/cpufreq/Makefile 2004-09-06 16:37:55 -07:00 +++ b/drivers/cpufreq/Makefile 2004-09-06 16:37:55 -07:00 @@ -5,6 +5,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o +obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o # CPUfreq cross-arch helpers obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o diff -Nru a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c --- a/drivers/cpufreq/cpufreq.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/cpufreq/cpufreq.c 2004-09-06 16:37:51 -07:00 @@ -157,9 +157,6 @@ (likely(cpufreq_cpu_data[freqs->cpu]->cur)) && (unlikely(freqs->old != cpufreq_cpu_data[freqs->cpu]->cur))) { - if (cpufreq_driver->flags & CPUFREQ_PANIC_OUTOFSYNC) - panic("CPU Frequency is out of sync."); - printk(KERN_WARNING "Warning: CPU frequency is %u, " "cpufreq assumed %u kHz.\n", freqs->old, cpufreq_cpu_data[freqs->cpu]->cur); freqs->old = cpufreq_cpu_data[freqs->cpu]->cur; @@ -603,9 +600,6 @@ { struct cpufreq_freqs freqs; - if (cpufreq_driver->flags & CPUFREQ_PANIC_OUTOFSYNC) - panic("CPU Frequency is out of sync."); - printk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing " "core thinks of %u, is %u kHz.\n", old_freq, new_freq); @@ -695,9 +689,6 @@ if (unlikely(cur_freq != cpu_policy->cur)) { struct cpufreq_freqs freqs; - - if (cpufreq_driver->flags & CPUFREQ_PANIC_RESUME_OUTOFSYNC) - panic("CPU Frequency is out of sync."); printk(KERN_WARNING "Warning: CPU frequency is %u, " "cpufreq assumed %u kHz.\n", cur_freq, cpu_policy->cur); diff -Nru a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/cpufreq/cpufreq_ondemand.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,417 @@ +/* + * drivers/cpufreq/cpufreq_ondemand.c + * + * Copyright (C) 2001 Russell King + * (C) 2003 Venkatesh Pallipadi . + * Jun Nakajima + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * dbs is used in this file as a shortform for demandbased switching + * It helps to keep variable names smaller, simpler + */ + +#define DEF_FREQUENCY_UP_THRESHOLD (80) +#define MIN_FREQUENCY_UP_THRESHOLD (0) +#define MAX_FREQUENCY_UP_THRESHOLD (100) + +#define DEF_FREQUENCY_DOWN_THRESHOLD (20) +#define MIN_FREQUENCY_DOWN_THRESHOLD (0) +#define MAX_FREQUENCY_DOWN_THRESHOLD (100) + +/* + * The polling frequency of this governor depends on the capability of + * the processor. Default polling frequency is 1000 times the transition + * latency of the processor. The governor will work on any processor with + * transition latency <= 10mS, using appropriate sampling + * rate. + * For CPUs with transition latency > 10mS (mostly drivers with CPUFREQ_ETERNAL) + * this governor will not work. + * All times here are in uS. + */ +static unsigned int def_sampling_rate; +#define MIN_SAMPLING_RATE (def_sampling_rate / 2) +#define MAX_SAMPLING_RATE (500 * def_sampling_rate) +#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) +#define DEF_SAMPLING_DOWN_FACTOR (10) +#define TRANSITION_LATENCY_LIMIT (10 * 1000) +#define sampling_rate_in_HZ(x) ((x * HZ) / (1000 * 1000)) + +static void do_dbs_timer(void *data); + +struct cpu_dbs_info_s { + struct cpufreq_policy *cur_policy; + unsigned int prev_cpu_idle_up; + unsigned int prev_cpu_idle_down; + unsigned int enable; +}; +static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); + +static unsigned int dbs_enable; /* number of CPUs using this policy */ + +static DECLARE_MUTEX (dbs_sem); +static DECLARE_WORK (dbs_work, do_dbs_timer, NULL); + +struct dbs_tuners { + unsigned int sampling_rate; + unsigned int sampling_down_factor; + unsigned int up_threshold; + unsigned int down_threshold; +}; + +struct dbs_tuners dbs_tuners_ins = { + .up_threshold = DEF_FREQUENCY_UP_THRESHOLD, + .down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD, + .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR, +}; + +/************************** sysfs interface ************************/ +static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf) +{ + return sprintf (buf, "%u\n", MAX_SAMPLING_RATE); +} + +static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf) +{ + return sprintf (buf, "%u\n", MIN_SAMPLING_RATE); +} + +#define define_one_ro(_name) \ +static struct freq_attr _name = { \ + .attr = { .name = __stringify(_name), .mode = 0444 }, \ + .show = show_##_name, \ +} + +define_one_ro(sampling_rate_max); +define_one_ro(sampling_rate_min); + +/* cpufreq_ondemand Governor Tunables */ +#define show_one(file_name, object) \ +static ssize_t show_##file_name \ +(struct cpufreq_policy *unused, char *buf) \ +{ \ + return sprintf(buf, "%u\n", dbs_tuners_ins.object); \ +} +show_one(sampling_rate, sampling_rate); +show_one(sampling_down_factor, sampling_down_factor); +show_one(up_threshold, up_threshold); +show_one(down_threshold, down_threshold); + +static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, + const char *buf, size_t count) +{ + unsigned int input; + int ret; + ret = sscanf (buf, "%u", &input); + down(&dbs_sem); + if (ret != 1 ) + goto out; + + dbs_tuners_ins.sampling_down_factor = input; +out: + up(&dbs_sem); + return count; +} + +static ssize_t store_sampling_rate(struct cpufreq_policy *unused, + const char *buf, size_t count) +{ + unsigned int input; + int ret; + ret = sscanf (buf, "%u", &input); + down(&dbs_sem); + if (ret != 1 || input > MAX_SAMPLING_RATE || input < MIN_SAMPLING_RATE) + goto out; + + dbs_tuners_ins.sampling_rate = input; +out: + up(&dbs_sem); + return count; +} + +static ssize_t store_up_threshold(struct cpufreq_policy *unused, + const char *buf, size_t count) +{ + unsigned int input; + int ret; + ret = sscanf (buf, "%u", &input); + down(&dbs_sem); + if (ret != 1 || input > MAX_FREQUENCY_UP_THRESHOLD || + input < MIN_FREQUENCY_UP_THRESHOLD || + input <= dbs_tuners_ins.down_threshold) + goto out; + + dbs_tuners_ins.up_threshold = input; +out: + up(&dbs_sem); + return count; +} + +static ssize_t store_down_threshold(struct cpufreq_policy *unused, + const char *buf, size_t count) +{ + unsigned int input; + int ret; + ret = sscanf (buf, "%u", &input); + down(&dbs_sem); + if (ret != 1 || input > MAX_FREQUENCY_DOWN_THRESHOLD || + input < MIN_FREQUENCY_DOWN_THRESHOLD || + input >= dbs_tuners_ins.up_threshold) + goto out; + + dbs_tuners_ins.down_threshold = input; +out: + up(&dbs_sem); + return count; +} + +#define define_one_rw(_name) \ +static struct freq_attr _name = { \ + .attr = { .name = __stringify(_name), .mode = 0644 }, \ + .show = show_##_name, \ + .store = store_##_name, \ +} + +define_one_rw(sampling_rate); +define_one_rw(sampling_down_factor); +define_one_rw(up_threshold); +define_one_rw(down_threshold); + +static struct attribute * dbs_attributes[] = { + &sampling_rate_max.attr, + &sampling_rate_min.attr, + &sampling_rate.attr, + &sampling_down_factor.attr, + &up_threshold.attr, + &down_threshold.attr, + NULL +}; + +static struct attribute_group dbs_attr_group = { + .attrs = dbs_attributes, + .name = "ondemand", +}; + +/************************** sysfs end ************************/ + +static void dbs_check_cpu(int cpu) +{ + unsigned int idle_ticks, up_idle_ticks, down_idle_ticks; + unsigned int freq_down_step; + unsigned int freq_down_sampling_rate; + static int down_skip[NR_CPUS]; + struct cpu_dbs_info_s *this_dbs_info; + + this_dbs_info = &per_cpu(cpu_dbs_info, cpu); + if (!this_dbs_info->enable) + return; + + /* + * The default safe range is 20% to 80% + * Every sampling_rate, we check + * - If current idle time is less than 20%, then we try to + * increase frequency + * Every sampling_rate*sampling_down_factor, we check + * - If current idle time is more than 80%, then we try to + * decrease frequency + * + * Any frequency increase takes it to the maximum frequency. + * Frequency reduction happens at minimum steps of + * 5% of max_frequency + */ + /* Check for frequency increase */ + idle_ticks = kstat_cpu(cpu).cpustat.idle - + this_dbs_info->prev_cpu_idle_up; + this_dbs_info->prev_cpu_idle_up = kstat_cpu(cpu).cpustat.idle; + + up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) * + sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate) / 100; + + if (idle_ticks < up_idle_ticks) { + __cpufreq_driver_target(this_dbs_info->cur_policy, + this_dbs_info->cur_policy->max, + CPUFREQ_RELATION_H); + down_skip[cpu] = 0; + this_dbs_info->prev_cpu_idle_down = kstat_cpu(cpu).cpustat.idle; + return; + } + + /* Check for frequency decrease */ + down_skip[cpu]++; + if (down_skip[cpu] < dbs_tuners_ins.sampling_down_factor) + return; + + idle_ticks = kstat_cpu(cpu).cpustat.idle - + this_dbs_info->prev_cpu_idle_down; + down_skip[cpu] = 0; + this_dbs_info->prev_cpu_idle_down = kstat_cpu(cpu).cpustat.idle; + + freq_down_sampling_rate = dbs_tuners_ins.sampling_rate * + dbs_tuners_ins.sampling_down_factor; + down_idle_ticks = (100 - dbs_tuners_ins.down_threshold) * + sampling_rate_in_HZ(freq_down_sampling_rate) / 100; + + if (idle_ticks > down_idle_ticks ) { + freq_down_step = (5 * this_dbs_info->cur_policy->max) / 100; + __cpufreq_driver_target(this_dbs_info->cur_policy, + this_dbs_info->cur_policy->cur - freq_down_step, + CPUFREQ_RELATION_H); + return; + } +} + +static void do_dbs_timer(void *data) +{ + int i; + down(&dbs_sem); + for (i = 0; i < NR_CPUS; i++) + if (cpu_online(i)) + dbs_check_cpu(i); + schedule_delayed_work(&dbs_work, + sampling_rate_in_HZ(dbs_tuners_ins.sampling_rate)); + up(&dbs_sem); +} + +static inline void dbs_timer_init(void) +{ + INIT_WORK(&dbs_work, do_dbs_timer, NULL); + schedule_work(&dbs_work); + return; +} + +static inline void dbs_timer_exit(void) +{ + cancel_delayed_work(&dbs_work); + return; +} + +static int cpufreq_governor_dbs(struct cpufreq_policy *policy, + unsigned int event) +{ + unsigned int cpu = policy->cpu; + struct cpu_dbs_info_s *this_dbs_info; + + this_dbs_info = &per_cpu(cpu_dbs_info, cpu); + + switch (event) { + case CPUFREQ_GOV_START: + if ((!cpu_online(cpu)) || + (!policy->cur)) + return -EINVAL; + + if (policy->cpuinfo.transition_latency > + (TRANSITION_LATENCY_LIMIT * 1000)) + return -EINVAL; + if (this_dbs_info->enable) /* Already enabled */ + break; + + down(&dbs_sem); + this_dbs_info->cur_policy = policy; + + this_dbs_info->prev_cpu_idle_up = + kstat_cpu(cpu).cpustat.idle; + this_dbs_info->prev_cpu_idle_down = + kstat_cpu(cpu).cpustat.idle; + this_dbs_info->enable = 1; + sysfs_create_group(&policy->kobj, &dbs_attr_group); + dbs_enable++; + /* + * Start the timerschedule work, when this governor + * is used for first time + */ + if (dbs_enable == 1) { + /* policy latency is in nS. Convert it to uS first */ + def_sampling_rate = (policy->cpuinfo.transition_latency / 1000) * + DEF_SAMPLING_RATE_LATENCY_MULTIPLIER; + dbs_tuners_ins.sampling_rate = def_sampling_rate; + + dbs_timer_init(); + } + + up(&dbs_sem); + break; + + case CPUFREQ_GOV_STOP: + down(&dbs_sem); + this_dbs_info->enable = 0; + sysfs_remove_group(&policy->kobj, &dbs_attr_group); + dbs_enable--; + /* + * Stop the timerschedule work, when this governor + * is used for first time + */ + if (dbs_enable == 0) + dbs_timer_exit(); + + up(&dbs_sem); + + break; + + case CPUFREQ_GOV_LIMITS: + down(&dbs_sem); + if (policy->max < this_dbs_info->cur_policy->cur) + __cpufreq_driver_target( + this_dbs_info->cur_policy, + policy->max, CPUFREQ_RELATION_H); + else if (policy->min > this_dbs_info->cur_policy->cur) + __cpufreq_driver_target( + this_dbs_info->cur_policy, + policy->min, CPUFREQ_RELATION_L); + up(&dbs_sem); + break; + } + return 0; +} + +struct cpufreq_governor cpufreq_gov_dbs = { + .name = "ondemand", + .governor = cpufreq_governor_dbs, + .owner = THIS_MODULE, +}; +EXPORT_SYMBOL(cpufreq_gov_dbs); + +static int __init cpufreq_gov_dbs_init(void) +{ + return cpufreq_register_governor(&cpufreq_gov_dbs); +} + +static void __exit cpufreq_gov_dbs_exit(void) +{ + /* Make sure that the scheduled work is indeed not running */ + flush_scheduled_work(); + + cpufreq_unregister_governor(&cpufreq_gov_dbs); +} + + +MODULE_AUTHOR ("Venkatesh Pallipadi "); +MODULE_DESCRIPTION ("'cpufreq_ondemand' - A dynamic cpufreq governor for " + "Low Latency Frequency Transition capable processors"); +MODULE_LICENSE ("GPL"); + +module_init(cpufreq_gov_dbs_init); +module_exit(cpufreq_gov_dbs_exit); diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig --- a/drivers/i2c/chips/Kconfig 2004-09-06 16:37:53 -07:00 +++ b/drivers/i2c/chips/Kconfig 2004-09-06 16:37:53 -07:00 @@ -299,4 +299,16 @@ This driver can also be built as a module. If so, the module will be called i2c-rtc8564. +config ISP1301_OMAP + tristate "Philips ISP1301 with OMAP OTG" + depends on I2C && ARCH_OMAP_OTG + help + If you say yes here you get support for the Philips ISP1301 + USB-On-The-Go transceiver working with the OMAP OTG controller. + The ISP1301 is used in products including H2 and H3 development + boards for Texas Instruments OMAP processors. + + This driver can also be built as a module. If so, the module + will be called isp1301_omap. + endmenu diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile --- a/drivers/i2c/chips/Makefile 2004-09-06 16:37:55 -07:00 +++ b/drivers/i2c/chips/Makefile 2004-09-06 16:37:55 -07:00 @@ -29,7 +29,9 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o +obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o ifeq ($(CONFIG_I2C_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG endif + diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c --- a/drivers/i2c/chips/asb100.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/i2c/chips/asb100.c 2004-09-06 16:37:53 -07:00 @@ -520,9 +520,9 @@ return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); } -static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL); +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); #define device_create_file_vid(client) \ -device_create_file(&client->dev, &dev_attr_in0_ref) +device_create_file(&client->dev, &dev_attr_cpu0_vid) /* VRM */ static ssize_t show_vrm(struct device *dev, char *buf) diff -Nru a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/isp1301_omap.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1660 @@ +/* + * isp1301_omap - ISP 1301 USB transceiver, talking to OMAP OTG controller + * + * Copyright (C) 2004 Texas Instruments + * Copyright (C) 2004 David Brownell + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#undef DEBUG +#undef VERBOSE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +#ifndef DEBUG +#undef VERBOSE +#endif + + +#define DRIVER_VERSION "24 August 2004" +#define DRIVER_NAME (isp1301_driver.name) + +MODULE_DESCRIPTION("ISP1301 USB OTG Transceiver Driver"); +MODULE_LICENSE("GPL"); + +struct isp1301 { + struct otg_transceiver otg; + struct i2c_client client; + void (*i2c_release)(struct device *dev); + + int irq; + + u32 last_otg_ctrl; + unsigned working:1; + + struct timer_list timer; + + /* use keventd context to change the state for us */ + struct work_struct work; + + unsigned long todo; +# define WORK_UPDATE_ISP 0 /* update ISP from OTG */ +# define WORK_UPDATE_OTG 1 /* update OTG from ISP */ +# define WORK_HOST_RESUME 4 /* resume host */ +# define WORK_TIMER 6 /* timer fired */ +# define WORK_STOP 7 /* don't resubmit */ +}; + + +/* bits in OTG_CTRL_REG */ + +#define OTG_XCEIV_OUTPUTS \ + (OTG_ASESSVLD|OTG_BSESSEND|OTG_BSESSVLD|OTG_VBUSVLD|OTG_ID) +#define OTG_XCEIV_INPUTS \ + (OTG_PULLDOWN|OTG_PULLUP|OTG_DRV_VBUS|OTG_PD_VBUS|OTG_PU_VBUS|OTG_PU_ID) +#define OTG_CTRL_BITS \ + (OTG_A_BUSREQ|OTG_A_SETB_HNPEN|OTG_B_BUSREQ|OTG_B_HNPEN|OTG_BUSDROP) + /* and OTG_PULLUP is sometimes written */ + +#define OTG_CTRL_MASK (OTG_DRIVER_SEL| \ + OTG_XCEIV_OUTPUTS|OTG_XCEIV_INPUTS| \ + OTG_CTRL_BITS) + + +/*-------------------------------------------------------------------------*/ + +#ifdef CONFIG_MACH_OMAP_H2 + +/* board-specific PM hooks */ + +#include +#include +#include + + +#if defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE) + +#include + +#else + +static inline int tps65010_set_vbus_draw(unsigned mA) +{ + pr_debug("tps65010: draw %d mA (STUB)\n", mA); + return 0; +} + +#endif + +static void enable_vbus_draw(struct isp1301 *isp, unsigned mA) +{ + int status = tps65010_set_vbus_draw(mA); + if (status < 0) + pr_debug(" VBUS %d mA error %d\n", mA, status); +} + +static void enable_vbus_source(struct isp1301 *isp) +{ + /* this board won't supply more than 8mA vbus power. + * some boards can switch a 100ma "unit load" (or more). + */ +} + + +/* products will deliver OTG messages with LEDs, GUI, etc */ +static inline void notresponding(struct isp1301 *isp) +{ + printk(KERN_NOTICE "OTG device not responding.\n"); +} + + +#endif + +/*-------------------------------------------------------------------------*/ + +/* only two addresses possible */ +#define ISP_BASE 0x2c +static unsigned short normal_i2c[] = { + ISP_BASE, ISP_BASE + 1, + I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; + +I2C_CLIENT_INSMOD; + +static struct i2c_driver isp1301_driver; + +/* smbus apis are used for portability */ + +static inline u8 +isp1301_get_u8(struct isp1301 *isp, u8 reg) +{ + return i2c_smbus_read_byte_data(&isp->client, reg + 0); +} + +static inline int +isp1301_get_u16(struct isp1301 *isp, u8 reg) +{ + return i2c_smbus_read_word_data(&isp->client, reg); +} + +static inline int +isp1301_set_bits(struct isp1301 *isp, u8 reg, u8 bits) +{ + return i2c_smbus_write_byte_data(&isp->client, reg + 0, bits); +} + +static inline int +isp1301_clear_bits(struct isp1301 *isp, u8 reg, u8 bits) +{ + return i2c_smbus_write_byte_data(&isp->client, reg + 1, bits); +} + +/*-------------------------------------------------------------------------*/ + +/* identification */ +#define ISP1301_VENDOR_ID 0x00 /* u16 read */ +#define ISP1301_PRODUCT_ID 0x02 /* u16 read */ +#define ISP1301_BCD_DEVICE 0x14 /* u16 read */ + +#define I2C_VENDOR_ID_PHILIPS 0x04cc +#define I2C_PRODUCT_ID_PHILIPS_1301 0x1301 + +/* operational registers */ +#define ISP1301_MODE_CONTROL_1 0x04 /* u8 read, set, +1 clear */ +# define MC1_SPEED_REG (1 << 0) +# define MC1_SUSPEND_REG (1 << 1) +# define MC1_DAT_SE0 (1 << 2) +# define MC1_TRANSPARENT (1 << 3) +# define MC1_BDIS_ACON_EN (1 << 4) +# define MC1_OE_INT_EN (1 << 5) +# define MC1_UART_EN (1 << 6) +# define MC1_MASK 0x7f +#define ISP1301_MODE_CONTROL_2 0x12 /* u8 read, set, +1 clear */ +# define MC2_GLOBAL_PWR_DN (1 << 0) +# define MC2_SPD_SUSP_CTRL (1 << 1) +# define MC2_BI_DI (1 << 2) +# define MC2_TRANSP_BDIR0 (1 << 3) +# define MC2_TRANSP_BDIR1 (1 << 4) +# define MC2_AUDIO_EN (1 << 5) +# define MC2_PSW_EN (1 << 6) +# define MC2_EN2V7 (1 << 7) +#define ISP1301_OTG_CONTROL_1 0x06 /* u8 read, set, +1 clear */ +# define OTG1_DP_PULLUP (1 << 0) +# define OTG1_DM_PULLUP (1 << 1) +# define OTG1_DP_PULLDOWN (1 << 2) +# define OTG1_DM_PULLDOWN (1 << 3) +# define OTG1_ID_PULLDOWN (1 << 4) +# define OTG1_VBUS_DRV (1 << 5) +# define OTG1_VBUS_DISCHRG (1 << 6) +# define OTG1_VBUS_CHRG (1 << 7) +#define ISP1301_OTG_STATUS 0x10 /* u8 readonly */ +# define OTG_B_SESS_END (1 << 6) +# define OTG_B_SESS_VLD (1 << 7) + +#define ISP1301_INTERRUPT_SOURCE 0x08 /* u8 read */ +#define ISP1301_INTERRUPT_LATCH 0x0A /* u8 read, set, +1 clear */ + +#define ISP1301_INTERRUPT_FALLING 0x0C /* u8 read, set, +1 clear */ +#define ISP1301_INTERRUPT_RISING 0x0E /* u8 read, set, +1 clear */ + +/* same bitfields in all interrupt registers */ +# define INTR_VBUS_VLD (1 << 0) +# define INTR_SESS_VLD (1 << 1) +# define INTR_DP_HI (1 << 2) +# define INTR_ID_GND (1 << 3) +# define INTR_DM_HI (1 << 4) +# define INTR_ID_FLOAT (1 << 5) +# define INTR_BDIS_ACON (1 << 6) +# define INTR_CR_INT (1 << 7) + +/*-------------------------------------------------------------------------*/ + +static const char *state_string(enum usb_otg_state state) +{ + switch (state) { + case OTG_STATE_A_IDLE: return "a_idle"; + case OTG_STATE_A_WAIT_VRISE: return "a_wait_vrise"; + case OTG_STATE_A_WAIT_BCON: return "a_wait_bcon"; + case OTG_STATE_A_HOST: return "a_host"; + case OTG_STATE_A_SUSPEND: return "a_suspend"; + case OTG_STATE_A_PERIPHERAL: return "a_peripheral"; + case OTG_STATE_A_WAIT_VFALL: return "a_wait_vfall"; + case OTG_STATE_A_VBUS_ERR: return "a_vbus_err"; + case OTG_STATE_B_IDLE: return "b_idle"; + case OTG_STATE_B_SRP_INIT: return "b_srp_init"; + case OTG_STATE_B_PERIPHERAL: return "b_peripheral"; + case OTG_STATE_B_WAIT_ACON: return "b_wait_acon"; + case OTG_STATE_B_HOST: return "b_host"; + default: return "UNDEFINED"; + } +} + +static inline const char *state_name(struct isp1301 *isp) +{ + return state_string(isp->otg.state); +} + +#ifdef VERBOSE +#define dev_vdbg dev_dbg +#else +#define dev_vdbg(dev, fmt, arg...) do{}while(0) +#endif + +/*-------------------------------------------------------------------------*/ + +/* NOTE: some of this ISP1301 setup is specific to H2 boards; + * not everything is guarded by board-specific checks, or even using + * omap_usb_config data to deduce MC1_DAT_SE0 and MC2_BI_DI. + * + * ALSO: this currently doesn't use ISP1301 low-power modes + * while OTG is running. + */ + +static void power_down(struct isp1301 *isp) +{ + isp->otg.state = OTG_STATE_UNDEFINED; + + // isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, MC2_GLOBAL_PWR_DN); + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_SUSPEND_REG); + + isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_ID_PULLDOWN); + isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); +} + +static void power_up(struct isp1301 *isp) +{ + // isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_2, MC2_GLOBAL_PWR_DN); + isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, MC1_SUSPEND_REG); + + /* do this only when cpu is driving transceiver, + * so host won't see a low speed device... + */ + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); +} + +#define NO_HOST_SUSPEND + +static int host_suspend(struct isp1301 *isp) +{ +#ifdef NO_HOST_SUSPEND + return 0; +#else + struct device *dev; + + if (!isp->otg.host) + return -ENODEV; + + /* Currently ASSUMES only the OTG port matters; + * other ports could be active... + */ + dev = isp->otg.host->controller; + return dev->driver->suspend(dev, 3, 0); +#endif +} + +static int host_resume(struct isp1301 *isp) +{ +#ifdef NO_HOST_SUSPEND + return 0; +#else + struct device *dev; + + if (!isp->otg.host) + return -ENODEV; + + dev = isp->otg.host->controller; + return dev->driver->resume(dev, 0); +#endif +} + +static int gadget_suspend(struct isp1301 *isp) +{ + isp->otg.gadget->b_hnp_enable = 0; + isp->otg.gadget->a_hnp_support = 0; + isp->otg.gadget->a_alt_hnp_support = 0; + return usb_gadget_vbus_disconnect(isp->otg.gadget); +} + +/*-------------------------------------------------------------------------*/ + +#define TIMER_MINUTES 10 +#define TIMER_JIFFIES (TIMER_MINUTES * 60 * HZ) + +/* Almost all our I2C messaging comes from a work queue's task context. + * NOTE: guaranteeing certain response times might mean we shouldn't + * share keventd's work queue; a realtime task might be safest. + */ +void +isp1301_defer_work(struct isp1301 *isp, int work) +{ + int status; + + if (isp && !test_and_set_bit(work, &isp->todo)) { + (void) get_device(&isp->client.dev); + status = schedule_work(&isp->work); + if (!status && !isp->working) + dev_vdbg(&isp->client.dev, + "work item %d may be lost\n", work); + } +} + +/* called from irq handlers */ +static void a_idle(struct isp1301 *isp, const char *tag) +{ + if (isp->otg.state == OTG_STATE_A_IDLE) + return; + + isp->otg.default_a = 1; + if (isp->otg.host) { + isp->otg.host->is_b_host = 0; + host_suspend(isp); + } + if (isp->otg.gadget) { + isp->otg.gadget->is_a_peripheral = 1; + gadget_suspend(isp); + } + isp->otg.state = OTG_STATE_A_IDLE; + isp->last_otg_ctrl = OTG_CTRL_REG = OTG_CTRL_REG & OTG_XCEIV_OUTPUTS; + pr_debug(" --> %s/%s\n", state_name(isp), tag); +} + +/* called from irq handlers */ +static void b_idle(struct isp1301 *isp, const char *tag) +{ + if (isp->otg.state == OTG_STATE_B_IDLE) + return; + + isp->otg.default_a = 0; + if (isp->otg.host) { + isp->otg.host->is_b_host = 1; + host_suspend(isp); + } + if (isp->otg.gadget) { + isp->otg.gadget->is_a_peripheral = 0; + gadget_suspend(isp); + } + isp->otg.state = OTG_STATE_B_IDLE; + isp->last_otg_ctrl = OTG_CTRL_REG = OTG_CTRL_REG & OTG_XCEIV_OUTPUTS; + pr_debug(" --> %s/%s\n", state_name(isp), tag); +} + +static void +dump_regs(struct isp1301 *isp, const char *label) +{ +#ifdef DEBUG + u8 ctrl = isp1301_get_u8(isp, ISP1301_OTG_CONTROL_1); + u8 status = isp1301_get_u8(isp, ISP1301_OTG_STATUS); + u8 src = isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE); + + pr_debug("otg: %06x, %s %s, otg/%02x stat/%02x.%02x\n", + OTG_CTRL_REG, label, state_name(isp), + ctrl, status, src); + /* mode control and irq enables don't change much */ +#endif +} + +/*-------------------------------------------------------------------------*/ + +#ifdef CONFIG_USB_OTG + +/* + * The OMAP OTG controller handles most of the OTG state transitions. + * + * We translate isp1301 outputs (mostly voltage comparator status) into + * OTG inputs; OTG outputs (mostly pullup/pulldown controls) and HNP state + * flags into isp1301 inputs ... and infer state transitions. + */ + +#ifdef VERBOSE + +static void check_state(struct isp1301 *isp, const char *tag) +{ + enum usb_otg_state state = OTG_STATE_UNDEFINED; + u8 fsm = OTG_TEST_REG & 0x0ff; + unsigned extra = 0; + + switch (fsm) { + + /* default-b */ + case 0x0: + state = OTG_STATE_B_IDLE; + break; + case 0x3: + case 0x7: + extra = 1; + case 0x1: + state = OTG_STATE_B_PERIPHERAL; + break; + case 0x11: + state = OTG_STATE_B_SRP_INIT; + break; + + /* extra dual-role default-b states */ + case 0x12: + case 0x13: + case 0x16: + extra = 1; + case 0x17: + state = OTG_STATE_B_WAIT_ACON; + break; + case 0x34: + state = OTG_STATE_B_HOST; + break; + + /* default-a */ + case 0x36: + state = OTG_STATE_A_IDLE; + break; + case 0x3c: + state = OTG_STATE_A_WAIT_VFALL; + break; + case 0x7d: + state = OTG_STATE_A_VBUS_ERR; + break; + case 0x9e: + case 0x9f: + extra = 1; + case 0x89: + state = OTG_STATE_A_PERIPHERAL; + break; + case 0xb7: + state = OTG_STATE_A_WAIT_VRISE; + break; + case 0xb8: + state = OTG_STATE_A_WAIT_BCON; + break; + case 0xb9: + state = OTG_STATE_A_HOST; + break; + case 0xba: + state = OTG_STATE_A_SUSPEND; + break; + default: + break; + } + if (isp->otg.state == state && !extra) + return; + pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag, + state_string(state), fsm, state_name(isp), OTG_CTRL_REG); +} + +#else + +static inline void check_state(struct isp1301 *isp, const char *tag) { } + +#endif + +/* outputs from ISP1301_INTERRUPT_SOURCE */ +static void update_otg1(struct isp1301 *isp, u8 int_src) +{ + u32 otg_ctrl; + + otg_ctrl = OTG_CTRL_REG + & OTG_CTRL_MASK + & ~OTG_XCEIV_INPUTS + & ~(OTG_ID|OTG_ASESSVLD|OTG_VBUSVLD); + if (int_src & INTR_SESS_VLD) + otg_ctrl |= OTG_ASESSVLD; + else if (isp->otg.state == OTG_STATE_A_WAIT_VFALL) { + a_idle(isp, "vfall"); + otg_ctrl &= ~OTG_CTRL_BITS; + } + if (int_src & INTR_VBUS_VLD) + otg_ctrl |= OTG_VBUSVLD; + if (int_src & INTR_ID_GND) { /* default-A */ + if (isp->otg.state == OTG_STATE_B_IDLE + || isp->otg.state == OTG_STATE_UNDEFINED) { + a_idle(isp, "init"); + return; + } + } else { /* default-B */ + otg_ctrl |= OTG_ID; + if (isp->otg.state == OTG_STATE_A_IDLE + || isp->otg.state == OTG_STATE_UNDEFINED) { + b_idle(isp, "init"); + return; + } + } + OTG_CTRL_REG = otg_ctrl; +} + +/* outputs from ISP1301_OTG_STATUS */ +static void update_otg2(struct isp1301 *isp, u8 otg_status) +{ + u32 otg_ctrl; + + otg_ctrl = OTG_CTRL_REG + & OTG_CTRL_MASK + & ~OTG_XCEIV_INPUTS + & ~(OTG_BSESSVLD|OTG_BSESSEND); + if (otg_status & OTG_B_SESS_VLD) + otg_ctrl |= OTG_BSESSVLD; + else if (otg_status & OTG_B_SESS_END) + otg_ctrl |= OTG_BSESSEND; + OTG_CTRL_REG = otg_ctrl; +} + +/* inputs going to ISP1301 */ +static void otg_update_isp(struct isp1301 *isp) +{ + u32 otg_ctrl, otg_change; + u8 set = OTG1_DM_PULLDOWN, clr = OTG1_DM_PULLUP; + + otg_ctrl = OTG_CTRL_REG; + otg_change = otg_ctrl ^ isp->last_otg_ctrl; + isp->last_otg_ctrl = otg_ctrl; + otg_ctrl = otg_ctrl & OTG_XCEIV_INPUTS; + + switch (isp->otg.state) { + case OTG_STATE_B_IDLE: + case OTG_STATE_B_PERIPHERAL: + case OTG_STATE_B_SRP_INIT: + if (!(otg_ctrl & OTG_PULLUP)) { + // if (otg_ctrl & OTG_B_HNPEN) { + if (isp->otg.gadget->b_hnp_enable) { + isp->otg.state = OTG_STATE_B_WAIT_ACON; + pr_debug(" --> b_wait_acon\n"); + } + goto pulldown; + } +pullup: + set |= OTG1_DP_PULLUP; + clr |= OTG1_DP_PULLDOWN; + break; + case OTG_STATE_A_SUSPEND: + case OTG_STATE_A_PERIPHERAL: + if (otg_ctrl & OTG_PULLUP) + goto pullup; + /* FALLTHROUGH */ + // case OTG_STATE_B_WAIT_ACON: + default: +pulldown: + set |= OTG1_DP_PULLDOWN; + clr |= OTG1_DP_PULLUP; + break; + } + +# define toggle(OTG,ISP) do { \ + if (otg_ctrl & OTG) set |= ISP; \ + else clr |= ISP; \ + } while (0) + + if (!(isp->otg.host)) + otg_ctrl &= ~OTG_DRV_VBUS; + + switch (isp->otg.state) { + case OTG_STATE_A_SUSPEND: + if (otg_ctrl & OTG_DRV_VBUS) { + set |= OTG1_VBUS_DRV; + break; + } + /* HNP failed for some reason (A_AIDL_BDIS timeout) */ + notresponding(isp); + + /* FALLTHROUGH */ + case OTG_STATE_A_VBUS_ERR: + isp->otg.state = OTG_STATE_A_WAIT_VFALL; + pr_debug(" --> a_wait_vfall\n"); + /* FALLTHROUGH */ + case OTG_STATE_A_WAIT_VFALL: + /* FIXME usbcore thinks port power is still on ... */ + clr |= OTG1_VBUS_DRV; + break; + case OTG_STATE_A_IDLE: + if (otg_ctrl & OTG_DRV_VBUS) { + isp->otg.state = OTG_STATE_A_WAIT_VRISE; + pr_debug(" --> a_wait_vrise\n"); + } + /* FALLTHROUGH */ + default: + toggle(OTG_DRV_VBUS, OTG1_VBUS_DRV); + } + + toggle(OTG_PU_VBUS, OTG1_VBUS_CHRG); + toggle(OTG_PD_VBUS, OTG1_VBUS_DISCHRG); + +# undef toggle + + isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, set); + isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, clr); + + /* HNP switch to host or peripheral; and SRP */ + if (otg_change & OTG_PULLUP) { + switch (isp->otg.state) { + case OTG_STATE_B_IDLE: + if (clr & OTG1_DP_PULLUP) + break; + isp->otg.state = OTG_STATE_B_PERIPHERAL; + pr_debug(" --> b_peripheral\n"); + break; + case OTG_STATE_A_SUSPEND: + if (clr & OTG1_DP_PULLUP) + break; + isp->otg.state = OTG_STATE_A_PERIPHERAL; + pr_debug(" --> a_peripheral\n"); + break; + default: + break; + } + OTG_CTRL_REG |= OTG_PULLUP; + } + + check_state(isp, __FUNCTION__); + dump_regs(isp, "otg->isp1301"); +} + +static irqreturn_t omap_otg_irq(int irq, void *_isp, struct pt_regs *regs) +{ + u16 otg_irq = OTG_IRQ_SRC_REG; + u32 otg_ctrl; + int ret = IRQ_NONE; + struct isp1301 *isp = _isp; + + /* update ISP1301 transciever from OTG controller */ + if (otg_irq & OPRT_CHG) { + OTG_IRQ_SRC_REG = OPRT_CHG; + isp1301_defer_work(isp, WORK_UPDATE_ISP); + ret = IRQ_HANDLED; + + /* SRP to become b_peripheral failed */ + } else if (otg_irq & B_SRP_TMROUT) { + pr_debug("otg: B_SRP_TIMEOUT, %06x\n", OTG_CTRL_REG); + notresponding(isp); + + /* gadget drivers that care should monitor all kinds of + * remote wakeup (SRP, normal) using their own timer + * to give "check cable and A-device" messages. + */ + if (isp->otg.state == OTG_STATE_B_SRP_INIT) + b_idle(isp, "srp_timeout"); + + OTG_IRQ_SRC_REG = B_SRP_TMROUT; + ret = IRQ_HANDLED; + + /* HNP to become b_host failed */ + } else if (otg_irq & B_HNP_FAIL) { + pr_debug("otg: %s B_HNP_FAIL, %06x\n", + state_name(isp), OTG_CTRL_REG); + notresponding(isp); + + otg_ctrl = OTG_CTRL_REG; + otg_ctrl |= OTG_BUSDROP; + otg_ctrl &= OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS; + OTG_CTRL_REG = otg_ctrl; + + /* subset of b_peripheral()... */ + isp->otg.state = OTG_STATE_B_PERIPHERAL; + pr_debug(" --> b_peripheral\n"); + + OTG_IRQ_SRC_REG = B_HNP_FAIL; + ret = IRQ_HANDLED; + + /* detect SRP from B-device ... */ + } else if (otg_irq & A_SRP_DETECT) { + pr_debug("otg: %s SRP_DETECT, %06x\n", + state_name(isp), OTG_CTRL_REG); + + isp1301_defer_work(isp, WORK_UPDATE_OTG); + switch (isp->otg.state) { + case OTG_STATE_A_IDLE: + if (!isp->otg.host) + break; + isp1301_defer_work(isp, WORK_HOST_RESUME); + otg_ctrl = OTG_CTRL_REG; + otg_ctrl |= OTG_A_BUSREQ; + otg_ctrl &= ~(OTG_BUSDROP|OTG_B_BUSREQ) + & ~OTG_XCEIV_INPUTS + & OTG_CTRL_MASK; + OTG_CTRL_REG = otg_ctrl; + break; + default: + break; + } + + OTG_IRQ_SRC_REG = A_SRP_DETECT; + ret = IRQ_HANDLED; + + /* timer expired: T(a_wait_bcon) and maybe T(a_wait_vrise) + * we don't track them separately + */ + } else if (otg_irq & A_REQ_TMROUT) { + otg_ctrl = OTG_CTRL_REG; + pr_info("otg: BCON_TMOUT from %s, %06x\n", + state_name(isp), otg_ctrl); + notresponding(isp); + + otg_ctrl |= OTG_BUSDROP; + otg_ctrl &= ~OTG_A_BUSREQ & OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS; + OTG_CTRL_REG = otg_ctrl; + isp->otg.state = OTG_STATE_A_WAIT_VFALL; + + OTG_IRQ_SRC_REG = A_REQ_TMROUT; + ret = IRQ_HANDLED; + + /* A-supplied voltage fell too low; overcurrent */ + } else if (otg_irq & A_VBUS_ERR) { + otg_ctrl = OTG_CTRL_REG; + printk(KERN_ERR "otg: %s, VBUS_ERR %04x ctrl %06x\n", + state_name(isp), otg_irq, otg_ctrl); + + otg_ctrl |= OTG_BUSDROP; + otg_ctrl &= ~OTG_A_BUSREQ & OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS; + OTG_CTRL_REG = otg_ctrl; + isp->otg.state = OTG_STATE_A_VBUS_ERR; + + OTG_IRQ_SRC_REG = A_VBUS_ERR; + ret = IRQ_HANDLED; + + /* switch driver; the transciever code activates it, + * ungating the udc clock or resuming OHCI. + */ + } else if (otg_irq & DRIVER_SWITCH) { + int kick = 0; + + otg_ctrl = OTG_CTRL_REG; + printk(KERN_NOTICE "otg: %s, SWITCH to %s, ctrl %06x\n", + state_name(isp), + (otg_ctrl & OTG_DRIVER_SEL) + ? "gadget" : "host", + otg_ctrl); + isp1301_defer_work(isp, WORK_UPDATE_ISP); + + /* role is peripheral */ + if (otg_ctrl & OTG_DRIVER_SEL) { + switch (isp->otg.state) { + case OTG_STATE_A_IDLE: + b_idle(isp, __FUNCTION__); + break; + default: + break; + } + isp1301_defer_work(isp, WORK_UPDATE_ISP); + + /* role is host */ + } else { + if (!(otg_ctrl & OTG_ID)) { + otg_ctrl &= OTG_CTRL_MASK & ~OTG_XCEIV_INPUTS; + OTG_CTRL_REG = otg_ctrl | OTG_A_BUSREQ; + } + + if (isp->otg.host) { + switch (isp->otg.state) { + case OTG_STATE_B_WAIT_ACON: + isp->otg.state = OTG_STATE_B_HOST; + pr_debug(" --> b_host\n"); + kick = 1; + break; + case OTG_STATE_A_WAIT_BCON: + isp->otg.state = OTG_STATE_A_HOST; + pr_debug(" --> a_host\n"); + break; + case OTG_STATE_A_PERIPHERAL: + isp->otg.state = OTG_STATE_A_WAIT_BCON; + pr_debug(" --> a_wait_bcon\n"); + break; + default: + break; + } + isp1301_defer_work(isp, WORK_HOST_RESUME); + } + } + + OTG_IRQ_SRC_REG = DRIVER_SWITCH; + ret = IRQ_HANDLED; + + if (kick) + usb_bus_start_enum(isp->otg.host, + isp->otg.host->otg_port); + } + + check_state(isp, __FUNCTION__); + return ret; +} + +static struct platform_device *otg_dev; + +static int otg_init(struct isp1301 *isp) +{ + if (!otg_dev) + return -ENODEV; + + dump_regs(isp, __FUNCTION__); + /* some of these values are board-specific... */ + OTG_SYSCON_2_REG |= OTG_EN + /* for B-device: */ + | SRP_GPDATA /* 9msec Bdev D+ pulse */ + | SRP_GPDVBUS /* discharge after VBUS pulse */ + // | (3 << 24) /* 2msec VBUS pulse */ + /* for A-device: */ + | (0 << 20) /* 200ms nominal A_WAIT_VRISE timer */ + | SRP_DPW /* detect 167+ns SRP pulses */ + | SRP_DATA | SRP_VBUS /* accept both kinds of SRP pulse */ + ; + + update_otg1(isp, isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE)); + update_otg2(isp, isp1301_get_u8(isp, ISP1301_OTG_STATUS)); + + check_state(isp, __FUNCTION__); + pr_debug("otg: %s, %s %06x\n", + state_name(isp), __FUNCTION__, OTG_CTRL_REG); + + OTG_IRQ_EN_REG = DRIVER_SWITCH | OPRT_CHG + | B_SRP_TMROUT | B_HNP_FAIL + | A_VBUS_ERR | A_SRP_DETECT | A_REQ_TMROUT; + OTG_SYSCON_2_REG |= OTG_EN; + + return 0; +} + +static int otg_probe(struct device *dev) +{ + // struct omap_usb_config *config = dev->platform_data; + + otg_dev = to_platform_device(dev); + return 0; +} + +static int otg_remove(struct device *dev) +{ + otg_dev = 0; + return 0; +} + +struct device_driver omap_otg_driver = { + .name = "omap_otg", + .bus = &platform_bus_type, + .probe = otg_probe, + .remove = otg_remove, +}; + +static int otg_bind(struct isp1301 *isp) +{ + int status; + + if (otg_dev) + return -EBUSY; + + status = driver_register(&omap_otg_driver); + if (status < 0) + return status; + + if (otg_dev) + status = request_irq(otg_dev->resource[1].start, omap_otg_irq, + SA_INTERRUPT, DRIVER_NAME, isp); + else + status = -ENODEV; + + if (status < 0) + driver_unregister(&omap_otg_driver); + return status; +} + +static void otg_unbind(struct isp1301 *isp) +{ + if (!otg_dev) + return; + free_irq(otg_dev->resource[1].start, isp); +} + +#else + +/* OTG controller isn't clocked */ + +#endif /* CONFIG_USB_OTG */ + +/*-------------------------------------------------------------------------*/ + +static void b_peripheral(struct isp1301 *isp) +{ + enable_vbus_draw(isp, 8); + OTG_CTRL_REG = OTG_CTRL_REG & OTG_XCEIV_OUTPUTS; + usb_gadget_vbus_connect(isp->otg.gadget); + +#ifdef CONFIG_USB_OTG + otg_update_isp(isp); +#else + /* UDC driver just set OTG_BSESSVLD */ + isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLUP); + isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLDOWN); + isp->otg.state = OTG_STATE_B_PERIPHERAL; + pr_debug(" --> b_peripheral\n"); + dump_regs(isp, "2periph"); +#endif +} + +static int isp_update_otg(struct isp1301 *isp, u8 stat) +{ + u8 isp_stat, isp_bstat; + enum usb_otg_state state = isp->otg.state; + + if (stat & INTR_BDIS_ACON) + pr_debug("OTG: BDIS_ACON, %s\n", state_name(isp)); + + /* start certain state transitions right away */ + isp_stat = isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE); + if (isp_stat & INTR_ID_GND) { + if (isp->otg.default_a) { + switch (state) { + case OTG_STATE_B_IDLE: + a_idle(isp, "idle"); + /* FALLTHROUGH */ + case OTG_STATE_A_IDLE: + enable_vbus_source(isp); + /* FALLTHROUGH */ + case OTG_STATE_A_WAIT_VRISE: + /* we skip over OTG_STATE_A_WAIT_BCON, since + * the HC will transition to A_HOST (or + * A_SUSPEND!) without our noticing except + * when HNP is used. + */ + if (isp_stat & INTR_VBUS_VLD) + isp->otg.state = OTG_STATE_A_HOST; + break; + case OTG_STATE_A_WAIT_VFALL: + if (!(isp_stat & INTR_SESS_VLD)) + a_idle(isp, "vfell"); + break; + default: + if (!(isp_stat & INTR_VBUS_VLD)) + isp->otg.state = OTG_STATE_A_VBUS_ERR; + break; + } + isp_bstat = isp1301_get_u8(isp, ISP1301_OTG_STATUS); + } else { + switch (state) { + case OTG_STATE_B_PERIPHERAL: + case OTG_STATE_B_HOST: + case OTG_STATE_B_WAIT_ACON: + usb_gadget_vbus_disconnect(isp->otg.gadget); + break; + default: + break; + } + if (state != OTG_STATE_A_IDLE) + a_idle(isp, "id"); + if (isp->otg.host && state == OTG_STATE_A_IDLE) + isp1301_defer_work(isp, WORK_HOST_RESUME); + isp_bstat = 0; + } + } else { + /* if user unplugged mini-A end of cable, + * don't bypass A_WAIT_VFALL. + */ + if (isp->otg.default_a) { + switch (state) { + default: + isp->otg.state = OTG_STATE_A_WAIT_VFALL; + break; + case OTG_STATE_A_WAIT_VFALL: + state = OTG_STATE_A_IDLE; + /* khubd may take a while to notice and + * handle this disconnect, so don't go + * to B_IDLE quite yet. + */ + break; + case OTG_STATE_A_IDLE: + host_suspend(isp); + isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, + MC1_BDIS_ACON_EN); + isp->otg.state = OTG_STATE_B_IDLE; + OTG_CTRL_REG &= OTG_CTRL_REG & OTG_CTRL_MASK + & ~OTG_CTRL_BITS; + break; + case OTG_STATE_B_IDLE: + break; + } + } + isp_bstat = isp1301_get_u8(isp, ISP1301_OTG_STATUS); + + switch (isp->otg.state) { + case OTG_STATE_B_PERIPHERAL: + case OTG_STATE_B_WAIT_ACON: + case OTG_STATE_B_HOST: + if (likely(isp_bstat & OTG_B_SESS_VLD)) + break; + enable_vbus_draw(isp, 0); +#ifndef CONFIG_USB_OTG + /* UDC driver will clear OTG_BSESSVLD */ + isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, + OTG1_DP_PULLDOWN); + isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, + OTG1_DP_PULLUP); + dump_regs(isp, __FUNCTION__); +#endif + /* FALLTHROUGH */ + case OTG_STATE_B_SRP_INIT: + b_idle(isp, __FUNCTION__); + OTG_CTRL_REG &= OTG_CTRL_REG & OTG_XCEIV_OUTPUTS; + /* FALLTHROUGH */ + case OTG_STATE_B_IDLE: + if (isp->otg.gadget && (isp_bstat & OTG_B_SESS_VLD)) { +#ifdef CONFIG_USB_OTG + update_otg1(isp, isp_stat); + update_otg2(isp, isp_bstat); +#endif + b_peripheral(isp); + } else if (!(isp_stat & (INTR_VBUS_VLD|INTR_SESS_VLD))) + isp_bstat |= OTG_B_SESS_END; + break; + case OTG_STATE_A_WAIT_VFALL: + break; + default: + pr_debug("otg: unsupported b-device %s\n", + state_name(isp)); + break; + } + } + + if (state != isp->otg.state) + pr_debug(" isp, %s -> %s\n", + state_string(state), state_name(isp)); + +#ifdef CONFIG_USB_OTG + /* update the OTG controller state to match the isp1301; may + * trigger OPRT_CHG irqs for changes going to the isp1301. + */ + update_otg1(isp, isp_stat); + update_otg2(isp, isp_bstat); + check_state(isp, __FUNCTION__); +#endif + + dump_regs(isp, "isp1301->otg"); +} + +/*-------------------------------------------------------------------------*/ + +static u8 isp1301_clear_latch(struct isp1301 *isp) +{ + u8 latch = isp1301_get_u8(isp, ISP1301_INTERRUPT_LATCH); + isp1301_clear_bits(isp, ISP1301_INTERRUPT_LATCH, latch); + return latch; +} + +static void +isp1301_work(void *data) +{ + struct isp1301 *isp = data; + int stop; + + /* implicit lock: we're the only task using this device */ + isp->working = 1; + do { + stop = test_bit(WORK_STOP, &isp->todo); + +#ifdef CONFIG_USB_OTG + /* transfer state from otg engine to isp1301 */ + if (test_and_clear_bit(WORK_UPDATE_ISP, &isp->todo)) { + otg_update_isp(isp); + put_device(&isp->client.dev); + } +#endif + /* transfer state from isp1301 to otg engine */ + if (test_and_clear_bit(WORK_UPDATE_OTG, &isp->todo)) { + u8 stat = isp1301_clear_latch(isp); + + isp_update_otg(isp, stat); + put_device(&isp->client.dev); + } + + if (test_and_clear_bit(WORK_HOST_RESUME, &isp->todo)) { + u32 otg_ctrl; + + /* + * skip A_WAIT_VRISE; hc transitions invisibly + * skip A_WAIT_BCON; same. + */ + switch (isp->otg.state) { + case OTG_STATE_A_WAIT_BCON: + case OTG_STATE_A_WAIT_VRISE: + isp->otg.state = OTG_STATE_A_HOST; + pr_debug(" --> a_host\n"); + otg_ctrl = OTG_CTRL_REG; + otg_ctrl |= OTG_A_BUSREQ; + otg_ctrl &= ~(OTG_BUSDROP|OTG_B_BUSREQ) + & OTG_CTRL_MASK; + OTG_CTRL_REG = otg_ctrl; + break; + case OTG_STATE_B_WAIT_ACON: + isp->otg.state = OTG_STATE_B_HOST; + pr_debug(" --> b_host (acon)\n"); + break; + case OTG_STATE_B_HOST: + case OTG_STATE_B_IDLE: + case OTG_STATE_A_IDLE: + break; + default: + pr_debug(" host resume in %s\n", + state_name(isp)); + } + host_resume(isp); + // mdelay(10); + put_device(&isp->client.dev); + } + + if (test_and_clear_bit(WORK_TIMER, &isp->todo)) { +#ifdef VERBOSE + dump_regs(isp, "timer"); + if (!stop) + mod_timer(&isp->timer, jiffies + TIMER_JIFFIES); +#endif + put_device(&isp->client.dev); + } + + if (isp->todo) + dev_vdbg(&isp->client.dev, + "work done, todo = 0x%lx\n", + isp->todo); + if (stop) { + dev_dbg(&isp->client.dev, "stop\n"); + break; + } + } while (isp->todo); + isp->working = 0; +} + +static irqreturn_t isp1301_irq(int irq, void *isp, struct pt_regs *regs) +{ + isp1301_defer_work(isp, WORK_UPDATE_OTG); + return IRQ_HANDLED; +} + +static void isp1301_timer(unsigned long _isp) +{ + isp1301_defer_work((void *)_isp, WORK_TIMER); +} + +/*-------------------------------------------------------------------------*/ + +static void isp1301_release(struct device *dev) +{ + struct isp1301 *isp; + + isp = container_of(dev, struct isp1301, client.dev); + + /* ugly -- i2c hijacks our memory hook to wait_for_completion() */ + if (isp->i2c_release) + isp->i2c_release(dev); + kfree (isp); +} + +static struct isp1301 *the_transceiver; + +static int isp1301_detach_client(struct i2c_client *i2c) +{ + struct isp1301 *isp; + + isp = container_of(i2c, struct isp1301, client); + + isp1301_clear_bits(isp, ISP1301_INTERRUPT_FALLING, ~0); + isp1301_clear_bits(isp, ISP1301_INTERRUPT_RISING, ~0); + free_irq(isp->irq, isp); +#ifdef CONFIG_USB_OTG + otg_unbind(isp); +#endif + if (machine_is_omap_h2()) + omap_free_gpio(2); + + isp->timer.data = 0; + set_bit(WORK_STOP, &isp->todo); + del_timer_sync(&isp->timer); + flush_scheduled_work(); + + put_device(&i2c->dev); + the_transceiver = 0; + + return i2c_detach_client(i2c); +} + +/*-------------------------------------------------------------------------*/ + +/* NOTE: three modes are possible here, only one of which + * will be standards-conformant on any given system: + * + * - OTG mode (dual-role), required if there's a Mini-AB connector + * - HOST mode, for when there's one or more A (host) connectors + * - DEVICE mode, for when there's a B/Mini-B (device) connector + * + * As a rule, you won't have an isp1301 chip unless it's there to + * support the OTG mode. Other modes help testing USB controllers + * in isolation from (full) OTG support, or maybe so later board + * revisions can help to support those feature. + */ + +#ifdef CONFIG_USB_OTG + +static int isp1301_otg_enable(struct isp1301 *isp) +{ + power_up(isp); + otg_init(isp); + + /* NOTE: since we don't change this, this provides + * a few more interrupts than are strictly needed. + */ + isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING, + INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND); + isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING, + INTR_VBUS_VLD | INTR_SESS_VLD | INTR_ID_GND); + + dev_info(&isp->client.dev, "ready for dual-role USB ...\n"); + + return 0; +} + +#endif + +/* add or disable the host device+driver */ +static int +isp1301_set_host(struct otg_transceiver *otg, struct usb_bus *host) +{ + struct isp1301 *isp = container_of(otg, struct isp1301, otg); + + if (!otg || isp != the_transceiver) + return -ENODEV; + + if (!host) { + OTG_IRQ_EN_REG = 0; + power_down(isp); + isp->otg.host = 0; + return 0; + } + +#ifdef CONFIG_USB_OTG + isp->otg.host = host; + dev_dbg(&isp->client.dev, "registered host\n"); + host_suspend(isp); + if (isp->otg.gadget) + return isp1301_otg_enable(isp); + return 0; + +#elif !defined(CONFIG_USB_GADGET_OMAP) + // FIXME update its refcount + isp->otg.host = host; + + power_up(isp); + + if (machine_is_omap_h2()) + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); + + dev_info(&isp->client.dev, "A-Host sessions ok\n"); + isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING, + INTR_ID_GND); + isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING, + INTR_ID_GND); + + /* If this has a Mini-AB connector, this mode is highly + * nonstandard ... but can be handy for testing, especially with + * the Mini-A end of an OTG cable. (Or something nonstandard + * like MiniB-to-StandardB, maybe built with a gender mender.) + */ + isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_VBUS_DRV); + + dump_regs(isp, __FUNCTION__); + + return 0; + +#else + dev_dbg(&isp->client.dev, "host sessions not allowed\n"); + return -EINVAL; +#endif + +} + +static int +isp1301_set_peripheral(struct otg_transceiver *otg, struct usb_gadget *gadget) +{ + struct isp1301 *isp = container_of(otg, struct isp1301, otg); + + if (!otg || isp != the_transceiver) + return -ENODEV; + + if (!gadget) { + OTG_IRQ_EN_REG = 0; + if (!isp->otg.default_a) + enable_vbus_draw(isp, 0); + usb_gadget_vbus_disconnect(isp->otg.gadget); + isp->otg.gadget = 0; + power_down(isp); + return 0; + } + +#ifdef CONFIG_USB_OTG + isp->otg.gadget = gadget; + dev_dbg(&isp->client.dev, "registered gadget\n"); + /* gadget driver may be suspended until vbus_connect () */ + if (isp->otg.host) + return isp1301_otg_enable(isp); + return 0; + +#elif !defined(CONFIG_USB_OHCI_HCD) && !defined(CONFIG_USB_OHCI_HCD_MODULE) + isp->otg.gadget = gadget; + // FIXME update its refcount + + OTG_CTRL_REG = (OTG_CTRL_REG & OTG_CTRL_MASK + & ~(OTG_XCEIV_OUTPUTS|OTG_CTRL_BITS)) + | OTG_ID; + power_up(isp); + isp->otg.state = OTG_STATE_B_IDLE; + + if (machine_is_omap_h2()) + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); + + isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING, + INTR_SESS_VLD); + isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING, + INTR_VBUS_VLD); + dev_info(&isp->client.dev, "B-Peripheral sessions ok\n"); + dump_regs(isp, __FUNCTION__); + + /* If this has a Mini-AB connector, this mode is highly + * nonstandard ... but can be handy for testing, so long + * as you don't plug a Mini-A cable into the jack. + */ + if (isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE) & INTR_VBUS_VLD) + b_peripheral(isp); + + return 0; + +#else + dev_dbg(&isp->client.dev, "peripheral sessions not allowed\n"); + return -EINVAL; +#endif +} + + +/*-------------------------------------------------------------------------*/ + +static int +isp1301_set_power(struct otg_transceiver *dev, unsigned mA) +{ + if (!the_transceiver) + return -ENODEV; + if (dev->state == OTG_STATE_B_PERIPHERAL) + enable_vbus_draw(the_transceiver, mA); + return 0; +} + +static int +isp1301_start_srp(struct otg_transceiver *dev) +{ + struct isp1301 *isp = container_of(dev, struct isp1301, otg); + u32 otg_ctrl; + + if (!dev || isp != the_transceiver + || isp->otg.state != OTG_STATE_B_IDLE) + return -ENODEV; + + otg_ctrl = OTG_CTRL_REG; + if (!(otg_ctrl & OTG_BSESSEND)) + return -EINVAL; + + otg_ctrl |= OTG_B_BUSREQ; + otg_ctrl &= ~OTG_A_BUSREQ & OTG_CTRL_MASK; + OTG_CTRL_REG = otg_ctrl; + isp->otg.state = OTG_STATE_B_SRP_INIT; + + pr_debug("otg: SRP, %s ... %06x\n", state_name(isp), OTG_CTRL_REG); +#ifdef CONFIG_USB_OTG + check_state(isp, __FUNCTION__); +#endif + return 0; +} + +static int +isp1301_start_hnp(struct otg_transceiver *dev) +{ +#ifdef CONFIG_USB_OTG + struct isp1301 *isp = container_of(dev, struct isp1301, otg); + + if (!dev || isp != the_transceiver) + return -ENODEV; + if (isp->otg.default_a && (isp->otg.host == NULL + || !isp->otg.host->b_hnp_enable)) + return -ENOTCONN; + if (!isp->otg.default_a && (isp->otg.gadget == NULL + || !isp->otg.gadget->b_hnp_enable)) + return -ENOTCONN; + + /* We want hardware to manage most HNP protocol timings. + * So do this part as early as possible... + */ + switch (isp->otg.state) { + case OTG_STATE_B_HOST: + isp->otg.state = OTG_STATE_B_PERIPHERAL; + /* caller will suspend next */ + break; + case OTG_STATE_A_HOST: +#if 0 + /* autoconnect mode avoids irq latency bugs */ + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, + MC1_BDIS_ACON_EN); +#endif + /* caller must suspend then clear A_BUSREQ */ + usb_gadget_vbus_connect(isp->otg.gadget); + OTG_CTRL_REG |= OTG_A_SETB_HNPEN; + + break; + case OTG_STATE_A_PERIPHERAL: + /* initiated by B-Host suspend */ + break; + default: + return -EILSEQ; + } + pr_debug("otg: HNP %s, %06x ...\n", + state_name(isp), OTG_CTRL_REG); + check_state(isp, __FUNCTION__); + return 0; +#else + /* srp-only */ + return -EINVAL; +#endif +} + +/*-------------------------------------------------------------------------*/ + +/* no error returns, they'd just make bus scanning stop */ +static int isp1301_probe(struct i2c_adapter *bus, int address, int kind) +{ + int status; + struct isp1301 *isp; + struct i2c_client *i2c; + + if (the_transceiver) + return 0; + + isp = kmalloc(sizeof *isp, GFP_KERNEL); + if (!isp) + return 0; + + memset(isp, 0, sizeof *isp); + + INIT_WORK(&isp->work, isp1301_work, isp); + init_timer(&isp->timer); + isp->timer.function = isp1301_timer; + isp->timer.data = (unsigned long) isp; + + isp->irq = -1; + isp->client.addr = address; + i2c_set_clientdata(&isp->client, isp); + isp->client.adapter = bus; + isp->client.id = 1301; + isp->client.driver = &isp1301_driver; + strlcpy(isp->client.name, DRIVER_NAME, I2C_NAME_SIZE); + i2c = &isp->client; + + /* if this is a true probe, verify the chip ... */ + if (kind < 0) { + status = isp1301_get_u16(isp, ISP1301_VENDOR_ID); + if (status != I2C_VENDOR_ID_PHILIPS) { + dev_dbg(&bus->dev, "addr %d not philips id: %d\n", + address, status); + goto fail1; + } + status = isp1301_get_u16(isp, ISP1301_PRODUCT_ID); + if (status != I2C_PRODUCT_ID_PHILIPS_1301) { + dev_dbg(&bus->dev, "%d not isp1301, %d\n", + address, status); + goto fail1; + } + } + + status = i2c_attach_client(i2c); + if (status < 0) { + dev_dbg(&bus->dev, "can't attach %s to device %d, err %d\n", + DRIVER_NAME, address, status); +fail1: + kfree(isp); + return 0; + } + isp->i2c_release = i2c->dev.release; + i2c->dev.release = isp1301_release; + + /* initial development used chiprev 2.00 */ + status = i2c_smbus_read_word_data(i2c, ISP1301_BCD_DEVICE); + dev_info(&i2c->dev, "chiprev %x.%02x, driver " DRIVER_VERSION "\n", + status >> 8, status & 0xff); + + /* make like power-on reset */ + isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_1, MC1_MASK); + + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, MC2_BI_DI); + isp1301_clear_bits(isp, ISP1301_MODE_CONTROL_2, ~MC2_BI_DI); + + isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, + OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN); + isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, + ~(OTG1_DM_PULLDOWN | OTG1_DP_PULLDOWN)); + + isp1301_clear_bits(isp, ISP1301_INTERRUPT_LATCH, ~0); + isp1301_clear_bits(isp, ISP1301_INTERRUPT_FALLING, ~0); + isp1301_clear_bits(isp, ISP1301_INTERRUPT_RISING, ~0); + +#ifdef CONFIG_USB_OTG + status = otg_bind(isp); + if (status < 0) { + dev_dbg(&i2c->dev, "can't bind OTG\n"); + goto fail2; + } +#endif + + if (machine_is_omap_h2()) { + /* full speed signaling by default */ + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, + MC1_SPEED_REG); + isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, + MC2_SPD_SUSP_CTRL); + + /* IRQ wired at M14 */ + omap_cfg_reg(M14_1510_GPIO2); + isp->irq = OMAP_GPIO_IRQ(2); + omap_request_gpio(2); + omap_set_gpio_direction(2, 1); + omap_set_gpio_edge_ctrl(2, OMAP_GPIO_FALLING_EDGE); + } + + status = request_irq(isp->irq, isp1301_irq, + SA_SAMPLE_RANDOM, DRIVER_NAME, isp); + if (status < 0) { + dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", + isp->irq, status); +#ifdef CONFIG_USB_OTG +fail2: +#endif + i2c_detach_client(i2c); + goto fail1; + } + + isp->otg.dev = &isp->client.dev; + isp->otg.label = DRIVER_NAME; + + isp->otg.set_host = isp1301_set_host, + isp->otg.set_peripheral = isp1301_set_peripheral, + isp->otg.set_power = isp1301_set_power, + isp->otg.start_srp = isp1301_start_srp, + isp->otg.start_hnp = isp1301_start_hnp, + + enable_vbus_draw(isp, 0); + power_down(isp); + the_transceiver = isp; + +#ifdef CONFIG_USB_OTG + update_otg1(isp, isp1301_get_u8(isp, ISP1301_INTERRUPT_SOURCE)); + update_otg2(isp, isp1301_get_u8(isp, ISP1301_OTG_STATUS)); +#endif + + dump_regs(isp, __FUNCTION__); + +#ifdef VERBOSE + mod_timer(&isp->timer, jiffies + TIMER_JIFFIES); + dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES); +#endif + + status = otg_set_transceiver(&isp->otg); + if (status < 0) + dev_err(&i2c->dev, "can't register transceiver, %d\n", + status); + + return 0; +} + +static int isp1301_scan_bus(struct i2c_adapter *bus) +{ + if (!i2c_check_functionality(bus, I2C_FUNC_SMBUS_BYTE_DATA + | I2C_FUNC_SMBUS_READ_WORD_DATA)) + return -EINVAL; + return i2c_probe(bus, &addr_data, isp1301_probe); +} + +static struct i2c_driver isp1301_driver = { + .owner = THIS_MODULE, + .name = "isp1301_omap", + .id = 1301, /* FIXME "official", i2c-ids.h */ + .class = I2C_CLASS_HWMON, + .flags = I2C_DF_NOTIFY, + .attach_adapter = isp1301_scan_bus, + .detach_client = isp1301_detach_client, +}; + +/*-------------------------------------------------------------------------*/ + +static int __init isp_init(void) +{ + return i2c_add_driver(&isp1301_driver); +} +module_init(isp_init); + +static void __exit isp_exit(void) +{ + if (the_transceiver) + otg_set_transceiver(0); + i2c_del_driver(&isp1301_driver); +} +module_exit(isp_exit); + diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c --- a/drivers/i2c/chips/it87.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/i2c/chips/it87.c 2004-09-06 16:37:54 -07:00 @@ -571,9 +571,9 @@ struct it87_data *data = it87_update_device(dev); return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); } -static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL); +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); #define device_create_file_vid(client) \ -device_create_file(&client->dev, &dev_attr_in0_ref) +device_create_file(&client->dev, &dev_attr_cpu0_vid) /* This function is called when: * it87_driver is inserted (when this module is loaded), for each diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c --- a/drivers/i2c/chips/lm78.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/i2c/chips/lm78.c 2004-09-06 16:37:54 -07:00 @@ -423,7 +423,7 @@ struct lm78_data *data = lm78_update_device(dev); return sprintf(buf, "%d\n", VID_FROM_REG(data->vid)); } -static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid, NULL); +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); /* Alarms */ static ssize_t show_alarms(struct device *dev, char *buf) @@ -615,7 +615,7 @@ device_create_file(&new_client->dev, &dev_attr_fan3_min); device_create_file(&new_client->dev, &dev_attr_fan3_div); device_create_file(&new_client->dev, &dev_attr_alarms); - device_create_file(&new_client->dev, &dev_attr_in0_ref); + device_create_file(&new_client->dev, &dev_attr_cpu0_vid); return 0; diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c --- a/drivers/i2c/chips/lm85.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/i2c/chips/lm85.c 2004-09-06 16:37:51 -07:00 @@ -465,7 +465,7 @@ return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); } -static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL); +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); static ssize_t show_vrm_reg(struct device *dev, char *buf) { @@ -874,7 +874,7 @@ device_create_file(&new_client->dev, &dev_attr_temp2_max); device_create_file(&new_client->dev, &dev_attr_temp3_max); device_create_file(&new_client->dev, &dev_attr_vrm); - device_create_file(&new_client->dev, &dev_attr_in0_ref); + device_create_file(&new_client->dev, &dev_attr_cpu0_vid); device_create_file(&new_client->dev, &dev_attr_alarms); return 0; diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c --- a/drivers/i2c/chips/w83627hf.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/i2c/chips/w83627hf.c 2004-09-06 16:37:54 -07:00 @@ -635,9 +635,9 @@ struct w83627hf_data *data = w83627hf_update_device(dev); return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); } -static DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL); +static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); #define device_create_file_vid(client) \ -device_create_file(&client->dev, &dev_attr_in0_ref) +device_create_file(&client->dev, &dev_attr_cpu0_vid) static ssize_t show_vrm_reg(struct device *dev, char *buf) diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c 2004-09-06 16:37:49 -07:00 +++ b/drivers/i2c/chips/w83781d.c 2004-09-06 16:37:49 -07:00 @@ -503,9 +503,9 @@ } static -DEVICE_ATTR(in0_ref, S_IRUGO, show_vid_reg, NULL); +DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); #define device_create_file_vid(client) \ -device_create_file(&client->dev, &dev_attr_in0_ref); +device_create_file(&client->dev, &dev_attr_cpu0_vid); static ssize_t show_vrm_reg(struct device *dev, char *buf) { diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c --- a/drivers/ide/ide-disk.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/ide/ide-disk.c 2004-09-06 16:37:52 -07:00 @@ -1298,7 +1298,7 @@ return 0; } -static int write_cache (ide_drive_t *drive, int arg) +static int write_cache(ide_drive_t *drive, int arg) { ide_task_t args; int err; @@ -1508,7 +1508,7 @@ blk_queue_max_sectors(drive->queue, max_s); } - printk("%s: max request size: %dKiB\n", drive->name, drive->queue->max_sectors / 2); + printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name, drive->queue->max_sectors / 2); /* Extract geometry if we did not already have one for the drive */ if (!drive->cyl || !drive->head || !drive->sect) { @@ -1537,7 +1537,7 @@ /* limit drive capacity to 137GB if LBA48 cannot be used */ if (drive->addressing == 0 && drive->capacity64 > 1ULL << 28) { - printk("%s: cannot use LBA48 - full capacity " + printk(KERN_WARNING "%s: cannot use LBA48 - full capacity " "%llu sectors (%llu MB)\n", drive->name, (unsigned long long)drive->capacity64, sectors_to_MB(drive->capacity64)); @@ -1607,23 +1607,31 @@ if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) drive->wcache = 1; - write_cache(drive, 1); - /* - * decide if we can sanely support flushes and barriers on - * this drive. unfortunately not all drives advertise FLUSH_CACHE - * support even if they support it. So assume FLUSH_CACHE is there - * always. LBA48 drives are newer, so expect it to flag support - * properly. We can safely support FLUSH_CACHE on lba48, if capacity - * doesn't exceed lba28 + * We must avoid issuing commands a drive does not understand + * or we may crash it. We check flush cache is supported. We also + * check we have the LBA48 flush cache if the drive capacity is + * too large. By this time we have trimmed the drive capacity if + * LBA48 is not available so we don't need to recheck that. */ - barrier = 1; + barrier = 0; + if (ide_id_has_flush_cache(id)) + barrier = 1; if (drive->addressing == 1) { + /* Can't issue the correct flush ? */ if (capacity > (1ULL << 28) && !ide_id_has_flush_cache_ext(id)) barrier = 0; } + /* Now we have barrier awareness we can be properly conservative + by default with other drives. We turn off write caching when + barrier is not available. Users can adjust this at runtime if + they need unsafe but fast filesystems. This will reduce the + performance of non cache flush supporting disks but it means + you get the data order guarantees the journalling fs's require */ + + write_cache(drive, barrier); - printk("%s: cache flushes %ssupported\n", + printk(KERN_DEBUG "%s: cache flushes %ssupported\n", drive->name, barrier ? "" : "not "); if (barrier) { blk_queue_ordered(drive->queue, 1); @@ -1809,11 +1817,9 @@ if ((!drive->head || drive->head > 16) && !drive->select.b.lba) { printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n", drive->name, drive->head); - ide_cacheflush_p(drive); - ide_unregister_subdriver(drive); - DRIVER(drive)->busy--; - goto failed; - } + drive->attach = 0; + } else + drive->attach = 1; DRIVER(drive)->busy--; g->minors = 1 << PARTN_BITS; strcpy(g->devfs_name, drive->devfs_name); @@ -1821,7 +1827,6 @@ g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; set_capacity(g, current_capacity(drive)); g->fops = &idedisk_ops; - drive->attach = 1; add_disk(g); return 0; failed: diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c --- a/drivers/ide/ide-probe.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/ide/ide-probe.c 2004-09-06 16:37:53 -07:00 @@ -635,12 +635,11 @@ device_register(&hwif->gendev); } -#ifdef CONFIG_PPC static int wait_hwif_ready(ide_hwif_t *hwif) { int rc; - printk(KERN_INFO "Probing IDE interface %s...\n", hwif->name); + printk(KERN_DEBUG "Probing IDE interface %s...\n", hwif->name); /* Let HW settle down a bit from whatever init state we * come from */ @@ -671,7 +670,6 @@ return rc; } -#endif /* * This routine only knows how to look for drive units 0 and 1 @@ -717,7 +715,6 @@ local_irq_set(flags); -#ifdef CONFIG_PPC /* This is needed on some PPCs and a bunch of BIOS-less embedded * platforms. Typical cases are: * @@ -738,8 +735,7 @@ * BenH. */ if (wait_hwif_ready(hwif)) - printk(KERN_WARNING "%s: Wait for ready failed before probe !\n", hwif->name); -#endif /* CONFIG_PPC */ + printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); /* * Second drive should only exist if first drive was found, @@ -749,6 +745,18 @@ ide_drive_t *drive = &hwif->drives[unit]; drive->dn = (hwif->channel ? 2 : 0) + unit; (void) probe_for_drive(drive); + if (drive->present && hwif->present && unit == 1) { + if (strcmp(hwif->drives[0].id->model, drive->id->model) == 0 && + /* Don't do this for noprobe or non ATA */ + strcmp(drive->id->model, "UNKNOWN") && + /* And beware of confused Maxtor drives that go "M0000000000" + "The SN# is garbage in the ID block..." [Eric] */ + strncmp(drive->id->serial_no, "M0000000000000000000", 20) && + strncmp(hwif->drives[0].id->serial_no, drive->id->serial_no, 20) == 0) { + printk(KERN_WARNING "ide-probe: ignoring undecoded slave\n"); + drive->present = 0; + } + } if (drive->present && !hwif->present) { hwif->present = 1; if (hwif->chipset != ide_4drives || diff -Nru a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c --- a/drivers/ide/ide-tape.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/ide/ide-tape.c 2004-09-06 16:37:51 -07:00 @@ -530,7 +530,6 @@ */ #define IDETAPE_DEBUG_INFO 0 #define IDETAPE_DEBUG_LOG 0 -#define IDETAPE_DEBUG_LOG_VERBOSE 0 #define IDETAPE_DEBUG_BUGS 1 /* @@ -1260,70 +1259,6 @@ */ static idetape_chrdev_t idetape_chrdevs[MAX_HWIFS * MAX_DRIVES]; -#if IDETAPE_DEBUG_LOG_VERBOSE - -/* - * DO NOT REMOVE, BUILDING A VERBOSE DEBUG SCHEME FOR ATAPI - */ - -char *idetape_sense_key_verbose(u8 idetape_sense_key) -{ - switch (idetape_sense_key) { - default: { - char buf[22]; - sprintf(buf, "IDETAPE_SENSE (0x%02x)", idetape_sense_key); - return(buf); - } - - } -} - -char *idetape_command_key_verbose(u8 idetape_command_key) -{ - switch (idetape_command_key) { - case IDETAPE_TEST_UNIT_READY_CMD: - return("TEST_UNIT_READY_CMD"); - case IDETAPE_REWIND_CMD: - return("REWIND_CMD"); - case IDETAPE_REQUEST_SENSE_CMD: - return("REQUEST_SENSE_CMD"); - case IDETAPE_READ_CMD: - return("READ_CMD"); - case IDETAPE_WRITE_CMD: - return("WRITE_CMD"); - case IDETAPE_WRITE_FILEMARK_CMD: - return("WRITE_FILEMARK_CMD"); - case IDETAPE_SPACE_CMD: - return("SPACE_CMD"); - case IDETAPE_INQUIRY_CMD: - return("INQUIRY_CMD"); - case IDETAPE_ERASE_CMD: - return("ERASE_CMD"); - case IDETAPE_MODE_SENSE_CMD: - return("MODE_SENSE_CMD"); - case IDETAPE_MODE_SELECT_CMD: - return("MODE_SELECT_CMD"); - case IDETAPE_LOAD_UNLOAD_CMD: - return("LOAD_UNLOAD_CMD"); - case IDETAPE_PREVENT_CMD: - return("PREVENT_CMD"); - case IDETAPE_LOCATE_CMD: - return("LOCATE_CMD"); - case IDETAPE_READ_POSITION_CMD: - return("READ_POSITION_CMD"); - case IDETAPE_READ_BUFFER_CMD: - return("READ_BUFFER_CMD"); - case IDETAPE_SET_SPEED_CMD: - return("SET_SPEED_CMD"); - default: { - char buf[20]; - sprintf(buf, "CMD (0x%02x)", idetape_command_key); - return(buf); - } - } -} -#endif /* IDETAPE_DEBUG_LOG_VERBOSE */ - /* * Function declarations * @@ -1507,15 +1442,6 @@ "asc = %x, ascq = %x\n", pc->c[0], result->sense_key, result->asc, result->ascq); -#if IDETAPE_DEBUG_LOG_VERBOSE - if (tape->debug_level >= 1) - printk(KERN_INFO "ide-tape: pc = %s, sense key = %x, " - "asc = %x, ascq = %x\n", - idetape_command_key_verbose((byte) pc->c[0]), - result->sense_key, - result->asc, - result->ascq); -#endif /* IDETAPE_DEBUG_LOG_VERBOSE */ #endif /* IDETAPE_DEBUG_LOG */ /* diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c --- a/drivers/ide/ide.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/ide/ide.c 2004-09-06 16:37:51 -07:00 @@ -1348,23 +1348,6 @@ return err; } -int ide_atapi_to_scsi (ide_drive_t *drive, int arg) -{ - if (drive->media == ide_disk) { - drive->scsi = 0; - return 0; - } - - if (DRIVER(drive)->cleanup(drive)) { - drive->scsi = 0; - return 0; - } - - drive->scsi = (u8) arg; - ata_attach(drive); - return 0; -} - void ide_add_generic_settings (ide_drive_t *drive) { /* @@ -1379,8 +1362,6 @@ ide_add_setting(drive, "init_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->init_speed, NULL); ide_add_setting(drive, "current_speed", SETTING_RW, -1, -1, TYPE_BYTE, 0, 70, 1, 1, &drive->current_speed, set_xfer_rate); ide_add_setting(drive, "number", SETTING_RW, -1, -1, TYPE_BYTE, 0, 3, 1, 1, &drive->dn, NULL); - if (drive->media != ide_disk) - ide_add_setting(drive, "ide-scsi", SETTING_RW, -1, HDIO_SET_IDE_SCSI, TYPE_BYTE, 0, 1, 1, 1, &drive->scsi, ide_atapi_to_scsi); } int system_bus_clock (void) diff -Nru a/drivers/ide/legacy/Makefile b/drivers/ide/legacy/Makefile --- a/drivers/ide/legacy/Makefile 2004-09-06 16:37:51 -07:00 +++ b/drivers/ide/legacy/Makefile 2004-09-06 16:37:51 -07:00 @@ -10,6 +10,5 @@ # Last of all obj-$(CONFIG_BLK_DEV_HD) += hd.o -obj-$(CONFIG_BLK_DEV_HD98) += hd98.o EXTRA_CFLAGS := -Idrivers/ide diff -Nru a/drivers/ide/legacy/pdc4030.c b/drivers/ide/legacy/pdc4030.c --- a/drivers/ide/legacy/pdc4030.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/ide/legacy/pdc4030.c 2004-09-06 16:37:52 -07:00 @@ -354,15 +354,6 @@ (unsigned long)rq->nr_sectors - nsect); #endif /* DEBUG_READ */ -#ifdef CONFIG_IDE_TASKFILE_IO - task_bio_sectors(drive, rq, nsect, IDE_PIO_IN); - - /* FIXME: can we check status after transfer on pdc4030? */ - /* Complete previously submitted bios. */ - while (rq->bio != rq->cbio) - if (!DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio))) - return ide_stopped; -#else /* CONFIG_IDE_TASKFILE_IO */ HWIF(drive)->ata_input_data(drive, rq->buffer, nsect * SECTOR_WORDS); rq->buffer += nsect<<9; rq->sector += nsect; @@ -370,7 +361,6 @@ rq->nr_sectors -= nsect; if (!rq->current_nr_sectors) DRIVER(drive)->end_request(drive, 1, 0); -#endif /* CONFIG_IDE_TASKFILE_IO */ /* * Now the data has been read in, do the following: @@ -421,12 +411,8 @@ static ide_startstop_t promise_complete_pollfunc(ide_drive_t *drive) { ide_hwgroup_t *hwgroup = HWGROUP(drive); -#ifdef CONFIG_IDE_TASKFILE_IO - struct request *rq = hwgroup->rq; -#else struct request *rq = &hwgroup->wrq; struct bio *bio = rq->bio; -#endif if ((HWIF(drive)->INB(IDE_STATUS_REG)) & BUSY_STAT) { if (time_before(jiffies, hwgroup->poll_timeout)) { @@ -450,15 +436,10 @@ printk(KERN_DEBUG "%s: Write complete - end_request\n", drive->name); #endif /* DEBUG_WRITE */ -#ifdef CONFIG_IDE_TASKFILE_IO - /* Complete previously submitted bios. */ - while (rq->bio != rq->cbio) - (void) DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio)); -#else bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments; rq = hwgroup->rq; DRIVER(drive)->end_request(drive, 1, rq->hard_nr_sectors); -#endif + return ide_stopped; } @@ -466,27 +447,6 @@ * promise_multwrite() transfers a block of up to mcount sectors of data * to a drive as part of a disk multiple-sector write operation. */ -#ifdef CONFIG_IDE_TASKFILE_IO -static void promise_multwrite (ide_drive_t *drive, unsigned int msect) -{ - struct request* rq = HWGROUP(drive)->rq; - unsigned int nsect; - - rq->errors = 0; - do { - nsect = rq->current_nr_sectors; - if (nsect > msect) - nsect = msect; - - task_bio_sectors(drive, rq, nsect, IDE_PIO_OUT); - - if (!rq->nr_sectors) - msect = 0; - else - msect -= nsect; - } while (msect); -} -#else /* CONFIG_IDE_TASKFILE_IO */ static void promise_multwrite (ide_drive_t *drive, unsigned int mcount) { ide_hwgroup_t *hwgroup = HWGROUP(drive); @@ -537,7 +497,6 @@ taskfile_output_data(drive, buffer, nsect<<7); } while (mcount); } -#endif /* * promise_write_pollfunc() is the handler for disk write completion polling. @@ -545,12 +504,8 @@ static ide_startstop_t promise_write_pollfunc (ide_drive_t *drive) { ide_hwgroup_t *hwgroup = HWGROUP(drive); -#ifdef CONFIG_IDE_TASKFILE_IO - struct request *rq = hwgroup->rq; -#else struct request *rq = &hwgroup->wrq; struct bio *bio = rq->bio; -#endif if (HWIF(drive)->INB(IDE_NSECTOR_REG) != 0) { if (time_before(jiffies, hwgroup->poll_timeout)) { @@ -564,19 +519,11 @@ } hwgroup->poll_timeout = 0; printk(KERN_ERR "%s: write timed-out!\n",drive->name); -#ifndef CONFIG_IDE_TASKFILE_IO bio->bi_idx = bio->bi_vcnt - rq->nr_cbio_segments; -#endif return DRIVER(drive)->error(drive, "write timeout", HWIF(drive)->INB(IDE_STATUS_REG)); } -#ifdef CONFIG_IDE_TASKFILE_IO - /* Complete previously submitted bios. */ - while (rq->bio != rq->cbio) - (void) DRIVER(drive)->end_request(drive, 1, bio_sectors(rq->bio)); -#endif - /* * Now write out last 4 sectors and poll for not BUSY */ @@ -602,11 +549,7 @@ static ide_startstop_t promise_write (ide_drive_t *drive) { ide_hwgroup_t *hwgroup = HWGROUP(drive); -#ifdef CONFIG_IDE_TASKFILE_IO - struct request *rq = hwgroup->rq; -#else struct request *rq = &hwgroup->wrq; -#endif #ifdef DEBUG_WRITE printk(KERN_DEBUG "%s: %s: sectors(%lu-%lu)\n", @@ -654,39 +597,14 @@ * already set up. It issues a READ or WRITE command to the Promise * controller, assuming LBA has been used to set up the block number. */ -#ifndef CONFIG_IDE_TASKFILE_IO ide_startstop_t do_pdc4030_io (ide_drive_t *drive, struct request *rq) { ide_startstop_t startstop; unsigned long timeout; u8 stat = 0; -#else -static ide_startstop_t do_pdc4030_io (ide_drive_t *drive, ide_task_t *task) -{ - struct request *rq = HWGROUP(drive)->rq; - task_struct_t *taskfile = (task_struct_t *) task->tfRegister; - ide_startstop_t startstop; - unsigned long timeout; - u8 stat = 0; - - if (IDE_CONTROL_REG) - HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG); /* clear nIEN */ - SELECT_MASK(drive, 0); - HWIF(drive)->OUTB(taskfile->feature, IDE_FEATURE_REG); - HWIF(drive)->OUTB(taskfile->sector_count, IDE_NSECTOR_REG); - /* refers to number of sectors to transfer */ - HWIF(drive)->OUTB(taskfile->sector_number, IDE_SECTOR_REG); - /* refers to sector offset or start sector */ - HWIF(drive)->OUTB(taskfile->low_cylinder, IDE_LCYL_REG); - HWIF(drive)->OUTB(taskfile->high_cylinder, IDE_HCYL_REG); - HWIF(drive)->OUTB(taskfile->device_head, IDE_SELECT_REG); - HWIF(drive)->OUTB(taskfile->command, IDE_COMMAND_REG); -#endif if (rq_data_dir(rq) == READ) { -#ifndef CONFIG_IDE_TASKFILE_IO HWIF(drive)->OUTB(PROMISE_READ, IDE_COMMAND_REG); -#endif /* * The card's behaviour is odd at this point. If the data is * available, DRQ will be true, and no interrupt will be @@ -722,9 +640,7 @@ "waiting - Odd!\n", drive->name); return ide_stopped; } else { -#ifndef CONFIG_IDE_TASKFILE_IO HWIF(drive)->OUTB(PROMISE_WRITE, IDE_COMMAND_REG); -#endif if (ide_wait_stat(&startstop, drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) { printk(KERN_ERR "%s: no DRQ after issuing " @@ -733,9 +649,7 @@ } if (!drive->unmask) local_irq_disable(); -#ifndef CONFIG_IDE_TASKFILE_IO HWGROUP(drive)->wrq = *rq; /* scratchpad */ -#endif return promise_write(drive); } } @@ -749,14 +663,9 @@ */ ide_hwif_t *hwif = HWIF(drive); int drive_number = (hwif->channel << 1) + drive->select.b.unit; -#ifdef CONFIG_IDE_TASKFILE_IO - struct hd_drive_task_hdr taskfile; - ide_task_t args; -#endif BUG_ON(rq->nr_sectors > 127); -#ifndef CONFIG_IDE_TASKFILE_IO if (IDE_CONTROL_REG) hwif->OUTB(drive->ctl, IDE_CONTROL_REG); hwif->OUTB(drive_number, IDE_FEATURE_REG); @@ -767,27 +676,4 @@ hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG); return do_pdc4030_io(drive, rq); -#else /* !CONFIG_IDE_TASKFILE_IO */ - memset(&taskfile, 0, sizeof(struct hd_drive_task_hdr)); - - taskfile.feature = drive_number; - taskfile.sector_count = rq->nr_sectors; - taskfile.sector_number = block; - taskfile.low_cylinder = (block>>=8); - taskfile.high_cylinder = (block>>=8); - taskfile.device_head = ((block>>8)&0x0f)|drive->select.all; - taskfile.command = (rq->cmd==READ)?PROMISE_READ:PROMISE_WRITE; - - memcpy(args.tfRegister, &taskfile, sizeof(struct hd_drive_task_hdr)); - memset(args.hobRegister, 0, sizeof(struct hd_drive_hob_hdr)); - /* - * Setup the bits of args that we do need. - * Note that we don't use the generic interrupt handlers. - */ - args.handler = NULL; - args.rq = (struct request *) rq; - rq->special = (ide_task_t *)&args; - - return do_pdc4030_io(drive, &args); -#endif /* !CONFIG_IDE_TASKFILE_IO */ } diff -Nru a/drivers/ide/legacy/qd65xx.h b/drivers/ide/legacy/qd65xx.h --- a/drivers/ide/legacy/qd65xx.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/ide/legacy/qd65xx.h 2004-09-06 16:37:55 -07:00 @@ -47,10 +47,10 @@ /* Drive specific timing taken from DOS driver v3.7 */ struct qd65xx_timing_s { - char offset; /* ofset from the beginning of Model Number" */ + s8 offset; /* ofset from the beginning of Model Number" */ char model[4]; /* 4 chars from Model number, no conversion */ - short active; /* active time */ - short recovery; /* recovery time */ + s16 active; /* active time */ + s16 recovery; /* recovery time */ } qd65xx_timing [] = { { 30, "2040", 110, 225 }, /* Conner CP30204 */ { 30, "2045", 135, 225 }, /* Conner CP30254 */ diff -Nru a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c --- a/drivers/ide/pci/cs5520.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/ide/pci/cs5520.c 2004-09-06 16:37:50 -07:00 @@ -290,7 +290,10 @@ return 1; } pci_set_master(dev); - pci_set_dma_mask(dev, 0xFFFFFFFF); + if (pci_set_dma_mask(dev, 0xFFFFFFFF)) { + printk(KERN_WARNING "cs5520: No suitable DMA available.\n"); + return -ENODEV; + } init_chipset_cs5520(dev, d->name); index.all = 0xf0f0; diff -Nru a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig --- a/drivers/input/serio/Kconfig 2004-09-06 16:37:53 -07:00 +++ b/drivers/input/serio/Kconfig 2004-09-06 16:37:53 -07:00 @@ -20,7 +20,7 @@ tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 default y select SERIO - depends on !PARISC + depends on !PARISC && (!ARM || ARCH_SHARK || ARCH_EBSA285) ---help--- i8042 is the chip over which the standard AT keyboard and PS/2 mouse are connected to the computer. If you use these devices, diff -Nru a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c --- a/drivers/input/serio/gscps2.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/input/serio/gscps2.c 2004-09-06 16:37:55 -07:00 @@ -6,7 +6,7 @@ * Copyright (c) 2002 Thibaut Varene * * Pieces of code based on linux-2.4's hp_mouse.c & hp_keyb.c - * Copyright (c) 1999 Alex deVries + * Copyright (c) 1999 Alex deVries * Copyright (c) 1999-2000 Philipp Rumpf * Copyright (c) 2000 Xavier Debacker * Copyright (c) 2000-2001 Thomas Marteau diff -Nru a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c --- a/drivers/isdn/capi/capidrv.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/capi/capidrv.c 2004-09-06 16:37:52 -07:00 @@ -512,7 +512,8 @@ len = CAPIMSG_LEN(cmsg->buf); skb = alloc_skb(len, GFP_ATOMIC); memcpy(skb_put(skb, len), cmsg->buf, len); - capi20_put_message(&global.ap, skb); + if (capi20_put_message(&global.ap, skb) != CAPI_NOERROR) + kfree_skb(skb); } /* -------- state machine -------------------------------------------- */ diff -Nru a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c --- a/drivers/isdn/hardware/avm/b1.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hardware/avm/b1.c 2004-09-06 16:37:54 -07:00 @@ -389,7 +389,7 @@ CAPIMSG_NCCI(skb->data), CAPIMSG_MSGID(skb->data)); if (retval != CAPI_NOERROR) - goto out; + return retval; dlen = CAPIMSG_DATALEN(skb->data); @@ -399,16 +399,14 @@ b1_put_slice(port, skb->data + len, dlen); spin_unlock_irqrestore(&card->lock, flags); } else { - retval = CAPI_NOERROR; - spin_lock_irqsave(&card->lock, flags); b1_put_byte(port, SEND_MESSAGE); b1_put_slice(port, skb->data, len); spin_unlock_irqrestore(&card->lock, flags); } - out: + dev_kfree_skb_any(skb); - return retval; + return CAPI_NOERROR; } /* ------------------------------------------------------------- */ diff -Nru a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c --- a/drivers/isdn/hardware/avm/b1dma.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hardware/avm/b1dma.c 2004-09-06 16:37:54 -07:00 @@ -839,8 +839,6 @@ } if (retval == CAPI_NOERROR) b1dma_queue_tx(card, skb); - else - dev_kfree_skb_any(skb); return retval; } diff -Nru a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c --- a/drivers/isdn/hardware/avm/c4.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/avm/c4.c 2004-09-06 16:37:53 -07:00 @@ -1029,8 +1029,6 @@ spin_lock_irqsave(&card->lock, flags); c4_dispatch_tx(card); spin_unlock_irqrestore(&card->lock, flags); - } else { - dev_kfree_skb_any(skb); } return retval; } diff -Nru a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c --- a/drivers/isdn/hardware/avm/t1isa.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/avm/t1isa.c 2004-09-06 16:37:53 -07:00 @@ -472,7 +472,7 @@ CAPIMSG_NCCI(skb->data), CAPIMSG_MSGID(skb->data)); if (retval != CAPI_NOERROR) - goto out; + return retval; dlen = CAPIMSG_DATALEN(skb->data); @@ -482,16 +482,15 @@ t1_put_slice(port, skb->data + len, dlen); spin_unlock_irqrestore(&card->lock, flags); } else { - retval = CAPI_NOERROR; spin_lock_irqsave(&card->lock, flags); b1_put_byte(port, SEND_MESSAGE); t1_put_slice(port, skb->data, len); spin_unlock_irqrestore(&card->lock, flags); } - out: + dev_kfree_skb_any(skb); - return retval; + return CAPI_NOERROR; } /* ------------------------------------------------------------- */ diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c --- a/drivers/isdn/hardware/eicon/capifunc.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hardware/eicon/capifunc.c 2004-09-06 16:37:54 -07:00 @@ -1,4 +1,4 @@ -/* $Id: capifunc.c,v 1.61.4.2 2004/05/05 16:09:25 armin Exp $ +/* $Id: capifunc.c,v 1.61.4.5 2004/08/27 20:10:12 armin Exp $ * * ISDN interface module for Eicon active cards DIVA. * CAPI Interface common functions @@ -998,7 +998,8 @@ write_end: diva_os_leave_spin_lock(&api_lock, &old_irql, "send message"); - diva_os_free_message_buffer(dmb); + if (retval == CAPI_NOERROR) + diva_os_free_message_buffer(dmb); return retval; } diff -Nru a/drivers/isdn/hardware/eicon/capifunc.h b/drivers/isdn/hardware/eicon/capifunc.h --- a/drivers/isdn/hardware/eicon/capifunc.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hardware/eicon/capifunc.h 2004-09-06 16:37:54 -07:00 @@ -1,4 +1,4 @@ -/* $Id: capifunc.h,v 1.11 2004/03/20 17:19:58 armin Exp $ +/* $Id: capifunc.h,v 1.11.4.1 2004/08/28 20:03:53 armin Exp $ * * ISDN interface module for Eicon active cards DIVA. * CAPI Interface common functions @@ -12,8 +12,6 @@ #ifndef __CAPIFUNC_H__ #define __CAPIFUNC_H__ - -#define MAX_DESCRIPTORS 32 #define DRRELMAJOR 2 #define DRRELMINOR 0 diff -Nru a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c --- a/drivers/isdn/hardware/eicon/debug.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/eicon/debug.c 2004-09-06 16:37:53 -07:00 @@ -5,6 +5,7 @@ #include "divasync.h" #include "kst_ifc.h" #include "maintidi.h" +#include "man_defs.h" /* LOCALS @@ -13,17 +14,23 @@ static void DI_register (void *arg); static void DI_deregister (pDbgHandle hDbg); -static void DI_format (int do_lock, word id, int type, char *format, va_list ap); +static void DI_format (int do_lock, word id, int type, char *format, va_list argument_list); static void DI_format_locked (word id, int type, char *format, va_list argument_list); static void DI_format_old (word id, char *format, va_list ap) { } -static void DiProcessEventLog (word id, dword msgID, va_list ap) { } +static void DiProcessEventLog (unsigned short id, unsigned long msgID, va_list ap) { } static void single_p (byte * P, word * PLength, byte Id); static void diva_maint_xdi_cb (ENTITY* e); static word SuperTraceCreateReadReq (byte* P, const char* path); +static int diva_mnt_cmp_nmbr (const char* nmbr); +static void diva_free_dma_descriptor (IDI_CALL request, int nr); +static int diva_get_dma_descriptor (IDI_CALL request, dword *dma_magic); void diva_mnt_internal_dprintf (dword drv_id, dword type, char* p, ...); static dword MaxDumpSize = 256 ; static dword MaxXlogSize = 2 + 128 ; +static char TraceFilter[DIVA_MAX_SELECTIVE_FILTER_LENGTH+1]; +static int TraceFilterIdent = -1; +static int TraceFilterChannel = -1; typedef struct _diva_maint_client { dword sec; @@ -40,9 +47,10 @@ BUFFERS XData; char xbuffer[2048+512]; byte* pmem; - int request_pending; + int request_pending; + int dma_handle; } diva_maint_client_t; -static diva_maint_client_t clients[64]; +static diva_maint_client_t clients[MAX_DESCRIPTORS]; static void diva_change_management_debug_mask (diva_maint_client_t* pC, dword old_mask); @@ -201,6 +209,10 @@ return (-1); } + TraceFilter[0] = 0; + TraceFilterIdent = -1; + TraceFilterChannel = -1; + dbg_base = base; diva_os_get_time (&start_sec, &start_usec); @@ -249,7 +261,6 @@ return (-1); } - return (0); } @@ -302,16 +313,16 @@ diva_os_spin_lock_magic_t* old_irql) { diva_dbg_entry_head_t* pmsg = NULL; - diva_os_enter_spin_lock_hard (&dbg_q_lock, old_irql, "read"); + diva_os_enter_spin_lock (&dbg_q_lock, old_irql, "read"); if (dbg_q_busy) { - diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_busy"); + diva_os_leave_spin_lock (&dbg_q_lock, old_irql, "read_busy"); return NULL; } dbg_q_busy = 1; if (!(pmsg = (diva_dbg_entry_head_t*)queuePeekMsg (dbg_queue, size))) { dbg_q_busy = 0; - diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_empty"); + diva_os_leave_spin_lock (&dbg_q_lock, old_irql, "read_empty"); } return (pmsg); @@ -330,7 +341,7 @@ queueFreeMsg (dbg_queue); } dbg_q_busy = 0; - diva_os_leave_spin_lock_hard (&dbg_q_lock, old_irql, "read_ack"); + diva_os_leave_spin_lock (&dbg_q_lock, old_irql, "read_ack"); } @@ -378,14 +389,14 @@ return ; } - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register"); for (id = 1; id < (sizeof(clients)/sizeof(clients[0])); id++) { if (clients[id].hDbg == hDbg) { /* driver already registered */ - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); return; } if (clients[id].hDbg) { /* slot is busy */ @@ -468,7 +479,7 @@ } } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); } static void DI_deregister (pDbgHandle hDbg) { @@ -480,8 +491,8 @@ diva_os_get_time (&sec, &usec); - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "read"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "read"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read"); for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { if (clients[i].hDbg == hDbg) { @@ -543,8 +554,8 @@ } } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "read_ack"); - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "read_ack"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "read_ack"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "read_ack"); if (pmem) { diva_os_free (0, pmem); @@ -572,13 +583,22 @@ char *data; unsigned short code; - if (!format) + if (diva_os_in_irq()) { + dbg_sequence++; return; + } + + if ((!format) || + ((TraceFilter[0] != 0) && ((TraceFilterIdent < 0) || (TraceFilterChannel < 0)))) { + return; + } + + diva_os_get_time (&sec, &usec); if (do_lock) { - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "format"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "format"); } switch (type) { @@ -703,7 +723,7 @@ } if (do_lock) { - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "format"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "format"); } } @@ -720,7 +740,7 @@ return (-1); } - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "driver info"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "driver info"); if (clients[id].hDbg) { *p++ = 1; @@ -757,7 +777,7 @@ } *p++ = 0; - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "driver info"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "driver info"); return (p - data); } @@ -769,7 +789,7 @@ if (!data || !id || (id >= (sizeof(clients)/sizeof(clients[0])))) { return (-1); } - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "driver info"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "driver info"); if (clients[id].hDbg) { ret = 4; @@ -779,7 +799,7 @@ *data++= (byte)(clients[id].hDbg->dbgMask >> 24); } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "driver info"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "driver info"); return (ret); } @@ -793,8 +813,8 @@ return (-1); } - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "dbg mask"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "dbg mask"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "dbg mask"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "dbg mask"); if (clients[id].hDbg) { dword old_mask = clients[id].hDbg->dbgMask; @@ -806,14 +826,14 @@ } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "dbg mask"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "dbg mask"); if (clients[id].request_pending) { clients[id].request_pending = 0; (*(clients[id].request))((ENTITY*)(*(clients[id].pIdiLib->DivaSTraceGetHandle))(clients[id].pIdiLib->hLib)); } - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "dbg mask"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "dbg mask"); return (ret); } @@ -851,12 +871,12 @@ diva_os_get_time (&sec, &usec); diva_get_idi_adapter_info (d->request, &serial, &logical); if (serial & 0xff000000) { - sprintf (tmp, "ADAPTER:%d SN:%d-%d", + sprintf (tmp, "ADAPTER:%d SN:%u-%d", (int)logical, serial & 0x00ffffff, (byte)(((serial & 0xff000000) >> 24) + 1)); } else { - sprintf (tmp, "ADAPTER:%d SN:%d", (int)logical, serial); + sprintf (tmp, "ADAPTER:%d SN:%u", (int)logical, serial); } if (!(pmem = diva_os_malloc (0, DivaSTraceGetMemotyRequirement (d->channels)))) { @@ -864,13 +884,14 @@ } memset (pmem, 0x00, DivaSTraceGetMemotyRequirement (d->channels)); - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "register"); for (id = 1; id < (sizeof(clients)/sizeof(clients[0])); id++) { if (clients[id].hDbg && (clients[id].request == d->request)) { - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_free(0, pmem); return; } if (clients[id].hDbg) { /* slot is busy */ @@ -891,8 +912,8 @@ } if (free_id < 0) { - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); diva_os_free (0, pmem); return; } @@ -908,6 +929,7 @@ clients[id].Dbg.drvTag[0] = 0; clients[id].logical = (int)logical; clients[id].channels = (int)d->channels; + clients[id].dma_handle = -1; clients[id].Dbg.dbgMask = 0; clients[id].dbgMask = clients[id].Dbg.dbgMask; @@ -949,8 +971,8 @@ clients[id].request = NULL; clients[id].request_pending = 0; clients[id].hDbg = NULL; - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); diva_os_free (0, pmem); return; } @@ -988,14 +1010,14 @@ org_mask = clients[id].Dbg.dbgMask; clients[id].Dbg.dbgMask = 0; - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "register"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "register"); if (clients[id].request_pending) { clients[id].request_pending = 0; (*(clients[id].request))((ENTITY*)(*(clients[id].pIdiLib->DivaSTraceGetHandle))(clients[id].pIdiLib->hLib)); } - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "register"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "register"); diva_set_driver_dbg_mask (id, org_mask); } @@ -1012,8 +1034,8 @@ diva_os_get_time (&sec, &usec); - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "read"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "read"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "read"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read"); for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { if (clients[i].hDbg && (clients[i].request == d->request)) { @@ -1030,8 +1052,15 @@ } clients[i].hDbg = NULL; - clients[i].request = NULL; clients[i].request_pending = 0; + if (clients[i].dma_handle >= 0) { + /* + Free DMA handle + */ + diva_free_dma_descriptor (clients[i].request, clients[i].dma_handle); + clients[i].dma_handle = -1; + } + clients[i].request = NULL; /* Log driver register, MAINT driver ID is '0' @@ -1069,8 +1098,8 @@ } } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "read_ack"); - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "read_ack"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "read_ack"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "read_ack"); if (pmem) { diva_os_free (0, pmem); @@ -1142,6 +1171,42 @@ if (pC && pC->pIdiLib && pC->request) { ENTITY* e = (ENTITY*)(*(pC->pIdiLib->DivaSTraceGetHandle))(pC->pIdiLib->hLib); + IDI_SYNC_REQ* preq; + char buffer[((sizeof(preq->xdi_extended_features)+4) > sizeof(ENTITY)) ? (sizeof(preq->xdi_extended_features)+4) : sizeof(ENTITY)]; + char features[4]; + word assign_data_length = 1; + + features[0] = 0; + pC->xbuffer[0] = 0; + preq = (IDI_SYNC_REQ*)&buffer[0]; + preq->xdi_extended_features.Req = 0; + preq->xdi_extended_features.Rc = IDI_SYNC_REQ_XDI_GET_EXTENDED_FEATURES; + preq->xdi_extended_features.info.buffer_length_in_bytes = sizeof(features); + preq->xdi_extended_features.info.features = &features[0]; + + (*(pC->request))((ENTITY*)preq); + + if ((features[0] & DIVA_XDI_EXTENDED_FEATURES_VALID) && + (features[0] & DIVA_XDI_EXTENDED_FEATURE_MANAGEMENT_DMA)) { + dword rx_dma_magic; + if ((pC->dma_handle = diva_get_dma_descriptor (pC->request, &rx_dma_magic)) >= 0) { + pC->xbuffer[0] = LLI; + pC->xbuffer[1] = 8; + pC->xbuffer[2] = 0x40; + pC->xbuffer[3] = (byte)pC->dma_handle; + pC->xbuffer[4] = (byte)rx_dma_magic; + pC->xbuffer[5] = (byte)(rx_dma_magic >> 8); + pC->xbuffer[6] = (byte)(rx_dma_magic >> 16); + pC->xbuffer[7] = (byte)(rx_dma_magic >> 24); + pC->xbuffer[8] = (byte)DIVA_MAX_MANAGEMENT_TRANSFER_SIZE; + pC->xbuffer[9] = (byte)(DIVA_MAX_MANAGEMENT_TRANSFER_SIZE >> 8); + pC->xbuffer[10] = 0; + + assign_data_length = 11; + } + } else { + pC->dma_handle = -1; + } e->Id = MAN_ID; e->callback = diva_maint_xdi_cb; @@ -1149,9 +1214,8 @@ e->X = &pC->XData; e->Req = ASSIGN; e->ReqCh = 0; - e->X->PLength = 1; + e->X->PLength = assign_data_length; e->X->P = (byte*)&pC->xbuffer[0]; - pC->xbuffer[0] = 0; pC->request_pending = 1; @@ -1300,16 +1364,25 @@ diva_os_spin_lock_magic_t old_irql, old_irql1; - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "xdi_cb"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "xdi_cb"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "xdi_cb"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "xdi_cb"); pC = (diva_maint_client_t*)pLib->hAdapter; - if ((*(pLib->instance.DivaSTraceMessageInput))(&pLib->instance)) { - diva_mnt_internal_dprintf (0, DLI_ERR, "Trace internal library error"); + if ((e->complete == 255) || (pC->dma_handle < 0)) { + if ((*(pLib->instance.DivaSTraceMessageInput))(&pLib->instance)) { + diva_mnt_internal_dprintf (0, DLI_ERR, "Trace internal library error"); + } + } else { + /* + Process combined management interface indication + */ + if ((*(pLib->instance.DivaSTraceMessageInput))(&pLib->instance)) { + diva_mnt_internal_dprintf (0, DLI_ERR, "Trace internal library error (DMA mode)"); + } } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "xdi_cb"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "xdi_cb"); if (pC->request_pending) { @@ -1317,7 +1390,7 @@ (*(pC->request))(e); } - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "xdi_cb"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "xdi_cb"); } @@ -1365,8 +1438,42 @@ } switch (notify_subject) { - case DIVA_SUPER_TRACE_NOTIFY_LINE_CHANGE: - if (pC->hDbg->dbgMask & DIVA_MGT_DBG_LINE_EVENTS) { + case DIVA_SUPER_TRACE_NOTIFY_LINE_CHANGE: { + int view = (TraceFilter[0] == 0); + /* + Process selective Trace + */ + if (channel->Line[0] == 'I' && channel->Line[1] == 'd' && + channel->Line[2] == 'l' && channel->Line[3] == 'e') { + if ((TraceFilterIdent == pC->hDbg->id) && (TraceFilterChannel == (int)channel->ChannelNumber)) { + (*(hLib->DivaSTraceSetBChannel))(hLib, (int)channel->ChannelNumber, 0); + (*(hLib->DivaSTraceSetAudioTap))(hLib, (int)channel->ChannelNumber, 0); + diva_mnt_internal_dprintf (pC->hDbg->id, DLI_LOG, "Selective Trace OFF for Ch=%d", + (int)channel->ChannelNumber); + TraceFilterIdent = -1; + TraceFilterChannel = -1; + view = 1; + } + } else if (TraceFilter[0] && (TraceFilterIdent < 0) && !(diva_mnt_cmp_nmbr (&channel->RemoteAddress[0]) && + diva_mnt_cmp_nmbr (&channel->LocalAddress[0]))) { + + if ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0) { /* Activate B-channel trace */ + (*(hLib->DivaSTraceSetBChannel))(hLib, (int)channel->ChannelNumber, 1); + } + if ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0) { /* Activate AudioTap Trace */ + (*(hLib->DivaSTraceSetAudioTap))(hLib, (int)channel->ChannelNumber, 1); + } + + TraceFilterIdent = pC->hDbg->id; + TraceFilterChannel = (int)channel->ChannelNumber; + + if (TraceFilterIdent >= 0) { + diva_mnt_internal_dprintf (pC->hDbg->id, DLI_LOG, "Selective Trace ON for Ch=%d", + (int)channel->ChannelNumber); + view = 1; + } + } + if (view && (pC->hDbg->dbgMask & DIVA_MGT_DBG_LINE_EVENTS)) { diva_mnt_internal_dprintf (pC->hDbg->id, DLI_STAT, "L Ch = %d", (int)channel->ChannelNumber); diva_mnt_internal_dprintf (pC->hDbg->id, DLI_STAT, "L Status = <%s>", &channel->Line[0]); @@ -1392,10 +1499,26 @@ channel->LastDisconnecCause); diva_mnt_internal_dprintf (pC->hDbg->id, DLI_STAT, "L Owner = <%s>", &channel->UserID[0]); } - break; + + } break; case DIVA_SUPER_TRACE_NOTIFY_MODEM_CHANGE: if (pC->hDbg->dbgMask & DIVA_MGT_DBG_MDM_PROGRESS) { + { + int ch = TraceFilterChannel; + int id = TraceFilterIdent; + + if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && + (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { + if (ch != (int)modem->ChannelNumber) { + break; + } + } else if (TraceFilter[0] != 0) { + break; + } + } + + diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Ch = %lu", (int)modem->ChannelNumber); diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "MDM Event = %lu", modem->Event); @@ -1428,6 +1551,20 @@ case DIVA_SUPER_TRACE_NOTIFY_FAX_CHANGE: if (pC->hDbg->dbgMask & DIVA_MGT_DBG_FAX_PROGRESS) { + { + int ch = TraceFilterChannel; + int id = TraceFilterIdent; + + if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && + (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { + if (ch != (int)fax->ChannelNumber) { + break; + } + } else if (TraceFilter[0] != 0) { + break; + } + } + diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Ch = %lu",(int)fax->ChannelNumber); diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Event = %lu", fax->Event); diva_mnt_internal_dprintf(pC->hDbg->id, DLI_STAT, "FAX Pages = %lu", fax->Page_Counter); @@ -1660,6 +1797,52 @@ diva_dbg_entry_head_t* pmsg; word size; dword sec, usec; + int ch = TraceFilterChannel; + int id = TraceFilterIdent; + + /* + Selective trace + */ + if ((id >= 0) && (ch >= 0) && (id < sizeof(clients)/sizeof(clients[0])) && + (clients[id].Dbg.id == (byte)id) && (clients[id].pIdiLib == hLib)) { + const char* p = NULL; + int ch_value = -1; + MI_XLOG_HDR *TrcData = (MI_XLOG_HDR *)xlog_buffer; + + if (Adapter != clients[id].logical) { + return; /* Ignore all trace messages from other adapters */ + } + + if (TrcData->code == 24) { + p = (char*)&TrcData->code; + p += 2; + } + + /* + All L1 messages start as [dsp,ch], so we can filter this information + and filter out all messages that use different channel + */ + if (p && p[0] == '[') { + if (p[2] == ',') { + p += 3; + ch_value = *p - '0'; + } else if (p[3] == ',') { + p += 4; + ch_value = *p - '0'; + } + if (ch_value >= 0) { + if (p[2] == ']') { + ch_value = ch_value * 10 + p[1] - '0'; + } + if (ch_value != ch) { + return; /* Ignore other channels */ + } + } + } + + } else if (TraceFilter[0] != 0) { + return; /* Ignore trace if trace filter is activated, but idle */ + } diva_os_get_time (&sec, &usec); @@ -1705,18 +1888,20 @@ (*(pC->pIdiLib->DivaSTraceSetDChannel))(pC->pIdiLib, (pC->hDbg->dbgMask & DIVA_MGT_DBG_DCHAN) != 0); } - if (changed & DIVA_MGT_DBG_IFC_BCHANNEL) { - int i, state = ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0); + if (!TraceFilter[0]) { + if (changed & DIVA_MGT_DBG_IFC_BCHANNEL) { + int i, state = ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0); - for (i = 0; i < pC->channels; i++) { - (*(pC->pIdiLib->DivaSTraceSetBChannel))(pC->pIdiLib, i+1, state); + for (i = 0; i < pC->channels; i++) { + (*(pC->pIdiLib->DivaSTraceSetBChannel))(pC->pIdiLib, i+1, state); + } } - } - if (changed & DIVA_MGT_DBG_IFC_AUDIO) { - int i, state = ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0); + if (changed & DIVA_MGT_DBG_IFC_AUDIO) { + int i, state = ((pC->hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0); - for (i = 0; i < pC->channels; i++) { - (*(pC->pIdiLib->DivaSTraceSetAudioTap))(pC->pIdiLib, i+1, state); + for (i = 0; i < pC->channels; i++) { + (*(pC->pIdiLib->DivaSTraceSetAudioTap))(pC->pIdiLib, i+1, state); + } } } } @@ -1743,8 +1928,8 @@ for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { pmem = NULL; - diva_os_enter_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "unload"); - diva_os_enter_spin_lock_hard (&dbg_q_lock, &old_irql, "unload"); + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "unload"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "unload"); if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request) { if ((*(clients[i].pIdiLib->DivaSTraceLibraryStop))(clients[i].pIdiLib) == 1) { @@ -1759,19 +1944,31 @@ clients[i].pmem = NULL; } clients[i].hDbg = NULL; - clients[i].request = NULL; clients[i].request_pending = 0; + + if (clients[i].dma_handle >= 0) { + /* + Free DMA handle + */ + diva_free_dma_descriptor (clients[i].request, clients[i].dma_handle); + clients[i].dma_handle = -1; + } + clients[i].request = NULL; } else { fret = -1; } } - diva_os_leave_spin_lock_hard (&dbg_q_lock, &old_irql, "unload"); + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "unload"); if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request && clients[i].request_pending) { clients[i].request_pending = 0; (*(clients[i].request))((ENTITY*)(*(clients[i].pIdiLib->DivaSTraceGetHandle))(clients[i].pIdiLib->hLib)); + if (clients[i].dma_handle >= 0) { + diva_free_dma_descriptor (clients[i].request, clients[i].dma_handle); + clients[i].dma_handle = -1; + } } - diva_os_leave_spin_lock_hard (&dbg_adapter_lock, &old_irql1, "unload"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "unload"); if (pmem) { diva_os_free (0, pmem); @@ -1779,5 +1976,158 @@ } return (fret); +} + +/* + Set/Read the trace filter used for selective tracing. + Affects B- and Audio Tap trace mask at run time + */ +int diva_set_trace_filter (int filter_length, const char* filter) { + diva_os_spin_lock_magic_t old_irql, old_irql1; + int i, ch, on, client_b_on, client_atap_on; + + diva_os_enter_spin_lock (&dbg_adapter_lock, &old_irql1, "dbg mask"); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "write_filter"); + + if (filter_length <= DIVA_MAX_SELECTIVE_FILTER_LENGTH) { + memcpy (&TraceFilter[0], filter, filter_length); + if (TraceFilter[filter_length]) { + TraceFilter[filter_length] = 0; + } + if (TraceFilter[0] == '*') { + TraceFilter[0] = 0; + } + } else { + filter_length = -1; + } + + TraceFilterIdent = -1; + TraceFilterChannel = -1; + + on = (TraceFilter[0] == 0); + + for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { + if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request) { + client_b_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_BCHANNEL) != 0); + client_atap_on = on && ((clients[i].hDbg->dbgMask & DIVA_MGT_DBG_IFC_AUDIO) != 0); + for (ch = 0; ch < clients[i].channels; ch++) { + (*(clients[i].pIdiLib->DivaSTraceSetBChannel))(clients[i].pIdiLib->hLib, ch+1, client_b_on); + (*(clients[i].pIdiLib->DivaSTraceSetAudioTap))(clients[i].pIdiLib->hLib, ch+1, client_atap_on); + } + } + } + + for (i = 1; i < (sizeof(clients)/sizeof(clients[0])); i++) { + if (clients[i].hDbg && clients[i].pIdiLib && clients[i].request && clients[i].request_pending) { + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "write_filter"); + clients[i].request_pending = 0; + (*(clients[i].request))((ENTITY*)(*(clients[i].pIdiLib->DivaSTraceGetHandle))(clients[i].pIdiLib->hLib)); + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "write_filter"); + } + } + + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "write_filter"); + diva_os_leave_spin_lock (&dbg_adapter_lock, &old_irql1, "dbg mask"); + + return (filter_length); +} + +int diva_get_trace_filter (int max_length, char* filter) { + diva_os_spin_lock_magic_t old_irql; + int len; + + diva_os_enter_spin_lock (&dbg_q_lock, &old_irql, "read_filter"); + len = strlen (&TraceFilter[0]) + 1; + if (max_length >= len) { + memcpy (filter, &TraceFilter[0], len); + } + diva_os_leave_spin_lock (&dbg_q_lock, &old_irql, "read_filter"); + + return (len); +} + +static int diva_dbg_cmp_key (const char* ref, const char* key) { + while (*key && (*ref++ == *key++)); + return (!*key && !*ref); +} + +/* + In case trace filter starts with "C" character then + all following characters are interpreted as command. + Followings commands are available: + - single, trace single call at time, independent from CPN/CiPN + */ +static int diva_mnt_cmp_nmbr (const char* nmbr) { + const char* ref = &TraceFilter[0]; + int ref_len = strlen(&TraceFilter[0]), nmbr_len = strlen(nmbr); + + if (ref[0] == 'C') { + if (diva_dbg_cmp_key (&ref[1], "single")) { + return (0); + } + return (-1); + } + + if (!ref_len || (ref_len > nmbr_len)) { + return (-1); + } + + nmbr = nmbr + nmbr_len - 1; + ref = ref + ref_len - 1; + + while (ref_len--) { + if (*nmbr-- != *ref--) { + return (-1); + } + } + + return (0); +} + +static int diva_get_dma_descriptor (IDI_CALL request, dword *dma_magic) { + ENTITY e; + IDI_SYNC_REQ* pReq = (IDI_SYNC_REQ*)&e; + + if (!request) { + return (-1); + } + + pReq->xdi_dma_descriptor_operation.Req = 0; + pReq->xdi_dma_descriptor_operation.Rc = IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION; + + pReq->xdi_dma_descriptor_operation.info.operation = IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC; + pReq->xdi_dma_descriptor_operation.info.descriptor_number = -1; + pReq->xdi_dma_descriptor_operation.info.descriptor_address = NULL; + pReq->xdi_dma_descriptor_operation.info.descriptor_magic = 0; + + (*request)((ENTITY*)pReq); + + if (!pReq->xdi_dma_descriptor_operation.info.operation && + (pReq->xdi_dma_descriptor_operation.info.descriptor_number >= 0) && + pReq->xdi_dma_descriptor_operation.info.descriptor_magic) { + *dma_magic = pReq->xdi_dma_descriptor_operation.info.descriptor_magic; + return (pReq->xdi_dma_descriptor_operation.info.descriptor_number); + } else { + return (-1); + } +} + +static void diva_free_dma_descriptor (IDI_CALL request, int nr) { + ENTITY e; + IDI_SYNC_REQ* pReq = (IDI_SYNC_REQ*)&e; + + if (!request || (nr < 0)) { + return; + } + + pReq->xdi_dma_descriptor_operation.Req = 0; + pReq->xdi_dma_descriptor_operation.Rc = IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION; + + pReq->xdi_dma_descriptor_operation.info.operation = IDI_SYNC_REQ_DMA_DESCRIPTOR_FREE; + pReq->xdi_dma_descriptor_operation.info.descriptor_number = nr; + pReq->xdi_dma_descriptor_operation.info.descriptor_address = NULL; + pReq->xdi_dma_descriptor_operation.info.descriptor_magic = 0; + + (*request)((ENTITY*)pReq); } diff -Nru a/drivers/isdn/hardware/eicon/debug_if.h b/drivers/isdn/hardware/eicon/debug_if.h --- a/drivers/isdn/hardware/eicon/debug_if.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hardware/eicon/debug_if.h 2004-09-06 16:37:55 -07:00 @@ -57,12 +57,18 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d); int diva_mnt_shutdown_xdi_adapters (void); +#define DIVA_MAX_SELECTIVE_FILTER_LENGTH 127 +int diva_set_trace_filter (int filter_length, const char* filter); +int diva_get_trace_filter (int max_length, char* filter); + #define DITRACE_CMD_GET_DRIVER_INFO 1 #define DITRACE_READ_DRIVER_DBG_MASK 2 #define DITRACE_WRITE_DRIVER_DBG_MASK 3 #define DITRACE_READ_TRACE_ENTRY 4 #define DITRACE_READ_TRACE_ENTRYS 5 +#define DITRACE_WRITE_SELECTIVE_TRACE_FILTER 6 +#define DITRACE_READ_SELECTIVE_TRACE_FILTER 7 /* Trace lavels for debug via management interface diff -Nru a/drivers/isdn/hardware/eicon/debuglib.h b/drivers/isdn/hardware/eicon/debuglib.h --- a/drivers/isdn/hardware/eicon/debuglib.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hardware/eicon/debuglib.h 2004-09-06 16:37:55 -07:00 @@ -232,7 +232,7 @@ typedef void ( * DbgEnd) (pDbgHandle) ; typedef void ( * DbgLog) (unsigned short, int, char *, va_list) ; typedef void ( * DbgOld) (unsigned short, char *, va_list) ; -typedef void ( * DbgEv) (unsigned short, unsigned int, va_list) ; +typedef void ( * DbgEv) (unsigned short, unsigned long, va_list) ; typedef void ( * DbgIrq) (unsigned short, int, char *, va_list) ; typedef struct _DbgHandle_ { char Registered ; /* driver successfull registered */ @@ -259,7 +259,7 @@ void *pReserved3 ; } _DbgHandle_ ; extern _DbgHandle_ myDriverDebugHandle ; -typedef struct +typedef struct _OldDbgHandle_ { struct _OldDbgHandle_ *next ; void *pIrp ; long regTime[2] ; @@ -310,7 +310,7 @@ unsigned long B_ChannelMask; unsigned long LogBufferSize; } CardTrace; - } u1; + }Data; } _DbgExtendedInfo_; #ifndef DIVA_NO_DEBUGLIB /* ------------------------------------------------------------- diff -Nru a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c --- a/drivers/isdn/hardware/eicon/diddfunc.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hardware/eicon/diddfunc.c 2004-09-06 16:37:55 -07:00 @@ -1,4 +1,4 @@ -/* $Id: diddfunc.c,v 1.14 2003/08/25 10:06:37 schindler Exp $ +/* $Id: diddfunc.c,v 1.14.6.2 2004/08/28 20:03:53 armin Exp $ * * DIDD Interface module for Eicon active cards. * @@ -15,8 +15,6 @@ #include "di_defs.h" #include "dadapter.h" #include "divasync.h" - -#define MAX_DESCRIPTORS 32 #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR) #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG) diff -Nru a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c --- a/drivers/isdn/hardware/eicon/diva_didd.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/eicon/diva_didd.c 2004-09-06 16:37:53 -07:00 @@ -1,4 +1,4 @@ -/* $Id: diva_didd.c,v 1.13 2003/08/27 10:11:21 schindler Exp $ +/* $Id: diva_didd.c,v 1.13.6.1 2004/08/28 20:03:53 armin Exp $ * * DIDD Interface module for Eicon active cards. * @@ -23,7 +23,7 @@ #include "divasync.h" #include "did_vers.h" -static char *main_revision = "$Revision: 1.13 $"; +static char *main_revision = "$Revision: 1.13.6.1 $"; static char *DRIVERNAME = "Eicon DIVA - DIDD table (http://www.melware.net)"; @@ -36,8 +36,6 @@ MODULE_AUTHOR("Cytronics & Melware, Eicon Networks"); MODULE_SUPPORTED_DEVICE("Eicon diva drivers"); MODULE_LICENSE("GPL"); - -#define MAX_DESCRIPTORS 32 #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR) #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG) diff -Nru a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c --- a/drivers/isdn/hardware/eicon/divamnt.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/eicon/divamnt.c 2004-09-06 16:37:53 -07:00 @@ -1,4 +1,4 @@ -/* $Id: divamnt.c,v 1.32 2004/01/15 09:48:13 armin Exp $ +/* $Id: divamnt.c,v 1.32.6.5 2004/08/28 20:03:53 armin Exp $ * * Driver for Eicon DIVA Server ISDN cards. * Maint module @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include "platform.h" @@ -26,7 +24,7 @@ #include "divasync.h" #include "debug_if.h" -static char *main_revision = "$Revision: 1.32 $"; +static char *main_revision = "$Revision: 1.32.6.5 $"; static int major; @@ -47,8 +45,7 @@ char *DRIVERRELEASE_MNT = "2.0"; static wait_queue_head_t msgwaitq; -static DECLARE_MUTEX(opened_sem); -static int opened; +static unsigned long opened; static struct timeval start_time; extern int mntfunc_init(int *, void **, unsigned long); @@ -74,20 +71,6 @@ } /* - * buffer alloc - */ -void *diva_os_malloc_tbuffer(unsigned long flags, unsigned long size) -{ - return (kmalloc(size, GFP_KERNEL)); -} -void diva_os_free_tbuffer(unsigned long flags, void *ptr) -{ - if (ptr) { - kfree(ptr); - } -} - -/* * kernel/user space copy functions */ int diva_os_copy_to_user(void *os_handle, void __user *dst, const void *src, @@ -131,154 +114,8 @@ } /* - * /proc entries + * device node operations */ - -extern struct proc_dir_entry *proc_net_eicon; -static struct proc_dir_entry *maint_proc_entry = NULL; - -/* - Read function is provided for compatibility reason - this allows - to read unstructured traces, formated as ascii string only - */ -static ssize_t -maint_read(struct file *file, char __user *buf, size_t count, loff_t * off) -{ - diva_dbg_entry_head_t *pmsg = NULL; - diva_os_spin_lock_magic_t old_irql; - word size; - char *pstr, *dli_label = "UNK"; - int str_length; - int *str_msg; - - if (!file->private_data) { - for (;;) { - while ( - (pmsg = - diva_maint_get_message(&size, - &old_irql))) { - if (!(pmsg->facility == MSG_TYPE_STRING)) { - diva_maint_ack_message(1, - &old_irql); - } else { - break; - } - } - - if (!pmsg) { - if (file->f_flags & O_NONBLOCK) { - return (-EAGAIN); - } - interruptible_sleep_on(&msgwaitq); - if (signal_pending(current)) { - return (-ERESTARTSYS); - } - } else { - break; - } - } - /* - The length of message that shoule be read is: - pmsg->data_length + label(25) + DrvID(2) + byte CR + trailing zero - */ - if (! - (str_msg = - (int *) diva_os_malloc_tbuffer(0, - pmsg->data_length + - 29 + 2 * sizeof(int)))) { - diva_maint_ack_message(0, &old_irql); - return (-ENOMEM); - } - pstr = (char *) &str_msg[2]; - - switch (pmsg->dli) { - case DLI_LOG: - dli_label = "LOG"; - break; - case DLI_FTL: - dli_label = "FTL"; - break; - case DLI_ERR: - dli_label = "ERR"; - break; - case DLI_TRC: - dli_label = "TRC"; - break; - case DLI_REG: - dli_label = "REG"; - break; - case DLI_MEM: - dli_label = "MEM"; - break; - case DLI_SPL: - dli_label = "SPL"; - break; - case DLI_IRP: - dli_label = "IRP"; - break; - case DLI_TIM: - dli_label = "TIM"; - break; - case DLI_TAPI: - dli_label = "TAPI"; - break; - case DLI_NDIS: - dli_label = "NDIS"; - break; - case DLI_CONN: - dli_label = "CONN"; - break; - case DLI_STAT: - dli_label = "STAT"; - break; - case DLI_PRV0: - dli_label = "PRV0"; - break; - case DLI_PRV1: - dli_label = "PRV1"; - break; - case DLI_PRV2: - dli_label = "PRV2"; - break; - case DLI_PRV3: - dli_label = "PRV3"; - break; - } - str_length = sprintf(pstr, "%s %02x %s\n", - dli_label, (byte) pmsg->drv_id, - (char *) &pmsg[1]); - str_msg[0] = str_length; - str_msg[1] = 0; - file->private_data = str_msg; - diva_maint_ack_message(1, &old_irql); - } else { - str_msg = (int *) file->private_data; - pstr = (char *) &str_msg[2]; - pstr += str_msg[1]; /* head + offset */ - str_length = str_msg[0] - str_msg[1]; /* length - offset */ - } - str_length = MIN(str_length, count); - - if (diva_os_copy_to_user(NULL, buf, pstr, str_length)) { - diva_os_free_tbuffer(0, str_msg); - file->private_data = NULL; - return (-EFAULT); - } - str_msg[1] += str_length; - if ((str_msg[0] - str_msg[1]) <= 0) { - diva_os_free_tbuffer(0, str_msg); - file->private_data = NULL; - } - - return (str_length); -} - -static ssize_t -maint_write(struct file *file, const char __user *buf, size_t count, loff_t * off) -{ - return (-ENODEV); -} - static unsigned int maint_poll(struct file *file, poll_table * wait) { unsigned int mask = 0; @@ -293,13 +130,10 @@ static int maint_open(struct inode *ino, struct file *filep) { - down(&opened_sem); - if (opened) { - up(&opened_sem); + /* only one open is allowed, so we test + it atomically */ + if (test_and_set_bit(0, &opened)) return (-EBUSY); - } - opened++; - up(&opened_sem); filep->private_data = NULL; @@ -309,54 +143,16 @@ static int maint_close(struct inode *ino, struct file *filep) { if (filep->private_data) { - diva_os_free_tbuffer(0, filep->private_data); + diva_os_free(0, filep->private_data); filep->private_data = NULL; } - down(&opened_sem); - opened--; - up(&opened_sem); + /* clear 'used' flag */ + clear_bit(0, &opened); + return (0); } -/* - * fops - */ -static struct file_operations maint_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = maint_read, - .write = maint_write, - .poll = maint_poll, - .open = maint_open, - .release = maint_close -}; - -static int DIVA_INIT_FUNCTION create_maint_proc(void) -{ - maint_proc_entry = - create_proc_entry("maint", S_IFREG | S_IRUGO | S_IWUSR, - proc_net_eicon); - if (!maint_proc_entry) - return (0); - - maint_proc_entry->proc_fops = &maint_fops; - maint_proc_entry->owner = THIS_MODULE; - - return (1); -} - -static void remove_maint_proc(void) -{ - if (maint_proc_entry) { - remove_proc_entry("maint", proc_net_eicon); - maint_proc_entry = NULL; - } -} - -/* - * device node operations - */ static ssize_t divas_maint_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos) { @@ -427,18 +223,10 @@ ret = -EIO; goto out; } - if (!create_maint_proc()) { - printk(KERN_ERR "%s: failed to create proc entry.\n", - DRIVERLNAME); - divas_maint_unregister_chrdev(); - ret = -EIO; - goto out; - } if (!(mntfunc_init(&buffer_length, &buffer, diva_dbg_mem))) { printk(KERN_ERR "%s: failed to connect to DIDD.\n", DRIVERLNAME); - remove_maint_proc(); divas_maint_unregister_chrdev(); ret = -EIO; goto out; @@ -457,7 +245,6 @@ */ static void DIVA_EXIT_FUNCTION maint_exit(void) { - remove_maint_proc(); divas_maint_unregister_chrdev(); mntfunc_finit(); @@ -466,3 +253,4 @@ module_init(maint_init); module_exit(maint_exit); + diff -Nru a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c --- a/drivers/isdn/hardware/eicon/divasfunc.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hardware/eicon/divasfunc.c 2004-09-06 16:37:53 -07:00 @@ -1,4 +1,4 @@ -/* $Id: divasfunc.c,v 1.23 2004/04/08 01:17:57 armin Exp $ +/* $Id: divasfunc.c,v 1.23.4.2 2004/08/28 20:03:53 armin Exp $ * * Low level driver for Eicon DIVA Server ISDN cards. * @@ -27,8 +27,6 @@ extern PISDN_ADAPTER IoAdapters[MAX_ADAPTER]; -#define MAX_DESCRIPTORS 32 - extern char *DRIVERRELEASE_DIVAS; static dword notify_handle; @@ -76,10 +74,10 @@ d.features = IoAdapters[card - 1]->Properties.Features; DBG_TRC(("DIDD register A(%d) channels=%d", card, d.channels)) - /* workaround for different Name in structure */ - strlcpy(IoAdapters[card - 1]->Name, - IoAdapters[card - 1]->Properties.Name, - sizeof(IoAdapters[card - 1]->Name)); + /* workaround for different Name in structure */ + strlcpy(IoAdapters[card - 1]->Name, + IoAdapters[card - 1]->Properties.Name, + sizeof(IoAdapters[card - 1]->Name)); req.didd_remove_adapter.e.Req = 0; req.didd_add_adapter.e.Rc = IDI_SYNC_REQ_DIDD_ADD_ADAPTER; req.didd_add_adapter.info.descriptor = (void *) &d; diff -Nru a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h --- a/drivers/isdn/hardware/eicon/divasync.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hardware/eicon/divasync.h 2004-09-06 16:37:51 -07:00 @@ -31,33 +31,31 @@ #define IDI_SYNC_REQ_SET_POSTCALL 0x03 #define IDI_SYNC_REQ_GET_XLOG 0x04 #define IDI_SYNC_REQ_GET_FEATURES 0x05 -/* Added for DIVA USB support */ #define IDI_SYNC_REQ_USB_REGISTER 0x06 #define IDI_SYNC_REQ_USB_RELEASE 0x07 #define IDI_SYNC_REQ_USB_ADD_DEVICE 0x08 #define IDI_SYNC_REQ_USB_START_DEVICE 0x09 #define IDI_SYNC_REQ_USB_STOP_DEVICE 0x0A #define IDI_SYNC_REQ_USB_REMOVE_DEVICE 0x0B -/* Added for Diva Server Monitor */ #define IDI_SYNC_REQ_GET_CARDTYPE 0x0C #define IDI_SYNC_REQ_GET_DBG_XLOG 0x0D -#define IDI_SYNC_REQ_GET_LINE_IDX 0x0E #define DIVA_USB #define DIVA_USB_REQ 0xAC #define DIVA_USB_TEST 0xAB #define DIVA_USB_ADD_ADAPTER 0xAC #define DIVA_USB_REMOVE_ADAPTER 0xAD -/******************************************************************************/ #define IDI_SYNC_REQ_SERIAL_HOOK 0x80 #define IDI_SYNC_REQ_XCHANGE_STATUS 0x81 #define IDI_SYNC_REQ_USB_HOOK 0x82 #define IDI_SYNC_REQ_PORTDRV_HOOK 0x83 -#define IDI_SYNC_REQ_SLI (0x84) /* SLI request from 3signal modem drivers */ +#define IDI_SYNC_REQ_SLI 0x84 /* SLI request from 3signal modem drivers */ #define IDI_SYNC_REQ_RECONFIGURE 0x85 #define IDI_SYNC_REQ_RESET 0x86 +#define IDI_SYNC_REQ_GET_85X_DEVICE_DATA 0x87 #define IDI_SYNC_REQ_LOCK_85X 0x88 +#define IDI_SYNC_REQ_DIVA_85X_USB_DATA_EXCHANGE 0x99 +#define IDI_SYNC_REQ_DIPORT_EXCHANGE_REQ 0x98 #define IDI_SYNC_REQ_GET_85X_EXT_PORT_TYPE 0xA0 -#define IDI_SYNC_REQ_DIPORT_GET_85X_TX_CTRL_FN 0x98 /******************************************************************************/ #define IDI_SYNC_REQ_XDI_GET_EXTENDED_FEATURES 0x92 /* @@ -87,6 +85,8 @@ #define DIVA_XDI_EXTENDED_FEATURE_CAPI_PRMS 0x08 #define DIVA_XDI_EXTENDED_FEATURE_NO_CANCEL_RC 0x10 #define DIVA_XDI_EXTENDED_FEATURE_RX_DMA 0x20 +#define DIVA_XDI_EXTENDED_FEATURE_MANAGEMENT_DMA 0x40 +#define DIVA_XDI_EXTENDED_FEATURE_WIDE_ID 0x80 #define DIVA_XDI_EXTENDED_FEATURES_MAX_SZ 1 /******************************************************************************/ #define IDI_SYNC_REQ_XDI_GET_ADAPTER_SDRAM_BAR 0x93 @@ -115,6 +115,7 @@ typedef struct _diva_xdi_get_logical_adapter_number { dword logical_adapter_number; dword controller; + dword total_controllers; } diva_xdi_get_logical_adapter_number_s_t; /******************************************************************************/ #define IDI_SYNC_REQ_UP1DM_OPERATION 0x96 @@ -134,6 +135,7 @@ #define IDI_SYNC_REQ_DIDD_ADD_ADAPTER 0x03 #define IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER 0x04 #define IDI_SYNC_REQ_DIDD_READ_ADAPTER_ARRAY 0x05 +#define IDI_SYNC_REQ_DIDD_GET_CFG_LIB_IFC 0x10 typedef struct _diva_didd_adapter_notify { dword handle; /* Notification handle */ void * callback; @@ -149,6 +151,9 @@ void * buffer; dword length; } diva_didd_read_adapter_array_t; +typedef struct _diva_didd_get_cfg_lib_ifc { + void* ifc; +} diva_didd_get_cfg_lib_ifc_t; /******************************************************************************/ #define IDI_SYNC_REQ_XDI_GET_STREAM 0x91 #define DIVA_XDI_SYNCHRONOUS_SERVICE 0x01 @@ -466,6 +471,10 @@ ENTITY e; diva_didd_read_adapter_array_t info; } didd_read_adapter_array; + struct { + ENTITY e; + diva_didd_get_cfg_lib_ifc_t info; + } didd_get_cfg_lib_ifc; struct { unsigned char Req; unsigned char Rc; diff -Nru a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c --- a/drivers/isdn/hardware/eicon/idifunc.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hardware/eicon/idifunc.c 2004-09-06 16:37:55 -07:00 @@ -1,4 +1,4 @@ -/* $Id: idifunc.c,v 1.14.4.2 2004/05/09 16:42:20 armin Exp $ +/* $Id: idifunc.c,v 1.14.4.4 2004/08/28 20:03:53 armin Exp $ * * Driver for Eicon DIVA Server ISDN cards. * User Mode IDI Interface @@ -24,8 +24,6 @@ extern void DIVA_DIDD_Read(void *, int); extern int diva_user_mode_idi_create_adapter(const DESCRIPTOR *, int); extern void diva_user_mode_idi_remove_adapter(int); - -#define MAX_DESCRIPTORS 32 static dword notify_handle; static DESCRIPTOR DAdapter; diff -Nru a/drivers/isdn/hardware/eicon/io.c b/drivers/isdn/hardware/eicon/io.c --- a/drivers/isdn/hardware/eicon/io.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hardware/eicon/io.c 2004-09-06 16:37:51 -07:00 @@ -77,6 +77,7 @@ #if defined(DIVA_IDI_RX_DMA) DIVA_XDI_EXTENDED_FEATURE_CMA | DIVA_XDI_EXTENDED_FEATURE_RX_DMA | + DIVA_XDI_EXTENDED_FEATURE_MANAGEMENT_DMA | #endif DIVA_XDI_EXTENDED_FEATURE_NO_CANCEL_RC), 0 @@ -226,8 +227,10 @@ if (pI->descriptor_number >= 0) { dword dma_magic; void* local_addr; +#if 0 DBG_TRC(("A(%d) dma_alloc(%d)", IoAdapter->ANum, pI->descriptor_number)) +#endif diva_get_dma_map_entry (\ (struct _diva_dma_map_entry*)IoAdapter->dma_map, pI->descriptor_number, @@ -240,7 +243,9 @@ } } else if ((pI->operation == IDI_SYNC_REQ_DMA_DESCRIPTOR_FREE) && (pI->descriptor_number >= 0)) { +#if 0 DBG_TRC(("A(%d) dma_free(%d)", IoAdapter->ANum, pI->descriptor_number)) +#endif diva_free_dma_map_entry((struct _diva_dma_map_entry*)IoAdapter->dma_map, pI->descriptor_number); pI->descriptor_number = -1; @@ -257,6 +262,7 @@ &syncReq->xdi_logical_adapter_number.info; pI->logical_adapter_number = IoAdapter->ANum; pI->controller = IoAdapter->ControllerNumber; + pI->total_controllers = IoAdapter->Properties.Adapters; } return; case IDI_SYNC_REQ_XDI_GET_CAPI_PARAMS: { diva_xdi_get_capi_parameters_t prms, *pI = &syncReq->xdi_capi_prms.info; @@ -318,6 +324,16 @@ } syncReq->GetSerial.serial = 0 ; break ; + case IDI_SYNC_REQ_GET_CARDTYPE: + if ( IoAdapter ) + { + syncReq->GetCardType.cardtype = IoAdapter->cardType ; + DBG_TRC(("xdi: Adapter %d / CardType %ld", + IoAdapter->ANum, IoAdapter->cardType)) + return ; + } + syncReq->GetCardType.cardtype = 0 ; + break ; case IDI_SYNC_REQ_GET_XLOG: if ( IoAdapter ) { @@ -326,6 +342,14 @@ } e->Ind = 0 ; break ; + case IDI_SYNC_REQ_GET_DBG_XLOG: + if ( IoAdapter ) + { + pcm_req (IoAdapter, e) ; + return ; + } + e->Ind = 0 ; + break ; case IDI_SYNC_REQ_GET_FEATURES: if ( IoAdapter ) { @@ -345,7 +369,9 @@ } if ( IoAdapter ) { +#if 0 DBG_FTL(("xdi: unknown Req 0 / Rc %d !", e->Rc)) +#endif return ; } } @@ -496,7 +522,7 @@ diva_os_enter_spin_lock (&IoAdapter->data_spin_lock, &OldIrql, "data_pcm_1"); - IoAdapter->pcm_data = (unsigned long)pcm; + IoAdapter->pcm_data = (void *)pcm; IoAdapter->pcm_pending = 1; diva_os_schedule_soft_isr (&IoAdapter->req_soft_isr); diva_os_leave_spin_lock (&IoAdapter->data_spin_lock, @@ -510,7 +536,7 @@ &OldIrql, "data_pcm_3"); IoAdapter->pcm_pending = 0; - IoAdapter->pcm_data = 0; + IoAdapter->pcm_data = NULL ; diva_os_leave_spin_lock (&IoAdapter->data_spin_lock, &OldIrql, "data_pcm_3"); @@ -528,7 +554,7 @@ &OldIrql, "data_pcm_4"); IoAdapter->pcm_pending = 0; - IoAdapter->pcm_data = 0; + IoAdapter->pcm_data = NULL ; diva_os_leave_spin_lock (&IoAdapter->data_spin_lock, &OldIrql, "data_pcm_4"); @@ -668,7 +694,7 @@ void io_in_buffer(ADAPTER * a, void * adr, void * buffer, word len) { byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); - byte* P = (byte*)buffer; + byte* P = (byte*)buffer; if ((long)adr & 1) { outppw(Port+4, (word)(unsigned long)adr); *P = inpp(Port); @@ -678,7 +704,7 @@ if (!len) { DIVA_OS_MEM_DETACH_PORT((PISDN_ADAPTER)a->io, Port); return; - } + } } outppw(Port+4, (word)(unsigned long)adr); inppw_buffer (Port, P, len+1); @@ -710,7 +736,7 @@ void io_out_buffer(ADAPTER * a, void * adr, void * buffer, word len) { byte *Port = (byte*)DIVA_OS_MEM_ATTACH_PORT((PISDN_ADAPTER)a->io); - byte* P = (byte*)buffer; + byte* P = (byte*)buffer; if ((long)adr & 1) { outppw(Port+4, (word)(unsigned long)adr); outpp(Port, *P); @@ -839,21 +865,21 @@ /* -------------------------------------------------------------------------- routines for aligned reading and writing on RISC -------------------------------------------------------------------------- */ -void outp_words_from_buffer (word* adr, byte* P, word len) +void outp_words_from_buffer (word* adr, byte* P, dword len) { - word i = 0; + dword i = 0; word w; - while (i < (len & 0xfffe)) { + while (i < (len & 0xfffffffe)) { w = P[i++]; w += (P[i++])<<8; outppw (adr, w); } } -void inp_words_to_buffer (word* adr, byte* P, word len) +void inp_words_to_buffer (word* adr, byte* P, dword len) { - word i = 0; + dword i = 0; word w; - while (i < (len & 0xfffe)) { + while (i < (len & 0xfffffffe)) { w = inppw (adr); P[i++] = (byte)(w); P[i++] = (byte)(w>>8); diff -Nru a/drivers/isdn/hardware/eicon/io.h b/drivers/isdn/hardware/eicon/io.h --- a/drivers/isdn/hardware/eicon/io.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hardware/eicon/io.h 2004-09-06 16:37:55 -07:00 @@ -40,6 +40,14 @@ PISDN_ADAPTER QuadroAdapter[4] ; } ADAPTER_LIST_ENTRY, *PADAPTER_LIST_ENTRY ; /* -------------------------------------------------------------------------- + Special OS memory support structures + -------------------------------------------------------------------------- */ +#define MAX_MAPPED_ENTRIES 8 +typedef struct { + void * Address; + dword Length; +} ADAPTER_MEMORY ; +/* -------------------------------------------------------------------------- Configuration of XDI clients carried by XDI -------------------------------------------------------------------------- */ #define DIVA_XDI_CAPI_CFG_1_DYNAMIC_L1_ON 0x01 @@ -52,6 +60,7 @@ -------------------------------------------------------------------------- */ struct _ISDN_ADAPTER { void (* DIRequest)(PISDN_ADAPTER, ENTITY *) ; + int State ; /* from NT4 1.srv, a good idea, but a poor achievment */ int Initialized ; int RegisteredWithDidd ; int Unavailable ; /* callback function possible? */ @@ -63,6 +72,7 @@ /* remember mapped memory areas */ + ADAPTER_MEMORY MappedMemory[MAX_MAPPED_ENTRIES] ; CARD_PROPERTIES Properties ; dword cardType ; dword protocol_id ; /* configured protocol identifier */ @@ -87,15 +97,15 @@ dword downloadAddrTable[4] ; /* add. for MultiMaster */ dword MemoryBase ; dword MemorySize ; - byte *Address ; + byte *Address ; byte *Config ; byte *Control ; - byte *reset ; - byte *port ; - byte *ram ; - byte *cfg ; - byte *prom ; - byte *ctlReg ; + byte *reset ; + byte *port ; + byte *ram ; + byte *cfg ; + byte *prom ; + byte *ctlReg ; struct pc_maint *pcm ; diva_os_dependent_devica_name_t os_name; byte Name[32] ; @@ -105,6 +115,7 @@ char *ProtocolSuffix ; /* internal protocolfile table */ char Archive[32] ; char Protocol[32] ; + char AddDownload[32] ; /* Dsp- or other additional download files */ char Oad1[ISDN_MAX_NUM_LEN] ; char Osa1[ISDN_MAX_NUM_LEN] ; char Oad2[ISDN_MAX_NUM_LEN] ; @@ -153,8 +164,26 @@ byte ModemCarrierWaitTimeSec; byte ModemCarrierLossWaitTimeTenthSec; byte PiafsLinkTurnaroundInFrames; + byte DiscAfterProgress; + byte AniDniLimiter[3]; + byte TxAttenuation; /* PRI/E1 only: attenuate TX signal */ word QsigFeatures; dword GenerateRingtone ; + dword SupplementaryServicesFeatures; + dword R2Dialect; + dword R2CasOptions; + dword FaxV34Options; + dword DisabledDspMask; + dword AdapterTestMask; + dword DspImageLength; + word AlertToIn20mSecTicks; + word ModemEyeSetup; + byte R2CtryLength; + byte CCBSRelTimer; + byte *PcCfgBufferFile;/* flexible parameter via file */ + byte *PcCfgBuffer ; /* flexible parameter via multistring */ + diva_os_dump_file_t dump_file; /* dump memory to file at lowest irq level */ + diva_os_board_trace_t board_trace ; /* traces from the board */ diva_os_spin_lock_t isr_spin_lock; diva_os_spin_lock_t data_spin_lock; diva_os_soft_isr_t req_soft_isr; @@ -180,15 +209,21 @@ void (* stop)(PISDN_ADAPTER) ; void (* rstFnc)(PISDN_ADAPTER) ; void (* trapFnc)(PISDN_ADAPTER) ; + dword (* DetectDsps)(PISDN_ADAPTER) ; void (* os_trap_nfy_Fnc)(PISDN_ADAPTER, dword) ; diva_os_isr_callback_t diva_isr_handler; - dword sdram_bar; + dword sdram_bar; /* must be 32 bit */ dword fpga_features; volatile int pcm_pending; - volatile unsigned long pcm_data; + volatile void * pcm_data; diva_xdi_capi_cfg_t capi_cfg; dword tasks; - void* dma_map; + void *dma_map; + int (*DivaAdapterTestProc)(PISDN_ADAPTER); + void *AdapterTestMemoryStart; + dword AdapterTestMemoryLength; + const byte* cfg_lib_memory_init; + dword cfg_lib_memory_init_length; }; /* --------------------------------------------------------------------- Entity table @@ -219,8 +254,8 @@ /* --------------------------------------------------------------------- Functions for port io --------------------------------------------------------------------- */ -void outp_words_from_buffer (word* adr, byte* P, word len); -void inp_words_to_buffer (word* adr, byte* P, word len); +void outp_words_from_buffer (word* adr, byte* P, dword len); +void inp_words_to_buffer (word* adr, byte* P, dword len); /* --------------------------------------------------------------------- platform specific conversions --------------------------------------------------------------------- */ @@ -240,6 +275,10 @@ void io_outw(ADAPTER * a, void * adr, word data); void io_out_buffer(ADAPTER * a, void * adr, void * P, word length); void io_inc(ADAPTER * a, void * adr); +void bri_in_buffer (PISDN_ADAPTER IoAdapter, dword Pos, + void *Buf, dword Len); +int bri_out_buffer (PISDN_ADAPTER IoAdapter, dword Pos, + void *Buf, dword Len, int Verify); /* --------------------------------------------------------------------- ram access functions for memory mapped cards --------------------------------------------------------------------- */ diff -Nru a/drivers/isdn/hardware/eicon/maintidi.c b/drivers/isdn/hardware/eicon/maintidi.c --- a/drivers/isdn/hardware/eicon/maintidi.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/isdn/hardware/eicon/maintidi.c 2004-09-06 16:37:50 -07:00 @@ -115,7 +115,7 @@ return NULL; } - pmem += sizeof(*pLib); + pmem += sizeof(*pLib); memset(pLib, 0x00, sizeof(*pLib)); pLib->Adapter = Adapter; @@ -337,13 +337,60 @@ pLib->e.RNum = 1; pLib->e.R->P = (byte*)&pLib->buffer[0]; pLib->e.R->PLength = (word)(sizeof(pLib->buffer) - 1); + } else { /* Indication reception complete, process it now */ byte* p = (byte*)&pLib->buffer[0]; pLib->buffer[pLib->e.R->PLength] = 0; /* terminate I.E. with zero */ + switch (Ind) { + case MAN_COMBI_IND: { + int total_length = pLib->e.R->PLength; + word this_ind_length; + + while (total_length > 3 && *p) { + Ind = *p++; + this_ind_length = (word)p[0] | ((word)p[1] << 8); + p += 2; + + switch (Ind) { + case MAN_INFO_IND: + if (process_idi_info (pLib, (diva_man_var_header_t*)p)) { + return (-1); + } + break; + case MAN_EVENT_IND: + if (process_idi_event (pLib, (diva_man_var_header_t*)p)) { + return (-1); + } + break; + case MAN_TRACE_IND: + if (pLib->trace_on == 1) { + /* + Ignore first trace event that is result of + EVENT_ON operation + */ + pLib->trace_on++; + } else { + /* + Delivery XLOG buffer to application + */ + if (pLib->user_proc_table.trace_proc) { + (*(pLib->user_proc_table.trace_proc))(pLib->user_proc_table.user_context, + &pLib->instance, pLib->Adapter, + p, this_ind_length); + } + } + break; + default: + diva_mnt_internal_dprintf (0, DLI_ERR, "Unknon IDI Ind (DMA mode): %02x", Ind); + } + p += (this_ind_length+1); + total_length -= (4 + this_ind_length); + } + } break; case MAN_INFO_IND: if (process_idi_info (pLib, (diva_man_var_header_t*)p)) { return (-1); @@ -806,7 +853,7 @@ } static int process_idi_event (diva_strace_context_t* pLib, - diva_man_var_header_t* pVar) { + diva_man_var_header_t* pVar) { const char* path = (char*)&pVar->path_length+1; char name[64]; int i; diff -Nru a/drivers/isdn/hardware/eicon/maintidi.h b/drivers/isdn/hardware/eicon/maintidi.h --- a/drivers/isdn/hardware/eicon/maintidi.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/hardware/eicon/maintidi.h 2004-09-06 16:37:52 -07:00 @@ -49,6 +49,8 @@ void* variable; /* Variable that will receive value */ } diva_strace_path2action_t; +#define DIVA_MAX_MANAGEMENT_TRANSFER_SIZE 4096 + typedef struct _diva_strace_context { diva_strace_library_interface_t instance; @@ -62,7 +64,7 @@ IDI_CALL request; BUFFERS XData; BUFFERS RData; - byte buffer[2048+512+1]; + byte buffer[DIVA_MAX_MANAGEMENT_TRANSFER_SIZE + 1]; int removal_state; int general_b_ch_event; int general_fax_event; diff -Nru a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c --- a/drivers/isdn/hardware/eicon/mntfunc.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/isdn/hardware/eicon/mntfunc.c 2004-09-06 16:37:50 -07:00 @@ -1,4 +1,4 @@ -/* $Id: mntfunc.c,v 1.19 2004/01/09 21:22:03 armin Exp $ +/* $Id: mntfunc.c,v 1.19.6.2 2004/08/28 20:03:53 armin Exp $ * * Driver for Eicon DIVA Server ISDN cards. * Maint module @@ -23,17 +23,12 @@ extern void DIVA_DIDD_Read(void *, int); -#define MAX_DESCRIPTORS 32 - static dword notify_handle; static DESCRIPTOR DAdapter; static DESCRIPTOR MAdapter; static DESCRIPTOR MaintDescriptor = { IDI_DIMAINT, 0, 0, (IDI_CALL) diva_maint_prtComp }; -extern void *diva_os_malloc_tbuffer(unsigned long flags, - unsigned long size); -extern void diva_os_free_tbuffer(unsigned long flags, void *ptr); extern int diva_os_copy_to_user(void *os_handle, void __user *dst, const void *src, int length); extern int diva_os_copy_from_user(void *os_handle, void *dst, @@ -47,16 +42,6 @@ #include "debuglib.c" /* - * stop debug - */ -static void stop_dbg(void) -{ - DbgDeregister(); - memset(&MAdapter, 0, sizeof(MAdapter)); - dprintf = no_printf; -} - -/* * DIDD callback function */ static void *didd_callback(void *context, DESCRIPTOR * adapter, @@ -66,7 +51,9 @@ DBG_ERR(("cb: Change in DAdapter ? Oops ?.")); } else if (adapter->type == IDI_DIMAINT) { if (removal) { - stop_dbg(); + DbgDeregister(); + memset(&MAdapter, 0, sizeof(MAdapter)); + dprintf = no_printf; } else { memcpy(&MAdapter, adapter, sizeof(MAdapter)); dprintf = (DIVA_DI_PRINTF) MAdapter.request; @@ -131,8 +118,6 @@ { IDI_SYNC_REQ req; - stop_dbg(); - req.didd_notify.e.Req = 0; req.didd_notify.e.Rc = IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER_NOTIFY; req.didd_notify.info.handle = notify_handle; @@ -193,34 +178,63 @@ } break; + /* + Filter commands will ignore the ID due to fact that filtering affects + the B- channel and Audio Tap trace levels only. Also MAINT driver will + select the right trace ID by itself + */ + case DITRACE_WRITE_SELECTIVE_TRACE_FILTER: + if (!mask) { + ret = diva_set_trace_filter (1, "*"); + } else if (mask < sizeof(data)) { + if (copy_from_user(data, (char __user *)buf+12, mask)) { + ret = -EFAULT; + } else { + ret = diva_set_trace_filter ((int)mask, data); + } + } else { + ret = -EINVAL; + } + break; + + case DITRACE_READ_SELECTIVE_TRACE_FILTER: + if ((ret = diva_get_trace_filter (sizeof(data), data)) > 0) { + if (copy_to_user (buf, data, ret)) + ret = -EFAULT; + } else { + ret = -ENODEV; + } + break; + case DITRACE_READ_TRACE_ENTRY:{ diva_os_spin_lock_magic_t old_irql; word size; diva_dbg_entry_head_t *pmsg; byte *pbuf; - if ((pmsg = diva_maint_get_message(&size, &old_irql))) { + if (!(pbuf = diva_os_malloc(0, mask))) { + return (-ENOMEM); + } + + for(;;) { + if (!(pmsg = + diva_maint_get_message(&size, &old_irql))) { + break; + } if (size > mask) { diva_maint_ack_message(0, &old_irql); ret = -EINVAL; - } else { - if (!(pbuf = diva_os_malloc_tbuffer(0, size))) - { - diva_maint_ack_message(0, &old_irql); - ret = -ENOMEM; - } else { - ret = size; - memcpy(pbuf, pmsg, size); - diva_maint_ack_message(1, &old_irql); - if ((count < size) || diva_os_copy_to_user (NULL, buf, - (void *) pbuf, size)) - ret = -EFAULT; - diva_os_free_tbuffer(0, pbuf); - } + break; } - } else { - ret = 0; + ret = size; + memcpy(pbuf, pmsg, size); + diva_maint_ack_message(1, &old_irql); + if ((count < size) || + diva_os_copy_to_user (NULL, buf, (void *) pbuf, size)) + ret = -EFAULT; + break; } + diva_os_free(0, pbuf); } break; @@ -235,7 +249,7 @@ ret = -EINVAL; break; } - if (!(pbuf = diva_os_malloc_tbuffer(0, mask))) { + if (!(pbuf = diva_os_malloc(0, mask))) { return (-ENOMEM); } @@ -273,7 +287,7 @@ } else { ret = written; } - diva_os_free_tbuffer(0, pbuf); + diva_os_free(0, pbuf); } break; @@ -302,7 +316,7 @@ } else { while ((*buffer_length >= (64 * 1024)) && - (!(*buffer = diva_os_malloc_tbuffer(0, *buffer_length)))) { + (!(*buffer = diva_os_malloc (0, *buffer_length)))) { *buffer_length -= 1024; } @@ -314,7 +328,7 @@ if (diva_maint_init(*buffer, *buffer_length, (diva_dbg_mem == 0))) { if (!diva_dbg_mem) { - diva_os_free_tbuffer(0, *buffer); + diva_os_free (0, *buffer); } DBG_ERR(("init: maint init failed")); return (0); @@ -324,7 +338,7 @@ DBG_ERR(("init: failed to connect to DIDD.")); diva_maint_finit(); if (!diva_dbg_mem) { - diva_os_free_tbuffer(0, *buffer); + diva_os_free (0, *buffer); } return (0); } @@ -339,6 +353,8 @@ void *buffer; int i = 100; + DbgDeregister(); + while (diva_mnt_shutdown_xdi_adapters() && i--) { diva_os_sleep(10); } @@ -346,6 +362,9 @@ disconnect_didd(); if ((buffer = diva_maint_finit())) { - diva_os_free_tbuffer(0, buffer); + diva_os_free (0, buffer); } + + memset(&MAdapter, 0, sizeof(MAdapter)); + dprintf = no_printf; } diff -Nru a/drivers/isdn/hardware/eicon/pc.h b/drivers/isdn/hardware/eicon/pc.h --- a/drivers/isdn/hardware/eicon/pc.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hardware/eicon/pc.h 2004-09-06 16:37:51 -07:00 @@ -143,6 +143,7 @@ #define N_DATA_ACK 12 /* data ack ind for D-bit procedure */ #define N_EDATA_ACK 13 /* data ack ind for INTERRUPT */ #define N_XON 15 /* clear RNR state */ +#define N_COMBI_IND N_XON /* combined indication */ #define N_Q_BIT 0x10 /* Q-bit for req/ind */ #define N_M_BIT 0x20 /* M-bit for req/ind */ #define N_D_BIT 0x40 /* D-bit for req/ind */ @@ -228,6 +229,10 @@ #define VSWITCH_IND 66 /* capifunctions for D-CH-switching */ #define MWI_POLL 67 /* Message Waiting Status Request fkt */ #define CALL_PEND_NOTIFY 68 /* notify capi to set new listen */ +#define DO_NOTHING 69 /* dont do somethin if you get this */ +#define INT_CT_REJ 70 /* ECT rejected internal command */ +#define CALL_HOLD_COMPLETE 71 /* In NT Mode indicate hold complete */ +#define CALL_RETRIEVE_COMPLETE 72 /* In NT Mode indicate retrieve complete */ /*------------------------------------------------------------------*/ /* management service primitives */ /*------------------------------------------------------------------*/ @@ -241,6 +246,7 @@ #define MAN_INFO_IND 2 #define MAN_EVENT_IND 3 #define MAN_TRACE_IND 4 +#define MAN_COMBI_IND 9 #define MAN_ESC 0x80 /*------------------------------------------------------------------*/ /* return code coding */ @@ -265,6 +271,7 @@ /*------------------------------------------------------------------*/ #define SHIFT 0x90 /* codeset shift */ #define MORE 0xa0 /* more data */ +#define SDNCMPL 0xa1 /* sending complete */ #define CL 0xb0 /* congestion level */ /* codeset 0 */ #define SMSG 0x00 /* segmented message */ @@ -288,6 +295,8 @@ #define RDX 0x73 /* redirecting number extended */ #define RDN 0x74 /* redirecting number */ #define RIN 0x76 /* redirection number */ +#define IUP 0x76 /* VN6 rerouter->PCS (codeset 6) */ +#define IPU 0x77 /* VN6 PCS->rerouter (codeset 6) */ #define RI 0x79 /* restart indicator */ #define MIE 0x7a /* management info element */ #define LLC 0x7c /* low layer compatibility */ @@ -296,6 +305,8 @@ #define ESC 0x7f /* escape extension */ #define DLC 0x20 /* data link layer configuration */ #define NLC 0x21 /* network layer configuration */ +#define REDIRECT_IE 0x22 /* redirection request/indication data */ +#define REDIRECT_NET_IE 0x23 /* redirection network override data */ /* codeset 6 */ #define SIN 0x01 /* service indicator */ #define CIF 0x02 /* charging information */ @@ -306,6 +317,7 @@ /*------------------------------------------------------------------*/ #define MSGTYPEIE 0x7a /* Messagetype info element */ #define CRIE 0x7b /* INFO info element */ +#define CODESET6IE 0xec /* Tunnel for Codeset 6 IEs */ #define VSWITCHIE 0xed /* VSwitch info element */ #define SSEXTIE 0xee /* Supplem. Service info element */ #define PROFILEIE 0xef /* Profile info element */ @@ -344,6 +356,13 @@ #define CCBS_REQUEST 0x32 #define CCBS_DEACTIVATE 0x33 #define CCBS_INTERROGATE 0x34 +#define CCBS_STATUS 0x35 +#define CCBS_ERASE 0x36 +#define CCBS_B_FREE 0x37 +#define CCNR_INFO_RETAIN 0x38 +#define CCBS_REMOTE_USER_FREE 0x39 +#define CCNR_REQUEST 0x3a +#define CCNR_INTERROGATE 0x3b #define GET_SUPPORTED_SERVICES 0xff #define DIVERSION_PROCEDURE_CFU 0x70 #define DIVERSION_PROCEDURE_CFB 0x71 @@ -362,6 +381,7 @@ #define SMASK_3PTY 0x00000008 #define SMASK_CALL_FORWARDING 0x00000010 #define SMASK_CALL_DEFLECTION 0x00000020 +#define SMASK_MCID 0x00000040 #define SMASK_CCBS 0x00000080 #define SMASK_MWI 0x00000100 #define SMASK_CCNR 0x00000200 @@ -406,6 +426,8 @@ #define RTPL2_IN 13 /* RTP layer-2 protocol, incomming */ #define RTPL2 14 /* RTP layer-2 protocol */ #define V120_V42BIS 15 /* V.120 asynchronous mode supporting V.42bis compression */ +#define LISTENER 27 /* Layer 2 to listen line */ +#define MTP2 28 /* MTP2 Layer 2 */ #define PIAFS_CRC 29 /* PIAFS Layer 2 with CRC calculation at L2 */ /* ------------------------------------------------------ PIAFS DLC DEFINITIONS @@ -506,6 +528,22 @@ | | | data transfer. | +---------------------+------+-----------------------------------------+ */ +/* ------------------------------------------------------ + LISTENER DLC DEFINITIONS + ------------------------------------------------------ */ +#define LISTENER_FEATURE_MASK_CUMMULATIVE 0x0001 +/* ------------------------------------------------------ + LISTENER META-FRAME CODE/PRIMITIVE DEFINITIONS + ------------------------------------------------------ */ +#define META_CODE_LL_UDATA_RX 0x01 +#define META_CODE_LL_UDATA_TX 0x02 +#define META_CODE_LL_DATA_RX 0x03 +#define META_CODE_LL_DATA_TX 0x04 +#define META_CODE_LL_MDATA_RX 0x05 +#define META_CODE_LL_MDATA_TX 0x06 +#define META_CODE_EMPTY 0x10 +#define META_CODE_LOST_FRAMES 0x11 +#define META_FLAG_TRUNCATED 0x0001 /*------------------------------------------------------------------*/ /* CAPI-like profile to indicate features on LAW_REQ */ /*------------------------------------------------------------------*/ @@ -577,6 +615,14 @@ #define MANUFACTURER_FEATURE_DMACONNECT 0x04000000L #define MANUFACTURER_FEATURE_AUDIO_TAP 0x08000000L #define MANUFACTURER_FEATURE_FAX_NONSTANDARD 0x10000000L +#define MANUFACTURER_FEATURE_SS7 0x20000000L +#define MANUFACTURER_FEATURE_MADAPTER 0x40000000L +#define MANUFACTURER_FEATURE_MEASURE 0x80000000L +#define MANUFACTURER_FEATURE2_LISTENING 0x00000001L +#define MANUFACTURER_FEATURE2_SS_DIFFCONTPOSSIBLE 0x00000002L +#define MANUFACTURER_FEATURE2_GENERIC_TONE 0x00000004L +#define MANUFACTURER_FEATURE2_COLOR_FAX 0x00000008L +#define MANUFACTURER_FEATURE2_SS_ECT_DIFFCONTPOSSIBLE 0x00000010L #define RTP_PRIM_PAYLOAD_PCMU_8000 0 #define RTP_PRIM_PAYLOAD_1016_8000 1 #define RTP_PRIM_PAYLOAD_G726_32_8000 2 @@ -624,6 +670,15 @@ #define VSINVOKEID 4 #define VSCLMRKS 5 #define VSTBCTIDENT 6 +#define VSETSILINKID 7 +#define VSSAMECONTROLLER 8 +/* Errorcodes for VSETSILINKID begin */ +#define VSETSILINKIDRRWC 1 +#define VSETSILINKIDREJECT 2 +#define VSETSILINKIDTIMEOUT 3 +#define VSETSILINKIDFAILCOUNT 4 +#define VSETSILINKIDERROR 5 +/* Errorcodes for VSETSILINKID end */ /* -----------------------------------------------------------** ** The PROTOCOL_FEATURE_STRING in feature.h (included ** ** in prstart.sx and astart.sx) defines capabilities and ** @@ -647,5 +702,37 @@ #define PROTCAP_FREE13 0x2000 /* not used */ #define PROTCAP_FREE14 0x4000 /* not used */ #define PROTCAP_EXTENSION 0x8000 /* used for future extentions */ +/* -----------------------------------------------------------* */ +/* Onhook data transmission ETS30065901 */ +/* Message Type */ +/*#define RESERVED4 0x4*/ +#define CALL_SETUP 0x80 +#define MESSAGE_WAITING_INDICATOR 0x82 +/*#define RESERVED84 0x84*/ +/*#define RESERVED85 0x85*/ +#define ADVICE_OF_CHARGE 0x86 +/*1111 0001 +to +1111 1111 +F1H - Reserved for network operator use +to +FFH*/ +/* Parameter Types */ +#define DATE_AND_TIME 1 +#define CLI_PARAMETER_TYPE 2 +#define CALLED_DIRECTORY_NUMBER_PARAMETER_TYPE 3 +#define REASON_FOR_ABSENCE_OF_CLI_PARAMETER_TYPE 4 +#define NAME_PARAMETER_TYPE 7 +#define REASON_FOR_ABSENCE_OF_CALLING_PARTY_NAME_PARAMETER_TYPE 8 +#define VISUAL_INDICATOR_PARAMETER_TYPE 0xb +#define COMPLEMENTARY_CLI_PARAMETER_TYPE 0x10 +#define CALL_TYPE_PARAMETER_TYPE 0x11 +#define FIRST_CALLED_LINE_DIRECTORY_NUMBER_PARAMETER_TYPE 0x12 +#define NETWORK_MESSAGE_SYSTEM_STATUS_PARAMETER_TYPE 0x13 +#define FORWARDED_CALL_TYPE_PARAMETER_TYPE 0x15 +#define TYPE_OF_CALLING_USER_PARAMETER_TYPE 0x16 +#define REDIRECTING_NUMBER_PARAMETER_TYPE 0x1a +#define EXTENSION_FOR_NETWORK_OPERATOR_USE_PARAMETER_TYPE 0xe0 +/* -----------------------------------------------------------* */ #else #endif /* PC_H_INCLUDED } */ diff -Nru a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h --- a/drivers/isdn/hardware/eicon/platform.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hardware/eicon/platform.h 2004-09-06 16:37:54 -07:00 @@ -1,4 +1,4 @@ -/* $Id: platform.h,v 1.37.4.1 2004/07/28 14:47:21 armin Exp $ +/* $Id: platform.h,v 1.37.4.2 2004/08/28 20:03:53 armin Exp $ * * platform.h * @@ -269,20 +269,6 @@ diva_os_spin_lock_magic_t* old_irql, \ void* dbg) { spin_unlock_bh(a); } -static __inline__ void diva_os_enter_spin_lock_hard (diva_os_spin_lock_t* a, \ - diva_os_spin_lock_magic_t* old_irql, \ - void* dbg) { \ - unsigned long flags; \ - spin_lock_irqsave (a, flags); \ - *old_irql = (diva_os_spin_lock_magic_t)flags; \ -} -static __inline__ void diva_os_leave_spin_lock_hard (diva_os_spin_lock_t* a, \ - diva_os_spin_lock_magic_t* old_irql, \ - void* dbg) { \ - unsigned long flags = (unsigned long)*old_irql; \ - spin_unlock_irqrestore (a, flags); \ -} - #define diva_os_destroy_spin_lock(a,b) do { } while(0) /* @@ -347,12 +333,18 @@ #define DIVA_IDI_RX_DMA 1 +/* +** endian macros +*/ #define READ_WORD(addr) readw(addr) #define READ_DWORD(addr) readl(addr) #define WRITE_WORD(addr,v) writew(v,addr) #define WRITE_DWORD(addr,v) writel(v,addr) +/* +** 32/64 bit macors +*/ #ifdef BITS_PER_LONG #if BITS_PER_LONG > 32 #define PLATFORM_GT_32BIT @@ -360,8 +352,23 @@ #endif #endif +/* +** undef os definitions of macros we use +*/ #undef ID_MASK #undef N_DATA #undef ADDR + +/* +** dump file +*/ +#define diva_os_dump_file_t char +#define diva_os_board_trace_t char +#define diva_os_dump_file(__x__) do { } while(0) + +/* +** size of internal arrays +*/ +#define MAX_DESCRIPTORS 64 #endif /* __PLATFORM_H__ */ diff -Nru a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c --- a/drivers/isdn/hisax/avm_pci.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/hisax/avm_pci.c 2004-09-06 16:37:52 -07:00 @@ -752,70 +752,70 @@ cs->hw.avm.cfg_reg = card->para[1]; cs->irq = card->para[0]; cs->subtyp = AVM_FRITZ_PNP; - } else { + goto ready; + } #ifdef __ISAPNP__ - if (isapnp_present()) { - struct pnp_dev *pnp_avm_d = NULL; - if ((pnp_avm_c = pnp_find_card( + if (isapnp_present()) { + struct pnp_dev *pnp_avm_d = NULL; + if ((pnp_avm_c = pnp_find_card( + ISAPNP_VENDOR('A', 'V', 'M'), + ISAPNP_FUNCTION(0x0900), pnp_avm_c))) { + if ((pnp_avm_d = pnp_find_dev(pnp_avm_c, ISAPNP_VENDOR('A', 'V', 'M'), - ISAPNP_FUNCTION(0x0900), pnp_avm_c))) { - if ((pnp_avm_d = pnp_find_dev(pnp_avm_c, - ISAPNP_VENDOR('A', 'V', 'M'), - ISAPNP_FUNCTION(0x0900), pnp_avm_d))) { - int err; + ISAPNP_FUNCTION(0x0900), pnp_avm_d))) { + int err; - pnp_disable_dev(pnp_avm_d); - err = pnp_activate_dev(pnp_avm_d); - if (err<0) { - printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); - return(0); - } - cs->hw.avm.cfg_reg = - pnp_port_start(pnp_avm_d, 0); - cs->irq = pnp_irq(pnp_avm_d, 0); - if (!cs->irq) { - printk(KERN_ERR "FritzPnP:No IRQ\n"); - return(0); - } - if (!cs->hw.avm.cfg_reg) { - printk(KERN_ERR "FritzPnP:No IO address\n"); - return(0); - } - cs->subtyp = AVM_FRITZ_PNP; - goto ready; + pnp_disable_dev(pnp_avm_d); + err = pnp_activate_dev(pnp_avm_d); + if (err<0) { + printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", + __FUNCTION__, err); + return(0); + } + cs->hw.avm.cfg_reg = + pnp_port_start(pnp_avm_d, 0); + cs->irq = pnp_irq(pnp_avm_d, 0); + if (!cs->irq) { + printk(KERN_ERR "FritzPnP:No IRQ\n"); + return(0); + } + if (!cs->hw.avm.cfg_reg) { + printk(KERN_ERR "FritzPnP:No IO address\n"); + return(0); } + cs->subtyp = AVM_FRITZ_PNP; + goto ready; } - } else { - printk(KERN_INFO "FritzPnP: no ISA PnP present\n"); } + } else { + printk(KERN_INFO "FritzPnP: no ISA PnP present\n"); + } #endif #ifdef CONFIG_PCI - if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM, - PCI_DEVICE_ID_AVM_A1, dev_avm))) { - cs->irq = dev_avm->irq; - if (!cs->irq) { - printk(KERN_ERR "FritzPCI: No IRQ for PCI card found\n"); - return(0); - } - if (pci_enable_device(dev_avm)) - return(0); - cs->hw.avm.cfg_reg = pci_resource_start(dev_avm, 1); - if (!cs->hw.avm.cfg_reg) { - printk(KERN_ERR "FritzPCI: No IO-Adr for PCI card found\n"); - return(0); - } - cs->subtyp = AVM_FRITZ_PCI; - } else { - printk(KERN_WARNING "FritzPCI: No PCI card found\n"); + if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM, + PCI_DEVICE_ID_AVM_A1, dev_avm))) { + cs->irq = dev_avm->irq; + if (!cs->irq) { + printk(KERN_ERR "FritzPCI: No IRQ for PCI card found\n"); + return(0); + } + if (pci_enable_device(dev_avm)) + return(0); + cs->hw.avm.cfg_reg = pci_resource_start(dev_avm, 1); + if (!cs->hw.avm.cfg_reg) { + printk(KERN_ERR "FritzPCI: No IO-Adr for PCI card found\n"); return(0); } - cs->irq_flags |= SA_SHIRQ; + cs->subtyp = AVM_FRITZ_PCI; + } else { + printk(KERN_WARNING "FritzPCI: No PCI card found\n"); + return(0); + } + cs->irq_flags |= SA_SHIRQ; #else - printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); - return (0); + printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); + return (0); #endif /* CONFIG_PCI */ - } ready: cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10; if (!request_region(cs->hw.avm.cfg_reg, 32, diff -Nru a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c --- a/drivers/isdn/hisax/bkm_a4t.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/hisax/bkm_a4t.c 2004-09-06 16:37:52 -07:00 @@ -265,7 +265,7 @@ char tmp[64]; u_int pci_memaddr = 0, found = 0; I20_REGISTER_FILE *pI20_Regs; -#if CONFIG_PCI +#ifdef CONFIG_PCI #endif strcpy(tmp, bkm_a4t_revision); @@ -275,7 +275,7 @@ } else return (0); -#if CONFIG_PCI +#ifdef CONFIG_PCI while ((dev_a4t = pci_find_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) { u16 sub_sys; diff -Nru a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c --- a/drivers/isdn/hisax/bkm_a8.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hisax/bkm_a8.c 2004-09-06 16:37:54 -07:00 @@ -21,7 +21,7 @@ #include #include "bkm_ax.h" -#if CONFIG_PCI +#ifdef CONFIG_PCI #define ATTEMPT_PCI_REMAPPING /* Required for PLX rev 1 */ @@ -285,7 +285,7 @@ int __init setup_sct_quadro(struct IsdnCard *card) { -#if CONFIG_PCI +#ifdef CONFIG_PCI struct IsdnCardState *cs = card->cs; char tmp[64]; u_char pci_rev_id; diff -Nru a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c --- a/drivers/isdn/hisax/diva.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hisax/diva.c 2004-09-06 16:37:55 -07:00 @@ -1027,7 +1027,7 @@ } } #endif -#if CONFIG_PCI +#ifdef CONFIG_PCI cs->subtyp = 0; if ((dev_diva = pci_find_device(PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20, dev_diva))) { diff -Nru a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c --- a/drivers/isdn/hisax/elsa.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hisax/elsa.c 2004-09-06 16:37:51 -07:00 @@ -1022,7 +1022,7 @@ cs->hw.elsa.base, cs->irq); } else if (cs->typ == ISDN_CTYPE_ELSA_PCI) { -#if CONFIG_PCI +#ifdef CONFIG_PCI cs->subtyp = 0; if ((dev_qs1000 = pci_find_device(PCI_VENDOR_ID_ELSA, PCI_DEVICE_ID_ELSA_MICROLINK, dev_qs1000))) { diff -Nru a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c --- a/drivers/isdn/hisax/enternow_pci.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hisax/enternow_pci.c 2004-09-06 16:37:54 -07:00 @@ -299,7 +299,7 @@ struct IsdnCardState *cs = card->cs; char tmp[64]; -#if CONFIG_PCI +#ifdef CONFIG_PCI #ifdef __BIG_ENDIAN #error "not running on big endian machines now" #endif diff -Nru a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c --- a/drivers/isdn/hisax/gazel.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hisax/gazel.c 2004-09-06 16:37:53 -07:00 @@ -634,7 +634,7 @@ return (0); } else { -#if CONFIG_PCI +#ifdef CONFIG_PCI if (setup_gazelpci(cs)) return (0); #else diff -Nru a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c --- a/drivers/isdn/hisax/hfc_pci.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/hisax/hfc_pci.c 2004-09-06 16:37:52 -07:00 @@ -65,7 +65,7 @@ }; -#if CONFIG_PCI +#ifdef CONFIG_PCI /******************************************/ /* free hardware resources used by driver */ @@ -1655,7 +1655,7 @@ #endif strcpy(tmp, hfcpci_revision); printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp)); -#if CONFIG_PCI +#ifdef CONFIG_PCI cs->hw.hfcpci.int_s1 = 0; cs->dc.hfcpci.ph_state = 0; cs->hw.hfcpci.fifo = 255; diff -Nru a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c --- a/drivers/isdn/hisax/niccy.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/isdn/hisax/niccy.c 2004-09-06 16:37:52 -07:00 @@ -309,7 +309,7 @@ return (0); } } else { -#if CONFIG_PCI +#ifdef CONFIG_PCI u_int pci_ioaddr; cs->subtyp = 0; if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, diff -Nru a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c --- a/drivers/isdn/hisax/nj_s.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hisax/nj_s.c 2004-09-06 16:37:51 -07:00 @@ -167,7 +167,7 @@ return(0); test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags); -#if CONFIG_PCI +#ifdef CONFIG_PCI for ( ;; ) { diff -Nru a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c --- a/drivers/isdn/hisax/nj_u.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/isdn/hisax/nj_u.c 2004-09-06 16:37:51 -07:00 @@ -137,7 +137,7 @@ int bytecnt; struct IsdnCardState *cs = card->cs; char tmp[64]; -#if CONFIG_PCI +#ifdef CONFIG_PCI #endif #ifdef __BIG_ENDIAN #error "not running on big endian machines now" @@ -148,7 +148,7 @@ return(0); test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags); -#if CONFIG_PCI +#ifdef CONFIG_PCI for ( ;; ) { diff -Nru a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c --- a/drivers/isdn/hisax/sedlbauer.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/isdn/hisax/sedlbauer.c 2004-09-06 16:37:55 -07:00 @@ -618,7 +618,7 @@ } #endif /* Probe for Sedlbauer speed pci */ -#if CONFIG_PCI +#ifdef CONFIG_PCI if ((dev_sedl = pci_find_device(PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100, dev_sedl))) { if (pci_enable_device(dev_sedl)) diff -Nru a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c --- a/drivers/isdn/hisax/telespci.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/isdn/hisax/telespci.c 2004-09-06 16:37:53 -07:00 @@ -300,7 +300,7 @@ printk(KERN_INFO "HiSax: Teles/PCI driver Rev. %s\n", HiSax_getrev(tmp)); if (cs->typ != ISDN_CTYPE_TELESPCI) return (0); -#if CONFIG_PCI +#ifdef CONFIG_PCI if ((dev_tel = pci_find_device (PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36120, dev_tel))) { if (pci_enable_device(dev_tel)) return(0); diff -Nru a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c --- a/drivers/isdn/hisax/w6692.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/hisax/w6692.c 2004-09-06 16:37:54 -07:00 @@ -1012,7 +1012,7 @@ printk(KERN_INFO "HiSax: W6692 driver Rev. %s\n", HiSax_getrev(tmp)); if (cs->typ != ISDN_CTYPE_W6692) return (0); -#if CONFIG_PCI +#ifdef CONFIG_PCI while (id_list[id_idx].vendor_id) { dev_w6692 = pci_find_device(id_list[id_idx].vendor_id, id_list[id_idx].device_id, diff -Nru a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c --- a/drivers/isdn/tpam/tpam_main.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/isdn/tpam/tpam_main.c 2004-09-06 16:37:54 -07:00 @@ -23,7 +23,7 @@ /* Local functions prototypes */ static int __devinit tpam_probe(struct pci_dev *, const struct pci_device_id *); -static void __devexit tpam_unregister_card(tpam_card *); +static void __devexit tpam_unregister_card(struct pci_dev *, tpam_card *); static void __devexit tpam_remove(struct pci_dev *); static int __init tpam_init(void); static void __exit tpam_exit(void); @@ -86,13 +86,20 @@ */ static int __devinit tpam_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) { tpam_card *card, *c; - int i; + int i, err; + + if (pci_enable_device(dev)) { + printk(KERN_ERR "TurboPAM: can't enable PCI device at %s\n", + pci_name(dev)); + return -ENODEV; + } /* allocate memory for the board structure */ if (!(card = (tpam_card *)kmalloc(sizeof(tpam_card), GFP_KERNEL))) { printk(KERN_ERR "TurboPAM: tpam_register_card: " "kmalloc failed!\n"); - return -ENOMEM; + err = -ENOMEM; + goto err_out_disable_dev; } memset((char *)card, 0, sizeof(tpam_card)); @@ -106,8 +113,8 @@ card->interface.id, card)) { printk(KERN_ERR "TurboPAM: tpam_register_card: " "could not request irq %d\n", card->irq); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_free_card; } /* remap board memory */ @@ -115,9 +122,8 @@ 0x800000))) { printk(KERN_ERR "TurboPAM: tpam_register_card: " "unable to remap bar0\n"); - free_irq(card->irq, card); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_free_irq; } /* reset the board */ @@ -150,10 +156,8 @@ if (!register_isdn(&card->interface)) { printk(KERN_ERR "TurboPAM: tpam_register_card: " "unable to register %s\n", card->interface.id); - free_irq(card->irq, card); - iounmap((void *)card->bar0); - kfree(card); - return -EIO; + err = -EIO; + goto err_out_iounmap; } card->id = card->interface.channels; @@ -195,6 +199,19 @@ pci_set_drvdata(dev, card); return 0; + +err_out_iounmap: + iounmap((void *)card->bar0); + +err_out_free_irq: + free_irq(card->irq, card); + +err_out_free_card: + kfree(card); + +err_out_disable_dev: + pci_disable_device(dev); + return err; } /* @@ -202,7 +219,7 @@ * * card: the board. */ -static void __devexit tpam_unregister_card(tpam_card *card) { +static void __devexit tpam_unregister_card(struct pci_dev *pcidev, tpam_card *card) { isdn_ctrl cmd; /* prevent the ISDN link layer that the driver will be unloaded */ @@ -215,6 +232,8 @@ /* release mapped memory */ iounmap((void *)card->bar0); + + pci_disable_device(pcidev); } /* @@ -235,7 +254,7 @@ } /* unregister each board */ - tpam_unregister_card(card); + tpam_unregister_card(pcidev, card); /* and free the board structure itself */ kfree(card); diff -Nru a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c --- a/drivers/macintosh/adbhid.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/macintosh/adbhid.c 2004-09-06 16:37:55 -07:00 @@ -326,7 +326,7 @@ input_report_key(&adbhid[id]->input, BTN_LEFT, !((data[1] >> 7) & 1)); input_report_key(&adbhid[id]->input, BTN_MIDDLE, !((data[2] >> 7) & 1)); - if (nb >= 4) + if (nb >= 4 && adbhid[id]->mouse_kind != ADBMOUSE_TRACKPAD) input_report_key(&adbhid[id]->input, BTN_RIGHT, !((data[3] >> 7) & 1)); input_report_rel(&adbhid[id]->input, REL_X, diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/macintosh/via-pmu.c 2004-09-06 16:37:54 -07:00 @@ -138,7 +138,6 @@ static volatile int adb_int_pending; static volatile int disable_poll; static struct adb_request bright_req_1, bright_req_2; -static unsigned long async_req_locks; static struct device_node *vias; static int pmu_kind = PMU_UNKNOWN; static int pmu_fully_inited = 0; @@ -155,6 +154,7 @@ static int option_lid_wakeup = 1; static int sleep_in_progress; static int can_sleep; +static unsigned long async_req_locks; #endif /* CONFIG_PMAC_PBOOK */ static unsigned int pmu_irq_stats[11]; @@ -494,12 +494,9 @@ /* Create /proc/pmu */ proc_pmu_root = proc_mkdir("pmu", NULL); if (proc_pmu_root) { - int i; - proc_pmu_info = create_proc_read_entry("info", 0, proc_pmu_root, - proc_get_info, NULL); - proc_pmu_irqstats = create_proc_read_entry("interrupts", 0, proc_pmu_root, - proc_get_irqstats, NULL); #ifdef CONFIG_PMAC_PBOOK + int i; + for (i=0; inlink = 1; diff -Nru a/drivers/md/Kconfig b/drivers/md/Kconfig --- a/drivers/md/Kconfig 2004-09-06 16:37:51 -07:00 +++ b/drivers/md/Kconfig 2004-09-06 16:37:51 -07:00 @@ -85,6 +85,24 @@ If unsure, say Y. +config MD_RAID10 + tristate "RAID-10 (mirrored striping) mode (EXPERIMENTAL)" + depends on BLK_DEV_MD && EXPERIMENTAL + ---help--- + RAID-10 provides a combination of striping (RAID-0) and + mirroring (RAID-1) with easier configuration and more flexable + layout. + Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to + be the same size (or atleast, only as much as the smallest device + will be used). + RAID-10 provides a variety of layouts that provide different levels + of redundancy and performance. + + RAID-10 requires mdadm-1.7.0 or later, available at: + + ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/ + + config MD_RAID5 tristate "RAID-4/RAID-5 mode" depends on BLK_DEV_MD diff -Nru a/drivers/md/Makefile b/drivers/md/Makefile --- a/drivers/md/Makefile 2004-09-06 16:37:53 -07:00 +++ b/drivers/md/Makefile 2004-09-06 16:37:53 -07:00 @@ -20,6 +20,7 @@ obj-$(CONFIG_MD_LINEAR) += linear.o obj-$(CONFIG_MD_RAID0) += raid0.o obj-$(CONFIG_MD_RAID1) += raid1.o +obj-$(CONFIG_MD_RAID10) += raid10.o obj-$(CONFIG_MD_RAID5) += raid5.o xor.o obj-$(CONFIG_MD_RAID6) += raid6.o xor.o obj-$(CONFIG_MD_MULTIPATH) += multipath.o diff -Nru a/drivers/md/md.c b/drivers/md/md.c --- a/drivers/md/md.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/md/md.c 2004-09-06 16:37:51 -07:00 @@ -406,7 +406,7 @@ return 0; fail: - printk(KERN_ERR "md: disabled device %s, could not read superblock.\n", + printk(KERN_WARNING "md: disabled device %s, could not read superblock.\n", bdevname(rdev->bdev,b)); return -EINVAL; } @@ -472,6 +472,31 @@ return csum; } +/* csum_partial is not consistent between different architectures. + * Some (i386) do a 32bit csum. Some (alpha) do 16 bit. + * This makes it hard for user-space to know what to do. + * So we use calc_sb_csum to set the checksum to allow working + * with older kernels, but allow calc_sb_csum_common to + * be used when checking if a checksum is correct, to + * make life easier for user-space tools that might write + * a superblock. + */ +static unsigned int calc_sb_csum_common(mdp_super_t *super) +{ + unsigned int disk_csum = super->sb_csum; + unsigned long long newcsum = 0; + unsigned int csum; + int i; + unsigned int *superc = (int*) super; + super->sb_csum = 0; + + for (i=0; i>32); + super->sb_csum = disk_csum; + return csum; +} + /* * Handle superblock details. * We want to be able to handle multiple superblock formats @@ -554,7 +579,8 @@ if (sb->raid_disks <= 0) goto abort; - if (calc_sb_csum(sb) != sb->sb_csum) { + if (calc_sb_csum(sb) != sb->sb_csum && + calc_sb_csum_common(sb) != sb->sb_csum) { printk(KERN_WARNING "md: invalid superblock checksum on %s\n", b); goto abort; @@ -778,11 +804,21 @@ static unsigned int calc_sb_1_csum(struct mdp_superblock_1 * sb) { unsigned int disk_csum, csum; + unsigned long long newcsum; int size = 256 + sb->max_dev*2; + unsigned int *isuper = (unsigned int*)sb; + int i; disk_csum = sb->sb_csum; sb->sb_csum = 0; - csum = csum_partial((void *)sb, size, 0); + newcsum = 0; + for (i=0; size>=4; size -= 4 ) + newcsum += le32_to_cpu(*isuper++); + + if (size == 2) + newcsum += le16_to_cpu(*(unsigned short*) isuper); + + csum = (newcsum & 0xffffffff) + (newcsum >> 32); sb->sb_csum = disk_csum; return csum; } @@ -1075,20 +1111,24 @@ /* * prevent the device from being mounted, repartitioned or * otherwise reused by a RAID array (or any other kernel - * subsystem), by opening the device. [simply getting an - * inode is not enough, the SCSI module usage code needs - * an explicit open() on the device] + * subsystem), by bd_claiming the device. */ static int lock_rdev(mdk_rdev_t *rdev, dev_t dev) { int err = 0; struct block_device *bdev; + char b[BDEVNAME_SIZE]; bdev = open_by_devnum(dev, FMODE_READ|FMODE_WRITE); - if (IS_ERR(bdev)) + if (IS_ERR(bdev)) { + printk(KERN_ERR "md: could not open %s.\n", + __bdevname(dev, b)); return PTR_ERR(bdev); + } err = bd_claim(bdev, rdev); if (err) { + printk(KERN_ERR "md: could not bd_claim %s.\n", + bdevname(bdev, b)); blkdev_put(bdev); return err; } @@ -1150,10 +1190,7 @@ static void print_desc(mdp_disk_t *desc) { - char b[BDEVNAME_SIZE]; - - printk(" DISK\n", desc->number, - __bdevname(MKDEV(desc->major, desc->minor), b), + printk(" DISK\n", desc->number, desc->major,desc->minor,desc->raid_disk,desc->state); } @@ -1345,8 +1382,7 @@ rdev = (mdk_rdev_t *) kmalloc(sizeof(*rdev), GFP_KERNEL); if (!rdev) { - printk(KERN_ERR "md: could not alloc mem for %s!\n", - __bdevname(newdev, b)); + printk(KERN_ERR "md: could not alloc mem for new device!\n"); return ERR_PTR(-ENOMEM); } memset(rdev, 0, sizeof(*rdev)); @@ -1355,11 +1391,9 @@ goto abort_free; err = lock_rdev(rdev, newdev); - if (err) { - printk(KERN_ERR "md: could not lock %s.\n", - __bdevname(newdev, b)); + if (err) goto abort_free; - } + rdev->desc_nr = -1; rdev->faulty = 0; rdev->in_sync = 0; @@ -1648,6 +1682,8 @@ mddev->pers = pers[pnum]; spin_unlock(&pers_lock); + mddev->resync_max_sectors = mddev->size << 1; /* may be over-ridden by personality */ + err = mddev->pers->run(mddev); if (err) { printk(KERN_ERR "md: pers->run() failed ...\n"); @@ -1915,11 +1951,9 @@ mdk_rdev_t *start_rdev = NULL, *rdev; start_rdev = md_import_device(startdev, 0, 0); - if (IS_ERR(start_rdev)) { - printk(KERN_WARNING "md: could not import %s!\n", - __bdevname(startdev, b)); + if (IS_ERR(start_rdev)) return err; - } + /* NOTE: this can only work for 0.90.0 superblocks */ sb = (mdp_super_t*)page_address(start_rdev->sb_page); @@ -1950,12 +1984,9 @@ if (MAJOR(dev) != desc->major || MINOR(dev) != desc->minor) continue; rdev = md_import_device(dev, 0, 0); - if (IS_ERR(rdev)) { - printk(KERN_WARNING "md: could not import %s," - " trying to run array nevertheless.\n", - __bdevname(dev, b)); + if (IS_ERR(rdev)) continue; - } + list_add(&rdev->same_set, &pending_raid_disks); } @@ -2187,42 +2218,6 @@ return 0; } -static int hot_generate_error(mddev_t * mddev, dev_t dev) -{ - char b[BDEVNAME_SIZE]; - struct request_queue *q; - mdk_rdev_t *rdev; - - if (!mddev->pers) - return -ENODEV; - - printk(KERN_INFO "md: trying to generate %s error in %s ... \n", - __bdevname(dev, b), mdname(mddev)); - - rdev = find_rdev(mddev, dev); - if (!rdev) { - /* MD_BUG(); */ /* like hell - it's not a driver bug */ - return -ENXIO; - } - - if (rdev->desc_nr == -1) { - MD_BUG(); - return -EINVAL; - } - if (!rdev->in_sync) - return -ENODEV; - - q = bdev_get_queue(rdev->bdev); - if (!q) { - MD_BUG(); - return -ENODEV; - } - printk(KERN_INFO "md: okay, generating error!\n"); -// q->oneshot_error = 1; // disabled for now - - return 0; -} - static int hot_remove_disk(mddev_t * mddev, dev_t dev) { char b[BDEVNAME_SIZE]; @@ -2231,9 +2226,6 @@ if (!mddev->pers) return -ENODEV; - printk(KERN_INFO "md: trying to remove %s from %s ... \n", - __bdevname(dev, b), mdname(mddev)); - rdev = find_rdev(mddev, dev); if (!rdev) return -ENXIO; @@ -2261,9 +2253,6 @@ if (!mddev->pers) return -ENODEV; - printk(KERN_INFO "md: trying to hot-add %s to %s ... \n", - __bdevname(dev, b), mdname(mddev)); - if (mddev->major_version != 0) { printk(KERN_WARNING "%s: HOT_ADD may only be used with" " version-0 superblocks.\n", @@ -2523,7 +2512,6 @@ static int md_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - char b[BDEVNAME_SIZE]; int err = 0; void __user *argp = (void __user *)arg; struct hd_geometry __user *loc = argp; @@ -2582,8 +2570,7 @@ } err = autostart_array(new_decode_dev(arg)); if (err) { - printk(KERN_WARNING "md: autostart %s failed!\n", - __bdevname(arg, b)); + printk(KERN_WARNING "md: autostart failed!\n"); goto abort; } goto done; @@ -2724,9 +2711,7 @@ err = add_new_disk(mddev, &info); goto done_unlock; } - case HOT_GENERATE_ERROR: - err = hot_generate_error(mddev, new_decode_dev(arg)); - goto done_unlock; + case HOT_REMOVE_DISK: err = hot_remove_disk(mddev, new_decode_dev(arg)); goto done_unlock; @@ -2953,6 +2938,7 @@ if (!mddev->pers->error_handler) return; mddev->pers->error_handler(mddev,rdev); + set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); md_wakeup_thread(mddev->thread); } @@ -2985,7 +2971,11 @@ unsigned long max_blocks, resync, res, dt, db, rt; resync = (mddev->curr_resync - atomic_read(&mddev->recovery_active))/2; - max_blocks = mddev->size; + + if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) + max_blocks = mddev->resync_max_sectors >> 1; + else + max_blocks = mddev->size; /* * Should not happen. @@ -3221,11 +3211,6 @@ return 0; } -void md_sync_acct(mdk_rdev_t *rdev, unsigned long nr_sectors) -{ - rdev->bdev->bd_contains->bd_disk->sync_io += nr_sectors; -} - static int is_mddev_idle(mddev_t *mddev) { mdk_rdev_t * rdev; @@ -3238,8 +3223,12 @@ struct gendisk *disk = rdev->bdev->bd_contains->bd_disk; curr_events = disk_stat_read(disk, read_sectors) + disk_stat_read(disk, write_sectors) - - disk->sync_io; - if ((curr_events - rdev->last_events) > 32) { + atomic_read(&disk->sync_io); + /* Allow some slack between valud of curr_events and last_events, + * as there are some uninteresting races. + * Note: the following is an unsigned comparison. + */ + if ((curr_events - rdev->last_events + 32) > 64) { rdev->last_events = curr_events; idle = 0; } @@ -3373,7 +3362,14 @@ } } while (mddev->curr_resync < 2); - max_sectors = mddev->size << 1; + if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) + /* resync follows the size requested by the personality, + * which default to physical size, but can be virtual size + */ + max_sectors = mddev->resync_max_sectors; + else + /* recovery follows the physical size of devices */ + max_sectors = mddev->size << 1; printk(KERN_INFO "md: syncing RAID array %s\n", mdname(mddev)); printk(KERN_INFO "md: minimum _guaranteed_ reconstruction speed:" @@ -3731,7 +3727,6 @@ static void autostart_arrays(int part) { - char b[BDEVNAME_SIZE]; mdk_rdev_t *rdev; int i; @@ -3741,11 +3736,9 @@ dev_t dev = detected_devices[i]; rdev = md_import_device(dev,0, 0); - if (IS_ERR(rdev)) { - printk(KERN_ALERT "md: could not import %s!\n", - __bdevname(dev, b)); + if (IS_ERR(rdev)) continue; - } + if (rdev->faulty) { MD_BUG(); continue; @@ -3796,7 +3789,6 @@ EXPORT_SYMBOL(register_md_personality); EXPORT_SYMBOL(unregister_md_personality); EXPORT_SYMBOL(md_error); -EXPORT_SYMBOL(md_sync_acct); EXPORT_SYMBOL(md_done_sync); EXPORT_SYMBOL(md_write_start); EXPORT_SYMBOL(md_write_end); diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c --- a/drivers/md/raid1.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/md/raid1.c 2004-09-06 16:37:53 -07:00 @@ -24,10 +24,6 @@ #include -#define MAJOR_NR MD_MAJOR -#define MD_DRIVER -#define MD_PERSONALITY - /* * Number of guaranteed r1bios in case of extreme VM load: */ @@ -44,13 +40,12 @@ { struct pool_info *pi = data; r1bio_t *r1_bio; + int size = offsetof(r1bio_t, bios[pi->raid_disks]); /* allocate a r1bio with room for raid_disks entries in the bios array */ - r1_bio = kmalloc(sizeof(r1bio_t) + sizeof(struct bio*)*pi->raid_disks, - gfp_flags); + r1_bio = kmalloc(size, gfp_flags); if (r1_bio) - memset(r1_bio, 0, sizeof(*r1_bio) + - sizeof(struct bio*) * pi->raid_disks); + memset(r1_bio, 0, size); else unplug_slaves(pi->mddev); @@ -104,7 +99,7 @@ bio->bi_io_vec[i].bv_page = page; } - r1_bio->master_bio = bio; + r1_bio->master_bio = NULL; return r1_bio; @@ -189,32 +184,6 @@ spin_unlock_irqrestore(&conf->resync_lock, flags); } -static int map(mddev_t *mddev, mdk_rdev_t **rdevp) -{ - conf_t *conf = mddev_to_conf(mddev); - int i, disks = conf->raid_disks; - - /* - * Later we do read balancing on the read side - * now we use the first available disk. - */ - - spin_lock_irq(&conf->device_lock); - for (i = 0; i < disks; i++) { - mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev && rdev->in_sync) { - *rdevp = rdev; - atomic_inc(&rdev->nr_pending); - spin_unlock_irq(&conf->device_lock); - return i; - } - } - spin_unlock_irq(&conf->device_lock); - - printk(KERN_ERR "raid1_map(): huh, no more operational devices?\n"); - return -1; -} - static void reschedule_retry(r1bio_t *r1_bio) { unsigned long flags; @@ -292,8 +261,9 @@ * oops, read error: */ char b[BDEVNAME_SIZE]; - printk(KERN_ERR "raid1: %s: rescheduling sector %llu\n", - bdevname(conf->mirrors[mirror].rdev->bdev,b), (unsigned long long)r1_bio->sector); + if (printk_ratelimit()) + printk(KERN_ERR "raid1: %s: rescheduling sector %llu\n", + bdevname(conf->mirrors[mirror].rdev->bdev,b), (unsigned long long)r1_bio->sector); reschedule_retry(r1_bio); } @@ -363,11 +333,11 @@ * * The rdev for the device selected will have nr_pending incremented. */ -static int read_balance(conf_t *conf, struct bio *bio, r1bio_t *r1_bio) +static int read_balance(conf_t *conf, r1bio_t *r1_bio) { const unsigned long this_sector = r1_bio->sector; int new_disk = conf->last_used, disk = new_disk; - const int sectors = bio->bi_size >> 9; + const int sectors = r1_bio->sectors; sector_t new_distance, current_distance; spin_lock_irq(&conf->device_lock); @@ -378,14 +348,14 @@ */ if (conf->mddev->recovery_cp < MaxSector && (this_sector + sectors >= conf->next_resync)) { - /* make sure that disk is operational */ + /* Choose the first operation device, for consistancy */ new_disk = 0; while (!conf->mirrors[new_disk].rdev || !conf->mirrors[new_disk].rdev->in_sync) { new_disk++; if (new_disk == conf->raid_disks) { - new_disk = 0; + new_disk = -1; break; } } @@ -400,7 +370,7 @@ new_disk = conf->raid_disks; new_disk--; if (new_disk == disk) { - new_disk = conf->last_used; + new_disk = -1; goto rb_out; } } @@ -440,13 +410,13 @@ } while (disk != conf->last_used); rb_out: - r1_bio->read_disk = new_disk; - conf->next_seq_sect = this_sector + sectors; - conf->last_used = new_disk; - if (conf->mirrors[new_disk].rdev) + if (new_disk >= 0) { + conf->next_seq_sect = this_sector + sectors; + conf->last_used = new_disk; atomic_inc(&conf->mirrors[new_disk].rdev->nr_pending); + } spin_unlock_irq(&conf->device_lock); return new_disk; @@ -571,15 +541,26 @@ r1_bio->mddev = mddev; r1_bio->sector = bio->bi_sector; + r1_bio->state = 0; + if (bio_data_dir(bio) == READ) { /* * read balancing logic: */ - mirror = conf->mirrors + read_balance(conf, bio, r1_bio); + int rdisk = read_balance(conf, r1_bio); + + if (rdisk < 0) { + /* couldn't find anywhere to read from */ + raid_end_bio_io(r1_bio); + return 0; + } + mirror = conf->mirrors + rdisk; + + r1_bio->read_disk = rdisk; read_bio = bio_clone(bio, GFP_NOIO); - r1_bio->bios[r1_bio->read_disk] = read_bio; + r1_bio->bios[rdisk] = read_bio; read_bio->bi_sector = r1_bio->sector + mirror->rdev->data_offset; read_bio->bi_bdev = mirror->rdev->bdev; @@ -903,7 +884,7 @@ atomic_inc(&conf->mirrors[i].rdev->nr_pending); atomic_inc(&r1_bio->remaining); - md_sync_acct(conf->mirrors[i].rdev, wbio->bi_size >> 9); + md_sync_acct(conf->mirrors[i].rdev->bdev, wbio->bi_size >> 9); generic_make_request(wbio); } @@ -951,7 +932,7 @@ } else { int disk; bio = r1_bio->bios[r1_bio->read_disk]; - if ((disk=map(mddev, &rdev)) == -1) { + if ((disk=read_balance(conf, r1_bio)) == -1) { printk(KERN_ALERT "raid1: %s: unrecoverable I/O" " read error for block %llu\n", bdevname(bio->bi_bdev,b), @@ -961,10 +942,12 @@ r1_bio->bios[r1_bio->read_disk] = NULL; r1_bio->read_disk = disk; r1_bio->bios[r1_bio->read_disk] = bio; - printk(KERN_ERR "raid1: %s: redirecting sector %llu to" - " another mirror\n", - bdevname(rdev->bdev,b), - (unsigned long long)r1_bio->sector); + rdev = conf->mirrors[disk].rdev; + if (printk_ratelimit()) + printk(KERN_ERR "raid1: %s: redirecting sector %llu to" + " another mirror\n", + bdevname(rdev->bdev,b), + (unsigned long long)r1_bio->sector); bio->bi_bdev = rdev->bdev; bio->bi_sector = r1_bio->sector + rdev->data_offset; bio->bi_rw = READ; @@ -1143,7 +1126,7 @@ bio = r1_bio->bios[disk]; r1_bio->sectors = nr_sectors; - md_sync_acct(mirror->rdev, nr_sectors); + md_sync_acct(mirror->rdev->bdev, nr_sectors); generic_make_request(bio); diff -Nru a/drivers/md/raid10.c b/drivers/md/raid10.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/md/raid10.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1780 @@ +/* + * raid10.c : Multiple Devices driver for Linux + * + * Copyright (C) 2000-2004 Neil Brown + * + * RAID-10 support for md. + * + * Base on code in raid1.c. See raid1.c for futher copyright information. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * You should have received a copy of the GNU General Public License + * (for example /usr/src/linux/COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +/* + * RAID10 provides a combination of RAID0 and RAID1 functionality. + * The layout of data is defined by + * chunk_size + * raid_disks + * near_copies (stored in low byte of layout) + * far_copies (stored in second byte of layout) + * + * The data to be stored is divided into chunks using chunksize. + * Each device is divided into far_copies sections. + * In each section, chunks are laid out in a style similar to raid0, but + * near_copies copies of each chunk is stored (each on a different drive). + * The starting device for each section is offset near_copies from the starting + * device of the previous section. + * Thus there are (near_copies*far_copies) of each chunk, and each is on a different + * drive. + * near_copies and far_copies must be at least one, and there product is at most + * raid_disks. + */ + +/* + * Number of guaranteed r10bios in case of extreme VM load: + */ +#define NR_RAID10_BIOS 256 + +static void unplug_slaves(mddev_t *mddev); + +static void * r10bio_pool_alloc(int gfp_flags, void *data) +{ + conf_t *conf = data; + r10bio_t *r10_bio; + int size = offsetof(struct r10bio_s, devs[conf->copies]); + + /* allocate a r10bio with room for raid_disks entries in the bios array */ + r10_bio = kmalloc(size, gfp_flags); + if (r10_bio) + memset(r10_bio, 0, size); + else + unplug_slaves(conf->mddev); + + return r10_bio; +} + +static void r10bio_pool_free(void *r10_bio, void *data) +{ + kfree(r10_bio); +} + +#define RESYNC_BLOCK_SIZE (64*1024) +//#define RESYNC_BLOCK_SIZE PAGE_SIZE +#define RESYNC_SECTORS (RESYNC_BLOCK_SIZE >> 9) +#define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE) +#define RESYNC_WINDOW (2048*1024) + +/* + * When performing a resync, we need to read and compare, so + * we need as many pages are there are copies. + * When performing a recovery, we need 2 bios, one for read, + * one for write (we recover only one drive per r10buf) + * + */ +static void * r10buf_pool_alloc(int gfp_flags, void *data) +{ + conf_t *conf = data; + struct page *page; + r10bio_t *r10_bio; + struct bio *bio; + int i, j; + int nalloc; + + r10_bio = r10bio_pool_alloc(gfp_flags, conf); + if (!r10_bio) { + unplug_slaves(conf->mddev); + return NULL; + } + + if (test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery)) + nalloc = conf->copies; /* resync */ + else + nalloc = 2; /* recovery */ + + /* + * Allocate bios. + */ + for (j = nalloc ; j-- ; ) { + bio = bio_alloc(gfp_flags, RESYNC_PAGES); + if (!bio) + goto out_free_bio; + r10_bio->devs[j].bio = bio; + } + /* + * Allocate RESYNC_PAGES data pages and attach them + * where needed. + */ + for (j = 0 ; j < nalloc; j++) { + bio = r10_bio->devs[j].bio; + for (i = 0; i < RESYNC_PAGES; i++) { + page = alloc_page(gfp_flags); + if (unlikely(!page)) + goto out_free_pages; + + bio->bi_io_vec[i].bv_page = page; + } + } + + return r10_bio; + +out_free_pages: + for ( ; i > 0 ; i--) + __free_page(bio->bi_io_vec[i-1].bv_page); + while (j--) + for (i = 0; i < RESYNC_PAGES ; i++) + __free_page(r10_bio->devs[j].bio->bi_io_vec[i].bv_page); + j = -1; +out_free_bio: + while ( ++j < nalloc ) + bio_put(r10_bio->devs[j].bio); + r10bio_pool_free(r10_bio, conf); + return NULL; +} + +static void r10buf_pool_free(void *__r10_bio, void *data) +{ + int i; + conf_t *conf = data; + r10bio_t *r10bio = __r10_bio; + int j; + + for (j=0; j < conf->copies; j++) { + struct bio *bio = r10bio->devs[j].bio; + if (bio) { + for (i = 0; i < RESYNC_PAGES; i++) { + __free_page(bio->bi_io_vec[i].bv_page); + bio->bi_io_vec[i].bv_page = NULL; + } + bio_put(bio); + } + } + r10bio_pool_free(r10bio, conf); +} + +static void put_all_bios(conf_t *conf, r10bio_t *r10_bio) +{ + int i; + + for (i = 0; i < conf->copies; i++) { + struct bio **bio = & r10_bio->devs[i].bio; + if (*bio) + bio_put(*bio); + *bio = NULL; + } +} + +static inline void free_r10bio(r10bio_t *r10_bio) +{ + unsigned long flags; + + conf_t *conf = mddev_to_conf(r10_bio->mddev); + + /* + * Wake up any possible resync thread that waits for the device + * to go idle. + */ + spin_lock_irqsave(&conf->resync_lock, flags); + if (!--conf->nr_pending) { + wake_up(&conf->wait_idle); + wake_up(&conf->wait_resume); + } + spin_unlock_irqrestore(&conf->resync_lock, flags); + + put_all_bios(conf, r10_bio); + mempool_free(r10_bio, conf->r10bio_pool); +} + +static inline void put_buf(r10bio_t *r10_bio) +{ + conf_t *conf = mddev_to_conf(r10_bio->mddev); + unsigned long flags; + + mempool_free(r10_bio, conf->r10buf_pool); + + spin_lock_irqsave(&conf->resync_lock, flags); + if (!conf->barrier) + BUG(); + --conf->barrier; + wake_up(&conf->wait_resume); + wake_up(&conf->wait_idle); + + if (!--conf->nr_pending) { + wake_up(&conf->wait_idle); + wake_up(&conf->wait_resume); + } + spin_unlock_irqrestore(&conf->resync_lock, flags); +} + +static void reschedule_retry(r10bio_t *r10_bio) +{ + unsigned long flags; + mddev_t *mddev = r10_bio->mddev; + conf_t *conf = mddev_to_conf(mddev); + + spin_lock_irqsave(&conf->device_lock, flags); + list_add(&r10_bio->retry_list, &conf->retry_list); + spin_unlock_irqrestore(&conf->device_lock, flags); + + md_wakeup_thread(mddev->thread); +} + +/* + * raid_end_bio_io() is called when we have finished servicing a mirrored + * operation and are ready to return a success/failure code to the buffer + * cache layer. + */ +static void raid_end_bio_io(r10bio_t *r10_bio) +{ + struct bio *bio = r10_bio->master_bio; + + bio_endio(bio, bio->bi_size, + test_bit(R10BIO_Uptodate, &r10_bio->state) ? 0 : -EIO); + free_r10bio(r10_bio); +} + +/* + * Update disk head position estimator based on IRQ completion info. + */ +static inline void update_head_pos(int slot, r10bio_t *r10_bio) +{ + conf_t *conf = mddev_to_conf(r10_bio->mddev); + + conf->mirrors[r10_bio->devs[slot].devnum].head_position = + r10_bio->devs[slot].addr + (r10_bio->sectors); +} + +static int raid10_end_read_request(struct bio *bio, unsigned int bytes_done, int error) +{ + int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); + r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); + int slot, dev; + conf_t *conf = mddev_to_conf(r10_bio->mddev); + + if (bio->bi_size) + return 1; + + slot = r10_bio->read_slot; + dev = r10_bio->devs[slot].devnum; + /* + * this branch is our 'one mirror IO has finished' event handler: + */ + if (!uptodate) + md_error(r10_bio->mddev, conf->mirrors[dev].rdev); + else + /* + * Set R10BIO_Uptodate in our master bio, so that + * we will return a good error code to the higher + * levels even if IO on some other mirrored buffer fails. + * + * The 'master' represents the composite IO operation to + * user-side. So if something waits for IO, then it will + * wait for the 'master' bio. + */ + set_bit(R10BIO_Uptodate, &r10_bio->state); + + update_head_pos(slot, r10_bio); + + /* + * we have only one bio on the read side + */ + if (uptodate) + raid_end_bio_io(r10_bio); + else { + /* + * oops, read error: + */ + char b[BDEVNAME_SIZE]; + if (printk_ratelimit()) + printk(KERN_ERR "raid10: %s: rescheduling sector %llu\n", + bdevname(conf->mirrors[dev].rdev->bdev,b), (unsigned long long)r10_bio->sector); + reschedule_retry(r10_bio); + } + + rdev_dec_pending(conf->mirrors[dev].rdev, conf->mddev); + return 0; +} + +static int raid10_end_write_request(struct bio *bio, unsigned int bytes_done, int error) +{ + int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); + r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); + int slot, dev; + conf_t *conf = mddev_to_conf(r10_bio->mddev); + + if (bio->bi_size) + return 1; + + for (slot = 0; slot < conf->copies; slot++) + if (r10_bio->devs[slot].bio == bio) + break; + dev = r10_bio->devs[slot].devnum; + + /* + * this branch is our 'one mirror IO has finished' event handler: + */ + if (!uptodate) + md_error(r10_bio->mddev, conf->mirrors[dev].rdev); + else + /* + * Set R10BIO_Uptodate in our master bio, so that + * we will return a good error code for to the higher + * levels even if IO on some other mirrored buffer fails. + * + * The 'master' represents the composite IO operation to + * user-side. So if something waits for IO, then it will + * wait for the 'master' bio. + */ + set_bit(R10BIO_Uptodate, &r10_bio->state); + + update_head_pos(slot, r10_bio); + + /* + * + * Let's see if all mirrored write operations have finished + * already. + */ + if (atomic_dec_and_test(&r10_bio->remaining)) { + md_write_end(r10_bio->mddev); + raid_end_bio_io(r10_bio); + } + + rdev_dec_pending(conf->mirrors[dev].rdev, conf->mddev); + return 0; +} + + +/* + * RAID10 layout manager + * Aswell as the chunksize and raid_disks count, there are two + * parameters: near_copies and far_copies. + * near_copies * far_copies must be <= raid_disks. + * Normally one of these will be 1. + * If both are 1, we get raid0. + * If near_copies == raid_disks, we get raid1. + * + * Chunks are layed out in raid0 style with near_copies copies of the + * first chunk, followed by near_copies copies of the next chunk and + * so on. + * If far_copies > 1, then after 1/far_copies of the array has been assigned + * as described above, we start again with a device offset of near_copies. + * So we effectively have another copy of the whole array further down all + * the drives, but with blocks on different drives. + * With this layout, and block is never stored twice on the one device. + * + * raid10_find_phys finds the sector offset of a given virtual sector + * on each device that it is on. If a block isn't on a device, + * that entry in the array is set to MaxSector. + * + * raid10_find_virt does the reverse mapping, from a device and a + * sector offset to a virtual address + */ + +static void raid10_find_phys(conf_t *conf, r10bio_t *r10bio) +{ + int n,f; + sector_t sector; + sector_t chunk; + sector_t stripe; + int dev; + + int slot = 0; + + /* now calculate first sector/dev */ + chunk = r10bio->sector >> conf->chunk_shift; + sector = r10bio->sector & conf->chunk_mask; + + chunk *= conf->near_copies; + stripe = chunk; + dev = sector_div(stripe, conf->raid_disks); + + sector += stripe << conf->chunk_shift; + + /* and calculate all the others */ + for (n=0; n < conf->near_copies; n++) { + int d = dev; + sector_t s = sector; + r10bio->devs[slot].addr = sector; + r10bio->devs[slot].devnum = d; + slot++; + + for (f = 1; f < conf->far_copies; f++) { + d += conf->near_copies; + if (d >= conf->raid_disks) + d -= conf->raid_disks; + s += conf->stride; + r10bio->devs[slot].devnum = d; + r10bio->devs[slot].addr = s; + slot++; + } + dev++; + if (dev >= conf->raid_disks) { + dev = 0; + sector += (conf->chunk_mask + 1); + } + } + BUG_ON(slot != conf->copies); +} + +static sector_t raid10_find_virt(conf_t *conf, sector_t sector, int dev) +{ + sector_t offset, chunk, vchunk; + + while (sector > conf->stride) { + sector -= conf->stride; + if (dev < conf->near_copies) + dev += conf->raid_disks - conf->near_copies; + else + dev -= conf->near_copies; + } + + offset = sector & conf->chunk_mask; + chunk = sector >> conf->chunk_shift; + vchunk = chunk * conf->raid_disks + dev; + sector_div(vchunk, conf->near_copies); + return (vchunk << conf->chunk_shift) + offset; +} + +/** + * raid10_mergeable_bvec -- tell bio layer if a two requests can be merged + * @q: request queue + * @bio: the buffer head that's been built up so far + * @biovec: the request that could be merged to it. + * + * Return amount of bytes we can accept at this offset + * If near_copies == raid_disk, there are no striping issues, + * but in that case, the function isn't called at all. + */ +static int raid10_mergeable_bvec(request_queue_t *q, struct bio *bio, + struct bio_vec *bio_vec) +{ + mddev_t *mddev = q->queuedata; + sector_t sector = bio->bi_sector + get_start_sect(bio->bi_bdev); + int max; + unsigned int chunk_sectors = mddev->chunk_size >> 9; + unsigned int bio_sectors = bio->bi_size >> 9; + + max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; + if (max < 0) max = 0; /* bio_add cannot handle a negative return */ + if (max <= bio_vec->bv_len && bio_sectors == 0) + return bio_vec->bv_len; + else + return max; +} + +/* + * This routine returns the disk from which the requested read should + * be done. There is a per-array 'next expected sequential IO' sector + * number - if this matches on the next IO then we use the last disk. + * There is also a per-disk 'last know head position' sector that is + * maintained from IRQ contexts, both the normal and the resync IO + * completion handlers update this position correctly. If there is no + * perfect sequential match then we pick the disk whose head is closest. + * + * If there are 2 mirrors in the same 2 devices, performance degrades + * because position is mirror, not device based. + * + * The rdev for the device selected will have nr_pending incremented. + */ + +/* + * FIXME: possibly should rethink readbalancing and do it differently + * depending on near_copies / far_copies geometry. + */ +static int read_balance(conf_t *conf, r10bio_t *r10_bio) +{ + const unsigned long this_sector = r10_bio->sector; + int disk, slot, nslot; + const int sectors = r10_bio->sectors; + sector_t new_distance, current_distance; + + raid10_find_phys(conf, r10_bio); + spin_lock_irq(&conf->device_lock); + /* + * Check if we can balance. We can balance on the whole + * device if no resync is going on, or below the resync window. + * We take the first readable disk when above the resync window. + */ + if (conf->mddev->recovery_cp < MaxSector + && (this_sector + sectors >= conf->next_resync)) { + /* make sure that disk is operational */ + slot = 0; + disk = r10_bio->devs[slot].devnum; + + while (!conf->mirrors[disk].rdev || + !conf->mirrors[disk].rdev->in_sync) { + slot++; + if (slot == conf->copies) { + slot = 0; + disk = -1; + break; + } + disk = r10_bio->devs[slot].devnum; + } + goto rb_out; + } + + + /* make sure the disk is operational */ + slot = 0; + disk = r10_bio->devs[slot].devnum; + while (!conf->mirrors[disk].rdev || + !conf->mirrors[disk].rdev->in_sync) { + slot ++; + if (slot == conf->copies) { + disk = -1; + goto rb_out; + } + disk = r10_bio->devs[slot].devnum; + } + + + current_distance = abs(this_sector - conf->mirrors[disk].head_position); + + /* Find the disk whose head is closest */ + + for (nslot = slot; nslot < conf->copies; nslot++) { + int ndisk = r10_bio->devs[nslot].devnum; + + + if (!conf->mirrors[ndisk].rdev || + !conf->mirrors[ndisk].rdev->in_sync) + continue; + + if (!atomic_read(&conf->mirrors[ndisk].rdev->nr_pending)) { + disk = ndisk; + slot = nslot; + break; + } + new_distance = abs(r10_bio->devs[nslot].addr - + conf->mirrors[ndisk].head_position); + if (new_distance < current_distance) { + current_distance = new_distance; + disk = ndisk; + slot = nslot; + } + } + +rb_out: + r10_bio->read_slot = slot; +/* conf->next_seq_sect = this_sector + sectors;*/ + + if (disk >= 0 && conf->mirrors[disk].rdev) + atomic_inc(&conf->mirrors[disk].rdev->nr_pending); + spin_unlock_irq(&conf->device_lock); + + return disk; +} + +static void unplug_slaves(mddev_t *mddev) +{ + conf_t *conf = mddev_to_conf(mddev); + int i; + unsigned long flags; + + spin_lock_irqsave(&conf->device_lock, flags); + for (i=0; iraid_disks; i++) { + mdk_rdev_t *rdev = conf->mirrors[i].rdev; + if (rdev && atomic_read(&rdev->nr_pending)) { + request_queue_t *r_queue = bdev_get_queue(rdev->bdev); + + atomic_inc(&rdev->nr_pending); + spin_unlock_irqrestore(&conf->device_lock, flags); + + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); + + spin_lock_irqsave(&conf->device_lock, flags); + atomic_dec(&rdev->nr_pending); + } + } + spin_unlock_irqrestore(&conf->device_lock, flags); +} +static void raid10_unplug(request_queue_t *q) +{ + unplug_slaves(q->queuedata); +} + +static int raid10_issue_flush(request_queue_t *q, struct gendisk *disk, + sector_t *error_sector) +{ + mddev_t *mddev = q->queuedata; + conf_t *conf = mddev_to_conf(mddev); + unsigned long flags; + int i, ret = 0; + + spin_lock_irqsave(&conf->device_lock, flags); + for (i=0; iraid_disks; i++) { + mdk_rdev_t *rdev = conf->mirrors[i].rdev; + if (rdev && !rdev->faulty) { + struct block_device *bdev = rdev->bdev; + request_queue_t *r_queue = bdev_get_queue(bdev); + + if (r_queue->issue_flush_fn) { + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, error_sector); + if (ret) + break; + } + } + } + spin_unlock_irqrestore(&conf->device_lock, flags); + return ret; +} + +/* + * Throttle resync depth, so that we can both get proper overlapping of + * requests, but are still able to handle normal requests quickly. + */ +#define RESYNC_DEPTH 32 + +static void device_barrier(conf_t *conf, sector_t sect) +{ + spin_lock_irq(&conf->resync_lock); + wait_event_lock_irq(conf->wait_idle, !waitqueue_active(&conf->wait_resume), + conf->resync_lock, unplug_slaves(conf->mddev)); + + if (!conf->barrier++) { + wait_event_lock_irq(conf->wait_idle, !conf->nr_pending, + conf->resync_lock, unplug_slaves(conf->mddev)); + if (conf->nr_pending) + BUG(); + } + wait_event_lock_irq(conf->wait_resume, conf->barrier < RESYNC_DEPTH, + conf->resync_lock, unplug_slaves(conf->mddev)); + conf->next_resync = sect; + spin_unlock_irq(&conf->resync_lock); +} + +static int make_request(request_queue_t *q, struct bio * bio) +{ + mddev_t *mddev = q->queuedata; + conf_t *conf = mddev_to_conf(mddev); + mirror_info_t *mirror; + r10bio_t *r10_bio; + struct bio *read_bio; + int i; + int chunk_sects = conf->chunk_mask + 1; + + /* If this request crosses a chunk boundary, we need to + * split it. This will only happen for 1 PAGE (or less) requests. + */ + if (unlikely( (bio->bi_sector & conf->chunk_mask) + (bio->bi_size >> 9) + > chunk_sects && + conf->near_copies < conf->raid_disks)) { + struct bio_pair *bp; + /* Sanity check -- queue functions should prevent this happening */ + if (bio->bi_vcnt != 1 || + bio->bi_idx != 0) + goto bad_map; + /* This is a one page bio that upper layers + * refuse to split for us, so we need to split it. + */ + bp = bio_split(bio, bio_split_pool, + chunk_sects - (bio->bi_sector & (chunk_sects - 1)) ); + if (make_request(q, &bp->bio1)) + generic_make_request(&bp->bio1); + if (make_request(q, &bp->bio2)) + generic_make_request(&bp->bio2); + + bio_pair_release(bp); + return 0; + bad_map: + printk("raid10_make_request bug: can't convert block across chunks" + " or bigger than %dk %llu %d\n", chunk_sects/2, + (unsigned long long)bio->bi_sector, bio->bi_size >> 10); + + bio_io_error(bio, bio->bi_size); + return 0; + } + + /* + * Register the new request and wait if the reconstruction + * thread has put up a bar for new requests. + * Continue immediately if no resync is active currently. + */ + spin_lock_irq(&conf->resync_lock); + wait_event_lock_irq(conf->wait_resume, !conf->barrier, conf->resync_lock, ); + conf->nr_pending++; + spin_unlock_irq(&conf->resync_lock); + + if (bio_data_dir(bio)==WRITE) { + disk_stat_inc(mddev->gendisk, writes); + disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio)); + } else { + disk_stat_inc(mddev->gendisk, reads); + disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bio)); + } + + r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO); + + r10_bio->master_bio = bio; + r10_bio->sectors = bio->bi_size >> 9; + + r10_bio->mddev = mddev; + r10_bio->sector = bio->bi_sector; + + if (bio_data_dir(bio) == READ) { + /* + * read balancing logic: + */ + int disk = read_balance(conf, r10_bio); + int slot = r10_bio->read_slot; + if (disk < 0) { + raid_end_bio_io(r10_bio); + return 0; + } + mirror = conf->mirrors + disk; + + read_bio = bio_clone(bio, GFP_NOIO); + + r10_bio->devs[slot].bio = read_bio; + + read_bio->bi_sector = r10_bio->devs[slot].addr + + mirror->rdev->data_offset; + read_bio->bi_bdev = mirror->rdev->bdev; + read_bio->bi_end_io = raid10_end_read_request; + read_bio->bi_rw = READ; + read_bio->bi_private = r10_bio; + + generic_make_request(read_bio); + return 0; + } + + /* + * WRITE: + */ + /* first select target devices under spinlock and + * inc refcount on their rdev. Record them by setting + * bios[x] to bio + */ + raid10_find_phys(conf, r10_bio); + spin_lock_irq(&conf->device_lock); + for (i = 0; i < conf->copies; i++) { + int d = r10_bio->devs[i].devnum; + if (conf->mirrors[d].rdev && + !conf->mirrors[d].rdev->faulty) { + atomic_inc(&conf->mirrors[d].rdev->nr_pending); + r10_bio->devs[i].bio = bio; + } else + r10_bio->devs[i].bio = NULL; + } + spin_unlock_irq(&conf->device_lock); + + atomic_set(&r10_bio->remaining, 1); + md_write_start(mddev); + for (i = 0; i < conf->copies; i++) { + struct bio *mbio; + int d = r10_bio->devs[i].devnum; + if (!r10_bio->devs[i].bio) + continue; + + mbio = bio_clone(bio, GFP_NOIO); + r10_bio->devs[i].bio = mbio; + + mbio->bi_sector = r10_bio->devs[i].addr+ + conf->mirrors[d].rdev->data_offset; + mbio->bi_bdev = conf->mirrors[d].rdev->bdev; + mbio->bi_end_io = raid10_end_write_request; + mbio->bi_rw = WRITE; + mbio->bi_private = r10_bio; + + atomic_inc(&r10_bio->remaining); + generic_make_request(mbio); + } + + if (atomic_dec_and_test(&r10_bio->remaining)) { + md_write_end(mddev); + raid_end_bio_io(r10_bio); + } + + return 0; +} + +static void status(struct seq_file *seq, mddev_t *mddev) +{ + conf_t *conf = mddev_to_conf(mddev); + int i; + + if (conf->near_copies < conf->raid_disks) + seq_printf(seq, " %dK chunks", mddev->chunk_size/1024); + if (conf->near_copies > 1) + seq_printf(seq, " %d near-copies", conf->near_copies); + if (conf->far_copies > 1) + seq_printf(seq, " %d far-copies", conf->far_copies); + + seq_printf(seq, " [%d/%d] [", conf->raid_disks, + conf->working_disks); + for (i = 0; i < conf->raid_disks; i++) + seq_printf(seq, "%s", + conf->mirrors[i].rdev && + conf->mirrors[i].rdev->in_sync ? "U" : "_"); + seq_printf(seq, "]"); +} + +static void error(mddev_t *mddev, mdk_rdev_t *rdev) +{ + char b[BDEVNAME_SIZE]; + conf_t *conf = mddev_to_conf(mddev); + + /* + * If it is not operational, then we have already marked it as dead + * else if it is the last working disks, ignore the error, let the + * next level up know. + * else mark the drive as failed + */ + if (rdev->in_sync + && conf->working_disks == 1) + /* + * Don't fail the drive, just return an IO error. + * The test should really be more sophisticated than + * "working_disks == 1", but it isn't critical, and + * can wait until we do more sophisticated "is the drive + * really dead" tests... + */ + return; + if (rdev->in_sync) { + mddev->degraded++; + conf->working_disks--; + /* + * if recovery is running, make sure it aborts. + */ + set_bit(MD_RECOVERY_ERR, &mddev->recovery); + } + rdev->in_sync = 0; + rdev->faulty = 1; + mddev->sb_dirty = 1; + printk(KERN_ALERT "raid10: Disk failure on %s, disabling device. \n" + " Operation continuing on %d devices\n", + bdevname(rdev->bdev,b), conf->working_disks); +} + +static void print_conf(conf_t *conf) +{ + int i; + mirror_info_t *tmp; + + printk("RAID10 conf printout:\n"); + if (!conf) { + printk("(!conf)\n"); + return; + } + printk(" --- wd:%d rd:%d\n", conf->working_disks, + conf->raid_disks); + + for (i = 0; i < conf->raid_disks; i++) { + char b[BDEVNAME_SIZE]; + tmp = conf->mirrors + i; + if (tmp->rdev) + printk(" disk %d, wo:%d, o:%d, dev:%s\n", + i, !tmp->rdev->in_sync, !tmp->rdev->faulty, + bdevname(tmp->rdev->bdev,b)); + } +} + +static void close_sync(conf_t *conf) +{ + spin_lock_irq(&conf->resync_lock); + wait_event_lock_irq(conf->wait_resume, !conf->barrier, + conf->resync_lock, unplug_slaves(conf->mddev)); + spin_unlock_irq(&conf->resync_lock); + + if (conf->barrier) BUG(); + if (waitqueue_active(&conf->wait_idle)) BUG(); + + mempool_destroy(conf->r10buf_pool); + conf->r10buf_pool = NULL; +} + +static int raid10_spare_active(mddev_t *mddev) +{ + int i; + conf_t *conf = mddev->private; + mirror_info_t *tmp; + + spin_lock_irq(&conf->device_lock); + /* + * Find all non-in_sync disks within the RAID10 configuration + * and mark them in_sync + */ + for (i = 0; i < conf->raid_disks; i++) { + tmp = conf->mirrors + i; + if (tmp->rdev + && !tmp->rdev->faulty + && !tmp->rdev->in_sync) { + conf->working_disks++; + mddev->degraded--; + tmp->rdev->in_sync = 1; + } + } + spin_unlock_irq(&conf->device_lock); + + print_conf(conf); + return 0; +} + + +static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) +{ + conf_t *conf = mddev->private; + int found = 0; + int mirror; + mirror_info_t *p; + + if (mddev->recovery_cp < MaxSector) + /* only hot-add to in-sync arrays, as recovery is + * very different from resync + */ + return 0; + spin_lock_irq(&conf->device_lock); + for (mirror=0; mirror < mddev->raid_disks; mirror++) + if ( !(p=conf->mirrors+mirror)->rdev) { + p->rdev = rdev; + + blk_queue_stack_limits(mddev->queue, + rdev->bdev->bd_disk->queue); + /* as we don't honour merge_bvec_fn, we must never risk + * violating it, so limit ->max_sector to one PAGE, as + * a one page request is never in violation. + */ + if (rdev->bdev->bd_disk->queue->merge_bvec_fn && + mddev->queue->max_sectors > (PAGE_SIZE>>9)) + mddev->queue->max_sectors = (PAGE_SIZE>>9); + + p->head_position = 0; + rdev->raid_disk = mirror; + found = 1; + break; + } + spin_unlock_irq(&conf->device_lock); + + print_conf(conf); + return found; +} + +static int raid10_remove_disk(mddev_t *mddev, int number) +{ + conf_t *conf = mddev->private; + int err = 1; + mirror_info_t *p = conf->mirrors+ number; + + print_conf(conf); + spin_lock_irq(&conf->device_lock); + if (p->rdev) { + if (p->rdev->in_sync || + atomic_read(&p->rdev->nr_pending)) { + err = -EBUSY; + goto abort; + } + p->rdev = NULL; + err = 0; + } + if (err) + MD_BUG(); +abort: + spin_unlock_irq(&conf->device_lock); + + print_conf(conf); + return err; +} + + +static int end_sync_read(struct bio *bio, unsigned int bytes_done, int error) +{ + int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); + r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); + conf_t *conf = mddev_to_conf(r10_bio->mddev); + int i,d; + + if (bio->bi_size) + return 1; + + for (i=0; icopies; i++) + if (r10_bio->devs[i].bio == bio) + break; + if (i == conf->copies) + BUG(); + update_head_pos(i, r10_bio); + d = r10_bio->devs[i].devnum; + if (!uptodate) + md_error(r10_bio->mddev, + conf->mirrors[d].rdev); + + /* for reconstruct, we always reschedule after a read. + * for resync, only after all reads + */ + if (test_bit(R10BIO_IsRecover, &r10_bio->state) || + atomic_dec_and_test(&r10_bio->remaining)) { + /* we have read all the blocks, + * do the comparison in process context in raid10d + */ + reschedule_retry(r10_bio); + } + rdev_dec_pending(conf->mirrors[d].rdev, conf->mddev); + return 0; +} + +static int end_sync_write(struct bio *bio, unsigned int bytes_done, int error) +{ + int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); + r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); + mddev_t *mddev = r10_bio->mddev; + conf_t *conf = mddev_to_conf(mddev); + int i,d; + + if (bio->bi_size) + return 1; + + for (i = 0; i < conf->copies; i++) + if (r10_bio->devs[i].bio == bio) + break; + d = r10_bio->devs[i].devnum; + + if (!uptodate) + md_error(mddev, conf->mirrors[d].rdev); + update_head_pos(i, r10_bio); + + while (atomic_dec_and_test(&r10_bio->remaining)) { + if (r10_bio->master_bio == NULL) { + /* the primary of several recovery bios */ + md_done_sync(mddev, r10_bio->sectors, 1); + put_buf(r10_bio); + break; + } else { + r10bio_t *r10_bio2 = (r10bio_t *)r10_bio->master_bio; + put_buf(r10_bio); + r10_bio = r10_bio2; + } + } + rdev_dec_pending(conf->mirrors[d].rdev, mddev); + return 0; +} + +/* + * Note: sync and recover and handled very differently for raid10 + * This code is for resync. + * For resync, we read through virtual addresses and read all blocks. + * If there is any error, we schedule a write. The lowest numbered + * drive is authoritative. + * However requests come for physical address, so we need to map. + * For every physical address there are raid_disks/copies virtual addresses, + * which is always are least one, but is not necessarly an integer. + * This means that a physical address can span multiple chunks, so we may + * have to submit multiple io requests for a single sync request. + */ +/* + * We check if all blocks are in-sync and only write to blocks that + * aren't in sync + */ +static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio) +{ + conf_t *conf = mddev_to_conf(mddev); + int i, first; + struct bio *tbio, *fbio; + + atomic_set(&r10_bio->remaining, 1); + + /* find the first device with a block */ + for (i=0; icopies; i++) + if (test_bit(BIO_UPTODATE, &r10_bio->devs[i].bio->bi_flags)) + break; + + if (i == conf->copies) + goto done; + + first = i; + fbio = r10_bio->devs[i].bio; + + /* now find blocks with errors */ + for (i=first+1 ; i < conf->copies ; i++) { + int vcnt, j, d; + + if (!test_bit(BIO_UPTODATE, &r10_bio->devs[i].bio->bi_flags)) + continue; + /* We know that the bi_io_vec layout is the same for + * both 'first' and 'i', so we just compare them. + * All vec entries are PAGE_SIZE; + */ + tbio = r10_bio->devs[i].bio; + vcnt = r10_bio->sectors >> (PAGE_SHIFT-9); + for (j = 0; j < vcnt; j++) + if (memcmp(page_address(fbio->bi_io_vec[j].bv_page), + page_address(tbio->bi_io_vec[j].bv_page), + PAGE_SIZE)) + break; + if (j == vcnt) + continue; + /* Ok, we need to write this bio + * First we need to fixup bv_offset, bv_len and + * bi_vecs, as the read request might have corrupted these + */ + tbio->bi_vcnt = vcnt; + tbio->bi_size = r10_bio->sectors << 9; + tbio->bi_idx = 0; + tbio->bi_phys_segments = 0; + tbio->bi_hw_segments = 0; + tbio->bi_hw_front_size = 0; + tbio->bi_hw_back_size = 0; + tbio->bi_flags &= ~(BIO_POOL_MASK - 1); + tbio->bi_flags |= 1 << BIO_UPTODATE; + tbio->bi_next = NULL; + tbio->bi_rw = WRITE; + tbio->bi_private = r10_bio; + tbio->bi_sector = r10_bio->devs[i].addr; + + for (j=0; j < vcnt ; j++) { + tbio->bi_io_vec[j].bv_offset = 0; + tbio->bi_io_vec[j].bv_len = PAGE_SIZE; + + memcpy(page_address(tbio->bi_io_vec[j].bv_page), + page_address(fbio->bi_io_vec[j].bv_page), + PAGE_SIZE); + } + tbio->bi_end_io = end_sync_write; + + d = r10_bio->devs[i].devnum; + atomic_inc(&conf->mirrors[d].rdev->nr_pending); + atomic_inc(&r10_bio->remaining); + md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9); + + generic_make_request(tbio); + } + +done: + if (atomic_dec_and_test(&r10_bio->remaining)) { + md_done_sync(mddev, r10_bio->sectors, 1); + put_buf(r10_bio); + } +} + +/* + * Now for the recovery code. + * Recovery happens across physical sectors. + * We recover all non-is_sync drives by finding the virtual address of + * each, and then choose a working drive that also has that virt address. + * There is a separate r10_bio for each non-in_sync drive. + * Only the first two slots are in use. The first for reading, + * The second for writing. + * + */ + +static void recovery_request_write(mddev_t *mddev, r10bio_t *r10_bio) +{ + conf_t *conf = mddev_to_conf(mddev); + int i, d; + struct bio *bio, *wbio; + + + /* move the pages across to the second bio + * and submit the write request + */ + bio = r10_bio->devs[0].bio; + wbio = r10_bio->devs[1].bio; + for (i=0; i < wbio->bi_vcnt; i++) { + struct page *p = bio->bi_io_vec[i].bv_page; + bio->bi_io_vec[i].bv_page = wbio->bi_io_vec[i].bv_page; + wbio->bi_io_vec[i].bv_page = p; + } + d = r10_bio->devs[1].devnum; + + atomic_inc(&conf->mirrors[d].rdev->nr_pending); + md_sync_acct(conf->mirrors[d].rdev->bdev, wbio->bi_size >> 9); + generic_make_request(wbio); +} + + +/* + * This is a kernel thread which: + * + * 1. Retries failed read operations on working mirrors. + * 2. Updates the raid superblock when problems encounter. + * 3. Performs writes following reads for array syncronising. + */ + +static void raid10d(mddev_t *mddev) +{ + r10bio_t *r10_bio; + struct bio *bio; + unsigned long flags; + conf_t *conf = mddev_to_conf(mddev); + struct list_head *head = &conf->retry_list; + int unplug=0; + mdk_rdev_t *rdev; + + md_check_recovery(mddev); + md_handle_safemode(mddev); + + for (;;) { + char b[BDEVNAME_SIZE]; + spin_lock_irqsave(&conf->device_lock, flags); + if (list_empty(head)) + break; + r10_bio = list_entry(head->prev, r10bio_t, retry_list); + list_del(head->prev); + spin_unlock_irqrestore(&conf->device_lock, flags); + + mddev = r10_bio->mddev; + conf = mddev_to_conf(mddev); + if (test_bit(R10BIO_IsSync, &r10_bio->state)) { + sync_request_write(mddev, r10_bio); + unplug = 1; + } else if (test_bit(R10BIO_IsRecover, &r10_bio->state)) { + recovery_request_write(mddev, r10_bio); + unplug = 1; + } else { + int mirror; + bio = r10_bio->devs[r10_bio->read_slot].bio; + r10_bio->devs[r10_bio->read_slot].bio = NULL; + mirror = read_balance(conf, r10_bio); + r10_bio->devs[r10_bio->read_slot].bio = bio; + if (mirror == -1) { + printk(KERN_ALERT "raid10: %s: unrecoverable I/O" + " read error for block %llu\n", + bdevname(bio->bi_bdev,b), + (unsigned long long)r10_bio->sector); + raid_end_bio_io(r10_bio); + } else { + rdev = conf->mirrors[mirror].rdev; + if (printk_ratelimit()) + printk(KERN_ERR "raid10: %s: redirecting sector %llu to" + " another mirror\n", + bdevname(rdev->bdev,b), + (unsigned long long)r10_bio->sector); + bio->bi_bdev = rdev->bdev; + bio->bi_sector = r10_bio->devs[r10_bio->read_slot].addr + + rdev->data_offset; + bio->bi_next = NULL; + bio->bi_flags &= (1<bi_flags |= 1 << BIO_UPTODATE; + bio->bi_idx = 0; + bio->bi_size = r10_bio->sectors << 9; + bio->bi_rw = READ; + unplug = 1; + generic_make_request(bio); + } + } + } + spin_unlock_irqrestore(&conf->device_lock, flags); + if (unplug) + unplug_slaves(mddev); +} + + +static int init_resync(conf_t *conf) +{ + int buffs; + + buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE; + if (conf->r10buf_pool) + BUG(); + conf->r10buf_pool = mempool_create(buffs, r10buf_pool_alloc, r10buf_pool_free, conf); + if (!conf->r10buf_pool) + return -ENOMEM; + conf->next_resync = 0; + return 0; +} + +/* + * perform a "sync" on one "block" + * + * We need to make sure that no normal I/O request - particularly write + * requests - conflict with active sync requests. + * + * This is achieved by tracking pending requests and a 'barrier' concept + * that can be installed to exclude normal IO requests. + * + * Resync and recovery are handled very differently. + * We differentiate by looking at MD_RECOVERY_SYNC in mddev->recovery. + * + * For resync, we iterate over virtual addresses, read all copies, + * and update if there are differences. If only one copy is live, + * skip it. + * For recovery, we iterate over physical addresses, read a good + * value for each non-in_sync drive, and over-write. + * + * So, for recovery we may have several outstanding complex requests for a + * given address, one for each out-of-sync device. We model this by allocating + * a number of r10_bio structures, one for each out-of-sync device. + * As we setup these structures, we collect all bio's together into a list + * which we then process collectively to add pages, and then process again + * to pass to generic_make_request. + * + * The r10_bio structures are linked using a borrowed master_bio pointer. + * This link is counted in ->remaining. When the r10_bio that points to NULL + * has its remaining count decremented to 0, the whole complex operation + * is complete. + * + */ + +static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster) +{ + conf_t *conf = mddev_to_conf(mddev); + r10bio_t *r10_bio; + struct bio *biolist = NULL, *bio; + sector_t max_sector, nr_sectors; + int disk; + int i; + + sector_t sectors_skipped = 0; + int chunks_skipped = 0; + + if (!conf->r10buf_pool) + if (init_resync(conf)) + return -ENOMEM; + + skipped: + max_sector = mddev->size << 1; + if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) + max_sector = mddev->resync_max_sectors; + if (sector_nr >= max_sector) { + close_sync(conf); + return sectors_skipped; + } + if (chunks_skipped >= conf->raid_disks) { + /* if there has been nothing to do on any drive, + * then there is nothing to do at all.. + */ + sector_t sec = max_sector - sector_nr; + md_done_sync(mddev, sec, 1); + return sec + sectors_skipped; + } + + /* make sure whole request will fit in a chunk - if chunks + * are meaningful + */ + if (conf->near_copies < conf->raid_disks && + max_sector > (sector_nr | conf->chunk_mask)) + max_sector = (sector_nr | conf->chunk_mask) + 1; + /* + * If there is non-resync activity waiting for us then + * put in a delay to throttle resync. + */ + if (!go_faster && waitqueue_active(&conf->wait_resume)) + schedule_timeout(HZ); + device_barrier(conf, sector_nr + RESYNC_SECTORS); + + /* Again, very different code for resync and recovery. + * Both must result in an r10bio with a list of bios that + * have bi_end_io, bi_sector, bi_bdev set, + * and bi_private set to the r10bio. + * For recovery, we may actually create several r10bios + * with 2 bios in each, that correspond to the bios in the main one. + * In this case, the subordinate r10bios link back through a + * borrowed master_bio pointer, and the counter in the master + * includes a ref from each subordinate. + */ + /* First, we decide what to do and set ->bi_end_io + * To end_sync_read if we want to read, and + * end_sync_write if we will want to write. + */ + + if (!test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { + /* recovery... the complicated one */ + int i, j, k; + r10_bio = NULL; + + for (i=0 ; iraid_disks; i++) + if (conf->mirrors[i].rdev && + !conf->mirrors[i].rdev->in_sync) { + /* want to reconstruct this device */ + r10bio_t *rb2 = r10_bio; + + r10_bio = mempool_alloc(conf->r10buf_pool, GFP_NOIO); + spin_lock_irq(&conf->resync_lock); + conf->nr_pending++; + if (rb2) conf->barrier++; + spin_unlock_irq(&conf->resync_lock); + atomic_set(&r10_bio->remaining, 0); + + r10_bio->master_bio = (struct bio*)rb2; + if (rb2) + atomic_inc(&rb2->remaining); + r10_bio->mddev = mddev; + set_bit(R10BIO_IsRecover, &r10_bio->state); + r10_bio->sector = raid10_find_virt(conf, sector_nr, i); + raid10_find_phys(conf, r10_bio); + for (j=0; jcopies;j++) { + int d = r10_bio->devs[j].devnum; + if (conf->mirrors[d].rdev && + conf->mirrors[d].rdev->in_sync) { + /* This is where we read from */ + bio = r10_bio->devs[0].bio; + bio->bi_next = biolist; + biolist = bio; + bio->bi_private = r10_bio; + bio->bi_end_io = end_sync_read; + bio->bi_rw = 0; + bio->bi_sector = r10_bio->devs[j].addr + + conf->mirrors[d].rdev->data_offset; + bio->bi_bdev = conf->mirrors[d].rdev->bdev; + atomic_inc(&conf->mirrors[d].rdev->nr_pending); + atomic_inc(&r10_bio->remaining); + /* and we write to 'i' */ + + for (k=0; kcopies; k++) + if (r10_bio->devs[k].devnum == i) + break; + bio = r10_bio->devs[1].bio; + bio->bi_next = biolist; + biolist = bio; + bio->bi_private = r10_bio; + bio->bi_end_io = end_sync_write; + bio->bi_rw = 1; + bio->bi_sector = r10_bio->devs[k].addr + + conf->mirrors[i].rdev->data_offset; + bio->bi_bdev = conf->mirrors[i].rdev->bdev; + + r10_bio->devs[0].devnum = d; + r10_bio->devs[1].devnum = i; + + break; + } + } + if (j == conf->copies) { + BUG(); + } + } + if (biolist == NULL) { + while (r10_bio) { + r10bio_t *rb2 = r10_bio; + r10_bio = (r10bio_t*) rb2->master_bio; + rb2->master_bio = NULL; + put_buf(rb2); + } + goto giveup; + } + } else { + /* resync. Schedule a read for every block at this virt offset */ + int count = 0; + r10_bio = mempool_alloc(conf->r10buf_pool, GFP_NOIO); + + spin_lock_irq(&conf->resync_lock); + conf->nr_pending++; + spin_unlock_irq(&conf->resync_lock); + + r10_bio->mddev = mddev; + atomic_set(&r10_bio->remaining, 0); + + r10_bio->master_bio = NULL; + r10_bio->sector = sector_nr; + set_bit(R10BIO_IsSync, &r10_bio->state); + raid10_find_phys(conf, r10_bio); + r10_bio->sectors = (sector_nr | conf->chunk_mask) - sector_nr +1; + spin_lock_irq(&conf->device_lock); + for (i=0; icopies; i++) { + int d = r10_bio->devs[i].devnum; + bio = r10_bio->devs[i].bio; + bio->bi_end_io = NULL; + if (conf->mirrors[d].rdev == NULL || + conf->mirrors[d].rdev->faulty) + continue; + atomic_inc(&conf->mirrors[d].rdev->nr_pending); + atomic_inc(&r10_bio->remaining); + bio->bi_next = biolist; + biolist = bio; + bio->bi_private = r10_bio; + bio->bi_end_io = end_sync_read; + bio->bi_rw = 0; + bio->bi_sector = r10_bio->devs[i].addr + + conf->mirrors[d].rdev->data_offset; + bio->bi_bdev = conf->mirrors[d].rdev->bdev; + count++; + } + spin_unlock_irq(&conf->device_lock); + if (count < 2) { + for (i=0; icopies; i++) { + int d = r10_bio->devs[i].devnum; + if (r10_bio->devs[i].bio->bi_end_io) + atomic_dec(&conf->mirrors[d].rdev->nr_pending); + } + put_buf(r10_bio); + goto giveup; + } + } + + for (bio = biolist; bio ; bio=bio->bi_next) { + + bio->bi_flags &= ~(BIO_POOL_MASK - 1); + if (bio->bi_end_io) + bio->bi_flags |= 1 << BIO_UPTODATE; + bio->bi_vcnt = 0; + bio->bi_idx = 0; + bio->bi_phys_segments = 0; + bio->bi_hw_segments = 0; + bio->bi_size = 0; + } + + nr_sectors = 0; + do { + struct page *page; + int len = PAGE_SIZE; + disk = 0; + if (sector_nr + (len>>9) > max_sector) + len = (max_sector - sector_nr) << 9; + if (len == 0) + break; + for (bio= biolist ; bio ; bio=bio->bi_next) { + page = bio->bi_io_vec[bio->bi_vcnt].bv_page; + if (bio_add_page(bio, page, len, 0) == 0) { + /* stop here */ + struct bio *bio2; + bio->bi_io_vec[bio->bi_vcnt].bv_page = page; + for (bio2 = biolist; bio2 && bio2 != bio; bio2 = bio2->bi_next) { + /* remove last page from this bio */ + bio2->bi_vcnt--; + bio2->bi_size -= len; + bio2->bi_flags &= ~(1<< BIO_SEG_VALID); + } + goto bio_full; + } + disk = i; + } + nr_sectors += len>>9; + sector_nr += len>>9; + } while (biolist->bi_vcnt < RESYNC_PAGES); + bio_full: + r10_bio->sectors = nr_sectors; + + while (biolist) { + bio = biolist; + biolist = biolist->bi_next; + + bio->bi_next = NULL; + r10_bio = bio->bi_private; + r10_bio->sectors = nr_sectors; + + if (bio->bi_end_io == end_sync_read) { + md_sync_acct(bio->bi_bdev, nr_sectors); + generic_make_request(bio); + } + } + + return nr_sectors; + giveup: + /* There is nowhere to write, so all non-sync + * drives must be failed, so try the next chunk... + */ + { + int sec = max_sector - sector_nr; + sectors_skipped += sec; + chunks_skipped ++; + sector_nr = max_sector; + md_done_sync(mddev, sec, 1); + goto skipped; + } +} + +static int run(mddev_t *mddev) +{ + conf_t *conf; + int i, disk_idx; + mirror_info_t *disk; + mdk_rdev_t *rdev; + struct list_head *tmp; + int nc, fc; + sector_t stride, size; + + if (mddev->level != 10) { + printk(KERN_ERR "raid10: %s: raid level not set correctly... (%d)\n", + mdname(mddev), mddev->level); + goto out; + } + nc = mddev->layout & 255; + fc = (mddev->layout >> 8) & 255; + if ((nc*fc) <2 || (nc*fc) > mddev->raid_disks || + (mddev->layout >> 16)) { + printk(KERN_ERR "raid10: %s: unsupported raid10 layout: 0x%8x\n", + mdname(mddev), mddev->layout); + goto out; + } + /* + * copy the already verified devices into our private RAID10 + * bookkeeping area. [whatever we allocate in run(), + * should be freed in stop()] + */ + conf = kmalloc(sizeof(conf_t), GFP_KERNEL); + mddev->private = conf; + if (!conf) { + printk(KERN_ERR "raid10: couldn't allocate memory for %s\n", + mdname(mddev)); + goto out; + } + memset(conf, 0, sizeof(*conf)); + conf->mirrors = kmalloc(sizeof(struct mirror_info)*mddev->raid_disks, + GFP_KERNEL); + if (!conf->mirrors) { + printk(KERN_ERR "raid10: couldn't allocate memory for %s\n", + mdname(mddev)); + goto out_free_conf; + } + memset(conf->mirrors, 0, sizeof(struct mirror_info)*mddev->raid_disks); + + conf->near_copies = nc; + conf->far_copies = fc; + conf->copies = nc*fc; + conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1; + conf->chunk_shift = ffz(~mddev->chunk_size) - 9; + stride = mddev->size >> (conf->chunk_shift-1); + sector_div(stride, fc); + conf->stride = stride << conf->chunk_shift; + + conf->r10bio_pool = mempool_create(NR_RAID10_BIOS, r10bio_pool_alloc, + r10bio_pool_free, conf); + if (!conf->r10bio_pool) { + printk(KERN_ERR "raid10: couldn't allocate memory for %s\n", + mdname(mddev)); + goto out_free_conf; + } + mddev->queue->unplug_fn = raid10_unplug; + + mddev->queue->issue_flush_fn = raid10_issue_flush; + + ITERATE_RDEV(mddev, rdev, tmp) { + disk_idx = rdev->raid_disk; + if (disk_idx >= mddev->raid_disks + || disk_idx < 0) + continue; + disk = conf->mirrors + disk_idx; + + disk->rdev = rdev; + + blk_queue_stack_limits(mddev->queue, + rdev->bdev->bd_disk->queue); + /* as we don't honour merge_bvec_fn, we must never risk + * violating it, so limit ->max_sector to one PAGE, as + * a one page request is never in violation. + */ + if (rdev->bdev->bd_disk->queue->merge_bvec_fn && + mddev->queue->max_sectors > (PAGE_SIZE>>9)) + mddev->queue->max_sectors = (PAGE_SIZE>>9); + + disk->head_position = 0; + if (!rdev->faulty && rdev->in_sync) + conf->working_disks++; + } + conf->raid_disks = mddev->raid_disks; + conf->mddev = mddev; + conf->device_lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&conf->retry_list); + + conf->resync_lock = SPIN_LOCK_UNLOCKED; + init_waitqueue_head(&conf->wait_idle); + init_waitqueue_head(&conf->wait_resume); + + if (!conf->working_disks) { + printk(KERN_ERR "raid10: no operational mirrors for %s\n", + mdname(mddev)); + goto out_free_conf; + } + + mddev->degraded = 0; + for (i = 0; i < conf->raid_disks; i++) { + + disk = conf->mirrors + i; + + if (!disk->rdev) { + disk->head_position = 0; + mddev->degraded++; + } + } + + + mddev->thread = md_register_thread(raid10d, mddev, "%s_raid10"); + if (!mddev->thread) { + printk(KERN_ERR + "raid10: couldn't allocate thread for %s\n", + mdname(mddev)); + goto out_free_conf; + } + + printk(KERN_INFO + "raid10: raid set %s active with %d out of %d devices\n", + mdname(mddev), mddev->raid_disks - mddev->degraded, + mddev->raid_disks); + /* + * Ok, everything is just fine now + */ + size = conf->stride * conf->raid_disks; + sector_div(size, conf->near_copies); + mddev->array_size = size/2; + mddev->resync_max_sectors = size; + + /* Calculate max read-ahead size. + * We need to readahead at least twice a whole stripe.... + * maybe... + */ + { + int stripe = conf->raid_disks * mddev->chunk_size / PAGE_CACHE_SIZE; + stripe /= conf->near_copies; + if (mddev->queue->backing_dev_info.ra_pages < 2* stripe) + mddev->queue->backing_dev_info.ra_pages = 2* stripe; + } + + if (conf->near_copies < mddev->raid_disks) + blk_queue_merge_bvec(mddev->queue, raid10_mergeable_bvec); + return 0; + +out_free_conf: + if (conf->r10bio_pool) + mempool_destroy(conf->r10bio_pool); + if (conf->mirrors) + kfree(conf->mirrors); + kfree(conf); + mddev->private = NULL; +out: + return -EIO; +} + +static int stop(mddev_t *mddev) +{ + conf_t *conf = mddev_to_conf(mddev); + + md_unregister_thread(mddev->thread); + mddev->thread = NULL; + if (conf->r10bio_pool) + mempool_destroy(conf->r10bio_pool); + if (conf->mirrors) + kfree(conf->mirrors); + kfree(conf); + mddev->private = NULL; + return 0; +} + + +static mdk_personality_t raid10_personality = +{ + .name = "raid10", + .owner = THIS_MODULE, + .make_request = make_request, + .run = run, + .stop = stop, + .status = status, + .error_handler = error, + .hot_add_disk = raid10_add_disk, + .hot_remove_disk= raid10_remove_disk, + .spare_active = raid10_spare_active, + .sync_request = sync_request, +}; + +static int __init raid_init(void) +{ + return register_md_personality(RAID10, &raid10_personality); +} + +static void raid_exit(void) +{ + unregister_md_personality(RAID10); +} + +module_init(raid_init); +module_exit(raid_exit); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("md-personality-9"); /* RAID10 */ diff -Nru a/drivers/md/raid5.c b/drivers/md/raid5.c --- a/drivers/md/raid5.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/md/raid5.c 2004-09-06 16:37:51 -07:00 @@ -1071,7 +1071,8 @@ PRINTK("Reading block %d (sync=%d)\n", i, syncing); if (syncing) - md_sync_acct(conf->disks[i].rdev, STRIPE_SECTORS); + md_sync_acct(conf->disks[i].rdev->bdev, + STRIPE_SECTORS); } } } @@ -1256,7 +1257,7 @@ if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) - md_sync_acct(rdev, STRIPE_SECTORS); + md_sync_acct(rdev->bdev, STRIPE_SECTORS); bi->bi_bdev = rdev->bdev; PRINTK("for %llu schedule op %ld on disc %d\n", diff -Nru a/drivers/md/raid6main.c b/drivers/md/raid6main.c --- a/drivers/md/raid6main.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/md/raid6main.c 2004-09-06 16:37:50 -07:00 @@ -1208,7 +1208,8 @@ PRINTK("Reading block %d (sync=%d)\n", i, syncing); if (syncing) - md_sync_acct(conf->disks[i].rdev, STRIPE_SECTORS); + md_sync_acct(conf->disks[i].rdev->bdev, + STRIPE_SECTORS); } } } @@ -1418,7 +1419,7 @@ if (rdev) { if (test_bit(R5_Syncio, &sh->dev[i].flags)) - md_sync_acct(rdev, STRIPE_SECTORS); + md_sync_acct(rdev->bdev, STRIPE_SECTORS); bi->bi_bdev = rdev->bdev; PRINTK("for %llu schedule op %ld on disc %d\n", diff -Nru a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c --- a/drivers/media/common/saa7146_i2c.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/common/saa7146_i2c.c 2004-09-06 16:37:55 -07:00 @@ -1,13 +1,6 @@ #include #include -/* helper function */ -static void my_wait(struct saa7146_dev *dev, long ms) -{ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout((((ms+10)/10)*HZ)/1000); -} - u32 saa7146_i2c_func(struct i2c_adapter *adapter) { //fm DEB_I2C(("'%s'.\n", adapter->name)); @@ -136,12 +129,12 @@ /* set "ABORT-OPERATION"-bit (bit 7)*/ saa7146_write(dev, I2C_STATUS, (dev->i2c_bitrate | MASK_07)); saa7146_write(dev, MC2, (MASK_00 | MASK_16)); - my_wait(dev,SAA7146_I2C_DELAY); + msleep(SAA7146_I2C_DELAY); /* clear all error-bits pending; this is needed because p.123, note 1 */ saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate); saa7146_write(dev, MC2, (MASK_00 | MASK_16)); - my_wait(dev,SAA7146_I2C_DELAY); + msleep(SAA7146_I2C_DELAY); } /* check if any error is (still) present. (this can be necessary because p.123, note 1) */ @@ -155,18 +148,18 @@ after serious protocol errors caused by e.g. the SAA7740 */ saa7146_write(dev, I2C_STATUS, (dev->i2c_bitrate | MASK_07)); saa7146_write(dev, MC2, (MASK_00 | MASK_16)); - my_wait(dev,SAA7146_I2C_DELAY); + msleep(SAA7146_I2C_DELAY); /* clear all error-bits pending */ saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate); saa7146_write(dev, MC2, (MASK_00 | MASK_16)); - my_wait(dev,SAA7146_I2C_DELAY); + msleep(SAA7146_I2C_DELAY); /* the data sheet says it might be necessary to clear the status twice after an abort */ saa7146_write(dev, I2C_STATUS, dev->i2c_bitrate); saa7146_write(dev, MC2, (MASK_00 | MASK_16)); - my_wait(dev,SAA7146_I2C_DELAY); + msleep(SAA7146_I2C_DELAY); } /* if any error is still present, a fatal error has occured ... */ @@ -243,7 +236,7 @@ if ((++trial < 20) && short_delay) udelay(10); else - my_wait(dev,1); + msleep(1); } } @@ -345,7 +338,7 @@ } /* delay a bit before retrying */ - my_wait(dev, 10); + msleep(10); } while (err != num && retries--); diff -Nru a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c --- a/drivers/media/dvb/bt8xx/bt878.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/media/dvb/bt8xx/bt878.c 2004-09-06 16:37:53 -07:00 @@ -417,6 +417,8 @@ printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", bt878_num); + if (pci_enable_device(dev)) + return -EIO; bt = &bt878[bt878_num]; bt->dev = dev; @@ -426,11 +428,10 @@ bt->id = dev->device; bt->irq = dev->irq; bt->bt878_adr = pci_resource_start(dev, 0); - if (pci_enable_device(dev)) - return -EIO; if (!request_mem_region(pci_resource_start(dev, 0), pci_resource_len(dev, 0), "bt878")) { - return -EBUSY; + result = -EBUSY; + goto fail0; } pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision); @@ -501,6 +502,8 @@ fail1: release_mem_region(pci_resource_start(bt->dev, 0), pci_resource_len(bt->dev, 0)); + fail0: + pci_disable_device(dev); return result; } @@ -517,7 +520,7 @@ /* first disable interrupts before unmapping the memory! */ btwrite(0, BT878_AINT_MASK); - btwrite(~0x0UL, BT878_AINT_STAT); + btwrite(~0U, BT878_AINT_STAT); /* disable PCI bus-mastering */ pci_read_config_byte(bt->dev, PCI_COMMAND, &command); @@ -540,6 +543,7 @@ bt878_mem_free(bt); pci_set_drvdata(pci_dev, NULL); + pci_disable_device(pci_dev); return; } diff -Nru a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c 2004-09-06 16:37:52 -07:00 @@ -1196,7 +1196,7 @@ int status; char fragbuf[HOST_LINK_BUF_SIZE]; int fragpos = 0; - int fraglen; + size_t fraglen; unsigned long timeout; int written; @@ -1257,7 +1257,7 @@ int slot; int slot_count = 0; int idx; - int fraglen; + size_t fraglen; int connection_id = -1; int found = 0; u8 hdr[2]; diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-09-06 16:37:51 -07:00 @@ -563,7 +563,7 @@ if (buffer2 != 0) printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2); if (buffer1_len > 32768) - printk(KERN_WARNING "length > 32k: %u.\n", buffer1_len); + printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len); /* printk("TS callback: %u bytes, %u TS cells @ %p.\n", buffer1_len, buffer1_len / TS_SZ, buffer1); */ dvb_net_ule(dev, buffer1, buffer1_len); diff -Nru a/drivers/media/dvb/frontends/dst.c b/drivers/media/dvb/frontends/dst.c --- a/drivers/media/dvb/frontends/dst.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/dvb/frontends/dst.c 2004-09-06 16:37:54 -07:00 @@ -1145,8 +1145,8 @@ } dst_init (dst); - dprintk("%s: register dst %8.8x bt %8.8x i2c %8.8x\n", __FUNCTION__, - (u32)dst, (u32)(dst->bt), (u32)(dst->i2c)); + dprintk("%s: register dst %p bt %p i2c %p\n", __FUNCTION__, + dst, dst->bt, dst->i2c); info = &dst_info_sat; if (dst->dst_type == DST_TYPE_IS_TERR) @@ -1162,7 +1162,7 @@ static void dst_detach (struct dvb_i2c_bus *i2c, void *data) { dvb_unregister_frontend (dst_ioctl, i2c); - dprintk("%s: unregister dst %8.8x\n", __FUNCTION__, (u32)(data)); + dprintk("%s: unregister dst %p\n", __FUNCTION__, data); if (data) kfree(data); } diff -Nru a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c --- a/drivers/media/dvb/frontends/stv0299.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/dvb/frontends/stv0299.c 2004-09-06 16:37:55 -07:00 @@ -1271,7 +1271,7 @@ printk ("%s: try to attach to %s\n", __FUNCTION__, adapter->name); - if ( strcmp(adapter->name, "Technisat SkyStar2 driver") == 0 ) + if ( strcmp(adapter->name, "SkyStar2") == 0 ) { printk ("%s: setup for tuner Samsung TBMU24112IMB\n", __FILE__); diff -Nru a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig --- a/drivers/media/dvb/ttpci/Kconfig 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/dvb/ttpci/Kconfig 2004-09-06 16:37:51 -07:00 @@ -1,6 +1,6 @@ config DVB_AV7110 tristate "AV7110 cards" - depends on DVB_CORE + depends on DVB_CORE && PCI select FW_LOADER select VIDEO_DEV select VIDEO_SAA7146_VV @@ -45,7 +45,7 @@ config DVB_BUDGET tristate "Budget cards" - depends on DVB_CORE + depends on DVB_CORE && PCI select VIDEO_SAA7146 help Support for simple SAA7146 based DVB cards @@ -59,7 +59,7 @@ config DVB_BUDGET_CI tristate "Budget cards with onboard CI connector" - depends on DVB_CORE + depends on DVB_CORE && PCI select VIDEO_SAA7146 help Support for simple SAA7146 based DVB cards @@ -76,7 +76,7 @@ config DVB_BUDGET_AV tristate "Budget cards with analog video inputs" - depends on DVB_CORE + depends on DVB_CORE && PCI select VIDEO_DEV select VIDEO_SAA7146_VV help diff -Nru a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2004-09-06 16:37:54 -07:00 @@ -1181,7 +1181,7 @@ firmware_size = fw_entry->size; if (firmware_size < 60) { - printk("%s: firmware size too small for DSP code (%u < 60).\n", + printk("%s: firmware size too small for DSP code (%zu < 60).\n", __FUNCTION__, firmware_size); return -1; } diff -Nru a/drivers/media/radio/miropcm20-rds.c b/drivers/media/radio/miropcm20-rds.c --- a/drivers/media/radio/miropcm20-rds.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/radio/miropcm20-rds.c 2004-09-06 16:37:51 -07:00 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "miropcm20-rds-core.h" @@ -60,8 +61,7 @@ char c; char bits[8]; - current->state=TASK_UNINTERRUPTIBLE; - schedule_timeout(2*HZ); + msleep(2000); aci_rds_cmd(RDS_STATUS, &c, 1); print_matrix(&c, bits); if (copy_to_user(buffer, bits, 8)) diff -Nru a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c --- a/drivers/media/radio/radio-aimslab.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/radio/radio-aimslab.c 2004-09-06 16:37:51 -07:00 @@ -63,12 +63,7 @@ if(!d) udelay(n); else - { - /* Yield CPU time */ - unsigned long x=jiffies; - while((jiffies-x)<=d) - schedule(); - } + msleep(jiffies_to_msecs(d)); } static void rt_decvol(void) diff -Nru a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c --- a/drivers/media/radio/radio-cadet.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/radio/radio-cadet.c 2004-09-06 16:37:52 -07:00 @@ -69,8 +69,7 @@ outb(inb(io+1)&0x7f,io+1); /* Reset RDS detection */ spin_unlock(&cadet_io_lock); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/10); + msleep(100); spin_lock(&cadet_io_lock); outb(3,io); /* Select Decoder Control/Status */ @@ -243,8 +242,7 @@ outb(curvol,io+1); spin_unlock(&cadet_io_lock); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/10); + msleep(100); cadet_gettune(); if((tunestat & 0x40) == 0) { /* Tuned */ diff -Nru a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c --- a/drivers/media/radio/radio-maestro.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/media/radio/radio-maestro.c 2004-09-06 16:37:53 -07:00 @@ -93,27 +93,6 @@ struct semaphore lock; } radio_unit = {0, 0, 0, 0, }; -static void sleep_125ms(void) -{ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ >> 3); -} - -static void udelay2(void) -{ - udelay(2); -} - -static void udelay4(void) -{ - udelay(4); -} - -static void udelay16(void) -{ - udelay(16); -} - static __u32 radio_bits_get(struct radio_device *dev) { register __u16 io=dev->io, l, rdata; @@ -122,14 +101,15 @@ omask = inw(io + IO_MASK); outw(~(STR_CLK | STR_WREN), io + IO_MASK); outw(0, io); - udelay16(); + udelay(16); + for (l=24;l--;) { outw(STR_CLK, io); /* HI state */ - udelay2(); + udelay(2); if(!l) dev->tuned = inw(io) & STR_MOST ? 0 : 0xffff; outw(0, io); /* LO state */ - udelay2(); + udelay(2); data <<= 1; /* shift data */ rdata = inw(io); if(!l) @@ -138,11 +118,11 @@ else if(rdata & STR_DATA) data++; - udelay2(); + udelay(2); } if(dev->muted) outw(STR_WREN, io); - udelay4(); + udelay(4); outw(omask, io + IO_MASK); return data & 0x3ffe; } @@ -155,23 +135,23 @@ odir = (inw(io + IO_DIR) & ~STR_DATA) | (STR_CLK | STR_WREN); outw(odir | STR_DATA, io + IO_DIR); outw(~(STR_DATA | STR_CLK | STR_WREN), io + IO_MASK); - udelay16(); + udelay(16); for (l=25;l;l--) { bits = ((data >> 18) & STR_DATA) | STR_WREN ; data <<= 1; /* shift data */ outw(bits, io); /* start strobe */ - udelay2(); + udelay(2); outw(bits | STR_CLK, io); /* HI level */ - udelay2(); + udelay(2); outw(bits, io); /* LO level */ - udelay4(); + udelay(4); } if(!dev->muted) outw(0, io); - udelay4(); + udelay(4); outw(omask, io + IO_MASK); outw(odir, io + IO_DIR); - sleep_125ms(); + msleep(125); } inline static int radio_function(struct inode *inode, struct file *file, @@ -238,9 +218,9 @@ outw(~STR_WREN, io + IO_MASK); outw((card->muted = v->flags & VIDEO_AUDIO_MUTE) ? STR_WREN : 0, io); - udelay4(); + udelay(4); outw(omask, io + IO_MASK); - sleep_125ms(); + msleep(125); return 0; } } @@ -315,7 +295,7 @@ outw(odir, io + IO_DIR); outw(~(STR_WREN | STR_CLK), io + IO_MASK); outw(dev->muted ? 0 : STR_WREN, io); - udelay16(); + udelay(16); outw(omask, io + IO_MASK); ofreq = radio_bits_get(dev); if((ofreqFREQ2BITS(FREQ_HI))) diff -Nru a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c --- a/drivers/media/radio/radio-maxiradio.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/radio/radio-maxiradio.c 2004-09-06 16:37:55 -07:00 @@ -104,13 +104,6 @@ } radio_unit = {0, 0, 0, 0, }; -static void sleep_125ms(void) -{ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ >> 3); -} - - static void outbit(unsigned long bit, __u16 io) { if(bit != 0) @@ -228,7 +221,7 @@ return -EINVAL; card->freq = *freq; set_freq(card->io, FREQ2BITS(card->freq)); - sleep_125ms(); + msleep(125); return 0; } case VIDIOCGAUDIO: { diff -Nru a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c --- a/drivers/media/radio/radio-sf16fmi.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/radio/radio-sf16fmi.c 2004-09-06 16:37:55 -07:00 @@ -89,8 +89,7 @@ outbits(16, RSF16_ENCODE(freq), myport); outbits(8, 0xC0, myport); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ/7); + msleep(143); /* was schedule_timeout(HZ/7) */ up(&lock); if (dev->curvol) fmi_unmute(myport); return 0; @@ -107,8 +106,7 @@ val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ outb(val, myport); outb(val | 0x10, myport); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/7); + msleep(143); /* was schedule_timeout(HZ/7) */ res = (int)inb(myport+1); outb(val, myport); diff -Nru a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c --- a/drivers/media/radio/radio-sf16fmr2.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/radio/radio-sf16fmr2.c 2004-09-06 16:37:52 -07:00 @@ -55,19 +55,6 @@ #define RSF16_MINFREQ 87*16000 #define RSF16_MAXFREQ 108*16000 -/* from radio-aimslab */ -static void sleep_delay(unsigned long n) -{ - unsigned d=n/(1000000U/HZ); - if (!d) - udelay(n); - else - { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(d); - } -} - static inline void wait(int n,int port) { for (;n;--n) inb(port); @@ -153,7 +140,7 @@ fmr2_unmute(port); /* wait 0.11 sec */ - sleep_delay(110000LU); + msleep(110); /* NOTE if mute this stop radio you must set freq on unmute */ diff -Nru a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig --- a/drivers/media/video/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/video/Kconfig 2004-09-06 16:37:55 -07:00 @@ -155,7 +155,7 @@ config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux" - depends on VIDEO_DEV && PCI && I2C + depends on VIDEO_DEV && PCI && I2C_ALGOBIT help Say Y for support for MJPEG capture cards based on the Zoran 36057/36067 PCI controller chipset. This includes the Iomega diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c --- a/drivers/media/video/adv7175.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/video/adv7175.c 2004-09-06 16:37:55 -07:00 @@ -156,6 +156,22 @@ return ret; } +static void +set_subcarrier_freq (struct i2c_client *client, + int pass_through) +{ + /* for some reason pass_through NTSC needs + * a different sub-carrier freq to remain stable. */ + if(pass_through) + adv7175_write(client, 0x02, 0x00); + else + adv7175_write(client, 0x02, 0x55); + + adv7175_write(client, 0x03, 0x55); + adv7175_write(client, 0x04, 0x55); + adv7175_write(client, 0x05, 0x25); +} + #ifdef ENCODER_DUMP static void dump (struct i2c_client *client) @@ -322,6 +338,10 @@ case 0: adv7175_write(client, 0x01, 0x00); + + if (encoder->norm == VIDEO_MODE_NTSC) + set_subcarrier_freq(client, 1); + adv7175_write(client, 0x0c, TR1CAPT); /* TR1 */ if (encoder->norm == VIDEO_MODE_SECAM) adv7175_write(client, 0x0d, 0x49); // Disable genlock @@ -334,6 +354,10 @@ case 1: adv7175_write(client, 0x01, 0x00); + + if (encoder->norm == VIDEO_MODE_NTSC) + set_subcarrier_freq(client, 0); + adv7175_write(client, 0x0c, TR1PLAY); /* TR1 */ adv7175_write(client, 0x0d, 0x49); adv7175_write(client, 0x07, TR0MODE | TR0RST); @@ -343,6 +367,10 @@ case 2: adv7175_write(client, 0x01, 0x80); + + if (encoder->norm == VIDEO_MODE_NTSC) + set_subcarrier_freq(client, 0); + adv7175_write(client, 0x0d, 0x49); adv7175_write(client, 0x07, TR0MODE | TR0RST); adv7175_write(client, 0x07, TR0MODE); diff -Nru a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c --- a/drivers/media/video/bttv-cards.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/video/bttv-cards.c 2004-09-06 16:37:52 -07:00 @@ -31,7 +31,7 @@ #include #include #include -#ifdef CONFIG_FW_LOADER +#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) # include #endif @@ -74,6 +74,9 @@ static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input); static void picolo_tetra_init(struct bttv *btv); +static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input); +static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input); + static int terratec_active_radio_upgrade(struct bttv *btv); static int tea5757_read(struct bttv *btv); static int tea5757_write(struct bttv *btv, int value); @@ -170,6 +173,7 @@ { 0x6606107d, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, { 0x6607107d, BTTV_WINFASTVC100, "Leadtek WinFast VC 100" }, + { 0x6609107d, BTTV_WINFAST2000, "Leadtek TV 2000 XP" }, { 0x263610b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" }, { 0x264510b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" }, { 0x402010fc, BTTV_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" }, @@ -224,6 +228,7 @@ { 0x1431aa00, BTTV_PV143, "Provideo PV143B" }, { 0x1432aa00, BTTV_PV143, "Provideo PV143C" }, { 0x1433aa00, BTTV_PV143, "Provideo PV143D" }, + { 0x1433aa03, BTTV_PV143, "Security Eyes" }, { 0x1460aa00, BTTV_PV150, "Provideo PV150A-1" }, { 0x1461aa01, BTTV_PV150, "Provideo PV150A-2" }, @@ -265,6 +270,7 @@ { 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" }, { 0x18501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" }, + { 0xa0501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" }, { 0x18511851, BTTV_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" }, { 0x18521852, BTTV_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" }, { 0x41a0a051, BTTV_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" }, @@ -297,7 +303,7 @@ // DVB cards (using pci function .1 for mpeg data xfer) { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, - { 0x07611461, BTTV_NEBULA_DIGITV, "AverMedia AverTV DVB-T" }, + { 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T" }, { 0x002611bd, BTTV_TWINHAN_DST, "Pinnacle PCTV SAT CI" }, { 0x00011822, BTTV_TWINHAN_DST, "Twinhan VisionPlus DVB-T" }, { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, @@ -2078,6 +2084,69 @@ #if 0 /* untested */ .has_remote = 1, #endif +},{ + /* ---- card 0x7c ---------------------------------- */ + /* Matt Jesson */ + /* Based on the Nebula card data - added remote and new card number - BTTV_AVDVBT_761, see also ir-kbd-gpio.c */ + .name = "AverMedia AverTV DVB-T 761", + .video_inputs = 1, + .tuner = -1, + .svhs = -1, + .muxsel = { 2, 3, 1, 0}, + .no_msp34xx = 1, + .no_tda9875 = 1, + .no_tda7432 = 1, + .pll = PLL_28, + .tuner_type = -1, + .has_dvb = 1, + .no_gpioirq = 1, + .has_remote = 1, +},{ + /* andre.schwarz@matrix-vision.de */ + .name = "MATRIX Vision Sigma-SQ", + .video_inputs = 16, + .audio_inputs = 0, + .tuner = -1, + .svhs = -1, + .gpiomask = 0x0, + .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3 }, + .muxsel_hook = sigmaSQ_muxsel, + .audiomux = { 0 }, + .no_msp34xx = 1, + .pll = PLL_28, + .tuner_type = -1, +},{ + /* andre.schwarz@matrix-vision.de */ + .name = "MATRIX Vision Sigma-SLC", + .video_inputs = 4, + .audio_inputs = 0, + .tuner = -1, + .svhs = -1, + .gpiomask = 0x0, + .muxsel = { 2, 2, 2, 2 }, + .muxsel_hook = sigmaSLC_muxsel, + .audiomux = { 0 }, + .no_msp34xx = 1, + .pll = PLL_28, + .tuner_type = -1, +},{ + /* BTTV_APAC_VIEWCOMP */ + /* Attila Kondoros */ + /* bt878 TV + FM 0x00000000 subsystem ID */ + .name = "APAC Viewcomp 878(AMAX)", + .video_inputs = 2, + .audio_inputs = 1, + .tuner = 0, + .svhs = -1, + .gpiomask = 0xFF, + .muxsel = { 2, 3, 1, 1}, + .audiomux = { 2, 0, 0, 0, 10}, + .needs_tvaudio = 0, + .pll = PLL_28, + .tuner_type = TUNER_PHILIPS_PAL, + .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */ + .has_radio = 1, /* not every card has radio */ }}; const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); @@ -2405,6 +2474,19 @@ gpio_write(0x000000); } +static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input) +{ + unsigned int inmux = input % 8; + gpio_inout( 0xf, 0xf ); + gpio_bits( 0xf, inmux ); +} + +static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input) +{ + unsigned int inmux = input % 4; + gpio_inout( 3<<9, 3<<9 ); + gpio_bits( 3<<9, inmux<<9 ); +} /* ----------------------------------------------------------------------- */ @@ -2859,7 +2941,7 @@ return 0; } -#ifndef CONFIG_FW_LOADER +#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) /* old 2.4.x way -- via soundcore's mod_firmware_load */ static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf"; @@ -4063,7 +4145,7 @@ return; } - rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL); + rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),0); if (!(rc & PX_CFG_PXC200F)) { printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc); return; diff -Nru a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c --- a/drivers/media/video/bttv-driver.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/bttv-driver.c 2004-09-06 16:37:54 -07:00 @@ -1861,6 +1861,8 @@ if (NULL == fh->ovfmt) return -EINVAL; + if (!(fh->ovfmt->flags & FORMAT_FLAGS_PACKED)) + return -EINVAL; retval = verify_window(&bttv_tvnorms[btv->tvnorm],win,fixup); if (0 != retval) return retval; @@ -2052,6 +2054,7 @@ f->fmt.pix.width = maxw; if (f->fmt.pix.height > maxh) f->fmt.pix.height = maxh; + f->fmt.pix.width &= ~0x03; f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3; f->fmt.pix.sizeimage = diff -Nru a/drivers/media/video/bttv-gpio.c b/drivers/media/video/bttv-gpio.c --- a/drivers/media/video/bttv-gpio.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/bttv-gpio.c 2004-09-06 16:37:54 -07:00 @@ -106,6 +106,20 @@ } } +void bttv_i2c_info(struct bttv_core *core, struct i2c_client *client, int attach) +{ + struct bttv_sub_driver *drv; + struct bttv_sub_device *dev; + struct list_head *item; + + list_for_each(item,&core->subs) { + dev = list_entry(item,struct bttv_sub_device,list); + drv = to_bttv_sub_drv(dev->dev.driver); + if (drv && drv->i2c_info) + drv->i2c_info(dev,client,attach); + } +} + /* ----------------------------------------------------------------------- */ /* external: sub-driver register/unregister */ diff -Nru a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c --- a/drivers/media/video/bttv-i2c.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/media/video/bttv-i2c.c 2004-09-06 16:37:50 -07:00 @@ -40,6 +40,7 @@ static void bttv_dec_use(struct i2c_adapter *adap); #endif static int attach_inform(struct i2c_client *client); +static int detach_inform(struct i2c_client *client); static int i2c_debug = 0; static int i2c_hw = 0; @@ -114,6 +115,7 @@ I2C_DEVNAME("bt848"), .id = I2C_HW_B_BT848, .client_register = attach_inform, + .client_unregister = detach_inform, }; /* ----------------------------------------------------------------------- */ @@ -298,6 +300,7 @@ .id = I2C_ALGO_BIT | I2C_HW_B_BT848 /* FIXME */, .algo = &bttv_algo, .client_register = attach_inform, + .client_unregister = detach_inform, }; /* ----------------------------------------------------------------------- */ @@ -324,11 +327,20 @@ if (btv->pinnacle_id != UNSET) bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, &btv->pinnacle_id); + bttv_i2c_info(&btv->c, client, 1); if (bttv_debug) printk("bttv%d: i2c attach [client=%s]\n", btv->c.nr, i2c_clientname(client)); return 0; +} + +static int detach_inform(struct i2c_client *client) +{ + struct bttv *btv = i2c_get_adapdata(client->adapter); + + bttv_i2c_info(&btv->c, client, 0); + return 0; } void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg) diff -Nru a/drivers/media/video/bttv-risc.c b/drivers/media/video/bttv-risc.c --- a/drivers/media/video/bttv-risc.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/video/bttv-risc.c 2004-09-06 16:37:52 -07:00 @@ -55,6 +55,8 @@ instructions += 2; if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,instructions*8)) < 0) return rc; + dprintk("bttv%d: risc packed: bpl %d lines %d instr %d size %d ptr %p\n", + btv->c.nr, bpl, lines, instructions, risc->size, risc->cpu); /* sync instruction */ rp = risc->cpu; @@ -99,8 +101,10 @@ offset += todo; } offset += padding; + dprintk("bttv%d: risc packed: line %d ptr %p\n", + btv->c.nr, line, rp); } - dprintk("bttv%d: risc planar: %d sglist elems\n", btv->c.nr, (int)(sg-sglist)); + dprintk("bttv%d: risc packed: %d sglist elems\n", btv->c.nr, (int)(sg-sglist)); /* save pointer to jmp instruction address */ risc->jmp = rp; @@ -145,11 +149,26 @@ (line >= (ylines - VCR_HACK_LINES))) continue; switch (vshift) { - case 0: chroma = 1; break; - case 1: chroma = !(line & 1); break; - case 2: chroma = !(line & 3); break; - default: chroma = 0; + case 0: + chroma = 1; + break; + case 1: + if (!yoffset) + chroma = (line & 1) == 0; + else + chroma = (line & 1) == 1; + break; + case 2: + if (!yoffset) + chroma = (line & 3) == 0; + else + chroma = (line & 3) == 2; + break; + default: + chroma = 0; + break; } + for (todo = ybpl; todo > 0; todo -= ylen) { /* go to next sg entry if needed */ while (yoffset && yoffset >= sg_dma_len(ysg)) { diff -Nru a/drivers/media/video/bttv.h b/drivers/media/video/bttv.h --- a/drivers/media/video/bttv.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/video/bttv.h 2004-09-06 16:37:51 -07:00 @@ -126,6 +126,10 @@ #define BTTV_LMLBT4 0x76 #define BTTV_PICOLO_TETRA_CHIP 0x79 #define BTTV_AVDVBT_771 0x7b +#define BTTV_AVDVBT_761 0x7c +#define BTTV_MATRIX_VISIONSQ 0x7d +#define BTTV_MATRIX_VISIONSLC 0x7e +#define BTTV_APAC_VIEWCOMP 0x7f /* i2c address list */ #define I2C_TSA5522 0xc2 @@ -298,6 +302,8 @@ struct device_driver drv; char wanted[BUS_ID_SIZE]; void (*gpio_irq)(struct bttv_sub_device *sub); + void (*i2c_info)(struct bttv_sub_device *sub, + struct i2c_client *client, int attach); }; #define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv) diff -Nru a/drivers/media/video/bttvp.h b/drivers/media/video/bttvp.h --- a/drivers/media/video/bttvp.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/video/bttvp.h 2004-09-06 16:37:52 -07:00 @@ -225,6 +225,7 @@ int bttv_sub_add_device(struct bttv_core *core, char *name); int bttv_sub_del_devices(struct bttv_core *core); void bttv_gpio_irq(struct bttv_core *core); +void bttv_i2c_info(struct bttv_core *core, struct i2c_client *client, int attach); /* ---------------------------------------------------------- */ diff -Nru a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c --- a/drivers/media/video/cpia.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/cpia.c 2004-09-06 16:37:54 -07:00 @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -62,6 +63,15 @@ MODULE_SUPPORTED_DEVICE("video"); #endif +static unsigned short colorspace_conv = 0; +module_param(colorspace_conv, ushort, 0444); +MODULE_PARM_DESC(colorspace_conv, + "\n Colorspace conversion:" + "\n0 = disable" + "\n1 = enable" + "\nDefault value is 0" + "\n"); + #define ABOUT "V4L-Driver for Vision CPiA based cameras" #ifndef VID_HARDWARE_CPIA @@ -1428,14 +1438,19 @@ /* supported frame palettes and depths */ static inline int valid_mode(u16 palette, u16 depth) { - return (palette == VIDEO_PALETTE_GREY && depth == 8) || - (palette == VIDEO_PALETTE_RGB555 && depth == 16) || - (palette == VIDEO_PALETTE_RGB565 && depth == 16) || - (palette == VIDEO_PALETTE_RGB24 && depth == 24) || - (palette == VIDEO_PALETTE_RGB32 && depth == 32) || - (palette == VIDEO_PALETTE_YUV422 && depth == 16) || - (palette == VIDEO_PALETTE_YUYV && depth == 16) || - (palette == VIDEO_PALETTE_UYVY && depth == 16); + if ((palette == VIDEO_PALETTE_YUV422 && depth == 16) || + (palette == VIDEO_PALETTE_YUYV && depth == 16)) + return 1; + + if (colorspace_conv) + return (palette == VIDEO_PALETTE_GREY && depth == 8) || + (palette == VIDEO_PALETTE_RGB555 && depth == 16) || + (palette == VIDEO_PALETTE_RGB565 && depth == 16) || + (palette == VIDEO_PALETTE_RGB24 && depth == 24) || + (palette == VIDEO_PALETTE_RGB32 && depth == 32) || + (palette == VIDEO_PALETTE_UYVY && depth == 16); + + return 0; } static int match_videosize( int width, int height ) @@ -4040,6 +4055,13 @@ { printk(KERN_INFO "%s v%d.%d.%d\n", ABOUT, CPIA_MAJ_VER, CPIA_MIN_VER, CPIA_PATCH_VER); + + printk(KERN_WARNING "Since in-kernel colorspace conversion is not " + "allowed, it is disabled by default now. Users should fix the " + "applications in case they don't work without conversion " + "reenabled by setting the 'colorspace_conv' module " + "parameter to 1"); + #ifdef CONFIG_PROC_FS proc_cpia_create(); #endif diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/media/video/meye.c 2004-09-06 16:37:53 -07:00 @@ -58,7 +58,7 @@ static inline void meye_initq(struct meye_queue *queue) { queue->head = queue->tail = 0; queue->len = 0; - queue->s_lock = (spinlock_t)SPIN_LOCK_UNLOCKED; + queue->s_lock = SPIN_LOCK_UNLOCKED; init_waitqueue_head(&queue->proc_list); } diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c --- a/drivers/media/video/msp3400.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/media/video/msp3400.c 2004-09-06 16:37:53 -07:00 @@ -1552,13 +1552,12 @@ /* ----------------------------------------------------------------------- */ -static int msp3400_init_module(void) +static int __init msp3400_init_module(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void msp3400_cleanup_module(void) +static void __exit msp3400_cleanup_module(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c --- a/drivers/media/video/saa7134/saa6752hs.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/media/video/saa7134/saa6752hs.c 2004-09-06 16:37:55 -07:00 @@ -387,13 +387,12 @@ .driver = &driver, }; -static int saa6752hs_init_module(void) +static int __init saa6752hs_init_module(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void saa6752hs_cleanup_module(void) +static void __exit saa6752hs_cleanup_module(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c --- a/drivers/media/video/saa7134/saa7134-cards.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/saa7134/saa7134-cards.c 2004-09-06 16:37:54 -07:00 @@ -154,6 +154,26 @@ .gpio = 0x8000, }, }, + [SAA7134_BOARD_FLYTVPLATINUM] = { + /* "Arnaud Quette" */ + .name = "LifeView FlyTV Platinum", + .audio_clock = 0x00200000, + .tuner_type = TUNER_PHILIPS_SECAM, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = LINE2, + .tv = 1, + },{ + .name = name_comp1, + .vmux = 0, + .amux = LINE2, + },{ + .name = name_svideo, + .vmux = 8, + .amux = LINE2, + }}, + }, [SAA7134_BOARD_EMPRESS] = { /* "Gert Vervoort" */ .name = "EMPRESS", @@ -177,7 +197,6 @@ .name = name_radio, .amux = LINE2, }, - .i2s_rate = 48000, .has_ts = 1, .video_out = CCIR656, }, @@ -243,7 +262,7 @@ .name = "KNC One TV-Station RDS / Typhoon TV Tuner RDS", .audio_clock = 0x00200000, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -278,7 +297,7 @@ .name = "KNC One TV-Station DVR", .audio_clock = 0x00200000, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .gpiomask = 0x820000, .inputs = {{ .name = name_tv, @@ -302,7 +321,6 @@ .amux = LINE2, .gpio = 0x20000, }, - .i2s_rate = 48000, .has_ts = 1, .video_out = CCIR656, }, @@ -333,7 +351,7 @@ .name = "Medion 5044", .audio_clock = 0x00187de7, // was: 0x00200000, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -414,7 +432,7 @@ //.audio_clock = 0x00200000, .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -440,7 +458,7 @@ .name = "Typhoon TV+Radio 90031", .audio_clock = 0x00200000, .tuner_type = TUNER_PHILIPS_PAL, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -503,7 +521,7 @@ .name = "ASUS TV-FM 7134", .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -607,7 +625,6 @@ .vmux = 8, .amux = LINE1, }}, - .i2s_rate = 48000, .has_ts = 1, .video_out = CCIR656, }, @@ -666,7 +683,7 @@ .name = "AverMedia M156 / Medion 2819", .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -709,7 +726,6 @@ .amux = LINE2, .tv = 1, }}, - .i2s_rate = 48000, .has_ts = 1, .video_out = CCIR656, }, @@ -719,7 +735,7 @@ // probably wrong, the 7133 one is the NTSC version ... // .tuner_type = TUNER_PHILIPS_FM1236_MK3 .tuner_type = TUNER_LG_NTSC_NEW_TAPC, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -743,7 +759,7 @@ .name = "Pinnacle PCTV Stereo (saa7134)", .audio_clock = 0x00187de7, .tuner_type = TUNER_MT2032, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 3, @@ -957,7 +973,7 @@ .name = "AverMedia 305", .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 1, @@ -989,7 +1005,7 @@ .name = "UPMOST PURPLE TV", .audio_clock = 0x00187de7, .tuner_type = TUNER_PHILIPS_FM1236_MK3, - .need_tda9887 = 1, + .tda9887_conf = TDA9887_PRESENT, .inputs = {{ .name = name_tv, .vmux = 7, @@ -1000,7 +1016,7 @@ .vmux = 7, .amux = LINE1, }}, - }, + }, [SAA7134_BOARD_ITEMS_MTV005] = { /* Norman Jonas */ .name = "Items MuchTV Plus / IT-005", @@ -1025,6 +1041,56 @@ .amux = LINE2, }, }, + [SAA7134_BOARD_CINERGY200] = { + .name = "Terratec Cinergy 200 TV", + .audio_clock = 0x00200000, + .tuner_type = TUNER_PHILIPS_PAL, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = LINE2, + .gpio = 0x0000, + .tv = 1, + }}, + .mute = { + .name = name_mute, + .amux = LINE2, + }, + }, + [SAA7134_BOARD_VIDEOMATE_TV_PVR] = { + /* Alain St-Denis */ + .name = "Compro VideoMate TV PVR/FM", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_NTSC_M, + .gpiomask = 0x808c0080, + .inputs = {{ + .name = name_svideo, + .vmux = 8, + .amux = LINE1, + .gpio = 0x00080 + },{ + .name = name_comp1, + .vmux = 3, + .amux = LINE1, + .gpio = 0x00080 + },{ + .name = name_tv, + .vmux = 1, + .amux = LINE2, + .tv = 1, + .gpio = 0x00080 + }}, + .radio = { + .name = name_radio, + .amux = LINE2, + .gpio = 0x80000 + }, + .mute = { + .name = name_mute, + .amux = LINE2, + .gpio = 0x40000, + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -1088,6 +1154,12 @@ .driver_data = SAA7134_BOARD_FLYVIDEO2000, },{ .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7135, + .subvendor = 0x5168, + .subdevice = 0x0212, + .driver_data = SAA7134_BOARD_FLYTVPLATINUM, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, .subvendor = 0x16be, .subdevice = 0x0003, @@ -1219,6 +1291,19 @@ .subvendor = 0x12ab, .subdevice = 0x0800, .driver_data = SAA7133_BOARD_UPMOST_PURPLE_TV, + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7130, + .subvendor = 0x153B, + .subdevice = 0x1152, + .driver_data = SAA7134_BOARD_CINERGY200, + + },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7130, + .subvendor = 0x185b, + .subdevice = 0xc100, + .driver_data = SAA7134_BOARD_VIDEOMATE_TV_PVR, },{ /* --- boards without eeprom + subsystem ID --- */ @@ -1297,6 +1382,7 @@ static void board_flyvideo(struct saa7134_dev *dev) { #if 0 + /* non-working attempt to detect the correct tuner type ... */ u32 value; int index; @@ -1307,6 +1393,10 @@ fly_list[index].tuner_type); dev->tuner_type = fly_list[index].tuner_type; #endif + printk("%s: there are different flyvideo cards with different tuners\n" + "%s: out there, you might have to use the tuner= insmod\n" + "%s: option to override the default value.\n", + dev->name, dev->name, dev->name); } /* ----------------------------------------------------------- */ @@ -1321,8 +1411,10 @@ switch (dev->board) { case SAA7134_BOARD_FLYVIDEO2000: case SAA7134_BOARD_FLYVIDEO3000: - board_flyvideo(dev); dev->has_remote = 1; + /* fall throuth */ + case SAA7134_BOARD_FLYTVPLATINUM: + board_flyvideo(dev); break; case SAA7134_BOARD_CINERGY400: case SAA7134_BOARD_CINERGY600: @@ -1332,6 +1424,12 @@ break; case SAA7134_BOARD_AVACSSMARTTV: dev->has_remote = 1; + break; + case SAA7134_BOARD_MD5044: + printk("%s: seems there are two different versions of the MD5044\n" + "%s: (with the same ID) out there. If sound doesn't work for\n" + "%s: you try the audio_clock_override=0x200000 insmod option.\n", + dev->name,dev->name,dev->name); break; } return 0; diff -Nru a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c --- a/drivers/media/video/saa7134/saa7134-core.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/video/saa7134/saa7134-core.c 2004-09-06 16:37:51 -07:00 @@ -868,7 +868,8 @@ must_configure_manually(); dev->board = SAA7134_BOARD_UNKNOWN; } - dev->tuner_type = saa7134_boards[dev->board].tuner_type; + dev->tuner_type = saa7134_boards[dev->board].tuner_type; + dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf; if (UNSET != tuner[saa7134_devcount]) dev->tuner_type = tuner[saa7134_devcount]; printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n", @@ -919,7 +920,7 @@ /* load i2c helpers */ if (TUNER_ABSENT != dev->tuner_type) request_module("tuner"); - if (saa7134_boards[dev->board].need_tda9887) + if (dev->tda9887_conf) request_module("tda9887"); if (card_has_ts(dev)) request_module("saa6752hs"); @@ -949,7 +950,7 @@ dev->name); goto fail4; } - printk(KERN_INFO "%s: registered device video%d [ts]\n", + printk(KERN_INFO "%s: registered device video%d [mpeg]\n", dev->name,dev->ts_dev->minor & 0x1f); } diff -Nru a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c --- a/drivers/media/video/saa7134/saa7134-i2c.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/video/saa7134/saa7134-i2c.c 2004-09-06 16:37:51 -07:00 @@ -327,8 +327,10 @@ { struct saa7134_dev *dev = client->adapter->algo_data; int tuner = dev->tuner_type; + int conf = dev->tda9887_conf; saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&tuner); + saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&conf); return 0; } diff -Nru a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c --- a/drivers/media/video/saa7134/saa7134-oss.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/video/saa7134/saa7134-oss.c 2004-09-06 16:37:52 -07:00 @@ -776,8 +776,6 @@ dev->oss.rate = 32000; if (oss_rate) dev->oss.rate = oss_rate; - if (saa7134_boards[dev->board].i2s_rate) - dev->oss.rate = saa7134_boards[dev->board].i2s_rate; dev->oss.rate = (dev->oss.rate > 40000) ? 48000 : 32000; /* mixer */ diff -Nru a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c --- a/drivers/media/video/saa7134/saa7134-tvaudio.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c 2004-09-06 16:37:50 -07:00 @@ -504,7 +504,8 @@ dprintk("tvaudio thread scan start [%d]\n",dev->thread.scan1); dev->tvaudio = NULL; tvaudio_init(dev); - dev->automute = 1; + if (dev->ctl_automute) + dev->automute = 1; mute_input_7134(dev); /* give the tuner some time */ @@ -924,8 +925,9 @@ int (*my_thread)(void *data) = NULL; /* enable I2S audio output */ - if (saa7134_boards[dev->board].i2s_rate) { - int i2sform = (32000 == saa7134_boards[dev->board].i2s_rate) ? 0x00 : 0x01; + if (saa7134_boards[dev->board].has_ts) { + int i2sform = (48000 == dev->oss.rate) + ? 0x01 : 0x00; /* enable I2S output */ saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80); diff -Nru a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c --- a/drivers/media/video/saa7134/saa7134-video.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/video/saa7134/saa7134-video.c 2004-09-06 16:37:51 -07:00 @@ -272,7 +272,8 @@ #define V4L2_CID_PRIVATE_INVERT (V4L2_CID_PRIVATE_BASE + 0) #define V4L2_CID_PRIVATE_Y_ODD (V4L2_CID_PRIVATE_BASE + 1) #define V4L2_CID_PRIVATE_Y_EVEN (V4L2_CID_PRIVATE_BASE + 2) -#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 3) +#define V4L2_CID_PRIVATE_AUTOMUTE (V4L2_CID_PRIVATE_BASE + 3) +#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 4) static const struct v4l2_queryctrl no_ctrl = { .name = "42", @@ -356,6 +357,13 @@ .maximum = 128, .default_value = 0, .type = V4L2_CTRL_TYPE_INTEGER, + },{ + .id = V4L2_CID_PRIVATE_AUTOMUTE, + .name = "automute", + .minimum = 0, + .maximum = 1, + .default_value = 1, + .type = V4L2_CTRL_TYPE_BOOLEAN, } }; static const unsigned int CTRLS = ARRAY_SIZE(video_ctrls); @@ -433,10 +441,11 @@ static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm) { - int luma_control,sync_control,mux; + int luma_control,sync_control,mux,nosignal; dprintk("set tv norm = %s\n",norm->name); dev->tvnorm = norm; + nosignal = (0 == (saa_readb(SAA7134_STATUS_VIDEO1) & 0x03)); mux = card_in(dev,dev->ctl_input).vmux; luma_control = norm->luma_control; @@ -444,7 +453,7 @@ if (mux > 5) luma_control |= 0x80; /* svideo */ - if (noninterlaced) + if (noninterlaced || nosignal) sync_control |= 0x20; /* setup cropping */ @@ -1043,6 +1052,9 @@ case V4L2_CID_PRIVATE_Y_ODD: c->value = dev->ctl_y_odd; break; + case V4L2_CID_PRIVATE_AUTOMUTE: + c->value = dev->ctl_automute; + break; default: return -EINVAL; } @@ -1118,6 +1130,17 @@ dev->ctl_y_odd = c->value; restart_overlay = 1; break; + case V4L2_CID_PRIVATE_AUTOMUTE: + dev->ctl_automute = c->value; + if (dev->tda9887_conf) { + if (dev->ctl_automute) + dev->tda9887_conf |= TDA9887_AUTOMUTE; + else + dev->tda9887_conf &= ~TDA9887_AUTOMUTE; + saa7134_i2c_call_clients(dev, TDA9887_SET_CONFIG, + &dev->tda9887_conf); + } + break; default: return -EINVAL; } @@ -1820,7 +1843,7 @@ struct v4l2_frequency *f = arg; memset(f,0,sizeof(*f)); - f->type = V4L2_TUNER_ANALOG_TV; + f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; f->frequency = dev->ctl_freq; return 0; } @@ -1830,7 +1853,9 @@ if (0 != f->tuner) return -EINVAL; - if (V4L2_TUNER_ANALOG_TV != f->type) + if (0 == fh->radio && V4L2_TUNER_ANALOG_TV != f->type) + return -EINVAL; + if (1 == fh->radio && V4L2_TUNER_RADIO != f->type) return -EINVAL; down(&dev->lock); dev->ctl_freq = f->frequency; @@ -2244,9 +2269,12 @@ dev->ctl_hue = ctrl_by_id(V4L2_CID_HUE)->default_value; dev->ctl_saturation = ctrl_by_id(V4L2_CID_SATURATION)->default_value; dev->ctl_volume = ctrl_by_id(V4L2_CID_AUDIO_VOLUME)->default_value; + dev->ctl_mute = ctrl_by_id(V4L2_CID_AUDIO_MUTE)->default_value; + dev->ctl_invert = ctrl_by_id(V4L2_CID_PRIVATE_INVERT)->default_value; + dev->ctl_automute = ctrl_by_id(V4L2_CID_PRIVATE_AUTOMUTE)->default_value; - dev->ctl_invert = 0; - dev->ctl_mute = 1; + if (dev->tda9887_conf && dev->ctl_automute) + dev->tda9887_conf |= TDA9887_AUTOMUTE; dev->automute = 0; INIT_LIST_HEAD(&dev->video_q.queue); @@ -2300,10 +2328,14 @@ if (0 != norm) { /* wake up tvaudio audio carrier scan thread */ saa7134_tvaudio_do_scan(dev); + if (!noninterlaced) + saa_clearb(SAA7134_SYNC_CTRL, 0x20); } else { /* no video signal -> mute audio */ - dev->automute = 1; + if (dev->ctl_automute) + dev->automute = 1; saa7134_tvaudio_setmute(dev); + saa_setb(SAA7134_SYNC_CTRL, 0x20); } } diff -Nru a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h --- a/drivers/media/video/saa7134/saa7134.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/saa7134/saa7134.h 2004-09-06 16:37:54 -07:00 @@ -156,6 +156,9 @@ #define SAA7134_BOARD_AVERMEDIA_305 35 #define SAA7133_BOARD_UPMOST_PURPLE_TV 36 #define SAA7134_BOARD_ITEMS_MTV005 37 +#define SAA7134_BOARD_CINERGY200 38 +#define SAA7134_BOARD_FLYTVPLATINUM 39 +#define SAA7134_BOARD_VIDEOMATE_TV_PVR 40 #define SAA7134_INPUT_MAX 8 @@ -178,13 +181,12 @@ struct saa7134_input mute; /* peripheral I/O */ - unsigned int i2s_rate; unsigned int has_ts; enum saa7134_video_out video_out; /* i2c chip info */ unsigned int tuner_type; - unsigned int need_tda9887:1; + unsigned int tda9887_conf; }; #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) @@ -362,6 +364,7 @@ /* config info */ unsigned int board; unsigned int tuner_type; + unsigned int tda9887_conf; unsigned int gpio_value; /* i2c i/o */ @@ -397,6 +400,7 @@ int ctl_mirror; int ctl_y_odd; int ctl_y_even; + int ctl_automute; /* crop */ struct v4l2_rect crop_bounds; diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c --- a/drivers/media/video/tda7432.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/tda7432.c 2004-09-06 16:37:54 -07:00 @@ -532,17 +532,17 @@ .driver = &driver, }; -static int tda7432_init(void) +static int __init tda7432_init(void) { if ( (loudness < 0) || (loudness > 15) ) { printk(KERN_ERR "tda7432: loudness parameter must be between 0 and 15\n"); return -EINVAL; } - i2c_add_driver(&driver); - return 0; + + return i2c_add_driver(&driver); } -static void tda7432_fini(void) +static void __exit tda7432_fini(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c --- a/drivers/media/video/tda9875.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/media/video/tda9875.c 2004-09-06 16:37:52 -07:00 @@ -403,13 +403,12 @@ .driver = &driver, }; -static int tda9875_init(void) +static int __init tda9875_init(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void tda9875_fini(void) +static void __exit tda9875_fini(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c --- a/drivers/media/video/tda9887.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/media/video/tda9887.c 2004-09-06 16:37:50 -07:00 @@ -8,6 +8,7 @@ #include #include +#include #include /* Chips: @@ -47,6 +48,7 @@ struct i2c_client client; v4l2_std_id std; unsigned int radio; + unsigned int config; unsigned int pinnacle_id; unsigned int using_v4l2; }; @@ -397,6 +399,36 @@ return 0; } +static int tda9887_set_config(struct tda9887 *t, char *buf) +{ + if (t->config & TDA9887_PORT1) + buf[1] |= cOutputPort1Inactive; + if (t->config & TDA9887_PORT2) + buf[1] |= cOutputPort2Inactive; + if (t->config & TDA9887_QSS) + buf[1] |= cQSS; + if (t->config & TDA9887_INTERCARRIER) + buf[1] &= ~cQSS; + + if (t->config & TDA9887_AUTOMUTE) + buf[1] |= cAutoMuteFmActive; + if (t->config & TDA9887_DEEMPHASIS_MASK) { + buf[2] &= ~0x60; + switch (t->config & TDA9887_DEEMPHASIS_MASK) { + case TDA9887_DEEMPHASIS_NONE: + buf[2] |= cDeemphasisOFF; + break; + case TDA9887_DEEMPHASIS_50: + buf[2] |= cDeemphasisON | cDeemphasis50; + break; + case TDA9887_DEEMPHASIS_75: + buf[2] |= cDeemphasisON | cDeemphasis75; + break; + } + } + return 0; +} + /* ---------------------------------------------------------------------- */ static int tda9887_set_pinnacle(struct tda9887 *t, char *buf) @@ -499,6 +531,7 @@ if (UNSET != t->pinnacle_id) { tda9887_set_pinnacle(t,buf); } + tda9887_set_config(t,buf); tda9887_set_insmod(t,buf); dprintk(PREFIX "writing: b=0x%02x c=0x%02x e=0x%02x\n", @@ -594,6 +627,14 @@ tda9887_configure(t); break; } + case TDA9887_SET_CONFIG: + { + int *i = arg; + + t->config = *i; + tda9887_configure(t); + break; + } /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ @@ -644,6 +685,25 @@ t->radio = 1; } tda9887_configure(t); + break; + } + case VIDIOC_G_TUNER: + { + static int AFC_BITS_2_kHz[] = { + -12500, -37500, -62500, -97500, + -112500, -137500, -162500, -187500, + 187500, 162500, 137500, 112500, + 97500 , 62500, 37500 , 12500 + }; + struct v4l2_tuner* tuner = arg; + + if (t->radio) { + __u8 reg = 0; + tuner->afc=0; + if (1 == i2c_master_recv(&t->client,®,1)) + tuner->afc = AFC_BITS_2_kHz[(reg>>1)&0x0f]; + } + break; } default: /* nothing */ @@ -670,13 +730,12 @@ .driver = &driver, }; -static int tda9887_init_module(void) +static int __init tda9887_init_module(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void tda9887_cleanup_module(void) +static void __exit tda9887_cleanup_module(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c --- a/drivers/media/video/tuner.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/tuner.c 2004-09-06 16:37:54 -07:00 @@ -208,7 +208,7 @@ { "Temic PAL* auto + FM (4009 FN5)", TEMIC, PAL, 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623}, { "SHARP NTSC_JP (2U5JF5540)", SHARP, NTSC, /* 940=16*58.75 NTSC@Japan */ - 16*137.25,16*317.25,0x01,0x02,0x08,0x8e,732 }, // Corrected to NTSC=732 (was:940) + 16*137.25,16*317.25,0x01,0x02,0x08,0x8e,940 }, { "Samsung PAL TCPM9091PD27", Samsung, PAL, /* from sourceforge v3tv */ 16*169,16*464,0xA0,0x90,0x30,0x8e,623}, @@ -229,7 +229,7 @@ 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,732}, { "HITACHI V7-J180AT", HITACHI, NTSC, - 16*170.00, 16*450.00, 0x01,0x02,0x00,0x8e,940 }, + 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,940 }, { "Philips PAL_MK (FI1216 MK)", Philips, PAL, 16*140.25,16*463.25,0x01,0xc2,0xcf,0x8e,623}, { "Philips 1236D ATSC/NTSC daul in",Philips,ATSC, @@ -241,6 +241,13 @@ 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732}, { "Microtune 4049 FM5",Microtune,PAL, 16*141.00,16*464.00,0xa0,0x90,0x30,0x8e,623}, + { "Panasonic VP27s/ENGE4324D", Panasonic, NTSC, + 16*160.00,16*454.00,0x01,0x02,0x08,0xce,940}, + { "LG NTSC (TAPE series)", LGINNOTEK, NTSC, + 16*170.00, 16*450.00, 0x01,0x02,0x04,0x8e,732 }, + + { "Tenna TNF 8831 BGFF)", Philips, PAL, + 16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623}, }; #define TUNERS ARRAY_SIZE(tuners) @@ -934,6 +941,9 @@ case TUNER_PHILIPS_FM1236_MK3: buffer[3] = 0x19; break; + case TUNER_LG_PAL_FM: + buffer[3] = 0xa5; + break; default: buffer[3] = 0xa4; break; @@ -1300,13 +1310,12 @@ .driver = &driver, }; -static int tuner_init_module(void) +static int __init tuner_init_module(void) { - i2c_add_driver(&driver); - return 0; + return i2c_add_driver(&driver); } -static void tuner_cleanup_module(void) +static void __exit tuner_cleanup_module(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c --- a/drivers/media/video/tvaudio.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/media/video/tvaudio.c 2004-09-06 16:37:51 -07:00 @@ -1651,7 +1651,7 @@ .driver = &driver, }; -static int audiochip_init_module(void) +static int __init audiochip_init_module(void) { struct CHIPDESC *desc; printk(KERN_INFO "tvaudio: TV audio decoder + audio/video mux driver\n"); @@ -1659,11 +1659,11 @@ for (desc = chiplist; desc->name != NULL; desc++) printk("%s%s", (desc == chiplist) ? "" : ",",desc->name); printk("\n"); - i2c_add_driver(&driver); - return 0; + + return i2c_add_driver(&driver); } -static void audiochip_cleanup_module(void) +static void __exit audiochip_cleanup_module(void) { i2c_del_driver(&driver); } diff -Nru a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c --- a/drivers/media/video/tvmixer.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/tvmixer.c 2004-09-06 16:37:54 -07:00 @@ -330,17 +330,17 @@ /* ----------------------------------------------------------------------- */ -static int tvmixer_init_module(void) +static int __init tvmixer_init_module(void) { int i; for (i = 0; i < DEV_MAX; i++) devices[i].minor = -1; - i2c_add_driver(&driver); - return 0; + + return i2c_add_driver(&driver); } -static void tvmixer_cleanup_module(void) +static void __exit tvmixer_cleanup_module(void) { int i; diff -Nru a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c --- a/drivers/media/video/zoran_device.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/media/video/zoran_device.c 2004-09-06 16:37:53 -07:00 @@ -1105,8 +1105,7 @@ ZR36057_ISR); btand(~ZR36057_JMC_Go_en, ZR36057_JMC); // \Go_en - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ / 20); + msleep(50); set_videobus_dir(zr, 0); set_frame(zr, 1); // /FRAME diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c --- a/drivers/media/video/zoran_driver.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/media/video/zoran_driver.c 2004-09-06 16:37:54 -07:00 @@ -2265,8 +2265,8 @@ dprintk(3, KERN_DEBUG - "%s: VIDIOCSFBUF - base=0x%x, w=%d, h=%d, depth=%d, bpl=%d\n", - ZR_DEVNAME(zr), (u32) vbuf->base, vbuf->width, + "%s: VIDIOCSFBUF - base=%p, w=%d, h=%d, depth=%d, bpl=%d\n", + ZR_DEVNAME(zr), vbuf->base, vbuf->width, vbuf->height, vbuf->depth, vbuf->bytesperline); for (i = 0; i < zoran_num_formats; i++) diff -Nru a/drivers/message/fusion/Kconfig b/drivers/message/fusion/Kconfig --- a/drivers/message/fusion/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/drivers/message/fusion/Kconfig 2004-09-06 16:37:55 -07:00 @@ -27,39 +27,6 @@ necessary (or recommended) unless the user will be running large I/O's via the raw interface. -config FUSION_ISENSE - tristate "Enhanced SCSI error reporting" - depends on MODULES && FUSION && m - ---help--- - The isense module (roughly stands for Interpret SENSE data) is - completely optional. It simply provides extra English readable - strings in SCSI Error Report(s) that might be generated from the - Fusion MPT SCSI Host driver, for example when a target device - returns a SCSI check condition on a I/O. Without this module - loaded you might see: - - SCSI Error Report =-=-= (ioc0,scsi5:0) - SCSI_Status=02h (CHECK_CONDITION) - Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00 - SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00 - SenseKey=2h (NOT READY); FRU=02h - ASC/ASCQ=29h/00h - - Where otherwise, if this module had been loaded, you would see: - - SCSI Error Report =-=-= (ioc0,scsi5:0) - SCSI_Status=02h (CHECK_CONDITION) - Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00 - "WRITE(10)" - SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00 - SenseKey=2h (NOT READY); FRU=02h - ASC/ASCQ=29h/00h "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED" - - Say M for "Enhanced SCSI error reporting" to compile this optional module, - creating a driver named: isense. - - NOTE: Support for building this feature into the kernel is not - available, due to kernel size considerations. - config FUSION_CTL tristate "Fusion MPT misc device (ioctl) driver" depends on MODULES && FUSION && m diff -Nru a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile --- a/drivers/message/fusion/Makefile 2004-09-06 16:37:53 -07:00 +++ b/drivers/message/fusion/Makefile 2004-09-06 16:37:53 -07:00 @@ -2,7 +2,7 @@ # Makefile for the LSI Logic Fusion MPT (Message Passing Technology) drivers. # # Note! If you want to turn on various debug defines for an extended period of -# time but don't want them lingering around in the Makefile when you pass it on +# time but don't want them lingering around in the Makefile when you pass it on # to someone else, use the MPT_CFLAGS env variable (thanks Steve). -nromer #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-{ LSI_LOGIC @@ -48,6 +48,5 @@ #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC obj-$(CONFIG_FUSION) += mptbase.o mptscsih.o -obj-$(CONFIG_FUSION_ISENSE) += isense.o obj-$(CONFIG_FUSION_CTL) += mptctl.o obj-$(CONFIG_FUSION_LAN) += mptlan.o diff -Nru a/drivers/message/fusion/ascq_tbl.c b/drivers/message/fusion/ascq_tbl.c --- a/drivers/message/fusion/ascq_tbl.c 2004-09-06 16:37:55 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,2416 +0,0 @@ -#ifndef SCSI_ASCQ_TBL_C_INCLUDED -#define SCSI_ASCQ_TBL_C_INCLUDED - -/* AuToMaGiCaLlY generated from: "t10.org/asc-num.txt" - ******************************************************************************* - * File: ASC-NUM.TXT - * - * SCSI ASC/ASCQ Assignments - * Numeric Sorted Listing - * as of 5/18/00 - * - * D - DIRECT ACCESS DEVICE (SBC-2) device column key - * .T - SEQUENTIAL ACCESS DEVICE (SSC) ------------------- - * . L - PRINTER DEVICE (SSC) blank = reserved - * . P - PROCESSOR DEVICE (SPC) not blank = allowed - * . .W - WRITE ONCE READ MULTIPLE DEVICE (SBC-2) - * . . R - CD DEVICE (MMC) - * . . S - SCANNER DEVICE (SCSI-2) - * . . .O - OPTICAL MEMORY DEVICE (SBC-2) - * . . . M - MEDIA CHANGER DEVICE (SMC) - * . . . C - COMMUNICATION DEVICE (SCSI-2) - * . . . .A - STORAGE ARRAY DEVICE (SCC) - * . . . . E - ENCLOSURE SERVICES DEVICE (SES) - * . . . . B - SIMPLIFIED DIRECT-ACCESS DEVICE (RBC) - * . . . . .K - OPTICAL CARD READER/WRITER DEVICE (OCRW) - * ASC/ASCQ DTLPWRSOMCAEBK Description - * ------- -------------- ---------------------------------------------------- - */ - -static char SenseDevTypes001[] = "DTLPWRSOMCAEBK"; -static char SenseDevTypes002[] = ".T............"; -static char SenseDevTypes003[] = ".T....S......."; -static char SenseDevTypes004[] = ".TL...S......."; -static char SenseDevTypes005[] = ".....R........"; -static char SenseDevTypes006[] = "DTL.WRSOM.AEBK"; -static char SenseDevTypes007[] = "D...W..O....BK"; -static char SenseDevTypes008[] = "D...WR.OM...BK"; -static char SenseDevTypes009[] = "DTL.W.SO....BK"; -static char SenseDevTypes010[] = "DTL..R.O....B."; -static char SenseDevTypes011[] = "DT..W..OMCA.BK"; -static char SenseDevTypes012[] = ".............."; -static char SenseDevTypes013[] = "DTL.WRSOMCAEBK"; -static char SenseDevTypes014[] = "DTL.WRSOM...BK"; -static char SenseDevTypes015[] = "DT...R.OM...BK"; -static char SenseDevTypes016[] = "DTLPWRSO.C...K"; -static char SenseDevTypes017[] = "DT..WR.O....B."; -static char SenseDevTypes018[] = "....WR.O.....K"; -static char SenseDevTypes019[] = "....WR.O......"; -static char SenseDevTypes020[] = ".T...RS......."; -static char SenseDevTypes021[] = ".............K"; -static char SenseDevTypes022[] = "DT..W..O....B."; -static char SenseDevTypes023[] = "DT..WRSO....BK"; -static char SenseDevTypes024[] = "DT..W.SO....BK"; -static char SenseDevTypes025[] = "....WR.O....B."; -static char SenseDevTypes026[] = "....W..O....B."; -static char SenseDevTypes027[] = "DT.....O....BK"; -static char SenseDevTypes028[] = "DTL.WRSO....BK"; -static char SenseDevTypes029[] = "DT..WR.O....BK"; -static char SenseDevTypes030[] = "DT..W..O....BK"; -static char SenseDevTypes031[] = "D...WR.O....BK"; -static char SenseDevTypes032[] = "D......O.....K"; -static char SenseDevTypes033[] = "D......O....BK"; -static char SenseDevTypes034[] = "DT..WR.OM...BK"; -static char SenseDevTypes035[] = "D............."; -static char SenseDevTypes036[] = "DTLPWRSOMCAE.K"; -static char SenseDevTypes037[] = "DTLPWRSOMCA.BK"; -static char SenseDevTypes038[] = ".T...R........"; -static char SenseDevTypes039[] = "DT..WR.OM...B."; -static char SenseDevTypes040[] = "DTL.WRSOMCAE.K"; -static char SenseDevTypes041[] = "DTLPWRSOMCAE.."; -static char SenseDevTypes042[] = "......S......."; -static char SenseDevTypes043[] = "............B."; -static char SenseDevTypes044[] = "DTLPWRSO.CA..K"; -static char SenseDevTypes045[] = "DT...R.......K"; -static char SenseDevTypes046[] = "D.L..R.O....B."; -static char SenseDevTypes047[] = "..L..........."; -static char SenseDevTypes048[] = ".TL..........."; -static char SenseDevTypes049[] = "DTLPWRSOMC..BK"; -static char SenseDevTypes050[] = "DT..WR.OMCAEBK"; -static char SenseDevTypes051[] = "DT..WR.OMCAEB."; -static char SenseDevTypes052[] = ".T...R.O......"; -static char SenseDevTypes053[] = "...P.........."; -static char SenseDevTypes054[] = "DTLPWRSOM.AE.K"; -static char SenseDevTypes055[] = "DTLPWRSOM.AE.."; -static char SenseDevTypes056[] = ".......O......"; -static char SenseDevTypes057[] = "DTLPWRSOM...BK"; -static char SenseDevTypes058[] = "DT..WR.O..A.BK"; -static char SenseDevTypes059[] = "DTLPWRSOM....K"; -static char SenseDevTypes060[] = "D......O......"; -static char SenseDevTypes061[] = ".....R......B."; -static char SenseDevTypes062[] = "D...........B."; -static char SenseDevTypes063[] = "............BK"; -static char SenseDevTypes064[] = "..........A..."; - -static ASCQ_Table_t ASCQ_Table[] = { - { - 0x00, 0x00, - SenseDevTypes001, - "NO ADDITIONAL SENSE INFORMATION" - }, - { - 0x00, 0x01, - SenseDevTypes002, - "FILEMARK DETECTED" - }, - { - 0x00, 0x02, - SenseDevTypes003, - "END-OF-PARTITION/MEDIUM DETECTED" - }, - { - 0x00, 0x03, - SenseDevTypes002, - "SETMARK DETECTED" - }, - { - 0x00, 0x04, - SenseDevTypes003, - "BEGINNING-OF-PARTITION/MEDIUM DETECTED" - }, - { - 0x00, 0x05, - SenseDevTypes004, - "END-OF-DATA DETECTED" - }, - { - 0x00, 0x06, - SenseDevTypes001, - "I/O PROCESS TERMINATED" - }, - { - 0x00, 0x11, - SenseDevTypes005, - "AUDIO PLAY OPERATION IN PROGRESS" - }, - { - 0x00, 0x12, - SenseDevTypes005, - "AUDIO PLAY OPERATION PAUSED" - }, - { - 0x00, 0x13, - SenseDevTypes005, - "AUDIO PLAY OPERATION SUCCESSFULLY COMPLETED" - }, - { - 0x00, 0x14, - SenseDevTypes005, - "AUDIO PLAY OPERATION STOPPED DUE TO ERROR" - }, - { - 0x00, 0x15, - SenseDevTypes005, - "NO CURRENT AUDIO STATUS TO RETURN" - }, - { - 0x00, 0x16, - SenseDevTypes001, - "OPERATION IN PROGRESS" - }, - { - 0x00, 0x17, - SenseDevTypes006, - "CLEANING REQUESTED" - }, - { - 0x01, 0x00, - SenseDevTypes007, - "NO INDEX/SECTOR SIGNAL" - }, - { - 0x02, 0x00, - SenseDevTypes008, - "NO SEEK COMPLETE" - }, - { - 0x03, 0x00, - SenseDevTypes009, - "PERIPHERAL DEVICE WRITE FAULT" - }, - { - 0x03, 0x01, - SenseDevTypes002, - "NO WRITE CURRENT" - }, - { - 0x03, 0x02, - SenseDevTypes002, - "EXCESSIVE WRITE ERRORS" - }, - { - 0x04, 0x00, - SenseDevTypes001, - "LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE" - }, - { - 0x04, 0x01, - SenseDevTypes001, - "LOGICAL UNIT IS IN PROCESS OF BECOMING READY" - }, - { - 0x04, 0x02, - SenseDevTypes001, - "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED" - }, - { - 0x04, 0x03, - SenseDevTypes001, - "LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED" - }, - { - 0x04, 0x04, - SenseDevTypes010, - "LOGICAL UNIT NOT READY, FORMAT IN PROGRESS" - }, - { - 0x04, 0x05, - SenseDevTypes011, - "LOGICAL UNIT NOT READY, REBUILD IN PROGRESS" - }, - { - 0x04, 0x06, - SenseDevTypes011, - "LOGICAL UNIT NOT READY, RECALCULATION IN PROGRESS" - }, - { - 0x04, 0x07, - SenseDevTypes001, - "LOGICAL UNIT NOT READY, OPERATION IN PROGRESS" - }, - { - 0x04, 0x08, - SenseDevTypes005, - "LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS" - }, - { - 0x04, 0x09, - SenseDevTypes001, - "LOGICAL UNIT NOT READY, SELF-TEST IN PROGRESS" - }, - { - 0x04, 0x10, - SenseDevTypes012, - "auxiliary memory code 2 (99-148) [proposed]" - }, - { - 0x05, 0x00, - SenseDevTypes013, - "LOGICAL UNIT DOES NOT RESPOND TO SELECTION" - }, - { - 0x06, 0x00, - SenseDevTypes008, - "NO REFERENCE POSITION FOUND" - }, - { - 0x07, 0x00, - SenseDevTypes014, - "MULTIPLE PERIPHERAL DEVICES SELECTED" - }, - { - 0x08, 0x00, - SenseDevTypes013, - "LOGICAL UNIT COMMUNICATION FAILURE" - }, - { - 0x08, 0x01, - SenseDevTypes013, - "LOGICAL UNIT COMMUNICATION TIME-OUT" - }, - { - 0x08, 0x02, - SenseDevTypes013, - "LOGICAL UNIT COMMUNICATION PARITY ERROR" - }, - { - 0x08, 0x03, - SenseDevTypes015, - "LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32)" - }, - { - 0x08, 0x04, - SenseDevTypes016, - "UNREACHABLE COPY TARGET" - }, - { - 0x09, 0x00, - SenseDevTypes017, - "TRACK FOLLOWING ERROR" - }, - { - 0x09, 0x01, - SenseDevTypes018, - "TRACKING SERVO FAILURE" - }, - { - 0x09, 0x02, - SenseDevTypes018, - "FOCUS SERVO FAILURE" - }, - { - 0x09, 0x03, - SenseDevTypes019, - "SPINDLE SERVO FAILURE" - }, - { - 0x09, 0x04, - SenseDevTypes017, - "HEAD SELECT FAULT" - }, - { - 0x0A, 0x00, - SenseDevTypes001, - "ERROR LOG OVERFLOW" - }, - { - 0x0B, 0x00, - SenseDevTypes001, - "WARNING" - }, - { - 0x0B, 0x01, - SenseDevTypes001, - "WARNING - SPECIFIED TEMPERATURE EXCEEDED" - }, - { - 0x0B, 0x02, - SenseDevTypes001, - "WARNING - ENCLOSURE DEGRADED" - }, - { - 0x0C, 0x00, - SenseDevTypes020, - "WRITE ERROR" - }, - { - 0x0C, 0x01, - SenseDevTypes021, - "WRITE ERROR - RECOVERED WITH AUTO REALLOCATION" - }, - { - 0x0C, 0x02, - SenseDevTypes007, - "WRITE ERROR - AUTO REALLOCATION FAILED" - }, - { - 0x0C, 0x03, - SenseDevTypes007, - "WRITE ERROR - RECOMMEND REASSIGNMENT" - }, - { - 0x0C, 0x04, - SenseDevTypes022, - "COMPRESSION CHECK MISCOMPARE ERROR" - }, - { - 0x0C, 0x05, - SenseDevTypes022, - "DATA EXPANSION OCCURRED DURING COMPRESSION" - }, - { - 0x0C, 0x06, - SenseDevTypes022, - "BLOCK NOT COMPRESSIBLE" - }, - { - 0x0C, 0x07, - SenseDevTypes005, - "WRITE ERROR - RECOVERY NEEDED" - }, - { - 0x0C, 0x08, - SenseDevTypes005, - "WRITE ERROR - RECOVERY FAILED" - }, - { - 0x0C, 0x09, - SenseDevTypes005, - "WRITE ERROR - LOSS OF STREAMING" - }, - { - 0x0C, 0x0A, - SenseDevTypes005, - "WRITE ERROR - PADDING BLOCKS ADDED" - }, - { - 0x0C, 0x0B, - SenseDevTypes012, - "auxiliary memory code 4 (99-148) [proposed]" - }, - { - 0x10, 0x00, - SenseDevTypes007, - "ID CRC OR ECC ERROR" - }, - { - 0x11, 0x00, - SenseDevTypes023, - "UNRECOVERED READ ERROR" - }, - { - 0x11, 0x01, - SenseDevTypes023, - "READ RETRIES EXHAUSTED" - }, - { - 0x11, 0x02, - SenseDevTypes023, - "ERROR TOO LONG TO CORRECT" - }, - { - 0x11, 0x03, - SenseDevTypes024, - "MULTIPLE READ ERRORS" - }, - { - 0x11, 0x04, - SenseDevTypes007, - "UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED" - }, - { - 0x11, 0x05, - SenseDevTypes025, - "L-EC UNCORRECTABLE ERROR" - }, - { - 0x11, 0x06, - SenseDevTypes025, - "CIRC UNRECOVERED ERROR" - }, - { - 0x11, 0x07, - SenseDevTypes026, - "DATA RE-SYNCHRONIZATION ERROR" - }, - { - 0x11, 0x08, - SenseDevTypes002, - "INCOMPLETE BLOCK READ" - }, - { - 0x11, 0x09, - SenseDevTypes002, - "NO GAP FOUND" - }, - { - 0x11, 0x0A, - SenseDevTypes027, - "MISCORRECTED ERROR" - }, - { - 0x11, 0x0B, - SenseDevTypes007, - "UNRECOVERED READ ERROR - RECOMMEND REASSIGNMENT" - }, - { - 0x11, 0x0C, - SenseDevTypes007, - "UNRECOVERED READ ERROR - RECOMMEND REWRITE THE DATA" - }, - { - 0x11, 0x0D, - SenseDevTypes017, - "DE-COMPRESSION CRC ERROR" - }, - { - 0x11, 0x0E, - SenseDevTypes017, - "CANNOT DECOMPRESS USING DECLARED ALGORITHM" - }, - { - 0x11, 0x0F, - SenseDevTypes005, - "ERROR READING UPC/EAN NUMBER" - }, - { - 0x11, 0x10, - SenseDevTypes005, - "ERROR READING ISRC NUMBER" - }, - { - 0x11, 0x11, - SenseDevTypes005, - "READ ERROR - LOSS OF STREAMING" - }, - { - 0x11, 0x12, - SenseDevTypes012, - "auxiliary memory code 3 (99-148) [proposed]" - }, - { - 0x12, 0x00, - SenseDevTypes007, - "ADDRESS MARK NOT FOUND FOR ID FIELD" - }, - { - 0x13, 0x00, - SenseDevTypes007, - "ADDRESS MARK NOT FOUND FOR DATA FIELD" - }, - { - 0x14, 0x00, - SenseDevTypes028, - "RECORDED ENTITY NOT FOUND" - }, - { - 0x14, 0x01, - SenseDevTypes029, - "RECORD NOT FOUND" - }, - { - 0x14, 0x02, - SenseDevTypes002, - "FILEMARK OR SETMARK NOT FOUND" - }, - { - 0x14, 0x03, - SenseDevTypes002, - "END-OF-DATA NOT FOUND" - }, - { - 0x14, 0x04, - SenseDevTypes002, - "BLOCK SEQUENCE ERROR" - }, - { - 0x14, 0x05, - SenseDevTypes030, - "RECORD NOT FOUND - RECOMMEND REASSIGNMENT" - }, - { - 0x14, 0x06, - SenseDevTypes030, - "RECORD NOT FOUND - DATA AUTO-REALLOCATED" - }, - { - 0x15, 0x00, - SenseDevTypes014, - "RANDOM POSITIONING ERROR" - }, - { - 0x15, 0x01, - SenseDevTypes014, - "MECHANICAL POSITIONING ERROR" - }, - { - 0x15, 0x02, - SenseDevTypes029, - "POSITIONING ERROR DETECTED BY READ OF MEDIUM" - }, - { - 0x16, 0x00, - SenseDevTypes007, - "DATA SYNCHRONIZATION MARK ERROR" - }, - { - 0x16, 0x01, - SenseDevTypes007, - "DATA SYNC ERROR - DATA REWRITTEN" - }, - { - 0x16, 0x02, - SenseDevTypes007, - "DATA SYNC ERROR - RECOMMEND REWRITE" - }, - { - 0x16, 0x03, - SenseDevTypes007, - "DATA SYNC ERROR - DATA AUTO-REALLOCATED" - }, - { - 0x16, 0x04, - SenseDevTypes007, - "DATA SYNC ERROR - RECOMMEND REASSIGNMENT" - }, - { - 0x17, 0x00, - SenseDevTypes023, - "RECOVERED DATA WITH NO ERROR CORRECTION APPLIED" - }, - { - 0x17, 0x01, - SenseDevTypes023, - "RECOVERED DATA WITH RETRIES" - }, - { - 0x17, 0x02, - SenseDevTypes029, - "RECOVERED DATA WITH POSITIVE HEAD OFFSET" - }, - { - 0x17, 0x03, - SenseDevTypes029, - "RECOVERED DATA WITH NEGATIVE HEAD OFFSET" - }, - { - 0x17, 0x04, - SenseDevTypes025, - "RECOVERED DATA WITH RETRIES AND/OR CIRC APPLIED" - }, - { - 0x17, 0x05, - SenseDevTypes031, - "RECOVERED DATA USING PREVIOUS SECTOR ID" - }, - { - 0x17, 0x06, - SenseDevTypes007, - "RECOVERED DATA WITHOUT ECC - DATA AUTO-REALLOCATED" - }, - { - 0x17, 0x07, - SenseDevTypes031, - "RECOVERED DATA WITHOUT ECC - RECOMMEND REASSIGNMENT" - }, - { - 0x17, 0x08, - SenseDevTypes031, - "RECOVERED DATA WITHOUT ECC - RECOMMEND REWRITE" - }, - { - 0x17, 0x09, - SenseDevTypes031, - "RECOVERED DATA WITHOUT ECC - DATA REWRITTEN" - }, - { - 0x18, 0x00, - SenseDevTypes029, - "RECOVERED DATA WITH ERROR CORRECTION APPLIED" - }, - { - 0x18, 0x01, - SenseDevTypes031, - "RECOVERED DATA WITH ERROR CORR. & RETRIES APPLIED" - }, - { - 0x18, 0x02, - SenseDevTypes031, - "RECOVERED DATA - DATA AUTO-REALLOCATED" - }, - { - 0x18, 0x03, - SenseDevTypes005, - "RECOVERED DATA WITH CIRC" - }, - { - 0x18, 0x04, - SenseDevTypes005, - "RECOVERED DATA WITH L-EC" - }, - { - 0x18, 0x05, - SenseDevTypes031, - "RECOVERED DATA - RECOMMEND REASSIGNMENT" - }, - { - 0x18, 0x06, - SenseDevTypes031, - "RECOVERED DATA - RECOMMEND REWRITE" - }, - { - 0x18, 0x07, - SenseDevTypes007, - "RECOVERED DATA WITH ECC - DATA REWRITTEN" - }, - { - 0x19, 0x00, - SenseDevTypes032, - "DEFECT LIST ERROR" - }, - { - 0x19, 0x01, - SenseDevTypes032, - "DEFECT LIST NOT AVAILABLE" - }, - { - 0x19, 0x02, - SenseDevTypes032, - "DEFECT LIST ERROR IN PRIMARY LIST" - }, - { - 0x19, 0x03, - SenseDevTypes032, - "DEFECT LIST ERROR IN GROWN LIST" - }, - { - 0x1A, 0x00, - SenseDevTypes001, - "PARAMETER LIST LENGTH ERROR" - }, - { - 0x1B, 0x00, - SenseDevTypes001, - "SYNCHRONOUS DATA TRANSFER ERROR" - }, - { - 0x1C, 0x00, - SenseDevTypes033, - "DEFECT LIST NOT FOUND" - }, - { - 0x1C, 0x01, - SenseDevTypes033, - "PRIMARY DEFECT LIST NOT FOUND" - }, - { - 0x1C, 0x02, - SenseDevTypes033, - "GROWN DEFECT LIST NOT FOUND" - }, - { - 0x1D, 0x00, - SenseDevTypes029, - "MISCOMPARE DURING VERIFY OPERATION" - }, - { - 0x1E, 0x00, - SenseDevTypes007, - "RECOVERED ID WITH ECC CORRECTION" - }, - { - 0x1F, 0x00, - SenseDevTypes032, - "PARTIAL DEFECT LIST TRANSFER" - }, - { - 0x20, 0x00, - SenseDevTypes001, - "INVALID COMMAND OPERATION CODE" - }, - { - 0x20, 0x01, - SenseDevTypes012, - "access controls code 1 (99-314) [proposed]" - }, - { - 0x20, 0x02, - SenseDevTypes012, - "access controls code 2 (99-314) [proposed]" - }, - { - 0x20, 0x03, - SenseDevTypes012, - "access controls code 3 (99-314) [proposed]" - }, - { - 0x21, 0x00, - SenseDevTypes034, - "LOGICAL BLOCK ADDRESS OUT OF RANGE" - }, - { - 0x21, 0x01, - SenseDevTypes034, - "INVALID ELEMENT ADDRESS" - }, - { - 0x22, 0x00, - SenseDevTypes035, - "ILLEGAL FUNCTION (USE 20 00, 24 00, OR 26 00)" - }, - { - 0x24, 0x00, - SenseDevTypes001, - "INVALID FIELD IN CDB" - }, - { - 0x24, 0x01, - SenseDevTypes001, - "CDB DECRYPTION ERROR" - }, - { - 0x25, 0x00, - SenseDevTypes001, - "LOGICAL UNIT NOT SUPPORTED" - }, - { - 0x26, 0x00, - SenseDevTypes001, - "INVALID FIELD IN PARAMETER LIST" - }, - { - 0x26, 0x01, - SenseDevTypes001, - "PARAMETER NOT SUPPORTED" - }, - { - 0x26, 0x02, - SenseDevTypes001, - "PARAMETER VALUE INVALID" - }, - { - 0x26, 0x03, - SenseDevTypes036, - "THRESHOLD PARAMETERS NOT SUPPORTED" - }, - { - 0x26, 0x04, - SenseDevTypes001, - "INVALID RELEASE OF PERSISTENT RESERVATION" - }, - { - 0x26, 0x05, - SenseDevTypes037, - "DATA DECRYPTION ERROR" - }, - { - 0x26, 0x06, - SenseDevTypes016, - "TOO MANY TARGET DESCRIPTORS" - }, - { - 0x26, 0x07, - SenseDevTypes016, - "UNSUPPORTED TARGET DESCRIPTOR TYPE CODE" - }, - { - 0x26, 0x08, - SenseDevTypes016, - "TOO MANY SEGMENT DESCRIPTORS" - }, - { - 0x26, 0x09, - SenseDevTypes016, - "UNSUPPORTED SEGMENT DESCRIPTOR TYPE CODE" - }, - { - 0x26, 0x0A, - SenseDevTypes016, - "UNEXPECTED INEXACT SEGMENT" - }, - { - 0x26, 0x0B, - SenseDevTypes016, - "INLINE DATA LENGTH EXCEEDED" - }, - { - 0x26, 0x0C, - SenseDevTypes016, - "INVALID OPERATION FOR COPY SOURCE OR DESTINATION" - }, - { - 0x26, 0x0D, - SenseDevTypes016, - "COPY SEGMENT GRANULARITY VIOLATION" - }, - { - 0x27, 0x00, - SenseDevTypes029, - "WRITE PROTECTED" - }, - { - 0x27, 0x01, - SenseDevTypes029, - "HARDWARE WRITE PROTECTED" - }, - { - 0x27, 0x02, - SenseDevTypes029, - "LOGICAL UNIT SOFTWARE WRITE PROTECTED" - }, - { - 0x27, 0x03, - SenseDevTypes038, - "ASSOCIATED WRITE PROTECT" - }, - { - 0x27, 0x04, - SenseDevTypes038, - "PERSISTENT WRITE PROTECT" - }, - { - 0x27, 0x05, - SenseDevTypes038, - "PERMANENT WRITE PROTECT" - }, - { - 0x28, 0x00, - SenseDevTypes001, - "NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED" - }, - { - 0x28, 0x01, - SenseDevTypes039, - "IMPORT OR EXPORT ELEMENT ACCESSED" - }, - { - 0x29, 0x00, - SenseDevTypes001, - "POWER ON, RESET, OR BUS DEVICE RESET OCCURRED" - }, - { - 0x29, 0x01, - SenseDevTypes001, - "POWER ON OCCURRED" - }, - { - 0x29, 0x02, - SenseDevTypes001, - "SCSI BUS RESET OCCURRED" - }, - { - 0x29, 0x03, - SenseDevTypes001, - "BUS DEVICE RESET FUNCTION OCCURRED" - }, - { - 0x29, 0x04, - SenseDevTypes001, - "DEVICE INTERNAL RESET" - }, - { - 0x29, 0x05, - SenseDevTypes001, - "TRANSCEIVER MODE CHANGED TO SINGLE-ENDED" - }, - { - 0x29, 0x06, - SenseDevTypes001, - "TRANSCEIVER MODE CHANGED TO LVD" - }, - { - 0x2A, 0x00, - SenseDevTypes013, - "PARAMETERS CHANGED" - }, - { - 0x2A, 0x01, - SenseDevTypes013, - "MODE PARAMETERS CHANGED" - }, - { - 0x2A, 0x02, - SenseDevTypes040, - "LOG PARAMETERS CHANGED" - }, - { - 0x2A, 0x03, - SenseDevTypes036, - "RESERVATIONS PREEMPTED" - }, - { - 0x2A, 0x04, - SenseDevTypes041, - "RESERVATIONS RELEASED" - }, - { - 0x2A, 0x05, - SenseDevTypes041, - "REGISTRATIONS PREEMPTED" - }, - { - 0x2B, 0x00, - SenseDevTypes016, - "COPY CANNOT EXECUTE SINCE HOST CANNOT DISCONNECT" - }, - { - 0x2C, 0x00, - SenseDevTypes001, - "COMMAND SEQUENCE ERROR" - }, - { - 0x2C, 0x01, - SenseDevTypes042, - "TOO MANY WINDOWS SPECIFIED" - }, - { - 0x2C, 0x02, - SenseDevTypes042, - "INVALID COMBINATION OF WINDOWS SPECIFIED" - }, - { - 0x2C, 0x03, - SenseDevTypes005, - "CURRENT PROGRAM AREA IS NOT EMPTY" - }, - { - 0x2C, 0x04, - SenseDevTypes005, - "CURRENT PROGRAM AREA IS EMPTY" - }, - { - 0x2C, 0x05, - SenseDevTypes043, - "ILLEGAL POWER CONDITION REQUEST" - }, - { - 0x2D, 0x00, - SenseDevTypes002, - "OVERWRITE ERROR ON UPDATE IN PLACE" - }, - { - 0x2E, 0x00, - SenseDevTypes044, - "ERROR DETECTED BY THIRD PARTY TEMPORARY INITIATOR" - }, - { - 0x2E, 0x01, - SenseDevTypes044, - "THIRD PARTY DEVICE FAILURE" - }, - { - 0x2E, 0x02, - SenseDevTypes044, - "COPY TARGET DEVICE NOT REACHABLE" - }, - { - 0x2E, 0x03, - SenseDevTypes044, - "INCORRECT COPY TARGET DEVICE TYPE" - }, - { - 0x2E, 0x04, - SenseDevTypes044, - "COPY TARGET DEVICE DATA UNDERRUN" - }, - { - 0x2E, 0x05, - SenseDevTypes044, - "COPY TARGET DEVICE DATA OVERRUN" - }, - { - 0x2F, 0x00, - SenseDevTypes001, - "COMMANDS CLEARED BY ANOTHER INITIATOR" - }, - { - 0x30, 0x00, - SenseDevTypes034, - "INCOMPATIBLE MEDIUM INSTALLED" - }, - { - 0x30, 0x01, - SenseDevTypes029, - "CANNOT READ MEDIUM - UNKNOWN FORMAT" - }, - { - 0x30, 0x02, - SenseDevTypes029, - "CANNOT READ MEDIUM - INCOMPATIBLE FORMAT" - }, - { - 0x30, 0x03, - SenseDevTypes045, - "CLEANING CARTRIDGE INSTALLED" - }, - { - 0x30, 0x04, - SenseDevTypes029, - "CANNOT WRITE MEDIUM - UNKNOWN FORMAT" - }, - { - 0x30, 0x05, - SenseDevTypes029, - "CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT" - }, - { - 0x30, 0x06, - SenseDevTypes017, - "CANNOT FORMAT MEDIUM - INCOMPATIBLE MEDIUM" - }, - { - 0x30, 0x07, - SenseDevTypes006, - "CLEANING FAILURE" - }, - { - 0x30, 0x08, - SenseDevTypes005, - "CANNOT WRITE - APPLICATION CODE MISMATCH" - }, - { - 0x30, 0x09, - SenseDevTypes005, - "CURRENT SESSION NOT FIXATED FOR APPEND" - }, - { - 0x31, 0x00, - SenseDevTypes029, - "MEDIUM FORMAT CORRUPTED" - }, - { - 0x31, 0x01, - SenseDevTypes046, - "FORMAT COMMAND FAILED" - }, - { - 0x32, 0x00, - SenseDevTypes007, - "NO DEFECT SPARE LOCATION AVAILABLE" - }, - { - 0x32, 0x01, - SenseDevTypes007, - "DEFECT LIST UPDATE FAILURE" - }, - { - 0x33, 0x00, - SenseDevTypes002, - "TAPE LENGTH ERROR" - }, - { - 0x34, 0x00, - SenseDevTypes001, - "ENCLOSURE FAILURE" - }, - { - 0x35, 0x00, - SenseDevTypes001, - "ENCLOSURE SERVICES FAILURE" - }, - { - 0x35, 0x01, - SenseDevTypes001, - "UNSUPPORTED ENCLOSURE FUNCTION" - }, - { - 0x35, 0x02, - SenseDevTypes001, - "ENCLOSURE SERVICES UNAVAILABLE" - }, - { - 0x35, 0x03, - SenseDevTypes001, - "ENCLOSURE SERVICES TRANSFER FAILURE" - }, - { - 0x35, 0x04, - SenseDevTypes001, - "ENCLOSURE SERVICES TRANSFER REFUSED" - }, - { - 0x36, 0x00, - SenseDevTypes047, - "RIBBON, INK, OR TONER FAILURE" - }, - { - 0x37, 0x00, - SenseDevTypes013, - "ROUNDED PARAMETER" - }, - { - 0x38, 0x00, - SenseDevTypes043, - "EVENT STATUS NOTIFICATION" - }, - { - 0x38, 0x02, - SenseDevTypes043, - "ESN - POWER MANAGEMENT CLASS EVENT" - }, - { - 0x38, 0x04, - SenseDevTypes043, - "ESN - MEDIA CLASS EVENT" - }, - { - 0x38, 0x06, - SenseDevTypes043, - "ESN - DEVICE BUSY CLASS EVENT" - }, - { - 0x39, 0x00, - SenseDevTypes040, - "SAVING PARAMETERS NOT SUPPORTED" - }, - { - 0x3A, 0x00, - SenseDevTypes014, - "MEDIUM NOT PRESENT" - }, - { - 0x3A, 0x01, - SenseDevTypes034, - "MEDIUM NOT PRESENT - TRAY CLOSED" - }, - { - 0x3A, 0x02, - SenseDevTypes034, - "MEDIUM NOT PRESENT - TRAY OPEN" - }, - { - 0x3A, 0x03, - SenseDevTypes039, - "MEDIUM NOT PRESENT - LOADABLE" - }, - { - 0x3A, 0x04, - SenseDevTypes039, - "MEDIUM NOT PRESENT - MEDIUM AUXILIARY MEMORY ACCESSIBLE" - }, - { - 0x3B, 0x00, - SenseDevTypes048, - "SEQUENTIAL POSITIONING ERROR" - }, - { - 0x3B, 0x01, - SenseDevTypes002, - "TAPE POSITION ERROR AT BEGINNING-OF-MEDIUM" - }, - { - 0x3B, 0x02, - SenseDevTypes002, - "TAPE POSITION ERROR AT END-OF-MEDIUM" - }, - { - 0x3B, 0x03, - SenseDevTypes047, - "TAPE OR ELECTRONIC VERTICAL FORMS UNIT NOT READY" - }, - { - 0x3B, 0x04, - SenseDevTypes047, - "SLEW FAILURE" - }, - { - 0x3B, 0x05, - SenseDevTypes047, - "PAPER JAM" - }, - { - 0x3B, 0x06, - SenseDevTypes047, - "FAILED TO SENSE TOP-OF-FORM" - }, - { - 0x3B, 0x07, - SenseDevTypes047, - "FAILED TO SENSE BOTTOM-OF-FORM" - }, - { - 0x3B, 0x08, - SenseDevTypes002, - "REPOSITION ERROR" - }, - { - 0x3B, 0x09, - SenseDevTypes042, - "READ PAST END OF MEDIUM" - }, - { - 0x3B, 0x0A, - SenseDevTypes042, - "READ PAST BEGINNING OF MEDIUM" - }, - { - 0x3B, 0x0B, - SenseDevTypes042, - "POSITION PAST END OF MEDIUM" - }, - { - 0x3B, 0x0C, - SenseDevTypes003, - "POSITION PAST BEGINNING OF MEDIUM" - }, - { - 0x3B, 0x0D, - SenseDevTypes034, - "MEDIUM DESTINATION ELEMENT FULL" - }, - { - 0x3B, 0x0E, - SenseDevTypes034, - "MEDIUM SOURCE ELEMENT EMPTY" - }, - { - 0x3B, 0x0F, - SenseDevTypes005, - "END OF MEDIUM REACHED" - }, - { - 0x3B, 0x11, - SenseDevTypes034, - "MEDIUM MAGAZINE NOT ACCESSIBLE" - }, - { - 0x3B, 0x12, - SenseDevTypes034, - "MEDIUM MAGAZINE REMOVED" - }, - { - 0x3B, 0x13, - SenseDevTypes034, - "MEDIUM MAGAZINE INSERTED" - }, - { - 0x3B, 0x14, - SenseDevTypes034, - "MEDIUM MAGAZINE LOCKED" - }, - { - 0x3B, 0x15, - SenseDevTypes034, - "MEDIUM MAGAZINE UNLOCKED" - }, - { - 0x3B, 0x16, - SenseDevTypes005, - "MECHANICAL POSITIONING OR CHANGER ERROR" - }, - { - 0x3D, 0x00, - SenseDevTypes036, - "INVALID BITS IN IDENTIFY MESSAGE" - }, - { - 0x3E, 0x00, - SenseDevTypes001, - "LOGICAL UNIT HAS NOT SELF-CONFIGURED YET" - }, - { - 0x3E, 0x01, - SenseDevTypes001, - "LOGICAL UNIT FAILURE" - }, - { - 0x3E, 0x02, - SenseDevTypes001, - "TIMEOUT ON LOGICAL UNIT" - }, - { - 0x3E, 0x03, - SenseDevTypes001, - "LOGICAL UNIT FAILED SELF-TEST" - }, - { - 0x3E, 0x04, - SenseDevTypes001, - "LOGICAL UNIT UNABLE TO UPDATE SELF-TEST LOG" - }, - { - 0x3F, 0x00, - SenseDevTypes001, - "TARGET OPERATING CONDITIONS HAVE CHANGED" - }, - { - 0x3F, 0x01, - SenseDevTypes001, - "MICROCODE HAS BEEN CHANGED" - }, - { - 0x3F, 0x02, - SenseDevTypes049, - "CHANGED OPERATING DEFINITION" - }, - { - 0x3F, 0x03, - SenseDevTypes001, - "INQUIRY DATA HAS CHANGED" - }, - { - 0x3F, 0x04, - SenseDevTypes050, - "COMPONENT DEVICE ATTACHED" - }, - { - 0x3F, 0x05, - SenseDevTypes050, - "DEVICE IDENTIFIER CHANGED" - }, - { - 0x3F, 0x06, - SenseDevTypes051, - "REDUNDANCY GROUP CREATED OR MODIFIED" - }, - { - 0x3F, 0x07, - SenseDevTypes051, - "REDUNDANCY GROUP DELETED" - }, - { - 0x3F, 0x08, - SenseDevTypes051, - "SPARE CREATED OR MODIFIED" - }, - { - 0x3F, 0x09, - SenseDevTypes051, - "SPARE DELETED" - }, - { - 0x3F, 0x0A, - SenseDevTypes050, - "VOLUME SET CREATED OR MODIFIED" - }, - { - 0x3F, 0x0B, - SenseDevTypes050, - "VOLUME SET DELETED" - }, - { - 0x3F, 0x0C, - SenseDevTypes050, - "VOLUME SET DEASSIGNED" - }, - { - 0x3F, 0x0D, - SenseDevTypes050, - "VOLUME SET REASSIGNED" - }, - { - 0x3F, 0x0E, - SenseDevTypes041, - "REPORTED LUNS DATA HAS CHANGED" - }, - { - 0x3F, 0x0F, - SenseDevTypes001, - "ECHO BUFFER OVERWRITTEN" - }, - { - 0x3F, 0x10, - SenseDevTypes039, - "MEDIUM LOADABLE" - }, - { - 0x3F, 0x11, - SenseDevTypes039, - "MEDIUM AUXILIARY MEMORY ACCESSIBLE" - }, - { - 0x40, 0x00, - SenseDevTypes035, - "RAM FAILURE (SHOULD USE 40 NN)" - }, - { - 0x40, 0xFF, - SenseDevTypes001, - "DIAGNOSTIC FAILURE ON COMPONENT NN (80H-FFH)" - }, - { - 0x41, 0x00, - SenseDevTypes035, - "DATA PATH FAILURE (SHOULD USE 40 NN)" - }, - { - 0x42, 0x00, - SenseDevTypes035, - "POWER-ON OR SELF-TEST FAILURE (SHOULD USE 40 NN)" - }, - { - 0x43, 0x00, - SenseDevTypes001, - "MESSAGE ERROR" - }, - { - 0x44, 0x00, - SenseDevTypes001, - "INTERNAL TARGET FAILURE" - }, - { - 0x45, 0x00, - SenseDevTypes001, - "SELECT OR RESELECT FAILURE" - }, - { - 0x46, 0x00, - SenseDevTypes049, - "UNSUCCESSFUL SOFT RESET" - }, - { - 0x47, 0x00, - SenseDevTypes001, - "SCSI PARITY ERROR" - }, - { - 0x47, 0x01, - SenseDevTypes001, - "DATA PHASE CRC ERROR DETECTED" - }, - { - 0x47, 0x02, - SenseDevTypes001, - "SCSI PARITY ERROR DETECTED DURING ST DATA PHASE" - }, - { - 0x47, 0x03, - SenseDevTypes001, - "INFORMATION UNIT CRC ERROR DETECTED" - }, - { - 0x47, 0x04, - SenseDevTypes001, - "ASYNCHRONOUS INFORMATION PROTECTION ERROR DETECTED" - }, - { - 0x48, 0x00, - SenseDevTypes001, - "INITIATOR DETECTED ERROR MESSAGE RECEIVED" - }, - { - 0x49, 0x00, - SenseDevTypes001, - "INVALID MESSAGE ERROR" - }, - { - 0x4A, 0x00, - SenseDevTypes001, - "COMMAND PHASE ERROR" - }, - { - 0x4B, 0x00, - SenseDevTypes001, - "DATA PHASE ERROR" - }, - { - 0x4C, 0x00, - SenseDevTypes001, - "LOGICAL UNIT FAILED SELF-CONFIGURATION" - }, - { - 0x4D, 0xFF, - SenseDevTypes001, - "TAGGED OVERLAPPED COMMANDS (NN = QUEUE TAG)" - }, - { - 0x4E, 0x00, - SenseDevTypes001, - "OVERLAPPED COMMANDS ATTEMPTED" - }, - { - 0x50, 0x00, - SenseDevTypes002, - "WRITE APPEND ERROR" - }, - { - 0x50, 0x01, - SenseDevTypes002, - "WRITE APPEND POSITION ERROR" - }, - { - 0x50, 0x02, - SenseDevTypes002, - "POSITION ERROR RELATED TO TIMING" - }, - { - 0x51, 0x00, - SenseDevTypes052, - "ERASE FAILURE" - }, - { - 0x52, 0x00, - SenseDevTypes002, - "CARTRIDGE FAULT" - }, - { - 0x53, 0x00, - SenseDevTypes014, - "MEDIA LOAD OR EJECT FAILED" - }, - { - 0x53, 0x01, - SenseDevTypes002, - "UNLOAD TAPE FAILURE" - }, - { - 0x53, 0x02, - SenseDevTypes034, - "MEDIUM REMOVAL PREVENTED" - }, - { - 0x54, 0x00, - SenseDevTypes053, - "SCSI TO HOST SYSTEM INTERFACE FAILURE" - }, - { - 0x55, 0x00, - SenseDevTypes053, - "SYSTEM RESOURCE FAILURE" - }, - { - 0x55, 0x01, - SenseDevTypes033, - "SYSTEM BUFFER FULL" - }, - { - 0x55, 0x02, - SenseDevTypes054, - "INSUFFICIENT RESERVATION RESOURCES" - }, - { - 0x55, 0x03, - SenseDevTypes041, - "INSUFFICIENT RESOURCES" - }, - { - 0x55, 0x04, - SenseDevTypes055, - "INSUFFICIENT REGISTRATION RESOURCES" - }, - { - 0x55, 0x05, - SenseDevTypes012, - "access controls code 4 (99-314) [proposed]" - }, - { - 0x55, 0x06, - SenseDevTypes012, - "auxiliary memory code 1 (99-148) [proposed]" - }, - { - 0x57, 0x00, - SenseDevTypes005, - "UNABLE TO RECOVER TABLE-OF-CONTENTS" - }, - { - 0x58, 0x00, - SenseDevTypes056, - "GENERATION DOES NOT EXIST" - }, - { - 0x59, 0x00, - SenseDevTypes056, - "UPDATED BLOCK READ" - }, - { - 0x5A, 0x00, - SenseDevTypes057, - "OPERATOR REQUEST OR STATE CHANGE INPUT" - }, - { - 0x5A, 0x01, - SenseDevTypes034, - "OPERATOR MEDIUM REMOVAL REQUEST" - }, - { - 0x5A, 0x02, - SenseDevTypes058, - "OPERATOR SELECTED WRITE PROTECT" - }, - { - 0x5A, 0x03, - SenseDevTypes058, - "OPERATOR SELECTED WRITE PERMIT" - }, - { - 0x5B, 0x00, - SenseDevTypes059, - "LOG EXCEPTION" - }, - { - 0x5B, 0x01, - SenseDevTypes059, - "THRESHOLD CONDITION MET" - }, - { - 0x5B, 0x02, - SenseDevTypes059, - "LOG COUNTER AT MAXIMUM" - }, - { - 0x5B, 0x03, - SenseDevTypes059, - "LOG LIST CODES EXHAUSTED" - }, - { - 0x5C, 0x00, - SenseDevTypes060, - "RPL STATUS CHANGE" - }, - { - 0x5C, 0x01, - SenseDevTypes060, - "SPINDLES SYNCHRONIZED" - }, - { - 0x5C, 0x02, - SenseDevTypes060, - "SPINDLES NOT SYNCHRONIZED" - }, - { - 0x5D, 0x00, - SenseDevTypes001, - "FAILURE PREDICTION THRESHOLD EXCEEDED" - }, - { - 0x5D, 0x01, - SenseDevTypes061, - "MEDIA FAILURE PREDICTION THRESHOLD EXCEEDED" - }, - { - 0x5D, 0x02, - SenseDevTypes005, - "LOGICAL UNIT FAILURE PREDICTION THRESHOLD EXCEEDED" - }, - { - 0x5D, 0x10, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x11, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x12, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x13, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x14, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x15, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x16, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x17, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x18, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x19, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x1A, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x1B, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x1C, - SenseDevTypes062, - "HARDWARE IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0x20, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x21, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x22, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x23, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x24, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x25, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x26, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x27, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x28, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x29, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x2A, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x2B, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x2C, - SenseDevTypes062, - "CONTROLLER IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0x30, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x31, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x32, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x33, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x34, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x35, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x36, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x37, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x38, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x39, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x3A, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x3B, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x3C, - SenseDevTypes062, - "DATA CHANNEL IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0x40, - SenseDevTypes062, - "SERVO IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x41, - SenseDevTypes062, - "SERVO IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x42, - SenseDevTypes062, - "SERVO IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x43, - SenseDevTypes062, - "SERVO IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x44, - SenseDevTypes062, - "SERVO IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x45, - SenseDevTypes062, - "SERVO IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x46, - SenseDevTypes062, - "SERVO IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x47, - SenseDevTypes062, - "SERVO IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x48, - SenseDevTypes062, - "SERVO IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x49, - SenseDevTypes062, - "SERVO IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x4A, - SenseDevTypes062, - "SERVO IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x4B, - SenseDevTypes062, - "SERVO IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x4C, - SenseDevTypes062, - "SERVO IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0x50, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x51, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x52, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x53, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x54, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x55, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x56, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x57, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x58, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x59, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x5A, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x5B, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x5C, - SenseDevTypes062, - "SPINDLE IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0x60, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE GENERAL HARD DRIVE FAILURE" - }, - { - 0x5D, 0x61, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE DRIVE ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x62, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE DATA ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x63, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE SEEK ERROR RATE TOO HIGH" - }, - { - 0x5D, 0x64, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE TOO MANY BLOCK REASSIGNS" - }, - { - 0x5D, 0x65, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE ACCESS TIMES TOO HIGH" - }, - { - 0x5D, 0x66, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE START UNIT TIMES TOO HIGH" - }, - { - 0x5D, 0x67, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE CHANNEL PARAMETRICS" - }, - { - 0x5D, 0x68, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE CONTROLLER DETECTED" - }, - { - 0x5D, 0x69, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE THROUGHPUT PERFORMANCE" - }, - { - 0x5D, 0x6A, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE SEEK TIME PERFORMANCE" - }, - { - 0x5D, 0x6B, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE SPIN-UP RETRY COUNT" - }, - { - 0x5D, 0x6C, - SenseDevTypes062, - "FIRMWARE IMPENDING FAILURE DRIVE CALIBRATION RETRY COUNT" - }, - { - 0x5D, 0xFF, - SenseDevTypes001, - "FAILURE PREDICTION THRESHOLD EXCEEDED (FALSE)" - }, - { - 0x5E, 0x00, - SenseDevTypes044, - "LOW POWER CONDITION ON" - }, - { - 0x5E, 0x01, - SenseDevTypes044, - "IDLE CONDITION ACTIVATED BY TIMER" - }, - { - 0x5E, 0x02, - SenseDevTypes044, - "STANDBY CONDITION ACTIVATED BY TIMER" - }, - { - 0x5E, 0x03, - SenseDevTypes044, - "IDLE CONDITION ACTIVATED BY COMMAND" - }, - { - 0x5E, 0x04, - SenseDevTypes044, - "STANDBY CONDITION ACTIVATED BY COMMAND" - }, - { - 0x5E, 0x41, - SenseDevTypes043, - "POWER STATE CHANGE TO ACTIVE" - }, - { - 0x5E, 0x42, - SenseDevTypes043, - "POWER STATE CHANGE TO IDLE" - }, - { - 0x5E, 0x43, - SenseDevTypes043, - "POWER STATE CHANGE TO STANDBY" - }, - { - 0x5E, 0x45, - SenseDevTypes043, - "POWER STATE CHANGE TO SLEEP" - }, - { - 0x5E, 0x47, - SenseDevTypes063, - "POWER STATE CHANGE TO DEVICE CONTROL" - }, - { - 0x60, 0x00, - SenseDevTypes042, - "LAMP FAILURE" - }, - { - 0x61, 0x00, - SenseDevTypes042, - "VIDEO ACQUISITION ERROR" - }, - { - 0x61, 0x01, - SenseDevTypes042, - "UNABLE TO ACQUIRE VIDEO" - }, - { - 0x61, 0x02, - SenseDevTypes042, - "OUT OF FOCUS" - }, - { - 0x62, 0x00, - SenseDevTypes042, - "SCAN HEAD POSITIONING ERROR" - }, - { - 0x63, 0x00, - SenseDevTypes005, - "END OF USER AREA ENCOUNTERED ON THIS TRACK" - }, - { - 0x63, 0x01, - SenseDevTypes005, - "PACKET DOES NOT FIT IN AVAILABLE SPACE" - }, - { - 0x64, 0x00, - SenseDevTypes005, - "ILLEGAL MODE FOR THIS TRACK" - }, - { - 0x64, 0x01, - SenseDevTypes005, - "INVALID PACKET SIZE" - }, - { - 0x65, 0x00, - SenseDevTypes001, - "VOLTAGE FAULT" - }, - { - 0x66, 0x00, - SenseDevTypes042, - "AUTOMATIC DOCUMENT FEEDER COVER UP" - }, - { - 0x66, 0x01, - SenseDevTypes042, - "AUTOMATIC DOCUMENT FEEDER LIFT UP" - }, - { - 0x66, 0x02, - SenseDevTypes042, - "DOCUMENT JAM IN AUTOMATIC DOCUMENT FEEDER" - }, - { - 0x66, 0x03, - SenseDevTypes042, - "DOCUMENT MISS FEED AUTOMATIC IN DOCUMENT FEEDER" - }, - { - 0x67, 0x00, - SenseDevTypes064, - "CONFIGURATION FAILURE" - }, - { - 0x67, 0x01, - SenseDevTypes064, - "CONFIGURATION OF INCAPABLE LOGICAL UNITS FAILED" - }, - { - 0x67, 0x02, - SenseDevTypes064, - "ADD LOGICAL UNIT FAILED" - }, - { - 0x67, 0x03, - SenseDevTypes064, - "MODIFICATION OF LOGICAL UNIT FAILED" - }, - { - 0x67, 0x04, - SenseDevTypes064, - "EXCHANGE OF LOGICAL UNIT FAILED" - }, - { - 0x67, 0x05, - SenseDevTypes064, - "REMOVE OF LOGICAL UNIT FAILED" - }, - { - 0x67, 0x06, - SenseDevTypes064, - "ATTACHMENT OF LOGICAL UNIT FAILED" - }, - { - 0x67, 0x07, - SenseDevTypes064, - "CREATION OF LOGICAL UNIT FAILED" - }, - { - 0x67, 0x08, - SenseDevTypes064, - "ASSIGN FAILURE OCCURRED" - }, - { - 0x67, 0x09, - SenseDevTypes064, - "MULTIPLY ASSIGNED LOGICAL UNIT" - }, - { - 0x68, 0x00, - SenseDevTypes064, - "LOGICAL UNIT NOT CONFIGURED" - }, - { - 0x69, 0x00, - SenseDevTypes064, - "DATA LOSS ON LOGICAL UNIT" - }, - { - 0x69, 0x01, - SenseDevTypes064, - "MULTIPLE LOGICAL UNIT FAILURES" - }, - { - 0x69, 0x02, - SenseDevTypes064, - "PARITY/DATA MISMATCH" - }, - { - 0x6A, 0x00, - SenseDevTypes064, - "INFORMATIONAL, REFER TO LOG" - }, - { - 0x6B, 0x00, - SenseDevTypes064, - "STATE CHANGE HAS OCCURRED" - }, - { - 0x6B, 0x01, - SenseDevTypes064, - "REDUNDANCY LEVEL GOT BETTER" - }, - { - 0x6B, 0x02, - SenseDevTypes064, - "REDUNDANCY LEVEL GOT WORSE" - }, - { - 0x6C, 0x00, - SenseDevTypes064, - "REBUILD FAILURE OCCURRED" - }, - { - 0x6D, 0x00, - SenseDevTypes064, - "RECALCULATE FAILURE OCCURRED" - }, - { - 0x6E, 0x00, - SenseDevTypes064, - "COMMAND TO LOGICAL UNIT FAILED" - }, - { - 0x6F, 0x00, - SenseDevTypes005, - "COPY PROTECTION KEY EXCHANGE FAILURE - AUTHENTICATION FAILURE" - }, - { - 0x6F, 0x01, - SenseDevTypes005, - "COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT PRESENT" - }, - { - 0x6F, 0x02, - SenseDevTypes005, - "COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED" - }, - { - 0x6F, 0x03, - SenseDevTypes005, - "READ OF SCRAMBLED SECTOR WITHOUT AUTHENTICATION" - }, - { - 0x6F, 0x04, - SenseDevTypes005, - "MEDIA REGION CODE IS MISMATCHED TO LOGICAL UNIT REGION" - }, - { - 0x6F, 0x05, - SenseDevTypes005, - "DRIVE REGION MUST BE PERMANENT/REGION RESET COUNT ERROR" - }, - { - 0x70, 0xFF, - SenseDevTypes002, - "DECOMPRESSION EXCEPTION SHORT ALGORITHM ID OF NN" - }, - { - 0x71, 0x00, - SenseDevTypes002, - "DECOMPRESSION EXCEPTION LONG ALGORITHM ID" - }, - { - 0x72, 0x00, - SenseDevTypes005, - "SESSION FIXATION ERROR" - }, - { - 0x72, 0x01, - SenseDevTypes005, - "SESSION FIXATION ERROR WRITING LEAD-IN" - }, - { - 0x72, 0x02, - SenseDevTypes005, - "SESSION FIXATION ERROR WRITING LEAD-OUT" - }, - { - 0x72, 0x03, - SenseDevTypes005, - "SESSION FIXATION ERROR - INCOMPLETE TRACK IN SESSION" - }, - { - 0x72, 0x04, - SenseDevTypes005, - "EMPTY OR PARTIALLY WRITTEN RESERVED TRACK" - }, - { - 0x72, 0x05, - SenseDevTypes005, - "NO MORE TRACK RESERVATIONS ALLOWED" - }, - { - 0x73, 0x00, - SenseDevTypes005, - "CD CONTROL ERROR" - }, - { - 0x73, 0x01, - SenseDevTypes005, - "POWER CALIBRATION AREA ALMOST FULL" - }, - { - 0x73, 0x02, - SenseDevTypes005, - "POWER CALIBRATION AREA IS FULL" - }, - { - 0x73, 0x03, - SenseDevTypes005, - "POWER CALIBRATION AREA ERROR" - }, - { - 0x73, 0x04, - SenseDevTypes005, - "PROGRAM MEMORY AREA UPDATE FAILURE" - }, - { - 0x73, 0x05, - SenseDevTypes005, - "PROGRAM MEMORY AREA IS FULL" - }, - { - 0x73, 0x06, - SenseDevTypes005, - "RMA/PMA IS FULL" - }, -}; - -static int ASCQ_TableSize = 463; - - -#endif diff -Nru a/drivers/message/fusion/ascq_tbl.sh b/drivers/message/fusion/ascq_tbl.sh --- a/drivers/message/fusion/ascq_tbl.sh 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,109 +0,0 @@ -#!/bin/sh -# -# ascq_tbl.sh - Translate SCSI t10.org's "asc-num.txt" file of -# SCSI Additional Sense Code & Qualifiers (ASC/ASCQ's) -# into something useful in C, creating "ascq_tbl.c" file. -# -#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*# - -PREF_INFILE="t10.org/asc-num.txt" # From SCSI t10.org -PREF_OUTFILE="ascq_tbl.c" - -#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*# - -xlate_ascq() { - cat | awk ' - BEGIN { - DQ = "\042"; - OUTFILE = "'"${PREF_OUTFILE}"'"; - TRUE = 1; - FALSE = 0; - #debug = TRUE; - - # read and discard all lines up to and including the one that begins - # with the "magic token" of "------- -------------- ---"... - headers_gone = FALSE; - while (!headers_gone) { - if (getline <= 0) - exit 1; - header_line[++hdrs] = $0; - if (debug) - printf("header_line[%d] = :%s:\n", ++hdrs, $0); - if ($0 ~ /^------- -------------- ---/) { - headers_gone = TRUE; - } - } - outcount = 0; - } - - (NF > 1) { - ++outcount; - if (debug) - printf( "DBG: %s\n", $0 ); - ASC[outcount] = substr($0,1,2); - ASCQ[outcount] = substr($0,5,2); - devtypes = substr($0,10,14); - gsub(/ /, ".", devtypes); - DESCRIP[outcount] = substr($0,26); - - if (!(devtypes in DevTypesVoodoo)) { - DevTypesVoodoo[devtypes] = ++voodoo; - DevTypesIdx[voodoo] = devtypes; - } - DEVTYPES[outcount] = DevTypesVoodoo[devtypes]; - - # Handle 0xNN exception stuff... - if (ASCQ[outcount] == "NN" || ASCQ[outcount] == "nn") - ASCQ[outcount] = "FF"; - } - - END { - printf("#ifndef SCSI_ASCQ_TBL_C_INCLUDED\n") > OUTFILE; - printf("#define SCSI_ASCQ_TBL_C_INCLUDED\n") >> OUTFILE; - - printf("\n/* AuToMaGiCaLlY generated from: %s'"${FIN}"'%s\n", DQ, DQ) >> OUTFILE; - printf(" *******************************************************************************\n") >> OUTFILE; - for (i=1; i<=hdrs; i++) { - printf(" * %s\n", header_line[i]) >> OUTFILE; - } - printf(" */\n") >> OUTFILE; - - printf("\n") >> OUTFILE; - for (i=1; i<=voodoo; i++) { - printf("static char SenseDevTypes%03d[] = %s%s%s;\n", i, DQ, DevTypesIdx[i], DQ) >> OUTFILE; - } - - printf("\nstatic ASCQ_Table_t ASCQ_Table[] = {\n") >> OUTFILE; - for (i=1; i<=outcount; i++) { - printf(" {\n") >> OUTFILE; - printf(" 0x%s, 0x%s,\n", ASC[i], ASCQ[i]) >> OUTFILE; - printf(" SenseDevTypes%03d,\n", DEVTYPES[i]) >> OUTFILE; - printf(" %s%s%s\n", DQ, DESCRIP[i], DQ) >> OUTFILE; - printf(" },\n") >> OUTFILE; - } - printf( "};\n\n" ) >> OUTFILE; - - printf( "static int ASCQ_TableSize = %d;\n\n", outcount ) >> OUTFILE; - printf( "Total of %d ASC/ASCQ records generated\n", outcount ); - printf("\n#endif\n") >> OUTFILE; - close(OUTFILE); - }' - return -} - -#*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*# - -# main() -if [ $# -lt 1 ]; then - echo "INFO: No input filename supplied - using: $PREF_INFILE" >&2 - FIN=$PREF_INFILE -else - FIN="$1" - if [ "$FIN" != "$PREF_INFILE" ]; then - echo "INFO: Ok, I'll try chewing on '$FIN' for SCSI ASC/ASCQ combos..." >&2 - fi - shift -fi - -cat $FIN | xlate_ascq -exit 0 diff -Nru a/drivers/message/fusion/isense.c b/drivers/message/fusion/isense.c --- a/drivers/message/fusion/isense.c 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,119 +0,0 @@ -/* - * linux/drivers/message/fusion/isense.c - * Little linux driver / shim that interfaces with the Fusion MPT - * Linux base driver to provide english readable strings in SCSI - * Error Report logging output. This module implements SCSI-3 - * Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings. - * - * Copyright (c) 1991-2004 Steven J. Ralston - * Written By: Steven J. Ralston - * (yes I wrote some of the orig. code back in 1991!) - * (mailto:sjralston1@netscape.net) - * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $ - */ -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - NO WARRANTY - THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT - LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is - solely responsible for determining the appropriateness of using and - distributing the Program and assumes all risks associated with its - exercise of rights under this Agreement, including but not limited to - the risks and costs of program errors, damage to or loss of data, - programs or equipment, and unavailability or interruption of operations. - - DISCLAIMER OF LIABILITY - NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED - HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - -#include -#include -#include -#include -#include -#include - -#define MODULEAUTHOR "Steven J. Ralston" -#define COPYRIGHT "Copyright (c) 2001-2004 " MODULEAUTHOR -#include "mptbase.h" - -#include "isense.h" - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * Private data... - */ - -/* - * YIKES! I don't usually #include C source files, but.. - * The following #include's pulls in our needed ASCQ_Table[] array, - * ASCQ_TableSz integer, and ScsiOpcodeString[] array! - */ -#include "ascq_tbl.c" -#include "scsiops.c" - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#define my_NAME "SCSI-3 Opcodes & ASC/ASCQ Strings" -#define my_VERSION MPT_LINUX_VERSION_COMMON -#define MYNAM "isense" - -MODULE_AUTHOR(MODULEAUTHOR); -MODULE_DESCRIPTION(my_NAME); -MODULE_LICENSE("GPL"); - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -int __init isense_init(void) -{ - show_mptmod_ver(my_NAME, my_VERSION); - - /* - * Install our handler - */ - if (mpt_register_ascqops_strings(&ASCQ_Table[0], ASCQ_TableSize, ScsiOpcodeString) != 1) - { - printk(KERN_ERR MYNAM ": ERROR: Can't register with Fusion MPT base driver!\n"); - return -EBUSY; - } - printk(KERN_INFO MYNAM ": Registered SCSI-3 Opcodes & ASC/ASCQ Strings\n"); - return 0; -} - - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -static void isense_exit(void) -{ -#ifdef MODULE - mpt_deregister_ascqops_strings(); -#endif - printk(KERN_INFO MYNAM ": Deregistered SCSI-3 Opcodes & ASC/ASCQ Strings\n"); -} - -module_init(isense_init); -module_exit(isense_exit); - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - diff -Nru a/drivers/message/fusion/isense.h b/drivers/message/fusion/isense.h --- a/drivers/message/fusion/isense.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,95 +0,0 @@ -#ifndef ISENSE_H_INCLUDED -#define ISENSE_H_INCLUDED -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - -#ifdef __KERNEL__ -#include /* needed for u8, etc. */ -#include /* needed for strcat */ -#include /* needed for sprintf */ -#else - #ifndef U_STUFF_DEFINED - #define U_STUFF_DEFINED - typedef unsigned char u8; - typedef unsigned short u16; - typedef unsigned int u32; - #endif -#endif - -#include "scsi3.h" /* needed for all things SCSI */ - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * Defines and typedefs... - */ - -#ifdef __KERNEL__ -#define PrintF(x) printk x -#else -#define PrintF(x) printf x -#endif - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define RETRY_STATUS ((int) 1) -#define PUT_STATUS ((int) 0) - -/* - * A generic structure to hold info about IO request that caused - * a Request Sense to be performed, and the resulting Sense Data. - */ -typedef struct IO_Info -{ - char *DevIDStr; /* String of chars which identifies the device. */ - u8 *cdbPtr; /* Pointer (Virtual/Logical addr) to CDB bytes of - IO request that caused ContAllegianceCond. */ - u8 *sensePtr; /* Pointer (Virtual/Logical addr) to Sense Data - returned by Request Sense operation. */ - u8 *dataPtr; /* Pointer (Virtual/Logical addr) to Data buffer - of IO request caused ContAllegianceCondition. */ - u8 *inqPtr; /* Pointer (Virtual/Logical addr) to Inquiry Data for - IO *Device* that caused ContAllegianceCondition. */ - u8 SCSIStatus; /* SCSI status byte of IO request that caused - Contingent Allegiance Condition. */ - u8 DoDisplay; /* Shall we display any messages? */ - u16 rsvd_align1; - u32 ComplCode; /* Four-byte OS-dependent completion code. */ - u32 NotifyL; /* Four-byte OS-dependent notification field. */ -} IO_Info_t; - -/* - * SCSI Additional Sense Code and Additional Sense Code Qualifier table. - */ -typedef struct ASCQ_Table -{ - u8 ASC; - u8 ASCQ; - char *DevTypes; - char *Description; -} ASCQ_Table_t; - -#if 0 -/* - * SCSI Opcodes table. - */ -typedef struct SCSI_OPS_Table -{ - u8 OpCode; - char *DevTypes; - char *ScsiCmndStr; -} SCSI_OPS_Table_t; -#endif - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * Public entry point prototypes - */ - -/* in scsiherr.c, needed by mptscsih.c */ -extern int mpt_ScsiHost_ErrorReport(IO_Info_t *ioop); - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -#endif - diff -Nru a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c --- a/drivers/message/fusion/mptbase.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/message/fusion/mptbase.c 2004-09-06 16:37:51 -07:00 @@ -139,11 +139,6 @@ DmpServices_t *DmpService; -void *mpt_v_ASCQ_TablePtr; -const char **mpt_ScsiOpcodesPtr; -int mpt_ASCQ_TableSz; - - #define WHOINIT_UNKNOWN 0xAA /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -165,7 +160,6 @@ static int FusionInitCalled = 0; static int mpt_base_index = -1; static int last_drv_idx = -1; -static int isense_idx = -1; static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq); @@ -177,8 +171,8 @@ static int mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); static int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag); -static void mpt_detect_bound_ports(MPT_ADAPTER *this, struct pci_dev *pdev); -static void mpt_adapter_disable(MPT_ADAPTER *ioc, int freeup); +static void mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev); +static void mpt_adapter_disable(MPT_ADAPTER *ioc); static void mpt_adapter_dispose(MPT_ADAPTER *ioc); static void MptDisplayIocCapabilities(MPT_ADAPTER *ioc); @@ -291,7 +285,7 @@ int type; int freeme; - ioc = bus_id; + ioc = (MPT_ADAPTER *)bus_id; /* * Drain the reply FIFO! @@ -333,8 +327,8 @@ cb_idx = mr->u.frame.hwhdr.msgctxu.fld.cb_idx; mf = MPT_INDEX_2_MFPTR(ioc, req_idx); - dprintk((MYIOC_s_INFO_FMT "Got non-TURBO reply=%p\n", - ioc->name, mr)); + dmfprintk((MYIOC_s_INFO_FMT "Got non-TURBO reply=%p req_idx=%x\n", + ioc->name, mr, req_idx)); DBG_DUMP_REPLY_FRAME(mr) /* NEW! 20010301 -sralston @@ -358,7 +352,7 @@ /* * Process turbo (context) reply... */ - dirqprintk((MYIOC_s_INFO_FMT "Got TURBO reply(=%08x)\n", ioc->name, pa)); + dmfprintk((MYIOC_s_INFO_FMT "Got TURBO reply req_idx=%08x\n", ioc->name, pa)); type = (pa >> MPI_CONTEXT_REPLY_TYPE_SHIFT); if (type == MPI_CONTEXT_REPLY_TYPE_SCSI_TARGET) { cb_idx = mpt_stm_index; @@ -506,7 +500,7 @@ results = ProcessEventNotification(ioc, pEvReply, &evHandlers); if (results != evHandlers) { /* CHECKME! Any special handling needed here? */ - dprintk((MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n", + devtprintk((MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n", ioc->name, evHandlers, results)); } @@ -659,8 +653,6 @@ MptEvHandlers[cb_idx] = NULL; last_drv_idx++; - if (isense_idx != -1 && isense_idx <= cb_idx) - isense_idx++; } } @@ -803,56 +795,60 @@ * mpt_get_msg_frame - Obtain a MPT request frame from the pool (of 1024) * allocated per MPT adapter. * @handle: Handle of registered MPT protocol driver - * @iocid: IOC unique identifier (integer) + * @ioc: Pointer to MPT adapter structure * * Returns pointer to a MPT request frame or %NULL if none are available * or IOC is not active. */ MPT_FRAME_HDR* -mpt_get_msg_frame(int handle, MPT_ADAPTER *iocp) +mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc) { MPT_FRAME_HDR *mf; unsigned long flags; + u16 req_idx; /* Request index */ + + /* validate handle and ioc identifier */ #ifdef MFCNT - if (!iocp->active) + if (!ioc->active) printk(KERN_WARNING "IOC Not Active! mpt_get_msg_frame returning NULL!\n"); #endif /* If interrupts are not attached, do not return a request frame */ - if (!iocp->active) + if (!ioc->active) return NULL; - spin_lock_irqsave(&iocp->FreeQlock, flags); - if (! Q_IS_EMPTY(&iocp->FreeQ)) { + spin_lock_irqsave(&ioc->FreeQlock, flags); + if (! Q_IS_EMPTY(&ioc->FreeQ)) { int req_offset; - mf = iocp->FreeQ.head; + mf = ioc->FreeQ.head; Q_DEL_ITEM(&mf->u.frame.linkage); mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */ - req_offset = (u8 *)mf - (u8 *)iocp->req_frames; + req_offset = (u8 *)mf - (u8 *)ioc->req_frames; /* u16! */ - mf->u.frame.hwhdr.msgctxu.fld.req_idx = - cpu_to_le16(req_offset / iocp->req_sz); + req_idx = cpu_to_le16(req_offset / ioc->req_sz); + mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx; mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0; + ioc->RequestNB[req_idx] = ioc->NB_for_64_byte_frame; /* Default, will be changed if necessary in SG generation */ #ifdef MFCNT - iocp->mfcnt++; + ioc->mfcnt++; #endif } else mf = NULL; - spin_unlock_irqrestore(&iocp->FreeQlock, flags); + spin_unlock_irqrestore(&ioc->FreeQlock, flags); #ifdef MFCNT if (mf == NULL) - printk(KERN_WARNING "IOC Active. No free Msg Frames! Count 0x%x Max 0x%x\n", iocp->mfcnt, iocp->req_depth); + printk(KERN_WARNING "IOC Active. No free Msg Frames! Count 0x%x Max 0x%x\n", ioc->mfcnt, ioc->req_depth); mfcounter++; if (mfcounter == PRINT_MF_COUNT) - printk(KERN_INFO "MF Count 0x%x Max 0x%x \n", iocp->mfcnt, iocp->req_depth); + printk(KERN_INFO "MF Count 0x%x Max 0x%x \n", ioc->mfcnt, ioc->req_depth); #endif dmfprintk((KERN_INFO MYNAM ": %s: mpt_get_msg_frame(%d,%d), got mf=%p\n", - iocp->name, handle, iocid, mf)); + ioc->name, handle, ioc->id, mf)); return mf; } @@ -861,23 +857,25 @@ * mpt_put_msg_frame - Send a protocol specific MPT request frame * to a IOC. * @handle: Handle of registered MPT protocol driver - * @iocid: IOC unique identifier (integer) + * @ioc: Pointer to MPT adapter structure * @mf: Pointer to MPT request frame * * This routine posts a MPT request frame to the request post FIFO of a * specific MPT adapter. */ void -mpt_put_msg_frame(int handle, MPT_ADAPTER *iocp, MPT_FRAME_HDR *mf) +mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) { u32 mf_dma_addr; int req_offset; + u16 req_idx; /* Request index */ /* ensure values are reset properly! */ mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; /* byte */ - req_offset = (u8 *)mf - (u8 *)iocp->req_frames; - /* u16! */ - mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(req_offset / iocp->req_sz); + req_offset = (u8 *)mf - (u8 *)ioc->req_frames; + /* u16! */ + req_idx = cpu_to_le16(req_offset / ioc->req_sz); + mf->u.frame.hwhdr.msgctxu.fld.req_idx = req_idx; mf->u.frame.hwhdr.msgctxu.fld.rsvd = 0; #ifdef MPT_DEBUG_MSG_FRAME @@ -886,8 +884,8 @@ int ii, n; printk(KERN_INFO MYNAM ": %s: About to Put msg frame @ %p:\n" KERN_INFO " ", - iocp->name, m); - n = iocp->req_sz/4 - 1; + ioc->name, m); + n = ioc->req_sz/4 - 1; while (m[n] == 0) n--; for (ii=0; ii<=n; ii++) { @@ -899,32 +897,33 @@ } #endif - mf_dma_addr = iocp->req_frames_low_dma + req_offset; - CHIPREG_WRITE32(&iocp->chip->RequestFifo, mf_dma_addr); + mf_dma_addr = (ioc->req_frames_low_dma + req_offset) | ioc->RequestNB[req_idx]; + dsgprintk((MYIOC_s_INFO_FMT "mf_dma_addr=%x req_idx=%d RequestNB=%x\n", ioc->name, mf_dma_addr, req_idx, ioc->RequestNB[req_idx])); + CHIPREG_WRITE32(&ioc->chip->RequestFifo, mf_dma_addr); } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /** * mpt_free_msg_frame - Place MPT request frame back on FreeQ. * @handle: Handle of registered MPT protocol driver - * @iocid: IOC unique identifier (integer) + * @ioc: Pointer to MPT adapter structure * @mf: Pointer to MPT request frame * * This routine places a MPT request frame back on the MPT adapter's * FreeQ. */ void -mpt_free_msg_frame(int handle, MPT_ADAPTER *iocp, MPT_FRAME_HDR *mf) +mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) { unsigned long flags; /* Put Request back on FreeQ! */ - spin_lock_irqsave(&iocp->FreeQlock, flags); - Q_ADD_TAIL(&iocp->FreeQ, &mf->u.frame.linkage, MPT_FRAME_HDR); + spin_lock_irqsave(&ioc->FreeQlock, flags); + Q_ADD_TAIL(&ioc->FreeQ, &mf->u.frame.linkage, MPT_FRAME_HDR); #ifdef MFCNT - iocp->mfcnt--; + ioc->mfcnt--; #endif - spin_unlock_irqrestore(&iocp->FreeQlock, flags); + spin_unlock_irqrestore(&ioc->FreeQlock, flags); } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -996,7 +995,7 @@ * mpt_send_handshake_request - Send MPT request via doorbell * handshake method. * @handle: Handle of registered MPT protocol driver - * @iocid: IOC unique identifier (integer) + * @ioc: Pointer to MPT adapter structure * @reqBytes: Size of the request in bytes * @req: Pointer to MPT request frame * @sleepFlag: Use schedule if CAN_SLEEP else use udelay. @@ -1010,7 +1009,7 @@ * Returns 0 for success, non-zero for failure. */ int -mpt_send_handshake_request(int handle, MPT_ADAPTER *iocp, int reqBytes, u32 *req, int sleepFlag) +mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) { int r = 0; u8 *req_as_bytes; @@ -1026,37 +1025,38 @@ * setting cb_idx/req_idx. But ONLY if this request * is in proper (pre-alloc'd) request buffer range... */ - ii = MFPTR_2_MPT_INDEX(iocp,(MPT_FRAME_HDR*)req); - if (reqBytes >= 12 && ii >= 0 && ii < iocp->req_depth) { + ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req); + if (reqBytes >= 12 && ii >= 0 && ii < ioc->req_depth) { MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req; mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii); mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle; } /* Make sure there are no doorbells */ - CHIPREG_WRITE32(&iocp->chip->IntStatus, 0); - CHIPREG_WRITE32(&iocp->chip->Doorbell, + CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); + + CHIPREG_WRITE32(&ioc->chip->Doorbell, ((MPI_FUNCTION_HANDSHAKE<chip->Doorbell) & MPI_DOORBELL_ACTIVE)) + if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)) return -5; dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n", - iocp->name, ii)); + ioc->name, ii)); - CHIPREG_WRITE32(&iocp->chip->IntStatus, 0); + CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); - r = WaitForDoorbellAck(iocp, 5, sleepFlag); - if (r < 0) + if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { return -2; - + } + /* Send request via doorbell handshake */ req_as_bytes = (u8 *) req; for (ii = 0; ii < reqBytes/4; ii++) { @@ -1066,21 +1066,21 @@ (req_as_bytes[(ii*4) + 1] << 8) | (req_as_bytes[(ii*4) + 2] << 16) | (req_as_bytes[(ii*4) + 3] << 24)); - CHIPREG_WRITE32(&iocp->chip->Doorbell, word); - r = WaitForDoorbellAck(iocp, 5, sleepFlag); - if (r < 0) { + CHIPREG_WRITE32(&ioc->chip->Doorbell, word); + if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) { r = -3; break; } } - if (r >= 0 && WaitForDoorbellInt(iocp, 10, sleepFlag) >= 0) + if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0) r = 0; else r = -4; /* Make sure there are no doorbells */ - CHIPREG_WRITE32(&iocp->chip->IntStatus, 0); + CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); + return r; } @@ -1141,11 +1141,15 @@ u8 revision; u8 pcixcmd; static int mpt_ids = 0; +#ifdef CONFIG_PROC_FS struct proc_dir_entry *dent, *ent; +#endif if (pci_enable_device(pdev)) return r; + dinitprintk((KERN_WARNING MYNAM ": mpt_adapter_install\n")); + if (!pci_set_dma_mask(pdev, mask)) { dprintk((KERN_INFO MYNAM ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n")); @@ -1170,9 +1174,8 @@ ioc->alloc_total = sizeof(MPT_ADAPTER); ioc->req_sz = MPT_DEFAULT_FRAME_SIZE; /* avoid div by zero! */ ioc->reply_sz = MPT_REPLY_FRAME_SIZE; - + ioc->pcidev = pdev; - ioc->diagPending = 0; spin_lock_init(&ioc->diagLock); @@ -1223,8 +1226,8 @@ return -EINVAL; } - dprintk((KERN_INFO MYNAM ": MPT adapter @ %lx, msize=%dd bytes\n", mem_phys, msize)); - dprintk((KERN_INFO MYNAM ": (port i/o @ %lx, psize=%dd bytes)\n", port, psize)); + dinitprintk((KERN_INFO MYNAM ": MPT adapter @ %lx, msize=%dd bytes\n", mem_phys, msize)); + dinitprintk((KERN_INFO MYNAM ": (port i/o @ %lx, psize=%dd bytes)\n", port, psize)); mem = NULL; /* Get logical ptr for PciMem0 space */ @@ -1236,15 +1239,15 @@ return -EINVAL; } ioc->memmap = mem; - dprintk((KERN_INFO MYNAM ": mem = %p, mem_phys = %lx\n", mem, mem_phys)); + dinitprintk((KERN_INFO MYNAM ": mem = %p, mem_phys = %lx\n", mem, mem_phys)); - dprintk((KERN_INFO MYNAM ": facts @ %p, pfacts[0] @ %p\n", + dinitprintk((KERN_INFO MYNAM ": facts @ %p, pfacts[0] @ %p\n", &ioc->facts, &ioc->pfacts[0])); ioc->mem_phys = mem_phys; ioc->chip = (SYSIF_REGS*)mem; - /* Save Port IO values incase we need to do downloadboot */ + /* Save Port IO values in case we need to do downloadboot */ { u8 *pmem = (u8*)port; ioc->pio_mem_phys = port; @@ -1314,7 +1317,6 @@ sprintf(ioc->name, "ioc%d", ioc->id); - Q_INIT(&ioc->FreeQ, MPT_FRAME_HDR); spin_lock_init(&ioc->FreeQlock); /* Disable all! */ @@ -1337,7 +1339,6 @@ printk(MYIOC_s_ERR_FMT "Unable to allocate interrupt %s!\n", ioc->name, __irq_itoa(pdev->irq)); #endif - Q_DEL_ITEM(ioc); list_del(&ioc->list); iounmap(mem); kfree(ioc); @@ -1369,7 +1370,6 @@ ": WARNING - %s did not initialize properly! (%d)\n", ioc->name, r); - Q_DEL_ITEM(ioc); list_del(&ioc->list); free_irq(ioc->pci_irq, ioc); iounmap(mem); @@ -1386,6 +1386,7 @@ } } +#ifdef CONFIG_PROC_FS /* * Create "/proc/mpt/iocN" subdirectory entry for each MPT adapter. */ @@ -1402,6 +1403,7 @@ ent->data = ioc; } } +#endif return 0; } @@ -1625,7 +1627,7 @@ int hard_reset_done = 0; int alt_ioc_ready = 0; int hard; - int r; + int rc=0; int ii; int handlers; int ret = 0; @@ -1675,39 +1677,37 @@ * and 1 if a hard reset was performed. */ if (hard_reset_done && reset_alt_ioc_active && ioc->alt_ioc) { - if ((r = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0) + if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0) alt_ioc_ready = 1; else printk(KERN_WARNING MYNAM - ": alt-%s: (%d) Not ready WARNING!\n", - ioc->alt_ioc->name, r); + ": alt-%s: Not ready WARNING!\n", + ioc->alt_ioc->name); } for (ii=0; ii<5; ii++) { - /* Get IOC facts! Allow 1 retry */ - if ((r = GetIocFacts(ioc, sleepFlag, reason)) != 0) { - dinitprintk((MYIOC_s_INFO_FMT - "ii=%d IocFacts failed r=%x\n", ioc->name, ii, r)); - } else + /* Get IOC facts! Allow 5 retries */ + if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0) break; } + - if (r) { - dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed r=%x\n", ioc->name, r)); + if (ii == 5) { + dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed rc=%x\n", ioc->name, rc)); ret = -2; } else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { MptDisplayIocCapabilities(ioc); } - + if (alt_ioc_ready) { - if ((r = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) { - dinitprintk((MYIOC_s_INFO_FMT "Initial Alt IocFacts failed r=%x\n", ioc->name, r)); + if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) { + dinitprintk((MYIOC_s_INFO_FMT "Initial Alt IocFacts failed rc=%x\n", ioc->name, rc)); /* Retry - alt IOC was initialized once */ - r = GetIocFacts(ioc->alt_ioc, sleepFlag, reason); + rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason); } - if (r) { - dinitprintk((MYIOC_s_INFO_FMT "Retry Alt IocFacts failed r=%x\n", ioc->name, r)); + if (rc) { + dinitprintk((MYIOC_s_INFO_FMT "Retry Alt IocFacts failed rc=%x\n", ioc->name, rc)); alt_ioc_ready = 0; reset_alt_ioc_active = 0; } else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { @@ -1720,29 +1720,29 @@ * init as upper addresses are needed for init. * If fails, continue with alt-ioc processing */ - if ((ret == 0) && ((r = PrimeIocFifos(ioc)) != 0)) + if ((ret == 0) && ((rc = PrimeIocFifos(ioc)) != 0)) ret = -3; /* May need to check/upload firmware & data here! * If fails, continue with alt-ioc processing */ - if ((ret == 0) && ((r = SendIocInit(ioc, sleepFlag)) != 0)) + if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0)) ret = -4; // NEW! - if (alt_ioc_ready && ((r = PrimeIocFifos(ioc->alt_ioc)) != 0)) { + if (alt_ioc_ready && ((rc = PrimeIocFifos(ioc->alt_ioc)) != 0)) { printk(KERN_WARNING MYNAM ": alt-%s: (%d) FIFO mgmt alloc WARNING!\n", - ioc->alt_ioc->name, r); + ioc->alt_ioc->name, rc); alt_ioc_ready = 0; reset_alt_ioc_active = 0; } if (alt_ioc_ready) { - if ((r = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) { + if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) { alt_ioc_ready = 0; reset_alt_ioc_active = 0; printk(KERN_WARNING MYNAM ": alt-%s: (%d) init failure WARNING!\n", - ioc->alt_ioc->name, r); + ioc->alt_ioc->name, rc); } } @@ -1754,18 +1754,8 @@ /* Controller is not operational, cannot do upload */ if (ret == 0) { - r = mpt_do_upload(ioc, sleepFlag); - if (r != 0) - printk(KERN_WARNING MYNAM ": firmware upload failure!\n"); - } - - /* Handle the alt IOC too */ - if ((alt_ioc_ready) && (ioc->alt_ioc->upload_fw)){ - ddlprintk((MYIOC_s_INFO_FMT - "Alt-ioc firmware upload required!\n", - ioc->name)); - r = mpt_do_upload(ioc->alt_ioc, sleepFlag); - if (r != 0) + rc = mpt_do_upload(ioc, sleepFlag); + if (rc != 0) printk(KERN_WARNING MYNAM ": firmware upload failure!\n"); } } @@ -1859,19 +1849,19 @@ * MptResetHandlers[] registered yet. */ if (hard_reset_done) { - r = handlers = 0; + rc = handlers = 0; for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { if ((ret == 0) && MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); + rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); handlers++; } if (alt_ioc_ready && MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); + rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); handlers++; } } @@ -1932,84 +1922,90 @@ /* * mpt_adapter_disable - Disable misbehaving MPT adapter. * @this: Pointer to MPT adapter structure - * @free: Free up alloc'd reply, request, etc. */ static void -mpt_adapter_disable(MPT_ADAPTER *this, int freeup) +mpt_adapter_disable(MPT_ADAPTER *ioc) { - if (this != NULL) { - int sz=0; - int ret; - - if (this->cached_fw != NULL) { - ddlprintk((KERN_INFO MYNAM ": Pushing FW onto adapter\n")); + int sz; + int ret; - if ((ret = mpt_downloadboot(this, NO_SLEEP)) < 0) { - printk(KERN_WARNING MYNAM - ": firmware downloadboot failure (%d)!\n", ret); - } + if (ioc->cached_fw != NULL) { + ddlprintk((KERN_INFO MYNAM ": mpt_adapter_disable: Pushing FW onto adapter\n")); + if ((ret = mpt_downloadboot(ioc, NO_SLEEP)) < 0) { + printk(KERN_WARNING MYNAM + ": firmware downloadboot failure (%d)!\n", ret); } + } - /* Disable adapter interrupts! */ - CHIPREG_WRITE32(&this->chip->IntMask, 0xFFFFFFFF); - this->active = 0; - /* Clear any lingering interrupt */ - CHIPREG_WRITE32(&this->chip->IntStatus, 0); - - if (freeup && this->fifo_pool != NULL) { - pci_free_consistent(this->pcidev, - this->fifo_pool_sz, - this->fifo_pool, this->fifo_pool_dma); - this->reply_frames = NULL; - this->reply_alloc = NULL; - this->req_frames = NULL; - this->req_alloc = NULL; - this->chain_alloc = NULL; - this->fifo_pool = NULL; - this->alloc_total -= this->fifo_pool_sz; - } - if (freeup && this->sense_buf_pool != NULL) { - sz = (this->req_depth * MPT_SENSE_BUFFER_ALLOC); - pci_free_consistent(this->pcidev, sz, - this->sense_buf_pool, this->sense_buf_pool_dma); - this->sense_buf_pool = NULL; - this->alloc_total -= sz; - } - - if (freeup && this->events != NULL){ - sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS); - kfree(this->events); - this->events = NULL; - this->alloc_total -= sz; - } - - if (freeup && this->cached_fw != NULL) { - - sz = this->facts.FWImageSize; - pci_free_consistent(this->pcidev, sz, - this->cached_fw, this->cached_fw_dma); - this->cached_fw = NULL; - this->alloc_total -= sz; - } - - if (freeup && this->spi_data.nvram != NULL) { - kfree(this->spi_data.nvram); - this->spi_data.nvram = NULL; - } - - if (freeup && this->spi_data.pIocPg3 != NULL) { - kfree(this->spi_data.pIocPg3); - this->spi_data.pIocPg3 = NULL; - } - - if (freeup && this->spi_data.pIocPg4 != NULL) { - sz = this->spi_data.IocPg4Sz; - pci_free_consistent(this->pcidev, sz, - this->spi_data.pIocPg4, - this->spi_data.IocPg4_dma); - this->spi_data.pIocPg4 = NULL; - this->alloc_total -= sz; - } + /* Disable adapter interrupts! */ + CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF); + ioc->active = 0; + /* Clear any lingering interrupt */ + CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); + + if (ioc->alloc != NULL) { + sz = ioc->alloc_sz; + dexitprintk((KERN_INFO MYNAM ": %s.free @ %p, sz=%d bytes\n", + ioc->name, ioc->alloc, ioc->alloc_sz)); + pci_free_consistent(ioc->pcidev, sz, + ioc->alloc, ioc->alloc_dma); + ioc->reply_frames = NULL; + ioc->req_frames = NULL; + ioc->alloc = NULL; + ioc->alloc_total -= sz; + } + + if (ioc->sense_buf_pool != NULL) { + sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); + pci_free_consistent(ioc->pcidev, sz, + ioc->sense_buf_pool, ioc->sense_buf_pool_dma); + ioc->sense_buf_pool = NULL; + ioc->alloc_total -= sz; + } + + if (ioc->events != NULL){ + sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS); + kfree(ioc->events); + ioc->events = NULL; + ioc->alloc_total -= sz; + } + + if (ioc->cached_fw != NULL) { + sz = ioc->facts.FWImageSize; + pci_free_consistent(ioc->pcidev, sz, + ioc->cached_fw, ioc->cached_fw_dma); + ioc->cached_fw = NULL; + ioc->alloc_total -= sz; + } + + if (ioc->spi_data.nvram != NULL) { + kfree(ioc->spi_data.nvram); + ioc->spi_data.nvram = NULL; + } + + if (ioc->spi_data.pIocPg3 != NULL) { + kfree(ioc->spi_data.pIocPg3); + ioc->spi_data.pIocPg3 = NULL; + } + + if (ioc->spi_data.pIocPg4 != NULL) { + sz = ioc->spi_data.IocPg4Sz; + pci_free_consistent(ioc->pcidev, sz, + ioc->spi_data.pIocPg4, + ioc->spi_data.IocPg4_dma); + ioc->spi_data.pIocPg4 = NULL; + ioc->alloc_total -= sz; + } + + if (ioc->ReqToChain != NULL) { + kfree(ioc->ReqToChain); + kfree(ioc->RequestNB); + ioc->ReqToChain = NULL; + } + + if (ioc->ChainToChain != NULL) { + kfree(ioc->ChainToChain); + ioc->ChainToChain = NULL; } } @@ -2017,43 +2013,43 @@ /* * mpt_adapter_dispose - Free all resources associated with a MPT * adapter. - * @this: Pointer to MPT adapter structure + * @ioc: Pointer to MPT adapter structure * * This routine unregisters h/w resources and frees all alloc'd memory * associated with a MPT adapter structure. */ static void -mpt_adapter_dispose(MPT_ADAPTER *this) +mpt_adapter_dispose(MPT_ADAPTER *ioc) { - if (this != NULL) { + if (ioc != NULL) { int sz_first, sz_last; - sz_first = this->alloc_total; + sz_first = ioc->alloc_total; - mpt_adapter_disable(this, 1); + mpt_adapter_disable(ioc); - if (this->pci_irq != -1) { - free_irq(this->pci_irq, this); - this->pci_irq = -1; + if (ioc->pci_irq != -1) { + free_irq(ioc->pci_irq, ioc); + ioc->pci_irq = -1; } - if (this->memmap != NULL) - iounmap((u8 *) this->memmap); + if (ioc->memmap != NULL) + iounmap((u8 *) ioc->memmap); #if defined(CONFIG_MTRR) && 0 - if (this->mtrr_reg > 0) { - mtrr_del(this->mtrr_reg, 0, 0); - dprintk((KERN_INFO MYNAM ": %s: MTRR region de-registered\n", this->name)); + if (ioc->mtrr_reg > 0) { + mtrr_del(ioc->mtrr_reg, 0, 0); + dprintk((KERN_INFO MYNAM ": %s: MTRR region de-registered\n", ioc->name)); } #endif /* Zap the adapter lookup ptr! */ - list_del(&this->list); + list_del(&ioc->list); - sz_last = this->alloc_total; + sz_last = ioc->alloc_total; dprintk((KERN_INFO MYNAM ": %s: free'd %d of %d bytes\n", - this->name, sz_first-sz_last+(int)sizeof(*this), sz_first)); - kfree(this); + ioc->name, sz_first-sz_last+(int)sizeof(*ioc), sz_first)); + kfree(ioc); } } @@ -2228,13 +2224,13 @@ ii++; cntdn--; if (!cntdn) { printk(MYIOC_s_ERR_FMT "Wait IOC_READY state timeout(%d)!\n", - ioc->name, (ii+5)/HZ); + ioc->name, (int)((ii+5)/HZ)); return -ETIME; } if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(1 * HZ / 1000); } else { mdelay (1); /* 1 msec delay */ } @@ -2292,7 +2288,9 @@ int r; int req_sz; int reply_sz; - u32 status; + int sz; + u32 status, vv; + u8 shiftFactor=1; /* IOC *must* NOT be in RESET state! */ if (ioc->last_state == MPI_IOC_STATE_RESET) { @@ -2315,7 +2313,9 @@ get_facts.Function = MPI_FUNCTION_IOC_FACTS; /* Assert: All other get_facts fields are zero! */ - dinitprintk((MYIOC_s_INFO_FMT "Sending get IocFacts request\n", ioc->name)); + dinitprintk((MYIOC_s_INFO_FMT + "Sending get IocFacts request req_sz=%d reply_sz=%d\n", + ioc->name, req_sz, reply_sz)); /* No non-zero fields in the get_facts request are greater than * 1 byte in size, so we can just fire it off as is. @@ -2388,6 +2388,13 @@ facts->FWImageSize = le32_to_cpu(facts->FWImageSize); } + sz = facts->FWImageSize; + if ( sz & 0x01 ) + sz += 1; + if ( sz & 0x02 ) + sz += 2; + facts->FWImageSize = sz; + if (!facts->RequestFrameSize) { /* Something is wrong! */ printk(MYIOC_s_ERR_FMT "IOC reported invalid 0 request size!\n", @@ -2395,6 +2402,18 @@ return -55; } + r = sz = le32_to_cpu(facts->BlockSize); + vv = ((63 / (sz * 4)) + 1) & 0x03; + ioc->NB_for_64_byte_frame = vv; + while ( sz ) + { + shiftFactor++; + sz = sz >> 1; + } + ioc->NBShiftFactor = shiftFactor; + dinitprintk((MYIOC_s_INFO_FMT "NB_for_64_byte_frame=%x NBShiftFactor=%x BlockSize=%x\n", + ioc->name, vv, shiftFactor, r)); + if (reason == MPT_HOSTEVENT_IOC_BRINGUP) { /* * Set values for this IOC's request & reply frame sizes, @@ -2405,9 +2424,9 @@ ioc->reply_sz = MPT_REPLY_FRAME_SIZE; ioc->reply_depth = min_t(int, MPT_DEFAULT_REPLY_DEPTH, facts->ReplyQueueDepth); - dprintk((MYIOC_s_INFO_FMT "reply_sz=%3d, reply_depth=%4d\n", + dinitprintk((MYIOC_s_INFO_FMT "reply_sz=%3d, reply_depth=%4d\n", ioc->name, ioc->reply_sz, ioc->reply_depth)); - dprintk((MYIOC_s_INFO_FMT "req_sz =%3d, req_depth =%4d\n", + dinitprintk((MYIOC_s_INFO_FMT "req_sz =%3d, req_depth =%4d\n", ioc->name, ioc->req_sz, ioc->req_depth)); /* Get port facts! */ @@ -2416,7 +2435,7 @@ } } else { printk(MYIOC_s_ERR_FMT - "Invalid IOC facts reply, msgLength=%d offsetof=%d!\n", + "Invalid IOC facts reply, msgLength=%d offsetof=%zd!\n", ioc->name, facts->MsgLength, (offsetof(IOCFactsReply_t, RequestFrameSize)/sizeof(u32))); return -66; @@ -2465,7 +2484,7 @@ get_pfacts.PortNumber = portnum; /* Assert: All other get_pfacts fields are zero! */ - dprintk((MYIOC_s_INFO_FMT "Sending get PortFacts(%d) request\n", + dinitprintk((MYIOC_s_INFO_FMT "Sending get PortFacts(%d) request\n", ioc->name, portnum)); /* No non-zero fields in the get_pfacts request are greater than @@ -2516,24 +2535,18 @@ memset(&init_reply, 0, sizeof(init_reply)); ioc_init.WhoInit = MPI_WHOINIT_HOST_DRIVER; -/* ioc_init.ChainOffset = 0; */ ioc_init.Function = MPI_FUNCTION_IOC_INIT; -/* ioc_init.Flags = 0; */ /* If we are in a recovery mode and we uploaded the FW image, * then this pointer is not NULL. Skip the upload a second time. * Set this flag if cached_fw set for either IOC. */ - ioc->upload_fw = 0; - ioc_init.Flags = 0; - if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT) { - if ((ioc->cached_fw) || (ioc->alt_ioc && ioc->alt_ioc->cached_fw)) - ioc_init.Flags = MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE; - else - ioc->upload_fw = 1; - } - ddlprintk((MYIOC_s_INFO_FMT "flags %d, upload_fw %d \n", - ioc->name, ioc_init.Flags, ioc->upload_fw)); + if (ioc->facts.Flags & MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT) + ioc->upload_fw = 1; + else + ioc->upload_fw = 0; + ddlprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n", + ioc->name, ioc->upload_fw, ioc->facts.Flags)); if ((int)ioc->chip_type <= (int)FC929) { ioc_init.MaxDevices = MPT_MAX_FC_DEVICES; @@ -2542,17 +2555,13 @@ } ioc_init.MaxBuses = MPT_MAX_BUS; -/* ioc_init.MsgFlags = 0; */ -/* ioc_init.MsgContext = cpu_to_le32(0x00000000); */ ioc_init.ReplyFrameSize = cpu_to_le16(ioc->reply_sz); /* in BYTES */ - - ioc->facts.RequestFrameSize = ioc_init.ReplyFrameSize; if (sizeof(dma_addr_t) == sizeof(u64)) { /* Save the upper 32-bits of the request * (reply) and sense buffers. */ - ioc_init.HostMfaHighAddr = cpu_to_le32((u32)((u64)ioc->req_frames_dma >> 32)); + ioc_init.HostMfaHighAddr = cpu_to_le32((u32)((u64)ioc->alloc_dma >> 32)); ioc_init.SenseBufferHighAddr = cpu_to_le32((u32)((u64)ioc->sense_buf_pool_dma >> 32)); } else { /* Force 32-bit addressing */ @@ -2591,14 +2600,14 @@ while (state != MPI_IOC_STATE_OPERATIONAL && --cntdn) { if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(1 * HZ / 1000); } else { mdelay(1); } if (!cntdn) { printk(MYIOC_s_ERR_FMT "Wait IOC_OP state timeout(%d)!\n", - ioc->name, (count+5)/HZ); + ioc->name, (int)((count+5)/HZ)); return -9; } @@ -2644,7 +2653,7 @@ /* port_enable.MsgFlags = 0; */ /* port_enable.MsgContext = 0; */ - dprintk((MYIOC_s_INFO_FMT "Sending Port(%d)Enable (req @ %p)\n", + dinitprintk((MYIOC_s_INFO_FMT "Sending Port(%d)Enable (req @ %p)\n", ioc->name, portnum, &port_enable)); /* RAID FW may take a long time to enable @@ -2668,20 +2677,22 @@ } /* - * Inputs: size - total FW bytes - * Outputs: frags - number of fragments needed - * Return NULL if failed. + * ioc: Pointer to MPT_ADAPTER structure + * size - total FW bytes */ void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) { - /* cached_fw - */ - - if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) ) - ioc->alloc_total += size; + if (ioc->cached_fw) + return; /* use already allocated memory */ + if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) { + ioc->cached_fw = ioc->alt_ioc->cached_fw; /* use alt_ioc's memory */ + ioc->cached_fw_dma = ioc->alt_ioc->cached_fw_dma; + } else { + if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) ) + ioc->alloc_total += size; + } } - /* * If alt_img is NULL, delete from ioc structure. * Else, delete a secondary image in same format. @@ -2692,6 +2703,8 @@ int sz; sz = ioc->facts.FWImageSize; + dinitprintk((KERN_WARNING MYNAM "free_fw_memory: FW Image @ %p[%p], sz=%d[%x] bytes\n", + ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); pci_free_consistent(ioc->pcidev, sz, ioc->cached_fw, ioc->cached_fw_dma); ioc->cached_fw = NULL; @@ -2725,30 +2738,24 @@ int sgeoffset; u32 flagsLength; int ii, sz, reply_sz; - int cmdStatus, freeMem = 0; + int cmdStatus; - /* If the image size is 0 or if the pointer is - * not NULL (error), we are done. + /* If the image size is 0, we are done. */ - if (((sz = ioc->facts.FWImageSize) == 0) || ioc->cached_fw) + if ((sz = ioc->facts.FWImageSize) == 0) return 0; - if ( sz & 0x01 ) - sz += 1; - if ( sz & 0x02 ) - sz += 2; - mpt_alloc_fw_memory(ioc, sz); + dinitprintk((KERN_WARNING MYNAM ": FW Image @ %p[%p], sz=%d[%x] bytes\n", + ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); + if (ioc->cached_fw == NULL) { /* Major Failure. */ return -ENOMEM; } - dinitprintk((KERN_WARNING MYNAM ": FW Image @ %p[%p], sz=%d[%x] bytes\n", - ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz)); - prequest = (FWUpload_t *)&request; preply = (FWUploadReply_t *)&reply; @@ -2797,23 +2804,11 @@ dinitprintk((MYIOC_s_INFO_FMT ": do_upload status %d \n", ioc->name, cmdStatus)); - /* Check to see if we have a copy of this image in - * host memory already. - */ - if (cmdStatus == 0) { - ioc->upload_fw = 0; - if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) - freeMem = 1; - } - - /* We already have a copy of this image or - * we had some type of an error - either the handshake - * failed (i != 0) or the command did not complete successfully. - */ - if (cmdStatus || freeMem) { + + if (cmdStatus) { - ddlprintk((MYIOC_s_INFO_FMT ": do_upload freeing %s image \n", - ioc->name, cmdStatus ? "incomplete" : "duplicate")); + ddlprintk((MYIOC_s_INFO_FMT ": fw upload failed, freeing image \n", + ioc->name)); mpt_free_fw_memory(ioc); } @@ -2841,28 +2836,26 @@ MpiExtImageHeader_t *pExtImage; u32 fwSize; u32 diag0val; -#ifdef MPT_DEBUG - u32 diag1val = 0; -#endif - int count = 0; + int count; u32 *ptrFw; u32 diagRwData; u32 nextImage; u32 load_addr; - u32 ioc_state; + u32 ioc_state=0; ddlprintk((MYIOC_s_INFO_FMT "downloadboot: fw size 0x%x, ioc FW Ptr %p\n", ioc->name, ioc->facts.FWImageSize, ioc->cached_fw)); - /* Get dma_addr and data transfer size. - */ if ( ioc->facts.FWImageSize == 0 ) return -1; - /* Get the DMA from ioc or ioc->alt_ioc */ if (ioc->cached_fw == NULL) return -2; + /* prevent a second downloadboot and memory free with alt_ioc */ + if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) + ioc->alt_ioc->cached_fw = NULL; + CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE); CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_2ND_KEY_VALUE); @@ -2870,18 +2863,17 @@ CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_4TH_KEY_VALUE); CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - diag0val |= (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM); - CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); + CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM)); - /* wait 100 msec */ + /* wait 1 msec */ if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(100 * HZ / 1000); + schedule_timeout(1 * HZ / 1000); } else { - mdelay (100); + mdelay (1); } + diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | MPI_DIAG_RESET_ADAPTER); for (count = 0; count < 30; count ++) { @@ -2894,7 +2886,7 @@ /* wait 1 sec */ if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(1000 * HZ / 1000); } else { mdelay (1000); } @@ -2914,8 +2906,7 @@ CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE); /* Set the DiagRwEn and Disable ARM bits */ - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - CHIPREG_WRITE32(&ioc->chip->Diagnostic, (diag0val | MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM)); + CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM)); pFwHeader = (MpiFwHeader_t *) ioc->cached_fw; fwSize = (pFwHeader->ImageSize + 3)/4; @@ -2961,15 +2952,6 @@ ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue)); CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue); - /* clear the PREVENT_IOC_BOOT bit */ - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT\n", - ioc->name, diag0val)); - diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT); - ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n", - ioc->name, diag0val)); - CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); - /* Clear the internal flash bad bit - autoincrementing register, * so must do two writes. */ @@ -2980,28 +2962,13 @@ CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData); diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off DISABLE_ARM, RW_ENABLE, RESET_HISTORY\n", + ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT, DISABLE_ARM\n", ioc->name, diag0val)); - diag0val &= ~(MPI_DIAG_DISABLE_ARM | MPI_DIAG_RW_ENABLE | MPI_DIAG_RESET_HISTORY); + diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM); ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n", ioc->name, diag0val)); CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); - /* wait 100 msec */ - if (sleepFlag == CAN_SLEEP) { - ddlprintk((MYIOC_s_INFO_FMT "CAN_SLEEP 100 msec before reset the sequencer\n", ioc->name)); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(100 * HZ / 1000); - } else { - ddlprintk((MYIOC_s_INFO_FMT "mdelay 100 msec before reset the sequencer\n", ioc->name)); - mdelay (100); - } - - diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); - if ( diag0val & (MPI_DIAG_FLASH_BAD_SIG | MPI_DIAG_DISABLE_ARM) ) { - ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed, diag0val=%x FLASH_BAD_SIG | DISABLE_ARM on\n ", - ioc->name, diag0val)); - } /* Write 0xFF to reset the sequencer */ CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF); @@ -3009,26 +2976,18 @@ if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) { ddlprintk((MYIOC_s_INFO_FMT "downloadboot successful! (count=%d) IocState=%x\n", ioc->name, count, ioc_state)); -/* if ((r = GetIocFacts(ioc, sleepFlag, MPT_HOSTEVENT_IOC_BRINGUP)) != 0) { - if ((r = GetIocFacts(ioc, sleepFlag, MPT_HOSTEVENT_IOC_BRINGUP)) != 0) { - ddlprintk((MYIOC_s_INFO_FMT "GetIocFacts failed\n", - ioc->name)); - return -EFAULT; - } - } */ - /* wait 2 sec */ -/* if (sleepFlag == CAN_SLEEP) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(5000 * HZ / 1000); - } else { - mdelay (5000); - } */ - + if ((SendIocInit(ioc, sleepFlag)) != 0) { + ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit failed\n", + ioc->name)); + return -EFAULT; + } + ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit successful\n", + ioc->name)); return 0; } if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(10 * HZ / 1000); } else { mdelay (10); } @@ -3068,8 +3027,8 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag) { int hard_reset_done = 0; - u32 ioc_state; - int cntdn, cnt = 0; + u32 ioc_state=0; + int cnt,cntdn; dinitprintk((KERN_WARNING MYNAM ": KickStarting %s!\n", ioc->name)); if ((int)ioc->chip_type > (int)FC929) { @@ -3080,7 +3039,7 @@ if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(1000 * HZ / 1000); } else { mdelay (1000); } @@ -3090,26 +3049,27 @@ if (hard_reset_done < 0) return hard_reset_done; - dprintk((MYIOC_s_INFO_FMT "Diagnostic reset successful!\n", + dinitprintk((MYIOC_s_INFO_FMT "Diagnostic reset successful!\n", ioc->name)); - cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 20; /* 20 seconds */ + cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 2; /* 2 seconds */ for (cnt=0; cntname, cnt)); + ioc_state = mpt_GetIocState(ioc, 1); + if ((ioc_state == MPI_IOC_STATE_READY) || (ioc_state == MPI_IOC_STATE_OPERATIONAL)) { + dinitprintk((MYIOC_s_INFO_FMT "KickStart successful! (cnt=%d)\n", + ioc->name, cnt)); return hard_reset_done; } if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(10 * HZ / 1000); } else { mdelay (10); } } - printk(MYIOC_s_ERR_FMT "Failed to come READY after reset!\n", - ioc->name); + printk(MYIOC_s_ERR_FMT "Failed to come READY after reset! IocState=%x\n", + ioc->name, ioc_state); return -1; } @@ -3199,12 +3159,6 @@ dprintk((MYIOC_s_INFO_FMT "DbG2: diag0=%08x, diag1=%08x\n", ioc->name, diag0val, diag1val)); #endif - /* Write the PreventIocBoot bit */ - if ((ioc->cached_fw) || (ioc->alt_ioc && ioc->alt_ioc->cached_fw)) { - diag0val |= MPI_DIAG_PREVENT_IOC_BOOT; - CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val); - } - /* * Disable the ARM (Bug fix) * @@ -3246,20 +3200,13 @@ /* FIXME? Examine results here? */ } - if ((ioc->cached_fw) || (ioc->alt_ioc && ioc->alt_ioc->cached_fw)) { + if (ioc->cached_fw) { /* If the DownloadBoot operation fails, the * IOC will be left unusable. This is a fatal error * case. _diag_reset will return < 0 */ for (count = 0; count < 30; count ++) { diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); -#ifdef MPT_DEBUG - if (ioc->alt_ioc) - diag1val = CHIPREG_READ32(&ioc->alt_ioc->chip->Diagnostic); - dprintk((MYIOC_s_INFO_FMT - "DbG2b: diag0=%08x, diag1=%08x\n", - ioc->name, diag0val, diag1val)); -#endif if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) { break; } @@ -3267,7 +3214,7 @@ /* wait 1 sec */ if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(1000 * HZ / 1000); } else { mdelay (1000); } @@ -3295,7 +3242,7 @@ /* wait 1 sec */ if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ); + schedule_timeout(1000 * HZ / 1000); } else { mdelay (1000); } @@ -3419,13 +3366,13 @@ count *= 10; printk(KERN_ERR MYNAM ": %s: ERROR - Wait IOC_READY state timeout(%d)!\n", - ioc->name, (count+5)/HZ); + ioc->name, (int)((count+5)/HZ)); return -ETIME; } if (sleepFlag == CAN_SLEEP) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(1 * HZ / 1000); } else { mdelay (1); /* 1 msec delay */ } @@ -3443,35 +3390,45 @@ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* - * PrimeIocFifos - Initialize IOC request and reply FIFOs. - * @ioc: Pointer to MPT_ADAPTER structure - * - * This routine allocates memory for the MPT reply and request frame - * pools (if necessary), and primes the IOC reply FIFO with - * reply frames. - * - * Returns 0 for success, non-zero for failure. + * initChainBuffers - Allocate memory for and initialize + * chain buffers, chain buffer control arrays and spinlock. + * @hd: Pointer to MPT_SCSI_HOST structure + * @init: If set, initialize the spin lock. */ static int -PrimeIocFifos(MPT_ADAPTER *ioc) +initChainBuffers(MPT_ADAPTER *ioc) { - MPT_FRAME_HDR *mf; - unsigned long b; - unsigned long flags; - dma_addr_t aligned_mem_dma; - u8 *aligned_mem; - int i, sz; - int chain_buffer_sz, reply_buffer_sz, request_buffer_sz; - int scale, num_sge, num_chain; - - /* request buffer size, rounding UP to nearest 4-kB boundary */ - request_buffer_sz = (ioc->req_sz * ioc->req_depth) + 128; - request_buffer_sz = ((request_buffer_sz + 0x1000UL - 1UL) / 0x1000) * 0x1000; + u8 *mem; + int sz, ii, num_chain; + int scale, num_sge, numSGE; + + /* ReqToChain size must equal the req_depth + * index = req_idx + */ + if (ioc->ReqToChain == NULL) { + sz = ioc->req_depth * sizeof(int); + mem = kmalloc(sz, GFP_ATOMIC); + if (mem == NULL) + return -1; + + ioc->ReqToChain = (int *) mem; + dinitprintk((KERN_INFO MYNAM ": %s ReqToChain alloc @ %p, sz=%d bytes\n", + ioc->name, mem, sz)); + mem = kmalloc(sz, GFP_ATOMIC); + if (mem == NULL) + return -1; - /* reply buffer size */ - reply_buffer_sz = (ioc->reply_sz * ioc->reply_depth) + 128; + ioc->RequestNB = (int *) mem; + dinitprintk((KERN_INFO MYNAM ": %s RequestNB alloc @ %p, sz=%d bytes\n", + ioc->name, mem, sz)); + } + for (ii = 0; ii < ioc->req_depth; ii++) { + ioc->ReqToChain[ii] = MPT_HOST_NO_CHAIN; + } - /* chain buffer size, copied from from mptscsih_initChainBuffers() + /* ChainToChain size must equal the total number + * of chain buffers to be allocated. + * index = chain_idx * * Calculate the number of chain buffers needed(plus 1) per I/O * then multiply the the maximum number of simultaneous cmds @@ -3479,79 +3436,134 @@ * num_sge = num sge in request frame + last chain buffer * scale = num sge per chain buffer if no chain element */ - scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); if (sizeof(dma_addr_t) == sizeof(u64)) num_sge = scale + (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32)); else - num_sge = 1 + scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); + num_sge = 1+ scale + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); + + if (sizeof(dma_addr_t) == sizeof(u64)) { + numSGE = (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale + + (ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32)); + } else { + numSGE = 1 + (scale - 1) * (ioc->facts.MaxChainDepth-1) + scale + + (ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); + } + dinitprintk((KERN_INFO MYNAM ": %s num_sge=%d numSGE=%d\n", + ioc->name, num_sge, numSGE)); + + if ( numSGE > MPT_SCSI_SG_DEPTH ) + numSGE = MPT_SCSI_SG_DEPTH; num_chain = 1; - while (MPT_SCSI_SG_DEPTH - num_sge > 0) { + while (numSGE - num_sge > 0) { num_chain++; num_sge += (scale - 1); } num_chain++; - if ((int)ioc->chip_type > (int) FC929) + dinitprintk((KERN_INFO MYNAM ": %s Now numSGE=%d num_sge=%d num_chain=%d\n", + ioc->name, numSGE, num_sge, num_chain)); + + if ((int) ioc->chip_type > (int) FC929) num_chain *= MPT_SCSI_CAN_QUEUE; else num_chain *= MPT_FC_CAN_QUEUE; - chain_buffer_sz = num_chain * ioc->req_sz; + ioc->num_chain = num_chain; - if(ioc->fifo_pool == NULL) { + sz = num_chain * sizeof(int); + if (ioc->ChainToChain == NULL) { + mem = kmalloc(sz, GFP_ATOMIC); + if (mem == NULL) + return -1; - ioc->fifo_pool_sz = request_buffer_sz + - reply_buffer_sz + chain_buffer_sz; + ioc->ChainToChain = (int *) mem; + dinitprintk((KERN_INFO MYNAM ": %s ChainToChain alloc @ %p, sz=%d bytes\n", + ioc->name, mem, sz)); + } else { + mem = (u8 *) ioc->ChainToChain; + } + memset(mem, 0xFF, sz); + return num_chain; +} - ioc->fifo_pool = pci_alloc_consistent(ioc->pcidev, - ioc->fifo_pool_sz, &ioc->fifo_pool_dma); +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +/* + * PrimeIocFifos - Initialize IOC request and reply FIFOs. + * @ioc: Pointer to MPT_ADAPTER structure + * + * This routine allocates memory for the MPT reply and request frame + * pools (if necessary), and primes the IOC reply FIFO with + * reply frames. + * + * Returns 0 for success, non-zero for failure. + */ +static int +PrimeIocFifos(MPT_ADAPTER *ioc) +{ + MPT_FRAME_HDR *mf; + unsigned long flags; + dma_addr_t alloc_dma; + u8 *mem; + int i, reply_sz, sz, total_size, num_chain; - if( ioc->fifo_pool == NULL) + /* Prime reply FIFO... */ + + if (ioc->reply_frames == NULL) { + if ( (num_chain = initChainBuffers(ioc)) < 0) + return -1; + + total_size = reply_sz = (ioc->reply_sz * ioc->reply_depth); + dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffer sz=%d bytes, ReplyDepth=%d\n", + ioc->name, ioc->reply_sz, ioc->reply_depth)); + dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffer sz=%d[%x] bytes\n", + ioc->name, reply_sz, reply_sz)); + + sz = (ioc->req_sz * ioc->req_depth); + dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffer sz=%d bytes, RequestDepth=%d\n", + ioc->name, ioc->req_sz, ioc->req_depth)); + dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffer sz=%d[%x] bytes\n", + ioc->name, sz, sz)); + total_size += sz; + + sz = num_chain * ioc->req_sz; /* chain buffer pool size */ + dinitprintk((KERN_INFO MYNAM ": %s.ChainBuffer sz=%d bytes, ChainDepth=%d\n", + ioc->name, ioc->req_sz, num_chain)); + dinitprintk((KERN_INFO MYNAM ": %s.ChainBuffer sz=%d[%x] bytes num_chain=%d\n", + ioc->name, sz, sz, num_chain)); + + total_size += sz; + mem = pci_alloc_consistent(ioc->pcidev, total_size, &alloc_dma); + if (mem == NULL) { + printk(MYIOC_s_ERR_FMT "Unable to allocate Reply, Request, Chain Buffers!\n", + ioc->name); goto out_fail; + } - ioc->alloc_total += ioc->fifo_pool_sz; - memset(ioc->fifo_pool, 0, ioc->fifo_pool_sz); + dinitprintk((KERN_INFO MYNAM ": %s.Total alloc @ %p[%p], sz=%d[%x] bytes\n", + ioc->name, mem, (void *)(ulong)alloc_dma, total_size, total_size)); - /* reply fifo pointers */ - ioc->reply_alloc = ioc->fifo_pool; - ioc->reply_alloc_dma = ioc->fifo_pool_dma; - /* request fifo pointers */ - ioc->req_alloc = ioc->reply_alloc+reply_buffer_sz; - ioc->req_alloc_dma = ioc->reply_alloc_dma+reply_buffer_sz; - /* chain buffer pointers */ - ioc->chain_alloc = ioc->req_alloc+request_buffer_sz; - ioc->chain_alloc_dma = ioc->req_alloc_dma+request_buffer_sz; - ioc->chain_alloc_sz = chain_buffer_sz; - - /* Prime reply FIFO... */ - dprintk((KERN_INFO MYNAM ": %s.reply_alloc @ %p[%p], sz=%d bytes\n", - ioc->name, ioc->reply_alloc, - (void *)(ulong)ioc->reply_alloc_dma, reply_buffer_sz)); - - b = (unsigned long) ioc->reply_alloc; - b = (b + (0x80UL - 1UL)) & ~(0x80UL - 1UL); /* round up to 128-byte boundary */ - aligned_mem = (u8 *) b; - ioc->reply_frames = (MPT_FRAME_HDR *) aligned_mem; - ioc->reply_frames_dma = - (ioc->reply_alloc_dma + (aligned_mem - ioc->reply_alloc)); + memset(mem, 0, total_size); + ioc->alloc_total += total_size; + ioc->alloc = mem; + ioc->alloc_dma = alloc_dma; + ioc->alloc_sz = total_size; + ioc->reply_frames = (MPT_FRAME_HDR *) mem; + ioc->reply_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); + + alloc_dma += reply_sz; + mem += reply_sz; - ioc->reply_frames_low_dma = (u32) (ioc->reply_frames_dma & 0xFFFFFFFF); - /* Request FIFO - WE manage this! */ - dprintk((KERN_INFO MYNAM ": %s.req_alloc @ %p[%p], sz=%d bytes\n", - ioc->name, ioc->req_alloc, - (void *)(ulong)ioc->req_alloc_dma, request_buffer_sz)); - - b = (unsigned long) ioc->req_alloc; - b = (b + (0x80UL - 1UL)) & ~(0x80UL - 1UL); /* round up to 128-byte boundary */ - aligned_mem = (u8 *) b; - ioc->req_frames = (MPT_FRAME_HDR *) aligned_mem; - ioc->req_frames_dma = - (ioc->req_alloc_dma + (aligned_mem - ioc->req_alloc)); - ioc->req_frames_low_dma = (u32) (ioc->req_frames_dma & 0xFFFFFFFF); + ioc->req_frames = (MPT_FRAME_HDR *) mem; + ioc->req_frames_dma = alloc_dma; + + dinitprintk((KERN_INFO MYNAM ": %s.RequestBuffers @ %p[%p]\n", + ioc->name, mem, (void *)(ulong)alloc_dma)); + + ioc->req_frames_low_dma = (u32) (alloc_dma & 0xFFFFFFFF); #if defined(CONFIG_MTRR) && 0 /* @@ -3559,79 +3571,93 @@ * (at least as much as we can; "size and base must be * multiples of 4 kiB" */ - ioc->mtrr_reg = mtrr_add(ioc->fifo_pool, - ioc->fifo_pool_sz, + ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma, + sz, MTRR_TYPE_WRCOMB, 1); dprintk((MYIOC_s_INFO_FMT "MTRR region registered (base:size=%08x:%x)\n", - ioc->name, ioc->fifo_pool, ioc->fifo_pool_sz)); + ioc->name, ioc->req_frames_dma, sz)); #endif - } /* ioc->fifo_pool == NULL */ - - /* Post Reply frames to FIFO - */ - aligned_mem_dma = ioc->reply_frames_dma; - dprintk((KERN_INFO MYNAM ": %s.reply_frames @ %p[%p]\n", - ioc->name, ioc->reply_frames, (void *)(ulong)aligned_mem_dma)); + for (i = 0; i < ioc->req_depth; i++) { + alloc_dma += ioc->req_sz; + mem += ioc->req_sz; + } - for (i = 0; i < ioc->reply_depth; i++) { - /* Write each address to the IOC! */ - CHIPREG_WRITE32(&ioc->chip->ReplyFifo, aligned_mem_dma); - aligned_mem_dma += ioc->reply_sz; - } + ioc->ChainBuffer = mem; + ioc->ChainBufferDMA = alloc_dma; + dinitprintk((KERN_INFO MYNAM " :%s.ChainBuffers @ %p(%p)\n", + ioc->name, ioc->ChainBuffer, (void *)(ulong)ioc->ChainBufferDMA)); - /* Initialize Request frames linked list - */ - aligned_mem_dma = ioc->req_frames_dma; - aligned_mem = (u8 *) ioc->req_frames; - dprintk((KERN_INFO MYNAM ": %s.req_frames @ %p[%p]\n", - ioc->name, aligned_mem, (void *)(ulong)aligned_mem_dma)); + /* Initialize the free chain Q. + */ - spin_lock_irqsave(&ioc->FreeQlock, flags); - Q_INIT(&ioc->FreeQ, MPT_FRAME_HDR); - for (i = 0; i < ioc->req_depth; i++) { - mf = (MPT_FRAME_HDR *) aligned_mem; - - /* Queue REQUESTs *internally*! */ - Q_ADD_TAIL(&ioc->FreeQ.head, &mf->u.frame.linkage, MPT_FRAME_HDR); - aligned_mem += ioc->req_sz; - } - spin_unlock_irqrestore(&ioc->FreeQlock, flags); + Q_INIT(&ioc->FreeChainQ, MPT_FRAME_HDR); + /* Post the chain buffers to the FreeChainQ. + */ + mem = (u8 *)ioc->ChainBuffer; + for (i=0; i < num_chain; i++) { + mf = (MPT_FRAME_HDR *) mem; + Q_ADD_TAIL(&ioc->FreeChainQ.head, &mf->u.frame.linkage, MPT_FRAME_HDR); + mem += ioc->req_sz; + } + + /* Initialize Request frames linked list + */ + alloc_dma = ioc->req_frames_dma; + mem = (u8 *) ioc->req_frames; + + spin_lock_irqsave(&ioc->FreeQlock, flags); + Q_INIT(&ioc->FreeQ, MPT_FRAME_HDR); + for (i = 0; i < ioc->req_depth; i++) { + mf = (MPT_FRAME_HDR *) mem; + + /* Queue REQUESTs *internally*! */ + Q_ADD_TAIL(&ioc->FreeQ.head, &mf->u.frame.linkage, MPT_FRAME_HDR); + mem += ioc->req_sz; + } + spin_unlock_irqrestore(&ioc->FreeQlock, flags); - if (ioc->sense_buf_pool == NULL) { sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); ioc->sense_buf_pool = - pci_alloc_consistent(ioc->pcidev, sz, &ioc->sense_buf_pool_dma); - if (ioc->sense_buf_pool == NULL) + pci_alloc_consistent(ioc->pcidev, sz, &ioc->sense_buf_pool_dma); + if (ioc->sense_buf_pool == NULL) { + printk(MYIOC_s_ERR_FMT "Unable to allocate Sense Buffers!\n", + ioc->name); goto out_fail; + } ioc->sense_buf_low_dma = (u32) (ioc->sense_buf_pool_dma & 0xFFFFFFFF); ioc->alloc_total += sz; + dinitprintk((KERN_INFO MYNAM ": %s.SenseBuffers @ %p[%p]\n", + ioc->name, ioc->sense_buf_pool, (void *)(ulong)ioc->sense_buf_pool_dma)); + + } + + /* Post Reply frames to FIFO + */ + alloc_dma = ioc->alloc_dma; + dinitprintk((KERN_INFO MYNAM ": %s.ReplyBuffers @ %p[%p]\n", + ioc->name, ioc->reply_frames, (void *)(ulong)alloc_dma)); + + for (i = 0; i < ioc->reply_depth; i++) { + /* Write each address to the IOC! */ + CHIPREG_WRITE32(&ioc->chip->ReplyFifo, alloc_dma); + alloc_dma += ioc->reply_sz; } return 0; out_fail: - if (ioc->fifo_pool != NULL) { + if (ioc->alloc != NULL) { + sz = ioc->alloc_sz; pci_free_consistent(ioc->pcidev, - ioc->fifo_pool_sz, - ioc->fifo_pool, ioc->fifo_pool_dma); + sz, + ioc->alloc, ioc->alloc_dma); ioc->reply_frames = NULL; - ioc->reply_alloc = NULL; ioc->req_frames = NULL; - ioc->req_alloc = NULL; - ioc->chain_alloc = NULL; - ioc->fifo_pool = NULL; - ioc->alloc_total -= ioc->fifo_pool_sz; -#if defined(CONFIG_MTRR) && 0 - if (ioc->mtrr_reg > 0) { - mtrr_del(ioc->mtrr_reg, 0, 0); - dprintk((MYIOC_s_INFO_FMT "MTRR region de-registered\n", - ioc->name)); - } -#endif + ioc->alloc_total -= sz; } if (ioc->sense_buf_pool != NULL) { sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC); @@ -3693,8 +3719,8 @@ if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) failcnt++; - dhsprintk((MYIOC_s_INFO_FMT "HandShake request start, WaitCnt=%d%s\n", - ioc->name, t, failcnt ? " - MISSING DOORBELL HANDSHAKE!" : "")); + dhsprintk((MYIOC_s_INFO_FMT "HandShake request start reqBytes=%d, WaitCnt=%d%s\n", + ioc->name, reqBytes, t, failcnt ? " - MISSING DOORBELL HANDSHAKE!" : "")); /* Read doorbell and check for active bit */ if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)) @@ -3728,7 +3754,7 @@ failcnt++; } - dmfprintk((KERN_INFO MYNAM ": Handshake request frame (@%p) header\n", req)); + dhsprintk((KERN_INFO MYNAM ": Handshake request frame (@%p) header\n", req)); DBG_DUMP_REQUEST_FRAME_HDR(req) dhsprintk((MYIOC_s_INFO_FMT "HandShake request post done, WaitCnt=%d%s\n", @@ -3783,7 +3809,7 @@ if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) break; set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(1 * HZ / 1000); count++; } } else { @@ -3833,7 +3859,7 @@ if (intstat & MPI_HIS_DOORBELL_INTERRUPT) break; set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(1); + schedule_timeout(1 * HZ / 1000); count++; } } else { @@ -3935,7 +3961,7 @@ } #endif - dmfprintk((MYIOC_s_INFO_FMT "Got Handshake reply:\n", ioc->name)); + dhsprintk((MYIOC_s_INFO_FMT "Got Handshake reply:\n", ioc->name)); DBG_DUMP_REPLY_FRAME(mptReply) dhsprintk((MYIOC_s_INFO_FMT "WaitForDoorbell REPLY WaitCnt=%d (sz=%d)\n", @@ -4282,9 +4308,11 @@ pPP0->Capabilities = le32_to_cpu(pPP0->Capabilities); pPP0->PhysicalInterface = le32_to_cpu(pPP0->PhysicalInterface); - if ( (pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_QAS) == 0 ) + if ( (pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_QAS) == 0 ) { ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS; - + dinitprintk((KERN_INFO MYNAM " :%s noQas due to Capabilities=%x\n", + ioc->name, pPP0->Capabilities)); + } ioc->spi_data.maxBusWidth = pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_WIDE ? 1 : 0; data = pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK; if (data) { @@ -4907,8 +4935,8 @@ mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) { ToolboxIstwiReadWriteRequest_t *pReq; - struct pci_dev *pdev; MPT_FRAME_HDR *mf; + struct pci_dev *pdev; unsigned long flags; int rc; u32 flagsLength; @@ -5226,12 +5254,6 @@ if (drvname) len += sprintf(buf+len, " Fusion MPT %s driver\n", drvname); - /* - * Handle isense special case, because it - * doesn't do a formal mpt_register call. - */ - if (isense_idx == ii) - len += sprintf(buf+len, " Fusion MPT isense driver\n"); } } @@ -5286,7 +5308,7 @@ len += sprintf(buf+len, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize); len += sprintf(buf+len, " RequestFrames @ 0x%p (Dma @ 0x%p)\n", - (void *)ioc->req_alloc, (void *)(ulong)ioc->req_alloc_dma); + (void *)ioc->req_frames, (void *)(ulong)ioc->req_frames_dma); /* * Rounding UP to nearest 4-kB boundary here... */ @@ -5298,8 +5320,8 @@ 4*ioc->facts.RequestFrameSize, ioc->facts.GlobalCredits); - len += sprintf(buf+len, " ReplyFrames @ 0x%p (Dma @ 0x%p)\n", - (void *)ioc->reply_alloc, (void *)(ulong)ioc->reply_alloc_dma); + len += sprintf(buf+len, " Frames @ 0x%p (Dma @ 0x%p)\n", + (void *)ioc->alloc, (void *)(ulong)ioc->alloc_dma); sz = (ioc->reply_sz * ioc->reply_depth) + 128; len += sprintf(buf+len, " {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n", ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz); @@ -5592,7 +5614,7 @@ } evStr = EventDescriptionStr(event, evData0); - dprintk((MYIOC_s_INFO_FMT "MPT event (%s=%02Xh) detected!\n", + devtprintk((MYIOC_s_INFO_FMT "MPT event (%s=%02Xh) detected!\n", ioc->name, evStr, event)); @@ -5664,7 +5686,7 @@ */ for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { if (MptEvHandlers[ii]) { - dprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n", + devtprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n", ioc->name, ii)); r += (*(MptEvHandlers[ii]))(ioc, pEventReply); handlers++; @@ -5677,8 +5699,8 @@ */ if (pEventReply->AckRequired == MPI_EVENT_NOTIFICATION_ACK_REQUIRED) { if ((ii = SendEventAck(ioc, pEventReply)) != 0) { - printk(MYIOC_s_WARN_FMT "SendEventAck returned %d\n", - ioc->name, ii); + devtprintk((MYIOC_s_WARN_FMT "SendEventAck returned %d\n", + ioc->name, ii)); } } @@ -5702,9 +5724,8 @@ "FC Link", "Context Manager", "Invalid Field Offset", "State Change Info" }; u8 subcl = (log_info >> 24) & 0x7; -// u32 SubCl = log_info & 0x27000000; - printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}", + printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}\n", ioc->name, log_info, subcl_str[subcl]); } @@ -5907,50 +5928,6 @@ } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/** - * mpt_register_ascqops_strings - Register SCSI ASC/ASCQ and SCSI - * OpCode strings from the (optional) isense module. - * @ascqTable: Pointer to ASCQ_Table_t structure - * @ascqtbl_sz: Number of entries in ASCQ_Table - * @opsTable: Pointer to array of SCSI OpCode strings (char pointers) - * - * Specialized driver registration routine for the isense driver. - */ -int -mpt_register_ascqops_strings(void *ascqTable, int ascqtbl_sz, const char **opsTable) -{ - int r = 0; - - if (ascqTable && ascqtbl_sz && opsTable) { - mpt_v_ASCQ_TablePtr = ascqTable; - mpt_ASCQ_TableSz = ascqtbl_sz; - mpt_ScsiOpcodesPtr = opsTable; - printk(KERN_INFO MYNAM ": English readable SCSI-3 strings enabled:-)\n"); - isense_idx = last_drv_idx; - r = 1; - } - return r; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/** - * mpt_deregister_ascqops_strings - Deregister SCSI ASC/ASCQ and SCSI - * OpCode strings from the isense driver. - * - * Specialized driver deregistration routine for the isense driver. - */ -void -mpt_deregister_ascqops_strings(void) -{ - mpt_v_ASCQ_TablePtr = NULL; - mpt_ASCQ_TableSz = 0; - mpt_ScsiOpcodesPtr = NULL; - printk(KERN_INFO MYNAM ": English readable SCSI-3 strings disabled)-:\n"); - isense_idx = -1; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - EXPORT_SYMBOL(ioc_list); EXPORT_SYMBOL(mpt_proc_root_dir); EXPORT_SYMBOL(DmpService); @@ -5981,13 +5958,6 @@ EXPORT_SYMBOL(mpt_read_ioc_pg_3); EXPORT_SYMBOL(mpt_alloc_fw_memory); EXPORT_SYMBOL(mpt_free_fw_memory); - -EXPORT_SYMBOL(mpt_register_ascqops_strings); -EXPORT_SYMBOL(mpt_deregister_ascqops_strings); -EXPORT_SYMBOL(mpt_v_ASCQ_TablePtr); -EXPORT_SYMBOL(mpt_ASCQ_TableSz); -EXPORT_SYMBOL(mpt_ScsiOpcodesPtr); - static struct pci_driver mptbase_driver = { .name = "mptbase", diff -Nru a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h --- a/drivers/message/fusion/mptbase.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/message/fusion/mptbase.h 2004-09-06 16:37:51 -07:00 @@ -60,8 +60,6 @@ #include #include -#include "scsi3.h" /* SCSI defines */ - #include "lsi/mpi_type.h" #include "lsi/mpi.h" /* Fusion MPI(nterface) basic defs */ #include "lsi/mpi_ioc.h" /* Fusion MPT IOC(ontroller) defs */ @@ -85,8 +83,8 @@ #define COPYRIGHT "Copyright (c) 1999-2004 " MODULEAUTHOR #endif -#define MPT_LINUX_VERSION_COMMON "3.01.09" -#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.09" +#define MPT_LINUX_VERSION_COMMON "3.01.16" +#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.01.16" #define WHAT_MAGIC_STRING "@" "(" "#" ")" #define show_mptmod_ver(s,ver) \ @@ -320,17 +318,6 @@ struct _Q_ITEM *tail; } Q_TRACKER; -typedef struct _MPT_DONE_Q { - struct _MPT_DONE_Q *forw; - struct _MPT_DONE_Q *back; - void *argp; -} MPT_DONE_Q; - -typedef struct _DONE_Q_TRACKER { - MPT_DONE_Q *head; - MPT_DONE_Q *tail; -} DONE_Q_TRACKER; - /* * Chip-specific stuff... FC929 delineates break between * FC and Parallel SCSI parts. Do NOT re-order. @@ -403,6 +390,11 @@ void *tail; } ScsiCmndTracker; +/* VirtDevice negoFlags field */ +#define MPT_TARGET_NO_NEGO_WIDE 0x01 +#define MPT_TARGET_NO_NEGO_SYNC 0x02 +#define MPT_TARGET_NO_NEGO_QAS 0x04 +#define MPT_TAPE_NEGO_IDP 0x08 /* * VirtDevice - FC LUN device or SCSI target device @@ -420,8 +412,8 @@ u8 bus_id; u8 minSyncFactor; /* 0xFF is async */ u8 maxOffset; /* 0 if async */ - u8 maxWidth; /* 0 if narrow, 1 if wide*/ - u8 negoFlags; /* bit field, 0 if WDTR/SDTR/QAS allowed */ + u8 maxWidth; /* 0 if narrow, 1 if wide */ + u8 negoFlags; /* bit field, see above */ u8 raidVolume; /* set, if RAID Volume */ u8 type; /* byte 0 of Inquiry data */ u8 cflags; /* controller flags */ @@ -460,10 +452,6 @@ #define MPT_TARGET_FLAGS_VALID_56 0x10 #define MPT_TARGET_FLAGS_SAF_TE_ISSUED 0x20 -#define MPT_TARGET_NO_NEGO_WIDE 0x01 -#define MPT_TARGET_NO_NEGO_SYNC 0x02 -#define MPT_TARGET_NO_NEGO_QAS 0x04 - typedef struct _VirtDevTracker { struct _VirtDevice *head; struct _VirtDevice *tail; @@ -523,6 +511,7 @@ u8 target; /* target for reset */ void *tmPtr; struct timer_list TMtimer; /* timer function for this adapter */ + struct semaphore sem_ioc; } MPT_IOCTL; /* @@ -600,25 +589,30 @@ int alloc_total; u32 last_state; int active; - u8 *fifo_pool; /* dma pool for fifo's */ - dma_addr_t fifo_pool_dma; - int fifo_pool_sz; /* allocated size */ - u8 *chain_alloc; /* chain buffer alloc ptr */ - dma_addr_t chain_alloc_dma; - int chain_alloc_sz; - u8 *reply_alloc; /* Reply frames alloc ptr */ - dma_addr_t reply_alloc_dma; + u8 *alloc; /* frames alloc ptr */ + dma_addr_t alloc_dma; + u32 alloc_sz; MPT_FRAME_HDR *reply_frames; /* Reply msg frames - rounded up! */ - dma_addr_t reply_frames_dma; u32 reply_frames_low_dma; int reply_depth; /* Num Allocated reply frames */ int reply_sz; /* Reply frame size */ + int num_chain; /* Number of chain buffers */ + /* Pool of buffers for chaining. ReqToChain + * and ChainToChain track index of chain buffers. + * ChainBuffer (DMA) virt/phys addresses. + * FreeChainQ (lock) locking mechanisms. + */ + int *ReqToChain; + int *RequestNB; + int *ChainToChain; + u8 *ChainBuffer; + dma_addr_t ChainBufferDMA; + MPT_Q_TRACKER FreeChainQ; + spinlock_t FreeChainQlock; CHIP_TYPE chip_type; /* We (host driver) get to manage our own RequestQueue! */ - u8 *req_alloc; /* Request frames alloc ptr */ - dma_addr_t req_alloc_dma; - MPT_FRAME_HDR *req_frames; /* Request msg frames - rounded up! */ dma_addr_t req_frames_dma; + MPT_FRAME_HDR *req_frames; /* Request msg frames - rounded up! */ u32 req_frames_low_dma; int req_depth; /* Number of request frames */ int req_sz; /* Request frame size (bytes) */ @@ -661,6 +655,7 @@ #else u32 mfcnt; #endif + u32 NB_for_64_byte_frame; u32 hs_req[MPT_MAX_FRAME_SIZE/sizeof(u32)]; u16 hs_reply[MPT_MAX_FRAME_SIZE/sizeof(u16)]; IOCFactsReply_t facts; @@ -674,8 +669,10 @@ u8 FirstWhoInit; u8 upload_fw; /* If set, do a fw upload */ u8 reload_fw; /* Force a FW Reload on next reset */ - u8 pad1[5]; + u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ + u8 pad1[4]; struct list_head list; + struct net_device *netdev; } MPT_ADAPTER; @@ -757,10 +754,10 @@ #define dexitprintk(x) #endif -#ifdef MPT_DEBUG_RESET -#define drsprintk(x) printk x +#if defined MPT_DEBUG_FAIL || defined (MPT_DEBUG_SG) +#define dfailprintk(x) printk x #else -#define drsprintk(x) +#define dfailprintk(x) #endif #ifdef MPT_DEBUG_HANDSHAKE @@ -769,11 +766,34 @@ #define dhsprintk(x) #endif +#ifdef MPT_DEBUG_EVENTS +#define devtprintk(x) printk x +#else +#define devtprintk(x) +#endif + +#ifdef MPT_DEBUG_RESET +#define drsprintk(x) printk x +#else +#define drsprintk(x) +#endif + //#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME) #if defined(MPT_DEBUG_MSG_FRAME) #define dmfprintk(x) printk x +#define DBG_DUMP_REQUEST_FRAME(mfp) \ + { int i, n = 24; \ + u32 *m = (u32 *)(mfp); \ + for (i=0; i> 16; \ + printk("TM_REPLY MessageLength=%d:\n", n); \ + for (i=0; iid])) + if (down_trylock(&ioc->ioctl->sem_ioc)) rc = -EAGAIN; } else { - if (down_interruptible(&mptctl_syscall_sem_ioc[ioc->id])) + if (down_interruptible(&ioc->ioctl->sem_ioc)) rc = -ERESTARTSYS; } dctlprintk((KERN_INFO MYNAM "::mptctl_syscall_down return %d\n", rc)); @@ -445,7 +447,7 @@ mptctl_free_tm_flags(ioctl->ioc); del_timer(&ioctl->TMtimer); - mpt_free_msg_frame(mptctl_id, ioctl->ioc, mf); + mpt_free_msg_frame(ioctl->ioc, mf); ioctl->tmPtr = NULL; } @@ -482,7 +484,7 @@ spin_lock_irqsave(&ioc->FreeQlock, flags); - hd->tmState = TM_STATE_ERROR; + hd->tmState = TM_STATE_NONE; hd->tmPending = 0; spin_unlock_irqrestore(&ioc->FreeQlock, flags); @@ -520,7 +522,7 @@ if (ioctl && (ioctl->status & MPT_IOCTL_STATUS_TMTIMER_ACTIVE)){ ioctl->status &= ~MPT_IOCTL_STATUS_TMTIMER_ACTIVE; del_timer(&ioctl->TMtimer); - mpt_free_msg_frame(mptctl_id, ioc, ioctl->tmPtr); + mpt_free_msg_frame(ioc, ioctl->tmPtr); } } else { @@ -630,8 +632,7 @@ else ret = -EINVAL; - - up(&mptctl_syscall_sem_ioc[iocp->id]); + up(&iocp->ioctl->sem_ioc); return ret; } @@ -1807,7 +1808,6 @@ struct buflist bufOut; /* data Out buffer */ dma_addr_t dma_addr_in; dma_addr_t dma_addr_out; - int dir; /* PCI data direction */ int sgSize = 0; /* Num SG elements */ int iocnum, flagsLength; int sz, rc = 0; @@ -2117,9 +2117,9 @@ /* Set up the dataOut memory allocation */ if (karg.dataOutSize > 0) { - dir = PCI_DMA_TODEVICE; if (karg.dataInSize > 0) { flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT | + MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_DIRECTION | mpt_addr_size() ) << MPI_SGE_FLAGS_SHIFT; @@ -2158,7 +2158,6 @@ } if (karg.dataInSize > 0) { - dir = PCI_DMA_FROMDEVICE; flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; flagsLength |= karg.dataInSize; @@ -2196,6 +2195,7 @@ add_timer(&ioc->ioctl->timer); if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) { + DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf); rc = mpt_send_handshake_request(mptctl_id, ioc, sizeof(SCSITaskMgmt_t), (u32*)mf, CAN_SLEEP); if (rc == 0) { @@ -2206,7 +2206,7 @@ del_timer(&ioc->ioctl->timer); ioc->ioctl->status &= ~MPT_IOCTL_STATUS_TIMER_ACTIVE; ioc->ioctl->status |= MPT_IOCTL_STATUS_TM_FAILED; - mpt_free_msg_frame(mptctl_id, ioc, mf); + mpt_free_msg_frame(ioc, mf); } } else { mpt_put_msg_frame(mptctl_id, ioc, mf); @@ -2324,7 +2324,7 @@ * otherwise, failure occured after mf acquired. */ if (mf) - mpt_free_msg_frame(mptctl_id, ioc, mf); + mpt_free_msg_frame(ioc, mf); return rc; } @@ -2738,7 +2738,7 @@ ret = mptctl_do_fw_download(kfw.iocnum, kfw.bufp, kfw.fwlen); - up(&mptctl_syscall_sem_ioc[iocp->id]); + up(&iocp->ioctl->sem_ioc); return ret; } @@ -2792,55 +2792,91 @@ */ ret = mptctl_do_mpt_command (karg, &uarg->MF); - up(&mptctl_syscall_sem_ioc[iocp->id]); + up(&iocp->ioctl->sem_ioc); return ret; } #endif + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -int __init mptctl_init(void) +/* + * mptctl_probe - Installs ioctl devices per bus. + * @pdev: Pointer to pci_dev structure + * + * Returns 0 for success, non-zero for failure. + * + */ + +static int +mptctl_probe(struct pci_dev *pdev, const struct pci_device_id *id) { int err; - int i; - int where = 1; int sz; u8 *mem; - MPT_ADAPTER *ioc = NULL; - int iocnum; + MPT_ADAPTER *ioc = pci_get_drvdata(pdev); - show_mptmod_ver(my_NAME, my_VERSION); + /* + * Allocate and inite a MPT_IOCTL structure + */ + sz = sizeof (MPT_IOCTL); + mem = kmalloc(sz, GFP_KERNEL); + if (mem == NULL) { + err = -ENOMEM; + goto out_fail; + } - for (i=0; iioctl = (MPT_IOCTL *) mem; + ioc->ioctl->ioc = ioc; + init_timer (&ioc->ioctl->timer); + ioc->ioctl->timer.data = (unsigned long) ioc->ioctl; + ioc->ioctl->timer.function = mptctl_timer_expired; + init_timer (&ioc->ioctl->TMtimer); + ioc->ioctl->TMtimer.data = (unsigned long) ioc->ioctl; + ioc->ioctl->TMtimer.function = mptctl_timer_expired; + sema_init(&ioc->ioctl->sem_ioc, 1); + return 0; - ioc = NULL; - if (((iocnum = mpt_verify_adapter(i, &ioc)) < 0) || - (ioc == NULL)) { - continue; - } - else { - /* This adapter instance is found. - * Allocate and inite a MPT_IOCTL structure - */ - sz = sizeof (MPT_IOCTL); - mem = kmalloc(sz, GFP_KERNEL); - if (mem == NULL) { - err = -ENOMEM; - goto out_fail; - } - - memset(mem, 0, sz); - ioc->ioctl = (MPT_IOCTL *) mem; - ioc->ioctl->ioc = ioc; - init_timer (&ioc->ioctl->timer); - ioc->ioctl->timer.data = (unsigned long) ioc->ioctl; - ioc->ioctl->timer.function = mptctl_timer_expired; - init_timer (&ioc->ioctl->TMtimer); - ioc->ioctl->TMtimer.data = (unsigned long) ioc->ioctl; - ioc->ioctl->TMtimer.function = mptctl_timer_expired; - } +out_fail: + + mptctl_remove(pdev); + return err; +} + +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +/* + * mptctl_remove - Removed ioctl devices + * @pdev: Pointer to pci_dev structure + * + * + */ +static void +mptctl_remove(struct pci_dev *pdev) +{ + MPT_ADAPTER *ioc = pci_get_drvdata(pdev); + + kfree ( ioc->ioctl ); +} + +static struct mpt_pci_driver mptctl_driver = { + .probe = mptctl_probe, + .remove = mptctl_remove, +}; + +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +static int __init mptctl_init(void) +{ + int err; + int where = 1; + + show_mptmod_ver(my_NAME, my_VERSION); + + if(mpt_device_driver_register(&mptctl_driver, + MPTCTL_DRIVER) != 0 ) { + dprintk((KERN_INFO MYNAM + ": failed to register dd callbacks\n")); } #ifdef CONFIG_COMPAT @@ -2922,29 +2958,14 @@ unregister_ioctl32_conversion(HP_GETTARGETINFO); #endif - for (i=0; iioctl) { - kfree ( ioc->ioctl ); - ioc->ioctl = NULL; - } - } - } + mpt_device_driver_deregister(MPTCTL_DRIVER); + return err; } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -void mptctl_exit(void) +static void mptctl_exit(void) { - int i; - MPT_ADAPTER *ioc; - int iocnum; - misc_deregister(&mptctl_miscdev); printk(KERN_INFO MYNAM ": Deregistered /dev/%s @ (major,minor=%d,%d)\n", mptctl_miscdev.name, MISC_MAJOR, mptctl_miscdev.minor); @@ -2957,6 +2978,8 @@ mpt_deregister(mptctl_id); printk(KERN_INFO MYNAM ": Deregistered from Fusion MPT base driver\n"); + mpt_device_driver_deregister(MPTCTL_DRIVER); + #ifdef CONFIG_COMPAT unregister_ioctl32_conversion(MPTIOCINFO); unregister_ioctl32_conversion(MPTIOCINFO1); @@ -2973,20 +2996,6 @@ unregister_ioctl32_conversion(HP_GETTARGETINFO); #endif - /* Free allocated memory */ - for (i=0; iioctl) { - kfree ( ioc->ioctl ); - ioc->ioctl = NULL; - } - } - } } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ diff -Nru a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c --- a/drivers/message/fusion/mptlan.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/message/fusion/mptlan.c 2004-09-06 16:37:52 -07:00 @@ -177,11 +177,9 @@ static u32 max_buckets_out = 127; static u32 tx_max_out_p = 127 - 16; -static struct net_device *mpt_landev[MPT_MAX_ADAPTERS+1]; - #ifdef QLOGIC_NAA_WORKAROUND static struct NAA_Hosed *mpt_bad_naa = NULL; -rwlock_t bad_naa_lock; +rwlock_t bad_naa_lock = RW_LOCK_UNLOCKED; #endif /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -203,7 +201,7 @@ static int lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply) { - struct net_device *dev = mpt_landev[ioc->id]; + struct net_device *dev = ioc->netdev; int FreeReqFrame = 0; dioprintk((KERN_INFO MYNAM ": %s/%s: Got reply.\n", @@ -336,7 +334,7 @@ static int mpt_lan_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) { - struct net_device *dev = mpt_landev[ioc->id]; + struct net_device *dev = ioc->netdev; struct mpt_lan_priv *priv = netdev_priv(dev); dlprintk((KERN_INFO MYNAM ": IOC %s_reset routed to LAN driver!\n", @@ -1334,7 +1332,7 @@ if (pSimple == NULL) { /**/ printk (KERN_WARNING MYNAM "/%s: No buckets posted\n", /**/ __FUNCTION__); - mpt_free_msg_frame(LanCtx, mpt_dev, mf); + mpt_free_msg_frame(mpt_dev, mf); goto out; } @@ -1451,20 +1449,74 @@ return dev; } -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -static int __init mpt_lan_init (void) +static int +mptlan_probe(struct pci_dev *pdev, const struct pci_device_id *id) { - struct net_device *dev; - MPT_ADAPTER *p; - int i, j; + MPT_ADAPTER *ioc = pci_get_drvdata(pdev); + struct net_device *dev; + int i; + + for (i = 0; i < ioc->facts.NumberOfPorts; i++) { + printk(KERN_INFO MYNAM ": %s: PortNum=%x, " + "ProtocolFlags=%02Xh (%c%c%c%c)\n", + ioc->name, ioc->pfacts[i].PortNumber, + ioc->pfacts[i].ProtocolFlags, + MPT_PROTOCOL_FLAGS_c_c_c_c( + ioc->pfacts[i].ProtocolFlags)); + + if (!(ioc->pfacts[i].ProtocolFlags & + MPI_PORTFACTS_PROTOCOL_LAN)) { + printk(KERN_INFO MYNAM ": %s: Hmmm... LAN protocol " + "seems to be disabled on this adapter port!\n", + ioc->name); + continue; + } - show_mptmod_ver(LANAME, LANVER); + dev = mpt_register_lan_device(ioc, i); + if (!dev) { + printk(KERN_ERR MYNAM ": %s: Unable to register " + "port%d as a LAN device\n", ioc->name, + ioc->pfacts[i].PortNumber); + continue; + } + + printk(KERN_INFO MYNAM ": %s: Fusion MPT LAN device " + "registered as '%s'\n", ioc->name, dev->name); + printk(KERN_INFO MYNAM ": %s/%s: " + "LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n", + IOC_AND_NETDEV_NAMES_s_s(dev), + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); + + ioc->netdev = dev; -#ifdef QLOGIC_NAA_WORKAROUND - /* Init the global r/w lock for the bad_naa list. We want to do this - before any boards are initialized and may be used. */ - rwlock_init(&bad_naa_lock); -#endif + return 0; + } + + return -ENODEV; +} + +static void +mptlan_remove(struct pci_dev *pdev) +{ + MPT_ADAPTER *ioc = pci_get_drvdata(pdev); + struct net_device *dev = ioc->netdev; + + if(dev != NULL) { + unregister_netdev(dev); + free_netdev(dev); + } +} + +static struct mpt_pci_driver mptlan_driver = { + .probe = mptlan_probe, + .remove = mptlan_remove, +}; + +static int __init mpt_lan_init (void) +{ + show_mptmod_ver(LANAME, LANVER); if ((LanCtx = mpt_register(lan_reply, MPTLAN_DRIVER)) <= 0) { printk (KERN_ERR MYNAM ": Failed to register with MPT base driver\n"); @@ -1476,87 +1528,31 @@ dlprintk((KERN_INFO MYNAM ": assigned context of %d\n", LanCtx)); - if (mpt_reset_register(LanCtx, mpt_lan_ioc_reset) == 0) { - dlprintk((KERN_INFO MYNAM ": Registered for IOC reset notifications\n")); - } else { + if (mpt_reset_register(LanCtx, mpt_lan_ioc_reset)) { printk(KERN_ERR MYNAM ": Eieee! unable to register a reset " "handler with mptbase! The world is at an end! " "Everything is fading to black! Goodbye.\n"); return -EBUSY; } - for (j = 0; j < MPT_MAX_ADAPTERS; j++) { - mpt_landev[j] = NULL; - } - - list_for_each_entry(p, &ioc_list, list) { - for (i = 0; i < p->facts.NumberOfPorts; i++) { - printk (KERN_INFO MYNAM ": %s: PortNum=%x, ProtocolFlags=%02Xh (%c%c%c%c)\n", - p->name, - p->pfacts[i].PortNumber, - p->pfacts[i].ProtocolFlags, - MPT_PROTOCOL_FLAGS_c_c_c_c(p->pfacts[i].ProtocolFlags)); - - if (!(p->pfacts[i].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) { - printk (KERN_INFO MYNAM ": %s: Hmmm... LAN protocol seems to be disabled on this adapter port!\n", - p->name); - continue; - } - - dev = mpt_register_lan_device (p, i); - if (!dev) { - printk (KERN_ERR MYNAM ": %s: Unable to register port%d as a LAN device\n", - p->name, - p->pfacts[i].PortNumber); - } - printk (KERN_INFO MYNAM ": %s: Fusion MPT LAN device registered as '%s'\n", - p->name, dev->name); - printk (KERN_INFO MYNAM ": %s/%s: LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n", - IOC_AND_NETDEV_NAMES_s_s(dev), - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); -// printk (KERN_INFO MYNAM ": %s/%s: Max_TX_outstanding = %d\n", -// IOC_AND_NETDEV_NAMES_s_s(dev), -// NETDEV_TO_LANPRIV_PTR(dev)->tx_max_out); - j = p->id; - mpt_landev[j] = dev; - dlprintk((KERN_INFO MYNAM "/init: dev_addr=%p, mpt_landev[%d]=%p\n", - dev, j, mpt_landev[j])); - - } - } - + dlprintk((KERN_INFO MYNAM ": Registered for IOC reset notifications\n")); + + if (mpt_device_driver_register(&mptlan_driver, MPTLAN_DRIVER)) + dprintk((KERN_INFO MYNAM ": failed to register dd callbacks\n")); return 0; } -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ static void __exit mpt_lan_exit(void) { - int i; - + mpt_device_driver_deregister(MPTLAN_DRIVER); mpt_reset_deregister(LanCtx); - for (i = 0; mpt_landev[i] != NULL; i++) { - struct net_device *dev = mpt_landev[i]; - - printk (KERN_INFO ": %s/%s: Fusion MPT LAN device unregistered\n", - IOC_AND_NETDEV_NAMES_s_s(dev)); - unregister_netdev(dev); - free_netdev(dev); - mpt_landev[i] = NULL; - } - if (LanCtx >= 0) { mpt_deregister(LanCtx); LanCtx = -1; mpt_lan_index = 0; } - - /* deregister any send/receive handler structs. I2Oism? */ } - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ module_init(mpt_lan_init); module_exit(mpt_lan_exit); diff -Nru a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c --- a/drivers/message/fusion/mptscsih.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/message/fusion/mptscsih.c 2004-09-06 16:37:55 -07:00 @@ -86,7 +86,6 @@ #include "mptbase.h" #include "mptscsih.h" -#include "isense.h" /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #define my_NAME "Fusion MPT SCSI Host driver" @@ -100,6 +99,7 @@ /* Set string for command line args from insmod */ #ifdef MODULE char *mptscsih = NULL; +MODULE_PARM(mptscsih, "s"); #endif /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -114,6 +114,7 @@ #define MPT_SCANDV_SOME_ERROR (0x00000004) #define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008) #define MPT_SCANDV_ISSUE_SENSE (0x00000010) +#define MPT_SCANDV_FALLBACK (0x00000020) #define MPT_SCANDV_MAX_RETRIES (10) @@ -161,15 +162,12 @@ static void mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq); static int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); -static int mptscsih_AddSGE(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt, +static int mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, SCSIIORequest_t *pReq, int req_idx); -static void mptscsih_freeChainBuffers(MPT_SCSI_HOST *hd, int req_idx); -static int mptscsih_initChainBuffers (MPT_SCSI_HOST *hd, int init); +static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx); static void copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply); static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd); static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); -static MPT_FRAME_HDR *mptscsih_search_pendingQ(MPT_SCSI_HOST *hd, int scpnt_idx); -static void post_pendingQ_commands(MPT_SCSI_HOST *hd); static int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout, int sleepFlag); static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout, int sleepFlag); @@ -178,7 +176,7 @@ static int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); static void mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus_id, int target_id, u8 lun, char *data, int dlen); -void mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56); +static void mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56); static void mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq); static void mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags); static void mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int target_id); @@ -246,6 +244,7 @@ static DECLARE_WAIT_QUEUE_HEAD (scandv_waitq); static int scandv_wait_done = 1; + /* Driver default setup */ static struct mptscsih_driver_setup @@ -323,44 +322,47 @@ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* - * mptscsih_getFreeChainBuffes - Function to get a free chain + * mptscsih_getFreeChainBuffer - Function to get a free chain * from the MPT_SCSI_HOST FreeChainQ. - * @hd: Pointer to the MPT_SCSI_HOST instance + * @ioc: Pointer to MPT_ADAPTER structure * @req_idx: Index of the SCSI IO request frame. (output) * * return SUCCESS or FAILED */ static inline int -mptscsih_getFreeChainBuffer(MPT_SCSI_HOST *hd, int *retIndex) +mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex) { MPT_FRAME_HDR *chainBuf; unsigned long flags; int rc; int chain_idx; - spin_lock_irqsave(&hd->ioc->FreeQlock, flags); - if (!Q_IS_EMPTY(&hd->FreeChainQ)) { + dsgprintk((MYIOC_s_INFO_FMT "getFreeChainBuffer called\n", + ioc->name)); + spin_lock_irqsave(&ioc->FreeQlock, flags); + if (!Q_IS_EMPTY(&ioc->FreeChainQ)) { int offset; - chainBuf = hd->FreeChainQ.head; + chainBuf = ioc->FreeChainQ.head; Q_DEL_ITEM(&chainBuf->u.frame.linkage); - offset = (u8 *)chainBuf - (u8 *)hd->ChainBuffer; - chain_idx = offset / hd->ioc->req_sz; + offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer; + chain_idx = offset / ioc->req_sz; rc = SUCCESS; + dsgprintk((MYIOC_s_INFO_FMT "getFreeChainBuffer (index %d), got buf=%p\n", + ioc->name, *retIndex, chainBuf)); } else { rc = FAILED; chain_idx = MPT_HOST_NO_CHAIN; + dfailprintk((MYIOC_s_ERR_FMT "getFreeChainBuffer failed\n", + ioc->name)); } - spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); + spin_unlock_irqrestore(&ioc->FreeQlock, flags); *retIndex = chain_idx; - dsgprintk((MYIOC_s_INFO_FMT "getFreeChainBuffer (index %d), got buf=%p\n", - hd->ioc->name, *retIndex, chainBuf)); - return rc; } /* mptscsih_getFreeChainBuffer() */ @@ -368,14 +370,14 @@ /* * mptscsih_AddSGE - Add a SGE (plus chain buffers) to the * SCSIIORequest_t Message Frame. - * @hd: Pointer to MPT_SCSI_HOST structure + * @ioc: Pointer to MPT_ADAPTER structure * @SCpnt: Pointer to scsi_cmnd structure * @pReq: Pointer to SCSIIORequest_t structure * * Returns ... */ static int -mptscsih_AddSGE(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt, +mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, SCSIIORequest_t *pReq, int req_idx) { char *psge; @@ -391,6 +393,7 @@ int newIndex; int ii; dma_addr_t v2; + u32 RequestNB; sgdir = le32_to_cpu(pReq->Control) & MPI_SCSIIO_CONTROL_DATADIRECTION_MASK; if (sgdir == MPI_SCSIIO_CONTROL_WRITE) { @@ -400,25 +403,25 @@ } psge = (char *) &pReq->SGL; - frm_sz = hd->ioc->req_sz; + frm_sz = ioc->req_sz; /* Map the data portion, if any. * sges_left = 0 if no data transfer. */ if ( (sges_left = SCpnt->use_sg) ) { - sges_left = pci_map_sg(hd->ioc->pcidev, + sges_left = pci_map_sg(ioc->pcidev, (struct scatterlist *) SCpnt->request_buffer, SCpnt->use_sg, SCpnt->sc_data_direction); if (sges_left == 0) return FAILED; } else if (SCpnt->request_bufflen) { - SCpnt->SCp.dma_handle = pci_map_single(hd->ioc->pcidev, + SCpnt->SCp.dma_handle = pci_map_single(ioc->pcidev, SCpnt->request_buffer, SCpnt->request_bufflen, SCpnt->sc_data_direction); dsgprintk((MYIOC_s_INFO_FMT "SG: non-SG for %p, len=%d\n", - hd->ioc->name, SCpnt, SCpnt->request_bufflen)); + ioc->name, SCpnt, SCpnt->request_bufflen)); mptscsih_add_sge((char *) &pReq->SGL, 0xD1000000|MPT_SGE_FLAGS_ADDRESSING|sgdir|SCpnt->request_bufflen, SCpnt->SCp.dma_handle); @@ -493,12 +496,16 @@ * Update the chain element * Offset and Length fields. */ - mptscsih_add_chain((char *)chainSge, 0, sgeOffset, hd->ChainBufferDMA + chain_dma_off); + mptscsih_add_chain((char *)chainSge, 0, sgeOffset, ioc->ChainBufferDMA + chain_dma_off); } else { /* The current buffer is the original MF * and there is no Chain buffer. */ pReq->ChainOffset = 0; + RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03; + dsgprintk((MYIOC_s_ERR_FMT + "Single Buffer RequestNB=%x, sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset)); + ioc->RequestNB[req_idx] = RequestNB; } } else { /* At least one chain buffer is needed. @@ -513,7 +520,7 @@ */ dsgprintk((MYIOC_s_INFO_FMT "SG: Chain Required! sg done %d\n", - hd->ioc->name, sg_done)); + ioc->name, sg_done)); /* Set LAST_ELEMENT flag for last non-chain element * in the buffer. Since psge points at the NEXT @@ -537,13 +544,16 @@ */ u8 nextChain = (u8) (sgeOffset >> 2); sgeOffset += (sizeof(u32) + sizeof(dma_addr_t)); - mptscsih_add_chain((char *)chainSge, nextChain, sgeOffset, hd->ChainBufferDMA + chain_dma_off); + mptscsih_add_chain((char *)chainSge, nextChain, sgeOffset, ioc->ChainBufferDMA + chain_dma_off); } else { /* The original MF buffer requires a chain buffer - * set the offset. * Last element in this MF is a chain element. */ pReq->ChainOffset = (u8) (sgeOffset >> 2); + RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03; + dsgprintk((MYIOC_s_ERR_FMT "Chain Buffer Needed, RequestNB=%x sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset)); + ioc->RequestNB[req_idx] = RequestNB; } sges_left -= sg_done; @@ -552,19 +562,22 @@ /* NOTE: psge points to the beginning of the chain element * in current buffer. Get a chain buffer. */ - if ((mptscsih_getFreeChainBuffer(hd, &newIndex)) == FAILED) + dsgprintk((MYIOC_s_INFO_FMT + "calling getFreeChainBuffer SCSI cmd=%02x (%p)\n", + ioc->name, pReq->CDB[0], SCpnt)); + if ((mptscsih_getFreeChainBuffer(ioc, &newIndex)) == FAILED) return FAILED; /* Update the tracking arrays. * If chainSge == NULL, update ReqToChain, else ChainToChain */ if (chainSge) { - hd->ChainToChain[chain_idx] = newIndex; + ioc->ChainToChain[chain_idx] = newIndex; } else { - hd->ReqToChain[req_idx] = newIndex; + ioc->ReqToChain[req_idx] = newIndex; } chain_idx = newIndex; - chain_dma_off = hd->ioc->req_sz * chain_idx; + chain_dma_off = ioc->req_sz * chain_idx; /* Populate the chainSGE for the current buffer. * - Set chain buffer pointer to psge and fill @@ -576,7 +589,7 @@ /* Start the SGE for the next buffer */ - psge = (char *) (hd->ChainBuffer + chain_dma_off); + psge = (char *) (ioc->ChainBuffer + chain_dma_off); sgeOffset = 0; sg_done = 0; @@ -631,7 +644,7 @@ printk(MYIOC_s_ERR_FMT "NULL ScsiCmd ptr!\n", ioc->name); - mptscsih_freeChainBuffers(hd, req_idx); + mptscsih_freeChainBuffers(ioc, req_idx); return 1; } @@ -674,14 +687,15 @@ status = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK; scsi_state = pScsiReply->SCSIState; + scsi_status = pScsiReply->SCSIStatus; + xfer_cnt = le32_to_cpu(pScsiReply->TransferCount); - dprintk((KERN_NOTICE " Uh-Oh! (%d:%d:%d) mf=%p, mr=%p, sc=%p\n", + dreplyprintk((KERN_NOTICE " Reply (%d:%d:%d) mf=%p, mr=%p, sc=%p\n", ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1], mf, mr, sc)); - dprintk((KERN_NOTICE " IOCStatus=%04xh, SCSIState=%02xh" - ", SCSIStatus=%02xh, IOCLogInfo=%08xh\n", - status, scsi_state, pScsiReply->SCSIStatus, - le32_to_cpu(pScsiReply->IOCLogInfo))); + dreplyprintk((KERN_NOTICE "IOCStatus=%04xh SCSIState=%02xh" + " SCSIStatus=%02xh xfer_cnt=%08xh\n", + status, scsi_state, scsi_status, xfer_cnt)); if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) copy_sense_data(sc, hd, mf, pScsiReply); @@ -701,7 +715,7 @@ * But not: DID_BUS_BUSY lest one risk * killing interrupt handler:-( */ - sc->result = STS_BUSY; + sc->result = SAM_STAT_BUSY; break; case MPI_IOCSTATUS_SCSI_INVALID_BUS: /* 0x0041 */ @@ -731,13 +745,22 @@ break; case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH: /* 0x0049 */ - sc->result = (DRIVER_SENSE << 24) | (DID_OK << 16) | + sc->resid = sc->request_bufflen - xfer_cnt; + if ( xfer_cnt >= sc->underflow ) { + /* Sufficient data transfer occurred */ + sc->result = (DID_OK << 16) | scsi_status; + } else if ( xfer_cnt == 0 ) { + /* A CRC Error causes this condition; retry */ + sc->result = (DRIVER_SENSE << 24) | (DID_OK << 16) | (CHECK_CONDITION << 1); - sc->sense_buffer[0] = 0x70; - sc->sense_buffer[2] = NO_SENSE; - sc->sense_buffer[12] = 0; - sc->sense_buffer[13] = 0; - dprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target)); + sc->sense_buffer[0] = 0x70; + sc->sense_buffer[2] = NO_SENSE; + sc->sense_buffer[12] = 0; + sc->sense_buffer[13] = 0; + } else { + sc->result = DID_SOFT_ERROR << 16; + } + dreplyprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target)); break; case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */ @@ -745,9 +768,7 @@ * Do upfront check for valid SenseData and give it * precedence! */ - scsi_status = pScsiReply->SCSIStatus; sc->result = (DID_OK << 16) | scsi_status; - xfer_cnt = le32_to_cpu(pScsiReply->TransferCount); if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { /* Have already saved the status and sense data */ @@ -769,12 +790,12 @@ /* Give report and update residual count. */ - dprintk((KERN_NOTICE " sc->underflow={report ERR if < %02xh bytes xfer'd}\n", + dreplyprintk((KERN_NOTICE " sc->underflow={report ERR if < %02xh bytes xfer'd}\n", sc->underflow)); - dprintk((KERN_NOTICE " ActBytesXferd=%02xh\n", xfer_cnt)); + dreplyprintk((KERN_NOTICE " ActBytesXferd=%02xh\n", xfer_cnt)); sc->resid = sc->request_bufflen - xfer_cnt; - dprintk((KERN_NOTICE " SET sc->resid=%02xh\n", sc->resid)); + dreplyprintk((KERN_NOTICE " SET sc->resid=%02xh\n", sc->resid)); /* Report Queue Full */ @@ -785,7 +806,8 @@ case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ - sc->result = (DID_OK << 16) | pScsiReply->SCSIStatus; + scsi_status = pScsiReply->SCSIStatus; + sc->result = (DID_OK << 16) | scsi_status; if (scsi_state == 0) { ; } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { @@ -851,7 +873,7 @@ } /* switch(status) */ - dprintk((KERN_NOTICE " sc->result set to %08xh\n", sc->result)); + dreplyprintk((KERN_NOTICE " sc->result is %08xh\n", sc->result)); } /* end of address reply case */ /* Unmap the DMA buffers, if any. */ @@ -868,88 +890,10 @@ sc->scsi_done(sc); /* Issue the command callback */ /* Free Chain buffers */ - mptscsih_freeChainBuffers(hd, req_idx); + mptscsih_freeChainBuffers(ioc, req_idx); return 1; } -/* - * Flush all commands on the doneQ. - * Lock Q when deleting/adding members - * Lock io_request_lock for OS callback. - */ -static void -flush_doneQ(MPT_SCSI_HOST *hd) -{ - MPT_DONE_Q *buffer; - struct scsi_cmnd *SCpnt; - unsigned long flags; - - /* Flush the doneQ. - */ - dtmprintk((KERN_INFO MYNAM ": flush_doneQ called\n")); - while (1) { - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (Q_IS_EMPTY(&hd->doneQ)) { - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - break; - } - - buffer = hd->doneQ.head; - /* Delete from Q - */ - Q_DEL_ITEM(buffer); - - /* Set the struct scsi_cmnd pointer - */ - SCpnt = (struct scsi_cmnd *) buffer->argp; - buffer->argp = NULL; - - /* Add to the freeQ - */ - Q_ADD_TAIL(&hd->freeQ.head, buffer, MPT_DONE_Q); - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - - /* Do the OS callback. - */ - SCpnt->scsi_done(SCpnt); - } - - return; -} - -/* - * Search the doneQ for a specific command. If found, delete from Q. - * Calling function will finish processing. - */ -static void -search_doneQ_for_cmd(MPT_SCSI_HOST *hd, struct scsi_cmnd *SCpnt) -{ - unsigned long flags; - MPT_DONE_Q *buffer; - - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (!Q_IS_EMPTY(&hd->doneQ)) { - buffer = hd->doneQ.head; - do { - struct scsi_cmnd *sc = (struct scsi_cmnd *) buffer->argp; - if (SCpnt == sc) { - Q_DEL_ITEM(buffer); - SCpnt->result = sc->result; - - /* Set the struct scsi_cmnd pointer - */ - buffer->argp = NULL; - - /* Add to the freeQ - */ - Q_ADD_TAIL(&hd->freeQ.head, buffer, MPT_DONE_Q); - break; - } - } while ((buffer = buffer->forw) != (MPT_DONE_Q *) &hd->doneQ); - } - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - return; -} /* * mptscsih_flush_running_cmds - For each command found, search @@ -964,12 +908,11 @@ static void mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd) { + MPT_ADAPTER *ioc = hd->ioc; struct scsi_cmnd *SCpnt; MPT_FRAME_HDR *mf; - MPT_DONE_Q *buffer; int ii; - int max = hd->ioc->req_depth; - unsigned long flags; + int max = ioc->req_depth; dprintk((KERN_INFO MYNAM ": flush_ScsiLookup called\n")); for (ii= 0; ii < max; ii++) { @@ -978,16 +921,11 @@ /* Command found. */ - /* Search pendingQ, if found, - * delete from Q. - */ - mptscsih_search_pendingQ(hd, ii); - /* Null ScsiLookup index */ hd->ScsiLookup[ii] = NULL; - mf = MPT_INDEX_2_MFPTR(hd->ioc, ii); + mf = MPT_INDEX_2_MFPTR(ioc, ii); dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n", mf, SCpnt)); @@ -997,12 +935,12 @@ */ if (scsi_device_online(SCpnt->device)) { if (SCpnt->use_sg) { - pci_unmap_sg(hd->ioc->pcidev, + pci_unmap_sg(ioc->pcidev, (struct scatterlist *) SCpnt->request_buffer, SCpnt->use_sg, SCpnt->sc_data_direction); } else if (SCpnt->request_bufflen) { - pci_unmap_single(hd->ioc->pcidev, + pci_unmap_single(ioc->pcidev, SCpnt->SCp.dma_handle, SCpnt->request_bufflen, SCpnt->sc_data_direction); @@ -1012,37 +950,12 @@ SCpnt->host_scribble = NULL; /* Free Chain buffers */ - mptscsih_freeChainBuffers(hd, ii); + mptscsih_freeChainBuffers(ioc, ii); /* Free Message frames */ - mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, mf); - -#if 1 - /* Post to doneQ, do not reply until POST phase - * of reset handler....prevents new commands from - * being queued. - */ - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (!Q_IS_EMPTY(&hd->freeQ)) { - buffer = hd->freeQ.head; - Q_DEL_ITEM(buffer); - - /* Set the struct scsi_cmnd pointer - */ - buffer->argp = (void *)SCpnt; + mpt_free_msg_frame(ioc, mf); - /* Add to the doneQ - */ - Q_ADD_TAIL(&hd->doneQ.head, buffer, MPT_DONE_Q); - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - } else { - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - SCpnt->scsi_done(SCpnt); - } -#else SCpnt->scsi_done(SCpnt); /* Issue the command callback */ -#endif - } } @@ -1087,8 +1000,8 @@ /* Cleanup */ hd->ScsiLookup[ii] = NULL; - mptscsih_freeChainBuffers(hd, ii); - mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, (MPT_FRAME_HDR *)mf); + mptscsih_freeChainBuffers(hd->ioc, ii); + mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf); } } @@ -1097,111 +1010,6 @@ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* - * mptscsih_initChainBuffers - Allocate memory for and initialize - * chain buffers, chain buffer control arrays and spinlock. - * @hd: Pointer to MPT_SCSI_HOST structure - * @init: If set, initialize the spin lock. - */ -static int -mptscsih_initChainBuffers (MPT_SCSI_HOST *hd, int init) -{ - MPT_FRAME_HDR *chain; - u8 *mem; - unsigned long flags; - int sz, ii, num_chain; - int scale, num_sge; - - /* chain buffer allocation done from PrimeIocFifos */ - if (hd->ioc->fifo_pool == NULL) - return -1; - - hd->ChainBuffer = hd->ioc->chain_alloc; - hd->ChainBufferDMA = hd->ioc->chain_alloc_dma; - - dprintk((KERN_INFO " ChainBuffer @ %p(%p), sz=%d\n", - hd->ChainBuffer, (void *)(ulong)hd->ChainBufferDMA, hd->ioc->chain_alloc_sz)); - - /* ReqToChain size must equal the req_depth - * index = req_idx - */ - if (hd->ReqToChain == NULL) { - sz = hd->ioc->req_depth * sizeof(int); - mem = kmalloc(sz, GFP_ATOMIC); - if (mem == NULL) - return -1; - - hd->ReqToChain = (int *) mem; - } - for (ii = 0; ii < hd->ioc->req_depth; ii++) - hd->ReqToChain[ii] = MPT_HOST_NO_CHAIN; - - /* ChainToChain size must equal the total number - * of chain buffers to be allocated. - * index = chain_idx - * - * Calculate the number of chain buffers needed(plus 1) per I/O - * then multiply the the maximum number of simultaneous cmds - * - * num_sge = num sge in request frame + last chain buffer - * scale = num sge per chain buffer if no chain element - */ - scale = hd->ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32)); - if (sizeof(dma_addr_t) == sizeof(u64)) - num_sge = scale + (hd->ioc->req_sz - 60) / (sizeof(dma_addr_t) + sizeof(u32)); - else - num_sge = 1+ scale + (hd->ioc->req_sz - 64) / (sizeof(dma_addr_t) + sizeof(u32)); - - num_chain = 1; - while (hd->max_sge - num_sge > 0) { - num_chain++; - num_sge += (scale - 1); - } - num_chain++; - - if ((int) hd->ioc->chip_type > (int) FC929) - num_chain *= MPT_SCSI_CAN_QUEUE; - else - num_chain *= MPT_FC_CAN_QUEUE; - - hd->num_chain = num_chain; - - sz = num_chain * sizeof(int); - if (hd->ChainToChain == NULL) { - mem = kmalloc(sz, GFP_ATOMIC); - if (mem == NULL) - return -1; - - hd->ChainToChain = (int *) mem; - } else { - mem = (u8 *) hd->ChainToChain; - } - memset(mem, 0xFF, sz); - - - /* Initialize the free chain Q. - */ - if (init) { - spin_lock_init(&hd->FreeChainQlock); - } - - spin_lock_irqsave (&hd->FreeChainQlock, flags); - Q_INIT(&hd->FreeChainQ, MPT_FRAME_HDR); - - /* Post the chain buffers to the FreeChainQ. - */ - mem = (u8 *)hd->ChainBuffer; - for (ii=0; ii < num_chain; ii++) { - chain = (MPT_FRAME_HDR *) mem; - Q_ADD_TAIL(&hd->FreeChainQ.head, &chain->u.frame.linkage, MPT_FRAME_HDR); - mem += hd->ioc->req_sz; - } - spin_unlock_irqrestore(&hd->FreeChainQlock, flags); - - return 0; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* * Hack! It might be nice to report if a device is returning QUEUE_FULL * but maybe not each and every time... */ @@ -1254,7 +1062,6 @@ struct Scsi_Host *sh; MPT_SCSI_HOST *hd; MPT_ADAPTER *ioc = pci_get_drvdata(pdev); - MPT_DONE_Q *freedoneQ; unsigned long flags; int sz, ii; int numSGE = 0; @@ -1386,7 +1193,6 @@ hd = (MPT_SCSI_HOST *) sh->hostdata; hd->ioc = ioc; - hd->max_sge = sh->sg_tablesize; if ((int)ioc->chip_type > (int)FC929) hd->is_spi = 1; @@ -1399,7 +1205,7 @@ /* SCSI needs scsi_cmnd lookup table! * (with size equal to req_depth*PtrSz!) */ - sz = hd->ioc->req_depth * sizeof(void *); + sz = ioc->req_depth * sizeof(void *); mem = kmalloc(sz, GFP_ATOMIC); if (mem == NULL) { error = -ENOMEM; @@ -1412,37 +1218,6 @@ dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n", ioc->name, hd->ScsiLookup, sz)); - if (mptscsih_initChainBuffers(hd, 1) < 0) { - error = -EINVAL; - goto mptscsih_probe_failed; - } - - /* Allocate memory for free and doneQ's - */ - sz = sh->can_queue * sizeof(MPT_DONE_Q); - mem = kmalloc(sz, GFP_ATOMIC); - if (mem == NULL) { - error = -ENOMEM; - goto mptscsih_probe_failed; - } - - memset(mem, 0xFF, sz); - hd->memQ = mem; - - /* Initialize the free, done and pending Qs. - */ - Q_INIT(&hd->freeQ, MPT_DONE_Q); - Q_INIT(&hd->doneQ, MPT_DONE_Q); - Q_INIT(&hd->pendingQ, MPT_DONE_Q); - spin_lock_init(&hd->freedoneQlock); - - mem = hd->memQ; - for (ii=0; ii < sh->can_queue; ii++) { - freedoneQ = (MPT_DONE_Q *) mem; - Q_ADD_TAIL(&hd->freeQ.head, freedoneQ, MPT_DONE_Q); - mem += sizeof(MPT_DONE_Q); - } - /* Initialize this Scsi_Host * internal task Q. */ @@ -1474,8 +1249,7 @@ hd->resetPending = 0; hd->abortSCpnt = NULL; hd->tmPtr = NULL; - hd->numTMrequests = 0; - + /* Clear the pointer used to store * single-threaded commands, i.e., those * issued during a bus scan, dv and @@ -1500,10 +1274,10 @@ /* ioc->sh = sh; */ #ifdef MPTSCSIH_DBG_TIMEOUT - hd->ioc->timeout_hard = 0; - hd->ioc->timeout_delta = 30 * HZ; - hd->ioc->timeout_maxcnt = 0; - hd->ioc->timeout_cnt = 0; + ioc->timeout_hard = 0; + ioc->timeout_delta = 30 * HZ; + ioc->timeout_maxcnt = 0; + ioc->timeout_cnt = 0; for (ii=0; ii < 8; ii++) foo_to[ii] = NULL; #endif @@ -1511,47 +1285,41 @@ /* Update with the driver setup * values. */ - if (hd->ioc->spi_data.maxBusWidth > + if (ioc->spi_data.maxBusWidth > driver_setup.max_width) { - hd->ioc->spi_data.maxBusWidth = + ioc->spi_data.maxBusWidth = driver_setup.max_width; } - if (hd->ioc->spi_data.minSyncFactor < + if (ioc->spi_data.minSyncFactor < driver_setup.min_sync_fac) { - hd->ioc->spi_data.minSyncFactor = + ioc->spi_data.minSyncFactor = driver_setup.min_sync_fac; } - if (hd->ioc->spi_data.minSyncFactor == MPT_ASYNC) { - hd->ioc->spi_data.maxSyncOffset = 0; + if (ioc->spi_data.minSyncFactor == MPT_ASYNC) { + ioc->spi_data.maxSyncOffset = 0; } - hd->ioc->spi_data.Saf_Te = driver_setup.saf_te; + ioc->spi_data.Saf_Te = driver_setup.saf_te; hd->negoNvram = 0; #ifndef MPTSCSIH_ENABLE_DOMAIN_VALIDATION hd->negoNvram = MPT_SCSICFG_USE_NVRAM; #endif - if (driver_setup.dv == 0) { - hd->negoNvram = MPT_SCSICFG_USE_NVRAM; - } - - hd->ioc->spi_data.forceDv = 0; + ioc->spi_data.forceDv = 0; for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) { - hd->ioc->spi_data.dvStatus[ii] = + ioc->spi_data.dvStatus[ii] = MPT_SCSICFG_NEGOTIATE; } - if (hd->negoNvram == 0) { - for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) - hd->ioc->spi_data.dvStatus[ii] |= - MPT_SCSICFG_DV_NOT_DONE; - } + for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) + ioc->spi_data.dvStatus[ii] |= + MPT_SCSICFG_DV_NOT_DONE; ddvprintk((MYIOC_s_INFO_FMT "dv %x width %x factor %x saf_te %x\n", - hd->ioc->name, driver_setup.dv, + ioc->name, driver_setup.dv, driver_setup.max_width, driver_setup.min_sync_fac, driver_setup.saf_te)); @@ -1620,14 +1388,11 @@ hd = (MPT_SCSI_HOST *)host->hostdata; if (hd != NULL) { - int sz1, sz2, sz3, sztarget=0; - int szr2chain = 0; - int szc2chain = 0; - int szQ = 0; + int sz1, sz3, sztarget=0; mptscsih_shutdown(&pdev->dev); - sz1 = sz2 = sz3 = 0; + sz1 = sz3 = 0; if (hd->ScsiLookup != NULL) { sz1 = hd->ioc->req_depth * sizeof(void *); @@ -1635,24 +1400,6 @@ hd->ScsiLookup = NULL; } - if (hd->ReqToChain != NULL) { - szr2chain = hd->ioc->req_depth * sizeof(int); - kfree(hd->ReqToChain); - hd->ReqToChain = NULL; - } - - if (hd->ChainToChain != NULL) { - szc2chain = hd->num_chain * sizeof(int); - kfree(hd->ChainToChain); - hd->ChainToChain = NULL; - } - - if (hd->memQ != NULL) { - szQ = host->can_queue * sizeof(MPT_DONE_Q); - kfree(hd->memQ); - hd->memQ = NULL; - } - if (hd->Targets != NULL) { int max, ii; @@ -1680,9 +1427,9 @@ hd->Targets = NULL; } - dprintk((MYIOC_s_INFO_FMT - "Free'd ScsiLookup (%d) Target (%d+%d) memory\n", - hd->ioc->name, sz1, sz3, sztarget)); + dprintk((MYIOC_s_INFO_FMT + "Free'd ScsiLookup (%d) Target (%d+%d) memory\n", + hd->ioc->name, sz1, sz3, sztarget)); dprintk(("Free'd done and free Q (%d) memory\n", szQ)); /* NULL the Scsi_Host pointer @@ -1802,7 +1549,7 @@ ScsiScanDvCtx = mpt_register(mptscsih_scandv_complete, MPTSCSIH_DRIVER); if (mpt_event_register(ScsiDoneCtx, mptscsih_event_process) == 0) { - dprintk((KERN_INFO MYNAM + devtprintk((KERN_INFO MYNAM ": Registered for IOC event notifications\n")); } @@ -1864,7 +1611,7 @@ * * Returns pointer to buffer where information was written. */ -const char * +static const char * mptscsih_info(struct Scsi_Host *SChost) { MPT_SCSI_HOST *h; @@ -2079,7 +1826,8 @@ * hostno: scsi host number * func: if write = 1; if read = 0 */ -int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, +static int +mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func) { MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; @@ -2114,15 +1862,13 @@ * * Returns 0. (rtn value discarded by linux scsi mid-layer) */ -int +static int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) { MPT_SCSI_HOST *hd; MPT_FRAME_HDR *mf; SCSIIORequest_t *pScsiReq; VirtDevice *pTarget; - MPT_DONE_Q *buffer; - unsigned long flags; int target; int lun; u32 datalen; @@ -2147,16 +1893,9 @@ (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt, done)); if (hd->resetPending) { - /* Prevent new commands from being issued - * while reloading the FW. Reset timer to 60 seconds, - * as the FW can take some time to come ready. - * For New EH, cmds on doneQ posted to FW. - */ - did_errcode = 1; - mod_timer(&SCpnt->eh_timeout, jiffies + (HZ * 60)); dtmprintk((MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n", (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt)); - goto did_error; + return SCSI_MLQUEUE_HOST_BUSY; } /* @@ -2165,8 +1904,7 @@ if ((mf = mpt_get_msg_frame(ScsiDoneCtx, hd->ioc)) == NULL) { dprintk((MYIOC_s_WARN_FMT "QueueCmd, no msg frames!!\n", hd->ioc->name)); - did_errcode = 2; - goto did_error; + return SCSI_MLQUEUE_HOST_BUSY; } pScsiReq = (SCSIIORequest_t *) mf; @@ -2249,7 +1987,7 @@ (dma_addr_t) -1); } else { /* Add a 32 or 64 bit SGE */ - rc = mptscsih_AddSGE(hd, SCpnt, pScsiReq, my_idx); + rc = mptscsih_AddSGE(hd->ioc, SCpnt, pScsiReq, my_idx); } @@ -2283,7 +2021,7 @@ } /* Trying to do DV to this target, extend timeout. - * Wait to issue intil flag is clear + * Wait to issue until flag is clear */ if (dvStatus & MPT_SCSICFG_DV_PENDING) { mod_timer(&SCpnt->eh_timeout, jiffies + 40 * HZ); @@ -2314,64 +2052,18 @@ mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf); dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", hd->ioc->name, SCpnt, mf, my_idx)); - } else { - ddvtprintk((MYIOC_s_INFO_FMT "Pending cmd=%p idx %d\n", - hd->ioc->name, SCpnt, my_idx)); - /* Place this command on the pendingQ if possible */ - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (!Q_IS_EMPTY(&hd->freeQ)) { - buffer = hd->freeQ.head; - Q_DEL_ITEM(buffer); - - /* Save the mf pointer - */ - buffer->argp = (void *)mf; - - /* Add to the pendingQ - */ - Q_ADD_TAIL(&hd->pendingQ.head, buffer, MPT_DONE_Q); - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - } else { - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - SCpnt->result = (DID_BUS_BUSY << 16); - SCpnt->scsi_done(SCpnt); - } - } - } else { - mptscsih_freeChainBuffers(hd, my_idx); - mpt_free_msg_frame(ScsiDoneCtx, hd->ioc, mf); - did_errcode = 3; - goto did_error; - } + DBG_DUMP_REQUEST_FRAME(mf) + } else + goto fail; + } else + goto fail; return 0; -did_error: - dprintk((MYIOC_s_WARN_FMT "_qcmd did_errcode=%d (sc=%p)\n", - hd->ioc->name, did_errcode, SCpnt)); - /* Just wish OS to issue a retry */ - SCpnt->result = (DID_BUS_BUSY << 16); - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (!Q_IS_EMPTY(&hd->freeQ)) { - dtmprintk((MYIOC_s_WARN_FMT "SCpnt=%p to doneQ\n", - (hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt)); - buffer = hd->freeQ.head; - Q_DEL_ITEM(buffer); - - /* Set the scsi_cmnd pointer - */ - buffer->argp = (void *)SCpnt; - - /* Add to the doneQ - */ - Q_ADD_TAIL(&hd->doneQ.head, buffer, MPT_DONE_Q); - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - } else { - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - SCpnt->scsi_done(SCpnt); - } - - return 0; + fail: + mptscsih_freeChainBuffers(hd->ioc, my_idx); + mpt_free_msg_frame(hd->ioc, mf); + return SCSI_MLQUEUE_HOST_BUSY; } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -2385,7 +2077,7 @@ * No return. */ static void -mptscsih_freeChainBuffers(MPT_SCSI_HOST *hd, int req_idx) +mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) { MPT_FRAME_HDR *chain; unsigned long flags; @@ -2395,28 +2087,28 @@ /* Get the first chain index and reset * tracker state. */ - chain_idx = hd->ReqToChain[req_idx]; - hd->ReqToChain[req_idx] = MPT_HOST_NO_CHAIN; + chain_idx = ioc->ReqToChain[req_idx]; + ioc->ReqToChain[req_idx] = MPT_HOST_NO_CHAIN; while (chain_idx != MPT_HOST_NO_CHAIN) { /* Save the next chain buffer index */ - next = hd->ChainToChain[chain_idx]; + next = ioc->ChainToChain[chain_idx]; /* Free this chain buffer and reset * tracker */ - hd->ChainToChain[chain_idx] = MPT_HOST_NO_CHAIN; + ioc->ChainToChain[chain_idx] = MPT_HOST_NO_CHAIN; - chain = (MPT_FRAME_HDR *) (hd->ChainBuffer - + (chain_idx * hd->ioc->req_sz)); - spin_lock_irqsave(&hd->ioc->FreeQlock, flags); - Q_ADD_TAIL(&hd->FreeChainQ.head, + chain = (MPT_FRAME_HDR *) (ioc->ChainBuffer + + (chain_idx * ioc->req_sz)); + spin_lock_irqsave(&ioc->FreeQlock, flags); + Q_ADD_TAIL(&ioc->FreeChainQ.head, &chain->u.frame.linkage, MPT_FRAME_HDR); - spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); + spin_unlock_irqrestore(&ioc->FreeQlock, flags); dmfprintk((MYIOC_s_INFO_FMT "FreeChainBuffers (index %d)\n", - hd->ioc->name, chain_idx)); + ioc->name, chain_idx)); /* handle next */ chain_idx = next; @@ -2480,12 +2172,6 @@ } spin_unlock_irqrestore(&ioc->diagLock, flags); - /* Do not do a Task Management if there are - * too many failed TMs on this adapter. - */ - if (hd->numTMrequests > MPT_HOST_TOO_MANY_TM) - doTask = 0; - /* Wait a fixed amount of time for the TM pending flag to be cleared. * If we time out and not bus reset, then we return a FAILED status to the caller. * The call to mptscsih_tm_pending_wait() will set the pending flag if we are @@ -2593,7 +2279,7 @@ /* Return Fail to calling function if no message frames available. */ if ((mf = mpt_get_msg_frame(ScsiTaskCtx, hd->ioc)) == NULL) { - dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt, no msg frames!!\n", + dfailprintk((MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n", hd->ioc->name)); //return FAILED; return -999; @@ -2624,29 +2310,30 @@ pScsiTm->Reserved2[ii] = 0; pScsiTm->TaskMsgContext = ctx2abort; - dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt, ctx2abort (0x%08x), type (%d)\n", - hd->ioc->name, ctx2abort, type)); /* MPI v0.10 requires SCSITaskMgmt requests be sent via Doorbell/handshake mpt_put_msg_frame(hd->ioc->id, mf); * Save the MF pointer in case the request times out. */ hd->tmPtr = mf; - hd->numTMrequests++; hd->TMtimer.expires = jiffies + timeout; add_timer(&hd->TMtimer); + dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n", + hd->ioc->name, ctx2abort, type)); + + DBG_DUMP_TM_REQUEST_FRAME((u32 *)pScsiTm); + if ((retval = mpt_send_handshake_request(ScsiTaskCtx, hd->ioc, sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, sleepFlag)) != 0) { - dtmprintk((MYIOC_s_WARN_FMT "_send_handshake FAILED!" + dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!" " (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd, hd->ioc, mf)); - hd->numTMrequests--; hd->tmPtr = NULL; del_timer(&hd->TMtimer); - mpt_free_msg_frame(ScsiTaskCtx, hd->ioc, mf); + mpt_free_msg_frame(hd->ioc, mf); } - + return retval; } @@ -2659,10 +2346,11 @@ * * Returns SUCCESS or FAILED. */ -int +static int mptscsih_abort(struct scsi_cmnd * SCpnt) { MPT_SCSI_HOST *hd; + MPT_ADAPTER *ioc; MPT_FRAME_HDR *mf; u32 ctx2abort; int scpnt_idx; @@ -2673,12 +2361,13 @@ if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) { SCpnt->result = DID_RESET << 16; SCpnt->scsi_done(SCpnt); - dtmprintk((KERN_WARNING MYNAM ": mptscsih_abort: " + dfailprintk((KERN_WARNING MYNAM ": mptscsih_abort: " "Can't locate host! (sc=%p)\n", SCpnt)); return FAILED; } + ioc = hd->ioc; if (hd->resetPending) return FAILED; @@ -2691,11 +2380,9 @@ /* Find this command */ if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(SCpnt)) < 0) { - /* Cmd not found in ScsiLookup. If found in - * doneQ, delete from Q. Do OS callback. + /* Cmd not found in ScsiLookup. + * Do OS callback. */ - search_doneQ_for_cmd(hd, SCpnt); - SCpnt->result = DID_RESET << 16; dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: " "Command not in the active list! (sc=%p)\n", @@ -2703,18 +2390,6 @@ return SUCCESS; } - /* If this command is pended, then timeout/hang occurred - * during DV. Post command and flush pending Q - * and then following up with the reset request. - */ - if ((mf = mptscsih_search_pendingQ(hd, scpnt_idx)) != NULL) { - mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf); - post_pendingQ_commands(hd); - dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: " - "Posting pended cmd! (sc=%p)\n", - hd->ioc->name, SCpnt)); - } - /* Most important! Set TaskMsgContext to SCpnt's MsgContext! * (the IO to be ABORT'd) * @@ -2724,7 +2399,7 @@ */ mf = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx); ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext; - + hd->abortSCpnt = SCpnt; spin_unlock_irq(host_lock); @@ -2743,12 +2418,26 @@ */ hd->tmPending = 0; hd->tmState = TM_STATE_NONE; - + spin_lock_irq(host_lock); + + /* Unmap the DMA buffers, if any. */ + if (SCpnt->use_sg) { + pci_unmap_sg(ioc->pcidev, (struct scatterlist *) SCpnt->request_buffer, + SCpnt->use_sg, SCpnt->sc_data_direction); + } else if (SCpnt->request_bufflen) { + pci_unmap_single(ioc->pcidev, SCpnt->SCp.dma_handle, + SCpnt->request_bufflen, SCpnt->sc_data_direction); + } + hd->ScsiLookup[scpnt_idx] = NULL; + SCpnt->result = DID_RESET << 16; + SCpnt->scsi_done(SCpnt); /* Issue the command callback */ + mptscsih_freeChainBuffers(ioc, scpnt_idx); + mpt_free_msg_frame(ioc, mf); return FAILED; } spin_lock_irq(host_lock); - return FAILED; + return SUCCESS; } @@ -2761,7 +2450,7 @@ * * Returns SUCCESS or FAILED. */ -int +static int mptscsih_dev_reset(struct scsi_cmnd * SCpnt) { MPT_SCSI_HOST *hd; @@ -2816,7 +2505,7 @@ * * Returns SUCCESS or FAILED. */ -int +static int mptscsih_bus_reset(struct scsi_cmnd * SCpnt) { MPT_SCSI_HOST *hd; @@ -2839,9 +2528,6 @@ /* We are now ready to execute the task management request. */ spin_unlock_irq(host_lock); -// printk("testing start : mptscsih_schedule_reset\n"); -// mptscsih_schedule_reset(hd); -// printk("testing end: mptscsih_schedule_reset\n"); if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, SCpnt->device->channel, 0, 0, 0, (HZ*5) /* 5 second timeout */, CAN_SLEEP) < 0){ @@ -2871,7 +2557,7 @@ * * Returns SUCCESS or FAILED. */ -int +static int mptscsih_host_reset(struct scsi_cmnd *SCpnt) { MPT_SCSI_HOST * hd; @@ -2937,8 +2623,7 @@ break; } spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/4); + msleep(250); } while (--loop_count); return status; @@ -2965,9 +2650,10 @@ SCSITaskMgmt_t *pScsiTmReq; MPT_SCSI_HOST *hd; unsigned long flags; - u8 tmType = 0; + u16 iocstatus; + u8 tmType; - dtmprintk((MYIOC_s_INFO_FMT "SCSI TaskMgmt completed (mf=%p,r=%p)\n", + dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt completed (mf=%p,mr=%p)\n", ioc->name, mf, mr)); if (ioc->sh) { /* Depending on the thread, a timer is activated for @@ -2978,7 +2664,7 @@ if (hd->tmPtr) { del_timer(&hd->TMtimer); } - dtmprintk((MYIOC_s_INFO_FMT "taskQcnt (%d)\n", + dtmprintk((MYIOC_s_WARN_FMT "taskQcnt (%d)\n", ioc->name, hd->taskQcnt)); } else { dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt Complete: NULL Scsi Host Ptr\n", @@ -2997,18 +2683,15 @@ /* Figure out if this was ABORT_TASK, TARGET_RESET, or BUS_RESET! */ tmType = pScsiTmReq->TaskType; - dtmprintk((KERN_INFO " TaskType = %d, TerminationCount=%d\n", - tmType, le32_to_cpu(pScsiTmReply->TerminationCount))); - + dtmprintk((MYIOC_s_WARN_FMT " TaskType = %d, TerminationCount=%d\n", + ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount))); + DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); + + iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; + dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n", + ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo))); /* Error? (anything non-zero?) */ - if (*(u32 *)&pScsiTmReply->Reserved2[0]) { - u16 iocstatus; - - iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; - dtmprintk((KERN_INFO " SCSI TaskMgmt (%d) - Oops!\n", tmType)); - dtmprintk((KERN_INFO " IOCStatus = %04xh\n", iocstatus)); - dtmprintk((KERN_INFO " IOCLogInfo = %08xh\n", - le32_to_cpu(pScsiTmReply->IOCLogInfo))); + if (iocstatus) { /* clear flags and continue. */ @@ -3029,11 +2712,9 @@ } } } else { - dtmprintk((KERN_INFO " SCSI TaskMgmt SUCCESS!\n")); + dtmprintk((MYIOC_s_WARN_FMT " TaskMgmt SUCCESS\n", ioc->name)); - hd->numTMrequests--; hd->abortSCpnt = NULL; - flush_doneQ(hd); } } @@ -3051,26 +2732,21 @@ /* * This is anyones guess quite frankly. */ -int +static int mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, sector_t capacity, int geom[]) { int heads; int sectors; sector_t cylinders; -#ifdef CONFIG_LBD ulong dummy; -#endif heads = 64; sectors = 32; -#ifdef CONFIG_LBD + dummy = heads * sectors; cylinders = capacity; sector_div(cylinders,dummy); -#else - cylinders = (ulong)capacity / (heads * sectors); -#endif /* * Handle extended translation size for logical drives @@ -3079,13 +2755,9 @@ if ((ulong)capacity >= 0x200000) { heads = 255; sectors = 63; -#ifdef CONFIG_LBD dummy = heads * sectors; cylinders = capacity; sector_div(cylinders,dummy); -#else - cylinders = (ulong)capacity / (heads * sectors); -#endif } /* return result */ @@ -3107,7 +2779,7 @@ * Return non-zero if allocation fails. * Init memory once per id (not LUN). */ -int +static int mptscsih_slave_alloc(struct scsi_device *device) { struct Scsi_Host *host = device->host; @@ -3130,12 +2802,21 @@ Q_INIT(&vdev->WaitQ, void); Q_INIT(&vdev->SentQ, void); Q_INIT(&vdev->DoneQ, void); - vdev->tflags = 0; + vdev->tflags = MPT_TARGET_FLAGS_Q_YES; vdev->ioc_id = hd->ioc->id; vdev->target_id = device->id; - vdev->bus_id = hd->port; - + vdev->bus_id = device->channel; + vdev->raidVolume = 0; hd->Targets[device->id] = vdev; + if (hd->is_spi) { + if (hd->ioc->spi_data.isRaid & (1 << device->id)) { + vdev->raidVolume = 1; + ddvtprintk((KERN_INFO + "RAID Volume @ id %d\n", device->id)); + } + } else { + vdev->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; + } } } vdev->num_luns++; @@ -3147,7 +2828,7 @@ * OS entry point to allow for host driver to free allocated memory * Called if no device present or device being unloaded */ -void +static void mptscsih_slave_destroy(struct scsi_device *device) { struct Scsi_Host *host = device->host; @@ -3176,15 +2857,15 @@ kfree(hd->Targets[device->id]); hd->Targets[device->id] = NULL; - if (!hd->is_spi) + if (!hd->is_spi) return; if((hd->ioc->spi_data.isRaid) && (hd->ioc->spi_data.pIocPg3)) { int i; for(i=0;iioc->spi_data.pIocPg3->NumPhysDisks && raid_volume==0;i++) - - if(device->id == + + if(device->id == hd->ioc->spi_data.pIocPg3->PhysDisk[i].PhysDiskID) { raid_volume=1; hd->ioc->spi_data.forceDv |= @@ -3202,7 +2883,7 @@ } } } - + return; } @@ -3212,7 +2893,7 @@ * member to 1 if a device does not support Q tags. * Return non-zero if fails. */ -int +static int mptscsih_slave_configure(struct scsi_device *device) { struct Scsi_Host *sh = device->host; @@ -3240,8 +2921,16 @@ pTarget = hd->Targets[device->id]; if (pTarget == NULL) { - /* error case - don't know about this device */ - scsi_adjust_queue_depth(device, 0, 1); + /* Driver doesn't know about this device. + * Kernel may generate a "Dummy Lun 0" which + * may become a real Lun if a + * "scsi add-single-device" command is executed + * while the driver is active (hot-plug a + * device). LSI Raid controllers need + * queue_depth set to DEV_HIGH for this reason. + */ + scsi_adjust_queue_depth(device, MSG_SIMPLE_TAG, + MPT_SCSI_CMD_PER_DEV_HIGH); goto slave_configure_exit; } @@ -3302,8 +2991,6 @@ SCSIIORequest_t *pReq; u32 sense_count = le32_to_cpu(pScsiReply->SenseCount); int index; - char devFoo[96]; - IO_Info_t thisIo; /* Get target structure */ @@ -3342,35 +3029,10 @@ ioc->eventContext++; } } - - /* Print an error report for the user. - */ - thisIo.cdbPtr = sc->cmnd; - thisIo.sensePtr = sc->sense_buffer; - thisIo.SCSIStatus = pScsiReply->SCSIStatus; - thisIo.DoDisplay = 1; - if (hd->is_multipath) - sprintf(devFoo, "%d:%d:%d", - hd->ioc->id, - pReq->TargetID, - pReq->LUN[1]); - else - sprintf(devFoo, "%d:%d:%d", hd->ioc->id, sc->device->id, sc->device->lun); - thisIo.DevIDStr = devFoo; -/* fubar */ - thisIo.dataPtr = NULL; - thisIo.inqPtr = NULL; - if (sc->device) { - thisIo.inqPtr = sc->device->vendor-8; /* FIXME!!! */ - } - (void) mpt_ScsiHost_ErrorReport(&thisIo); - } else { dprintk((MYIOC_s_INFO_FMT "Hmmm... SenseData len=0! (?)\n", hd->ioc->name)); } - - return; } static u32 @@ -3390,102 +3052,6 @@ return -1; } - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* Search the pendingQ for a command with specific index. - * If found, delete and return mf pointer - * If not found, return NULL - */ -static MPT_FRAME_HDR * -mptscsih_search_pendingQ(MPT_SCSI_HOST *hd, int scpnt_idx) -{ - unsigned long flags; - MPT_DONE_Q *buffer; - MPT_FRAME_HDR *mf = NULL; - MPT_FRAME_HDR *cmdMfPtr; - - ddvtprintk((MYIOC_s_INFO_FMT ": search_pendingQ ...", hd->ioc->name)); - cmdMfPtr = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx); - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (!Q_IS_EMPTY(&hd->pendingQ)) { - buffer = hd->pendingQ.head; - do { - mf = (MPT_FRAME_HDR *) buffer->argp; - if (mf == cmdMfPtr) { - Q_DEL_ITEM(buffer); - - /* clear the arg pointer - */ - buffer->argp = NULL; - - /* Add to the freeQ - */ - Q_ADD_TAIL(&hd->freeQ.head, buffer, MPT_DONE_Q); - break; - } - mf = NULL; - } while ((buffer = buffer->forw) != (MPT_DONE_Q *) &hd->pendingQ); - } - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - ddvtprintk((" ...return %p\n", mf)); - return mf; -} - -/* Post all commands on the pendingQ to the FW. - * Lock Q when deleting/adding members - * Lock io_request_lock for OS callback. - */ -static void -post_pendingQ_commands(MPT_SCSI_HOST *hd) -{ - MPT_FRAME_HDR *mf; - MPT_DONE_Q *buffer; - unsigned long flags; - - /* Flush the pendingQ. - */ - ddvtprintk((MYIOC_s_INFO_FMT ": post_pendingQ_commands\n", hd->ioc->name)); - while (1) { - spin_lock_irqsave(&hd->freedoneQlock, flags); - if (Q_IS_EMPTY(&hd->pendingQ)) { - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - break; - } - - buffer = hd->pendingQ.head; - /* Delete from Q - */ - Q_DEL_ITEM(buffer); - - mf = (MPT_FRAME_HDR *) buffer->argp; - buffer->argp = NULL; - - /* Add to the freeQ - */ - Q_ADD_TAIL(&hd->freeQ.head, buffer, MPT_DONE_Q); - spin_unlock_irqrestore(&hd->freedoneQlock, flags); - - if (!mf) { - /* This should never happen */ - printk(MYIOC_s_WARN_FMT "post_pendingQ_commands: mf %p\n", hd->ioc->name, (void *) mf); - continue; - } - - mpt_put_msg_frame(ScsiDoneCtx, hd->ioc, mf); - -#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY) - { - u16 req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx); - struct scsi_cmnd *sc = hd->ScsiLookup[req_idx]; - printk(MYIOC_s_INFO_FMT "Issued SCSI cmd (sc=%p) idx=%d (mf=%p)\n", - hd->ioc->name, sc, req_idx, mf); - } -#endif - } - - return; -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ static int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) @@ -3520,14 +3086,10 @@ dtmprintk((MYIOC_s_WARN_FMT "Pre-Diag Reset\n", ioc->name)); /* 2. Flush running commands - * Clean drop test code - if compiled * Clean ScsiLookup (and associated memory) * AND clean mytaskQ */ - /* 2a. Drop Test Command. - */ - /* 2b. Reply to OS all known outstanding I/O commands. */ mptscsih_flush_running_cmds(hd); @@ -3538,7 +3100,7 @@ */ if (hd->cmdPtr) { del_timer(&hd->timer); - mpt_free_msg_frame(ScsiScanDvCtx, ioc, hd->cmdPtr); + mpt_free_msg_frame(ioc, hd->cmdPtr); } /* 2d. If a task management has not completed, @@ -3546,7 +3108,7 @@ */ if (hd->tmPtr) { del_timer(&hd->TMtimer); - mpt_free_msg_frame(ScsiTaskCtx, ioc, hd->tmPtr); + mpt_free_msg_frame(ioc, hd->tmPtr); } #ifdef MPTSCSIH_DBG_TIMEOUT @@ -3573,7 +3135,6 @@ /* 2. Chain Buffer initialization */ - mptscsih_initChainBuffers(hd, 0); /* 3. tmPtr clear */ @@ -3583,8 +3144,10 @@ /* 4. Renegotiate to all devices, if SCSI */ - if (hd->is_spi) + if (hd->is_spi) { + dnegoprintk(("writeSDP1: ALL_IDS USE_NVRAM\n")); mptscsih_writeSDP1(hd, 0, 0, MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM); + } /* 5. Enable new commands to be posted */ @@ -3592,7 +3155,6 @@ hd->tmPending = 0; spin_unlock_irqrestore(&ioc->FreeQlock, flags); hd->resetPending = 0; - hd->numTMrequests = 0; hd->tmState = TM_STATE_NONE; /* 6. If there was an internal command, @@ -3609,11 +3171,7 @@ hd->cmdPtr = NULL; } - /* 7. Flush doneQ - */ - flush_doneQ(hd); - - /* 8. Set flag to force DV and re-read IOC Page 3 + /* 7. Set flag to force DV and re-read IOC Page 3 */ if (hd->is_spi) { ioc->spi_data.forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3; @@ -3634,7 +3192,7 @@ MPT_SCSI_HOST *hd; u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; - dprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", + devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", ioc->name, event)); switch (event) { @@ -3766,394 +3324,6 @@ .use_clustering = ENABLE_CLUSTERING, }; - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * Private data... - */ -static ASCQ_Table_t *mptscsih_ASCQ_TablePtr; - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* old symsense.c stuff... */ -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * Private data... - * To protect ourselves against those that would pass us bogus pointers - */ -static u8 dummyInqData[SCSI_STD_INQUIRY_BYTES] - = { 0x1F, 0x00, 0x00, 0x00, - 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static u8 dummySenseData[SCSI_STD_SENSE_BYTES] - = { 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 }; -static u8 dummyCDB[16] - = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static u8 dummyScsiData[16] - = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - -static char *ScsiStatusString[] = { - "GOOD", /* 00h */ - NULL, /* 01h */ - "CHECK CONDITION", /* 02h */ - NULL, /* 03h */ - "CONDITION MET", /* 04h */ - NULL, /* 05h */ - NULL, /* 06h */ - NULL, /* 07h */ - "BUSY", /* 08h */ - NULL, /* 09h */ - NULL, /* 0Ah */ - NULL, /* 0Bh */ - NULL, /* 0Ch */ - NULL, /* 0Dh */ - NULL, /* 0Eh */ - NULL, /* 0Fh */ - "INTERMEDIATE", /* 10h */ - NULL, /* 11h */ - NULL, /* 12h */ - NULL, /* 13h */ - "INTERMEDIATE-CONDITION MET", /* 14h */ - NULL, /* 15h */ - NULL, /* 16h */ - NULL, /* 17h */ - "RESERVATION CONFLICT", /* 18h */ - NULL, /* 19h */ - NULL, /* 1Ah */ - NULL, /* 1Bh */ - NULL, /* 1Ch */ - NULL, /* 1Dh */ - NULL, /* 1Eh */ - NULL, /* 1Fh */ - NULL, /* 20h */ - NULL, /* 21h */ - "COMMAND TERMINATED", /* 22h */ - NULL, /* 23h */ - NULL, /* 24h */ - NULL, /* 25h */ - NULL, /* 26h */ - NULL, /* 27h */ - "TASK SET FULL", /* 28h */ - NULL, /* 29h */ - NULL, /* 2Ah */ - NULL, /* 2Bh */ - NULL, /* 2Ch */ - NULL, /* 2Dh */ - NULL, /* 2Eh */ - NULL, /* 2Fh */ - "ACA ACTIVE", /* 30h */ - NULL -}; - -static const char *ScsiCommonOpString[] = { - "TEST UNIT READY", /* 00h */ - "REZERO UNIT (REWIND)", /* 01h */ - NULL, /* 02h */ - "REQUEST_SENSE", /* 03h */ - "FORMAT UNIT (MEDIUM)", /* 04h */ - "READ BLOCK LIMITS", /* 05h */ - NULL, /* 06h */ - "REASSIGN BLOCKS", /* 07h */ - "READ(6)", /* 08h */ - NULL, /* 09h */ - "WRITE(6)", /* 0Ah */ - "SEEK(6)", /* 0Bh */ - NULL, /* 0Ch */ - NULL, /* 0Dh */ - NULL, /* 0Eh */ - "READ REVERSE", /* 0Fh */ - "WRITE_FILEMARKS", /* 10h */ - "SPACE(6)", /* 11h */ - "INQUIRY", /* 12h */ - NULL -}; - -static const char *SenseKeyString[] = { - "NO SENSE", /* 0h */ - "RECOVERED ERROR", /* 1h */ - "NOT READY", /* 2h */ - "MEDIUM ERROR", /* 3h */ - "HARDWARE ERROR", /* 4h */ - "ILLEGAL REQUEST", /* 5h */ - "UNIT ATTENTION", /* 6h */ - "DATA PROTECT", /* 7h */ - "BLANK CHECK", /* 8h */ - "VENDOR-SPECIFIC", /* 9h */ - "ABORTED COPY", /* Ah */ - "ABORTED COMMAND", /* Bh */ - "EQUAL (obsolete)", /* Ch */ - "VOLUME OVERFLOW", /* Dh */ - "MISCOMPARE", /* Eh */ - "RESERVED", /* Fh */ - NULL -}; - -#define SPECIAL_ASCQ(c,q) \ - (((c) == 0x40 && (q) != 0x00) || ((c) == 0x4D) || ((c) == 0x70)) - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -static int dump_cdb(char *foo, unsigned char *cdb) -{ - int i, grpCode, cdbLen; - int l = 0; - - grpCode = cdb[0] >> 5; - if (grpCode < 1) - cdbLen = 6; - else if (grpCode < 3) - cdbLen = 10; - else if (grpCode == 5) - cdbLen = 12; - else - cdbLen = 16; - - for (i=0; i < cdbLen; i++) - l += sprintf(foo+l, " %02X", cdb[i]); - - return l; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* Do ASC/ASCQ lookup/grindage to English readable string(s) */ -static const char * ascq_set_strings_4max( - u8 ASC, u8 ASCQ, - const char **s1, const char **s2, const char **s3, const char **s4) -{ - static const char *asc_04_part1_string = "LOGICAL UNIT "; - static const char *asc_04_part2a_string = "NOT READY, "; - static const char *asc_04_part2b_string = "IS "; - static const char *asc_04_ascq_NN_part3_strings[] = { /* ASC ASCQ (hex) */ - "CAUSE NOT REPORTABLE", /* 04 00 */ - "IN PROCESS OF BECOMING READY", /* 04 01 */ - "INITIALIZING CMD. REQUIRED", /* 04 02 */ - "MANUAL INTERVENTION REQUIRED", /* 04 03 */ - /* Add " IN PROGRESS" to all the following... */ - "FORMAT", /* 04 04 */ - "REBUILD", /* 04 05 */ - "RECALCULATION", /* 04 06 */ - "OPERATION", /* 04 07 */ - "LONG WRITE", /* 04 08 */ - "SELF-TEST", /* 04 09 */ - NULL - }; - static char *asc_04_part4_string = " IN PROGRESS"; - - static char *asc_29_ascq_NN_strings[] = { /* ASC ASCQ (hex) */ - "POWER ON, RESET, OR BUS DEVICE RESET OCCURRED", /* 29 00 */ - "POWER ON OCCURRED", /* 29 01 */ - "SCSI BUS RESET OCCURRED", /* 29 02 */ - "BUS DEVICE RESET FUNCTION OCCURRED", /* 29 03 */ - "DEVICE INTERNAL RESET", /* 29 04 */ - "TRANSCEIVER MODE CHANGED TO SINGLE-ENDED", /* 29 05 */ - "TRANSCEIVER MODE CHANGED TO LVD", /* 29 06 */ - NULL - }; - static char *ascq_vendor_uniq = "(Vendor Unique)"; - static char *ascq_noone = "(no matching ASC/ASCQ description found)"; - int idx; - - *s1 = *s2 = *s3 = *s4 = ""; /* set'em all to the empty "" string */ - - /* CHECKME! Need lock/sem? - * Update and examine for isense module presense. - */ - mptscsih_ASCQ_TablePtr = (ASCQ_Table_t *)mpt_v_ASCQ_TablePtr; - - if (mptscsih_ASCQ_TablePtr == NULL) { - /* 2nd chances... */ - if (ASC == 0x04 && (ASCQ < sizeof(asc_04_ascq_NN_part3_strings)/sizeof(char*)-1)) { - *s1 = asc_04_part1_string; - *s2 = (ASCQ == 0x01) ? asc_04_part2b_string : asc_04_part2a_string; - *s3 = asc_04_ascq_NN_part3_strings[ASCQ]; - /* check for " IN PROGRESS" ones */ - if (ASCQ >= 0x04) - *s4 = asc_04_part4_string; - } else if (ASC == 0x29 && (ASCQ < sizeof(asc_29_ascq_NN_strings)/sizeof(char*)-1)) - *s1 = asc_29_ascq_NN_strings[ASCQ]; - /* - * Else { leave all *s[1-4] values pointing to the empty "" string } - */ - return *s1; - } - - /* - * Need to check ASC here; if it is "special," then - * the ASCQ is variable, and indicates failed component number. - * We must treat the ASCQ as a "don't care" while searching the - * mptscsih_ASCQ_Table[] by masking it off, and then restoring it later - * on when we actually need to identify the failed component. - */ - if (SPECIAL_ASCQ(ASC,ASCQ)) - ASCQ = 0xFF; - - /* OK, now search mptscsih_ASCQ_Table[] for a matching entry */ - for (idx = 0; mptscsih_ASCQ_TablePtr && idx < mpt_ASCQ_TableSz; idx++) - if ((ASC == mptscsih_ASCQ_TablePtr[idx].ASC) && (ASCQ == mptscsih_ASCQ_TablePtr[idx].ASCQ)) { - *s1 = mptscsih_ASCQ_TablePtr[idx].Description; - return *s1; - } - - if ((ASC >= 0x80) || (ASCQ >= 0x80)) - *s1 = ascq_vendor_uniq; - else - *s1 = ascq_noone; - - return *s1; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* - * SCSI Information Report; desired output format... - *--- -SCSI Error: (iocnum:target_id:LUN) Status=02h (CHECK CONDITION) - Key=6h (UNIT ATTENTION); FRU=03h - ASC/ASCQ=29h/00h, "POWER ON, RESET, OR BUS DEVICE RESET OCCURRED" - CDB: 00 00 00 00 00 00 - TestUnitReady - *--- - */ -/* - * SCSI Error Report; desired output format... - *--- -SCSI Error Report =-=-=-=-=-=-=-=-=-=-=-=-=-= (ioc0,scsi0:0) - SCSI_Status=02h (CHECK CONDITION) - Original_CDB[]: 00 00 00 00 00 00 - TestUnitReady - SenseData[12h]: 70 00 06 00 00 00 00 0A 00 00 00 00 29 00 03 00 00 00 - SenseKey=6h (UNIT ATTENTION); FRU=03h - ASC/ASCQ=29h/00h, "POWER ON, RESET, OR BUS DEVICE RESET OCCURRED" - *--- - */ - -int mpt_ScsiHost_ErrorReport(IO_Info_t *ioop) -{ - char foo[512]; - char buf2[32]; - char *statstr; - const char *opstr; - int sk = SD_Sense_Key(ioop->sensePtr); - const char *skstr = SenseKeyString[sk]; - unsigned char asc = SD_ASC(ioop->sensePtr); - unsigned char ascq = SD_ASCQ(ioop->sensePtr); - int l; - - /* Change the error logging to only report errors on - * read and write commands. Ignore errors on other commands. - * Should this be configurable via proc? - */ - switch (ioop->cdbPtr[0]) { - case READ_6: - case WRITE_6: - case READ_10: - case WRITE_10: - case READ_12: - case WRITE_12: - case READ_16: - case WRITE_16: - break; - default: - return 0; - } - - /* - * More quiet mode. - * Filter out common, repetitive, warning-type errors... like: - * POWER ON (06,29/00 or 06,29/01), - * SPINNING UP (02,04/01), - * LOGICAL UNIT NOT SUPPORTED (05,25/00), etc. - */ - if (sk == SK_NO_SENSE) { - return 0; - } - - if ( (sk==SK_UNIT_ATTENTION && asc==0x29 && (ascq==0x00 || ascq==0x01)) - || (sk==SK_NOT_READY && asc==0x04 && (ascq==0x01 || ascq==0x02)) - || (sk==SK_ILLEGAL_REQUEST && asc==0x25 && ascq==0x00) - ) - { - /* Do nothing! */ - return 0; - } - - /* Prevent the system from continually writing to the log - * if a medium is not found: 02 3A 00 - * Changer issues: TUR, Read Capacity, Table of Contents continually - */ - if (sk==SK_NOT_READY && asc==0x3A) { - if (ioop->cdbPtr == NULL) { - return 0; - } else if ((ioop->cdbPtr[0] == CMD_TestUnitReady) || - (ioop->cdbPtr[0] == CMD_ReadCapacity) || - (ioop->cdbPtr[0] == 0x43)) { - return 0; - } - } - if (sk==SK_UNIT_ATTENTION) { - if (ioop->cdbPtr == NULL) - return 0; - else if (ioop->cdbPtr[0] == CMD_TestUnitReady) - return 0; - } - - /* - * Protect ourselves... - */ - if (ioop->cdbPtr == NULL) - ioop->cdbPtr = dummyCDB; - if (ioop->sensePtr == NULL) - ioop->sensePtr = dummySenseData; - if (ioop->inqPtr == NULL) - ioop->inqPtr = dummyInqData; - if (ioop->dataPtr == NULL) - ioop->dataPtr = dummyScsiData; - - statstr = NULL; - if ((ioop->SCSIStatus >= sizeof(ScsiStatusString)/sizeof(char*)-1) || - ((statstr = (char*)ScsiStatusString[ioop->SCSIStatus]) == NULL)) { - (void) sprintf(buf2, "Bad-Reserved-%02Xh", ioop->SCSIStatus); - statstr = buf2; - } - - opstr = NULL; - if (1+ioop->cdbPtr[0] <= sizeof(ScsiCommonOpString)/sizeof(char*)) - opstr = ScsiCommonOpString[ioop->cdbPtr[0]]; - else if (mpt_ScsiOpcodesPtr) - opstr = mpt_ScsiOpcodesPtr[ioop->cdbPtr[0]]; - - l = sprintf(foo, "SCSI Error: (%s) Status=%02Xh (%s)\n", - ioop->DevIDStr, - ioop->SCSIStatus, - statstr); - l += sprintf(foo+l, " Key=%Xh (%s); FRU=%02Xh\n ASC/ASCQ=%02Xh/%02Xh", - sk, skstr, SD_FRU(ioop->sensePtr), asc, ascq ); - { - const char *x1, *x2, *x3, *x4; - x1 = x2 = x3 = x4 = ""; - x1 = ascq_set_strings_4max(asc, ascq, &x1, &x2, &x3, &x4); - if (x1 != NULL) { - if (x1[0] != '(') - l += sprintf(foo+l, " \"%s%s%s%s\"", x1,x2,x3,x4); - else - l += sprintf(foo+l, " %s%s%s%s", x1,x2,x3,x4); - } - } - l += sprintf(foo+l, "\n CDB:"); - l += dump_cdb(foo+l, ioop->cdbPtr); - if (opstr) - l += sprintf(foo+l, " - \"%s\"", opstr); - l += sprintf(foo+l, "\n"); - - PrintF(("%s\n", foo)); - - return l; -} - -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * mptscsih_initTarget - Target, LUN alloc/free functionality. @@ -4176,48 +3346,33 @@ { int indexed_lun, lun_index; VirtDevice *vdev; + ScsiCfgData *pSpi; char data_56; - dprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", + dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", hd->ioc->name, bus_id, target_id, lun, hd)); - /* Is LUN supported? If so, upper 3 bits will be 0 + /* Is LUN supported? If so, upper 2 bits will be 0 * in first byte of inquiry data. */ if (data[0] & 0xe0) return; - vdev = hd->Targets[target_id]; + if ((vdev = hd->Targets[target_id]) == NULL) { + return; + } lun_index = (lun >> 5); /* 32 luns per lun_index */ indexed_lun = (lun % 32); vdev->luns[lun_index] |= (1 << indexed_lun); - vdev->raidVolume = 0; if (hd->is_spi) { - if (hd->ioc->spi_data.isRaid & (1 << target_id)) { - vdev->raidVolume = 1; - ddvtprintk((KERN_INFO "RAID Volume @ id %d\n", target_id)); - } - } - - if (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) { - if ( dlen > 8 ) { - memcpy (vdev->inq_data, data, 8); - } else { - memcpy (vdev->inq_data, data, dlen); - } - vdev->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; - - /* If LUN 0, tape and have not done DV, set the DV flag. - */ - if (hd->is_spi && (lun == 0) && (data[0] == SCSI_TYPE_TAPE)) { - ScsiCfgData *pSpi = &hd->ioc->spi_data; - if (pSpi->dvStatus[target_id] & MPT_SCSICFG_DV_NOT_DONE) - pSpi->dvStatus[target_id] |= MPT_SCSICFG_NEED_DV; - } - - if ( (data[0] == SCSI_TYPE_PROC) && + if ((data[0] == TYPE_PROCESSOR) && (hd->ioc->spi_data.Saf_Te)) { + /* Treat all Processors as SAF-TE if + * command line option is set */ + vdev->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED; + mptscsih_writeIOCPage4(hd, target_id, bus_id); + }else if ((data[0] == TYPE_PROCESSOR) && !(vdev->tflags & MPT_TARGET_FLAGS_SAF_TE_ISSUED )) { if ( dlen > 49 ) { vdev->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; @@ -4230,30 +3385,51 @@ vdev->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED; mptscsih_writeIOCPage4(hd, target_id, bus_id); } - } else { - /* Treat all Processors as SAF-TE if - * command line option is set */ - if ( hd->ioc->spi_data.Saf_Te ) { - vdev->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED; - mptscsih_writeIOCPage4(hd, target_id, bus_id); - } } } + if (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) { + if ( dlen > 8 ) { + memcpy (vdev->inq_data, data, 8); + } else { + memcpy (vdev->inq_data, data, dlen); + } - data_56 = 0x0F; /* Default to full capabilities if Inq data length is < 57 */ - if (dlen > 56) { - if ( (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_56))) { - /* Update the target capabilities + /* If have not done DV, set the DV flag. */ - data_56 = data[56]; - vdev->tflags |= MPT_TARGET_FLAGS_VALID_56; + pSpi = &hd->ioc->spi_data; + if ((data[0] == TYPE_TAPE) || (data[0] == TYPE_PROCESSOR)) { + if (pSpi->dvStatus[target_id] & MPT_SCSICFG_DV_NOT_DONE) + pSpi->dvStatus[target_id] |= MPT_SCSICFG_NEED_DV; + } + + vdev->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY; + + + data_56 = 0x0F; /* Default to full capabilities if Inq data length is < 57 */ + if (dlen > 56) { + if ( (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_56))) { + /* Update the target capabilities + */ + data_56 = data[56]; + vdev->tflags |= MPT_TARGET_FLAGS_VALID_56; + } + } + mptscsih_setTargetNegoParms(hd, vdev, data_56); + } else { + /* Initial Inquiry may not request enough data bytes to + * obtain byte 57. DV will; if target doesn't return + * at least 57 bytes, data[56] will be zero. */ + if (dlen > 56) { + if ( (!(vdev->tflags & MPT_TARGET_FLAGS_VALID_56))) { + /* Update the target capabilities + */ + data_56 = data[56]; + vdev->tflags |= MPT_TARGET_FLAGS_VALID_56; + mptscsih_setTargetNegoParms(hd, vdev, data_56); + } } } - mptscsih_setTargetNegoParms(hd, vdev, data_56); } - - dprintk((KERN_INFO " target = %p\n", vdev)); - return; } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -4262,12 +3438,12 @@ * the Inquiry data, adapter capabilities, and NVRAM settings. * */ -void mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56) +static void +mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56) { ScsiCfgData *pspi_data = &hd->ioc->spi_data; int id = (int) target->target_id; int nvram; - char canQ = 0; VirtDevice *vdev; int ii; u8 width = MPT_NARROW; @@ -4276,14 +3452,6 @@ u8 version, nfactor; u8 noQas = 1; - if (!hd->is_spi) { - if (target->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) { - if (target->inq_data[7] & 0x02) - target->tflags |= MPT_TARGET_FLAGS_Q_YES; - } - return; - } - target->negoFlags = pspi_data->noQas; /* noQas == 0 => device supports QAS. Need byte 56 of Inq to determine @@ -4293,137 +3461,152 @@ /* Set flags based on Inquiry data */ - if (target->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) { - version = target->inq_data[2] & 0x07; - if (version < 2) { - width = 0; - factor = MPT_ULTRA2; - offset = pspi_data->maxSyncOffset; - } else { - if (target->inq_data[7] & 0x20) { - width = 1; - } + version = target->inq_data[2] & 0x07; + if (version < 2) { + width = 0; + factor = MPT_ULTRA2; + offset = pspi_data->maxSyncOffset; + target->tflags &= ~MPT_TARGET_FLAGS_Q_YES; + } else { + if (target->inq_data[7] & 0x20) { + width = 1; + } - if (target->inq_data[7] & 0x10) { - /* bits 2 & 3 show Clocking support - */ + if (target->inq_data[7] & 0x10) { + factor = pspi_data->minSyncFactor; + if (target->tflags & MPT_TARGET_FLAGS_VALID_56) { + /* bits 2 & 3 show Clocking support */ if ((byte56 & 0x0C) == 0) factor = MPT_ULTRA2; else { if ((byte56 & 0x03) == 0) factor = MPT_ULTRA160; - else + else { factor = MPT_ULTRA320; - } - offset = pspi_data->maxSyncOffset; - - /* If RAID, never disable QAS - * else if non RAID, do not disable - * QAS if bit 1 is set - * bit 1 QAS support, non-raid only - * bit 0 IU support - */ - if ((target->raidVolume == 1) || (byte56 & 0x02)) { - noQas = 0; + if (byte56 & 0x02) + { + ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); + noQas = 0; + } + if (target->inq_data[0] == TYPE_TAPE) { + if (byte56 & 0x01) + target->negoFlags |= MPT_TAPE_NEGO_IDP; + } + } } } else { - factor = MPT_ASYNC; - offset = 0; + ddvtprintk((KERN_INFO "Enabling QAS on id=%d due to ~TARGET_FLAGS_VALID_56!\n", id)); + noQas = 0; } - } + + offset = pspi_data->maxSyncOffset; - if (target->inq_data[7] & 0x02) { - canQ = 1; + /* If RAID, never disable QAS + * else if non RAID, do not disable + * QAS if bit 1 is set + * bit 1 QAS support, non-raid only + * bit 0 IU support + */ + if (target->raidVolume == 1) { + noQas = 0; + } + } else { + factor = MPT_ASYNC; + offset = 0; } + } - /* Update tflags based on NVRAM settings. (SCSI only) - */ - if (pspi_data->nvram && (pspi_data->nvram[id] != MPT_HOST_NVRAM_INVALID)) { - nvram = pspi_data->nvram[id]; - nfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8; + if ( (target->inq_data[7] & 0x02) == 0) { + target->tflags &= ~MPT_TARGET_FLAGS_Q_YES; + } - if (width) - width = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; + /* Update tflags based on NVRAM settings. (SCSI only) + */ + if (pspi_data->nvram && (pspi_data->nvram[id] != MPT_HOST_NVRAM_INVALID)) { + nvram = pspi_data->nvram[id]; + nfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8; - if (offset > 0) { - /* Ensure factor is set to the - * maximum of: adapter, nvram, inquiry - */ - if (nfactor) { - if (nfactor < pspi_data->minSyncFactor ) - nfactor = pspi_data->minSyncFactor; + if (width) + width = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1; - factor = max(factor, nfactor); - if (factor == MPT_ASYNC) - offset = 0; - } else { + if (offset > 0) { + /* Ensure factor is set to the + * maximum of: adapter, nvram, inquiry + */ + if (nfactor) { + if (nfactor < pspi_data->minSyncFactor ) + nfactor = pspi_data->minSyncFactor; + + factor = max(factor, nfactor); + if (factor == MPT_ASYNC) offset = 0; - factor = MPT_ASYNC; - } } else { + offset = 0; factor = MPT_ASYNC; - } } - - /* Make sure data is consistent - */ - if ((!width) && (factor < MPT_ULTRA2)) { - factor = MPT_ULTRA2; + } else { + factor = MPT_ASYNC; } + } - /* Save the data to the target structure. - */ - target->minSyncFactor = factor; - target->maxOffset = offset; - target->maxWidth = width; - if (canQ) { - target->tflags |= MPT_TARGET_FLAGS_Q_YES; - } + /* Make sure data is consistent + */ + if ((!width) && (factor < MPT_ULTRA2)) { + factor = MPT_ULTRA2; + } - target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO; + /* Save the data to the target structure. + */ + target->minSyncFactor = factor; + target->maxOffset = offset; + target->maxWidth = width; - /* Disable unused features. - */ - if (!width) - target->negoFlags |= MPT_TARGET_NO_NEGO_WIDE; + target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO; - if (!offset) - target->negoFlags |= MPT_TARGET_NO_NEGO_SYNC; + /* Disable unused features. + */ + if (!width) + target->negoFlags |= MPT_TARGET_NO_NEGO_WIDE; - /* GEM, processor WORKAROUND - */ - if (((target->inq_data[0] & 0x1F) == 0x03) - || ((target->inq_data[0] & 0x1F) > 0x08)) { - target->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC); - pspi_data->dvStatus[id] |= MPT_SCSICFG_BLK_NEGO; - } else { - if (noQas && (pspi_data->noQas == 0)) { - pspi_data->noQas |= MPT_TARGET_NO_NEGO_QAS; - target->negoFlags |= MPT_TARGET_NO_NEGO_QAS; - - /* Disable QAS in a mixed configuration case - */ - - ddvtprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); - for (ii = 0; ii < id; ii++) { - if ( (vdev = hd->Targets[ii]) ) { - vdev->negoFlags |= MPT_TARGET_NO_NEGO_QAS; - } - } + if (!offset) + target->negoFlags |= MPT_TARGET_NO_NEGO_SYNC; + + if ( factor > MPT_ULTRA320 ) + noQas = 0; + + /* GEM, processor WORKAROUND + */ + if ((target->inq_data[0] == TYPE_PROCESSOR) || (target->inq_data[0] > 0x08)) { + target->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC); + pspi_data->dvStatus[id] |= MPT_SCSICFG_BLK_NEGO; + } else { + if (noQas && (pspi_data->noQas == 0)) { + pspi_data->noQas |= MPT_TARGET_NO_NEGO_QAS; + target->negoFlags |= MPT_TARGET_NO_NEGO_QAS; + + /* Disable QAS in a mixed configuration case + */ + + ddvtprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id)); + for (ii = 0; ii < id; ii++) { + if ( (vdev = hd->Targets[ii]) ) { + vdev->negoFlags |= MPT_TARGET_NO_NEGO_QAS; + mptscsih_writeSDP1(hd, 0, ii, vdev->negoFlags); + } } } - - /* Write SDP1 on this I/O to this target */ - if (pspi_data->dvStatus[id] & MPT_SCSICFG_NEGOTIATE) { - mptscsih_writeSDP1(hd, 0, id, hd->negoNvram); - pspi_data->dvStatus[id] &= ~MPT_SCSICFG_NEGOTIATE; - } else if (pspi_data->dvStatus[id] & MPT_SCSICFG_BLK_NEGO) { - mptscsih_writeSDP1(hd, 0, id, MPT_SCSICFG_BLK_NEGO); - pspi_data->dvStatus[id] &= ~MPT_SCSICFG_BLK_NEGO; - } } - return; + /* Write SDP1 on this I/O to this target */ + if (pspi_data->dvStatus[id] & MPT_SCSICFG_NEGOTIATE) { + ddvtprintk((KERN_INFO "MPT_SCSICFG_NEGOTIATE on id=%d!\n", id)); + mptscsih_writeSDP1(hd, 0, id, hd->negoNvram); + pspi_data->dvStatus[id] &= ~MPT_SCSICFG_NEGOTIATE; + } else if (pspi_data->dvStatus[id] & MPT_SCSICFG_BLK_NEGO) { + ddvtprintk((KERN_INFO "MPT_SCSICFG_BLK_NEGO on id=%d!\n", id)); + mptscsih_writeSDP1(hd, 0, id, MPT_SCSICFG_BLK_NEGO); + pspi_data->dvStatus[id] &= ~MPT_SCSICFG_BLK_NEGO; + } } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -4437,14 +3620,18 @@ static void mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq) { u8 cmd; + ScsiCfgData *pSpi; + ddvtprintk((" set_dvflags: id=%d lun=%d negoNvram=%x cmd=%x\n", + pReq->TargetID, pReq->LUN[1], hd->negoNvram, pReq->CDB[0])); + if ((pReq->LUN[1] != 0) || (hd->negoNvram != 0)) return; cmd = pReq->CDB[0]; if ((cmd == READ_CAPACITY) || (cmd == MODE_SENSE)) { - ScsiCfgData *pSpi = &hd->ioc->spi_data; + pSpi = &hd->ioc->spi_data; if ((pSpi->isRaid & (1 << pReq->TargetID)) && pSpi->pIocPg3) { /* Set NEED_DV for all hidden disks */ @@ -4510,6 +3697,8 @@ *requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT); if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0) *requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS; + if (flags & MPT_TAPE_NEGO_IDP) + *requestedPtr |= 0x08000000; } else if (factor < MPT_ULTRA2) { *requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT; } @@ -4624,6 +3813,16 @@ //negoFlags = MPT_TARGET_NO_NEGO_SYNC; } + /* If id is not a raid volume, get the updated + * transmission settings from the target structure. + */ + if (hd->Targets && (pTarget = hd->Targets[id]) && !pTarget->raidVolume) { + width = pTarget->maxWidth; + factor = pTarget->minSyncFactor; + offset = pTarget->maxOffset; + negoFlags = pTarget->negoFlags; + } + #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION /* Force to async and narrow if DV has not been executed * for this ID @@ -4635,21 +3834,13 @@ } #endif - /* If id is not a raid volume, get the updated - * transmission settings from the target structure. - */ - if (hd->Targets && (pTarget = hd->Targets[id]) && !pTarget->raidVolume) { - width = pTarget->maxWidth; - factor = pTarget->minSyncFactor; - offset = pTarget->maxOffset; - negoFlags = pTarget->negoFlags; - } - if (flags & MPT_SCSICFG_BLK_NEGO) negoFlags = MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC; mptscsih_setDevicePage1Flags(width, factor, offset, &requested, &configuration, negoFlags); + dnegoprintk(("writeSDP1: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", + target_id, width, factor, offset, negoFlags, requested, configuration)); /* Get a MF for this command. */ @@ -4754,9 +3945,6 @@ return -EAGAIN; } - ddvprintk((MYIOC_s_INFO_FMT "writeIOCPage4 (mf=%p, id=%d)\n", - ioc->name, mf, target_id)); - /* Set the request and the data pointers. * Place data at end of MF. */ @@ -4793,9 +3981,9 @@ mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma); - dsprintk((MYIOC_s_INFO_FMT - "writeIOCPage4: pgaddr 0x%x\n", - ioc->name, (target_id | (bus<<8)))); + dinitprintk((MYIOC_s_INFO_FMT + "writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n", + ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, target_id, bus)); mpt_put_msg_frame(ScsiDoneCtx, ioc, mf); @@ -4922,13 +4110,15 @@ } else { SCSIIOReply_t *pReply; u16 status; + u8 scsi_status; pReply = (SCSIIOReply_t *) mr; status = le16_to_cpu(pReply->IOCStatus) & MPI_IOCSTATUS_MASK; + scsi_status = pReply->SCSIStatus; ddvtprintk((KERN_NOTICE " IOCStatus=%04xh, SCSIState=%02xh, SCSIStatus=%02xh, IOCLogInfo=%08xh\n", - status, pReply->SCSIState, pReply->SCSIStatus, + status, pReply->SCSIState, scsi_status, le32_to_cpu(pReply->IOCLogInfo))); switch(status) { @@ -4973,7 +4163,7 @@ /* save sense data in global structure */ completionCode = MPT_SCANDV_SENSE; - hd->pLocal->scsiStatus = pReply->SCSIStatus; + hd->pLocal->scsiStatus = scsi_status; sense_data = ((u8 *)hd->ioc->sense_buf_pool + (req_idx * MPT_SENSE_BUFFER_ALLOC)); @@ -4984,7 +4174,7 @@ ddvprintk((KERN_NOTICE " Check Condition, sense ptr %p\n", sense_data)); } else if (pReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_FAILED) { - if (pReq->CDB[0] == CMD_Inquiry) + if (pReq->CDB[0] == INQUIRY) completionCode = MPT_SCANDV_ISSUE_SENSE; else completionCode = MPT_SCANDV_DID_RESET; @@ -4994,11 +4184,8 @@ else if (pReply->SCSIState & MPI_SCSI_STATE_TERMINATED) completionCode = MPT_SCANDV_DID_RESET; else { - /* If no error, this will be equivalent - * to MPT_SCANDV_GOOD - */ completionCode = MPT_SCANDV_GOOD; - hd->pLocal->scsiStatus = pReply->SCSIStatus; + hd->pLocal->scsiStatus = scsi_status; } break; @@ -5025,7 +4212,7 @@ */ wakeup: /* Free Chain buffers (will never chain) in scan or dv */ - //mptscsih_freeChainBuffers(hd, req_idx); + //mptscsih_freeChainBuffers(ioc, req_idx); /* * Wake up the original calling thread @@ -5197,7 +4384,7 @@ /* Set command specific information */ switch (cmd) { - case CMD_Inquiry: + case INQUIRY: cmdLen = 6; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; @@ -5205,13 +4392,13 @@ cmdTimeout = 10; break; - case CMD_TestUnitReady: + case TEST_UNIT_READY: cmdLen = 6; dir = MPI_SCSIIO_CONTROL_READ; cmdTimeout = 10; break; - case CMD_StartStopUnit: + case START_STOP: cmdLen = 6; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; @@ -5219,7 +4406,7 @@ cmdTimeout = 15; break; - case CMD_RequestSense: + case REQUEST_SENSE: cmdLen = 6; CDB[0] = cmd; CDB[4] = io->size; @@ -5227,7 +4414,7 @@ cmdTimeout = 10; break; - case CMD_ReadBuffer: + case READ_BUFFER: cmdLen = 10; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; @@ -5246,7 +4433,7 @@ cmdTimeout = 10; break; - case CMD_WriteBuffer: + case WRITE_BUFFER: cmdLen = 10; dir = MPI_SCSIIO_CONTROL_WRITE; CDB[0] = cmd; @@ -5261,21 +4448,21 @@ cmdTimeout = 10; break; - case CMD_Reserve6: + case RESERVE: cmdLen = 6; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; cmdTimeout = 10; break; - case CMD_Release6: + case RELEASE: cmdLen = 6; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; cmdTimeout = 10; break; - case CMD_SynchronizeCache: + case SYNCHRONIZE_CACHE: cmdLen = 10; dir = MPI_SCSIIO_CONTROL_READ; CDB[0] = cmd; @@ -5331,7 +4518,7 @@ else pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED); - if (cmd == CMD_RequestSense) { + if (cmd == REQUEST_SENSE) { pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED); ddvprintk((MYIOC_s_INFO_FMT "Untagged! 0x%2x\n", hd->ioc->name, cmd)); @@ -5439,7 +4626,7 @@ /* Following parameters will not change * in this routine. */ - iocmd.cmd = CMD_SynchronizeCache; + iocmd.cmd = SYNCHRONIZE_CACHE; iocmd.flags = 0; iocmd.physDiskNum = -1; iocmd.data = NULL; @@ -5509,6 +4696,9 @@ /* Force to async, narrow */ mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested, &configuration, flags); + dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC " + "offset=0 negoFlags=%x request=%x config=%x\n", + id, flags, requested, configuration)); pcfg1Data->RequestedParameters = le32_to_cpu(requested); pcfg1Data->Reserved = 0; pcfg1Data->Configuration = le32_to_cpu(configuration); @@ -5597,8 +4787,7 @@ } spin_unlock_irqrestore(&dvtaskQ_lock, flags); - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/4); + msleep(250); /* DV only to SCSI adapters */ if ((int)ioc->chip_type <= (int)FC929) @@ -5646,8 +4835,7 @@ hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_PENDING; hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV; - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/4); + msleep(250); /* If hidden phys disk, block IO's to all * raid volumes @@ -5681,11 +4869,6 @@ } } - /* Post OS IOs that were pended while - * DV running. - */ - post_pendingQ_commands(hd); - if (hd->ioc->spi_data.noQas) mptscsih_qas_check(hd, id); } @@ -5741,11 +4924,14 @@ if ((pTarget != NULL) && (!pTarget->raidVolume)) { if ((pTarget->negoFlags & hd->ioc->spi_data.noQas) == 0) { pTarget->negoFlags |= hd->ioc->spi_data.noQas; + dnegoprintk(("writeSDP1: id=%d flags=0\n", id)); mptscsih_writeSDP1(hd, 0, ii, 0); } } else { - if (mptscsih_is_phys_disk(hd->ioc, ii) == 1) + if (mptscsih_is_phys_disk(hd->ioc, ii) == 1) { + dnegoprintk(("writeSDP1: id=%d SCSICFG_USE_NVRAM\n", id)); mptscsih_writeSDP1(hd, 0, ii, MPT_SCSICFG_USE_NVRAM); + } } } return; @@ -5824,7 +5010,7 @@ lun = 0; bus = (u8) bus_number; ddvtprintk((MYIOC_s_NOTE_FMT - "DV started: bus=%d, id %d dv @ %p\n", + "DV started: bus=%d, id=%d dv @ %p\n", ioc->name, bus, id, &dv)); /* Prep DV structure @@ -5838,8 +5024,6 @@ */ dv.cmd = MPT_GET_NVRAM_VALS; mptscsih_dv_parms(hd, &dv, NULL); - if ((!dv.max.width) && (!dv.max.offset)) - return 0; /* Prep SCSI IO structure */ @@ -5851,15 +5035,6 @@ iocmd.rsvd = iocmd.rsvd2 = 0; pTarget = hd->Targets[id]; - if (pTarget && (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) { - /* Another GEM workaround. Check peripheral device type, - * if PROCESSOR, quit DV. - */ - if (((pTarget->inq_data[0] & 0x1F) == 0x03) || ((pTarget->inq_data[0] & 0x1F) > 0x08)) { - pTarget->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC); - return 0; - } - } /* Use tagged commands if possible. */ @@ -5959,7 +5134,7 @@ /* Finish iocmd inititialization - hidden or visible disk? */ if (ioc->spi_data.pIocPg3) { - /* Searc IOC page 3 for matching id + /* Search IOC page 3 for matching id */ Ioc3PhysDisk_t *pPDisk = ioc->spi_data.pIocPg3->PhysDisk; int numPDisk = ioc->spi_data.pIocPg3->NumPhysDisks; @@ -6001,7 +5176,7 @@ */ hd->pLocal = NULL; readPage0 = 0; - sz = SCSI_STD_INQUIRY_BYTES; + sz = SCSI_MAX_INQUIRY_BYTES; rc = MPT_SCANDV_GOOD; while (1) { ddvprintk((MYIOC_s_NOTE_FMT "DV: Start Basic test on id=%d\n", ioc->name, id)); @@ -6026,7 +5201,7 @@ ((hd->ioc->facts.FWVersion.Word >= 0x01010000) && (hd->ioc->facts.FWVersion.Word < 0x01010B00)) ) { - iocmd.cmd = CMD_RequestSense; + iocmd.cmd = REQUEST_SENSE; iocmd.data_dma = buf1_dma; iocmd.data = pbuf1; iocmd.size = 0x12; @@ -6046,10 +5221,11 @@ goto target_done; } - iocmd.cmd = CMD_Inquiry; + iocmd.cmd = INQUIRY; iocmd.data_dma = buf1_dma; iocmd.data = pbuf1; iocmd.size = sz; + memset(pbuf1, 0x00, sz); if (mptscsih_do_cmd(hd, &iocmd) < 0) goto target_done; else { @@ -6057,7 +5233,7 @@ goto target_done; rc = hd->pLocal->completion; if (rc == MPT_SCANDV_GOOD) { - if (hd->pLocal->scsiStatus == STS_BUSY) { + if (hd->pLocal->scsiStatus == SAM_STAT_BUSY) { if ((iocmd.flags & MPT_ICFLAG_TAGGED_CMD) == 0) retcode = 1; else @@ -6087,7 +5263,17 @@ /* Another GEM workaround. Check peripheral device type, * if PROCESSOR, quit DV. */ - if (((pbuf1[0] & 0x1F) == 0x03) || ((pbuf1[0] & 0x1F) > 0x08)) + if (inq0 == TYPE_PROCESSOR) { + mptscsih_initTarget(hd, + bus, + id, + lun, + pbuf1, + sz); + goto target_done; + } + + if (inq0 > 0x08) goto target_done; if (mptscsih_do_cmd(hd, &iocmd) < 0) @@ -6111,6 +5297,9 @@ if ((pbuf1[56] & 0x02) == 0) { pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS; hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; + ddvprintk((MYIOC_s_NOTE_FMT + "DV: Start Basic noQas on id=%d due to pbuf1[56]=%x\n", + ioc->name, id, pbuf1[56])); } } } @@ -6127,10 +5316,11 @@ if ((!dv.now.width) && (!dv.now.offset)) goto target_done; - iocmd.cmd = CMD_Inquiry; + iocmd.cmd = INQUIRY; iocmd.data_dma = buf2_dma; iocmd.data = pbuf2; iocmd.size = sz; + memset(pbuf2, 0x00, sz); if (mptscsih_do_cmd(hd, &iocmd) < 0) goto target_done; else if (hd->pLocal == NULL) @@ -6183,14 +5373,26 @@ if (memcmp(pbuf1, pbuf2, sz) != 0) { if (!firstPass) doFallback = 1; - } else + } else { + ddvprintk((MYIOC_s_NOTE_FMT + "DV:Inquiry compared id=%d, calling initTarget\n", ioc->name, id)); + hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE; + mptscsih_initTarget(hd, + bus, + id, + lun, + pbuf1, + sz); break; /* test complete */ + } } } else if (rc == MPT_SCANDV_ISSUE_SENSE) doFallback = 1; /* set fallback flag */ - else if ((rc == MPT_SCANDV_DID_RESET) || (rc == MPT_SCANDV_SENSE)) + else if ((rc == MPT_SCANDV_DID_RESET) || + (rc == MPT_SCANDV_SENSE) || + (rc == MPT_SCANDV_FALLBACK)) doFallback = 1; /* set fallback flag */ else goto target_done; @@ -6199,6 +5401,10 @@ } } ddvprintk((MYIOC_s_NOTE_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id)); + + if (driver_setup.dv == 0) + goto target_done; + inq0 = (*pbuf1) & 0x1F; /* Continue only for disks @@ -6222,7 +5428,7 @@ cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; cfg.dir = 1; - iocmd.cmd = CMD_TestUnitReady; + iocmd.cmd = TEST_UNIT_READY; iocmd.data_dma = -1; iocmd.data = NULL; iocmd.size = 0; @@ -6245,14 +5451,14 @@ "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, asc, ascq)); - if (skey == SK_UNIT_ATTENTION) + if (skey == UNIT_ATTENTION) notDone++; /* repeat */ - else if ((skey == SK_NOT_READY) && + else if ((skey == NOT_READY) && (asc == 0x04)&&(ascq == 0x01)) { /* wait then repeat */ mdelay (2000); notDone++; - } else if ((skey == SK_NOT_READY) && (asc == 0x3A)) { + } else if ((skey == NOT_READY) && (asc == 0x3A)) { /* no medium, try read test anyway */ notDone = 0; } else { @@ -6266,7 +5472,7 @@ goto target_done; } - iocmd.cmd = CMD_ReadBuffer; + iocmd.cmd = READ_BUFFER; iocmd.data_dma = buf1_dma; iocmd.data = pbuf1; iocmd.size = 4; @@ -6314,11 +5520,11 @@ ddvprintk((MYIOC_s_INFO_FMT "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, asc, ascq)); - if (skey == SK_ILLEGAL_REQUEST) { + if (skey == ILLEGAL_REQUEST) { notDone = 0; - } else if (skey == SK_UNIT_ATTENTION) { + } else if (skey == UNIT_ATTENTION) { notDone++; /* repeat */ - } else if ((skey == SK_NOT_READY) && + } else if ((skey == NOT_READY) && (asc == 0x04)&&(ascq == 0x01)) { /* wait then repeat */ mdelay (2000); @@ -6373,14 +5579,14 @@ for (patt = 0; patt < 4; patt++) { ddvprintk(("Pattern %d\n", patt)); if ((iocmd.flags & MPT_ICFLAG_RESERVED) && (iocmd.flags & MPT_ICFLAG_DID_RESET)) { - iocmd.cmd = CMD_TestUnitReady; + iocmd.cmd = TEST_UNIT_READY; iocmd.data_dma = -1; iocmd.data = NULL; iocmd.size = 0; if (mptscsih_do_cmd(hd, &iocmd) < 0) goto target_done; - iocmd.cmd = CMD_Release6; + iocmd.cmd = RELEASE; iocmd.data_dma = -1; iocmd.data = NULL; iocmd.size = 0; @@ -6402,7 +5608,7 @@ repeat = 5; while (repeat && (!(iocmd.flags & MPT_ICFLAG_RESERVED))) { - iocmd.cmd = CMD_Reserve6; + iocmd.cmd = RESERVE; iocmd.data_dma = -1; iocmd.data = NULL; iocmd.size = 0; @@ -6425,7 +5631,7 @@ ddvprintk(("SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", skey, asc, ascq)); - if ((skey == SK_NOT_READY) && (asc == 0x04)&& + if ((skey == NOT_READY) && (asc == 0x04)&& (ascq == 0x01)) { /* wait then repeat */ mdelay (2000); @@ -6444,7 +5650,7 @@ } mptscsih_fillbuf(pbuf1, sz, patt, 1); - iocmd.cmd = CMD_WriteBuffer; + iocmd.cmd = WRITE_BUFFER; iocmd.data_dma = buf1_dma; iocmd.data = pbuf1; iocmd.size = sz; @@ -6485,10 +5691,10 @@ ddvprintk((MYIOC_s_INFO_FMT "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, hd->pLocal->sense[12], hd->pLocal->sense[13])); - if (skey == SK_UNIT_ATTENTION) { + if (skey == UNIT_ATTENTION) { patt = -1; continue; - } else if (skey == SK_ILLEGAL_REQUEST) { + } else if (skey == ILLEGAL_REQUEST) { if (iocmd.flags & MPT_ICFLAG_ECHO) { if (dataBufSize >= bufsize) { iocmd.flags &= ~MPT_ICFLAG_ECHO; @@ -6506,7 +5712,7 @@ } } - iocmd.cmd = CMD_ReadBuffer; + iocmd.cmd = READ_BUFFER; iocmd.data_dma = buf2_dma; iocmd.data = pbuf2; iocmd.size = sz; @@ -6581,7 +5787,7 @@ ddvprintk((MYIOC_s_INFO_FMT "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey, hd->pLocal->sense[12], hd->pLocal->sense[13])); - if (skey == SK_UNIT_ATTENTION) { + if (skey == UNIT_ATTENTION) { patt = -1; continue; } @@ -6597,7 +5803,7 @@ target_done: if (iocmd.flags & MPT_ICFLAG_RESERVED) { - iocmd.cmd = CMD_Release6; + iocmd.cmd = RELEASE; iocmd.data_dma = -1; iocmd.data = NULL; iocmd.size = 0; @@ -6619,8 +5825,11 @@ if ((cfg.hdr != NULL) && (retcode == 0)){ /* If disk, not U320, disable QAS */ - if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) + if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) { hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS; + ddvprintk((MYIOC_s_NOTE_FMT + "noQas set due to id=%d has factor=%x\n", ioc->name, id, dv.now.factor)); + } dv.cmd = MPT_SAVE; mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); @@ -6649,8 +5858,8 @@ if (pDvBuf) pci_free_consistent(ioc->pcidev, dv_alloc, pDvBuf, dvbuf_dma); - ddvtprintk((MYIOC_s_INFO_FMT "DV Done.\n", - ioc->name)); + ddvtprintk((MYIOC_s_INFO_FMT "DV Done id=%d\n", + ioc->name, id)); return retcode; } @@ -6730,8 +5939,8 @@ dv->max.offset = offset; dv->max.factor = factor; dv->max.flags = negoFlags; - ddvprintk((" width %d, factor %x, offset %x flags %x\n", - width, factor, offset, negoFlags)); + ddvprintk((" id=%d width=%d factor=%x offset=%x flags=%x\n", + id, width, factor, offset, negoFlags)); break; case MPT_UPDATE_MAX: @@ -6749,8 +5958,8 @@ dv->now.width = dv->max.width; dv->now.offset = dv->max.offset; dv->now.factor = dv->max.factor; - ddvprintk(("width %d, factor %x, offset %x, flags %x\n", - dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); + ddvprintk(("id=%d width=%d factor=%x offset=%x flags=%x\n", + id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); break; case MPT_SET_MAX: @@ -6766,14 +5975,15 @@ if (pPage1) { mptscsih_setDevicePage1Flags (dv->now.width, dv->now.factor, dv->now.offset, &val, &configuration, dv->now.flags); + dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", + id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); pPage1->RequestedParameters = le32_to_cpu(val); pPage1->Reserved = 0; pPage1->Configuration = le32_to_cpu(configuration); - } - ddvprintk(("width %d, factor %x, offset %x request %x, config %x\n", - dv->now.width, dv->now.factor, dv->now.offset, val, configuration)); + ddvprintk(("id=%d width=%d factor=%x offset=%x flags=%x request=%x configuration=%x\n", + id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration)); break; case MPT_SET_MIN: @@ -6790,12 +6000,14 @@ if (pPage1) { mptscsih_setDevicePage1Flags (width, factor, offset, &val, &configuration, negoFlags); + dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n", + id, width, factor, offset, negoFlags, val, configuration)); pPage1->RequestedParameters = le32_to_cpu(val); pPage1->Reserved = 0; pPage1->Configuration = le32_to_cpu(configuration); } - ddvprintk(("width %d, factor %x, offset %x request %x config %x\n", - width, factor, offset, val, configuration)); + ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n", + id, width, factor, offset, val, configuration, negoFlags)); break; case MPT_FALLBACK: @@ -6855,6 +6067,7 @@ factor = MPT_ASYNC; } dv->max.flags |= MPT_TARGET_NO_NEGO_QAS; + dv->max.flags &= ~MPT_TAPE_NEGO_IDP; dv->now.width = width; dv->now.offset = offset; @@ -6865,21 +6078,23 @@ if (pPage1) { mptscsih_setDevicePage1Flags (width, factor, offset, &val, &configuration, dv->now.flags); + dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x flags=%x request=%x config=%x\n", + id, width, offset, factor, dv->now.flags, val, configuration)); pPage1->RequestedParameters = le32_to_cpu(val); pPage1->Reserved = 0; pPage1->Configuration = le32_to_cpu(configuration); } - ddvprintk(("Finish: offset %d, factor %x, width %d, request %x config %x\n", - dv->now.offset, dv->now.factor, dv->now.width, val, configuration)); + ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n", + id, dv->now.offset, dv->now.factor, dv->now.width, val, configuration)); break; case MPT_SAVE: ddvprintk((MYIOC_s_NOTE_FMT "Saving to Target structure: ", hd->ioc->name)); - ddvprintk(("offset %d, factor %x, width %d \n", - dv->now.offset, dv->now.factor, dv->now.width)); + ddvprintk(("id=%d width=%x factor=%x offset=%d flags=%x\n", + id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags)); /* Save these values to target structures * or overwrite nvram (phys disks only). diff -Nru a/drivers/message/fusion/scsi3.h b/drivers/message/fusion/scsi3.h --- a/drivers/message/fusion/scsi3.h 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,707 +0,0 @@ -/* - * linux/drivers/message/fusion/scsi3.h - * SCSI-3 definitions and macros. - * (Ultimately) SCSI-3 definitions; for now, inheriting - * SCSI-2 definitions. - * - * Copyright (c) 1996-2004 Steven J. Ralston - * Written By: Steven J. Ralston (19960517) - * (mailto:sjralston1@netscape.net) - * (mailto:mpt_linux_developer@lsil.com) - * - * $Id: scsi3.h,v 1.9 2002/02/27 18:45:02 sralston Exp $ - */ - -#ifndef SCSI3_H_INCLUDED -#define SCSI3_H_INCLUDED -/***************************************************************************/ - -/**************************************************************************** - * - * Includes - */ -#ifdef __KERNEL__ -#include -#else - #ifndef U_STUFF_DEFINED - #define U_STUFF_DEFINED - typedef unsigned char u8; - typedef unsigned short u16; - typedef unsigned int u32; - #endif -#endif - -/**************************************************************************** - * - * Defines - */ - -/* - * SCSI Commands - */ -#define CMD_TestUnitReady 0x00 -#define CMD_RezeroUnit 0x01 /* direct-access devices */ -#define CMD_Rewind 0x01 /* sequential-access devices */ -#define CMD_RequestSense 0x03 -#define CMD_FormatUnit 0x04 -#define CMD_ReassignBlock 0x07 -#define CMD_Read6 0x08 -#define CMD_Write6 0x0A -#define CMD_WriteFilemark 0x10 -#define CMD_Space 0x11 -#define CMD_Inquiry 0x12 -#define CMD_ModeSelect6 0x15 -#define CMD_ModeSense6 0x1A -#define CMD_Reserve6 0x16 -#define CMD_Release6 0x17 -#define CMD_Erase 0x19 -#define CMD_StartStopUnit 0x1b /* direct-access devices */ -#define CMD_LoadUnload 0x1b /* sequential-access devices */ -#define CMD_ReceiveDiagnostic 0x1C -#define CMD_SendDiagnostic 0x1D -#define CMD_ReadCapacity 0x25 -#define CMD_Read10 0x28 -#define CMD_Write10 0x2A -#define CMD_WriteVerify 0x2E -#define CMD_Verify 0x2F -#define CMD_SynchronizeCache 0x35 -#define CMD_ReadDefectData 0x37 -#define CMD_WriteBuffer 0x3B -#define CMD_ReadBuffer 0x3C -#define CMD_ReadLong 0x3E -#define CMD_LogSelect 0x4C -#define CMD_LogSense 0x4D -#define CMD_ModeSelect10 0x55 -#define CMD_Reserve10 0x56 -#define CMD_Release10 0x57 -#define CMD_ModeSense10 0x5A -#define CMD_PersistReserveIn 0x5E -#define CMD_PersistReserveOut 0x5F -#define CMD_ReportLuns 0xA0 - -/* - * Control byte field - */ -#define CONTROL_BYTE_NACA_BIT 0x04 -#define CONTROL_BYTE_Flag_BIT 0x02 -#define CONTROL_BYTE_Link_BIT 0x01 - -/* - * SCSI Messages - */ -#define MSG_COMPLETE 0x00 -#define MSG_EXTENDED 0x01 -#define MSG_SAVE_POINTERS 0x02 -#define MSG_RESTORE_POINTERS 0x03 -#define MSG_DISCONNECT 0x04 -#define MSG_IDERROR 0x05 -#define MSG_ABORT 0x06 -#define MSG_REJECT 0x07 -#define MSG_NOP 0x08 -#define MSG_PARITY_ERROR 0x09 -#define MSG_LINKED_CMD_COMPLETE 0x0a -#define MSG_LCMD_COMPLETE_W_FLG 0x0b -#define MSG_BUS_DEVICE_RESET 0x0c -#define MSG_ABORT_TAG 0x0d -#define MSG_CLEAR_QUEUE 0x0e -#define MSG_INITIATE_RECOVERY 0x0f - -#define MSG_RELEASE_RECOVRY 0x10 -#define MSG_TERMINATE_IO 0x11 - -#define MSG_SIMPLE_QUEUE 0x20 -#define MSG_HEAD_OF_QUEUE 0x21 -#define MSG_ORDERED_QUEUE 0x22 -#define MSG_IGNORE_WIDE_RESIDUE 0x23 - -#define MSG_IDENTIFY 0x80 -#define MSG_IDENTIFY_W_DISC 0xc0 - -/* - * SCSI Phases - */ -#define PHS_DATA_OUT 0x00 -#define PHS_DATA_IN 0x01 -#define PHS_COMMAND 0x02 -#define PHS_STATUS 0x03 -#define PHS_MSG_OUT 0x06 -#define PHS_MSG_IN 0x07 - -/* - * Statuses - */ -#define STS_GOOD 0x00 -#define STS_CHECK_CONDITION 0x02 -#define STS_CONDITION_MET 0x04 -#define STS_BUSY 0x08 -#define STS_INTERMEDIATE 0x10 -#define STS_INTERMEDIATE_CONDITION_MET 0x14 -#define STS_RESERVATION_CONFLICT 0x18 -#define STS_COMMAND_TERMINATED 0x22 -#define STS_TASK_SET_FULL 0x28 -#define STS_QUEUE_FULL 0x28 -#define STS_ACA_ACTIVE 0x30 - -#define STS_VALID_MASK 0x3e - -#define SCSI_STATUS(x) ((x) & STS_VALID_MASK) - -/* - * SCSI QTag Types - */ -#define QTAG_SIMPLE 0x20 -#define QTAG_HEAD_OF_Q 0x21 -#define QTAG_ORDERED 0x22 - -/* - * SCSI Sense Key Definitons - */ -#define SK_NO_SENSE 0x00 -#define SK_RECOVERED_ERROR 0x01 -#define SK_NOT_READY 0x02 -#define SK_MEDIUM_ERROR 0x03 -#define SK_HARDWARE_ERROR 0x04 -#define SK_ILLEGAL_REQUEST 0x05 -#define SK_UNIT_ATTENTION 0x06 -#define SK_DATA_PROTECT 0x07 -#define SK_BLANK_CHECK 0x08 -#define SK_VENDOR_SPECIFIC 0x09 -#define SK_COPY_ABORTED 0x0a -#define SK_ABORTED_COMMAND 0x0b -#define SK_EQUAL 0x0c -#define SK_VOLUME_OVERFLOW 0x0d -#define SK_MISCOMPARE 0x0e -#define SK_RESERVED 0x0f - - - -#define SCSI_MAX_INQUIRY_BYTES 96 -#define SCSI_STD_INQUIRY_BYTES 36 - -#undef USE_SCSI_COMPLETE_INQDATA -/* - * Structure definition for SCSI Inquiry Data - * - * NOTE: The following structure is 96 bytes in size - * iff USE_SCSI_COMPLETE_INQDATA IS defined above (i.e. w/ "#define"). - * If USE_SCSI_COMPLETE_INQDATA is NOT defined above (i.e. w/ "#undef") - * then the following structure is only 36 bytes in size. - * THE CHOICE IS YOURS! - */ -typedef struct SCSI_Inquiry_Data -{ -#ifdef USE_SCSI_COMPLETE_INQDATA - u8 InqByte[SCSI_MAX_INQUIRY_BYTES]; -#else - u8 InqByte[SCSI_STD_INQUIRY_BYTES]; -#endif - -/* - * the following structure works only for little-endian (Intel, - * LSB first (1234) byte order) systems with 4-byte ints. - * - u32 Periph_Device_Type : 5, - Periph_Qualifier : 3, - Device_Type_Modifier : 7, - Removable_Media : 1, - ANSI_Version : 3, - ECMA_Version : 3, - ISO_Version : 2, - Response_Data_Format : 4, - reserved_0 : 3, - AERC : 1 ; - u32 Additional_Length : 8, - reserved_1 :16, - SftReset : 1, - CmdQue : 1, - reserved_2 : 1, - Linked : 1, - Sync : 1, - WBus16 : 1, - WBus32 : 1, - RelAdr : 1 ; - u8 Vendor_ID[8]; - u8 Product_ID[16]; - u8 Revision_Level [4]; -#ifdef USE_SCSI_COMPLETE_INQDATA - u8 Vendor_Specific[20]; - u8 reserved_3[40]; -#endif - * - */ - -} SCSI_Inquiry_Data_t; - -#define INQ_PERIPHINFO_BYTE 0 -#define INQ_Periph_Qualifier_MASK 0xe0 -#define INQ_Periph_Device_Type_MASK 0x1f - -#define INQ_Peripheral_Qualifier(inqp) \ - (int)((*((u8*)(inqp)+INQ_PERIPHINFO_BYTE) & INQ_Periph_Qualifier_MASK) >> 5) -#define INQ_Peripheral_Device_Type(inqp) \ - (int)(*((u8*)(inqp)+INQ_PERIPHINFO_BYTE) & INQ_Periph_Device_Type_MASK) - - -#define INQ_DEVTYPEMOD_BYTE 1 -#define INQ_RMB_BIT 0x80 -#define INQ_Device_Type_Modifier_MASK 0x7f - -#define INQ_Removable_Medium(inqp) \ - (int)(*((u8*)(inqp)+INQ_DEVTYPEMOD_BYTE) & INQ_RMB_BIT) -#define INQ_Device_Type_Modifier(inqp) \ - (int)(*((u8*)(inqp)+INQ_DEVTYPEMOD_BYTE) & INQ_Device_Type_Modifier_MASK) - - -#define INQ_VERSIONINFO_BYTE 2 -#define INQ_ISO_Version_MASK 0xc0 -#define INQ_ECMA_Version_MASK 0x38 -#define INQ_ANSI_Version_MASK 0x07 - -#define INQ_ISO_Version(inqp) \ - (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ISO_Version_MASK) -#define INQ_ECMA_Version(inqp) \ - (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ECMA_Version_MASK) -#define INQ_ANSI_Version(inqp) \ - (int)(*((u8*)(inqp)+INQ_VERSIONINFO_BYTE) & INQ_ANSI_Version_MASK) - - -#define INQ_BYTE3 3 -#define INQ_AERC_BIT 0x80 -#define INQ_TrmTsk_BIT 0x40 -#define INQ_NormACA_BIT 0x20 -#define INQ_RDF_MASK 0x0F - -#define INQ_AER_Capable(inqp) \ - (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_AERC_BIT) -#define INQ_TrmTsk(inqp) \ - (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_TrmTsk_BIT) -#define INQ_NormACA(inqp) \ - (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_NormACA_BIT) -#define INQ_Response_Data_Format(inqp) \ - (int)(*((u8*)(inqp)+INQ_BYTE3) & INQ_RDF_MASK) - - -#define INQ_CAPABILITY_BYTE 7 -#define INQ_RelAdr_BIT 0x80 -#define INQ_WBus32_BIT 0x40 -#define INQ_WBus16_BIT 0x20 -#define INQ_Sync_BIT 0x10 -#define INQ_Linked_BIT 0x08 - /* INQ_Reserved BIT 0x40 */ -#define INQ_CmdQue_BIT 0x02 -#define INQ_SftRe_BIT 0x01 - -#define IS_RelAdr_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_RelAdr_BIT) -#define IS_WBus32_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_WBus32_BIT) -#define IS_WBus16_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_WBus16_BIT) -#define IS_Sync_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Sync_BIT) -#define IS_Linked_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Linked_BIT) -#define IS_CmdQue_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_CmdQue_BIT) -#define IS_SftRe_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_SftRe_BIT) - -#define INQ_Width_BITS \ - (INQ_WBus32_BIT | INQ_WBus16_BIT) -#define IS_Wide_DEV(inqp) \ - (int)(*((u8*)(inqp)+INQ_CAPABILITY_BYTE) & INQ_Width_BITS) - - -/* - * SCSI peripheral device types - */ -#define SCSI_TYPE_DAD 0x00 /* Direct Access Device */ -#define SCSI_TYPE_SAD 0x01 /* Sequential Access Device */ -#define SCSI_TYPE_TAPE SCSI_TYPE_SAD -#define SCSI_TYPE_PRT 0x02 /* Printer */ -#define SCSI_TYPE_PROC 0x03 /* Processor */ -#define SCSI_TYPE_WORM 0x04 -#define SCSI_TYPE_CDROM 0x05 -#define SCSI_TYPE_SCAN 0x06 /* Scanner */ -#define SCSI_TYPE_OPTICAL 0x07 /* Magneto/Optical */ -#define SCSI_TYPE_CHANGER 0x08 -#define SCSI_TYPE_COMM 0x09 /* Communications device */ -#define SCSI_TYPE_UNKNOWN 0x1f -#define SCSI_TYPE_UNCONFIGURED_LUN 0x7f - -#define SCSI_TYPE_MAX_KNOWN SCSI_TYPE_COMM - -/* - * Peripheral Qualifiers - */ -#define DEVICE_PRESENT 0x00 -#define LUN_NOT_PRESENT 0x01 -#define LUN_NOT_SUPPORTED 0x03 - -/* - * ANSI Versions - */ -#ifndef SCSI_1 -#define SCSI_1 0x01 -#endif -#ifndef SCSI_2 -#define SCSI_2 0x02 -#endif -#ifndef SCSI_3 -#define SCSI_3 0x03 -#endif - - -#define SCSI_MAX_SENSE_BYTES 255 -#define SCSI_STD_SENSE_BYTES 18 -#define SCSI_PAD_SENSE_BYTES (SCSI_MAX_SENSE_BYTES - SCSI_STD_SENSE_BYTES) - -#undef USE_SCSI_COMPLETE_SENSE -/* - * Structure definition for SCSI Sense Data - * - * NOTE: The following structure is 255 bytes in size - * iiff USE_SCSI_COMPLETE_SENSE IS defined above (i.e. w/ "#define"). - * If USE_SCSI_COMPLETE_SENSE is NOT defined above (i.e. w/ "#undef") - * then the following structure is only 19 bytes in size. - * THE CHOICE IS YOURS! - * - */ -typedef struct SCSI_Sense_Data -{ -#ifdef USE_SCSI_COMPLETE_SENSE - u8 SenseByte[SCSI_MAX_SENSE_BYTES]; -#else - u8 SenseByte[SCSI_STD_SENSE_BYTES]; -#endif - -/* - * the following structure works only for little-endian (Intel, - * LSB first (1234) byte order) systems with 4-byte ints. - * - u8 Error_Code :4, // 0x00 - Error_Class :3, - Valid :1 - ; - u8 Segment_Number // 0x01 - ; - u8 Sense_Key :4, // 0x02 - Reserved :1, - Incorrect_Length_Indicator:1, - End_Of_Media :1, - Filemark :1 - ; - u8 Information_MSB; // 0x03 - u8 Information_Byte2; // 0x04 - u8 Information_Byte1; // 0x05 - u8 Information_LSB; // 0x06 - u8 Additional_Length; // 0x07 - - u32 Command_Specific_Information; // 0x08 - 0x0b - - u8 Additional_Sense_Code; // 0x0c - u8 Additional_Sense_Code_Qualifier; // 0x0d - u8 Field_Replaceable_Unit_Code; // 0x0e - u8 Illegal_Req_Bit_Pointer :3, // 0x0f - Illegal_Req_Bit_Valid :1, - Illegal_Req_Reserved :2, - Illegal_Req_Cmd_Data :1, - Sense_Key_Specific_Valid :1 - ; - u16 Sense_Key_Specific_Data; // 0x10 - 0x11 - -#ifdef USE_SCSI_COMPLETE_SENSE - u8 Additional_Sense_Data[SCSI_PAD_SENSE_BYTES]; -#else - u8 Additional_Sense_Data[1]; -#endif - * - */ - -} SCSI_Sense_Data_t; - - -#define SD_ERRCODE_BYTE 0 -#define SD_Valid_BIT 0x80 -#define SD_Error_Code_MASK 0x7f -#define SD_Valid(sdp) \ - (int)(*((u8*)(sdp)+SD_ERRCODE_BYTE) & SD_Valid_BIT) -#define SD_Error_Code(sdp) \ - (int)(*((u8*)(sdp)+SD_ERRCODE_BYTE) & SD_Error_Code_MASK) - - -#define SD_SEGNUM_BYTE 1 -#define SD_Segment_Number(sdp) (int)(*((u8*)(sdp)+SD_SEGNUM_BYTE)) - - -#define SD_SENSEKEY_BYTE 2 -#define SD_Filemark_BIT 0x80 -#define SD_EOM_BIT 0x40 -#define SD_ILI_BIT 0x20 -#define SD_Sense_Key_MASK 0x0f -#define SD_Filemark(sdp) \ - (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_Filemark_BIT) -#define SD_EOM(sdp) \ - (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_EOM_BIT) -#define SD_ILI(sdp) \ - (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_ILI_BIT) -#define SD_Sense_Key(sdp) \ - (int)(*((u8*)(sdp)+SD_SENSEKEY_BYTE) & SD_Sense_Key_MASK) - - -#define SD_INFO3_BYTE 3 -#define SD_INFO2_BYTE 4 -#define SD_INFO1_BYTE 5 -#define SD_INFO0_BYTE 6 -#define SD_Information3(sdp) (int)(*((u8*)(sdp)+SD_INFO3_BYTE)) -#define SD_Information2(sdp) (int)(*((u8*)(sdp)+SD_INFO2_BYTE)) -#define SD_Information1(sdp) (int)(*((u8*)(sdp)+SD_INFO1_BYTE)) -#define SD_Information0(sdp) (int)(*((u8*)(sdp)+SD_INFO0_BYTE)) - - -#define SD_ADDL_LEN_BYTE 7 -#define SD_Additional_Sense_Length(sdp) \ - (int)(*((u8*)(sdp)+SD_ADDL_LEN_BYTE)) -#define SD_Addl_Sense_Len SD_Additional_Sense_Length - - -#define SD_CMD_SPECIFIC3_BYTE 8 -#define SD_CMD_SPECIFIC2_BYTE 9 -#define SD_CMD_SPECIFIC1_BYTE 10 -#define SD_CMD_SPECIFIC0_BYTE 11 -#define SD_Cmd_Specific_Info3(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC3_BYTE)) -#define SD_Cmd_Specific_Info2(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC2_BYTE)) -#define SD_Cmd_Specific_Info1(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC1_BYTE)) -#define SD_Cmd_Specific_Info0(sdp) (int)(*((u8*)(sdp)+SD_CMD_SPECIFIC0_BYTE)) - - -#define SD_ADDL_SENSE_CODE_BYTE 12 -#define SD_Additional_Sense_Code(sdp) \ - (int)(*((u8*)(sdp)+SD_ADDL_SENSE_CODE_BYTE)) -#define SD_Addl_Sense_Code SD_Additional_Sense_Code -#define SD_ASC SD_Additional_Sense_Code - - -#define SD_ADDL_SENSE_CODE_QUAL_BYTE 13 -#define SD_Additional_Sense_Code_Qualifier(sdp) \ - (int)(*((u8*)(sdp)+SD_ADDL_SENSE_CODE_QUAL_BYTE)) -#define SD_Addl_Sense_Code_Qual SD_Additional_Sense_Code_Qualifier -#define SD_ASCQ SD_Additional_Sense_Code_Qualifier - - -#define SD_FIELD_REPL_UNIT_CODE_BYTE 14 -#define SD_Field_Replaceable_Unit_Code(sdp) \ - (int)(*((u8*)(sdp)+SD_FIELD_REPL_UNIT_CODE_BYTE)) -#define SD_Field_Repl_Unit_Code SD_Field_Replaceable_Unit_Code -#define SD_FRUC SD_Field_Replaceable_Unit_Code -#define SD_FRU SD_Field_Replaceable_Unit_Code - - -/* - * Sense-Key Specific offsets and macros. - */ -#define SD_SKS2_BYTE 15 -#define SD_SKS_Valid_BIT 0x80 -#define SD_SKS_Cmd_Data_BIT 0x40 -#define SD_SKS_Bit_Ptr_Valid_BIT 0x08 -#define SD_SKS_Bit_Ptr_MASK 0x07 -#define SD_SKS1_BYTE 16 -#define SD_SKS0_BYTE 17 -#define SD_Sense_Key_Specific_Valid(sdp) \ - (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Valid_BIT) -#define SD_SKS_Valid SD_Sense_Key_Specific_Valid -#define SD_SKS_CDB_Error(sdp) \ - (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Cmd_Data_BIT) -#define SD_Was_Illegal_Request SD_SKS_CDB_Error -#define SD_SKS_Bit_Pointer_Valid(sdp) \ - (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Bit_Ptr_Valid_BIT) -#define SD_SKS_Bit_Pointer(sdp) \ - (int)(*((u8*)(sdp)+SD_SKS2_BYTE) & SD_SKS_Bit_Ptr_MASK) -#define SD_Field_Pointer(sdp) \ - (int)( ((u16)(*((u8*)(sdp)+SD_SKS1_BYTE)) << 8) \ - + *((u8*)(sdp)+SD_SKS0_BYTE) ) -#define SD_Bad_Byte SD_Field_Pointer -#define SD_Actual_Retry_Count SD_Field_Pointer -#define SD_Progress_Indication SD_Field_Pointer - -/* - * Mode Sense Write Protect Mask - */ -#define WRITE_PROTECT_MASK 0X80 - -/* - * Medium Type Codes - */ -#define OPTICAL_DEFAULT 0x00 -#define OPTICAL_READ_ONLY_MEDIUM 0x01 -#define OPTICAL_WRITE_ONCE_MEDIUM 0x02 -#define OPTICAL_READ_WRITABLE_MEDIUM 0x03 -#define OPTICAL_RO_OR_WO_MEDIUM 0x04 -#define OPTICAL_RO_OR_RW_MEDIUM 0x05 -#define OPTICAL_WO_OR_RW_MEDIUM 0x06 - - - -/* - * Structure definition for READ6, WRITE6 (6-byte CDB) - */ -typedef struct SCSI_RW6_CDB -{ - u32 OpCode :8, - LBA_HI :5, /* 5 MSBit's of the LBA */ - Lun :3, - LBA_MID :8, /* NOTE: total of 21 bits in LBA */ - LBA_LO :8 ; /* Max LBA = 0x001fffff */ - u8 BlockCount; - u8 Control; -} SCSI_RW6_t; - -#define MAX_RW6_LBA ((u32)0x001fffff) - -/* - * Structure definition for READ10, WRITE10 (10-byte CDB) - * - * NOTE: ParityCheck bit is applicable only for VERIFY and WRITE VERIFY for - * the ADP-92 DAC only. In the SCSI2 spec. this same bit is defined as a - * FUA (forced unit access) bit for READs and WRITEs. Since this driver - * does not use the FUA, this bit is defined as it is used by the ADP-92. - * Also, for READ CAPACITY, only the OpCode field is used. - */ -typedef struct SCSI_RW10_CDB -{ - u8 OpCode; - u8 Reserved1; - u32 LBA; - u8 Reserved2; - u16 BlockCount; - u8 Control; -} SCSI_RW10_t; - -#define PARITY_CHECK 0x08 /* parity check bit - byte[1], bit 3 */ - - /* - * Structure definition for data returned by READ CAPACITY cmd; - * READ CAPACITY data - */ - typedef struct READ_CAP_DATA - { - u32 MaxLBA; - u32 BlockBytes; - } SCSI_READ_CAP_DATA_t, *pSCSI_READ_CAP_DATA_t; - - -/* - * Structure definition for FORMAT UNIT CDB (6-byte CDB) - */ -typedef struct _SCSI_FORMAT_UNIT -{ - u8 OpCode; - u8 Reserved1; - u8 VendorSpecific; - u16 Interleave; - u8 Control; -} SCSI_FORMAT_UNIT_t; - -/* - * Structure definition for REQUEST SENSE (6-byte CDB) - */ -typedef struct _SCSI_REQUEST_SENSE -{ - u8 OpCode; - u8 Reserved1; - u8 Reserved2; - u8 Reserved3; - u8 AllocLength; - u8 Control; -} SCSI_REQ_SENSE_t; - -/* - * Structure definition for REPORT LUNS (12-byte CDB) - */ -typedef struct _SCSI_REPORT_LUNS -{ - u8 OpCode; - u8 Reserved1[5]; - u32 AllocationLength; - u8 Reserved2; - u8 Control; -} SCSI_REPORT_LUNS_t, *pSCSI_REPORT_LUNS_t; - - /* - * (per-level) LUN information bytes - */ -/* - * Following doesn't work on ARMCC compiler - * [apparently] because it pads every struct - * to be multiple of 4 bytes! - * So SCSI_LUN_LEVELS_t winds up being 16 - * bytes instead of 8! - * - typedef struct LUN_INFO - { - u8 AddrMethod_plus_LunOrBusNumber; - u8 LunOrTarget; - } SCSI_LUN_INFO_t, *pSCSI_LUN_INFO_t; - - typedef struct LUN_LEVELS - { - SCSI_LUN_INFO_t LUN_0; - SCSI_LUN_INFO_t LUN_1; - SCSI_LUN_INFO_t LUN_2; - SCSI_LUN_INFO_t LUN_3; - } SCSI_LUN_LEVELS_t, *pSCSI_LUN_LEVELS_t; -*/ - /* - * All 4 levels (8 bytes) of LUN information - */ - typedef struct LUN_LEVELS - { - u8 LVL1_AddrMethod_plus_LunOrBusNumber; - u8 LVL1_LunOrTarget; - u8 LVL2_AddrMethod_plus_LunOrBusNumber; - u8 LVL2_LunOrTarget; - u8 LVL3_AddrMethod_plus_LunOrBusNumber; - u8 LVL3_LunOrTarget; - u8 LVL4_AddrMethod_plus_LunOrBusNumber; - u8 LVL4_LunOrTarget; - } SCSI_LUN_LEVELS_t, *pSCSI_LUN_LEVELS_t; - - /* - * Structure definition for data returned by REPORT LUNS cmd; - * LUN reporting parameter list format - */ - typedef struct LUN_REPORT - { - u32 LunListLength; - u32 Reserved; - SCSI_LUN_LEVELS_t LunInfo[1]; - } SCSI_LUN_REPORT_t, *pSCSI_LUN_REPORT_t; - -/**************************************************************************** - * - * Externals - */ - -/**************************************************************************** - * - * Public Typedefs & Related Defines - */ - -/**************************************************************************** - * - * Macros (embedded, above) - */ - -/**************************************************************************** - * - * Public Variables - */ - -/**************************************************************************** - * - * Public Prototypes (module entry points) - */ - - -/***************************************************************************/ -#endif diff -Nru a/drivers/message/fusion/scsiops.c b/drivers/message/fusion/scsiops.c --- a/drivers/message/fusion/scsiops.c 2004-09-06 16:37:50 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,309 +0,0 @@ - -static const char *ScsiOpcodeString[256] = { - "TEST UNIT READY\0\01", /* 00h */ - "REWIND\0\002" - "\001REZERO UNIT", /* 01h */ - "\0\0", /* 02h */ - "REQUEST SENSE\0\01", /* 03h */ - "FORMAT UNIT\0\03" - "\001FORMAT MEDIUM\0" - "\002FORMAT", /* 04h */ - "READ BLOCK LIMITS\0\1", /* 05h */ - "\0\0", /* 06h */ - "REASSIGN BLOCKS\0\02" - "\010INITIALIZE ELEMENT STATUS", /* 07h */ - "READ(06)\0\04" - "\001READ\0" - "\003RECEIVE\0" - "\011GET MESSAGE(06)", /* 08h */ - "\0\0", /* 09h */ - "WRITE(06)\0\05" - "\001WRITE\0" - "\002PRINT\0" - "\003SEND(6)\0" - "\011SEND MESSAGE(06)", /* 0Ah */ - "SEEK(06)\0\02" - "\003SLEW AND PRINT", /* 0Bh */ - "\0\0", /* 0Ch */ - "\0\0", /* 0Dh */ - "\0\0", /* 0Eh */ - "READ REVERSE\0\01", /* 0Fh */ - "WRITE FILEMARKS\0\02" - "\003SYNCRONIZE BUFFER", /* 10h */ - "SPACE(6)\0\01", /* 11h */ - "INQUIRY\0\01", /* 12h */ - "VERIFY\0\01", /* 13h */ - "RECOVER BUFFERED DATA\0\01", /* 14h */ - "MODE SELECT(06)\0\01", /* 15h */ - "RESERVE(06)\0\02" - "\010RESERVE ELEMENT(06)", /* 16h */ - "RELEASE(06)\0\02" - "\010RELEASE ELEMENT(06)", /* 17h */ - "COPY\0\01", /* 18h */ - "ERASE\0\01", /* 19h */ - "MODE SENSE(06)\0\01", /* 1Ah */ - "STOP START UNIT\0\04" - "\001LOAD UNLOAD\0" - "\002STOP PRINT\0" - "\006SCAN\0\002", /* 1Bh */ - "RECEIVE DIAGNOSTIC RESULTS\0\01", /* 1Ch */ - "SEND DIAGNOSTIC\0\01", /* 1Dh */ - "PREVENT ALLOW MEDIUM REMOVAL\0\01", /* 1Eh */ - "\0\0", /* 1Fh */ - "\0\0", /* 20h */ - "\0\0", /* 21h */ - "\0\0", /* 22h */ - "READ FORMAT CAPACITIES\0\01", /* 23h */ - "SET WINDOW\0\01", /* 24h */ - "READ CAPACITY\0\03" - "\006GET WINDOW\0" - "\037FREAD CARD CAPACITY", /* 25h */ - "\0\0", /* 26h */ - "\0\0", /* 27h */ - "READ(10)\0\02" - "\011GET MESSAGE(10)", /* 28h */ - "READ GENERATION\0\01", /* 29h */ - "WRITE(10)\0\03" - "\011SEND(10)\0" - "\011SEND MESSAGE(10)", /* 2Ah */ - "SEEK(10)\0\03" - "LOCATE(10)\0" - "POSITION TO ELEMENT", /* 2Bh */ - "ERASE(10)\0\01", /* 2Ch */ - "READ UPDATED BLOCK\0\01", /* 2Dh */ - "WRITE AND VERIFY(10)\0\01", /* 2Eh */ - "VERIFY(10)\0\01", /* 2Fh */ - "SEARCH DATA HIGH(10)\0\01", /* 30h */ - "SEARCH DATA EQUAL(10)\0\02" - "OBJECT POSITION", /* 31h */ - "SEARCH DATA LOW(10)\0\01", /* 32h */ - "SET LIMITS(10)\0\01", /* 33h */ - "PRE-FETCH(10)\0\03" - "READ POSITION\0" - "GET DATA BUFFER STATUS", /* 34h */ - "SYNCHRONIZE CACHE(10)\0\01", /* 35h */ - "LOCK UNLOCK CACHE(10)\0\01", /* 36h */ - "READ DEFECT DATA(10)\0\01", /* 37h */ - "MEDIUM SCAN\0\01", /* 38h */ - "COMPARE\0\01", /* 39h */ - "COPY AND VERIFY\0\01", /* 3Ah */ - "WRITE BUFFER\0\01", /* 3Bh */ - "READ BUFFER\0\01", /* 3Ch */ - "UPDATE BLOCK\0\01", /* 3Dh */ - "READ LONG\0\01", /* 3Eh */ - "WRITE LONG\0\01", /* 3Fh */ - "CHANGE DEFINITION\0\01", /* 40h */ - "WRITE SAME(10)\0\01", /* 41h */ - "READ SUB-CHANNEL\0\01", /* 42h */ - "READ TOC/PMA/ATIP\0\01", /* 43h */ - "REPORT DENSITY SUPPORT\0\01", /* 44h */ - "READ HEADER\0\01", /* 44h */ - "PLAY AUDIO(10)\0\01", /* 45h */ - "GET CONFIGURATION\0\01", /* 46h */ - "PLAY AUDIO MSF\0\01", /* 47h */ - "PLAY AUDIO TRACK INDEX\0\01", /* 48h */ - "PLAY TRACK RELATIVE(10)\0\01", /* 49h */ - "GET EVENT STATUS NOTIFICATION\0\01", /* 4Ah */ - "PAUSE/RESUME\0\01", /* 4Bh */ - "LOG SELECT\0\01", /* 4Ch */ - "LOG SENSE\0\01", /* 4Dh */ - "STOP PLAY/SCAN\0\01", /* 4Eh */ - "\0\0", /* 4Fh */ - "XDWRITE(10)\0\01", /* 50h */ - "XPWRITE(10)\0\02" - "READ DISC INFORMATION", /* 51h */ - "XDREAD(10)\0\01" - "READ TRACK INFORMATION", /* 52h */ - "RESERVE TRACK\0\01", /* 53h */ - "SEND OPC INFORMATION\0\01", /* 54h */ - "MODE SELECT(10)\0\01", /* 55h */ - "RESERVE(10)\0\02" - "RESERVE ELEMENT(10)", /* 56h */ - "RELEASE(10)\0\02" - "RELEASE ELEMENT(10)", /* 57h */ - "REPAIR TRACK\0\01", /* 58h */ - "READ MASTER CUE\0\01", /* 59h */ - "MODE SENSE(10)\0\01", /* 5Ah */ - "CLOSE TRACK/SESSION\0\01", /* 5Bh */ - "READ BUFFER CAPACITY\0\01", /* 5Ch */ - "SEND CUE SHEET\0\01", /* 5Dh */ - "PERSISTENT RESERVE IN\0\01", /* 5Eh */ - "PERSISTENT RESERVE OUT\0\01", /* 5Fh */ - "\0\0", /* 60h */ - "\0\0", /* 61h */ - "\0\0", /* 62h */ - "\0\0", /* 63h */ - "\0\0", /* 64h */ - "\0\0", /* 65h */ - "\0\0", /* 66h */ - "\0\0", /* 67h */ - "\0\0", /* 68h */ - "\0\0", /* 69h */ - "\0\0", /* 6Ah */ - "\0\0", /* 6Bh */ - "\0\0", /* 6Ch */ - "\0\0", /* 6Dh */ - "\0\0", /* 6Eh */ - "\0\0", /* 6Fh */ - "\0\0", /* 70h */ - "\0\0", /* 71h */ - "\0\0", /* 72h */ - "\0\0", /* 73h */ - "\0\0", /* 74h */ - "\0\0", /* 75h */ - "\0\0", /* 76h */ - "\0\0", /* 77h */ - "\0\0", /* 78h */ - "\0\0", /* 79h */ - "\0\0", /* 7Ah */ - "\0\0", /* 7Bh */ - "\0\0", /* 7Ch */ - "\0\0", /* 7Eh */ - "\0\0", /* 7Eh */ - "\0\0", /* 7Fh */ - "XDWRITE EXTENDED(16)\0\01", /* 80h */ - "REBUILD(16)\0\01", /* 81h */ - "REGENERATE(16)\0\01", /* 82h */ - "EXTENDED COPY\0\01", /* 83h */ - "RECEIVE COPY RESULTS\0\01", /* 84h */ - "ACCESS CONTROL IN [proposed]\0\01", /* 86h */ - "ACCESS CONTROL OUT [proposed]\0\01", /* 87h */ - "READ(16)\0\01", /* 88h */ - "DEVICE LOCKS [proposed]\0\01", /* 89h */ - "WRITE(16)\0\01", /* 8Ah */ - "\0\0", /* 8Bh */ - "READ ATTRIBUTES [proposed]\0\01", /* 8Ch */ - "WRITE ATTRIBUTES [proposed]\0\01", /* 8Dh */ - "WRITE AND VERIFY(16)\0\01", /* 8Eh */ - "VERIFY(16)\0\01", /* 8Fh */ - "PRE-FETCH(16)\0\01", /* 90h */ - "SYNCHRONIZE CACHE(16)\0\02" - "SPACE(16) [1]", /* 91h */ - "LOCK UNLOCK CACHE(16)\0\02" - "LOCATE(16) [1]", /* 92h */ - "WRITE SAME(16)\0\01", /* 93h */ - "[usage proposed by SCSI Socket Services project]\0\01", /* 94h */ - "[usage proposed by SCSI Socket Services project]\0\01", /* 95h */ - "[usage proposed by SCSI Socket Services project]\0\01", /* 96h */ - "[usage proposed by SCSI Socket Services project]\0\01", /* 97h */ - "MARGIN CONTROL [proposed]\0\01", /* 98h */ - "\0\0", /* 99h */ - "\0\0", /* 9Ah */ - "\0\0", /* 9Bh */ - "\0\0", /* 9Ch */ - "\0\0", /* 9Dh */ - "SERVICE ACTION IN [proposed]\0\01", /* 9Eh */ - "SERVICE ACTION OUT [proposed]\0\01", /* 9Fh */ - "REPORT LUNS\0\01", /* A0h */ - "BLANK\0\01", /* A1h */ - "SEND EVENT\0\01", /* A2h */ - "MAINTENANCE (IN)\0\02" - "SEND KEY", /* A3h */ - "MAINTENANCE (OUT)\0\02" - "REPORT KEY", /* A4h */ - "MOVE MEDIUM\0\02" - "PLAY AUDIO(12)", /* A5h */ - "EXCHANGE MEDIUM\0\02" - "LOAD/UNLOAD C/DVD", /* A6h */ - "MOVE MEDIUM ATTACHED\0\02" - "SET READ AHEAD\0\01", /* A7h */ - "READ(12)\0\02" - "GET MESSAGE(12)", /* A8h */ - "PLAY TRACK RELATIVE(12)\0\01", /* A9h */ - "WRITE(12)\0\02" - "SEND MESSAGE(12)", /* AAh */ - "\0\0", /* ABh */ - "ERASE(12)\0\02" - "GET PERFORMANCE", /* ACh */ - "READ DVD STRUCTURE\0\01", /* ADh */ - "WRITE AND VERIFY(12)\0\01", /* AEh */ - "VERIFY(12)\0\01", /* AFh */ - "SEARCH DATA HIGH(12)\0\01", /* B0h */ - "SEARCH DATA EQUAL(12)\0\01", /* B1h */ - "SEARCH DATA LOW(12)\0\01", /* B2h */ - "SET LIMITS(12)\0\01", /* B3h */ - "READ ELEMENT STATUS ATTACHED\0\01", /* B4h */ - "REQUEST VOLUME ELEMENT ADDRESS\0\01", /* B5h */ - "SEND VOLUME TAG\0\02" - "SET STREAMING", /* B6h */ - "READ DEFECT DATA(12)\0\01", /* B7h */ - "READ ELEMENT STATUS\0\01", /* B8h */ - "READ CD MSF\0\01", /* B9h */ - "REDUNDANCY GROUP (IN)\0\02" - "SCAN", /* BAh */ - "REDUNDANCY GROUP (OUT)\0\02" - "SET CD-ROM SPEED", /* BBh */ - "SPARE (IN)\0\02" - "PLAY CD", /* BCh */ - "SPARE (OUT)\0\02" - "MECHANISM STATUS", /* BDh */ - "VOLUME SET (IN)\0\02" - "READ CD", /* BEh */ - "VOLUME SET (OUT)\0\0\02" - "SEND DVD STRUCTURE", /* BFh */ - "\0\0", /* C0h */ - "\0\0", /* C1h */ - "\0\0", /* C2h */ - "\0\0", /* C3h */ - "\0\0", /* C4h */ - "\0\0", /* C5h */ - "\0\0", /* C6h */ - "\0\0", /* C7h */ - "\0\0", /* C8h */ - "\0\0", /* C9h */ - "\0\0", /* CAh */ - "\0\0", /* CBh */ - "\0\0", /* CCh */ - "\0\0", /* CDh */ - "\0\0", /* CEh */ - "\0\0", /* CFh */ - "\0\0", /* D0h */ - "\0\0", /* D1h */ - "\0\0", /* D2h */ - "\0\0", /* D3h */ - "\0\0", /* D4h */ - "\0\0", /* D5h */ - "\0\0", /* D6h */ - "\0\0", /* D7h */ - "\0\0", /* D8h */ - "\0\0", /* D9h */ - "\0\0", /* DAh */ - "\0\0", /* DBh */ - "\0\0", /* DCh */ - "\0\0", /* DEh */ - "\0\0", /* DEh */ - "\0\0", /* DFh */ - "\0\0", /* E0h */ - "\0\0", /* E1h */ - "\0\0", /* E2h */ - "\0\0", /* E3h */ - "\0\0", /* E4h */ - "\0\0", /* E5h */ - "\0\0", /* E6h */ - "\0\0", /* E7h */ - "\0\0", /* E8h */ - "\0\0", /* E9h */ - "\0\0", /* EAh */ - "\0\0", /* EBh */ - "\0\0", /* ECh */ - "\0\0", /* EDh */ - "\0\0", /* EEh */ - "\0\0", /* EFh */ - "\0\0", /* F0h */ - "\0\0", /* F1h */ - "\0\0", /* F2h */ - "\0\0", /* F3h */ - "\0\0", /* F4h */ - "\0\0", /* F5h */ - "\0\0", /* F6h */ - "\0\0", /* F7h */ - "\0\0", /* F8h */ - "\0\0", /* F9h */ - "\0\0", /* FAh */ - "\0\0", /* FBh */ - "\0\0", /* FEh */ - "\0\0", /* FEh */ - "\0\0", /* FEh */ - "\0\0" /* FFh */ -}; - diff -Nru a/drivers/message/i2o/Makefile b/drivers/message/i2o/Makefile --- a/drivers/message/i2o/Makefile 2004-09-06 16:37:54 -07:00 +++ b/drivers/message/i2o/Makefile 2004-09-06 16:37:54 -07:00 @@ -5,6 +5,7 @@ # In the future, some of these should be built conditionally. # +i2o_core-y += iop.o driver.o device.o debug.o pci.o exec-osm.o obj-$(CONFIG_I2O) += i2o_core.o obj-$(CONFIG_I2O_CONFIG)+= i2o_config.o obj-$(CONFIG_I2O_BLOCK) += i2o_block.o diff -Nru a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/debug.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,571 @@ +#include +#include +#include +#include +#include + +static int verbose; +extern struct i2o_driver **i2o_drivers; +extern unsigned int i2o_max_drivers; +static void i2o_report_util_cmd(u8 cmd); +static void i2o_report_exec_cmd(u8 cmd); +void i2o_report_fail_status(u8 req_status, u32 * msg); +void i2o_report_common_status(u8 req_status); +static void i2o_report_common_dsc(u16 detailed_status); + +void i2o_dump_status_block(i2o_status_block * sb) +{ + pr_debug("Organization ID: %d\n", sb->org_id); + pr_debug("IOP ID: %d\n", sb->iop_id); + pr_debug("Host Unit ID: %d\n", sb->host_unit_id); + pr_debug("Segment Number: %d\n", sb->segment_number); + pr_debug("I2O Version: %d\n", sb->i2o_version); + pr_debug("IOP State: %d\n", sb->iop_state); + pr_debug("Messanger Type: %d\n", sb->msg_type); + pr_debug("Inbound Frame Size: %d\n", sb->inbound_frame_size); + pr_debug("Init Code: %d\n", sb->init_code); + pr_debug("Max Inbound MFrames: %d\n", sb->max_inbound_frames); + pr_debug("Current Inbound MFrames: %d\n", sb->cur_inbound_frames); + pr_debug("Max Outbound MFrames: %d\n", sb->max_outbound_frames); + pr_debug("Product ID String: %s\n", sb->product_id); + pr_debug("Expected LCT Size: %d\n", sb->expected_lct_size); + pr_debug("IOP Capabilities: %d\n", sb->iop_capabilities); + pr_debug("Desired Private MemSize: %d\n", sb->desired_mem_size); + pr_debug("Current Private MemSize: %d\n", sb->current_mem_size); + pr_debug("Current Private MemBase: %d\n", sb->current_mem_base); + pr_debug("Desired Private IO Size: %d\n", sb->desired_io_size); + pr_debug("Current Private IO Size: %d\n", sb->current_io_size); + pr_debug("Current Private IO Base: %d\n", sb->current_io_base); +}; + +/* + * Used for error reporting/debugging purposes. + * Report Cmd name, Request status, Detailed Status. + */ +void i2o_report_status(const char *severity, const char *str, + struct i2o_message *m) +{ + u32 *msg = (u32 *) m; + u8 cmd = (msg[1] >> 24) & 0xFF; + u8 req_status = (msg[4] >> 24) & 0xFF; + u16 detailed_status = msg[4] & 0xFFFF; + //struct i2o_driver *h = i2o_drivers[msg[2] & (i2o_max_drivers-1)]; + + if (cmd == I2O_CMD_UTIL_EVT_REGISTER) + return; // No status in this reply + + printk("%s%s: ", severity, str); + + if (cmd < 0x1F) // Utility cmd + i2o_report_util_cmd(cmd); + + else if (cmd >= 0xA0 && cmd <= 0xEF) // Executive cmd + i2o_report_exec_cmd(cmd); + else + printk("Cmd = %0#2x, ", cmd); // Other cmds + + if (msg[0] & MSG_FAIL) { + i2o_report_fail_status(req_status, msg); + return; + } + + i2o_report_common_status(req_status); + + if (cmd < 0x1F || (cmd >= 0xA0 && cmd <= 0xEF)) + i2o_report_common_dsc(detailed_status); + else + printk(" / DetailedStatus = %0#4x.\n", detailed_status); +} + +/* Used to dump a message to syslog during debugging */ +void i2o_dump_message(struct i2o_message *m) +{ +#ifdef DEBUG + u32 *msg = (u32 *) m; + int i; + printk(KERN_INFO "Dumping I2O message size %d @ %p\n", + msg[0] >> 16 & 0xffff, msg); + for (i = 0; i < ((msg[0] >> 16) & 0xffff); i++) + printk(KERN_INFO " msg[%d] = %0#10x\n", i, msg[i]); +#endif +} + +/** + * i2o_report_controller_unit - print information about a tid + * @c: controller + * @d: device + * + * Dump an information block associated with a given unit (TID). The + * tables are read and a block of text is output to printk that is + * formatted intended for the user. + */ + +void i2o_report_controller_unit(struct i2o_controller *c, struct i2o_device *d) +{ + char buf[64]; + char str[22]; + int ret; + + if (verbose == 0) + return; + + printk(KERN_INFO "Target ID %03x.\n", d->lct_data.tid); + if ((ret = i2o_parm_field_get(d, 0xF100, 3, buf, 16)) >= 0) { + buf[16] = 0; + printk(KERN_INFO " Vendor: %s\n", buf); + } + if ((ret = i2o_parm_field_get(d, 0xF100, 4, buf, 16)) >= 0) { + buf[16] = 0; + printk(KERN_INFO " Device: %s\n", buf); + } + if (i2o_parm_field_get(d, 0xF100, 5, buf, 16) >= 0) { + buf[16] = 0; + printk(KERN_INFO " Description: %s\n", buf); + } + if ((ret = i2o_parm_field_get(d, 0xF100, 6, buf, 8)) >= 0) { + buf[8] = 0; + printk(KERN_INFO " Rev: %s\n", buf); + } + + printk(KERN_INFO " Class: "); + //sprintf(str, "%-21s", i2o_get_class_name(d->lct_data.class_id)); + printk("%s\n", str); + + printk(KERN_INFO " Subclass: 0x%04X\n", d->lct_data.sub_class); + printk(KERN_INFO " Flags: "); + + if (d->lct_data.device_flags & (1 << 0)) + printk("C"); // ConfigDialog requested + if (d->lct_data.device_flags & (1 << 1)) + printk("U"); // Multi-user capable + if (!(d->lct_data.device_flags & (1 << 4))) + printk("P"); // Peer service enabled! + if (!(d->lct_data.device_flags & (1 << 5))) + printk("M"); // Mgmt service enabled! + printk("\n"); +} + +/* +MODULE_PARM(verbose, "i"); +MODULE_PARM_DESC(verbose, "Verbose diagnostics"); +*/ +/* + * Used for error reporting/debugging purposes. + * Following fail status are common to all classes. + * The preserved message must be handled in the reply handler. + */ +void i2o_report_fail_status(u8 req_status, u32 * msg) +{ + static char *FAIL_STATUS[] = { + "0x80", /* not used */ + "SERVICE_SUSPENDED", /* 0x81 */ + "SERVICE_TERMINATED", /* 0x82 */ + "CONGESTION", + "FAILURE", + "STATE_ERROR", + "TIME_OUT", + "ROUTING_FAILURE", + "INVALID_VERSION", + "INVALID_OFFSET", + "INVALID_MSG_FLAGS", + "FRAME_TOO_SMALL", + "FRAME_TOO_LARGE", + "INVALID_TARGET_ID", + "INVALID_INITIATOR_ID", + "INVALID_INITIATOR_CONTEX", /* 0x8F */ + "UNKNOWN_FAILURE" /* 0xFF */ + }; + + if (req_status == I2O_FSC_TRANSPORT_UNKNOWN_FAILURE) + printk("TRANSPORT_UNKNOWN_FAILURE (%0#2x)\n.", req_status); + else + printk("TRANSPORT_%s.\n", FAIL_STATUS[req_status & 0x0F]); + + /* Dump some details */ + + printk(KERN_ERR " InitiatorId = %d, TargetId = %d\n", + (msg[1] >> 12) & 0xFFF, msg[1] & 0xFFF); + printk(KERN_ERR " LowestVersion = 0x%02X, HighestVersion = 0x%02X\n", + (msg[4] >> 8) & 0xFF, msg[4] & 0xFF); + printk(KERN_ERR " FailingHostUnit = 0x%04X, FailingIOP = 0x%03X\n", + msg[5] >> 16, msg[5] & 0xFFF); + + printk(KERN_ERR " Severity: 0x%02X ", (msg[4] >> 16) & 0xFF); + if (msg[4] & (1 << 16)) + printk("(FormatError), " + "this msg can never be delivered/processed.\n"); + if (msg[4] & (1 << 17)) + printk("(PathError), " + "this msg can no longer be delivered/processed.\n"); + if (msg[4] & (1 << 18)) + printk("(PathState), " + "the system state does not allow delivery.\n"); + if (msg[4] & (1 << 19)) + printk("(Congestion), resources temporarily not available;" + "do not retry immediately.\n"); +} + +/* + * Used for error reporting/debugging purposes. + * Following reply status are common to all classes. + */ +void i2o_report_common_status(u8 req_status) +{ + static char *REPLY_STATUS[] = { + "SUCCESS", + "ABORT_DIRTY", + "ABORT_NO_DATA_TRANSFER", + "ABORT_PARTIAL_TRANSFER", + "ERROR_DIRTY", + "ERROR_NO_DATA_TRANSFER", + "ERROR_PARTIAL_TRANSFER", + "PROCESS_ABORT_DIRTY", + "PROCESS_ABORT_NO_DATA_TRANSFER", + "PROCESS_ABORT_PARTIAL_TRANSFER", + "TRANSACTION_ERROR", + "PROGRESS_REPORT" + }; + + if (req_status >= ARRAY_SIZE(REPLY_STATUS)) + printk("RequestStatus = %0#2x", req_status); + else + printk("%s", REPLY_STATUS[req_status]); +} + +/* + * Used for error reporting/debugging purposes. + * Following detailed status are valid for executive class, + * utility class, DDM class and for transaction error replies. + */ +static void i2o_report_common_dsc(u16 detailed_status) +{ + static char *COMMON_DSC[] = { + "SUCCESS", + "0x01", // not used + "BAD_KEY", + "TCL_ERROR", + "REPLY_BUFFER_FULL", + "NO_SUCH_PAGE", + "INSUFFICIENT_RESOURCE_SOFT", + "INSUFFICIENT_RESOURCE_HARD", + "0x08", // not used + "CHAIN_BUFFER_TOO_LARGE", + "UNSUPPORTED_FUNCTION", + "DEVICE_LOCKED", + "DEVICE_RESET", + "INAPPROPRIATE_FUNCTION", + "INVALID_INITIATOR_ADDRESS", + "INVALID_MESSAGE_FLAGS", + "INVALID_OFFSET", + "INVALID_PARAMETER", + "INVALID_REQUEST", + "INVALID_TARGET_ADDRESS", + "MESSAGE_TOO_LARGE", + "MESSAGE_TOO_SMALL", + "MISSING_PARAMETER", + "TIMEOUT", + "UNKNOWN_ERROR", + "UNKNOWN_FUNCTION", + "UNSUPPORTED_VERSION", + "DEVICE_BUSY", + "DEVICE_NOT_AVAILABLE" + }; + + if (detailed_status > I2O_DSC_DEVICE_NOT_AVAILABLE) + printk(" / DetailedStatus = %0#4x.\n", detailed_status); + else + printk(" / %s.\n", COMMON_DSC[detailed_status]); +} + +/* + * Used for error reporting/debugging purposes + */ +static void i2o_report_util_cmd(u8 cmd) +{ + switch (cmd) { + case I2O_CMD_UTIL_NOP: + printk("UTIL_NOP, "); + break; + case I2O_CMD_UTIL_ABORT: + printk("UTIL_ABORT, "); + break; + case I2O_CMD_UTIL_CLAIM: + printk("UTIL_CLAIM, "); + break; + case I2O_CMD_UTIL_RELEASE: + printk("UTIL_CLAIM_RELEASE, "); + break; + case I2O_CMD_UTIL_CONFIG_DIALOG: + printk("UTIL_CONFIG_DIALOG, "); + break; + case I2O_CMD_UTIL_DEVICE_RESERVE: + printk("UTIL_DEVICE_RESERVE, "); + break; + case I2O_CMD_UTIL_DEVICE_RELEASE: + printk("UTIL_DEVICE_RELEASE, "); + break; + case I2O_CMD_UTIL_EVT_ACK: + printk("UTIL_EVENT_ACKNOWLEDGE, "); + break; + case I2O_CMD_UTIL_EVT_REGISTER: + printk("UTIL_EVENT_REGISTER, "); + break; + case I2O_CMD_UTIL_LOCK: + printk("UTIL_LOCK, "); + break; + case I2O_CMD_UTIL_LOCK_RELEASE: + printk("UTIL_LOCK_RELEASE, "); + break; + case I2O_CMD_UTIL_PARAMS_GET: + printk("UTIL_PARAMS_GET, "); + break; + case I2O_CMD_UTIL_PARAMS_SET: + printk("UTIL_PARAMS_SET, "); + break; + case I2O_CMD_UTIL_REPLY_FAULT_NOTIFY: + printk("UTIL_REPLY_FAULT_NOTIFY, "); + break; + default: + printk("Cmd = %0#2x, ", cmd); + } +} + +/* + * Used for error reporting/debugging purposes + */ +static void i2o_report_exec_cmd(u8 cmd) +{ + switch (cmd) { + case I2O_CMD_ADAPTER_ASSIGN: + printk("EXEC_ADAPTER_ASSIGN, "); + break; + case I2O_CMD_ADAPTER_READ: + printk("EXEC_ADAPTER_READ, "); + break; + case I2O_CMD_ADAPTER_RELEASE: + printk("EXEC_ADAPTER_RELEASE, "); + break; + case I2O_CMD_BIOS_INFO_SET: + printk("EXEC_BIOS_INFO_SET, "); + break; + case I2O_CMD_BOOT_DEVICE_SET: + printk("EXEC_BOOT_DEVICE_SET, "); + break; + case I2O_CMD_CONFIG_VALIDATE: + printk("EXEC_CONFIG_VALIDATE, "); + break; + case I2O_CMD_CONN_SETUP: + printk("EXEC_CONN_SETUP, "); + break; + case I2O_CMD_DDM_DESTROY: + printk("EXEC_DDM_DESTROY, "); + break; + case I2O_CMD_DDM_ENABLE: + printk("EXEC_DDM_ENABLE, "); + break; + case I2O_CMD_DDM_QUIESCE: + printk("EXEC_DDM_QUIESCE, "); + break; + case I2O_CMD_DDM_RESET: + printk("EXEC_DDM_RESET, "); + break; + case I2O_CMD_DDM_SUSPEND: + printk("EXEC_DDM_SUSPEND, "); + break; + case I2O_CMD_DEVICE_ASSIGN: + printk("EXEC_DEVICE_ASSIGN, "); + break; + case I2O_CMD_DEVICE_RELEASE: + printk("EXEC_DEVICE_RELEASE, "); + break; + case I2O_CMD_HRT_GET: + printk("EXEC_HRT_GET, "); + break; + case I2O_CMD_ADAPTER_CLEAR: + printk("EXEC_IOP_CLEAR, "); + break; + case I2O_CMD_ADAPTER_CONNECT: + printk("EXEC_IOP_CONNECT, "); + break; + case I2O_CMD_ADAPTER_RESET: + printk("EXEC_IOP_RESET, "); + break; + case I2O_CMD_LCT_NOTIFY: + printk("EXEC_LCT_NOTIFY, "); + break; + case I2O_CMD_OUTBOUND_INIT: + printk("EXEC_OUTBOUND_INIT, "); + break; + case I2O_CMD_PATH_ENABLE: + printk("EXEC_PATH_ENABLE, "); + break; + case I2O_CMD_PATH_QUIESCE: + printk("EXEC_PATH_QUIESCE, "); + break; + case I2O_CMD_PATH_RESET: + printk("EXEC_PATH_RESET, "); + break; + case I2O_CMD_STATIC_MF_CREATE: + printk("EXEC_STATIC_MF_CREATE, "); + break; + case I2O_CMD_STATIC_MF_RELEASE: + printk("EXEC_STATIC_MF_RELEASE, "); + break; + case I2O_CMD_STATUS_GET: + printk("EXEC_STATUS_GET, "); + break; + case I2O_CMD_SW_DOWNLOAD: + printk("EXEC_SW_DOWNLOAD, "); + break; + case I2O_CMD_SW_UPLOAD: + printk("EXEC_SW_UPLOAD, "); + break; + case I2O_CMD_SW_REMOVE: + printk("EXEC_SW_REMOVE, "); + break; + case I2O_CMD_SYS_ENABLE: + printk("EXEC_SYS_ENABLE, "); + break; + case I2O_CMD_SYS_MODIFY: + printk("EXEC_SYS_MODIFY, "); + break; + case I2O_CMD_SYS_QUIESCE: + printk("EXEC_SYS_QUIESCE, "); + break; + case I2O_CMD_SYS_TAB_SET: + printk("EXEC_SYS_TAB_SET, "); + break; + default: + printk("Cmd = %#02x, ", cmd); + } +} + +void i2o_debug_state(struct i2o_controller *c) +{ + printk(KERN_INFO "%s: State = ", c->name); + switch (((i2o_status_block *) c->status_block.virt)->iop_state) { + case 0x01: + printk("INIT\n"); + break; + case 0x02: + printk("RESET\n"); + break; + case 0x04: + printk("HOLD\n"); + break; + case 0x05: + printk("READY\n"); + break; + case 0x08: + printk("OPERATIONAL\n"); + break; + case 0x10: + printk("FAILED\n"); + break; + case 0x11: + printk("FAULTED\n"); + break; + default: + printk("%x (unknown !!)\n", + ((i2o_status_block *) c->status_block.virt)->iop_state); + } +}; + +void i2o_systab_debug(struct i2o_sys_tbl *sys_tbl) +{ + u32 *table; + int count; + u32 size; + + table = (u32 *) sys_tbl; + size = sizeof(struct i2o_sys_tbl) + sys_tbl->num_entries + * sizeof(struct i2o_sys_tbl_entry); + + for (count = 0; count < (size >> 2); count++) + printk(KERN_INFO "sys_tbl[%d] = %0#10x\n", count, table[count]); +} + +void i2o_dump_hrt(struct i2o_controller *c) +{ + u32 *rows = (u32 *) c->hrt.virt; + u8 *p = (u8 *) c->hrt.virt; + u8 *d; + int count; + int length; + int i; + int state; + + if (p[3] != 0) { + printk(KERN_ERR + "%s: HRT table for controller is too new a version.\n", + c->name); + return; + } + + count = p[0] | (p[1] << 8); + length = p[2]; + + printk(KERN_INFO "%s: HRT has %d entries of %d bytes each.\n", + c->name, count, length << 2); + + rows += 2; + + for (i = 0; i < count; i++) { + printk(KERN_INFO "Adapter %08X: ", rows[0]); + p = (u8 *) (rows + 1); + d = (u8 *) (rows + 2); + state = p[1] << 8 | p[0]; + + printk("TID %04X:[", state & 0xFFF); + state >>= 12; + if (state & (1 << 0)) + printk("H"); /* Hidden */ + if (state & (1 << 2)) { + printk("P"); /* Present */ + if (state & (1 << 1)) + printk("C"); /* Controlled */ + } + if (state > 9) + printk("*"); /* Hard */ + + printk("]:"); + + switch (p[3] & 0xFFFF) { + case 0: + /* Adapter private bus - easy */ + printk("Local bus %d: I/O at 0x%04X Mem 0x%08X", + p[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); + break; + case 1: + /* ISA bus */ + printk("ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", + p[2], d[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); + break; + + case 2: /* EISA bus */ + printk("EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X", + p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); + break; + + case 3: /* MCA bus */ + printk("MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", + p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); + break; + + case 4: /* PCI bus */ + printk("PCI %d: Bus %d Device %d Function %d", + p[2], d[2], d[1], d[0]); + break; + + case 0x80: /* Other */ + default: + printk("Unsupported bus type."); + break; + } + printk("\n"); + rows += length; + } +} + +EXPORT_SYMBOL(i2o_dump_status_block); +EXPORT_SYMBOL(i2o_dump_message); diff -Nru a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/device.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,674 @@ +/* + * Functions to handle I2O devices + * + * Copyright (C) 2004 Markus Lidel + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * Fixes/additions: + * Markus Lidel + * initial version. + */ + +#include +#include + +/* Exec OSM functions */ +extern struct bus_type i2o_bus_type; + +/** + * i2o_device_issue_claim - claim or release a device + * @dev: I2O device to claim or release + * @cmd: claim or release command + * @type: type of claim + * + * Issue I2O UTIL_CLAIM or UTIL_RELEASE messages. The message to be sent + * is set by cmd. dev is the I2O device which should be claim or + * released and the type is the claim type (see the I2O spec). + * + * Returs 0 on success or negative error code on failure. + */ +static inline int i2o_device_issue_claim(struct i2o_device *dev, u32 cmd, + u32 type) +{ + struct i2o_message *msg; + u32 m; + + m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(cmd << 24 | HOST_TID << 12 | dev->lct_data.tid, &msg->u.head[1]); + writel(type, &msg->body[0]); + + return i2o_msg_post_wait(dev->iop, m, 60); +}; + +/** + * i2o_device_claim - claim a device for use by an OSM + * @dev: I2O device to claim + * @drv: I2O driver which wants to claim the device + * + * Do the leg work to assign a device to a given OSM. If the claim succeed + * the owner of the rimary. If the attempt fails a negative errno code + * is returned. On success zero is returned. + */ +int i2o_device_claim(struct i2o_device *dev) +{ + int rc = 0; + + down(&dev->lock); + + rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY); + if (!rc) + pr_debug("claim of device %d succeded\n", dev->lct_data.tid); + else + pr_debug("claim of device %d failed %d\n", dev->lct_data.tid, + rc); + + up(&dev->lock); + + return rc; +}; + +/** + * i2o_device_claim_release - release a device that the OSM is using + * @dev: device to release + * @drv: driver which claimed the device + * + * Drop a claim by an OSM on a given I2O device. + * + * AC - some devices seem to want to refuse an unclaim until they have + * finished internal processing. It makes sense since you don't want a + * new device to go reconfiguring the entire system until you are done. + * Thus we are prepared to wait briefly. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_device_claim_release(struct i2o_device *dev) +{ + int tries; + int rc = 0; + + down(&dev->lock); + + /* + * If the controller takes a nonblocking approach to + * releases we have to sleep/poll for a few times. + */ + for (tries = 0; tries < 10; tries++) { + rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_RELEASE, + I2O_CLAIM_PRIMARY); + if (!rc) + break; + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ); + } + + if (!rc) + pr_debug("claim release of device %d succeded\n", + dev->lct_data.tid); + else + pr_debug("claim release of device %d failed %d\n", + dev->lct_data.tid, rc); + + up(&dev->lock); + + return rc; +}; + +/** + * i2o_device_release - release the memory for a I2O device + * @dev: I2O device which should be released + * + * Release the allocated memory. This function is called if refcount of + * device reaches 0 automatically. + */ +static void i2o_device_release(struct device *dev) +{ + struct i2o_device *i2o_dev = to_i2o_device(dev); + + pr_debug("Release I2O device %s\n", dev->bus_id); + + kfree(i2o_dev); +}; + +/** + * i2o_device_class_release - Remove I2O device attributes + * @cd: I2O class device which is added to the I2O device class + * + * Removes attributes from the I2O device again. Also search each device + * on the controller for I2O devices which refert to this device as parent + * or user and remove this links also. + */ +static void i2o_device_class_release(struct class_device *cd) +{ + struct i2o_device *i2o_dev, *tmp; + struct i2o_controller *c; + + i2o_dev = to_i2o_device(cd->dev); + c = i2o_dev->iop; + + sysfs_remove_link(&i2o_dev->device.kobj, "parent"); + sysfs_remove_link(&i2o_dev->device.kobj, "user"); + + list_for_each_entry(tmp, &c->devices, list) { + if (tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) + sysfs_remove_link(&tmp->device.kobj, "parent"); + if (tmp->lct_data.user_tid == i2o_dev->lct_data.tid) + sysfs_remove_link(&tmp->device.kobj, "user"); + } +}; + +/* I2O device class */ +static struct class i2o_device_class = { + .name = "i2o_device", + .release = i2o_device_class_release +}; + +/** + * i2o_device_alloc - Allocate a I2O device and initialize it + * + * Allocate the memory for a I2O device and initialize locks and lists + * + * Returns the allocated I2O device or a negative error code if the device + * could not be allocated. + */ +static struct i2o_device *i2o_device_alloc(void) +{ + struct i2o_device *dev; + + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) + return ERR_PTR(-ENOMEM); + + memset(dev, 0, sizeof(*dev)); + + INIT_LIST_HEAD(&dev->list); + init_MUTEX(&dev->lock); + + dev->device.bus = &i2o_bus_type; + dev->device.release = &i2o_device_release; + dev->classdev.class = &i2o_device_class; + dev->classdev.dev = &dev->device; + + return dev; +}; + +/** + * i2o_device_add - allocate a new I2O device and add it to the IOP + * @iop: I2O controller where the device is on + * @entry: LCT entry of the I2O device + * + * Allocate a new I2O device and initialize it with the LCT entry. The + * device is appended to the device list of the controller. + * + * Returns a pointer to the I2O device on success or negative error code + * on failure. + */ +struct i2o_device *i2o_device_add(struct i2o_controller *c, + i2o_lct_entry * entry) +{ + struct i2o_device *dev; + + dev = i2o_device_alloc(); + if (IS_ERR(dev)) { + printk(KERN_ERR "i2o: unable to allocate i2o device\n"); + return dev; + } + + dev->lct_data = *entry; + + snprintf(dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit, + dev->lct_data.tid); + + snprintf(dev->classdev.class_id, BUS_ID_SIZE, "%d:%03x", c->unit, + dev->lct_data.tid); + + dev->iop = c; + dev->device.parent = &c->device; + + device_register(&dev->device); + + list_add_tail(&dev->list, &c->devices); + + class_device_register(&dev->classdev); + + i2o_driver_notify_device_add_all(dev); + + pr_debug("I2O device %s added\n", dev->device.bus_id); + + return dev; +}; + +/** + * i2o_device_remove - remove an I2O device from the I2O core + * @dev: I2O device which should be released + * + * Is used on I2O controller removal or LCT modification, when the device + * is removed from the system. Note that the device could still hang + * around until the refcount reaches 0. + */ +void i2o_device_remove(struct i2o_device *i2o_dev) +{ + i2o_driver_notify_device_remove_all(i2o_dev); + class_device_unregister(&i2o_dev->classdev); + list_del(&i2o_dev->list); + device_unregister(&i2o_dev->device); +}; + +/** + * i2o_device_parse_lct - Parse a previously fetched LCT and create devices + * @c: I2O controller from which the LCT should be parsed. + * + * The Logical Configuration Table tells us what we can talk to on the + * board. For every entry we create an I2O device, which is registered in + * the I2O core. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_device_parse_lct(struct i2o_controller *c) +{ + struct i2o_device *dev, *tmp; + i2o_lct *lct; + int i; + int max; + + down(&c->lct_lock); + + if (c->lct) + kfree(c->lct); + + lct = c->dlct.virt; + + c->lct = kmalloc(lct->table_size * 4, GFP_KERNEL); + if (!c->lct) { + up(&c->lct_lock); + return -ENOMEM; + } + + if (lct->table_size * 4 > c->dlct.len) { + memcpy_fromio(c->lct, c->dlct.virt, c->dlct.len); + up(&c->lct_lock); + return -EAGAIN; + } + + memcpy_fromio(c->lct, c->dlct.virt, lct->table_size * 4); + + lct = c->lct; + + max = (lct->table_size - 3) / 9; + + pr_debug("LCT has %d entries (LCT size: %d)\n", max, lct->table_size); + + /* remove devices, which are not in the LCT anymore */ + list_for_each_entry_safe(dev, tmp, &c->devices, list) { + int found = 0; + + for (i = 0; i < max; i++) { + if (lct->lct_entry[i].tid == dev->lct_data.tid) { + found = 1; + break; + } + } + + if (!found) + i2o_device_remove(dev); + } + + /* add new devices, which are new in the LCT */ + for (i = 0; i < max; i++) { + int found = 0; + + list_for_each_entry_safe(dev, tmp, &c->devices, list) { + if (lct->lct_entry[i].tid == dev->lct_data.tid) { + found = 1; + break; + } + } + + if (!found) + i2o_device_add(c, &lct->lct_entry[i]); + } + up(&c->lct_lock); + + return 0; +}; + +/** + * i2o_device_class_show_class_id - Displays class id of I2O device + * @cd: class device of which the class id should be displayed + * @buf: buffer into which the class id should be printed + * + * Returns the number of bytes which are printed into the buffer. + */ +static ssize_t i2o_device_class_show_class_id(struct class_device *cd, + char *buf) +{ + struct i2o_device *dev = to_i2o_device(cd->dev); + + sprintf(buf, "%03x\n", dev->lct_data.class_id); + return strlen(buf) + 1; +}; + +/** + * i2o_device_class_show_tid - Displays TID of I2O device + * @cd: class device of which the TID should be displayed + * @buf: buffer into which the class id should be printed + * + * Returns the number of bytes which are printed into the buffer. + */ +static ssize_t i2o_device_class_show_tid(struct class_device *cd, char *buf) +{ + struct i2o_device *dev = to_i2o_device(cd->dev); + + sprintf(buf, "%03x\n", dev->lct_data.tid); + return strlen(buf) + 1; +}; + +/* I2O device class attributes */ +static CLASS_DEVICE_ATTR(class_id, S_IRUGO, i2o_device_class_show_class_id, + NULL); +static CLASS_DEVICE_ATTR(tid, S_IRUGO, i2o_device_class_show_tid, NULL); + +/** + * i2o_device_class_add - Adds attributes to the I2O device + * @cd: I2O class device which is added to the I2O device class + * + * This function get called when a I2O device is added to the class. It + * creates the attributes for each device and creates user/parent symlink + * if necessary. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_device_class_add(struct class_device *cd) +{ + struct i2o_device *i2o_dev, *tmp; + struct i2o_controller *c; + + i2o_dev = to_i2o_device(cd->dev); + c = i2o_dev->iop; + + class_device_create_file(cd, &class_device_attr_class_id); + class_device_create_file(cd, &class_device_attr_tid); + + /* create user entries for this device */ + tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.user_tid); + if (tmp) + sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj, + "user"); + + /* create user entries refering to this device */ + list_for_each_entry(tmp, &c->devices, list) + if (tmp->lct_data.user_tid == i2o_dev->lct_data.tid) + sysfs_create_link(&tmp->device.kobj, + &i2o_dev->device.kobj, "user"); + + /* create parent entries for this device */ + tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.parent_tid); + if (tmp) + sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj, + "parent"); + + /* create parent entries refering to this device */ + list_for_each_entry(tmp, &c->devices, list) + if (tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) + sysfs_create_link(&tmp->device.kobj, + &i2o_dev->device.kobj, "parent"); + + return 0; +}; + +/* I2O device class interface */ +static struct class_interface i2o_device_class_interface = { + .class = &i2o_device_class, + .add = i2o_device_class_add +}; + +/* + * Run time support routines + */ + +/* Issue UTIL_PARAMS_GET or UTIL_PARAMS_SET + * + * This function can be used for all UtilParamsGet/Set operations. + * The OperationList is given in oplist-buffer, + * and results are returned in reslist-buffer. + * Note that the minimum sized reslist is 8 bytes and contains + * ResultCount, ErrorInfoSize, BlockStatus and BlockSize. + */ + +int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, + int oplen, void *reslist, int reslen) +{ + struct i2o_message *msg; + u32 m; + u32 *res32 = (u32 *) reslist; + u32 *restmp = (u32 *) reslist; + int len = 0; + int i = 0; + int rc; + struct i2o_dma res; + struct i2o_controller *c = i2o_dev->iop; + struct device *dev = &c->pdev->dev; + + res.virt = NULL; + + if (i2o_dma_alloc(dev, &res, reslen, GFP_KERNEL)) + return -ENOMEM; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) { + i2o_dma_free(dev, &res); + return -ETIMEDOUT; + } + + i = 0; + writel(cmd << 24 | HOST_TID << 12 | i2o_dev->lct_data.tid, + &msg->u.head[1]); + writel(0, &msg->body[i++]); + writel(0x4C000000 | oplen, &msg->body[i++]); /* OperationList */ + memcpy_toio(&msg->body[i], oplist, oplen); + i += (oplen / 4 + (oplen % 4 ? 1 : 0)); + writel(0xD0000000 | res.len, &msg->body[i++]); /* ResultList */ + writel(res.phys, &msg->body[i++]); + + writel(I2O_MESSAGE_SIZE(i + sizeof(struct i2o_message) / 4) | + SGL_OFFSET_5, &msg->u.head[0]); + + rc = i2o_msg_post_wait_mem(c, m, 10, &res); + + /* This only looks like a memory leak - don't "fix" it. */ + if (rc == -ETIMEDOUT) + return rc; + + memcpy_fromio(reslist, res.virt, res.len); + i2o_dma_free(dev, &res); + + /* Query failed */ + if (rc) + return rc; + /* + * Calculate number of bytes of Result LIST + * We need to loop through each Result BLOCK and grab the length + */ + restmp = res32 + 1; + len = 1; + for (i = 0; i < (res32[0] & 0X0000FFFF); i++) { + if (restmp[0] & 0x00FF0000) { /* BlockStatus != SUCCESS */ + printk(KERN_WARNING + "%s - Error:\n ErrorInfoSize = 0x%02x, " + "BlockStatus = 0x%02x, BlockSize = 0x%04x\n", + (cmd == + I2O_CMD_UTIL_PARAMS_SET) ? "PARAMS_SET" : + "PARAMS_GET", res32[1] >> 24, + (res32[1] >> 16) & 0xFF, res32[1] & 0xFFFF); + + /* + * If this is the only request,than we return an error + */ + if ((res32[0] & 0x0000FFFF) == 1) { + return -((res32[1] >> 16) & 0xFF); /* -BlockStatus */ + } + } + len += restmp[0] & 0x0000FFFF; /* Length of res BLOCK */ + restmp += restmp[0] & 0x0000FFFF; /* Skip to next BLOCK */ + } + return (len << 2); /* bytes used by result list */ +} + +/* + * Query one field group value or a whole scalar group. + */ +int i2o_parm_field_get(struct i2o_device *i2o_dev, int group, int field, + void *buf, int buflen) +{ + u16 opblk[] = { 1, 0, I2O_PARAMS_FIELD_GET, group, 1, field }; + u8 resblk[8 + buflen]; /* 8 bytes for header */ + int size; + + if (field == -1) /* whole group */ + opblk[4] = -1; + + size = i2o_parm_issue(i2o_dev, I2O_CMD_UTIL_PARAMS_GET, opblk, + sizeof(opblk), resblk, sizeof(resblk)); + + memcpy(buf, resblk + 8, buflen); /* cut off header */ + + if (size > buflen) + return buflen; + + return size; +} + +/* + * Set a scalar group value or a whole group. + */ +int i2o_parm_field_set(struct i2o_device *i2o_dev, int group, int field, + void *buf, int buflen) +{ + u16 *opblk; + u8 resblk[8 + buflen]; /* 8 bytes for header */ + int size; + + opblk = kmalloc(buflen + 64, GFP_KERNEL); + if (opblk == NULL) { + printk(KERN_ERR "i2o: no memory for operation buffer.\n"); + return -ENOMEM; + } + + opblk[0] = 1; /* operation count */ + opblk[1] = 0; /* pad */ + opblk[2] = I2O_PARAMS_FIELD_SET; + opblk[3] = group; + + if (field == -1) { /* whole group */ + opblk[4] = -1; + memcpy(opblk + 5, buf, buflen); + } else { /* single field */ + + opblk[4] = 1; + opblk[5] = field; + memcpy(opblk + 6, buf, buflen); + } + + size = i2o_parm_issue(i2o_dev, I2O_CMD_UTIL_PARAMS_SET, opblk, + 12 + buflen, resblk, sizeof(resblk)); + + kfree(opblk); + if (size > buflen) + return buflen; + + return size; +} + +/* + * if oper == I2O_PARAMS_TABLE_GET, get from all rows + * if fieldcount == -1 return all fields + * ibuf and ibuflen are unused (use NULL, 0) + * else return specific fields + * ibuf contains fieldindexes + * + * if oper == I2O_PARAMS_LIST_GET, get from specific rows + * if fieldcount == -1 return all fields + * ibuf contains rowcount, keyvalues + * else return specific fields + * fieldcount is # of fieldindexes + * ibuf contains fieldindexes, rowcount, keyvalues + * + * You could also use directly function i2o_issue_params(). + */ +int i2o_parm_table_get(struct i2o_device *dev, int oper, int group, + int fieldcount, void *ibuf, int ibuflen, void *resblk, + int reslen) +{ + u16 *opblk; + int size; + + size = 10 + ibuflen; + if (size % 4) + size += 4 - size % 4; + + opblk = kmalloc(size, GFP_KERNEL); + if (opblk == NULL) { + printk(KERN_ERR "i2o: no memory for query buffer.\n"); + return -ENOMEM; + } + + opblk[0] = 1; /* operation count */ + opblk[1] = 0; /* pad */ + opblk[2] = oper; + opblk[3] = group; + opblk[4] = fieldcount; + memcpy(opblk + 5, ibuf, ibuflen); /* other params */ + + size = i2o_parm_issue(dev, I2O_CMD_UTIL_PARAMS_GET, opblk, + size, resblk, reslen); + + kfree(opblk); + if (size > reslen) + return reslen; + + return size; +} + +/** + * i2o_device_init - Initialize I2O devices + * + * Registers the I2O device class. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_device_init(void) +{ + int rc; + + rc = class_register(&i2o_device_class); + if (rc) + return rc; + + return class_interface_register(&i2o_device_class_interface); +}; + +/** + * i2o_device_exit - I2O devices exit function + * + * Unregisters the I2O device class. + */ +void i2o_device_exit(void) +{ + class_interface_register(&i2o_device_class_interface); + class_unregister(&i2o_device_class); +}; + +EXPORT_SYMBOL(i2o_device_claim); +EXPORT_SYMBOL(i2o_device_claim_release); +EXPORT_SYMBOL(i2o_parm_field_get); +EXPORT_SYMBOL(i2o_parm_field_set); +EXPORT_SYMBOL(i2o_parm_table_get); +EXPORT_SYMBOL(i2o_parm_issue); diff -Nru a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/driver.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,367 @@ +/* + * Functions to handle I2O drivers (OSMs) and I2O bus type for sysfs + * + * Copyright (C) 2004 Markus Lidel + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * Fixes/additions: + * Markus Lidel + * initial version. + */ + +#include +#include +#include +#include + + +/* max_drivers - Maximum I2O drivers (OSMs) which could be registered */ +unsigned int i2o_max_drivers = I2O_MAX_DRIVERS; +module_param_named(max_drivers, i2o_max_drivers, uint, 0); +MODULE_PARM_DESC(max_drivers, "maximum number of OSM's to support"); + +/* I2O drivers lock and array */ +static spinlock_t i2o_drivers_lock = SPIN_LOCK_UNLOCKED; +static struct i2o_driver **i2o_drivers; + +/** + * i2o_bus_match - Tell if a I2O device class id match the class ids of + * the I2O driver (OSM) + * + * @dev: device which should be verified + * @drv: the driver to match against + * + * Used by the bus to check if the driver wants to handle the device. + * + * Returns 1 if the class ids of the driver match the class id of the + * device, otherwise 0. + */ +static int i2o_bus_match(struct device *dev, struct device_driver *drv) +{ + struct i2o_device *i2o_dev = to_i2o_device(dev); + struct i2o_driver *i2o_drv = to_i2o_driver(drv); + struct i2o_class_id *ids = i2o_drv->classes; + + if (ids) + while (ids->class_id != I2O_CLASS_END) { + if (ids->class_id == i2o_dev->lct_data.class_id) + return 1; + ids++; + } + return 0; +}; + +/* I2O bus type */ +struct bus_type i2o_bus_type = { + .name = "i2o", + .match = i2o_bus_match, +}; + +/** + * i2o_driver_register - Register a I2O driver (OSM) in the I2O core + * @drv: I2O driver which should be registered + * + * Registers the OSM drv in the I2O core and creates an event queues if + * necessary. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_driver_register(struct i2o_driver *drv) +{ + struct i2o_controller *c; + int i; + int rc = 0; + unsigned long flags; + + pr_debug("Register driver %s\n", drv->name); + + if (drv->event) { + drv->event_queue = create_workqueue(drv->name); + if (!drv->event_queue) { + printk(KERN_ERR "i2o: Could not initialize event queue " + "for driver %s\n", drv->name); + return -EFAULT; + } + pr_debug("Event queue initialized for driver %s\n", drv->name); + } else + drv->event_queue = NULL; + + drv->driver.name = drv->name; + drv->driver.bus = &i2o_bus_type; + + spin_lock_irqsave(&i2o_drivers_lock, flags); + + for (i = 0; i2o_drivers[i]; i++) + if (i >= i2o_max_drivers) { + printk(KERN_ERR "i2o: too many drivers registered, " + "increase max_drivers\n"); + spin_unlock_irqrestore(&i2o_drivers_lock, flags); + return -EFAULT; + } + + drv->context = i; + i2o_drivers[i] = drv; + + spin_unlock_irqrestore(&i2o_drivers_lock, flags); + + pr_debug("driver %s gets context id %d\n", drv->name, drv->context); + + list_for_each_entry(c, &i2o_controllers, list) { + struct i2o_device *i2o_dev; + + i2o_driver_notify_controller_add(drv, c); + list_for_each_entry(i2o_dev, &c->devices, list) + i2o_driver_notify_device_add(drv, i2o_dev); + } + + + rc = driver_register(&drv->driver); + if (rc) + destroy_workqueue(drv->event_queue); + + return rc; +}; + +/** + * i2o_driver_unregister - Unregister a I2O driver (OSM) from the I2O core + * @drv: I2O driver which should be unregistered + * + * Unregisters the OSM drv from the I2O core and cleanup event queues if + * necessary. + */ +void i2o_driver_unregister(struct i2o_driver *drv) +{ + struct i2o_controller *c; + unsigned long flags; + + pr_debug("unregister driver %s\n", drv->name); + + driver_unregister(&drv->driver); + + list_for_each_entry(c, &i2o_controllers, list) { + struct i2o_device *i2o_dev; + + list_for_each_entry(i2o_dev, &c->devices, list) + i2o_driver_notify_device_remove(drv, i2o_dev); + + i2o_driver_notify_controller_remove(drv, c); + } + + spin_lock_irqsave(&i2o_drivers_lock, flags); + i2o_drivers[drv->context] = NULL; + spin_unlock_irqrestore(&i2o_drivers_lock, flags); + + if (drv->event_queue) { + destroy_workqueue(drv->event_queue); + drv->event_queue = NULL; + pr_debug("event queue removed for %s\n", drv->name); + } +}; + +/** + * i2o_driver_dispatch - dispatch an I2O reply message + * @c: I2O controller of the message + * @m: I2O message number + * @msg: I2O message to be delivered + * + * The reply is delivered to the driver from which the original message + * was. This function is only called from interrupt context. + * + * Returns 0 on success and the message should not be flushed. Returns > 0 + * on success and if the message should be flushed afterwords. Returns + * negative error code on failure (the message will be flushed too). + */ +int i2o_driver_dispatch(struct i2o_controller *c, u32 m, + struct i2o_message *msg) +{ + struct i2o_driver *drv; + u32 context = readl(&msg->u.s.icntxt); + + if (likely(context < i2o_max_drivers)) { + spin_lock(&i2o_drivers_lock); + drv = i2o_drivers[context]; + spin_unlock(&i2o_drivers_lock); + + if (unlikely(!drv)) { + printk(KERN_WARNING "i2o: Spurious reply to unknown " + "driver %d\n", context); + return -EIO; + } + + if ((readl(&msg->u.head[1]) >> 24) == I2O_CMD_UTIL_EVT_REGISTER) { + struct i2o_device *dev, *tmp; + struct i2o_event *evt; + u16 size; + u16 tid; + + tid = readl(&msg->u.head[1]) & 0x1fff; + + pr_debug("%s: event received from device %d\n", c->name, + tid); + + /* cut of header from message size (in 32-bit words) */ + size = (readl(&msg->u.head[0]) >> 16) - 5; + + evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC); + if (!evt) + return -ENOMEM; + memset(evt, 0, size * 4 + sizeof(*evt)); + + evt->size = size; + memcpy_fromio(&evt->tcntxt, &msg->u.s.tcntxt, + (size + 2) * 4); + + list_for_each_entry_safe(dev, tmp, &c->devices, list) + if (dev->lct_data.tid == tid) { + evt->i2o_dev = dev; + break; + } + + INIT_WORK(&evt->work, (void (*)(void *))drv->event, + evt); + queue_work(drv->event_queue, &evt->work); + return 1; + } + + if (likely(drv->reply)) + return drv->reply(c, m, msg); + else + pr_debug("%s: Reply to driver %s, but no reply function" + " defined!\n", c->name, drv->name); + return -EIO; + } else + printk(KERN_WARNING "i2o: Spurious reply to unknown driver " + "%d\n", readl(&msg->u.s.icntxt)); + return -EIO; +} + +/** + * i2o_driver_notify_controller_add_all - Send notify of added controller + * to all I2O drivers + * + * Send notifications to all registered drivers that a new controller was + * added. + */ +void i2o_driver_notify_controller_add_all(struct i2o_controller *c) { + int i; + struct i2o_driver *drv; + + for(i = 0; i < I2O_MAX_DRIVERS; i ++) { + drv = i2o_drivers[i]; + + if(drv) + i2o_driver_notify_controller_add(drv, c); + } +} + +/** + * i2o_driver_notify_controller_remove_all - Send notify of removed + * controller to all I2O drivers + * + * Send notifications to all registered drivers that a controller was + * removed. + */ +void i2o_driver_notify_controller_remove_all(struct i2o_controller *c) { + int i; + struct i2o_driver *drv; + + for(i = 0; i < I2O_MAX_DRIVERS; i ++) { + drv = i2o_drivers[i]; + + if(drv) + i2o_driver_notify_controller_remove(drv, c); + } +} + +/** + * i2o_driver_notify_device_add_all - Send notify of added device to all + * I2O drivers + * + * Send notifications to all registered drivers that a device was added. + */ +void i2o_driver_notify_device_add_all(struct i2o_device *i2o_dev) { + int i; + struct i2o_driver *drv; + + for(i = 0; i < I2O_MAX_DRIVERS; i ++) { + drv = i2o_drivers[i]; + + if(drv) + i2o_driver_notify_device_add(drv, i2o_dev); + } +} + +/** + * i2o_driver_notify_device_remove_all - Send notify of removed device to + * all I2O drivers + * + * Send notifications to all registered drivers that a device was removed. + */ +void i2o_driver_notify_device_remove_all(struct i2o_device *i2o_dev) { + int i; + struct i2o_driver *drv; + + for(i = 0; i < I2O_MAX_DRIVERS; i ++) { + drv = i2o_drivers[i]; + + if(drv) + i2o_driver_notify_device_remove(drv, i2o_dev); + } +} + +/** + * i2o_driver_init - initialize I2O drivers (OSMs) + * + * Registers the I2O bus and allocate memory for the array of OSMs. + * + * Returns 0 on success or negative error code on failure. + */ +int __init i2o_driver_init(void) +{ + int rc = 0; + + if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64) || + ((i2o_max_drivers ^ (i2o_max_drivers - 1)) != + (2 * i2o_max_drivers - 1))) { + printk(KERN_WARNING "i2o: max_drivers set to %d, but must be " + ">=2 and <= 64 and a power of 2\n", i2o_max_drivers); + i2o_max_drivers = I2O_MAX_DRIVERS; + } + printk(KERN_INFO "i2o: max_drivers=%d\n", i2o_max_drivers); + + i2o_drivers = + kmalloc(i2o_max_drivers * sizeof(*i2o_drivers), GFP_KERNEL); + if (!i2o_drivers) + return -ENOMEM; + + memset(i2o_drivers, 0, i2o_max_drivers * sizeof(*i2o_drivers)); + + rc = bus_register(&i2o_bus_type); + + if (rc < 0) + kfree(i2o_drivers); + + return rc; +}; + +/** + * i2o_driver_exit - clean up I2O drivers (OSMs) + * + * Unregisters the I2O bus and free driver array. + */ +void __exit i2o_driver_exit(void) +{ + bus_unregister(&i2o_bus_type); + kfree(i2o_drivers); +}; + +EXPORT_SYMBOL(i2o_driver_register); +EXPORT_SYMBOL(i2o_driver_unregister); +EXPORT_SYMBOL(i2o_driver_notify_controller_add_all); +EXPORT_SYMBOL(i2o_driver_notify_controller_remove_all); +EXPORT_SYMBOL(i2o_driver_notify_device_add_all); +EXPORT_SYMBOL(i2o_driver_notify_device_remove_all); diff -Nru a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/exec-osm.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,505 @@ +/* + * Executive OSM + * + * Copyright (C) 1999-2002 Red Hat Software + * + * Written by Alan Cox, Building Number Three Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * A lot of the I2O message side code from this is taken from the Red + * Creek RCPCI45 adapter driver by Red Creek Communications + * + * Fixes/additions: + * Philipp Rumpf + * Juha Sievänen + * Auvo Häkkinen + * Deepak Saxena + * Boji T Kannanthanam + * Alan Cox : + * Ported to Linux 2.5. + * Markus Lidel : + * Minor fixes for 2.6. + * Markus Lidel : + * Support for sysfs included. + */ + +#include +#include + +struct i2o_driver i2o_exec_driver; + +/* Module internal functions from other sources */ +extern int i2o_device_parse_lct(struct i2o_controller *); + +/* global wait list for POST WAIT */ +static LIST_HEAD(i2o_exec_wait_list); + +/* Wait struct needed for POST WAIT */ +struct i2o_exec_wait { + wait_queue_head_t *wq; /* Pointer to Wait queue */ + struct i2o_dma dma; /* DMA buffers to free on failure */ + u32 tcntxt; /* transaction context from reply */ + int complete; /* 1 if reply received otherwise 0 */ + u32 m; /* message id */ + struct i2o_message *msg; /* pointer to the reply message */ + struct list_head list; /* node in global wait list */ +}; + +/* Exec OSM class handling definition */ +static struct i2o_class_id i2o_exec_class_id[] = { + {I2O_CLASS_EXECUTIVE}, + {I2O_CLASS_END} +}; + +/** + * i2o_exec_wait_alloc - Allocate a i2o_exec_wait struct an initialize it + * + * Allocate the i2o_exec_wait struct and initialize the wait. + * + * Returns i2o_exec_wait pointer on success or negative error code on + * failure. + */ +static struct i2o_exec_wait *i2o_exec_wait_alloc(void) +{ + struct i2o_exec_wait *wait; + + wait = kmalloc(sizeof(*wait), GFP_KERNEL); + if (!wait) + return ERR_PTR(-ENOMEM); + + memset(wait, 0, sizeof(*wait)); + + INIT_LIST_HEAD(&wait->list); + + return wait; +}; + +/** + * i2o_exec_wait_free - Free a i2o_exec_wait struct + * @i2o_exec_wait: I2O wait data which should be cleaned up + */ +static void i2o_exec_wait_free(struct i2o_exec_wait *wait) +{ + kfree(wait); +}; + +/** + * i2o_msg_post_wait_mem - Post and wait a message with DMA buffers + * @c: controller + * @m: message to post + * @timeout: time in seconds to wait + * @dma: i2o_dma struct of the DMA buffer to free on failure + * + * This API allows an OSM to post a message and then be told whether or + * not the system received a successful reply. If the message times out + * then the value '-ETIMEDOUT' is returned. This is a special case. In + * this situation the message may (should) complete at an indefinite time + * in the future. When it completes it will use the memory buffer + * attached to the request. If -ETIMEDOUT is returned then the memory + * buffer must not be freed. Instead the event completion will free them + * for you. In all other cases the buffer are your problem. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long + timeout, struct i2o_dma *dma) +{ + DECLARE_WAIT_QUEUE_HEAD(wq); + DEFINE_WAIT(wait); + struct i2o_exec_wait *iwait; + static u32 tcntxt = 0x80000000; + struct i2o_message *msg = c->in_queue.virt + m; + int rc = 0; + + iwait = i2o_exec_wait_alloc(); + if (!iwait) + return -ENOMEM; + + if (tcntxt == 0xffffffff) + tcntxt = 0x80000000; + + if (dma) + iwait->dma = *dma; + + /* + * Fill in the message initiator context and transaction context. + * We will only use transaction contexts >= 0x80000000 for POST WAIT, + * so we could find a POST WAIT reply easier in the reply handler. + */ + writel(i2o_exec_driver.context, &msg->u.s.icntxt); + iwait->tcntxt = tcntxt++; + writel(iwait->tcntxt, &msg->u.s.tcntxt); + + /* + * Post the message to the controller. At some point later it will + * return. If we time out before it returns then complete will be zero. + */ + i2o_msg_post(c, m); + + if (!iwait->complete) { + iwait->wq = &wq; + /* + * we add elements add the head, because if a entry in the list + * will never be removed, we have to iterate over it every time + */ + list_add(&iwait->list, &i2o_exec_wait_list); + + prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + + if (!iwait->complete) + schedule_timeout(timeout * HZ); + + finish_wait(&wq, &wait); + + iwait->wq = NULL; + } + + barrier(); + + if (iwait->complete) { + if (readl(&iwait->msg->body[0]) >> 24) + rc = readl(&iwait->msg->body[0]) & 0xff; + i2o_flush_reply(c, iwait->m); + i2o_exec_wait_free(iwait); + } else { + /* + * We cannot remove it now. This is important. When it does + * terminate (which it must do if the controller has not + * died...) then it will otherwise scribble on stuff. + * + * FIXME: try abort message + */ + if (dma) + dma->virt = NULL; + + rc = -ETIMEDOUT; + } + + return rc; +}; + +/** + * i2o_msg_post_wait_complete - Reply to a i2o_msg_post request from IOP + * @c: I2O controller which answers + * @m: message id + * @msg: pointer to the I2O reply message + * + * This function is called in interrupt context only. If the reply reached + * before the timeout, the i2o_exec_wait struct is filled with the message + * and the task will be waked up. The task is now responsible for returning + * the message m back to the controller! If the message reaches us after + * the timeout clean up the i2o_exec_wait struct (including allocated + * DMA buffer). + * + * Return 0 on success and if the message m should not be given back to the + * I2O controller, or >0 on success and if the message should be given back + * afterwords. Returns negative error code on failure. In this case the + * message must also be given back to the controller. + */ +static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m, + struct i2o_message *msg) +{ + struct i2o_exec_wait *wait, *tmp; + static spinlock_t lock = SPIN_LOCK_UNLOCKED; + int rc = 1; + u32 context; + + context = readl(&msg->u.s.tcntxt); + + /* + * We need to search through the i2o_exec_wait_list to see if the given + * message is still outstanding. If not, it means that the IOP took + * longer to respond to the message than we had allowed and timer has + * already expired. Not much we can do about that except log it for + * debug purposes, increase timeout, and recompile. + */ + spin_lock(&lock); + list_for_each_entry_safe(wait, tmp, &i2o_exec_wait_list, list) { + if (wait->tcntxt == context) { + list_del(&wait->list); + + wait->m = m; + wait->msg = msg; + wait->complete = 1; + + barrier(); + + if (wait->wq) { + wake_up_interruptible(wait->wq); + rc = 0; + } else { + struct device *dev; + + dev = &c->pdev->dev; + + pr_debug("timedout reply received!\n"); + i2o_dma_free(dev, &wait->dma); + i2o_exec_wait_free(wait); + rc = -1; + } + + spin_unlock(&lock); + + return rc; + } + } + + spin_unlock(&lock); + + pr_debug("i2o: Bogus reply in POST WAIT (tr-context: %08x)!\n", + context); + + return -1; +}; + +/** + * i2o_exec_probe - Called if a new I2O device (executive class) appears + * @dev: I2O device which should be probed + * + * Registers event notification for every event from Executive device. The + * return is always 0, because we want all devices of class Executive. + * + * Returns 0 on success. + */ +static int i2o_exec_probe(struct device *dev) +{ + struct i2o_device *i2o_dev = to_i2o_device(dev); + + i2o_event_register(i2o_dev, &i2o_exec_driver, 0, 0xffffffff); + + i2o_dev->iop->exec = i2o_dev; + + return 0; +}; + +/** + * i2o_exec_remove - Called on I2O device removal + * @dev: I2O device which was removed + * + * Unregisters event notification from Executive I2O device. + * + * Returns 0 on success. + */ +static int i2o_exec_remove(struct device *dev) +{ + i2o_event_register(to_i2o_device(dev), &i2o_exec_driver, 0, 0); + + return 0; +}; + +/** + * i2o_exec_lct_modified - Called on LCT NOTIFY reply + * @c: I2O controller on which the LCT has modified + * + * This function handles asynchronus LCT NOTIFY replies. It parses the + * new LCT and if the buffer for the LCT was to small sends a LCT NOTIFY + * again. + */ +static void i2o_exec_lct_modified(struct i2o_controller *c) +{ + if (i2o_device_parse_lct(c) == -EAGAIN) + i2o_exec_lct_notify(c, 0); +}; + +/** + * i2o_exec_reply - I2O Executive reply handler + * @c: I2O controller from which the reply comes + * @m: message id + * @msg: pointer to the I2O reply message + * + * This function is always called from interrupt context. If a POST WAIT + * reply was received, pass it to the complete function. If a LCT NOTIFY + * reply was received, a new event is created to handle the update. + * + * Returns 0 on success and if the reply should not be flushed or > 0 + * on success and if the reply should be flushed. Returns negative error + * code on failure and if the reply should be flushed. + */ +static int i2o_exec_reply(struct i2o_controller *c, u32 m, + struct i2o_message *msg) +{ + if (readl(&msg->u.head[0]) & MSG_FAIL) { // Fail bit is set + struct i2o_message *pmsg; /* preserved message */ + u32 pm; + + pm = readl(&msg->body[3]); + + pmsg = c->in_queue.virt + pm; + + i2o_report_status(KERN_INFO, "i2o_core", msg); + + /* Release the preserved msg by resubmitting it as a NOP */ + i2o_msg_nop(c, pm); + + /* If reply to i2o_post_wait failed, return causes a timeout */ + return -1; + } + + if (readl(&msg->u.s.tcntxt) & 0x80000000) + return i2o_msg_post_wait_complete(c, m, msg); + + if ((readl(&msg->u.head[1]) >> 24) == I2O_CMD_LCT_NOTIFY) { + struct work_struct *work; + + pr_debug("%s: LCT notify received\n", c->name); + + work = kmalloc(sizeof(*work), GFP_ATOMIC); + if (!work) + return -ENOMEM; + + INIT_WORK(work, (void (*)(void *))i2o_exec_lct_modified, c); + queue_work(i2o_exec_driver.event_queue, work); + return 1; + } + + /* + * If this happens, we want to dump the message to the syslog so + * it can be sent back to the card manufacturer by the end user + * to aid in debugging. + * + */ + printk(KERN_WARNING "%s: Unsolicited message reply sent to core!" + "Message dumped to syslog\n", c->name); + i2o_dump_message(msg); + + return -EFAULT; +} + +/** + * i2o_exec_event - Event handling function + * @evt: Event which occurs + * + * Handles events send by the Executive device. At the moment does not do + * anything useful. + */ +static void i2o_exec_event(struct i2o_event *evt) +{ + printk(KERN_INFO "Event received from device: %d\n", + evt->i2o_dev->lct_data.tid); + kfree(evt); +}; + +/** + * i2o_exec_lct_get - Get the IOP's Logical Configuration Table + * @c: I2O controller from which the LCT should be fetched + * + * Send a LCT NOTIFY request to the controller, and wait + * I2O_TIMEOUT_LCT_GET seconds until arrival of response. If the LCT is + * to large, retry it. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_exec_lct_get(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + int i = 0; + int rc = -EAGAIN; + + for (i = 1; i <= I2O_LCT_GET_TRIES; i++) { + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(EIGHT_WORD_MSG_SIZE | SGL_OFFSET_6, &msg->u.head[0]); + writel(I2O_CMD_LCT_NOTIFY << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(0xffffffff, &msg->body[0]); + writel(0x00000000, &msg->body[1]); + writel(0xd0000000 | c->dlct.len, &msg->body[2]); + writel(c->dlct.phys, &msg->body[3]); + + rc = i2o_msg_post_wait(c, m, I2O_TIMEOUT_LCT_GET); + if (rc < 0) + break; + + rc = i2o_device_parse_lct(c); + if (rc != -EAGAIN) + break; + } + + return rc; +} + +/** + * i2o_exec_lct_notify - Send a asynchronus LCT NOTIFY request + * @c: I2O controller to which the request should be send + * @change_ind: change indicator + * + * This function sends a LCT NOTIFY request to the I2O controller with + * the change indicator change_ind. If the change_ind == 0 the controller + * replies immediately after the request. If change_ind > 0 the reply is + * send after change indicator of the LCT is > change_ind. + */ +int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) +{ + i2o_status_block *sb = c->status_block.virt; + struct device *dev; + struct i2o_message *msg; + u32 m; + + dev = &c->pdev->dev; + + if (i2o_dma_realloc(dev, &c->dlct, sb->expected_lct_size, GFP_KERNEL)) + return -ENOMEM; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(EIGHT_WORD_MSG_SIZE | SGL_OFFSET_6, &msg->u.head[0]); + writel(I2O_CMD_LCT_NOTIFY << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_exec_driver.context, &msg->u.s.icntxt); + writel(0, &msg->u.s.tcntxt); /* FIXME */ + writel(0xffffffff, &msg->body[0]); + writel(change_ind, &msg->body[1]); + writel(0xd0000000 | c->dlct.len, &msg->body[2]); + writel(c->dlct.phys, &msg->body[3]); + + i2o_msg_post(c, m); + + return 0; +}; + +/* Exec OSM driver struct */ +struct i2o_driver i2o_exec_driver = { + .name = "exec-osm", + .reply = i2o_exec_reply, + .event = i2o_exec_event, + .classes = i2o_exec_class_id, + .driver = { + .probe = i2o_exec_probe, + .remove = i2o_exec_remove, + }, +}; + +/** + * i2o_exec_init - Registers the Exec OSM + * + * Registers the Exec OSM in the I2O core. + * + * Returns 0 on success or negative error code on failure. + */ +int __init i2o_exec_init(void) +{ + return i2o_driver_register(&i2o_exec_driver); +}; + +/** + * i2o_exec_exit - Removes the Exec OSM + * + * Unregisters the Exec OSM from the I2O core. + */ +void __exit i2o_exec_exit(void) +{ + i2o_driver_unregister(&i2o_exec_driver); +}; + +EXPORT_SYMBOL(i2o_msg_post_wait_mem); +EXPORT_SYMBOL(i2o_exec_lct_get); +EXPORT_SYMBOL(i2o_exec_lct_notify); diff -Nru a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c --- a/drivers/message/i2o/i2o_block.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/message/i2o/i2o_block.c 2004-09-06 16:37:54 -07:00 @@ -1,463 +1,426 @@ /* - * I2O Random Block Storage Class OSM + * Block OSM * - * (C) Copyright 1999-2002 Red Hat - * - * Written by Alan Cox, Building Number Three Ltd - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * For the purpose of avoiding doubt the preferred form of the work - * for making modifications shall be a standards compliant form such - * gzipped tar and not one requiring a proprietary or patent encumbered - * tool to unpack. - * - * This is a beta test release. Most of the good code was taken - * from the nbd driver by Pavel Machek, who in turn took some of it - * from loop.c. Isn't free software great for reusability 8) - * - * Fixes/additions: - * Steve Ralston: - * Multiple device handling error fixes, - * Added a queue depth. - * Alan Cox: - * FC920 has an rmw bug. Dont or in the end marker. - * Removed queue walk, fixed for 64bitness. - * Rewrote much of the code over time - * Added indirect block lists - * Handle 64K limits on many controllers - * Don't use indirects on the Promise (breaks) - * Heavily chop down the queue depths - * Deepak Saxena: - * Independent queues per IOP - * Support for dynamic device creation/deletion - * Code cleanup - * Support for larger I/Os through merge* functions - * (taken from DAC960 driver) - * Boji T Kannanthanam: - * Set the I2O Block devices to be detected in increasing - * order of TIDs during boot. - * Search and set the I2O block device that we boot off from as - * the first device to be claimed (as /dev/i2o/hda) - * Properly attach/detach I2O gendisk structure from the system - * gendisk list. The I2O block devices now appear in - * /proc/partitions. - * Markus Lidel : - * Minor bugfixes for 2.6. + * Copyright (C) 1999-2002 Red Hat Software * - * To do: - * Serial number scanning to find duplicates for FC multipathing + * Written by Alan Cox, Building Number Three Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * For the purpose of avoiding doubt the preferred form of the work + * for making modifications shall be a standards compliant form such + * gzipped tar and not one requiring a proprietary or patent encumbered + * tool to unpack. + * + * Fixes/additions: + * Steve Ralston: + * Multiple device handling error fixes, + * Added a queue depth. + * Alan Cox: + * FC920 has an rmw bug. Dont or in the end marker. + * Removed queue walk, fixed for 64bitness. + * Rewrote much of the code over time + * Added indirect block lists + * Handle 64K limits on many controllers + * Don't use indirects on the Promise (breaks) + * Heavily chop down the queue depths + * Deepak Saxena: + * Independent queues per IOP + * Support for dynamic device creation/deletion + * Code cleanup + * Support for larger I/Os through merge* functions + * (taken from DAC960 driver) + * Boji T Kannanthanam: + * Set the I2O Block devices to be detected in increasing + * order of TIDs during boot. + * Search and set the I2O block device that we boot off + * from as the first device to be claimed (as /dev/i2o/hda) + * Properly attach/detach I2O gendisk structure from the + * system gendisk list. The I2O block devices now appear in + * /proc/partitions. + * Markus Lidel : + * Minor bugfixes for 2.6. */ -#include - #include -#include -#include -#include -#include -#include -#include -#include -#include #include + +#include + +#include #include -#include -#include #include -#include -#include -#include -#include +#include "i2o_block.h" -#include -#include -#include -#include -#include -#include - -#define MAJOR_NR I2O_MAJOR - -#define MAX_I2OB 16 - -#define MAX_I2OB_DEPTH 8 -#define MAX_I2OB_RETRIES 4 - -//#define DRIVERDEBUG -#ifdef DRIVERDEBUG -#define DEBUG( s ) printk( s ) -#else -#define DEBUG( s ) -#endif +static struct i2o_driver i2o_block_driver; -/* - * Events that this OSM is interested in - */ -#define I2OB_EVENT_MASK (I2O_EVT_IND_BSA_VOLUME_LOAD | \ - I2O_EVT_IND_BSA_VOLUME_UNLOAD | \ - I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ | \ - I2O_EVT_IND_BSA_CAPACITY_CHANGE | \ - I2O_EVT_IND_BSA_SCSI_SMART ) +/* global Block OSM request mempool */ +static struct i2o_block_mempool i2o_blk_req_pool; +/* Block OSM class handling definition */ +static struct i2o_class_id i2o_block_class_id[] = { + {I2O_CLASS_RANDOM_BLOCK_STORAGE}, + {I2O_CLASS_END} +}; -/* - * Some of these can be made smaller later +/** + * i2o_block_device_free - free the memory of the I2O Block device + * @dev: I2O Block device, which should be cleaned up + * + * Frees the request queue, gendisk and the i2o_block_device structure. */ +static void i2o_block_device_free(struct i2o_block_device *dev) +{ + blk_cleanup_queue(dev->gd->queue); -static int i2ob_context; -static struct block_device_operations i2ob_fops; + put_disk(dev->gd); -/* - * I2O Block device descriptor + kfree(dev); +}; + +/** + * i2o_block_remove - remove the I2O Block device from the system again + * @dev: I2O Block device which should be removed + * + * Remove gendisk from system and free all allocated memory. + * + * Always returns 0. */ -struct i2ob_device +static int i2o_block_remove(struct device *dev) { - struct i2o_controller *controller; - struct i2o_device *i2odev; - int unit; - int tid; - int flags; - int refcnt; - struct request *head, *tail; - request_queue_t *req_queue; - int max_segments; - int max_direct; /* Not yet used properly */ - int done_flag; - int depth; - int rcache; - int wcache; - int power; - int index; - int media_change_flag; - u32 max_sectors; - struct gendisk *gd; + struct i2o_device *i2o_dev = to_i2o_device(dev); + struct i2o_block_device *i2o_blk_dev = dev_get_drvdata(dev); + + printk(KERN_INFO "block-osm: Device removed %s\n", + i2o_blk_dev->gd->disk_name); + + i2o_event_register(i2o_dev, &i2o_block_driver, 0, 0); + + del_gendisk(i2o_blk_dev->gd); + + dev_set_drvdata(dev, NULL); + + i2o_device_claim_release(i2o_dev); + + i2o_block_device_free(i2o_blk_dev); + + return 0; }; -/* - * FIXME: - * We should cache align these to avoid ping-ponging lines on SMP - * boxes under heavy I/O load... +/** + * i2o_block_device flush - Flush all dirty data of I2O device dev + * @dev: I2O device which should be flushed + * + * Flushes all dirty data on device dev. + * + * Returns 0 on success or negative error code on failure. */ - -struct i2ob_request +static int i2o_block_device_flush(struct i2o_device *dev) { - struct i2ob_request *next; - struct request *req; - int num; - int sg_dma_direction; - int sg_nents; - struct scatterlist sg_table[16]; + struct i2o_message *msg; + u32 m; + + m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_BLOCK_CFLUSH << 24 | HOST_TID << 12 | dev->lct_data.tid, + &msg->u.head[1]); + writel(60 << 16, &msg->body[0]); + pr_debug("Flushing...\n"); + + return i2o_msg_post_wait(dev->iop, m, 60); }; -/* - * Per IOP request queue information +/** + * i2o_block_device_mount - Mount (load) the media of device dev + * @dev: I2O device which should receive the mount request + * @media_id: Media Identifier + * + * Load a media into drive. Identifier should be set to -1, because the + * spec does not support any other value. * - * We have a separate request_queue_t per IOP so that a heavilly - * loaded I2O block device on an IOP does not starve block devices - * across all I2O controllers. - * - */ -struct i2ob_iop_queue -{ - unsigned int queue_depth; - struct i2ob_request request_queue[MAX_I2OB_DEPTH]; - struct i2ob_request *i2ob_qhead; - request_queue_t *req_queue; - spinlock_t lock; + * Returns 0 on success or negative error code on failure. + */ +static int i2o_block_device_mount(struct i2o_device *dev, u32 media_id) +{ + struct i2o_message *msg; + u32 m; + + m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_BLOCK_MMOUNT << 24 | HOST_TID << 12 | dev->lct_data.tid, + &msg->u.head[1]); + writel(-1, &msg->body[0]); + writel(0, &msg->body[1]); + pr_debug("Mounting...\n"); + + return i2o_msg_post_wait(dev->iop, m, 2); }; -static struct i2ob_iop_queue *i2ob_queues[MAX_I2O_CONTROLLERS]; -/* - * Each I2O disk is one of these. +/** + * i2o_block_device_lock - Locks the media of device dev + * @dev: I2O device which should receive the lock request + * @media_id: Media Identifier + * + * Lock media of device dev to prevent removal. The media identifier + * should be set to -1, because the spec does not support any other value. + * + * Returns 0 on success or negative error code on failure. */ +static int i2o_block_device_lock(struct i2o_device *dev, u32 media_id) +{ + struct i2o_message *msg; + u32 m; -static struct i2ob_device i2ob_dev[MAX_I2OB]; -static int i2ob_dev_count = 0; + m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_BLOCK_MLOCK << 24 | HOST_TID << 12 | dev->lct_data.tid, + &msg->u.head[1]); + writel(-1, &msg->body[0]); + pr_debug("Locking...\n"); -/* - * Mutex and spin lock for event handling synchronization - * evt_msg contains the last event. + return i2o_msg_post_wait(dev->iop, m, 2); +}; + +/** + * i2o_block_device_unlock - Unlocks the media of device dev + * @dev: I2O device which should receive the unlocked request + * @media_id: Media Identifier + * + * Unlocks the media in device dev. The media identifier should be set to + * -1, because the spec does not support any other value. + * + * Returns 0 on success or negative error code on failure. */ -static DECLARE_MUTEX_LOCKED(i2ob_evt_sem); -static DECLARE_COMPLETION(i2ob_thread_dead); -static spinlock_t i2ob_evt_lock = SPIN_LOCK_UNLOCKED; -static u32 evt_msg[MSG_FRAME_SIZE]; - -static void i2o_block_reply(struct i2o_handler *, struct i2o_controller *, - struct i2o_message *); -static void i2ob_new_device(struct i2o_controller *, struct i2o_device *); -static void i2ob_del_device(struct i2o_controller *, struct i2o_device *); -static void i2ob_reboot_event(void); -static int i2ob_install_device(struct i2o_controller *, struct i2o_device *, int); -static void i2ob_end_request(struct request *); -static void i2ob_request(request_queue_t *); -static int i2ob_init_iop(unsigned int); -static int i2ob_query_device(struct i2ob_device *, int, int, void*, int); -static int i2ob_evt(void *); - -static int evt_pid = 0; -static int evt_running = 0; -static int scan_unit = 0; +static int i2o_block_device_unlock(struct i2o_device *dev, u32 media_id) +{ + struct i2o_message *msg; + u32 m; -/* - * I2O OSM registration structure...keeps getting bigger and bigger :) + m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_BLOCK_MUNLOCK << 24 | HOST_TID << 12 | dev->lct_data.tid, + &msg->u.head[1]); + writel(media_id, &msg->body[0]); + pr_debug("Unlocking...\n"); + + return i2o_msg_post_wait(dev->iop, m, 2); +}; + +/** + * i2o_block_device_power - Power management for device dev + * @dev: I2O device which should receive the power management request + * @operation: Operation which should be send + * + * Send a power management request to the device dev. + * + * Returns 0 on success or negative error code on failure. */ -static struct i2o_handler i2o_block_handler = +static int i2o_block_device_power(struct i2o_block_device *dev, u8 op) { - i2o_block_reply, - i2ob_new_device, - i2ob_del_device, - i2ob_reboot_event, - "I2O Block OSM", - 0, - I2O_CLASS_RANDOM_BLOCK_STORAGE + struct i2o_device *i2o_dev = dev->i2o_dev; + struct i2o_controller *c = i2o_dev->iop; + struct i2o_message *msg; + u32 m; + int rc; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_BLOCK_POWER << 24 | HOST_TID << 12 | i2o_dev->lct_data. + tid, &msg->u.head[1]); + writel(op << 24, &msg->body[0]); + pr_debug("Power...\n"); + + rc = i2o_msg_post_wait(c, m, 60); + if (!rc) + dev->power = op; + + return rc; }; /** - * i2ob_get - Get an I2O message - * @dev: I2O block device + * i2o_block_request_alloc - Allocate an I2O block request struct + * + * Allocates an I2O block request struct and initialize the list. * - * Get a message from the FIFO used for this block device. The message is returned - * or the I2O 'no message' value of 0xFFFFFFFF if nothing is available. + * Returns a i2o_block_request pointer on success or negative error code + * on failure. */ +static inline struct i2o_block_request *i2o_block_request_alloc(void) +{ + struct i2o_block_request *ireq; + + ireq = mempool_alloc(i2o_blk_req_pool.pool, GFP_ATOMIC); + if (!ireq) + return ERR_PTR(-ENOMEM); + + INIT_LIST_HEAD(&ireq->queue); + + return ireq; +}; -static u32 i2ob_get(struct i2ob_device *dev) +/** + * i2o_block_request_free - Frees a I2O block request + * @ireq: I2O block request which should be freed + * + * Fres the allocated memory (give it back to the request mempool). + */ +static inline void i2o_block_request_free(struct i2o_block_request *ireq) { - struct i2o_controller *c=dev->controller; - return I2O_POST_READ32(c); -} + mempool_free(ireq, i2o_blk_req_pool.pool); +}; -static int i2ob_build_sglist(struct i2ob_device *dev, struct i2ob_request *ireq) +/** + * i2o_block_sglist_alloc - Allocate the SG list and map it + * @ireq: I2O block request + * + * Builds the SG list and map it into to be accessable by the controller. + * + * Returns the number of elements in the SG list or 0 on failure. + */ +static inline int i2o_block_sglist_alloc(struct i2o_block_request *ireq) { - struct scatterlist *sg = ireq->sg_table; + struct device *dev = &ireq->i2o_blk_dev->i2o_dev->iop->pdev->dev; int nents; - nents = blk_rq_map_sg(dev->req_queue, ireq->req, ireq->sg_table); - + nents = blk_rq_map_sg(ireq->req->q, ireq->req, ireq->sg_table); + if (rq_data_dir(ireq->req) == READ) ireq->sg_dma_direction = PCI_DMA_FROMDEVICE; else ireq->sg_dma_direction = PCI_DMA_TODEVICE; - ireq->sg_nents = pci_map_sg(dev->controller->pdev, sg, nents, ireq->sg_dma_direction); + ireq->sg_nents = dma_map_sg(dev, ireq->sg_table, nents, + ireq->sg_dma_direction); + return ireq->sg_nents; -} +}; -void i2ob_free_sglist(struct i2ob_device *dev, struct i2ob_request *ireq) -{ - struct pci_dev *pdev = dev->controller->pdev; - struct scatterlist *sg = ireq->sg_table; - int nents = ireq->sg_nents; - pci_unmap_sg(pdev, sg, nents, ireq->sg_dma_direction); -} - /** - * i2ob_send - Turn a request into a message and send it - * @m: Message offset - * @dev: I2O device - * @ireq: Request structure - * @unit: Device identity - * - * Generate an I2O BSAREAD request. This interface function is called for devices that - * appear to explode when they are fed indirect chain pointers (notably right now this - * appears to afflict Promise hardwre, so be careful what you feed the hardware - * - * No cleanup is done by this interface. It is done on the interrupt side when the - * reply arrives - */ - -static int i2ob_send(u32 m, struct i2ob_device *dev, struct i2ob_request *ireq, int unit) -{ - struct i2o_controller *c = dev->controller; - int tid = dev->tid; - void *msg; - void *mptr; - u64 offset; - struct request *req = ireq->req; - int count = req->nr_sectors<<9; - struct scatterlist *sg; - int sgnum; - int i; + * i2o_block_sglist_free - Frees the SG list + * @ireq: I2O block request from which the SG should be freed + * + * Frees the SG list from the I2O block request. + */ +static inline void i2o_block_sglist_free(struct i2o_block_request *ireq) +{ + struct device *dev = &ireq->i2o_blk_dev->i2o_dev->iop->pdev->dev; - // printk(KERN_INFO "i2ob_send called\n"); - /* Map the message to a virtual address */ - msg = c->msg_virt + m; - - sgnum = i2ob_build_sglist(dev, ireq); - - /* FIXME: if we have no resources how should we get out of this */ - if(sgnum == 0) - BUG(); - - /* - * Build the message based on the request. - */ - i2o_raw_writel(i2ob_context|(unit<<8), msg+8); - i2o_raw_writel(ireq->num, msg+12); - i2o_raw_writel(req->nr_sectors << 9, msg+20); + dma_unmap_sg(dev, ireq->sg_table, ireq->sg_nents, + ireq->sg_dma_direction); +}; - /* - * Mask out partitions from now on - */ - - /* This can be optimised later - just want to be sure its right for - starters */ - offset = ((u64)req->sector) << 9; - i2o_raw_writel( offset & 0xFFFFFFFF, msg+24); - i2o_raw_writel(offset>>32, msg+28); - mptr=msg+32; - - sg = ireq->sg_table; - if(rq_data_dir(req) == READ) - { - DEBUG("READ\n"); - i2o_raw_writel(I2O_CMD_BLOCK_READ<<24|HOST_TID<<12|tid, msg+4); - for(i = sgnum; i > 0; i--) - { - if(i != 1) - i2o_raw_writel(0x10000000|sg_dma_len(sg), mptr); - else - i2o_raw_writel(0xD0000000|sg_dma_len(sg), mptr); - i2o_raw_writel(sg_dma_address(sg), mptr+4); - mptr += 8; - count -= sg_dma_len(sg); - sg++; - } - switch(dev->rcache) - { - case CACHE_NULL: - i2o_raw_writel(0, msg+16);break; - case CACHE_PREFETCH: - i2o_raw_writel(0x201F0008, msg+16);break; - case CACHE_SMARTFETCH: - if(req->nr_sectors > 16) - i2o_raw_writel(0x201F0008, msg+16); - else - i2o_raw_writel(0x001F0000, msg+16); - break; - } - -// printk("Reading %d entries %d bytes.\n", -// mptr-msg-8, req->nr_sectors<<9); - } - else if(rq_data_dir(req) == WRITE) - { - DEBUG("WRITE\n"); - i2o_raw_writel(I2O_CMD_BLOCK_WRITE<<24|HOST_TID<<12|tid, msg+4); - for(i = sgnum; i > 0; i--) - { - if(i != 1) - i2o_raw_writel(0x14000000|sg_dma_len(sg), mptr); - else - i2o_raw_writel(0xD4000000|sg_dma_len(sg), mptr); - i2o_raw_writel(sg_dma_address(sg), mptr+4); - mptr += 8; - count -= sg_dma_len(sg); - sg++; - } +/** + * i2o_block_prep_req_fn - Allocates I2O block device specific struct + * @q: request queue for the request + * @req: the request to prepare + * + * Allocate the necessary i2o_block_request struct and connect it to + * the request. This is needed that we not loose the SG list later on. + * + * Returns BLKPREP_OK on success or BLKPREP_DEFER on failure. + */ +static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) +{ + struct i2o_block_device *i2o_blk_dev = q->queuedata; + struct i2o_block_request *ireq; - switch(dev->wcache) - { - case CACHE_NULL: - i2o_raw_writel(0, msg+16);break; - case CACHE_WRITETHROUGH: - i2o_raw_writel(0x001F0008, msg+16);break; - case CACHE_WRITEBACK: - i2o_raw_writel(0x001F0010, msg+16);break; - case CACHE_SMARTBACK: - if(req->nr_sectors > 16) - i2o_raw_writel(0x001F0004, msg+16); - else - i2o_raw_writel(0x001F0010, msg+16); - break; - case CACHE_SMARTTHROUGH: - if(req->nr_sectors > 16) - i2o_raw_writel(0x001F0004, msg+16); - else - i2o_raw_writel(0x001F0010, msg+16); + /* request is already processed by us, so return */ + if (req->flags & REQ_SPECIAL) { + pr_debug("REQ_SPECIAL already set!\n"); + req->flags |= REQ_DONTPREP; + return BLKPREP_OK; + } + + /* connect the i2o_block_request to the request */ + if (!req->special) { + ireq = i2o_block_request_alloc(); + if (unlikely(IS_ERR(ireq))) { + pr_debug("unable to allocate i2o_block_request!\n"); + return BLKPREP_DEFER; } - -// printk("Writing %d entries %d bytes.\n", -// mptr-msg-8, req->nr_sectors<<9); - } - i2o_raw_writel(I2O_MESSAGE_SIZE(mptr-msg)>>2 | SGL_OFFSET_8, msg); - - if(count != 0) - { - printk(KERN_ERR "Request count botched by %d.\n", count); - } - i2o_post_message(c,m); - i2ob_queues[c->unit]->queue_depth ++; + ireq->i2o_blk_dev = i2o_blk_dev; + req->special = ireq; + ireq->req = req; + } else + ireq = req->special; - return 0; -} + /* do not come back here */ + req->flags |= REQ_DONTPREP | REQ_SPECIAL; -/* - * Remove a request from the _locked_ request list. We update both the - * list chain and if this is the last item the tail pointer. Caller - * must hold the lock. - */ - -static inline void i2ob_unhook_request(struct i2ob_request *ireq, - unsigned int iop) -{ - ireq->next = i2ob_queues[iop]->i2ob_qhead; - i2ob_queues[iop]->i2ob_qhead = ireq; -} + return BLKPREP_OK; +}; -/* - * Request completion handler +/** + * i2o_block_delayed_request_fn - delayed request queue function + * delayed_request: the delayed request with the queue to start + * + * If the request queue is stopped for a disk, and there is no open + * request, a new event is created, which calls this function to start + * the queue after I2O_BLOCK_REQUEST_TIME. Otherwise the queue will never + * be started again. */ - -static inline void i2ob_end_request(struct request *req) +static void i2o_block_delayed_request_fn(void *delayed_request) { - /* FIXME - pci unmap the request */ - - /* - * Loop until all of the buffers that are linked - * to this request have been marked updated and - * unlocked. - */ - - while (end_that_request_first( req, !req->errors, req->hard_cur_sectors )); + struct i2o_block_delayed_request *dreq = delayed_request; + struct request_queue *q = dreq->queue; + unsigned long flags; - /* - * It is now ok to complete the request. - */ - end_that_request_last( req ); - DEBUG("IO COMPLETED\n"); -} + spin_lock_irqsave(q->queue_lock, flags); + blk_start_queue(q); + spin_unlock_irqrestore(q->queue_lock, flags); + kfree(dreq); +}; -/* - * OSM reply handler. This gets all the message replies +/** + * i2o_block_reply - Block OSM reply handler. + * @c: I2O controller from which the message arrives + * @m: message id of reply + * qmsg: the actuall I2O message reply + * + * This function gets all the message replies. + * */ - -static void i2o_block_reply(struct i2o_handler *h, struct i2o_controller *c, struct i2o_message *msg) +static int i2o_block_reply(struct i2o_controller *c, u32 m, + struct i2o_message *msg) { - unsigned long flags; - struct i2ob_request *ireq = NULL; + struct i2o_block_request *ireq; + struct request *req; + struct i2o_block_device *dev; + struct request_queue *q; u8 st; - u32 *m = (u32 *)msg; - u8 unit = m[2]>>8; - struct i2ob_device *dev = &i2ob_dev[unit]; + unsigned long flags; - /* - * FAILed message - */ - if(m[0] & (1<<13)) - { - DEBUG("FAIL"); + /* FAILed message */ + if (unlikely(readl(&msg->u.head[0]) & (1 << 13))) { + struct i2o_message *pmsg; + u32 pm; + + printk(KERN_WARNING "FAIL"); /* * FAILed message from controller * We increment the error count and abort it @@ -468,65 +431,85 @@ * better be on the safe side since no one really follows * the spec to the book :) */ - ireq=&i2ob_queues[c->unit]->request_queue[m[3]]; - ireq->req->errors++; + pm = readl(&msg->body[3]); + pmsg = c->in_queue.virt + pm; + + req = i2o_cntxt_list_get(c, readl(&pmsg->u.s.tcntxt)); + if (unlikely(!req)) { + printk(KERN_ERR "block-osm: NULL reply received!\n"); + return -1; + } + + ireq = req->special; + dev = ireq->i2o_blk_dev; + q = dev->gd->queue; + + req->errors++; + + spin_lock_irqsave(q->queue_lock, flags); + + while (end_that_request_chunk(req, !req->errors, + readl(&pmsg->body[1]))) ; + end_that_request_last(req); + + dev->open_queue_depth--; + list_del(&ireq->queue); + blk_start_queue(q); + + spin_unlock_irqrestore(q->queue_lock, flags); - spin_lock_irqsave(dev->req_queue->queue_lock, flags); - i2ob_unhook_request(ireq, c->unit); - i2ob_end_request(ireq->req); - spin_unlock_irqrestore(dev->req_queue->queue_lock, flags); - /* Now flush the message by making it a NOP */ - m[0]&=0x00FFFFFF; - m[0]|=(I2O_CMD_UTIL_NOP)<<24; - i2o_post_message(c, (unsigned long) m - (unsigned long) c->msg_virt); + i2o_msg_nop(c, pm); - return; + return -1; } - if(msg->function == I2O_CMD_UTIL_EVT_REGISTER) - { - spin_lock(&i2ob_evt_lock); - memcpy(evt_msg, msg, (m[0]>>16)<<2); - spin_unlock(&i2ob_evt_lock); - up(&i2ob_evt_sem); - return; + req = i2o_cntxt_list_get(c, readl(&msg->u.s.tcntxt)); + if (unlikely(!req)) { + printk(KERN_ERR "block-osm: NULL reply received!\n"); + return -1; } - if(!dev->i2odev) - { + ireq = req->special; + dev = ireq->i2o_blk_dev; + q = dev->gd->queue; + + if (unlikely(!dev->i2o_dev)) { /* * This is HACK, but Intel Integrated RAID allows user - * to delete a volume that is claimed, locked, and in use + * to delete a volume that is claimed, locked, and in use * by the OS. We have to check for a reply from a - * non-existent device and flag it as an error or the system + * non-existent device and flag it as an error or the system * goes kaput... */ - ireq=&i2ob_queues[c->unit]->request_queue[m[3]]; - ireq->req->errors++; - printk(KERN_WARNING "I2O Block: Data transfer to deleted device!\n"); - spin_lock_irqsave(dev->req_queue->queue_lock, flags); - i2ob_unhook_request(ireq, c->unit); - i2ob_end_request(ireq->req); - spin_unlock_irqrestore(dev->req_queue->queue_lock, flags); - return; - } + req->errors++; + printk(KERN_WARNING + "I2O Block: Data transfer to deleted device!\n"); + spin_lock_irqsave(q->queue_lock, flags); + while (end_that_request_chunk + (req, !req->errors, readl(&msg->body[1]))) ; + end_that_request_last(req); + + dev->open_queue_depth--; + list_del(&ireq->queue); + blk_start_queue(q); + + spin_unlock_irqrestore(q->queue_lock, flags); + return -1; + } /* - * Lets see what is cooking. We stuffed the - * request in the context. + * Lets see what is cooking. We stuffed the + * request in the context. */ - - ireq=&i2ob_queues[c->unit]->request_queue[m[3]]; - st=m[4]>>24; - if(st!=0) - { + st = readl(&msg->body[0]) >> 24; + + if (st != 0) { int err; - char *bsa_errors[] = - { - "Success", - "Media Error", + char *bsa_errors[] = { + "Success", + "Media Error", "Failure communicating to device", "Device Failure", "Device is not ready", @@ -540,61 +523,62 @@ "Device has reset", "Volume has changed, waiting for acknowledgement" }; - - err = m[4]&0xFFFF; - + + err = readl(&msg->body[0]) & 0xffff; + /* - * Device not ready means two things. One is that the - * the thing went offline (but not a removal media) + * Device not ready means two things. One is that the + * the thing went offline (but not a removal media) * - * The second is that you have a SuperTrak 100 and the - * firmware got constipated. Unlike standard i2o card - * setups the supertrak returns an error rather than - * blocking for the timeout in these cases. + * The second is that you have a SuperTrak 100 and the + * firmware got constipated. Unlike standard i2o card + * setups the supertrak returns an error rather than + * blocking for the timeout in these cases. * - * Don't stick a supertrak100 into cache aggressive modes + * Don't stick a supertrak100 into cache aggressive modes */ - - - printk(KERN_ERR "\n/dev/%s error: %s", dev->i2odev->dev_name, - bsa_errors[m[4]&0XFFFF]); - if(m[4]&0x00FF0000) - printk(" - DDM attempted %d retries", (m[4]>>16)&0x00FF ); + + printk(KERN_ERR "\n/dev/%s error: %s", dev->gd->disk_name, + bsa_errors[readl(&msg->body[0]) & 0xffff]); + if (readl(&msg->body[0]) & 0x00ff0000) + printk(" - DDM attempted %d retries", + (readl(&msg->body[0]) >> 16) & 0x00ff); printk(".\n"); - ireq->req->errors++; - } - else - ireq->req->errors = 0; + req->errors++; + } else + req->errors = 0; - /* - * Dequeue the request. We use irqsave locks as one day we - * may be running polled controllers from a BH... - */ - - i2ob_free_sglist(dev, ireq); - spin_lock_irqsave(dev->req_queue->queue_lock, flags); - i2ob_unhook_request(ireq, c->unit); - i2ob_end_request(ireq->req); - i2ob_queues[c->unit]->queue_depth --; - - /* - * We may be able to do more I/O - */ - - i2ob_request(dev->gd->queue); - spin_unlock_irqrestore(dev->req_queue->queue_lock, flags); -} + if (!end_that_request_chunk(req, !req->errors, readl(&msg->body[1]))) { + add_disk_randomness(req->rq_disk); + spin_lock_irqsave(q->queue_lock, flags); -/* - * Event handler. Needs to be a separate thread b/c we may have - * to do things like scan a partition table, or query parameters - * which cannot be done from an interrupt or from a bottom half. - */ -static int i2ob_evt(void *dummy) + end_that_request_last(req); + + dev->open_queue_depth--; + list_del(&ireq->queue); + blk_start_queue(q); + + spin_unlock_irqrestore(q->queue_lock, flags); + + i2o_block_sglist_free(ireq); + i2o_block_request_free(ireq); + } else + printk(KERN_ERR "still remaining chunks\n"); + + return 1; +}; + +static void i2o_block_event(struct i2o_event *evt) +{ + printk(KERN_INFO "block-osm: event received\n"); +}; + +#if 0 +static int i2o_block_event(void *dummy) { unsigned int evt; unsigned long flags; - struct i2ob_device *dev; + struct i2o_block_device *dev; int unit; //The only event that has data is the SCSI_SMART event. struct i2o_reply { @@ -604,24 +588,22 @@ u8 ASCQ; u16 pad; u8 data[16]; - } *evt_local; + } *evt_local; daemonize("i2oblock"); allow_signal(SIGKILL); evt_running = 1; - while(1) - { - if(down_interruptible(&i2ob_evt_sem)) - { + while (1) { + if (down_interruptible(&i2ob_evt_sem)) { evt_running = 0; printk("exiting..."); break; } /* - * Keep another CPU/interrupt from overwriting the + * Keep another CPU/interrupt from overwriting the * message while we're reading it * * We stuffed the unit in the TxContext and grab the event mask @@ -634,20 +616,19 @@ unit = le32_to_cpu(evt_local->header[3]); evt = le32_to_cpu(evt_local->evt_indicator); - dev = &i2ob_dev[unit]; - switch(evt) - { + dev = &i2o_blk_dev[unit]; + switch (evt) { /* * New volume loaded on same TID, so we just re-install. * The TID/controller don't change as it is the same * I2O device. It's just new media that we have to * rescan. */ - case I2O_EVT_IND_BSA_VOLUME_LOAD: + case I2O_EVT_IND_BSA_VOLUME_LOAD: { - i2ob_install_device(dev->i2odev->controller, - dev->i2odev, unit); - add_disk(dev->gd); + i2ob_install_device(dev->i2o_device->iop, + dev->i2o_device, unit); + add_disk(dev->gendisk); break; } @@ -657,144 +638,108 @@ * have media, so we don't want to clear the controller or * device pointer. */ - case I2O_EVT_IND_BSA_VOLUME_UNLOAD: + case I2O_EVT_IND_BSA_VOLUME_UNLOAD: { - struct gendisk *p = dev->gd; - blk_queue_max_sectors(dev->gd->queue, 0); + struct gendisk *p = dev->gendisk; + blk_queue_max_sectors(dev->gendisk->queue, 0); del_gendisk(p); put_disk(p); - dev->gd = NULL; + dev->gendisk = NULL; dev->media_change_flag = 1; break; } - case I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ: - printk(KERN_WARNING "%s: Attempt to eject locked media\n", - dev->i2odev->dev_name); - break; + case I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ: + printk(KERN_WARNING + "%s: Attempt to eject locked media\n", + dev->i2o_device->dev_name); + break; /* * The capacity has changed and we are going to be - * updating the max_sectors and other information + * updating the max_sectors and other information * about this disk. We try a revalidate first. If * the block device is in use, we don't want to * do that as there may be I/Os bound for the disk - * at the moment. In that case we read the size + * at the moment. In that case we read the size * from the device and update the information ourselves * and the user can later force a partition table * update through an ioctl. */ - case I2O_EVT_IND_BSA_CAPACITY_CHANGE: + case I2O_EVT_IND_BSA_CAPACITY_CHANGE: { u64 size; - if(i2ob_query_device(dev, 0x0004, 0, &size, 8) !=0 ) - i2ob_query_device(dev, 0x0000, 4, &size, 8); - - spin_lock_irqsave(dev->req_queue->queue_lock, flags); - set_capacity(dev->gd, size>>9); - spin_unlock_irqrestore(dev->req_queue->queue_lock, flags); + if (i2ob_query_device(dev, 0x0004, 0, &size, 8) + != 0) + i2ob_query_device(dev, 0x0000, 4, &size, + 8); + + spin_lock_irqsave(dev->req_queue->queue_lock, + flags); + set_capacity(dev->gendisk, size >> 9); + spin_unlock_irqrestore(dev->req_queue-> + queue_lock, flags); break; } - /* + /* * We got a SCSI SMART event, we just log the relevant * information and let the user decide what they want * to do with the information. */ - case I2O_EVT_IND_BSA_SCSI_SMART: + case I2O_EVT_IND_BSA_SCSI_SMART: { char buf[16]; - printk(KERN_INFO "I2O Block: %s received a SCSI SMART Event\n",dev->i2odev->dev_name); - evt_local->data[16]='\0'; - sprintf(buf,"%s",&evt_local->data[0]); - printk(KERN_INFO " Disk Serial#:%s\n",buf); - printk(KERN_INFO " ASC 0x%02x \n",evt_local->ASC); - printk(KERN_INFO " ASCQ 0x%02x \n",evt_local->ASCQ); + printk(KERN_INFO + "I2O Block: %s received a SCSI SMART Event\n", + dev->i2o_device->dev_name); + evt_local->data[16] = '\0'; + sprintf(buf, "%s", &evt_local->data[0]); + printk(KERN_INFO " Disk Serial#:%s\n", + buf); + printk(KERN_INFO " ASC 0x%02x \n", + evt_local->ASC); + printk(KERN_INFO " ASCQ 0x%02x \n", + evt_local->ASCQ); break; } - + /* - * Non event + * Non event */ - - case 0: - break; - + + case 0: + break; + /* * An event we didn't ask for. Call the card manufacturer * and tell them to fix their firmware :) */ - - case 0x20: - /* - * If a promise card reports 0x20 event then the brown stuff - * hit the fan big time. The card seems to recover but loses - * the pending writes. Deeply ungood except for testing fsck - */ - if(dev->i2odev->controller->promise) - panic("I2O controller firmware failed. Reboot and force a filesystem check.\n"); - default: - printk(KERN_INFO "%s: Received event 0x%X we didn't register for\n" - KERN_INFO " Blame the I2O card manufacturer 8)\n", - dev->i2odev->dev_name, evt); - break; - } - }; - - complete_and_exit(&i2ob_thread_dead,0); - return 0; -} - -/* - * The I2O block driver is listed as one of those that pulls the - * front entry off the queue before processing it. This is important - * to remember here. If we drop the io lock then CURRENT will change - * on us. We must unlink CURRENT in this routine before we return, if - * we use it. - */ - -static void i2ob_request(request_queue_t *q) -{ - struct request *req; - struct i2ob_request *ireq; - struct i2ob_device *dev; - u32 m; - - while ((req = elv_next_request(q)) != NULL) { - dev = req->rq_disk->private_data; - - /* - * Queue depths probably belong with some kind of - * generic IOP commit control. Certainly it's not right - * its global! - */ - if(i2ob_queues[dev->unit]->queue_depth >= dev->depth) - break; - - /* Get a message */ - m = i2ob_get(dev); - if(m==0xFFFFFFFF) - { - if(i2ob_queues[dev->unit]->queue_depth == 0) - printk(KERN_ERR "i2o_block: message queue and request queue empty!!\n"); + case 0x20: + /* + * If a promise card reports 0x20 event then the brown stuff + * hit the fan big time. The card seems to recover but loses + * the pending writes. Deeply ungood except for testing fsck + */ + if (dev->i2o_device->iop->promise) + panic + ("I2O controller firmware failed. Reboot and force a filesystem check.\n"); + default: + printk(KERN_INFO + "%s: Received event 0x%X we didn't register for\n" + KERN_INFO + " Blame the I2O card manufacturer 8)\n", + dev->i2o_device->dev_name, evt); break; } - /* - * Everything ok, so pull from kernel queue onto our queue - */ - req->errors = 0; - blkdev_dequeue_request(req); - - ireq = i2ob_queues[dev->unit]->i2ob_qhead; - i2ob_queues[dev->unit]->i2ob_qhead = ireq->next; - ireq->req = req; + }; - i2ob_send(m, dev, ireq, dev->index); - } + complete_and_exit(&i2ob_thread_dead, 0); + return 0; } - +#endif /* * SCSI-CAM for ioctl geometry mapping @@ -803,8 +748,8 @@ * * LBA -> CHS mapping table taken from: * - * "Incorporating the I2O Architecture into BIOS for Intel Architecture - * Platforms" + * "Incorporating the I2O Architecture into BIOS for Intel Architecture + * Platforms" * * This is an I2O document that is only available to I2O members, * not developers. @@ -825,865 +770,647 @@ #define BLOCK_SIZE_42G 8806400 #define BLOCK_SIZE_84G 17612800 -static void i2o_block_biosparam( - unsigned long capacity, - unsigned short *cyls, - unsigned char *hds, - unsigned char *secs) -{ - unsigned long heads, sectors, cylinders; +static void i2o_block_biosparam(unsigned long capacity, unsigned short *cyls, + unsigned char *hds, unsigned char *secs) +{ + unsigned long heads, sectors, cylinders; - sectors = 63L; /* Maximize sectors per track */ - if(capacity <= BLOCK_SIZE_528M) + sectors = 63L; /* Maximize sectors per track */ + if (capacity <= BLOCK_SIZE_528M) heads = 16; - else if(capacity <= BLOCK_SIZE_1G) + else if (capacity <= BLOCK_SIZE_1G) heads = 32; - else if(capacity <= BLOCK_SIZE_21G) + else if (capacity <= BLOCK_SIZE_21G) heads = 64; - else if(capacity <= BLOCK_SIZE_42G) + else if (capacity <= BLOCK_SIZE_42G) heads = 128; else heads = 255; cylinders = (unsigned long)capacity / (heads * sectors); - *cyls = (unsigned short) cylinders; /* Stuff return values */ - *secs = (unsigned char) sectors; - *hds = (unsigned char) heads; + *cyls = (unsigned short)cylinders; /* Stuff return values */ + *secs = (unsigned char)sectors; + *hds = (unsigned char)heads; } -/* - * Issue device specific ioctl calls. +/** + * i2o_block_open - Open the block device + * + * Power up the device, mount and lock the media. This function is called, + * if the block device is opened for access. + * + * Returns 0 on success or negative error code on failure. */ - -static int i2ob_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static int i2o_block_open(struct inode *inode, struct file *file) { - struct gendisk *disk = inode->i_bdev->bd_disk; - struct i2ob_device *dev = disk->private_data; - void __user *argp = (void __user *)arg; + struct i2o_block_device *dev = inode->i_bdev->bd_disk->private_data; - /* Anyone capable of this syscall can do *real bad* things */ + if (!dev->i2o_dev) + return -ENODEV; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - switch (cmd) { - case HDIO_GETGEO: - { - struct hd_geometry g; - i2o_block_biosparam(get_capacity(disk), - &g.cylinders, &g.heads, &g.sectors); - g.start = get_start_sect(inode->i_bdev); - return copy_to_user(argp, &g, sizeof(g))?-EFAULT:0; - } - - case BLKI2OGRSTRAT: - return put_user(dev->rcache, (int __user *)argp); - case BLKI2OGWSTRAT: - return put_user(dev->wcache, (int __user *)argp); - case BLKI2OSRSTRAT: - if(arg<0||arg>CACHE_SMARTFETCH) - return -EINVAL; - dev->rcache = arg; - break; - case BLKI2OSWSTRAT: - if(arg!=0 && (argCACHE_SMARTBACK)) - return -EINVAL; - dev->wcache = arg; - break; - } - return -ENOTTY; -} + if (dev->power > 0x1f) + i2o_block_device_power(dev, 0x02); -/* - * Close the block device down + i2o_block_device_mount(dev->i2o_dev, -1); + + i2o_block_device_lock(dev->i2o_dev, -1); + + pr_debug("Ready.\n"); + + return 0; +}; + +/** + * i2o_block_release - Release the I2O block device + * + * Unlock and unmount the media, and power down the device. Gets called if + * the block device is closed. + * + * Returns 0 on success or negative error code on failure. */ - -static int i2ob_release(struct inode *inode, struct file *file) +static int i2o_block_release(struct inode *inode, struct file *file) { struct gendisk *disk = inode->i_bdev->bd_disk; - struct i2ob_device *dev = disk->private_data; + struct i2o_block_device *dev = disk->private_data; + u8 operation; /* * This is to deail with the case of an application * opening a device and then the device dissapears while * it's in use, and then the application tries to release - * it. ex: Unmounting a deleted RAID volume at reboot. + * it. ex: Unmounting a deleted RAID volume at reboot. * If we send messages, it will just cause FAILs since * the TID no longer exists. */ - if(!dev->i2odev) + if (!dev->i2o_dev) return 0; - if (dev->refcnt <= 0) - printk(KERN_ALERT "i2ob_release: refcount(%d) <= 0\n", dev->refcnt); - dev->refcnt--; - if(dev->refcnt==0) - { - /* - * Flush the onboard cache on unmount - */ - u32 msg[5]; - int *query_done = &dev->done_flag; - msg[0] = (FIVE_WORD_MSG_SIZE|SGL_OFFSET_0); - msg[1] = I2O_CMD_BLOCK_CFLUSH<<24|HOST_TID<<12|dev->tid; - msg[2] = i2ob_context|0x40000000; - msg[3] = (u32)query_done; - msg[4] = 60<<16; - DEBUG("Flushing..."); - i2o_post_wait(dev->controller, msg, 20, 60); + i2o_block_device_flush(dev->i2o_dev); - /* - * Unlock the media - */ - msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_MUNLOCK<<24|HOST_TID<<12|dev->tid; - msg[2] = i2ob_context|0x40000000; - msg[3] = (u32)query_done; - msg[4] = -1; - DEBUG("Unlocking..."); - i2o_post_wait(dev->controller, msg, 20, 2); - DEBUG("Unlocked.\n"); - - msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_POWER<<24 | HOST_TID << 12 | dev->tid; - if(dev->flags & (1<<3|1<<4)) /* Removable */ - msg[4] = 0x21 << 24; - else - msg[4] = 0x24 << 24; + i2o_block_device_unlock(dev->i2o_dev, -1); - if(i2o_post_wait(dev->controller, msg, 20, 60)==0) - dev->power = 0x24; + if (dev->flags & (1 << 3 | 1 << 4)) /* Removable */ + operation = 0x21; + else + operation = 0x24; - /* - * Now unclaim the device. - */ + i2o_block_device_power(dev, operation); - if (i2o_release_device(dev->i2odev, &i2o_block_handler)) - printk(KERN_ERR "i2ob_release: controller rejected unclaim.\n"); - - DEBUG("Unclaim\n"); - } return 0; } -/* - * Open the block device. +/** + * i2o_block_ioctl - Issue device specific ioctl calls. + * @cmd: ioctl command + * @arg: arg + * + * Handles ioctl request for the block device. + * + * Return 0 on success or negative error on failure. */ - -static int i2ob_open(struct inode *inode, struct file *file) +static int i2o_block_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { struct gendisk *disk = inode->i_bdev->bd_disk; - struct i2ob_device *dev = disk->private_data; + struct i2o_block_device *dev = disk->private_data; + void __user *argp = (void __user *)arg; - if(!dev->i2odev) - return -ENODEV; - - if(dev->refcnt++==0) - { - u32 msg[6]; - - DEBUG("Claim "); - if(i2o_claim_device(dev->i2odev, &i2o_block_handler)) - { - dev->refcnt--; - printk(KERN_INFO "I2O Block: Could not open device\n"); - return -EBUSY; - } - DEBUG("Claimed "); - /* - * Power up if needed - */ + /* Anyone capable of this syscall can do *real bad* things */ + + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; - if(dev->power > 0x1f) + switch (cmd) { + case HDIO_GETGEO: { - msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_POWER<<24 | HOST_TID << 12 | dev->tid; - msg[4] = 0x02 << 24; - if(i2o_post_wait(dev->controller, msg, 20, 60) == 0) - dev->power = 0x02; + struct hd_geometry g; + i2o_block_biosparam(get_capacity(disk), + &g.cylinders, &g.heads, &g.sectors); + g.start = get_start_sect(inode->i_bdev); + return copy_to_user(argp, &g, sizeof(g)) ? -EFAULT : 0; } - /* - * Mount the media if needed. Note that we don't use - * the lock bit. Since we have to issue a lock if it - * refuses a mount (quite possible) then we might as - * well just send two messages out. - */ - msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_MMOUNT<<24|HOST_TID<<12|dev->tid; - msg[4] = -1; - msg[5] = 0; - DEBUG("Mount "); - i2o_post_wait(dev->controller, msg, 24, 2); - - /* - * Lock the media - */ - msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_MLOCK<<24|HOST_TID<<12|dev->tid; - msg[4] = -1; - DEBUG("Lock "); - i2o_post_wait(dev->controller, msg, 20, 2); - DEBUG("Ready.\n"); - } - return 0; -} + case BLKI2OGRSTRAT: + return put_user(dev->rcache, (int __user *)arg); + case BLKI2OGWSTRAT: + return put_user(dev->wcache, (int __user *)arg); + case BLKI2OSRSTRAT: + if (arg < 0 || arg > CACHE_SMARTFETCH) + return -EINVAL; + dev->rcache = arg; + break; + case BLKI2OSWSTRAT: + if (arg != 0 + && (arg < CACHE_WRITETHROUGH || arg > CACHE_SMARTBACK)) + return -EINVAL; + dev->wcache = arg; + break; + } + return -ENOTTY; +}; -/* - * Issue a device query +/** + * i2o_block_media_changed - Have we seen a media change? + * @disk: gendisk which should be verified + * + * Verifies if the media has changed. + * + * Returns 1 if the media was changed or 0 otherwise. */ - -static int i2ob_query_device(struct i2ob_device *dev, int table, - int field, void *buf, int buflen) +static int i2o_block_media_changed(struct gendisk *disk) { - return i2o_query_scalar(dev->controller, dev->tid, - table, field, buf, buflen); -} + struct i2o_block_device *p = disk->private_data; + if (p->media_change_flag) { + p->media_change_flag = 0; + return 1; + } + return 0; +} -/* - * Install the I2O block device we found. +/** + * i2o_block_transfer - Transfer a request to/from the I2O controller + * @req: the request which should be transfered + * + * This function converts the request into a I2O message. The necessary + * DMA buffers are allocated and after everything is setup post the message + * to the I2O controller. No cleanup is done by this function. It is done + * on the interrupt side when the reply arrives. + * + * Return 0 on success or negative error code on failure. */ - -static int i2ob_install_device(struct i2o_controller *c, struct i2o_device *d, int unit) +static int i2o_block_transfer(struct request *req) { - u64 size; - u32 blocksize; - u8 type; - u16 power; - u32 flags, status; - struct i2ob_device *dev=&i2ob_dev[unit]; - struct gendisk *disk; - request_queue_t *q; - int segments; + struct i2o_block_device *dev = req->rq_disk->private_data; + struct i2o_controller *c = dev->i2o_dev->iop; + int tid = dev->i2o_dev->lct_data.tid; + struct i2o_message *msg; + void *mptr; + struct i2o_block_request *ireq = req->special; + struct scatterlist *sg; + int sgnum; + int i; + u32 m; + u32 tcntxt; + u32 sg_flags; + int rc; + m = i2o_msg_get(c, &msg); + if (m == I2O_QUEUE_EMPTY) { + rc = -EBUSY; + goto exit; + } - /* - * For logging purposes... - */ - printk(KERN_INFO "i2ob: Installing tid %d device at unit %d\n", - d->lct_data.tid, unit); + tcntxt = i2o_cntxt_list_add(c, req); + if (!tcntxt) { + rc = -ENOMEM; + goto nop_msg; + } - /* - * If this is the first I2O block device found on this IOP, - * we need to initialize all the queue data structures - * before any I/O can be performed. If it fails, this - * device is useless. - */ - if(!i2ob_queues[c->unit]) { - if(i2ob_init_iop(c->unit)) - return 1; + if ((sgnum = i2o_block_sglist_alloc(ireq)) <= 0) { + rc = -ENOMEM; + goto context_remove; } - q = i2ob_queues[c->unit]->req_queue; + /* Build the message based on the request. */ + writel(i2o_block_driver.context, &msg->u.s.icntxt); + writel(tcntxt, &msg->u.s.tcntxt); + writel(req->nr_sectors << 9, &msg->body[1]); - /* - * This will save one level of lookup/indirection in critical - * code so that we can directly get the queue ptr from the - * device instead of having to go the IOP data structure. - */ - dev->req_queue = q; + writel((((u64) req->sector) << 9) & 0xffffffff, &msg->body[2]); + writel(req->sector >> 23, &msg->body[3]); - /* - * Allocate a gendisk structure and initialize it - */ - disk = alloc_disk(16); - if (!disk) - return 1; + mptr = &msg->body[4]; - dev->gd = disk; - /* initialize gendik structure */ - disk->major = MAJOR_NR; - disk->first_minor = unit<<4; - disk->queue = q; - disk->fops = &i2ob_fops; - sprintf(disk->disk_name, "i2o/hd%c", 'a' + unit); - disk->private_data = dev; + sg = ireq->sg_table; - /* - * Ask for the current media data. If that isn't supported - * then we ask for the device capacity data - */ - if(i2ob_query_device(dev, 0x0004, 1, &blocksize, 4) != 0 - || i2ob_query_device(dev, 0x0004, 0, &size, 8) !=0 ) - { - i2ob_query_device(dev, 0x0000, 3, &blocksize, 4); - i2ob_query_device(dev, 0x0000, 4, &size, 8); + if (rq_data_dir(req) == READ) { + writel(I2O_CMD_BLOCK_READ << 24 | HOST_TID << 12 | tid, + &msg->u.head[1]); + sg_flags = 0x10000000; + switch (dev->rcache) { + case CACHE_NULL: + writel(0, &msg->body[0]); + break; + case CACHE_PREFETCH: + writel(0x201F0008, &msg->body[0]); + break; + case CACHE_SMARTFETCH: + if (req->nr_sectors > 16) + writel(0x201F0008, &msg->body[0]); + else + writel(0x001F0000, &msg->body[0]); + break; + } + } else { + writel(I2O_CMD_BLOCK_WRITE << 24 | HOST_TID << 12 | tid, + &msg->u.head[1]); + sg_flags = 0x14000000; + switch (dev->wcache) { + case CACHE_NULL: + writel(0, &msg->body[0]); + break; + case CACHE_WRITETHROUGH: + writel(0x001F0008, &msg->body[0]); + break; + case CACHE_WRITEBACK: + writel(0x001F0010, &msg->body[0]); + break; + case CACHE_SMARTBACK: + if (req->nr_sectors > 16) + writel(0x001F0004, &msg->body[0]); + else + writel(0x001F0010, &msg->body[0]); + break; + case CACHE_SMARTTHROUGH: + if (req->nr_sectors > 16) + writel(0x001F0004, &msg->body[0]); + else + writel(0x001F0010, &msg->body[0]); + } } - - if(i2ob_query_device(dev, 0x0000, 2, &power, 2)!=0) - power = 0; - i2ob_query_device(dev, 0x0000, 5, &flags, 4); - i2ob_query_device(dev, 0x0000, 6, &status, 4); - set_capacity(disk, size>>9); - /* - * Max number of Scatter-Gather Elements - */ + for (i = sgnum; i > 0; i--) { + if (i == 1) + sg_flags |= 0x80000000; + writel(sg_flags | sg_dma_len(sg), mptr); + writel(sg_dma_address(sg), mptr + 4); + mptr += 8; + sg++; + } + + writel(I2O_MESSAGE_SIZE + (((unsigned long)mptr - + (unsigned long)&msg->u.head[0]) >> 2) | SGL_OFFSET_8, + &msg->u.head[0]); - dev->power = power; /* Save power state in device proper */ - dev->flags = flags; + i2o_msg_post(c, m); - segments = (d->controller->status_block->inbound_frame_size - 7) / 2; + list_add_tail(&ireq->queue, &dev->open_queue); + dev->open_queue_depth++; - if(segments > 16) - segments = 16; - - dev->power = power; /* Save power state */ - dev->flags = flags; /* Keep the type info */ - - blk_queue_max_sectors(q, 96); /* 256 might be nicer but many controllers - explode on 65536 or higher */ - blk_queue_max_phys_segments(q, segments); - blk_queue_max_hw_segments(q, segments); - - dev->rcache = CACHE_SMARTFETCH; - dev->wcache = CACHE_WRITETHROUGH; - - if(d->controller->battery == 0) - dev->wcache = CACHE_WRITETHROUGH; - - if(d->controller->promise) - dev->wcache = CACHE_WRITETHROUGH; - - if(d->controller->short_req) - { - blk_queue_max_sectors(q, 8); - blk_queue_max_phys_segments(q, 8); - blk_queue_max_hw_segments(q, 8); - } - - strcpy(d->dev_name, disk->disk_name); - strcpy(disk->devfs_name, disk->disk_name); - - printk(KERN_INFO "%s: Max segments %d, queue depth %d, byte limit %d.\n", - d->dev_name, dev->max_segments, dev->depth, dev->max_sectors<<9); - - i2ob_query_device(dev, 0x0000, 0, &type, 1); - - printk(KERN_INFO "%s: ", d->dev_name); - switch(type) - { - case 0: printk("Disk Storage");break; - case 4: printk("WORM");break; - case 5: printk("CD-ROM");break; - case 7: printk("Optical device");break; - default: - printk("Type %d", type); - } - if(status&(1<<10)) - printk("(RAID)"); + return 0; - if((flags^status)&(1<<4|1<<3)) /* Missing media or device */ - { - printk(KERN_INFO " Not loaded.\n"); - /* Device missing ? */ - if((flags^status)&(1<<4)) - return 1; - } - else - { - printk(": %dMB, %d byte sectors", - (int)(size>>20), blocksize); - } - if(status&(1<<0)) - { - u32 cachesize; - i2ob_query_device(dev, 0x0003, 0, &cachesize, 4); - cachesize>>=10; - if(cachesize>4095) - printk(", %dMb cache", cachesize>>10); - else - printk(", %dKb cache", cachesize); - } - printk(".\n"); - printk(KERN_INFO "%s: Maximum sectors/read set to %d.\n", - d->dev_name, dev->max_sectors); + context_remove: + i2o_cntxt_list_remove(c, req); - /* - * Register for the events we're interested in and that the - * device actually supports. - */ + nop_msg: + i2o_msg_nop(c, m); - i2o_event_register(c, d->lct_data.tid, i2ob_context, unit, - (I2OB_EVENT_MASK & d->lct_data.event_capabilities)); - return 0; -} + exit: + return rc; +}; -/* - * Initialize IOP specific queue structures. This is called - * once for each IOP that has a block device sitting behind it. +/** + * i2o_block_request_fn - request queue handling function + * q: request queue from which the request could be fetched + * + * Takes the next request from the queue, transfers it and if no error + * occurs dequeue it from the queue. On arrival of the reply the message + * will be processed further. If an error occurs requeue the request. */ -static int i2ob_init_iop(unsigned int unit) +static void i2o_block_request_fn(struct request_queue *q) { - int i; + struct request *req; - i2ob_queues[unit] = (struct i2ob_iop_queue *) kmalloc(sizeof(struct i2ob_iop_queue), GFP_ATOMIC); - if(!i2ob_queues[unit]) - { - printk(KERN_WARNING "Could not allocate request queue for I2O block device!\n"); - return -1; - } + while (!blk_queue_plugged(q)) { + req = elv_next_request(q); + if (!req) + break; - for(i = 0; i< MAX_I2OB_DEPTH; i++) - { - i2ob_queues[unit]->request_queue[i].next = &i2ob_queues[unit]->request_queue[i+1]; - i2ob_queues[unit]->request_queue[i].num = i; - } - - /* Queue is MAX_I2OB + 1... */ - i2ob_queues[unit]->request_queue[i].next = NULL; - i2ob_queues[unit]->i2ob_qhead = &i2ob_queues[unit]->request_queue[0]; - i2ob_queues[unit]->queue_depth = 0; - - i2ob_queues[unit]->lock = SPIN_LOCK_UNLOCKED; - i2ob_queues[unit]->req_queue = blk_init_queue(i2ob_request, &i2ob_queues[unit]->lock); - if (!i2ob_queues[unit]->req_queue) { - kfree(i2ob_queues[unit]); - return -1; - } + if (blk_fs_request(req)) { + struct i2o_block_delayed_request *dreq; + struct i2o_block_request *ireq = req->special; + unsigned int queue_depth; + + queue_depth = ireq->i2o_blk_dev->open_queue_depth; + + if (queue_depth < I2O_BLOCK_MAX_OPEN_REQUESTS) + if (!i2o_block_transfer(req)) { + blkdev_dequeue_request(req); + continue; + } - i2ob_queues[unit]->req_queue->queuedata = &i2ob_queues[unit]; + if (queue_depth) + break; - return 0; -} + /* stop the queue and retry later */ + dreq = kmalloc(sizeof(*dreq), GFP_ATOMIC); + if (!dreq) + continue; -/* - * Probe the I2O subsytem for block class devices + dreq->queue = q; + INIT_WORK(&dreq->work, i2o_block_delayed_request_fn, + dreq); + + printk(KERN_INFO "block-osm: transfer error\n"); + if (!queue_delayed_work(i2o_block_driver.event_queue, + &dreq->work, + I2O_BLOCK_RETRY_TIME)) + kfree(dreq); + else { + blk_stop_queue(q); + break; + } + } else + end_request(req, 0); + } +}; + +/* I2O Block device operations definition */ +static struct block_device_operations i2o_block_fops = { + .owner = THIS_MODULE, + .open = i2o_block_open, + .release = i2o_block_release, + .ioctl = i2o_block_ioctl, + .media_changed = i2o_block_media_changed +}; + +/** + * i2o_block_device_alloc - Allocate memory for a I2O Block device + * + * Allocate memory for the i2o_block_device struct, gendisk and request + * queue and initialize them as far as no additional information is needed. + * + * Returns a pointer to the allocated I2O Block device on succes or a + * negative error code on failure. */ -static void i2ob_scan(int bios) +static struct i2o_block_device *i2o_block_device_alloc(void) { - int i; - int warned = 0; + struct i2o_block_device *dev; + struct gendisk *gd; + struct request_queue *queue; + int rc; - struct i2o_device *d, *b=NULL; - struct i2o_controller *c; - - for(i=0; i< MAX_I2O_CONTROLLERS; i++) - { - c=i2o_find_controller(i); - - if(c==NULL) - continue; + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) { + printk(KERN_ERR "block-osm: Insufficient memory to allocate " + "I2O Block disk.\n"); + rc = -ENOMEM; + goto exit; + } + memset(dev, 0, sizeof(*dev)); - /* - * The device list connected to the I2O Controller is doubly linked - * Here we traverse the end of the list , and start claiming devices - * from that end. This assures that within an I2O controller atleast - * the newly created volumes get claimed after the older ones, thus - * mapping to same major/minor (and hence device file name) after - * every reboot. - * The exception being: - * 1. If there was a TID reuse. - * 2. There was more than one I2O controller. - */ + INIT_LIST_HEAD(&dev->open_queue); + spin_lock_init(&dev->lock); + dev->rcache = CACHE_PREFETCH; + dev->wcache = CACHE_WRITEBACK; - if(!bios) - { - for (d=c->devices;d!=NULL;d=d->next) - if(d->next == NULL) - b = d; - } - else - b = c->devices; + /* allocate a gendisk with 16 partitions */ + gd = alloc_disk(16); + if (!gd) { + printk(KERN_ERR "block-osm: Insufficient memory to allocate " + "gendisk.\n"); + rc = -ENOMEM; + goto cleanup_dev; + } - while(b != NULL) - { - d=b; - if(bios) - b = b->next; - else - b = b->prev; + /* initialize the request queue */ + queue = blk_init_queue(i2o_block_request_fn, &dev->lock); + if (!queue) { + printk(KERN_ERR "block-osm: Insufficient memory to allocate " + "request queue.\n"); + rc = -ENOMEM; + goto cleanup_queue; + } - if(d->lct_data.class_id!=I2O_CLASS_RANDOM_BLOCK_STORAGE) - continue; + blk_queue_prep_rq(queue, i2o_block_prep_req_fn); - if(d->lct_data.user_tid != 0xFFF) - continue; + gd->major = I2O_MAJOR; + gd->queue = queue; + gd->fops = &i2o_block_fops; + gd->private_data = dev; - if(bios) - { - if(d->lct_data.bios_info != 0x80) - continue; - printk(KERN_INFO "Claiming as Boot device: Controller %d, TID %d\n", c->unit, d->lct_data.tid); - } - else - { - if(d->lct_data.bios_info == 0x80) - continue; /*Already claimed on pass 1 */ - } + dev->gd = gd; - if(scan_unitiop; + struct gendisk *gd; + struct request_queue *queue; + static int unit = 0; + int rc; + u64 size; + u32 blocksize; + u16 power; + u32 flags, status; + int segments; -/* - * New device notification handler. Called whenever a new - * I2O block storage device is added to the system. - * - * Should we spin lock around this to keep multiple devs from - * getting updated at the same time? - * - */ -void i2ob_new_device(struct i2o_controller *c, struct i2o_device *d) -{ - struct i2ob_device *dev; - int unit = 0; - - printk(KERN_INFO "i2o_block: New device detected\n"); - printk(KERN_INFO " Controller %d Tid %d\n",c->unit, d->lct_data.tid); - - /* Check for available space */ - if(i2ob_dev_count>=MAX_I2OB) - { - printk(KERN_ERR "i2o_block: No more devices allowed!\n"); - return; - } - for(unit = 0; unit < MAX_I2OB; unit ++) - { - if(!i2ob_dev[unit].i2odev) - break; + /* skip devices which are used by IOP */ + if (i2o_dev->lct_data.user_tid != 0xfff) { + pr_debug("skipping used device %03x\n", i2o_dev->lct_data.tid); + return -ENODEV; } - if(i2o_claim_device(d, &i2o_block_handler)) - { - printk(KERN_INFO "i2o_block: Unable to claim device. Installation aborted\n"); - return; - } - - dev = &i2ob_dev[unit]; - dev->i2odev = d; - dev->controller = c; - dev->tid = d->lct_data.tid; - dev->unit = c->unit; - - if(i2ob_install_device(c,d,unit)) { - i2o_release_device(d, &i2o_block_handler); - printk(KERN_ERR "i2o_block: Could not install new device\n"); - } - else - { - i2o_release_device(d, &i2o_block_handler); - add_disk(dev->gd); - i2ob_dev_count++; - i2o_device_notify_on(d, &i2o_block_handler); + printk(KERN_INFO "block-osm: New device detected (TID: %03x)\n", + i2o_dev->lct_data.tid); + + if (i2o_device_claim(i2o_dev)) { + printk(KERN_WARNING "block-osm: Unable to claim device. " + "Installation aborted\n"); + rc = -EFAULT; + goto exit; } - return; -} + i2o_blk_dev = i2o_block_device_alloc(); + if (IS_ERR(i2o_blk_dev)) { + printk(KERN_ERR "block-osm: could not alloc a new I2O block" + "device"); + rc = PTR_ERR(i2o_blk_dev); + goto claim_release; + } -/* - * Deleted device notification handler. Called when a device we - * are talking to has been deleted by the user or some other - * mysterious fource outside the kernel. - */ -void i2ob_del_device(struct i2o_controller *c, struct i2o_device *d) -{ - int unit = 0; - unsigned long flags; - struct i2ob_device *dev; + i2o_blk_dev->i2o_dev = i2o_dev; + dev_set_drvdata(dev, i2o_blk_dev); - for(unit = 0; unit < MAX_I2OB; unit ++) - { - dev = &i2ob_dev[unit]; - if(dev->i2odev == d) - { - printk(KERN_INFO " /dev/%s: Controller %d Tid %d\n", - d->dev_name, c->unit, d->lct_data.tid); - break; - } - } + /* setup gendisk */ + gd = i2o_blk_dev->gd; + gd->first_minor = unit << 4; + sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit); + sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit); + gd->driverfs_dev = &i2o_dev->device; + + /* setup request queue */ + queue = gd->queue; + queue->queuedata = i2o_blk_dev; + + blk_queue_max_phys_segments(queue, I2O_MAX_SEGMENTS); + blk_queue_max_sectors(queue, I2O_MAX_SECTORS); - printk(KERN_INFO "I2O Block Device Deleted\n"); + if (c->short_req) + segments = 8; + else { + i2o_status_block *sb; - if(unit >= MAX_I2OB) - { - printk(KERN_ERR "i2ob_del_device called, but not in dev table!\n"); - return; + sb = c->status_block.virt; + + segments = (sb->inbound_frame_size - + sizeof(struct i2o_message) / 4 - 4) / 2; } - spin_lock_irqsave(dev->req_queue->queue_lock, flags); + blk_queue_max_hw_segments(queue, segments); + + pr_debug("max sectors: %d\n", I2O_MAX_SECTORS); + pr_debug("phys segments: %d\n", I2O_MAX_SEGMENTS); + pr_debug("hw segments: %d\n", segments); /* - * Need to do this...we somtimes get two events from the IRTOS - * in a row and that causes lots of problems. + * Ask for the current media data. If that isn't supported + * then we ask for the device capacity data */ - i2o_device_notify_off(d, &i2o_block_handler); + if (i2o_parm_field_get(i2o_dev, 0x0004, 1, &blocksize, 4) != 0 + || i2o_parm_field_get(i2o_dev, 0x0004, 0, &size, 8) != 0) { + i2o_parm_field_get(i2o_dev, 0x0000, 3, &blocksize, 4); + i2o_parm_field_get(i2o_dev, 0x0000, 4, &size, 8); + } + pr_debug("blocksize: %d\n", blocksize); - /* - * This will force errors when i2ob_get_queue() is called - * by the kenrel. - */ - if(dev->gd) { - struct gendisk *gd = dev->gd; - gd->queue = NULL; - del_gendisk(gd); - put_disk(gd); - dev->gd = NULL; - } - spin_unlock_irqrestore(dev->req_queue->queue_lock, flags); - dev->req_queue = NULL; - dev->i2odev = NULL; - dev->refcnt = 0; - dev->tid = 0; - - /* - * Do we need this? - * The media didn't really change...the device is just gone - */ - dev->media_change_flag = 1; + if (i2o_parm_field_get(i2o_dev, 0x0000, 2, &power, 2)) + power = 0; + i2o_parm_field_get(i2o_dev, 0x0000, 5, &flags, 4); + i2o_parm_field_get(i2o_dev, 0x0000, 6, &status, 4); - i2ob_dev_count--; -} + set_capacity(gd, size >> 9); -/* - * Have we seen a media change ? - */ -static int i2ob_media_change(struct gendisk *disk) -{ - struct i2ob_device *p = disk->private_data; - if(p->media_change_flag) - { - p->media_change_flag=0; - return 1; - } - return 0; -} + i2o_event_register(i2o_dev, &i2o_block_driver, 0, 0xffffffff); -static int i2ob_revalidate(struct gendisk *disk) -{ - struct i2ob_device *p = disk->private_data; - return i2ob_install_device(p->controller, p->i2odev, p->index); -} + add_disk(gd); -/* - * Reboot notifier. This is called by i2o_core when the system - * shuts down. - */ -static void i2ob_reboot_event(void) -{ - int i; - - for(i=0;irefcnt!=0) - { - /* - * Flush the onboard cache - */ - u32 msg[5]; - int *query_done = &dev->done_flag; - msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_CFLUSH<<24|HOST_TID<<12|dev->tid; - msg[2] = i2ob_context|0x40000000; - msg[3] = (u32)query_done; - msg[4] = 60<<16; - - DEBUG("Flushing..."); - i2o_post_wait(dev->controller, msg, 20, 60); + unit++; - DEBUG("Unlocking..."); - /* - * Unlock the media - */ - msg[0] = FIVE_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_BLOCK_MUNLOCK<<24|HOST_TID<<12|dev->tid; - msg[2] = i2ob_context|0x40000000; - msg[3] = (u32)query_done; - msg[4] = -1; - i2o_post_wait(dev->controller, msg, 20, 2); - - DEBUG("Unlocked.\n"); - } - } -} + return 0; -static struct block_device_operations i2ob_fops = -{ - .owner = THIS_MODULE, - .open = i2ob_open, - .release = i2ob_release, - .ioctl = i2ob_ioctl, - .media_changed = i2ob_media_change, - .revalidate_disk= i2ob_revalidate, + claim_release: + i2o_device_claim_release(i2o_dev); + + exit: + return rc; }; -/* - * And here should be modules and kernel interface - * (Just smiley confuses emacs :-) - */ +/* Block OSM driver struct */ +static struct i2o_driver i2o_block_driver = { + .name = "block-osm", + .event = i2o_block_event, + .reply = i2o_block_reply, + .classes = i2o_block_class_id, + .driver = { + .probe = i2o_block_probe, + .remove = i2o_block_remove, + }, +}; -static int i2o_block_init(void) +/** + * i2o_block_init - Block OSM initialization function + * + * Allocate the slab and mempool for request structs, registers i2o_block + * block device and finally register the Block OSM in the I2O core. + * + * Returns 0 on success or negative error code on failure. + */ +static int __init i2o_block_init(void) { - int i; + int rc; + int size; printk(KERN_INFO "I2O Block Storage OSM v0.9\n"); printk(KERN_INFO " (c) Copyright 1999-2001 Red Hat Software.\n"); - - /* - * Register the block device interfaces - */ - if (register_blkdev(MAJOR_NR, "i2o_block")) - return -EIO; + /* Allocate request mempool and slab */ + size = sizeof(struct i2o_block_request); + i2o_blk_req_pool.slab = kmem_cache_create("i2o_block_req", size, 0, + SLAB_HWCACHE_ALIGN, NULL, + NULL); + if (!i2o_blk_req_pool.slab) { + printk(KERN_ERR "block-osm: can't init request slab\n"); + rc = -ENOMEM; + goto exit; + } + + i2o_blk_req_pool.pool = mempool_create(I2O_REQ_MEMPOOL_SIZE, + mempool_alloc_slab, + mempool_free_slab, + i2o_blk_req_pool.slab); + if (!i2o_blk_req_pool.pool) { + printk(KERN_ERR "block-osm: can't init request mempool\n"); + rc = -ENOMEM; + goto free_slab; + } + + /* Register the block device interfaces */ + rc = register_blkdev(I2O_MAJOR, "i2o_block"); + if (rc) { + printk(KERN_ERR "block-osm: unable to register block device\n"); + goto free_mempool; + } #ifdef MODULE - printk(KERN_INFO "i2o_block: registered device at major %d\n", MAJOR_NR); + printk(KERN_INFO "block-osm: registered device at major %d\n", + I2O_MAJOR); #endif - /* - * Set up the queue - */ - for(i = 0; i < MAX_I2O_CONTROLLERS; i++) - i2ob_queues[i] = NULL; - - /* - * Now fill in the boiler plate - */ - - for (i = 0; i < MAX_I2OB; i++) { - struct i2ob_device *dev = &i2ob_dev[i]; - dev->index = i; - dev->refcnt = 0; - dev->flags = 0; - dev->controller = NULL; - dev->i2odev = NULL; - dev->tid = 0; - dev->head = NULL; - dev->tail = NULL; - dev->depth = MAX_I2OB_DEPTH; - dev->max_sectors = 2; - dev->gd = NULL; - } - - /* - * Register the OSM handler as we will need this to probe for - * drives, geometry and other goodies. - */ - - if(i2o_install_handler(&i2o_block_handler)<0) - { - unregister_blkdev(MAJOR_NR, "i2o_block"); - printk(KERN_ERR "i2o_block: unable to register OSM.\n"); - return -EINVAL; - } - i2ob_context = i2o_block_handler.context; - - /* - * Initialize event handling thread - */ - init_MUTEX_LOCKED(&i2ob_evt_sem); - evt_pid = kernel_thread(i2ob_evt, NULL, CLONE_SIGHAND); - if(evt_pid < 0) - { - printk(KERN_ERR "i2o_block: Could not initialize event thread. Aborting\n"); - i2o_remove_handler(&i2o_block_handler); - return 0; + /* Register Block OSM into I2O core */ + rc = i2o_driver_register(&i2o_block_driver); + if (rc) { + printk(KERN_ERR "block-osm: Could not register Block driver\n"); + goto unregister_blkdev; } - i2ob_probe(); - return 0; - unregister_blkdev(MAJOR_NR, "i2o_block"); - return -ENOMEM; -} + unregister_blkdev: + unregister_blkdev(I2O_MAJOR, "i2o_block"); + free_mempool: + mempool_destroy(i2o_blk_req_pool.pool); -static void i2o_block_exit(void) -{ - int i; - - if(evt_running) { - printk(KERN_INFO "Killing I2O block threads..."); - i = kill_proc(evt_pid, SIGKILL, 1); - if(!i) { - printk("waiting...\n"); - } - /* Be sure it died */ - wait_for_completion(&i2ob_thread_dead); - printk("done.\n"); - } + free_slab: + kmem_cache_destroy(i2o_blk_req_pool.slab); - /* - * Unregister for updates from any devices..otherwise we still - * get them and the core jumps to random memory :O - */ - if(i2ob_dev_count) { - struct i2o_device *d; - for(i = 0; i < MAX_I2OB; i++) - if((d = i2ob_dev[i].i2odev)) - i2ob_del_device(d->controller, d); - } - - /* - * We may get further callbacks for ourself. The i2o_core - * code handles this case reasonably sanely. The problem here - * is we shouldn't get them .. but a couple of cards feel - * obliged to tell us stuff we don't care about. - * - * This isnt ideal at all but will do for now. - */ - - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ); - - /* - * Flush the OSM - */ + exit: + return rc; +}; - i2o_remove_handler(&i2o_block_handler); +/** + * i2o_block_exit - Block OSM exit function + * + * Unregisters Block OSM from I2O core, unregisters i2o_block block device + * and frees the mempool and slab. + */ +static void __exit i2o_block_exit(void) +{ + /* Unregister I2O Block OSM from I2O core */ + i2o_driver_unregister(&i2o_block_driver); - /* - * Return the block device - */ - if (unregister_blkdev(MAJOR_NR, "i2o_block") != 0) - printk("i2o_block: cleanup_module failed\n"); + /* Unregister block device */ + unregister_blkdev(I2O_MAJOR, "i2o_block"); - /* - * release request queue - */ - for (i = 0; i < MAX_I2O_CONTROLLERS; i ++) - if(i2ob_queues[i]) { - blk_cleanup_queue(i2ob_queues[i]->req_queue); - kfree(i2ob_queues[i]); - } -} + /* Free request mempool and slab */ + mempool_destroy(i2o_blk_req_pool.pool); + kmem_cache_destroy(i2o_blk_req_pool.slab); +}; MODULE_AUTHOR("Red Hat"); MODULE_DESCRIPTION("I2O Block Device OSM"); diff -Nru a/drivers/message/i2o/i2o_block.h b/drivers/message/i2o/i2o_block.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/i2o_block.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,99 @@ +/* + * Block OSM structures/API + * + * Copyright (C) 1999-2002 Red Hat Software + * + * Written by Alan Cox, Building Number Three Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * For the purpose of avoiding doubt the preferred form of the work + * for making modifications shall be a standards compliant form such + * gzipped tar and not one requiring a proprietary or patent encumbered + * tool to unpack. + * + * Fixes/additions: + * Steve Ralston: + * Multiple device handling error fixes, + * Added a queue depth. + * Alan Cox: + * FC920 has an rmw bug. Dont or in the end marker. + * Removed queue walk, fixed for 64bitness. + * Rewrote much of the code over time + * Added indirect block lists + * Handle 64K limits on many controllers + * Don't use indirects on the Promise (breaks) + * Heavily chop down the queue depths + * Deepak Saxena: + * Independent queues per IOP + * Support for dynamic device creation/deletion + * Code cleanup + * Support for larger I/Os through merge* functions + * (taken from DAC960 driver) + * Boji T Kannanthanam: + * Set the I2O Block devices to be detected in increasing + * order of TIDs during boot. + * Search and set the I2O block device that we boot off + * from as the first device to be claimed (as /dev/i2o/hda) + * Properly attach/detach I2O gendisk structure from the + * system gendisk list. The I2O block devices now appear in + * /proc/partitions. + * Markus Lidel : + * Minor bugfixes for 2.6. + */ + +#ifndef I2O_BLOCK_OSM_H +#define I2O_BLOCK_OSM_H + +#define I2O_BLOCK_RETRY_TIME HZ/4 +#define I2O_BLOCK_MAX_OPEN_REQUESTS 50 + +/* I2O Block OSM mempool struct */ +struct i2o_block_mempool { + kmem_cache_t *slab; + mempool_t *pool; +}; + +/* I2O Block device descriptor */ +struct i2o_block_device { + struct i2o_device *i2o_dev; /* pointer to I2O device */ + struct gendisk *gd; + spinlock_t lock; /* queue lock */ + struct list_head open_queue; /* list of transfered, but unfinished + requests */ + unsigned int open_queue_depth; /* number of requests in the queue */ + + int rcache; /* read cache flags */ + int wcache; /* write cache flags */ + int flags; + int power; /* power state */ + int media_change_flag; /* media changed flag */ +}; + +/* I2O Block device request */ +struct i2o_block_request +{ + struct list_head queue; + struct request *req; /* corresponding request */ + struct i2o_block_device *i2o_blk_dev; /* I2O block device */ + int sg_dma_direction; /* direction of DMA buffer read/write */ + int sg_nents; /* number of SG elements */ + struct scatterlist sg_table[I2O_MAX_SEGMENTS]; /* SG table */ +}; + +/* I2O Block device delayed request */ +struct i2o_block_delayed_request +{ + struct work_struct work; + struct request_queue *queue; +}; + +#endif diff -Nru a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c --- a/drivers/message/i2o/i2o_config.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/message/i2o/i2o_config.c 2004-09-06 16:37:55 -07:00 @@ -2,7 +2,7 @@ * I2O Configuration Interface Driver * * (C) Copyright 1999-2002 Red Hat - * + * * Written by Alan Cox, Building Number Three Ltd * * Fixes/additions: @@ -41,63 +41,53 @@ #include #include #include +#include +#include +#include #include #include -static int i2o_cfg_context = -1; -static void *page_buf; +extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int); + static spinlock_t i2o_config_lock = SPIN_LOCK_UNLOCKED; struct wait_queue *i2o_wait_queue; #define MODINC(x,y) ((x) = ((x) + 1) % (y)) struct sg_simple_element { - u32 flag_count; + u32 flag_count; u32 addr_bus; }; -struct i2o_cfg_info -{ - struct file* fp; +struct i2o_cfg_info { + struct file *fp; struct fasync_struct *fasync; struct i2o_evt_info event_q[I2O_EVT_Q_LEN]; - u16 q_in; // Queue head index - u16 q_out; // Queue tail index - u16 q_len; // Queue length - u16 q_lost; // Number of lost events - u32 q_id; // Event queue ID...used as tx_context - struct i2o_cfg_info *next; + u16 q_in; // Queue head index + u16 q_out; // Queue tail index + u16 q_len; // Queue length + u16 q_lost; // Number of lost events + ulong q_id; // Event queue ID...used as tx_context + struct i2o_cfg_info *next; }; static struct i2o_cfg_info *open_files = NULL; -static int i2o_cfg_info_id = 0; - -static int ioctl_getiops(unsigned long); -static int ioctl_gethrt(unsigned long); -static int ioctl_getlct(unsigned long); -static int ioctl_parms(unsigned long, unsigned int); -static int ioctl_html(unsigned long); -static int ioctl_swdl(unsigned long); -static int ioctl_swul(unsigned long); -static int ioctl_swdel(unsigned long); -static int ioctl_validate(unsigned long); -static int ioctl_evt_reg(unsigned long, struct file *); -static int ioctl_evt_get(unsigned long, struct file *); -static int ioctl_passthru(unsigned long); -static int cfg_fasync(int, struct file*, int); +static ulong i2o_cfg_info_id = 0; +#if 0 /* * This is the callback for any message we have posted. The message itself * will be returned to the message pool when we return from the IRQ * * This runs in irq context so be short and sweet. */ -static void i2o_cfg_reply(struct i2o_handler *h, struct i2o_controller *c, struct i2o_message *m) +static void i2o_cfg_reply(struct i2o_handler *h, struct i2o_controller *c, + struct i2o_message *m) { - u32 *msg = (u32 *)m; + u32 *msg = (u32 *) m; if (msg[0] & MSG_FAIL) { - u32 *preserved_msg = (u32*)(c->msg_virt + msg[7]); + u32 *preserved_msg = (u32 *) (c->msg_virt + msg[7]); printk(KERN_ERR "i2o_config: IOP failed to process the msg.\n"); @@ -109,26 +99,25 @@ i2o_post_message(c, msg[7]); } - if (msg[4] >> 24) // ReqStatus != SUCCESS - i2o_report_status(KERN_INFO,"i2o_config", msg); + if (msg[4] >> 24) // ReqStatus != SUCCESS + i2o_report_status(KERN_INFO, "i2o_config", msg); - if(m->function == I2O_CMD_UTIL_EVT_REGISTER) - { + if (m->function == I2O_CMD_UTIL_EVT_REGISTER) { struct i2o_cfg_info *inf; - for(inf = open_files; inf; inf = inf->next) - if(inf->q_id == msg[3]) + for (inf = open_files; inf; inf = inf->next) + if (inf->q_id == i2o_cntxt_list_get(c, msg[3])) break; // // If this is the case, it means that we're getting // events for a file descriptor that's been close()'d // w/o the user unregistering for events first. - // The code currently assumes that the user will + // The code currently assumes that the user will // take care of unregistering for events before closing // a file. - // - // TODO: + // + // TODO: // Should we track event registartion and deregister // for events when a file is close()'d so this doesn't // happen? That would get rid of the search through @@ -137,8 +126,8 @@ // it would mean having all sorts of tables to track // what each file is registered for...I think the // current method is simpler. - DS - // - if(!inf) + // + if (!inf) return; inf->event_q[inf->q_in].id.iop = c->unit; @@ -149,278 +138,167 @@ // Data size = msg size - reply header // inf->event_q[inf->q_in].data_size = (m->size - 5) * 4; - if(inf->event_q[inf->q_in].data_size) - memcpy(inf->event_q[inf->q_in].evt_data, - (unsigned char *)(msg + 5), - inf->event_q[inf->q_in].data_size); + if (inf->event_q[inf->q_in].data_size) + memcpy(inf->event_q[inf->q_in].evt_data, + (unsigned char *)(msg + 5), + inf->event_q[inf->q_in].data_size); spin_lock(&i2o_config_lock); MODINC(inf->q_in, I2O_EVT_Q_LEN); - if(inf->q_len == I2O_EVT_Q_LEN) - { + if (inf->q_len == I2O_EVT_Q_LEN) { MODINC(inf->q_out, I2O_EVT_Q_LEN); inf->q_lost++; - } - else - { + } else { // Keep I2OEVTGET on another CPU from touching this inf->q_len++; } spin_unlock(&i2o_config_lock); - -// printk(KERN_INFO "File %p w/id %d has %d events\n", -// inf->fp, inf->q_id, inf->q_len); +// printk(KERN_INFO "File %p w/id %d has %d events\n", +// inf->fp, inf->q_id, inf->q_len); kill_fasync(&inf->fasync, SIGIO, POLL_IN); } return; } +#endif /* * Each of these describes an i2o message handler. They are * multiplexed by the i2o_core code */ - -struct i2o_handler cfg_handler= -{ - i2o_cfg_reply, - NULL, - NULL, - NULL, - "Configuration", - 0, - 0xffffffff // All classes -}; - -static ssize_t cfg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) -{ - printk(KERN_INFO "i2o_config write not yet supported\n"); - return 0; -} - - -static ssize_t cfg_read(struct file *file, char __user *buf, size_t count, loff_t *ptr) -{ - return 0; -} +struct i2o_driver i2o_config_driver = { + .name = "Config-OSM" +}; -/* - * IOCTL Handler - */ -static int cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, - unsigned long arg) +static int i2o_cfg_getiops(unsigned long arg) { - int ret; - - switch(cmd) - { - case I2OGETIOPS: - ret = ioctl_getiops(arg); - break; - - case I2OHRTGET: - ret = ioctl_gethrt(arg); - break; - - case I2OLCTGET: - ret = ioctl_getlct(arg); - break; - - case I2OPARMSET: - ret = ioctl_parms(arg, I2OPARMSET); - break; - - case I2OPARMGET: - ret = ioctl_parms(arg, I2OPARMGET); - break; - - case I2OSWDL: - ret = ioctl_swdl(arg); - break; - - case I2OSWUL: - ret = ioctl_swul(arg); - break; - - case I2OSWDEL: - ret = ioctl_swdel(arg); - break; - - case I2OVALIDATE: - ret = ioctl_validate(arg); - break; - - case I2OHTML: - ret = ioctl_html(arg); - break; - - case I2OEVTREG: - ret = ioctl_evt_reg(arg, fp); - break; + struct i2o_controller *c; + u8 __user *user_iop_table = (void __user *)arg; + u8 tmp[MAX_I2O_CONTROLLERS]; - case I2OEVTGET: - ret = ioctl_evt_get(arg, fp); - break; + memset(tmp, 0, MAX_I2O_CONTROLLERS); - case I2OPASSTHRU: - ret = ioctl_passthru(arg); - break; + if (!access_ok(VERIFY_WRITE, user_iop_table, MAX_I2O_CONTROLLERS)) + return -EFAULT; - default: - ret = -EINVAL; - } + list_for_each_entry(c, &i2o_controllers, list) + tmp[c->unit] = 1; - return ret; -} + __copy_to_user(user_iop_table, tmp, MAX_I2O_CONTROLLERS); -int ioctl_getiops(unsigned long arg) -{ - u8 __user *user_iop_table = (void __user *)arg; - struct i2o_controller *c = NULL; - int i; - u8 foo[MAX_I2O_CONTROLLERS]; - - if(!access_ok(VERIFY_WRITE, user_iop_table, MAX_I2O_CONTROLLERS)) - return -EFAULT; - - for(i = 0; i < MAX_I2O_CONTROLLERS; i++) - { - c = i2o_find_controller(i); - if(c) - { - foo[i] = 1; - if(pci_set_dma_mask(c->pdev, 0xffffffff)) - { - printk(KERN_WARNING "i2o_config : No suitable DMA available on controller %d\n", i); - i2o_unlock_controller(c); - continue; - } - - i2o_unlock_controller(c); - } - else - { - foo[i] = 0; - } - } - - __copy_to_user(user_iop_table, foo, MAX_I2O_CONTROLLERS); return 0; -} +}; -int ioctl_gethrt(unsigned long arg) +static int i2o_cfg_gethrt(unsigned long arg) { struct i2o_controller *c; - struct i2o_cmd_hrtlct __user *cmd = (void __user *)arg; + struct i2o_cmd_hrtlct __user *cmd = (struct i2o_cmd_hrtlct __user *)arg; struct i2o_cmd_hrtlct kcmd; i2o_hrt *hrt; int len; u32 reslen; int ret = 0; - if(copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_hrtlct))) + if (copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_hrtlct))) return -EFAULT; - if(get_user(reslen, kcmd.reslen) < 0) + if (get_user(reslen, kcmd.reslen) < 0) return -EFAULT; - if(kcmd.resbuf == NULL) + if (kcmd.resbuf == NULL) return -EFAULT; - c = i2o_find_controller(kcmd.iop); - if(!c) + c = i2o_find_iop(kcmd.iop); + if (!c) return -ENXIO; - - hrt = (i2o_hrt *)c->hrt; - i2o_unlock_controller(c); + hrt = (i2o_hrt *) c->hrt.virt; len = 8 + ((hrt->entry_len * hrt->num_entries) << 2); - + /* We did a get user...so assuming mem is ok...is this bad? */ put_user(len, kcmd.reslen); - if(len > reslen) - ret = -ENOBUFS; - if(copy_to_user(kcmd.resbuf, (void*)hrt, len)) + if (len > reslen) + ret = -ENOBUFS; + if (copy_to_user(kcmd.resbuf, (void *)hrt, len)) ret = -EFAULT; return ret; -} +}; -int ioctl_getlct(unsigned long arg) +static int i2o_cfg_getlct(unsigned long arg) { struct i2o_controller *c; - struct i2o_cmd_hrtlct __user *cmd = (void __user *)arg; + struct i2o_cmd_hrtlct __user *cmd = (struct i2o_cmd_hrtlct __user *)arg; struct i2o_cmd_hrtlct kcmd; i2o_lct *lct; int len; int ret = 0; u32 reslen; - if(copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_hrtlct))) + if (copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_hrtlct))) return -EFAULT; - if(get_user(reslen, kcmd.reslen) < 0) + if (get_user(reslen, kcmd.reslen) < 0) return -EFAULT; - if(kcmd.resbuf == NULL) + if (kcmd.resbuf == NULL) return -EFAULT; - c = i2o_find_controller(kcmd.iop); - if(!c) + c = i2o_find_iop(kcmd.iop); + if (!c) return -ENXIO; - lct = (i2o_lct *)c->lct; - i2o_unlock_controller(c); + lct = (i2o_lct *) c->lct; len = (unsigned int)lct->table_size << 2; put_user(len, kcmd.reslen); - if(len > reslen) - ret = -ENOBUFS; - else if(copy_to_user(kcmd.resbuf, (void*)lct, len)) + if (len > reslen) + ret = -ENOBUFS; + else if (copy_to_user(kcmd.resbuf, lct, len)) ret = -EFAULT; return ret; -} +}; -static int ioctl_parms(unsigned long arg, unsigned int type) +static int i2o_cfg_parms(unsigned long arg, unsigned int type) { int ret = 0; struct i2o_controller *c; - struct i2o_cmd_psetget __user *cmd = (void __user *)arg; + struct i2o_device *dev; + struct i2o_cmd_psetget __user *cmd = + (struct i2o_cmd_psetget __user *)arg; struct i2o_cmd_psetget kcmd; u32 reslen; u8 *ops; u8 *res; - int len; + int len = 0; - u32 i2o_cmd = (type == I2OPARMGET ? - I2O_CMD_UTIL_PARAMS_GET : - I2O_CMD_UTIL_PARAMS_SET); + u32 i2o_cmd = (type == I2OPARMGET ? + I2O_CMD_UTIL_PARAMS_GET : I2O_CMD_UTIL_PARAMS_SET); - if(copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_psetget))) + if (copy_from_user(&kcmd, cmd, sizeof(struct i2o_cmd_psetget))) return -EFAULT; - if(get_user(reslen, kcmd.reslen)) + if (get_user(reslen, kcmd.reslen)) return -EFAULT; - c = i2o_find_controller(kcmd.iop); - if(!c) + c = i2o_find_iop(kcmd.iop); + if (!c) return -ENXIO; - ops = (u8*)kmalloc(kcmd.oplen, GFP_KERNEL); - if(!ops) - { - i2o_unlock_controller(c); + dev = i2o_iop_find_device(c, kcmd.tid); + if (!dev) + return -ENXIO; + + ops = (u8 *) kmalloc(kcmd.oplen, GFP_KERNEL); + if (!ops) return -ENOMEM; - } - if(copy_from_user(ops, kcmd.opbuf, kcmd.oplen)) - { - i2o_unlock_controller(c); + if (copy_from_user(ops, kcmd.opbuf, kcmd.oplen)) { kfree(ops); return -EFAULT; } @@ -429,404 +307,309 @@ * It's possible to have a _very_ large table * and that the user asks for all of it at once... */ - res = (u8*)kmalloc(65536, GFP_KERNEL); - if(!res) - { - i2o_unlock_controller(c); + res = (u8 *) kmalloc(65536, GFP_KERNEL); + if (!res) { kfree(ops); return -ENOMEM; } - len = i2o_issue_params(i2o_cmd, c, kcmd.tid, - ops, kcmd.oplen, res, 65536); - i2o_unlock_controller(c); + len = i2o_parm_issue(dev, i2o_cmd, ops, kcmd.oplen, res, 65536); kfree(ops); - + if (len < 0) { kfree(res); return -EAGAIN; } put_user(len, kcmd.reslen); - if(len > reslen) + if (len > reslen) ret = -ENOBUFS; - else if(copy_to_user(kcmd.resbuf, res, len)) + else if (copy_to_user(kcmd.resbuf, res, len)) ret = -EFAULT; kfree(res); return ret; -} +}; -int ioctl_html(unsigned long arg) +static int i2o_cfg_swdl(unsigned long arg) { - struct i2o_html __user *cmd = (void __user *)arg; - struct i2o_html kcmd; + struct i2o_sw_xfer kxfer; + struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; + unsigned char maxfrag = 0, curfrag = 1; + struct i2o_dma buffer; + struct i2o_message *msg; + u32 m; + unsigned int status = 0, swlen = 0, fragsize = 8192; struct i2o_controller *c; - u8 *res = NULL; - void *query = NULL; - dma_addr_t query_phys, res_phys; - int ret = 0; - int token; - u32 len; - u32 reslen; - u32 msg[MSG_FRAME_SIZE]; - if(copy_from_user(&kcmd, cmd, sizeof(struct i2o_html))) - { - printk(KERN_INFO "i2o_config: can't copy html cmd\n"); + if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) return -EFAULT; - } - if(get_user(reslen, kcmd.reslen) < 0) - { - printk(KERN_INFO "i2o_config: can't copy html reslen\n"); + if (get_user(swlen, kxfer.swlen) < 0) return -EFAULT; - } - if(!kcmd.resbuf) - { - printk(KERN_INFO "i2o_config: NULL html buffer\n"); + if (get_user(maxfrag, kxfer.maxfrag) < 0) return -EFAULT; - } - c = i2o_find_controller(kcmd.iop); - if(!c) + if (get_user(curfrag, kxfer.curfrag) < 0) + return -EFAULT; + + if (curfrag == maxfrag) + fragsize = swlen - (maxfrag - 1) * 8192; + + if (!kxfer.buf || !access_ok(VERIFY_READ, kxfer.buf, fragsize)) + return -EFAULT; + + c = i2o_find_iop(kxfer.iop); + if (!c) return -ENXIO; - if(kcmd.qlen) /* Check for post data */ - { - query = pci_alloc_consistent(c->pdev, kcmd.qlen, &query_phys); - if(!query) - { - i2o_unlock_controller(c); - return -ENOMEM; - } - if(copy_from_user(query, kcmd.qbuf, kcmd.qlen)) - { - i2o_unlock_controller(c); - printk(KERN_INFO "i2o_config: could not get query\n"); - pci_free_consistent(c->pdev, kcmd.qlen, query, query_phys); - return -EFAULT; - } - } + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -EBUSY; - res = pci_alloc_consistent(c->pdev, 65536, &res_phys); - if(!res) - { - i2o_unlock_controller(c); - pci_free_consistent(c->pdev, kcmd.qlen, query, query_phys); + if (i2o_dma_alloc(&c->pdev->dev, &buffer, fragsize, GFP_KERNEL)) { + i2o_msg_nop(c, m); return -ENOMEM; } - msg[1] = (I2O_CMD_UTIL_CONFIG_DIALOG << 24)|HOST_TID<<12|kcmd.tid; - msg[2] = i2o_cfg_context; - msg[3] = 0; - msg[4] = kcmd.page; - msg[5] = 0xD0000000|65536; - msg[6] = res_phys; - if(!kcmd.qlen) /* Check for post data */ - msg[0] = SEVEN_WORD_MSG_SIZE|SGL_OFFSET_5; - else - { - msg[0] = NINE_WORD_MSG_SIZE|SGL_OFFSET_5; - msg[5] = 0x50000000|65536; - msg[7] = 0xD4000000|(kcmd.qlen); - msg[8] = query_phys; - } - /* - Wait for a considerable time till the Controller - does its job before timing out. The controller might - take more time to process this request if there are - many devices connected to it. - */ - token = i2o_post_wait_mem(c, msg, 9*4, 400, query, res, query_phys, res_phys, kcmd.qlen, 65536); - if(token < 0) - { - printk(KERN_DEBUG "token = %#10x\n", token); - i2o_unlock_controller(c); - - if(token != -ETIMEDOUT) - { - pci_free_consistent(c->pdev, 65536, res, res_phys); - if(kcmd.qlen) - pci_free_consistent(c->pdev, kcmd.qlen, query, query_phys); - } - return token; - } - i2o_unlock_controller(c); + __copy_from_user(buffer.virt, kxfer.buf, fragsize); - len = strnlen(res, 65536); - put_user(len, kcmd.reslen); - if(len > reslen) - ret = -ENOMEM; - if(copy_to_user(kcmd.resbuf, res, len)) - ret = -EFAULT; + writel(NINE_WORD_MSG_SIZE | SGL_OFFSET_7, &msg->u.head[0]); + writel(I2O_CMD_SW_DOWNLOAD << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_config_driver.context, &msg->u.head[2]); + writel(0, &msg->u.head[3]); + writel((((u32) kxfer.flags) << 24) | (((u32) kxfer.sw_type) << 16) | + (((u32) maxfrag) << 8) | (((u32) curfrag)), &msg->body[0]); + writel(swlen, &msg->body[1]); + writel(kxfer.sw_id, &msg->body[2]); + writel(0xD0000000 | fragsize, &msg->body[3]); + writel(buffer.phys, &msg->body[4]); - pci_free_consistent(c->pdev, 65536, res, res_phys); - if(kcmd.qlen) - pci_free_consistent(c->pdev, kcmd.qlen, query, query_phys); +// printk("i2o_config: swdl frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize); + status = i2o_msg_post_wait_mem(c, m, 60, &buffer); - return ret; -} - -int ioctl_swdl(unsigned long arg) + if (status != -ETIMEDOUT) + i2o_dma_free(&c->pdev->dev, &buffer); + + if (status != I2O_POST_WAIT_OK) { + // it fails if you try and send frags out of order + // and for some yet unknown reasons too + printk(KERN_INFO + "i2o_config: swdl failed, DetailedStatus = %d\n", + status); + return status; + } + + return 0; +}; + +static int i2o_cfg_swul(unsigned long arg) { struct i2o_sw_xfer kxfer; - struct i2o_sw_xfer __user *pxfer = (void __user *)arg; + struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; unsigned char maxfrag = 0, curfrag = 1; - unsigned char *buffer; - u32 msg[9]; + struct i2o_dma buffer; + struct i2o_message *msg; + u32 m; unsigned int status = 0, swlen = 0, fragsize = 8192; struct i2o_controller *c; - dma_addr_t buffer_phys; - if(copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) + if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) return -EFAULT; - if(get_user(swlen, kxfer.swlen) < 0) + if (get_user(swlen, kxfer.swlen) < 0) return -EFAULT; - if(get_user(maxfrag, kxfer.maxfrag) < 0) + if (get_user(maxfrag, kxfer.maxfrag) < 0) return -EFAULT; - if(get_user(curfrag, kxfer.curfrag) < 0) + if (get_user(curfrag, kxfer.curfrag) < 0) return -EFAULT; - if(curfrag==maxfrag) fragsize = swlen-(maxfrag-1)*8192; + if (curfrag == maxfrag) + fragsize = swlen - (maxfrag - 1) * 8192; - if(!kxfer.buf || !access_ok(VERIFY_READ, kxfer.buf, fragsize)) + if (!kxfer.buf || !access_ok(VERIFY_WRITE, kxfer.buf, fragsize)) return -EFAULT; - - c = i2o_find_controller(kxfer.iop); - if(!c) + + c = i2o_find_iop(kxfer.iop); + if (!c) return -ENXIO; - buffer=pci_alloc_consistent(c->pdev, fragsize, &buffer_phys); - if (buffer==NULL) - { - i2o_unlock_controller(c); + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -EBUSY; + + if (i2o_dma_alloc(&c->pdev->dev, &buffer, fragsize, GFP_KERNEL)) { + i2o_msg_nop(c, m); return -ENOMEM; } - __copy_from_user(buffer, kxfer.buf, fragsize); - msg[0]= NINE_WORD_MSG_SIZE | SGL_OFFSET_7; - msg[1]= I2O_CMD_SW_DOWNLOAD<<24 | HOST_TID<<12 | ADAPTER_TID; - msg[2]= (u32)cfg_handler.context; - msg[3]= 0; - msg[4]= (((u32)kxfer.flags)<<24) | (((u32)kxfer.sw_type)<<16) | - (((u32)maxfrag)<<8) | (((u32)curfrag)); - msg[5]= swlen; - msg[6]= kxfer.sw_id; - msg[7]= (0xD0000000 | fragsize); - msg[8]= buffer_phys; - -// printk("i2o_config: swdl frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize); - status = i2o_post_wait_mem(c, msg, sizeof(msg), 60, buffer, NULL, buffer_phys, 0, fragsize, 0); - - i2o_unlock_controller(c); - if(status != -ETIMEDOUT) - pci_free_consistent(c->pdev, fragsize, buffer, buffer_phys); - - if (status != I2O_POST_WAIT_OK) - { - // it fails if you try and send frags out of order - // and for some yet unknown reasons too - printk(KERN_INFO "i2o_config: swdl failed, DetailedStatus = %d\n", status); + writel(NINE_WORD_MSG_SIZE | SGL_OFFSET_7, &msg->u.head[0]); + writel(I2O_CMD_SW_UPLOAD << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_config_driver.context, &msg->u.head[2]); + writel(0, &msg->u.head[3]); + writel((u32) kxfer.flags << 24 | (u32) kxfer. + sw_type << 16 | (u32) maxfrag << 8 | (u32) curfrag, + &msg->body[0]); + writel(swlen, &msg->body[1]); + writel(kxfer.sw_id, &msg->body[2]); + writel(0xD0000000 | fragsize, &msg->body[3]); + writel(buffer.phys, &msg->body[4]); + +// printk("i2o_config: swul frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize); + status = i2o_msg_post_wait_mem(c, m, 60, &buffer); + + if (status != I2O_POST_WAIT_OK) { + if (status != -ETIMEDOUT) + i2o_dma_free(&c->pdev->dev, &buffer); + + printk(KERN_INFO + "i2o_config: swul failed, DetailedStatus = %d\n", + status); return status; } - return 0; -} + __copy_to_user(kxfer.buf, buffer.virt, fragsize); + i2o_dma_free(&c->pdev->dev, &buffer); -int ioctl_swul(unsigned long arg) -{ - struct i2o_sw_xfer kxfer; - struct i2o_sw_xfer __user *pxfer = (void __user *)arg; - unsigned char maxfrag = 0, curfrag = 1; - unsigned char *buffer; - u32 msg[9]; - unsigned int status = 0, swlen = 0, fragsize = 8192; - struct i2o_controller *c; - dma_addr_t buffer_phys; - - if(copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) - return -EFAULT; - - if(get_user(swlen, kxfer.swlen) < 0) - return -EFAULT; - - if(get_user(maxfrag, kxfer.maxfrag) < 0) - return -EFAULT; - - if(get_user(curfrag, kxfer.curfrag) < 0) - return -EFAULT; - - if(curfrag==maxfrag) fragsize = swlen-(maxfrag-1)*8192; - - if(!kxfer.buf || !access_ok(VERIFY_WRITE, kxfer.buf, fragsize)) - return -EFAULT; - - c = i2o_find_controller(kxfer.iop); - if(!c) - return -ENXIO; - - buffer=pci_alloc_consistent(c->pdev, fragsize, &buffer_phys); - if (buffer==NULL) - { - i2o_unlock_controller(c); - return -ENOMEM; - } - - msg[0]= NINE_WORD_MSG_SIZE | SGL_OFFSET_7; - msg[1]= I2O_CMD_SW_UPLOAD<<24 | HOST_TID<<12 | ADAPTER_TID; - msg[2]= (u32)cfg_handler.context; - msg[3]= 0; - msg[4]= (u32)kxfer.flags<<24|(u32)kxfer.sw_type<<16|(u32)maxfrag<<8|(u32)curfrag; - msg[5]= swlen; - msg[6]= kxfer.sw_id; - msg[7]= (0xD0000000 | fragsize); - msg[8]= buffer_phys; - -// printk("i2o_config: swul frag %d/%d (size %d)\n", curfrag, maxfrag, fragsize); - status = i2o_post_wait_mem(c, msg, sizeof(msg), 60, buffer, NULL, buffer_phys, 0, fragsize, 0); - i2o_unlock_controller(c); - - if (status != I2O_POST_WAIT_OK) - { - if(status != -ETIMEDOUT) - pci_free_consistent(c->pdev, fragsize, buffer, buffer_phys); - printk(KERN_INFO "i2o_config: swul failed, DetailedStatus = %d\n", status); - return status; - } - - __copy_to_user(kxfer.buf, buffer, fragsize); - pci_free_consistent(c->pdev, fragsize, buffer, buffer_phys); - return 0; -} +}; -int ioctl_swdel(unsigned long arg) +static int i2o_cfg_swdel(unsigned long arg) { struct i2o_controller *c; struct i2o_sw_xfer kxfer; - struct i2o_sw_xfer __user *pxfer = (void __user *)arg; - u32 msg[7]; + struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg; + struct i2o_message *msg; + u32 m; unsigned int swlen; int token; - + if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) return -EFAULT; - + if (get_user(swlen, kxfer.swlen) < 0) return -EFAULT; - - c = i2o_find_controller(kxfer.iop); + + c = i2o_find_iop(kxfer.iop); if (!c) return -ENXIO; - msg[0] = SEVEN_WORD_MSG_SIZE | SGL_OFFSET_0; - msg[1] = I2O_CMD_SW_REMOVE<<24 | HOST_TID<<12 | ADAPTER_TID; - msg[2] = (u32)i2o_cfg_context; - msg[3] = 0; - msg[4] = (u32)kxfer.flags<<24 | (u32)kxfer.sw_type<<16; - msg[5] = swlen; - msg[6] = kxfer.sw_id; - - token = i2o_post_wait(c, msg, sizeof(msg), 10); - i2o_unlock_controller(c); - - if (token != I2O_POST_WAIT_OK) - { - printk(KERN_INFO "i2o_config: swdel failed, DetailedStatus = %d\n", token); + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -EBUSY; + + writel(SEVEN_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_SW_REMOVE << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_config_driver.context, &msg->u.head[2]); + writel(0, &msg->u.head[3]); + writel((u32) kxfer.flags << 24 | (u32) kxfer.sw_type << 16, + &msg->body[0]); + writel(swlen, &msg->body[1]); + writel(kxfer.sw_id, &msg->body[2]); + + token = i2o_msg_post_wait(c, m, 10); + + if (token != I2O_POST_WAIT_OK) { + printk(KERN_INFO + "i2o_config: swdel failed, DetailedStatus = %d\n", + token); return -ETIMEDOUT; } - + return 0; -} +}; -int ioctl_validate(unsigned long arg) +static int i2o_cfg_validate(unsigned long arg) { - int token; - int iop = (int)arg; - u32 msg[4]; - struct i2o_controller *c; - - c=i2o_find_controller(iop); - if (!c) - return -ENXIO; - - msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_CONFIG_VALIDATE<<24 | HOST_TID<<12 | iop; - msg[2] = (u32)i2o_cfg_context; - msg[3] = 0; - - token = i2o_post_wait(c, msg, sizeof(msg), 10); - i2o_unlock_controller(c); - - if (token != I2O_POST_WAIT_OK) - { - printk(KERN_INFO "Can't validate configuration, ErrorStatus = %d\n", - token); - return -ETIMEDOUT; - } + int token; + int iop = (int)arg; + struct i2o_message *msg; + u32 m; + struct i2o_controller *c; + + c = i2o_find_iop(iop); + if (!c) + return -ENXIO; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -EBUSY; - return 0; -} + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_CONFIG_VALIDATE << 24 | HOST_TID << 12 | iop, + &msg->u.head[1]); + writel(i2o_config_driver.context, &msg->u.head[2]); + writel(0, &msg->u.head[3]); + + token = i2o_msg_post_wait(c, m, 10); + + if (token != I2O_POST_WAIT_OK) { + printk(KERN_INFO "Can't validate configuration, ErrorStatus = " + "%d\n", token); + return -ETIMEDOUT; + } -static int ioctl_evt_reg(unsigned long arg, struct file *fp) + return 0; +}; + +static int i2o_cfg_evt_reg(unsigned long arg, struct file *fp) { - u32 msg[5]; - struct i2o_evt_id __user *pdesc = (void __user *)arg; + struct i2o_message *msg; + u32 m; + struct i2o_evt_id __user *pdesc = (struct i2o_evt_id __user *)arg; struct i2o_evt_id kdesc; - struct i2o_controller *iop; + struct i2o_controller *c; struct i2o_device *d; if (copy_from_user(&kdesc, pdesc, sizeof(struct i2o_evt_id))) return -EFAULT; /* IOP exists? */ - iop = i2o_find_controller(kdesc.iop); - if(!iop) + c = i2o_find_iop(kdesc.iop); + if (!c) return -ENXIO; - i2o_unlock_controller(iop); /* Device exists? */ - for(d = iop->devices; d; d = d->next) - if(d->lct_data.tid == kdesc.tid) - break; - - if(!d) + d = i2o_iop_find_device(c, kdesc.tid); + if (!d) return -ENODEV; - msg[0] = FOUR_WORD_MSG_SIZE|SGL_OFFSET_0; - msg[1] = I2O_CMD_UTIL_EVT_REGISTER<<24 | HOST_TID<<12 | kdesc.tid; - msg[2] = (u32)i2o_cfg_context; - msg[3] = (u32)fp->private_data; - msg[4] = kdesc.evt_mask; + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -EBUSY; + + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_UTIL_EVT_REGISTER << 24 | HOST_TID << 12 | kdesc.tid, + &msg->u.head[1]); + writel(i2o_config_driver.context, &msg->u.head[2]); + writel(i2o_cntxt_list_add(c, fp->private_data), &msg->u.head[3]); + writel(kdesc.evt_mask, &msg->body[0]); - i2o_post_this(iop, msg, 20); + i2o_msg_post(c, m); return 0; -} +} -static int ioctl_evt_get(unsigned long arg, struct file *fp) +static int i2o_cfg_evt_get(unsigned long arg, struct file *fp) { - u32 id = (u32)fp->private_data; struct i2o_cfg_info *p = NULL; - struct i2o_evt_get __user *uget = (void __user *)arg; + struct i2o_evt_get __user *uget = (struct i2o_evt_get __user *)arg; struct i2o_evt_get kget; unsigned long flags; - for(p = open_files; p; p = p->next) - if(p->q_id == id) + for (p = open_files; p; p = p->next) + if (p->q_id == (ulong) fp->private_data) break; - if(!p->q_len) - { + if (!p->q_len) return -ENOENT; - return 0; - } memcpy(&kget.info, &p->event_q[p->q_out], sizeof(struct i2o_evt_info)); MODINC(p->q_out, I2O_EVT_Q_LEN); @@ -836,16 +619,236 @@ kget.lost = p->q_lost; spin_unlock_irqrestore(&i2o_config_lock, flags); - if(copy_to_user(uget, &kget, sizeof(struct i2o_evt_get))) + if (copy_to_user(uget, &kget, sizeof(struct i2o_evt_get))) return -EFAULT; return 0; } -static int ioctl_passthru(unsigned long arg) +#if BITS_PER_LONG == 64 +static int i2o_cfg_passthru32(unsigned fd, unsigned cmnd, unsigned long arg, + struct file *file) { - struct i2o_cmd_passthru __user *cmd = (void __user *) arg; + struct i2o_cmd_passthru32 __user *cmd; + struct i2o_controller *c; + u32 *user_msg; + u32 *reply = NULL; + u32 *user_reply = NULL; + u32 size = 0; + u32 reply_size = 0; + u32 rcode = 0; + struct i2o_dma sg_list[SG_TABLESIZE]; + u32 sg_offset = 0; + u32 sg_count = 0; + u32 i = 0; + i2o_status_block *sb; + struct i2o_message *msg; + u32 m; + unsigned int iop; + + cmd = (struct i2o_cmd_passthru32 __user *)arg; + + if (get_user(iop, &cmd->iop) || get_user(i, &cmd->msg)) + return -EFAULT; + + user_msg = compat_ptr(i); + + c = i2o_find_iop(iop); + if (!c) { + pr_debug("controller %d not found\n", iop); + return -ENXIO; + } + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + + sb = c->status_block.virt; + + if (get_user(size, &user_msg[0])) { + printk(KERN_WARNING "unable to get size!\n"); + return -EFAULT; + } + size = size >> 16; + + if (size > sb->inbound_frame_size) { + pr_debug("size of message > inbound_frame_size"); + return -EFAULT; + } + + user_reply = &user_msg[size]; + + size <<= 2; // Convert to bytes + + /* Copy in the user's I2O command */ + if (copy_from_user(msg, user_msg, size)) { + printk(KERN_WARNING "unable to copy user message\n"); + return -EFAULT; + } + i2o_dump_message(msg); + + if (get_user(reply_size, &user_reply[0]) < 0) + return -EFAULT; + + reply_size >>= 16; + reply_size <<= 2; + + reply = kmalloc(reply_size, GFP_KERNEL); + if (!reply) { + printk(KERN_WARNING "%s: Could not allocate reply buffer\n", + c->name); + return -ENOMEM; + } + memset(reply, 0, reply_size); + + sg_offset = (msg->u.head[0] >> 4) & 0x0f; + + writel(i2o_config_driver.context, &msg->u.s.icntxt); + writel(i2o_cntxt_list_add(c, reply), &msg->u.s.tcntxt); + + memset(sg_list, 0, sizeof(sg_list[0]) * SG_TABLESIZE); + if (sg_offset) { + struct sg_simple_element *sg; + + if (sg_offset * 4 >= size) { + rcode = -EFAULT; + goto cleanup; + } + // TODO 64bit fix + sg = (struct sg_simple_element *)((&msg->u.head[0]) + + sg_offset); + sg_count = + (size - sg_offset * 4) / sizeof(struct sg_simple_element); + if (sg_count > SG_TABLESIZE) { + printk(KERN_DEBUG "%s:IOCTL SG List too large (%u)\n", + c->name, sg_count); + kfree(reply); + return -EINVAL; + } + + for (i = 0; i < sg_count; i++) { + int sg_size; + struct i2o_dma *p; + + if (!(sg[i].flag_count & 0x10000000 + /*I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT */ )) { + printk(KERN_DEBUG + "%s:Bad SG element %d - not simple (%x)\n", + c->name, i, sg[i].flag_count); + rcode = -EINVAL; + goto cleanup; + } + sg_size = sg[i].flag_count & 0xffffff; + p = &(sg_list[i]); + /* Allocate memory for the transfer */ + if (i2o_dma_alloc + (&c->pdev->dev, p, sg_size, + PCI_DMA_BIDIRECTIONAL)) { + printk(KERN_DEBUG + "%s: Could not allocate SG buffer - size = %d buffer number %d of %d\n", + c->name, sg_size, i, sg_count); + rcode = -ENOMEM; + goto cleanup; + } + /* Copy in the user's SG buffer if necessary */ + if (sg[i]. + flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) { + // TODO 64bit fix + if (copy_from_user + (p->virt, (void *)(u64) sg[i].addr_bus, + sg_size)) { + printk(KERN_DEBUG + "%s: Could not copy SG buf %d FROM user\n", + c->name, i); + rcode = -EFAULT; + goto cleanup; + } + } + //TODO 64bit fix + sg[i].addr_bus = (u32) p->phys; + } + } + + rcode = i2o_msg_post_wait(c, m, 60); + if (rcode) + goto cleanup; + + if (sg_offset) { + u32 msg[128]; + /* Copy back the Scatter Gather buffers back to user space */ + u32 j; + // TODO 64bit fix + struct sg_simple_element *sg; + int sg_size; + printk(KERN_INFO "sg_offset\n"); + + // re-acquire the original message to handle correctly the sg copy operation + memset(&msg, 0, MSG_FRAME_SIZE * 4); + // get user msg size in u32s + if (get_user(size, &user_msg[0])) { + rcode = -EFAULT; + goto cleanup; + } + size = size >> 16; + size *= 4; + /* Copy in the user's I2O command */ + if (copy_from_user(msg, user_msg, size)) { + rcode = -EFAULT; + goto cleanup; + } + sg_count = + (size - sg_offset * 4) / sizeof(struct sg_simple_element); + + // TODO 64bit fix + sg = (struct sg_simple_element *)(msg + sg_offset); + for (j = 0; j < sg_count; j++) { + /* Copy out the SG list to user's buffer if necessary */ + if (! + (sg[j]. + flag_count & 0x4000000 /*I2O_SGL_FLAGS_DIR */ )) { + sg_size = sg[j].flag_count & 0xffffff; + // TODO 64bit fix + if (copy_to_user + ((void __user *)(u64) sg[j].addr_bus, + sg_list[j].virt, sg_size)) { + printk(KERN_WARNING + "%s: Could not copy %p TO user %x\n", + c->name, sg_list[j].virt, + sg[j].addr_bus); + rcode = -EFAULT; + goto cleanup; + } + } + } + } + + /* Copy back the reply to user space */ + if (reply_size) { + // we wrote our own values for context - now restore the user supplied ones + printk(KERN_INFO "reply_size\n"); + if (copy_from_user(reply + 2, user_msg + 2, sizeof(u32) * 2)) { + printk(KERN_WARNING + "%s: Could not copy message context FROM user\n", + c->name); + rcode = -EFAULT; + } + if (copy_to_user(user_reply, reply, reply_size)) { + printk(KERN_WARNING + "%s: Could not copy reply TO user\n", c->name); + rcode = -EFAULT; + } + } + + cleanup: + kfree(reply); + printk(KERN_INFO "rcode: %d\n", rcode); + return rcode; +} + +#else + +static int i2o_cfg_passthru(unsigned long arg) +{ + struct i2o_cmd_passthru __user *cmd = + (struct i2o_cmd_passthru __user *)arg; struct i2o_controller *c; - u32 msg[MSG_FRAME_SIZE]; u32 __user *user_msg; u32 *reply = NULL; u32 __user *user_reply = NULL; @@ -858,64 +861,88 @@ int sg_index = 0; u32 i = 0; void *p = NULL; + i2o_status_block *sb; + struct i2o_message *msg; + u32 m; unsigned int iop; if (get_user(iop, &cmd->iop) || get_user(user_msg, &cmd->msg)) return -EFAULT; - c = i2o_find_controller(iop); - if (!c) - return -ENXIO; + c = i2o_find_iop(iop); + if (!c) { + pr_debug("controller %d not found\n", iop); + return -ENXIO; + } + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + + sb = c->status_block.virt; - memset(&msg, 0, MSG_FRAME_SIZE*4); - if(get_user(size, &user_msg[0])) + if (get_user(size, &user_msg[0])) return -EFAULT; - size = size>>16; + size = size >> 16; - user_reply = &user_msg[size]; - if(size > MSG_FRAME_SIZE) + if (size > sb->inbound_frame_size) { + pr_debug("size of message > inbound_frame_size"); return -EFAULT; - size *= 4; // Convert to bytes + } + + user_reply = &user_msg[size]; + + size <<= 2; // Convert to bytes /* Copy in the user's I2O command */ - if(copy_from_user(msg, user_msg, size)) + if (copy_from_user(msg, user_msg, size)) return -EFAULT; - if(get_user(reply_size, &user_reply[0]) < 0) + + if (get_user(reply_size, &user_reply[0]) < 0) return -EFAULT; - reply_size = reply_size>>16; - reply = kmalloc(REPLY_FRAME_SIZE*4, GFP_KERNEL); - if(!reply) { - printk(KERN_WARNING"%s: Could not allocate reply buffer\n",c->name); + reply_size >>= 16; + reply_size <<= 2; + + reply = kmalloc(reply_size, GFP_KERNEL); + if (!reply) { + printk(KERN_WARNING "%s: Could not allocate reply buffer\n", + c->name); return -ENOMEM; } - memset(reply, 0, REPLY_FRAME_SIZE*4); - sg_offset = (msg[0]>>4)&0x0f; - msg[2] = (u32)i2o_cfg_context; - msg[3] = (u32)reply; + memset(reply, 0, reply_size); + + sg_offset = (msg->u.head[0] >> 4) & 0x0f; - memset(sg_list,0, sizeof(sg_list[0])*SG_TABLESIZE); - if(sg_offset) { + writel(i2o_config_driver.context, &msg->u.s.icntxt); + writel(i2o_cntxt_list_add(c, reply), &msg->u.s.tcntxt); + + memset(sg_list, 0, sizeof(sg_list[0]) * SG_TABLESIZE); + if (sg_offset) { struct sg_simple_element *sg; - if(sg_offset * 4 >= size) { + if (sg_offset * 4 >= size) { rcode = -EFAULT; goto cleanup; } // TODO 64bit fix - sg = (struct sg_simple_element*) (msg+sg_offset); - sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); + sg = (struct sg_simple_element *)((&msg->u.head[0]) + + sg_offset); + sg_count = + (size - sg_offset * 4) / sizeof(struct sg_simple_element); if (sg_count > SG_TABLESIZE) { - printk(KERN_DEBUG"%s:IOCTL SG List too large (%u)\n", c->name,sg_count); - kfree (reply); + printk(KERN_DEBUG "%s:IOCTL SG List too large (%u)\n", + c->name, sg_count); + kfree(reply); return -EINVAL; } - for(i = 0; i < sg_count; i++) { + for (i = 0; i < sg_count; i++) { int sg_size; - if (!(sg[i].flag_count & 0x10000000 /*I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT*/)) { - printk(KERN_DEBUG"%s:Bad SG element %d - not simple (%x)\n",c->name,i, sg[i].flag_count); + if (!(sg[i].flag_count & 0x10000000 + /*I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT */ )) { + printk(KERN_DEBUG + "%s:Bad SG element %d - not simple (%x)\n", + c->name, i, sg[i].flag_count); rcode = -EINVAL; goto cleanup; } @@ -923,61 +950,78 @@ /* Allocate memory for the transfer */ p = kmalloc(sg_size, GFP_KERNEL); if (!p) { - printk(KERN_DEBUG"%s: Could not allocate SG buffer - size = %d buffer number %d of %d\n", c->name,sg_size,i,sg_count); + printk(KERN_DEBUG + "%s: Could not allocate SG buffer - size = %d buffer number %d of %d\n", + c->name, sg_size, i, sg_count); rcode = -ENOMEM; goto cleanup; } - sg_list[sg_index++] = p; // sglist indexed with input frame, not our internal frame. + sg_list[sg_index++] = p; // sglist indexed with input frame, not our internal frame. /* Copy in the user's SG buffer if necessary */ - if(sg[i].flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR*/) { + if (sg[i]. + flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) { // TODO 64bit fix - if (copy_from_user(p,(void __user *)sg[i].addr_bus, sg_size)) { - printk(KERN_DEBUG"%s: Could not copy SG buf %d FROM user\n",c->name,i); + if (copy_from_user + (p, (void __user *)sg[i].addr_bus, + sg_size)) { + printk(KERN_DEBUG + "%s: Could not copy SG buf %d FROM user\n", + c->name, i); rcode = -EFAULT; goto cleanup; } } //TODO 64bit fix - sg[i].addr_bus = (u32)virt_to_bus(p); + sg[i].addr_bus = virt_to_bus(p); } } - rcode = i2o_post_wait(c, msg, size, 60); - if(rcode) + rcode = i2o_msg_post_wait(c, m, 60); + if (rcode) goto cleanup; - if(sg_offset) { + if (sg_offset) { + u32 msg[128]; /* Copy back the Scatter Gather buffers back to user space */ u32 j; // TODO 64bit fix - struct sg_simple_element* sg; + struct sg_simple_element *sg; int sg_size; + printk(KERN_INFO "sg_offset\n"); // re-acquire the original message to handle correctly the sg copy operation - memset(&msg, 0, MSG_FRAME_SIZE*4); + memset(&msg, 0, MSG_FRAME_SIZE * 4); // get user msg size in u32s if (get_user(size, &user_msg[0])) { rcode = -EFAULT; goto cleanup; } - size = size>>16; + size = size >> 16; size *= 4; /* Copy in the user's I2O command */ - if (copy_from_user (msg, user_msg, size)) { + if (copy_from_user(msg, user_msg, size)) { rcode = -EFAULT; goto cleanup; } - sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element); + sg_count = + (size - sg_offset * 4) / sizeof(struct sg_simple_element); - // TODO 64bit fix - sg = (struct sg_simple_element*)(msg + sg_offset); + // TODO 64bit fix + sg = (struct sg_simple_element *)(msg + sg_offset); for (j = 0; j < sg_count; j++) { /* Copy out the SG list to user's buffer if necessary */ - if (!(sg[j].flag_count & 0x4000000 /*I2O_SGL_FLAGS_DIR*/)) { + if (! + (sg[j]. + flag_count & 0x4000000 /*I2O_SGL_FLAGS_DIR */ )) { sg_size = sg[j].flag_count & 0xffffff; // TODO 64bit fix - if (copy_to_user((void __user *)sg[j].addr_bus,sg_list[j], sg_size)) { - printk(KERN_WARNING"%s: Could not copy %p TO user %x\n",c->name, sg_list[j], sg[j].addr_bus); + if (copy_to_user + ((void __user *)sg[j].addr_bus, sg_list[j], + sg_size)) { + printk(KERN_WARNING + "%s: Could not copy %p TO user %x\n", + c->name, sg_list[j], + sg[j].addr_bus); rcode = -EFAULT; goto cleanup; } @@ -986,37 +1030,109 @@ } /* Copy back the reply to user space */ - if (reply_size) { + if (reply_size) { // we wrote our own values for context - now restore the user supplied ones - if(copy_from_user(reply+2, user_msg+2, sizeof(u32)*2)) { - printk(KERN_WARNING"%s: Could not copy message context FROM user\n",c->name); + printk(KERN_INFO "reply_size\n"); + if (copy_from_user(reply + 2, user_msg + 2, sizeof(u32) * 2)) { + printk(KERN_WARNING + "%s: Could not copy message context FROM user\n", + c->name); rcode = -EFAULT; } - if(copy_to_user(user_reply, reply, reply_size)) { - printk(KERN_WARNING"%s: Could not copy reply TO user\n",c->name); + if (copy_to_user(user_reply, reply, reply_size)) { + printk(KERN_WARNING + "%s: Could not copy reply TO user\n", c->name); rcode = -EFAULT; } } -cleanup: + cleanup: kfree(reply); - i2o_unlock_controller(c); return rcode; } +#endif + +/* + * IOCTL Handler + */ +static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, + unsigned long arg) +{ + int ret; + + switch (cmd) { + case I2OGETIOPS: + ret = i2o_cfg_getiops(arg); + break; + + case I2OHRTGET: + ret = i2o_cfg_gethrt(arg); + break; + + case I2OLCTGET: + ret = i2o_cfg_getlct(arg); + break; + + case I2OPARMSET: + ret = i2o_cfg_parms(arg, I2OPARMSET); + break; + + case I2OPARMGET: + ret = i2o_cfg_parms(arg, I2OPARMGET); + break; + + case I2OSWDL: + ret = i2o_cfg_swdl(arg); + break; + + case I2OSWUL: + ret = i2o_cfg_swul(arg); + break; + + case I2OSWDEL: + ret = i2o_cfg_swdel(arg); + break; + + case I2OVALIDATE: + ret = i2o_cfg_validate(arg); + break; + + case I2OEVTREG: + ret = i2o_cfg_evt_reg(arg, fp); + break; + + case I2OEVTGET: + ret = i2o_cfg_evt_get(arg, fp); + break; + +#if BITS_PER_LONG != 64 + case I2OPASSTHRU: + ret = i2o_cfg_passthru(arg); + break; +#endif + + default: + pr_debug("i2o_config: unknown ioctl called!\n"); + ret = -EINVAL; + } + + return ret; +} static int cfg_open(struct inode *inode, struct file *file) { - struct i2o_cfg_info *tmp = - (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info), GFP_KERNEL); + struct i2o_cfg_info *tmp = + (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info), + GFP_KERNEL); unsigned long flags; - if(!tmp) + if (!tmp) return -ENOMEM; - file->private_data = (void*)(i2o_cfg_info_id++); + file->private_data = (void *)(i2o_cfg_info_id++); tmp->fp = file; tmp->fasync = NULL; - tmp->q_id = (u32)file->private_data; + tmp->q_id = (ulong) file->private_data; tmp->q_len = 0; tmp->q_in = 0; tmp->q_out = 0; @@ -1026,13 +1142,28 @@ spin_lock_irqsave(&i2o_config_lock, flags); open_files = tmp; spin_unlock_irqrestore(&i2o_config_lock, flags); - + return 0; } +static int cfg_fasync(int fd, struct file *fp, int on) +{ + ulong id = (ulong) fp->private_data; + struct i2o_cfg_info *p; + + for (p = open_files; p; p = p->next) + if (p->q_id == id) + break; + + if (!p) + return -EBADF; + + return fasync_helper(fd, fp, on, &p->fasync); +} + static int cfg_release(struct inode *inode, struct file *file) { - u32 id = (u32)file->private_data; + ulong id = (ulong) file->private_data; struct i2o_cfg_info *p1, *p2; unsigned long flags; @@ -1040,14 +1171,12 @@ p1 = p2 = NULL; spin_lock_irqsave(&i2o_config_lock, flags); - for(p1 = open_files; p1; ) - { - if(p1->q_id == id) - { + for (p1 = open_files; p1;) { + if (p1->q_id == id) { - if(p1->fasync) + if (p1->fasync) cfg_fasync(-1, file, 0); - if(p2) + if (p2) p2->next = p1->next; else open_files = p1->next; @@ -1064,83 +1193,55 @@ return 0; } -static int cfg_fasync(int fd, struct file *fp, int on) -{ - u32 id = (u32)fp->private_data; - struct i2o_cfg_info *p; - - for(p = open_files; p; p = p->next) - if(p->q_id == id) - break; - - if(!p) - return -EBADF; - - return fasync_helper(fd, fp, on, &p->fasync); -} - -static struct file_operations config_fops = -{ - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = cfg_read, - .write = cfg_write, - .ioctl = cfg_ioctl, - .open = cfg_open, - .release = cfg_release, - .fasync = cfg_fasync, +static struct file_operations config_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .ioctl = i2o_cfg_ioctl, + .open = cfg_open, + .release = cfg_release, + .fasync = cfg_fasync, }; static struct miscdevice i2o_miscdev = { I2O_MINOR, "i2octl", &config_fops -}; +}; static int __init i2o_config_init(void) { printk(KERN_INFO "I2O configuration manager v 0.04.\n"); printk(KERN_INFO " (C) Copyright 1999 Red Hat Software\n"); - - if((page_buf = kmalloc(4096, GFP_KERNEL))==NULL) - { - printk(KERN_ERR "i2o_config: no memory for page buffer.\n"); - return -ENOBUFS; - } - if(misc_register(&i2o_miscdev) < 0) - { + + if (misc_register(&i2o_miscdev) < 0) { printk(KERN_ERR "i2o_config: can't register device.\n"); - kfree(page_buf); return -EBUSY; } /* - * Install our handler + * Install our handler */ - if(i2o_install_handler(&cfg_handler)<0) - { - kfree(page_buf); + if (i2o_driver_register(&i2o_config_driver)) { printk(KERN_ERR "i2o_config: handler register failed.\n"); misc_deregister(&i2o_miscdev); return -EBUSY; } - /* - * The low 16bits of the transaction context must match this - * for everything we post. Otherwise someone else gets our mail - */ - i2o_cfg_context = cfg_handler.context; +#if BITS_PER_LONG ==64 + register_ioctl32_conversion(I2OPASSTHRU32, i2o_cfg_passthru32); + register_ioctl32_conversion(I2OGETIOPS, (void *)sys_ioctl); +#endif return 0; } static void i2o_config_exit(void) { +#if BITS_PER_LONG ==64 + unregister_ioctl32_conversion(I2OPASSTHRU32); + unregister_ioctl32_conversion(I2OGETIOPS); +#endif misc_deregister(&i2o_miscdev); - - if(page_buf) - kfree(page_buf); - if(i2o_cfg_context != -1) - i2o_remove_handler(&cfg_handler); + i2o_driver_unregister(&i2o_config_driver); } - + MODULE_AUTHOR("Red Hat Software"); MODULE_DESCRIPTION("I2O Configuration"); MODULE_LICENSE("GPL"); diff -Nru a/drivers/message/i2o/i2o_core.c b/drivers/message/i2o/i2o_core.c --- a/drivers/message/i2o/i2o_core.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/message/i2o/i2o_core.c 2004-09-06 16:37:53 -07:00 @@ -892,8 +892,7 @@ if((err=i2o_issue_claim(I2O_CMD_UTIL_RELEASE, d->controller, d->lct_data.tid, I2O_CLAIM_PRIMARY)) ) { err = -ENXIO; - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); + msleep(1000); } else { diff -Nru a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c --- a/drivers/message/i2o/i2o_proc.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/message/i2o/i2o_proc.c 2004-09-06 16:37:53 -07:00 @@ -1,39 +1,33 @@ /* - * procfs handler for Linux I2O subsystem + * procfs handler for Linux I2O subsystem * - * (c) Copyright 1999 Deepak Saxena - * - * Originally written by Deepak Saxena(deepak@plexity.net) - * - * This program is free software. You can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * This is an initial test release. The code is based on the design - * of the ide procfs system (drivers/block/ide-proc.c). Some code - * taken from i2o-core module by Alan Cox. - * - * DISCLAIMER: This code is still under development/test and may cause - * your system to behave unpredictably. Use at your own discretion. - * - * LAN entries by Juha Sievänen (Juha.Sievanen@cs.Helsinki.FI), - * Auvo Häkkinen (Auvo.Hakkinen@cs.Helsinki.FI) - * University of Helsinki, Department of Computer Science - */ - -/* - * set tabstop=3 - */ - -/* - * TODO List + * (c) Copyright 1999 Deepak Saxena + * + * Originally written by Deepak Saxena(deepak@plexity.net) * - * - Add support for any version 2.0 spec changes once 2.0 IRTOS is - * is available to test with - * - Clean up code to use official structure definitions + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This is an initial test release. The code is based on the design of the + * ide procfs system (drivers/block/ide-proc.c). Some code taken from + * i2o-core module by Alan Cox. + * + * DISCLAIMER: This code is still under development/test and may cause + * your system to behave unpredictably. Use at your own discretion. + * + * + * Fixes/additions: + * Juha Sievänen (Juha.Sievanen@cs.Helsinki.FI), + * Auvo Häkkinen (Auvo.Hakkinen@cs.Helsinki.FI) + * University of Helsinki, Department of Computer Science + * LAN entries + * Markus Lidel + * Changes for new I2O API */ +#define I2O_MAX_MODULES 4 // FIXME! #define FMT_U64_HEX "0x%08x%08x" #define U64_VAL(pu64) *((u32*)(pu64)+1), *((u32*)(pu64)) @@ -54,188 +48,198 @@ #include #include -#include "i2o_lan.h" - -/* - * Structure used to define /proc entries - */ -typedef struct _i2o_proc_entry_t -{ - char *name; /* entry name */ - mode_t mode; /* mode */ - read_proc_t *read_proc; /* read func */ - write_proc_t *write_proc; /* write func */ - struct file_operations *fops_proc; /* file operations func */ +/* Structure used to define /proc entries */ +typedef struct _i2o_proc_entry_t { + char *name; /* entry name */ + mode_t mode; /* mode */ + struct file_operations *fops; /* open function */ } i2o_proc_entry; -// #define DRIVERDEBUG - -static int i2o_seq_show_lct(struct seq_file *, void *); -static int i2o_seq_show_hrt(struct seq_file *, void *); -static int i2o_seq_show_status(struct seq_file *, void *); - -static int i2o_proc_read_hw(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_ddm_table(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_driver_store(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_drivers_stored(char *, char **, off_t, int, int *, void *); - -static int i2o_proc_read_groups(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_phys_device(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_claimed(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_users(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_priv_msgs(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_authorized_users(char *, char **, off_t, int, int *, void *); - -static int i2o_proc_read_dev_name(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_dev_identity(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_ddm_identity(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_uinfo(char *, char **, off_t, int, int *, void *); -static int i2o_proc_read_sgl_limits(char *, char **, off_t, int, int *, void *); - -static int i2o_proc_read_sensors(char *, char **, off_t, int, int *, void *); - -static int print_serial_number(char *, int, u8 *, int); - -static int i2o_proc_create_entries(void *, i2o_proc_entry *, - struct proc_dir_entry *); -static void i2o_proc_remove_entries(i2o_proc_entry *, struct proc_dir_entry *); -static int i2o_proc_add_controller(struct i2o_controller *, - struct proc_dir_entry * ); -static void i2o_proc_remove_controller(struct i2o_controller *, - struct proc_dir_entry * ); -static void i2o_proc_add_device(struct i2o_device *, struct proc_dir_entry *); -static void i2o_proc_remove_device(struct i2o_device *); -static int create_i2o_procfs(void); -static int destroy_i2o_procfs(void); -static void i2o_proc_new_dev(struct i2o_controller *, struct i2o_device *); -static void i2o_proc_dev_del(struct i2o_controller *, struct i2o_device *); - -static int i2o_proc_read_lan_dev_info(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_mac_addr(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_mcast_addr(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_batch_control(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_operation(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_media_operation(char *, char **, off_t, int, - int *, void *); -static int i2o_proc_read_lan_alt_addr(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_tx_info(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_rx_info(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_hist_stats(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_eth_stats(char *, char **, off_t, int, - int *, void *); -static int i2o_proc_read_lan_tr_stats(char *, char **, off_t, int, int *, - void *); -static int i2o_proc_read_lan_fddi_stats(char *, char **, off_t, int, int *, - void *); - +/* global I2O /proc/i2o entry */ static struct proc_dir_entry *i2o_proc_dir_root; -/* - * I2O OSM descriptor - */ -static struct i2o_handler i2o_proc_handler = -{ - NULL, - i2o_proc_new_dev, - i2o_proc_dev_del, - NULL, - "I2O procfs Layer", - 0, - 0xffffffff // All classes +/* proc OSM driver struct */ +static struct i2o_driver i2o_proc_driver = { + .name = "proc-osm", }; -static int i2o_seq_open_hrt(struct inode *inode, struct file *file) +static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len) { - return single_open(file, i2o_seq_show_hrt, PDE(inode)->data); -}; + int i; -struct file_operations i2o_seq_fops_hrt = { - .open = i2o_seq_open_hrt, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release -}; + /* 19990419 -sralston + * The I2O v1.5 (and v2.0 so far) "official specification" + * got serial numbers WRONG! + * Apparently, and despite what Section 3.4.4 says and + * Figure 3-35 shows (pg 3-39 in the pdf doc), + * the convention / consensus seems to be: + * + First byte is SNFormat + * + Second byte is SNLen (but only if SNFormat==7 (?)) + * + (v2.0) SCSI+BS may use IEEE Registered (64 or 128 bit) format + */ + switch (serialno[0]) { + case I2O_SNFORMAT_BINARY: /* Binary */ + seq_printf(seq, "0x"); + for (i = 0; i < serialno[1]; i++) { + seq_printf(seq, "%02X", serialno[2 + i]); + } + break; -static int i2o_seq_open_lct(struct inode *inode, struct file *file) -{ - return single_open(file, i2o_seq_show_lct, PDE(inode)->data); -}; + case I2O_SNFORMAT_ASCII: /* ASCII */ + if (serialno[1] < ' ') { /* printable or SNLen? */ + /* sanity */ + max_len = + (max_len < serialno[1]) ? max_len : serialno[1]; + serialno[1 + max_len] = '\0'; + + /* just print it */ + seq_printf(seq, "%s", &serialno[2]); + } else { + /* print chars for specified length */ + for (i = 0; i < serialno[1]; i++) { + seq_printf(seq, "%c", serialno[2 + i]); + } + } + break; -struct file_operations i2o_seq_fops_lct = { - .open = i2o_seq_open_lct, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release -}; + case I2O_SNFORMAT_UNICODE: /* UNICODE */ + seq_printf(seq, "UNICODE Format. Can't Display\n"); + break; -static int i2o_seq_open_status(struct inode *inode, struct file *file) -{ - return single_open(file, i2o_seq_show_status, PDE(inode)->data); -}; + case I2O_SNFORMAT_LAN48_MAC: /* LAN-48 MAC Address */ + seq_printf(seq, + "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X", + serialno[2], serialno[3], + serialno[4], serialno[5], serialno[6], serialno[7]); + break; -struct file_operations i2o_seq_fops_status = { - .open = i2o_seq_open_status, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release -}; + case I2O_SNFORMAT_WAN: /* WAN MAC Address */ + /* FIXME: Figure out what a WAN access address looks like?? */ + seq_printf(seq, "WAN Access Address"); + break; -/* - * IOP specific entries...write field just in case someone - * ever wants one. - */ -static i2o_proc_entry generic_iop_entries[] = -{ - {"hrt", S_IFREG|S_IRUGO, NULL, NULL, &i2o_seq_fops_hrt}, - {"lct", S_IFREG|S_IRUGO, NULL, NULL, &i2o_seq_fops_lct}, - {"status", S_IFREG|S_IRUGO, NULL, NULL, &i2o_seq_fops_status}, - {"hw", S_IFREG|S_IRUGO, i2o_proc_read_hw, NULL, NULL}, - {"ddm_table", S_IFREG|S_IRUGO, i2o_proc_read_ddm_table, NULL, NULL}, - {"driver_store", S_IFREG|S_IRUGO, i2o_proc_read_driver_store, NULL, NULL}, - {"drivers_stored", S_IFREG|S_IRUGO, i2o_proc_read_drivers_stored, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; +/* plus new in v2.0 */ + case I2O_SNFORMAT_LAN64_MAC: /* LAN-64 MAC Address */ + /* FIXME: Figure out what a LAN-64 address really looks like?? */ + seq_printf(seq, + "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X", + serialno[8], serialno[9], + serialno[2], serialno[3], + serialno[4], serialno[5], serialno[6], serialno[7]); + break; + + case I2O_SNFORMAT_DDM: /* I2O DDM */ + seq_printf(seq, + "DDM: Tid=%03Xh, Rsvd=%04Xh, OrgId=%04Xh", + *(u16 *) & serialno[2], + *(u16 *) & serialno[4], *(u16 *) & serialno[6]); + break; + + case I2O_SNFORMAT_IEEE_REG64: /* IEEE Registered (64-bit) */ + case I2O_SNFORMAT_IEEE_REG128: /* IEEE Registered (128-bit) */ + /* FIXME: Figure if this is even close?? */ + seq_printf(seq, + "IEEE NodeName(hi,lo)=(%08Xh:%08Xh), PortName(hi,lo)=(%08Xh:%08Xh)\n", + *(u32 *) & serialno[2], + *(u32 *) & serialno[6], + *(u32 *) & serialno[10], *(u32 *) & serialno[14]); + break; -/* - * Device specific entries - */ -static i2o_proc_entry generic_dev_entries[] = -{ - {"groups", S_IFREG|S_IRUGO, i2o_proc_read_groups, NULL, NULL}, - {"phys_dev", S_IFREG|S_IRUGO, i2o_proc_read_phys_device, NULL, NULL}, - {"claimed", S_IFREG|S_IRUGO, i2o_proc_read_claimed, NULL, NULL}, - {"users", S_IFREG|S_IRUGO, i2o_proc_read_users, NULL, NULL}, - {"priv_msgs", S_IFREG|S_IRUGO, i2o_proc_read_priv_msgs, NULL, NULL}, - {"authorized_users", S_IFREG|S_IRUGO, i2o_proc_read_authorized_users, NULL, NULL}, - {"dev_identity", S_IFREG|S_IRUGO, i2o_proc_read_dev_identity, NULL, NULL}, - {"ddm_identity", S_IFREG|S_IRUGO, i2o_proc_read_ddm_identity, NULL, NULL}, - {"user_info", S_IFREG|S_IRUGO, i2o_proc_read_uinfo, NULL, NULL}, - {"sgl_limits", S_IFREG|S_IRUGO, i2o_proc_read_sgl_limits, NULL, NULL}, - {"sensors", S_IFREG|S_IRUGO, i2o_proc_read_sensors, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; + case I2O_SNFORMAT_UNKNOWN: /* Unknown 0 */ + case I2O_SNFORMAT_UNKNOWN2: /* Unknown 0xff */ + default: + seq_printf(seq, "Unknown data format (0x%02x)", serialno[0]); + break; + } -/* - * Storage unit specific entries (SCSI Periph, BS) with device names + return 0; +} + +/** + * i2o_get_class_name - do i2o class name lookup + * @class: class number + * + * Return a descriptive string for an i2o class */ -static i2o_proc_entry rbs_dev_entries[] = +static const char *i2o_get_class_name(int class) { - {"dev_name", S_IFREG|S_IRUGO, i2o_proc_read_dev_name, NULL, NULL}, - {NULL, 0, NULL, NULL} -}; + int idx = 16; + static char *i2o_class_name[] = { + "Executive", + "Device Driver Module", + "Block Device", + "Tape Device", + "LAN Interface", + "WAN Interface", + "Fibre Channel Port", + "Fibre Channel Device", + "SCSI Device", + "ATE Port", + "ATE Device", + "Floppy Controller", + "Floppy Device", + "Secondary Bus Port", + "Peer Transport Agent", + "Peer Transport", + "Unknown" + }; + + switch (class & 0xfff) { + case I2O_CLASS_EXECUTIVE: + idx = 0; + break; + case I2O_CLASS_DDM: + idx = 1; + break; + case I2O_CLASS_RANDOM_BLOCK_STORAGE: + idx = 2; + break; + case I2O_CLASS_SEQUENTIAL_STORAGE: + idx = 3; + break; + case I2O_CLASS_LAN: + idx = 4; + break; + case I2O_CLASS_WAN: + idx = 5; + break; + case I2O_CLASS_FIBRE_CHANNEL_PORT: + idx = 6; + break; + case I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL: + idx = 7; + break; + case I2O_CLASS_SCSI_PERIPHERAL: + idx = 8; + break; + case I2O_CLASS_ATE_PORT: + idx = 9; + break; + case I2O_CLASS_ATE_PERIPHERAL: + idx = 10; + break; + case I2O_CLASS_FLOPPY_CONTROLLER: + idx = 11; + break; + case I2O_CLASS_FLOPPY_DEVICE: + idx = 12; + break; + case I2O_CLASS_BUS_ADAPTER_PORT: + idx = 13; + break; + case I2O_CLASS_PEER_TRANSPORT_AGENT: + idx = 14; + break; + case I2O_CLASS_PEER_TRANSPORT: + idx = 15; + break; + } + + return i2o_class_name[idx]; +} #define SCSI_TABLE_SIZE 13 -static char *scsi_devices[] = -{ +static char *scsi_devices[] = { "Direct-Access Read/Write", "Sequential-Access Storage", "Printer", @@ -251,307 +255,267 @@ "Array Controller Device" }; -/* private */ - -/* - * Generic LAN specific entries - * - * Should groups with r/w entries have their own subdirectory? - * - */ -static i2o_proc_entry lan_entries[] = -{ - {"lan_dev_info", S_IFREG|S_IRUGO, i2o_proc_read_lan_dev_info, NULL, NULL}, - {"lan_mac_addr", S_IFREG|S_IRUGO, i2o_proc_read_lan_mac_addr, NULL, NULL}, - {"lan_mcast_addr", S_IFREG|S_IRUGO|S_IWUSR, - i2o_proc_read_lan_mcast_addr, NULL, NULL}, - {"lan_batch_ctrl", S_IFREG|S_IRUGO|S_IWUSR, - i2o_proc_read_lan_batch_control, NULL, NULL}, - {"lan_operation", S_IFREG|S_IRUGO, i2o_proc_read_lan_operation, NULL, NULL}, - {"lan_media_operation", S_IFREG|S_IRUGO, - i2o_proc_read_lan_media_operation, NULL, NULL}, - {"lan_alt_addr", S_IFREG|S_IRUGO, i2o_proc_read_lan_alt_addr, NULL, NULL}, - {"lan_tx_info", S_IFREG|S_IRUGO, i2o_proc_read_lan_tx_info, NULL, NULL}, - {"lan_rx_info", S_IFREG|S_IRUGO, i2o_proc_read_lan_rx_info, NULL, NULL}, - - {"lan_hist_stats", S_IFREG|S_IRUGO, i2o_proc_read_lan_hist_stats, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; - -/* - * Port specific LAN entries - * - */ -static i2o_proc_entry lan_eth_entries[] = -{ - {"lan_eth_stats", S_IFREG|S_IRUGO, i2o_proc_read_lan_eth_stats, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; - -static i2o_proc_entry lan_tr_entries[] = -{ - {"lan_tr_stats", S_IFREG|S_IRUGO, i2o_proc_read_lan_tr_stats, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; - -static i2o_proc_entry lan_fddi_entries[] = -{ - {"lan_fddi_stats", S_IFREG|S_IRUGO, i2o_proc_read_lan_fddi_stats, NULL, NULL}, - {NULL, 0, NULL, NULL, NULL} -}; - - -static char *chtostr(u8 *chars, int n) +static char *chtostr(u8 * chars, int n) { char tmp[256]; tmp[0] = 0; - return strncat(tmp, (char *)chars, n); + return strncat(tmp, (char *)chars, n); } -static int i2o_report_query_status(char *buf, int block_status, char *group) +static int i2o_report_query_status(struct seq_file *seq, int block_status, + char *group) { - switch (block_status) - { + switch (block_status) { case -ETIMEDOUT: - return sprintf(buf, "Timeout reading group %s.\n",group); + return seq_printf(seq, "Timeout reading group %s.\n", group); case -ENOMEM: - return sprintf(buf, "No free memory to read the table.\n"); + return seq_printf(seq, "No free memory to read the table.\n"); case -I2O_PARAMS_STATUS_INVALID_GROUP_ID: - return sprintf(buf, "Group %s not supported.\n", group); + return seq_printf(seq, "Group %s not supported.\n", group); default: - return sprintf(buf, "Error reading group %s. BlockStatus 0x%02X\n", - group, -block_status); + return seq_printf(seq, + "Error reading group %s. BlockStatus 0x%02X\n", + group, -block_status); } } -static char* bus_strings[] = -{ - "Local Bus", - "ISA", - "EISA", - "MCA", +static char *bus_strings[] = { + "Local Bus", + "ISA", + "EISA", + "MCA", "PCI", - "PCMCIA", - "NUBUS", + "PCMCIA", + "NUBUS", "CARDBUS" }; -static spinlock_t i2o_proc_lock = SPIN_LOCK_UNLOCKED; - int i2o_seq_show_hrt(struct seq_file *seq, void *v) { struct i2o_controller *c = (struct i2o_controller *)seq->private; - i2o_hrt *hrt = (i2o_hrt *)c->hrt; + i2o_hrt *hrt = (i2o_hrt *) c->hrt.virt; u32 bus; int i; - if(hrt->hrt_version) - { - seq_printf(seq, "HRT table for controller is too new a version.\n"); + if (hrt->hrt_version) { + seq_printf(seq, + "HRT table for controller is too new a version.\n"); return 0; } seq_printf(seq, "HRT has %d entries of %d bytes each.\n", - hrt->num_entries, hrt->entry_len << 2); + hrt->num_entries, hrt->entry_len << 2); - for(i = 0; i < hrt->num_entries; i++) - { + for (i = 0; i < hrt->num_entries; i++) { seq_printf(seq, "Entry %d:\n", i); seq_printf(seq, " Adapter ID: %0#10x\n", - hrt->hrt_entry[i].adapter_id); + hrt->hrt_entry[i].adapter_id); seq_printf(seq, " Controlling tid: %0#6x\n", - hrt->hrt_entry[i].parent_tid); + hrt->hrt_entry[i].parent_tid); - if(hrt->hrt_entry[i].bus_type != 0x80) - { + if (hrt->hrt_entry[i].bus_type != 0x80) { bus = hrt->hrt_entry[i].bus_type; - seq_printf(seq, " %s Information\n", bus_strings[bus]); + seq_printf(seq, " %s Information\n", + bus_strings[bus]); + + switch (bus) { + case I2O_BUS_LOCAL: + seq_printf(seq, " IOBase: %0#6x,", + hrt->hrt_entry[i].bus.local_bus. + LbBaseIOPort); + seq_printf(seq, " MemoryBase: %0#10x\n", + hrt->hrt_entry[i].bus.local_bus. + LbBaseMemoryAddress); + break; - switch(bus) - { - case I2O_BUS_LOCAL: - seq_printf(seq, " IOBase: %0#6x,", - hrt->hrt_entry[i].bus.local_bus.LbBaseIOPort); - seq_printf(seq, " MemoryBase: %0#10x\n", - hrt->hrt_entry[i].bus.local_bus.LbBaseMemoryAddress); - break; - - case I2O_BUS_ISA: - seq_printf(seq, " IOBase: %0#6x,", - hrt->hrt_entry[i].bus.isa_bus.IsaBaseIOPort); - seq_printf(seq, " MemoryBase: %0#10x,", - hrt->hrt_entry[i].bus.isa_bus.IsaBaseMemoryAddress); - seq_printf(seq, " CSN: %0#4x,", - hrt->hrt_entry[i].bus.isa_bus.CSN); - break; - - case I2O_BUS_EISA: - seq_printf(seq, " IOBase: %0#6x,", - hrt->hrt_entry[i].bus.eisa_bus.EisaBaseIOPort); - seq_printf(seq, " MemoryBase: %0#10x,", - hrt->hrt_entry[i].bus.eisa_bus.EisaBaseMemoryAddress); - seq_printf(seq, " Slot: %0#4x,", - hrt->hrt_entry[i].bus.eisa_bus.EisaSlotNumber); - break; - - case I2O_BUS_MCA: - seq_printf(seq, " IOBase: %0#6x,", - hrt->hrt_entry[i].bus.mca_bus.McaBaseIOPort); - seq_printf(seq, " MemoryBase: %0#10x,", - hrt->hrt_entry[i].bus.mca_bus.McaBaseMemoryAddress); - seq_printf(seq, " Slot: %0#4x,", - hrt->hrt_entry[i].bus.mca_bus.McaSlotNumber); - break; - - case I2O_BUS_PCI: - seq_printf(seq, " Bus: %0#4x", - hrt->hrt_entry[i].bus.pci_bus.PciBusNumber); - seq_printf(seq, " Dev: %0#4x", - hrt->hrt_entry[i].bus.pci_bus.PciDeviceNumber); - seq_printf(seq, " Func: %0#4x", - hrt->hrt_entry[i].bus.pci_bus.PciFunctionNumber); - seq_printf(seq, " Vendor: %0#6x", - hrt->hrt_entry[i].bus.pci_bus.PciVendorID); - seq_printf(seq, " Device: %0#6x\n", - hrt->hrt_entry[i].bus.pci_bus.PciDeviceID); - break; + case I2O_BUS_ISA: + seq_printf(seq, " IOBase: %0#6x,", + hrt->hrt_entry[i].bus.isa_bus. + IsaBaseIOPort); + seq_printf(seq, " MemoryBase: %0#10x,", + hrt->hrt_entry[i].bus.isa_bus. + IsaBaseMemoryAddress); + seq_printf(seq, " CSN: %0#4x,", + hrt->hrt_entry[i].bus.isa_bus.CSN); + break; + + case I2O_BUS_EISA: + seq_printf(seq, " IOBase: %0#6x,", + hrt->hrt_entry[i].bus.eisa_bus. + EisaBaseIOPort); + seq_printf(seq, " MemoryBase: %0#10x,", + hrt->hrt_entry[i].bus.eisa_bus. + EisaBaseMemoryAddress); + seq_printf(seq, " Slot: %0#4x,", + hrt->hrt_entry[i].bus.eisa_bus. + EisaSlotNumber); + break; + + case I2O_BUS_MCA: + seq_printf(seq, " IOBase: %0#6x,", + hrt->hrt_entry[i].bus.mca_bus. + McaBaseIOPort); + seq_printf(seq, " MemoryBase: %0#10x,", + hrt->hrt_entry[i].bus.mca_bus. + McaBaseMemoryAddress); + seq_printf(seq, " Slot: %0#4x,", + hrt->hrt_entry[i].bus.mca_bus. + McaSlotNumber); + break; + + case I2O_BUS_PCI: + seq_printf(seq, " Bus: %0#4x", + hrt->hrt_entry[i].bus.pci_bus. + PciBusNumber); + seq_printf(seq, " Dev: %0#4x", + hrt->hrt_entry[i].bus.pci_bus. + PciDeviceNumber); + seq_printf(seq, " Func: %0#4x", + hrt->hrt_entry[i].bus.pci_bus. + PciFunctionNumber); + seq_printf(seq, " Vendor: %0#6x", + hrt->hrt_entry[i].bus.pci_bus. + PciVendorID); + seq_printf(seq, " Device: %0#6x\n", + hrt->hrt_entry[i].bus.pci_bus. + PciDeviceID); + break; - default: - seq_printf(seq, " Unsupported Bus Type\n"); + default: + seq_printf(seq, " Unsupported Bus Type\n"); } - } - else + } else seq_printf(seq, " Unknown Bus Type\n"); } - + return 0; } int i2o_seq_show_lct(struct seq_file *seq, void *v) { - struct i2o_controller *c = (struct i2o_controller*)seq->private; - i2o_lct *lct = (i2o_lct *)c->lct; + struct i2o_controller *c = (struct i2o_controller *)seq->private; + i2o_lct *lct = (i2o_lct *) c->lct; int entries; int i; #define BUS_TABLE_SIZE 3 - static char *bus_ports[] = - { + static char *bus_ports[] = { "Generic Bus", "SCSI Bus", "Fibre Channel Bus" }; - entries = (lct->table_size - 3)/9; + entries = (lct->table_size - 3) / 9; seq_printf(seq, "LCT contains %d %s\n", entries, - entries == 1 ? "entry" : "entries"); - if(lct->boot_tid) + entries == 1 ? "entry" : "entries"); + if (lct->boot_tid) seq_printf(seq, "Boot Device @ ID %d\n", lct->boot_tid); seq_printf(seq, "Current Change Indicator: %#10x\n", lct->change_ind); - for(i = 0; i < entries; i++) - { + for (i = 0; i < entries; i++) { seq_printf(seq, "Entry %d\n", i); - seq_printf(seq, " Class, SubClass : %s", i2o_get_class_name(lct->lct_entry[i].class_id)); - + seq_printf(seq, " Class, SubClass : %s", + i2o_get_class_name(lct->lct_entry[i].class_id)); + /* - * Classes which we'll print subclass info for + * Classes which we'll print subclass info for */ - switch(lct->lct_entry[i].class_id & 0xFFF) - { - case I2O_CLASS_RANDOM_BLOCK_STORAGE: - switch(lct->lct_entry[i].sub_class) - { - case 0x00: - seq_printf(seq, ", Direct-Access Read/Write"); - break; - - case 0x04: - seq_printf(seq, ", WORM Drive"); - break; - - case 0x05: - seq_printf(seq, ", CD-ROM Drive"); - break; - - case 0x07: - seq_printf(seq, ", Optical Memory Device"); - break; - - default: - seq_printf(seq, ", Unknown (0x%02x)", - lct->lct_entry[i].sub_class); - break; - } - break; - - case I2O_CLASS_LAN: - switch(lct->lct_entry[i].sub_class & 0xFF) - { - case 0x30: - seq_printf(seq, ", Ethernet"); - break; - - case 0x40: - seq_printf(seq, ", 100base VG"); - break; - - case 0x50: - seq_printf(seq, ", IEEE 802.5/Token-Ring"); - break; - - case 0x60: - seq_printf(seq, ", ANSI X3T9.5 FDDI"); - break; - - case 0x70: - seq_printf(seq, ", Fibre Channel"); - break; - - default: - seq_printf(seq, ", Unknown Sub-Class (0x%02x)", - lct->lct_entry[i].sub_class & 0xFF); - break; - } - break; - - case I2O_CLASS_SCSI_PERIPHERAL: - if(lct->lct_entry[i].sub_class < SCSI_TABLE_SIZE) - seq_printf(seq, ", %s", - scsi_devices[lct->lct_entry[i].sub_class]); - else - seq_printf(seq, ", Unknown Device Type"); - break; - - case I2O_CLASS_BUS_ADAPTER_PORT: - if(lct->lct_entry[i].sub_class < BUS_TABLE_SIZE) - seq_printf(seq, ", %s", - bus_ports[lct->lct_entry[i].sub_class]); - else - seq_printf(seq, ", Unknown Bus Type"); + switch (lct->lct_entry[i].class_id & 0xFFF) { + case I2O_CLASS_RANDOM_BLOCK_STORAGE: + switch (lct->lct_entry[i].sub_class) { + case 0x00: + seq_printf(seq, ", Direct-Access Read/Write"); + break; + + case 0x04: + seq_printf(seq, ", WORM Drive"); + break; + + case 0x05: + seq_printf(seq, ", CD-ROM Drive"); + break; + + case 0x07: + seq_printf(seq, ", Optical Memory Device"); + break; + + default: + seq_printf(seq, ", Unknown (0x%02x)", + lct->lct_entry[i].sub_class); + break; + } + break; + + case I2O_CLASS_LAN: + switch (lct->lct_entry[i].sub_class & 0xFF) { + case 0x30: + seq_printf(seq, ", Ethernet"); + break; + + case 0x40: + seq_printf(seq, ", 100base VG"); + break; + + case 0x50: + seq_printf(seq, ", IEEE 802.5/Token-Ring"); + break; + + case 0x60: + seq_printf(seq, ", ANSI X3T9.5 FDDI"); break; + + case 0x70: + seq_printf(seq, ", Fibre Channel"); + break; + + default: + seq_printf(seq, ", Unknown Sub-Class (0x%02x)", + lct->lct_entry[i].sub_class & 0xFF); + break; + } + break; + + case I2O_CLASS_SCSI_PERIPHERAL: + if (lct->lct_entry[i].sub_class < SCSI_TABLE_SIZE) + seq_printf(seq, ", %s", + scsi_devices[lct->lct_entry[i]. + sub_class]); + else + seq_printf(seq, ", Unknown Device Type"); + break; + + case I2O_CLASS_BUS_ADAPTER_PORT: + if (lct->lct_entry[i].sub_class < BUS_TABLE_SIZE) + seq_printf(seq, ", %s", + bus_ports[lct->lct_entry[i]. + sub_class]); + else + seq_printf(seq, ", Unknown Bus Type"); + break; } seq_printf(seq, "\n"); - - seq_printf(seq, " Local TID : 0x%03x\n", lct->lct_entry[i].tid); - seq_printf(seq, " User TID : 0x%03x\n", lct->lct_entry[i].user_tid); + + seq_printf(seq, " Local TID : 0x%03x\n", + lct->lct_entry[i].tid); + seq_printf(seq, " User TID : 0x%03x\n", + lct->lct_entry[i].user_tid); seq_printf(seq, " Parent TID : 0x%03x\n", - lct->lct_entry[i].parent_tid); + lct->lct_entry[i].parent_tid); seq_printf(seq, " Identity Tag : 0x%x%x%x%x%x%x%x%x\n", - lct->lct_entry[i].identity_tag[0], - lct->lct_entry[i].identity_tag[1], - lct->lct_entry[i].identity_tag[2], - lct->lct_entry[i].identity_tag[3], - lct->lct_entry[i].identity_tag[4], - lct->lct_entry[i].identity_tag[5], - lct->lct_entry[i].identity_tag[6], - lct->lct_entry[i].identity_tag[7]); + lct->lct_entry[i].identity_tag[0], + lct->lct_entry[i].identity_tag[1], + lct->lct_entry[i].identity_tag[2], + lct->lct_entry[i].identity_tag[3], + lct->lct_entry[i].identity_tag[4], + lct->lct_entry[i].identity_tag[5], + lct->lct_entry[i].identity_tag[6], + lct->lct_entry[i].identity_tag[7]); seq_printf(seq, " Change Indicator : %0#10x\n", - lct->lct_entry[i].change_ind); + lct->lct_entry[i].change_ind); seq_printf(seq, " Event Capab Mask : %0#10x\n", - lct->lct_entry[i].device_flags); + lct->lct_entry[i].device_flags); } return 0; @@ -559,17 +523,17 @@ int i2o_seq_show_status(struct seq_file *seq, void *v) { - struct i2o_controller *c = (struct i2o_controller*)seq->private; + struct i2o_controller *c = (struct i2o_controller *)seq->private; char prodstr[25]; int version; - - i2o_status_get(c); // reread the status block + i2o_status_block *sb = c->status_block.virt; + + i2o_status_get(c); // reread the status block - seq_printf(seq, "Organization ID : %0#6x\n", - c->status_block->org_id); + seq_printf(seq, "Organization ID : %0#6x\n", sb->org_id); + + version = sb->i2o_version; - version = c->status_block->i2o_version; - /* FIXME for Spec 2.0 if (version == 0x02) { seq_printf(seq, "Lowest I2O version supported: "); @@ -599,170 +563,171 @@ } } */ - seq_printf(seq, "IOP ID : %0#5x\n", - c->status_block->iop_id); - seq_printf(seq, "Host Unit ID : %0#6x\n", - c->status_block->host_unit_id); - seq_printf(seq, "Segment Number : %0#5x\n", - c->status_block->segment_number); + seq_printf(seq, "IOP ID : %0#5x\n", sb->iop_id); + seq_printf(seq, "Host Unit ID : %0#6x\n", sb->host_unit_id); + seq_printf(seq, "Segment Number : %0#5x\n", sb->segment_number); seq_printf(seq, "I2O version : "); switch (version) { - case 0x00: - seq_printf(seq, "1.0\n"); - break; - case 0x01: - seq_printf(seq, "1.5\n"); - break; - case 0x02: - seq_printf(seq, "2.0\n"); - break; - default: - seq_printf(seq, "Unknown version\n"); + case 0x00: + seq_printf(seq, "1.0\n"); + break; + case 0x01: + seq_printf(seq, "1.5\n"); + break; + case 0x02: + seq_printf(seq, "2.0\n"); + break; + default: + seq_printf(seq, "Unknown version\n"); } seq_printf(seq, "IOP State : "); - switch (c->status_block->iop_state) { - case 0x01: - seq_printf(seq, "INIT\n"); - break; + switch (sb->iop_state) { + case 0x01: + seq_printf(seq, "INIT\n"); + break; - case 0x02: - seq_printf(seq, "RESET\n"); - break; + case 0x02: + seq_printf(seq, "RESET\n"); + break; - case 0x04: - seq_printf(seq, "HOLD\n"); - break; + case 0x04: + seq_printf(seq, "HOLD\n"); + break; - case 0x05: - seq_printf(seq, "READY\n"); - break; + case 0x05: + seq_printf(seq, "READY\n"); + break; - case 0x08: - seq_printf(seq, "OPERATIONAL\n"); - break; + case 0x08: + seq_printf(seq, "OPERATIONAL\n"); + break; - case 0x10: - seq_printf(seq, "FAILED\n"); - break; + case 0x10: + seq_printf(seq, "FAILED\n"); + break; - case 0x11: - seq_printf(seq, "FAULTED\n"); - break; + case 0x11: + seq_printf(seq, "FAULTED\n"); + break; - default: - seq_printf(seq, "Unknown\n"); - break; + default: + seq_printf(seq, "Unknown\n"); + break; } seq_printf(seq, "Messenger Type : "); - switch (c->status_block->msg_type) { - case 0x00: - seq_printf(seq, "Memory mapped\n"); - break; - case 0x01: - seq_printf(seq, "Memory mapped only\n"); - break; - case 0x02: - seq_printf(seq,"Remote only\n"); - break; - case 0x03: - seq_printf(seq, "Memory mapped and remote\n"); - break; - default: - seq_printf(seq, "Unknown\n"); + switch (sb->msg_type) { + case 0x00: + seq_printf(seq, "Memory mapped\n"); + break; + case 0x01: + seq_printf(seq, "Memory mapped only\n"); + break; + case 0x02: + seq_printf(seq, "Remote only\n"); + break; + case 0x03: + seq_printf(seq, "Memory mapped and remote\n"); + break; + default: + seq_printf(seq, "Unknown\n"); } seq_printf(seq, "Inbound Frame Size : %d bytes\n", - c->status_block->inbound_frame_size<<2); + sb->inbound_frame_size << 2); seq_printf(seq, "Max Inbound Frames : %d\n", - c->status_block->max_inbound_frames); + sb->max_inbound_frames); seq_printf(seq, "Current Inbound Frames : %d\n", - c->status_block->cur_inbound_frames); + sb->cur_inbound_frames); seq_printf(seq, "Max Outbound Frames : %d\n", - c->status_block->max_outbound_frames); + sb->max_outbound_frames); /* Spec doesn't say if NULL terminated or not... */ - memcpy(prodstr, c->status_block->product_id, 24); + memcpy(prodstr, sb->product_id, 24); prodstr[24] = '\0'; seq_printf(seq, "Product ID : %s\n", prodstr); seq_printf(seq, "Expected LCT Size : %d bytes\n", - c->status_block->expected_lct_size); + sb->expected_lct_size); seq_printf(seq, "IOP Capabilities\n"); seq_printf(seq, " Context Field Size Support : "); - switch (c->status_block->iop_capabilities & 0x0000003) { - case 0: - seq_printf(seq, "Supports only 32-bit context fields\n"); - break; - case 1: - seq_printf(seq, "Supports only 64-bit context fields\n"); - break; - case 2: - seq_printf(seq, "Supports 32-bit and 64-bit context fields, " - "but not concurrently\n"); - break; - case 3: - seq_printf(seq, "Supports 32-bit and 64-bit context fields " - "concurrently\n"); - break; - default: - seq_printf(seq, "0x%08x\n",c->status_block->iop_capabilities); + switch (sb->iop_capabilities & 0x0000003) { + case 0: + seq_printf(seq, "Supports only 32-bit context fields\n"); + break; + case 1: + seq_printf(seq, "Supports only 64-bit context fields\n"); + break; + case 2: + seq_printf(seq, "Supports 32-bit and 64-bit context fields, " + "but not concurrently\n"); + break; + case 3: + seq_printf(seq, "Supports 32-bit and 64-bit context fields " + "concurrently\n"); + break; + default: + seq_printf(seq, "0x%08x\n", sb->iop_capabilities); } seq_printf(seq, " Current Context Field Size : "); - switch (c->status_block->iop_capabilities & 0x0000000C) { - case 0: - seq_printf(seq, "not configured\n"); - break; - case 4: - seq_printf(seq, "Supports only 32-bit context fields\n"); - break; - case 8: - seq_printf(seq, "Supports only 64-bit context fields\n"); - break; - case 12: - seq_printf(seq, "Supports both 32-bit or 64-bit context fields " - "concurrently\n"); - break; - default: - seq_printf(seq, "\n"); + switch (sb->iop_capabilities & 0x0000000C) { + case 0: + seq_printf(seq, "not configured\n"); + break; + case 4: + seq_printf(seq, "Supports only 32-bit context fields\n"); + break; + case 8: + seq_printf(seq, "Supports only 64-bit context fields\n"); + break; + case 12: + seq_printf(seq, "Supports both 32-bit or 64-bit context fields " + "concurrently\n"); + break; + default: + seq_printf(seq, "\n"); } seq_printf(seq, " Inbound Peer Support : %s\n", - (c->status_block->iop_capabilities & 0x00000010) ? "Supported" : "Not supported"); + (sb-> + iop_capabilities & 0x00000010) ? "Supported" : + "Not supported"); seq_printf(seq, " Outbound Peer Support : %s\n", - (c->status_block->iop_capabilities & 0x00000020) ? "Supported" : "Not supported"); + (sb-> + iop_capabilities & 0x00000020) ? "Supported" : + "Not supported"); seq_printf(seq, " Peer to Peer Support : %s\n", - (c->status_block->iop_capabilities & 0x00000040) ? "Supported" : "Not supported"); + (sb-> + iop_capabilities & 0x00000040) ? "Supported" : + "Not supported"); seq_printf(seq, "Desired private memory size : %d kB\n", - c->status_block->desired_mem_size>>10); + sb->desired_mem_size >> 10); seq_printf(seq, "Allocated private memory size : %d kB\n", - c->status_block->current_mem_size>>10); + sb->current_mem_size >> 10); seq_printf(seq, "Private memory base address : %0#10x\n", - c->status_block->current_mem_base); + sb->current_mem_base); seq_printf(seq, "Desired private I/O size : %d kB\n", - c->status_block->desired_io_size>>10); + sb->desired_io_size >> 10); seq_printf(seq, "Allocated private I/O size : %d kB\n", - c->status_block->current_io_size>>10); + sb->current_io_size >> 10); seq_printf(seq, "Private I/O base address : %0#10x\n", - c->status_block->current_io_base); + sb->current_io_base); return 0; } -int i2o_proc_read_hw(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_hw(struct seq_file *seq, void *v) { - struct i2o_controller *c = (struct i2o_controller*)data; + struct i2o_controller *c = (struct i2o_controller *)seq->private; static u32 work32[5]; - static u8 *work8 = (u8*)work32; - static u16 *work16 = (u16*)work32; + static u8 *work8 = (u8 *) work32; + static u16 *work16 = (u16 *) work32; int token; u32 hwcap; - static char *cpu_table[] = - { + static char *cpu_table[] = { "Intel 80960 series", "AMD2900 series", "Motorola 68000 series", @@ -773,397 +738,350 @@ "Intel x86 series" }; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_scalar(c, ADAPTER_TID, 0x0000, -1, &work32, sizeof(work32)); + token = + i2o_parm_field_get(c->exec, 0x0000, -1, &work32, sizeof(work32)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0000 IOP Hardware"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0x0000 IOP Hardware"); + return 0; } - len += sprintf(buf+len, "I2O Vendor ID : %0#6x\n", work16[0]); - len += sprintf(buf+len, "Product ID : %0#6x\n", work16[1]); - len += sprintf(buf+len, "CPU : "); - if(work8[16] > 8) - len += sprintf(buf+len, "Unknown\n"); + seq_printf(seq, "I2O Vendor ID : %0#6x\n", work16[0]); + seq_printf(seq, "Product ID : %0#6x\n", work16[1]); + seq_printf(seq, "CPU : "); + if (work8[16] > 8) + seq_printf(seq, "Unknown\n"); else - len += sprintf(buf+len, "%s\n", cpu_table[work8[16]]); + seq_printf(seq, "%s\n", cpu_table[work8[16]]); /* Anyone using ProcessorVersion? */ - - len += sprintf(buf+len, "RAM : %dkB\n", work32[1]>>10); - len += sprintf(buf+len, "Non-Volatile Mem : %dkB\n", work32[2]>>10); - hwcap = work32[3]; - len += sprintf(buf+len, "Capabilities : 0x%08x\n", hwcap); - len += sprintf(buf+len, " [%s] Self booting\n", - (hwcap&0x00000001) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Upgradable IRTOS\n", - (hwcap&0x00000002) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Supports downloading DDMs\n", - (hwcap&0x00000004) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Supports installing DDMs\n", - (hwcap&0x00000008) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Battery-backed RAM\n", - (hwcap&0x00000010) ? "+" : "-"); + seq_printf(seq, "RAM : %dkB\n", work32[1] >> 10); + seq_printf(seq, "Non-Volatile Mem : %dkB\n", work32[2] >> 10); - spin_unlock(&i2o_proc_lock); + hwcap = work32[3]; + seq_printf(seq, "Capabilities : 0x%08x\n", hwcap); + seq_printf(seq, " [%s] Self booting\n", + (hwcap & 0x00000001) ? "+" : "-"); + seq_printf(seq, " [%s] Upgradable IRTOS\n", + (hwcap & 0x00000002) ? "+" : "-"); + seq_printf(seq, " [%s] Supports downloading DDMs\n", + (hwcap & 0x00000004) ? "+" : "-"); + seq_printf(seq, " [%s] Supports installing DDMs\n", + (hwcap & 0x00000008) ? "+" : "-"); + seq_printf(seq, " [%s] Battery-backed RAM\n", + (hwcap & 0x00000010) ? "+" : "-"); - return len; + return 0; } - /* Executive group 0003h - Executing DDM List (table) */ -int i2o_proc_read_ddm_table(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_ddm_table(struct seq_file *seq, void *v) { - struct i2o_controller *c = (struct i2o_controller*)data; + struct i2o_controller *c = (struct i2o_controller *)seq->private; int token; int i; typedef struct _i2o_exec_execute_ddm_table { u16 ddm_tid; - u8 module_type; - u8 reserved; + u8 module_type; + u8 reserved; u16 i2o_vendor_id; u16 module_id; - u8 module_name_version[28]; + u8 module_name_version[28]; u32 data_size; u32 code_size; } i2o_exec_execute_ddm_table; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; - i2o_exec_execute_ddm_table ddm_table[MAX_I2O_MODULES]; + i2o_exec_execute_ddm_table ddm_table[I2O_MAX_MODULES]; } *result; i2o_exec_execute_ddm_table ddm_table; result = kmalloc(sizeof(*result), GFP_KERNEL); - if(!result) + if (!result) return -ENOMEM; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - c, ADAPTER_TID, - 0x0003, -1, - NULL, 0, - result, sizeof(*result)); + token = i2o_parm_table_get(c->exec, I2O_PARAMS_TABLE_GET, 0x0003, -1, + NULL, 0, result, sizeof(*result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0003 Executing DDM List"); + i2o_report_query_status(seq, token, + "0x0003 Executing DDM List"); goto out; } - len += sprintf(buf+len, "Tid Module_type Vendor Mod_id Module_name Vrs Data_size Code_size\n"); - ddm_table=result->ddm_table[0]; + seq_printf(seq, + "Tid Module_type Vendor Mod_id Module_name Vrs Data_size Code_size\n"); + ddm_table = result->ddm_table[0]; - for(i=0; i < result->row_count; ddm_table=result->ddm_table[++i]) - { - len += sprintf(buf+len, "0x%03x ", ddm_table.ddm_tid & 0xFFF); + for (i = 0; i < result->row_count; ddm_table = result->ddm_table[++i]) { + seq_printf(seq, "0x%03x ", ddm_table.ddm_tid & 0xFFF); - switch(ddm_table.module_type) - { + switch (ddm_table.module_type) { case 0x01: - len += sprintf(buf+len, "Downloaded DDM "); - break; + seq_printf(seq, "Downloaded DDM "); + break; case 0x22: - len += sprintf(buf+len, "Embedded DDM "); + seq_printf(seq, "Embedded DDM "); break; default: - len += sprintf(buf+len, " "); + seq_printf(seq, " "); } - len += sprintf(buf+len, "%-#7x", ddm_table.i2o_vendor_id); - len += sprintf(buf+len, "%-#8x", ddm_table.module_id); - len += sprintf(buf+len, "%-29s", chtostr(ddm_table.module_name_version, 28)); - len += sprintf(buf+len, "%9d ", ddm_table.data_size); - len += sprintf(buf+len, "%8d", ddm_table.code_size); + seq_printf(seq, "%-#7x", ddm_table.i2o_vendor_id); + seq_printf(seq, "%-#8x", ddm_table.module_id); + seq_printf(seq, "%-29s", + chtostr(ddm_table.module_name_version, 28)); + seq_printf(seq, "%9d ", ddm_table.data_size); + seq_printf(seq, "%8d", ddm_table.code_size); - len += sprintf(buf+len, "\n"); + seq_printf(seq, "\n"); } -out: - spin_unlock(&i2o_proc_lock); + out: kfree(result); - return len; + return 0; } - /* Executive group 0004h - Driver Store (scalar) */ -int i2o_proc_read_driver_store(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_driver_store(struct seq_file *seq, void *v) { - struct i2o_controller *c = (struct i2o_controller*)data; + struct i2o_controller *c = (struct i2o_controller *)seq->private; u32 work32[8]; int token; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_scalar(c, ADAPTER_TID, 0x0004, -1, &work32, sizeof(work32)); + token = + i2o_parm_field_get(c->exec, 0x0004, -1, &work32, sizeof(work32)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0004 Driver Store"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0x0004 Driver Store"); + return 0; } - len += sprintf(buf+len, "Module limit : %d\n" - "Module count : %d\n" - "Current space : %d kB\n" - "Free space : %d kB\n", - work32[0], work32[1], work32[2]>>10, work32[3]>>10); + seq_printf(seq, "Module limit : %d\n" + "Module count : %d\n" + "Current space : %d kB\n" + "Free space : %d kB\n", + work32[0], work32[1], work32[2] >> 10, work32[3] >> 10); - spin_unlock(&i2o_proc_lock); - - return len; + return 0; } - /* Executive group 0005h - Driver Store Table (table) */ -int i2o_proc_read_drivers_stored(char *buf, char **start, off_t offset, - int len, int *eof, void *data) +int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v) { typedef struct _i2o_driver_store { u16 stored_ddm_index; - u8 module_type; - u8 reserved; + u8 module_type; + u8 reserved; u16 i2o_vendor_id; u16 module_id; - u8 module_name_version[28]; - u8 date[8]; + u8 module_name_version[28]; + u8 date[8]; u32 module_size; u32 mpb_size; u32 module_flags; } i2o_driver_store_table; - struct i2o_controller *c = (struct i2o_controller*)data; + struct i2o_controller *c = (struct i2o_controller *)seq->private; int token; int i; - typedef struct - { + typedef struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; - i2o_driver_store_table dst[MAX_I2O_MODULES]; + i2o_driver_store_table dst[I2O_MAX_MODULES]; } i2o_driver_result_table; - + i2o_driver_result_table *result; i2o_driver_store_table *dst; - - len = 0; - result = kmalloc(sizeof(i2o_driver_result_table), GFP_KERNEL); - if(result == NULL) + if (result == NULL) return -ENOMEM; - spin_lock(&i2o_proc_lock); - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - c, ADAPTER_TID, 0x0005, -1, NULL, 0, - result, sizeof(*result)); + token = i2o_parm_table_get(c->exec, I2O_PARAMS_TABLE_GET, 0x0005, -1, + NULL, 0, result, sizeof(*result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0005 DRIVER STORE TABLE"); - spin_unlock(&i2o_proc_lock); + i2o_report_query_status(seq, token, + "0x0005 DRIVER STORE TABLE"); kfree(result); - return len; + return 0; } - len += sprintf(buf+len, "# Module_type Vendor Mod_id Module_name Vrs" - "Date Mod_size Par_size Flags\n"); - for(i=0, dst=&result->dst[0]; i < result->row_count; dst=&result->dst[++i]) - { - len += sprintf(buf+len, "%-3d", dst->stored_ddm_index); - switch(dst->module_type) - { + seq_printf(seq, + "# Module_type Vendor Mod_id Module_name Vrs" + "Date Mod_size Par_size Flags\n"); + for (i = 0, dst = &result->dst[0]; i < result->row_count; + dst = &result->dst[++i]) { + seq_printf(seq, "%-3d", dst->stored_ddm_index); + switch (dst->module_type) { case 0x01: - len += sprintf(buf+len, "Downloaded DDM "); - break; + seq_printf(seq, "Downloaded DDM "); + break; case 0x22: - len += sprintf(buf+len, "Embedded DDM "); + seq_printf(seq, "Embedded DDM "); break; default: - len += sprintf(buf+len, " "); + seq_printf(seq, " "); } #if 0 - if(c->i2oversion == 0x02) - len += sprintf(buf+len, "%-d", dst->module_state); + if (c->i2oversion == 0x02) + seq_printf(seq, "%-d", dst->module_state); #endif - len += sprintf(buf+len, "%-#7x", dst->i2o_vendor_id); - len += sprintf(buf+len, "%-#8x", dst->module_id); - len += sprintf(buf+len, "%-29s", chtostr(dst->module_name_version,28)); - len += sprintf(buf+len, "%-9s", chtostr(dst->date,8)); - len += sprintf(buf+len, "%8d ", dst->module_size); - len += sprintf(buf+len, "%8d ", dst->mpb_size); - len += sprintf(buf+len, "0x%04x", dst->module_flags); + seq_printf(seq, "%-#7x", dst->i2o_vendor_id); + seq_printf(seq, "%-#8x", dst->module_id); + seq_printf(seq, "%-29s", chtostr(dst->module_name_version, 28)); + seq_printf(seq, "%-9s", chtostr(dst->date, 8)); + seq_printf(seq, "%8d ", dst->module_size); + seq_printf(seq, "%8d ", dst->mpb_size); + seq_printf(seq, "0x%04x", dst->module_flags); #if 0 - if(c->i2oversion == 0x02) - len += sprintf(buf+len, "%d", - dst->notification_level); + if (c->i2oversion == 0x02) + seq_printf(seq, "%d", dst->notification_level); #endif - len += sprintf(buf+len, "\n"); + seq_printf(seq, "\n"); } - spin_unlock(&i2o_proc_lock); kfree(result); - return len; + return 0; } - /* Generic group F000h - Params Descriptor (table) */ -int i2o_proc_read_groups(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_groups(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; u8 properties; - typedef struct _i2o_group_info - { + typedef struct _i2o_group_info { u16 group_number; u16 field_count; u16 row_count; - u8 properties; - u8 reserved; + u8 properties; + u8 reserved; } i2o_group_info; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; i2o_group_info group[256]; } *result; result = kmalloc(sizeof(*result), GFP_KERNEL); - if(!result) + if (!result) return -ENOMEM; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, 0xF000, -1, NULL, 0, - result, sizeof(*result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF000, -1, NULL, 0, + result, sizeof(*result)); if (token < 0) { - len = i2o_report_query_status(buf+len, token, "0xF000 Params Descriptor"); + i2o_report_query_status(seq, token, "0xF000 Params Descriptor"); goto out; } - len += sprintf(buf+len, "# Group FieldCount RowCount Type Add Del Clear\n"); + seq_printf(seq, + "# Group FieldCount RowCount Type Add Del Clear\n"); - for (i=0; i < result->row_count; i++) - { - len += sprintf(buf+len, "%-3d", i); - len += sprintf(buf+len, "0x%04X ", result->group[i].group_number); - len += sprintf(buf+len, "%10d ", result->group[i].field_count); - len += sprintf(buf+len, "%8d ", result->group[i].row_count); + for (i = 0; i < result->row_count; i++) { + seq_printf(seq, "%-3d", i); + seq_printf(seq, "0x%04X ", result->group[i].group_number); + seq_printf(seq, "%10d ", result->group[i].field_count); + seq_printf(seq, "%8d ", result->group[i].row_count); properties = result->group[i].properties; - if (properties & 0x1) len += sprintf(buf+len, "Table "); - else len += sprintf(buf+len, "Scalar "); - if (properties & 0x2) len += sprintf(buf+len, " + "); - else len += sprintf(buf+len, " - "); - if (properties & 0x4) len += sprintf(buf+len, " + "); - else len += sprintf(buf+len, " - "); - if (properties & 0x8) len += sprintf(buf+len, " + "); - else len += sprintf(buf+len, " - "); + if (properties & 0x1) + seq_printf(seq, "Table "); + else + seq_printf(seq, "Scalar "); + if (properties & 0x2) + seq_printf(seq, " + "); + else + seq_printf(seq, " - "); + if (properties & 0x4) + seq_printf(seq, " + "); + else + seq_printf(seq, " - "); + if (properties & 0x8) + seq_printf(seq, " + "); + else + seq_printf(seq, " - "); - len += sprintf(buf+len, "\n"); + seq_printf(seq, "\n"); } if (result->more_flag) - len += sprintf(buf+len, "There is more...\n"); -out: - spin_unlock(&i2o_proc_lock); + seq_printf(seq, "There is more...\n"); + out: kfree(result); - return len; + return 0; } - /* Generic group F001h - Physical Device Table (table) */ -int i2o_proc_read_phys_device(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_phys_device(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; u32 adapter_id[64]; } result; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0xF001, -1, NULL, 0, - &result, sizeof(result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF001, -1, NULL, 0, + &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF001 Physical Device Table"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, + "0xF001 Physical Device Table"); + return 0; } if (result.row_count) - len += sprintf(buf+len, "# AdapterId\n"); + seq_printf(seq, "# AdapterId\n"); - for (i=0; i < result.row_count; i++) - { - len += sprintf(buf+len, "%-2d", i); - len += sprintf(buf+len, "%#7x\n", result.adapter_id[i]); + for (i = 0; i < result.row_count; i++) { + seq_printf(seq, "%-2d", i); + seq_printf(seq, "%#7x\n", result.adapter_id[i]); } if (result.more_flag) - len += sprintf(buf+len, "There is more...\n"); + seq_printf(seq, "There is more...\n"); - spin_unlock(&i2o_proc_lock); - return len; + return 0; } /* Generic group F002h - Claimed Table (table) */ -int i2o_proc_read_claimed(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_claimed(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; @@ -1171,434 +1089,356 @@ u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; u16 claimed_tid[64]; } result; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0xF002, -1, NULL, 0, - &result, sizeof(result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF002, -1, NULL, 0, + &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF002 Claimed Table"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0xF002 Claimed Table"); + return 0; } if (result.row_count) - len += sprintf(buf+len, "# ClaimedTid\n"); + seq_printf(seq, "# ClaimedTid\n"); - for (i=0; i < result.row_count; i++) - { - len += sprintf(buf+len, "%-2d", i); - len += sprintf(buf+len, "%#7x\n", result.claimed_tid[i]); + for (i = 0; i < result.row_count; i++) { + seq_printf(seq, "%-2d", i); + seq_printf(seq, "%#7x\n", result.claimed_tid[i]); } if (result.more_flag) - len += sprintf(buf+len, "There is more...\n"); + seq_printf(seq, "There is more...\n"); - spin_unlock(&i2o_proc_lock); - return len; + return 0; } /* Generic group F003h - User Table (table) */ -int i2o_proc_read_users(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_users(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; - typedef struct _i2o_user_table - { + typedef struct _i2o_user_table { u16 instance; u16 user_tid; u8 claim_type; - u8 reserved1; - u16 reserved2; + u8 reserved1; + u16 reserved2; } i2o_user_table; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; i2o_user_table user[64]; } *result; result = kmalloc(sizeof(*result), GFP_KERNEL); - if(!result) + if (!result) return -ENOMEM; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0xF003, -1, NULL, 0, - result, sizeof(*result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF003, -1, NULL, 0, + result, sizeof(*result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF003 User Table"); + i2o_report_query_status(seq, token, "0xF003 User Table"); goto out; } - len += sprintf(buf+len, "# Instance UserTid ClaimType\n"); + seq_printf(seq, "# Instance UserTid ClaimType\n"); - for(i=0; i < result->row_count; i++) - { - len += sprintf(buf+len, "%-3d", i); - len += sprintf(buf+len, "%#8x ", result->user[i].instance); - len += sprintf(buf+len, "%#7x ", result->user[i].user_tid); - len += sprintf(buf+len, "%#9x\n", result->user[i].claim_type); + for (i = 0; i < result->row_count; i++) { + seq_printf(seq, "%-3d", i); + seq_printf(seq, "%#8x ", result->user[i].instance); + seq_printf(seq, "%#7x ", result->user[i].user_tid); + seq_printf(seq, "%#9x\n", result->user[i].claim_type); } if (result->more_flag) - len += sprintf(buf+len, "There is more...\n"); -out: - spin_unlock(&i2o_proc_lock); + seq_printf(seq, "There is more...\n"); + out: kfree(result); - return len; + return 0; } /* Generic group F005h - Private message extensions (table) (optional) */ -int i2o_proc_read_priv_msgs(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_priv_msgs(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; - typedef struct _i2o_private - { + typedef struct _i2o_private { u16 ext_instance; u16 organization_id; u16 x_function_code; } i2o_private; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; i2o_private extension[64]; } result; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0xF000, -1, - NULL, 0, - &result, sizeof(result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF000, -1, NULL, 0, + &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF005 Private Message Extensions (optional)"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, + "0xF005 Private Message Extensions (optional)"); + return 0; } - - len += sprintf(buf+len, "Instance# OrgId FunctionCode\n"); - for(i=0; i < result.row_count; i++) - { - len += sprintf(buf+len, "%0#9x ", result.extension[i].ext_instance); - len += sprintf(buf+len, "%0#6x ", result.extension[i].organization_id); - len += sprintf(buf+len, "%0#6x", result.extension[i].x_function_code); + seq_printf(seq, "Instance# OrgId FunctionCode\n"); - len += sprintf(buf+len, "\n"); - } + for (i = 0; i < result.row_count; i++) { + seq_printf(seq, "%0#9x ", result.extension[i].ext_instance); + seq_printf(seq, "%0#6x ", result.extension[i].organization_id); + seq_printf(seq, "%0#6x", result.extension[i].x_function_code); - if(result.more_flag) - len += sprintf(buf+len, "There is more...\n"); + seq_printf(seq, "\n"); + } - spin_unlock(&i2o_proc_lock); + if (result.more_flag) + seq_printf(seq, "There is more...\n"); - return len; + return 0; } - /* Generic group F006h - Authorized User Table (table) */ -int i2o_proc_read_authorized_users(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_authorized_users(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; int i; - struct - { + struct { u16 result_count; u16 pad; u16 block_size; - u8 block_status; - u8 error_info_size; + u8 block_status; + u8 error_info_size; u16 row_count; u16 more_flag; u32 alternate_tid[64]; } result; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0xF006, -1, - NULL, 0, - &result, sizeof(result)); + token = i2o_parm_table_get(d, I2O_PARAMS_TABLE_GET, 0xF006, -1, NULL, 0, + &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF006 Autohorized User Table"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, + "0xF006 Autohorized User Table"); + return 0; } if (result.row_count) - len += sprintf(buf+len, "# AlternateTid\n"); + seq_printf(seq, "# AlternateTid\n"); - for(i=0; i < result.row_count; i++) - { - len += sprintf(buf+len, "%-2d", i); - len += sprintf(buf+len, "%#7x ", result.alternate_tid[i]); + for (i = 0; i < result.row_count; i++) { + seq_printf(seq, "%-2d", i); + seq_printf(seq, "%#7x ", result.alternate_tid[i]); } if (result.more_flag) - len += sprintf(buf+len, "There is more...\n"); + seq_printf(seq, "There is more...\n"); - spin_unlock(&i2o_proc_lock); - return len; + return 0; } - /* Generic group F100h - Device Identity (scalar) */ -int i2o_proc_read_dev_identity(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_dev_identity(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[128]; // allow for "stuff" + up to 256 byte (max) serial number - // == (allow) 512d bytes (max) - static u16 *work16 = (u16*)work32; + struct i2o_device *d = (struct i2o_device *)seq->private; + static u32 work32[128]; // allow for "stuff" + up to 256 byte (max) serial number + // == (allow) 512d bytes (max) + static u16 *work16 = (u16 *) work32; int token; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0xF100, -1, - &work32, sizeof(work32)); + token = i2o_parm_field_get(d, 0xF100, -1, &work32, sizeof(work32)); if (token < 0) { - len += i2o_report_query_status(buf+len, token ,"0xF100 Device Identity"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0xF100 Device Identity"); + return 0; } - - len += sprintf(buf, "Device Class : %s\n", i2o_get_class_name(work16[0])); - len += sprintf(buf+len, "Owner TID : %0#5x\n", work16[2]); - len += sprintf(buf+len, "Parent TID : %0#5x\n", work16[3]); - len += sprintf(buf+len, "Vendor info : %s\n", chtostr((u8 *)(work32+2), 16)); - len += sprintf(buf+len, "Product info : %s\n", chtostr((u8 *)(work32+6), 16)); - len += sprintf(buf+len, "Description : %s\n", chtostr((u8 *)(work32+10), 16)); - len += sprintf(buf+len, "Product rev. : %s\n", chtostr((u8 *)(work32+14), 8)); - len += sprintf(buf+len, "Serial number : "); - len = print_serial_number(buf, len, - (u8*)(work32+16), - /* allow for SNLen plus - * possible trailing '\0' - */ - sizeof(work32)-(16*sizeof(u32))-2 - ); - len += sprintf(buf+len, "\n"); + seq_printf(seq, "Device Class : %s\n", i2o_get_class_name(work16[0])); + seq_printf(seq, "Owner TID : %0#5x\n", work16[2]); + seq_printf(seq, "Parent TID : %0#5x\n", work16[3]); + seq_printf(seq, "Vendor info : %s\n", + chtostr((u8 *) (work32 + 2), 16)); + seq_printf(seq, "Product info : %s\n", + chtostr((u8 *) (work32 + 6), 16)); + seq_printf(seq, "Description : %s\n", + chtostr((u8 *) (work32 + 10), 16)); + seq_printf(seq, "Product rev. : %s\n", + chtostr((u8 *) (work32 + 14), 8)); + + seq_printf(seq, "Serial number : "); + print_serial_number(seq, (u8 *) (work32 + 16), + /* allow for SNLen plus + * possible trailing '\0' + */ + sizeof(work32) - (16 * sizeof(u32)) - 2); + seq_printf(seq, "\n"); - spin_unlock(&i2o_proc_lock); - - return len; + return 0; } - -int i2o_proc_read_dev_name(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_dev_name(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; - - if ( d->dev_name[0] == '\0' ) - return 0; + struct i2o_device *d = (struct i2o_device *)seq->private; - len = sprintf(buf, "%s\n", d->dev_name); + seq_printf(seq, "%s\n", d->device.bus_id); - return len; + return 0; } - /* Generic group F101h - DDM Identity (scalar) */ -int i2o_proc_read_ddm_identity(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; - struct - { + struct { u16 ddm_tid; u8 module_name[24]; u8 module_rev[8]; u8 sn_format; u8 serial_number[12]; - u8 pad[256]; // allow up to 256 byte (max) serial number - } result; + u8 pad[256]; // allow up to 256 byte (max) serial number + } result; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0xF101, -1, - &result, sizeof(result)); + token = i2o_parm_field_get(d, 0xF101, -1, &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF101 DDM Identity"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0xF101 DDM Identity"); + return 0; } - len += sprintf(buf, "Registering DDM TID : 0x%03x\n", result.ddm_tid); - len += sprintf(buf+len, "Module name : %s\n", chtostr(result.module_name, 24)); - len += sprintf(buf+len, "Module revision : %s\n", chtostr(result.module_rev, 8)); - - len += sprintf(buf+len, "Serial number : "); - len = print_serial_number(buf, len, result.serial_number, sizeof(result)-36); - /* allow for SNLen plus possible trailing '\0' */ + seq_printf(seq, "Registering DDM TID : 0x%03x\n", result.ddm_tid); + seq_printf(seq, "Module name : %s\n", + chtostr(result.module_name, 24)); + seq_printf(seq, "Module revision : %s\n", + chtostr(result.module_rev, 8)); + + seq_printf(seq, "Serial number : "); + print_serial_number(seq, result.serial_number, sizeof(result) - 36); + /* allow for SNLen plus possible trailing '\0' */ - len += sprintf(buf+len, "\n"); + seq_printf(seq, "\n"); - spin_unlock(&i2o_proc_lock); - - return len; + return 0; } /* Generic group F102h - User Information (scalar) */ -int i2o_proc_read_uinfo(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_uinfo(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; - struct - { + struct { u8 device_name[64]; u8 service_name[64]; u8 physical_location[64]; u8 instance_number[4]; } result; - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0xF102, -1, - &result, sizeof(result)); + token = i2o_parm_field_get(d, 0xF102, -1, &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF102 User Information"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, "0xF102 User Information"); + return 0; } - len += sprintf(buf, "Device name : %s\n", chtostr(result.device_name, 64)); - len += sprintf(buf+len, "Service name : %s\n", chtostr(result.service_name, 64)); - len += sprintf(buf+len, "Physical name : %s\n", chtostr(result.physical_location, 64)); - len += sprintf(buf+len, "Instance number : %s\n", chtostr(result.instance_number, 4)); + seq_printf(seq, "Device name : %s\n", + chtostr(result.device_name, 64)); + seq_printf(seq, "Service name : %s\n", + chtostr(result.service_name, 64)); + seq_printf(seq, "Physical name : %s\n", + chtostr(result.physical_location, 64)); + seq_printf(seq, "Instance number : %s\n", + chtostr(result.instance_number, 4)); - spin_unlock(&i2o_proc_lock); - return len; + return 0; } /* Generic group F103h - SGL Operating Limits (scalar) */ -int i2o_proc_read_sgl_limits(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_sgl_limits(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; static u32 work32[12]; - static u16 *work16 = (u16 *)work32; - static u8 *work8 = (u8 *)work32; + static u16 *work16 = (u16 *) work32; + static u8 *work8 = (u8 *) work32; int token; - spin_lock(&i2o_proc_lock); - - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0xF103, -1, - &work32, sizeof(work32)); + token = i2o_parm_field_get(d, 0xF103, -1, &work32, sizeof(work32)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF103 SGL Operating Limits"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, + "0xF103 SGL Operating Limits"); + return 0; } - len += sprintf(buf, "SGL chain size : %d\n", work32[0]); - len += sprintf(buf+len, "Max SGL chain size : %d\n", work32[1]); - len += sprintf(buf+len, "SGL chain size target : %d\n", work32[2]); - len += sprintf(buf+len, "SGL frag count : %d\n", work16[6]); - len += sprintf(buf+len, "Max SGL frag count : %d\n", work16[7]); - len += sprintf(buf+len, "SGL frag count target : %d\n", work16[8]); + seq_printf(seq, "SGL chain size : %d\n", work32[0]); + seq_printf(seq, "Max SGL chain size : %d\n", work32[1]); + seq_printf(seq, "SGL chain size target : %d\n", work32[2]); + seq_printf(seq, "SGL frag count : %d\n", work16[6]); + seq_printf(seq, "Max SGL frag count : %d\n", work16[7]); + seq_printf(seq, "SGL frag count target : %d\n", work16[8]); +/* FIXME if (d->i2oversion == 0x02) { - len += sprintf(buf+len, "SGL data alignment : %d\n", work16[8]); - len += sprintf(buf+len, "SGL addr limit : %d\n", work8[20]); - len += sprintf(buf+len, "SGL addr sizes supported : "); - if (work8[21] & 0x01) - len += sprintf(buf+len, "32 bit "); - if (work8[21] & 0x02) - len += sprintf(buf+len, "64 bit "); - if (work8[21] & 0x04) - len += sprintf(buf+len, "96 bit "); - if (work8[21] & 0x08) - len += sprintf(buf+len, "128 bit "); - len += sprintf(buf+len, "\n"); +*/ + seq_printf(seq, "SGL data alignment : %d\n", work16[8]); + seq_printf(seq, "SGL addr limit : %d\n", work8[20]); + seq_printf(seq, "SGL addr sizes supported : "); + if (work8[21] & 0x01) + seq_printf(seq, "32 bit "); + if (work8[21] & 0x02) + seq_printf(seq, "64 bit "); + if (work8[21] & 0x04) + seq_printf(seq, "96 bit "); + if (work8[21] & 0x08) + seq_printf(seq, "128 bit "); + seq_printf(seq, "\n"); +/* } +*/ - spin_unlock(&i2o_proc_lock); - - return len; + return 0; } /* Generic group F200h - Sensors (scalar) */ -int i2o_proc_read_sensors(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +int i2o_seq_show_sensors(struct seq_file *seq, void *v) { - struct i2o_device *d = (struct i2o_device*)data; + struct i2o_device *d = (struct i2o_device *)seq->private; int token; - struct - { + struct { u16 sensor_instance; - u8 component; + u8 component; u16 component_instance; - u8 sensor_class; - u8 sensor_type; - u8 scaling_exponent; + u8 sensor_class; + u8 sensor_type; + u8 scaling_exponent; u32 actual_reading; u32 minimum_reading; u32 low2lowcat_treshold; @@ -1615,1795 +1455,663 @@ u32 hicat2high_treshold; u32 hi2hicat_treshold; u32 maximum_reading; - u8 sensor_state; + u8 sensor_state; u16 event_enable; } result; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0xF200, -1, - &result, sizeof(result)); + + token = i2o_parm_field_get(d, 0xF200, -1, &result, sizeof(result)); if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0xF200 Sensors (optional)"); - spin_unlock(&i2o_proc_lock); - return len; + i2o_report_query_status(seq, token, + "0xF200 Sensors (optional)"); + return 0; } - - len += sprintf(buf+len, "Sensor instance : %d\n", result.sensor_instance); - len += sprintf(buf+len, "Component : %d = ", result.component); - switch (result.component) - { - case 0: len += sprintf(buf+len, "Other"); - break; - case 1: len += sprintf(buf+len, "Planar logic Board"); - break; - case 2: len += sprintf(buf+len, "CPU"); - break; - case 3: len += sprintf(buf+len, "Chassis"); - break; - case 4: len += sprintf(buf+len, "Power Supply"); - break; - case 5: len += sprintf(buf+len, "Storage"); - break; - case 6: len += sprintf(buf+len, "External"); - break; - } - len += sprintf(buf+len,"\n"); + seq_printf(seq, "Sensor instance : %d\n", result.sensor_instance); - len += sprintf(buf+len, "Component instance : %d\n", result.component_instance); - len += sprintf(buf+len, "Sensor class : %s\n", - result.sensor_class ? "Analog" : "Digital"); - - len += sprintf(buf+len, "Sensor type : %d = ",result.sensor_type); - switch (result.sensor_type) - { - case 0: len += sprintf(buf+len, "Other\n"); - break; - case 1: len += sprintf(buf+len, "Thermal\n"); - break; - case 2: len += sprintf(buf+len, "DC voltage (DC volts)\n"); - break; - case 3: len += sprintf(buf+len, "AC voltage (AC volts)\n"); - break; - case 4: len += sprintf(buf+len, "DC current (DC amps)\n"); - break; - case 5: len += sprintf(buf+len, "AC current (AC volts)\n"); - break; - case 6: len += sprintf(buf+len, "Door open\n"); - break; - case 7: len += sprintf(buf+len, "Fan operational\n"); - break; - } - - len += sprintf(buf+len, "Scaling exponent : %d\n", result.scaling_exponent); - len += sprintf(buf+len, "Actual reading : %d\n", result.actual_reading); - len += sprintf(buf+len, "Minimum reading : %d\n", result.minimum_reading); - len += sprintf(buf+len, "Low2LowCat treshold : %d\n", result.low2lowcat_treshold); - len += sprintf(buf+len, "LowCat2Low treshold : %d\n", result.lowcat2low_treshold); - len += sprintf(buf+len, "LowWarn2Low treshold : %d\n", result.lowwarn2low_treshold); - len += sprintf(buf+len, "Low2LowWarn treshold : %d\n", result.low2lowwarn_treshold); - len += sprintf(buf+len, "Norm2LowWarn treshold : %d\n", result.norm2lowwarn_treshold); - len += sprintf(buf+len, "LowWarn2Norm treshold : %d\n", result.lowwarn2norm_treshold); - len += sprintf(buf+len, "Nominal reading : %d\n", result.nominal_reading); - len += sprintf(buf+len, "HiWarn2Norm treshold : %d\n", result.hiwarn2norm_treshold); - len += sprintf(buf+len, "Norm2HiWarn treshold : %d\n", result.norm2hiwarn_treshold); - len += sprintf(buf+len, "High2HiWarn treshold : %d\n", result.high2hiwarn_treshold); - len += sprintf(buf+len, "HiWarn2High treshold : %d\n", result.hiwarn2high_treshold); - len += sprintf(buf+len, "HiCat2High treshold : %d\n", result.hicat2high_treshold); - len += sprintf(buf+len, "High2HiCat treshold : %d\n", result.hi2hicat_treshold); - len += sprintf(buf+len, "Maximum reading : %d\n", result.maximum_reading); + seq_printf(seq, "Component : %d = ", result.component); + switch (result.component) { + case 0: + seq_printf(seq, "Other"); + break; + case 1: + seq_printf(seq, "Planar logic Board"); + break; + case 2: + seq_printf(seq, "CPU"); + break; + case 3: + seq_printf(seq, "Chassis"); + break; + case 4: + seq_printf(seq, "Power Supply"); + break; + case 5: + seq_printf(seq, "Storage"); + break; + case 6: + seq_printf(seq, "External"); + break; + } + seq_printf(seq, "\n"); + + seq_printf(seq, "Component instance : %d\n", + result.component_instance); + seq_printf(seq, "Sensor class : %s\n", + result.sensor_class ? "Analog" : "Digital"); + + seq_printf(seq, "Sensor type : %d = ", result.sensor_type); + switch (result.sensor_type) { + case 0: + seq_printf(seq, "Other\n"); + break; + case 1: + seq_printf(seq, "Thermal\n"); + break; + case 2: + seq_printf(seq, "DC voltage (DC volts)\n"); + break; + case 3: + seq_printf(seq, "AC voltage (AC volts)\n"); + break; + case 4: + seq_printf(seq, "DC current (DC amps)\n"); + break; + case 5: + seq_printf(seq, "AC current (AC volts)\n"); + break; + case 6: + seq_printf(seq, "Door open\n"); + break; + case 7: + seq_printf(seq, "Fan operational\n"); + break; + } + + seq_printf(seq, "Scaling exponent : %d\n", + result.scaling_exponent); + seq_printf(seq, "Actual reading : %d\n", result.actual_reading); + seq_printf(seq, "Minimum reading : %d\n", result.minimum_reading); + seq_printf(seq, "Low2LowCat treshold : %d\n", + result.low2lowcat_treshold); + seq_printf(seq, "LowCat2Low treshold : %d\n", + result.lowcat2low_treshold); + seq_printf(seq, "LowWarn2Low treshold : %d\n", + result.lowwarn2low_treshold); + seq_printf(seq, "Low2LowWarn treshold : %d\n", + result.low2lowwarn_treshold); + seq_printf(seq, "Norm2LowWarn treshold : %d\n", + result.norm2lowwarn_treshold); + seq_printf(seq, "LowWarn2Norm treshold : %d\n", + result.lowwarn2norm_treshold); + seq_printf(seq, "Nominal reading : %d\n", result.nominal_reading); + seq_printf(seq, "HiWarn2Norm treshold : %d\n", + result.hiwarn2norm_treshold); + seq_printf(seq, "Norm2HiWarn treshold : %d\n", + result.norm2hiwarn_treshold); + seq_printf(seq, "High2HiWarn treshold : %d\n", + result.high2hiwarn_treshold); + seq_printf(seq, "HiWarn2High treshold : %d\n", + result.hiwarn2high_treshold); + seq_printf(seq, "HiCat2High treshold : %d\n", + result.hicat2high_treshold); + seq_printf(seq, "High2HiCat treshold : %d\n", + result.hi2hicat_treshold); + seq_printf(seq, "Maximum reading : %d\n", result.maximum_reading); + + seq_printf(seq, "Sensor state : %d = ", result.sensor_state); + switch (result.sensor_state) { + case 0: + seq_printf(seq, "Normal\n"); + break; + case 1: + seq_printf(seq, "Abnormal\n"); + break; + case 2: + seq_printf(seq, "Unknown\n"); + break; + case 3: + seq_printf(seq, "Low Catastrophic (LoCat)\n"); + break; + case 4: + seq_printf(seq, "Low (Low)\n"); + break; + case 5: + seq_printf(seq, "Low Warning (LoWarn)\n"); + break; + case 6: + seq_printf(seq, "High Warning (HiWarn)\n"); + break; + case 7: + seq_printf(seq, "High (High)\n"); + break; + case 8: + seq_printf(seq, "High Catastrophic (HiCat)\n"); + break; + } + + seq_printf(seq, "Event_enable : 0x%02X\n", result.event_enable); + seq_printf(seq, " [%s] Operational state change. \n", + (result.event_enable & 0x01) ? "+" : "-"); + seq_printf(seq, " [%s] Low catastrophic. \n", + (result.event_enable & 0x02) ? "+" : "-"); + seq_printf(seq, " [%s] Low reading. \n", + (result.event_enable & 0x04) ? "+" : "-"); + seq_printf(seq, " [%s] Low warning. \n", + (result.event_enable & 0x08) ? "+" : "-"); + seq_printf(seq, + " [%s] Change back to normal from out of range state. \n", + (result.event_enable & 0x10) ? "+" : "-"); + seq_printf(seq, " [%s] High warning. \n", + (result.event_enable & 0x20) ? "+" : "-"); + seq_printf(seq, " [%s] High reading. \n", + (result.event_enable & 0x40) ? "+" : "-"); + seq_printf(seq, " [%s] High catastrophic. \n", + (result.event_enable & 0x80) ? "+" : "-"); - len += sprintf(buf+len, "Sensor state : %d = ", result.sensor_state); - switch (result.sensor_state) - { - case 0: len += sprintf(buf+len, "Normal\n"); - break; - case 1: len += sprintf(buf+len, "Abnormal\n"); - break; - case 2: len += sprintf(buf+len, "Unknown\n"); - break; - case 3: len += sprintf(buf+len, "Low Catastrophic (LoCat)\n"); - break; - case 4: len += sprintf(buf+len, "Low (Low)\n"); - break; - case 5: len += sprintf(buf+len, "Low Warning (LoWarn)\n"); - break; - case 6: len += sprintf(buf+len, "High Warning (HiWarn)\n"); - break; - case 7: len += sprintf(buf+len, "High (High)\n"); - break; - case 8: len += sprintf(buf+len, "High Catastrophic (HiCat)\n"); - break; - } - - len += sprintf(buf+len, "Event_enable : 0x%02X\n", result.event_enable); - len += sprintf(buf+len, " [%s] Operational state change. \n", - (result.event_enable & 0x01) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] Low catastrophic. \n", - (result.event_enable & 0x02) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] Low reading. \n", - (result.event_enable & 0x04) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] Low warning. \n", - (result.event_enable & 0x08) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] Change back to normal from out of range state. \n", - (result.event_enable & 0x10) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] High warning. \n", - (result.event_enable & 0x20) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] High reading. \n", - (result.event_enable & 0x40) ? "+" : "-" ); - len += sprintf(buf+len, " [%s] High catastrophic. \n", - (result.event_enable & 0x80) ? "+" : "-" ); - - spin_unlock(&i2o_proc_lock); - return len; + return 0; } - -static int print_serial_number(char *buff, int pos, u8 *serialno, int max_len) +static int i2o_seq_open_hrt(struct inode *inode, struct file *file) { - int i; - - /* 19990419 -sralston - * The I2O v1.5 (and v2.0 so far) "official specification" - * got serial numbers WRONG! - * Apparently, and despite what Section 3.4.4 says and - * Figure 3-35 shows (pg 3-39 in the pdf doc), - * the convention / consensus seems to be: - * + First byte is SNFormat - * + Second byte is SNLen (but only if SNFormat==7 (?)) - * + (v2.0) SCSI+BS may use IEEE Registered (64 or 128 bit) format - */ - switch(serialno[0]) - { - case I2O_SNFORMAT_BINARY: /* Binary */ - pos += sprintf(buff+pos, "0x"); - for(i = 0; i < serialno[1]; i++) - { - pos += sprintf(buff+pos, "%02X", serialno[2+i]); - } - break; - - case I2O_SNFORMAT_ASCII: /* ASCII */ - if ( serialno[1] < ' ' ) /* printable or SNLen? */ - { - /* sanity */ - max_len = (max_len < serialno[1]) ? max_len : serialno[1]; - serialno[1+max_len] = '\0'; - - /* just print it */ - pos += sprintf(buff+pos, "%s", &serialno[2]); - } - else - { - /* print chars for specified length */ - for(i = 0; i < serialno[1]; i++) - { - pos += sprintf(buff+pos, "%c", serialno[2+i]); - } - } - break; - - case I2O_SNFORMAT_UNICODE: /* UNICODE */ - pos += sprintf(buff+pos, "UNICODE Format. Can't Display\n"); - break; - - case I2O_SNFORMAT_LAN48_MAC: /* LAN-48 MAC Address */ - pos += sprintf(buff+pos, - "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X", - serialno[2], serialno[3], - serialno[4], serialno[5], - serialno[6], serialno[7]); - break; - - case I2O_SNFORMAT_WAN: /* WAN MAC Address */ - /* FIXME: Figure out what a WAN access address looks like?? */ - pos += sprintf(buff+pos, "WAN Access Address"); - break; - -/* plus new in v2.0 */ - case I2O_SNFORMAT_LAN64_MAC: /* LAN-64 MAC Address */ - /* FIXME: Figure out what a LAN-64 address really looks like?? */ - pos += sprintf(buff+pos, - "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X", - serialno[8], serialno[9], - serialno[2], serialno[3], - serialno[4], serialno[5], - serialno[6], serialno[7]); - break; - - - case I2O_SNFORMAT_DDM: /* I2O DDM */ - pos += sprintf(buff+pos, - "DDM: Tid=%03Xh, Rsvd=%04Xh, OrgId=%04Xh", - *(u16*)&serialno[2], - *(u16*)&serialno[4], - *(u16*)&serialno[6]); - break; - - case I2O_SNFORMAT_IEEE_REG64: /* IEEE Registered (64-bit) */ - case I2O_SNFORMAT_IEEE_REG128: /* IEEE Registered (128-bit) */ - /* FIXME: Figure if this is even close?? */ - pos += sprintf(buff+pos, - "IEEE NodeName(hi,lo)=(%08Xh:%08Xh), PortName(hi,lo)=(%08Xh:%08Xh)\n", - *(u32*)&serialno[2], - *(u32*)&serialno[6], - *(u32*)&serialno[10], - *(u32*)&serialno[14]); - break; - - - case I2O_SNFORMAT_UNKNOWN: /* Unknown 0 */ - case I2O_SNFORMAT_UNKNOWN2: /* Unknown 0xff */ - default: - pos += sprintf(buff+pos, "Unknown data format (0x%02x)", - serialno[0]); - break; - } - - return pos; -} + return single_open(file, i2o_seq_show_hrt, PDE(inode)->data); +}; -const char * i2o_get_connector_type(int conn) +static int i2o_seq_open_lct(struct inode *inode, struct file *file) { - int idx = 16; - static char *i2o_connector_type[] = { - "OTHER", - "UNKNOWN", - "AUI", - "UTP", - "BNC", - "RJ45", - "STP DB9", - "FIBER MIC", - "APPLE AUI", - "MII", - "DB9", - "HSSDC", - "DUPLEX SC FIBER", - "DUPLEX ST FIBER", - "TNC/BNC", - "HW DEFAULT" - }; - - switch(conn) - { - case 0x00000000: - idx = 0; - break; - case 0x00000001: - idx = 1; - break; - case 0x00000002: - idx = 2; - break; - case 0x00000003: - idx = 3; - break; - case 0x00000004: - idx = 4; - break; - case 0x00000005: - idx = 5; - break; - case 0x00000006: - idx = 6; - break; - case 0x00000007: - idx = 7; - break; - case 0x00000008: - idx = 8; - break; - case 0x00000009: - idx = 9; - break; - case 0x0000000A: - idx = 10; - break; - case 0x0000000B: - idx = 11; - break; - case 0x0000000C: - idx = 12; - break; - case 0x0000000D: - idx = 13; - break; - case 0x0000000E: - idx = 14; - break; - case 0xFFFFFFFF: - idx = 15; - break; - } - - return i2o_connector_type[idx]; -} - + return single_open(file, i2o_seq_show_lct, PDE(inode)->data); +}; -const char * i2o_get_connection_type(int conn) +static int i2o_seq_open_status(struct inode *inode, struct file *file) { - int idx = 0; - static char *i2o_connection_type[] = { - "Unknown", - "AUI", - "10BASE5", - "FIORL", - "10BASE2", - "10BROAD36", - "10BASE-T", - "10BASE-FP", - "10BASE-FB", - "10BASE-FL", - "100BASE-TX", - "100BASE-FX", - "100BASE-T4", - "1000BASE-SX", - "1000BASE-LX", - "1000BASE-CX", - "1000BASE-T", - "100VG-ETHERNET", - "100VG-TOKEN RING", - "4MBIT TOKEN RING", - "16 Mb Token Ring", - "125 MBAUD FDDI", - "Point-to-point", - "Arbitrated loop", - "Public loop", - "Fabric", - "Emulation", - "Other", - "HW default" - }; - - switch(conn) - { - case I2O_LAN_UNKNOWN: - idx = 0; - break; - case I2O_LAN_AUI: - idx = 1; - break; - case I2O_LAN_10BASE5: - idx = 2; - break; - case I2O_LAN_FIORL: - idx = 3; - break; - case I2O_LAN_10BASE2: - idx = 4; - break; - case I2O_LAN_10BROAD36: - idx = 5; - break; - case I2O_LAN_10BASE_T: - idx = 6; - break; - case I2O_LAN_10BASE_FP: - idx = 7; - break; - case I2O_LAN_10BASE_FB: - idx = 8; - break; - case I2O_LAN_10BASE_FL: - idx = 9; - break; - case I2O_LAN_100BASE_TX: - idx = 10; - break; - case I2O_LAN_100BASE_FX: - idx = 11; - break; - case I2O_LAN_100BASE_T4: - idx = 12; - break; - case I2O_LAN_1000BASE_SX: - idx = 13; - break; - case I2O_LAN_1000BASE_LX: - idx = 14; - break; - case I2O_LAN_1000BASE_CX: - idx = 15; - break; - case I2O_LAN_1000BASE_T: - idx = 16; - break; - case I2O_LAN_100VG_ETHERNET: - idx = 17; - break; - case I2O_LAN_100VG_TR: - idx = 18; - break; - case I2O_LAN_4MBIT: - idx = 19; - break; - case I2O_LAN_16MBIT: - idx = 20; - break; - case I2O_LAN_125MBAUD: - idx = 21; - break; - case I2O_LAN_POINT_POINT: - idx = 22; - break; - case I2O_LAN_ARB_LOOP: - idx = 23; - break; - case I2O_LAN_PUBLIC_LOOP: - idx = 24; - break; - case I2O_LAN_FABRIC: - idx = 25; - break; - case I2O_LAN_EMULATION: - idx = 26; - break; - case I2O_LAN_OTHER: - idx = 27; - break; - case I2O_LAN_DEFAULT: - idx = 28; - break; - } - - return i2o_connection_type[idx]; -} - + return single_open(file, i2o_seq_show_status, PDE(inode)->data); +}; -/* LAN group 0000h - Device info (scalar) */ -int i2o_proc_read_lan_dev_info(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_hw(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[56]; - static u8 *work8 = (u8*)work32; - static u16 *work16 = (u16*)work32; - static u64 *work64 = (u64*)work32; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0000, -1, &work32, 56*4); - if (token < 0) { - len += i2o_report_query_status(buf+len, token, "0x0000 LAN Device Info"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "LAN Type : "); - switch (work16[0]) - { - case 0x0030: - len += sprintf(buf+len, "Ethernet, "); - break; - case 0x0040: - len += sprintf(buf+len, "100Base VG, "); - break; - case 0x0050: - len += sprintf(buf+len, "Token Ring, "); - break; - case 0x0060: - len += sprintf(buf+len, "FDDI, "); - break; - case 0x0070: - len += sprintf(buf+len, "Fibre Channel, "); - break; - default: - len += sprintf(buf+len, "Unknown type (0x%04x), ", work16[0]); - break; - } - - if (work16[1]&0x00000001) - len += sprintf(buf+len, "emulated LAN, "); - else - len += sprintf(buf+len, "physical LAN port, "); - - if (work16[1]&0x00000002) - len += sprintf(buf+len, "full duplex\n"); - else - len += sprintf(buf+len, "simplex\n"); - - len += sprintf(buf+len, "Address format : "); - switch(work8[4]) { - case 0x00: - len += sprintf(buf+len, "IEEE 48bit\n"); - break; - case 0x01: - len += sprintf(buf+len, "FC IEEE\n"); - break; - default: - len += sprintf(buf+len, "Unknown (0x%02x)\n", work8[4]); - break; - } - - len += sprintf(buf+len, "State : "); - switch(work8[5]) - { - case 0x00: - len += sprintf(buf+len, "Unknown\n"); - break; - case 0x01: - len += sprintf(buf+len, "Unclaimed\n"); - break; - case 0x02: - len += sprintf(buf+len, "Operational\n"); - break; - case 0x03: - len += sprintf(buf+len, "Suspended\n"); - break; - case 0x04: - len += sprintf(buf+len, "Resetting\n"); - break; - case 0x05: - len += sprintf(buf+len, "ERROR: "); - if(work16[3]&0x0001) - len += sprintf(buf+len, "TxCU inoperative "); - if(work16[3]&0x0002) - len += sprintf(buf+len, "RxCU inoperative "); - if(work16[3]&0x0004) - len += sprintf(buf+len, "Local mem alloc "); - len += sprintf(buf+len, "\n"); - break; - case 0x06: - len += sprintf(buf+len, "Operational no Rx\n"); - break; - case 0x07: - len += sprintf(buf+len, "Suspended no Rx\n"); - break; - default: - len += sprintf(buf+len, "Unspecified\n"); - break; - } - - len += sprintf(buf+len, "Min packet size : %d\n", work32[2]); - len += sprintf(buf+len, "Max packet size : %d\n", work32[3]); - len += sprintf(buf+len, "HW address : " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - work8[16],work8[17],work8[18],work8[19], - work8[20],work8[21],work8[22],work8[23]); - - len += sprintf(buf+len, "Max Tx wire speed : %d bps\n", (int)work64[3]); - len += sprintf(buf+len, "Max Rx wire speed : %d bps\n", (int)work64[4]); - - len += sprintf(buf+len, "Min SDU packet size : 0x%08x\n", work32[10]); - len += sprintf(buf+len, "Max SDU packet size : 0x%08x\n", work32[11]); - - spin_unlock(&i2o_proc_lock); - return len; -} + return single_open(file, i2o_seq_show_hw, PDE(inode)->data); +}; -/* LAN group 0001h - MAC address table (scalar) */ -int i2o_proc_read_lan_mac_addr(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_ddm_table(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[48]; - static u8 *work8 = (u8*)work32; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0001, -1, &work32, 48*4); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0001 LAN MAC Address"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "Active address : " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - work8[0],work8[1],work8[2],work8[3], - work8[4],work8[5],work8[6],work8[7]); - len += sprintf(buf+len, "Current address : " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - work8[8],work8[9],work8[10],work8[11], - work8[12],work8[13],work8[14],work8[15]); - len += sprintf(buf+len, "Functional address mask : " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - work8[16],work8[17],work8[18],work8[19], - work8[20],work8[21],work8[22],work8[23]); - - len += sprintf(buf+len,"HW/DDM capabilities : 0x%08x\n", work32[7]); - len += sprintf(buf+len," [%s] Unicast packets supported\n", - (work32[7]&0x00000001)?"+":"-"); - len += sprintf(buf+len," [%s] Promiscuous mode supported\n", - (work32[7]&0x00000002)?"+":"-"); - len += sprintf(buf+len," [%s] Promiscuous multicast mode supported\n", - (work32[7]&0x00000004)?"+":"-"); - len += sprintf(buf+len," [%s] Broadcast reception disabling supported\n", - (work32[7]&0x00000100)?"+":"-"); - len += sprintf(buf+len," [%s] Multicast reception disabling supported\n", - (work32[7]&0x00000200)?"+":"-"); - len += sprintf(buf+len," [%s] Functional address disabling supported\n", - (work32[7]&0x00000400)?"+":"-"); - len += sprintf(buf+len," [%s] MAC reporting supported\n", - (work32[7]&0x00000800)?"+":"-"); - - len += sprintf(buf+len,"Filter mask : 0x%08x\n", work32[6]); - len += sprintf(buf+len," [%s] Unicast packets disable\n", - (work32[6]&0x00000001)?"+":"-"); - len += sprintf(buf+len," [%s] Promiscuous mode enable\n", - (work32[6]&0x00000002)?"+":"-"); - len += sprintf(buf+len," [%s] Promiscuous multicast mode enable\n", - (work32[6]&0x00000004)?"+":"-"); - len += sprintf(buf+len," [%s] Broadcast packets disable\n", - (work32[6]&0x00000100)?"+":"-"); - len += sprintf(buf+len," [%s] Multicast packets disable\n", - (work32[6]&0x00000200)?"+":"-"); - len += sprintf(buf+len," [%s] Functional address disable\n", - (work32[6]&0x00000400)?"+":"-"); - - if (work32[7]&0x00000800) { - len += sprintf(buf+len, " MAC reporting mode : "); - if (work32[6]&0x00000800) - len += sprintf(buf+len, "Pass only priority MAC packets to user\n"); - else if (work32[6]&0x00001000) - len += sprintf(buf+len, "Pass all MAC packets to user\n"); - else if (work32[6]&0x00001800) - len += sprintf(buf+len, "Pass all MAC packets (promiscuous) to user\n"); - else - len += sprintf(buf+len, "Do not pass MAC packets to user\n"); - } - len += sprintf(buf+len, "Number of multicast addresses : %d\n", work32[8]); - len += sprintf(buf+len, "Perfect filtering for max %d multicast addresses\n", - work32[9]); - len += sprintf(buf+len, "Imperfect filtering for max %d multicast addresses\n", - work32[10]); - - spin_unlock(&i2o_proc_lock); - - return len; -} + return single_open(file, i2o_seq_show_ddm_table, PDE(inode)->data); +}; -/* LAN group 0002h - Multicast MAC address table (table) */ -int i2o_proc_read_lan_mcast_addr(char *buf, char **start, off_t offset, - int len, int *eof, void *data) +static int i2o_seq_open_driver_store(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - int token; - int i; - u8 mc_addr[8]; - - struct - { - u16 result_count; - u16 pad; - u16 block_size; - u8 block_status; - u8 error_info_size; - u16 row_count; - u16 more_flag; - u8 mc_addr[256][8]; - } *result; - - result = kmalloc(sizeof(*result), GFP_KERNEL); - if(!result) - return -ENOMEM; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, 0x0002, -1, - NULL, 0, result, sizeof(*result)); - - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x002 LAN Multicast MAC Address"); - goto out; - } - - for (i = 0; i < result->row_count; i++) - { - memcpy(mc_addr, result->mc_addr[i], 8); - - len += sprintf(buf+len, "MC MAC address[%d]: " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - i, mc_addr[0], mc_addr[1], mc_addr[2], - mc_addr[3], mc_addr[4], mc_addr[5], - mc_addr[6], mc_addr[7]); - } -out: - spin_unlock(&i2o_proc_lock); - kfree(result); - return len; -} + return single_open(file, i2o_seq_show_driver_store, PDE(inode)->data); +}; -/* LAN group 0003h - Batch Control (scalar) */ -int i2o_proc_read_lan_batch_control(char *buf, char **start, off_t offset, - int len, int *eof, void *data) +static int i2o_seq_open_drivers_stored(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[9]; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0003, -1, &work32, 9*4); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0003 LAN Batch Control"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "Batch mode "); - if (work32[0]&0x00000001) - len += sprintf(buf+len, "disabled"); - else - len += sprintf(buf+len, "enabled"); - if (work32[0]&0x00000002) - len += sprintf(buf+len, " (current setting)"); - if (work32[0]&0x00000004) - len += sprintf(buf+len, ", forced"); - else - len += sprintf(buf+len, ", toggle"); - len += sprintf(buf+len, "\n"); - - len += sprintf(buf+len, "Max Rx batch count : %d\n", work32[5]); - len += sprintf(buf+len, "Max Rx batch delay : %d\n", work32[6]); - len += sprintf(buf+len, "Max Tx batch delay : %d\n", work32[7]); - len += sprintf(buf+len, "Max Tx batch count : %d\n", work32[8]); - - spin_unlock(&i2o_proc_lock); - return len; -} + return single_open(file, i2o_seq_show_drivers_stored, PDE(inode)->data); +}; -/* LAN group 0004h - LAN Operation (scalar) */ -int i2o_proc_read_lan_operation(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_groups(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[5]; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; + return single_open(file, i2o_seq_show_groups, PDE(inode)->data); +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0004, -1, &work32, 20); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0004 LAN Operation"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "Packet prepadding (32b words) : %d\n", work32[0]); - len += sprintf(buf+len, "Transmission error reporting : %s\n", - (work32[1]&1)?"on":"off"); - len += sprintf(buf+len, "Bad packet handling : %s\n", - (work32[1]&0x2)?"by host":"by DDM"); - len += sprintf(buf+len, "Packet orphan limit : %d\n", work32[2]); - - len += sprintf(buf+len, "Tx modes : 0x%08x\n", work32[3]); - len += sprintf(buf+len, " [%s] HW CRC suppression\n", - (work32[3]&0x00000004) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW IPv4 checksum\n", - (work32[3]&0x00000100) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW TCP checksum\n", - (work32[3]&0x00000200) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW UDP checksum\n", - (work32[3]&0x00000400) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW RSVP checksum\n", - (work32[3]&0x00000800) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW ICMP checksum\n", - (work32[3]&0x00001000) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Loopback suppression enable\n", - (work32[3]&0x00002000) ? "+" : "-"); - - len += sprintf(buf+len, "Rx modes : 0x%08x\n", work32[4]); - len += sprintf(buf+len, " [%s] FCS in payload\n", - (work32[4]&0x00000004) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW IPv4 checksum validation\n", - (work32[4]&0x00000100) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW TCP checksum validation\n", - (work32[4]&0x00000200) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW UDP checksum validation\n", - (work32[4]&0x00000400) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW RSVP checksum validation\n", - (work32[4]&0x00000800) ? "+" : "-"); - len += sprintf(buf+len, " [%s] HW ICMP checksum validation\n", - (work32[4]&0x00001000) ? "+" : "-"); - - spin_unlock(&i2o_proc_lock); - return len; -} - -/* LAN group 0005h - Media operation (scalar) */ -int i2o_proc_read_lan_media_operation(char *buf, char **start, off_t offset, - int len, int *eof, void *data) +static int i2o_seq_open_phys_device(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - int token; - - struct - { - u32 connector_type; - u32 connection_type; - u64 current_tx_wire_speed; - u64 current_rx_wire_speed; - u8 duplex_mode; - u8 link_status; - u8 reserved; - u8 duplex_mode_target; - u32 connector_type_target; - u32 connection_type_target; - } result; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0005, -1, &result, sizeof(result)); - if (token < 0) { - len += i2o_report_query_status(buf+len, token, "0x0005 LAN Media Operation"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "Connector type : %s\n", - i2o_get_connector_type(result.connector_type)); - len += sprintf(buf+len, "Connection type : %s\n", - i2o_get_connection_type(result.connection_type)); - - len += sprintf(buf+len, "Current Tx wire speed : %d bps\n", (int)result.current_tx_wire_speed); - len += sprintf(buf+len, "Current Rx wire speed : %d bps\n", (int)result.current_rx_wire_speed); - len += sprintf(buf+len, "Duplex mode : %s duplex\n", - (result.duplex_mode)?"Full":"Half"); - - len += sprintf(buf+len, "Link status : "); - switch (result.link_status) - { - case 0x00: - len += sprintf(buf+len, "Unknown\n"); - break; - case 0x01: - len += sprintf(buf+len, "Normal\n"); - break; - case 0x02: - len += sprintf(buf+len, "Failure\n"); - break; - case 0x03: - len += sprintf(buf+len, "Reset\n"); - break; - default: - len += sprintf(buf+len, "Unspecified\n"); - } - - len += sprintf(buf+len, "Duplex mode target : "); - switch (result.duplex_mode_target){ - case 0: - len += sprintf(buf+len, "Half duplex\n"); - break; - case 1: - len += sprintf(buf+len, "Full duplex\n"); - break; - default: - len += sprintf(buf+len, "\n"); - } - - len += sprintf(buf+len, "Connector type target : %s\n", - i2o_get_connector_type(result.connector_type_target)); - len += sprintf(buf+len, "Connection type target : %s\n", - i2o_get_connection_type(result.connection_type_target)); - - spin_unlock(&i2o_proc_lock); - return len; -} + return single_open(file, i2o_seq_show_phys_device, PDE(inode)->data); +}; -/* LAN group 0006h - Alternate address (table) (optional) */ -int i2o_proc_read_lan_alt_addr(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_claimed(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - int token; - int i; - u8 alt_addr[8]; - struct - { - u16 result_count; - u16 pad; - u16 block_size; - u8 block_status; - u8 error_info_size; - u16 row_count; - u16 more_flag; - u8 alt_addr[256][8]; - } *result; - - result = kmalloc(sizeof(*result), GFP_KERNEL); - if(!result) - return -ENOMEM; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_table(I2O_PARAMS_TABLE_GET, - d->controller, d->lct_data.tid, - 0x0006, -1, NULL, 0, result, sizeof(*result)); - - if (token < 0) { - len += i2o_report_query_status(buf+len, token, "0x0006 LAN Alternate Address (optional)"); - goto out; - } - - for (i=0; i < result->row_count; i++) - { - memcpy(alt_addr,result->alt_addr[i],8); - len += sprintf(buf+len, "Alternate address[%d]: " - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", - i, alt_addr[0], alt_addr[1], alt_addr[2], - alt_addr[3], alt_addr[4], alt_addr[5], - alt_addr[6], alt_addr[7]); - } -out: - spin_unlock(&i2o_proc_lock); - kfree(result); - return len; -} - + return single_open(file, i2o_seq_show_claimed, PDE(inode)->data); +}; -/* LAN group 0007h - Transmit info (scalar) */ -int i2o_proc_read_lan_tx_info(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_users(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[8]; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; + return single_open(file, i2o_seq_show_users, PDE(inode)->data); +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0007, -1, &work32, 8*4); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0007 LAN Transmit Info"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "Tx Max SG elements per packet : %d\n", work32[0]); - len += sprintf(buf+len, "Tx Max SG elements per chain : %d\n", work32[1]); - len += sprintf(buf+len, "Tx Max outstanding packets : %d\n", work32[2]); - len += sprintf(buf+len, "Tx Max packets per request : %d\n", work32[3]); - - len += sprintf(buf+len, "Tx modes : 0x%08x\n", work32[4]); - len += sprintf(buf+len, " [%s] No DA in SGL\n", - (work32[4]&0x00000002) ? "+" : "-"); - len += sprintf(buf+len, " [%s] CRC suppression\n", - (work32[4]&0x00000004) ? "+" : "-"); - len += sprintf(buf+len, " [%s] MAC insertion\n", - (work32[4]&0x00000010) ? "+" : "-"); - len += sprintf(buf+len, " [%s] RIF insertion\n", - (work32[4]&0x00000020) ? "+" : "-"); - len += sprintf(buf+len, " [%s] IPv4 checksum generation\n", - (work32[4]&0x00000100) ? "+" : "-"); - len += sprintf(buf+len, " [%s] TCP checksum generation\n", - (work32[4]&0x00000200) ? "+" : "-"); - len += sprintf(buf+len, " [%s] UDP checksum generation\n", - (work32[4]&0x00000400) ? "+" : "-"); - len += sprintf(buf+len, " [%s] RSVP checksum generation\n", - (work32[4]&0x00000800) ? "+" : "-"); - len += sprintf(buf+len, " [%s] ICMP checksum generation\n", - (work32[4]&0x00001000) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Loopback enabled\n", - (work32[4]&0x00010000) ? "+" : "-"); - len += sprintf(buf+len, " [%s] Loopback suppression enabled\n", - (work32[4]&0x00020000) ? "+" : "-"); - - spin_unlock(&i2o_proc_lock); - return len; -} - -/* LAN group 0008h - Receive info (scalar) */ -int i2o_proc_read_lan_rx_info(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_priv_msgs(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - static u32 work32[8]; - int token; - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0008, -1, &work32, 8*4); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0008 LAN Receive Info"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf ,"Rx Max size of chain element : %d\n", work32[0]); - len += sprintf(buf+len, "Rx Max Buckets : %d\n", work32[1]); - len += sprintf(buf+len, "Rx Max Buckets in Reply : %d\n", work32[3]); - len += sprintf(buf+len, "Rx Max Packets in Bucket : %d\n", work32[4]); - len += sprintf(buf+len, "Rx Max Buckets in Post : %d\n", work32[5]); - - len += sprintf(buf+len, "Rx Modes : 0x%08x\n", work32[2]); - len += sprintf(buf+len, " [%s] FCS reception\n", - (work32[2]&0x00000004) ? "+" : "-"); - len += sprintf(buf+len, " [%s] IPv4 checksum validation \n", - (work32[2]&0x00000100) ? "+" : "-"); - len += sprintf(buf+len, " [%s] TCP checksum validation \n", - (work32[2]&0x00000200) ? "+" : "-"); - len += sprintf(buf+len, " [%s] UDP checksum validation \n", - (work32[2]&0x00000400) ? "+" : "-"); - len += sprintf(buf+len, " [%s] RSVP checksum validation \n", - (work32[2]&0x00000800) ? "+" : "-"); - len += sprintf(buf+len, " [%s] ICMP checksum validation \n", - (work32[2]&0x00001000) ? "+" : "-"); - - spin_unlock(&i2o_proc_lock); - return len; -} - -static int i2o_report_opt_field(char *buf, char *field_name, - int field_nbr, int supp_fields, u64 *value) -{ - if (supp_fields & (1 << field_nbr)) - return sprintf(buf, "%-24s : " FMT_U64_HEX "\n", field_name, U64_VAL(value)); - else - return sprintf(buf, "%-24s : Not supported\n", field_name); -} - -/* LAN group 0100h - LAN Historical statistics (scalar) */ -/* LAN group 0180h - Supported Optional Historical Statistics (scalar) */ -/* LAN group 0182h - Optional Non Media Specific Transmit Historical Statistics (scalar) */ -/* LAN group 0183h - Optional Non Media Specific Receive Historical Statistics (scalar) */ + return single_open(file, i2o_seq_show_priv_msgs, PDE(inode)->data); +}; -int i2o_proc_read_lan_hist_stats(char *buf, char **start, off_t offset, int len, - int *eof, void *data) +static int i2o_seq_open_authorized_users(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - int token; - - struct - { - u64 tx_packets; - u64 tx_bytes; - u64 rx_packets; - u64 rx_bytes; - u64 tx_errors; - u64 rx_errors; - u64 rx_dropped; - u64 adapter_resets; - u64 adapter_suspends; - } stats; // 0x0100 - - static u64 supp_groups[4]; // 0x0180 - - struct - { - u64 tx_retries; - u64 tx_directed_bytes; - u64 tx_directed_packets; - u64 tx_multicast_bytes; - u64 tx_multicast_packets; - u64 tx_broadcast_bytes; - u64 tx_broadcast_packets; - u64 tx_group_addr_packets; - u64 tx_short_packets; - } tx_stats; // 0x0182 - - struct - { - u64 rx_crc_errors; - u64 rx_directed_bytes; - u64 rx_directed_packets; - u64 rx_multicast_bytes; - u64 rx_multicast_packets; - u64 rx_broadcast_bytes; - u64 rx_broadcast_packets; - u64 rx_group_addr_packets; - u64 rx_short_packets; - u64 rx_long_packets; - u64 rx_runt_packets; - } rx_stats; // 0x0183 - - struct - { - u64 ipv4_generate; - u64 ipv4_validate_success; - u64 ipv4_validate_errors; - u64 tcp_generate; - u64 tcp_validate_success; - u64 tcp_validate_errors; - u64 udp_generate; - u64 udp_validate_success; - u64 udp_validate_errors; - u64 rsvp_generate; - u64 rsvp_validate_success; - u64 rsvp_validate_errors; - u64 icmp_generate; - u64 icmp_validate_success; - u64 icmp_validate_errors; - } chksum_stats; // 0x0184 - - spin_lock(&i2o_proc_lock); - len = 0; - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0100, -1, &stats, sizeof(stats)); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x100 LAN Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf+len, "Tx packets : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_packets)); - len += sprintf(buf+len, "Tx bytes : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_bytes)); - len += sprintf(buf+len, "Rx packets : " FMT_U64_HEX "\n", - U64_VAL(&stats.rx_packets)); - len += sprintf(buf+len, "Rx bytes : " FMT_U64_HEX "\n", - U64_VAL(&stats.rx_bytes)); - len += sprintf(buf+len, "Tx errors : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_errors)); - len += sprintf(buf+len, "Rx errors : " FMT_U64_HEX "\n", - U64_VAL(&stats.rx_errors)); - len += sprintf(buf+len, "Rx dropped : " FMT_U64_HEX "\n", - U64_VAL(&stats.rx_dropped)); - len += sprintf(buf+len, "Adapter resets : " FMT_U64_HEX "\n", - U64_VAL(&stats.adapter_resets)); - len += sprintf(buf+len, "Adapter suspends : " FMT_U64_HEX "\n", - U64_VAL(&stats.adapter_suspends)); - - /* Optional statistics follows */ - /* Get 0x0180 to see which optional groups/fields are supported */ - - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0180, -1, &supp_groups, sizeof(supp_groups)); - - if (token < 0) { - len += i2o_report_query_status(buf+len, token, "0x180 LAN Supported Optional Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - if (supp_groups[1]) /* 0x0182 */ - { - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0182, -1, &tx_stats, sizeof(tx_stats)); - - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x182 LAN Optional Tx Historical Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf+len, "==== Optional TX statistics (group 0182h)\n"); - - len += i2o_report_opt_field(buf+len, "Tx RetryCount", - 0, supp_groups[1], &tx_stats.tx_retries); - len += i2o_report_opt_field(buf+len, "Tx DirectedBytes", - 1, supp_groups[1], &tx_stats.tx_directed_bytes); - len += i2o_report_opt_field(buf+len, "Tx DirectedPackets", - 2, supp_groups[1], &tx_stats.tx_directed_packets); - len += i2o_report_opt_field(buf+len, "Tx MulticastBytes", - 3, supp_groups[1], &tx_stats.tx_multicast_bytes); - len += i2o_report_opt_field(buf+len, "Tx MulticastPackets", - 4, supp_groups[1], &tx_stats.tx_multicast_packets); - len += i2o_report_opt_field(buf+len, "Tx BroadcastBytes", - 5, supp_groups[1], &tx_stats.tx_broadcast_bytes); - len += i2o_report_opt_field(buf+len, "Tx BroadcastPackets", - 6, supp_groups[1], &tx_stats.tx_broadcast_packets); - len += i2o_report_opt_field(buf+len, "Tx TotalGroupAddrPackets", - 7, supp_groups[1], &tx_stats.tx_group_addr_packets); - len += i2o_report_opt_field(buf+len, "Tx TotalPacketsTooShort", - 8, supp_groups[1], &tx_stats.tx_short_packets); - } - - if (supp_groups[2]) /* 0x0183 */ - { - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0183, -1, &rx_stats, sizeof(rx_stats)); - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x183 LAN Optional Rx Historical Stats"); - spin_unlock(&i2o_proc_lock); - return len; - } + return single_open(file, i2o_seq_show_authorized_users, + PDE(inode)->data); +}; - len += sprintf(buf+len, "==== Optional RX statistics (group 0183h)\n"); +static int i2o_seq_open_dev_identity(struct inode *inode, struct file *file) +{ + return single_open(file, i2o_seq_show_dev_identity, PDE(inode)->data); +}; - len += i2o_report_opt_field(buf+len, "Rx CRCErrorCount", - 0, supp_groups[2], &rx_stats.rx_crc_errors); - len += i2o_report_opt_field(buf+len, "Rx DirectedBytes", - 1, supp_groups[2], &rx_stats.rx_directed_bytes); - len += i2o_report_opt_field(buf+len, "Rx DirectedPackets", - 2, supp_groups[2], &rx_stats.rx_directed_packets); - len += i2o_report_opt_field(buf+len, "Rx MulticastBytes", - 3, supp_groups[2], &rx_stats.rx_multicast_bytes); - len += i2o_report_opt_field(buf+len, "Rx MulticastPackets", - 4, supp_groups[2], &rx_stats.rx_multicast_packets); - len += i2o_report_opt_field(buf+len, "Rx BroadcastBytes", - 5, supp_groups[2], &rx_stats.rx_broadcast_bytes); - len += i2o_report_opt_field(buf+len, "Rx BroadcastPackets", - 6, supp_groups[2], &rx_stats.rx_broadcast_packets); - len += i2o_report_opt_field(buf+len, "Rx TotalGroupAddrPackets", - 7, supp_groups[2], &rx_stats.rx_group_addr_packets); - len += i2o_report_opt_field(buf+len, "Rx TotalPacketsTooShort", - 8, supp_groups[2], &rx_stats.rx_short_packets); - len += i2o_report_opt_field(buf+len, "Rx TotalPacketsTooLong", - 9, supp_groups[2], &rx_stats.rx_long_packets); - len += i2o_report_opt_field(buf+len, "Rx TotalPacketsRunt", - 10, supp_groups[2], &rx_stats.rx_runt_packets); - } - - if (supp_groups[3]) /* 0x0184 */ - { - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0184, -1, &chksum_stats, sizeof(chksum_stats)); +static int i2o_seq_open_ddm_identity(struct inode *inode, struct file *file) +{ + return single_open(file, i2o_seq_show_ddm_identity, PDE(inode)->data); +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x184 LAN Optional Chksum Historical Stats"); - spin_unlock(&i2o_proc_lock); - return len; - } +static int i2o_seq_open_uinfo(struct inode *inode, struct file *file) +{ + return single_open(file, i2o_seq_show_uinfo, PDE(inode)->data); +}; - len += sprintf(buf+len, "==== Optional CHKSUM statistics (group 0x0184)\n"); +static int i2o_seq_open_sgl_limits(struct inode *inode, struct file *file) +{ + return single_open(file, i2o_seq_show_sgl_limits, PDE(inode)->data); +}; - len += i2o_report_opt_field(buf+len, "IPv4 Generate", - 0, supp_groups[3], &chksum_stats.ipv4_generate); - len += i2o_report_opt_field(buf+len, "IPv4 ValidateSuccess", - 1, supp_groups[3], &chksum_stats.ipv4_validate_success); - len += i2o_report_opt_field(buf+len, "IPv4 ValidateError", - 2, supp_groups[3], &chksum_stats.ipv4_validate_errors); - len += i2o_report_opt_field(buf+len, "TCP Generate", - 3, supp_groups[3], &chksum_stats.tcp_generate); - len += i2o_report_opt_field(buf+len, "TCP ValidateSuccess", - 4, supp_groups[3], &chksum_stats.tcp_validate_success); - len += i2o_report_opt_field(buf+len, "TCP ValidateError", - 5, supp_groups[3], &chksum_stats.tcp_validate_errors); - len += i2o_report_opt_field(buf+len, "UDP Generate", - 6, supp_groups[3], &chksum_stats.udp_generate); - len += i2o_report_opt_field(buf+len, "UDP ValidateSuccess", - 7, supp_groups[3], &chksum_stats.udp_validate_success); - len += i2o_report_opt_field(buf+len, "UDP ValidateError", - 8, supp_groups[3], &chksum_stats.udp_validate_errors); - len += i2o_report_opt_field(buf+len, "RSVP Generate", - 9, supp_groups[3], &chksum_stats.rsvp_generate); - len += i2o_report_opt_field(buf+len, "RSVP ValidateSuccess", - 10, supp_groups[3], &chksum_stats.rsvp_validate_success); - len += i2o_report_opt_field(buf+len, "RSVP ValidateError", - 11, supp_groups[3], &chksum_stats.rsvp_validate_errors); - len += i2o_report_opt_field(buf+len, "ICMP Generate", - 12, supp_groups[3], &chksum_stats.icmp_generate); - len += i2o_report_opt_field(buf+len, "ICMP ValidateSuccess", - 13, supp_groups[3], &chksum_stats.icmp_validate_success); - len += i2o_report_opt_field(buf+len, "ICMP ValidateError", - 14, supp_groups[3], &chksum_stats.icmp_validate_errors); - } - - spin_unlock(&i2o_proc_lock); - return len; -} - -/* LAN group 0200h - Required Ethernet Statistics (scalar) */ -/* LAN group 0280h - Optional Ethernet Statistics Supported (scalar) */ -/* LAN group 0281h - Optional Ethernet Historical Statistics (scalar) */ -int i2o_proc_read_lan_eth_stats(char *buf, char **start, off_t offset, - int len, int *eof, void *data) +static int i2o_seq_open_sensors(struct inode *inode, struct file *file) { - struct i2o_device *d = (struct i2o_device*)data; - int token; + return single_open(file, i2o_seq_show_sensors, PDE(inode)->data); +}; - struct - { - u64 rx_align_errors; - u64 tx_one_collisions; - u64 tx_multiple_collisions; - u64 tx_deferred; - u64 tx_late_collisions; - u64 tx_max_collisions; - u64 tx_carrier_lost; - u64 tx_excessive_deferrals; - } stats; +static int i2o_seq_open_dev_name(struct inode *inode, struct file *file) +{ + return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data); +}; - static u64 supp_fields; - struct - { - u64 rx_overrun; - u64 tx_underrun; - u64 tx_heartbeat_failure; - } hist_stats; +static struct file_operations i2o_seq_fops_lct = { + .open = i2o_seq_open_lct, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - spin_lock(&i2o_proc_lock); - len = 0; +static struct file_operations i2o_seq_fops_hrt = { + .open = i2o_seq_open_hrt, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0200, -1, &stats, sizeof(stats)); +static struct file_operations i2o_seq_fops_status = { + .open = i2o_seq_open_status, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0200 LAN Ethernet Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf+len, "Rx alignment errors : " FMT_U64_HEX "\n", - U64_VAL(&stats.rx_align_errors)); - len += sprintf(buf+len, "Tx one collisions : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_one_collisions)); - len += sprintf(buf+len, "Tx multicollisions : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_multiple_collisions)); - len += sprintf(buf+len, "Tx deferred : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_deferred)); - len += sprintf(buf+len, "Tx late collisions : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_late_collisions)); - len += sprintf(buf+len, "Tx max collisions : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_max_collisions)); - len += sprintf(buf+len, "Tx carrier lost : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_carrier_lost)); - len += sprintf(buf+len, "Tx excessive deferrals : " FMT_U64_HEX "\n", - U64_VAL(&stats.tx_excessive_deferrals)); +static struct file_operations i2o_seq_fops_hw = { + .open = i2o_seq_open_hw, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - /* Optional Ethernet statistics follows */ - /* Get 0x0280 to see which optional fields are supported */ +static struct file_operations i2o_seq_fops_ddm_table = { + .open = i2o_seq_open_ddm_table, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0280, -1, &supp_fields, sizeof(supp_fields)); +static struct file_operations i2o_seq_fops_driver_store = { + .open = i2o_seq_open_driver_store, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0280 LAN Supported Optional Ethernet Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } +static struct file_operations i2o_seq_fops_drivers_stored = { + .open = i2o_seq_open_drivers_stored, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - if (supp_fields) /* 0x0281 */ - { - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0281, -1, &stats, sizeof(stats)); +static struct file_operations i2o_seq_fops_groups = { + .open = i2o_seq_open_groups, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0281 LAN Optional Ethernet Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } +static struct file_operations i2o_seq_fops_phys_device = { + .open = i2o_seq_open_phys_device, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - len += sprintf(buf+len, "==== Optional ETHERNET statistics (group 0x0281)\n"); +static struct file_operations i2o_seq_fops_claimed = { + .open = i2o_seq_open_claimed, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - len += i2o_report_opt_field(buf+len, "Rx Overrun", - 0, supp_fields, &hist_stats.rx_overrun); - len += i2o_report_opt_field(buf+len, "Tx Underrun", - 1, supp_fields, &hist_stats.tx_underrun); - len += i2o_report_opt_field(buf+len, "Tx HeartbeatFailure", - 2, supp_fields, &hist_stats.tx_heartbeat_failure); - } +static struct file_operations i2o_seq_fops_users = { + .open = i2o_seq_open_users, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - spin_unlock(&i2o_proc_lock); - return len; -} +static struct file_operations i2o_seq_fops_priv_msgs = { + .open = i2o_seq_open_priv_msgs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; -/* LAN group 0300h - Required Token Ring Statistics (scalar) */ -/* LAN group 0380h, 0381h - Optional Statistics not yet defined (TODO) */ -int i2o_proc_read_lan_tr_stats(char *buf, char **start, off_t offset, - int len, int *eof, void *data) -{ - struct i2o_device *d = (struct i2o_device*)data; - static u64 work64[13]; - int token; +static struct file_operations i2o_seq_fops_authorized_users = { + .open = i2o_seq_open_authorized_users, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - static char *ring_status[] = - { - "", - "", - "", - "", - "", - "Ring Recovery", - "Single Station", - "Counter Overflow", - "Remove Received", - "", - "Auto-Removal Error 1", - "Lobe Wire Fault", - "Transmit Beacon", - "Soft Error", - "Hard Error", - "Signal Loss" - }; +static struct file_operations i2o_seq_fops_dev_name = { + .open = i2o_seq_open_dev_name, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - spin_lock(&i2o_proc_lock); - len = 0; +static struct file_operations i2o_seq_fops_dev_identity = { + .open = i2o_seq_open_dev_identity, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0300, -1, &work64, sizeof(work64)); +static struct file_operations i2o_seq_fops_ddm_identity = { + .open = i2o_seq_open_ddm_identity, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0300 Token Ring Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf, "LineErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[0])); - len += sprintf(buf+len, "LostFrames : " FMT_U64_HEX "\n", - U64_VAL(&work64[1])); - len += sprintf(buf+len, "ACError : " FMT_U64_HEX "\n", - U64_VAL(&work64[2])); - len += sprintf(buf+len, "TxAbortDelimiter : " FMT_U64_HEX "\n", - U64_VAL(&work64[3])); - len += sprintf(buf+len, "BursErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[4])); - len += sprintf(buf+len, "FrameCopiedErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[5])); - len += sprintf(buf+len, "FrequencyErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[6])); - len += sprintf(buf+len, "InternalErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[7])); - len += sprintf(buf+len, "LastRingStatus : %s\n", ring_status[work64[8]]); - len += sprintf(buf+len, "TokenError : " FMT_U64_HEX "\n", - U64_VAL(&work64[9])); - len += sprintf(buf+len, "UpstreamNodeAddress : " FMT_U64_HEX "\n", - U64_VAL(&work64[10])); - len += sprintf(buf+len, "LastRingID : " FMT_U64_HEX "\n", - U64_VAL(&work64[11])); - len += sprintf(buf+len, "LastBeaconType : " FMT_U64_HEX "\n", - U64_VAL(&work64[12])); - - spin_unlock(&i2o_proc_lock); - return len; -} - -/* LAN group 0400h - Required FDDI Statistics (scalar) */ -/* LAN group 0480h, 0481h - Optional Statistics, not yet defined (TODO) */ -int i2o_proc_read_lan_fddi_stats(char *buf, char **start, off_t offset, - int len, int *eof, void *data) -{ - struct i2o_device *d = (struct i2o_device*)data; - static u64 work64[11]; - int token; +static struct file_operations i2o_seq_fops_uinfo = { + .open = i2o_seq_open_uinfo, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - static char *conf_state[] = - { - "Isolated", - "Local a", - "Local b", - "Local ab", - "Local s", - "Wrap a", - "Wrap b", - "Wrap ab", - "Wrap s", - "C-Wrap a", - "C-Wrap b", - "C-Wrap s", - "Through", - }; +static struct file_operations i2o_seq_fops_sgl_limits = { + .open = i2o_seq_open_sgl_limits, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - static char *ring_state[] = - { - "Isolated", - "Non-op", - "Rind-op", - "Detect", - "Non-op-Dup", - "Ring-op-Dup", - "Directed", - "Trace" - }; +static struct file_operations i2o_seq_fops_sensors = { + .open = i2o_seq_open_sensors, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; - static char *link_state[] = - { - "Off", - "Break", - "Trace", - "Connect", - "Next", - "Signal", - "Join", - "Verify", - "Active", - "Maintenance" - }; +/* + * IOP specific entries...write field just in case someone + * ever wants one. + */ +static i2o_proc_entry i2o_proc_generic_iop_entries[] = { + {"hrt", S_IFREG | S_IRUGO, &i2o_seq_fops_hrt}, + {"lct", S_IFREG | S_IRUGO, &i2o_seq_fops_lct}, + {"status", S_IFREG | S_IRUGO, &i2o_seq_fops_status}, + {"hw", S_IFREG | S_IRUGO, &i2o_seq_fops_hw}, + {"ddm_table", S_IFREG | S_IRUGO, &i2o_seq_fops_ddm_table}, + {"driver_store", S_IFREG | S_IRUGO, &i2o_seq_fops_driver_store}, + {"drivers_stored", S_IFREG | S_IRUGO, &i2o_seq_fops_drivers_stored}, + {NULL, 0, NULL} +}; - spin_lock(&i2o_proc_lock); - len = 0; +/* + * Device specific entries + */ +static i2o_proc_entry generic_dev_entries[] = { + {"groups", S_IFREG | S_IRUGO, &i2o_seq_fops_groups}, + {"phys_dev", S_IFREG | S_IRUGO, &i2o_seq_fops_phys_device}, + {"claimed", S_IFREG | S_IRUGO, &i2o_seq_fops_claimed}, + {"users", S_IFREG | S_IRUGO, &i2o_seq_fops_users}, + {"priv_msgs", S_IFREG | S_IRUGO, &i2o_seq_fops_priv_msgs}, + {"authorized_users", S_IFREG | S_IRUGO, &i2o_seq_fops_authorized_users}, + {"dev_identity", S_IFREG | S_IRUGO, &i2o_seq_fops_dev_identity}, + {"ddm_identity", S_IFREG | S_IRUGO, &i2o_seq_fops_ddm_identity}, + {"user_info", S_IFREG | S_IRUGO, &i2o_seq_fops_uinfo}, + {"sgl_limits", S_IFREG | S_IRUGO, &i2o_seq_fops_sgl_limits}, + {"sensors", S_IFREG | S_IRUGO, &i2o_seq_fops_sensors}, + {NULL, 0, NULL} +}; - token = i2o_query_scalar(d->controller, d->lct_data.tid, - 0x0400, -1, &work64, sizeof(work64)); +/* + * Storage unit specific entries (SCSI Periph, BS) with device names + */ +static i2o_proc_entry rbs_dev_entries[] = { + {"dev_name", S_IFREG | S_IRUGO, &i2o_seq_fops_dev_name}, + {NULL, 0, NULL} +}; - if (token < 0) { - len += i2o_report_query_status(buf+len, token,"0x0400 FDDI Required Statistics"); - spin_unlock(&i2o_proc_lock); - return len; - } - - len += sprintf(buf+len, "ConfigurationState : %s\n", conf_state[work64[0]]); - len += sprintf(buf+len, "UpstreamNode : " FMT_U64_HEX "\n", - U64_VAL(&work64[1])); - len += sprintf(buf+len, "DownStreamNode : " FMT_U64_HEX "\n", - U64_VAL(&work64[2])); - len += sprintf(buf+len, "FrameErrors : " FMT_U64_HEX "\n", - U64_VAL(&work64[3])); - len += sprintf(buf+len, "FramesLost : " FMT_U64_HEX "\n", - U64_VAL(&work64[4])); - len += sprintf(buf+len, "RingMgmtState : %s\n", ring_state[work64[5]]); - len += sprintf(buf+len, "LCTFailures : " FMT_U64_HEX "\n", - U64_VAL(&work64[6])); - len += sprintf(buf+len, "LEMRejects : " FMT_U64_HEX "\n", - U64_VAL(&work64[7])); - len += sprintf(buf+len, "LEMCount : " FMT_U64_HEX "\n", - U64_VAL(&work64[8])); - len += sprintf(buf+len, "LConnectionState : %s\n", - link_state[work64[9]]); - - spin_unlock(&i2o_proc_lock); - return len; -} - -static int i2o_proc_create_entries(void *data, i2o_proc_entry *pentry, - struct proc_dir_entry *parent) -{ - struct proc_dir_entry *ent; - - while(pentry->name != NULL) - { - ent = create_proc_entry(pentry->name, pentry->mode, parent); - if(!ent) return -1; +/** + * i2o_proc_create_entries - Creates proc dir entries + * @dir: proc dir entry under which the entries should be placed + * @i2o_pe: pointer to the entries which should be added + * @data: pointer to I2O controller or device + * + * Create proc dir entries for a I2O controller or I2O device. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_proc_create_entries(struct proc_dir_entry *dir, + i2o_proc_entry * i2o_pe, void *data) +{ + struct proc_dir_entry *tmp; - ent->data = data; - ent->read_proc = pentry->read_proc; - ent->write_proc = pentry->write_proc; - if(pentry->fops_proc) - ent->proc_fops = pentry->fops_proc; + while (i2o_pe->name) { + tmp = create_proc_entry(i2o_pe->name, i2o_pe->mode, dir); + if (!tmp) + return -1; - ent->nlink = 1; + tmp->data = data; + tmp->proc_fops = i2o_pe->fops; - pentry++; + i2o_pe++; } return 0; } -static void i2o_proc_remove_entries(i2o_proc_entry *pentry, - struct proc_dir_entry *parent) -{ - while(pentry->name != NULL) - { - remove_proc_entry(pentry->name, parent); - pentry++; - } -} - -static int i2o_proc_add_controller(struct i2o_controller *pctrl, - struct proc_dir_entry *root ) +/** + * i2o_proc_subdir_remove - Remove child entries from a proc entry + * @dir: proc dir entry from which the childs should be removed + * + * Iterate over each i2o proc entry under dir and remove it. If the child + * also has entries, remove them too. + */ +static void i2o_proc_subdir_remove(struct proc_dir_entry *dir) { - struct proc_dir_entry *dir, *dir1; - struct i2o_device *dev; - char buff[10]; - - sprintf(buff, "iop%d", pctrl->unit); - - dir = proc_mkdir(buff, root); - if(!dir) - return -1; - - pctrl->proc_entry = dir; - - i2o_proc_create_entries(pctrl, generic_iop_entries, dir); - - for(dev = pctrl->devices; dev; dev = dev->next) - { - sprintf(buff, "%0#5x", dev->lct_data.tid); - - dir1 = proc_mkdir(buff, dir); - dev->proc_entry = dir1; - - if(!dir1) - printk(KERN_INFO "i2o_proc: Could not allocate proc dir\n"); - - i2o_proc_add_device(dev, dir1); + struct proc_dir_entry *pe, *tmp; + pe = dir->subdir; + while (pe) { + tmp = pe->next; + i2o_proc_subdir_remove(pe); + remove_proc_entry(pe->name, dir); + pe = tmp; } +}; - return 0; -} - -void i2o_proc_new_dev(struct i2o_controller *c, struct i2o_device *d) +/** + * i2o_proc_device_add - Add an I2O device to the proc dir + * @dir: proc dir entry to which the device should be added + * @dev: I2O device which should be added + * + * Add an I2O device to the proc dir entry dir and create the entries for + * the device depending on the class of the I2O device. + */ +static void i2o_proc_device_add(struct proc_dir_entry *dir, + struct i2o_device *dev) { char buff[10]; + struct proc_dir_entry *devdir; + i2o_proc_entry *i2o_pe = NULL; -#ifdef DRIVERDEBUG - printk(KERN_INFO "Adding new device to /proc/i2o/iop%d\n", c->unit); -#endif - sprintf(buff, "%0#5x", d->lct_data.tid); + sprintf(buff, "%03x", dev->lct_data.tid); - d->proc_entry = proc_mkdir(buff, c->proc_entry); + pr_debug("Adding device /proc/i2o/iop%d/%s\n", dev->iop->unit, buff); - if(!d->proc_entry) - { + devdir = proc_mkdir(buff, dir); + if (!devdir) { printk(KERN_WARNING "i2o: Could not allocate procdir!\n"); return; } - i2o_proc_add_device(d, d->proc_entry); -} + devdir->data = dev; -void i2o_proc_add_device(struct i2o_device *dev, struct proc_dir_entry *dir) -{ - i2o_proc_create_entries(dev, generic_dev_entries, dir); + i2o_proc_create_entries(devdir, generic_dev_entries, dev); /* Inform core that we want updates about this device's status */ - i2o_device_notify_on(dev, &i2o_proc_handler); - switch(dev->lct_data.class_id) - { - case I2O_CLASS_SCSI_PERIPHERAL: - case I2O_CLASS_RANDOM_BLOCK_STORAGE: - i2o_proc_create_entries(dev, rbs_dev_entries, dir); - break; - case I2O_CLASS_LAN: - i2o_proc_create_entries(dev, lan_entries, dir); - switch(dev->lct_data.sub_class) - { - case I2O_LAN_ETHERNET: - i2o_proc_create_entries(dev, lan_eth_entries, dir); - break; - case I2O_LAN_FDDI: - i2o_proc_create_entries(dev, lan_fddi_entries, dir); - break; - case I2O_LAN_TR: - i2o_proc_create_entries(dev, lan_tr_entries, dir); - break; - default: - break; - } - break; - default: - break; + switch (dev->lct_data.class_id) { + case I2O_CLASS_SCSI_PERIPHERAL: + case I2O_CLASS_RANDOM_BLOCK_STORAGE: + i2o_pe = rbs_dev_entries; + break; + default: + break; } + if (i2o_pe) + i2o_proc_create_entries(devdir, i2o_pe, dev); } -static void i2o_proc_remove_controller(struct i2o_controller *pctrl, - struct proc_dir_entry *parent) +/** + * i2o_proc_iop_add - Add an I2O controller to the i2o proc tree + * @dir: parent proc dir entry + * @c: I2O controller which should be added + * + * Add the entries to the parent proc dir entry. Also each device is added + * to the controllers proc dir entry. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_proc_iop_add(struct proc_dir_entry *dir, + struct i2o_controller *c) { - char buff[10]; + struct proc_dir_entry *iopdir; struct i2o_device *dev; + char buff[10]; - /* Remove unused device entries */ - for(dev=pctrl->devices; dev; dev=dev->next) - i2o_proc_remove_device(dev); + snprintf(buff, 10, "iop%d", c->unit); - if(!atomic_read(&pctrl->proc_entry->count)) - { - sprintf(buff, "iop%d", pctrl->unit); + pr_debug("Adding IOP /proc/i2o/%s\n", buff); - i2o_proc_remove_entries(generic_iop_entries, pctrl->proc_entry); - remove_proc_entry(buff, parent); - pctrl->proc_entry = NULL; - } -} + iopdir = proc_mkdir(buff, dir); + if (!iopdir) + return -1; -void i2o_proc_remove_device(struct i2o_device *dev) -{ - struct proc_dir_entry *de=dev->proc_entry; - char dev_id[10]; + iopdir->data = c; - sprintf(dev_id, "%0#5x", dev->lct_data.tid); + i2o_proc_create_entries(iopdir, i2o_proc_generic_iop_entries, c); - i2o_device_notify_off(dev, &i2o_proc_handler); - /* Would it be safe to remove _files_ even if they are in use? */ - if((de) && (!atomic_read(&de->count))) - { - i2o_proc_remove_entries(generic_dev_entries, de); - switch(dev->lct_data.class_id) - { - case I2O_CLASS_SCSI_PERIPHERAL: - case I2O_CLASS_RANDOM_BLOCK_STORAGE: - i2o_proc_remove_entries(rbs_dev_entries, de); - break; - case I2O_CLASS_LAN: - { - i2o_proc_remove_entries(lan_entries, de); - switch(dev->lct_data.sub_class) - { - case I2O_LAN_ETHERNET: - i2o_proc_remove_entries(lan_eth_entries, de); - break; - case I2O_LAN_FDDI: - i2o_proc_remove_entries(lan_fddi_entries, de); - break; - case I2O_LAN_TR: - i2o_proc_remove_entries(lan_tr_entries, de); - break; - } - } - } - remove_proc_entry(dev_id, dev->controller->proc_entry); - } + list_for_each_entry(dev, &c->devices, list) + i2o_proc_device_add(iopdir, dev); + + return 0; } - -void i2o_proc_dev_del(struct i2o_controller *c, struct i2o_device *d) + +/** + * i2o_proc_iop_remove - Removes an I2O controller from the i2o proc tree + * @dir: parent proc dir entry + * @c: I2O controller which should be removed + * + * Iterate over each i2o proc entry and search controller c. If it is found + * remove it from the tree. + */ +static void i2o_proc_iop_remove(struct proc_dir_entry *dir, + struct i2o_controller *c) { -#ifdef DRIVERDEBUG - printk(KERN_INFO "Deleting device %d from iop%d\n", - d->lct_data.tid, c->unit); -#endif + struct proc_dir_entry *pe, *tmp; - i2o_proc_remove_device(d); + pe = dir->subdir; + while (pe) { + tmp = pe->next; + if (pe->data == c) { + i2o_proc_subdir_remove(pe); + remove_proc_entry(pe->name, dir); + } + pr_debug("Removing IOP /proc/i2o/iop%d\n", c->unit); + pe = tmp; + } } -static int create_i2o_procfs(void) +/** + * i2o_proc_fs_create - Create the i2o proc fs. + * + * Iterate over each I2O controller and create the entries for it. + * + * Returns 0 on success or negative error code on failure. + */ +static int __init i2o_proc_fs_create(void) { - struct i2o_controller *pctrl = NULL; - int i; + struct i2o_controller *c; i2o_proc_dir_root = proc_mkdir("i2o", NULL); - if(!i2o_proc_dir_root) + if (!i2o_proc_dir_root) return -1; + i2o_proc_dir_root->owner = THIS_MODULE; - for(i = 0; i < MAX_I2O_CONTROLLERS; i++) - { - pctrl = i2o_find_controller(i); - if(pctrl) - { - i2o_proc_add_controller(pctrl, i2o_proc_dir_root); - i2o_unlock_controller(pctrl); - } - }; + list_for_each_entry(c, &i2o_controllers, list) + i2o_proc_iop_add(i2o_proc_dir_root, c); return 0; -} +}; -static int __exit destroy_i2o_procfs(void) +/** + * i2o_proc_fs_destroy - Cleanup the all i2o proc entries + * + * Iterate over each I2O controller and remove the entries for it. + * + * Returns 0 on success or negative error code on failure. + */ +static int __exit i2o_proc_fs_destroy(void) { - struct i2o_controller *pctrl = NULL; - int i; + struct i2o_controller *c; - for(i = 0; i < MAX_I2O_CONTROLLERS; i++) - { - pctrl = i2o_find_controller(i); - if(pctrl) - { - i2o_proc_remove_controller(pctrl, i2o_proc_dir_root); - i2o_unlock_controller(pctrl); - } - } + list_for_each_entry(c, &i2o_controllers, list) + i2o_proc_iop_remove(i2o_proc_dir_root, c); - if(!atomic_read(&i2o_proc_dir_root->count)) - remove_proc_entry("i2o", NULL); - else - return -1; + remove_proc_entry("i2o", NULL); return 0; -} +}; -int __init i2o_proc_init(void) +/** + * i2o_proc_init - Init function for procfs + * + * Registers Proc OSM and creates procfs entries. + * + * Returns 0 on success or negative error code on failure. + */ +static int __init i2o_proc_init(void) { - if (i2o_install_handler(&i2o_proc_handler) < 0) - { - printk(KERN_ERR "i2o_proc: Unable to install PROC handler.\n"); - return 0; - } + int rc; - if(create_i2o_procfs()) - return -EBUSY; + rc = i2o_driver_register(&i2o_proc_driver); + if (rc) + return rc; + + rc = i2o_proc_fs_create(); + if (rc) { + i2o_driver_unregister(&i2o_proc_driver); + return rc; + } return 0; -} +}; + +/** + * i2o_proc_exit - Exit function for procfs + * + * Unregisters Proc OSM and removes procfs entries. + */ +static void __exit i2o_proc_exit(void) +{ + i2o_driver_unregister(&i2o_proc_driver); + i2o_proc_fs_destroy(); +}; MODULE_AUTHOR("Deepak Saxena"); MODULE_DESCRIPTION("I2O procfs Handler"); MODULE_LICENSE("GPL"); -static void __exit i2o_proc_exit(void) -{ - destroy_i2o_procfs(); - i2o_remove_handler(&i2o_proc_handler); -} - -#ifdef MODULE module_init(i2o_proc_init); -#endif module_exit(i2o_proc_exit); - diff -Nru a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c --- a/drivers/message/i2o/i2o_scsi.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/message/i2o/i2o_scsi.c 2004-09-06 16:37:54 -07:00 @@ -1,4 +1,4 @@ -/* +/* * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any @@ -19,13 +19,13 @@ * * o Each (bus,lun) is a logical device in I2O. We keep a map * table. We spoof failed selection for unmapped units - * o Request sense buffers can come back for free. + * o Request sense buffers can come back for free. * o Scatter gather is a bit dynamic. We have to investigate at * setup time. * o Some of our resources are dynamically shared. The i2o core * needs a message reservation protocol to avoid swap v net * deadlocking. We need to back off queue requests. - * + * * In general the firmware wants to help. Where its help isn't performance * useful we just ignore the aid. Its not worth the code in truth. * @@ -40,7 +40,6 @@ * Fix the resource management problems. */ - #include #include #include @@ -53,79 +52,229 @@ #include #include #include +#include +#include + #include #include #include #include -#include -#include #include -#include -#include #include - +#include +#include #define VERSION_STRING "Version 0.1.2" -//#define DRIVERDEBUG +static struct i2o_driver i2o_scsi_driver; -#ifdef DRIVERDEBUG -#define dprintk(s, args...) printk(s, ## args) -#else -#define dprintk(s, args...) -#endif +static int i2o_scsi_max_id = 16; +static int i2o_scsi_max_lun = 8; + +struct i2o_scsi_host { + struct Scsi_Host *scsi_host; /* pointer to the SCSI host */ + struct i2o_controller *iop; /* pointer to the I2O controller */ + struct i2o_device *channel[0]; /* channel->i2o_dev mapping table */ +}; + +static struct scsi_host_template i2o_scsi_host_template; #define I2O_SCSI_CAN_QUEUE 4 -#define MAXHOSTS 32 -struct i2o_scsi_host -{ - struct i2o_controller *controller; - s16 task[16][8]; /* Allow 16 devices for now */ - unsigned long tagclock[16][8]; /* Tag clock for queueing */ - s16 bus_task; /* The adapter TID */ +/* SCSI OSM class handling definition */ +static struct i2o_class_id i2o_scsi_class_id[] = { + {I2O_CLASS_SCSI_PERIPHERAL}, + {I2O_CLASS_END} }; -static int scsi_context; -static int lun_done; -static int i2o_scsi_hosts; - -static u32 *retry[32]; -static struct i2o_controller *retry_ctrl[32]; -static struct timer_list retry_timer; -static spinlock_t retry_lock = SPIN_LOCK_UNLOCKED; -static int retry_ct = 0; +static struct i2o_scsi_host *i2o_scsi_host_alloc(struct i2o_controller *c) +{ + struct i2o_scsi_host *i2o_shost; + struct i2o_device *i2o_dev; + struct Scsi_Host *scsi_host; + int max_channel = 0; + u8 type; + int i; + size_t size; + i2o_status_block *sb; -static atomic_t queue_depth; + list_for_each_entry(i2o_dev, &c->devices, list) + if (i2o_dev->lct_data.class_id == I2O_CLASS_BUS_ADAPTER_PORT) { + if (i2o_parm_field_get(i2o_dev, 0x0000, 0, &type, 1) || (type == 1)) /* SCSI bus */ + max_channel++; + } -/* - * SG Chain buffer support... + if (!max_channel) { + printk(KERN_WARNING "scsi-osm: no channels found on %s\n", + c->name); + return ERR_PTR(-EFAULT); + } + + size = max_channel * sizeof(struct i2o_device *) + + sizeof(struct i2o_scsi_host); + + scsi_host = scsi_host_alloc(&i2o_scsi_host_template, size); + if (!scsi_host) { + printk(KERN_WARNING "scsi-osm: Could not allocate SCSI host\n"); + return ERR_PTR(-ENOMEM); + } + + scsi_host->max_channel = max_channel - 1; + scsi_host->max_id = i2o_scsi_max_id; + scsi_host->max_lun = i2o_scsi_max_lun; + scsi_host->this_id = c->unit; + + sb = c->status_block.virt; + + scsi_host->sg_tablesize = (sb->inbound_frame_size - + sizeof(struct i2o_message) / 4 - 6) / 2; + + i2o_shost = (struct i2o_scsi_host *)scsi_host->hostdata; + i2o_shost->scsi_host = scsi_host; + i2o_shost->iop = c; + + i = 0; + list_for_each_entry(i2o_dev, &c->devices, list) + if (i2o_dev->lct_data.class_id == I2O_CLASS_BUS_ADAPTER_PORT) { + if (i2o_parm_field_get(i2o_dev, 0x0000, 0, &type, 1) || (type == 1)) /* only SCSI bus */ + i2o_shost->channel[i++] = i2o_dev; + + if (i >= max_channel) + break; + } + + return i2o_shost; +}; + +/** + * i2o_scsi_get_host - Get an I2O SCSI host + * @c: I2O controller to for which to get the SCSI host + * + * If the I2O controller already exists as SCSI host, the SCSI host + * is returned, otherwise the I2O controller is added to the SCSI + * core. + * + * Returns pointer to the I2O SCSI host on success or NULL on failure. */ +static struct i2o_scsi_host *i2o_scsi_get_host(struct i2o_controller *c) +{ + return c->driver_data[i2o_scsi_driver.context]; +}; -#define SG_MAX_FRAGS 64 +/** + * i2o_scsi_remove - Remove I2O device from SCSI core + * @dev: device which should be removed + * + * Removes the I2O device from the SCSI core again. + * + * Returns 0 on success. + */ +static int i2o_scsi_remove(struct device *dev) +{ + struct i2o_device *i2o_dev = to_i2o_device(dev); + struct i2o_controller *c = i2o_dev->iop; + struct i2o_scsi_host *i2o_shost; + struct scsi_device *scsi_dev; -/* - * FIXME: we should allocate one of these per bus we find as we - * locate them not in a lump at boot. + i2o_shost = i2o_scsi_get_host(c); + + shost_for_each_device(scsi_dev, i2o_shost->scsi_host) + if (scsi_dev->hostdata == i2o_dev) { + scsi_remove_device(scsi_dev); + scsi_device_put(scsi_dev); + break; + } + + return 0; +}; + +/** + * i2o_scsi_probe - verify if dev is a I2O SCSI device and install it + * @dev: device to verify if it is a I2O SCSI device + * + * Retrieve channel, id and lun for I2O device. If everthing goes well + * register the I2O device as SCSI device on the I2O SCSI controller. + * + * Returns 0 on success or negative error code on failure. */ - -typedef struct _chain_buf +static int i2o_scsi_probe(struct device *dev) +{ + struct i2o_device *i2o_dev = to_i2o_device(dev); + struct i2o_controller *c = i2o_dev->iop; + struct i2o_scsi_host *i2o_shost; + struct Scsi_Host *scsi_host; + struct i2o_device *parent; + struct scsi_device *scsi_dev; + u32 id; + u64 lun; + int channel = -1; + int i; + + i2o_shost = i2o_scsi_get_host(c); + if (!i2o_shost) + return -EFAULT; + + scsi_host = i2o_shost->scsi_host; + + if (i2o_parm_field_get(i2o_dev, 0, 3, &id, 4) < 0) + return -EFAULT; + + if (id >= scsi_host->max_id) { + printk(KERN_WARNING "scsi-osm: SCSI device id (%d) >= max_id " + "of I2O host (%d)", id, scsi_host->max_id); + return -EFAULT; + } + + if (i2o_parm_field_get(i2o_dev, 0, 4, &lun, 8) < 0) + return -EFAULT; + if (lun >= scsi_host->max_lun) { + printk(KERN_WARNING "scsi-osm: SCSI device id (%d) >= max_lun " + "of I2O host (%d)", (unsigned int)lun, + scsi_host->max_lun); + return -EFAULT; + } + + parent = i2o_iop_find_device(c, i2o_dev->lct_data.parent_tid); + if (!parent) { + printk(KERN_WARNING "scsi-osm: can not find parent of device " + "%03x\n", i2o_dev->lct_data.tid); + return -EFAULT; + } + + for (i = 0; i <= i2o_shost->scsi_host->max_channel; i++) + if (i2o_shost->channel[i] == parent) + channel = i; + + if (channel == -1) { + printk(KERN_WARNING "scsi-osm: can not find channel of device " + "%03x\n", i2o_dev->lct_data.tid); + return -EFAULT; + } + + scsi_dev = + __scsi_add_device(i2o_shost->scsi_host, channel, id, lun, i2o_dev); + + if (!scsi_dev) { + printk(KERN_WARNING "scsi-osm: can not add SCSI device " + "%03x\n", i2o_dev->lct_data.tid); + return -EFAULT; + } + + pr_debug("Added new SCSI device %03x (cannel: %d, id: %d, lun: %d)\n", + i2o_dev->lct_data.tid, channel, id, (unsigned int)lun); + + return 0; +}; + +static const char *i2o_scsi_info(struct Scsi_Host *SChost) { - u32 sg_flags_cnt[SG_MAX_FRAGS]; - u32 sg_buf[SG_MAX_FRAGS]; -} chain_buf; - -#define SG_CHAIN_BUF_SZ sizeof(chain_buf) - -#define SG_MAX_BUFS (i2o_num_controllers * I2O_SCSI_CAN_QUEUE) -#define SG_CHAIN_POOL_SZ (SG_MAX_BUFS * SG_CHAIN_BUF_SZ) - -static int max_sg_len = 0; -static chain_buf *sg_chain_pool = NULL; -static int sg_chain_tag = 0; -static int sg_max_frags = SG_MAX_FRAGS; + struct i2o_scsi_host *hostdata; + hostdata = (struct i2o_scsi_host *)SChost->hostdata; + return hostdata->iop->name; +} +#if 0 /** * i2o_retry_run - retry on timeout * @f: unused @@ -136,16 +285,16 @@ * and its default handler should be this in the core, and this * call a 2nd "I give up" handler in the OSM ? */ - + static void i2o_retry_run(unsigned long f) { int i; unsigned long flags; - + spin_lock_irqsave(&retry_lock, flags); - for(i=0;i 0 + * on success and if the reply should be flushed. Returns negative error + * code on failure and if the reply should be flushed. */ - -static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, struct i2o_message *msg) +static int i2o_scsi_reply(struct i2o_controller *c, u32 m, + struct i2o_message *msg) { - struct scsi_cmnd *current_command; - spinlock_t *lock; - u32 *m = (u32 *)msg; - u8 as,ds,st; - unsigned long flags; + struct scsi_cmnd *cmd; + struct device *dev; + u8 as, ds, st; + + cmd = i2o_cntxt_list_get(c, readl(&msg->u.s.tcntxt)); + + if (msg->u.head[0] & (1 << 13)) { + struct i2o_message *pmsg; /* preserved message */ + u32 pm; + + pm = readl(&msg->body[3]); + + pmsg = c->in_queue.virt + pm; - if(m[0] & (1<<13)) - { printk("IOP fail.\n"); printk("From %d To %d Cmd %d.\n", - (m[1]>>12)&0xFFF, - m[1]&0xFFF, - m[1]>>24); - printk("Failure Code %d.\n", m[4]>>24); - if(m[4]&(1<<16)) + (msg->u.head[1] >> 12) & 0xFFF, + msg->u.head[1] & 0xFFF, msg->u.head[1] >> 24); + printk("Failure Code %d.\n", msg->body[0] >> 24); + if (msg->body[0] & (1 << 16)) printk("Format error.\n"); - if(m[4]&(1<<17)) + if (msg->body[0] & (1 << 17)) printk("Path error.\n"); - if(m[4]&(1<<18)) + if (msg->body[0] & (1 << 18)) printk("Path State.\n"); - if(m[4]&(1<<18)) + if (msg->body[0] & (1 << 18)) printk("Congestion.\n"); - - m=(u32 *)bus_to_virt(m[7]); - printk("Failing message is %p.\n", m); - - /* This isnt a fast path .. */ - spin_lock_irqsave(&retry_lock, flags); - - if((m[4]&(1<<18)) && retry_ct < 32) - { - retry_ctrl[retry_ct]=c; - retry[retry_ct]=m; - if(!retry_ct++) - { - retry_timer.expires=jiffies+1; - add_timer(&retry_timer); - } - spin_unlock_irqrestore(&retry_lock, flags); - } - else - { - spin_unlock_irqrestore(&retry_lock, flags); - /* Create a scsi error for this */ - current_command = (struct scsi_cmnd *)i2o_context_list_get(m[3], c); - if(!current_command) - return; - - lock = current_command->device->host->host_lock; - printk("Aborted %ld\n", current_command->serial_number); - - spin_lock_irqsave(lock, flags); - current_command->result = DID_ERROR << 16; - current_command->scsi_done(current_command); - spin_unlock_irqrestore(lock, flags); - - /* Now flush the message by making it a NOP */ - m[0]&=0x00FFFFFF; - m[0]|=(I2O_CMD_UTIL_NOP)<<24; - i2o_post_message(c,virt_to_bus(m)); - } - return; + + printk("Failing message is %p.\n", pmsg); + + cmd = i2o_cntxt_list_get(c, readl(&pmsg->u.s.tcntxt)); + if (!cmd) + return 1; + + printk("Aborted %ld\n", cmd->serial_number); + cmd->result = DID_ERROR << 16; + cmd->scsi_done(cmd); + + /* Now flush the message by making it a NOP */ + i2o_msg_nop(c, pm); + + return 1; } - - prefetchw(&queue_depth); - - + /* - * Low byte is device status, next is adapter status, - * (then one byte reserved), then request status. + * Low byte is device status, next is adapter status, + * (then one byte reserved), then request status. */ - ds=(u8)le32_to_cpu(m[4]); - as=(u8)le32_to_cpu(m[4]>>8); - st=(u8)le32_to_cpu(m[4]>>24); - - dprintk(KERN_INFO "i2o got a scsi reply %08X: ", m[0]); - dprintk(KERN_INFO "m[2]=%08X: ", m[2]); - dprintk(KERN_INFO "m[4]=%08X\n", m[4]); - - if(m[2]&0x80000000) - { - if(m[2]&0x40000000) - { - dprintk(KERN_INFO "Event.\n"); - lun_done=1; - return; - } - printk(KERN_INFO "i2o_scsi: bus reset completed.\n"); - return; - } + ds = (u8) readl(&msg->body[0]); + as = (u8) (readl(&msg->body[0]) >> 8); + st = (u8) (readl(&msg->body[0]) >> 24); - current_command = (struct scsi_cmnd *)i2o_context_list_get(m[3], c); - /* - * Is this a control request coming back - eg an abort ? + * Is this a control request coming back - eg an abort ? */ - - atomic_dec(&queue_depth); - if(current_command==NULL) - { - if(st) - dprintk(KERN_WARNING "SCSI abort: %08X", m[4]); - dprintk(KERN_INFO "SCSI abort completed.\n"); - return; + if (!cmd) { + if (st) + printk(KERN_WARNING "SCSI abort: %08X", + readl(&msg->body[0])); + printk(KERN_INFO "SCSI abort completed.\n"); + return -EFAULT; } - - dprintk(KERN_INFO "Completed %ld\n", current_command->serial_number); - - if(st == 0x06) - { - if(le32_to_cpu(m[5]) < current_command->underflow) - { - int i; - printk(KERN_ERR "SCSI: underflow 0x%08X 0x%08X\n", - le32_to_cpu(m[5]), current_command->underflow); - printk("Cmd: "); - for(i=0;i<15;i++) - printk("%02X ", current_command->cmnd[i]); - printk(".\n"); - } - else st=0; - } - - if(st) - { - /* An error has occurred */ - dprintk(KERN_WARNING "SCSI error %08X", m[4]); - - if (as == 0x0E) - /* SCSI Reset */ - current_command->result = DID_RESET << 16; - else if (as == 0x0F) - current_command->result = DID_PARITY << 16; - else - current_command->result = DID_ERROR << 16; - } - else - /* - * It worked maybe ? - */ - current_command->result = DID_OK << 16 | ds; - - if (current_command->use_sg) { - pci_unmap_sg(c->pdev, - (struct scatterlist *)current_command->buffer, - current_command->use_sg, - current_command->sc_data_direction); - } else if (current_command->request_bufflen) { - pci_unmap_single(c->pdev, - (dma_addr_t)((long)current_command->SCp.ptr), - current_command->request_bufflen, - current_command->sc_data_direction); - } - - lock = current_command->device->host->host_lock; - spin_lock_irqsave(lock, flags); - current_command->scsi_done(current_command); - spin_unlock_irqrestore(lock, flags); - return; -} + pr_debug("Completed %ld\n", cmd->serial_number); -struct i2o_handler i2o_scsi_handler = { - .reply = i2o_scsi_reply, - .name = "I2O SCSI OSM", - .class = I2O_CLASS_SCSI_PERIPHERAL, -}; + if (st) { + u32 count, error; + /* An error has occurred */ -/** - * i2o_find_lun - report the lun of an i2o device - * @c: i2o controller owning the device - * @d: i2o disk device - * @target: filled in with target id - * @lun: filled in with target lun - * - * Query an I2O device to find out its SCSI lun and target numbering. We - * don't currently handle some of the fancy SCSI-3 stuff although our - * querying is sufficient to do so. - */ - -static int i2o_find_lun(struct i2o_controller *c, struct i2o_device *d, int *target, int *lun) -{ - u8 reply[8]; - - if(i2o_query_scalar(c, d->lct_data.tid, 0, 3, reply, 4)<0) - return -1; - - *target=reply[0]; - - if(i2o_query_scalar(c, d->lct_data.tid, 0, 4, reply, 8)<0) - return -1; + switch (st) { + case 0x06: + count = readl(&msg->body[1]); + if (count < cmd->underflow) { + int i; + printk(KERN_ERR "SCSI: underflow 0x%08X 0x%08X" + "\n", count, cmd->underflow); + printk("Cmd: "); + for (i = 0; i < 15; i++) + printk("%02X ", cmd->cmnd[i]); + printk(".\n"); + cmd->result = (DID_ERROR << 16); + } + break; - *lun=reply[1]; + default: + error = readl(&msg->body[0]); - dprintk(KERN_INFO "SCSI (%d,%d)\n", *target, *lun); - return 0; -} + printk(KERN_ERR "scsi-osm: SCSI error %08x\n", error); -/** - * i2o_scsi_init - initialize an i2o device for scsi - * @c: i2o controller owning the device - * @d: scsi controller - * @shpnt: scsi device we wish it to become - * - * Enumerate the scsi peripheral/fibre channel peripheral class - * devices that are children of the controller. From that we build - * a translation map for the command queue code. Since I2O works on - * its own tid's we effectively have to think backwards to get what - * the midlayer wants - */ - -static void i2o_scsi_init(struct i2o_controller *c, struct i2o_device *d, struct Scsi_Host *shpnt) -{ - struct i2o_device *unit; - struct i2o_scsi_host *h =(struct i2o_scsi_host *)shpnt->hostdata; - int lun; - int target; - - h->controller=c; - h->bus_task=d->lct_data.tid; - - for(target=0;target<16;target++) - for(lun=0;lun<8;lun++) - h->task[target][lun] = -1; - - for(unit=c->devices;unit!=NULL;unit=unit->next) - { - dprintk(KERN_INFO "Class %03X, parent %d, want %d.\n", - unit->lct_data.class_id, unit->lct_data.parent_tid, d->lct_data.tid); - - /* Only look at scsi and fc devices */ - if ( (unit->lct_data.class_id != I2O_CLASS_SCSI_PERIPHERAL) - && (unit->lct_data.class_id != I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL) - ) - continue; - - /* On our bus ? */ - dprintk(KERN_INFO "Found a disk (%d).\n", unit->lct_data.tid); - if ((unit->lct_data.parent_tid == d->lct_data.tid) - || (unit->lct_data.parent_tid == d->lct_data.parent_tid) - ) - { - u16 limit; - dprintk(KERN_INFO "Its ours.\n"); - if(i2o_find_lun(c, unit, &target, &lun)==-1) - { - printk(KERN_ERR "i2o_scsi: Unable to get lun for tid %d.\n", unit->lct_data.tid); - continue; + if ((error & 0xff) == 0x02 /*CHECK_CONDITION */ ) { + int i; + u32 len = sizeof(cmd->sense_buffer); + len = (len > 40) ? 40 : len; + // Copy over the sense data + memcpy(cmd->sense_buffer, (void *)&msg->body[3], + len); + for (i = 0; i <= len; i++) + printk(KERN_INFO "%02x\n", + cmd->sense_buffer[i]); + if (cmd->sense_buffer[0] == 0x70 + && cmd->sense_buffer[2] == DATA_PROTECT) { + /* This is to handle an array failed */ + cmd->result = (DID_TIME_OUT << 16); + printk(KERN_WARNING "%s: SCSI Data " + "Protect-Device (%d,%d,%d) " + "hba_status=0x%x, dev_status=" + "0x%x, cmd=0x%x\n", c->name, + (u32) cmd->device->channel, + (u32) cmd->device->id, + (u32) cmd->device->lun, + (error >> 8) & 0xff, + error & 0xff, cmd->cmnd[0]); + } else + cmd->result = (DID_ERROR << 16); + + break; } - dprintk(KERN_INFO "Found disk %d %d.\n", target, lun); - h->task[target][lun]=unit->lct_data.tid; - h->tagclock[target][lun]=jiffies; - - /* Get the max fragments/request */ - i2o_query_scalar(c, d->lct_data.tid, 0xF103, 3, &limit, 2); - - /* sanity */ - if ( limit == 0 ) - { - printk(KERN_WARNING "i2o_scsi: Ignoring unreasonable SG limit of 0 from IOP!\n"); - limit = 1; + + switch (as) { + case 0x0E: + /* SCSI Reset */ + cmd->result = DID_RESET << 16; + break; + + case 0x0F: + cmd->result = DID_PARITY << 16; + break; + + default: + cmd->result = DID_ERROR << 16; + break; } - - shpnt->sg_tablesize = limit; - dprintk(KERN_INFO "i2o_scsi: set scatter-gather to %d.\n", - shpnt->sg_tablesize); + break; } - } -} -/** - * i2o_scsi_detect - probe for I2O scsi devices - * @tpnt: scsi layer template - * - * I2O is a little odd here. The I2O core already knows what the - * devices are. It also knows them by disk and tape as well as - * by controller. We register each I2O scsi class object as a - * scsi controller and then let the enumeration fake up the rest - */ - -static int i2o_scsi_detect(struct scsi_host_template * tpnt) -{ - struct Scsi_Host *shpnt = NULL; - int i; - int count; + cmd->scsi_done(cmd); + return 1; + } - printk(KERN_INFO "i2o_scsi.c: %s\n", VERSION_STRING); + cmd->result = DID_OK << 16 | ds; - if(i2o_install_handler(&i2o_scsi_handler)<0) - { - printk(KERN_ERR "i2o_scsi: Unable to install OSM handler.\n"); - return 0; - } - scsi_context = i2o_scsi_handler.context; - - if((sg_chain_pool = kmalloc(SG_CHAIN_POOL_SZ, GFP_KERNEL)) == NULL) - { - printk(KERN_INFO "i2o_scsi: Unable to alloc %d byte SG chain buffer pool.\n", SG_CHAIN_POOL_SZ); - printk(KERN_INFO "i2o_scsi: SG chaining DISABLED!\n"); - sg_max_frags = 11; - } - else - { - printk(KERN_INFO " chain_pool: %d bytes @ %p\n", SG_CHAIN_POOL_SZ, sg_chain_pool); - printk(KERN_INFO " (%d byte buffers X %d can_queue X %d i2o controllers)\n", - SG_CHAIN_BUF_SZ, I2O_SCSI_CAN_QUEUE, i2o_num_controllers); - sg_max_frags = SG_MAX_FRAGS; // 64 - } - - init_timer(&retry_timer); - retry_timer.data = 0UL; - retry_timer.function = i2o_retry_run; - -// printk("SCSI OSM at %d.\n", scsi_context); - - for (count = 0, i = 0; i < MAX_I2O_CONTROLLERS; i++) - { - struct i2o_controller *c=i2o_find_controller(i); - struct i2o_device *d; - /* - * This controller doesn't exist. - */ - - if(c==NULL) - continue; - - /* - * Fixme - we need some altered device locking. This - * is racing with device addition in theory. Easy to fix. - */ - - for(d=c->devices;d!=NULL;d=d->next) - { - /* - * bus_adapter, SCSI (obsolete), or FibreChannel busses only - */ - if( (d->lct_data.class_id!=I2O_CLASS_BUS_ADAPTER_PORT) // bus_adapter -// && (d->lct_data.class_id!=I2O_CLASS_FIBRE_CHANNEL_PORT) // FC_PORT - ) - continue; - - shpnt = scsi_register(tpnt, sizeof(struct i2o_scsi_host)); - if(shpnt==NULL) - continue; - shpnt->unique_id = (u32)d; - shpnt->io_port = 0; - shpnt->n_io_port = 0; - shpnt->irq = 0; - shpnt->this_id = /* Good question */15; - i2o_scsi_init(c, d, shpnt); - count++; - } - } - i2o_scsi_hosts = count; - - if(count==0) - { - if(sg_chain_pool!=NULL) - { - kfree(sg_chain_pool); - sg_chain_pool = NULL; - } - flush_pending(); - del_timer(&retry_timer); - i2o_remove_handler(&i2o_scsi_handler); + cmd->scsi_done(cmd); + + dev = &c->pdev->dev; + if (cmd->use_sg) + dma_unmap_sg(dev, (struct scatterlist *)cmd->buffer, + cmd->use_sg, cmd->sc_data_direction); + else if (cmd->request_bufflen) + dma_unmap_single(dev, (dma_addr_t) ((long)cmd->SCp.ptr), + cmd->request_bufflen, cmd->sc_data_direction); + + return 1; +}; + +/** + * i2o_scsi_notify_controller_add - Retrieve notifications of added + * controllers + * @c: the controller which was added + * + * If a I2O controller is added, we catch the notification to add a + * corresponding Scsi_Host. + */ +void i2o_scsi_notify_controller_add(struct i2o_controller *c) +{ + struct i2o_scsi_host *i2o_shost; + int rc; + + i2o_shost = i2o_scsi_host_alloc(c); + if (IS_ERR(i2o_shost)) { + printk(KERN_ERR "scsi-osm: Could not initialize" + " SCSI host\n"); + return; } - - return count; -} -static int i2o_scsi_release(struct Scsi_Host *host) -{ - if(--i2o_scsi_hosts==0) - { - if(sg_chain_pool!=NULL) - { - kfree(sg_chain_pool); - sg_chain_pool = NULL; - } - flush_pending(); - del_timer(&retry_timer); - i2o_remove_handler(&i2o_scsi_handler); + rc = scsi_add_host(i2o_shost->scsi_host, &c->device); + if (rc) { + printk(KERN_ERR "scsi-osm: Could not add SCSI " + "host\n"); + scsi_host_put(i2o_shost->scsi_host); + return; } - scsi_unregister(host); + c->driver_data[i2o_scsi_driver.context] = i2o_shost; - return 0; -} + pr_debug("new I2O SCSI host added\n"); +}; +/** + * i2o_scsi_notify_controller_remove - Retrieve notifications of removed + * controllers + * @c: the controller which was removed + * + * If a I2O controller is removed, we catch the notification to remove the + * corresponding Scsi_Host. + */ +void i2o_scsi_notify_controller_remove(struct i2o_controller *c) +{ + struct i2o_scsi_host *i2o_shost; + i2o_shost = i2o_scsi_get_host(c); + if (!i2o_shost) + return; -static const char *i2o_scsi_info(struct Scsi_Host *SChost) -{ - struct i2o_scsi_host *hostdata; - hostdata = (struct i2o_scsi_host *)SChost->hostdata; - return(&hostdata->controller->name[0]); -} + c->driver_data[i2o_scsi_driver.context] = NULL; + + scsi_remove_host(i2o_shost->scsi_host); + scsi_host_put(i2o_shost->scsi_host); + pr_debug("I2O SCSI host removed\n"); +}; + +/* SCSI OSM driver struct */ +static struct i2o_driver i2o_scsi_driver = { + .name = "scsi-osm", + .reply = i2o_scsi_reply, + .classes = i2o_scsi_class_id, + .notify_controller_add = i2o_scsi_notify_controller_add, + .notify_controller_remove = i2o_scsi_notify_controller_remove, + .driver = { + .probe = i2o_scsi_probe, + .remove = i2o_scsi_remove, + }, +}; /** - * i2o_scsi_queuecommand - queue a SCSI command + * i2o_scsi_queuecommand - queue a SCSI command * @SCpnt: scsi command pointer * @done: callback for completion * - * Issue a scsi comamnd asynchronously. Return 0 on success or 1 if - * we hit an error (normally message queue congestion). The only + * Issue a scsi command asynchronously. Return 0 on success or 1 if + * we hit an error (normally message queue congestion). The only * minor complication here is that I2O deals with the device addressing * so we have to map the bus/dev/lun back to an I2O handle as well - * as faking absent devices ourself. + * as faking absent devices ourself. * * Locks: takes the controller lock on error path only */ - + static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt, void (*done) (struct scsi_cmnd *)) { - int i; - int tid; struct i2o_controller *c; - struct scsi_cmnd *current_command; struct Scsi_Host *host; - struct i2o_scsi_host *hostdata; - u32 *msg, *mptr; + struct i2o_device *i2o_dev; + struct device *dev; + int tid; + struct i2o_message *msg; u32 m; - u32 *lenptr; - int direction; - int scsidir; - u32 len; - u32 reqlen; - u32 tag; - unsigned long flags; - - static int max_qd = 1; - + u32 scsi_flags, sg_flags; + u32 *mptr, *lenptr; + u32 len, reqlen; + int i; + /* - * Do the incoming paperwork + * Do the incoming paperwork */ - + + i2o_dev = SCpnt->device->hostdata; host = SCpnt->device->host; - hostdata = (struct i2o_scsi_host *)host->hostdata; - - c = hostdata->controller; - prefetch(c); - prefetchw(&queue_depth); + c = i2o_dev->iop; + dev = &c->pdev->dev; SCpnt->scsi_done = done; - - if(SCpnt->device->id > 15) - { - printk(KERN_ERR "i2o_scsi: Wild target %d.\n", SCpnt->device->id); - return -1; - } - - tid = hostdata->task[SCpnt->device->id][SCpnt->device->lun]; - - dprintk(KERN_INFO "qcmd: Tid = %d\n", tid); - - current_command = SCpnt; /* set current command */ - current_command->scsi_done = done; /* set ptr to done function */ - - /* We don't have such a device. Pretend we did the command - and that selection timed out */ - - if(tid == -1) - { + + if (unlikely(!i2o_dev)) { + printk(KERN_WARNING "scsi-osm: no I2O device in request\n"); SCpnt->result = DID_NO_CONNECT << 16; done(SCpnt); return 0; } - - dprintk(KERN_INFO "Real scsi messages.\n"); + + tid = i2o_dev->lct_data.tid; + + pr_debug("qcmd: Tid = %03x\n", tid); + pr_debug("Real scsi messages.\n"); /* - * Obtain an I2O message. If there are none free then - * throw it back to the scsi layer - */ - - m = le32_to_cpu(I2O_POST_READ32(c)); - if(m==0xFFFFFFFF) - return 1; + * Obtain an I2O message. If there are none free then + * throw it back to the scsi layer + */ + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return SCSI_MLQUEUE_HOST_BUSY; - msg = (u32 *)(c->msg_virt + m); - /* - * Put together a scsi execscb message + * Put together a scsi execscb message */ - + len = SCpnt->request_bufflen; - direction = 0x00000000; // SGL IN (osm<--iop) - - if (SCpnt->sc_data_direction == DMA_NONE) { - scsidir = 0x00000000; // DATA NO XFER - } else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) { - direction = 0x04000000; // SGL OUT (osm-->iop) - scsidir = 0x80000000; // DATA OUT (iop-->dev) - } else if(SCpnt->sc_data_direction == DMA_FROM_DEVICE) { - scsidir = 0x40000000; // DATA IN (iop<--dev) - } else { + + switch (SCpnt->sc_data_direction) { + case PCI_DMA_NONE: + scsi_flags = 0x00000000; // DATA NO XFER + sg_flags = 0x00000000; + break; + + case PCI_DMA_TODEVICE: + scsi_flags = 0x80000000; // DATA OUT (iop-->dev) + sg_flags = 0x14000000; + break; + + case PCI_DMA_FROMDEVICE: + scsi_flags = 0x40000000; // DATA IN (iop<--dev) + sg_flags = 0x10000000; + break; + + default: /* Unknown - kill the command */ SCpnt->result = DID_NO_CONNECT << 16; - - /* We must lock the request queue while completing */ - spin_lock_irqsave(host->host_lock, flags); done(SCpnt); - spin_unlock_irqrestore(host->host_lock, flags); return 0; } - - i2o_raw_writel(I2O_CMD_SCSI_EXEC<<24|HOST_TID<<12|tid, &msg[1]); - i2o_raw_writel(scsi_context, &msg[2]); /* So the I2O layer passes to us */ - i2o_raw_writel(i2o_context_list_add(SCpnt, c), &msg[3]); /* We want the SCSI control block back */ + writel(I2O_CMD_SCSI_EXEC << 24 | HOST_TID << 12 | tid, &msg->u.head[1]); + writel(i2o_scsi_driver.context, &msg->u.s.icntxt); + + /* We want the SCSI control block back */ + writel(i2o_cntxt_list_add(c, SCpnt), &msg->u.s.tcntxt); /* LSI_920_PCI_QUIRK * - * Intermittant observations of msg frame word data corruption - * observed on msg[4] after: - * WRITE, READ-MODIFY-WRITE - * operations. 19990606 -sralston + * Intermittant observations of msg frame word data corruption + * observed on msg[4] after: + * WRITE, READ-MODIFY-WRITE + * operations. 19990606 -sralston * - * (Hence we build this word via tag. Its good practice anyway - * we don't want fetches over PCI needlessly) + * (Hence we build this word via tag. Its good practice anyway + * we don't want fetches over PCI needlessly) */ - tag=0; - + /* Attach tags to the devices */ /* - * Attach tags to the devices - */ - if(SCpnt->device->tagged_supported) - { - /* - * Some drives are too stupid to handle fairness issues - * with tagged queueing. We throw in the odd ordered - * tag to stop them starving themselves. - */ - if((jiffies - hostdata->tagclock[SCpnt->device->id][SCpnt->device->lun]) > (5*HZ)) - { - tag=0x01800000; /* ORDERED! */ - hostdata->tagclock[SCpnt->device->id][SCpnt->device->lun]=jiffies; - } - else - { - /* Hmmm... I always see value of 0 here, - * of which {HEAD_OF, ORDERED, SIMPLE} are NOT! -sralston - */ - if(SCpnt->tag == HEAD_OF_QUEUE_TAG) - tag=0x01000000; - else if(SCpnt->tag == ORDERED_QUEUE_TAG) - tag=0x01800000; - } - } + if(SCpnt->device->tagged_supported) { + if(SCpnt->tag == HEAD_OF_QUEUE_TAG) + scsi_flags |= 0x01000000; + else if(SCpnt->tag == ORDERED_QUEUE_TAG) + scsi_flags |= 0x01800000; + } + */ /* Direction, disconnect ok, tag, CDBLen */ - i2o_raw_writel(scsidir|0x20000000|SCpnt->cmd_len|tag, &msg[4]); + writel(scsi_flags | 0x20200000 | SCpnt->cmd_len, &msg->body[0]); - mptr=msg+5; + mptr = &msg->body[1]; - /* - * Write SCSI command into the message - always 16 byte block - */ - + /* Write SCSI command into the message - always 16 byte block */ memcpy_toio(mptr, SCpnt->cmnd, 16); - mptr+=4; - lenptr=mptr++; /* Remember me - fill in when we know */ - + mptr += 4; + lenptr = mptr++; /* Remember me - fill in when we know */ + reqlen = 12; // SINGLE SGE - - /* - * Now fill in the SGList and command - * - * FIXME: we need to set the sglist limits according to the - * message size of the I2O controller. We might only have room - * for 6 or so worst case - */ - - if(SCpnt->use_sg) - { - struct scatterlist *sg = (struct scatterlist *)SCpnt->request_buffer; + + /* Now fill in the SGList and command */ + if (SCpnt->use_sg) { + struct scatterlist *sg; int sg_count; - int chain = 0; - + + sg = SCpnt->request_buffer; len = 0; - sg_count = pci_map_sg(c->pdev, sg, SCpnt->use_sg, - SCpnt->sc_data_direction); + sg_count = dma_map_sg(dev, sg, SCpnt->use_sg, + SCpnt->sc_data_direction); - /* FIXME: handle fail */ - if(!sg_count) - BUG(); - - if((sg_max_frags > 11) && (SCpnt->use_sg > 11)) - { - chain = 1; - /* - * Need to chain! - */ - i2o_raw_writel(direction|0xB0000000|(SCpnt->use_sg*2*4), mptr++); - i2o_raw_writel(virt_to_bus(sg_chain_pool + sg_chain_tag), mptr); - mptr = (u32*)(sg_chain_pool + sg_chain_tag); - if (SCpnt->use_sg > max_sg_len) - { - max_sg_len = SCpnt->use_sg; - printk("i2o_scsi: Chain SG! SCpnt=%p, SG_FragCnt=%d, SG_idx=%d\n", - SCpnt, SCpnt->use_sg, sg_chain_tag); - } - if ( ++sg_chain_tag == SG_MAX_BUFS ) - sg_chain_tag = 0; - for(i = 0 ; i < SCpnt->use_sg; i++) - { - *mptr++=cpu_to_le32(direction|0x10000000|sg_dma_len(sg)); - len+=sg_dma_len(sg); - *mptr++=cpu_to_le32(sg_dma_address(sg)); - sg++; - } - mptr[-2]=cpu_to_le32(direction|0xD0000000|sg_dma_len(sg-1)); - } - else - { - for(i = 0 ; i < SCpnt->use_sg; i++) - { - i2o_raw_writel(direction|0x10000000|sg_dma_len(sg), mptr++); - len+=sg->length; - i2o_raw_writel(sg_dma_address(sg), mptr++); - sg++; - } + if (unlikely(sg_count <= 0)) + return -ENOMEM; - /* Make this an end of list. Again evade the 920 bug and - unwanted PCI read traffic */ - - i2o_raw_writel(direction|0xD0000000|sg_dma_len(sg-1), &mptr[-2]); - } - - if(!chain) - reqlen = mptr - msg; - - i2o_raw_writel(len, lenptr); - - if(len != SCpnt->underflow) - printk("Cmd len %08X Cmd underflow %08X\n", - len, SCpnt->underflow); - } - else - { - dprintk(KERN_INFO "non sg for %p, %d\n", SCpnt->request_buffer, - SCpnt->request_bufflen); - i2o_raw_writel(len = SCpnt->request_bufflen, lenptr); - if(len == 0) - { - reqlen = 9; + for (i = SCpnt->use_sg; i > 0; i--) { + if (i == 1) + sg_flags |= 0xC0000000; + writel(sg_flags | sg_dma_len(sg), mptr++); + writel(sg_dma_address(sg), mptr++); + len += sg_dma_len(sg); + sg++; } - else - { + + reqlen = mptr - &msg->u.head[0]; + writel(len, lenptr); + } else { + len = SCpnt->request_bufflen; + + writel(len, lenptr); + + if (len > 0) { dma_addr_t dma_addr; - dma_addr = pci_map_single(c->pdev, - SCpnt->request_buffer, - SCpnt->request_bufflen, - SCpnt->sc_data_direction); - if(dma_addr == 0) - BUG(); /* How to handle ?? */ - SCpnt->SCp.ptr = (char *)(unsigned long) dma_addr; - i2o_raw_writel(0xD0000000|direction|SCpnt->request_bufflen, mptr++); - i2o_raw_writel(dma_addr, mptr++); - } + + dma_addr = dma_map_single(dev, SCpnt->request_buffer, + SCpnt->request_bufflen, + SCpnt->sc_data_direction); + if (!dma_addr) + return -ENOMEM; + + SCpnt->SCp.ptr = (void *)(unsigned long)dma_addr; + sg_flags |= 0xC0000000; + writel(sg_flags | SCpnt->request_bufflen, mptr++); + writel(dma_addr, mptr++); + } else + reqlen = 9; } - - /* - * Stick the headers on - */ - i2o_raw_writel(reqlen<<16 | SGL_OFFSET_10, msg); - + /* Stick the headers on */ + writel(reqlen << 16 | SGL_OFFSET_10, &msg->u.head[0]); + /* Queue the message */ - i2o_post_message(c,m); - - atomic_inc(&queue_depth); - - if(atomic_read(&queue_depth)> max_qd) - { - max_qd=atomic_read(&queue_depth); - printk("Queue depth now %d.\n", max_qd); - } - - mb(); - dprintk(KERN_INFO "Issued %ld\n", current_command->serial_number); - + i2o_msg_post(c, m); + + pr_debug("Issued %ld\n", SCpnt->serial_number); + return 0; -} +}; /** - * i2o_scsi_abort - abort a running command + * i2o_scsi_abort - abort a running command * @SCpnt: command to abort * * Ask the I2O controller to abort a command. This is an asynchrnous - * process and our callback handler will see the command complete - * with an aborted message if it succeeds. + * process and our callback handler will see the command complete with an + * aborted message if it succeeds. * - * Locks: no locks are held or needed + * Returns 0 if the command is successfully aborted or negative error code + * on failure. */ - -static int i2o_scsi_abort(struct scsi_cmnd * SCpnt) +int i2o_scsi_abort(struct scsi_cmnd *SCpnt) { + struct i2o_device *i2o_dev; struct i2o_controller *c; - struct Scsi_Host *host; - struct i2o_scsi_host *hostdata; - u32 msg[5]; + struct i2o_message *msg; + u32 m; int tid; int status = FAILED; - - printk(KERN_WARNING "i2o_scsi: Aborting command block.\n"); - - host = SCpnt->device->host; - hostdata = (struct i2o_scsi_host *)host->hostdata; - tid = hostdata->task[SCpnt->device->id][SCpnt->device->lun]; - if(tid==-1) - { - printk(KERN_ERR "i2o_scsi: Impossible command to abort!\n"); - return status; - } - c = hostdata->controller; - - spin_unlock_irq(host->host_lock); - - msg[0] = FIVE_WORD_MSG_SIZE; - msg[1] = I2O_CMD_SCSI_ABORT<<24|HOST_TID<<12|tid; - msg[2] = scsi_context; - msg[3] = 0; - msg[4] = i2o_context_list_remove(SCpnt, c); - if(i2o_post_wait(c, msg, sizeof(msg), 240)) - status = SUCCESS; - - spin_lock_irq(host->host_lock); - return status; -} - -/** - * i2o_scsi_bus_reset - Issue a SCSI reset - * @SCpnt: the command that caused the reset - * - * Perform a SCSI bus reset operation. In I2O this is just a message - * we pass. I2O can do clever multi-initiator and shared reset stuff - * but we don't support this. - * - * Locks: called with no lock held, requires no locks. - */ - -static int i2o_scsi_bus_reset(struct scsi_cmnd * SCpnt) -{ - int tid; - struct i2o_controller *c; - struct Scsi_Host *host; - struct i2o_scsi_host *hostdata; - u32 m; - void *msg; - unsigned long timeout; - - - /* - * Find the TID for the bus - */ - - - host = SCpnt->device->host; - spin_unlock_irq(host->host_lock); - - printk(KERN_WARNING "i2o_scsi: Attempting to reset the bus.\n"); - - hostdata = (struct i2o_scsi_host *)host->hostdata; - tid = hostdata->bus_task; - c = hostdata->controller; + printk(KERN_WARNING "i2o_scsi: Aborting command block.\n"); - /* - * Now send a SCSI reset request. Any remaining commands - * will be aborted by the IOP. We need to catch the reply - * possibly ? - */ + i2o_dev = SCpnt->device->hostdata; + c = i2o_dev->iop; + tid = i2o_dev->lct_data.tid; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return SCSI_MLQUEUE_HOST_BUSY; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_SCSI_ABORT << 24 | HOST_TID << 12 | tid, + &msg->u.head[1]); + writel(i2o_cntxt_list_get_ptr(c, SCpnt), &msg->body[0]); - timeout = jiffies+2*HZ; - do - { - m = le32_to_cpu(I2O_POST_READ32(c)); - if(m != 0xFFFFFFFF) - break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(1); - mb(); - } - while(time_before(jiffies, timeout)); - - - msg = c->msg_virt + m; - i2o_raw_writel(FOUR_WORD_MSG_SIZE|SGL_OFFSET_0, msg); - i2o_raw_writel(I2O_CMD_SCSI_BUSRESET<<24|HOST_TID<<12|tid, msg+4); - i2o_raw_writel(scsi_context|0x80000000, msg+8); - /* We use the top bit to split controller and unit transactions */ - /* Now store unit,tid so we can tie the completion back to a specific device */ - __raw_writel(c->unit << 16 | tid, msg+12); - wmb(); - - /* We want the command to complete after we return */ - spin_lock_irq(host->host_lock); - i2o_post_message(c,m); + if (i2o_msg_post_wait(c, m, I2O_TIMEOUT_SCSI_SCB_ABORT)) + status = SUCCESS; - /* Should we wait for the reset to complete ? */ - return SUCCESS; + return status; } /** * i2o_scsi_bios_param - Invent disk geometry - * @sdev: scsi device + * @sdev: scsi device * @dev: block layer device * @capacity: size in sectors * @ip: geometry array * - * This is anyones guess quite frankly. We use the same rules everyone + * This is anyones guess quite frankly. We use the same rules everyone * else appears to and hope. It seems to work. */ - -static int i2o_scsi_bios_param(struct scsi_device * sdev, - struct block_device *dev, sector_t capacity, int *ip) + +static int i2o_scsi_bios_param(struct scsi_device *sdev, + struct block_device *dev, sector_t capacity, + int *ip) { int size; @@ -1023,25 +819,64 @@ return 0; } -MODULE_AUTHOR("Red Hat Software"); -MODULE_LICENSE("GPL"); +static struct scsi_host_template i2o_scsi_host_template = { + .proc_name = "SCSI-OSM", + .name = "I2O SCSI Peripheral OSM", + .info = i2o_scsi_info, + .queuecommand = i2o_scsi_queuecommand, + .eh_abort_handler = i2o_scsi_abort, + .bios_param = i2o_scsi_bios_param, + .can_queue = I2O_SCSI_CAN_QUEUE, + .sg_tablesize = 8, + .cmd_per_lun = 6, + .use_clustering = ENABLE_CLUSTERING, +}; + +/* +int +i2o_scsi_queuecommand(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *)) +{ + printk(KERN_INFO "queuecommand\n"); + return SCSI_MLQUEUE_HOST_BUSY; +}; +*/ + +/** + * i2o_scsi_init - SCSI OSM initialization function + * + * Register SCSI OSM into I2O core. + * + * Returns 0 on success or negative error code on failure. + */ +static int __init i2o_scsi_init(void) +{ + int rc; + printk(KERN_INFO "I2O SCSI Peripheral OSM\n"); -static struct scsi_host_template driver_template = { - .proc_name = "i2o_scsi", - .name = "I2O SCSI Layer", - .detect = i2o_scsi_detect, - .release = i2o_scsi_release, - .info = i2o_scsi_info, - .queuecommand = i2o_scsi_queuecommand, - .eh_abort_handler = i2o_scsi_abort, - .eh_bus_reset_handler = i2o_scsi_bus_reset, - .bios_param = i2o_scsi_bios_param, - .can_queue = I2O_SCSI_CAN_QUEUE, - .this_id = 15, - .sg_tablesize = 8, - .cmd_per_lun = 6, - .use_clustering = ENABLE_CLUSTERING, + /* Register SCSI OSM into I2O core */ + rc = i2o_driver_register(&i2o_scsi_driver); + if (rc) { + printk(KERN_ERR "scsi-osm: Could not register SCSI driver\n"); + return rc; + } + + return 0; }; -#include "../../scsi/scsi_module.c" +/** + * i2o_scsi_exit - SCSI OSM exit function + * + * Unregisters SCSI OSM from I2O core. + */ +static void __exit i2o_scsi_exit(void) +{ + /* Unregister I2O SCSI OSM from I2O core */ + i2o_driver_unregister(&i2o_scsi_driver); +}; + +MODULE_AUTHOR("Red Hat Software"); +MODULE_LICENSE("GPL"); + +module_init(i2o_scsi_init); +module_exit(i2o_scsi_exit); diff -Nru a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/iop.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1258 @@ +/* + * Functions to handle I2O controllers and I2O message handling + * + * Copyright (C) 1999-2002 Red Hat Software + * + * Written by Alan Cox, Building Number Three Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * A lot of the I2O message side code from this is taken from the + * Red Creek RCPCI45 adapter driver by Red Creek Communications + * + * Fixes/additions: + * Philipp Rumpf + * Juha Sievänen + * Auvo Häkkinen + * Deepak Saxena + * Boji T Kannanthanam + * Alan Cox : + * Ported to Linux 2.5. + * Markus Lidel : + * Minor fixes for 2.6. + */ + +#include +#include + +/* global I2O controller list */ +LIST_HEAD(i2o_controllers); + +/* + * global I2O System Table. Contains information about all the IOPs in the + * system. Used to inform IOPs about each others existence. + */ +static struct i2o_dma i2o_systab; + +/* Module internal functions from other sources */ +extern struct i2o_driver i2o_exec_driver; +extern int i2o_exec_lct_get(struct i2o_controller *); +extern void i2o_device_remove(struct i2o_device *); + +extern int __init i2o_driver_init(void); +extern void __exit i2o_driver_exit(void); +extern int __init i2o_exec_init(void); +extern void __exit i2o_exec_exit(void); +extern int __init i2o_pci_init(void); +extern void __exit i2o_pci_exit(void); +extern int i2o_device_init(void); +extern void i2o_device_exit(void); + +/** + * i2o_msg_nop - Returns a message which is not used + * @c: I2O controller from which the message was created + * @m: message which should be returned + * + * If you fetch a message via i2o_msg_get, and can't use it, you must + * return the message with this function. Otherwise the message frame + * is lost. + */ +void i2o_msg_nop(struct i2o_controller *c, u32 m) +{ + struct i2o_message *msg = c->in_queue.virt + m; + + writel(THREE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(0, &msg->u.head[2]); + writel(0, &msg->u.head[3]); + i2o_msg_post(c, m); +}; + +/** + * i2o_msg_get_wait - obtain an I2O message from the IOP + * @c: I2O controller + * @msg: pointer to a I2O message pointer + * @wait: how long to wait until timeout + * + * This function waits up to wait seconds for a message slot to be + * available. + * + * On a success the message is returned and the pointer to the message is + * set in msg. The returned message is the physical page frame offset + * address from the read port (see the i2o spec). If no message is + * available returns I2O_QUEUE_EMPTY and msg is leaved untouched. + */ +u32 i2o_msg_get_wait(struct i2o_controller *c, struct i2o_message **msg, + int wait) +{ + unsigned long timeout = jiffies + wait * HZ; + u32 m; + + while ((m = i2o_msg_get(c, msg)) == I2O_QUEUE_EMPTY) { + if (time_after(jiffies, timeout)) { + pr_debug("%s: Timeout waiting for message frame.\n", + c->name); + return I2O_QUEUE_EMPTY; + } + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + } + + return m; +}; + +#if BITS_PER_LONG == 64 +/** + * i2o_cntxt_list_add - Append a pointer to context list and return a id + * @c: controller to which the context list belong + * @ptr: pointer to add to the context list + * + * Because the context field in I2O is only 32-bit large, on 64-bit the + * pointer is to large to fit in the context field. The i2o_cntxt_list + * functions therefore map pointers to context fields. + * + * Returns context id > 0 on success or 0 on failure. + */ +u32 i2o_cntxt_list_add(struct i2o_controller *c, void *ptr) +{ + struct i2o_context_list_element *entry; + unsigned long flags; + + if (!ptr) + printk(KERN_ERR "NULL pointer found!\n"); + + entry = kmalloc(sizeof(*entry), GFP_ATOMIC); + if (!entry) { + printk(KERN_ERR "i2o: Could not allocate memory for context " + "list element\n"); + return 0; + } + + entry->ptr = ptr; + entry->timestamp = jiffies; + INIT_LIST_HEAD(&entry->list); + + spin_lock_irqsave(&c->context_list_lock, flags); + + if (unlikely(atomic_inc_and_test(&c->context_list_counter))) + atomic_inc(&c->context_list_counter); + + entry->context = atomic_read(&c->context_list_counter); + + list_add(&entry->list, &c->context_list); + + spin_unlock_irqrestore(&c->context_list_lock, flags); + + pr_debug("Add context to list %p -> %d\n", ptr, context); + + return entry->context; +}; + +/** + * i2o_cntxt_list_remove - Remove a pointer from the context list + * @c: controller to which the context list belong + * @ptr: pointer which should be removed from the context list + * + * Removes a previously added pointer from the context list and returns + * the matching context id. + * + * Returns context id on succes or 0 on failure. + */ +u32 i2o_cntxt_list_remove(struct i2o_controller *c, void *ptr) +{ + struct i2o_context_list_element *entry; + u32 context = 0; + unsigned long flags; + + spin_lock_irqsave(&c->context_list_lock, flags); + list_for_each_entry(entry, &c->context_list, list) + if (entry->ptr == ptr) { + list_del(&entry->list); + context = entry->context; + kfree(entry); + break; + } + spin_unlock_irqrestore(&c->context_list_lock, flags); + + if (!context) + printk(KERN_WARNING "i2o: Could not remove nonexistent ptr " + "%p\n", ptr); + + pr_debug("remove ptr from context list %d -> %p\n", context, ptr); + + return context; +}; + +/** + * i2o_cntxt_list_get - Get a pointer from the context list and remove it + * @c: controller to which the context list belong + * @context: context id to which the pointer belong + * + * Returns pointer to the matching context id on success or NULL on + * failure. + */ +void *i2o_cntxt_list_get(struct i2o_controller *c, u32 context) +{ + struct i2o_context_list_element *entry; + unsigned long flags; + void *ptr = NULL; + + spin_lock_irqsave(&c->context_list_lock, flags); + list_for_each_entry(entry, &c->context_list, list) + if (entry->context == context) { + list_del(&entry->list); + ptr = entry->ptr; + kfree(entry); + break; + } + spin_unlock_irqrestore(&c->context_list_lock, flags); + + if (!ptr) + printk(KERN_WARNING "i2o: context id %d not found\n", context); + + pr_debug("get ptr from context list %d -> %p\n", context, ptr); + + return ptr; +}; + +/** + * i2o_cntxt_list_get_ptr - Get a context id from the context list + * @c: controller to which the context list belong + * @ptr: pointer to which the context id should be fetched + * + * Returns context id which matches to the pointer on succes or 0 on + * failure. + */ +u32 i2o_cntxt_list_get_ptr(struct i2o_controller * c, void *ptr) +{ + struct i2o_context_list_element *entry; + u32 context = 0; + unsigned long flags; + + spin_lock_irqsave(&c->context_list_lock, flags); + list_for_each_entry(entry, &c->context_list, list) + if (entry->ptr == ptr) { + context = entry->context; + break; + } + spin_unlock_irqrestore(&c->context_list_lock, flags); + + if (!context) + printk(KERN_WARNING "i2o: Could not find nonexistent ptr " + "%p\n", ptr); + + pr_debug("get context id from context list %p -> %d\n", ptr, context); + + return context; +}; +#endif + +/** + * i2o_iop_find - Find an I2O controller by id + * @unit: unit number of the I2O controller to search for + * + * Lookup the I2O controller on the controller list. + * + * Returns pointer to the I2O controller on success or NULL if not found. + */ +struct i2o_controller *i2o_find_iop(int unit) +{ + struct i2o_controller *c; + + list_for_each_entry(c, &i2o_controllers, list) { + if (c->unit == unit) + return c; + } + + return NULL; +}; + +/** + * i2o_iop_find_device - Find a I2O device on an I2O controller + * @c: I2O controller where the I2O device hangs on + * @tid: TID of the I2O device to search for + * + * Searches the devices of the I2O controller for a device with TID tid and + * returns it. + * + * Returns a pointer to the I2O device if found, otherwise NULL. + */ +struct i2o_device *i2o_iop_find_device(struct i2o_controller *c, u16 tid) +{ + struct i2o_device *dev; + + list_for_each_entry(dev, &c->devices, list) + if (dev->lct_data.tid == tid) + return dev; + + return NULL; +}; + +/** + * i2o_quiesce_controller - quiesce controller + * @c: controller + * + * Quiesce an IOP. Causes IOP to make external operation quiescent + * (i2o 'READY' state). Internal operation of the IOP continues normally. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_iop_quiesce(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + i2o_status_block *sb = c->status_block.virt; + int rc; + + i2o_status_get(c); + + /* SysQuiesce discarded if IOP not in READY or OPERATIONAL state */ + if ((sb->iop_state != ADAPTER_STATE_READY) && + (sb->iop_state != ADAPTER_STATE_OPERATIONAL)) + return 0; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_SYS_QUIESCE << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + + /* Long timeout needed for quiesce if lots of devices */ + if ((rc = i2o_msg_post_wait(c, m, 240))) + printk(KERN_INFO "%s: Unable to quiesce (status=%#x).\n", + c->name, -rc); + else + pr_debug("%s: Quiesced.\n", c->name); + + i2o_status_get(c); // Entered READY state + + return rc; +}; + +/** + * i2o_iop_enable - move controller from ready to OPERATIONAL + * @c: I2O controller + * + * Enable IOP. This allows the IOP to resume external operations and + * reverses the effect of a quiesce. Returns zero or an error code if + * an error occurs. + */ +static int i2o_iop_enable(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + i2o_status_block *sb = c->status_block.virt; + int rc; + + i2o_status_get(c); + + /* Enable only allowed on READY state */ + if (sb->iop_state != ADAPTER_STATE_READY) + return -EINVAL; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_SYS_ENABLE << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + + /* How long of a timeout do we need? */ + if ((rc = i2o_msg_post_wait(c, m, 240))) + printk(KERN_ERR "%s: Could not enable (status=%#x).\n", + c->name, -rc); + else + pr_debug("%s: Enabled.\n", c->name); + + i2o_status_get(c); // entered OPERATIONAL state + + return rc; +}; + +/** + * i2o_iop_quiesce_all - Quiesce all I2O controllers on the system + * + * Quiesce all I2O controllers which are connected to the system. + */ +static inline void i2o_iop_quiesce_all(void) +{ + struct i2o_controller *c, *tmp; + + list_for_each_entry_safe(c, tmp, &i2o_controllers, list) { + if (!c->no_quiesce) + i2o_iop_quiesce(c); + } +}; + +/** + * i2o_iop_enable_all - Enables all controllers on the system + * + * Enables all I2O controllers which are connected to the system. + */ +static inline void i2o_iop_enable_all(void) +{ + struct i2o_controller *c, *tmp; + + list_for_each_entry_safe(c, tmp, &i2o_controllers, list) + i2o_iop_enable(c); +}; + +/** + * i2o_clear_controller - Bring I2O controller into HOLD state + * @c: controller + * + * Clear an IOP to HOLD state, ie. terminate external operations, clear all + * input queues and prepare for a system restart. IOP's internal operation + * continues normally and the outbound queue is alive. The IOP is not + * expected to rebuild its LCT. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_iop_clear(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + int rc; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + /* Quiesce all IOPs first */ + i2o_iop_quiesce_all(); + + writel(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_ADAPTER_CLEAR << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + + if ((rc = i2o_msg_post_wait(c, m, 30))) + printk(KERN_INFO "%s: Unable to clear (status=%#x).\n", + c->name, -rc); + else + pr_debug("%s: Cleared.\n", c->name); + + /* Enable all IOPs */ + i2o_iop_enable_all(); + + i2o_status_get(c); + + return rc; +} + +/** + * i2o_iop_reset - reset an I2O controller + * @c: controller to reset + * + * Reset the IOP into INIT state and wait until IOP gets into RESET state. + * Terminate all external operations, clear IOP's inbound and outbound + * queues, terminate all DDMs, and reload the IOP's operating environment + * and all local DDMs. The IOP rebuilds its LCT. + */ +static int i2o_iop_reset(struct i2o_controller *c) +{ + u8 *status = c->status.virt; + struct i2o_message *msg; + u32 m; + unsigned long timeout; + i2o_status_block *sb = c->status_block.virt; + int rc = 0; + + pr_debug("Resetting controller\n"); + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + memset(status, 0, 4); + + /* Quiesce all IOPs first */ + i2o_iop_quiesce_all(); + + writel(EIGHT_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_ADAPTER_RESET << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_exec_driver.context, &msg->u.s.icntxt); + writel(0, &msg->u.s.tcntxt); //FIXME: use reasonable transaction context + writel(0, &msg->body[0]); + writel(0, &msg->body[1]); + writel(i2o_ptr_low((void *)c->status.phys), &msg->body[2]); + writel(i2o_ptr_high((void *)c->status.phys), &msg->body[3]); + + i2o_msg_post(c, m); + + /* Wait for a reply */ + timeout = jiffies + I2O_TIMEOUT_RESET * HZ; + while (!*status) { + if (time_after(jiffies, timeout)) { + printk(KERN_ERR "IOP reset timeout.\n"); + rc = -ETIMEDOUT; + goto exit; + } + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + + rmb(); + } + + if (*status == I2O_CMD_IN_PROGRESS) { + /* + * Once the reset is sent, the IOP goes into the INIT state + * which is indeterminate. We need to wait until the IOP + * has rebooted before we can let the system talk to + * it. We read the inbound Free_List until a message is + * available. If we can't read one in the given ammount of + * time, we assume the IOP could not reboot properly. + */ + pr_debug("%s: Reset in progress, waiting for reboot...\n", + c->name); + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET); + while (m == I2O_QUEUE_EMPTY) { + if (time_after(jiffies, timeout)) { + printk(KERN_ERR "IOP reset timeout.\n"); + rc = -ETIMEDOUT; + goto exit; + } + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET); + } + i2o_msg_nop(c, m); + } + + /* from here all quiesce commands are safe */ + c->no_quiesce = 0; + + /* If IopReset was rejected or didn't perform reset, try IopClear */ + i2o_status_get(c); + if (*status == I2O_CMD_REJECTED || sb->iop_state != ADAPTER_STATE_RESET) { + printk(KERN_WARNING "%s: Reset rejected, trying to clear\n", + c->name); + i2o_iop_clear(c); + } else + pr_debug("%s: Reset completed.\n", c->name); + + exit: + /* Enable all IOPs */ + i2o_iop_enable_all(); + + return rc; +}; + +/** + * i2o_iop_init_outbound_queue - setup the outbound message queue + * @c: I2O controller + * + * Clear and (re)initialize IOP's outbound queue and post the message + * frames to the IOP. + * + * Returns 0 on success or a negative errno code on failure. + */ +int i2o_iop_init_outbound_queue(struct i2o_controller *c) +{ + u8 *status = c->status.virt; + u32 m; + struct i2o_message *msg; + ulong timeout; + int i; + + pr_debug("%s: Initializing Outbound Queue...\n", c->name); + + memset(status, 0, 4); + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(EIGHT_WORD_MSG_SIZE | TRL_OFFSET_6, &msg->u.head[0]); + writel(I2O_CMD_OUTBOUND_INIT << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_exec_driver.context, &msg->u.s.icntxt); + writel(0x0106, &msg->u.s.tcntxt); /* FIXME: why 0x0106, maybe in + Spec? */ + writel(PAGE_SIZE, &msg->body[0]); + writel(MSG_FRAME_SIZE << 16 | 0x80, &msg->body[1]); /* Outbound msg frame + size in words and Initcode */ + writel(0xd0000004, &msg->body[2]); + writel(i2o_ptr_low((void *)c->status.phys), &msg->body[3]); + writel(i2o_ptr_high((void *)c->status.phys), &msg->body[4]); + + i2o_msg_post(c, m); + + timeout = jiffies + I2O_TIMEOUT_INIT_OUTBOUND_QUEUE * HZ; + while (*status <= I2O_CMD_IN_PROGRESS) { + if (time_after(jiffies, timeout)) { + printk(KERN_WARNING "%s: Timeout Initializing\n", + c->name); + return -ETIMEDOUT; + } + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + + rmb(); + } + + m = c->out_queue.phys; + + /* Post frames */ + for (i = 0; i < NMBR_MSG_FRAMES; i++) { + i2o_flush_reply(c, m); + m += MSG_FRAME_SIZE * 4; + } + + return 0; +} + +/** + * i2o_iop_activate - Bring controller up to HOLD + * @c: controller + * + * This function brings an I2O controller into HOLD state. The adapter + * is reset if necessary and then the queues and resource table are read. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_iop_activate(struct i2o_controller *c) +{ + i2o_status_block *sb = c->status_block.virt; + int rc; + /* In INIT state, Wait Inbound Q to initialize (in i2o_status_get) */ + /* In READY state, Get status */ + + rc = i2o_status_get(c); + if (rc) { + printk(KERN_INFO "Unable to obtain status of %s, " + "attempting a reset.\n", c->name); + if (i2o_iop_reset(c)) + return rc; + } + + if (sb->i2o_version > I2OVER15) { + printk(KERN_ERR "%s: Not running vrs. 1.5. of the I2O " + "Specification.\n", c->name); + return -ENODEV; + } + + switch (sb->iop_state) { + case ADAPTER_STATE_FAULTED: + printk(KERN_CRIT "%s: hardware fault\n", c->name); + return -ENODEV; + + case ADAPTER_STATE_READY: + case ADAPTER_STATE_OPERATIONAL: + case ADAPTER_STATE_HOLD: + case ADAPTER_STATE_FAILED: + pr_debug("already running, trying to reset...\n"); + if (i2o_iop_reset(c)) + return -ENODEV; + } + + rc = i2o_iop_init_outbound_queue(c); + if (rc) + return rc; + + /* In HOLD state */ + + rc = i2o_hrt_get(c); + if (rc) + return rc; + + return 0; +}; + +/** + * i2o_iop_systab_set - Set the I2O System Table of the specified IOP + * @c: I2O controller to which the system table should be send + * + * Before the systab could be set i2o_systab_build() must be called. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_iop_systab_set(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + i2o_status_block *sb = c->status_block.virt; + struct device *dev = &c->pdev->dev; + struct resource *root; + int rc; + + if (sb->current_mem_size < sb->desired_mem_size) { + struct resource *res = &c->mem_resource; + res->name = c->pdev->bus->name; + res->flags = IORESOURCE_MEM; + res->start = 0; + res->end = 0; + printk("%s: requires private memory resources.\n", c->name); + root = pci_find_parent_resource(c->pdev, res); + if (root == NULL) + printk("Can't find parent resource!\n"); + if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ + NULL, NULL) >= 0) { + c->mem_alloc = 1; + sb->current_mem_size = 1 + res->end - res->start; + sb->current_mem_base = res->start; + printk(KERN_INFO + "%s: allocated %ld bytes of PCI memory at 0x%08lX.\n", + c->name, 1 + res->end - res->start, res->start); + } + } + + if (sb->current_io_size < sb->desired_io_size) { + struct resource *res = &c->io_resource; + res->name = c->pdev->bus->name; + res->flags = IORESOURCE_IO; + res->start = 0; + res->end = 0; + printk("%s: requires private memory resources.\n", c->name); + root = pci_find_parent_resource(c->pdev, res); + if (root == NULL) + printk("Can't find parent resource!\n"); + if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20, /* Unspecified, so use 1Mb and play safe */ + NULL, NULL) >= 0) { + c->io_alloc = 1; + sb->current_io_size = 1 + res->end - res->start; + sb->current_mem_base = res->start; + printk(KERN_INFO + "%s: allocated %ld bytes of PCI I/O at 0x%08lX.\n", + c->name, 1 + res->end - res->start, res->start); + } + } + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + i2o_systab.phys = dma_map_single(dev, i2o_systab.virt, i2o_systab.len, + PCI_DMA_TODEVICE); + if (!i2o_systab.phys) { + i2o_msg_nop(c, m); + return -ENOMEM; + } + + writel(I2O_MESSAGE_SIZE(12) | SGL_OFFSET_6, &msg->u.head[0]); + writel(I2O_CMD_SYS_TAB_SET << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + + /* + * Provide three SGL-elements: + * System table (SysTab), Private memory space declaration and + * Private i/o space declaration + * + * FIXME: is this still true? + * Nasty one here. We can't use dma_alloc_coherent to send the + * same table to everyone. We have to go remap it for them all + */ + + writel(c->unit + 2, &msg->body[0]); + writel(0, &msg->body[1]); + writel(0x54000000 | i2o_systab.phys, &msg->body[2]); + writel(i2o_systab.phys, &msg->body[3]); + writel(0x54000000 | sb->current_mem_size, &msg->body[4]); + writel(sb->current_mem_base, &msg->body[5]); + writel(0xd4000000 | sb->current_io_size, &msg->body[6]); + writel(sb->current_io_base, &msg->body[6]); + + rc = i2o_msg_post_wait(c, m, 120); + + dma_unmap_single(dev, i2o_systab.phys, i2o_systab.len, + PCI_DMA_TODEVICE); + + if (rc < 0) + printk(KERN_ERR "%s: Unable to set SysTab (status=%#x).\n", + c->name, -rc); + else + pr_debug("%s: SysTab set.\n", c->name); + + i2o_status_get(c); // Entered READY state + + return rc; +} + +/** + * i2o_iop_online - Bring a controller online into OPERATIONAL state. + * @c: I2O controller + * + * Send the system table and enable the I2O controller. + * + * Returns 0 on success or negativer error code on failure. + */ +static int i2o_iop_online(struct i2o_controller *c) +{ + int rc; + + rc = i2o_iop_systab_set(c); + if (rc) + return rc; + + /* In READY state */ + pr_debug("%s: Attempting to enable...\n", c->name); + rc = i2o_iop_enable(c); + if (rc) + return rc; + + return 0; +}; + +/** + * i2o_iop_remove - Remove the I2O controller from the I2O core + * @c: I2O controller + * + * Remove the I2O controller from the I2O core. If devices are attached to + * the controller remove these also and finally reset the controller. + */ +void i2o_iop_remove(struct i2o_controller *c) +{ + struct i2o_device *dev, *tmp; + + pr_debug("Deleting controller %s\n", c->name); + + i2o_driver_notify_controller_remove_all(c); + + list_del(&c->list); + + list_for_each_entry_safe(dev, tmp, &c->devices, list) + i2o_device_remove(dev); + + /* Ask the IOP to switch to RESET state */ + i2o_iop_reset(c); +} + +/** + * i2o_systab_build - Build system table + * + * The system table contains information about all the IOPs in the system + * (duh) and is used by the Executives on the IOPs to establish peer2peer + * connections. We're not supporting peer2peer at the moment, but this + * will be needed down the road for things like lan2lan forwarding. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_systab_build(void) +{ + struct i2o_controller *c, *tmp; + int num_controllers = 0; + u32 change_ind = 0; + int count = 0; + struct i2o_sys_tbl *systab = i2o_systab.virt; + + list_for_each_entry_safe(c, tmp, &i2o_controllers, list) + num_controllers++; + + if (systab) { + change_ind = systab->change_ind; + kfree(i2o_systab.virt); + } + + /* Header + IOPs */ + i2o_systab.len = sizeof(struct i2o_sys_tbl) + num_controllers * + sizeof(struct i2o_sys_tbl_entry); + + systab = i2o_systab.virt = kmalloc(i2o_systab.len, GFP_KERNEL); + if (!systab) { + printk(KERN_ERR "i2o: unable to allocate memory for System " + "Table\n"); + return -ENOMEM; + } + memset(systab, 0, i2o_systab.len); + + systab->version = I2OVERSION; + systab->change_ind = change_ind + 1; + + list_for_each_entry_safe(c, tmp, &i2o_controllers, list) { + i2o_status_block *sb; + + if (count >= num_controllers) { + printk(KERN_ERR "i2o: controller added while building " + "system table\n"); + break; + } + + sb = c->status_block.virt; + + /* + * Get updated IOP state so we have the latest information + * + * We should delete the controller at this point if it + * doesn't respond since if it's not on the system table + * it is techninically not part of the I2O subsystem... + */ + if (unlikely(i2o_status_get(c))) { + printk(KERN_ERR "%s: Deleting b/c could not get status" + " while attempting to build system table\n", + c->name); + i2o_iop_remove(c); + continue; // try the next one + } + + systab->iops[count].org_id = sb->org_id; + systab->iops[count].iop_id = c->unit + 2; + systab->iops[count].seg_num = 0; + systab->iops[count].i2o_version = sb->i2o_version; + systab->iops[count].iop_state = sb->iop_state; + systab->iops[count].msg_type = sb->msg_type; + systab->iops[count].frame_size = sb->inbound_frame_size; + systab->iops[count].last_changed = change_ind; + systab->iops[count].iop_capabilities = sb->iop_capabilities; + systab->iops[count].inbound_low = i2o_ptr_low(c->post_port); + systab->iops[count].inbound_high = i2o_ptr_high(c->post_port); + + count++; + } + + systab->num_entries = count; + + return 0; +}; + +/** + * i2o_parse_hrt - Parse the hardware resource table. + * @c: I2O controller + * + * We don't do anything with it except dumping it (in debug mode). + * + * Returns 0. + */ +static int i2o_parse_hrt(struct i2o_controller *c) +{ + i2o_dump_hrt(c); + return 0; +}; + +/** + * i2o_status_get - Get the status block from the I2O controller + * @c: I2O controller + * + * Issue a status query on the controller. This updates the attached + * status block. The status block could then be accessed through + * c->status_block. + * + * Returns 0 on sucess or negative error code on failure. + */ +int i2o_status_get(struct i2o_controller *c) +{ + struct i2o_message *msg; + u32 m; + u8 *status_block; + unsigned long timeout; + + status_block = (u8 *) c->status_block.virt; + memset(status_block, 0, sizeof(i2o_status_block)); + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(NINE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_STATUS_GET << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(i2o_exec_driver.context, &msg->u.s.icntxt); + writel(0, &msg->u.s.tcntxt); // FIXME: use resonable transaction context + writel(0, &msg->body[0]); + writel(0, &msg->body[1]); + writel(i2o_ptr_low((void *)c->status_block.phys), &msg->body[2]); + writel(i2o_ptr_high((void *)c->status_block.phys), &msg->body[3]); + writel(sizeof(i2o_status_block), &msg->body[4]); /* always 88 bytes */ + + i2o_msg_post(c, m); + + /* Wait for a reply */ + timeout = jiffies + I2O_TIMEOUT_STATUS_GET * HZ; + while (status_block[87] != 0xFF) { + if (time_after(jiffies, timeout)) { + printk(KERN_ERR "%s: Get status timeout.\n", c->name); + return -ETIMEDOUT; + } + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + + rmb(); + } + +#ifdef DEBUG + i2o_debug_state(c); +#endif + + return 0; +} + +/* + * i2o_hrt_get - Get the Hardware Resource Table from the I2O controller + * @c: I2O controller from which the HRT should be fetched + * + * The HRT contains information about possible hidden devices but is + * mostly useless to us. + * + * Returns 0 on success or negativer error code on failure. + */ +int i2o_hrt_get(struct i2o_controller *c) +{ + int rc; + int i; + i2o_hrt *hrt = c->hrt.virt; + u32 size = sizeof(i2o_hrt); + struct device *dev = &c->pdev->dev; + + for (i = 0; i < I2O_HRT_GET_TRIES; i++) { + struct i2o_message *msg; + u32 m; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(SIX_WORD_MSG_SIZE | SGL_OFFSET_4, &msg->u.head[0]); + writel(I2O_CMD_HRT_GET << 24 | HOST_TID << 12 | ADAPTER_TID, + &msg->u.head[1]); + writel(0xd0000000 | c->hrt.len, &msg->body[0]); + writel(c->hrt.phys, &msg->body[1]); + + rc = i2o_msg_post_wait_mem(c, m, 20, &c->hrt); + + if (rc < 0) { + printk(KERN_ERR "%s: Unable to get HRT (status=%#x)\n", + c->name, -rc); + return rc; + } + + size = hrt->num_entries * hrt->entry_len << 2; + if (size > c->hrt.len) { + if (i2o_dma_realloc(dev, &c->hrt, size, GFP_KERNEL)) + return -ENOMEM; + else + hrt = c->hrt.virt; + } else + return i2o_parse_hrt(c); + } + + printk(KERN_ERR "%s: Unable to get HRT after %d tries, giving up\n", + c->name, I2O_HRT_GET_TRIES); + + return -EBUSY; +} + +/** + * i2o_iop_alloc - Allocate and initialize a i2o_controller struct + * + * Allocate the necessary memory for a i2o_controller struct and + * initialize the lists. + * + * Returns a pointer to the I2O controller or a negative error code on + * failure. + */ +struct i2o_controller *i2o_iop_alloc(void) +{ + static int unit = 0; /* 0 and 1 are NULL IOP and Local Host */ + struct i2o_controller *c; + + c = kmalloc(sizeof(*c), GFP_KERNEL); + if (!c) { + printk(KERN_ERR "i2o: Insufficient memory to allocate the " + "controller.\n"); + return ERR_PTR(-ENOMEM); + } + memset(c, 0, sizeof(*c)); + + INIT_LIST_HEAD(&c->devices); + c->lock = SPIN_LOCK_UNLOCKED; + init_MUTEX(&c->lct_lock); + c->unit = unit++; + sprintf(c->name, "iop%d", c->unit); + +#if BITS_PER_LONG == 64 + c->context_list_lock = SPIN_LOCK_UNLOCKED; + atomic_set(&c->context_list_counter, 0); + INIT_LIST_HEAD(&c->context_list); +#endif + + return c; +}; + +/** + * i2o_iop_free - Free the i2o_controller struct + * @c: I2O controller to free + */ +void i2o_iop_free(struct i2o_controller *c) +{ + kfree(c); +}; + +/** + * i2o_iop_add - Initialize the I2O controller and add him to the I2O core + * @c: controller + * + * Initialize the I2O controller and if no error occurs add him to the I2O + * core. + * + * Returns 0 on success or negative error code on failure. + */ +int i2o_iop_add(struct i2o_controller *c) +{ + int rc; + + printk(KERN_INFO "%s: Activating I2O controller...\n", c->name); + printk(KERN_INFO "%s: This may take a few minutes if there are many " + "devices\n", c->name); + + if ((rc = i2o_iop_activate(c))) { + printk(KERN_ERR "%s: controller could not activated\n", + c->name); + i2o_iop_reset(c); + return rc; + } + + pr_debug("building sys table %s...\n", c->name); + + if ((rc = i2o_systab_build())) { + i2o_iop_reset(c); + return rc; + } + + pr_debug("online controller %s...\n", c->name); + + if ((rc = i2o_iop_online(c))) { + i2o_iop_reset(c); + return rc; + } + + pr_debug("getting LCT %s...\n", c->name); + + if ((rc = i2o_exec_lct_get(c))) { + i2o_iop_reset(c); + return rc; + } + + list_add(&c->list, &i2o_controllers); + + i2o_driver_notify_controller_add_all(c); + + printk(KERN_INFO "%s: Controller added\n", c->name); + + return 0; +}; + +/** + * i2o_event_register - Turn on/off event notification for a I2O device + * @dev: I2O device which should receive the event registration request + * @drv: driver which want to get notified + * @tcntxt: transaction context to use with this notifier + * @evt_mask: mask of events + * + * Create and posts an event registration message to the task. No reply + * is waited for, or expected. If you do not want further notifications, + * call the i2o_event_register again with a evt_mask of 0. + * + * Returns 0 on success or -ETIMEDOUT if no message could be fetched for + * sending the request. + */ +int i2o_event_register(struct i2o_device *dev, struct i2o_driver *drv, + int tcntxt, u32 evt_mask) +{ + struct i2o_controller *c = dev->iop; + struct i2o_message *msg; + u32 m; + + m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET); + if (m == I2O_QUEUE_EMPTY) + return -ETIMEDOUT; + + writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); + writel(I2O_CMD_UTIL_EVT_REGISTER << 24 | HOST_TID << 12 | dev->lct_data. + tid, &msg->u.head[1]); + writel(drv->context, &msg->u.s.icntxt); + writel(tcntxt, &msg->u.s.tcntxt); + writel(evt_mask, &msg->body[0]); + + i2o_msg_post(c, m); + + return 0; +}; + +/** + * i2o_iop_init - I2O main initialization function + * + * Initialize the I2O drivers (OSM) functions, register the Executive OSM, + * initialize the I2O PCI part and finally initialize I2O device stuff. + * + * Returns 0 on success or negative error code on failure. + */ +static int __init i2o_iop_init(void) +{ + int rc = 0; + + printk(KERN_INFO "I2O Core - (C) Copyright 1999 Red Hat Software\n"); + + rc = i2o_device_init(); + if (rc) + goto exit; + + rc = i2o_driver_init(); + if (rc) + goto device_exit; + + rc = i2o_exec_init(); + if (rc) + goto driver_exit; + + rc = i2o_pci_init(); + if (rc < 0) + goto exec_exit; + + return 0; + + exec_exit: + i2o_exec_exit(); + + driver_exit: + i2o_driver_exit(); + + device_exit: + i2o_device_exit(); + + exit: + return rc; +} + +/** + * i2o_iop_exit - I2O main exit function + * + * Removes I2O controllers from PCI subsystem and shut down OSMs. + */ +static void __exit i2o_iop_exit(void) +{ + i2o_pci_exit(); + i2o_exec_exit(); + i2o_driver_exit(); + i2o_device_exit(); +}; + +module_init(i2o_iop_init); +module_exit(i2o_iop_exit); + +MODULE_AUTHOR("Red Hat Software"); +MODULE_DESCRIPTION("I2O Core"); +MODULE_LICENSE("GPL"); + +#if BITS_PER_LONG == 64 +EXPORT_SYMBOL(i2o_cntxt_list_add); +EXPORT_SYMBOL(i2o_cntxt_list_get); +EXPORT_SYMBOL(i2o_cntxt_list_remove); +EXPORT_SYMBOL(i2o_cntxt_list_get_ptr); +#endif +EXPORT_SYMBOL(i2o_msg_get_wait); +EXPORT_SYMBOL(i2o_msg_nop); +EXPORT_SYMBOL(i2o_find_iop); +EXPORT_SYMBOL(i2o_iop_find_device); +EXPORT_SYMBOL(i2o_event_register); +EXPORT_SYMBOL(i2o_status_get); +EXPORT_SYMBOL(i2o_hrt_get); +EXPORT_SYMBOL(i2o_controllers); diff -Nru a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/message/i2o/pci.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,513 @@ +/* + * PCI handling of I2O controller + * + * Copyright (C) 1999-2002 Red Hat Software + * + * Written by Alan Cox, Building Number Three Ltd + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * A lot of the I2O message side code from this is taken from the Red + * Creek RCPCI45 adapter driver by Red Creek Communications + * + * Fixes/additions: + * Philipp Rumpf + * Juha Sievänen + * Auvo Häkkinen + * Deepak Saxena + * Boji T Kannanthanam + * Alan Cox : + * Ported to Linux 2.5. + * Markus Lidel : + * Minor fixes for 2.6. + * Markus Lidel : + * Support for sysfs included. + */ + +#include +#include +#include + +#ifdef CONFIG_MTRR +#include +#endif // CONFIG_MTRR + +/* Module internal functions from other sources */ +extern struct i2o_controller *i2o_iop_alloc(void); +extern void i2o_iop_free(struct i2o_controller *); + +extern int i2o_iop_add(struct i2o_controller *); +extern void i2o_iop_remove(struct i2o_controller *); + +extern int i2o_driver_dispatch(struct i2o_controller *, u32, + struct i2o_message *); + +/* PCI device id table for all I2O controllers */ +static struct pci_device_id __devinitdata i2o_pci_ids[] = { + {PCI_DEVICE_CLASS(PCI_CLASS_INTELLIGENT_I2O << 8, 0xffff00)}, + {PCI_DEVICE(PCI_VENDOR_ID_DPT, 0xa511)}, + {0} +}; + +/** + * i2o_dma_realloc - Realloc DMA memory + * @dev: struct device pointer to the PCI device of the I2O controller + * @addr: pointer to a i2o_dma struct DMA buffer + * @len: new length of memory + * @gfp_mask: GFP mask + * + * If there was something allocated in the addr, free it first. If len > 0 + * than try to allocate it and write the addresses back to the addr + * structure. If len == 0 set the virtual address to NULL. + * + * Returns the 0 on success or negative error code on failure. + */ +int i2o_dma_realloc(struct device *dev, struct i2o_dma *addr, size_t len, + unsigned int gfp_mask) +{ + i2o_dma_free(dev, addr); + + if (len) + return i2o_dma_alloc(dev, addr, len, gfp_mask); + + return 0; +}; + +/** + * i2o_pci_free - Frees the DMA memory for the I2O controller + * @c: I2O controller to free + * + * Remove all allocated DMA memory and unmap memory IO regions. If MTRR + * is enabled, also remove it again. + */ +static void __devexit i2o_pci_free(struct i2o_controller *c) +{ + struct device *dev; + + dev = &c->pdev->dev; + + i2o_dma_free(dev, &c->out_queue); + i2o_dma_free(dev, &c->status_block); + if (c->lct) + kfree(c->lct); + i2o_dma_free(dev, &c->dlct); + i2o_dma_free(dev, &c->hrt); + i2o_dma_free(dev, &c->status); + +#ifdef CONFIG_MTRR + if (c->mtrr_reg0 >= 0) + mtrr_del(c->mtrr_reg0, 0, 0); + if (c->mtrr_reg1 >= 0) + mtrr_del(c->mtrr_reg1, 0, 0); +#endif + + if (c->raptor && c->in_queue.virt) + iounmap(c->in_queue.virt); + + if (c->base.virt) + iounmap(c->base.virt); +} + +/** + * i2o_pci_alloc - Allocate DMA memory, map IO memory for I2O controller + * @c: I2O controller + * + * Allocate DMA memory for a PCI (or in theory AGP) I2O controller. All + * IO mappings are also done here. If MTRR is enabled, also do add memory + * regions here. + * + * Returns 0 on success or negative error code on failure. + */ +static int __devinit i2o_pci_alloc(struct i2o_controller *c) +{ + struct pci_dev *pdev = c->pdev; + struct device *dev = &pdev->dev; + int i; + + for (i = 0; i < 6; i++) { + /* Skip I/O spaces */ + if (!(pci_resource_flags(pdev, i) & IORESOURCE_IO)) { + if (!c->base.phys) { + c->base.phys = pci_resource_start(pdev, i); + c->base.len = pci_resource_len(pdev, i); + if (!c->raptor) + break; + } else { + c->in_queue.phys = pci_resource_start(pdev, i); + c->in_queue.len = pci_resource_len(pdev, i); + break; + } + } + } + + if (i == 6) { + printk(KERN_ERR "i2o: I2O controller has no memory regions" + " defined.\n"); + i2o_pci_free(c); + return -EINVAL; + } + + /* Map the I2O controller */ + if (c->raptor) { + printk(KERN_INFO "i2o: PCI I2O controller\n"); + printk(KERN_INFO " BAR0 at 0x%08lX size=%ld\n", + (unsigned long)c->base.phys, (unsigned long)c->base.len); + printk(KERN_INFO " BAR1 at 0x%08lX size=%ld\n", + (unsigned long)c->in_queue.phys, + (unsigned long)c->in_queue.len); + } else + printk(KERN_INFO "i2o: PCI I2O controller at %08lX size=%ld\n", + (unsigned long)c->base.phys, (unsigned long)c->base.len); + + c->base.virt = ioremap(c->base.phys, c->base.len); + if (!c->base.virt) { + printk(KERN_ERR "i2o: Unable to map controller.\n"); + return -ENOMEM; + } + + if (c->raptor) { + c->in_queue.virt = ioremap(c->in_queue.phys, c->in_queue.len); + if (!c->in_queue.virt) { + printk(KERN_ERR "i2o: Unable to map controller.\n"); + i2o_pci_free(c); + return -ENOMEM; + } + } else + c->in_queue = c->base; + + c->irq_mask = c->base.virt + 0x34; + c->post_port = c->base.virt + 0x40; + c->reply_port = c->base.virt + 0x44; + +#ifdef CONFIG_MTRR + /* Enable Write Combining MTRR for IOP's memory region */ + c->mtrr_reg0 = mtrr_add(c->in_queue.phys, c->in_queue.len, + MTRR_TYPE_WRCOMB, 1); + c->mtrr_reg1 = -1; + + if (c->mtrr_reg0 < 0) + printk(KERN_WARNING "i2o: could not enable write combining " + "MTRR\n"); + else + printk(KERN_INFO "i2o: using write combining MTRR\n"); + + /* + * If it is an INTEL i960 I/O processor then set the first 64K to + * Uncacheable since the region contains the messaging unit which + * shouldn't be cached. + */ + if ((pdev->vendor == PCI_VENDOR_ID_INTEL || + pdev->vendor == PCI_VENDOR_ID_DPT) && !c->raptor) { + printk(KERN_INFO "i2o: MTRR workaround for Intel i960 processor" + "\n"); + c->mtrr_reg1 = mtrr_add(c->base.phys, 0x10000, + MTRR_TYPE_UNCACHABLE, 1); + + if (c->mtrr_reg1 < 0) { + printk(KERN_WARNING "i2o_pci: Error in setting " + "MTRR_TYPE_UNCACHABLE\n"); + mtrr_del(c->mtrr_reg0, c->in_queue.phys, + c->in_queue.len); + c->mtrr_reg0 = -1; + } + } +#endif + + if (i2o_dma_alloc(dev, &c->status, 4, GFP_KERNEL)) { + i2o_pci_free(c); + return -ENOMEM; + } + + if (i2o_dma_alloc(dev, &c->hrt, sizeof(i2o_hrt), GFP_KERNEL)) { + i2o_pci_free(c); + return -ENOMEM; + } + + if (i2o_dma_alloc(dev, &c->dlct, 8192, GFP_KERNEL)) { + i2o_pci_free(c); + return -ENOMEM; + } + + if (i2o_dma_alloc(dev, &c->status_block, sizeof(i2o_status_block), + GFP_KERNEL)) { + i2o_pci_free(c); + return -ENOMEM; + } + + if (i2o_dma_alloc(dev, &c->out_queue, MSG_POOL_SIZE, GFP_KERNEL)) { + i2o_pci_free(c); + return -ENOMEM; + } + + pci_set_drvdata(pdev, c); + + return 0; +} + +/** + * i2o_pci_interrupt - Interrupt handler for I2O controller + * @irq: interrupt line + * @dev_id: pointer to the I2O controller + * @r: pointer to registers + * + * Handle an interrupt from a PCI based I2O controller. This turns out + * to be rather simple. We keep the controller pointer in the cookie. + */ +static irqreturn_t i2o_pci_interrupt(int irq, void *dev_id, struct pt_regs *r) +{ + struct i2o_controller *c = dev_id; + struct device *dev = &c->pdev->dev; + struct i2o_message *m; + u32 mv; + u32 *msg; + + /* + * Old 960 steppings had a bug in the I2O unit that caused + * the queue to appear empty when it wasn't. + */ + mv = I2O_REPLY_READ32(c); + if (mv == I2O_QUEUE_EMPTY) { + mv = I2O_REPLY_READ32(c); + if (unlikely(mv == I2O_QUEUE_EMPTY)) { + return IRQ_NONE; + } else + pr_debug("960 bug detected\n"); + } + + while (mv != I2O_QUEUE_EMPTY) { + /* + * Map the message from the page frame map to kernel virtual. + * Because bus_to_virt is deprecated, we have calculate the + * location by ourself! + */ + m = (struct i2o_message *)(mv - + (unsigned long)c->out_queue.phys + + (unsigned long)c->out_queue.virt); + + msg = (u32 *) m; + + /* + * Ensure this message is seen coherently but cachably by + * the processor + */ + dma_sync_single_for_cpu(dev, c->out_queue.phys, MSG_FRAME_SIZE, + PCI_DMA_FROMDEVICE); + + /* dispatch it */ + if (i2o_driver_dispatch(c, mv, m)) + /* flush it if result != 0 */ + i2o_flush_reply(c, mv); + + /* + * That 960 bug again... + */ + mv = I2O_REPLY_READ32(c); + if (mv == I2O_QUEUE_EMPTY) + mv = I2O_REPLY_READ32(c); + } + return IRQ_HANDLED; +} + +/** + * i2o_pci_irq_enable - Allocate interrupt for I2O controller + * + * Allocate an interrupt for the I2O controller, and activate interrupts + * on the I2O controller. + * + * Returns 0 on success or negative error code on failure. + */ +static int i2o_pci_irq_enable(struct i2o_controller *c) +{ + struct pci_dev *pdev = c->pdev; + int rc; + + I2O_IRQ_WRITE32(c, 0xffffffff); + + if (pdev->irq) { + rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ, + c->name, c); + if (rc < 0) { + printk(KERN_ERR "%s: unable to allocate interrupt %d." + "\n", c->name, pdev->irq); + return rc; + } + } + + I2O_IRQ_WRITE32(c, 0x00000000); + + printk(KERN_INFO "%s: Installed at IRQ %d\n", c->name, pdev->irq); + + return 0; +} + +/** + * i2o_pci_irq_disable - Free interrupt for I2O controller + * @c: I2O controller + * + * Disable interrupts in I2O controller and then free interrupt. + */ +static void i2o_pci_irq_disable(struct i2o_controller *c) +{ + I2O_IRQ_WRITE32(c, 0xffffffff); + + if (c->pdev->irq > 0) + free_irq(c->pdev->irq, c); +} + +/** + * i2o_pci_probe - Probe the PCI device for an I2O controller + * @dev: PCI device to test + * @id: id which matched with the PCI device id table + * + * Probe the PCI device for any device which is a memory of the + * Intelligent, I2O class or an Adaptec Zero Channel Controller. We + * attempt to set up each such device and register it with the core. + * + * Returns 0 on success or negative error code on failure. + */ +static int __devinit i2o_pci_probe(struct pci_dev *pdev, + const struct pci_device_id *id) +{ + struct i2o_controller *c; + int rc; + + printk(KERN_INFO "i2o: Checking for PCI I2O controllers...\n"); + + if ((pdev->class & 0xff) > 1) { + printk(KERN_WARNING "i2o: I2O controller found but does not " + "support I2O 1.5 (skipping).\n"); + return -ENODEV; + } + + if ((rc = pci_enable_device(pdev))) { + printk(KERN_WARNING "i2o: I2O controller found but could not be" + " enabled.\n"); + return rc; + } + + printk(KERN_INFO "i2o: I2O controller found on bus %d at %d.\n", + pdev->bus->number, pdev->devfn); + + if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { + printk(KERN_WARNING "i2o: I2O controller on bus %d at %d: No " + "suitable DMA available!\n", pdev->bus->number, + pdev->devfn); + rc = -ENODEV; + goto disable; + } + + pci_set_master(pdev); + + c = i2o_iop_alloc(); + if (IS_ERR(c)) { + printk(KERN_ERR "i2o: memory for I2O controller could not be " + "allocated\n"); + rc = PTR_ERR(c); + goto disable; + } + + c->pdev = pdev; + c->device = pdev->dev; + + /* Cards that fall apart if you hit them with large I/O loads... */ + if (pdev->vendor == PCI_VENDOR_ID_NCR && pdev->device == 0x0630) { + c->short_req = 1; + printk(KERN_INFO "i2o: Symbios FC920 workarounds activated.\n"); + } + + if (pdev->subsystem_vendor == PCI_VENDOR_ID_PROMISE) { + c->promise = 1; + printk(KERN_INFO "i2o: Promise workarounds activated.\n"); + } + + /* Cards that go bananas if you quiesce them before you reset them. */ + if (pdev->vendor == PCI_VENDOR_ID_DPT) { + c->no_quiesce = 1; + if (pdev->device == 0xa511) + c->raptor = 1; + } + + if ((rc = i2o_pci_alloc(c))) { + printk(KERN_ERR "i2o: DMA / IO allocation for I2O controller " + " failed\n"); + goto free_controller; + } + + if (i2o_pci_irq_enable(c)) { + printk(KERN_ERR "i2o: unable to enable interrupts for I2O " + "controller\n"); + goto free_pci; + } + + if ((rc = i2o_iop_add(c))) + goto uninstall; + + return 0; + + uninstall: + i2o_pci_irq_disable(c); + + free_pci: + i2o_pci_free(c); + + free_controller: + i2o_iop_free(c); + + disable: + pci_disable_device(pdev); + + return rc; +} + +/** + * i2o_pci_remove - Removes a I2O controller from the system + * pdev: I2O controller which should be removed + * + * Reset the I2O controller, disable interrupts and remove all allocated + * resources. + */ +static void __devexit i2o_pci_remove(struct pci_dev *pdev) +{ + struct i2o_controller *c; + c = pci_get_drvdata(pdev); + + i2o_iop_remove(c); + i2o_pci_irq_disable(c); + i2o_pci_free(c); + + printk(KERN_INFO "%s: Controller removed.\n", c->name); + + i2o_iop_free(c); + pci_disable_device(pdev); +}; + +/* PCI driver for I2O controller */ +static struct pci_driver i2o_pci_driver = { + .name = "I2O controller", + .id_table = i2o_pci_ids, + .probe = i2o_pci_probe, + .remove = __devexit_p(i2o_pci_remove), +}; + +/** + * i2o_pci_init - registers I2O PCI driver in PCI subsystem + * + * Returns > 0 on success or negative error code on failure. + */ +int __init i2o_pci_init(void) +{ + return pci_register_driver(&i2o_pci_driver); +}; + +/** + * i2o_pci_exit - unregisters I2O PCI driver from PCI subsystem + */ +void __exit i2o_pci_exit(void) +{ + pci_unregister_driver(&i2o_pci_driver); +}; + +EXPORT_SYMBOL(i2o_dma_realloc); diff -Nru a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c --- a/drivers/misc/ibmasm/module.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/misc/ibmasm/module.c 2004-09-06 16:37:53 -07:00 @@ -62,10 +62,17 @@ int result = -ENOMEM; struct service_processor *sp; + if (pci_enable_device(pdev)) { + printk(KERN_ERR "%s: can't enable PCI device at %s\n", + DRIVER_NAME, pci_name(pdev)); + return -ENODEV; + } + sp = kmalloc(sizeof(struct service_processor), GFP_KERNEL); if (sp == NULL) { dev_err(&pdev->dev, "Failed to allocate memory\n"); - return result; + result = -ENOMEM; + goto error_kmalloc; } memset(sp, 0, sizeof(struct service_processor)); @@ -148,6 +155,8 @@ ibmasm_event_buffer_exit(sp); error_eventbuffer: kfree(sp); +error_kmalloc: + pci_disable_device(pdev); return result; } @@ -166,6 +175,7 @@ iounmap(sp->base_address); ibmasm_event_buffer_exit(sp); kfree(sp); + pci_disable_device(pdev); } static struct pci_device_id ibmasm_pci_table[] = diff -Nru a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c --- a/drivers/mmc/mmc_block.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/mmc/mmc_block.c 2004-09-06 16:37:55 -07:00 @@ -124,7 +124,7 @@ geo.sectors = 16; geo.start = get_start_sect(bdev); - return copy_to_user((void *)arg, &geo, sizeof(geo)) + return copy_to_user((void __user *)arg, &geo, sizeof(geo)) ? -EFAULT : 0; } diff -Nru a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c --- a/drivers/mtd/chips/cfi_cmdset_0001.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/mtd/chips/cfi_cmdset_0001.c 2004-09-06 16:37:51 -07:00 @@ -1437,8 +1437,7 @@ spin_unlock(chip->mutex); INVALIDATE_CACHED_RANGE(map, adr, len); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout((chip->erase_time*HZ)/(2*1000)); + msleep(chip->erase_time / 2); spin_lock(chip->mutex); /* FIXME. Use a timer to check this, and return immediately. */ diff -Nru a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c --- a/drivers/mtd/chips/jedec_probe.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/mtd/chips/jedec_probe.c 2004-09-06 16:37:55 -07:00 @@ -29,6 +29,7 @@ #define MANUFACTURER_AMD 0x0001 #define MANUFACTURER_ATMEL 0x001f #define MANUFACTURER_FUJITSU 0x0004 +#define MANUFACTURER_HYUNDAI 0x00AD #define MANUFACTURER_INTEL 0x0089 #define MANUFACTURER_MACRONIX 0x00C2 #define MANUFACTURER_PMC 0x009D @@ -56,6 +57,7 @@ #define AM29F040 0x00A4 #define AM29LV040B 0x004F #define AM29F032B 0x0041 +#define AM29F002T 0x00B0 /* Atmel */ #define AT49BV512 0x0003 @@ -77,6 +79,8 @@ #define MBM29LV400TC 0x22B9 #define MBM29LV400BC 0x22BA +/* Hyundai */ +#define HY29F002T 0x00B0 /* Intel */ #define I28F004B3T 0x00d4 @@ -106,6 +110,7 @@ #define MX29LV160T 0x22C4 #define MX29LV160B 0x2249 #define MX29F016 0x00AD +#define MX29F002T 0x00B0 #define MX29F004T 0x0045 #define MX29F004B 0x0046 @@ -507,6 +512,17 @@ ERASEINFO(0x10000,8), } }, { + mfr_id: MANUFACTURER_AMD, + dev_id: AM29F002T, + name: "AMD AM29F002T", + DevSize: SIZE_256KiB, + NumEraseRegions: 4, + regions: {ERASEINFO(0x10000,3), + ERASEINFO(0x08000,1), + ERASEINFO(0x02000,2), + ERASEINFO(0x04000,1) + } + }, { .mfr_id = MANUFACTURER_ATMEL, .dev_id = AT49BV512, .name = "Atmel AT49BV512", @@ -752,6 +768,17 @@ ERASEINFO(0x04000,1) } }, { + mfr_id: MANUFACTURER_HYUNDAI, + dev_id: HY29F002T, + name: "Hyundai HY29F002T", + DevSize: SIZE_256KiB, + NumEraseRegions: 4, + regions: {ERASEINFO(0x10000,3), + ERASEINFO(0x08000,1), + ERASEINFO(0x02000,2), + ERASEINFO(0x04000,1) + } + }, { .mfr_id = MANUFACTURER_INTEL, .dev_id = I28F004B3B, .name = "Intel 28F004B3B", @@ -1135,6 +1162,17 @@ ERASEINFO(0x10000,7), } }, { + mfr_id: MANUFACTURER_MACRONIX, + dev_id: MX29F002T, + name: "Macronix MX29F002T", + DevSize: SIZE_256KiB, + NumEraseRegions: 4, + regions: {ERASEINFO(0x10000,3), + ERASEINFO(0x08000,1), + ERASEINFO(0x02000,2), + ERASEINFO(0x04000,1) + } + }, { .mfr_id = MANUFACTURER_PMC, .dev_id = PM49FL002, .name = "PMC Pm49FL002", @@ -1570,7 +1608,7 @@ ERASEINFO(0x02000, 2), ERASEINFO(0x04000, 1), } - } + } }; diff -Nru a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c --- a/drivers/mtd/maps/edb7312.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/mtd/maps/edb7312.c 2004-09-06 16:37:55 -07:00 @@ -71,14 +71,14 @@ #endif -static int mtd_parts_nb = 0; -static struct mtd_partition *mtd_parts = 0; +static int mtd_parts_nb; +static struct mtd_partition *mtd_parts; int __init init_edb7312nor(void) { static const char *rom_probe_types[] = PROBETYPES; const char **type; - const char *part_type = 0; + const char *part_type = NULL; printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n", WINDOW_SIZE, WINDOW_ADDR); @@ -92,7 +92,7 @@ simple_map_init(&edb7312nor_map); - mymtd = 0; + mymtd = NULL; type = rom_probe_types; for(; !mymtd && *type; type++) { mymtd = do_map_probe(*type, &edb7312nor_map); diff -Nru a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c --- a/drivers/mtd/maps/impa7.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/mtd/maps/impa7.c 2004-09-06 16:37:51 -07:00 @@ -77,7 +77,7 @@ { static const char *rom_probe_types[] = PROBETYPES; const char **type; - const char *part_type = 0; + const char *part_type = NULL; int i; static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = { { WINDOW_ADDR0, WINDOW_SIZE0 }, @@ -99,7 +99,7 @@ } simple_map_init(&impa7_map[i]); - impa7_mtd[i] = 0; + impa7_mtd[i] = NULL; type = rom_probe_types; for(; !impa7_mtd[i] && *type; type++) { impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]); diff -Nru a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c --- a/drivers/mtd/maps/nettel.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/mtd/maps/nettel.c 2004-09-06 16:37:51 -07:00 @@ -180,7 +180,7 @@ if (mtd) { nettel_erase.mtd = mtd; nettel_erase.callback = nettel_erasecallback; - nettel_erase.callback = 0; + nettel_erase.callback = NULL; nettel_erase.addr = 0; nettel_erase.len = mtd->size; nettel_erase.priv = (u_long) &wait_q; diff -Nru a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c --- a/drivers/mtd/nftlmount.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/mtd/nftlmount.c 2004-09-06 16:37:53 -07:00 @@ -269,7 +269,8 @@ static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int len, int check_oob) { - int i, retlen; + int i; + size_t retlen; u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize]; for (i = 0; i < len; i += SECTORSIZE) { @@ -366,7 +367,8 @@ { unsigned int block, i, status; struct nftl_bci bci; - int sectors_per_block, retlen; + int sectors_per_block; + size_t retlen; sectors_per_block = nftl->EraseSize / SECTORSIZE; block = first_block; diff -Nru a/drivers/net/3c527.c b/drivers/net/3c527.c --- a/drivers/net/3c527.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/3c527.c 2004-09-06 16:37:53 -07:00 @@ -751,18 +751,15 @@ rx_base=lp->rx_chain; - for(i=0; irx_ring[i].skb=alloc_skb(1532, GFP_KERNEL); - skb_reserve(lp->rx_ring[i].skb, 18); - - if(lp->rx_ring[i].skb==NULL) - { - for(;i>=0;i--) + if (lp->rx_ring[i].skb==NULL) { + for (;i>=0;i--) kfree_skb(lp->rx_ring[i].skb); return -ENOBUFS; } - + skb_reserve(lp->rx_ring[i].skb, 18); + p=isa_bus_to_virt(lp->base+rx_base); p->control=0; diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/3c59x.c 2004-09-06 16:37:50 -07:00 @@ -695,7 +695,7 @@ Wn2_ResetOptions=12, }; enum Window3 { /* Window 3: MAC/config bits. */ - Wn3_Config=0, Wn3_MAC_Ctrl=6, Wn3_Options=8, + Wn3_Config=0, Wn3_MaxPktSize=4, Wn3_MAC_Ctrl=6, Wn3_Options=8, }; #define BFEXT(value, offset, bitcount) \ @@ -723,7 +723,8 @@ Media_LnkBeat = 0x0800, }; enum Window7 { /* Window 7: Bus Master control. */ - Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12, + Wn7_MasterAddr = 0, Wn7_VlanEtherType=4, Wn7_MasterLen = 6, + Wn7_MasterStatus = 12, }; /* Boomerang bus master control registers. */ enum MasterCtrl { @@ -819,7 +820,8 @@ pm_state_valid:1, /* power_state[] has sane contents */ open:1, medialock:1, - must_free_region:1; /* Flag: if zero, Cardbus owns the I/O region */ + must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ + large_frames:1; /* accept large frames */ int drv_flags; u16 status_enable; u16 intr_enable; @@ -904,6 +906,8 @@ static void vortex_tx_timeout(struct net_device *dev); static void acpi_set_WOL(struct net_device *dev); static struct ethtool_ops vortex_ethtool_ops; +static void set_8021q_mode(struct net_device *dev, int enable); + /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ /* Option count limit only -- unlimited interfaces are supported. */ @@ -1164,6 +1168,7 @@ dev->base_addr = ioaddr; dev->irq = irq; dev->mtu = mtu; + vp->large_frames = mtu > 1500; vp->drv_flags = vci->drv_flags; vp->has_nway = (vci->drv_flags & HAS_NWAY) ? 1 : 0; vp->io_size = vci->io_size; @@ -1616,7 +1621,7 @@ /* Set the full-duplex bit. */ outw( ((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); @@ -1700,6 +1705,8 @@ } /* Set receiver mode: presumably accept b-case and phys addr only. */ set_rx_mode(dev); + /* enable 802.1q tagged frames */ + set_8021q_mode(dev, 1); outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ // issue_and_wait(dev, SetTxStart|0x07ff); @@ -1842,7 +1849,7 @@ /* Set the full-duplex bit. */ EL3WINDOW(3); outw( (vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); if (vortex_debug > 1) @@ -2068,6 +2075,8 @@ issue_and_wait(dev, RxReset|0x07); /* Set the Rx filter to the current state. */ set_rx_mode(dev); + /* enable 802.1q VLAN tagged frames */ + set_8021q_mode(dev, 1); outw(RxEnable, ioaddr + EL3_CMD); /* Re-enable the receiver. */ outw(AckIntr | HostError, ioaddr + EL3_CMD); } @@ -2672,6 +2681,9 @@ outw(RxDisable, ioaddr + EL3_CMD); outw(TxDisable, ioaddr + EL3_CMD); + /* Disable receiving 802.1q tagged frames */ + set_8021q_mode(dev, 0); + if (dev->if_port == XCVR_10base2) /* Turn off thinnet power. Green! */ outw(StopCoax, ioaddr + EL3_CMD); @@ -2946,6 +2958,61 @@ outw(new_mode, ioaddr + EL3_CMD); } + +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +/* Setup the card so that it can receive frames with an 802.1q VLAN tag. + Note that this must be done after each RxReset due to some backwards + compatibility logic in the Cyclone and Tornado ASICs */ + +/* The Ethernet Type used for 802.1q tagged frames */ +#define VLAN_ETHER_TYPE 0x8100 + +static void set_8021q_mode(struct net_device *dev, int enable) +{ + struct vortex_private *vp = (struct vortex_private *)dev->priv; + long ioaddr = dev->base_addr; + int old_window = inw(ioaddr + EL3_CMD); + int mac_ctrl; + + if ((vp->drv_flags&IS_CYCLONE) || (vp->drv_flags&IS_TORNADO)) { + /* cyclone and tornado chipsets can recognize 802.1q + * tagged frames and treat them correctly */ + + int max_pkt_size = dev->mtu+14; /* MTU+Ethernet header */ + if (enable) + max_pkt_size += 4; /* 802.1Q VLAN tag */ + + EL3WINDOW(3); + outw(max_pkt_size, ioaddr+Wn3_MaxPktSize); + + /* set VlanEtherType to let the hardware checksumming + treat tagged frames correctly */ + EL3WINDOW(7); + outw(VLAN_ETHER_TYPE, ioaddr+Wn7_VlanEtherType); + } else { + /* on older cards we have to enable large frames */ + + vp->large_frames = dev->mtu > 1500 || enable; + + EL3WINDOW(3); + mac_ctrl = inw(ioaddr+Wn3_MAC_Ctrl); + if (vp->large_frames) + mac_ctrl |= 0x40; + else + mac_ctrl &= ~0x40; + outw(mac_ctrl, ioaddr+Wn3_MAC_Ctrl); + } + + EL3WINDOW(old_window); +} +#else + +static void set_8021q_mode(struct net_device *dev, int enable) +{ +} + + +#endif /* MII transceiver control section. Read and write the MII registers using software-generated serial diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/8139cp.c 2004-09-06 16:37:52 -07:00 @@ -1698,7 +1698,7 @@ } /* Configure DMA attributes. */ - if ((sizeof(dma_addr_t) > 32) && + if ((sizeof(dma_addr_t) > 4) && !pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL) && !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { pci_using_dac = 1; diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/8139too.c 2004-09-06 16:37:50 -07:00 @@ -593,6 +593,7 @@ int time_to_die; struct mii_if_info mii; unsigned int regs_len; + unsigned long fifo_copy_timeout; }; MODULE_AUTHOR ("Jeff Garzik "); @@ -1927,6 +1928,24 @@ } #endif +static void rtl8139_isr_ack(struct rtl8139_private *tp) +{ + void *ioaddr = tp->mmio_addr; + u16 status; + + status = RTL_R16 (IntrStatus) & RxAckBits; + + /* Clear out errors and receive interrupts */ + if (likely(status != 0)) { + if (unlikely(status & (RxFIFOOver | RxOverflow))) { + tp->stats.rx_errors++; + if (status & RxFIFOOver) + tp->stats.rx_fifo_errors++; + } + RTL_W16_F (IntrStatus, RxAckBits); + } +} + static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { @@ -1934,9 +1953,10 @@ int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; + unsigned int rx_size = 0; DPRINTK ("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," - " free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, + " free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); @@ -1944,10 +1964,8 @@ && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; - unsigned int rx_size; unsigned int pkt_size; struct sk_buff *skb; - u16 status; rmb(); @@ -1976,10 +1994,24 @@ * since EarlyRx is disabled. */ if (unlikely(rx_size == 0xfff0)) { + if (!tp->fifo_copy_timeout) + tp->fifo_copy_timeout = jiffies + 2; + else if (time_after(jiffies, tp->fifo_copy_timeout)) { + DPRINTK ("%s: hung FIFO. Reset.", dev->name); + rx_size = 0; + goto no_early_rx; + } + if (netif_msg_intr(tp)) { + printk(KERN_DEBUG "%s: fifo copy in progress.", + dev->name); + } tp->xstats.early_rx++; - goto done; + break; } +no_early_rx: + tp->fifo_copy_timeout = 0; + /* If Rx err or invalid rx_size/rx_status received * (which happens if we get lost in the ring), * Rx process gets reset, so we abort any further @@ -1989,7 +2021,8 @@ (rx_size < 8) || (!(rx_status & RxStatusOK)))) { rtl8139_rx_err (rx_status, dev, tp, ioaddr); - return -1; + received = -1; + goto out; } /* Malloc up new buffer, compatible with net-2e. */ @@ -2025,19 +2058,11 @@ cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - /* Clear out errors and receive interrupts */ - status = RTL_R16 (IntrStatus) & RxAckBits; - if (likely(status != 0)) { - if (unlikely(status & (RxFIFOOver | RxOverflow))) { - tp->stats.rx_errors++; - if (status & RxFIFOOver) - tp->stats.rx_fifo_errors++; - } - RTL_W16_F (IntrStatus, RxAckBits); - } + rtl8139_isr_ack(tp); } - done: + if (unlikely(!received || rx_size == 0xfff0)) + rtl8139_isr_ack(tp); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2047,6 +2072,15 @@ #endif tp->cur_rx = cur_rx; + + /* + * The receive buffer should be mostly empty. + * Tell NAPI to reenable the Rx irq. + */ + if (tp->fifo_copy_timeout) + received = budget; + +out: return received; } diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/Kconfig 2004-09-06 16:37:54 -07:00 @@ -1353,7 +1353,7 @@ config CS89x0 tristate "CS89x0 support" - depends on NET_PCI && ISA + depends on NET_PCI && (ISA || ARCH_IXDP2X01) ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the @@ -1752,7 +1752,7 @@ If you have a VIA "Velocity" based network card say Y here. To compile this driver as a module, choose M here. The module - will be called via-rhine. + will be called via-velocity. config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" @@ -2046,8 +2046,20 @@ config R8169_NAPI bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" - depends on R8169 && EXPERIMENTAL + depends on R8169 && EXPERIMENTAL + help + NAPI is a new driver API designed to reduce CPU and interrupt load + when the driver is receiving lots of packets from the card. It is + still somewhat experimental and thus not yet enabled by default. + If your estimated Rx load is 10kpps or more, or if the card will be + deployed on potentially unfriendly networks (e.g. in a firewall), + then say Y here. + + See for more + information. + + If in doubt, say N. config SK98LIN tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c --- a/drivers/net/amd8111e.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/amd8111e.c 2004-09-06 16:37:53 -07:00 @@ -719,7 +719,7 @@ return 0; } -#if CONFIG_AMD8111E_NAPI +#ifdef CONFIG_AMD8111E_NAPI /* This function handles the driver receive operation in polling mode */ static int amd8111e_rx_poll(struct net_device *dev, int * budget) { diff -Nru a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c --- a/drivers/net/cs89x0.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/cs89x0.c 2004-09-06 16:37:54 -07:00 @@ -84,6 +84,9 @@ Oskar Schirmer : oskar@scara.com : HiCO.SH4 (superh) support added (irq#1, cs89x0_media=) + Deepak Saxena : dsaxena@plexity.net + : Intel IXDP2x01 (XScale ixp2x00 NPU) platform support + */ /* Always include 'config.h' first in case the user wants to turn on @@ -97,7 +100,11 @@ * Note that even if DMA is turned off we still support the 'dma' and 'use_dma' * module options so we don't break any startup scripts. */ +#ifndef CONFIG_ARCH_IXDP2X01 +#define ALLOW_DMA 0 +#else #define ALLOW_DMA 1 +#endif /* * Set this to zero to remove all the debug statements via @@ -162,6 +169,10 @@ static unsigned int netcard_portlist[] __initdata = { 0x0300, 0}; static unsigned int cs8900_irq_map[] = {1,0,0,0}; +#elif defined(CONFIG_ARCH_IXDP2X01) +#include +static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; +static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; #else static unsigned int netcard_portlist[] __initdata = { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; @@ -454,11 +465,12 @@ retval = -ENODEV; goto out2; } - ioaddr &= ~3; - outw(PP_ChipID, ioaddr + ADD_PORT); } printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT)); + ioaddr &= ~3; + outw(PP_ChipID, ioaddr + ADD_PORT); + if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) { printk(KERN_ERR "%s: incorrect signature 0x%x\n", dev->name, inw(ioaddr + DATA_PORT)); @@ -665,6 +677,9 @@ } else { i = lp->isa_config & INT_NO_MASK; if (lp->chip_type == CS8900) { +#ifdef CONFIG_ARCH_IXDP2X01 + i = cs8900_irq_map[0]; +#else /* Translate the IRQ using the IRQ mapping table. */ if (i >= sizeof(cs8900_irq_map)/sizeof(cs8900_irq_map[0])) printk("\ncs89x0: invalid ISA interrupt number %d\n", i); @@ -681,6 +696,7 @@ if ((irq_map_buff[0] & 0xff) == PNP_IRQ_FRMT) lp->irq_map = (irq_map_buff[0]>>8) | (irq_map_buff[1] << 8); } +#endif } if (!dev->irq) dev->irq = i; @@ -884,8 +900,10 @@ void __init reset_chip(struct net_device *dev) { +#ifndef CONFIG_ARCH_IXDP2X01 struct net_local *lp = netdev_priv(dev); int ioaddr = dev->base_addr; +#endif int reset_start_time; writereg(dev, PP_SelfCTL, readreg(dev, PP_SelfCTL) | POWER_ON_RESET); @@ -894,6 +912,7 @@ current->state = TASK_INTERRUPTIBLE; schedule_timeout(30*HZ/1000); +#ifndef CONFIG_ARCH_IXDP2X01 if (lp->chip_type != CS8900) { /* Hardware problem requires PNP registers to be reconfigured after a reset */ outw(PP_CS8920_ISAINT, ioaddr + ADD_PORT); @@ -904,6 +923,8 @@ outb((dev->mem_start >> 16) & 0xff, ioaddr + DATA_PORT); outb((dev->mem_start >> 8) & 0xff, ioaddr + DATA_PORT + 1); } +#endif /* IXDP2x01 */ + /* Wait until the chip is reset */ reset_start_time = jiffies; while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2) @@ -1155,12 +1176,14 @@ else #endif { +#ifndef CONFIG_ARCH_IXDP2X01 if (((1 << dev->irq) & lp->irq_map) == 0) { printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", dev->name, dev->irq, lp->irq_map); ret = -EAGAIN; goto bad_out; } +#endif /* FIXME: Cirrus' release had this: */ writereg(dev, PP_BusCTL, readreg(dev, PP_BusCTL)|ENABLE_IRQ ); /* And 2.3.47 had this: */ @@ -1575,7 +1598,9 @@ static int net_close(struct net_device *dev) { +#if ALLOW_DMA struct net_local *lp = netdev_priv(dev); +#endif netif_stop_queue(dev); diff -Nru a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h --- a/drivers/net/cs89x0.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/cs89x0.h 2004-09-06 16:37:54 -07:00 @@ -16,6 +16,13 @@ #include +#ifdef CONFIG_ARCH_IXDP2X01 +/* IXDP2401/IXDP2801 uses dword-aligned register addressing */ +#define CS89x0_PORT(reg) ((reg) * 2) +#else +#define CS89x0_PORT(reg) (reg) +#endif + #define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ /* offset 2h -> Model/Product Number */ /* offset 3h -> Chip Revision Number */ @@ -324,16 +331,16 @@ #define RAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ #define PKT_START PP_TxFrame /* Start of packet RAM */ -#define RX_FRAME_PORT 0x0000 +#define RX_FRAME_PORT CS89x0_PORT(0x0000) #define TX_FRAME_PORT RX_FRAME_PORT -#define TX_CMD_PORT 0x0004 +#define TX_CMD_PORT CS89x0_PORT(0x0004) #define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ #define TX_AFTER_381 0x0040 /* Tx packet after 381 bytes copied */ #define TX_AFTER_ALL 0x00c0 /* Tx packet after all bytes copied */ -#define TX_LEN_PORT 0x0006 -#define ISQ_PORT 0x0008 -#define ADD_PORT 0x000A -#define DATA_PORT 0x000C +#define TX_LEN_PORT CS89x0_PORT(0x0006) +#define ISQ_PORT CS89x0_PORT(0x0008) +#define ADD_PORT CS89x0_PORT(0x000A) +#define DATA_PORT CS89x0_PORT(0x000C) #define EEPROM_WRITE_EN 0x00F0 #define EEPROM_WRITE_DIS 0x0000 diff -Nru a/drivers/net/dl2k.h b/drivers/net/dl2k.h --- a/drivers/net/dl2k.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/dl2k.h 2004-09-06 16:37:55 -07:00 @@ -92,7 +92,7 @@ EepromCtrl = 0x4a, ExpromAddr = 0x4c, Exprodata = 0x50, - WakeEvent0x51, + WakeEvent = 0x51, CountDown = 0x54, IntStatusAck = 0x5a, IntEnable = 0x5c, diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/e1000/e1000_main.c 2004-09-06 16:37:52 -07:00 @@ -128,8 +128,8 @@ static struct net_device_stats * e1000_get_stats(struct net_device *netdev); static int e1000_change_mtu(struct net_device *netdev, int new_mtu); static int e1000_set_mac(struct net_device *netdev, void *p); -static inline void e1000_irq_disable(struct e1000_adapter *adapter); -static inline void e1000_irq_enable(struct e1000_adapter *adapter); +static void e1000_irq_disable(struct e1000_adapter *adapter); +static void e1000_irq_enable(struct e1000_adapter *adapter); static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs); static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter); #ifdef CONFIG_E1000_NAPI @@ -146,9 +146,9 @@ void set_ethtool_ops(struct net_device *netdev); static void e1000_enter_82542_rst(struct e1000_adapter *adapter); static void e1000_leave_82542_rst(struct e1000_adapter *adapter); -static inline void e1000_rx_checksum(struct e1000_adapter *adapter, - struct e1000_rx_desc *rx_desc, - struct sk_buff *skb); +static void e1000_rx_checksum(struct e1000_adapter *adapter, + struct e1000_rx_desc *rx_desc, + struct sk_buff *skb); static void e1000_tx_timeout(struct net_device *dev); static void e1000_tx_timeout_task(struct net_device *dev); static void e1000_smartspeed(struct e1000_adapter *adapter); @@ -2077,7 +2077,7 @@ * @adapter: board private structure **/ -static inline void +static void e1000_irq_disable(struct e1000_adapter *adapter) { atomic_inc(&adapter->irq_sem); @@ -2091,7 +2091,7 @@ * @adapter: board private structure **/ -static inline void +static void e1000_irq_enable(struct e1000_adapter *adapter) { if(likely(atomic_dec_and_test(&adapter->irq_sem))) { @@ -2593,7 +2593,7 @@ * @sk_buff: socket buffer with received data **/ -static inline void +static void e1000_rx_checksum(struct e1000_adapter *adapter, struct e1000_rx_desc *rx_desc, struct sk_buff *skb) diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/e1000/e1000_param.c 2004-09-06 16:37:54 -07:00 @@ -212,7 +212,7 @@ #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 1 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 diff -Nru a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c --- a/drivers/net/forcedeth.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/forcedeth.c 2004-09-06 16:37:50 -07:00 @@ -75,6 +75,7 @@ * added CK804/MCP04 device IDs, code fixes * for registers, link status and other minor fixes. * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe + * 0.29: 31 Aug 2004: Add backup timer for link change notification. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -86,7 +87,7 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.28" +#define FORCEDETH_VERSION "0.29" #define DRV_NAME "forcedeth" #include @@ -120,10 +121,11 @@ * Hardware access: */ -#define DEV_NEED_LASTPACKET1 0x0001 -#define DEV_IRQMASK_1 0x0002 -#define DEV_IRQMASK_2 0x0004 -#define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LASTPACKET1 0x0001 /* set LASTPACKET1 in tx flags */ +#define DEV_IRQMASK_1 0x0002 /* use NVREG_IRQMASK_WANTED_1 for irq mask */ +#define DEV_IRQMASK_2 0x0004 /* use NVREG_IRQMASK_WANTED_2 for irq mask */ +#define DEV_NEED_TIMERIRQ 0x0008 /* set the timer irq flag in the irq mask */ +#define DEV_NEED_LINKTIMER 0x0010 /* poll link settings. Relies on the timer irq */ enum { NvRegIrqStatus = 0x000, @@ -367,6 +369,7 @@ #define OOM_REFILL (1+HZ/20) #define POLL_WAIT (1+HZ/100) +#define LINK_TIMEOUT (3*HZ) #define DESC_VER_1 0x0 #define DESC_VER_2 0x02100 @@ -446,6 +449,11 @@ struct timer_list oom_kick; struct timer_list nic_poll; + /* media detection workaround. + * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); + */ + int need_linktimer; + unsigned long link_timeout; /* * tx specific fields. */ @@ -1384,6 +1392,25 @@ return retval; } +static void nv_linkchange(struct net_device *dev) +{ + if (nv_update_linkspeed(dev)) { + if (netif_carrier_ok(dev)) { + nv_stop_rx(dev); + } else { + netif_carrier_on(dev); + printk(KERN_INFO "%s: link up.\n", dev->name); + } + nv_start_rx(dev); + } else { + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + printk(KERN_INFO "%s: link down.\n", dev->name); + nv_stop_rx(dev); + } + } +} + static void nv_link_irq(struct net_device *dev) { u8 *base = get_hwbase(dev); @@ -1391,25 +1418,10 @@ miistat = readl(base + NvRegMIIStatus); writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - dprintk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); - if (miistat & (NVREG_MIISTAT_LINKCHANGE)) { - if (nv_update_linkspeed(dev)) { - if (netif_carrier_ok(dev)) { - nv_stop_rx(dev); - } else { - netif_carrier_on(dev); - printk(KERN_INFO "%s: link up.\n", dev->name); - } - nv_start_rx(dev); - } else { - if (netif_carrier_ok(dev)) { - netif_carrier_off(dev); - printk(KERN_INFO "%s: link down.\n", dev->name); - nv_stop_rx(dev); - } - } - } + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); } @@ -1452,6 +1464,12 @@ nv_link_irq(dev); spin_unlock(&np->lock); } + if (np->need_linktimer && time_after(jiffies, np->link_timeout)) { + spin_lock(&np->lock); + nv_linkchange(dev); + spin_unlock(&np->lock); + np->link_timeout = jiffies + LINK_TIMEOUT; + } if (events & (NVREG_IRQ_TX_ERR)) { dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n", dev->name, events); @@ -1816,6 +1834,14 @@ np->irqmask = NVREG_IRQMASK_WANTED_2; if (id->driver_data & DEV_NEED_TIMERIRQ) np->irqmask |= NVREG_IRQ_TIMER; + if (id->driver_data & DEV_NEED_LINKTIMER) { + dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev)); + np->need_linktimer = 1; + np->link_timeout = jiffies + LINK_TIMEOUT; + } else { + dprintk(KERN_INFO "%s: link timer off.\n", pci_name(pci_dev)); + np->need_linktimer = 0; + } /* find a suitable phy */ for (i = 1; i < 32; i++) { @@ -1909,21 +1935,21 @@ .device = PCI_DEVICE_ID_NVIDIA_NVENET_1, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ, + .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce2 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, .device = PCI_DEVICE_ID_NVIDIA_NVENET_2, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, .device = PCI_DEVICE_ID_NVIDIA_NVENET_3, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, diff -Nru a/drivers/net/gianfar.c b/drivers/net/gianfar.c --- a/drivers/net/gianfar.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/gianfar.c 2004-09-06 16:37:50 -07:00 @@ -307,8 +307,8 @@ /* Print out the device info */ printk(KERN_INFO DEVICE_NAME, dev->name); for (idx = 0; idx < 6; idx++) - printk(KERN_INFO "%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); - printk(KERN_INFO "\n"); + printk("%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':'); + printk("\n"); /* Even more device info helps when determining which kernel */ /* provided which set of benchmarks. Since this is global for all */ diff -Nru a/drivers/net/hamachi.c b/drivers/net/hamachi.c --- a/drivers/net/hamachi.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/hamachi.c 2004-09-06 16:37:55 -07:00 @@ -559,7 +559,7 @@ static void hamachi_init_ring(struct net_device *dev); static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev); static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static inline int hamachi_rx(struct net_device *dev); +static int hamachi_rx(struct net_device *dev); static inline int hamachi_tx(struct net_device *dev); static void hamachi_error(struct net_device *dev, int intr_status); static int hamachi_close(struct net_device *dev); diff -Nru a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c --- a/drivers/net/hamradio/dmascc.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/hamradio/dmascc.c 2004-09-06 16:37:52 -07:00 @@ -246,8 +246,14 @@ static struct net_device_stats *scc_get_stats(struct net_device *dev); static int scc_set_mac_address(struct net_device *dev, void *sa); -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); +static inline void tx_on(struct scc_priv *priv); +static inline void rx_on(struct scc_priv *priv); +static inline void rx_off(struct scc_priv *priv); +static void start_timer(struct scc_priv *priv, int t, int r15); +static inline unsigned char random(void); + static inline void z8530_isr(struct scc_info *info); +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs); static void rx_isr(struct scc_priv *priv); static void special_condition(struct scc_priv *priv, int rc); static void rx_bh(void *arg); @@ -255,12 +261,6 @@ static void es_isr(struct scc_priv *priv); static void tm_isr(struct scc_priv *priv); -static inline void tx_on(struct scc_priv *priv); -static inline void rx_on(struct scc_priv *priv); -static inline void rx_off(struct scc_priv *priv); -static void start_timer(struct scc_priv *priv, int t, int r15); -static inline unsigned char random(void); - /* Initialization variables */ @@ -945,42 +945,115 @@ } -static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { - struct scc_info *info = dev_id; +static inline void tx_on(struct scc_priv *priv) { + int i, n; + unsigned long flags; - spin_lock(info->priv[0].register_lock); - /* At this point interrupts are enabled, and the interrupt under service - is already acknowledged, but masked off. + if (priv->param.dma >= 0) { + n = (priv->chip == Z85230) ? 3 : 1; + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_WRITE); + set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); + set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); + release_dma_lock(flags); + /* Enable TX underrun interrupt */ + write_scc(priv, R15, TxUIE); + /* Configure DREQ */ + if (priv->type == TYPE_TWIN) + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, + priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); + /* Write first byte(s) */ + spin_lock_irqsave(priv->register_lock, flags); + for (i = 0; i < n; i++) + write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); + enable_dma(priv->param.dma); + spin_unlock_irqrestore(priv->register_lock, flags); + } else { + write_scc(priv, R15, TxUIE); + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); + tx_isr(priv); + } + /* Reset EOM latch if we do not have the AUTOEOM feature */ + if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); +} - Interrupt processing: We loop until we know that the IRQ line is - low. If another positive edge occurs afterwards during the ISR, - another interrupt will be triggered by the interrupt controller - as soon as the IRQ level is enabled again (see asm/irq.h). - Bottom-half handlers will be processed after scc_isr(). This is - important, since we only have small ringbuffers and want new data - to be fetched/delivered immediately. */ +static inline void rx_on(struct scc_priv *priv) { + unsigned long flags; - if (info->priv[0].type == TYPE_TWIN) { - int is, card_base = info->priv[0].card_base; - while ((is = ~inb(card_base + TWIN_INT_REG)) & - TWIN_INT_MSK) { - if (is & TWIN_SCC_MSK) { - z8530_isr(info); - } else if (is & TWIN_TMR1_MSK) { - inb(card_base + TWIN_CLR_TMR1); - tm_isr(&info->priv[0]); - } else { - inb(card_base + TWIN_CLR_TMR2); - tm_isr(&info->priv[1]); - } + /* Clear RX FIFO */ + while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); + priv->rx_over = 0; + if (priv->param.dma >= 0) { + /* Program DMA controller */ + flags = claim_dma_lock(); + set_dma_mode(priv->param.dma, DMA_MODE_READ); + set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); + set_dma_count(priv->param.dma, BUF_SIZE); + release_dma_lock(flags); + enable_dma(priv->param.dma); + /* Configure PackeTwin DMA */ + if (priv->type == TYPE_TWIN) { + outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, + priv->card_base + TWIN_DMA_CFG); } - } else z8530_isr(info); - spin_unlock(info->priv[0].register_lock); - return IRQ_HANDLED; + /* Sp. cond. intr. only, ext int enable, RX DMA enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | + WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); + } else { + /* Reset current frame */ + priv->rx_ptr = 0; + /* Intr. on all Rx characters and Sp. cond., ext int enable */ + write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | + WT_FN_RDYFN); + } + write_scc(priv, R0, ERR_RES); + write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); +} + + +static inline void rx_off(struct scc_priv *priv) { + /* Disable receiver */ + write_scc(priv, R3, Rx8); + /* Disable DREQ / RX interrupt */ + if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) + outb(0, priv->card_base + TWIN_DMA_CFG); + else + write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); + /* Disable DMA */ + if (priv->param.dma >= 0) disable_dma(priv->param.dma); +} + + +static void start_timer(struct scc_priv *priv, int t, int r15) { + unsigned long flags; + + outb(priv->tmr_mode, priv->tmr_ctrl); + if (t == 0) { + tm_isr(priv); + } else if (t > 0) { + save_flags(flags); + cli(); + outb(t & 0xFF, priv->tmr_cnt); + outb((t >> 8) & 0xFF, priv->tmr_cnt); + if (priv->type != TYPE_TWIN) { + write_scc(priv, R15, r15 | CTSIE); + priv->rr0 |= CTS; + } + restore_flags(flags); + } } +static inline unsigned char random(void) { + /* See "Numerical Recipes in C", second edition, p. 284 */ + rand = rand * 1664525L + 1013904223L; + return (unsigned char) (rand >> 24); +} + static inline void z8530_isr(struct scc_info *info) { int is, i = 100; @@ -1009,6 +1082,42 @@ } +static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs) { + struct scc_info *info = dev_id; + + spin_lock(info->priv[0].register_lock); + /* At this point interrupts are enabled, and the interrupt under service + is already acknowledged, but masked off. + + Interrupt processing: We loop until we know that the IRQ line is + low. If another positive edge occurs afterwards during the ISR, + another interrupt will be triggered by the interrupt controller + as soon as the IRQ level is enabled again (see asm/irq.h). + + Bottom-half handlers will be processed after scc_isr(). This is + important, since we only have small ringbuffers and want new data + to be fetched/delivered immediately. */ + + if (info->priv[0].type == TYPE_TWIN) { + int is, card_base = info->priv[0].card_base; + while ((is = ~inb(card_base + TWIN_INT_REG)) & + TWIN_INT_MSK) { + if (is & TWIN_SCC_MSK) { + z8530_isr(info); + } else if (is & TWIN_TMR1_MSK) { + inb(card_base + TWIN_CLR_TMR1); + tm_isr(&info->priv[0]); + } else { + inb(card_base + TWIN_CLR_TMR2); + tm_isr(&info->priv[1]); + } + } + } else z8530_isr(info); + spin_unlock(info->priv[0].register_lock); + return IRQ_HANDLED; +} + + static void rx_isr(struct scc_priv *priv) { if (priv->param.dma >= 0) { /* Check special condition and perform error reset. See 2.4.7.5. */ @@ -1292,114 +1401,3 @@ break; } } - - -static inline void tx_on(struct scc_priv *priv) { - int i, n; - unsigned long flags; - - if (priv->param.dma >= 0) { - n = (priv->chip == Z85230) ? 3 : 1; - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_WRITE); - set_dma_addr(priv->param.dma, (int) priv->tx_buf[priv->tx_tail]+n); - set_dma_count(priv->param.dma, priv->tx_len[priv->tx_tail]-n); - release_dma_lock(flags); - /* Enable TX underrun interrupt */ - write_scc(priv, R15, TxUIE); - /* Configure DREQ */ - if (priv->type == TYPE_TWIN) - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_T1 : TWIN_DMA_HDX_T3, - priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | WT_RDY_ENAB); - /* Write first byte(s) */ - spin_lock_irqsave(priv->register_lock, flags); - for (i = 0; i < n; i++) - write_scc_data(priv, priv->tx_buf[priv->tx_tail][i], 1); - enable_dma(priv->param.dma); - spin_unlock_irqrestore(priv->register_lock, flags); - } else { - write_scc(priv, R15, TxUIE); - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN | TxINT_ENAB); - tx_isr(priv); - } - /* Reset EOM latch if we do not have the AUTOEOM feature */ - if (priv->chip == Z8530) write_scc(priv, R0, RES_EOM_L); -} - - -static inline void rx_on(struct scc_priv *priv) { - unsigned long flags; - - /* Clear RX FIFO */ - while (read_scc(priv, R0) & Rx_CH_AV) read_scc_data(priv); - priv->rx_over = 0; - if (priv->param.dma >= 0) { - /* Program DMA controller */ - flags = claim_dma_lock(); - set_dma_mode(priv->param.dma, DMA_MODE_READ); - set_dma_addr(priv->param.dma, (int) priv->rx_buf[priv->rx_head]); - set_dma_count(priv->param.dma, BUF_SIZE); - release_dma_lock(flags); - enable_dma(priv->param.dma); - /* Configure PackeTwin DMA */ - if (priv->type == TYPE_TWIN) { - outb((priv->param.dma == 1) ? TWIN_DMA_HDX_R1 : TWIN_DMA_HDX_R3, - priv->card_base + TWIN_DMA_CFG); - } - /* Sp. cond. intr. only, ext int enable, RX DMA enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ERR_Rx | - WT_RDY_RT | WT_FN_RDYFN | WT_RDY_ENAB); - } else { - /* Reset current frame */ - priv->rx_ptr = 0; - /* Intr. on all Rx characters and Sp. cond., ext int enable */ - write_scc(priv, R1, EXT_INT_ENAB | INT_ALL_Rx | WT_RDY_RT | - WT_FN_RDYFN); - } - write_scc(priv, R0, ERR_RES); - write_scc(priv, R3, RxENABLE | Rx8 | RxCRC_ENAB); -} - - -static inline void rx_off(struct scc_priv *priv) { - /* Disable receiver */ - write_scc(priv, R3, Rx8); - /* Disable DREQ / RX interrupt */ - if (priv->param.dma >= 0 && priv->type == TYPE_TWIN) - outb(0, priv->card_base + TWIN_DMA_CFG); - else - write_scc(priv, R1, EXT_INT_ENAB | WT_FN_RDYFN); - /* Disable DMA */ - if (priv->param.dma >= 0) disable_dma(priv->param.dma); -} - - -static void start_timer(struct scc_priv *priv, int t, int r15) { - unsigned long flags; - - outb(priv->tmr_mode, priv->tmr_ctrl); - if (t == 0) { - tm_isr(priv); - } else if (t > 0) { - save_flags(flags); - cli(); - outb(t & 0xFF, priv->tmr_cnt); - outb((t >> 8) & 0xFF, priv->tmr_cnt); - if (priv->type != TYPE_TWIN) { - write_scc(priv, R15, r15 | CTSIE); - priv->rr0 |= CTS; - } - restore_flags(flags); - } -} - - -static inline unsigned char random(void) { - /* See "Numerical Recipes in C", second edition, p. 284 */ - rand = rand * 1664525L + 1013904223L; - return (unsigned char) (rand >> 24); -} - diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/hp100.c 2004-09-06 16:37:52 -07:00 @@ -2906,13 +2906,19 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev, const struct pci_device_id *ent) { - struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private)); - int ioaddr = pci_resource_start(pdev, 0); + struct net_device *dev; + int ioaddr; u_short pci_command; int err; - - if (!dev) - return -ENOMEM; + + if (pci_enable_device(pdev)) + return -ENODEV; + + dev = alloc_etherdev(sizeof(struct hp100_private)); + if (!dev) { + err = -ENOMEM; + goto out0; + } SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); @@ -2934,7 +2940,7 @@ pci_write_config_word(pdev, PCI_COMMAND, pci_command); } - + ioaddr = pci_resource_start(pdev, 0); err = hp100_probe1(dev, ioaddr, HP100_BUS_PCI, pdev); if (err) goto out1; @@ -2951,6 +2957,8 @@ release_region(dev->base_addr, HP100_REGION_SIZE); out1: free_netdev(dev); + out0: + pci_disable_device(pdev); return err; } @@ -2959,6 +2967,7 @@ struct net_device *dev = pci_get_drvdata(pdev); cleanup_dev(dev); + pci_disable_device(pdev); } diff -Nru a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h --- a/drivers/net/ibm_emac/ibm_emac.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/ibm_emac/ibm_emac.h 2004-09-06 16:37:52 -07:00 @@ -228,6 +228,21 @@ (desc & EMAC_BAD_RX_PACKET) #endif +/* SoC implementation specific EMAC register defaults */ +#if defined(CONFIG_440GP) +#define EMAC_RWMR_DEFAULT 0x80009000 +#define EMAC_TMR0_DEFAULT 0x00000000 +#define EMAC_TMR1_DEFAULT 0xf8640000 +#elif defined(CONFIG_440GX) +#define EMAC_RWMR_DEFAULT 0x1000a200 +#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_2_32 +#define EMAC_TMR1_DEFAULT 0xa00f0000 +#else +#define EMAC_RWMR_DEFAULT 0x0f002000 +#define EMAC_TMR0_DEFAULT 0x00000000 +#define EMAC_TMR1_DEFAULT 0x380f0000 +#endif /* CONFIG_440GP */ + /* Revision specific EMAC register defaults */ #ifdef CONFIG_IBM_EMAC4 #define EMAC_M1_DEFAULT (EMAC_M1_BASE | \ @@ -236,7 +251,7 @@ #define EMAC_RMR_DEFAULT (EMAC_RMR_BASE | \ EMAC_RMR_RFAF_128_2048) #define EMAC_TMR0_XMIT (EMAC_TMR0_GNP0 | \ - EMAC_TMR0_TFAE_128_2048) + EMAC_TMR0_DEFAULT) #define EMAC_TRTR_DEFAULT EMAC_TRTR_1024 #else /* !CONFIG_IBM_EMAC4 */ #define EMAC_M1_DEFAULT EMAC_M1_BASE @@ -244,20 +259,5 @@ #define EMAC_TMR0_XMIT EMAC_TMR0_GNP0 #define EMAC_TRTR_DEFAULT EMAC_TRTR_1600 #endif /* CONFIG_IBM_EMAC4 */ - -/* SoC implementation specific EMAC register defaults */ -#if defined(CONFIG_440GP) -#define EMAC_RWMR_DEFAULT 0x80009000 -#define EMAC_TMR0_DEFAULT 0x00000000 -#define EMAC_TMR1_DEFAULT 0xf8640000 -#elif defined(CONFIG_440GX) -#define EMAC_RWMR_DEFAULT 0x1000a200 -#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_128_2048 -#define EMAC_TMR1_DEFAULT 0x88810000 -#else -#define EMAC_RWMR_DEFAULT 0x0f002000 -#define EMAC_TMR0_DEFAULT 0x00000000 -#define EMAC_TMR1_DEFAULT 0x380f0000 -#endif /* CONFIG_440GP */ #endif diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c --- a/drivers/net/ibm_emac/ibm_emac_core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.c 2004-09-06 16:37:50 -07:00 @@ -90,23 +90,24 @@ #define RGMII_PRIV(ocpdev) ((struct ibm_ocp_rgmii*)ocp_get_drvdata(ocpdev)) -static unsigned int rgmii_enable[] = - { RGMII_RTBI, RGMII_RGMII, RGMII_TBI, RGMII_GMII }; +static unsigned int rgmii_enable[] = { + RGMII_RTBI, + RGMII_RGMII, + RGMII_TBI, + RGMII_GMII +}; -static unsigned int rgmii_speed_mask[] = { 0, - 0, +static unsigned int rgmii_speed_mask[] = { RGMII_MII2_SPDMASK, RGMII_MII3_SPDMASK }; -static unsigned int rgmii_speed100[] = { 0, - 0, +static unsigned int rgmii_speed100[] = { RGMII_MII2_100MB, RGMII_MII3_100MB }; -static unsigned int rgmii_speed1000[] = { 0, - 0, +static unsigned int rgmii_speed1000[] = { RGMII_MII2_1000MB, RGMII_MII3_1000MB }; @@ -122,11 +123,21 @@ ~(ZMII_MDI0 | ZMII_MDI1 | ZMII_MDI3)}, {ZMII_SMII3, ZMII_RMII3, ZMII_MII3, ~(ZMII_MDI0 | ZMII_MDI1 | ZMII_MDI2)} }; -static unsigned int mdi_enable[] = - { ZMII_MDI0, ZMII_MDI1, ZMII_MDI2, ZMII_MDI3 }; + +static unsigned int mdi_enable[] = { + ZMII_MDI0, + ZMII_MDI1, + ZMII_MDI2, + ZMII_MDI3 +}; static unsigned int zmii_speed = 0x0; -static unsigned int zmii_speed100[] = { ZMII_MII0_100MB, ZMII_MII1_100MB }; +static unsigned int zmii_speed100[] = { + ZMII_MII0_100MB, + ZMII_MII1_100MB, + ZMII_MII2_100MB, + ZMII_MII3_100MB +}; /* Since multiple EMACs share MDIO lines in various ways, we need * to avoid re-using the same PHY ID in cases where the arch didn't @@ -367,6 +378,7 @@ int emac_phy_read(struct net_device *dev, int mii_id, int reg) { + int count; uint32_t stacr; struct ocp_enet_private *fep = dev->priv; emac_t *emacp = fep->emacp; @@ -385,9 +397,13 @@ emacp = fep->emacp; } - udelay(MDIO_DELAY); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) { + if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY read timeout #1!\n", dev->name); return -1; } @@ -398,8 +414,11 @@ out_be32(&emacp->em0stacr, stacr); - udelay(MDIO_DELAY); - stacr = in_be32(&emacp->em0stacr); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY read timeout #2!\n", dev->name); @@ -419,6 +438,7 @@ void emac_phy_write(struct net_device *dev, int mii_id, int reg, int data) { + int count; uint32_t stacr; struct ocp_enet_private *fep = dev->priv; emac_t *emacp = fep->emacp; @@ -437,9 +457,13 @@ emacp = fep->emacp; } - udelay(MDIO_DELAY); + count = 0; + while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0) + && (count++ < MDIO_DELAY)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) { + if ((stacr & EMAC_STACR_OC) == 0) { printk(KERN_WARNING "%s: PHY write timeout #2!\n", dev->name); return; } @@ -451,9 +475,12 @@ out_be32(&emacp->em0stacr, stacr); - udelay(MDIO_DELAY); + while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) + && (count++ < 5000)) + udelay(1); + MDIO_DEBUG((" (count was %d)\n", count)); - if ((in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0) + if ((stacr & EMAC_STACR_OC) == 0) printk(KERN_WARNING "%s: PHY write timeout #2!\n", dev->name); /* Check for a write error */ @@ -1940,8 +1967,6 @@ static int __init emac_init(void) { - int rc; - printk(KERN_INFO DRV_NAME ": " DRV_DESC ", version " DRV_VERSION "\n"); printk(KERN_INFO "Maintained by " DRV_AUTHOR "\n"); @@ -1950,13 +1975,8 @@ skb_res); skb_res = 2; } - rc = ocp_register_driver(&emac_driver); - if (rc < 0) { - ocp_unregister_driver(&emac_driver); - return -ENODEV; - } - return 0; + return ocp_register_driver(&emac_driver); } static void __exit emac_exit(void) diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h --- a/drivers/net/ibm_emac/ibm_emac_core.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.h 2004-09-06 16:37:51 -07:00 @@ -67,7 +67,7 @@ #define TX_TIMEOUT (2*HZ) /* MDIO latency delay */ -#define MDIO_DELAY 50 +#define MDIO_DELAY 250 /* Power managment shift registers */ #define IBM_CPM_EMMII 0 /* Shift value for MII */ diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/irda/irda-usb.c 2004-09-06 16:37:52 -07:00 @@ -268,7 +268,6 @@ speed_bulk_callback, self); urb->transfer_buffer_length = USB_IRDA_HEADER; urb->transfer_flags = URB_ASYNC_UNLINK; - urb->timeout = msecs_to_jiffies(100); /* Irq disabled -> GFP_ATOMIC */ if ((ret = usb_submit_urb(urb, GFP_ATOMIC))) { @@ -411,8 +410,6 @@ * after each of our packets that is exact multiple of the frame size. * This is how the dongle will detect the end of packet - Jean II */ urb->transfer_flags |= URB_ZERO_PACKET; - /* Timeout need to be shorter than NET watchdog timer */ - urb->timeout = msecs_to_jiffies(200); /* Generate min turn time. FIXME: can we do better than this? */ /* Trying to a turnaround time at this level is trying to measure diff -Nru a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c --- a/drivers/net/ixgb/ixgb_main.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/ixgb/ixgb_main.c 2004-09-06 16:37:51 -07:00 @@ -55,6 +55,8 @@ /* Local Function Prototypes */ +static inline void ixgb_irq_disable(struct ixgb_adapter *adapter); +static inline void ixgb_irq_enable(struct ixgb_adapter *adapter); int ixgb_up(struct ixgb_adapter *adapter); void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); void ixgb_reset(struct ixgb_adapter *adapter); @@ -82,10 +84,11 @@ static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); static int ixgb_set_mac(struct net_device *netdev, void *p); static void ixgb_update_stats(struct ixgb_adapter *adapter); -static inline void ixgb_irq_disable(struct ixgb_adapter *adapter); -static inline void ixgb_irq_enable(struct ixgb_adapter *adapter); static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs); static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter); +static inline void ixgb_rx_checksum(struct ixgb_adapter *adapter, + struct ixgb_rx_desc *rx_desc, + struct sk_buff *skb); #ifdef CONFIG_IXGB_NAPI static int ixgb_clean(struct net_device *netdev, int *budget); static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter, @@ -95,9 +98,6 @@ #endif static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); static int ixgb_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); -static inline void ixgb_rx_checksum(struct ixgb_adapter *adapter, - struct ixgb_rx_desc *rx_desc, - struct sk_buff *skb); static void ixgb_tx_timeout(struct net_device *dev); static void ixgb_tx_timeout_task(struct net_device *dev); static void ixgb_vlan_rx_register(struct net_device *netdev, @@ -185,6 +185,34 @@ module_exit(ixgb_exit_module); +/** + * ixgb_irq_disable - Mask off interrupt generation on the NIC + * @adapter: board private structure + **/ + +static inline void ixgb_irq_disable(struct ixgb_adapter *adapter) +{ + atomic_inc(&adapter->irq_sem); + IXGB_WRITE_REG(&adapter->hw, IMC, ~0); + IXGB_WRITE_FLUSH(&adapter->hw); + synchronize_irq(adapter->pdev->irq); +} + +/** + * ixgb_irq_enable - Enable default interrupt generation settings + * @adapter: board private structure + **/ + +static inline void ixgb_irq_enable(struct ixgb_adapter *adapter) +{ + if (atomic_dec_and_test(&adapter->irq_sem)) { + IXGB_WRITE_REG(&adapter->hw, IMS, + IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | IXGB_INT_TXDW | + IXGB_INT_RXO | IXGB_INT_LSC); + IXGB_WRITE_FLUSH(&adapter->hw); + } +} + int ixgb_up(struct ixgb_adapter *adapter) { struct net_device *netdev = adapter->netdev; @@ -1550,34 +1578,6 @@ adapter->net_stats.tx_window_errors = 0; } -/** - * ixgb_irq_disable - Mask off interrupt generation on the NIC - * @adapter: board private structure - **/ - -static inline void ixgb_irq_disable(struct ixgb_adapter *adapter) -{ - atomic_inc(&adapter->irq_sem); - IXGB_WRITE_REG(&adapter->hw, IMC, ~0); - IXGB_WRITE_FLUSH(&adapter->hw); - synchronize_irq(adapter->pdev->irq); -} - -/** - * ixgb_irq_enable - Enable default interrupt generation settings - * @adapter: board private structure - **/ - -static inline void ixgb_irq_enable(struct ixgb_adapter *adapter) -{ - if (atomic_dec_and_test(&adapter->irq_sem)) { - IXGB_WRITE_REG(&adapter->hw, IMS, - IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | IXGB_INT_TXDW | - IXGB_INT_RXO | IXGB_INT_LSC); - IXGB_WRITE_FLUSH(&adapter->hw); - } -} - #define IXGB_MAX_INTR 10 /** * ixgb_intr - Interrupt Handler @@ -1730,6 +1730,39 @@ } /** + * ixgb_rx_checksum - Receive Checksum Offload for 82597. + * @adapter: board private structure + * @rx_desc: receive descriptor + * @sk_buff: socket buffer with received data + **/ + +static inline void +ixgb_rx_checksum(struct ixgb_adapter *adapter, + struct ixgb_rx_desc *rx_desc, struct sk_buff *skb) +{ + /* Ignore Checksum bit is set OR + * TCP Checksum has not been calculated + */ + if ((rx_desc->status & IXGB_RX_DESC_STATUS_IXSM) || + (!(rx_desc->status & IXGB_RX_DESC_STATUS_TCPCS))) { + skb->ip_summed = CHECKSUM_NONE; + return; + } + + /* At this point we know the hardware did the TCP checksum */ + /* now look at the TCP checksum error bit */ + if (rx_desc->errors & IXGB_RX_DESC_ERRORS_TCPE) { + /* let the stack verify checksum errors */ + skb->ip_summed = CHECKSUM_NONE; + adapter->hw_csum_rx_error++; + } else { + /* TCP checksum is good */ + skb->ip_summed = CHECKSUM_UNNECESSARY; + adapter->hw_csum_rx_good++; + } +} + +/** * ixgb_clean_rx_irq - Send received data up the network stack, * @adapter: board private structure **/ @@ -1953,39 +1986,6 @@ } return 0; -} - -/** - * ixgb_rx_checksum - Receive Checksum Offload for 82597. - * @adapter: board private structure - * @rx_desc: receive descriptor - * @sk_buff: socket buffer with received data - **/ - -static inline void -ixgb_rx_checksum(struct ixgb_adapter *adapter, - struct ixgb_rx_desc *rx_desc, struct sk_buff *skb) -{ - /* Ignore Checksum bit is set OR - * TCP Checksum has not been calculated - */ - if ((rx_desc->status & IXGB_RX_DESC_STATUS_IXSM) || - (!(rx_desc->status & IXGB_RX_DESC_STATUS_TCPCS))) { - skb->ip_summed = CHECKSUM_NONE; - return; - } - - /* At this point we know the hardware did the TCP checksum */ - /* now look at the TCP checksum error bit */ - if (rx_desc->errors & IXGB_RX_DESC_ERRORS_TCPE) { - /* let the stack verify checksum errors */ - skb->ip_summed = CHECKSUM_NONE; - adapter->hw_csum_rx_error++; - } else { - /* TCP checksum is good */ - skb->ip_summed = CHECKSUM_UNNECESSARY; - adapter->hw_csum_rx_good++; - } } /** diff -Nru a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c --- a/drivers/net/ppp_generic.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/ppp_generic.c 2004-09-06 16:37:55 -07:00 @@ -1595,6 +1595,7 @@ skb->dev = ppp->dev; skb->protocol = htons(npindex_to_ethertype[npi]); skb->mac.raw = skb->data; + skb->input_dev = ppp->dev; netif_rx(skb); ppp->dev->last_rx = jiffies; } diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/r8169.c 2004-09-06 16:37:53 -07:00 @@ -983,7 +983,7 @@ tp->cp_cmd = PCIMulRW | RxChkSum; - if ((sizeof(dma_addr_t) > 32) && + if ((sizeof(dma_addr_t) > 4) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) tp->cp_cmd |= PCIDAC; else { diff -Nru a/drivers/net/rrunner.c b/drivers/net/rrunner.c --- a/drivers/net/rrunner.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/rrunner.c 2004-09-06 16:37:51 -07:00 @@ -1139,6 +1139,49 @@ return IRQ_HANDLED; } +static inline void rr_raz_tx(struct rr_private *rrpriv, + struct net_device *dev) +{ + int i; + + for (i = 0; i < TX_RING_ENTRIES; i++) { + struct sk_buff *skb = rrpriv->tx_skbuff[i]; + + if (skb) { + struct tx_desc *desc = &(rrpriv->tx_ring[i]); + + pci_unmap_single(rrpriv->pci_dev, desc->addr.addrlo, + skb->len, PCI_DMA_TODEVICE); + desc->size = 0; + set_rraddr(&desc->addr, 0); + dev_kfree_skb(skb); + rrpriv->tx_skbuff[i] = NULL; + } + } +} + + +static inline void rr_raz_rx(struct rr_private *rrpriv, + struct net_device *dev) +{ + int i; + + for (i = 0; i < RX_RING_ENTRIES; i++) { + struct sk_buff *skb = rrpriv->rx_skbuff[i]; + + if (skb) { + struct rx_desc *desc = &(rrpriv->rx_ring[i]); + + pci_unmap_single(rrpriv->pci_dev, desc->addr.addrlo, + dev->mtu + HIPPI_HLEN, PCI_DMA_FROMDEVICE); + desc->size = 0; + set_rraddr(&desc->addr, 0); + dev_kfree_skb(skb); + rrpriv->rx_skbuff[i] = NULL; + } + } +} + static void rr_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; @@ -1253,49 +1296,6 @@ return ecode; } - -static inline void rr_raz_tx(struct rr_private *rrpriv, - struct net_device *dev) -{ - int i; - - for (i = 0; i < TX_RING_ENTRIES; i++) { - struct sk_buff *skb = rrpriv->tx_skbuff[i]; - - if (skb) { - struct tx_desc *desc = &(rrpriv->tx_ring[i]); - - pci_unmap_single(rrpriv->pci_dev, desc->addr.addrlo, - skb->len, PCI_DMA_TODEVICE); - desc->size = 0; - set_rraddr(&desc->addr, 0); - dev_kfree_skb(skb); - rrpriv->tx_skbuff[i] = NULL; - } - } -} - - -static inline void rr_raz_rx(struct rr_private *rrpriv, - struct net_device *dev) -{ - int i; - - for (i = 0; i < RX_RING_ENTRIES; i++) { - struct sk_buff *skb = rrpriv->rx_skbuff[i]; - - if (skb) { - struct rx_desc *desc = &(rrpriv->rx_ring[i]); - - pci_unmap_single(rrpriv->pci_dev, desc->addr.addrlo, - dev->mtu + HIPPI_HLEN, PCI_DMA_FROMDEVICE); - desc->size = 0; - set_rraddr(&desc->addr, 0); - dev_kfree_skb(skb); - rrpriv->rx_skbuff[i] = NULL; - } - } -} static void rr_dump(struct net_device *dev) { diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/sis900.c 2004-09-06 16:37:52 -07:00 @@ -124,6 +124,7 @@ { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, { "ICS LAN PHY", 0x0015, 0xF440, LAN }, { "NS 83851 PHY", 0x2000, 0x5C20, MIX }, + { "NS 83847 PHY", 0x2000, 0x5C30, MIX }, { "Realtek RTL8201 PHY", 0x0000, 0x8200, LAN }, { "VIA 6103 PHY", 0x0101, 0x8f20, LAN }, {NULL,}, diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/sk98lin/skge.c 2004-09-06 16:37:51 -07:00 @@ -110,10 +110,7 @@ #include #include - -#ifdef CONFIG_PROC_FS #include -#endif #include "h/skdrv1st.h" #include "h/skdrv2nd.h" @@ -5113,9 +5110,12 @@ if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 2) have_second_mac = 1; + remove_proc_entry(dev->name, pSkRootDir); unregister_netdev(dev); - if (have_second_mac) + if (have_second_mac) { + remove_proc_entry(pAC->dev[1]->name, pSkRootDir); unregister_netdev(pAC->dev[1]); + } SkGeYellowLED(pAC, pAC->IoBase, 0); @@ -5182,9 +5182,9 @@ { int error; +#ifdef CONFIG_PROC_FS memcpy(&SK_Root_Dir_entry, BOOT_STRING, sizeof(SK_Root_Dir_entry) - 1); -#ifdef CONFIG_PROC_FS pSkRootDir = proc_mkdir(SK_Root_Dir_entry, proc_net); if (!pSkRootDir) { printk(KERN_WARNING "Unable to create /proc/net/%s", diff -Nru a/drivers/net/smc9194.c b/drivers/net/smc9194.c --- a/drivers/net/smc9194.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/smc9194.c 2004-09-06 16:37:54 -07:00 @@ -1191,133 +1191,6 @@ netif_wake_queue(dev); } -/*-------------------------------------------------------------------- - . - . This is the main routine of the driver, to handle the device when - . it needs some attention. - . - . So: - . first, save state of the chipset - . branch off into routines to handle each case, and acknowledge - . each to the interrupt register - . and finally restore state. - . - ---------------------------------------------------------------------*/ - -static irqreturn_t smc_interrupt(int irq, void * dev_id, struct pt_regs * regs) -{ - struct net_device *dev = dev_id; - int ioaddr = dev->base_addr; - struct smc_local *lp = netdev_priv(dev); - - byte status; - word card_stats; - byte mask; - int timeout; - /* state registers */ - word saved_bank; - word saved_pointer; - int handled = 0; - - - PRINTK3((CARDNAME": SMC interrupt started \n")); - - saved_bank = inw( ioaddr + BANK_SELECT ); - - SMC_SELECT_BANK(2); - saved_pointer = inw( ioaddr + POINTER ); - - mask = inb( ioaddr + INT_MASK ); - /* clear all interrupts */ - outb( 0, ioaddr + INT_MASK ); - - - /* set a timeout value, so I don't stay here forever */ - timeout = 4; - - PRINTK2((KERN_WARNING CARDNAME ": MASK IS %x \n", mask )); - do { - /* read the status flag, and mask it */ - status = inb( ioaddr + INTERRUPT ) & mask; - if (!status ) - break; - - handled = 1; - - PRINTK3((KERN_WARNING CARDNAME - ": Handling interrupt status %x \n", status )); - - if (status & IM_RCV_INT) { - /* Got a packet(s). */ - PRINTK2((KERN_WARNING CARDNAME - ": Receive Interrupt\n")); - smc_rcv(dev); - } else if (status & IM_TX_INT ) { - PRINTK2((KERN_WARNING CARDNAME - ": TX ERROR handled\n")); - smc_tx(dev); - outb(IM_TX_INT, ioaddr + INTERRUPT ); - } else if (status & IM_TX_EMPTY_INT ) { - /* update stats */ - SMC_SELECT_BANK( 0 ); - card_stats = inw( ioaddr + COUNTER ); - /* single collisions */ - lp->stats.collisions += card_stats & 0xF; - card_stats >>= 4; - /* multiple collisions */ - lp->stats.collisions += card_stats & 0xF; - - /* these are for when linux supports these statistics */ - - SMC_SELECT_BANK( 2 ); - PRINTK2((KERN_WARNING CARDNAME - ": TX_BUFFER_EMPTY handled\n")); - outb( IM_TX_EMPTY_INT, ioaddr + INTERRUPT ); - mask &= ~IM_TX_EMPTY_INT; - lp->stats.tx_packets += lp->packets_waiting; - lp->packets_waiting = 0; - - } else if (status & IM_ALLOC_INT ) { - PRINTK2((KERN_DEBUG CARDNAME - ": Allocation interrupt \n")); - /* clear this interrupt so it doesn't happen again */ - mask &= ~IM_ALLOC_INT; - - smc_hardware_send_packet( dev ); - - /* enable xmit interrupts based on this */ - mask |= ( IM_TX_EMPTY_INT | IM_TX_INT ); - - /* and let the card send more packets to me */ - netif_wake_queue(dev); - - PRINTK2((CARDNAME": Handoff done successfully.\n")); - } else if (status & IM_RX_OVRN_INT ) { - lp->stats.rx_errors++; - lp->stats.rx_fifo_errors++; - outb( IM_RX_OVRN_INT, ioaddr + INTERRUPT ); - } else if (status & IM_EPH_INT ) { - PRINTK((CARDNAME ": UNSUPPORTED: EPH INTERRUPT \n")); - } else if (status & IM_ERCV_INT ) { - PRINTK((CARDNAME ": UNSUPPORTED: ERCV INTERRUPT \n")); - outb( IM_ERCV_INT, ioaddr + INTERRUPT ); - } - } while ( timeout -- ); - - - /* restore state register */ - SMC_SELECT_BANK( 2 ); - outb( mask, ioaddr + INT_MASK ); - - PRINTK3(( KERN_WARNING CARDNAME ": MASK is now %x \n", mask )); - outw( saved_pointer, ioaddr + POINTER ); - - SMC_SELECT_BANK( saved_bank ); - - PRINTK3((CARDNAME ": Interrupt done\n")); - return IRQ_RETVAL(handled); -} - /*------------------------------------------------------------- . . smc_rcv - receive a packet from the card @@ -1508,6 +1381,134 @@ outb( saved_packet, ioaddr + PNR_ARR ); return; } + +/*-------------------------------------------------------------------- + . + . This is the main routine of the driver, to handle the device when + . it needs some attention. + . + . So: + . first, save state of the chipset + . branch off into routines to handle each case, and acknowledge + . each to the interrupt register + . and finally restore state. + . + ---------------------------------------------------------------------*/ + +static irqreturn_t smc_interrupt(int irq, void * dev_id, struct pt_regs * regs) +{ + struct net_device *dev = dev_id; + int ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + + byte status; + word card_stats; + byte mask; + int timeout; + /* state registers */ + word saved_bank; + word saved_pointer; + int handled = 0; + + + PRINTK3((CARDNAME": SMC interrupt started \n")); + + saved_bank = inw( ioaddr + BANK_SELECT ); + + SMC_SELECT_BANK(2); + saved_pointer = inw( ioaddr + POINTER ); + + mask = inb( ioaddr + INT_MASK ); + /* clear all interrupts */ + outb( 0, ioaddr + INT_MASK ); + + + /* set a timeout value, so I don't stay here forever */ + timeout = 4; + + PRINTK2((KERN_WARNING CARDNAME ": MASK IS %x \n", mask )); + do { + /* read the status flag, and mask it */ + status = inb( ioaddr + INTERRUPT ) & mask; + if (!status ) + break; + + handled = 1; + + PRINTK3((KERN_WARNING CARDNAME + ": Handling interrupt status %x \n", status )); + + if (status & IM_RCV_INT) { + /* Got a packet(s). */ + PRINTK2((KERN_WARNING CARDNAME + ": Receive Interrupt\n")); + smc_rcv(dev); + } else if (status & IM_TX_INT ) { + PRINTK2((KERN_WARNING CARDNAME + ": TX ERROR handled\n")); + smc_tx(dev); + outb(IM_TX_INT, ioaddr + INTERRUPT ); + } else if (status & IM_TX_EMPTY_INT ) { + /* update stats */ + SMC_SELECT_BANK( 0 ); + card_stats = inw( ioaddr + COUNTER ); + /* single collisions */ + lp->stats.collisions += card_stats & 0xF; + card_stats >>= 4; + /* multiple collisions */ + lp->stats.collisions += card_stats & 0xF; + + /* these are for when linux supports these statistics */ + + SMC_SELECT_BANK( 2 ); + PRINTK2((KERN_WARNING CARDNAME + ": TX_BUFFER_EMPTY handled\n")); + outb( IM_TX_EMPTY_INT, ioaddr + INTERRUPT ); + mask &= ~IM_TX_EMPTY_INT; + lp->stats.tx_packets += lp->packets_waiting; + lp->packets_waiting = 0; + + } else if (status & IM_ALLOC_INT ) { + PRINTK2((KERN_DEBUG CARDNAME + ": Allocation interrupt \n")); + /* clear this interrupt so it doesn't happen again */ + mask &= ~IM_ALLOC_INT; + + smc_hardware_send_packet( dev ); + + /* enable xmit interrupts based on this */ + mask |= ( IM_TX_EMPTY_INT | IM_TX_INT ); + + /* and let the card send more packets to me */ + netif_wake_queue(dev); + + PRINTK2((CARDNAME": Handoff done successfully.\n")); + } else if (status & IM_RX_OVRN_INT ) { + lp->stats.rx_errors++; + lp->stats.rx_fifo_errors++; + outb( IM_RX_OVRN_INT, ioaddr + INTERRUPT ); + } else if (status & IM_EPH_INT ) { + PRINTK((CARDNAME ": UNSUPPORTED: EPH INTERRUPT \n")); + } else if (status & IM_ERCV_INT ) { + PRINTK((CARDNAME ": UNSUPPORTED: ERCV INTERRUPT \n")); + outb( IM_ERCV_INT, ioaddr + INTERRUPT ); + } + } while ( timeout -- ); + + + /* restore state register */ + SMC_SELECT_BANK( 2 ); + outb( mask, ioaddr + INT_MASK ); + + PRINTK3(( KERN_WARNING CARDNAME ": MASK is now %x \n", mask )); + outw( saved_pointer, ioaddr + POINTER ); + + SMC_SELECT_BANK( saved_bank ); + + PRINTK3((CARDNAME ": Interrupt done\n")); + return IRQ_RETVAL(handled); +} + /*---------------------------------------------------- . smc_close diff -Nru a/drivers/net/smc91x.c b/drivers/net/smc91x.c --- a/drivers/net/smc91x.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/smc91x.c 2004-09-06 16:37:55 -07:00 @@ -2154,10 +2154,12 @@ static int __init smc_init(void) { #ifdef MODULE +#ifdef CONFIG_ISA if (io == -1) printk(KERN_WARNING "%s: You shouldn't use auto-probing with insmod!\n", CARDNAME); +#endif #endif return driver_register(&smc_driver); diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/smc91x.h 2004-09-06 16:37:54 -07:00 @@ -809,9 +809,10 @@ do { \ char *__ptr = (p); \ int __len = (l); \ - if (__len >= 2 && (long)__ptr & 2) { \ + if (__len >= 2 && (unsigned long)__ptr & 2) { \ __len -= 2; \ - SMC_outw( *((u16 *)__ptr)++, ioaddr, DATA_REG );\ + SMC_outw( *(u16 *)__ptr, ioaddr, DATA_REG ); \ + __ptr += 2; \ } \ SMC_outsl( ioaddr, DATA_REG, __ptr, __len >> 2); \ if (__len & 2) { \ @@ -823,7 +824,7 @@ do { \ char *__ptr = (p); \ int __len = (l); \ - if ((long)__ptr & 2) { \ + if ((unsigned long)__ptr & 2) { \ /* \ * We want 32bit alignment here. \ * Since some buses perform a full 32bit \ @@ -831,7 +832,7 @@ * SMC_inw() here. Back both source (on chip \ * and destination) pointers of 2 bytes. \ */ \ - (long)__ptr &= ~2; \ + __ptr -= 2; \ __len += 2; \ SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC ); \ } \ diff -Nru a/drivers/net/sundance.c b/drivers/net/sundance.c --- a/drivers/net/sundance.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/sundance.c 2004-09-06 16:37:53 -07:00 @@ -879,7 +879,7 @@ if (dev->if_port == 0) dev->if_port = np->default_port; - np->mcastlock = (spinlock_t) SPIN_LOCK_UNLOCKED; + np->mcastlock = SPIN_LOCK_UNLOCKED; set_rx_mode(dev); writew(0, ioaddr + IntrEnable); diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/tg3.c 2004-09-06 16:37:53 -07:00 @@ -4,6 +4,9 @@ * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) * Copyright (C) 2004 Sun Microsystems Inc. + * + * Firmware is: + * Copyright (C) 2000-2003 Broadcom Corporation. */ #include @@ -57,8 +60,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.8" -#define DRV_MODULE_RELDATE "July 14, 2004" +#define DRV_MODULE_VERSION "3.9" +#define DRV_MODULE_RELDATE "August 30, 2004" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -442,9 +445,14 @@ 0x1f); tp->pci_clock_ctrl = clock_ctrl; - if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && - GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 && - (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { + if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { + tw32_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | CLOCK_CTRL_625_CORE); + udelay(40); + } + } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); @@ -980,7 +988,7 @@ tp->link_config.orig_autoneg = tp->link_config.autoneg; } - if (tp->phy_id != PHY_ID_SERDES) { + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { tp->link_config.speed = SPEED_10; tp->link_config.duplex = DUPLEX_HALF; tp->link_config.autoneg = AUTONEG_ENABLE; @@ -992,7 +1000,7 @@ if (tp->tg3_flags & TG3_FLAG_WOL_ENABLE) { u32 mac_mode; - if (tp->phy_id != PHY_ID_SERDES) { + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x5a); udelay(40); @@ -1487,6 +1495,18 @@ current_speed = SPEED_INVALID; current_duplex = DUPLEX_INVALID; + if (tp->tg3_flags2 & TG3_FLG2_CAPACITIVE_COUPLING) { + u32 val; + + tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x4007); + tg3_readphy(tp, MII_TG3_AUX_CTRL, &val); + if (!(val & (1 << 10))) { + val |= (1 << 10); + tg3_writephy(tp, MII_TG3_AUX_CTRL, val); + goto relink; + } + } + bmsr = 0; for (i = 0; i < 100; i++) { tg3_readphy(tp, MII_BMSR, &bmsr); @@ -1566,7 +1586,7 @@ tg3_setup_flow_control(tp, local_adv, remote_adv); } } - +relink: if (current_link_up == 0) { u32 tmp; @@ -1616,7 +1636,7 @@ tw32_f(MAC_MODE, tp->mac_mode); udelay(40); - if (tp->tg3_flags & (TG3_FLAG_USE_LINKCHG_REG | TG3_FLAG_POLL_SERDES)) { + if (tp->tg3_flags & TG3_FLAG_USE_LINKCHG_REG) { /* Polled via timer. */ tw32_f(MAC_EVENT, 0); } else { @@ -1965,62 +1985,264 @@ static int fiber_autoneg(struct tg3 *tp, u32 *flags) { int res = 0; + struct tg3_fiber_aneginfo aninfo; + int status = ANEG_FAILED; + unsigned int tick; + u32 tmp; - if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) { - u32 dig_status; + tw32_f(MAC_TX_AUTO_NEG, 0); - dig_status = tr32(SG_DIG_STATUS); - *flags = 0; - if (dig_status & SG_DIG_PARTNER_ASYM_PAUSE) - *flags |= MR_LP_ADV_ASYM_PAUSE; - if (dig_status & SG_DIG_PARTNER_PAUSE_CAPABLE) - *flags |= MR_LP_ADV_SYM_PAUSE; - - if ((dig_status & SG_DIG_AUTONEG_COMPLETE) && - !(dig_status & (SG_DIG_AUTONEG_ERROR | - SG_DIG_PARTNER_FAULT_MASK))) - res = 1; - } else { - struct tg3_fiber_aneginfo aninfo; - int status = ANEG_FAILED; - unsigned int tick; - u32 tmp; + tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; + tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); + udelay(40); - tw32_f(MAC_TX_AUTO_NEG, 0); + tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); + udelay(40); - tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; - tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); - udelay(40); + memset(&aninfo, 0, sizeof(aninfo)); + aninfo.flags |= MR_AN_ENABLE; + aninfo.state = ANEG_STATE_UNKNOWN; + aninfo.cur_time = 0; + tick = 0; + while (++tick < 195000) { + status = tg3_fiber_aneg_smachine(tp, &aninfo); + if (status == ANEG_DONE || status == ANEG_FAILED) + break; - tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); - udelay(40); + udelay(1); + } - memset(&aninfo, 0, sizeof(aninfo)); - aninfo.flags |= MR_AN_ENABLE; - aninfo.state = ANEG_STATE_UNKNOWN; - aninfo.cur_time = 0; - tick = 0; - while (++tick < 195000) { - status = tg3_fiber_aneg_smachine(tp, &aninfo); - if (status == ANEG_DONE || status == ANEG_FAILED) - break; + tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; + tw32_f(MAC_MODE, tp->mac_mode); + udelay(40); - udelay(1); + *flags = aninfo.flags; + + if (status == ANEG_DONE && + (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK | + MR_LP_ADV_FULL_DUPLEX))) + res = 1; + + return res; +} + +static void tg3_init_bcm8002(struct tg3 *tp) +{ + u32 mac_status = tr32(MAC_STATUS); + int i; + + /* Reset when initting first time or we have a link. */ + if ((tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) && + !(mac_status & MAC_STATUS_PCS_SYNCED)) + return; + + /* Set PLL lock range. */ + tg3_writephy(tp, 0x16, 0x8007); + + /* SW reset */ + tg3_writephy(tp, MII_BMCR, BMCR_RESET); + + /* Wait for reset to complete. */ + /* XXX schedule_timeout() ... */ + for (i = 0; i < 500; i++) + udelay(10); + + /* Config mode; select PMA/Ch 1 regs. */ + tg3_writephy(tp, 0x10, 0x8411); + + /* Enable auto-lock and comdet, select txclk for tx. */ + tg3_writephy(tp, 0x11, 0x0a10); + + tg3_writephy(tp, 0x18, 0x00a0); + tg3_writephy(tp, 0x16, 0x41ff); + + /* Assert and deassert POR. */ + tg3_writephy(tp, 0x13, 0x0400); + udelay(40); + tg3_writephy(tp, 0x13, 0x0000); + + tg3_writephy(tp, 0x11, 0x0a50); + udelay(40); + tg3_writephy(tp, 0x11, 0x0a10); + + /* Wait for signal to stabilize */ + /* XXX schedule_timeout() ... */ + for (i = 0; i < 15000; i++) + udelay(10); + + /* Deselect the channel register so we can read the PHYID + * later. + */ + tg3_writephy(tp, 0x10, 0x8011); +} + +static int tg3_setup_fiber_hw_autoneg(struct tg3 *tp, u32 mac_status) +{ + u32 sg_dig_ctrl, sg_dig_status; + u32 serdes_cfg, expected_sg_dig_ctrl; + int workaround, port_a; + int current_link_up; + + serdes_cfg = 0; + expected_sg_dig_ctrl = 0; + workaround = 0; + port_a = 1; + current_link_up = 0; + + if (tp->pci_chip_rev_id != CHIPREV_ID_5704_A0 && + tp->pci_chip_rev_id != CHIPREV_ID_5704_A1) { + workaround = 1; + if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID) + port_a = 0; + + serdes_cfg = tr32(MAC_SERDES_CFG) & + ((1 << 23) | (1 << 22) | (1 << 21) | (1 << 20)); + } + + sg_dig_ctrl = tr32(SG_DIG_CTRL); + + if (tp->link_config.autoneg != AUTONEG_ENABLE) { + if (sg_dig_ctrl & (1 << 31)) { + if (workaround) { + u32 val = serdes_cfg; + + if (port_a) + val |= 0xc010880; + else + val |= 0x4010880; + tw32_f(MAC_SERDES_CFG, val); + } + tw32_f(SG_DIG_CTRL, 0x01388400); } + if (mac_status & MAC_STATUS_PCS_SYNCED) { + tg3_setup_flow_control(tp, 0, 0); + current_link_up = 1; + } + goto out; + } - tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; - tw32_f(MAC_MODE, tp->mac_mode); - udelay(40); + /* Want auto-negotiation. */ + expected_sg_dig_ctrl = 0x81388400; + + /* Pause capability */ + expected_sg_dig_ctrl |= (1 << 11); - *flags = aninfo.flags; + /* Asymettric pause */ + expected_sg_dig_ctrl |= (1 << 12); - if (status == ANEG_DONE && - (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK | - MR_LP_ADV_FULL_DUPLEX))) - res = 1; + if (sg_dig_ctrl != expected_sg_dig_ctrl) { + if (workaround) + tw32_f(MAC_SERDES_CFG, serdes_cfg | 0xc011880); + tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl | (1 << 30)); + udelay(5); + tw32_f(SG_DIG_CTRL, expected_sg_dig_ctrl); + + tp->tg3_flags2 |= TG3_FLG2_PHY_JUST_INITTED; + } else if (mac_status & (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DET)) { + sg_dig_status = tr32(SG_DIG_STATUS); + + if ((sg_dig_status & (1 << 1)) && + (mac_status & MAC_STATUS_PCS_SYNCED)) { + u32 local_adv, remote_adv; + + local_adv = ADVERTISE_PAUSE_CAP; + remote_adv = 0; + if (sg_dig_status & (1 << 19)) + remote_adv |= LPA_PAUSE_CAP; + if (sg_dig_status & (1 << 20)) + remote_adv |= LPA_PAUSE_ASYM; + + tg3_setup_flow_control(tp, local_adv, remote_adv); + current_link_up = 1; + tp->tg3_flags2 &= ~TG3_FLG2_PHY_JUST_INITTED; + } else if (!(sg_dig_status & (1 << 1))) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_JUST_INITTED) + tp->tg3_flags2 &= ~TG3_FLG2_PHY_JUST_INITTED; + else { + if (workaround) { + u32 val = serdes_cfg; + + if (port_a) + val |= 0xc010880; + else + val |= 0x4010880; + + tw32_f(MAC_SERDES_CFG, serdes_cfg); + } + + tw32_f(SG_DIG_CTRL, 0x01388400); + udelay(40); + + mac_status = tr32(MAC_STATUS); + if (mac_status & MAC_STATUS_PCS_SYNCED) { + tg3_setup_flow_control(tp, 0, 0); + current_link_up = 1; + } + } + } } - return res; +out: + return current_link_up; +} + +static int tg3_setup_fiber_by_hand(struct tg3 *tp, u32 mac_status) +{ + int current_link_up = 0; + + if (!(mac_status & MAC_STATUS_PCS_SYNCED)) { + tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL; + goto out; + } + + if (tp->link_config.autoneg == AUTONEG_ENABLE) { + u32 flags; + int i; + + if (fiber_autoneg(tp, &flags)) { + u32 local_adv, remote_adv; + + local_adv = ADVERTISE_PAUSE_CAP; + remote_adv = 0; + if (flags & MR_LP_ADV_SYM_PAUSE) + remote_adv |= LPA_PAUSE_CAP; + if (flags & MR_LP_ADV_ASYM_PAUSE) + remote_adv |= LPA_PAUSE_ASYM; + + tg3_setup_flow_control(tp, local_adv, remote_adv); + + tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL; + current_link_up = 1; + } + for (i = 0; i < 30; i++) { + udelay(20); + tw32_f(MAC_STATUS, + (MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED)); + udelay(40); + if ((tr32(MAC_STATUS) & + (MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED)) == 0) + break; + } + + mac_status = tr32(MAC_STATUS); + if (current_link_up == 0 && + (mac_status & MAC_STATUS_PCS_SYNCED) && + !(mac_status & MAC_STATUS_RCVD_CFG)) + current_link_up = 1; + } else { + /* Forcing 1000FD link up. */ + current_link_up = 1; + tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL; + + tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS)); + udelay(40); + } + +out: + return current_link_up; } static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) @@ -2028,6 +2250,7 @@ u32 orig_pause_cfg; u16 orig_active_speed; u8 orig_active_duplex; + u32 mac_status; int current_link_up; int i; @@ -2037,118 +2260,43 @@ orig_active_speed = tp->link_config.active_speed; orig_active_duplex = tp->link_config.active_duplex; - tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); - tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; - tw32_f(MAC_MODE, tp->mac_mode); - udelay(40); - - if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) { - /* Allow time for the hardware to auto-negotiate (195ms) */ - unsigned int tick = 0; - - while (++tick < 195000) { - if (tr32(SG_DIG_STATUS) & SG_DIG_AUTONEG_COMPLETE) - break; - udelay(1); + if (!(tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) && + netif_carrier_ok(tp->dev) && + (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) { + mac_status = tr32(MAC_STATUS); + mac_status &= (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DET | + MAC_STATUS_CFG_CHANGED | + MAC_STATUS_RCVD_CFG); + if (mac_status == (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DET)) { + tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED)); + return 0; } - if (tick >= 195000) - printk(KERN_INFO PFX "%s: HW autoneg failed !\n", - tp->dev->name); } - /* Reset when initting first time or we have a link. */ - if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || - (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { - /* Set PLL lock range. */ - tg3_writephy(tp, 0x16, 0x8007); - - /* SW reset */ - tg3_writephy(tp, MII_BMCR, BMCR_RESET); - - /* Wait for reset to complete. */ - /* XXX schedule_timeout() ... */ - for (i = 0; i < 500; i++) - udelay(10); - - /* Config mode; select PMA/Ch 1 regs. */ - tg3_writephy(tp, 0x10, 0x8411); - - /* Enable auto-lock and comdet, select txclk for tx. */ - tg3_writephy(tp, 0x11, 0x0a10); - - tg3_writephy(tp, 0x18, 0x00a0); - tg3_writephy(tp, 0x16, 0x41ff); - - /* Assert and deassert POR. */ - tg3_writephy(tp, 0x13, 0x0400); - udelay(40); - tg3_writephy(tp, 0x13, 0x0000); + tw32_f(MAC_TX_AUTO_NEG, 0); - tg3_writephy(tp, 0x11, 0x0a50); - udelay(40); - tg3_writephy(tp, 0x11, 0x0a10); + tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); + tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; + tw32_f(MAC_MODE, tp->mac_mode); + udelay(40); - /* Wait for signal to stabilize */ - /* XXX schedule_timeout() ... */ - for (i = 0; i < 15000; i++) - udelay(10); + if (tp->phy_id == PHY_ID_BCM8002) + tg3_init_bcm8002(tp); - /* Deselect the channel register so we can read the PHYID - * later. - */ - tg3_writephy(tp, 0x10, 0x8011); - } - - /* Enable link change interrupt unless serdes polling. */ - if (!(tp->tg3_flags & TG3_FLAG_POLL_SERDES)) - tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED); - else - tw32_f(MAC_EVENT, 0); + /* Enable link change event even when serdes polling. */ + tw32_f(MAC_EVENT, MAC_EVENT_LNKSTATE_CHANGED); udelay(40); current_link_up = 0; - if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { - if (tp->link_config.autoneg == AUTONEG_ENABLE) { - u32 flags; - - if (fiber_autoneg(tp, &flags)) { - u32 local_adv, remote_adv; - - local_adv = ADVERTISE_PAUSE_CAP; - remote_adv = 0; - if (flags & MR_LP_ADV_SYM_PAUSE) - remote_adv |= LPA_PAUSE_CAP; - if (flags & MR_LP_ADV_ASYM_PAUSE) - remote_adv |= LPA_PAUSE_ASYM; + mac_status = tr32(MAC_STATUS); - tg3_setup_flow_control(tp, local_adv, remote_adv); - - tp->tg3_flags |= - TG3_FLAG_GOT_SERDES_FLOWCTL; - current_link_up = 1; - } - for (i = 0; i < 60; i++) { - udelay(20); - tw32_f(MAC_STATUS, - (MAC_STATUS_SYNC_CHANGED | - MAC_STATUS_CFG_CHANGED)); - udelay(40); - if ((tr32(MAC_STATUS) & - (MAC_STATUS_SYNC_CHANGED | - MAC_STATUS_CFG_CHANGED)) == 0) - break; - } - if (current_link_up == 0 && - (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { - current_link_up = 1; - } - } else { - /* Forcing 1000FD link up. */ - current_link_up = 1; - tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL; - } - } else - tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL; + if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) + current_link_up = tg3_setup_fiber_hw_autoneg(tp, mac_status); + else + current_link_up = tg3_setup_fiber_by_hand(tp, mac_status); tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; tw32_f(MAC_MODE, tp->mac_mode); @@ -2159,19 +2307,24 @@ (tp->hw_status->status & ~SD_STATUS_LINK_CHG)); for (i = 0; i < 100; i++) { - udelay(20); - tw32_f(MAC_STATUS, - (MAC_STATUS_SYNC_CHANGED | - MAC_STATUS_CFG_CHANGED)); - udelay(40); - if ((tr32(MAC_STATUS) & - (MAC_STATUS_SYNC_CHANGED | - MAC_STATUS_CFG_CHANGED)) == 0) + tw32_f(MAC_STATUS, (MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED)); + udelay(5); + if ((tr32(MAC_STATUS) & (MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED)) == 0) break; } - if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) + mac_status = tr32(MAC_STATUS); + if ((mac_status & MAC_STATUS_PCS_SYNCED) == 0) { current_link_up = 0; + if (tp->link_config.autoneg == AUTONEG_ENABLE) { + tw32_f(MAC_MODE, (tp->mac_mode | + MAC_MODE_SEND_CONFIGS)); + udelay(1); + tw32_f(MAC_MODE, tp->mac_mode); + } + } if (current_link_up == 1) { tp->link_config.active_speed = SPEED_1000; @@ -2203,15 +2356,6 @@ tg3_link_report(tp); } - if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) { - tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY); - udelay(40); - if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) { - tw32_f(MAC_MODE, tp->mac_mode); - udelay(40); - } - } - return 0; } @@ -2219,7 +2363,7 @@ { int err; - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { err = tg3_setup_fiber_phy(tp, force_reset); } else { err = tg3_setup_copper_phy(tp, force_reset); @@ -2738,11 +2882,11 @@ tg3_halt(tp); tg3_init_hw(tp); + tg3_netif_start(tp); + spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - tg3_netif_start(tp); - if (restart_timer) mod_timer(&tp->timer, jiffies + 1); } @@ -3102,9 +3246,10 @@ tg3_init_hw(tp); + tg3_netif_start(tp); + spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - tg3_netif_start(tp); return 0; } @@ -3595,6 +3740,8 @@ } } +static void tg3_stop_fw(struct tg3 *); + /* tp->lock is held. */ static int tg3_chip_reset(struct tg3 *tp) { @@ -3697,6 +3844,11 @@ tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); + if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A3) { + tg3_stop_fw(tp); + tw32(0x5000, 0x400); + } + tw32(GRC_MODE, tp->grc_mode); if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0) { @@ -3713,7 +3865,7 @@ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); } - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { tp->mac_mode = MAC_MODE_PORT_MODE_TBI; tw32_f(MAC_MODE, tp->mac_mode); } else @@ -5243,14 +5395,14 @@ tw32(MAC_LED_CTRL, tp->led_ctrl); tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB); - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { tw32_f(MAC_RX_MODE, RX_MODE_RESET); udelay(10); } tw32_f(MAC_RX_MODE, tp->rx_mode); udelay(10); - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { /* Set drive transmission level to 1.2V */ val = tr32(MAC_SERDES_CFG); @@ -5268,22 +5420,8 @@ tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2); if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && - tp->phy_id == PHY_ID_SERDES) { - /* Enable hardware link auto-negotiation */ - u32 digctrl, txctrl; - - digctrl = SG_DIG_USING_HW_AUTONEG | SG_DIG_CRC16_CLEAR_N | - SG_DIG_LOCAL_DUPLEX_STATUS | SG_DIG_LOCAL_LINK_STATUS | - (2 << SG_DIG_SPEED_STATUS_SHIFT) | SG_DIG_FIBER_MODE | - SG_DIG_GBIC_ENABLE; - - txctrl = tr32(MAC_SERDES_CFG); - tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT); - tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET); - tr32(SG_DIG_CTRL); - udelay(5); - tw32_f(SG_DIG_CTRL, digctrl); - + (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { + /* Use hardware link auto-negotiation */ tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG; } @@ -5291,7 +5429,7 @@ if (err) return err; - if (tp->phy_id != PHY_ID_SERDES) { + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { u32 tmp; /* Clear CRC stats. */ @@ -5483,7 +5621,8 @@ need_setup = 1; } if (! netif_carrier_ok(tp->dev) && - (mac_stat & MAC_STATUS_PCS_SYNCED)) { + (mac_stat & (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DET))) { need_setup = 1; } if (need_setup) { @@ -5879,7 +6018,7 @@ { struct tg3_hw_stats *hw_stats = tp->hw_stats; - if (tp->phy_id != PHY_ID_SERDES && + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) && (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { unsigned long flags; @@ -6310,7 +6449,7 @@ cmd->supported |= (SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full); - if (tp->phy_id != PHY_ID_SERDES) + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) cmd->supported |= (SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_10baseT_Half | @@ -6339,7 +6478,7 @@ tp->link_config.phy_is_low_power) return -EAGAIN; - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { /* These are the only valid advertisement bits allowed. */ if (cmd->autoneg == AUTONEG_ENABLE && (cmd->advertising & ~(ADVERTISED_1000baseT_Half | @@ -6397,7 +6536,7 @@ if (wol->wolopts & ~WAKE_MAGIC) return -EINVAL; if ((wol->wolopts & WAKE_MAGIC) && - tp->phy_id == PHY_ID_SERDES && + tp->tg3_flags2 & TG3_FLG2_PHY_SERDES && !(tp->tg3_flags & TG3_FLAG_SERDES_WOL_CAP)) return -EINVAL; @@ -6493,10 +6632,9 @@ tg3_halt(tp); tg3_init_hw(tp); - netif_wake_queue(tp->dev); + tg3_netif_start(tp); spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - tg3_netif_start(tp); return 0; } @@ -6531,9 +6669,9 @@ tp->tg3_flags &= ~TG3_FLAG_PAUSE_TX; tg3_halt(tp); tg3_init_hw(tp); + tg3_netif_start(tp); spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - tg3_netif_start(tp); return 0; } @@ -6620,7 +6758,7 @@ case SIOCGMIIREG: { u32 mii_regval; - if (tp->phy_id == PHY_ID_SERDES) + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) break; /* We have no PHY */ spin_lock_irq(&tp->lock); @@ -6633,7 +6771,7 @@ } case SIOCSMIIREG: - if (tp->phy_id == PHY_ID_SERDES) + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) break; /* We have no PHY */ if (!capable(CAP_NET_ADMIN)) @@ -6870,10 +7008,10 @@ { PCI_VENDOR_ID_BROADCOM, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */ { PCI_VENDOR_ID_BROADCOM, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */ { PCI_VENDOR_ID_BROADCOM, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */ - { PCI_VENDOR_ID_BROADCOM, 0x0003, PHY_ID_SERDES }, /* BCM95700A9 */ + { PCI_VENDOR_ID_BROADCOM, 0x0003, 0 }, /* BCM95700A9 */ { PCI_VENDOR_ID_BROADCOM, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */ { PCI_VENDOR_ID_BROADCOM, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */ - { PCI_VENDOR_ID_BROADCOM, 0x0007, PHY_ID_SERDES }, /* BCM95701A7 */ + { PCI_VENDOR_ID_BROADCOM, 0x0007, 0 }, /* BCM95701A7 */ { PCI_VENDOR_ID_BROADCOM, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */ { PCI_VENDOR_ID_BROADCOM, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */ { PCI_VENDOR_ID_BROADCOM, 0x0009, PHY_ID_BCM5703 }, /* BCM95703Ax1 */ @@ -6882,7 +7020,7 @@ /* 3com boards. */ { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */ { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */ - { PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES }, /* 3C996SX */ + { PCI_VENDOR_ID_3COM, 0x1004, 0 }, /* 3C996SX */ { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */ { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */ @@ -6895,37 +7033,43 @@ /* Compaq boards. */ { PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */ { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */ - { PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES }, /* CHANGELING */ + { PCI_VENDOR_ID_COMPAQ, 0x007d, 0 }, /* CHANGELING */ { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */ { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }, /* NC7780_2 */ /* IBM boards. */ - { PCI_VENDOR_ID_IBM, 0x0281, PHY_ID_SERDES } /* IBM??? */ + { PCI_VENDOR_ID_IBM, 0x0281, 0 } /* IBM??? */ }; -static int __devinit tg3_phy_probe(struct tg3 *tp) +static inline struct subsys_tbl_ent *lookup_by_subsys(struct tg3 *tp) { - u32 eeprom_phy_id, hw_phy_id_1, hw_phy_id_2; - u32 hw_phy_id, hw_phy_id_masked; - u32 val; - int i, eeprom_signature_found, err; + int i; - tp->phy_id = PHY_ID_INVALID; for (i = 0; i < ARRAY_SIZE(subsys_id_to_phy_id); i++) { if ((subsys_id_to_phy_id[i].subsys_vendor == tp->pdev->subsystem_vendor) && (subsys_id_to_phy_id[i].subsys_devid == - tp->pdev->subsystem_device)) { - tp->phy_id = subsys_id_to_phy_id[i].phy_id; - break; - } + tp->pdev->subsystem_device)) + return &subsys_id_to_phy_id[i]; } + return NULL; +} + +static int __devinit tg3_phy_probe(struct tg3 *tp) +{ + u32 eeprom_phy_id, hw_phy_id_1, hw_phy_id_2; + u32 hw_phy_id, hw_phy_id_masked; + u32 val; + int eeprom_signature_found, eeprom_phy_serdes, err; + tp->phy_id = PHY_ID_INVALID; eeprom_phy_id = PHY_ID_INVALID; + eeprom_phy_serdes = 0; eeprom_signature_found = 0; tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val); if (val == NIC_SRAM_DATA_SIG_MAGIC) { u32 nic_cfg, led_cfg; + u32 nic_phy_id, cfg2; tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg); tp->nic_sram_data_cfg = nic_cfg; @@ -6933,21 +7077,19 @@ eeprom_signature_found = 1; if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) == - NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) { - eeprom_phy_id = PHY_ID_SERDES; - } else { - u32 nic_phy_id; + NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) + eeprom_phy_serdes = 1; - tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id); - if (nic_phy_id != 0) { - u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK; - u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK; - - eeprom_phy_id = (id1 >> 16) << 10; - eeprom_phy_id |= (id2 & 0xfc00) << 16; - eeprom_phy_id |= (id2 & 0x03ff) << 0; - } - } + tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id); + if (nic_phy_id != 0) { + u32 id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK; + u32 id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK; + + eeprom_phy_id = (id1 >> 16) << 10; + eeprom_phy_id |= (id2 & 0xfc00) << 16; + eeprom_phy_id |= (id2 & 0x03ff) << 0; + } else + eeprom_phy_id = 0; if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) { tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &led_cfg); @@ -7009,6 +7151,10 @@ } if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL) tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP; + + tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &cfg2); + if (cfg2 & (1 << 17)) + tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING; } /* Reading the PHY ID register can conflict with ASF @@ -7035,20 +7181,31 @@ if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) { tp->phy_id = hw_phy_id; + if (hw_phy_id_masked == PHY_ID_BCM8002) + tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; } else { - /* phy_id currently holds the value found in the - * subsys_id_to_phy_id[] table or PHY_ID_INVALID - * if a match was not found there. - */ - if (tp->phy_id == PHY_ID_INVALID) { - if (!eeprom_signature_found || - !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK)) - return -ENODEV; + if (eeprom_signature_found) { tp->phy_id = eeprom_phy_id; + if (eeprom_phy_serdes) + tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; + } else { + struct subsys_tbl_ent *p; + + /* No eeprom signature? Try the hardcoded + * subsys device table. + */ + p = lookup_by_subsys(tp); + if (!p) + return -ENODEV; + + tp->phy_id = p->phy_id; + if (!tp->phy_id || + tp->phy_id == PHY_ID_BCM8002) + tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; } } - if (tp->phy_id != PHY_ID_SERDES && + if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) && !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { u32 bmsr, adv_reg, tg3_ctrl; @@ -7105,7 +7262,7 @@ if (!eeprom_signature_found) tp->led_ctrl = LED_CTRL_MODE_PHY_1; - if (tp->phy_id == PHY_ID_SERDES) + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) tp->link_config.advertising = (ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | @@ -7492,12 +7649,14 @@ grc_misc_cfg = tr32(GRC_MISC_CFG); grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK; + /* Broadcom's driver says that CIOBE multisplit has a bug */ +#if 0 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) { tp->tg3_flags |= TG3_FLAG_SPLIT_MODE; tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ; } - +#endif if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 || grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M)) @@ -7524,7 +7683,7 @@ tg3_read_partno(tp); - if (tp->phy_id == PHY_ID_SERDES) { + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) { tp->tg3_flags &= ~TG3_FLAG_USE_MI_INTERRUPT; } else { if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) @@ -7547,13 +7706,13 @@ * upon subsystem IDs. */ if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL && - tp->phy_id != PHY_ID_SERDES) { + !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { tp->tg3_flags |= (TG3_FLAG_USE_MI_INTERRUPT | TG3_FLAG_USE_LINKCHG_REG); } /* For all SERDES we poll the MAC status register. */ - if (tp->phy_id == PHY_ID_SERDES) + if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) tp->tg3_flags |= TG3_FLAG_POLL_SERDES; else tp->tg3_flags &= ~TG3_FLAG_POLL_SERDES; @@ -7988,8 +8147,8 @@ case PHY_ID_BCM5704: return "5704"; case PHY_ID_BCM5705: return "5705"; case PHY_ID_BCM5750: return "5750"; - case PHY_ID_BCM8002: return "8002"; - case PHY_ID_SERDES: return "serdes"; + case PHY_ID_BCM8002: return "8002/serdes"; + case 0: return "serdes"; default: return "unknown"; }; } @@ -8371,11 +8530,11 @@ tp->timer.expires = jiffies + tp->timer_offset; add_timer(&tp->timer); - spin_unlock(&tp->tx_lock); - spin_unlock_irq(&tp->lock); - netif_device_attach(dev); tg3_netif_start(tp); + + spin_unlock(&tp->tx_lock); + spin_unlock_irq(&tp->lock); } return err; @@ -8408,10 +8567,10 @@ tg3_enable_ints(tp); + tg3_netif_start(tp); + spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - - tg3_netif_start(tp); return 0; } diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h --- a/drivers/net/tg3.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/tg3.h 2004-09-06 16:37:51 -07:00 @@ -124,6 +124,7 @@ #define CHIPREV_ID_5705_A3 0x3003 #define CHIPREV_ID_5750_A0 0x4000 #define CHIPREV_ID_5750_A1 0x4001 +#define CHIPREV_ID_5750_A3 0x4003 #define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) #define ASIC_REV_5700 0x07 #define ASIC_REV_5701 0x00 @@ -2089,6 +2090,9 @@ #define TG3_FLG2_PCI_EXPRESS 0x00000200 #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 #define TG3_FLG2_HW_AUTONEG 0x00000800 +#define TG3_FLG2_PHY_JUST_INITTED 0x00001000 +#define TG3_FLG2_PHY_SERDES 0x00002000 +#define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000 u32 split_mode_max_reqs; #define SPLIT_MODE_5704_MAX_REQ 3 @@ -2136,7 +2140,6 @@ #define PHY_ID_BCM5705 0x600081a0 #define PHY_ID_BCM5750 0x60008180 #define PHY_ID_BCM8002 0x60010140 -#define PHY_ID_SERDES 0xfeedbee0 #define PHY_ID_INVALID 0xffffffff #define PHY_ID_REV_MASK 0x0000000f #define PHY_REV_BCM5401_B0 0x1 @@ -2159,7 +2162,7 @@ (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \ (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \ (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ - (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES) + (X) == PHY_ID_BCM8002) struct tg3_hw_stats *hw_stats; dma_addr_t stats_mapping; diff -Nru a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c --- a/drivers/net/tokenring/ibmtr.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/net/tokenring/ibmtr.c 2004-09-06 16:37:53 -07:00 @@ -895,7 +895,7 @@ ti->sram_virt &= ~1; /* to reverse what we do in tok_close */ /* init the spinlock */ - ti->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; + ti->lock = SPIN_LOCK_UNLOCKED; init_timer(&ti->tr_timer); i = tok_init_card(dev); diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c --- a/drivers/net/tulip/de4x5.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/tulip/de4x5.c 2004-09-06 16:37:50 -07:00 @@ -1141,7 +1141,7 @@ lp->asBitValid = TRUE; lp->timeout = -1; lp->gendev = gendev; - lp->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; + lp->lock = SPIN_LOCK_UNLOCKED; init_timer(&lp->timer); de4x5_parse_params(dev); @@ -1316,7 +1316,7 @@ ** Re-initialize the DE4X5... */ status = de4x5_init(dev); - lp->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; + lp->lock = SPIN_LOCK_UNLOCKED; lp->state = OPEN; de4x5_dbg_open(dev); @@ -2242,8 +2242,13 @@ return -ENODEV; /* Ok, the device seems to be for us. */ - if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) - return -ENOMEM; + if (pci_enable_device (pdev)) + return -ENODEV; + + if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) { + error = -ENOMEM; + goto disable_dev; + } lp = netdev_priv(dev); lp->bus = PCI; @@ -2327,6 +2332,8 @@ release_region (iobase, DE4X5_PCI_TOTAL_SIZE); free_dev: free_netdev (dev); + disable_dev: + pci_disable_device (pdev); return error; } @@ -2341,6 +2348,7 @@ unregister_netdev (dev); free_netdev (dev); release_region (iobase, DE4X5_PCI_TOTAL_SIZE); + pci_disable_device (pdev); } static struct pci_device_id de4x5_pci_tbl[] = { diff -Nru a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c --- a/drivers/net/tulip/dmfe.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/tulip/dmfe.c 2004-09-06 16:37:54 -07:00 @@ -314,13 +314,13 @@ static u8 dmfe_sense_speed(struct dmfe_board_info *); static void dmfe_process_mode(struct dmfe_board_info *); static void dmfe_timer(unsigned long); +static inline u32 cal_CRC(unsigned char *, unsigned int, u8); static void dmfe_rx_packet(struct DEVICE *, struct dmfe_board_info *); static void dmfe_free_tx_pkt(struct DEVICE *, struct dmfe_board_info *); static void dmfe_reuse_skb(struct dmfe_board_info *, struct sk_buff *); static void dmfe_dynamic_reset(struct DEVICE *); static void dmfe_free_rxbuffer(struct dmfe_board_info *); static void dmfe_init_dm910x(struct DEVICE *); -static inline u32 cal_CRC(unsigned char *, unsigned int, u8); static void dmfe_parse_srom(struct dmfe_board_info *); static void dmfe_program_DM9801(struct dmfe_board_info *, int); static void dmfe_program_DM9802(struct dmfe_board_info *); @@ -885,6 +885,20 @@ /* + * Calculate the CRC valude of the Rx packet + * flag = 1 : return the reverse CRC (for the received packet CRC) + * 0 : return the normal CRC (for Hash Table index) + */ + +static inline u32 cal_CRC(unsigned char * Data, unsigned int Len, u8 flag) +{ + u32 crc = crc32(~0, Data, Len); + if (flag) crc = ~crc; + return crc; +} + + +/* * Receive the come packet and pass to upper layer */ @@ -1770,20 +1784,6 @@ udelay(1); return phy_data; -} - - -/* - * Calculate the CRC valude of the Rx packet - * flag = 1 : return the reverse CRC (for the received packet CRC) - * 0 : return the normal CRC (for Hash Table index) - */ - -static inline u32 cal_CRC(unsigned char * Data, unsigned int Len, u8 flag) -{ - u32 crc = crc32(~0, Data, Len); - if (flag) crc = ~crc; - return crc; } diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/via-rhine.c 2004-09-06 16:37:55 -07:00 @@ -346,7 +346,7 @@ VT6105L = 0x8A, VT6107 = 0x8C, VTunknown2 = 0x8E, - VT6105M = 0x90, + VT6105M = 0x90, /* Management adapter */ }; enum rhine_quirks { @@ -485,6 +485,7 @@ dma_addr_t tx_bufs_dma; struct pci_dev *pdev; + long pioaddr; struct net_device_stats stats; spinlock_t lock; @@ -593,7 +594,7 @@ default: reason = "Unknown"; } - printk("%s: Woke system up. Reason: %s.\n", + printk(KERN_INFO "%s: Woke system up. Reason: %s.\n", DRV_NAME, reason); } } @@ -703,7 +704,7 @@ long memaddr; long ioaddr; int io_size, phy_id; - const char *name, *mname; + const char *name; /* when built into the kernel, we only print version if device is found */ #ifndef MODULE @@ -718,41 +719,24 @@ phy_id = 0; quirks = 0; name = "Rhine"; - mname = "unknown"; if (pci_rev < VTunknown0) { quirks = rqRhineI; io_size = 128; - mname = "VT86C100A"; } else if (pci_rev >= VT6102) { quirks = rqWOL | rqForceReset; if (pci_rev < VT6105) { name = "Rhine II"; quirks |= rqStatusWBRace; /* Rhine-II exclusive */ - if (pci_rev < VT8231) - mname = "VT6102"; - else if (pci_rev < VT8233) - mname = "VT8231"; - else if (pci_rev < VT8235) - mname = "VT8233"; - else if (pci_rev < VT8237) - mname = "VT8235"; - else if (pci_rev < VTunknown1) - mname = "VT8237"; } else { - name = "Rhine III"; phy_id = 1; /* Integrated PHY, phy_id fixed to 1 */ if (pci_rev >= VT6105_B0) quirks |= rq6patterns; - if (pci_rev < VT6105L) - mname = "VT6105"; - else if (pci_rev < VT6107) - mname = "VT6105L"; - else if (pci_rev < VT6105M) - mname = "VT6107"; - else if (pci_rev >= VT6105M) - mname = "Management Adapter VT6105M"; + if (pci_rev < VT6105M) + name = "Rhine III"; + else + name = "Rhine III (Management Adapter)"; } } @@ -790,6 +774,11 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); + rp = netdev_priv(dev); + rp->quirks = quirks; + rp->pioaddr = pioaddr; + rp->pdev = pdev; + rc = pci_request_regions(pdev, DRV_NAME); if (rc) goto err_out_free_netdev; @@ -823,8 +812,6 @@ #endif /* USE_MMIO */ dev->base_addr = ioaddr; - rp = netdev_priv(dev); - rp->quirks = quirks; /* Get chip registers into a sane state */ rhine_power_init(dev); @@ -846,7 +833,6 @@ dev->irq = pdev->irq; spin_lock_init(&rp->lock); - rp->pdev = pdev; rp->mii_if.dev = dev; rp->mii_if.mdio_read = mdio_read; rp->mii_if.mdio_write = mdio_write; @@ -874,8 +860,8 @@ if (rc) goto err_out_unmap; - printk(KERN_INFO "%s: VIA %s (%s) at 0x%lx, ", - dev->name, name, mname, + printk(KERN_INFO "%s: VIA %s at 0x%lx, ", + dev->name, name, #ifdef USE_MMIO memaddr #else @@ -890,7 +876,10 @@ pci_set_drvdata(pdev, dev); { + u16 mii_cmd; int mii_status = mdio_read(dev, phy_id, 1); + mii_cmd = mdio_read(dev, phy_id, MII_BMCR) & ~BMCR_ISOLATE; + mdio_write(dev, phy_id, MII_BMCR, mii_cmd); if (mii_status != 0xffff && mii_status != 0x0000) { rp->mii_if.advertising = mdio_read(dev, phy_id, 4); printk(KERN_INFO "%s: MII PHY found at address " @@ -1172,7 +1161,7 @@ rhine_disable_linkmon(ioaddr, rp->quirks); - writeb(0, ioaddr + MIICmd); + /* rhine_disable_linkmon already cleared MIICmd */ writeb(phy_id, ioaddr + MIIPhyAddr); writeb(regnum, ioaddr + MIIRegAddr); writeb(0x40, ioaddr + MIICmd); /* Trigger read */ @@ -1190,7 +1179,7 @@ rhine_disable_linkmon(ioaddr, rp->quirks); - writeb(0, ioaddr + MIICmd); + /* rhine_disable_linkmon already cleared MIICmd */ writeb(phy_id, ioaddr + MIIPhyAddr); writeb(regnum, ioaddr + MIIRegAddr); writew(value, ioaddr + MIIData); @@ -1951,11 +1940,70 @@ } +#ifdef CONFIG_PM +static int rhine_suspend(struct pci_dev *pdev, u32 state) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct rhine_private *rp = netdev_priv(dev); + unsigned long flags; + + if (!netif_running(dev)) + return 0; + + netif_device_detach(dev); + pci_save_state(pdev, pdev->saved_config_space); + + spin_lock_irqsave(&rp->lock, flags); + rhine_shutdown(&pdev->dev); + spin_unlock_irqrestore(&rp->lock, flags); + + return 0; +} + +static int rhine_resume(struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct rhine_private *rp = netdev_priv(dev); + unsigned long flags; + int ret; + + if (!netif_running(dev)) + return 0; + + ret = pci_set_power_state(pdev, 0); + if (debug > 1) + printk(KERN_INFO "%s: Entering power state D0 %s (%d).\n", + dev->name, ret ? "failed" : "succeeded", ret); + + pci_restore_state(pdev, pdev->saved_config_space); + + spin_lock_irqsave(&rp->lock, flags); +#ifdef USE_MMIO + enable_mmio(rp->pioaddr, rp->quirks); +#endif + rhine_power_init(dev); + free_tbufs(dev); + free_rbufs(dev); + alloc_tbufs(dev); + alloc_rbufs(dev); + init_registers(dev); + spin_unlock_irqrestore(&rp->lock, flags); + + netif_device_attach(dev); + + return 0; +} +#endif /* CONFIG_PM */ + static struct pci_driver rhine_driver = { .name = DRV_NAME, .id_table = rhine_pci_tbl, .probe = rhine_init_one, .remove = __devexit_p(rhine_remove_one), +#ifdef CONFIG_PM + .suspend = rhine_suspend, + .resume = rhine_resume, +#endif /* CONFIG_PM */ .driver = { .shutdown = rhine_shutdown, } diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/net/via-velocity.c 2004-09-06 16:37:54 -07:00 @@ -262,6 +262,7 @@ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status); #ifdef CONFIG_PM + static int velocity_suspend(struct pci_dev *pdev, u32 state); static int velocity_resume(struct pci_dev *pdev); @@ -270,9 +271,26 @@ static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; -static int velocity_notifier_registered; -#endif /* CONFIG_PM */ +static spinlock_t velocity_dev_list_lock = SPIN_LOCK_UNLOCKED; +static LIST_HEAD(velocity_dev_list); + +static void velocity_register_notifier(void) +{ + register_inetaddr_notifier(&velocity_inetaddr_notifier); +} + +static void velocity_unregister_notifier(void) +{ + unregister_inetaddr_notifier(&velocity_inetaddr_notifier); +} + +#else /* CONFIG_PM */ + +#define velocity_register_notifier() do {} while (0) +#define velocity_unregister_notifier() do {} while (0) + +#endif /* !CONFIG_PM */ /* * Internal board variants. At the moment we have only one @@ -327,6 +345,14 @@ struct net_device *dev = pci_get_drvdata(pdev); struct velocity_info *vptr = dev->priv; +#ifdef CONFIG_PM + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + if (!list_empty(&velocity_dev_list)) + list_del(&vptr->list); + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); +#endif unregister_netdev(dev); iounmap(vptr->mac_regs); pci_release_regions(pdev); @@ -782,13 +808,16 @@ /* and leave the chip powered down */ pci_set_power_state(pdev, 3); -out: #ifdef CONFIG_PM - if (ret == 0 && !velocity_notifier_registered) { - velocity_notifier_registered = 1; - register_inetaddr_notifier(&velocity_inetaddr_notifier); + { + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + list_add(&vptr->list, &velocity_dev_list); + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } #endif +out: return ret; err_iounmap: @@ -843,6 +872,8 @@ spin_lock_init(&vptr->lock); spin_lock_init(&vptr->xmit_lock); + + INIT_LIST_HEAD(&vptr->list); } /** @@ -2211,8 +2242,11 @@ static int __init velocity_init_module(void) { int ret; - ret = pci_module_init(&velocity_driver); + velocity_register_notifier(); + ret = pci_module_init(&velocity_driver); + if (ret < 0) + velocity_unregister_notifier(); return ret; } @@ -2227,12 +2261,7 @@ static void __exit velocity_cleanup_module(void) { -#ifdef CONFIG_PM - if (velocity_notifier_registered) { - unregister_inetaddr_notifier(&velocity_inetaddr_notifier); - velocity_notifier_registered = 0; - } -#endif + velocity_unregister_notifier(); pci_unregister_driver(&velocity_driver); } @@ -3252,13 +3281,20 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; - struct net_device *dev; - struct velocity_info *vptr; if (ifa) { - dev = ifa->ifa_dev->dev; - vptr = dev->priv; - velocity_get_ip(vptr); + struct net_device *dev = ifa->ifa_dev->dev; + struct velocity_info *vptr; + unsigned long flags; + + spin_lock_irqsave(&velocity_dev_list_lock, flags); + list_for_each_entry(vptr, &velocity_dev_list, list) { + if (vptr->dev == dev) { + velocity_get_ip(vptr); + break; + } + } + spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } return NOTIFY_DONE; } diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h --- a/drivers/net/via-velocity.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/via-velocity.h 2004-09-06 16:37:55 -07:00 @@ -1733,14 +1733,13 @@ }; struct velocity_info { - struct velocity_info *next; - struct velocity_info *prev; + struct list_head list; struct pci_dev *pdev; struct net_device *dev; struct net_device_stats stats; -#if CONFIG_PM +#ifdef CONFIG_PM u32 pci_state[16]; #endif diff -Nru a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c --- a/drivers/net/wan/cycx_x25.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/wan/cycx_x25.c 2004-09-06 16:37:51 -07:00 @@ -186,7 +186,7 @@ reset_timer(struct net_device *dev); static u8 bps_to_speed_code(u32 bps); -static u8 log2(u32 n); +static u8 cycx_log2(u32 n); static unsigned dec_to_uint(u8 *str, int len); @@ -263,7 +263,7 @@ else card->wandev.mtu = 64; - cfg.pktlen = log2(card->wandev.mtu); + cfg.pktlen = cycx_log2(card->wandev.mtu); if (conf->station == WANOPT_DTE) { cfg.locaddr = 3; /* DTE */ @@ -1513,7 +1513,7 @@ } /* log base 2 */ -static u8 log2(u32 n) +static u8 cycx_log2(u32 n) { u8 log = 0; diff -Nru a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c --- a/drivers/net/wan/hd6457x.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/wan/hd6457x.c 2004-09-06 16:37:51 -07:00 @@ -463,8 +463,8 @@ brv >>= 1; /* brv = 2^9 = 512 max in specs */ /* Baud Rate = CLOCK_BASE / TMC / 2^BR */ - tmc = CLOCK_BASE / (brv * port->settings.clock_rate); - }while(br > 1 && tmc <= 128); + tmc = CLOCK_BASE / brv / port->settings.clock_rate; + }while (br > 1 && tmc <= 128); if (tmc < 1) { tmc = 1; @@ -473,7 +473,7 @@ } else if (tmc > 255) tmc = 256; /* tmc=0 means 256 - low baud rates */ - port->settings.clock_rate = CLOCK_BASE / (brv * tmc); + port->settings.clock_rate = CLOCK_BASE / brv / tmc; } else { br = 9; /* Minimum clock rate */ tmc = 256; /* 8bit = 0 */ diff -Nru a/drivers/net/wan/lmc/lmc_debug.c b/drivers/net/wan/lmc/lmc_debug.c --- a/drivers/net/wan/lmc/lmc_debug.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/wan/lmc/lmc_debug.c 2004-09-06 16:37:51 -07:00 @@ -64,7 +64,7 @@ #endif } -inline void lmc_trace(struct net_device *dev, char *msg){ +void lmc_trace(struct net_device *dev, char *msg){ #ifdef LMC_TRACE unsigned long j = jiffies + 3; /* Wait for 50 ms */ diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c --- a/drivers/net/wan/pc300_tty.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/net/wan/pc300_tty.c 2004-09-06 16:37:52 -07:00 @@ -760,7 +760,7 @@ int rx_len, rx_aux; volatile unsigned char status; unsigned short first_bd = pc300chan->rx_first_bd; - st_cpc_rx_buf *new; + st_cpc_rx_buf *new=NULL; unsigned char dsr_rx; if (pc300dev->cpc_tty == NULL) { @@ -789,6 +789,10 @@ cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch), RX_BD_ADDR(ch, pc300chan->rx_last_bd)); } + if (new) { + kfree(new); + new = NULL; + } return; } @@ -834,7 +838,8 @@ cpc_tty->name); cpc_tty_rx_disc_frame(pc300chan); rx_len = 0; - kfree((unsigned char *)new); + kfree(new); + new = NULL; break; /* read next frame - while(1) */ } @@ -843,7 +848,8 @@ cpc_tty_rx_disc_frame(pc300chan); stats->rx_dropped++; rx_len = 0; - kfree((unsigned char *)new); + kfree(new); + new = NULL; break; /* read next frame - while(1) */ } diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c --- a/drivers/net/wireless/airo.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/net/wireless/airo.c 2004-09-06 16:37:51 -07:00 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff -Nru a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c --- a/drivers/net/wireless/atmel.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/wireless/atmel.c 2004-09-06 16:37:51 -07:00 @@ -2430,12 +2430,13 @@ rc = -ENOMEM; break; } - + if (copy_from_user(new_firmware, com.data, com.len)) { + kfree(new_firmware); rc = -EFAULT; break; } - + if (priv->firmware) kfree(priv->firmware); diff -Nru a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c --- a/drivers/net/wireless/prism54/isl_ioctl.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/net/wireless/prism54/isl_ioctl.c 2004-09-06 16:37:51 -07:00 @@ -334,9 +334,10 @@ int rvalue; rvalue = mgt_get_request(priv, DOT11_OID_CHANNEL, 0, NULL, &r); - + fwrq->i = r.u; + rvalue |= mgt_get_request(priv, DOT11_OID_FREQUENCY, 0, NULL, &r); fwrq->m = r.u; - fwrq->e = 0; + fwrq->e = 3; return rvalue; } diff -Nru a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c --- a/drivers/net/wireless/wavelan.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/net/wireless/wavelan.c 2004-09-06 16:37:55 -07:00 @@ -3822,17 +3822,18 @@ if ((hasr & HASR_MMC_INTR) && (lp->hacr & HACR_MMC_INT_ENABLE)) { u8 dce_status; -#ifdef DEBUG_INTERRUPT_ERROR - printk(KERN_INFO - "%s: wavelan_interrupt(): unexpected mmc interrupt: status 0x%04x.\n", - dev->name, dce_status); -#endif /* * Interrupt from the modem management controller. * This will clear it -- ignored for now. */ mmc_read(ioaddr, mmroff(0, mmr_dce_status), &dce_status, sizeof(dce_status)); + +#ifdef DEBUG_INTERRUPT_ERROR + printk(KERN_INFO + "%s: wavelan_interrupt(): unexpected mmc interrupt: status 0x%04x.\n", + dev->name, dce_status); +#endif } /* Check if not controller interrupt */ diff -Nru a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c --- a/drivers/oprofile/buffer_sync.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/oprofile/buffer_sync.c 2004-09-06 16:37:51 -07:00 @@ -32,61 +32,65 @@ #include "cpu_buffer.h" #include "buffer_sync.h" -#define DEFAULT_EXPIRE (HZ / 4) - -static void wq_sync_buffers(void *); -static DECLARE_WORK(sync_wq, wq_sync_buffers, NULL); - -static struct timer_list sync_timer; -static void timer_ping(unsigned long data); -static void sync_cpu_buffers(void); +static LIST_HEAD(dying_tasks); +static LIST_HEAD(dead_tasks); +cpumask_t marked_cpus = CPU_MASK_NONE; +static spinlock_t task_mortuary = SPIN_LOCK_UNLOCKED; +void process_task_mortuary(void); - -/* We must make sure to process every entry in the CPU buffers - * before a task got the PF_EXITING flag, otherwise we will hold - * references to a possibly freed task_struct. We are safe with - * samples past the PF_EXITING point in do_exit(), because we - * explicitly check for that in cpu_buffer.c + +/* Take ownership of the task struct and place it on the + * list for processing. Only after two full buffer syncs + * does the task eventually get freed, because by then + * we are sure we will not reference it again. */ -static int exit_task_notify(struct notifier_block * self, unsigned long val, void * data) +static int task_free_notify(struct notifier_block * self, unsigned long val, void * data) { - sync_cpu_buffers(); - return 0; + struct task_struct * task = (struct task_struct *)data; + spin_lock(&task_mortuary); + list_add(&task->tasks, &dying_tasks); + spin_unlock(&task_mortuary); + return NOTIFY_OK; } - -/* There are two cases of tasks modifying task->mm->mmap list we - * must concern ourselves with. First, when a task is about to - * exit (exit_mmap()), we should process the buffer to deal with - * any samples in the CPU buffer, before we lose the ->mmap information - * we need. It is vital to get this case correct, otherwise we can - * end up trying to access a freed task_struct. + + +/* The task is on its way out. A sync of the buffer means we can catch + * any remaining samples for this task. */ -static int mm_notify(struct notifier_block * self, unsigned long val, void * data) +static int task_exit_notify(struct notifier_block * self, unsigned long val, void * data) { - sync_cpu_buffers(); - return 0; + /* To avoid latency problems, we only process the current CPU, + * hoping that most samples for the task are on this CPU + */ + sync_buffer(smp_processor_id()); + return 0; } -/* Second, a task may unmap (part of) an executable mmap, - * so we want to process samples before that happens too. This is merely - * a QOI issue not a correctness one. +/* The task is about to try a do_munmap(). We peek at what it's going to + * do, and if it's an executable region, process the samples first, so + * we don't lose any. This does not have to be exact, it's a QoI issue + * only. */ static int munmap_notify(struct notifier_block * self, unsigned long val, void * data) { - /* Note that we cannot sync the buffers directly, because we might end up - * taking the the mmap_sem that we hold now inside of event_buffer_read() - * on a page fault, whilst holding buffer_sem - deadlock. - * - * This would mean a threaded reader of the event buffer, but we should - * prevent it anyway. - * - * Delaying the work in a context that doesn't hold the mmap_sem means - * that we won't lose samples from other mappings that current() may - * have. Note that either way, we lose any pending samples for what is - * being unmapped. - */ - schedule_work(&sync_wq); + unsigned long addr = (unsigned long)data; + struct mm_struct * mm = current->mm; + struct vm_area_struct * mpnt; + + down_read(&mm->mmap_sem); + + mpnt = find_vma(mm, addr); + if (mpnt && mpnt->vm_file && (mpnt->vm_flags & VM_EXEC)) { + up_read(&mm->mmap_sem); + /* To avoid latency problems, we only process the current CPU, + * hoping that most samples for the task are on this CPU + */ + sync_buffer(smp_processor_id()); + return 0; + } + + up_read(&mm->mmap_sem); return 0; } @@ -100,7 +104,7 @@ if (val != MODULE_STATE_COMING) return 0; - sync_cpu_buffers(); + /* FIXME: should we process all CPU buffers ? */ down(&buffer_sem); add_event_entry(ESCAPE_CODE); add_event_entry(MODULE_LOADED_CODE); @@ -110,16 +114,16 @@ } -static struct notifier_block exit_task_nb = { - .notifier_call = exit_task_notify, +static struct notifier_block task_free_nb = { + .notifier_call = task_free_notify, }; -static struct notifier_block exec_unmap_nb = { - .notifier_call = munmap_notify, +static struct notifier_block task_exit_nb = { + .notifier_call = task_exit_notify, }; -static struct notifier_block exit_mmap_nb = { - .notifier_call = mm_notify, +static struct notifier_block munmap_nb = { + .notifier_call = munmap_notify, }; static struct notifier_block module_load_nb = { @@ -127,11 +131,12 @@ }; -static void end_sync_timer(void) +static void end_sync(void) { - del_timer_sync(&sync_timer); - /* timer might have queued work, make sure it's completed. */ - flush_scheduled_work(); + end_cpu_timers(); + /* make sure we don't leak task structs */ + process_task_mortuary(); + process_task_mortuary(); } @@ -139,18 +144,15 @@ { int err; - init_timer(&sync_timer); - sync_timer.function = timer_ping; - sync_timer.expires = jiffies + DEFAULT_EXPIRE; - add_timer(&sync_timer); + start_cpu_timers(); - err = profile_event_register(EXIT_TASK, &exit_task_nb); + err = task_handoff_register(&task_free_nb); if (err) goto out1; - err = profile_event_register(EXIT_MMAP, &exit_mmap_nb); + err = profile_event_register(PROFILE_TASK_EXIT, &task_exit_nb); if (err) goto out2; - err = profile_event_register(EXEC_UNMAP, &exec_unmap_nb); + err = profile_event_register(PROFILE_MUNMAP, &munmap_nb); if (err) goto out3; err = register_module_notifier(&module_load_nb); @@ -160,13 +162,13 @@ out: return err; out4: - profile_event_unregister(EXEC_UNMAP, &exec_unmap_nb); + profile_event_unregister(PROFILE_MUNMAP, &munmap_nb); out3: - profile_event_unregister(EXIT_MMAP, &exit_mmap_nb); + profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb); out2: - profile_event_unregister(EXIT_TASK, &exit_task_nb); + task_handoff_unregister(&task_free_nb); out1: - end_sync_timer(); + end_sync(); goto out; } @@ -174,10 +176,10 @@ void sync_stop(void) { unregister_module_notifier(&module_load_nb); - profile_event_unregister(EXIT_TASK, &exit_task_nb); - profile_event_unregister(EXIT_MMAP, &exit_mmap_nb); - profile_event_unregister(EXEC_UNMAP, &exec_unmap_nb); - end_sync_timer(); + profile_event_unregister(PROFILE_MUNMAP, &munmap_nb); + profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb); + task_handoff_unregister(&task_free_nb); + end_sync(); } @@ -417,24 +419,80 @@ } +/* Move tasks along towards death. Any tasks on dead_tasks + * will definitely have no remaining references in any + * CPU buffers at this point, because we use two lists, + * and to have reached the list, it must have gone through + * one full sync already. + */ +void process_task_mortuary(void) +{ + struct list_head * pos; + struct list_head * pos2; + struct task_struct * task; + + spin_lock(&task_mortuary); + + list_for_each_safe(pos, pos2, &dead_tasks) { + task = list_entry(pos, struct task_struct, tasks); + list_del(&task->tasks); + free_task(task); + } + + list_for_each_safe(pos, pos2, &dying_tasks) { + task = list_entry(pos, struct task_struct, tasks); + list_del(&task->tasks); + list_add_tail(&task->tasks, &dead_tasks); + } + + spin_unlock(&task_mortuary); +} + + +static void mark_done(int cpu) +{ + int i; + + cpu_set(cpu, marked_cpus); + + for_each_online_cpu(i) { + if (!cpu_isset(i, marked_cpus)) + return; + } + + /* All CPUs have been processed at least once, + * we can process the mortuary once + */ + process_task_mortuary(); + + cpus_clear(marked_cpus); +} + + /* Sync one of the CPU's buffers into the global event buffer. * Here we need to go through each batch of samples punctuated * by context switch notes, taking the task's mmap_sem and doing * lookup in task->mm->mmap to convert EIP into dcookie/offset * value. */ -static void sync_buffer(struct oprofile_cpu_buffer * cpu_buf) +void sync_buffer(int cpu) { + struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[cpu]; struct mm_struct *mm = NULL; struct task_struct * new; unsigned long cookie = 0; int in_kernel = 1; unsigned int i; + unsigned long available; + + down(&buffer_sem); + add_cpu_switch(cpu); + /* Remember, only we can modify tail_pos */ - unsigned long const available = get_slots(cpu_buf); - + available = get_slots(cpu_buf); + for (i=0; i < available; ++i) { struct op_sample * s = &cpu_buf->buffer[cpu_buf->tail_pos]; @@ -462,50 +520,8 @@ increment_tail(cpu_buf); } release_mm(mm); -} - - -/* Process each CPU's local buffer into the global - * event buffer. - */ -static void sync_cpu_buffers(void) -{ - int i; - down(&buffer_sem); - - for (i = 0; i < NR_CPUS; ++i) { - struct oprofile_cpu_buffer * cpu_buf; - - if (!cpu_possible(i)) - continue; - - cpu_buf = &cpu_buffer[i]; - - add_cpu_switch(i); - sync_buffer(cpu_buf); - } + mark_done(cpu); up(&buffer_sem); - - mod_timer(&sync_timer, jiffies + DEFAULT_EXPIRE); -} - - -static void wq_sync_buffers(void * data) -{ - sync_cpu_buffers(); -} - - -/* It is possible that we could have no munmap() or - * other events for a period of time. This will lead - * the CPU buffers to overflow and lose samples and - * context switches. We try to reduce the problem - * by timing out when nothing happens for a while. - */ -static void timer_ping(unsigned long data) -{ - schedule_work(&sync_wq); - /* timer is re-added by the scheduled task */ } diff -Nru a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h --- a/drivers/oprofile/buffer_sync.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/oprofile/buffer_sync.h 2004-09-06 16:37:50 -07:00 @@ -16,4 +16,7 @@ /* remove the hooks */ void sync_stop(void); +/* sync the given CPU's buffer */ +void sync_buffer(int cpu); + #endif /* OPROFILE_BUFFER_SYNC_H */ diff -Nru a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c --- a/drivers/oprofile/cpu_buffer.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/oprofile/cpu_buffer.c 2004-09-06 16:37:50 -07:00 @@ -9,7 +9,7 @@ * Each CPU has a local buffer that stores PC value/event * pairs. We also log context switches when we notice them. * Eventually each CPU's buffer is processed into the global - * event buffer by sync_cpu_buffers(). + * event buffer by sync_buffer(). * * We use a local buffer for two reasons: an NMI or similar * interrupt cannot synchronise, and high sampling rates @@ -22,21 +22,24 @@ #include #include "cpu_buffer.h" +#include "buffer_sync.h" #include "oprof.h" struct oprofile_cpu_buffer cpu_buffer[NR_CPUS] __cacheline_aligned; +static void wq_sync_buffer(void *); +static void timer_ping(unsigned long data); +#define DEFAULT_TIMER_EXPIRE (HZ / 2) +int timers_enabled; + static void __free_cpu_buffers(int num) { int i; - for (i=0; i < num; ++i) { - struct oprofile_cpu_buffer * b = &cpu_buffer[i]; - - if (!cpu_possible(i)) + for (i = 0; i < NR_CPUS; ++i) { + if (!cpu_online(i)) continue; - - vfree(b->buffer); + vfree(cpu_buffer[i].buffer); } } @@ -47,12 +50,12 @@ unsigned long buffer_size = fs_cpu_buffer_size; - for (i=0; i < NR_CPUS; ++i) { + for (i = 0; i < NR_CPUS; ++i) { struct oprofile_cpu_buffer * b = &cpu_buffer[i]; - if (!cpu_possible(i)) + if (!cpu_online(i)) continue; - + b->buffer = vmalloc(sizeof(struct op_sample) * buffer_size); if (!b->buffer) goto fail; @@ -64,9 +67,15 @@ b->head_pos = 0; b->sample_received = 0; b->sample_lost_overflow = 0; - b->sample_lost_task_exit = 0; + b->cpu = i; + init_timer(&b->timer); + b->timer.function = timer_ping; + b->timer.data = i; + b->timer.expires = jiffies + DEFAULT_TIMER_EXPIRE; + INIT_WORK(&b->work, wq_sync_buffer, b); } return 0; + fail: __free_cpu_buffers(i); return -ENOMEM; @@ -79,6 +88,42 @@ } +void start_cpu_timers(void) +{ + int i; + + timers_enabled = 1; + + for (i = 0; i < NR_CPUS; ++i) { + struct oprofile_cpu_buffer * b = &cpu_buffer[i]; + + if (!cpu_online(i)) + continue; + + add_timer_on(&b->timer, i); + } +} + + +void end_cpu_timers(void) +{ + int i; + + timers_enabled = 0; + + for (i = 0; i < NR_CPUS; ++i) { + struct oprofile_cpu_buffer * b = &cpu_buffer[i]; + + if (!cpu_online(i)) + continue; + + del_timer_sync(&b->timer); + } + + flush_scheduled_work(); +} + + /* compute number of available slots in cpu_buffer queue */ static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b) { @@ -145,21 +190,9 @@ /* notice a task switch */ if (cpu_buf->last_task != task) { cpu_buf->last_task = task; - if (!(task->flags & PF_EXITING)) { - cpu_buf->buffer[cpu_buf->head_pos].eip = ~0UL; - cpu_buf->buffer[cpu_buf->head_pos].event = (unsigned long)task; - increment_head(cpu_buf); - } - } - - /* If the task is exiting it's not safe to take a sample - * as the task_struct is about to be freed. We can't just - * notify at release_task() time because of CLONE_DETACHED - * tasks that release_task() themselves. - */ - if (task->flags & PF_EXITING) { - cpu_buf->sample_lost_task_exit++; - return; + cpu_buf->buffer[cpu_buf->head_pos].eip = ~0UL; + cpu_buf->buffer[cpu_buf->head_pos].event = (unsigned long)task; + increment_head(cpu_buf); } cpu_buf->buffer[cpu_buf->head_pos].eip = eip; @@ -177,4 +210,37 @@ */ cpu_buf->last_is_kernel = -1; cpu_buf->last_task = NULL; +} + + +/* FIXME: not guaranteed to be on our CPU */ +static void wq_sync_buffer(void * data) +{ + struct oprofile_cpu_buffer * b = (struct oprofile_cpu_buffer *)data; + if (b->cpu != smp_processor_id()) { + printk("WQ on CPU%d, prefer CPU%d\n", + smp_processor_id(), b->cpu); + } + sync_buffer(b->cpu); + + /* don't re-add the timer if we're shutting down */ + if (timers_enabled) { + del_timer_sync(&b->timer); + add_timer_on(&b->timer, b->cpu); + } +} + + +/* This serves to avoid cpu buffer overflow, and makes sure + * the task mortuary progresses + */ +static void timer_ping(unsigned long data) +{ + struct oprofile_cpu_buffer * b = &cpu_buffer[data]; + if (b->cpu != smp_processor_id()) { + printk("Timer on CPU%d, prefer CPU%d\n", + smp_processor_id(), b->cpu); + } + schedule_work(&b->work); + /* work will re-enable our timer */ } diff -Nru a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h --- a/drivers/oprofile/cpu_buffer.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/oprofile/cpu_buffer.h 2004-09-06 16:37:55 -07:00 @@ -12,15 +12,18 @@ #include #include +#include +#include #include struct task_struct; -/* allocate a sample buffer for each CPU */ int alloc_cpu_buffers(void); - void free_cpu_buffers(void); +void start_cpu_timers(void); +void end_cpu_timers(void); + /* CPU buffer is composed of such entries (which are * also used for context switch notes) */ @@ -38,11 +41,13 @@ struct op_sample * buffer; unsigned long sample_received; unsigned long sample_lost_overflow; - unsigned long sample_lost_task_exit; + int cpu; + struct timer_list timer; + struct work_struct work; } ____cacheline_aligned; extern struct oprofile_cpu_buffer cpu_buffer[]; -void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf); +void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf); #endif /* OPROFILE_CPU_BUFFER_H */ diff -Nru a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c --- a/drivers/oprofile/oprofile_stats.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/oprofile/oprofile_stats.c 2004-09-06 16:37:54 -07:00 @@ -29,7 +29,6 @@ cpu_buf = &cpu_buffer[i]; cpu_buf->sample_received = 0; cpu_buf->sample_lost_overflow = 0; - cpu_buf->sample_lost_task_exit = 0; } atomic_set(&oprofile_stats.sample_lost_no_mm, 0); @@ -66,8 +65,6 @@ &cpu_buf->sample_received); oprofilefs_create_ro_ulong(sb, cpudir, "sample_lost_overflow", &cpu_buf->sample_lost_overflow); - oprofilefs_create_ro_ulong(sb, cpudir, "sample_lost_task_exit", - &cpu_buf->sample_lost_task_exit); } oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm", diff -Nru a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c --- a/drivers/oprofile/timer_int.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/oprofile/timer_int.c 2004-09-06 16:37:52 -07:00 @@ -19,7 +19,7 @@ { struct pt_regs * regs = (struct pt_regs *)data; int cpu = smp_processor_id(); - unsigned long eip = instruction_pointer(regs); + unsigned long eip = profile_pc(regs); oprofile_add_sample(eip, !user_mode(regs), 0, cpu); return 0; diff -Nru a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c --- a/drivers/parisc/lasi.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/parisc/lasi.c 2004-09-06 16:37:53 -07:00 @@ -11,7 +11,7 @@ * (at your option) any later version. * * by Alan Cox and - * Alex deVries + * Alex deVries */ #include diff -Nru a/drivers/parisc/superio.c b/drivers/parisc/superio.c --- a/drivers/parisc/superio.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/parisc/superio.c 2004-09-06 16:37:53 -07:00 @@ -8,7 +8,7 @@ * (C) Copyright 2000 Linuxcare, Inc. * (C) Copyright 2000 Linuxcare Canada, Inc. * (C) Copyright 2000 Martin K. Petersen - * (C) Copyright 2000 Alex deVries + * (C) Copyright 2000 Alex deVries * (C) Copyright 2001 John Marvin * (C) Copyright 2003 Grant Grundler * diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/parport/parport_pc.c 2004-09-06 16:37:55 -07:00 @@ -1194,7 +1194,7 @@ #ifdef CONFIG_PARPORT_PC_SUPERIO /* Super-IO chipset detection, Winbond, SMSC */ -static void __devinit show_parconfig_smsc37c669(int io, int key) +static int __devinit show_parconfig_smsc37c669(int io, int key) { int cr1,cr4,cra,cr23,cr26,cr27,i=0; static const char *modes[]={ "SPP and Bidirectional (PS/2)", @@ -1261,17 +1261,26 @@ superios[i].io = 0x278; superios[i].irq = 5; } + if (io != superios[i].io) { + /* how many bytes? */ + if (!request_region(superios[i].io, 3, "smsc parport")) { + superios[i].io = 0; + return 0; + } + } d=(cr26 &0x0f); if((d==1) || (d==3)) superios[i].dma= d; else superios[i].dma= PARPORT_DMA_NONE; + return 1; } } + return 0; } -static void __devinit show_parconfig_winbond(int io, int key) +static int __devinit show_parconfig_winbond(int io, int key) { int cr30,cr60,cr61,cr70,cr74,crf0,i=0; static const char *modes[] = { @@ -1327,14 +1336,23 @@ printk(KERN_INFO "Super-IO: too many chips!\n"); else { superios[i].io = (cr60<<8)|cr61; + if (io != superios[i].io) { + /* how many bytes? */ + if (!request_region(superios[i].io, 3, "winbond parport")) { + superios[i].io = 0; + return 0; + } + } superios[i].irq = cr70&0x0f; superios[i].dma = (((cr74 & 0x07) > 3) ? PARPORT_DMA_NONE : (cr74 & 0x07)); + return 1; } } + return 0; } -static void __devinit decode_winbond(int efer, int key, int devid, int devrev, int oldid) +static int __devinit decode_winbond(int efer, int key, int devid, int devrev, int oldid) { const char *type = "unknown"; int id,progif=2; @@ -1342,7 +1360,7 @@ if (devid == devrev) /* simple heuristics, we happened to read some non-winbond register */ - return; + return 0; id=(devid<<8) | devrev; @@ -1367,19 +1385,20 @@ efer, key, devid, devrev, oldid, type); if (progif == 2) - show_parconfig_winbond(efer,key); + return show_parconfig_winbond(efer,key); + return 0; } -static void __devinit decode_smsc(int efer, int key, int devid, int devrev) +static int __devinit decode_smsc(int efer, int key, int devid, int devrev) { const char *type = "unknown"; - void (*func)(int io, int key); + int (*func)(int io, int key); int id; if (devid == devrev) /* simple heuristics, we happened to read some non-smsc register */ - return; + return 0; func=NULL; id=(devid<<8) | devrev; @@ -1395,7 +1414,8 @@ efer, key, devid, devrev, type); if (func) - func(efer,key); + return func(efer,key); + return 0; } @@ -1403,6 +1423,9 @@ { int devid,devrev,oldid,x_devid,x_devrev,x_oldid; + if (!request_region(io, 3, __FUNCTION__)) + return; + /* First probe without key */ outb(0x20,io); x_devid=inb(io+1); @@ -1423,15 +1446,21 @@ outb(0xaa,io); /* Magic Seal */ if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) - return; /* protection against false positives */ + goto out; /* protection against false positives */ - decode_winbond(io,key,devid,devrev,oldid); + if (decode_winbond(io,key,devid,devrev,oldid)); + return; +out: + release_region(io, 3); } static void __devinit winbond_check2(int io,int key) { int devid,devrev,oldid,x_devid,x_devrev,x_oldid; + if (!request_region(io, 3, __FUNCTION__)) + return; + /* First probe without the key */ outb(0x20,io+2); x_devid=inb(io+2); @@ -1451,15 +1480,21 @@ outb(0xaa,io); /* Magic Seal */ if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) - return; /* protection against false positives */ + goto out; /* protection against false positives */ - decode_winbond(io,key,devid,devrev,oldid); + if (decode_winbond(io,key,devid,devrev,oldid)) + return; +out: + release_region(io, 3); } static void __devinit smsc_check(int io, int key) { int id,rev,oldid,oldrev,x_id,x_rev,x_oldid,x_oldrev; + if (!request_region(io, 3, __FUNCTION__)) + return; + /* First probe without the key */ outb(0x0d,io); x_oldid=inb(io+1); @@ -1485,9 +1520,12 @@ if ((x_id == id) && (x_oldrev == oldrev) && (x_oldid == oldid) && (x_rev == rev)) - return; /* protection against false positives */ + goto out; /* protection against false positives */ - decode_smsc(io,key,oldid,oldrev); + if (decode_smsc(io,key,oldid,oldrev)) + return; +out: + release_region(io, 3); } @@ -2636,6 +2674,10 @@ netmos_9805, netmos_9815, netmos_9855, + netmos_9735, + netmos_9835, + netmos_9755, + netmos_9715 }; @@ -2709,6 +2751,10 @@ /* netmos_9805 */ { 1, { { 0, -1 }, } }, /* untested */ /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ /* netmos_9855 */ { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */ + /* netmos_9735 */ { 1, { { 2, 3 }, } }, /* untested */ + /* netmos_9835 */ { 1, { { 2, 3 }, } }, /* untested */ + /* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ + /* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */ }; static struct pci_device_id parport_pc_pci_tbl[] = { @@ -2786,6 +2832,14 @@ PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9815 }, { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9735, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9735 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9835 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9755, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9755 }, + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9715, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9715 }, { 0, } /* terminate list */ }; MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl); diff -Nru a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c --- a/drivers/pci/hotplug/acpiphp_core.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pci/hotplug/acpiphp_core.c 2004-09-06 16:37:53 -07:00 @@ -61,7 +61,7 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); -module_param(debug, bool, 644); +module_param(debug, bool, 0644); /* export the attention callback registration methods */ EXPORT_SYMBOL_GPL(acpiphp_register_attention); diff -Nru a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c --- a/drivers/pci/hotplug/acpiphp_ibm.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pci/hotplug/acpiphp_ibm.c 2004-09-06 16:37:54 -07:00 @@ -340,7 +340,7 @@ int bytes_read = -EINVAL; char *table = NULL; - dbg("%s: pos = %d, size = %d\n", __FUNCTION__, (int)pos, size); + dbg("%s: pos = %d, size = %zd\n", __FUNCTION__, (int)pos, size); if (pos == 0) { bytes_read = ibm_get_table_from_acpi(&table); @@ -383,8 +383,8 @@ if(info.current_status && (info.valid & ACPI_VALID_HID) && (!strcmp(info.hardware_id.value, IBM_HARDWARE_ID1) || !strcmp(info.hardware_id.value, IBM_HARDWARE_ID2))) { - dbg("found hardware: %s, handle: %x\n", info.hardware_id.value, - (unsigned int)handle); + dbg("found hardware: %s, handle: %p\n", info.hardware_id.value, + handle); *phandle = handle; /* returning non-zero causes the search to stop * and returns this value to the caller of diff -Nru a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c --- a/drivers/pci/hotplug/cpcihp_zt5550.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pci/hotplug/cpcihp_zt5550.c 2004-09-06 16:37:53 -07:00 @@ -298,7 +298,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(debug, bool, 644); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); -module_param(poll, bool, 644); +module_param(poll, bool, 0644); MODULE_PARM_DESC(poll, "#ENUM polling mode enabled or not"); diff -Nru a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c --- a/drivers/pci/hotplug/cpqphp_core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/pci/hotplug/cpqphp_core.c 2004-09-06 16:37:50 -07:00 @@ -69,10 +69,10 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(power_mode, bool, 644); +module_param(power_mode, bool, 0644); MODULE_PARM_DESC(power_mode, "Power mode enabled or not"); -module_param(debug, bool, 644); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); #define CPQHPC_MODULE_MINOR 208 diff -Nru a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c --- a/drivers/pci/hotplug/pci_hotplug_core.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pci/hotplug/pci_hotplug_core.c 2004-09-06 16:37:54 -07:00 @@ -701,7 +701,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(debug, bool, 644); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); EXPORT_SYMBOL_GPL(pci_hotplug_slots_subsys); diff -Nru a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c --- a/drivers/pci/hotplug/pciehp_core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/pci/hotplug/pciehp_core.c 2004-09-06 16:37:50 -07:00 @@ -57,9 +57,9 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(pciehp_debug, bool, 644); -module_param(pciehp_poll_mode, bool, 644); -module_param(pciehp_poll_time, int, 644); +module_param(pciehp_debug, bool, 0644); +module_param(pciehp_poll_mode, bool, 0644); +module_param(pciehp_poll_time, int, 0644); MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); diff -Nru a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c --- a/drivers/pci/hotplug/pcihp_skeleton.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pci/hotplug/pcihp_skeleton.c 2004-09-06 16:37:53 -07:00 @@ -70,7 +70,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(debug, bool, 644); +module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); static int enable_slot (struct hotplug_slot *slot); diff -Nru a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c --- a/drivers/pci/hotplug/shpchp_core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/pci/hotplug/shpchp_core.c 2004-09-06 16:37:50 -07:00 @@ -57,9 +57,9 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -module_param(shpchp_debug, bool, 644); -module_param(shpchp_poll_mode, bool, 644); -module_param(shpchp_poll_time, int, 644); +module_param(shpchp_debug, bool, 0644); +module_param(shpchp_poll_mode, bool, 0644); +module_param(shpchp_poll_time, int, 0644); MODULE_PARM_DESC(shpchp_debug, "Debugging mode enabled or not"); MODULE_PARM_DESC(shpchp_poll_mode, "Using polling mechanism for hot-plug events or not"); MODULE_PARM_DESC(shpchp_poll_time, "Polling mechanism frequency, in seconds"); diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c --- a/drivers/pci/pci-driver.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pci/pci-driver.c 2004-09-06 16:37:54 -07:00 @@ -390,10 +390,9 @@ * pci_register_driver - register a new pci driver * @drv: the driver structure to register * - * Adds the driver structure to the list of registered drivers - * Returns the number of pci devices which were claimed by the driver - * during registration. The driver remains registered even if the - * return value is zero. + * Adds the driver structure to the list of registered drivers. + * Returns a negative value on error. The driver remains registered + * even if no device was claimed during registration. */ int pci_register_driver(struct pci_driver *drv) diff -Nru a/drivers/pci/pci.ids b/drivers/pci/pci.ids --- a/drivers/pci/pci.ids 2004-09-06 16:37:53 -07:00 +++ b/drivers/pci/pci.ids 2004-09-06 16:37:53 -07:00 @@ -225,10 +225,22 @@ 1000 0530 MegaRAID 530 SCSI 320-0X RAID Controller 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller 1000 0532 MegaRAID 532 SCSI 320-2X RAID Controller - 1028 0533 PowerEdge Expandable RAID Controller 4/QC - 8086 0532 Storage RAID Controller SRCU42X + 1028 0531 PowerEdge Expandable RAID Controller 4/QC + 8086 0530 MegaRAID Intel RAID Controller SRCZCRX + 8086 0532 MegaRAID Intel RAID Controller SRCU42X 0408 MegaRAID - 1028 0002 PowerEdge Expandable RAID Controller 4e/DC + 1000 0001 MegaRAID SCSI 320-1E RAID Controller + 1000 0002 MegaRAID SCSI 320-2E RAID Controller + 1028 0001 Dell PowerEdge RAID Controller PERC4e/SC + 1028 0002 Dell PowerEdge RAID Controller PERC4e/DC + 1734 1065 FSC MegaRAID PCI Express ROMB + 8086 0002 MegaRAID Intel RAID Controller SRCU42E + 0409 MegaRAID + 1000 3004 MegaRAID SATA 300-4X RAID Controller + 1000 3008 MegaRAID SATA 300-8X RAID Controller + 8086 3008 MegaRAID Intel RAID Controller SRCS28X + 8086 3431 MegaRAID Intel RAID Controller Alief SROMBU42E + 8086 3499 MegaRAID Intel RAID Controller Harwich SROMBU42E 0621 FC909 Fibre Channel Adapter 0622 FC929 Fibre Channel Adapter 1000 1020 44929 O Dual Fibre Channel card @@ -252,7 +264,7 @@ 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller 1000 0520 MegaRAID 520 SCSI 320-1 Controller - 1000 0522 MegaRAID 522 i4133 RAID Controller + 1000 0522 MegaRAID 522 i4 133 RAID Controller 1000 0523 MegaRAID SATA 150-6 RAID Controller 1000 4523 MegaRAID SATA 150-4 RAID Controller 1000 a520 MegaRAID ZCR SCSI 320-0 Controller @@ -260,6 +272,8 @@ 1028 0520 MegaRAID 520 DELL PERC 4/SC RAID Controller 1028 0531 PowerEdge Expandable RAID Controller 4/QC 1028 0533 PowerEdge Expandable RAID Controller 4/QC + 8086 0520 MegaRAID Intel RAID Controller SRCU41L + 8086 0523 MegaRAID Intel RAID Controller SRCS16 1001 Kolter Electronic 0010 PCI 1616 Measurement card with 32 digital I/O lines 0011 OPTO-PCI Opto-Isolated digital I/O board @@ -959,6 +973,7 @@ 0180 Snipe chipset SCSI controller 1014 0241 iSeries 2757 DASD IOA 1014 0264 Quad Channel PCI-X U320 SCSI RAID Adapter (2780) + 1014 02BD Quad Channel PCI-X U320 DDR SCSI RAID Adapter (570F) 01a7 PCI-X to PCI-X Bridge 01bd ServeRAID Controller 1014 01be ServeRAID-4M @@ -981,6 +996,8 @@ 0266 PCI-X Dual Channel SCSI 0268 Gigabit Ethernet-SX Adapter (PCI-X) 0269 10/100/1000 Base-TX Ethernet Adapter (PCI-X) + 028C Citrine chipset SCSI controller + 1014 02BE Dual Channel PCI-X U320 DDR SCSI RAID Adapter (571B) 0302 X-Architecture Bridge [Summit] ffff MPIC-2 interrupt controller 1015 LSI Logic Corp of Canada @@ -1244,6 +1261,8 @@ 1028 016c PowerEdge Expandable RAID Controller 4e/Si 1028 016d PowerEdge Expandable RAID Controller 4e/Di 1028 016e PowerEdge Expandable RAID Controller 4e/Di + 1028 016f PowerEdge Expandable RAID Controller 4e/Di + 1028 0170 PowerEdge Expandable RAID Controller 4e/Di 0014 Remote Access Card 4 Daughter Card SMIC interface 1029 Siemens Nixdorf IS 102a LSI Logic @@ -2118,6 +2137,8 @@ 1014 0242 iSeries 2872 DASD IOA 1014 0266 Dual Channel PCI-X U320 SCSI Adapter 1014 0278 Dual Channel PCI-X U320 SCSI RAID Adapter + 1014 02D3 Dual Channel PCI-X U320 SCSI Adapter + 1014 02D4 Dual Channel PCI-X U320 SCSI RAID Adapter ba55 eXtremeRAID 1100 support Device ba56 eXtremeRAID 2000/3000 support Device 106a Aten Research Inc diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c --- a/drivers/pci/probe.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pci/probe.c 2004-09-06 16:37:54 -07:00 @@ -571,6 +571,11 @@ return PCI_CFG_SPACE_SIZE; } +static void pci_release_bus_bridge_dev(struct device *dev) +{ + kfree(dev); +} + /* * Read the config data for a PCI device, sanity-check it * and fill in the dev structure... @@ -772,6 +777,7 @@ memset(dev, 0, sizeof(*dev)); dev->parent = parent; + dev->release = pci_release_bus_bridge_dev; sprintf(dev->bus_id, "pci%04x:%02x", pci_domain_nr(b), bus); device_register(dev); b->bridge = get_device(dev); diff -Nru a/drivers/pci/remove.c b/drivers/pci/remove.c --- a/drivers/pci/remove.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/pci/remove.c 2004-09-06 16:37:51 -07:00 @@ -59,6 +59,18 @@ } EXPORT_SYMBOL(pci_remove_device_safe); +void pci_remove_bus(struct pci_bus *b) +{ + pci_proc_detach_bus(b); + + spin_lock(&pci_bus_lock); + list_del(&b->node); + spin_unlock(&pci_bus_lock); + + class_device_unregister(&b->class_dev); +} +EXPORT_SYMBOL(pci_remove_bus); + /** * pci_remove_bus_device - remove a PCI device and any children * @dev: the device to remove @@ -77,13 +89,7 @@ struct pci_bus *b = dev->subordinate; pci_remove_behind_bridge(dev); - pci_proc_detach_bus(b); - - spin_lock(&pci_bus_lock); - list_del(&b->node); - spin_unlock(&pci_bus_lock); - - class_device_unregister(&b->class_dev); + pci_remove_bus(b); dev->subordinate = NULL; } diff -Nru a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c --- a/drivers/pcmcia/au1000_generic.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pcmcia/au1000_generic.c 2004-09-06 16:37:53 -07:00 @@ -566,7 +566,6 @@ au1000_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *map) { unsigned int speed; - unsigned long start; u_long flags; if(map->map>=MAX_WIN){ @@ -588,25 +587,19 @@ } spin_lock_irqsave(&pcmcia_lock, flags); - start=map->sys_start; - - if(map->sys_stop==0) - map->sys_stop=MAP_SIZE-1; - if (map->flags & MAP_ATTRIB) { - map->sys_start = pcmcia_socket[sock].phys_attr + + map->static_start = pcmcia_socket[sock].phys_attr + map->card_start; } else { - map->sys_start = pcmcia_socket[sock].phys_mem + + map->static_start = pcmcia_socket[sock].phys_mem + map->card_start; } - map->sys_stop=map->sys_start+(map->sys_stop-start); pcmcia_socket[sock].mem_map[map->map]=*map; spin_unlock_irqrestore(&pcmcia_lock, flags); - debug(3, "set_mem_map %d start %x stop %x card_start %x\n", - map->map, map->sys_start, map->sys_stop, + debug(3, "set_mem_map %d start %x card_start %x\n", + map->map, map->static_start, map->card_start); return 0; diff -Nru a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c --- a/drivers/pcmcia/cistpl.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/pcmcia/cistpl.c 2004-09-06 16:37:51 -07:00 @@ -114,8 +114,6 @@ printk(KERN_NOTICE "cs: unable to map card memory!\n"); return NULL; } - mem->sys_start = mem->res->start; - mem->sys_stop = mem->res->end; s->cis_virt = ioremap(mem->res->start, s->map_size); } mem->card_start = card_offset; @@ -124,7 +122,7 @@ if (s->features & SS_CAP_STATIC_MAP) { if (s->cis_virt) iounmap(s->cis_virt); - s->cis_virt = ioremap(mem->sys_start, s->map_size); + s->cis_virt = ioremap(mem->static_start, s->map_size); } return s->cis_virt; } diff -Nru a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c --- a/drivers/pcmcia/cs.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/pcmcia/cs.c 2004-09-06 16:37:51 -07:00 @@ -1886,11 +1886,6 @@ (*handle)->dev_info, s); if (!win->ctl.res) return CS_IN_USE; - win->ctl.sys_start = win->ctl.res->start; - win->ctl.sys_stop = win->ctl.res->end; - } else { - win->ctl.sys_start = req->Base; - win->ctl.sys_stop = req->Base + req->Size - 1; } (*handle)->state |= CLIENT_WIN_REQ(w); @@ -1912,7 +1907,11 @@ s->state |= SOCKET_WIN_REQ(w); /* Return window handle */ - req->Base = win->ctl.sys_start; + if (s->features & SS_CAP_STATIC_MAP) { + req->Base = win->ctl.static_start; + } else { + req->Base = win->ctl.res->start; + } *wh = win; return CS_SUCCESS; diff -Nru a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c --- a/drivers/pcmcia/hd64465_ss.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pcmcia/hd64465_ss.c 2004-09-06 16:37:53 -07:00 @@ -636,19 +636,17 @@ hs_socket_t *sp = container_of(s, struct hs_socket_t, socket); struct pccard_mem_map *smem; int map = mem->map; - unsigned long paddr, size; + unsigned long paddr; #if 0 - DPRINTK("hs_set_mem_map(sock=%d, map=%d, flags=0x%x, sys_start=0x%08lx, sys_end=0x%08lx, card_start=0x%08x)\n", - sock, map, mem->flags, mem->sys_start, mem->sys_stop, mem->card_start); + DPRINTK("hs_set_mem_map(sock=%d, map=%d, flags=0x%x, card_start=0x%08x)\n", + sock, map, mem->flags, mem->card_start); #endif if (map >= MAX_WIN) return -EINVAL; smem = &sp->mem_maps[map]; - size = mem->sys_stop - mem->sys_start + 1; - paddr = sp->mem_base; /* base of Attribute mapping */ if (!(mem->flags & MAP_ATTRIB)) paddr += HD64465_PCC_WINDOW; /* base of Common mapping */ @@ -660,8 +658,7 @@ * queries our fixed mapping. I wish this fact had been * documented - Greg Banks. */ - mem->sys_start = paddr; - mem->sys_stop = paddr + size - 1; + mem->static_start = paddr; *smem = *mem; diff -Nru a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c --- a/drivers/pcmcia/i82092.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/pcmcia/i82092.c 2004-09-06 16:37:55 -07:00 @@ -422,7 +422,7 @@ int i; struct resource res = { .start = 0, .end = 0x0fff }; pccard_io_map io = { 0, 0, 0, 0, 1 }; - pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff, }; + pccard_mem_map mem = { .res = &res, }; enter("i82092aa_init"); @@ -706,11 +706,15 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_map *mem) { - unsigned int sock = container_of(socket, struct socket_info, socket)->number; + struct socket_info *sock_info = container_of(socket, struct socket_info, socket); + unsigned int sock = sock_info->number; + struct pci_bus_region region; unsigned short base, i; unsigned char map; enter("i82092aa_set_mem_map"); + + pcibios_resource_to_bus(sock_info->dev, ®ion, mem->res); map = mem->map; if (map > 4) { @@ -719,10 +723,10 @@ } - if ( (mem->card_start > 0x3ffffff) || (mem->sys_start > mem->sys_stop) || + if ( (mem->card_start > 0x3ffffff) || (region.start > region.end) || (mem->speed > 1000) ) { leave("i82092aa_set_mem_map: invalid address / speed"); - printk("invalid mem map for socket %i : %lx to %lx with a start of %x \n",sock,mem->sys_start, mem->sys_stop, mem->card_start); + printk("invalid mem map for socket %i : %lx to %lx with a start of %x \n",sock,region.start, region.end, mem->card_start); return -EINVAL; } @@ -731,11 +735,11 @@ indirect_resetbit(sock, I365_ADDRWIN, I365_ENA_MEM(map)); -/* printk("set_mem_map: Setting map %i range to %x - %x on socket %i, speed is %i, active = %i \n",map, mem->sys_start,mem->sys_stop,sock,mem->speed,mem->flags & MAP_ACTIVE); */ +/* printk("set_mem_map: Setting map %i range to %x - %x on socket %i, speed is %i, active = %i \n",map, region.start,region.end,sock,mem->speed,mem->flags & MAP_ACTIVE); */ /* write the start address */ base = I365_MEM(map); - i = (mem->sys_start >> 12) & 0x0fff; + i = (region.start >> 12) & 0x0fff; if (mem->flags & MAP_16BIT) i |= I365_MEM_16BIT; if (mem->flags & MAP_0WS) @@ -744,7 +748,7 @@ /* write the stop address */ - i= (mem->sys_stop >> 12) & 0x0fff; + i= (region.end >> 12) & 0x0fff; switch (to_cycles(mem->speed)) { case 0: break; @@ -763,7 +767,7 @@ /* card start */ - i = ((mem->card_start - mem->sys_start) >> 12) & 0x3fff; + i = ((mem->card_start - region.start) >> 12) & 0x3fff; if (mem->flags & MAP_WRPROT) i |= I365_MEM_WRPROT; if (mem->flags & MAP_ATTRIB) { diff -Nru a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c --- a/drivers/pcmcia/i82365.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pcmcia/i82365.c 2004-09-06 16:37:54 -07:00 @@ -1159,13 +1159,13 @@ debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#5.5lx-%#5.5" "lx, %#5.5x)\n", sock, mem->map, mem->flags, mem->speed, - mem->sys_start, mem->sys_stop, mem->card_start); + mem->res->start, mem->res->end, mem->card_start); map = mem->map; if ((map > 4) || (mem->card_start > 0x3ffffff) || - (mem->sys_start > mem->sys_stop) || (mem->speed > 1000)) + (mem->res->start > mem->res->end) || (mem->speed > 1000)) return -EINVAL; - if ((mem->sys_start > 0xffffff) || (mem->sys_stop > 0xffffff)) + if ((mem->res->start > 0xffffff) || (mem->res->end > 0xffffff)) return -EINVAL; /* Turn off the window before changing anything */ @@ -1173,12 +1173,12 @@ i365_bclr(sock, I365_ADDRWIN, I365_ENA_MEM(map)); base = I365_MEM(map); - i = (mem->sys_start >> 12) & 0x0fff; + i = (mem->res->start >> 12) & 0x0fff; if (mem->flags & MAP_16BIT) i |= I365_MEM_16BIT; if (mem->flags & MAP_0WS) i |= I365_MEM_0WS; i365_set_pair(sock, base+I365_W_START, i); - i = (mem->sys_stop >> 12) & 0x0fff; + i = (mem->res->end >> 12) & 0x0fff; switch (to_cycles(mem->speed)) { case 0: break; case 1: i |= I365_MEM_WS0; break; @@ -1187,7 +1187,7 @@ } i365_set_pair(sock, base+I365_W_STOP, i); - i = ((mem->card_start - mem->sys_start) >> 12) & 0x3fff; + i = ((mem->card_start - mem->res->start) >> 12) & 0x3fff; if (mem->flags & MAP_WRPROT) i |= I365_MEM_WRPROT; if (mem->flags & MAP_ATTRIB) i |= I365_MEM_REG; i365_set_pair(sock, base+I365_W_OFF, i); @@ -1309,7 +1309,7 @@ int i; struct resource res = { .start = 0, .end = 0x1000 }; pccard_io_map io = { 0, 0, 0, 0, 1 }; - pccard_mem_map mem = { .res = &res, .sys_stop = 0x1000, }; + pccard_mem_map mem = { .res = &res, }; for (i = 0; i < 2; i++) { io.map = i; diff -Nru a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c --- a/drivers/pcmcia/pd6729.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/pcmcia/pd6729.c 2004-09-06 16:37:54 -07:00 @@ -502,10 +502,10 @@ return -EINVAL; } - if ((mem->sys_start > mem->sys_stop) || (mem->speed > 1000)) { + if ((mem->res->start > mem->res->end) || (mem->speed > 1000)) { printk("pd6729_set_mem_map: invalid address / speed"); /* printk("invalid mem map for socket %i : %lx to %lx with a start of %x\n", - sock, mem->sys_start, mem->sys_stop, mem->card_start); */ + sock, mem->res->start, mem->res->end, mem->card_start); */ return -EINVAL; } @@ -515,7 +515,7 @@ /* write the start address */ base = I365_MEM(map); - i = (mem->sys_start >> 12) & 0x0fff; + i = (mem->res->start >> 12) & 0x0fff; if (mem->flags & MAP_16BIT) i |= I365_MEM_16BIT; if (mem->flags & MAP_0WS) @@ -524,7 +524,7 @@ /* write the stop address */ - i= (mem->sys_stop >> 12) & 0x0fff; + i= (mem->res->end >> 12) & 0x0fff; switch (to_cycles(mem->speed)) { case 0: break; @@ -543,11 +543,11 @@ /* Take care of high byte */ indirect_write(socket, PD67_EXT_INDEX, PD67_MEM_PAGE(map)); - indirect_write(socket, PD67_EXT_DATA, mem->sys_start >> 24); + indirect_write(socket, PD67_EXT_DATA, mem->res->start >> 24); /* card start */ - i = ((mem->card_start - mem->sys_start) >> 12) & 0x3fff; + i = ((mem->card_start - mem->res->start) >> 12) & 0x3fff; if (mem->flags & MAP_WRPROT) i |= I365_MEM_WRPROT; if (mem->flags & MAP_ATTRIB) { @@ -577,7 +577,7 @@ int i; struct resource res = { .end = 0x0fff }; pccard_io_map io = { 0, 0, 0, 0, 1 }; - pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff }; + pccard_mem_map mem = { .res = &res, }; pd6729_set_socket(sock, &dead_socket); for (i = 0; i < 2; i++) { diff -Nru a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c --- a/drivers/pcmcia/rsrc_mgr.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pcmcia/rsrc_mgr.c 2004-09-06 16:37:53 -07:00 @@ -301,8 +301,6 @@ { int ret = -1; - s->cis_mem.sys_start = res->start; - s->cis_mem.sys_stop = res->end; s->cis_mem.res = res; s->cis_virt = ioremap(res->start, s->map_size); if (s->cis_virt) { @@ -312,8 +310,6 @@ s->cis_virt = NULL; destroy_cis_cache(s); } - s->cis_mem.sys_start = 0; - s->cis_mem.sys_stop = 0; s->cis_mem.res = NULL; if ((ret != 0) || (info->Chains == 0)) return 0; @@ -332,8 +328,6 @@ map.map = 0; map.flags = MAP_ACTIVE; map.speed = 0; - map.sys_start = res->start; - map.sys_stop = res->end; map.res = res; map.card_start = 0; s->ops->set_mem_map(s, &map); diff -Nru a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c --- a/drivers/pcmcia/soc_common.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/pcmcia/soc_common.c 2004-09-06 16:37:51 -07:00 @@ -448,9 +448,7 @@ skt->ops->set_timing(skt); - map->sys_stop -= map->sys_start; - map->sys_stop += res->start + map->card_start; - map->sys_start = res->start + map->card_start; + map->static_start = res->start + map->card_start; return 0; } @@ -662,6 +660,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) { struct skt_dev_info *sinfo; + struct soc_pcmcia_socket *skt; int ret, i; down(&soc_pcmcia_sockets_lock); @@ -679,7 +678,7 @@ * Initialise the per-socket structure. */ for (i = 0; i < nr; i++) { - struct soc_pcmcia_socket *skt = &sinfo->skt[i]; + skt = &sinfo->skt[i]; skt->socket.ops = &soc_common_pcmcia_operations; skt->socket.owner = ops->owner; @@ -777,7 +776,7 @@ goto out; do { - struct soc_pcmcia_socket *skt = &sinfo->skt[i]; + skt = &sinfo->skt[i]; del_timer_sync(&skt->poll_timer); pcmcia_unregister_socket(&skt->socket); diff -Nru a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c --- a/drivers/pcmcia/tcic.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pcmcia/tcic.c 2004-09-06 16:37:53 -07:00 @@ -829,15 +829,15 @@ debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, " "%#5.5lx-%#5.5lx, %#5.5x)\n", psock, mem->map, mem->flags, - mem->speed, mem->sys_start, mem->sys_stop, mem->card_start); + mem->speed, mem->res->start, mem->res->end, mem->card_start); if ((mem->map > 3) || (mem->card_start > 0x3ffffff) || - (mem->sys_start > 0xffffff) || (mem->sys_stop > 0xffffff) || - (mem->sys_start > mem->sys_stop) || (mem->speed > 1000)) + (mem->res->start > 0xffffff) || (mem->res->end > 0xffffff) || + (mem->res->start > mem->res->end) || (mem->speed > 1000)) return -EINVAL; tcic_setw(TCIC_ADDR+2, TCIC_ADR2_INDREG | (psock << TCIC_SS_SHFT)); addr = TCIC_MWIN(psock, mem->map); - base = mem->sys_start; len = mem->sys_stop - mem->sys_start; + base = mem->res->start; len = mem->res->end - mem->res->start; if ((len & (len+1)) || (base & len)) return -EINVAL; if (len == 0x0fff) base = (base >> TCIC_MBASE_HA_SHFT) | TCIC_MBASE_4K_BIT; @@ -846,7 +846,7 @@ tcic_setw(TCIC_ADDR, addr + TCIC_MBASE_X); tcic_setw(TCIC_DATA, base); - mmap = mem->card_start - mem->sys_start; + mmap = mem->card_start - mem->res->start; mmap = (mmap >> TCIC_MMAP_CA_SHFT) & TCIC_MMAP_CA_MASK; if (mem->flags & MAP_ATTRIB) mmap |= TCIC_MMAP_REG; tcic_setw(TCIC_ADDR, addr + TCIC_MMAP_X); @@ -870,7 +870,7 @@ int i; struct resource res = { .start = 0, .end = 0x1000 }; pccard_io_map io = { 0, 0, 0, 0, 1 }; - pccard_mem_map mem = { .res = &res, .sys_stop = 0x1000, }; + pccard_mem_map mem = { .res = &res, }; for (i = 0; i < 2; i++) { io.map = i; diff -Nru a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c --- a/drivers/pcmcia/yenta_socket.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pcmcia/yenta_socket.c 2004-09-06 16:37:53 -07:00 @@ -343,14 +343,17 @@ static int yenta_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *mem) { struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); + struct pci_bus_region region; int map; unsigned char addr, enable; unsigned int start, stop, card_start; unsigned short word; + pcibios_resource_to_bus(socket->dev, ®ion, mem->res); + map = mem->map; - start = mem->sys_start; - stop = mem->sys_stop; + start = region.start; + stop = region.end; card_start = mem->card_start; if (map > 4 || start > stop || ((start ^ stop) >> 24) || @@ -447,7 +450,7 @@ int i; struct resource res = { .start = 0, .end = 0x0fff }; pccard_io_map io = { 0, 0, 0, 0, 1 }; - pccard_mem_map mem = { .res = &res, .sys_stop = 0x0fff, }; + pccard_mem_map mem = { .res = &res, }; yenta_set_socket(&socket->socket, &dead_socket); for (i = 0; i < 2; i++) { diff -Nru a/drivers/pnp/interface.c b/drivers/pnp/interface.c --- a/drivers/pnp/interface.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/pnp/interface.c 2004-09-06 16:37:51 -07:00 @@ -240,12 +240,14 @@ { struct pnp_dev *dev = to_pnp_dev(dmdev); int i, ret; - pnp_info_buffer_t *buffer = (pnp_info_buffer_t *) - pnp_alloc(sizeof(pnp_info_buffer_t)); - if (!buffer) - return -ENOMEM; + pnp_info_buffer_t *buffer; + if (!dev) return -EINVAL; + + buffer = (pnp_info_buffer_t *) pnp_alloc(sizeof(pnp_info_buffer_t)); + if (!buffer) + return -ENOMEM; buffer->len = PAGE_SIZE; buffer->buffer = buf; buffer->curr = buffer->buffer; diff -Nru a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c --- a/drivers/pnp/isapnp/core.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/pnp/isapnp/core.c 2004-09-06 16:37:53 -07:00 @@ -655,8 +655,10 @@ if ((dev = isapnp_parse_device(card, size, number++)) == NULL) return 1; option = pnp_register_independent_option(dev); - if (!option) + if (!option) { + kfree(dev); return 1; + } pnp_add_card_device(card,dev); while (1) { diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c --- a/drivers/pnp/pnpbios/core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/pnp/pnpbios/core.c 2004-09-06 16:37:50 -07:00 @@ -252,8 +252,10 @@ node = pnpbios_kmalloc(node_info.max_node_size, GFP_KERNEL); if (!node) return -1; - if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) + if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) { + kfree(node); return -ENODEV; + } if(pnpbios_write_resources_to_node(res, node)<0) { kfree(node); return -1; diff -Nru a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c --- a/drivers/pnp/pnpbios/proc.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/pnp/pnpbios/proc.c 2004-09-06 16:37:55 -07:00 @@ -90,8 +90,10 @@ tmpbuf = pnpbios_kmalloc(escd.escd_size, GFP_KERNEL); if (!tmpbuf) return -ENOMEM; - if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) + if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) { + kfree(tmpbuf); return -EIO; + } escd_size = (unsigned char)(tmpbuf[0]) + (unsigned char)(tmpbuf[1])*256; @@ -168,8 +170,10 @@ node = pnpbios_kmalloc(node_info.max_node_size, GFP_KERNEL); if (!node) return -ENOMEM; - if (pnp_bios_get_dev_node(&nodenum, boot, node)) + if (pnp_bios_get_dev_node(&nodenum, boot, node)) { + kfree(node); return -EIO; + } len = node->size - sizeof(struct pnp_bios_node); memcpy(buf, node->data, len); kfree(node); diff -Nru a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c --- a/drivers/s390/char/sclp.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/s390/char/sclp.c 2004-09-06 16:37:53 -07:00 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,7 @@ #define SCLP_INIT 0 #define SCLP_RUNNING 1 #define SCLP_READING 2 +#define SCLP_SHUTDOWN 3 #define SCLP_INIT_POLL_INTERVAL 1 #define SCLP_BUSY_POLL_INTERVAL 1 @@ -606,10 +608,12 @@ sccb->mask_length = sizeof(sccb_mask_t); /* copy in the sccb mask of the registered event types */ spin_lock_irqsave(&sclp_lock, flags); - list_for_each(l, &sclp_reg_list) { - t = list_entry(l, struct sclp_register, list); - sccb->receive_mask |= t->receive_mask; - sccb->send_mask |= t->send_mask; + if (!test_bit(SCLP_SHUTDOWN, &sclp_status)) { + list_for_each(l, &sclp_reg_list) { + t = list_entry(l, struct sclp_register, list); + sccb->receive_mask |= t->receive_mask; + sccb->send_mask |= t->send_mask; + } } sccb->sclp_receive_mask = 0; sccb->sclp_send_mask = 0; @@ -647,9 +651,10 @@ /* WRITEMASK failed - we cannot rely on receiving a state change event, so initially, polling is the only alternative for us to ever become operational. */ - if (!timer_pending(&retry_timer) || - !mod_timer(&retry_timer, - jiffies + SCLP_INIT_POLL_INTERVAL*HZ)) { + if (!test_bit(SCLP_SHUTDOWN, &sclp_status) && + (!timer_pending(&retry_timer) || + !mod_timer(&retry_timer, + jiffies + SCLP_INIT_POLL_INTERVAL*HZ))) { retry_timer.function = sclp_init_mask_retry; retry_timer.data = 0; retry_timer.expires = jiffies + @@ -671,6 +676,26 @@ sclp_init_mask(); } +/* Reboot event handler - reset send and receive mask to prevent pending SCLP + * events from interfering with rebooted system. */ +static int +sclp_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) +{ + unsigned long flags; + + /* Note: need spinlock to maintain atomicity when accessing global + * variables. */ + spin_lock_irqsave(&sclp_lock, flags); + set_bit(SCLP_SHUTDOWN, &sclp_status); + spin_unlock_irqrestore(&sclp_lock, flags); + sclp_init_mask(); + return NOTIFY_DONE; +} + +static struct notifier_block sclp_reboot_notifier = { + .notifier_call = sclp_reboot_event +}; + /* * sclp setup function. Called early (no kmalloc!) from sclp_console_init(). */ @@ -690,6 +715,10 @@ INIT_LIST_HEAD(&sclp_reg_list); list_add(&sclp_state_change_event.list, &sclp_reg_list); list_add(&sclp_quiesce_event.list, &sclp_reg_list); + + rc = register_reboot_notifier(&sclp_reboot_notifier); + if (rc) + return rc; /* * request the 0x2401 external interrupt diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c --- a/drivers/s390/cio/qdio.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/s390/cio/qdio.c 2004-09-06 16:37:53 -07:00 @@ -56,7 +56,7 @@ #include "ioasm.h" #include "chsc.h" -#define VERSION_QDIO_C "$Revision: 1.84 $" +#define VERSION_QDIO_C "$Revision: 1.86 $" /****************** MODULE PARAMETER VARIABLES ********************/ MODULE_AUTHOR("Utz Bacher "); @@ -365,7 +365,7 @@ * small window we can miss between resetting it and * checking for PRIMED state */ - if (q->is_iqdio_q) + if (q->is_thinint_q) tiqdio_set_summary_bit((__u32*)q->dev_st_chg_ind); return 0; diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/s390/net/lcs.c 2004-09-06 16:37:51 -07:00 @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky * - * $Revision: 1.85 $ $Date: 2004/08/04 11:05:43 $ + * $Revision: 1.89 $ $Date: 2004/08/24 10:49:27 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.85 $" +#define VERSION_LCS_C "$Revision: 1.89 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; static char debug_buffer[255]; @@ -70,6 +70,7 @@ static void lcs_tasklet(unsigned long); static void lcs_start_kernel_thread(struct lcs_card *card); static void lcs_get_frames_cb(struct lcs_channel *, struct lcs_buffer *); +static int lcs_send_delipm(struct lcs_card *, struct lcs_ipm_list *); /** * Debug Facility Stuff @@ -100,9 +101,9 @@ return -ENOMEM; } debug_register_view(lcs_dbf_setup, &debug_hex_ascii_view); - debug_set_level(lcs_dbf_setup, 2); + debug_set_level(lcs_dbf_setup, 4); debug_register_view(lcs_dbf_trace, &debug_hex_ascii_view); - debug_set_level(lcs_dbf_trace, 2); + debug_set_level(lcs_dbf_trace, 4); return 0; } @@ -316,7 +317,106 @@ init_waitqueue_head(&card->write.wait_q); } +static void +lcs_set_allowed_threads(struct lcs_card *card, unsigned long threads) +{ + unsigned long flags; + + spin_lock_irqsave(&card->mask_lock, flags); + card->thread_allowed_mask = threads; + spin_unlock_irqrestore(&card->mask_lock, flags); + wake_up(&card->wait_q); +} +static inline int +lcs_threads_running(struct lcs_card *card, unsigned long threads) +{ + unsigned long flags; + int rc = 0; + + spin_lock_irqsave(&card->mask_lock, flags); + rc = (card->thread_running_mask & threads); + spin_unlock_irqrestore(&card->mask_lock, flags); + return rc; +} + +static int +lcs_wait_for_threads(struct lcs_card *card, unsigned long threads) +{ + return wait_event_interruptible(card->wait_q, + lcs_threads_running(card, threads) == 0); +} + +static inline int +lcs_set_thread_start_bit(struct lcs_card *card, unsigned long thread) +{ + unsigned long flags; + + spin_lock_irqsave(&card->mask_lock, flags); + if ( !(card->thread_allowed_mask & thread) || + (card->thread_start_mask & thread) ) { + spin_unlock_irqrestore(&card->mask_lock, flags); + return -EPERM; + } + card->thread_start_mask |= thread; + spin_unlock_irqrestore(&card->mask_lock, flags); + return 0; +} + +static void +lcs_clear_thread_running_bit(struct lcs_card *card, unsigned long thread) +{ + unsigned long flags; + + spin_lock_irqsave(&card->mask_lock, flags); + card->thread_running_mask &= ~thread; + spin_unlock_irqrestore(&card->mask_lock, flags); + wake_up(&card->wait_q); +} + +static inline int +__lcs_do_run_thread(struct lcs_card *card, unsigned long thread) +{ + unsigned long flags; + int rc = 0; + + spin_lock_irqsave(&card->mask_lock, flags); + if (card->thread_start_mask & thread){ + if ((card->thread_allowed_mask & thread) && + !(card->thread_running_mask & thread)){ + rc = 1; + card->thread_start_mask &= ~thread; + card->thread_running_mask |= thread; + } else + rc = -EPERM; + } + spin_unlock_irqrestore(&card->mask_lock, flags); + return rc; +} + +static int +lcs_do_run_thread(struct lcs_card *card, unsigned long thread) +{ + int rc = 0; + wait_event(card->wait_q, + (rc = __lcs_do_run_thread(card, thread)) >= 0); + return rc; +} + +static int +lcs_do_start_thread(struct lcs_card *card, unsigned long thread) +{ + unsigned long flags; + int rc = 0; + spin_lock_irqsave(&card->mask_lock, flags); + LCS_DBF_TEXT_(4, trace, " %02x%02x%02x", + (u8) card->thread_start_mask, + (u8) card->thread_allowed_mask, + (u8) card->thread_running_mask); + rc = (card->thread_start_mask & thread); + spin_unlock_irqrestore(&card->mask_lock, flags); + return rc; +} /** * Initialize channels,card and state machines. @@ -337,34 +437,49 @@ /* Initialize kernel thread task used for LGW commands. */ INIT_WORK(&card->kernel_thread_starter, (void *)lcs_start_kernel_thread,card); - card->thread_mask = 0; + card->thread_start_mask = 0; + card->thread_allowed_mask = 0; + card->thread_running_mask = 0; + init_waitqueue_head(&card->wait_q); spin_lock_init(&card->lock); spin_lock_init(&card->ipm_lock); + spin_lock_init(&card->mask_lock); #ifdef CONFIG_IP_MULTICAST INIT_LIST_HEAD(&card->ipm_list); #endif INIT_LIST_HEAD(&card->lancmd_waiters); } +static inline void +lcs_clear_multicast_list(struct lcs_card *card) +{ +#ifdef CONFIG_IP_MULTICAST + struct list_head *l, *n; + struct lcs_ipm_list *ipm; + unsigned long flags; + /* Free multicast list. */ + LCS_DBF_TEXT(3, setup, "clmclist"); + spin_lock_irqsave(&card->ipm_lock, flags); + list_for_each_safe(l, n, &card->ipm_list) { + ipm = list_entry(l, struct lcs_ipm_list, list); + list_del(&ipm->list); + if (ipm->ipm_state != LCS_IPM_STATE_SET_REQUIRED) + lcs_send_delipm(card, ipm); + kfree(ipm); + } + spin_unlock_irqrestore(&card->ipm_lock, flags); +#endif +} /** * Cleanup channels,card and state machines. */ static void lcs_cleanup_card(struct lcs_card *card) { - struct list_head *l, *n; - struct lcs_ipm_list *ipm_list; LCS_DBF_TEXT(3, setup, "cleancrd"); LCS_DBF_HEX(2,setup,&card,sizeof(void*)); -#ifdef CONFIG_IP_MULTICAST - /* Free multicast list. */ - list_for_each_safe(l, n, &card->ipm_list) { - ipm_list = list_entry(l, struct lcs_ipm_list, list); - list_del(&ipm_list->list); - kfree(ipm_list); - } -#endif + if (card->dev != NULL) free_netdev(card->dev); /* Cleanup channels. */ @@ -651,6 +766,44 @@ return buffer; } + +static void +lcs_get_reply(struct lcs_reply *reply) +{ + WARN_ON(atomic_read(&reply->refcnt) <= 0); + atomic_inc(&reply->refcnt); +} + +static void +lcs_put_reply(struct lcs_reply *reply) +{ + WARN_ON(atomic_read(&reply->refcnt) <= 0); + if (atomic_dec_and_test(&reply->refcnt)) { + kfree(reply); + } + +} + +static struct lcs_reply * +lcs_alloc_reply(struct lcs_cmd *cmd) +{ + struct lcs_reply *reply; + + LCS_DBF_TEXT(4, trace, "getreply"); + + reply = kmalloc(sizeof(struct lcs_reply), GFP_ATOMIC); + if (!reply) + return NULL; + memset(reply,0,sizeof(struct lcs_reply)); + atomic_set(&reply->refcnt,1); + reply->sequence_no = cmd->sequence_no; + reply->received = 0; + reply->rc = 0; + init_waitqueue_head(&reply->wait_q); + + return reply; +} + /** * Notifier function for lancmd replies. Called from read irq. */ @@ -665,12 +818,14 @@ list_for_each_safe(l, n, &card->lancmd_waiters) { reply = list_entry(l, struct lcs_reply, list); if (reply->sequence_no == cmd->sequence_no) { - list_del(&reply->list); + lcs_get_reply(reply); + list_del_init(&reply->list); if (reply->callback != NULL) reply->callback(card, cmd); reply->received = 1; reply->rc = cmd->return_code; wake_up(&reply->wait_q); + lcs_put_reply(reply); break; } } @@ -683,50 +838,66 @@ void lcs_lancmd_timeout(unsigned long data) { - struct lcs_reply *reply; + struct lcs_reply *reply, *list_reply, *r; + unsigned long flags; LCS_DBF_TEXT(4, trace, "timeout"); reply = (struct lcs_reply *) data; - list_del(&reply->list); - reply->received = 1; - reply->rc = -ETIME; - wake_up(&reply->wait_q); + spin_lock_irqsave(&reply->card->lock, flags); + list_for_each_entry_safe(list_reply, r, + &reply->card->lancmd_waiters,list) { + if (reply == list_reply) { + lcs_get_reply(reply); + list_del_init(&reply->list); + spin_unlock_irqrestore(&reply->card->lock, flags); + reply->received = 1; + reply->rc = -ETIME; + wake_up(&reply->wait_q); + lcs_put_reply(reply); + return; + } + } + spin_unlock_irqrestore(&reply->card->lock, flags); } static int lcs_send_lancmd(struct lcs_card *card, struct lcs_buffer *buffer, void (*reply_callback)(struct lcs_card *, struct lcs_cmd *)) { - struct lcs_reply reply; + struct lcs_reply *reply; struct lcs_cmd *cmd; struct timer_list timer; + unsigned long flags; int rc; LCS_DBF_TEXT(4, trace, "sendcmd"); cmd = (struct lcs_cmd *) buffer->data; - cmd->sequence_no = ++card->sequence_no; cmd->return_code = 0; - reply.sequence_no = cmd->sequence_no; - reply.callback = reply_callback; - reply.received = 0; - reply.rc = 0; - init_waitqueue_head(&reply.wait_q); - spin_lock(&card->lock); - list_add_tail(&reply.list, &card->lancmd_waiters); - spin_unlock(&card->lock); + cmd->sequence_no = card->sequence_no++; + reply = lcs_alloc_reply(cmd); + if (!reply) + return -ENOMEM; + reply->callback = reply_callback; + reply->card = card; + spin_lock_irqsave(&card->lock, flags); + list_add_tail(&reply->list, &card->lancmd_waiters); + spin_unlock_irqrestore(&card->lock, flags); + buffer->callback = lcs_release_buffer; rc = lcs_ready_buffer(&card->write, buffer); if (rc) return rc; init_timer(&timer); timer.function = lcs_lancmd_timeout; - timer.data = (unsigned long) &reply; + timer.data = (unsigned long) reply; timer.expires = jiffies + HZ*card->lancmd_timeout; add_timer(&timer); - wait_event(reply.wait_q, reply.received); - del_timer(&timer); - LCS_DBF_TEXT_(4, trace, "rc:%d",reply.rc); - return reply.rc ? -EIO : 0; + wait_event(reply->wait_q, reply->received); + del_timer_sync(&timer); + LCS_DBF_TEXT_(4, trace, "rc:%d",reply->rc); + rc = reply->rc; + lcs_put_reply(reply); + return rc ? -EIO : 0; } /** @@ -942,9 +1113,10 @@ { struct list_head *l, *n; struct lcs_ipm_list *ipm; + unsigned long flags; LCS_DBF_TEXT(4,trace, "fixipm"); - spin_lock(&card->ipm_lock); + spin_lock_irqsave(&card->ipm_lock, flags); list_for_each_safe(l, n, &card->ipm_list) { ipm = list_entry(l, struct lcs_ipm_list, list); switch (ipm->ipm_state) { @@ -964,9 +1136,9 @@ break; } } + spin_unlock_irqrestore(&card->ipm_lock, flags); if (card->state == DEV_STATE_UP) netif_wake_queue(card->dev); - spin_unlock(&card->ipm_lock); } /** @@ -985,51 +1157,67 @@ /** * function called by net device to handle multicast address relevant things */ -static int -lcs_register_mc_addresses(void *data) +static inline void +lcs_remove_mc_addresses(struct lcs_card *card, struct in_device *in4_dev) { - struct lcs_card *card; - char buf[MAX_ADDR_LEN]; - struct list_head *l; struct ip_mc_list *im4; - struct in_device *in4_dev; - struct lcs_ipm_list *ipm, *tmp; - - daemonize("regipm"); - LCS_DBF_TEXT(4, trace, "regmulti"); + struct list_head *l; + struct lcs_ipm_list *ipm; + unsigned long flags; + char buf[MAX_ADDR_LEN]; - card = (struct lcs_card *) data; - in4_dev = in_dev_get(card->dev); - if (in4_dev == NULL) - return 0; - read_lock(&in4_dev->mc_list_lock); - spin_lock(&card->ipm_lock); - /* Check for multicast addresses to be removed. */ + LCS_DBF_TEXT(4, trace, "remmclst"); + spin_lock_irqsave(&card->ipm_lock, flags); list_for_each(l, &card->ipm_list) { ipm = list_entry(l, struct lcs_ipm_list, list); for (im4 = in4_dev->mc_list; im4 != NULL; im4 = im4->next) { lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev); - if (memcmp(buf, &ipm->ipm.mac_addr, - LCS_MAC_LENGTH) == 0 && - ipm->ipm.ip_addr == im4->multiaddr) + if ( (ipm->ipm.ip_addr == im4->multiaddr) && + (memcmp(buf, &ipm->ipm.mac_addr, + LCS_MAC_LENGTH) == 0) ) break; } if (im4 == NULL) ipm->ipm_state = LCS_IPM_STATE_DEL_REQUIRED; } - /* Check for multicast addresses to be added. */ + spin_unlock_irqrestore(&card->ipm_lock, flags); +} + +static inline struct lcs_ipm_list * +lcs_check_addr_entry(struct lcs_card *card, struct ip_mc_list *im4, char *buf) +{ + struct lcs_ipm_list *tmp, *ipm = NULL; + struct list_head *l; + unsigned long flags; + + LCS_DBF_TEXT(4, trace, "chkmcent"); + spin_lock_irqsave(&card->ipm_lock, flags); + list_for_each(l, &card->ipm_list) { + tmp = list_entry(l, struct lcs_ipm_list, list); + if ( (tmp->ipm.ip_addr == im4->multiaddr) && + (memcmp(buf, &tmp->ipm.mac_addr, + LCS_MAC_LENGTH) == 0) ) { + ipm = tmp; + break; + } + } + spin_unlock_irqrestore(&card->ipm_lock, flags); + return ipm; +} + +static inline void +lcs_set_mc_addresses(struct lcs_card *card, struct in_device *in4_dev) +{ + + struct ip_mc_list *im4; + struct lcs_ipm_list *ipm; + char buf[MAX_ADDR_LEN]; + unsigned long flags; + + LCS_DBF_TEXT(4, trace, "setmclst"); for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { lcs_get_mac_for_ipm(im4->multiaddr, buf, card->dev); - ipm = NULL; - list_for_each(l, &card->ipm_list) { - tmp = list_entry(l, struct lcs_ipm_list, list); - if (memcmp(buf, &tmp->ipm.mac_addr, - LCS_MAC_LENGTH) == 0 && - tmp->ipm.ip_addr == im4->multiaddr) { - ipm = tmp; - break; - } - } + ipm = lcs_check_addr_entry(card, im4, buf); if (ipm != NULL) continue; /* Address already in list. */ ipm = (struct lcs_ipm_list *) @@ -1043,12 +1231,37 @@ memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH); ipm->ipm.ip_addr = im4->multiaddr; ipm->ipm_state = LCS_IPM_STATE_SET_REQUIRED; + spin_lock_irqsave(&card->ipm_lock, flags); list_add(&ipm->list, &card->ipm_list); + spin_unlock_irqrestore(&card->ipm_lock, flags); } - spin_unlock(&card->ipm_lock); +} + +static int +lcs_register_mc_addresses(void *data) +{ + struct lcs_card *card; + struct in_device *in4_dev; + + card = (struct lcs_card *) data; + daemonize("regipm"); + + if (!lcs_do_run_thread(card, LCS_SET_MC_THREAD)) + return 0; + LCS_DBF_TEXT(4, trace, "regmulti"); + + in4_dev = in_dev_get(card->dev); + if (in4_dev == NULL) + goto out; + read_lock(&in4_dev->mc_list_lock); + lcs_remove_mc_addresses(card,in4_dev); + lcs_set_mc_addresses(card, in4_dev); read_unlock(&in4_dev->mc_list_lock); in_dev_put(in4_dev); + lcs_fix_multicast_list(card); +out: + lcs_clear_thread_running_bit(card, LCS_SET_MC_THREAD); return 0; } /** @@ -1062,8 +1275,10 @@ LCS_DBF_TEXT(4, trace, "setmulti"); card = (struct lcs_card *) dev->priv; - set_bit(3, &card->thread_mask); - schedule_work(&card->kernel_thread_starter); + + if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) { + schedule_work(&card->kernel_thread_starter); + } } #endif /* CONFIG_IP_MULTICAST */ @@ -1427,6 +1642,7 @@ return -EIO; } + /** * LCS Stop card */ @@ -1440,6 +1656,7 @@ if (card->read.state != CH_STATE_STOPPED && card->write.state != CH_STATE_STOPPED && card->state == DEV_STATE_UP) { + lcs_clear_multicast_list(card); rc = lcs_send_stoplan(card,LCS_INITIATOR_TCPIP); rc = lcs_send_shutdown(card); } @@ -1459,6 +1676,9 @@ card = (struct lcs_card *) data; daemonize("lgwstpln"); + + if (!lcs_do_run_thread(card, LCS_STARTLAN_THREAD)) + return 0; LCS_DBF_TEXT(4, trace, "lgwstpln"); if (card->dev) netif_stop_queue(card->dev); @@ -1471,6 +1691,7 @@ } else PRINT_ERR("LCS Startlan for device %s failed!\n", card->dev->name); + lcs_clear_thread_running_bit(card, LCS_STARTLAN_THREAD); return 0; } @@ -1485,8 +1706,11 @@ struct lcs_card *card; card = (struct lcs_card *) data; - daemonize("lgwstpln"); - LCS_DBF_TEXT(4, trace, "lgwstpln"); + daemonize("lgwstaln"); + + if (!lcs_do_run_thread(card, LCS_STARTUP_THREAD)) + return 0; + LCS_DBF_TEXT(4, trace, "lgwstaln"); if (card->dev) netif_stop_queue(card->dev); rc = lcs_send_startup(card, LCS_INITIATOR_LGW); @@ -1511,6 +1735,7 @@ else PRINT_ERR("LCS Startup for device %s failed!\n", card->dev->name); + lcs_clear_thread_running_bit(card, LCS_STARTUP_THREAD); return 0; } @@ -1526,6 +1751,9 @@ card = (struct lcs_card *) data; daemonize("lgwstop"); + + if (!lcs_do_run_thread(card, LCS_STOPLAN_THREAD)) + return 0; LCS_DBF_TEXT(4, trace, "lgwstop"); if (card->dev) netif_stop_queue(card->dev); @@ -1539,6 +1767,7 @@ rc = lcs_resetcard(card); if (rc != 0) rc = lcs_stopcard(card); + lcs_clear_thread_running_bit(card, LCS_STOPLAN_THREAD); return rc; } @@ -1549,14 +1778,14 @@ lcs_start_kernel_thread(struct lcs_card *card) { LCS_DBF_TEXT(5, trace, "krnthrd"); - if (test_and_clear_bit(0, &card->thread_mask)) + if (lcs_do_start_thread(card, LCS_STARTUP_THREAD)) kernel_thread(lcs_lgw_startup_thread, (void *) card, SIGCHLD); - if (test_and_clear_bit(1, &card->thread_mask)) + if (lcs_do_start_thread(card, LCS_STARTLAN_THREAD)) kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD); - if (test_and_clear_bit(2, &card->thread_mask)) + if (lcs_do_start_thread(card, LCS_STOPLAN_THREAD)) kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD); #ifdef CONFIG_IP_MULTICAST - if (test_and_clear_bit(3, &card->thread_mask)) + if (lcs_do_start_thread(card, LCS_SET_MC_THREAD)) kernel_thread(lcs_register_mc_addresses, (void *) card, SIGCHLD); #endif } @@ -1571,16 +1800,19 @@ if (cmd->initiator == LCS_INITIATOR_LGW) { switch(cmd->cmd_code) { case LCS_CMD_STARTUP: - set_bit(0, &card->thread_mask); - schedule_work(&card->kernel_thread_starter); + if (!lcs_set_thread_start_bit(card, + LCS_STARTUP_THREAD)) + schedule_work(&card->kernel_thread_starter); break; case LCS_CMD_STARTLAN: - set_bit(1, &card->thread_mask); - schedule_work(&card->kernel_thread_starter); + if (!lcs_set_thread_start_bit(card, + LCS_STARTLAN_THREAD)) + schedule_work(&card->kernel_thread_starter); break; case LCS_CMD_STOPLAN: - set_bit(2, &card->thread_mask); - schedule_work(&card->kernel_thread_starter); + if (!lcs_set_thread_start_bit(card, + LCS_STOPLAN_THREAD)) + schedule_work(&card->kernel_thread_starter); break; default: PRINT_INFO("UNRECOGNIZED LGW COMMAND\n"); @@ -1953,7 +2185,9 @@ card->dev->set_multicast_list = lcs_set_multicast_list; #endif netif_stop_queue(card->dev); + lcs_set_allowed_threads(card,0xffffffff); if (recover_state == DEV_STATE_RECOVER) { + lcs_set_multicast_list(card->dev); card->dev->flags |= IFF_UP; netif_wake_queue(card->dev); card->state = DEV_STATE_UP; @@ -1982,7 +2216,9 @@ card = (struct lcs_card *)ccwgdev->dev.driver_data; if (!card) return -ENODEV; - + lcs_set_allowed_threads(card, 0); + if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD)) + return -ERESTARTSYS; LCS_DBF_HEX(3, setup, &card, sizeof(void*)); recover_state = card->state; diff -Nru a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h --- a/drivers/s390/net/lcs.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/s390/net/lcs.h 2004-09-06 16:37:54 -07:00 @@ -6,7 +6,7 @@ #include #include -#define VERSION_LCS_H "$Revision: 1.17 $" +#define VERSION_LCS_H "$Revision: 1.18 $" #define LCS_DBF_TEXT(level, name, text) \ do { \ @@ -152,6 +152,12 @@ DEV_STATE_RECOVER, }; +enum lcs_threads { + LCS_SET_MC_THREAD = 1, + LCS_STARTLAN_THREAD = 2, + LCS_STOPLAN_THREAD = 4, + LCS_STARTUP_THREAD = 8, +}; /** * LCS struct declarations */ @@ -247,9 +253,11 @@ struct lcs_reply { struct list_head list; __u16 sequence_no; + atomic_t refcnt; /* Callback for completion notification. */ void (*callback)(struct lcs_card *, struct lcs_cmd *); wait_queue_head_t wait_q; + struct lcs_card *card; int received; int rc; }; @@ -268,6 +276,7 @@ int buf_idx; }; + /** * definition of the lcs card */ @@ -287,7 +296,11 @@ int lancmd_timeout; struct work_struct kernel_thread_starter; - unsigned long thread_mask; + spinlock_t mask_lock; + unsigned long thread_start_mask; + unsigned long thread_running_mask; + unsigned long thread_allowed_mask; + wait_queue_head_t wait_q; #ifdef CONFIG_IP_MULTICAST struct list_head ipm_list; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/s390/net/qeth_main.c 2004-09-06 16:37:52 -07:00 @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.130 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.132 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.130 $ $Date: 2004/08/05 11:21:50 $ + * $Revision: 1.132 $ $Date: 2004/08/19 12:39:43 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,7 +79,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -#define VERSION_QETH_C "$Revision: 1.130 $" +#define VERSION_QETH_C "$Revision: 1.132 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -4547,7 +4547,8 @@ if (!card) return -ENODEV; - if (card->state != CARD_STATE_UP) + if ((card->state != CARD_STATE_UP) && + (card->state != CARD_STATE_SOFTSETUP)) return -ENODEV; switch (cmd){ diff -Nru a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c --- a/drivers/s390/scsi/zfcp_aux.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/s390/scsi/zfcp_aux.c 2004-09-06 16:37:55 -07:00 @@ -29,7 +29,7 @@ */ /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_AUX_REVISION "$Revision: 1.115 $" +#define ZFCP_AUX_REVISION "$Revision: 1.129 $" #include "zfcp_ext.h" @@ -47,11 +47,11 @@ /* miscellaneous */ static inline int zfcp_sg_list_alloc(struct zfcp_sg_list *, size_t); -static inline int zfcp_sg_list_free(struct zfcp_sg_list *); -static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, void *, - size_t); -static inline int zfcp_sg_list_copy_to_user(void *, struct zfcp_sg_list *, - size_t); +static inline void zfcp_sg_list_free(struct zfcp_sg_list *); +static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, + void __user *, size_t); +static inline int zfcp_sg_list_copy_to_user(void __user *, + struct zfcp_sg_list *, size_t); static int zfcp_cfdc_dev_ioctl(struct inode *, struct file *, unsigned int, unsigned long); @@ -95,7 +95,7 @@ module_param(loglevel, uint, 0); MODULE_PARM_DESC(loglevel, "log levels, 8 nibbles: " - "(unassigned) ERP QDIO DIO Config FSF SCSI Other, " + "FC ERP QDIO CIO Config FSF SCSI Other, " "levels: 0=none 1=normal 2=devel 3=trace"); #ifdef ZFCP_PRINT_FLAGS @@ -257,24 +257,20 @@ static void __init zfcp_init_device_configure(void) { - int found = 0; struct zfcp_adapter *adapter; struct zfcp_port *port; struct zfcp_unit *unit; down(&zfcp_data.config_sema); read_lock_irq(&zfcp_data.config_lock); - list_for_each_entry(adapter, &zfcp_data.adapter_list_head, list) - if (strcmp(zfcp_data.init_busid, - zfcp_get_busid_by_adapter(adapter)) == 0) { - zfcp_adapter_get(adapter); - found = 1; - break; - } + adapter = zfcp_get_adapter_by_busid(zfcp_data.init_busid); + if (adapter) + zfcp_adapter_get(adapter); read_unlock_irq(&zfcp_data.config_lock); - if (!found) + + if (adapter == NULL) goto out_adapter; - port = zfcp_port_enqueue(adapter, zfcp_data.init_wwpn, 0); + port = zfcp_port_enqueue(adapter, zfcp_data.init_wwpn, 0, 0); if (!port) goto out_port; unit = zfcp_unit_enqueue(port, zfcp_data.init_fcp_lun); @@ -377,12 +373,13 @@ * -ENOMEM - Insufficient memory * -EFAULT - User space memory I/O operation fault * -EPERM - Cannot create or queue FSF request or create SBALs + * -ERESTARTSYS- Received signal (is mapped to EAGAIN by VFS) */ static int zfcp_cfdc_dev_ioctl(struct inode *inode, struct file *file, unsigned int command, unsigned long buffer) { - struct zfcp_cfdc_sense_data sense_data, *sense_data_user; + struct zfcp_cfdc_sense_data sense_data, __user *sense_data_user; struct zfcp_adapter *adapter = NULL; struct zfcp_fsf_req *fsf_req = NULL; struct zfcp_sg_list *sg_list = NULL; @@ -403,7 +400,7 @@ goto out; } - if ((sense_data_user = (struct zfcp_cfdc_sense_data*)buffer) == NULL) { + if ((sense_data_user = (void __user *) buffer) == NULL) { ZFCP_LOG_INFO("sense data record is required\n"); retval = -EINVAL; goto out; @@ -467,22 +464,17 @@ (sense_data.devno >> 16) & 0xFF, (sense_data.devno & 0xFFFF)); - retval = -ENXIO; read_lock_irq(&zfcp_data.config_lock); - list_for_each_entry(adapter, &zfcp_data.adapter_list_head, list) { - if (strncmp(bus_id, zfcp_get_busid_by_adapter(adapter), - BUS_ID_SIZE) == 0) { - zfcp_adapter_get(adapter); - retval = 0; - break; - } - } + adapter = zfcp_get_adapter_by_busid(bus_id); + if (adapter) + zfcp_adapter_get(adapter); read_unlock_irq(&zfcp_data.config_lock); kfree(bus_id); - if (retval != 0) { + if (adapter == NULL) { ZFCP_LOG_INFO("invalid adapter\n"); + retval = -ENXIO; goto out; } @@ -520,6 +512,12 @@ wait_event(fsf_req->completion_wq, fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); + if ((fsf_req->qtcb->prefix.prot_status != FSF_PROT_GOOD) && + (fsf_req->qtcb->prefix.prot_status != FSF_PROT_FSF_STATUS_PRESENTED)) { + retval = -ENXIO; + goto out; + } + sense_data.fsf_status = fsf_req->qtcb->header.fsf_status; memcpy(&sense_data.fsf_status_qual, &fsf_req->qtcb->header.fsf_status_qual, @@ -559,13 +557,16 @@ } -/* - * function: zfcp_sg_list_alloc - * - * purpose: Create a scatter-gather list of the specified size +/** + * zfcp_sg_list_alloc - create a scatter-gather list of the specified size + * @sg_list: structure describing a scatter gather list + * @size: size of scatter-gather list + * Return: 0 on success, else -ENOMEM * - * returns: 0 - Scatter gather list is created - * -ENOMEM - Insufficient memory (*list_ptr is then set to NULL) + * In sg_list->sg a pointer to the created scatter-gather list is returned, + * or NULL if we run out of memory. sg_list->count specifies the number of + * elements of the scatter-gather list. The maximum size of a single element + * in the scatter-gather list is PAGE_SIZE. */ static inline int zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) @@ -573,6 +574,9 @@ struct scatterlist *sg; unsigned int i; int retval = 0; + void *address; + + BUG_ON(sg_list == NULL); sg_list->count = size >> PAGE_SHIFT; if (size & ~PAGE_MASK) @@ -588,7 +592,8 @@ for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) { sg->length = min(size, PAGE_SIZE); sg->offset = 0; - sg->page = alloc_pages(GFP_KERNEL, 0); + address = (void *) get_zeroed_page(GFP_KERNEL); + zfcp_address_to_sg(address, sg); if (sg->page == NULL) { sg_list->count = i; zfcp_sg_list_free(sg_list); @@ -603,41 +608,61 @@ } -/* - * function: zfcp_sg_list_free - * - * purpose: Destroy a scatter-gather list and release memory +/** + * zfcp_sg_list_free - free memory of a scatter-gather list + * @sg_list: structure describing a scatter-gather list * - * returns: Always 0 + * Memory for each element in the scatter-gather list is freed. + * Finally sg_list->sg is freed itself and sg_list->count is reset. */ -static inline int +static inline void zfcp_sg_list_free(struct zfcp_sg_list *sg_list) { struct scatterlist *sg; unsigned int i; - int retval = 0; BUG_ON(sg_list == NULL); for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) __free_pages(sg->page, 0); + sg_list->count = 0; kfree(sg_list->sg); +} - return retval; +/** + * zfcp_sg_size - determine size of a scatter-gather list + * @sg: array of (struct scatterlist) + * @sg_count: elements in array + * Return: size of entire scatter-gather list + */ +size_t +zfcp_sg_size(struct scatterlist *sg, unsigned int sg_count) +{ + unsigned int i; + struct scatterlist *p; + size_t size; + + size = 0; + for (i = 0, p = sg; i < sg_count; i++, p++) { + BUG_ON(p == NULL); + size += p->length; + } + + return size; } -/* - * function: zfcp_sg_list_copy_from_user - * - * purpose: Copy data from user space memory to the scatter-gather list - * - * returns: 0 - The data has been copied from user - * -EFAULT - Memory I/O operation fault +/** + * zfcp_sg_list_copy_from_user -copy data from user space to scatter-gather list + * @sg_list: structure describing a scatter-gather list + * @user_buffer: pointer to buffer in user space + * @size: number of bytes to be copied + * Return: 0 on success, -EFAULT if copy_from_user fails. */ static inline int -zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, void *user_buffer, +zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, + void __user *user_buffer, size_t size) { struct scatterlist *sg; @@ -645,10 +670,14 @@ void *zfcp_buffer; int retval = 0; + BUG_ON(sg_list == NULL); + + if (zfcp_sg_size(sg_list->sg, sg_list->count) < size) + return -EFAULT; + for (sg = sg_list->sg; size > 0; sg++) { length = min((unsigned int)size, sg->length); - zfcp_buffer = (void*) - ((page_to_pfn(sg->page) << PAGE_SHIFT) + sg->offset); + zfcp_buffer = zfcp_sg_to_address(sg); if (copy_from_user(zfcp_buffer, user_buffer, length)) { retval = -EFAULT; goto out; @@ -662,16 +691,16 @@ } -/* - * function: zfcp_sg_list_copy_to_user - * - * purpose: Copy data from the scatter-gather list to user space memory - * - * returns: 0 - The data has been copied to user - * -EFAULT - Memory I/O operation fault +/** + * zfcp_sg_list_copy_to_user - copy data from scatter-gather list to user space + * @user_buffer: pointer to buffer in user space + * @sg_list: structure describing a scatter-gather list + * @size: number of bytes to be copied + * Return: 0 on success, -EFAULT if copy_to_user fails */ static inline int -zfcp_sg_list_copy_to_user(void *user_buffer, struct zfcp_sg_list *sg_list, +zfcp_sg_list_copy_to_user(void __user *user_buffer, + struct zfcp_sg_list *sg_list, size_t size) { struct scatterlist *sg; @@ -679,10 +708,14 @@ void *zfcp_buffer; int retval = 0; + BUG_ON(sg_list == NULL); + + if (zfcp_sg_size(sg_list->sg, sg_list->count) < size) + return -EFAULT; + for (sg = sg_list->sg; size > 0; sg++) { - length = min((unsigned int)size, sg->length); - zfcp_buffer = (void*) - ((page_to_pfn(sg->page) << PAGE_SHIFT) + sg->offset); + length = min((unsigned int) size, sg->length); + zfcp_buffer = zfcp_sg_to_address(sg); if (copy_to_user(user_buffer, zfcp_buffer, length)) { retval = -EFAULT; goto out; @@ -705,13 +738,12 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG /** - * zfcp_get_unit_by_lun - find unit in unit list of port by fcp lun + * zfcp_get_unit_by_lun - find unit in unit list of port by FCP LUN * @port: pointer to port to search for unit - * @fcp_lun: lun to search for - * Traverses list of all units of a port and returns pointer to a unit - * if lun of a unit matches. + * @fcp_lun: FCP LUN to search for + * Traverse list of all units of a port and return pointer to a unit + * with the given FCP LUN. */ - struct zfcp_unit * zfcp_get_unit_by_lun(struct zfcp_port *port, fcp_lun_t fcp_lun) { @@ -730,13 +762,12 @@ } /** - * zfcp_get_port_by_wwpn - find unit in unit list of port by fcp lun + * zfcp_get_port_by_wwpn - find port in port list of adapter by wwpn * @adapter: pointer to adapter to search for port * @wwpn: wwpn to search for - * Traverses list of all ports of an adapter and returns a pointer to a port - * if wwpn of a port matches. + * Traverse list of all ports of an adapter and return pointer to a port + * with the given wwpn. */ - struct zfcp_port * zfcp_get_port_by_wwpn(struct zfcp_adapter *adapter, wwn_t wwpn) { @@ -745,6 +776,30 @@ list_for_each_entry(port, &adapter->port_list_head, list) { if ((port->wwpn == wwpn) && + !(atomic_read(&port->status) & + (ZFCP_STATUS_PORT_NO_WWPN | ZFCP_STATUS_COMMON_REMOVE))) { + found = 1; + break; + } + } + return found ? port : NULL; +} + +/** + * zfcp_get_port_by_did - find port in port list of adapter by d_id + * @adapter: pointer to adapter to search for port + * @d_id: d_id to search for + * Traverse list of all ports of an adapter and return pointer to a port + * with the given d_id. + */ +struct zfcp_port * +zfcp_get_port_by_did(struct zfcp_adapter *adapter, u32 d_id) +{ + struct zfcp_port *port; + int found = 0; + + list_for_each_entry(port, &adapter->port_list_head, list) { + if ((port->d_id == d_id) && !atomic_test_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status)) { found = 1; @@ -754,14 +809,38 @@ return found ? port : NULL; } -/* - * Enqueues a logical unit at the end of the unit list associated with the - * specified port. Also sets up some unit internal structures. +/** + * zfcp_get_adapter_by_busid - find adpater in adapter list by bus_id + * @bus_id: bus_id to search for + * Traverse list of all adapters and return pointer to an adapter + * with the given bus_id. + */ +struct zfcp_adapter * +zfcp_get_adapter_by_busid(char *bus_id) +{ + struct zfcp_adapter *adapter; + int found = 0; + + list_for_each_entry(adapter, &zfcp_data.adapter_list_head, list) { + if ((strncmp(bus_id, zfcp_get_busid_by_adapter(adapter), + BUS_ID_SIZE) == 0) && + !atomic_test_mask(ZFCP_STATUS_COMMON_REMOVE, + &adapter->status)){ + found = 1; + break; + } + } + return found ? adapter : NULL; +} + +/** + * zfcp_unit_enqueue - enqueue unit to unit list of a port. + * @port: pointer to port where unit is added + * @fcp_lun: FCP LUN of unit to be enqueued + * Return: pointer to enqueued unit on success, NULL on error + * Locks: config_sema must be held to serialize changes to the unit list * - * returns: pointer to unit with a usecount of 1 if a new unit was - * successfully enqueued - * NULL otherwise - * locks: config_sema must be held to serialise changes to the unit list + * Sets up some unit internal structures and creates sysfs entry. */ struct zfcp_unit * zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) @@ -1022,6 +1101,12 @@ debug_unregister(adapter->in_els_dbf); } +void +zfcp_dummy_release(struct device *dev) +{ + return; +} + /* * Enqueues an adapter at the end of the adapter list in the driver data. * All adapter internal structures are set up. @@ -1113,6 +1198,14 @@ if (zfcp_sysfs_adapter_create_files(&ccw_device->dev)) goto sysfs_failed; + adapter->generic_services.parent = &adapter->ccw_device->dev; + adapter->generic_services.release = zfcp_dummy_release; + snprintf(adapter->generic_services.bus_id, BUS_ID_SIZE, + "generic_services"); + + if (device_register(&adapter->generic_services)) + goto generic_services_failed; + /* put allocated adapter at list tail */ write_lock_irq(&zfcp_data.config_lock); atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); @@ -1123,6 +1216,8 @@ goto out; + generic_services_failed: + zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); sysfs_failed: dev_set_drvdata(&ccw_device->dev, NULL); failed_low_mem_buffers: @@ -1153,6 +1248,7 @@ int retval = 0; unsigned long flags; + device_unregister(&adapter->generic_services); zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); dev_set_drvdata(&adapter->ccw_device->dev, NULL); /* sanity check: no pending FSF requests */ @@ -1195,15 +1291,22 @@ return; } -/* - * Enqueues a remote port to the port list. All port internal structures - * are set up and the sysfs entry is also generated. +/** + * zfcp_port_enqueue - enqueue port to port list of adapter + * @adapter: adapter where remote port is added + * @wwpn: WWPN of the remote port to be enqueued + * @status: initial status for the port + * @d_id: destination id of the remote port to be enqueued + * Return: pointer to enqueued port on success, NULL on error + * Locks: config_sema must be held to serialize changes to the port list * - * returns: pointer to port or NULL - * locks: config_sema must be held to serialise changes to the port list + * All port internal structures are set up and the sysfs entry is generated. + * d_id is used to enqueue ports with a well known address like the Directory + * Service for nameserver lookup. */ struct zfcp_port * -zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status) +zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, + u32 d_id) { struct zfcp_port *port, *tmp_port; int check_wwpn; @@ -1243,12 +1346,39 @@ atomic_set_mask(status, &port->status); /* setup for sysfs registration */ - if (status & ZFCP_STATUS_PORT_NAMESERVER) - snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, "nameserver"); - else + if (status & ZFCP_STATUS_PORT_WKA) { + switch (d_id) { + case ZFCP_DID_DIRECTORY_SERVICE: + snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, + "directory"); + break; + case ZFCP_DID_MANAGEMENT_SERVICE: + snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, + "management"); + break; + case ZFCP_DID_KEY_DISTRIBUTION_SERVICE: + snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, + "key_distribution"); + break; + case ZFCP_DID_ALIAS_SERVICE: + snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, + "alias"); + break; + case ZFCP_DID_TIME_SERVICE: + snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, + "time"); + break; + default: + kfree(port); + return NULL; + } + port->d_id = d_id; + port->sysfs_device.parent = &adapter->generic_services; + } else { snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", wwpn); port->sysfs_device.parent = &adapter->ccw_device->dev; + } port->sysfs_device.release = zfcp_sysfs_port_release; dev_set_drvdata(&port->sysfs_device, port); @@ -1287,9 +1417,12 @@ list_add_tail(&port->list, &adapter->port_list_head); atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status); + if (d_id == ZFCP_DID_DIRECTORY_SERVICE) + if (!adapter->nameserver_port) + adapter->nameserver_port = port; + adapter->ports++; write_unlock_irq(&zfcp_data.config_lock); - adapter->ports++; zfcp_adapter_get(adapter); return port; @@ -1301,8 +1434,8 @@ zfcp_port_wait(port); write_lock_irq(&zfcp_data.config_lock); list_del(&port->list); - write_unlock_irq(&zfcp_data.config_lock); port->adapter->ports--; + write_unlock_irq(&zfcp_data.config_lock); zfcp_adapter_put(port->adapter); zfcp_sysfs_port_remove_files(&port->sysfs_device, atomic_read(&port->status)); @@ -1315,17 +1448,14 @@ { struct zfcp_port *port; - /* generate port structure */ - port = zfcp_port_enqueue(adapter, 0, ZFCP_STATUS_PORT_NAMESERVER); + port = zfcp_port_enqueue(adapter, 0, ZFCP_STATUS_PORT_WKA, + ZFCP_DID_DIRECTORY_SERVICE); if (!port) { ZFCP_LOG_INFO("error: enqueue of nameserver port for " "adapter %s failed\n", zfcp_get_busid_by_adapter(adapter)); return -ENXIO; } - /* set special D_ID */ - port->d_id = ZFCP_DID_NAMESERVER; - adapter->nameserver_port = port; zfcp_port_put(port); return 0; @@ -1389,7 +1519,7 @@ read_lock_irqsave(&zfcp_data.config_lock, flags); list_for_each_entry(port, &adapter->port_list_head, list) { if (atomic_test_mask - (ZFCP_STATUS_PORT_NAMESERVER, &port->status)) + (ZFCP_STATUS_PORT_WKA, &port->status)) continue; /* Do we know this port? If not skip it. */ if (!atomic_test_mask @@ -1646,15 +1776,7 @@ ct_iu_req = zfcp_sg_to_address(ct->req); ct_iu_resp = zfcp_sg_to_address(ct->resp); - if (ct_iu_resp->header.revision != ZFCP_CT_REVISION) - goto failed; - if (ct_iu_resp->header.gs_type != ZFCP_CT_DIRECTORY_SERVICE) - goto failed; - if (ct_iu_resp->header.gs_subtype != ZFCP_CT_NAME_SERVER) - goto failed; - if (ct_iu_resp->header.options != ZFCP_CT_SYNCHRONOUS) - goto failed; - if (ct_iu_resp->header.cmd_rsp_code != ZFCP_CT_ACCEPT) { + if ((ct->status != 0) || zfcp_check_ct_response(&ct_iu_resp->header)) { /* FIXME: do we need some specific erp entry points */ atomic_set_mask(ZFCP_STATUS_PORT_INVALID_WWPN, &port->status); goto failed; @@ -1665,7 +1787,7 @@ "lookup does not match expected wwpn 0x%016Lx " "for adapter %s\n", ct_iu_req->wwpn, port->wwpn, zfcp_get_busid_by_port(port)); - goto failed; + goto mismatch; } /* looks like a valid d_id */ @@ -1675,19 +1797,185 @@ zfcp_get_busid_by_port(port), port->wwpn, port->d_id); goto out; -failed: - ZFCP_LOG_NORMAL("warning: failed gid_pn nameserver request for wwpn " - "0x%016Lx for adapter %s\n", - port->wwpn, zfcp_get_busid_by_port(port)); + mismatch: ZFCP_LOG_DEBUG("CT IUs do not match:\n"); ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, (char *) ct_iu_req, sizeof(struct ct_iu_gid_pn_req)); ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, (char *) ct_iu_resp, sizeof(struct ct_iu_gid_pn_resp)); + failed: + ZFCP_LOG_NORMAL("warning: failed gid_pn nameserver request for wwpn " + "0x%016Lx for adapter %s\n", + port->wwpn, zfcp_get_busid_by_port(port)); out: zfcp_gid_pn_buffers_free(gid_pn); return; +} + +/* reject CT_IU reason codes acc. to FC-GS-4 */ +static const struct zfcp_rc_entry zfcp_ct_rc[] = { + {0x01, "invalid command code"}, + {0x02, "invalid version level"}, + {0x03, "logical error"}, + {0x04, "invalid CT_IU size"}, + {0x05, "logical busy"}, + {0x07, "protocol error"}, + {0x09, "unable to perform command request"}, + {0x0b, "command not supported"}, + {0x0d, "server not available"}, + {0x0e, "session could not be established"}, + {0xff, "vendor specific error"}, + {0, NULL}, +}; + +/* LS_RJT reason codes acc. to FC-FS */ +static const struct zfcp_rc_entry zfcp_ls_rjt_rc[] = { + {0x01, "invalid LS_Command code"}, + {0x03, "logical error"}, + {0x05, "logical busy"}, + {0x07, "protocol error"}, + {0x09, "unable to perform command request"}, + {0x0b, "command not supported"}, + {0x0e, "command already in progress"}, + {0xff, "vendor specific error"}, + {0, NULL}, +}; + +/* reject reason codes according to FC-PH/FC-FS */ +static const struct zfcp_rc_entry zfcp_p_rjt_rc[] = { + {0x01, "invalid D_ID"}, + {0x02, "invalid S_ID"}, + {0x03, "Nx_Port not available, temporary"}, + {0x04, "Nx_Port not available, permament"}, + {0x05, "class not supported"}, + {0x06, "delimiter usage error"}, + {0x07, "TYPE not supported"}, + {0x08, "invalid Link_Control"}, + {0x09, "invalid R_CTL field"}, + {0x0a, "invalid F_CTL field"}, + {0x0b, "invalid OX_ID"}, + {0x0c, "invalid RX_ID"}, + {0x0d, "invalid SEQ_ID"}, + {0x0e, "invalid DF_CTL"}, + {0x0f, "invalid SEQ_CNT"}, + {0x10, "invalid parameter field"}, + {0x11, "exchange error"}, + {0x12, "protocol error"}, + {0x13, "incorrect length"}, + {0x14, "unsupported ACK"}, + {0x15, "class of service not supported by entity at FFFFFE"}, + {0x16, "login required"}, + {0x17, "excessive sequences attempted"}, + {0x18, "unable to establish exchange"}, + {0x1a, "fabric path not available"}, + {0x1b, "invalid VC_ID (class 4)"}, + {0x1c, "invalid CS_CTL field"}, + {0x1d, "insufficient resources for VC (class 4)"}, + {0x1f, "invalid class of service"}, + {0x20, "preemption request rejected"}, + {0x21, "preemption not enabled"}, + {0x22, "multicast error"}, + {0x23, "multicast error terminate"}, + {0x24, "process login required"}, + {0xff, "vendor specific reject"}, + {0, NULL}, +}; + +/** + * zfcp_rc_description - return description for given reaon code + * @code: reason code + * @rc_table: table of reason codes and descriptions + */ +static inline const char * +zfcp_rc_description(u8 code, const struct zfcp_rc_entry *rc_table) +{ + const char *descr = "unknown reason code"; + + do { + if (code == rc_table->code) { + descr = rc_table->description; + break; + } + rc_table++; + } while (rc_table->code && rc_table->description); + + return descr; +} + +/** + * zfcp_check_ct_response - evaluate reason code for CT_IU + * @rjt: response payload to an CT_IU request + * Return: 0 for accept CT_IU, 1 for reject CT_IU or invlid response code + */ +int +zfcp_check_ct_response(struct ct_hdr *rjt) +{ + if (rjt->cmd_rsp_code == ZFCP_CT_ACCEPT) + return 0; + + if (rjt->cmd_rsp_code != ZFCP_CT_REJECT) { + ZFCP_LOG_NORMAL("error: invalid Generic Service command/" + "response code (0x%04hx)\n", + rjt->cmd_rsp_code); + return 1; + } + + ZFCP_LOG_INFO("Generic Service command rejected\n"); + ZFCP_LOG_INFO("%s (0x%02x, 0x%02x, 0x%02x)\n", + zfcp_rc_description(rjt->reason_code, zfcp_ct_rc), + (u32) rjt->reason_code, (u32) rjt->reason_code_expl, + (u32) rjt->vendor_unique); + + return 1; +} + +/** + * zfcp_print_els_rjt - print reject parameter and description for ELS reject + * @rjt_par: reject parameter acc. to FC-PH/FC-FS + * @rc_table: table of reason codes and descriptions + */ +static inline void +zfcp_print_els_rjt(struct zfcp_ls_rjt_par *rjt_par, + const struct zfcp_rc_entry *rc_table) +{ + ZFCP_LOG_INFO("%s (%02x %02x %02x %02x)\n", + zfcp_rc_description(rjt_par->reason_code, rc_table), + (u32) rjt_par->action, (u32) rjt_par->reason_code, + (u32) rjt_par->reason_expl, (u32) rjt_par->vendor_unique); +} + +/** + * zfcp_fsf_handle_els_rjt - evaluate status qualifier/reason code on ELS reject + * @sq: status qualifier word + * @rjt_par: reject parameter as described in FC-PH and FC-FS + * Return: -EROMTEIO for LS_RJT, -EREMCHG for invalid D_ID, -EIO else + */ +int +zfcp_handle_els_rjt(u32 sq, struct zfcp_ls_rjt_par *rjt_par) +{ + int ret = -EIO; + + if (sq == FSF_IOSTAT_NPORT_RJT) { + ZFCP_LOG_INFO("ELS rejected (P_RJT)\n"); + zfcp_print_els_rjt(rjt_par, zfcp_p_rjt_rc); + /* invalid d_id */ + if (rjt_par->reason_code == 0x01) + ret = -EREMCHG; + } else if (sq == FSF_IOSTAT_FABRIC_RJT) { + ZFCP_LOG_INFO("ELS rejected (F_RJT)\n"); + zfcp_print_els_rjt(rjt_par, zfcp_p_rjt_rc); + /* invalid d_id */ + if (rjt_par->reason_code == 0x01) + ret = -EREMCHG; + } else if (sq == FSF_IOSTAT_LS_RJT) { + ZFCP_LOG_INFO("ELS rejected (LS_RJT)\n"); + zfcp_print_els_rjt(rjt_par, zfcp_ls_rjt_rc); + ret = -EREMOTEIO; + } else + ZFCP_LOG_INFO("unexpected SQ: 0x%02x\n", sq); + + return ret; } #undef ZFCP_LOG_AREA diff -Nru a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h --- a/drivers/s390/scsi/zfcp_def.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/s390/scsi/zfcp_def.h 2004-09-06 16:37:53 -07:00 @@ -33,7 +33,7 @@ #define ZFCP_DEF_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_DEF_REVISION "$Revision: 1.81 $" +#define ZFCP_DEF_REVISION "$Revision: 1.91 $" /*************************** INCLUDES *****************************************/ @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -72,12 +73,22 @@ /* zfcp version number, it consists of major, minor, and patch-level number */ #define ZFCP_VERSION "4.1.3" +/** + * zfcp_sg_to_address - determine kernel address from struct scatterlist + * @list: struct scatterlist + * Return: kernel address + */ static inline void * zfcp_sg_to_address(struct scatterlist *list) { return (void *) (page_address(list->page) + list->offset); } +/** + * zfcp_address_to_sg - set up struct scatterlist from kernel address + * @address: kernel address + * @list: struct scatterlist + */ static inline void zfcp_address_to_sg(void *address, struct scatterlist *list) { @@ -146,6 +157,9 @@ #define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 6 #define ZFCP_EXCHANGE_CONFIG_DATA_SLEEP 50 +/* timeout value for "default timer" for fsf requests */ +#define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); + /*************** FIBRE CHANNEL PROTOCOL SPECIFIC DEFINES ********************/ typedef unsigned long long wwn_t; @@ -158,7 +172,6 @@ /* timeout for name-server lookup (in seconds) */ #define ZFCP_NS_GID_PN_TIMEOUT 10 -#define ZFCP_NS_GA_NXT_TIMEOUT 120 /* largest SCSI command we can process */ /* FCP-2 (FCP_CMND IU) allows up to (255-3+16) */ @@ -276,33 +289,17 @@ #define R_A_TOV 10 /* seconds */ #define ZFCP_ELS_TIMEOUT (2 * R_A_TOV) -#define ZFCP_LS_RJT 0x01 -#define ZFCP_LS_ACC 0x02 #define ZFCP_LS_RTV 0x0E #define ZFCP_LS_RLS 0x0F #define ZFCP_LS_PDISC 0x50 #define ZFCP_LS_ADISC 0x52 -#define ZFCP_LS_RSCN 0x61 -#define ZFCP_LS_RNID 0x78 -#define ZFCP_LS_RLIR 0x7A #define ZFCP_LS_RTV_E_D_TOV_FLAG 0x04000000 -/* LS_ACC Reason Codes */ -#define ZFCP_LS_RJT_INVALID_COMMAND_CODE 0x01 -#define ZFCP_LS_RJT_LOGICAL_ERROR 0x03 -#define ZFCP_LS_RJT_LOGICAL_BUSY 0x05 -#define ZFCP_LS_RJT_PROTOCOL_ERROR 0x07 -#define ZFCP_LS_RJT_UNABLE_TO_PERFORM 0x09 -#define ZFCP_LS_RJT_COMMAND_NOT_SUPPORTED 0x0B -#define ZFCP_LS_RJT_VENDOR_UNIQUE_ERROR 0xFF - -struct zfcp_ls_rjt { - u8 code; - u8 field[3]; - u8 reserved; - u8 reason_code; - u8 reason_expl; - u8 vendor_unique; +struct zfcp_ls_rjt_par { + u8 action; + u8 reason_code; + u8 reason_expl; + u8 vendor_unique; } __attribute__ ((packed)); struct zfcp_ls_rtv { @@ -383,45 +380,10 @@ fc_id_t nport_id; } __attribute__ ((packed)); -struct zfcp_ls_rnid { - u8 code; - u8 field[3]; - u8 node_id_format; - u8 reserved[3]; -} __attribute__((packed)); - -/* common identification data */ -struct zfcp_ls_rnid_common_id { - u64 n_port_name; - u64 node_name; -} __attribute__((packed)); - -/* general topology specific identification data */ -struct zfcp_ls_rnid_general_topology_id { - u8 vendor_unique[16]; - u32 associated_type; - u32 physical_port_number; - u32 nr_attached_nodes; - u8 node_management; - u8 ip_version; - u16 port_number; - u8 ip_address[16]; - u8 reserved[2]; - u16 vendor_specific; -} __attribute__((packed)); - -struct zfcp_ls_rnid_acc { - u8 code; - u8 field[3]; - u8 node_id_format; - u8 common_id_length; - u8 reserved; - u8 specific_id_length; - struct zfcp_ls_rnid_common_id - common_id; - struct zfcp_ls_rnid_general_topology_id - specific_id; -} __attribute__((packed)); +struct zfcp_rc_entry { + u8 code; + const char *description; +}; /* * FC-GS-2 stuff @@ -431,9 +393,9 @@ #define ZFCP_CT_NAME_SERVER 0x02 #define ZFCP_CT_SYNCHRONOUS 0x00 #define ZFCP_CT_GID_PN 0x0121 -#define ZFCP_CT_GA_NXT 0x0100 #define ZFCP_CT_MAX_SIZE 0x1020 #define ZFCP_CT_ACCEPT 0x8002 +#define ZFCP_CT_REJECT 0x8001 /* * FC-GS-4 stuff @@ -530,23 +492,29 @@ __LINE__ , ##args); #define ZFCP_LOG(level, fmt, args...) \ +do { \ if (ZFCP_LOG_CHECK(level)) \ - _ZFCP_LOG(fmt , ##args) + _ZFCP_LOG(fmt, ##args); \ +} while (0) #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_NORMAL # define ZFCP_LOG_NORMAL(fmt, args...) #else # define ZFCP_LOG_NORMAL(fmt, args...) \ +do { \ if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_NORMAL)) \ - printk(KERN_ERR ZFCP_NAME": " fmt , ##args); + printk(KERN_ERR ZFCP_NAME": " fmt, ##args); \ +} while (0) #endif #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_INFO # define ZFCP_LOG_INFO(fmt, args...) #else # define ZFCP_LOG_INFO(fmt, args...) \ +do { \ if (ZFCP_LOG_CHECK(ZFCP_LOG_LEVEL_INFO)) \ - printk(KERN_ERR ZFCP_NAME": " fmt , ##args); + printk(KERN_ERR ZFCP_NAME": " fmt, ##args); \ +} while (0) #endif #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_DEBUG @@ -568,8 +536,10 @@ #else extern u32 flags_dump; # define ZFCP_LOG_FLAGS(level, fmt, args...) \ +do { \ if (level <= flags_dump) \ - _ZFCP_LOG(fmt , ##args) + _ZFCP_LOG(fmt, ##args); \ +} while (0) #endif /*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ @@ -606,7 +576,12 @@ ZFCP_STATUS_ADAPTER_REGISTERED) -#define ZFCP_DID_NAMESERVER 0xFFFFFC +/* FC-PH/FC-GS well-known address identifiers for generic services */ +#define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA +#define ZFCP_DID_TIME_SERVICE 0xFFFFFB +#define ZFCP_DID_DIRECTORY_SERVICE 0xFFFFFC +#define ZFCP_DID_ALIAS_SERVICE 0xFFFFF8 +#define ZFCP_DID_KEY_DISTRIBUTION_SERVICE 0xFFFFF7 /* remote port status */ #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 @@ -616,7 +591,8 @@ #define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 #define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 -#define ZFCP_STATUS_PORT_NAMESERVER \ +/* for ports with well known addresses */ +#define ZFCP_STATUS_PORT_WKA \ (ZFCP_STATUS_PORT_NO_WWPN | \ ZFCP_STATUS_PORT_NO_SCSI_ID) @@ -789,43 +765,29 @@ wwn_t wwpn; } __attribute__ ((packed)); -/* nameserver request CT_IU -- for requests where - * a port identifier is required */ -struct ct_iu_ga_nxt_req { - struct ct_hdr header; - fc_id_t d_id; -} __attribute__ ((packed)); - /* FS_ACC IU and data unit for GID_PN nameserver request */ struct ct_iu_gid_pn_resp { struct ct_hdr header; fc_id_t d_id; } __attribute__ ((packed)); -/* FS_ACC IU and data unit for GA_NXT nameserver request */ -struct ct_iu_ga_nxt_resp { - struct ct_hdr header; - u8 port_type; - u8 port_id[3]; - u64 port_wwn; - u8 port_symbolic_name_length; - u8 port_symbolic_name[255]; - u64 node_wwn; - u8 node_symbolic_name_length; - u8 node_symbolic_name[255]; - u64 initial_process_associator; - u8 node_ip[16]; - u32 cos; - u8 fc4_types[32]; - u8 port_ip[16]; - u64 fabric_wwn; - u8 reserved; - u8 hard_address[3]; -} __attribute__ ((packed)); - typedef void (*zfcp_send_ct_handler_t)(unsigned long); -/* used to pass parameters to zfcp_send_ct() */ +/** + * struct zfcp_send_ct - used to pass parameters to function zfcp_fsf_send_ct + * @port: port where the request is sent to + * @req: scatter-gather list for request + * @resp: scatter-gather list for response + * @req_count: number of elements in request scatter-gather list + * @resp_count: number of elements in response scatter-gather list + * @handler: handler function (called for response to the request) + * @handler_data: data passed to handler function + * @pool: pointer to memory pool for ct request structure + * @timeout: FSF timeout for this request + * @timer: timer (e.g. for request initiated by erp) + * @completion: completion for synchronization purposes + * @status: used to pass error status to calling function + */ struct zfcp_send_ct { struct zfcp_port *port; struct scatterlist *req; @@ -834,7 +796,7 @@ unsigned int resp_count; zfcp_send_ct_handler_t handler; unsigned long handler_data; - mempool_t *pool; /* mempool for ct not for fsf_req */ + mempool_t *pool; int timeout; struct timer_list *timer; struct completion *completion; @@ -851,10 +813,22 @@ struct zfcp_port *port; }; -typedef int (*zfcp_send_els_handler_t)(unsigned long); +typedef void (*zfcp_send_els_handler_t)(unsigned long); -/* used to pass parameters to zfcp_send_els() */ -/* ToDo merge send_ct() and send_els() and corresponding structs */ +/** + * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els + * @port: port where the request is sent to + * @req: scatter-gather list for request + * @resp: scatter-gather list for response + * @req_count: number of elements in request scatter-gather list + * @resp_count: number of elements in response scatter-gather list + * @handler: handler function (called for response to the request) + * @handler_data: data passed to handler function + * @timer: timer (e.g. for request initiated by erp) + * @completion: completion for synchronization purposes + * @ls_code: hex code of ELS command + * @status: used to pass error status to calling function + */ struct zfcp_send_els { struct zfcp_port *port; struct scatterlist *req; @@ -863,6 +837,7 @@ unsigned int resp_count; zfcp_send_els_handler_t handler; unsigned long handler_data; + struct timer_list *timer; struct completion *completion; int ls_code; int status; @@ -892,6 +867,7 @@ struct zfcp_send_ct *send_ct; struct zfcp_send_els *send_els; struct zfcp_status_read status_read; + struct fsf_qtcb_bottom_port *port_data; }; struct zfcp_qdio_queue { @@ -979,6 +955,7 @@ rwlock_t cmd_dbf_lock; struct zfcp_adapter_mempool pool; /* Adapter memory pools */ struct qdio_initialize qdio_init_data; /* for qdio_establish */ + struct device generic_services; /* directory for WKA ports */ }; /* @@ -1080,6 +1057,11 @@ fcp_lun_t init_fcp_lun; }; +/** + * struct zfcp_sg_list - struct describing a scatter-gather list + * @sg: pointer to array of (struct scatterlist) + * @count: number of elements in scatter-gather list + */ struct zfcp_sg_list { struct scatterlist *sg; unsigned int count; diff -Nru a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c --- a/drivers/s390/scsi/zfcp_erp.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/s390/scsi/zfcp_erp.c 2004-09-06 16:37:51 -07:00 @@ -31,12 +31,12 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_ERP /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_ERP_REVISION "$Revision: 1.61 $" +#define ZFCP_ERP_REVISION "$Revision: 1.65 $" #include "zfcp_ext.h" static int zfcp_els(struct zfcp_port *, u8); -static int zfcp_els_handler(unsigned long); +static void zfcp_els_handler(unsigned long); static int zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *, int); static int zfcp_erp_port_forced_reopen_internal(struct zfcp_port *, int); @@ -126,6 +126,25 @@ static void zfcp_erp_timeout_handler(unsigned long); static inline void zfcp_erp_timeout_init(struct zfcp_erp_action *); +/** + * zfcp_fsf_request_timeout_handler - called if a request timed out + * @data: pointer to adapter for handler function + * + * This function needs to be called if requests (ELS, Generic Service, + * or SCSI commands) exceed a certain time limit. The assumption is + * that after the time limit the adapter get stuck. So we trigger a reopen of + * the adapter. This should not be used for error recovery, SCSI abort + * commands and SCSI requests from SCSI mid-layer. + */ +void +zfcp_fsf_request_timeout_handler(unsigned long data) +{ + struct zfcp_adapter *adapter; + + adapter = (struct zfcp_adapter *) data; + + zfcp_erp_adapter_reopen(adapter, 0); +} /* * function: zfcp_fsf_scsi_er_timeout_handler @@ -324,6 +343,7 @@ send_els->completion = NULL; req = zfcp_sg_to_address(send_els->req); + memset(req, 0, PAGE_SIZE); *(u32*)req = 0; *(u8*)req = ls_code; @@ -412,185 +432,99 @@ } -/* - * function: zfcp_els_handler - * - * purpose: Handler for all kind of ELSs - * - * returns: 0 - Operation completed successfuly - * -ENXIO - ELS has been rejected - * -EPERM - Port forced reopen failed +/** + * zfcp_els_handler - handler for ELS commands + * @data: pointer to struct zfcp_send_els + * If ELS failed (LS_RJT or timed out) forced reopen of the port is triggered. */ -int +void zfcp_els_handler(unsigned long data) { struct zfcp_send_els *send_els = (struct zfcp_send_els*)data; struct zfcp_port *port = send_els->port; - struct zfcp_ls_rjt *rjt; struct zfcp_ls_rtv_acc *rtv; struct zfcp_ls_rls_acc *rls; struct zfcp_ls_pdisc_acc *pdisc; struct zfcp_ls_adisc_acc *adisc; void *req, *resp; - u8 req_code, resp_code; - int retval = 0; + u8 req_code; + /* request rejected or timed out */ if (send_els->status != 0) { ZFCP_LOG_NORMAL("ELS request timed out, force physical port " "reopen of port 0x%016Lx on adapter %s\n", port->wwpn, zfcp_get_busid_by_port(port)); debug_text_event(port->adapter->erp_dbf, 3, "forcreop"); - retval = zfcp_erp_port_forced_reopen(port, 0); - if (retval != 0) { + if (zfcp_erp_port_forced_reopen(port, 0)) ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx " "on adapter %s failed\n", port->wwpn, zfcp_get_busid_by_port(port)); - retval = -EPERM; - } - goto skip_fsfstatus; + goto out; } - req = (void*)((page_to_pfn(send_els->req->page) << PAGE_SHIFT) + send_els->req->offset); - resp = (void*)((page_to_pfn(send_els->resp->page) << PAGE_SHIFT) + send_els->resp->offset); + req = zfcp_sg_to_address(send_els->req); + resp = zfcp_sg_to_address(send_els->resp); req_code = *(u8*)req; - resp_code = *(u8*)resp; - - switch (resp_code) { - - case ZFCP_LS_RJT: - rjt = (struct zfcp_ls_rjt*)resp; - - switch (rjt->reason_code) { - - case ZFCP_LS_RJT_INVALID_COMMAND_CODE: - ZFCP_LOG_INFO("invalid LS command code " - "(wwpn=0x%016Lx, command=0x%02x)\n", - port->wwpn, req_code); - break; - - case ZFCP_LS_RJT_LOGICAL_ERROR: - ZFCP_LOG_INFO("logical error (wwpn=0x%016Lx, " - "reason_expl=0x%02x)\n", - port->wwpn, rjt->reason_expl); - break; - - case ZFCP_LS_RJT_LOGICAL_BUSY: - ZFCP_LOG_INFO("logical busy (wwpn=0x%016Lx, " - "reason_expl=0x%02x)\n", - port->wwpn, rjt->reason_expl); - break; - - case ZFCP_LS_RJT_PROTOCOL_ERROR: - ZFCP_LOG_INFO("protocol error (wwpn=0x%016Lx, " - "reason_expl=0x%02x)\n", - port->wwpn, rjt->reason_expl); - break; - case ZFCP_LS_RJT_UNABLE_TO_PERFORM: - ZFCP_LOG_INFO("unable to perform command requested " - "(wwpn=0x%016Lx, reason_expl=0x%02x)\n", - port->wwpn, rjt->reason_expl); - break; - - case ZFCP_LS_RJT_COMMAND_NOT_SUPPORTED: - ZFCP_LOG_INFO("command not supported (wwpn=0x%016Lx, " - "command=0x%02x)\n", - port->wwpn, req_code); - break; + switch (req_code) { - case ZFCP_LS_RJT_VENDOR_UNIQUE_ERROR: - ZFCP_LOG_INFO("vendor specific error (wwpn=0x%016Lx, " - "vendor_unique=0x%02x)\n", - port->wwpn, rjt->vendor_unique); - break; - - default: - ZFCP_LOG_NORMAL("ELS rejected by remote port 0x%016Lx " - "on adapter %s (reason_code=0x%02x)\n", - port->wwpn, - zfcp_get_busid_by_port(port), - rjt->reason_code); - } - retval = -ENXIO; - break; - - case ZFCP_LS_ACC: - switch (req_code) { - - case ZFCP_LS_RTV: - rtv = (struct zfcp_ls_rtv_acc*)resp; - ZFCP_LOG_INFO("RTV response from d_id 0x%08x to s_id " - "0x%08x (R_A_TOV=%ds E_D_TOV=%d%cs)\n", - port->d_id, port->adapter->s_id, - rtv->r_a_tov, rtv->e_d_tov, - rtv->qualifier & - ZFCP_LS_RTV_E_D_TOV_FLAG ? 'n' : 'm'); - break; - - case ZFCP_LS_RLS: - rls = (struct zfcp_ls_rls_acc*)resp; - ZFCP_LOG_INFO("RLS response from d_id 0x%08x to s_id " - "0x%08x (link_failure_count=%u, " - "loss_of_sync_count=%u, " - "loss_of_signal_count=%u, " - "primitive_sequence_protocol_error=%u, " - "invalid_transmition_word=%u, " - "invalid_crc_count=%u)\n", - port->d_id, port->adapter->s_id, - rls->link_failure_count, - rls->loss_of_sync_count, - rls->loss_of_signal_count, - rls->prim_seq_prot_error, - rls->invalid_transmition_word, - rls->invalid_crc_count); - break; + case ZFCP_LS_RTV: + rtv = (struct zfcp_ls_rtv_acc*)resp; + ZFCP_LOG_INFO("RTV response from d_id 0x%08x to s_id " + "0x%08x (R_A_TOV=%ds E_D_TOV=%d%cs)\n", + port->d_id, port->adapter->s_id, + rtv->r_a_tov, rtv->e_d_tov, + rtv->qualifier & + ZFCP_LS_RTV_E_D_TOV_FLAG ? 'n' : 'm'); + break; - case ZFCP_LS_PDISC: - pdisc = (struct zfcp_ls_pdisc_acc*)resp; - ZFCP_LOG_INFO("PDISC response from d_id 0x%08x to s_id " - "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " - "vendor='%-16s')\n", port->d_id, - port->adapter->s_id, pdisc->wwpn, - pdisc->wwnn, pdisc->vendor_version); - break; + case ZFCP_LS_RLS: + rls = (struct zfcp_ls_rls_acc*)resp; + ZFCP_LOG_INFO("RLS response from d_id 0x%08x to s_id " + "0x%08x (link_failure_count=%u, " + "loss_of_sync_count=%u, " + "loss_of_signal_count=%u, " + "primitive_sequence_protocol_error=%u, " + "invalid_transmition_word=%u, " + "invalid_crc_count=%u)\n", + port->d_id, port->adapter->s_id, + rls->link_failure_count, + rls->loss_of_sync_count, + rls->loss_of_signal_count, + rls->prim_seq_prot_error, + rls->invalid_transmition_word, + rls->invalid_crc_count); + break; - case ZFCP_LS_ADISC: - adisc = (struct zfcp_ls_adisc_acc*)resp; - ZFCP_LOG_INFO("ADISC response from d_id 0x%08x to s_id " - "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " - "hard_nport_id=0x%08x, " - "nport_id=0x%08x)\n", port->d_id, - port->adapter->s_id, adisc->wwpn, - adisc->wwnn, adisc->hard_nport_id, - adisc->nport_id); - /* FIXME: set wwnn in during open port */ - if (port->wwnn == 0) - port->wwnn = adisc->wwnn; - break; - } + case ZFCP_LS_PDISC: + pdisc = (struct zfcp_ls_pdisc_acc*)resp; + ZFCP_LOG_INFO("PDISC response from d_id 0x%08x to s_id " + "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " + "vendor='%-16s')\n", port->d_id, + port->adapter->s_id, pdisc->wwpn, + pdisc->wwnn, pdisc->vendor_version); break; - default: - ZFCP_LOG_NORMAL("unknown payload code 0x%02x received for " - "request 0x%02x to d_id 0x%08x, reopen needed " - "for port 0x%016Lx on adapter %s\n", resp_code, - req_code, port->d_id, port->wwpn, - zfcp_get_busid_by_port(port)); - retval = zfcp_erp_port_forced_reopen(port, 0); - if (retval != 0) { - ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx on " - "adapter %s failed\n", port->wwpn, - zfcp_get_busid_by_port(port)); - retval = -EPERM; - } + case ZFCP_LS_ADISC: + adisc = (struct zfcp_ls_adisc_acc*)resp; + ZFCP_LOG_INFO("ADISC response from d_id 0x%08x to s_id " + "0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, " + "hard_nport_id=0x%08x, " + "nport_id=0x%08x)\n", port->d_id, + port->adapter->s_id, adisc->wwpn, + adisc->wwnn, adisc->hard_nport_id, + adisc->nport_id); + /* FIXME: set wwnn in during open port */ + if (port->wwnn == 0) + port->wwnn = adisc->wwnn; + break; } -skip_fsfstatus: + out: __free_pages(send_els->req->page, 0); kfree(send_els->req); kfree(send_els->resp); - - return retval; + kfree(send_els); } @@ -735,14 +669,15 @@ return retval; } -/* - * function: - * - * purpose: Wrappper for zfcp_erp_port_reopen_internal - * used to ensure the correct locking - * - * returns: 0 - initiated action succesfully - * <0 - failed to initiate action +/** + * zfcp_erp_port_reopen - initiate reopen of a remote port + * @port: port to be reopened + * @clear_mask: specifies flags in port status to be cleared + * Return: 0 on success, < 0 on error + * + * This is a wrappper function for zfcp_erp_port_reopen_internal. It ensures + * correct locking. An error recovery task is initiated to do the reopen. + * To wait for the completion of the reopen zfcp_erp_wait should be used. */ int zfcp_erp_port_reopen(struct zfcp_port *port, int clear_mask) @@ -802,14 +737,15 @@ return retval; } -/* - * function: - * - * purpose: Wrappper for zfcp_erp_unit_reopen_internal - * used to ensure the correct locking - * - * returns: 0 - initiated action succesfully - * <0 - failed to initiate action +/** + * zfcp_erp_unit_reopen - initiate reopen of a unit + * @unit: unit to be reopened + * @clear_mask: specifies flags in unit status to be cleared + * Return: 0 on success, < 0 on error + * + * This is a wrappper for zfcp_erp_unit_reopen_internal. It ensures correct + * locking. An error recovery task is initiated to do the reopen. + * To wait for the completion of the reopen zfcp_erp_wait should be used. */ int zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask) @@ -1987,12 +1923,10 @@ return retval; } -/* - * function: - * - * purpose: - * - * returns: +/** + * zfcp_erp_wait - wait for completion of error recovery on an adapter + * @adapter: adapter for which to wait for completion of its error recovery + * Return: 0 */ int zfcp_erp_wait(struct zfcp_adapter *adapter) @@ -2130,7 +2064,7 @@ struct zfcp_port *port; list_for_each_entry(port, &adapter->port_list_head, list) - if (!atomic_test_mask(ZFCP_STATUS_PORT_NAMESERVER, &port->status)) + if (!atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status)) zfcp_erp_port_reopen_internal(port, clear_mask); return retval; @@ -2725,7 +2659,7 @@ { int retval; - if (atomic_test_mask(ZFCP_STATUS_PORT_NAMESERVER, + if (atomic_test_mask(ZFCP_STATUS_PORT_WKA, &erp_action->port->status)) retval = zfcp_erp_port_strategy_open_nameserver(erp_action); else @@ -2863,10 +2797,10 @@ case ZFCP_ERP_STEP_PORT_OPENING: if (atomic_test_mask(ZFCP_STATUS_COMMON_OPEN, &port->status)) { - ZFCP_LOG_DEBUG("nameserver port is open\n"); + ZFCP_LOG_DEBUG("WKA port is open\n"); retval = ZFCP_ERP_SUCCEEDED; } else { - ZFCP_LOG_DEBUG("open failed for nameserver port\n"); + ZFCP_LOG_DEBUG("open failed for WKA port\n"); retval = ZFCP_ERP_FAILED; } /* this is needed anyway (dont care for retval of wakeup) */ diff -Nru a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h --- a/drivers/s390/scsi/zfcp_ext.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/s390/scsi/zfcp_ext.h 2004-09-06 16:37:51 -07:00 @@ -31,7 +31,7 @@ #ifndef ZFCP_EXT_H #define ZFCP_EXT_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_EXT_REVISION "$Revision: 1.51 $" +#define ZFCP_EXT_REVISION "$Revision: 1.57 $" #include "zfcp_def.h" @@ -50,15 +50,16 @@ extern void zfcp_sysfs_unit_release(struct device *); /**************************** CONFIGURATION *********************************/ -extern struct zfcp_unit *zfcp_get_unit_by_lun(struct zfcp_port *, - fcp_lun_t fcp_lun); -extern struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *, - wwn_t wwpn); +extern struct zfcp_unit *zfcp_get_unit_by_lun(struct zfcp_port *, fcp_lun_t); +extern struct zfcp_port *zfcp_get_port_by_wwpn(struct zfcp_adapter *, wwn_t); +extern struct zfcp_port *zfcp_get_port_by_did(struct zfcp_adapter *, u32); +struct zfcp_adapter *zfcp_get_adapter_by_busid(char *); extern struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *); extern int zfcp_adapter_debug_register(struct zfcp_adapter *); extern void zfcp_adapter_dequeue(struct zfcp_adapter *); extern void zfcp_adapter_debug_unregister(struct zfcp_adapter *); -extern struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *, wwn_t, u32); +extern struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *, wwn_t, + u32, u32); extern void zfcp_port_dequeue(struct zfcp_port *); extern struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *, fcp_lun_t); extern void zfcp_unit_dequeue(struct zfcp_unit *); @@ -94,8 +95,11 @@ extern int zfcp_fsf_close_unit(struct zfcp_erp_action *); extern int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *); +extern int zfcp_fsf_exchange_port_data(struct zfcp_adapter *, + struct fsf_qtcb_bottom_port *); extern int zfcp_fsf_control_file(struct zfcp_adapter *, struct zfcp_fsf_req **, u32, u32, struct zfcp_sg_list *); +extern void zfcp_fsf_request_timeout_handler(unsigned long); extern void zfcp_fsf_scsi_er_timeout_handler(unsigned long); extern int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *); extern int zfcp_fsf_status_read(struct zfcp_adapter *, int); @@ -108,7 +112,7 @@ extern int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *, struct zfcp_unit *, struct scsi_cmnd *, - int); + struct timer_list*, int); extern int zfcp_fsf_req_complete(struct zfcp_fsf_req *); extern void zfcp_fsf_incoming_els(struct zfcp_fsf_req *); extern void zfcp_fsf_req_cleanup(struct zfcp_fsf_req *); @@ -117,9 +121,11 @@ extern struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command( unsigned long, struct zfcp_adapter *, struct zfcp_unit *, int); -/******************************** FCP ****************************************/ +/******************************* FC/FCP **************************************/ extern int zfcp_nameserver_enqueue(struct zfcp_adapter *); extern int zfcp_ns_gid_pn_request(struct zfcp_erp_action *); +extern int zfcp_check_ct_response(struct ct_hdr *); +extern int zfcp_handle_els_rjt(u32, struct zfcp_ls_rjt_par *); /******************************* SCSI ****************************************/ extern int zfcp_adapter_scsi_register(struct zfcp_adapter *); @@ -132,10 +138,10 @@ extern void zfcp_fsf_start_scsi_er_timer(struct zfcp_adapter *); extern fcp_dl_t zfcp_get_fcp_dl(struct fcp_cmnd_iu *); -extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *unit, - struct scsi_cmnd *scsi_cmnd); -extern int zfcp_scsi_command_sync(struct zfcp_unit *unit, - struct scsi_cmnd *scsi_cmnd); +extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *, + struct scsi_cmnd *, struct timer_list *); +extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, + struct timer_list *); extern struct scsi_transport_template *zfcp_transport_template; extern struct fc_function_template zfcp_transport_functions; diff -Nru a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c --- a/drivers/s390/scsi/zfcp_fsf.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/s390/scsi/zfcp_fsf.c 2004-09-06 16:37:54 -07:00 @@ -29,11 +29,12 @@ */ /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_FSF_C_REVISION "$Revision: 1.55 $" +#define ZFCP_FSF_C_REVISION "$Revision: 1.65 $" #include "zfcp_ext.h" static int zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *); +static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *); static int zfcp_fsf_open_port_handler(struct zfcp_fsf_req *); static int zfcp_fsf_close_port_handler(struct zfcp_fsf_req *); static int zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *); @@ -48,7 +49,7 @@ static int zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *); static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *); static int zfcp_fsf_control_file_handler(struct zfcp_fsf_req *); -static inline int zfcp_fsf_req_create_sbal_check( +static inline int zfcp_fsf_req_sbal_check( unsigned long *, struct zfcp_qdio_queue *, int); static inline int zfcp_use_one_sbal( struct scatterlist *, int, struct scatterlist *, int); @@ -79,10 +80,9 @@ }; static const char zfcp_act_subtable_type[5][8] = { - {"unknown"}, {"OS"}, {"WWPN"}, {"DID"}, {"LUN"} + "unknown", "OS", "WWPN", "DID", "LUN" }; - /****************************************************************/ /*************** FSF related Functions *************************/ /****************************************************************/ @@ -684,13 +684,11 @@ break; case FSF_SQ_ULP_PROGRAMMING_ERROR: ZFCP_LOG_FLAGS(0, "FSF_SQ_ULP_PROGRAMMING_ERROR\n"); - ZFCP_LOG_NORMAL("bug: An illegal amount of data was attempted " - "to be sent to the adapter %s " - "Stopping all operations on this adapter. ", + ZFCP_LOG_NORMAL("error: not enough SBALs for data transfer " + "(adapter %s)\n", zfcp_get_busid_by_adapter(fsf_req->adapter)); debug_text_exception(fsf_req->adapter->erp_dbf, 0, "fsf_sq_ulp_err"); - zfcp_erp_adapter_shutdown(fsf_req->adapter, 0); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE: @@ -785,6 +783,11 @@ zfcp_fsf_exchange_config_data_handler(fsf_req); break; + case FSF_QTCB_EXCHANGE_PORT_DATA : + ZFCP_LOG_FLAGS(2, "FSF_QTCB_EXCHANGE_PORT_DATA\n"); + zfcp_fsf_exchange_port_data_handler(fsf_req); + break; + case FSF_QTCB_SEND_ELS : ZFCP_LOG_FLAGS(2, "FSF_QTCB_SEND_ELS\n"); zfcp_fsf_send_els_handler(fsf_req); @@ -1624,26 +1627,6 @@ fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - case FSF_REQUEST_BUF_NOT_VALID : - ZFCP_LOG_FLAGS(2, "FSF_REQUEST_BUF_NOT_VALID\n"); - ZFCP_LOG_NORMAL("error: The port 0x%016Lx on adapter %s has " - "rejected a generic services command " - "due to invalid request buffer.\n", - port->wwpn, zfcp_get_busid_by_port(port)); - debug_text_event(adapter->erp_dbf, 1, "fsf_s_reqiv"); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - break; - - case FSF_RESPONSE_BUF_NOT_VALID : - ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_BUF_NOT_VALID\n"); - ZFCP_LOG_NORMAL("error: The port 0x%016Lx on adapter %s has " - "rejected a generic services command " - "due to invalid response buffer.\n", - port->wwpn, zfcp_get_busid_by_port(port)); - debug_text_event(adapter->erp_dbf, 1, "fsf_s_resiv"); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - break; - case FSF_PORT_BOXED : ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_INFO("The remote port 0x%016Lx on adapter %s " @@ -1665,9 +1648,10 @@ } skip_fsfstatus: - if (send_ct->handler != NULL) { + send_ct->status = retval; + + if (send_ct->handler != NULL) send_ct->handler(send_ct->handler_data); - } return retval; } @@ -1769,7 +1753,7 @@ sbale = zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, 0); /* start QDIO request for this FSF request */ - ret = zfcp_fsf_req_send(fsf_req, NULL); + ret = zfcp_fsf_req_send(fsf_req, els->timer); if (ret) { ZFCP_LOG_DEBUG("error: initiation of ELS request failed " "(adapter %s, port 0x%016Lx)\n", @@ -1863,6 +1847,10 @@ /* ERP strategy will escalate */ debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp"); fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; + retval = + zfcp_handle_els_rjt(header->fsf_status_qual.word[1], + (struct zfcp_ls_rjt_par *) + &header->fsf_status_qual.word[2]); break; case FSF_SQ_RETRY_IF_POSSIBLE: ZFCP_LOG_FLAGS(2, "FSF_SQ_RETRY_IF_POSSIBLE\n"); @@ -1921,15 +1909,6 @@ bottom->resp_buf_length); break; - case FSF_UNKNOWN_COMMAND: - ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_COMMAND\n"); - ZFCP_LOG_INFO( - "FSF command 0x%x is not supported by FCP adapter " - "(adapter: %s)\n", fsf_req->fsf_command, - zfcp_get_busid_by_port(port)); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - break; - case FSF_ACCESS_DENIED: ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_NORMAL("Access denied, cannot send ELS " @@ -1971,8 +1950,6 @@ if (send_els->handler != 0) send_els->handler(send_els->handler_data); - kfree(send_els); - return retval; } @@ -2219,6 +2196,111 @@ return 0; } +/** + * zfcp_fsf_exchange_port_data - request information about local port + * @adapter: for which port data is requested + * @data: response to exchange port data request + */ +int +zfcp_fsf_exchange_port_data(struct zfcp_adapter *adapter, + struct fsf_qtcb_bottom_port *data) +{ + volatile struct qdio_buffer_element *sbale; + int retval = 0; + unsigned long lock_flags; + struct zfcp_fsf_req *fsf_req; + struct timer_list *timer; + + if(!(adapter->supported_features & FSF_FEATURE_HBAAPI_MANAGEMENT)){ + ZFCP_LOG_INFO("error: exchange port data " + "command not supported by adapter %s\n", + zfcp_get_busid_by_adapter(adapter)); + return -EOPNOTSUPP; + } + + timer = kmalloc(sizeof(struct timer_list), GFP_KERNEL); + if (!timer) + return -ENOMEM; + + /* setup new FSF request */ + retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, + 0, 0, &lock_flags, &fsf_req); + if (retval < 0) { + ZFCP_LOG_INFO("error: Out of resources. Could not create an " + "exchange port data request for" + "the adapter %s.\n", + zfcp_get_busid_by_adapter(adapter)); + write_unlock_irqrestore(&adapter->request_queue.queue_lock, + lock_flags); + goto out; + } + + sbale = zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, 0); + sbale[0].flags |= SBAL_FLAGS0_TYPE_READ; + sbale[1].flags |= SBAL_FLAGS_LAST_ENTRY; + + fsf_req->data.port_data = data; + + init_timer(timer); + timer->function = zfcp_fsf_request_timeout_handler; + timer->data = (unsigned long) adapter; + timer->expires = ZFCP_FSF_REQUEST_TIMEOUT; + + retval = zfcp_fsf_req_send(fsf_req, timer); + if (retval) { + ZFCP_LOG_INFO("error: Could not send an exchange port data " + "command on the adapter %s\n", + zfcp_get_busid_by_adapter(adapter)); + zfcp_fsf_req_free(fsf_req); + write_unlock_irqrestore(&adapter->request_queue.queue_lock, + lock_flags); + goto out; + } + + ZFCP_LOG_DEBUG("Exchange Port Data request initiated (adapter %s)\n", + zfcp_get_busid_by_adapter(adapter)); + + write_unlock_irqrestore(&adapter->request_queue.queue_lock, + lock_flags); + + wait_event(fsf_req->completion_wq, + fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); + del_timer_sync(timer); + zfcp_fsf_req_cleanup(fsf_req); + out: + kfree(timer); + return retval; +} + + +/** + * zfcp_fsf_exchange_port_data_handler - handler for exchange_port_data request + * @fsf_req: pointer to struct zfcp_fsf_req + */ +static void +zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *fsf_req) +{ + struct fsf_qtcb_bottom_port *bottom; + struct fsf_qtcb_bottom_port *data = fsf_req->data.port_data; + + if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) + return; + + switch (fsf_req->qtcb->header.fsf_status) { + case FSF_GOOD : + ZFCP_LOG_FLAGS(2,"FSF_GOOD\n"); + bottom = &fsf_req->qtcb->bottom.port; + memcpy(data, bottom, sizeof(*data)); + break; + + default: + debug_text_event(fsf_req->adapter->erp_dbf, 0, "xchg-port-ng"); + debug_event(fsf_req->adapter->erp_dbf, 0, + &fsf_req->qtcb->header.fsf_status, sizeof(u32)); + } +} + + /* * function: zfcp_fsf_open_port * @@ -3319,19 +3401,19 @@ return retval; } -/* - * function: zfcp_fsf_send_fcp_command_task - * - * purpose: - * - * returns: - * - * note: we do not employ linked commands (not supported by HBA anyway) +/** + * zfcp_fsf_send_fcp_command_task - initiate an FCP command (for a SCSI command) + * @adapter: adapter where scsi command is issued + * @unit: unit where command is sent to + * @scsi_cmnd: scsi command to be sent + * @timer: timer to be started when request is initiated + * @req_flags: flags for fsf_request */ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, struct zfcp_unit *unit, - struct scsi_cmnd * scsi_cmnd, int req_flags) + struct scsi_cmnd * scsi_cmnd, + struct timer_list *timer, int req_flags) { struct zfcp_fsf_req *fsf_req = NULL; struct fcp_cmnd_iu *fcp_cmnd_iu; @@ -3486,7 +3568,7 @@ * start QDIO request for this FSF request * covered by an SBALE) */ - retval = zfcp_fsf_req_send(fsf_req, NULL); + retval = zfcp_fsf_req_send(fsf_req, timer); if (unlikely(retval < 0)) { ZFCP_LOG_INFO("error: Could not send FCP command request " "on adapter %s, port 0x%016Lx, unit 0x%016Lx\n", @@ -3788,44 +3870,6 @@ fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; break; - /* FIXME: this should be obsolete, isn' it? */ - case FSF_INBOUND_DATA_LENGTH_NOT_VALID: - ZFCP_LOG_FLAGS(0, "FSF_INBOUND_DATA_LENGTH_NOT_VALID\n"); - ZFCP_LOG_NORMAL("bug: An invalid inbound data length field " - "was found in a command for unit 0x%016Lx " - "on port 0x%016Lx on adapter %s.\n", - unit->fcp_lun, - unit->port->wwpn, zfcp_get_busid_by_unit(unit)); - /* stop operation for this adapter */ - debug_text_event(fsf_req->adapter->erp_dbf, 0, - "fsf_s_in_dl_nv"); - zfcp_erp_adapter_shutdown(unit->port->adapter, 0); - zfcp_cmd_dbf_event_fsf("idleninv", - fsf_req, - &header->fsf_status_qual, - sizeof (union fsf_status_qual)); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - break; - - /* FIXME: this should be obsolete, isn' it? */ - case FSF_OUTBOUND_DATA_LENGTH_NOT_VALID: - ZFCP_LOG_FLAGS(0, "FSF_OUTBOUND_DATA_LENGTH_NOT_VALID\n"); - ZFCP_LOG_NORMAL("bug: An invalid outbound data length field " - "was found in a command unit 0x%016Lx on port " - "0x%016Lx on adapter %s\n", - unit->fcp_lun, - unit->port->wwpn, - zfcp_get_busid_by_unit(unit)); - /* stop operation for this adapter */ - debug_text_event(fsf_req->adapter->erp_dbf, 0, - "fsf_s_out_dl_nv"); - zfcp_erp_adapter_shutdown(unit->port->adapter, 0); - zfcp_cmd_dbf_event_fsf("odleninv", fsf_req, - &header->fsf_status_qual, - sizeof (union fsf_status_qual)); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - break; - case FSF_CMND_LENGTH_NOT_VALID: ZFCP_LOG_FLAGS(0, "FSF_CMND_LENGTH_NOT_VALID\n"); ZFCP_LOG_NORMAL @@ -4157,87 +4201,6 @@ } skip_fsfstatus: -#if 0 - /* - * This nasty chop at the problem is not working anymore - * as we do not adjust the retry count anylonger in order - * to have a number of retries that avoids I/O errors. - * The manipulation of the retry count has been removed - * in favour of a safe tape device handling. We must not - * sent SCSI commands more than once to a device if no - * retries are permitted by the high level driver. Generally - * speaking, it was a mess to change retry counts. So it is - * fine that this sort of workaround is gone. - * Then, we had to face a certain number of immediate retries in case of - * busy and queue full conditions (see below). - * This is not acceptable - * for the latter. Queue full conditions are used - * by devices to indicate to a host that the host can rely - * on the completion (or timeout) of at least one outstanding - * command as a suggested trigger for command retries. - * Busy conditions require a different trigger since - * no commands are outstanding for that initiator from the - * devices perspective. - * The drawback of mapping a queue full condition to a - * busy condition is the chance of wasting all retries prior - * to the time when the device indicates that a command - * rejected due to a queue full condition should be re-driven. - * This case would lead to unnecessary I/O errors that - * have to be considered fatal if for example ext3's - * journaling would be torpedoed by such an avoidable - * I/O error. - * So, what issues are there with not mapping a queue-full - * condition to a busy condition? - * Due to the 'exclusive LUN' - * policy enforced by the zSeries FCP channel, this - * Linux instance is the only initiator with regard to - * this adapter. It is safe to rely on the information - * 'don't disturb me now ... and btw. no other commands - * pending for you' (= queue full) sent by the LU, - * since no other Linux can use this LUN via this adapter - * at the same time. If there is a potential race - * introduced by the FCP channel by not inhibiting Linux A - * to give up a LU with commands pending while Linux B - * grabs this LU and sends commands - thus providing - * an exploit at the 'exclusive LUN' policy - then this - * issue has to be considered a hardware problem. It should - * be tracked as such if it really occurs. Even if the - * FCP Channel spec. begs exploiters to wait for the - * completion of all request sent to a LU prior to - * closing this LU connection. - * This spec. statement in conjunction with - * the 'exclusive LUN' policy is not consistent design. - * Another issue is how resource constraints for SCSI commands - * might be handled by the FCP channel (just guessing for now). - * If the FCP channel would always map resource constraints, - * e.g. no free FC exchange ID due to I/O stress caused by - * other sharing Linux instances, to faked queue-full - * conditions then this would be a misinterpretation and - * violation of SCSI standards. - * If there are SCSI stack races as indicated below - * then they need to be fixed just there. - * Providing all issue above are not applicable or will - * be fixed appropriately, removing the following hack - * is the right thing to do. - */ - - /* - * Note: This is a rather nasty chop at the problem. We cannot - * risk adding to the mlqueue however as this will block the - * device. If it is the last outstanding command for this host - * it will remain blocked indefinitely. This would be quite possible - * on the zSeries FCP adapter. - * Also, there exists a race with scsi_insert_special relying on - * scsi_request_fn to recalculate some command data which may not - * happen when q->plugged is true in scsi_request_fn - */ - if (status_byte(scpnt->result) == QUEUE_FULL) { - ZFCP_LOG_DEBUG("Changing QUEUE_FULL to BUSY....\n"); - scpnt->result &= ~(QUEUE_FULL << 1); - scpnt->result |= (BUSY << 1); - } -#endif - ZFCP_LOG_DEBUG("scpnt->result =0x%x\n", scpnt->result); zfcp_cmd_dbf_event_scsi("response", scpnt); @@ -4585,16 +4548,6 @@ retval = -EIO; break; - case FSF_UNKNOWN_COMMAND: - ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_COMMAND\n"); - ZFCP_LOG_NORMAL( - "FSF command 0x%x is not supported by the adapter %s\n", - fsf_req->fsf_command, - zfcp_get_busid_by_adapter(adapter)); - fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; - retval = -EINVAL; - break; - case FSF_UNKNOWN_OP_SUBTYPE: ZFCP_LOG_FLAGS(2, "FSF_UNKNOWN_OP_SUBTYPE\n"); ZFCP_LOG_NORMAL( @@ -4682,8 +4635,8 @@ } static inline int -zfcp_fsf_req_create_sbal_check(unsigned long *flags, - struct zfcp_qdio_queue *queue, int needed) +zfcp_fsf_req_sbal_check(unsigned long *flags, + struct zfcp_qdio_queue *queue, int needed) { write_lock_irqsave(&queue->queue_lock, *flags); if (likely(atomic_read(&queue->free_count) >= needed)) @@ -4712,30 +4665,25 @@ * zfcp_fsf_req_sbal_get - try to get one SBAL in the request queue * @adapter: adapter for which request queue is examined * @req_flags: flags indicating whether to wait for needed SBAL or not - * @lock_flags: lock_flags is queue_lock is taken - * - * locking: on success the queue_lock for the request queue of the adapter - * is held + * @lock_flags: lock_flags if queue_lock is taken + * Return: 0 on success, otherwise -EIO, or -ERESTARTSYS + * Locks: lock adapter->request_queue->queue_lock on success */ static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter, int req_flags, unsigned long *lock_flags) { - int condition; + long ret; struct zfcp_qdio_queue *req_queue = &adapter->request_queue; if (unlikely(req_flags & ZFCP_WAIT_FOR_SBAL)) { - wait_event_interruptible_timeout(adapter->request_wq, - (condition = - zfcp_fsf_req_create_sbal_check - (lock_flags, req_queue, 1)), - ZFCP_SBAL_TIMEOUT); - if (!condition) { - return -EIO; - } - } else if (!zfcp_fsf_req_create_sbal_check(lock_flags, req_queue, 1)) { + ret = wait_event_interruptible_timeout(adapter->request_wq, + zfcp_fsf_req_sbal_check(lock_flags, req_queue, 1), + ZFCP_SBAL_TIMEOUT); + if (ret < 0) + return ret; + } else if (!zfcp_fsf_req_sbal_check(lock_flags, req_queue, 1)) return -EIO; - } return 0; } diff -Nru a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h --- a/drivers/s390/scsi/zfcp_fsf.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/s390/scsi/zfcp_fsf.h 2004-09-06 16:37:54 -07:00 @@ -84,19 +84,12 @@ #define FSF_SERVICE_CLASS_NOT_SUPPORTED 0x00000006 #define FSF_FCPLUN_NOT_VALID 0x00000009 #define FSF_ACCESS_DENIED 0x00000010 -#define FSF_ACCESS_TYPE_NOT_VALID 0x00000011 #define FSF_LUN_SHARING_VIOLATION 0x00000012 -#define FSF_COMMAND_ABORTED_ULP 0x00000020 -#define FSF_COMMAND_ABORTED_ADAPTER 0x00000021 #define FSF_FCP_COMMAND_DOES_NOT_EXIST 0x00000022 #define FSF_DIRECTION_INDICATOR_NOT_VALID 0x00000030 -#define FSF_INBOUND_DATA_LENGTH_NOT_VALID 0x00000031 /* FIX: obsolete? */ -#define FSF_OUTBOUND_DATA_LENGTH_NOT_VALID 0x00000032 /* FIX: obsolete? */ #define FSF_CMND_LENGTH_NOT_VALID 0x00000033 #define FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED 0x00000040 #define FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED 0x00000041 -#define FSF_REQUEST_BUF_NOT_VALID 0x00000042 -#define FSF_RESPONSE_BUF_NOT_VALID 0x00000043 #define FSF_ELS_COMMAND_REJECTED 0x00000050 #define FSF_GENERIC_COMMAND_REJECTED 0x00000051 #define FSF_OPERATION_PARTIALLY_SUCCESSFUL 0x00000052 @@ -227,6 +220,10 @@ #define FSF_HBA_PORTSTATE_LINKDOWN 0x00000006 #define FSF_HBA_PORTSTATE_ERROR 0x00000007 +/* IO states of adapter */ +#define FSF_IOSTAT_NPORT_RJT 0x00000004 +#define FSF_IOSTAT_FABRIC_RJT 0x00000005 +#define FSF_IOSTAT_LS_RJT 0x00000009 struct fsf_queue_designator; struct fsf_status_read_buffer; diff -Nru a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c --- a/drivers/s390/scsi/zfcp_scsi.c 2004-09-06 16:37:56 -07:00 +++ b/drivers/s390/scsi/zfcp_scsi.c 2004-09-06 16:37:56 -07:00 @@ -31,7 +31,7 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_SCSI_REVISION "$Revision: 1.65 $" +#define ZFCP_SCSI_REVISION "$Revision: 1.68 $" #include "zfcp_ext.h" @@ -247,15 +247,16 @@ /** * zfcp_scsi_command_async - worker for zfcp_scsi_queuecommand and * zfcp_scsi_command_sync - * @adapter: adapter for where scsi command is issued + * @adapter: adapter where scsi command is issued * @unit: unit to which scsi command is sent * @scpnt: scsi command to be sent + * @timer: timer to be started if request is successfully initiated * * Note: In scsi_done function must be set in scpnt. */ int zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit, - struct scsi_cmnd *scpnt) + struct scsi_cmnd *scpnt, struct timer_list *timer) { int tmp; int retval; @@ -291,7 +292,7 @@ goto out; } - tmp = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, + tmp = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, timer, ZFCP_REQ_AUTO_CLEANUP); if (unlikely(tmp < 0)) { @@ -313,18 +314,28 @@ /** * zfcp_scsi_command_sync - send a SCSI command and wait for completion - * returns 0, errors are indicated by scsi_cmnd->result + * @unit: unit where command is sent to + * @scpnt: scsi command to be sent + * @timer: timer to be started if request is successfully initiated + * Return: 0 + * + * Errors are indicated in scpnt->result */ int -zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scpnt) +zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scpnt, + struct timer_list *timer) { + int ret; DECLARE_COMPLETION(wait); scpnt->SCp.ptr = (void *) &wait; /* silent re-use */ - scpnt->done = zfcp_scsi_command_sync_handler; - zfcp_scsi_command_async(unit->port->adapter, unit, scpnt); + scpnt->scsi_done = zfcp_scsi_command_sync_handler; + ret = zfcp_scsi_command_async(unit->port->adapter, unit, scpnt, timer); + if ((ret == 0) && (scpnt->result == 0)) wait_for_completion(&wait); + scpnt->SCp.ptr = NULL; + return 0; } @@ -355,7 +366,7 @@ adapter = (struct zfcp_adapter *) scpnt->device->host->hostdata[0]; unit = (struct zfcp_unit *) scpnt->device->hostdata; - return zfcp_scsi_command_async(adapter, unit, scpnt); + return zfcp_scsi_command_async(adapter, unit, scpnt, NULL); } /* @@ -430,7 +441,7 @@ u64 dbf_fsf_req = 0; u64 dbf_fsf_status = 0; u64 dbf_fsf_qual[2] = { 0, 0 }; - char dbf_result[ZFCP_ABORT_DBF_LENGTH] = { "##undef" }; + char dbf_result[ZFCP_ABORT_DBF_LENGTH] = "##undef"; memset(dbf_opcode, 0, ZFCP_ABORT_DBF_LENGTH); memcpy(dbf_opcode, diff -Nru a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c 2004-09-06 16:37:50 -07:00 @@ -26,18 +26,18 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_ADAPTER_C_REVISION "$Revision: 1.33 $" +#define ZFCP_SYSFS_ADAPTER_C_REVISION "$Revision: 1.37 $" #include "zfcp_ext.h" #define ZFCP_LOG_AREA ZFCP_LOG_AREA_CONFIG static const char fc_topologies[5][25] = { - {""}, - {"point-to-point"}, - {"fabric"}, - {"arbitrated loop"}, - {"fabric (virt. adapter)"} + "", + "point-to-point", + "fabric", + "arbitrated loop", + "fabric (virt. adapter)" }; /** @@ -74,29 +74,8 @@ adapter->hardware_version); ZFCP_DEFINE_ADAPTER_ATTR(serial_number, "%17s\n", adapter->serial_number); ZFCP_DEFINE_ADAPTER_ATTR(scsi_host_no, "0x%x\n", adapter->scsi_host_no); - -/** - * zfcp_sysfs_adapter_in_recovery_show - recovery state of adapter - * @dev: pointer to belonging device - * @buf: pointer to input buffer - * - * Show function of "in_recovery" attribute of adapter. Will be - * "0" if no error recovery is pending for adapter, otherwise "1". - */ -static ssize_t -zfcp_sysfs_adapter_in_recovery_show(struct device *dev, char *buf) -{ - struct zfcp_adapter *adapter; - - adapter = dev_get_drvdata(dev); - if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static DEVICE_ATTR(in_recovery, S_IRUGO, - zfcp_sysfs_adapter_in_recovery_show, NULL); +ZFCP_DEFINE_ADAPTER_ATTR(in_recovery, "%d\n", atomic_test_mask + (ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status)); /** * zfcp_sysfs_port_add_store - add a port to sysfs tree @@ -127,7 +106,7 @@ if ((endp + 1) < (buf + count)) goto out; - port = zfcp_port_enqueue(adapter, wwpn, 0); + port = zfcp_port_enqueue(adapter, wwpn, 0, 0); if (!port) goto out; @@ -138,7 +117,7 @@ zfcp_port_put(port); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } static DEVICE_ATTR(port_add, S_IWUSR, NULL, zfcp_sysfs_port_add_store); @@ -197,7 +176,7 @@ zfcp_port_dequeue(port); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } static DEVICE_ATTR(port_remove, S_IWUSR, NULL, zfcp_sysfs_port_remove_store); @@ -241,7 +220,7 @@ zfcp_erp_wait(adapter); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } /** diff -Nru a/drivers/s390/scsi/zfcp_sysfs_driver.c b/drivers/s390/scsi/zfcp_sysfs_driver.c --- a/drivers/s390/scsi/zfcp_sysfs_driver.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/s390/scsi/zfcp_sysfs_driver.c 2004-09-06 16:37:54 -07:00 @@ -26,7 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_DRIVER_C_REVISION "$Revision: 1.14 $" +#define ZFCP_SYSFS_DRIVER_C_REVISION "$Revision: 1.15 $" #include "zfcp_ext.h" @@ -65,7 +65,7 @@ static ssize_t zfcp_sysfs_loglevel_##_name##_show(struct device_driver *dev, \ char *buf) \ { \ - return sprintf(buf,"%d\n", \ + return sprintf(buf,"%d\n", (unsigned int) \ ZFCP_GET_LOG_VALUE(ZFCP_LOG_AREA_##_define)); \ } \ \ diff -Nru a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c --- a/drivers/s390/scsi/zfcp_sysfs_port.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/s390/scsi/zfcp_sysfs_port.c 2004-09-06 16:37:55 -07:00 @@ -26,7 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.41 $" +#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.44 $" #include "zfcp_ext.h" @@ -66,6 +66,8 @@ ZFCP_DEFINE_PORT_ATTR(wwnn, "0x%016llx\n", port->wwnn); ZFCP_DEFINE_PORT_ATTR(d_id, "0x%06x\n", port->d_id); ZFCP_DEFINE_PORT_ATTR(scsi_id, "0x%x\n", port->scsi_id); +ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask + (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)); /** * zfcp_sysfs_unit_add_store - add a unit to sysfs tree @@ -107,7 +109,7 @@ zfcp_unit_put(unit); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } static DEVICE_ATTR(unit_add, S_IWUSR, NULL, zfcp_sysfs_unit_add_store); @@ -164,7 +166,7 @@ zfcp_unit_dequeue(unit); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } static DEVICE_ATTR(unit_remove, S_IWUSR, NULL, zfcp_sysfs_unit_remove_store); @@ -206,7 +208,7 @@ zfcp_erp_wait(port->adapter); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } /** @@ -233,29 +235,6 @@ zfcp_sysfs_port_failed_store); /** - * zfcp_sysfs_port_in_recovery_show - recovery state of port - * @dev: pointer to belonging device - * @buf: pointer to input buffer - * - * Show function of "in_recovery" attribute of port. Will be - * "0" if no error recovery is pending for port, otherwise "1". - */ -static ssize_t -zfcp_sysfs_port_in_recovery_show(struct device *dev, char *buf) -{ - struct zfcp_port *port; - - port = dev_get_drvdata(dev); - if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status)) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static DEVICE_ATTR(in_recovery, S_IRUGO, zfcp_sysfs_port_in_recovery_show, - NULL); - -/** * zfcp_port_common_attrs * sysfs attributes that are common for all kind of fc ports. */ @@ -300,7 +279,7 @@ retval = sysfs_create_group(&dev->kobj, &zfcp_port_common_attr_group); - if ((flags & ZFCP_STATUS_PORT_NAMESERVER) || retval) + if ((flags & ZFCP_STATUS_PORT_WKA) || retval) return retval; retval = sysfs_create_group(&dev->kobj, &zfcp_port_no_ns_attr_group); @@ -320,7 +299,7 @@ zfcp_sysfs_port_remove_files(struct device *dev, u32 flags) { sysfs_remove_group(&dev->kobj, &zfcp_port_common_attr_group); - if (!(flags & ZFCP_STATUS_PORT_NAMESERVER)) + if (!(flags & ZFCP_STATUS_PORT_WKA)) sysfs_remove_group(&dev->kobj, &zfcp_port_no_ns_attr_group); } diff -Nru a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c --- a/drivers/s390/scsi/zfcp_sysfs_unit.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c 2004-09-06 16:37:55 -07:00 @@ -26,7 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_UNIT_C_REVISION "$Revision: 1.25 $" +#define ZFCP_SYSFS_UNIT_C_REVISION "$Revision: 1.27 $" #include "zfcp_ext.h" @@ -64,6 +64,8 @@ ZFCP_DEFINE_UNIT_ATTR(status, "0x%08x\n", atomic_read(&unit->status)); ZFCP_DEFINE_UNIT_ATTR(scsi_lun, "0x%x\n", unit->scsi_lun); +ZFCP_DEFINE_UNIT_ATTR(in_recovery, "%d\n", atomic_test_mask + (ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)); /** * zfcp_sysfs_unit_failed_store - failed state of unit @@ -101,7 +103,7 @@ zfcp_erp_wait(unit->port->adapter); out: up(&zfcp_data.config_sema); - return retval ? retval : count; + return retval ? retval : (ssize_t) count; } /** @@ -126,29 +128,6 @@ static DEVICE_ATTR(failed, S_IWUSR | S_IRUGO, zfcp_sysfs_unit_failed_show, zfcp_sysfs_unit_failed_store); - -/** - * zfcp_sysfs_unit_in_recovery_show - recovery state of unit - * @dev: pointer to belonging device - * @buf: pointer to input buffer - * - * Show function of "in_recovery" attribute of unit. Will be - * "0" if no error recovery is pending for unit, otherwise "1". - */ -static ssize_t -zfcp_sysfs_unit_in_recovery_show(struct device *dev, char *buf) -{ - struct zfcp_unit *unit; - - unit = dev_get_drvdata(dev); - if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static DEVICE_ATTR(in_recovery, S_IRUGO, zfcp_sysfs_unit_in_recovery_show, - NULL); static struct attribute *zfcp_unit_attrs[] = { &dev_attr_scsi_lun.attr, diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/Kconfig 2004-09-06 16:37:54 -07:00 @@ -320,7 +320,7 @@ config SCSI_AIC7XXX_OLD tristate "Adaptec AIC7xxx support (old driver)" - depends on SCSI + depends on (ISA || EISA || PCI ) && SCSI help WARNING This driver is an older aic7xxx driver and is no longer under active development. Adaptec, Inc. is writing a new driver to @@ -395,15 +395,7 @@ To compile this driver as a module, choose M here: the module will be called in2000. -config SCSI_MEGARAID - tristate "AMI MegaRAID support" - depends on PCI && SCSI - help - This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490 - and 467 SCSI host adapters. - - To compile this driver as a module, choose M here: the - module will be called megaraid. +source "drivers/scsi/megaraid/Kconfig.megaraid" config SCSI_SATA bool "Serial ATA (SATA) support" @@ -595,7 +587,7 @@ config SCSI_EATA_PIO tristate "EATA-PIO (old DPT PM2001, PM2012A) support" - depends on SCSI + depends on (ISA || EISA || PCI) && SCSI ---help--- This driver supports all EATA-PIO protocol compliant SCSI Host Adapters like the DPT PM2001 and the PM2012A. EATA-DMA compliant @@ -780,6 +772,15 @@ To compile this driver as a module, choose M here: the module will be called ips. +config SCSI_IBMVSCSI + tristate "IBM Virtual SCSI support" + depends on PPC_PSERIES || PPC_ISERIES + help + This is the IBM POWER Virtual SCSI Client + + To compile this driver as a module, choose M here: the + module will be called ibmvscsic. + config SCSI_INITIO tristate "Initio 9100U(W) support" depends on PCI && SCSI && BROKEN @@ -1462,7 +1463,7 @@ config SCSI_MESH tristate "MESH (Power Mac internal SCSI) support" - depends on PPC_PMAC && SCSI + depends on PPC32 && PPC_PMAC && SCSI help Many Power Macintoshes and clones have a MESH (Macintosh Enhanced SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the @@ -1507,7 +1508,7 @@ config JAZZ_ESP bool "MIPS JAZZ FAS216 SCSI support" - depends on MIPS_JAZZ && SCSI + depends on MACH_JAZZ && SCSI help This is the driver for the onboard SCSI host adapter of MIPS Magnum 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM diff -Nru a/drivers/scsi/Makefile b/drivers/scsi/Makefile --- a/drivers/scsi/Makefile 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/Makefile 2004-09-06 16:37:54 -07:00 @@ -95,7 +95,8 @@ obj-$(CONFIG_SCSI_EATA) += eata.o obj-$(CONFIG_SCSI_DC395x) += dc395x.o obj-$(CONFIG_SCSI_DC390T) += tmscsim.o -obj-$(CONFIG_SCSI_MEGARAID) += megaraid.o +obj-$(CONFIG_MEGARAID_LEGACY) += megaraid.o +obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/ obj-$(CONFIG_SCSI_ACARD) += atp870u.o obj-$(CONFIG_SCSI_SUNESP) += esp.o obj-$(CONFIG_SCSI_GDTH) += gdth.o @@ -119,6 +120,7 @@ obj-$(CONFIG_SCSI_LASI700) += 53c700.o lasi700.o obj-$(CONFIG_SCSI_NSP32) += nsp32.o obj-$(CONFIG_SCSI_IPR) += ipr.o +obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsi/ obj-$(CONFIG_SCSI_SATA_SVW) += libata.o sata_svw.o obj-$(CONFIG_SCSI_ATA_PIIX) += libata.o ata_piix.o obj-$(CONFIG_SCSI_SATA_PROMISE) += libata.o sata_promise.o diff -Nru a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c --- a/drivers/scsi/NCR5380.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/NCR5380.c 2004-09-06 16:37:51 -07:00 @@ -310,12 +310,8 @@ * possible) function may be used. Before the specific driver initialization * code finishes, NCR5380_print_options should be called. */ - static int do_abort(struct Scsi_Host *host); static void do_reset(struct Scsi_Host *host); -static struct NCR5380_hostdata *first_host = NULL; -static struct NCR5380_hostdata *last_host = NULL; -static struct timer_list usleep_timer; /* * initialize_SCp - init the scsi pointer field @@ -533,9 +529,6 @@ #define USLEEP_WAITLONG USLEEP_SLEEP #endif -static struct Scsi_Host *expires_first = NULL; -static spinlock_t timer_lock; /* Guards expires list */ - /* * Function : int should_disconnect (unsigned char cmd) * @@ -578,90 +571,10 @@ } } -/* - * Assumes instance->time_expires has been set in higher level code. - * We should move to a timer per host - * - * Locks: Takes the timer queue lock - */ - -static int NCR5380_set_timer(struct Scsi_Host *instance) +static void NCR5380_set_timer(struct NCR5380_hostdata *hostdata, unsigned long timeout) { - struct Scsi_Host *tmp, **prev; - unsigned long flags; - - if (((struct NCR5380_hostdata *) (instance->hostdata))->next_timer) { - return -1; - } - - spin_lock_irqsave(&timer_lock, flags); - for (prev = &expires_first, tmp = expires_first; tmp; prev = &(((struct NCR5380_hostdata *) tmp->hostdata)->next_timer), tmp = ((struct NCR5380_hostdata *) tmp->hostdata)->next_timer) - if (((struct NCR5380_hostdata *) instance->hostdata)->time_expires < ((struct NCR5380_hostdata *) tmp->hostdata)->time_expires) - break; - - ((struct NCR5380_hostdata *) instance->hostdata)->next_timer = tmp; - *prev = instance; - - mod_timer(&usleep_timer, ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires); - - spin_unlock_irqrestore(&timer_lock, flags); - return 0; -} - -/** - * NCR5380_timer_fn - handle polled timeouts - * @unused: unused - * - * Walk the list of controllers, find which controllers have exceeded - * their expiry timeout and then schedule the processing co-routine to - * do the real work. - * - * Doing something about unwanted reentrancy here might be useful - * - * Locks: disables irqs, takes and frees the timer lock - */ - -static void NCR5380_timer_fn(unsigned long unused) -{ - struct Scsi_Host *instance; - struct NCR5380_hostdata *hostdata; - unsigned long flags; - - spin_lock_irqsave(&timer_lock, flags); - for (; expires_first && time_before_eq(((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires, jiffies);) - { - hostdata = (struct NCR5380_hostdata *) expires_first->hostdata; - schedule_work(&hostdata->coroutine); - instance = hostdata->next_timer; - hostdata->next_timer = NULL; - hostdata->time_expires = 0; - expires_first = instance; - } - - del_timer(&usleep_timer); - if (expires_first) { - usleep_timer.expires = ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires; - add_timer(&usleep_timer); - } - spin_unlock_irqrestore(&timer_lock, flags); -} - -/** - * NCR5380_all_init - global setup - * - * Set up the global values and timers needed by the NCR5380 driver - */ - -static inline void NCR5380_all_init(void) -{ - static int done = 0; - if (!done) { - dprintk(NDEBUG_INIT, ("scsi : NCR5380_all_init()\n")); - done = 1; - init_timer(&usleep_timer); - spin_lock_init(&timer_lock); - usleep_timer.function = NCR5380_timer_fn; - } + hostdata->time_expires = jiffies + timeout; + schedule_delayed_work(&hostdata->coroutine, hostdata->time_expires); } @@ -788,22 +701,6 @@ } /** - * NCR5380_coroutine_running - coroutine status - * @instance: controller to check - * - * Return true if the co-routine for this controller is running - * or scheduled to run - * - * FIXME: this test function belongs in the workqueue code! - */ - -static int NCR5380_coroutine_running(struct Scsi_Host *instance) -{ - struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *)instance->hostdata; - return test_bit(0, &hostdata->coroutine.pending); -} - -/** * NCR5380_print_status - dump controller info * @instance: controller to dump * @@ -819,8 +716,6 @@ char *start; int len; - printk("NCR5380 : coroutine is%s running.\n", NCR5380_coroutine_running(instance)? "" : "n't"); - NCR5380_dprint(NDEBUG_ANY, instance); NCR5380_dprint_phase(NDEBUG_ANY, instance); @@ -900,7 +795,6 @@ SPRINTF("Highwater I/O busy_spin_counts -- write: %d read: %d\n", pas_wmaxi, pas_maxi); #endif spin_lock_irq(instance->host_lock); - SPRINTF("NCR5380 : coroutine is%s running.\n", NCR5380_coroutine_running(instance) ? "" : "n't"); if (!hostdata->connected) SPRINTF("scsi%d: no currently connected command\n", instance->host_no); else @@ -912,7 +806,6 @@ SPRINTF("scsi%d: disconnected_queue\n", instance->host_no); for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble) pos = lprint_Scsi_Cmnd(ptr, pos, buffer, length); - spin_unlock_irq(instance->host_lock); *start = buffer; @@ -964,7 +857,7 @@ * Locks: interrupts must be enabled when we are called */ -static int __init NCR5380_init(struct Scsi_Host *instance, int flags) +static int __devinit NCR5380_init(struct Scsi_Host *instance, int flags) { NCR5380_local_declare(); int i, pass; @@ -984,7 +877,6 @@ #endif NCR5380_setup(instance); - NCR5380_all_init(); hostdata->aborted = 0; hostdata->id_mask = 1 << instance->this_id; @@ -1021,18 +913,8 @@ else hostdata->flags = FLAG_CHECK_LAST_BYTE_SENT | flags; - hostdata->next = NULL; - - if (!first_host) - first_host = hostdata; - else - last_host->next = hostdata; - - last_host = hostdata; - hostdata->host = instance; hostdata->time_expires = 0; - hostdata->next_timer = NULL; #ifndef AUTOSENSE if ((instance->cmd_per_lun > 1) || instance->can_queue > 1) @@ -1089,6 +971,19 @@ } /** + * NCR5380_exit - remove an NCR5380 + * @instance: adapter to remove + */ + +static void __devexit NCR5380_exit(struct Scsi_Host *instance) +{ + struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; + + cancel_delayed_work(&hostdata->coroutine); + flush_scheduled_work(); +} + +/** * NCR5380_queue_command - queue a command * @cmd: SCSI command * @done: completion handler @@ -1169,6 +1064,7 @@ return 0; } + /** * NCR5380_main - NCR state machines * @@ -1184,28 +1080,11 @@ static void NCR5380_main(void *p) { struct NCR5380_hostdata *hostdata = p; + struct Scsi_Host *instance = hostdata->host; Scsi_Cmnd *tmp, *prev; - struct Scsi_Host *instance; int done; - unsigned long flags = 0; - /* - * We run (with interrupts disabled) until we're sure that none of - * the host adapters have anything that can be done, at which point - * we can exit - * - * Interrupts are enabled before doing various other internal - * instructions, after we've decided that we need to run through - * the loop again. - * - * this should prevent any race conditions. - */ - - instance = hostdata->host; - - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irqsave(instance->host_lock, flags); - + spin_lock_irq(instance->host_lock); do { /* Lock held here */ done = 1; @@ -1286,8 +1165,7 @@ LIST(tmp, hostdata->issue_queue); tmp->host_scribble = (unsigned char *) hostdata->issue_queue; hostdata->issue_queue = tmp; - hostdata->time_expires = jiffies + USLEEP_WAITLONG; - NCR5380_set_timer(instance); + NCR5380_set_timer(hostdata, USLEEP_WAITLONG); } } /* if hostdata->selecting */ if (hostdata->connected @@ -1304,8 +1182,7 @@ break; } while (!done); - if(instance->irq != SCSI_IRQ_NONE) - spin_unlock_irqrestore(instance->host_lock, flags); + spin_unlock_irq(instance->host_lock); } #ifndef DONT_USE_INTR @@ -1330,12 +1207,13 @@ struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; int done; unsigned char basr; + unsigned long flags; dprintk(NDEBUG_INTR, ("scsi : NCR5380 irq %d triggered\n", irq)); do { done = 1; - spin_lock_irq(instance->host_lock); + spin_lock_irqsave(instance->host_lock, flags); /* Look for pending interrupts */ NCR5380_setup(instance); basr = NCR5380_read(BUS_AND_STATUS_REG); @@ -1386,7 +1264,7 @@ #endif } } /* if BASR_IRQ */ - spin_unlock_irq(instance->host_lock); + spin_unlock_irqrestore(instance->host_lock, flags); if(!done) schedule_work(&hostdata->coroutine); } while (!done); @@ -1469,12 +1347,8 @@ int err; NCR5380_setup(instance); - if (hostdata->selecting) { - if(instance->irq != SCSI_IRQ_NONE) - spin_unlock_irq(instance->host_lock); - goto part2; /* RvC: sorry prof. Dijkstra, but it keeps the - rest of the code nearly the same */ - } + if (hostdata->selecting) + goto part2; hostdata->restart_select = 0; @@ -1495,16 +1369,12 @@ NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask); NCR5380_write(MODE_REG, MR_ARBITRATE); - if(instance->irq != SCSI_IRQ_NONE) - spin_unlock_irq(instance->host_lock); /* We can be relaxed here, interrupts are on, we are in workqueue context, the birds are singing in the trees */ - + spin_unlock_irq(instance->host_lock); err = NCR5380_poll_politely(instance, INITIATOR_COMMAND_REG, ICR_ARBITRATION_PROGRESS, ICR_ARBITRATION_PROGRESS, 5*HZ); - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irq(instance->host_lock); - + spin_lock_irq(instance->host_lock); if (err < 0) { printk(KERN_DEBUG "scsi: arbitration timeout at %d\n", __LINE__); NCR5380_write(MODE_REG, MR_BASE); @@ -1628,8 +1498,7 @@ if (!value && (hostdata->select_time < HZ/4)) { /* RvC: we still must wait for a device response */ hostdata->select_time++; /* after 25 ticks the device has failed */ - hostdata->time_expires = jiffies + 1; - NCR5380_set_timer(instance); + NCR5380_set_timer(hostdata, 1); return 0; /* RvC: we return here with hostdata->selecting set, to go to sleep */ } @@ -1638,8 +1507,6 @@ waiting period */ if ((NCR5380_read(STATUS_REG) & (SR_SEL | SR_IO)) == (SR_SEL | SR_IO)) { NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irq(instance->host_lock); NCR5380_reselect(instance); printk("scsi%d : reselection after won arbitration?\n", instance->host_no); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); @@ -1665,8 +1532,6 @@ NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); return -1; } - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irq(instance->host_lock); cmd->result = DID_BAD_TARGET << 16; collect_stats(hostdata, cmd); cmd->scsi_done(cmd); @@ -1693,11 +1558,13 @@ */ /* Wait for start of REQ/ACK handshake */ - + + spin_unlock_irq(instance->host_lock); err = NCR5380_poll_politely(instance, STATUS_REG, SR_REQ, SR_REQ, HZ); + spin_lock_irq(instance->host_lock); - if(err) - { printk(KERN_ERR "scsi%d: timeout at NCR5380.c:%d\n", instance->host_no, __LINE__); + if(err) { + printk(KERN_ERR "scsi%d: timeout at NCR5380.c:%d\n", instance->host_no, __LINE__); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); goto failed; } @@ -1705,9 +1572,6 @@ dprintk(NDEBUG_SELECTION, ("scsi%d : target %d selected, going into MESSAGE OUT phase.\n", instance->host_no, cmd->device->id)); tmp[0] = IDENTIFY(((instance->irq == SCSI_IRQ_NONE) ? 0 : 1), cmd->device->lun); - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irq(instance->host_lock); - len = 1; cmd->tag = 0; @@ -1720,15 +1584,14 @@ hostdata->connected = cmd; hostdata->busy[cmd->device->id] |= (1 << cmd->device->lun); - initialize_SCp(cmd); - + if (cmd->SCp.ptr != (char *)cmd->sense_buffer) { + initialize_SCp(cmd); + } return 0; /* Selection failed */ failed: - if(instance->irq != SCSI_IRQ_NONE) - spin_lock_irq(instance->host_lock); return -1; } @@ -1804,8 +1667,7 @@ while (!((tmp = NCR5380_read(STATUS_REG)) & SR_REQ) && !break_allowed); if (!(tmp & SR_REQ)) { /* timeout condition */ - hostdata->time_expires = jiffies + USLEEP_SLEEP; - NCR5380_set_timer(instance); + NCR5380_set_timer(hostdata, USLEEP_SLEEP); break; } @@ -2643,9 +2505,8 @@ */ NCR5380_transfer_pio(instance, &phase, &len, &data); if (!cmd->device->disconnect && should_disconnect(cmd->cmnd[0])) { - hostdata->time_expires = jiffies + USLEEP_SLEEP; + NCR5380_set_timer(hostdata, USLEEP_SLEEP); dprintk(NDEBUG_USLEEP, ("scsi%d : issued command, sleeping until %ul\n", instance->host_no, hostdata->time_expires)); - NCR5380_set_timer(instance); return; } break; @@ -2664,9 +2525,8 @@ /* RvC: go to sleep if polling time expired */ if (!cmd->device->disconnect && time_after_eq(jiffies, poll_time)) { - hostdata->time_expires = jiffies + USLEEP_SLEEP; + NCR5380_set_timer(hostdata, USLEEP_SLEEP); dprintk(NDEBUG_USLEEP, ("scsi%d : poll timed out, sleeping until %ul\n", instance->host_no, hostdata->time_expires)); - NCR5380_set_timer(instance); return; } } diff -Nru a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h --- a/drivers/scsi/NCR5380.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/NCR5380.h 2004-09-06 16:37:53 -07:00 @@ -251,7 +251,6 @@ struct NCR5380_hostdata { NCR5380_implementation_fields; /* implementation specific */ struct Scsi_Host *host; /* Host backpointer */ - struct NCR5380_hostdata *next; /* Next in our hot chain */ unsigned char id_mask, id_higher_mask; /* 1 << id, all bits greater */ unsigned char targets_present; /* targets we have connected to, so we can call a select @@ -270,7 +269,6 @@ volatile unsigned aborted:1; /* flag, says aborted */ int flags; unsigned long time_expires; /* in jiffies, set prior to sleeping */ - struct Scsi_Host *next_timer; int select_time; /* timer in select for target response */ volatile Scsi_Cmnd *selecting; struct work_struct coroutine; /* our co-routine */ @@ -295,6 +293,7 @@ static int NCR5380_probe_irq(struct Scsi_Host *instance, int possible); #endif static int NCR5380_init(struct Scsi_Host *instance, int flags); +static void NCR5380_exit(struct Scsi_Host *instance); static void NCR5380_information_transfer(struct Scsi_Host *instance); #ifndef DONT_USE_INTR static irqreturn_t NCR5380_intr(int irq, void *dev_id, struct pt_regs *regs); diff -Nru a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c --- a/drivers/scsi/NCR53c406a.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/NCR53c406a.c 2004-09-06 16:37:52 -07:00 @@ -606,22 +606,24 @@ } /* called from init/main.c */ -static void __init NCR53c406a_setup(char *str, int *ints) +static int __init NCR53c406a_setup(char *str) { static size_t setup_idx = 0; size_t i; + int ints[4]; DEB(printk("NCR53c406a: Setup called\n"); ); if (setup_idx >= PORT_COUNT - 1) { printk("NCR53c406a: Setup called too many times. Bad LILO params?\n"); - return; + return 0; } + get_options(str, 4, ints); if (ints[0] < 1 || ints[0] > 3) { printk("NCR53c406a: Malformed command line\n"); printk("NCR53c406a: Usage: ncr53c406a=[,[,]]\n"); - return; + return 0; } for (i = 0; i < PORT_COUNT && !port_base; i++) if (ports[i] == ints[1]) { @@ -631,7 +633,7 @@ } if (!port_base) { printk("NCR53c406a: Invalid PORTBASE 0x%x specified\n", ints[1]); - return; + return 0; } if (ints[0] > 1) { @@ -654,6 +656,7 @@ fast_pio = ints[3]; DEB(printk("NCR53c406a: port_base=0x%x, irq=%d, fast_pio=%d\n", port_base, irq_level, fast_pio);) + return 1; } __setup("ncr53c406a=", NCR53c406a_setup); diff -Nru a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c --- a/drivers/scsi/NCR_Q720.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/NCR_Q720.c 2004-09-06 16:37:51 -07:00 @@ -216,7 +216,21 @@ goto out_free; } - mem_base = (__u32)ioremap(base_addr, mem_size); + if (dma_declare_coherent_memory(dev, base_addr, base_addr, + mem_size, DMA_MEMORY_MAP) + != DMA_MEMORY_MAP) { + printk(KERN_ERR "NCR_Q720: DMA declare memory failed\n"); + goto out_release_region; + } + + /* The first 1k of the memory buffer is a memory map of the registers + */ + mem_base = (__u32)dma_mark_declared_memory_occupied(dev, base_addr, + 1024); + if (IS_ERR((void *)mem_base)) { + printk("NCR_Q720 failed to reserve memory mapped region\n"); + goto out_release; + } /* now also enable accesses in asr 2 */ asr2 = inb(io_base + 0x0a); @@ -296,7 +310,8 @@ return 0; out_release: - iounmap((void *)mem_base); + dma_release_declared_memory(dev); + out_release_region: release_mem_region(base_addr, mem_size); out_free: kfree(p); @@ -321,7 +336,7 @@ if(p->hosts[i]) NCR_Q720_remove_one(p->hosts[i]); - iounmap((void *)p->mem_base); + dma_release_declared_memory(dev); release_mem_region(p->phys_mem_base, p->mem_size); free_irq(p->irq, p); kfree(p); diff -Nru a/drivers/scsi/aacraid/README b/drivers/scsi/aacraid/README --- a/drivers/scsi/aacraid/README 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/aacraid/README 2004-09-06 16:37:50 -07:00 @@ -10,14 +10,23 @@ Supported Cards/Chipsets ------------------------- - AAR-2410SA SATA + Adaptec 2020S + Adaptec 2025S Adaptec 2120S Adaptec 2200S Adaptec 2230S + Adaptec 2240S + Adaptec 2410SA + Adaptec 2610SA + Adaptec 2810SA + Adaptec 21610SA Adaptec 3230S Adaptec 3240S + Adaptec 4000SAS + Adaptec 4005SAS + Adaptec 4800SAS + Adaptec 4805SAS Adaptec 5400S - ASR-2020S PCI-X Dell PERC 2 Quad Channel Dell PERC 2/Si Dell PERC 3/Si @@ -49,7 +58,6 @@ Mailing List ------------------------- linux-scsi@vger.kernel.org (Interested parties troll here) -http://mbserver.adaptec.com/ (Currently more Community Support than Devel Support) Also note this is very different to Brian's original driver so don't expect him to support it. Adaptec does support this driver. Contact either tech support or Mark Salyzyn. diff -Nru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c --- a/drivers/scsi/aacraid/aachba.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/aacraid/aachba.c 2004-09-06 16:37:52 -07:00 @@ -179,6 +179,20 @@ static char *aac_get_status_string(u32 status); #endif +/* + * Non dasd selection is handled entirely in aachba now + */ + +MODULE_PARM(nondasd, "i"); +MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); +MODULE_PARM(dacmode, "i"); +MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); +MODULE_PARM(commit, "i"); +MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on"); + +static int nondasd = -1; +static int dacmode = -1; + /** * aac_get_containers - list containers * @common: adapter to probe @@ -481,8 +495,7 @@ dev->nondasd_support = 0; if(dev->adapter_info.options & AAC_OPT_NONDASD){ -// dev->nondasd_support = 1; -// dmb - temporarily disable nondasd + dev->nondasd_support = 1; } if(nondasd != -1) { dev->nondasd_support = (nondasd!=0); @@ -491,18 +504,30 @@ printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id); } - dev->pae_support = 0; + dev->dac_support = 0; if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){ printk(KERN_INFO "%s%d: 64bit support enabled.\n", dev->name, dev->id); - dev->pae_support = 1; + dev->dac_support = 1; } - if(paemode != -1){ - dev->pae_support = (paemode!=0); + if(dacmode != -1) { + dev->dac_support = (dacmode!=0); } - if(dev->pae_support != 0) { - printk(KERN_INFO"%s%d: 64 Bit PAE enabled\n", dev->name, dev->id); - pci_set_dma_mask(dev->pdev, (dma_addr_t)0xFFFFFFFFFFFFFFFFULL); + if(dev->dac_support != 0) { + if (!pci_set_dma_mask(dev->pdev, 0xFFFFFFFFFFFFFFFFULL) && + !pci_set_consistent_dma_mask(dev->pdev, 0xFFFFFFFFFFFFFFFFULL)) { + printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n", + dev->name, dev->id); + } else if (!pci_set_dma_mask(dev->pdev, 0xFFFFFFFFULL) && + !pci_set_consistent_dma_mask(dev->pdev, 0xFFFFFFFFULL)) { + printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n", + dev->name, dev->id); + dev->dac_support = 0; + } else { + printk(KERN_WARNING"%s%d: No suitable DMA available.\n", + dev->name, dev->id); + rcode = -ENOMEM; + } } fib_complete(fibptr); @@ -537,7 +562,7 @@ scsicmd->use_sg, scsicmd->sc_data_direction); else if(scsicmd->request_bufflen) - pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr, + pci_unmap_single(dev->pdev, scsicmd->SCp.dma_handle, scsicmd->request_bufflen, scsicmd->sc_data_direction); readreply = (struct aac_read_reply *)fib_data(fibptr); @@ -582,7 +607,7 @@ scsicmd->use_sg, scsicmd->sc_data_direction); else if(scsicmd->request_bufflen) - pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr, + pci_unmap_single(dev->pdev, scsicmd->SCp.dma_handle, scsicmd->request_bufflen, scsicmd->sc_data_direction); @@ -644,7 +669,7 @@ fib_init(cmd_fibcontext); - if(dev->pae_support == 1){ + if(dev->dac_support == 1) { struct aac_read64 *readcmd; readcmd = (struct aac_read64 *) fib_data(cmd_fibcontext); readcmd->command = cpu_to_le32(VM_CtHostRead64); @@ -752,7 +777,7 @@ } fib_init(cmd_fibcontext); - if(dev->pae_support == 1){ + if(dev->dac_support == 1) { struct aac_write64 *writecmd; writecmd = (struct aac_write64 *) fib_data(cmd_fibcontext); writecmd->command = cpu_to_le32(VM_CtHostWrite64); @@ -1220,7 +1245,7 @@ scsicmd->use_sg, scsicmd->sc_data_direction); else if(scsicmd->request_bufflen) - pci_unmap_single(dev->pdev, (ulong)scsicmd->SCp.ptr, scsicmd->request_bufflen, + pci_unmap_single(dev->pdev, scsicmd->SCp.dma_handle, scsicmd->request_bufflen, scsicmd->sc_data_direction); /* @@ -1348,7 +1373,12 @@ case SRB_STATUS_DOMAIN_VALIDATION_FAIL: default: #ifdef AAC_DETAILED_STATUS_INFO - printk("aacraid: SRB ERROR(%u) %s scsi cmd 0x%x - scsi status 0x%x\n",le32_to_cpu(srbreply->srb_status&0x3f),aac_get_status_string(le32_to_cpu(srbreply->srb_status)), scsicmd->cmnd[0], le32_to_cpu(srbreply->scsi_status) ); + printk("aacraid: SRB ERROR(%u) %s scsi cmd 0x%x - scsi status 0x%x\n", + le32_to_cpu(srbreply->srb_status & 0x3F), + aac_get_status_string( + le32_to_cpu(srbreply->srb_status) & 0x3F), + scsicmd->cmnd[0], + le32_to_cpu(srbreply->scsi_status)); #endif scsicmd->result = DID_ERROR << 16 | COMMAND_COMPLETE << 8; break; @@ -1358,7 +1388,10 @@ scsicmd->result |= SAM_STAT_CHECK_CONDITION; len = (srbreply->sense_data_size > sizeof(scsicmd->sense_buffer))? sizeof(scsicmd->sense_buffer):srbreply->sense_data_size; - dprintk((KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n", le32_to_cpu(srbreply->status), len)); +#ifdef AAC_DETAILED_STATUS_INFO + dprintk((KERN_WARNING "aac_srb_callback: check condition, status = %d len=%d\n", + le32_to_cpu(srbreply->status), len)); +#endif memcpy(scsicmd->sense_buffer, srbreply->sense_data, len); } @@ -1437,7 +1470,7 @@ srbcmd->retry_limit =cpu_to_le32(0); // Obsolete parameter srbcmd->cdb_size = cpu_to_le32(scsicmd->cmd_len); - if( dev->pae_support ==1 ) { + if( dev->dac_support == 1 ) { aac_build_sg64(scsicmd, (struct sgmap64*) &srbcmd->sg); srbcmd->count = cpu_to_le32(scsicmd->request_bufflen); @@ -1532,7 +1565,7 @@ psg->count = cpu_to_le32(1); psg->sg[0].addr = cpu_to_le32(addr); psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); - scsicmd->SCp.ptr = (char *)(ulong)addr; + scsicmd->SCp.dma_handle = addr; byte_count = scsicmd->request_bufflen; } return byte_count; @@ -1593,7 +1626,7 @@ psg->sg[0].addr[1] = (u32)(le_addr>>32); psg->sg[0].addr[0] = (u32)(le_addr & 0xffffffff); psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); - scsicmd->SCp.ptr = (char *)(ulong)addr; + scsicmd->SCp.dma_handle = addr; byte_count = scsicmd->request_bufflen; } return byte_count; diff -Nru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h --- a/drivers/scsi/aacraid/aacraid.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/aacraid/aacraid.h 2004-09-06 16:37:51 -07:00 @@ -28,10 +28,7 @@ #define aac_phys_to_logical(x) (x+1) #define aac_logical_to_phys(x) (x?x-1:0) -#define AAC_DETAILED_STATUS_INFO - -extern int nondasd; -extern int paemode; +/* #define AAC_DETAILED_STATUS_INFO */ struct diskparm { @@ -404,15 +401,15 @@ }; enum aac_log_level { - LOG_INIT = 10, - LOG_INFORMATIONAL = 20, - LOG_WARNING = 30, - LOG_LOW_ERROR = 40, - LOG_MEDIUM_ERROR = 50, - LOG_HIGH_ERROR = 60, - LOG_PANIC = 70, - LOG_DEBUG = 80, - LOG_WINDBG_PRINT = 90 + LOG_AAC_INIT = 10, + LOG_AAC_INFORMATIONAL = 20, + LOG_AAC_WARNING = 30, + LOG_AAC_LOW_ERROR = 40, + LOG_AAC_MEDIUM_ERROR = 50, + LOG_AAC_HIGH_ERROR = 60, + LOG_AAC_PANIC = 70, + LOG_AAC_DEBUG = 80, + LOG_AAC_WINDBG_PRINT = 90 }; #define FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT 0x030b @@ -841,7 +838,7 @@ * lets break them out so we don't have to do an AND to check them */ u8 nondasd_support; - u8 pae_support; + u8 dac_support; }; #define AllocateAndMapFibSpace(dev, MapFibContext) \ diff -Nru a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c --- a/drivers/scsi/aacraid/commctrl.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/aacraid/commctrl.c 2004-09-06 16:37:52 -07:00 @@ -480,7 +480,7 @@ default: data_dir = DMA_NONE; } - if (dev->pae_support == 1) { + if (dev->dac_support == 1) { struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg; byte_count = 0; diff -Nru a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c --- a/drivers/scsi/aacraid/commsup.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/aacraid/commsup.c 2004-09-06 16:37:54 -07:00 @@ -761,7 +761,7 @@ length = 255; if (cp[length] != 0) cp[length] = 0; - if (level == LOG_HIGH_ERROR) + if (level == LOG_AAC_HIGH_ERROR) printk(KERN_WARNING "aacraid:%s", cp); else printk(KERN_INFO "aacraid:%s", cp); diff -Nru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c --- a/drivers/scsi/aacraid/linit.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/aacraid/linit.c 2004-09-06 16:37:52 -07:00 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -62,15 +63,7 @@ "Adaptec Advanced Raid Products, " "and HP NetRAID-4M SCSI driver"); MODULE_LICENSE("GPL"); - - -int nondasd = -1; -module_param(nondasd, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); - -int paemode = -1; -module_param(paemode, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(paemode, "Control whether dma addressing is using PAE. 0=off, 1=on"); +MODULE_VERSION(AAC_DRIVER_VERSION); struct aac_dev *aac_devices[MAXIMUM_NUM_ADAPTERS]; static unsigned aac_count; @@ -83,44 +76,54 @@ * Note: The last field is used to index into aac_drivers below. */ static struct pci_device_id aac_pci_tbl[] = { - { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si */ - { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di */ - { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si */ - { 0x1028, 0x0004, 0x1028, 0x00d0, 0, 0, 3 }, /* PERC 3/Si */ - { 0x1028, 0x0002, 0x1028, 0x00d1, 0, 0, 4 }, /* PERC 3/Di */ - { 0x1028, 0x0002, 0x1028, 0x00d9, 0, 0, 5 }, /* PERC 3/Di */ - { 0x1028, 0x000a, 0x1028, 0x0106, 0, 0, 6 }, /* PERC 3/Di */ - { 0x1028, 0x000a, 0x1028, 0x011b, 0, 0, 7 }, /* PERC 3/Di */ - { 0x1028, 0x000a, 0x1028, 0x0121, 0, 0, 8 }, /* PERC 3/Di */ - { 0x9005, 0x0283, 0x9005, 0x0283, 0, 0, 9 }, /* catapult*/ - { 0x9005, 0x0284, 0x9005, 0x0284, 0, 0, 10 }, /* tomcat*/ - { 0x9005, 0x0285, 0x9005, 0x0286, 0, 0, 11 }, /* Adaptec 2120S (Crusader)*/ - { 0x9005, 0x0285, 0x9005, 0x0285, 0, 0, 12 }, /* Adaptec 2200S (Vulcan)*/ - { 0x9005, 0x0285, 0x9005, 0x0287, 0, 0, 13 }, /* Adaptec 2200S (Vulcan-2m)*/ - { 0x9005, 0x0285, 0x17aa, 0x0286, 0, 0, 14 }, /* Legend S220*/ - { 0x9005, 0x0285, 0x17aa, 0x0287, 0, 0, 15 }, /* Legend S230*/ - - { 0x9005, 0x0285, 0x9005, 0x0288, 0, 0, 16 }, /* Adaptec 3230S (Harrier)*/ - { 0x9005, 0x0285, 0x9005, 0x0289, 0, 0, 17 }, /* Adaptec 3240S (Tornado)*/ - { 0x9005, 0x0285, 0x9005, 0x028a, 0, 0, 18 }, /* ASR-2020 ZCR PCI-X U320 */ - { 0x9005, 0x0285, 0x9005, 0x028b, 0, 0, 19 }, /* ASR-2025 ZCR DIMM U320 */ - { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 20 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II)*/ - - { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 21 }, /* Perc 320/DC*/ - { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 22 }, /* Adaptec 5400S (Mustang)*/ - { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 23 }, /* Adaptec 5400S (Mustang)*/ - { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 24 }, /* Dell PERC2 "Quad Channel" */ - { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 25 }, /* HP NetRAID-4M */ - + { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */ + { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */ + { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si (SlimFast/PERC3Si */ + { 0x1028, 0x0004, 0x1028, 0x00d0, 0, 0, 3 }, /* PERC 3/Di (Iguana FlipChip/PERC3DiF */ + { 0x1028, 0x0002, 0x1028, 0x00d1, 0, 0, 4 }, /* PERC 3/Di (Viper/PERC3DiV) */ + { 0x1028, 0x0002, 0x1028, 0x00d9, 0, 0, 5 }, /* PERC 3/Di (Lexus/PERC3DiL) */ + { 0x1028, 0x000a, 0x1028, 0x0106, 0, 0, 6 }, /* PERC 3/Di (Jaguar/PERC3DiJ) */ + { 0x1028, 0x000a, 0x1028, 0x011b, 0, 0, 7 }, /* PERC 3/Di (Dagger/PERC3DiD) */ + { 0x1028, 0x000a, 0x1028, 0x0121, 0, 0, 8 }, /* PERC 3/Di (Boxster/PERC3DiB) */ + { 0x9005, 0x0283, 0x9005, 0x0283, 0, 0, 9 }, /* catapult */ + { 0x9005, 0x0284, 0x9005, 0x0284, 0, 0, 10 }, /* tomcat */ + { 0x9005, 0x0285, 0x9005, 0x0286, 0, 0, 11 }, /* Adaptec 2120S (Crusader) */ + { 0x9005, 0x0285, 0x9005, 0x0285, 0, 0, 12 }, /* Adaptec 2200S (Vulcan) */ + { 0x9005, 0x0285, 0x9005, 0x0287, 0, 0, 13 }, /* Adaptec 2200S (Vulcan-2m) */ + { 0x9005, 0x0285, 0x17aa, 0x0286, 0, 0, 14 }, /* Legend S220 (Legend Crusader) */ + { 0x9005, 0x0285, 0x17aa, 0x0287, 0, 0, 15 }, /* Legend S230 (Legend Vulcan) */ + + { 0x9005, 0x0285, 0x9005, 0x0288, 0, 0, 16 }, /* Adaptec 3230S (Harrier) */ + { 0x9005, 0x0285, 0x9005, 0x0289, 0, 0, 17 }, /* Adaptec 3240S (Tornado) */ + { 0x9005, 0x0285, 0x9005, 0x028a, 0, 0, 18 }, /* ASR-2020ZCR SCSI PCI-X ZCR (Skyhawk) */ + { 0x9005, 0x0285, 0x9005, 0x028b, 0, 0, 19 }, /* ASR-2025ZCR SCSI SO-DIMM PCI-X ZCR (Terminator) */ + { 0x9005, 0x0286, 0x9005, 0x028c, 0, 0, 20 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */ + { 0x9005, 0x0286, 0x9005, 0x028d, 0, 0, 21 }, /* ASR-2130S (Lancer) */ + { 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 22 }, /* Jupiter Platform */ + { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 23 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */ + { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 24 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */ + { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 25 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */ { 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 26 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */ { 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 27 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */ { 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 28 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */ { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 29 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ - { 0x9005, 0x0285, 0x0E11, 0x0295, 0, 0, 30 }, /* SATA 6Ch (Bearcat) */ - - { 0x9005, 0x0286, 0x9005, 0x028c, 0, 0, 31 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */ - { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 32 }, /* ASR-2020SA (ZCR PCI-X SATA) */ - { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 33 }, /* ASR-2025SA (ZCR DIMM SATA) */ + { 0x9005, 0x0285, 0x0E11, 0x0295, 0, 0, 30 }, /* AAR-2610SA PCI SATA 6ch */ + { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 31 }, /* ASR-2240S */ + { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 32 }, /* ASR-4005SAS */ + { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 33 }, /* ASR-4000SAS */ + { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 34 }, /* ASR-4800SAS */ + { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 35 }, /* ASR-4805SAS */ + + { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 36 }, /* Perc 320/DC*/ + { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 37 }, /* Adaptec 5400S (Mustang)*/ + { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 38 }, /* Adaptec 5400S (Mustang)*/ + { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 39 }, /* Dell PERC2/QC */ + { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 40 }, /* HP NetRAID-4M */ + + { 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 41 }, /* Dell Catchall */ + { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 42 }, /* Legend Catchall */ + { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 43 }, /* Adaptec Catch All */ + { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 44 }, /* Adaptec Rocket Catch All */ { 0,} }; MODULE_DEVICE_TABLE(pci, aac_pci_tbl); @@ -131,44 +134,54 @@ * for the card. At that time we can remove the channels from here */ static struct aac_driver_ident aac_drivers[] = { - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 2/Si */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Si */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Si */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di */ - { aac_rx_init, "aacraid", "ADAPTEC ", "catapult ", 2, AAC_QUIRK_31BIT }, /* catapult*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "tomcat ", 2, AAC_QUIRK_31BIT }, /* tomcat*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2120S ", 1, AAC_QUIRK_31BIT }, /* Adaptec 2120S (Crusader)*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2200S ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan)*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2200S ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan-2m)*/ - { aac_rx_init, "aacraid", "Legend ", "Legend S220 ", 1, AAC_QUIRK_31BIT }, /* Legend S220*/ - { aac_rx_init, "aacraid", "Legend ", "Legend S230 ", 2, AAC_QUIRK_31BIT }, /* Legend S230*/ - - { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 3230S ", 2 }, /* Adaptec 3230S (Harrier)*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 3240S ", 2 }, /* Adaptec 3240S (Tornado)*/ - { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020ZCR ", 2 }, /* ASR-2020 ZCR PCI-X U320 */ - { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025ZCR ", 2 }, /* ASR-2025 ZCR DIMM U320 */ - { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2410SA SATA ", 2 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II)*/ - - { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT }, /* Perc 320/DC*/ - { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4 }, /* Adaptec 5400S (Mustang)*/ - { aac_sa_init, "aacraid", "ADAPTEC ", "AAC-364 ", 4 }, /* Adaptec 5400S (Mustang)*/ - { aac_sa_init, "percraid", "DELL ", "PERCRAID ", 4, AAC_QUIRK_31BIT }, /* Dell PERC2 "Quad Channel" */ - { aac_sa_init, "hpnraid", "HP ", "NetRAID ", 4 }, /* HP NetRAID-4M */ - + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 2/Si (Iguana/PERC2Si) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Opal/PERC3Di) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Si (SlimFast/PERC3Si */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Iguana FlipChip/PERC3DiF */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Viper/PERC3DiV) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Lexus/PERC3DiL) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 1, AAC_QUIRK_31BIT }, /* PERC 3/Di (Jaguar/PERC3DiJ) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Dagger/PERC3DiD) */ + { aac_rx_init, "percraid", "DELL ", "PERCRAID ", 2, AAC_QUIRK_31BIT }, /* PERC 3/Di (Boxster/PERC3DiB) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "catapult ", 2, AAC_QUIRK_31BIT }, /* catapult */ + { aac_rx_init, "aacraid", "ADAPTEC ", "tomcat ", 2, AAC_QUIRK_31BIT }, /* tomcat */ + { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2120S ", 1, AAC_QUIRK_31BIT }, /* Adaptec 2120S (Crusader) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2200S ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 2200S ", 2, AAC_QUIRK_31BIT }, /* Adaptec 2200S (Vulcan-2m) */ + { aac_rx_init, "aacraid", "Legend ", "Legend S220 ", 1, AAC_QUIRK_31BIT }, /* Legend S220 (Legend Crusader) */ + { aac_rx_init, "aacraid", "Legend ", "Legend S230 ", 2, AAC_QUIRK_31BIT }, /* Legend S230 (Legend Vulcan) */ + + { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 3230S ", 2 }, /* Adaptec 3230S (Harrier) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "Adaptec 3240S ", 2 }, /* Adaptec 3240S (Tornado) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020ZCR ", 2 }, /* ASR-2020ZCR SCSI PCI-X ZCR (Skyhawk) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025ZCR ", 2 }, /* ASR-2025ZCR SCSI SO-DIMM PCI-X ZCR (Terminator) */ + { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-2230S PCI-X ", 2 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */ + { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-2130S PCI-X ", 1 }, /* ASR-2130S (Lancer) */ + { aac_rkt_init, "aacraid", "ADAPTEC ", "Callisto ", 2 }, /* Jupiter Platform */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020SA ", 1 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025SA ", 1 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2410SA SATA ", 1 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */ { aac_rx_init, "aacraid", "DELL ", "CERC SR2 ", 1 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */ { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2810SA SATA ", 1 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */ { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-21610SA SATA", 1 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */ { aac_rx_init, "aacraid", "ADAPTEC ", "SO-DIMM SATA ZCR", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ - { aac_rx_init, "aacraid", "ADAPTEC ", "SATA 6Channel ", 1 }, /* SATA 6Ch (Bearcat) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005SAS ", 1 }, /* ASR-4005SAS */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS */ + { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS */ - { aac_rkt_init,"aacraid", "ADAPTEC ", "ASR-2230S PCI-X ", 2 }, /* ASR-2230S + ASR-2230SLP PCI-X (Lancer) */ - { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020SA ", 1 }, /* ASR-2020SA (ZCR PCI-X SATA) */ - { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025SA ", 1 }, /* ASR-2025SA (ZCR DIMM SATA) */ + { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT }, /* Perc 320/DC*/ + { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4 }, /* Adaptec 5400S (Mustang)*/ + { aac_sa_init, "aacraid", "ADAPTEC ", "AAC-364 ", 4 }, /* Adaptec 5400S (Mustang)*/ + { aac_sa_init, "percraid", "DELL ", "PERCRAID ", 4, AAC_QUIRK_31BIT }, /* Dell PERC2/QC */ + { aac_sa_init, "hpnraid", "HP ", "NetRAID ", 4 }, /* HP NetRAID-4M */ + + { aac_rx_init, "aacraid", "DELL ", "RAID ", 2, AAC_QUIRK_31BIT }, /* Dell Catchall */ + { aac_rx_init, "aacraid", "Legend ", "RAID ", 2, AAC_QUIRK_31BIT }, /* Legend Catchall */ + { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_31BIT }, /* Adaptec Catch All */ + { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec Rocket Catch All */ }; #ifdef CONFIG_COMPAT @@ -408,15 +421,17 @@ } } spin_unlock_irqrestore(&dev->list_lock, flags); + if (active) + break; - /* - * We can exit If all the commands are complete - */ - if (active == 0) - return SUCCESS; } + /* + * We can exit If all the commands are complete + */ + if (active == 0) + return SUCCESS; spin_unlock_irq(host->host_lock); - scsi_sleep(HZ); + ssleep(1); spin_lock_irq(host->host_lock); } printk(KERN_ERR "%s: SCSI bus appears hung\n", AAC_DRIVERNAME); diff -Nru a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c --- a/drivers/scsi/advansys.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/advansys.c 2004-09-06 16:37:51 -07:00 @@ -15,16 +15,6 @@ * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys) * changed its name to ConnectCom Solutions, Inc. * - * There is an AdvanSys Linux WWW page at: - * http://www.connectcom.net/downloads/software/os/linux.html - * http://www.advansys.com/linux.html - * - * The latest released version of the AdvanSys driver is available at: - * ftp://ftp.advansys.com/pub/linux/linux.tgz - * ftp://ftp.connectcom.net/pub/linux/linux.tgz - * - * Please send questions, comments, bug reports to: - * support@connectcom.net */ /* @@ -41,7 +31,6 @@ H. Release History I. Known Problems/Fix List J. Credits (Chronological Order) - K. ConnectCom (AdvanSys) Contact Information A. Linux Kernels Supported by this Driver @@ -2032,9 +2021,6 @@ #define ADV_LIB_VERSION_MAJOR 5 #define ADV_LIB_VERSION_MINOR 14 -/* d_os_dep.h */ -#define ADV_OS_LINUX - /* * Define Adv Library required special types. */ @@ -3370,9 +3356,9 @@ /* * Default EEPROM Configuration structure defined in a_init.c. */ -extern ADVEEP_3550_CONFIG Default_3550_EEPROM_Config; -extern ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config; -extern ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config; +static ADVEEP_3550_CONFIG Default_3550_EEPROM_Config; +static ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config; +static ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config; /* * DvcGetPhyAddr() flag arguments diff -Nru a/drivers/scsi/advansys.h b/drivers/scsi/advansys.h --- a/drivers/scsi/advansys.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/advansys.h 2004-09-06 16:37:55 -07:00 @@ -13,36 +13,10 @@ * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys) * changed its name to ConnectCom Solutions, Inc. * - * There is an AdvanSys Linux WWW page at: - * http://www.connectcom.net/downloads/software/os/linux.html - * http://www.advansys.com/linux.html - * - * The latest released version of the AdvanSys driver is available at: - * ftp://ftp.advansys.com/pub/linux/linux.tgz - * ftp://ftp.connectcom.net/pub/linux/linux.tgz - * - * Please send questions, comments, bug reports to: - * linux@connectcom.net or bfrey@turbolinux.com.cn */ #ifndef _ADVANSYS_H #define _ADVANSYS_H - -#include -#ifndef LINUX_VERSION_CODE -#include -#endif /* LINUX_VERSION_CODE */ - -/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */ -#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) -/* Driver supported only in version 2.2 and version >= 2.4. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \ - (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \ - LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) -#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels." -#endif -#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) -#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0)) /* * Scsi_Host_Template function prototypes. diff -Nru a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c --- a/drivers/scsi/aha1542.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/aha1542.c 2004-09-06 16:37:53 -07:00 @@ -1479,7 +1479,7 @@ * we are pretty desperate anyways. */ spin_unlock_irq(SCpnt->device->host->host_lock); - scsi_sleep(4 * HZ); + ssleep(4); spin_lock_irq(SCpnt->device->host->host_lock); WAIT(STATUS(SCpnt->device->host->io_port), @@ -1543,7 +1543,7 @@ * we are pretty desperate anyways. */ spin_unlock_irq(SCpnt->device->host->host_lock); - scsi_sleep(4 * HZ); + ssleep(4); spin_lock_irq(SCpnt->device->host->host_lock); WAIT(STATUS(SCpnt->device->host->io_port), diff -Nru a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h --- a/drivers/scsi/aha1542.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/aha1542.h 2004-09-06 16:37:54 -07:00 @@ -91,10 +91,12 @@ }; /* These belong in scsi.h also */ -#define any2scsi(up, p) \ -(up)[0] = (((unsigned long)(p)) >> 16) ; \ -(up)[1] = (((unsigned long)(p)) >> 8); \ -(up)[2] = ((unsigned long)(p)); +static inline void any2scsi(u8 *p, u32 v) +{ + p[0] = v >> 16; + p[1] = v >> 8; + p[2] = v; +} #define scsi2int(up) ( (((long)*(up)) << 16) + (((long)(up)[1]) << 8) + ((long)(up)[2]) ) diff -Nru a/drivers/scsi/aic7xxx/Kconfig.aic79xx b/drivers/scsi/aic7xxx/Kconfig.aic79xx --- a/drivers/scsi/aic7xxx/Kconfig.aic79xx 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/aic7xxx/Kconfig.aic79xx 2004-09-06 16:37:52 -07:00 @@ -46,7 +46,7 @@ config AIC79XX_BUILD_FIRMWARE bool "Build Adapter Firmware with Kernel Build" - depends on SCSI_AIC79XX + depends on SCSI_AIC79XX && !PREVENT_FIRMWARE_BUILD help This option should only be enabled if you are modifying the firmware source to the aic79xx driver and wish to have the generated firmware diff -Nru a/drivers/scsi/aic7xxx/Kconfig.aic7xxx b/drivers/scsi/aic7xxx/Kconfig.aic7xxx --- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/aic7xxx/Kconfig.aic7xxx 2004-09-06 16:37:51 -07:00 @@ -61,7 +61,7 @@ config AIC7XXX_BUILD_FIRMWARE bool "Build Adapter Firmware with Kernel Build" - depends on SCSI_AIC7XXX + depends on SCSI_AIC7XXX && !PREVENT_FIRMWARE_BUILD help This option should only be enabled if you are modifying the firmware source to the aic7xxx driver and wish to have the generated firmware diff -Nru a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c --- a/drivers/scsi/aic7xxx/aic79xx_osm.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c 2004-09-06 16:37:53 -07:00 @@ -61,6 +61,7 @@ #endif #include /* For fetching system memory size */ +#include /* For ssleep/msleep */ /* * Lock protecting manipulation of the ahd softc list. @@ -415,7 +416,6 @@ /* * Module information and settable options. */ -#ifdef MODULE static char *aic79xx = NULL; /* * Just in case someone uses commas to separate items on the insmod @@ -426,9 +426,8 @@ MODULE_AUTHOR("Maintainer: Justin T. Gibbs "); MODULE_DESCRIPTION("Adaptec Aic790X U320 SCSI Host Bus Adapter driver"); -#ifdef MODULE_LICENSE MODULE_LICENSE("Dual BSD/GPL"); -#endif +MODULE_VERSION(AIC79XX_DRIVER_VERSION); MODULE_PARM(aic79xx, "s"); MODULE_PARM_DESC(aic79xx, "period delimited, options string.\n" @@ -463,7 +462,6 @@ " Change Read Streaming for Controller's 2 and 3\n" "\n" " options aic79xx 'aic79xx=rd_strm:{..0xFFF0.0xC0F0}'"); -#endif static void ahd_linux_handle_scsi_status(struct ahd_softc *, struct ahd_linux_device *, @@ -3173,7 +3171,7 @@ break; } if (status & SSQ_DELAY) - scsi_sleep(1 * HZ); + ssleep(1); break; case SS_START: @@ -3333,7 +3331,7 @@ } if (targ->dv_state_retry <= 10) { if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0) - scsi_sleep(ahd->our_id*HZ/10); + msleep(ahd->our_id*1000/10); break; } #ifdef AHD_DEBUG @@ -3377,7 +3375,7 @@ targ->dv_state_retry--; } else if (targ->dv_state_retry < 60) { if ((status & SSQ_DELAY) != 0) - scsi_sleep(1 * HZ); + ssleep(1); } else { #ifdef AHD_DEBUG if (ahd_debug & AHD_SHOW_DV) { diff -Nru a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c --- a/drivers/scsi/aic7xxx/aic79xx_pci.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c 2004-09-06 16:37:52 -07:00 @@ -452,8 +452,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flaged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahd_outb(ahd, HCNTRL, hcntrl|PAUSE); while (ahd_is_paused(ahd) == 0) ; diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c 2004-09-06 16:37:50 -07:00 @@ -140,6 +140,7 @@ #include /* For fetching system memory size */ #include /* For block_size() */ +#include /* For ssleep/msleep */ /* * Lock protecting manipulation of the ahc softc list. @@ -436,7 +437,6 @@ /* * Module information and settable options. */ -#ifdef MODULE static char *aic7xxx = NULL; /* * Just in case someone uses commas to separate items on the insmod @@ -447,9 +447,8 @@ MODULE_AUTHOR("Maintainer: Justin T. Gibbs "); MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver"); -#ifdef MODULE_LICENSE MODULE_LICENSE("Dual BSD/GPL"); -#endif +MODULE_VERSION(AIC7XXX_DRIVER_VERSION); MODULE_PARM(aic7xxx, "s"); MODULE_PARM_DESC(aic7xxx, "period delimited, options string.\n" @@ -479,7 +478,6 @@ "\n" " options aic7xxx 'aic7xxx=probe_eisa_vl.tag_info:{{}.{.10}}.seltime:1'\n" ); -#endif static void ahc_linux_handle_scsi_status(struct ahc_softc *, struct ahc_linux_device *, @@ -2825,7 +2823,7 @@ break; } if (status & SSQ_DELAY) - scsi_sleep(1 * HZ); + ssleep(1); break; case SS_START: @@ -2985,7 +2983,7 @@ } if (targ->dv_state_retry <= 10) { if ((status & (SSQ_DELAY_RANDOM|SSQ_DELAY))!= 0) - scsi_sleep(ahc->our_id*HZ/10); + msleep(ahc->our_id*1000/10); break; } #ifdef AHC_DEBUG @@ -3029,7 +3027,7 @@ targ->dv_state_retry--; } else if (targ->dv_state_retry < 60) { if ((status & SSQ_DELAY) != 0) - scsi_sleep(1 * HZ); + ssleep(1); } else { #ifdef AHC_DEBUG if (ahc_debug & AHC_SHOW_DV) { diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c 2004-09-06 16:37:50 -07:00 @@ -1284,8 +1284,10 @@ * or read prefetching could be initiated by the * CPU or host bridge. Our device does not support * either, so look for data corruption and/or flagged - * PCI errors. + * PCI errors. First pause without causing another + * chip reset. */ + hcntrl &= ~CHIPRST; ahc_outb(ahc, HCNTRL, hcntrl|PAUSE); while (ahc_is_paused(ahc) == 0) ; diff -Nru a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile --- a/drivers/scsi/aic7xxx/aicasm/Makefile 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/aic7xxx/aicasm/Makefile 2004-09-06 16:37:54 -07:00 @@ -34,10 +34,14 @@ $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS) aicdb.h: - @if [ -e "/usr/include/db3/db_185.h" ]; then \ + @if [ -e "/usr/include/db4/db_185.h" ]; then \ + echo "#include " > aicdb.h; \ + elif [ -e "/usr/include/db3/db_185.h" ]; then \ echo "#include " > aicdb.h; \ elif [ -e "/usr/include/db2/db_185.h" ]; then \ echo "#include " > aicdb.h; \ + elif [ -e "/usr/include/db1/db_185.h" ]; then \ + echo "#include " > aicdb.h; \ elif [ -e "/usr/include/db/db_185.h" ]; then \ echo "#include " > aicdb.h; \ elif [ -e "/usr/include/db_185.h" ]; then \ diff -Nru a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c --- a/drivers/scsi/aic7xxx_old.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/aic7xxx_old.c 2004-09-06 16:37:55 -07:00 @@ -10489,7 +10489,7 @@ aic_outb(p, lastphase | ATNO, SCSISIGO); unpause_sequencer(p, FALSE); spin_unlock_irq(p->host->host_lock); - scsi_sleep(HZ); + ssleep(1); spin_lock_irq(p->host->host_lock); if(aic_dev->flags & BUS_DEVICE_RESET_PENDING) return FAILED; @@ -10548,7 +10548,7 @@ aic_outb(p, saved_scbptr, SCBPTR); unpause_sequencer(p, FALSE); spin_unlock_irq(p->host->host_lock); - scsi_sleep(HZ/4); + msleep(1000/4); spin_lock_irq(p->host->host_lock); if(aic_dev->flags & BUS_DEVICE_RESET_PENDING) return FAILED; @@ -10786,7 +10786,7 @@ } unpause_sequencer(p, FALSE); spin_unlock_irq(p->host->host_lock); - scsi_sleep(HZ/4); + msleep(1000/4); spin_lock_irq(p->host->host_lock); if (p->flags & AHC_ABORT_PENDING) { @@ -10887,7 +10887,7 @@ aic7xxx_run_done_queue(p, TRUE); unpause_sequencer(p, FALSE); spin_unlock_irq(p->host->host_lock); - scsi_sleep(2 * HZ); + ssleep(2); spin_lock_irq(p->host->host_lock); return SUCCESS; } @@ -11139,6 +11139,7 @@ #include "aic7xxx_old/aic7xxx_proc.c" MODULE_LICENSE("Dual BSD/GPL"); +MODULE_VERSION(AIC7XXX_H_VERSION); static Scsi_Host_Template driver_template = { diff -Nru a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c --- a/drivers/scsi/arm/cumana_1.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/arm/cumana_1.c 2004-09-06 16:37:50 -07:00 @@ -321,6 +321,7 @@ scsi_remove_host(host); free_irq(host->irq, host); + NCR5380_exit(host); release_region(host->io_port, host->n_io_port); scsi_host_put(host); } diff -Nru a/drivers/scsi/arm/ecoscsi.c b/drivers/scsi/arm/ecoscsi.c --- a/drivers/scsi/arm/ecoscsi.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/arm/ecoscsi.c 2004-09-06 16:37:55 -07:00 @@ -222,6 +222,7 @@ if (shpnt->irq != IRQ_NONE) free_irq(shpnt->irq, NULL); + NCR5380_exit(host); if (shpnt->io_port) release_region(shpnt->io_port, shpnt->n_io_port); diff -Nru a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c --- a/drivers/scsi/arm/eesox.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/arm/eesox.c 2004-09-06 16:37:55 -07:00 @@ -231,7 +231,8 @@ * Align buffer. */ if (((u32)buf) & 2 && status >= 2) { - *((u16 *)buf)++ = readl(reg_dmadata); + *(u16 *)buf = readl(reg_dmadata); + buf += 2; status -= 2; length -= 2; } @@ -243,8 +244,10 @@ l1 |= readl(reg_dmadata) << 16; l2 = readl(reg_dmadata) & mask; l2 |= readl(reg_dmadata) << 16; - *((u32 *)buf)++ = l1; - *((u32 *)buf)++ = l2; + *(u32 *)buf = l1; + buf += 4; + *(u32 *)buf = l2; + buf += 4; length -= 8; continue; } @@ -255,13 +258,15 @@ l1 = readl(reg_dmadata) & mask; l1 |= readl(reg_dmadata) << 16; - *((u32 *)buf)++ = l1; + *(u32 *)buf = l1; + buf += 4; length -= 4; continue; } if (status >= 2) { - *((u16 *)buf)++ = readl(reg_dmadata); + *(u16 *)buf = readl(reg_dmadata); + buf += 2; length -= 2; } } while (length); @@ -305,7 +310,8 @@ * Align buffer. */ if (((u32)buf) & 2 && status >= 2) { - writel(*((u16 *)buf)++ << 16, reg_dmadata); + writel(*(u16 *)buf << 16, reg_dmadata); + buf += 2; status -= 2; length -= 2; } @@ -313,8 +319,10 @@ if (status >= 8) { unsigned long l1, l2; - l1 = *((u32 *)buf)++; - l2 = *((u32 *)buf)++; + l1 = *(u32 *)buf; + buf += 4; + l2 = *(u32 *)buf; + buf += 4; writel(l1 << 16, reg_dmadata); writel(l1, reg_dmadata); @@ -327,7 +335,8 @@ if (status >= 4) { unsigned long l1; - l1 = *((u32 *)buf)++; + l1 = *(u32 *)buf; + buf += 4; writel(l1 << 16, reg_dmadata); writel(l1, reg_dmadata); @@ -336,7 +345,8 @@ } if (status >= 2) { - writel(*((u16 *)buf)++ << 16, reg_dmadata); + writel(*(u16 *)buf << 16, reg_dmadata); + buf += 2; length -= 2; } } while (length); diff -Nru a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c --- a/drivers/scsi/arm/fas216.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/arm/fas216.c 2004-09-06 16:37:52 -07:00 @@ -2681,7 +2681,7 @@ * IRQs after the sleep. */ spin_unlock_irq(info->host->host_lock); - scsi_sleep(50 * HZ/100); + msleep(50 * 1000/100); spin_lock_irq(info->host->host_lock); /* @@ -2920,7 +2920,7 @@ * scsi standard says wait 250ms */ spin_unlock_irq(info->host->host_lock); - scsi_sleep(100*HZ/100); + msleep(100*1000/100); spin_lock_irq(info->host->host_lock); fas216_writeb(info, REG_CNTL1, info->scsi.cfg[0]); diff -Nru a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c --- a/drivers/scsi/arm/oak.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/arm/oak.c 2004-09-06 16:37:50 -07:00 @@ -179,6 +179,7 @@ ecard_set_drvdata(ec, NULL); scsi_remove_host(host); + NCR5380_exit(host); release_region(host->io_port, host->n_io_port); scsi_host_put(host); } diff -Nru a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c --- a/drivers/scsi/ata_piix.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/ata_piix.c 2004-09-06 16:37:52 -07:00 @@ -389,7 +389,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) { - unsigned int pio = adev->pio_mode; + unsigned int pio = adev->pio_mode - XFER_PIO_0; struct pci_dev *dev = ap->host_set->pdev; unsigned int is_slave = (adev->devno != 0); unsigned int master_port= ap->port_no ? 0x42 : 0x40; diff -Nru a/drivers/scsi/cpqfcTSinit.c b/drivers/scsi/cpqfcTSinit.c --- a/drivers/scsi/cpqfcTSinit.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/cpqfcTSinit.c 2004-09-06 16:37:50 -07:00 @@ -302,10 +302,16 @@ cpqfc_boards[i].device_id, PciDev))) { + if (pci_enable_device(PciDev)) { + printk(KERN_ERR + "cpqfc: can't enable PCI device at %s\n", pci_name(PciDev)); + goto err_continue; + } + if (pci_set_dma_mask(PciDev, CPQFCTS_DMA_MASK) != 0) { printk(KERN_WARNING "cpqfc: HBA cannot support required DMA mask, skipping.\n"); - continue; + goto err_disable_dev; } // NOTE: (kernel 2.2.12-32) limits allocation to 128k bytes... @@ -314,8 +320,11 @@ HostAdapter = scsi_register( ScsiHostTemplate, sizeof( CPQFCHBA ) ); - if(HostAdapter == NULL) - continue; + if(HostAdapter == NULL) { + printk(KERN_WARNING + "cpqfc: can't register SCSI HBA, skipping.\n"); + goto err_disable_dev; + } DEBUG_PCI( printk(" HBA found!\n")); DEBUG_PCI( printk(" HostAdapter->PciDev->irq = %u\n", PciDev->irq) ); DEBUG_PCI(printk(" PciDev->baseaddress[0]= %lx\n", @@ -367,9 +376,8 @@ DEV_NAME, HostAdapter) ) { - printk(" IRQ %u already used\n", HostAdapter->irq); - scsi_unregister( HostAdapter); - continue; + printk(KERN_WARNING "cpqfc: IRQ %u already used\n", HostAdapter->irq); + goto err_unregister; } // Since we have two 256-byte I/O port ranges (upper @@ -377,22 +385,17 @@ if( !request_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff, DEV_NAME ) ) { - printk(" cpqfcTS address in use: %x\n", + printk(KERN_WARNING "cpqfc: address in use: %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseU); - free_irq( HostAdapter->irq, HostAdapter); - scsi_unregister( HostAdapter); - continue; + goto err_free_irq; } if( !request_region( cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff, DEV_NAME ) ) { - printk(" cpqfcTS address in use: %x\n", + printk(KERN_WARNING "cpqfc: address in use: %x\n", cpqfcHBAdata->fcChip.Registers.IOBaseL); - release_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff ); - free_irq( HostAdapter->irq, HostAdapter); - scsi_unregister( HostAdapter); - continue; + goto err_release_region_U; } // OK, we have grabbed everything we need now. @@ -424,7 +427,7 @@ // now initialize our hardware... if (cpqfcHBAdata->fcChip.InitializeTachyon( cpqfcHBAdata, 1,1)) { printk(KERN_WARNING "cpqfc: initialization of HBA hardware failed.\n"); - // FIXME: might want to do something better than nothing here. + goto err_release_region_L; } cpqfcHBAdata->fcStatsTime = jiffies; // (for FC Statistics delta) @@ -455,6 +458,21 @@ spin_lock_irq(HostAdapter->host_lock); NumberOfAdapters++; spin_unlock_irq(HostAdapter->host_lock); + + continue; + +err_release_region_L: + release_region( cpqfcHBAdata->fcChip.Registers.IOBaseL, 0xff ); +err_release_region_U: + release_region( cpqfcHBAdata->fcChip.Registers.IOBaseU, 0xff ); +err_free_irq: + free_irq( HostAdapter->irq, HostAdapter); +err_unregister: + scsi_unregister( HostAdapter); +err_disable_dev: + pci_disable_device( PciDev ); +err_continue: + continue; } // end of while() } @@ -811,6 +829,7 @@ cpqfcHBAdata->fcChip.Registers.ReMapMemBase) vfree( cpqfcHBAdata->fcChip.Registers.ReMapMemBase); */ + pci_disable_device( cpqfcHBAdata->PciDev); LEAVE("cpqfcTS_release"); return 0; diff -Nru a/drivers/scsi/dc390.h b/drivers/scsi/dc390.h --- a/drivers/scsi/dc390.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,32 +0,0 @@ -/*********************************************************************** - * FILE NAME : DC390.H * - * BY : C.L. Huang * - * Description: Device Driver for Tekram DC-390(T) PCI SCSI * - * Bus Master Host Adapter * - ***********************************************************************/ -/* $Id: dc390.h,v 2.43.2.22 2000/12/20 00:39:36 garloff Exp $ */ - -/* - * DC390/AMD 53C974 driver, header file - */ - -#ifndef DC390_H -#define DC390_H - -#include - -#define DC390_BANNER "Tekram DC390/AM53C974" -#define DC390_VERSION "2.1d 2004-05-27" - -/* We don't have eh_abort_handler, eh_device_reset_handler, - * eh_bus_reset_handler, eh_host_reset_handler yet! - * So long: Use old exception handling :-( */ -#define OLD_EH - -#if LINUX_VERSION_CODE < KERNEL_VERSION (2,1,70) || defined (OLD_EH) -# define NEW_EH -#else -# define NEW_EH use_new_eh_code: 1, -# define USE_NEW_EH -#endif -#endif /* DC390_H */ diff -Nru a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c --- a/drivers/scsi/dc395x.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/dc395x.c 2004-09-06 16:37:51 -07:00 @@ -376,6 +376,8 @@ static void reselect(struct AdapterCtlBlk *acb); static u8 start_scsi(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb); +static inline void enable_msgout_abort(struct AdapterCtlBlk *acb, + struct ScsiReqBlk *srb); static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb); static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_code, @@ -384,13 +386,11 @@ static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb); static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb); -static inline void enable_msgout_abort(struct AdapterCtlBlk *acb, - struct ScsiReqBlk *srb); static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb); static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb); -static inline void set_xfer_rate(struct AdapterCtlBlk *acb, +static void set_xfer_rate(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb); static void waiting_timeout(unsigned long ptr); @@ -1676,6 +1676,23 @@ } +#define DC395x_ENABLE_MSGOUT \ + DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \ + srb->state |= SRB_MSGOUT + + +/* abort command */ +static inline void enable_msgout_abort(struct AdapterCtlBlk *acb, + struct ScsiReqBlk *srb) +{ + srb->msgout_buf[0] = ABORT; + srb->msg_count = 1; + DC395x_ENABLE_MSGOUT; + srb->state &= ~SRB_MSGIN; + srb->state |= SRB_MSGOUT; +} + + /** * dc395x_handle_interrupt - Handle an interrupt that has been confirmed to * have been triggered for this card. @@ -2583,11 +2600,6 @@ return 1; } -#define DC395x_ENABLE_MSGOUT \ - DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \ - srb->state |= SRB_MSGOUT - - /* reject_msg */ static inline void msgin_reject(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) @@ -2600,18 +2612,6 @@ dprintkl(KERN_INFO, "msgin_reject: 0x%02x <%02i-%i>\n", srb->msgin_buf[0], srb->dcb->target_id, srb->dcb->target_lun); -} - - -/* abort command */ -static inline void enable_msgout_abort(struct AdapterCtlBlk *acb, - struct ScsiReqBlk *srb) -{ - srb->msgout_buf[0] = ABORT; - srb->msg_count = 1; - DC395x_ENABLE_MSGOUT; - srb->state &= ~SRB_MSGIN; - srb->state |= SRB_MSGOUT; } diff -Nru a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c --- a/drivers/scsi/dmx3191d.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/dmx3191d.c 2004-09-06 16:37:53 -07:00 @@ -106,9 +106,10 @@ static int dmx3191d_release_resources(struct Scsi_Host *instance) { - release_region(instance->io_port, DMX3191D_REGION); if(instance->irq!=SCSI_IRQ_NONE) free_irq(instance->irq, instance); + NCR5380_exit(instance); + release_region(instance->io_port, DMX3191D_REGION); return 0; } diff -Nru a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c --- a/drivers/scsi/dtc.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/dtc.c 2004-09-06 16:37:54 -07:00 @@ -451,6 +451,7 @@ { if (shost->irq) free_irq(shost->irq, NULL); + NCR5380_exit(shost); if (shost->io_port && shost->n_io_port) release_region(shost->io_port, shost->n_io_port); scsi_unregister(shost); diff -Nru a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c --- a/drivers/scsi/eata_pio.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/eata_pio.c 2004-09-06 16:37:53 -07:00 @@ -59,6 +59,8 @@ #include #include #include +#include + #include #include @@ -511,8 +513,7 @@ HD(cmd)->state = RESET; spin_unlock_irq(host->host_lock); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(3 * HZ); + msleep(3000); spin_lock_irq(host->host_lock); DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: interrupts disabled, " "loops %d.\n", limit)); diff -Nru a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c --- a/drivers/scsi/fd_mcs.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/fd_mcs.c 2004-09-06 16:37:52 -07:00 @@ -78,6 +78,7 @@ **************************************************************************/ #include +#include #include #include #include @@ -288,7 +289,7 @@ static unsigned long addresses[] = { 0xc8000, 0xca000, 0xce000, 0xde000 }; static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; -static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; +static unsigned short interrupts[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; /* host information */ static int found = 0; @@ -297,16 +298,20 @@ static int user_fifo_count = 0; static int user_fifo_size = 0; -static void fd_mcs_setup(char *str, int *ints) +static int __init fd_mcs_setup(char *str) { static int done_setup = 0; + int ints[3]; + get_options(str, 3, ints); if (done_setup++ || ints[0] < 1 || ints[0] > 2 || ints[1] < 1 || ints[1] > 16) { printk("fd_mcs: usage: fd_mcs=FIFO_COUNT, FIFO_SIZE\n"); + return 0; } user_fifo_count = ints[0] >= 1 ? ints[1] : 0; user_fifo_size = ints[0] >= 2 ? ints[2] : 0; + return 1; } __setup("fd_mcs=", fd_mcs_setup); @@ -391,7 +396,7 @@ } else { bios = addresses[pos2 >> 6]; port = ports[(pos2 >> 4) & 0x03]; - irq = ints[(pos2 >> 1) & 0x07]; + irq = interrupts[(pos2 >> 1) & 0x07]; } if (irq) { diff -Nru a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c --- a/drivers/scsi/fdomain.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/fdomain.c 2004-09-06 16:37:54 -07:00 @@ -733,17 +733,20 @@ printk( " %x,", base ); #endif - for (flag = 0, i = 0; !flag && i < PORT_COUNT; i++) { - if (base == ports[i]) - ++flag; + for (i = 0; i < PORT_COUNT; i++) { + if (base == ports[i]) { + if (!request_region(base, 0x10, "fdomain")) + break; + if (!fdomain_is_valid_port(base)) { + release_region(base, 0x10); + break; + } + *irq = fdomain_get_irq( base ); + *iobase = base; + return 1; + } } - if (flag && fdomain_is_valid_port( base )) { - *irq = fdomain_get_irq( base ); - *iobase = base; - return 1; - } - /* This is a bad sign. It usually means that someone patched the BIOS signature list (the signatures variable) to contain a BIOS signature for a board *OTHER THAN* the TMC-1660/TMC-1680. */ @@ -764,7 +767,7 @@ for (i = 0; i < PORT_COUNT; i++) { base = ports[i]; - if (check_region( base, 0x10 )) { + if (!request_region(base, 0x10, "fdomain")) { #if DEBUG_DETECT printk( " (%x inuse),", base ); #endif @@ -773,7 +776,10 @@ #if DEBUG_DETECT printk( " %x,", base ); #endif - if ((flag = fdomain_is_valid_port( base ))) break; + flag = fdomain_is_valid_port(base); + if (flag) + break; + release_region(base, 0x10); } #if DEBUG_DETECT @@ -832,6 +838,9 @@ pci_base = pci_resource_start(pdev, 0); pci_irq = pdev->irq; + if (!request_region( pci_base, 0x10, "fdomain" )) + return 0; + /* Now we have the I/O base address and interrupt from the PCI configuration registers. */ @@ -844,8 +853,9 @@ " IRQ = %d, I/O base = 0x%x [0x%lx]\n", *irq, *iobase, pci_base ); #endif - if (!fdomain_is_valid_port( *iobase )) { + if (!fdomain_is_valid_port(pci_base)) { printk(KERN_ERR "scsi: PCI card detected, but driver not loaded (invalid port)\n" ); + release_region(pci_base, 0x10); return 0; } @@ -870,10 +880,16 @@ printk( "scsi: No BIOS, using port_base = 0x%x, irq = %d\n", port_base, interrupt_level ); #endif + if (!request_region(port_base, 0x10, "fdomain")) { + printk( "scsi: port 0x%x is busy\n", port_base ); + printk( "scsi: Bad LILO/INSMOD parameters?\n" ); + return NULL; + } if (!fdomain_is_valid_port( port_base )) { printk( "scsi: Cannot locate chip at port base 0x%x\n", port_base ); printk( "scsi: Bad LILO/INSMOD parameters?\n" ); + release_region(port_base, 0x10); return NULL; } } else { @@ -915,6 +931,7 @@ if (setup_called) { printk(KERN_ERR "scsi: Bad LILO/INSMOD parameters?\n"); } + release_region(port_base, 0x10); return NULL; } @@ -935,8 +952,10 @@ get resources. */ shpnt = scsi_register( tpnt, 0 ); - if(shpnt == NULL) + if(shpnt == NULL) { + release_region(port_base, 0x10); return NULL; + } shpnt->irq = interrupt_level; shpnt->io_port = port_base; scsi_set_device(shpnt, &pdev->dev); @@ -946,6 +965,7 @@ /* Log IRQ with kernel */ if (!interrupt_level) { printk(KERN_ERR "scsi: Card Detected, but driver not loaded (no IRQ)\n" ); + release_region(port_base, 0x10); return NULL; } else { /* Register the IRQ with the kernel */ @@ -967,13 +987,10 @@ printk(KERN_ERR " Send mail to faith@acm.org\n" ); } printk(KERN_ERR "scsi: Detected, but driver not loaded (IRQ)\n" ); + release_region(port_base, 0x10); return NULL; } } - - /* Log I/O ports with kernel */ - request_region( port_base, 0x10, "fdomain" ); - return shpnt; } diff -Nru a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c --- a/drivers/scsi/g_NCR5380.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/g_NCR5380.c 2004-09-06 16:37:51 -07:00 @@ -501,6 +501,10 @@ { NCR5380_local_declare(); NCR5380_setup(instance); + + if (instance->irq != SCSI_IRQ_NONE) + free_irq(instance->irq, NULL); + NCR5380_exit(instance); #ifndef CONFIG_SCSI_G_NCR5380_MEM release_region(instance->NCR5380_instance_name, instance->n_io_port); @@ -508,8 +512,6 @@ release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size); #endif - if (instance->irq != SCSI_IRQ_NONE) - free_irq(instance->irq, NULL); return 0; } diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c --- a/drivers/scsi/gdth.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/gdth.c 2004-09-06 16:37:53 -07:00 @@ -618,9 +618,6 @@ }; /* __initfunc, __initdata macros */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -#define __devinitdata -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #define GDTH_INITFUNC(type, func) type __init func #include diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c --- a/drivers/scsi/hosts.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/hosts.c 2004-09-06 16:37:50 -07:00 @@ -75,9 +75,9 @@ **/ void scsi_remove_host(struct Scsi_Host *shost) { + scsi_forget_host(shost); scsi_host_cancel(shost, 0); scsi_proc_host_rm(shost); - scsi_forget_host(shost); set_bit(SHOST_DEL, &shost->shost_state); diff -Nru a/drivers/scsi/ibmvscsi/Makefile b/drivers/scsi/ibmvscsi/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/Makefile 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,5 @@ +obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsic.o + +ibmvscsic-y += ibmvscsi.o +ibmvscsic-$(CONFIG_PPC_ISERIES) += iseries_vscsi.o +ibmvscsic-$(CONFIG_PPC_PSERIES) += rpa_vscsi.o diff -Nru a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1393 @@ +/* ------------------------------------------------------------ + * ibmvscsi.c + * (C) Copyright IBM Corporation 1994, 2004 + * Authors: Colin DeVilbiss (devilbis@us.ibm.com) + * Santiago Leon (santil@us.ibm.com) + * Dave Boutcher (sleddog@us.ibm.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * ------------------------------------------------------------ + * Emulation of a SCSI host adapter for Virtual I/O devices + * + * This driver supports the SCSI adapter implemented by the IBM + * Power5 firmware. That SCSI adapter is not a physical adapter, + * but allows Linux SCSI peripheral drivers to directly + * access devices in another logical partition on the physical system. + * + * The virtual adapter(s) are present in the open firmware device + * tree just like real adapters. + * + * One of the capabilities provided on these systems is the ability + * to DMA between partitions. The architecture states that for VSCSI, + * the server side is allowed to DMA to and from the client. The client + * is never trusted to DMA to or from the server directly. + * + * Messages are sent between partitions on a "Command/Response Queue" + * (CRQ), which is just a buffer of 16 byte entries in the receiver's + * Senders cannot access the buffer directly, but send messages by + * making a hypervisor call and passing in the 16 bytes. The hypervisor + * puts the message in the next 16 byte space in round-robbin fashion, + * turns on the high order bit of the message (the valid bit), and + * generates an interrupt to the receiver (if interrupts are turned on.) + * The receiver just turns off the valid bit when they have copied out + * the message. + * + * The VSCSI client builds a SCSI Remote Protocol (SRP) Information Unit + * (IU) (as defined in the T10 standard available at www.t10.org), gets + * a DMA address for the message, and sends it to the server as the + * payload of a CRQ message. The server DMAs the SRP IU and processes it, + * including doing any additional data transfers. When it is done, it + * DMAs the SRP response back to the same address as the request came from, + * and sends a CRQ message back to inform the client that the request has + * completed. + * + * Note that some of the underlying infrastructure is different between + * machines conforming to the "RS/6000 Platform Architecture" (RPA) and + * the older iSeries hypervisor models. To support both, some low level + * routines have been broken out into rpa_vscsi.c and iseries_vscsi.c. + * The Makefile should pick one, not two, not zero, of these. + * + * TODO: This is currently pretty tied to the IBM i/pSeries hypervisor + * interfaces. It would be really nice to abstract this above an RDMA + * layer. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ibmvscsi.h" + +/* The values below are somewhat arbitrary default values, but + * OS/400 will use 3 busses (disks, CDs, tapes, I think.) + * Note that there are 3 bits of channel value, 6 bits of id, and + * 5 bits of LUN. + */ +static int max_id = 64; +static int max_channel = 3; +static int init_timeout = 5; +static int max_requests = 50; + +#define IBMVSCSI_VERSION "1.5.1" + +MODULE_DESCRIPTION("IBM Virtual SCSI"); +MODULE_AUTHOR("Dave Boutcher"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(IBMVSCSI_VERSION); + +module_param_named(max_id, max_id, int, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(max_id, "Largest ID value for each channel"); +module_param_named(max_channel, max_channel, int, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(max_channel, "Largest channel value"); +module_param_named(init_timeout, init_timeout, int, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(init_timeout, "Initialization timeout in seconds"); +module_param_named(max_requests, max_requests, int, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(max_requests, "Maximum requests for this adapter"); + +/* ------------------------------------------------------------ + * Routines for the event pool and event structs + */ +/** + * initialize_event_pool: - Allocates and initializes the event pool for a host + * @pool: event_pool to be initialized + * @size: Number of events in pool + * @hostdata: ibmvscsi_host_data who owns the event pool + * + * Returns zero on success. +*/ +static int initialize_event_pool(struct event_pool *pool, + int size, struct ibmvscsi_host_data *hostdata) +{ + int i; + + pool->size = size; + pool->next = 0; + pool->events = kmalloc(pool->size * sizeof(*pool->events), GFP_KERNEL); + if (!pool->events) + return -ENOMEM; + memset(pool->events, 0x00, pool->size * sizeof(*pool->events)); + + pool->iu_storage = + dma_alloc_coherent(hostdata->dev, + pool->size * sizeof(*pool->iu_storage), + &pool->iu_token, 0); + if (!pool->iu_storage) { + kfree(pool->events); + return -ENOMEM; + } + + for (i = 0; i < pool->size; ++i) { + struct srp_event_struct *evt = &pool->events[i]; + memset(&evt->crq, 0x00, sizeof(evt->crq)); + atomic_set(&evt->free, 1); + evt->crq.valid = 0x80; + evt->crq.IU_length = sizeof(*evt->xfer_iu); + evt->crq.IU_data_ptr = pool->iu_token + + sizeof(*evt->xfer_iu) * i; + evt->xfer_iu = pool->iu_storage + i; + evt->hostdata = hostdata; + } + + return 0; +} + +/** + * release_event_pool: - Frees memory of an event pool of a host + * @pool: event_pool to be released + * @hostdata: ibmvscsi_host_data who owns the even pool + * + * Returns zero on success. +*/ +static void release_event_pool(struct event_pool *pool, + struct ibmvscsi_host_data *hostdata) +{ + int i, in_use = 0; + for (i = 0; i < pool->size; ++i) + if (atomic_read(&pool->events[i].free) != 1) + ++in_use; + if (in_use) + printk(KERN_WARNING + "ibmvscsi: releasing event pool with %d " + "events still in use?\n", in_use); + kfree(pool->events); + dma_free_coherent(hostdata->dev, + pool->size * sizeof(*pool->iu_storage), + pool->iu_storage, pool->iu_token); +} + +/** + * valid_event_struct: - Determines if event is valid. + * @pool: event_pool that contains the event + * @evt: srp_event_struct to be checked for validity + * + * Returns zero if event is invalid, one otherwise. +*/ +static int valid_event_struct(struct event_pool *pool, + struct srp_event_struct *evt) +{ + int index = evt - pool->events; + if (index < 0 || index >= pool->size) /* outside of bounds */ + return 0; + if (evt != pool->events + index) /* unaligned */ + return 0; + return 1; +} + +/** + * ibmvscsi_free-event_struct: - Changes status of event to "free" + * @pool: event_pool that contains the event + * @evt: srp_event_struct to be modified + * +*/ +static void free_event_struct(struct event_pool *pool, + struct srp_event_struct *evt) +{ + if (!valid_event_struct(pool, evt)) { + printk(KERN_ERR + "ibmvscsi: Freeing invalid event_struct %p " + "(not in pool %p)\n", evt, pool->events); + return; + } + if (atomic_inc_return(&evt->free) != 1) { + printk(KERN_ERR + "ibmvscsi: Freeing event_struct %p " + "which is not in use!\n", evt); + return; + } +} + +/** + * get_evt_struct: - Gets the next free event in pool + * @pool: event_pool that contains the events to be searched + * + * Returns the next event in "free" state, and NULL if none are free. + * Note that no synchronization is done here, we assume the host_lock + * will syncrhonze things. +*/ +static struct srp_event_struct *get_event_struct(struct event_pool *pool) +{ + int i; + int poolsize = pool->size; + int offset = pool->next; + + for (i = 0; i < poolsize; i++) { + offset = (offset + 1) % poolsize; + if (!atomic_dec_if_positive(&pool->events[offset].free)) { + pool->next = offset; + return &pool->events[offset]; + } + } + + printk(KERN_ERR "ibmvscsi: found no event struct in pool!\n"); + return NULL; +} + +/** + * init_event_struct: Initialize fields in an event struct that are always + * required. + * @evt: The event + * @done: Routine to call when the event is responded to + * @format: SRP or MAD format + * @timeout: timeout value set in the CRQ + */ +static void init_event_struct(struct srp_event_struct *evt_struct, + void (*done) (struct srp_event_struct *), + u8 format, + int timeout) +{ + evt_struct->cmnd = NULL; + evt_struct->cmnd_done = NULL; + evt_struct->crq.format = format; + evt_struct->crq.timeout = timeout; + evt_struct->done = done; +} + +/* ------------------------------------------------------------ + * Routines for receiving SCSI responses from the hosting partition + */ + +/** + * set_srp_direction: Set the fields in the srp related to data + * direction and number of buffers based on the direction in + * the scsi_cmnd and the number of buffers + */ +static void set_srp_direction(struct scsi_cmnd *cmd, + struct srp_cmd *srp_cmd, + int numbuf) +{ + if (numbuf == 0) + return; + + if (numbuf == 1) { + if (cmd->sc_data_direction == DMA_TO_DEVICE) + srp_cmd->data_out_format = SRP_DIRECT_BUFFER; + else + srp_cmd->data_in_format = SRP_DIRECT_BUFFER; + } else { + if (cmd->sc_data_direction == DMA_TO_DEVICE) { + srp_cmd->data_out_format = SRP_INDIRECT_BUFFER; + srp_cmd->data_out_count = numbuf; + } else { + srp_cmd->data_in_format = SRP_INDIRECT_BUFFER; + srp_cmd->data_in_count = numbuf; + } + } +} + +/** + * unmap_cmd_data: - Unmap data pointed in srp_cmd based on the format + * @cmd: srp_cmd whose additional_data member will be unmapped + * @dev: device for which the memory is mapped + * +*/ +static void unmap_cmd_data(struct srp_cmd *cmd, struct device *dev) +{ + int i; + + if ((cmd->data_out_format == SRP_NO_BUFFER) && + (cmd->data_in_format == SRP_NO_BUFFER)) + return; + else if ((cmd->data_out_format == SRP_DIRECT_BUFFER) || + (cmd->data_in_format == SRP_DIRECT_BUFFER)) { + struct memory_descriptor *data = + (struct memory_descriptor *)cmd->additional_data; + dma_unmap_single(dev, data->virtual_address, data->length, + DMA_BIDIRECTIONAL); + } else { + struct indirect_descriptor *indirect = + (struct indirect_descriptor *)cmd->additional_data; + int num_mapped = indirect->head.length / + sizeof(indirect->list[0]); + for (i = 0; i < num_mapped; ++i) { + struct memory_descriptor *data = &indirect->list[i]; + dma_unmap_single(dev, + data->virtual_address, + data->length, DMA_BIDIRECTIONAL); + } + } +} + +/** + * map_sg_data: - Maps dma for a scatterlist and initializes decriptor fields + * @cmd: Scsi_Cmnd with the scatterlist + * @srp_cmd: srp_cmd that contains the memory descriptor + * @dev: device for which to map dma memory + * + * Called by map_data_for_srp_cmd() when building srp cmd from scsi cmd. + * Returns 1 on success. +*/ +static int map_sg_data(struct scsi_cmnd *cmd, + struct srp_cmd *srp_cmd, struct device *dev) +{ + + int i, sg_mapped; + u64 total_length = 0; + struct scatterlist *sg = cmd->request_buffer; + struct memory_descriptor *data = + (struct memory_descriptor *)srp_cmd->additional_data; + struct indirect_descriptor *indirect = + (struct indirect_descriptor *)data; + + sg_mapped = dma_map_sg(dev, sg, cmd->use_sg, DMA_BIDIRECTIONAL); + + if (sg_mapped == 0) + return 0; + + set_srp_direction(cmd, srp_cmd, sg_mapped); + + /* special case; we can use a single direct descriptor */ + if (sg_mapped == 1) { + data->virtual_address = sg_dma_address(&sg[0]); + data->length = sg_dma_len(&sg[0]); + data->memory_handle = 0; + return 1; + } + + if (sg_mapped > MAX_INDIRECT_BUFS) { + printk(KERN_ERR + "ibmvscsi: More than %d mapped sg entries, got %d\n", + MAX_INDIRECT_BUFS, sg_mapped); + return 0; + } + + indirect->head.virtual_address = 0; + indirect->head.length = sg_mapped * sizeof(indirect->list[0]); + indirect->head.memory_handle = 0; + for (i = 0; i < sg_mapped; ++i) { + struct memory_descriptor *descr = &indirect->list[i]; + struct scatterlist *sg_entry = &sg[i]; + descr->virtual_address = sg_dma_address(sg_entry); + descr->length = sg_dma_len(sg_entry); + descr->memory_handle = 0; + total_length += sg_dma_len(sg_entry); + } + indirect->total_length = total_length; + + return 1; +} + +/** + * map_single_data: - Maps memory and initializes memory decriptor fields + * @cmd: struct scsi_cmnd with the memory to be mapped + * @srp_cmd: srp_cmd that contains the memory descriptor + * @dev: device for which to map dma memory + * + * Called by map_data_for_srp_cmd() when building srp cmd from scsi cmd. + * Returns 1 on success. +*/ +static int map_single_data(struct scsi_cmnd *cmd, + struct srp_cmd *srp_cmd, struct device *dev) +{ + struct memory_descriptor *data = + (struct memory_descriptor *)srp_cmd->additional_data; + + data->virtual_address = + dma_map_single(dev, cmd->request_buffer, + cmd->request_bufflen, + DMA_BIDIRECTIONAL); + if (dma_mapping_error(data->virtual_address)) { + printk(KERN_ERR + "ibmvscsi: Unable to map request_buffer for command!\n"); + return 0; + } + data->length = cmd->request_bufflen; + data->memory_handle = 0; + + set_srp_direction(cmd, srp_cmd, 1); + + return 1; +} + +/** + * map_data_for_srp_cmd: - Calls functions to map data for srp cmds + * @cmd: struct scsi_cmnd with the memory to be mapped + * @srp_cmd: srp_cmd that contains the memory descriptor + * @dev: dma device for which to map dma memory + * + * Called by scsi_cmd_to_srp_cmd() when converting scsi cmds to srp cmds + * Returns 1 on success. +*/ +static int map_data_for_srp_cmd(struct scsi_cmnd *cmd, + struct srp_cmd *srp_cmd, struct device *dev) +{ + switch (cmd->sc_data_direction) { + case DMA_FROM_DEVICE: + case DMA_TO_DEVICE: + break; + case DMA_NONE: + return 1; + case DMA_BIDIRECTIONAL: + printk(KERN_ERR + "ibmvscsi: Can't map DMA_BIDIRECTIONAL to read/write\n"); + return 0; + default: + printk(KERN_ERR + "ibmvscsi: Unknown data direction 0x%02x; can't map!\n", + cmd->sc_data_direction); + return 0; + } + + if (!cmd->request_buffer) + return 1; + if (cmd->use_sg) + return map_sg_data(cmd, srp_cmd, dev); + return map_single_data(cmd, srp_cmd, dev); +} + +/* ------------------------------------------------------------ + * Routines for sending and receiving SRPs + */ +/** + * ibmvscsi_send_srp_event: - Transforms event to u64 array and calls send_crq() + * @evt_struct: evt_struct to be sent + * @hostdata: ibmvscsi_host_data of host + * + * Returns the value returned from ibmvscsi_send_crq(). (Zero for success) + * Note that this routine assumes that host_lock is held for synchronization +*/ +static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, + struct ibmvscsi_host_data *hostdata) +{ + struct scsi_cmnd *cmnd = evt_struct->cmnd; + u64 *crq_as_u64 = (u64 *) &evt_struct->crq; + int rc; + + /* If we have exhausted our request limit, just fail this request. + * Note that there are rare cases involving driver generated requests + * (such as task management requests) that the mid layer may think we + * can handle more requests (can_queue) when we actually can't + */ + if ((evt_struct->crq.format == VIOSRP_SRP_FORMAT) && + (atomic_dec_if_positive(&hostdata->request_limit) < 0)) { + /* See if the adapter is disabled */ + if (atomic_read(&hostdata->request_limit) < 0) { + if (cmnd) + cmnd->result = DID_ERROR << 16; + if (evt_struct->cmnd_done) + evt_struct->cmnd_done(cmnd); + unmap_cmd_data(&evt_struct->iu.srp.cmd, + hostdata->dev); + free_event_struct(&hostdata->pool, evt_struct); + return 0; + } else { + printk("ibmvscsi: Warning, request_limit exceeded\n"); + unmap_cmd_data(&evt_struct->iu.srp.cmd, + hostdata->dev); + free_event_struct(&hostdata->pool, evt_struct); + return SCSI_MLQUEUE_HOST_BUSY; + } + } + + /* Copy the IU into the transfer area */ + *evt_struct->xfer_iu = evt_struct->iu; + evt_struct->xfer_iu->srp.generic.tag = (u64)evt_struct; + + /* Add this to the sent list. We need to do this + * before we actually send + * in case it comes back REALLY fast + */ + list_add_tail(&evt_struct->list, &hostdata->sent); + + if ((rc = + ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1])) != 0) { + list_del(&evt_struct->list); + + cmnd = evt_struct->cmnd; + printk(KERN_ERR "ibmvscsi: failed to send event struct rc %d\n", + rc); + unmap_cmd_data(&evt_struct->iu.srp.cmd, hostdata->dev); + free_event_struct(&hostdata->pool, evt_struct); + if (cmnd) + cmnd->result = DID_ERROR << 16; + if (evt_struct->cmnd_done) + evt_struct->cmnd_done(cmnd); + } + + return 0; +} + +/** + * handle_cmd_rsp: - Handle responses from commands + * @evt_struct: srp_event_struct to be handled + * + * Used as a callback by when sending scsi cmds. + * Gets called by ibmvscsi_handle_crq() +*/ +static void handle_cmd_rsp(struct srp_event_struct *evt_struct) +{ + struct srp_rsp *rsp = &evt_struct->xfer_iu->srp.rsp; + struct scsi_cmnd *cmnd = evt_struct->cmnd; + + if (cmnd) { + cmnd->result = rsp->status; + if (((cmnd->result >> 1) & 0x1f) == CHECK_CONDITION) + memcpy(cmnd->sense_buffer, + rsp->sense_and_response_data, + rsp->sense_data_list_length); + unmap_cmd_data(&evt_struct->iu.srp.cmd, + evt_struct->hostdata->dev); + + if (rsp->doover) + cmnd->resid = rsp->data_out_residual_count; + else if (rsp->diover) + cmnd->resid = rsp->data_in_residual_count; + } + + if (evt_struct->cmnd_done) + evt_struct->cmnd_done(cmnd); +} + +/** + * lun_from_dev: - Returns the lun of the scsi device + * @dev: struct scsi_device + * +*/ +static inline u16 lun_from_dev(struct scsi_device *dev) +{ + return (0x2 << 14) | (dev->id << 8) | (dev->channel << 5) | dev->lun; +} + +/** + * ibmvscsi_queue: - The queuecommand function of the scsi template + * @cmd: struct scsi_cmnd to be executed + * @done: Callback function to be called when cmd is completed +*/ +static int ibmvscsi_queuecommand(struct scsi_cmnd *cmnd, + void (*done) (struct scsi_cmnd *)) +{ + struct srp_cmd *srp_cmd; + struct srp_event_struct *evt_struct; + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)&cmnd->device->host->hostdata; + u16 lun = lun_from_dev(cmnd->device); + + evt_struct = get_event_struct(&hostdata->pool); + if (!evt_struct) + return SCSI_MLQUEUE_HOST_BUSY; + + init_event_struct(evt_struct, + handle_cmd_rsp, + VIOSRP_SRP_FORMAT, + cmnd->timeout); + + evt_struct->cmnd = cmnd; + evt_struct->cmnd_done = done; + + /* Set up the actual SRP IU */ + srp_cmd = &evt_struct->iu.srp.cmd; + memset(srp_cmd, 0x00, sizeof(*srp_cmd)); + srp_cmd->type = SRP_CMD_TYPE; + memcpy(srp_cmd->cdb, cmnd->cmnd, sizeof(cmnd->cmnd)); + srp_cmd->lun = ((u64) lun) << 48; + + if (!map_data_for_srp_cmd(cmnd, srp_cmd, hostdata->dev)) { + printk(KERN_ERR "ibmvscsi: couldn't convert cmd to srp_cmd\n"); + free_event_struct(&hostdata->pool, evt_struct); + return SCSI_MLQUEUE_HOST_BUSY; + } + + /* Fix up dma address of the buffer itself */ + if ((srp_cmd->data_out_format == SRP_INDIRECT_BUFFER) || + (srp_cmd->data_in_format == SRP_INDIRECT_BUFFER)) { + struct indirect_descriptor *indirect = + (struct indirect_descriptor *)srp_cmd->additional_data; + indirect->head.virtual_address = evt_struct->crq.IU_data_ptr + + offsetof(struct srp_cmd, additional_data) + + offsetof(struct indirect_descriptor, list); + } + + return ibmvscsi_send_srp_event(evt_struct, hostdata); +} + +/* ------------------------------------------------------------ + * Routines for driver initialization + */ +/** + * adapter_info_rsp: - Handle response to MAD adapter info request + * @evt_struct: srp_event_struct with the response + * + * Used as a "done" callback by when sending adapter_info. Gets called + * by ibmvscsi_handle_crq() +*/ +static void adapter_info_rsp(struct srp_event_struct *evt_struct) +{ + struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; + dma_unmap_single(hostdata->dev, + evt_struct->iu.mad.adapter_info.buffer, + evt_struct->iu.mad.adapter_info.common.length, + DMA_BIDIRECTIONAL); + + if (evt_struct->xfer_iu->mad.adapter_info.common.status) { + printk("ibmvscsi: error %d getting adapter info\n", + evt_struct->xfer_iu->mad.adapter_info.common.status); + } else { + printk("ibmvscsi: host srp version: %s, " + "host partition %s (%d), OS %d\n", + hostdata->madapter_info.srp_version, + hostdata->madapter_info.partition_name, + hostdata->madapter_info.partition_number, + hostdata->madapter_info.os_type); + } +} + +/** + * send_mad_adapter_info: - Sends the mad adapter info request + * and stores the result so it can be retrieved with + * sysfs. We COULD consider causing a failure if the + * returned SRP version doesn't match ours. + * @hostdata: ibmvscsi_host_data of host + * + * Returns zero if successful. +*/ +static void send_mad_adapter_info(struct ibmvscsi_host_data *hostdata) +{ + struct viosrp_adapter_info *req; + struct srp_event_struct *evt_struct; + + memset(&hostdata->madapter_info, 0x00, sizeof(hostdata->madapter_info)); + + evt_struct = get_event_struct(&hostdata->pool); + if (!evt_struct) { + printk(KERN_ERR "ibmvscsi: couldn't allocate an event " + "for ADAPTER_INFO_REQ!\n"); + return; + } + + init_event_struct(evt_struct, + adapter_info_rsp, + VIOSRP_MAD_FORMAT, + init_timeout * HZ); + + req = &evt_struct->iu.mad.adapter_info; + memset(req, 0x00, sizeof(*req)); + + req->common.type = VIOSRP_ADAPTER_INFO_TYPE; + req->common.length = sizeof(hostdata->madapter_info); + req->buffer = dma_map_single(hostdata->dev, + &hostdata->madapter_info, + sizeof(hostdata->madapter_info), + DMA_BIDIRECTIONAL); + + if (dma_mapping_error(req->buffer)) { + printk(KERN_ERR + "ibmvscsi: Unable to map request_buffer " + "for adapter_info!\n"); + free_event_struct(&hostdata->pool, evt_struct); + return; + } + + if (ibmvscsi_send_srp_event(evt_struct, hostdata)) + printk(KERN_ERR "ibmvscsi: couldn't send ADAPTER_INFO_REQ!\n"); +}; + +/** + * login_rsp: - Handle response to SRP login request + * @evt_struct: srp_event_struct with the response + * + * Used as a "done" callback by when sending srp_login. Gets called + * by ibmvscsi_handle_crq() +*/ +static void login_rsp(struct srp_event_struct *evt_struct) +{ + struct ibmvscsi_host_data *hostdata = evt_struct->hostdata; + switch (evt_struct->xfer_iu->srp.generic.type) { + case SRP_LOGIN_RSP_TYPE: /* it worked! */ + break; + case SRP_LOGIN_REJ_TYPE: /* refused! */ + printk(KERN_INFO "ibmvscsi: SRP_LOGIN_REQ rejected\n"); + /* Login failed. */ + atomic_set(&hostdata->request_limit, -1); + return; + default: + printk(KERN_ERR + "ibmvscsi: Invalid login response typecode 0x%02x!\n", + evt_struct->xfer_iu->srp.generic.type); + /* Login failed. */ + atomic_set(&hostdata->request_limit, -1); + return; + } + + printk(KERN_INFO "ibmvscsi: SRP_LOGIN succeeded\n"); + + if (evt_struct->xfer_iu->srp.login_rsp.request_limit_delta > + (max_requests - 2)) + evt_struct->xfer_iu->srp.login_rsp.request_limit_delta = + max_requests - 2; + + /* Now we know what the real request-limit is */ + atomic_set(&hostdata->request_limit, + evt_struct->xfer_iu->srp.login_rsp.request_limit_delta); + + hostdata->host->can_queue = + evt_struct->xfer_iu->srp.login_rsp.request_limit_delta - 2; + + if (hostdata->host->can_queue < 1) { + printk(KERN_ERR "ibmvscsi: Invalid request_limit_delta\n"); + return; + } + + send_mad_adapter_info(hostdata); + return; +} + +/** + * send_srp_login: - Sends the srp login + * @hostdata: ibmvscsi_host_data of host + * + * Returns zero if successful. +*/ +static int send_srp_login(struct ibmvscsi_host_data *hostdata) +{ + int rc; + unsigned long flags; + struct srp_login_req *login; + struct srp_event_struct *evt_struct = get_event_struct(&hostdata->pool); + if (!evt_struct) { + printk(KERN_ERR + "ibmvscsi: couldn't allocate an event for login req!\n"); + return FAILED; + } + + init_event_struct(evt_struct, + login_rsp, + VIOSRP_SRP_FORMAT, + init_timeout * HZ); + + login = &evt_struct->iu.srp.login_req; + login->type = SRP_LOGIN_REQ_TYPE; + login->max_requested_initiator_to_target_iulen = sizeof(union srp_iu); + login->required_buffer_formats = 0x0006; + + /* Start out with a request limit of 1, since this is negotiated in + * the login request we are just sending + */ + atomic_set(&hostdata->request_limit, 1); + + spin_lock_irqsave(hostdata->host->host_lock, flags); + rc = ibmvscsi_send_srp_event(evt_struct, hostdata); + spin_unlock_irqrestore(hostdata->host->host_lock, flags); + return rc; +}; + +/** + * sync_completion: Signal that a synchronous command has completed + * Note that after returning from this call, the evt_struct is freed. + * the caller waiting on this completion shouldn't touch the evt_struct + * again. + */ +static void sync_completion(struct srp_event_struct *evt_struct) +{ + complete(&evt_struct->comp); +} + +/** + * ibmvscsi_abort: Abort a command...from scsi host template + * send this over to the server and wait synchronously for the response + */ +static int ibmvscsi_eh_abort_handler(struct scsi_cmnd *cmd) +{ + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)cmd->device->host->hostdata; + struct srp_tsk_mgmt *tsk_mgmt; + struct srp_event_struct *evt; + struct srp_event_struct *tmp_evt, *found_evt; + u16 lun = lun_from_dev(cmd->device); + + /* First, find this command in our sent list so we can figure + * out the correct tag + */ + found_evt = NULL; + list_for_each_entry(tmp_evt, &hostdata->sent, list) { + if (tmp_evt->cmnd == cmd) { + found_evt = tmp_evt; + break; + } + } + + if (!found_evt) + return FAILED; + + evt = get_event_struct(&hostdata->pool); + if (evt == NULL) { + printk(KERN_ERR "ibmvscsi: failed to allocate abort event\n"); + return FAILED; + } + + init_event_struct(evt, + sync_completion, + VIOSRP_SRP_FORMAT, + init_timeout * HZ); + + tsk_mgmt = &evt->iu.srp.tsk_mgmt; + + /* Set up an abort SRP command */ + memset(tsk_mgmt, 0x00, sizeof(*tsk_mgmt)); + tsk_mgmt->type = SRP_TSK_MGMT_TYPE; + tsk_mgmt->lun = ((u64) lun) << 48; + tsk_mgmt->task_mgmt_flags = 0x01; /* ABORT TASK */ + tsk_mgmt->managed_task_tag = (u64) found_evt; + + printk(KERN_INFO "ibmvscsi: aborting command. lun 0x%lx, tag 0x%lx\n", + tsk_mgmt->lun, tsk_mgmt->managed_task_tag); + + init_completion(&evt->comp); + if (ibmvscsi_send_srp_event(evt, hostdata) != 0) { + printk(KERN_ERR "ibmvscsi: failed to send abort() event\n"); + return FAILED; + } + + spin_unlock_irq(hostdata->host->host_lock); + wait_for_completion(&evt->comp); + spin_lock_irq(hostdata->host->host_lock); + + /* Because we dropped the spinlock above, it's possible + * The event is no longer in our list. Make sure it didn't + * complete while we were aborting + */ + found_evt = NULL; + list_for_each_entry(tmp_evt, &hostdata->sent, list) { + if (tmp_evt->cmnd == cmd) { + found_evt = tmp_evt; + break; + } + } + + printk(KERN_INFO + "ibmvscsi: successfully aborted task tag 0x%lx\n", + tsk_mgmt->managed_task_tag); + + if (found_evt == NULL) + return SUCCESS; + + cmd->result = (DID_ABORT << 16); + list_del(&found_evt->list); + unmap_cmd_data(&found_evt->iu.srp.cmd, found_evt->hostdata->dev); + free_event_struct(&found_evt->hostdata->pool, found_evt); + atomic_inc(&hostdata->request_limit); + return SUCCESS; +} + +/** + * ibmvscsi_eh_device_reset_handler: Reset a single LUN...from scsi host + * template send this over to the server and wait synchronously for the + * response + */ +static int ibmvscsi_eh_device_reset_handler(struct scsi_cmnd *cmd) +{ + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)cmd->device->host->hostdata; + + struct srp_tsk_mgmt *tsk_mgmt; + struct srp_event_struct *evt; + struct srp_event_struct *tmp_evt, *pos; + u16 lun = lun_from_dev(cmd->device); + + evt = get_event_struct(&hostdata->pool); + if (evt == NULL) { + printk(KERN_ERR "ibmvscsi: failed to allocate reset event\n"); + return FAILED; + } + + init_event_struct(evt, + sync_completion, + VIOSRP_SRP_FORMAT, + init_timeout * HZ); + + tsk_mgmt = &evt->iu.srp.tsk_mgmt; + + /* Set up a lun reset SRP command */ + memset(tsk_mgmt, 0x00, sizeof(*tsk_mgmt)); + tsk_mgmt->type = SRP_TSK_MGMT_TYPE; + tsk_mgmt->lun = ((u64) lun) << 48; + tsk_mgmt->task_mgmt_flags = 0x08; /* LUN RESET */ + + printk(KERN_INFO "ibmvscsi: resetting device. lun 0x%lx\n", + tsk_mgmt->lun); + + init_completion(&evt->comp); + if (ibmvscsi_send_srp_event(evt, hostdata) != 0) { + printk(KERN_ERR "ibmvscsi: failed to send reset event\n"); + return FAILED; + } + + spin_unlock_irq(hostdata->host->host_lock); + wait_for_completion(&evt->comp); + spin_lock_irq(hostdata->host->host_lock); + + /* We need to find all commands for this LUN that have not yet been + * responded to, and fail them with DID_RESET + */ + list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) { + if ((tmp_evt->cmnd) && (tmp_evt->cmnd->device == cmd->device)) { + if (tmp_evt->cmnd) + tmp_evt->cmnd->result = (DID_RESET << 16); + list_del(&tmp_evt->list); + unmap_cmd_data(&tmp_evt->iu.srp.cmd, tmp_evt->hostdata->dev); + free_event_struct(&tmp_evt->hostdata->pool, + tmp_evt); + atomic_inc(&hostdata->request_limit); + if (tmp_evt->cmnd_done) + tmp_evt->cmnd_done(tmp_evt->cmnd); + else if (tmp_evt->done) + tmp_evt->done(tmp_evt); + } + } + return SUCCESS; +} + +/** + * purge_requests: Our virtual adapter just shut down. purge any sent requests + * @hostdata: the adapter + */ +static void purge_requests(struct ibmvscsi_host_data *hostdata) +{ + struct srp_event_struct *tmp_evt, *pos; + unsigned long flags; + + spin_lock_irqsave(hostdata->host->host_lock, flags); + list_for_each_entry_safe(tmp_evt, pos, &hostdata->sent, list) { + list_del(&tmp_evt->list); + if (tmp_evt->cmnd) { + tmp_evt->cmnd->result = (DID_ERROR << 16); + unmap_cmd_data(&tmp_evt->iu.srp.cmd, + tmp_evt->hostdata->dev); + if (tmp_evt->cmnd_done) + tmp_evt->cmnd_done(tmp_evt->cmnd); + } else { + if (tmp_evt->done) { + tmp_evt->done(tmp_evt); + } + } + free_event_struct(&tmp_evt->hostdata->pool, tmp_evt); + } + spin_unlock_irqrestore(hostdata->host->host_lock, flags); +} + +/** + * ibmvscsi_handle_crq: - Handles and frees received events in the CRQ + * @crq: Command/Response queue + * @hostdata: ibmvscsi_host_data of host + * +*/ +void ibmvscsi_handle_crq(struct viosrp_crq *crq, + struct ibmvscsi_host_data *hostdata) +{ + unsigned long flags; + struct srp_event_struct *evt_struct = + (struct srp_event_struct *)crq->IU_data_ptr; + switch (crq->valid) { + case 0xC0: /* initialization */ + switch (crq->format) { + case 0x01: /* Initialization message */ + printk(KERN_INFO "ibmvscsi: partner initialized\n"); + /* Send back a response */ + if (ibmvscsi_send_crq(hostdata, + 0xC002000000000000LL, 0) == 0) { + /* Now login */ + send_srp_login(hostdata); + } else { + printk(KERN_ERR + "ibmvscsi: Unable to send init rsp\n"); + } + + break; + case 0x02: /* Initialization response */ + printk(KERN_INFO + "ibmvscsi: partner initialization complete\n"); + + /* Now login */ + send_srp_login(hostdata); + break; + default: + printk(KERN_ERR "ibmvscsi: unknown crq message type\n"); + } + return; + case 0xFF: /* Hypervisor telling us the connection is closed */ + printk(KERN_INFO "ibmvscsi: Virtual adapter failed!\n"); + + atomic_set(&hostdata->request_limit, -1); + purge_requests(hostdata); + ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata); + return; + case 0x80: /* real payload */ + break; + default: + printk(KERN_ERR + "ibmvscsi: got an invalid message type 0x%02x\n", + crq->valid); + return; + } + + /* The only kind of payload CRQs we should get are responses to + * things we send. Make sure this response is to something we + * actually sent + */ + if (!valid_event_struct(&hostdata->pool, evt_struct)) { + printk(KERN_ERR + "ibmvscsi: returned correlation_token 0x%p is invalid!\n", + (void *)crq->IU_data_ptr); + return; + } + + if (crq->format == VIOSRP_SRP_FORMAT) + atomic_add(evt_struct->xfer_iu->srp.rsp.request_limit_delta, + &hostdata->request_limit); + + if (evt_struct->done) + evt_struct->done(evt_struct); + else + printk(KERN_ERR + "ibmvscsi: returned done() is NULL; not running it!\n"); + + /* + * Lock the host_lock before messing with these structures, since we + * are running in a task context + */ + spin_lock_irqsave(evt_struct->hostdata->host->host_lock, flags); + list_del(&evt_struct->list); + free_event_struct(&evt_struct->hostdata->pool, evt_struct); + spin_unlock_irqrestore(evt_struct->hostdata->host->host_lock, flags); +} + +/** + * ibmvscsi_get_host_config: Send the command to the server to get host + * configuration data. The data is opaque to us. + */ +static int ibmvscsi_do_host_config(struct ibmvscsi_host_data *hostdata, + unsigned char *buffer, int length) +{ + struct viosrp_host_config *host_config; + struct srp_event_struct *evt_struct; + int rc; + + evt_struct = get_event_struct(&hostdata->pool); + if (!evt_struct) { + printk(KERN_ERR + "ibmvscsi: could't allocate event for HOST_CONFIG!\n"); + return -1; + } + + init_event_struct(evt_struct, + sync_completion, + VIOSRP_MAD_FORMAT, + init_timeout * HZ); + + host_config = &evt_struct->iu.mad.host_config; + + /* Set up a lun reset SRP command */ + memset(host_config, 0x00, sizeof(*host_config)); + host_config->common.type = VIOSRP_HOST_CONFIG_TYPE; + host_config->common.length = length; + host_config->buffer = dma_map_single(hostdata->dev, buffer, length, + DMA_BIDIRECTIONAL); + + if (dma_mapping_error(host_config->buffer)) { + printk(KERN_ERR + "ibmvscsi: dma_mapping error " "getting host config\n"); + free_event_struct(&hostdata->pool, evt_struct); + return -1; + } + + init_completion(&evt_struct->comp); + rc = ibmvscsi_send_srp_event(evt_struct, hostdata); + if (rc == 0) { + wait_for_completion(&evt_struct->comp); + dma_unmap_single(hostdata->dev, host_config->buffer, + length, DMA_BIDIRECTIONAL); + } + + return rc; +} + +/* ------------------------------------------------------------ + * sysfs attributes + */ +static ssize_t show_host_srp_version(struct class_device *class_dev, char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + int len; + + len = snprintf(buf, PAGE_SIZE, "%s\n", + hostdata->madapter_info.srp_version); + return len; +} + +static struct class_device_attribute ibmvscsi_host_srp_version = { + .attr = { + .name = "srp_version", + .mode = S_IRUGO, + }, + .show = show_host_srp_version, +}; + +static ssize_t show_host_partition_name(struct class_device *class_dev, + char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + int len; + + len = snprintf(buf, PAGE_SIZE, "%s\n", + hostdata->madapter_info.partition_name); + return len; +} + +static struct class_device_attribute ibmvscsi_host_partition_name = { + .attr = { + .name = "partition_name", + .mode = S_IRUGO, + }, + .show = show_host_partition_name, +}; + +static ssize_t show_host_partition_number(struct class_device *class_dev, + char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + int len; + + len = snprintf(buf, PAGE_SIZE, "%d\n", + hostdata->madapter_info.partition_number); + return len; +} + +static struct class_device_attribute ibmvscsi_host_partition_number = { + .attr = { + .name = "partition_number", + .mode = S_IRUGO, + }, + .show = show_host_partition_number, +}; + +static ssize_t show_host_mad_version(struct class_device *class_dev, char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + int len; + + len = snprintf(buf, PAGE_SIZE, "%d\n", + hostdata->madapter_info.mad_version); + return len; +} + +static struct class_device_attribute ibmvscsi_host_mad_version = { + .attr = { + .name = "mad_version", + .mode = S_IRUGO, + }, + .show = show_host_mad_version, +}; + +static ssize_t show_host_os_type(struct class_device *class_dev, char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + int len; + + len = snprintf(buf, PAGE_SIZE, "%d\n", hostdata->madapter_info.os_type); + return len; +} + +static struct class_device_attribute ibmvscsi_host_os_type = { + .attr = { + .name = "os_type", + .mode = S_IRUGO, + }, + .show = show_host_os_type, +}; + +static ssize_t show_host_config(struct class_device *class_dev, char *buf) +{ + struct Scsi_Host *shost = class_to_shost(class_dev); + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)shost->hostdata; + + /* returns null-terminated host config data */ + if (ibmvscsi_do_host_config(hostdata, buf, PAGE_SIZE) == 0) + return strlen(buf); + else + return 0; +} + +static struct class_device_attribute ibmvscsi_host_config = { + .attr = { + .name = "config", + .mode = S_IRUGO, + }, + .show = show_host_config, +}; + +static struct class_device_attribute *ibmvscsi_attrs[] = { + &ibmvscsi_host_srp_version, + &ibmvscsi_host_partition_name, + &ibmvscsi_host_partition_number, + &ibmvscsi_host_mad_version, + &ibmvscsi_host_os_type, + &ibmvscsi_host_config, + NULL +}; + +/* ------------------------------------------------------------ + * SCSI driver registration + */ +static struct scsi_host_template driver_template = { + .module = THIS_MODULE, + .name = "IBM POWER Virtual SCSI Adapter " IBMVSCSI_VERSION, + .proc_name = "ibmvscsi", + .queuecommand = ibmvscsi_queuecommand, + .eh_abort_handler = ibmvscsi_eh_abort_handler, + .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler, + .cmd_per_lun = 16, + .can_queue = 1, /* Updated after SRP_LOGIN */ + .this_id = -1, + .sg_tablesize = MAX_INDIRECT_BUFS, + .use_clustering = ENABLE_CLUSTERING, + .shost_attrs = ibmvscsi_attrs, +}; + +/** + * Called by bus code for each adapter + */ +static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) +{ + struct ibmvscsi_host_data *hostdata; + struct Scsi_Host *host; + struct device *dev = &vdev->dev; + unsigned long wait_switch = 0; + + vdev->dev.driver_data = NULL; + + host = scsi_host_alloc(&driver_template, sizeof(*hostdata)); + if (!host) { + printk(KERN_ERR "ibmvscsi: couldn't allocate host data\n"); + goto scsi_host_alloc_failed; + } + + hostdata = (struct ibmvscsi_host_data *)host->hostdata; + memset(hostdata, 0x00, sizeof(*hostdata)); + INIT_LIST_HEAD(&hostdata->sent); + hostdata->host = host; + hostdata->dev = dev; + atomic_set(&hostdata->request_limit, -1); + + if (ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, + max_requests) != 0) { + printk(KERN_ERR "ibmvscsi: couldn't initialize crq\n"); + goto init_crq_failed; + } + if (initialize_event_pool(&hostdata->pool, max_requests, hostdata) != 0) { + printk(KERN_ERR "ibmvscsi: couldn't initialize event pool\n"); + goto init_pool_failed; + } + + host->max_lun = 8; + host->max_id = max_id; + host->max_channel = max_channel; + + if (scsi_add_host(hostdata->host, hostdata->dev)) + goto add_host_failed; + + /* Try to send an initialization message. Note that this is allowed + * to fail if the other end is not acive. In that case we don't + * want to scan + */ + if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0) { + /* + * Wait around max init_timeout secs for the adapter to finish + * initializing. When we are done initializing, we will have a + * valid request_limit. We don't want Linux scanning before + * we are ready. + */ + for (wait_switch = jiffies + (init_timeout * HZ); + time_before(jiffies, wait_switch) && + atomic_read(&hostdata->request_limit) < 0;) { + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 100); + } + + /* if we now have a valid request_limit, initiate a scan */ + if (atomic_read(&hostdata->request_limit) > 0) + scsi_scan_host(host); + } + + vdev->dev.driver_data = hostdata; + return 0; + + add_host_failed: + release_event_pool(&hostdata->pool, hostdata); + init_pool_failed: + ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, max_requests); + init_crq_failed: + scsi_host_put(host); + scsi_host_alloc_failed: + return -1; +} + +static int ibmvscsi_remove(struct vio_dev *vdev) +{ + struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data; + release_event_pool(&hostdata->pool, hostdata); + ibmvscsi_release_crq_queue(&hostdata->queue, hostdata, + max_requests); + + scsi_remove_host(hostdata->host); + scsi_host_put(hostdata->host); + + return 0; +} + +/** + * ibmvscsi_device_table: Used by vio.c to match devices in the device tree we + * support. + */ +static struct vio_device_id ibmvscsi_device_table[] __devinitdata = { + {"vscsi", "IBM,v-scsi"}, + {0,} +}; + +MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table); +static struct vio_driver ibmvscsi_driver = { + .name = "ibmvscsi", + .id_table = ibmvscsi_device_table, + .probe = ibmvscsi_probe, + .remove = ibmvscsi_remove +}; + +int __init ibmvscsi_module_init(void) +{ + return vio_register_driver(&ibmvscsi_driver); +} + +void __exit ibmvscsi_module_exit(void) +{ + vio_unregister_driver(&ibmvscsi_driver); +} + +module_init(ibmvscsi_module_init); +module_exit(ibmvscsi_module_exit); diff -Nru a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,108 @@ +/* ------------------------------------------------------------ + * ibmvscsi.h + * (C) Copyright IBM Corporation 1994, 2003 + * Authors: Colin DeVilbiss (devilbis@us.ibm.com) + * Santiago Leon (santil@us.ibm.com) + * Dave Boutcher (sleddog@us.ibm.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * ------------------------------------------------------------ + * Emulation of a SCSI host adapter for Virtual I/O devices + * + * This driver allows the Linux SCSI peripheral drivers to directly + * access devices in the hosting partition, either on an iSeries + * hypervisor system or a converged hypervisor system. + */ +#ifndef IBMVSCSI_H +#define IBMVSCSI_H +#include +#include +#include +#include +#include "viosrp.h" + +struct scsi_cmnd; +struct Scsi_Host; + +/* Number of indirect bufs...the list of these has to fit in the + * additional data of the srp_cmd struct along with the indirect + * descriptor + */ +#define MAX_INDIRECT_BUFS 10 + +/* ------------------------------------------------------------ + * Data Structures + */ +/* an RPA command/response transport queue */ +struct crq_queue { + struct viosrp_crq *msgs; + int size, cur; + dma_addr_t msg_token; + spinlock_t lock; +}; + +/* a unit of work for the hosting partition */ +struct srp_event_struct { + union viosrp_iu *xfer_iu; + struct scsi_cmnd *cmnd; + struct list_head list; + void (*done) (struct srp_event_struct *); + struct viosrp_crq crq; + struct ibmvscsi_host_data *hostdata; + atomic_t free; + union viosrp_iu iu; + void (*cmnd_done) (struct scsi_cmnd *); + struct completion comp; +}; + +/* a pool of event structs for use */ +struct event_pool { + struct srp_event_struct *events; + u32 size; + int next; + union viosrp_iu *iu_storage; + dma_addr_t iu_token; +}; + +/* all driver data associated with a host adapter */ +struct ibmvscsi_host_data { + atomic_t request_limit; + struct device *dev; + struct event_pool pool; + struct crq_queue queue; + struct tasklet_struct srp_task; + struct list_head sent; + struct Scsi_Host *host; + struct mad_adapter_info_data madapter_info; +}; + +/* routines for managing a command/response queue */ +int ibmvscsi_init_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests); +void ibmvscsi_release_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests); +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata); + +void ibmvscsi_handle_crq(struct viosrp_crq *crq, + struct ibmvscsi_host_data *hostdata); +int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, + u64 word1, u64 word2); + +#endif /* IBMVSCSI_H */ diff -Nru a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/iseries_vscsi.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,144 @@ +/* ------------------------------------------------------------ + * iSeries_vscsi.c + * (C) Copyright IBM Corporation 1994, 2003 + * Authors: Colin DeVilbiss (devilbis@us.ibm.com) + * Santiago Leon (santil@us.ibm.com) + * Dave Boutcher (sleddog@us.ibm.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * ------------------------------------------------------------ + * iSeries-specific functions of the SCSI host adapter for Virtual I/O devices + * + * This driver allows the Linux SCSI peripheral drivers to directly + * access devices in the hosting partition, either on an iSeries + * hypervisor system or a converged hypervisor system. + */ + +#include +#include +#include +#include +#include +#include +#include "ibmvscsi.h" + +/* global variables */ +static struct ibmvscsi_host_data *single_host_data; + +/* ------------------------------------------------------------ + * Routines for direct interpartition interaction + */ +struct srp_lp_event { + struct HvLpEvent lpevt; /* 0x00-0x17 */ + u32 reserved1; /* 0x18-0x1B; unused */ + u16 version; /* 0x1C-0x1D; unused */ + u16 subtype_rc; /* 0x1E-0x1F; unused */ + struct viosrp_crq crq; /* 0x20-0x3F */ +}; + +/** + * standard interface for handling logical partition events. + */ +static void ibmvscsi_handle_event(struct HvLpEvent *lpevt) +{ + struct srp_lp_event *evt = (struct srp_lp_event *)lpevt; + + if (!evt) { + printk(KERN_ERR "ibmvscsi: received null event\n"); + return; + } + + if (single_host_data == NULL) { + printk(KERN_ERR + "ibmvscsi: received event, no adapter present\n"); + return; + } + + ibmvscsi_handle_crq(&evt->crq, single_host_data); +} + +/* ------------------------------------------------------------ + * Routines for driver initialization + */ +int ibmvscsi_init_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests) +{ + int rc; + + single_host_data = hostdata; + rc = viopath_open(viopath_hostLp, viomajorsubtype_scsi, 0); + if (rc < 0) { + printk("viopath_open failed with rc %d in open_event_path\n", + rc); + goto viopath_open_failed; + } + + rc = vio_setHandler(viomajorsubtype_scsi, ibmvscsi_handle_event); + if (rc < 0) { + printk("vio_setHandler failed with rc %d in open_event_path\n", + rc); + goto vio_setHandler_failed; + } + return 0; + + vio_setHandler_failed: + viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests); + viopath_open_failed: + return -1; +} + +void ibmvscsi_release_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests) +{ + vio_clearHandler(viomajorsubtype_scsi); + viopath_close(viopath_hostLp, viomajorsubtype_scsi, max_requests); +} + +/** + * reset_crq_queue: - resets a crq after a failure + * @queue: crq_queue to initialize and register + * @hostdata: ibmvscsi_host_data of host + * + * no-op for iSeries + */ +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata) +{ +} + +/** + * ibmvscsi_send_crq: - Send a CRQ + * @hostdata: the adapter + * @word1: the first 64 bits of the data + * @word2: the second 64 bits of the data + */ +int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2) +{ + single_host_data = hostdata; + return HvCallEvent_signalLpEventFast(viopath_hostLp, + HvLpEvent_Type_VirtualIo, + viomajorsubtype_scsi, + HvLpEvent_AckInd_NoAck, + HvLpEvent_AckType_ImmediateAck, + viopath_sourceinst(viopath_hostLp), + viopath_targetinst(viopath_hostLp), + 0, + VIOVERSION << 16, word1, word2, 0, + 0); +} diff -Nru a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,260 @@ +/* ------------------------------------------------------------ + * rpa_vscsi.c + * (C) Copyright IBM Corporation 1994, 2003 + * Authors: Colin DeVilbiss (devilbis@us.ibm.com) + * Santiago Leon (santil@us.ibm.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * ------------------------------------------------------------ + * RPA-specific functions of the SCSI host adapter for Virtual I/O devices + * + * This driver allows the Linux SCSI peripheral drivers to directly + * access devices in the hosting partition, either on an iSeries + * hypervisor system or a converged hypervisor system. + */ + +#include +#include +#include +#include +#include +#include "ibmvscsi.h" + +/* ------------------------------------------------------------ + * Routines for managing the command/response queue + */ +/** + * ibmvscsi_handle_event: - Interrupt handler for crq events + * @irq: number of irq to handle, not used + * @dev_instance: ibmvscsi_host_data of host that received interrupt + * @regs: pt_regs with registers + * + * Disables interrupts and schedules srp_task + * Always returns IRQ_HANDLED + */ +static irqreturn_t ibmvscsi_handle_event(int irq, + void *dev_instance, + struct pt_regs *regs) +{ + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)dev_instance; + vio_disable_interrupts(to_vio_dev(hostdata->dev)); + tasklet_schedule(&hostdata->srp_task); + return IRQ_HANDLED; +} + +/** + * release_crq_queue: - Deallocates data and unregisters CRQ + * @queue: crq_queue to initialize and register + * @host_data: ibmvscsi_host_data of host + * + * Frees irq, deallocates a page for messages, unmaps dma, and unregisters + * the crq with the hypervisor. + */ +void ibmvscsi_release_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests) +{ + long rc; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + free_irq(vdev->irq, (void *)hostdata); + tasklet_kill(&hostdata->srp_task); + do { + rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); + } while ((rc == H_Busy) || (H_isLongBusy(rc))); + dma_unmap_single(hostdata->dev, + queue->msg_token, + queue->size * sizeof(*queue->msgs), DMA_BIDIRECTIONAL); + free_page((unsigned long)queue->msgs); +} + +/** + * crq_queue_next_crq: - Returns the next entry in message queue + * @queue: crq_queue to use + * + * Returns pointer to next entry in queue, or NULL if there are no new + * entried in the CRQ. + */ +static struct viosrp_crq *crq_queue_next_crq(struct crq_queue *queue) +{ + struct viosrp_crq *crq; + unsigned long flags; + + spin_lock_irqsave(&queue->lock, flags); + crq = &queue->msgs[queue->cur]; + if (crq->valid & 0x80) { + if (++queue->cur == queue->size) + queue->cur = 0; + } else + crq = NULL; + spin_unlock_irqrestore(&queue->lock, flags); + + return crq; +} + +/** + * ibmvscsi_send_crq: - Send a CRQ + * @hostdata: the adapter + * @word1: the first 64 bits of the data + * @word2: the second 64 bits of the data + */ +int ibmvscsi_send_crq(struct ibmvscsi_host_data *hostdata, u64 word1, u64 word2) +{ + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + + return plpar_hcall_norets(H_SEND_CRQ, vdev->unit_address, word1, word2); +} + +/** + * ibmvscsi_task: - Process srps asynchronously + * @data: ibmvscsi_host_data of host + */ +static void ibmvscsi_task(void *data) +{ + struct ibmvscsi_host_data *hostdata = (struct ibmvscsi_host_data *)data; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + struct viosrp_crq *crq; + int done = 0; + + while (!done) { + /* Pull all the valid messages off the CRQ */ + while ((crq = crq_queue_next_crq(&hostdata->queue)) != NULL) { + ibmvscsi_handle_crq(crq, hostdata); + crq->valid = 0x00; + } + + vio_enable_interrupts(vdev); + if ((crq = crq_queue_next_crq(&hostdata->queue)) != NULL) { + vio_disable_interrupts(vdev); + ibmvscsi_handle_crq(crq, hostdata); + crq->valid = 0x00; + } else { + done = 1; + } + } +} + +/** + * initialize_crq_queue: - Initializes and registers CRQ with hypervisor + * @queue: crq_queue to initialize and register + * @hostdata: ibmvscsi_host_data of host + * + * Allocates a page for messages, maps it for dma, and registers + * the crq with the hypervisor. + * Returns zero on success. + */ +int ibmvscsi_init_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests) +{ + int rc; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + + queue->msgs = (struct viosrp_crq *)get_zeroed_page(GFP_KERNEL); + + if (!queue->msgs) + goto malloc_failed; + queue->size = PAGE_SIZE / sizeof(*queue->msgs); + + queue->msg_token = dma_map_single(hostdata->dev, queue->msgs, + queue->size * sizeof(*queue->msgs), + DMA_BIDIRECTIONAL); + + if (dma_mapping_error(queue->msg_token)) + goto map_failed; + + rc = plpar_hcall_norets(H_REG_CRQ, + vdev->unit_address, + queue->msg_token, PAGE_SIZE); + if (rc == 2) { + /* Adapter is good, but other end is not ready */ + printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); + } else if (rc != 0) { + printk(KERN_WARNING "ibmvscsi: Error %d opening adapter\n", rc); + goto reg_crq_failed; + } + + if (request_irq(vdev->irq, + ibmvscsi_handle_event, + 0, "ibmvscsi", (void *)hostdata) != 0) { + printk(KERN_ERR "ibmvscsi: couldn't register irq 0x%x\n", + vdev->irq); + goto req_irq_failed; + } + + rc = vio_enable_interrupts(vdev); + if (rc != 0) { + printk(KERN_ERR "ibmvscsi: Error %d enabling interrupts!!!\n", + rc); + goto req_irq_failed; + } + + queue->cur = 0; + queue->lock = SPIN_LOCK_UNLOCKED; + + tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task, + (unsigned long)hostdata); + + return 0; + + req_irq_failed: + do { + rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); + } while ((rc == H_Busy) || (H_isLongBusy(rc))); + reg_crq_failed: + dma_unmap_single(hostdata->dev, + queue->msg_token, + queue->size * sizeof(*queue->msgs), DMA_BIDIRECTIONAL); + map_failed: + free_page((unsigned long)queue->msgs); + malloc_failed: + return -1; +} + +/** + * reset_crq_queue: - resets a crq after a failure + * @queue: crq_queue to initialize and register + * @hostdata: ibmvscsi_host_data of host + * + */ +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata) +{ + int rc; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + + /* Close the CRQ */ + do { + rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); + } while ((rc == H_Busy) || (H_isLongBusy(rc))); + + /* Clean out the queue */ + memset(queue->msgs, 0x00, PAGE_SIZE); + queue->cur = 0; + + /* And re-open it again */ + rc = plpar_hcall_norets(H_REG_CRQ, + vdev->unit_address, + queue->msg_token, PAGE_SIZE); + if (rc == 2) { + /* Adapter is good, but other end is not ready */ + printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); + } else if (rc != 0) { + printk(KERN_WARNING + "ibmvscsi: couldn't register crq--rc 0x%x\n", rc); + } +} diff -Nru a/drivers/scsi/ibmvscsi/srp.h b/drivers/scsi/ibmvscsi/srp.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/srp.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,225 @@ +/*****************************************************************************/ +/* srp.h -- SCSI RDMA Protocol definitions */ +/* */ +/* Written By: Colin Devilbis, IBM Corporation */ +/* */ +/* Copyright (C) 2003 IBM Corporation */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of the GNU General Public License as published by */ +/* the Free Software Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU General Public License */ +/* along with this program; if not, write to the Free Software */ +/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* */ +/* This file contains structures and definitions for the SCSI RDMA Protocol */ +/* (SRP) as defined in the T10 standard available at www.t10.org. This */ +/* file was based on the 16a version of the standard */ +/* */ +/*****************************************************************************/ +#ifndef SRP_H +#define SRP_H + +#define PACKED __attribute__((packed)) + +enum srp_types { + SRP_LOGIN_REQ_TYPE = 0x00, + SRP_LOGIN_RSP_TYPE = 0xC0, + SRP_LOGIN_REJ_TYPE = 0x80, + SRP_I_LOGOUT_TYPE = 0x03, + SRP_T_LOGOUT_TYPE = 0x80, + SRP_TSK_MGMT_TYPE = 0x01, + SRP_CMD_TYPE = 0x02, + SRP_RSP_TYPE = 0xC1, + SRP_CRED_REQ_TYPE = 0x81, + SRP_CRED_RSP_TYPE = 0x41, + SRP_AER_REQ_TYPE = 0x82, + SRP_AER_RSP_TYPE = 0x42 +}; + +enum srp_descriptor_formats { + SRP_NO_BUFFER = 0x00, + SRP_DIRECT_BUFFER = 0x01, + SRP_INDIRECT_BUFFER = 0x02 +}; + +struct memory_descriptor { + u64 virtual_address; + u32 memory_handle; + u32 length; +}; + +struct indirect_descriptor { + struct memory_descriptor head; + u32 total_length; + struct memory_descriptor list[1] PACKED; +}; + +struct srp_generic { + u8 type; + u8 reserved1[7]; + u64 tag; +}; + +struct srp_login_req { + u8 type; + u8 reserved1[7]; + u64 tag; + u32 max_requested_initiator_to_target_iulen; + u32 reserved2; + u16 required_buffer_formats; + u8 reserved3:6; + u8 multi_channel_action:2; + u8 reserved4; + u32 reserved5; + u8 initiator_port_identifier[16]; + u8 target_port_identifier[16]; +}; + +struct srp_login_rsp { + u8 type; + u8 reserved1[3]; + u32 request_limit_delta; + u64 tag; + u32 max_initiator_to_target_iulen; + u32 max_target_to_initiator_iulen; + u16 supported_buffer_formats; + u8 reserved2:6; + u8 multi_channel_result:2; + u8 reserved3; + u8 reserved4[24]; +}; + +struct srp_login_rej { + u8 type; + u8 reserved1[3]; + u32 reason; + u64 tag; + u64 reserved2; + u16 supported_buffer_formats; + u8 reserved3[6]; +}; + +struct srp_i_logout { + u8 type; + u8 reserved1[7]; + u64 tag; +}; + +struct srp_t_logout { + u8 type; + u8 reserved1[3]; + u32 reason; + u64 tag; +}; + +struct srp_tsk_mgmt { + u8 type; + u8 reserved1[7]; + u64 tag; + u32 reserved2; + u64 lun PACKED; + u8 reserved3; + u8 reserved4; + u8 task_mgmt_flags; + u8 reserved5; + u64 managed_task_tag; + u64 reserved6; +}; + +struct srp_cmd { + u8 type; + u32 reserved1 PACKED; + u8 data_out_format:4; + u8 data_in_format:4; + u8 data_out_count; + u8 data_in_count; + u64 tag; + u32 reserved2; + u64 lun PACKED; + u8 reserved3; + u8 reserved4:5; + u8 task_attribute:3; + u8 reserved5; + u8 additional_cdb_len; + u8 cdb[16]; + u8 additional_data[0x100 - 0x30]; +}; + +struct srp_rsp { + u8 type; + u8 reserved1[3]; + u32 request_limit_delta; + u64 tag; + u16 reserved2; + u8 reserved3:2; + u8 diunder:1; + u8 diover:1; + u8 dounder:1; + u8 doover:1; + u8 snsvalid:1; + u8 rspvalid:1; + u8 status; + u32 data_in_residual_count; + u32 data_out_residual_count; + u32 sense_data_list_length; + u32 response_data_list_length; + u8 sense_and_response_data[18]; +}; + +struct srp_cred_req { + u8 type; + u8 reserved1[3]; + u32 request_limit_delta; + u64 tag; +}; + +struct srp_cred_rsp { + u8 type; + u8 reserved1[7]; + u64 tag; +}; + +struct srp_aer_req { + u8 type; + u8 reserved1[3]; + u32 request_limit_delta; + u64 tag; + u32 reserved2; + u64 lun; + u32 sense_data_list_length; + u32 reserved3; + u8 sense_data[20]; +}; + +struct srp_aer_rsp { + u8 type; + u8 reserved1[7]; + u64 tag; +}; + +union srp_iu { + struct srp_generic generic; + struct srp_login_req login_req; + struct srp_login_rsp login_rsp; + struct srp_login_rej login_rej; + struct srp_i_logout i_logout; + struct srp_t_logout t_logout; + struct srp_tsk_mgmt tsk_mgmt; + struct srp_cmd cmd; + struct srp_rsp rsp; + struct srp_cred_req cred_req; + struct srp_cred_rsp cred_rsp; + struct srp_aer_req aer_req; + struct srp_aer_rsp aer_rsp; +}; + +#endif diff -Nru a/drivers/scsi/ibmvscsi/viosrp.h b/drivers/scsi/ibmvscsi/viosrp.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/ibmvscsi/viosrp.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,126 @@ +/*****************************************************************************/ +/* srp.h -- SCSI RDMA Protocol definitions */ +/* */ +/* Written By: Colin Devilbis, IBM Corporation */ +/* */ +/* Copyright (C) 2003 IBM Corporation */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of the GNU General Public License as published by */ +/* the Free Software Foundation; either version 2 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU General Public License */ +/* along with this program; if not, write to the Free Software */ +/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* */ +/* */ +/* This file contains structures and definitions for IBM RPA (RS/6000 */ +/* platform architecture) implementation of the SRP (SCSI RDMA Protocol) */ +/* standard. SRP is used on IBM iSeries and pSeries platforms to send SCSI */ +/* commands between logical partitions. */ +/* */ +/* SRP Information Units (IUs) are sent on a "Command/Response Queue" (CRQ) */ +/* between partitions. The definitions in this file are architected, */ +/* and cannot be changed without breaking compatibility with other versions */ +/* of Linux and other operating systems (AIX, OS/400) that talk this protocol*/ +/* between logical partitions */ +/*****************************************************************************/ +#ifndef VIOSRP_H +#define VIOSRP_H +#include "srp.h" + +enum viosrp_crq_formats { + VIOSRP_SRP_FORMAT = 0x01, + VIOSRP_MAD_FORMAT = 0x02, + VIOSRP_OS400_FORMAT = 0x03, + VIOSRP_AIX_FORMAT = 0x04, + VIOSRP_LINUX_FORMAT = 0x06, + VIOSRP_INLINE_FORMAT = 0x07 +}; + +struct viosrp_crq { + u8 valid; /* used by RPA */ + u8 format; /* SCSI vs out-of-band */ + u8 reserved; + u8 status; /* non-scsi failure? (e.g. DMA failure) */ + u16 timeout; /* in seconds */ + u16 IU_length; /* in bytes */ + u64 IU_data_ptr; /* the TCE for transferring data */ +}; + +/* MADs are Management requests above and beyond the IUs defined in the SRP + * standard. + */ +enum viosrp_mad_types { + VIOSRP_EMPTY_IU_TYPE = 0x01, + VIOSRP_ERROR_LOG_TYPE = 0x02, + VIOSRP_ADAPTER_INFO_TYPE = 0x03, + VIOSRP_HOST_CONFIG_TYPE = 0x04 +}; + +/* + * Common MAD header + */ +struct mad_common { + u32 type; + u16 status; + u16 length; + u64 tag; +}; + +/* + * All SRP (and MAD) requests normally flow from the + * client to the server. There is no way for the server to send + * an asynchronous message back to the client. The Empty IU is used + * to hang out a meaningless request to the server so that it can respond + * asynchrouously with something like a SCSI AER + */ +struct viosrp_empty_iu { + struct mad_common common; + u64 buffer; + u32 port; +}; + +struct viosrp_error_log { + struct mad_common common; + u64 buffer; +}; + +struct viosrp_adapter_info { + struct mad_common common; + u64 buffer; +}; + +struct viosrp_host_config { + struct mad_common common; + u64 buffer; +}; + +union mad_iu { + struct viosrp_empty_iu empty_iu; + struct viosrp_error_log error_log; + struct viosrp_adapter_info adapter_info; + struct viosrp_host_config host_config; +}; + +union viosrp_iu { + union srp_iu srp; + union mad_iu mad; +}; + +struct mad_adapter_info_data { + char srp_version[8]; + char partition_name[96]; + u32 partition_number; + u32 mad_version; + u32 os_type; + u32 port_max_txu[8]; /* per-port maximum transfer */ +}; + +#endif diff -Nru a/drivers/scsi/imm.c b/drivers/scsi/imm.c --- a/drivers/scsi/imm.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/imm.c 2004-09-06 16:37:55 -07:00 @@ -758,7 +758,7 @@ case DID_OK: break; case DID_NO_CONNECT: - printk("imm: no device at SCSI ID %i\n", cmd->target); + printk("imm: no device at SCSI ID %i\n", cmd->device->id); break; case DID_BUS_BUSY: printk("imm: BUS BUSY - EPP timeout detected\n"); diff -Nru a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c --- a/drivers/scsi/ipr.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/ipr.c 2004-09-06 16:37:55 -07:00 @@ -1,7 +1,7 @@ /* * ipr.c -- driver for IBM Power Linux RAID adapters * - * Written By: Brian King, IBM Corporation + * Written By: Brian King , IBM Corporation * * Copyright (C) 2003, 2004 IBM Corporation * @@ -93,7 +93,7 @@ /* This table describes the differences between DMA controller chips */ static const struct ipr_chip_cfg_t ipr_chip_cfg[] = { - { /* Gemstone */ + { /* Gemstone and Citrine */ .mailbox = 0x0042C, .cache_line_size = 0x20, { @@ -208,6 +208,8 @@ "Synchronization required"}, {0x024E0000, 0, 0, "No ready, IOA shutdown"}, + {0x025A0000, 0, 0, + "Not ready, IOA has been shutdown"}, {0x02670100, 0, 1, "3020: Storage subsystem configuration error"}, {0x03110B00, 0, 0, @@ -880,11 +882,13 @@ **/ static void ipr_log_vpd(struct ipr_std_inq_vpids *vpids, u8 *serial_num) { - char buffer[max_t(int, sizeof(struct ipr_std_inq_vpids), - IPR_SERIAL_NUM_LEN) + 1]; + char buffer[IPR_VENDOR_ID_LEN + IPR_PROD_ID_LEN + + IPR_SERIAL_NUM_LEN]; - memcpy(buffer, vpids, sizeof(struct ipr_std_inq_vpids)); - buffer[sizeof(struct ipr_std_inq_vpids)] = '\0'; + memcpy(buffer, vpids->vendor_id, IPR_VENDOR_ID_LEN); + memcpy(buffer + IPR_VENDOR_ID_LEN, vpids->product_id, + IPR_PROD_ID_LEN); + buffer[IPR_VENDOR_ID_LEN + IPR_PROD_ID_LEN] = '\0'; ipr_err("Vendor/Product ID: %s\n", buffer); memcpy(buffer, serial_num, IPR_SERIAL_NUM_LEN); @@ -1766,6 +1770,33 @@ #endif /** + * ipr_release_dump - Free adapter dump memory + * @kref: kref struct + * + * Return value: + * nothing + **/ +static void ipr_release_dump(struct kref *kref) +{ + struct ipr_dump *dump = container_of(kref,struct ipr_dump,kref); + struct ipr_ioa_cfg *ioa_cfg = dump->ioa_cfg; + unsigned long lock_flags = 0; + int i; + + ENTER; + spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); + ioa_cfg->dump = NULL; + ioa_cfg->sdt_state = INACTIVE; + spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); + + for (i = 0; i < dump->ioa_dump.next_page_index; i++) + free_page((unsigned long) dump->ioa_dump.ioa_data[i]); + + kfree(dump); + LEAVE; +} + +/** * ipr_worker_thread - Worker thread * @data: ioa config struct * @@ -1791,13 +1822,14 @@ if (ioa_cfg->sdt_state == GET_DUMP) { dump = ioa_cfg->dump; - if (!dump || !kobject_get(&dump->kobj)) { + if (!dump) { spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); return; } + kref_get(&dump->kref); spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); ipr_get_ioa_dump(ioa_cfg, dump); - kobject_put(&dump->kobj); + kref_put(&dump->kref, ipr_release_dump); spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); if (ioa_cfg->sdt_state == DUMP_OBTAINED) @@ -2008,7 +2040,7 @@ wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); /* Wait for a second for any errors to be logged */ - schedule_timeout(HZ); + msleep(1000); } else { spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); return -EIO; @@ -2392,15 +2424,15 @@ spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); dump = ioa_cfg->dump; - if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump || !kobject_get(&dump->kobj)) { + if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump) { spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); return 0; } - + kref_get(&dump->kref); spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); if (off > dump->driver_dump.hdr.len) { - kobject_put(&dump->kobj); + kref_put(&dump->kref, ipr_release_dump); return 0; } @@ -2450,42 +2482,11 @@ count -= len; } - kobject_put(&dump->kobj); + kref_put(&dump->kref, ipr_release_dump); return rc; } /** - * ipr_release_dump - Free adapter dump memory - * @kobj: kobject struct - * - * Return value: - * nothing - **/ -static void ipr_release_dump(struct kobject *kobj) -{ - struct ipr_dump *dump = container_of(kobj,struct ipr_dump,kobj); - struct ipr_ioa_cfg *ioa_cfg = dump->ioa_cfg; - unsigned long lock_flags = 0; - int i; - - ENTER; - spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); - ioa_cfg->dump = NULL; - ioa_cfg->sdt_state = INACTIVE; - spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); - - for (i = 0; i < dump->ioa_dump.next_page_index; i++) - free_page((unsigned long) dump->ioa_dump.ioa_data[i]); - - kfree(dump); - LEAVE; -} - -static struct kobj_type ipr_dump_kobj_type = { - .release = ipr_release_dump, -}; - -/** * ipr_alloc_dump - Prepare for adapter dump * @ioa_cfg: ioa config struct * @@ -2506,8 +2507,7 @@ } memset(dump, 0, sizeof(struct ipr_dump)); - kobject_init(&dump->kobj); - dump->kobj.ktype = &ipr_dump_kobj_type; + kref_init(&dump->kref); dump->ioa_cfg = ioa_cfg; spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); @@ -2554,7 +2554,7 @@ ioa_cfg->dump = NULL; spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); - kobject_put(&dump->kobj); + kref_put(&dump->kref, ipr_release_dump); LEAVE; return 0; @@ -2690,8 +2690,6 @@ struct ipr_resource_entry *res; unsigned long lock_flags = 0; int tcq_active = simple_strtoul(buf, NULL, 10); - int qdepth = IPR_MAX_CMD_PER_LUN; - int tagged = 0; ssize_t len = -ENXIO; spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); @@ -2699,13 +2697,13 @@ res = (struct ipr_resource_entry *)sdev->hostdata; if (res) { - res->tcq_active = 0; - qdepth = res->qdepth; - if (ipr_is_gscsi(res) && sdev->tagged_supported) { if (tcq_active) { - tagged = MSG_ORDERED_TAG; res->tcq_active = 1; + scsi_activate_tcq(sdev, res->qdepth); + } else { + res->tcq_active = 0; + scsi_deactivate_tcq(sdev, res->qdepth); } len = strlen(buf); @@ -2715,7 +2713,6 @@ } spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); - scsi_adjust_queue_depth(sdev, tagged, qdepth); return len; } @@ -2785,7 +2782,8 @@ struct block_device *block_device, sector_t capacity, int *parm) { - int heads, sectors, cylinders; + int heads, sectors; + sector_t cylinders; heads = 128; sectors = 32; @@ -2849,8 +2847,8 @@ sdev->scsi_level = 4; if (ipr_is_vset_device(res)) sdev->timeout = IPR_VSET_RW_TIMEOUT; - - sdev->allow_restart = 1; + if (IPR_IS_DASD_DEVICE(res->cfgte.std_inq_data)) + sdev->allow_restart = 1; scsi_adjust_queue_depth(sdev, 0, res->qdepth); } spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); @@ -3080,7 +3078,7 @@ struct ipr_ioa_cfg *ioa_cfg; struct ipr_resource_entry *res; struct ipr_cmd_pkt *cmd_pkt; - u32 ioasc, ioarcb_addr; + u32 ioasc; int op_found = 0; ENTER; @@ -3101,21 +3099,15 @@ if (!op_found) return SUCCESS; - ioarcb_addr = be32_to_cpu(ipr_cmd->ioarcb.ioarcb_host_pci_addr); - ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); ipr_cmd->ioarcb.res_handle = res->cfgte.res_handle; cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt; cmd_pkt->request_type = IPR_RQTYPE_IOACMD; - cmd_pkt->cdb[0] = IPR_ABORT_TASK; - cmd_pkt->cdb[2] = (ioarcb_addr >> 24) & 0xff; - cmd_pkt->cdb[3] = (ioarcb_addr >> 16) & 0xff; - cmd_pkt->cdb[4] = (ioarcb_addr >> 8) & 0xff; - cmd_pkt->cdb[5] = ioarcb_addr & 0xff; + cmd_pkt->cdb[0] = IPR_CANCEL_ALL_REQUESTS; ipr_cmd->u.sdev = scsi_cmd->device; ipr_sdev_err(scsi_cmd->device, "Aborting command: %02X\n", scsi_cmd->cmnd[0]); - ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_ABORT_TASK_TIMEOUT); + ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_CANCEL_ALL_TIMEOUT); ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); /* @@ -3737,7 +3729,7 @@ switch (ioasc & IPR_IOASC_IOASC_MASK) { case IPR_IOASC_ABORTED_CMD_TERM_BY_HOST: - scsi_cmd->result |= (DID_ERROR << 16); + scsi_cmd->result |= (DID_IMM_RETRY << 16); break; case IPR_IOASC_IR_RESOURCE_HANDLE: scsi_cmd->result |= (DID_NO_CONNECT << 16); @@ -3873,7 +3865,7 @@ * We have told the host to stop giving us new requests, but * ERP ops don't count. FIXME */ - if (unlikely(!ioa_cfg->allow_cmds)) + if (unlikely(!ioa_cfg->allow_cmds && !ioa_cfg->ioa_is_dead)) return SCSI_MLQUEUE_HOST_BUSY; /* @@ -5437,13 +5429,15 @@ **/ static void ipr_free_all_resources(struct ipr_ioa_cfg *ioa_cfg) { + struct pci_dev *pdev = ioa_cfg->pdev; + ENTER; - free_irq(ioa_cfg->pdev->irq, ioa_cfg); + free_irq(pdev->irq, ioa_cfg); iounmap((void *) ioa_cfg->hdw_dma_regs); - release_mem_region(ioa_cfg->hdw_dma_regs_pci, - pci_resource_len(ioa_cfg->pdev, 0)); + pci_release_regions(pdev); ipr_free_mem(ioa_cfg); scsi_host_put(ioa_cfg->host); + pci_disable_device(pdev); LEAVE; } @@ -5458,7 +5452,7 @@ { struct ipr_cmnd *ipr_cmd; struct ipr_ioarcb *ioarcb; - u32 dma_addr; + dma_addr_t dma_addr; int i; ioa_cfg->ipr_cmd_pool = pci_pool_create (IPR_NAME, ioa_cfg->pdev, @@ -5508,14 +5502,15 @@ **/ static int __devinit ipr_alloc_mem(struct ipr_ioa_cfg *ioa_cfg) { - int i; + struct pci_dev *pdev = ioa_cfg->pdev; + int i, rc = -ENOMEM; ENTER; ioa_cfg->res_entries = kmalloc(sizeof(struct ipr_resource_entry) * IPR_MAX_PHYSICAL_DEVS, GFP_KERNEL); if (!ioa_cfg->res_entries) - goto cleanup; + goto out; memset(ioa_cfg->res_entries, 0, sizeof(struct ipr_resource_entry) * IPR_MAX_PHYSICAL_DEVS); @@ -5528,24 +5523,24 @@ &ioa_cfg->vpd_cbs_dma); if (!ioa_cfg->vpd_cbs) - goto cleanup; + goto out_free_res_entries; if (ipr_alloc_cmd_blks(ioa_cfg)) - goto cleanup; + goto out_free_vpd_cbs; ioa_cfg->host_rrq = pci_alloc_consistent(ioa_cfg->pdev, sizeof(u32) * IPR_NUM_CMD_BLKS, &ioa_cfg->host_rrq_dma); if (!ioa_cfg->host_rrq) - goto cleanup; + goto out_ipr_free_cmd_blocks; ioa_cfg->cfg_table = pci_alloc_consistent(ioa_cfg->pdev, sizeof(struct ipr_config_table), &ioa_cfg->cfg_table_dma); if (!ioa_cfg->cfg_table) - goto cleanup; + goto out_free_host_rrq; for (i = 0; i < IPR_NUM_HCAMS; i++) { ioa_cfg->hostrcb[i] = pci_alloc_consistent(ioa_cfg->pdev, @@ -5553,9 +5548,8 @@ &ioa_cfg->hostrcb_dma[i]); if (!ioa_cfg->hostrcb[i]) - goto cleanup; + goto out_free_hostrcb_dma; - memset(ioa_cfg->hostrcb[i], 0, sizeof(struct ipr_hostrcb)); ioa_cfg->hostrcb[i]->hostrcb_dma = ioa_cfg->hostrcb_dma[i] + offsetof(struct ipr_hostrcb, hcam); list_add_tail(&ioa_cfg->hostrcb[i]->queue, &ioa_cfg->hostrcb_free_q); @@ -5565,19 +5559,35 @@ IPR_NUM_TRACE_ENTRIES, GFP_KERNEL); if (!ioa_cfg->trace) - goto cleanup; + goto out_free_hostrcb_dma; memset(ioa_cfg->trace, 0, sizeof(struct ipr_trace_entry) * IPR_NUM_TRACE_ENTRIES); + rc = 0; +out: LEAVE; - return 0; - -cleanup: - ipr_free_mem(ioa_cfg); + return rc; - LEAVE; - return -ENOMEM; +out_free_hostrcb_dma: + while (i-- > 0) { + pci_free_consistent(pdev, sizeof(struct ipr_hostrcb), + ioa_cfg->hostrcb[i], + ioa_cfg->hostrcb_dma[i]); + } + pci_free_consistent(pdev, sizeof(struct ipr_config_table), + ioa_cfg->cfg_table, ioa_cfg->cfg_table_dma); +out_free_host_rrq: + pci_free_consistent(pdev, sizeof(u32) * IPR_NUM_CMD_BLKS, + ioa_cfg->host_rrq, ioa_cfg->host_rrq_dma); +out_ipr_free_cmd_blocks: + ipr_free_cmd_blks(ioa_cfg); +out_free_vpd_cbs: + pci_free_consistent(pdev, sizeof(struct ipr_misc_cbs), + ioa_cfg->vpd_cbs, ioa_cfg->vpd_cbs_dma); +out_free_res_entries: + kfree(ioa_cfg->res_entries); + goto out; } /** @@ -5678,7 +5688,7 @@ if ((rc = pci_enable_device(pdev))) { dev_err(&pdev->dev, "Cannot enable adapter\n"); - return rc; + goto out; } dev_info(&pdev->dev, "Found IOA with IRQ: %d\n", pdev->irq); @@ -5687,7 +5697,8 @@ if (!host) { dev_err(&pdev->dev, "call to scsi_host_alloc failed!\n"); - return -ENOMEM; + rc = -ENOMEM; + goto out_disable; } ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata; @@ -5697,12 +5708,11 @@ ipr_regs_pci = pci_resource_start(pdev, 0); - if (!request_mem_region(ipr_regs_pci, - pci_resource_len(pdev, 0), IPR_NAME)) { + rc = pci_request_regions(pdev, IPR_NAME); + if (rc < 0) { dev_err(&pdev->dev, "Couldn't register memory range of registers\n"); - scsi_host_put(host); - return -ENOMEM; + goto out_scsi_host_put; } ipr_regs = (unsigned long)ioremap(ipr_regs_pci, @@ -5711,9 +5721,8 @@ if (!ipr_regs) { dev_err(&pdev->dev, "Couldn't map memory range of registers\n"); - release_mem_region(ipr_regs_pci, pci_resource_len(pdev, 0)); - scsi_host_put(host); - return -ENOMEM; + rc = -ENOMEM; + goto out_release_regions; } ioa_cfg->hdw_dma_regs = ipr_regs; @@ -5723,11 +5732,10 @@ ipr_init_ioa_cfg(ioa_cfg, host, pdev); pci_set_master(pdev); - rc = pci_set_dma_mask(pdev, 0xffffffff); - if (rc != PCIBIOS_SUCCESSFUL) { + rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); + if (rc < 0) { dev_err(&pdev->dev, "Failed to set PCI DMA mask\n"); - rc = -EIO; goto cleanup_nomem; } @@ -5755,8 +5763,12 @@ if ((rc = ipr_set_pcix_cmd_reg(ioa_cfg))) goto cleanup_nomem; - if ((rc = ipr_alloc_mem(ioa_cfg))) - goto cleanup; + rc = ipr_alloc_mem(ioa_cfg); + if (rc < 0) { + dev_err(&pdev->dev, + "Couldn't allocate enough memory for device driver!\n"); + goto cleanup_nomem; + } ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); @@ -5772,18 +5784,20 @@ spin_unlock(&ipr_driver_lock); LEAVE; - return 0; +out: + return rc; -cleanup: - dev_err(&pdev->dev, "Couldn't allocate enough memory for device driver!\n"); cleanup_nolog: ipr_free_mem(ioa_cfg); cleanup_nomem: iounmap((void *) ipr_regs); - release_mem_region(ipr_regs_pci, pci_resource_len(pdev, 0)); +out_release_regions: + pci_release_regions(pdev); +out_scsi_host_put: scsi_host_put(host); - - return rc; +out_disable: + pci_disable_device(pdev); + goto out; } /** @@ -5988,9 +6002,15 @@ { PCI_VENDOR_ID_MYLEX, PCI_DEVICE_ID_IBM_GEMSTONE, PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_573D, 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, + PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_571B, + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2780, 0, 0, (kernel_ulong_t)&ipr_chip_cfg[1] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, + PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_570F, + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[1] }, { } }; MODULE_DEVICE_TABLE(pci, ipr_pci_table); @@ -6009,16 +6029,14 @@ * ipr_init - Module entry point * * Return value: - * 0 on success / non-zero on failure + * 0 on success / negative value on failure **/ static int __init ipr_init(void) { ipr_info("IBM Power RAID SCSI Device Driver version: %s %s\n", IPR_DRIVER_VERSION, IPR_DRIVER_DATE); - pci_register_driver(&ipr_driver); - - return 0; + return pci_module_init(&ipr_driver); } /** diff -Nru a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h --- a/drivers/scsi/ipr.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/ipr.h 2004-09-06 16:37:51 -07:00 @@ -1,7 +1,7 @@ /* * ipr.h -- driver for IBM Power Linux RAID adapters * - * Written By: Brian King, IBM Corporation + * Written By: Brian King , IBM Corporation * * Copyright (C) 2003, 2004 IBM Corporation * @@ -19,6 +19,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * Alan Cox - Removed several careless u32/dma_addr_t errors + * that broke 64bit platforms. */ #ifndef _IPR_H @@ -27,6 +29,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_KDB @@ -36,8 +39,8 @@ /* * Literals */ -#define IPR_DRIVER_VERSION "2.0.10" -#define IPR_DRIVER_DATE "(June 7, 2004)" +#define IPR_DRIVER_VERSION "2.0.11" +#define IPR_DRIVER_DATE "(August 3, 2004)" /* * IPR_DBG_TRACE: Setting this to 1 will turn on some general function tracing @@ -72,6 +75,8 @@ #define IPR_SUBS_DEV_ID_5703 0x0278 #define IPR_SUBS_DEV_ID_572E 0x02D3 #define IPR_SUBS_DEV_ID_573D 0x02D4 +#define IPR_SUBS_DEV_ID_570F 0x02BD +#define IPR_SUBS_DEV_ID_571B 0x02BE #define IPR_NAME "ipr" @@ -148,7 +153,6 @@ #define IPR_BUS_RESET 0x10 #define IPR_ID_HOST_RR_Q 0xC4 #define IPR_QUERY_IOA_CONFIG 0xC5 -#define IPR_ABORT_TASK 0xC7 #define IPR_CANCEL_ALL_REQUESTS 0xCE #define IPR_HOST_CONTROLLED_ASYNC 0xCF #define IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE 0x01 @@ -667,7 +671,7 @@ struct ipr_hostrcb { struct ipr_hcam hcam; - u32 hostrcb_dma; + dma_addr_t hostrcb_dma; struct list_head queue; }; @@ -850,7 +854,7 @@ char cfg_table_start[8]; #define IPR_CFG_TBL_START "cfg" struct ipr_config_table *cfg_table; - u32 cfg_table_dma; + dma_addr_t cfg_table_dma; char resource_table_label[8]; #define IPR_RES_TABLE_LABEL "res_tbl" @@ -861,12 +865,12 @@ char ipr_hcam_label[8]; #define IPR_HCAM_LABEL "hcams" struct ipr_hostrcb *hostrcb[IPR_NUM_HCAMS]; - u32 hostrcb_dma[IPR_NUM_HCAMS]; + dma_addr_t hostrcb_dma[IPR_NUM_HCAMS]; struct list_head hostrcb_free_q; struct list_head hostrcb_pending_q; u32 *host_rrq; - u32 host_rrq_dma; + dma_addr_t host_rrq_dma; #define IPR_HRRQ_REQ_RESP_HANDLE_MASK 0xfffffffc #define IPR_HRRQ_RESP_BIT_SET 0x00000002 #define IPR_HRRQ_TOGGLE_BIT 0x00000001 @@ -905,7 +909,7 @@ enum ipr_sdt_state sdt_state; struct ipr_misc_cbs *vpd_cbs; - u32 vpd_cbs_dma; + dma_addr_t vpd_cbs_dma; struct pci_pool *ipr_cmd_pool; @@ -1029,7 +1033,7 @@ }__attribute__((packed, aligned (4))); struct ipr_dump { - struct kobject kobj; + struct kref kref; struct ipr_ioa_cfg *ioa_cfg; struct ipr_driver_dump driver_dump; struct ipr_ioa_dump ioa_dump; diff -Nru a/drivers/scsi/ips.c b/drivers/scsi/ips.c --- a/drivers/scsi/ips.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/ips.c 2004-09-06 16:37:50 -07:00 @@ -474,21 +474,17 @@ static uint32_t ips_statupd_copperhead_memio(ips_ha_t *); static uint32_t ips_statupd_morpheus(ips_ha_t *); static ips_scb_t *ips_getscb(ips_ha_t *); -static inline void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *); -static inline void ips_putq_scb_tail(ips_scb_queue_t *, ips_scb_t *); -static inline void ips_putq_wait_head(ips_wait_queue_t *, Scsi_Cmnd *); -static inline void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *); -static inline void ips_putq_copp_head(ips_copp_queue_t *, +static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *); +static void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *); +static void ips_putq_copp_tail(ips_copp_queue_t *, ips_copp_wait_item_t *); -static inline void ips_putq_copp_tail(ips_copp_queue_t *, - ips_copp_wait_item_t *); -static inline ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *); -static inline ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *); -static inline Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *); -static inline Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *); -static inline ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *, +static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *); +static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *); +static Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *); +static Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *); +static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *, ips_copp_wait_item_t *); -static inline ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *); +static ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *); static int ips_is_passthru(Scsi_Cmnd *); static int ips_make_passthru(ips_ha_t *, Scsi_Cmnd *, ips_scb_t *, int); @@ -1885,7 +1881,7 @@ /* Fill in a single scb sg_list element from an address */ /* return a -1 if a breakup occurred */ /****************************************************************************/ -static inline int +static int ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, ips_scb_t * scb, int indx, unsigned int e_len) { @@ -2950,7 +2946,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline void +static void ips_putq_scb_head(ips_scb_queue_t * queue, ips_scb_t * item) { METHOD_TRACE("ips_putq_scb_head", 1); @@ -2969,38 +2965,6 @@ /****************************************************************************/ /* */ -/* Routine Name: ips_putq_scb_tail */ -/* */ -/* Routine Description: */ -/* */ -/* Add an item to the tail of the queue */ -/* */ -/* ASSUMED to be called from within the HA lock */ -/* */ -/****************************************************************************/ -static inline void -ips_putq_scb_tail(ips_scb_queue_t * queue, ips_scb_t * item) -{ - METHOD_TRACE("ips_putq_scb_tail", 1); - - if (!item) - return; - - item->q_next = NULL; - - if (queue->tail) - queue->tail->q_next = item; - - queue->tail = item; - - if (!queue->head) - queue->head = item; - - queue->count++; -} - -/****************************************************************************/ -/* */ /* Routine Name: ips_removeq_scb_head */ /* */ /* Routine Description: */ @@ -3010,7 +2974,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline ips_scb_t * +static ips_scb_t * ips_removeq_scb_head(ips_scb_queue_t * queue) { ips_scb_t *item; @@ -3045,7 +3009,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline ips_scb_t * +static ips_scb_t * ips_removeq_scb(ips_scb_queue_t * queue, ips_scb_t * item) { ips_scb_t *p; @@ -3082,34 +3046,6 @@ /****************************************************************************/ /* */ -/* Routine Name: ips_putq_wait_head */ -/* */ -/* Routine Description: */ -/* */ -/* Add an item to the head of the queue */ -/* */ -/* ASSUMED to be called from within the HA lock */ -/* */ -/****************************************************************************/ -static inline void -ips_putq_wait_head(ips_wait_queue_t * queue, Scsi_Cmnd * item) -{ - METHOD_TRACE("ips_putq_wait_head", 1); - - if (!item) - return; - - item->host_scribble = (char *) queue->head; - queue->head = item; - - if (!queue->tail) - queue->tail = item; - - queue->count++; -} - -/****************************************************************************/ -/* */ /* Routine Name: ips_putq_wait_tail */ /* */ /* Routine Description: */ @@ -3119,7 +3055,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline void +static void ips_putq_wait_tail(ips_wait_queue_t * queue, Scsi_Cmnd * item) { METHOD_TRACE("ips_putq_wait_tail", 1); @@ -3151,7 +3087,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline Scsi_Cmnd * +static Scsi_Cmnd * ips_removeq_wait_head(ips_wait_queue_t * queue) { Scsi_Cmnd *item; @@ -3186,7 +3122,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline Scsi_Cmnd * +static Scsi_Cmnd * ips_removeq_wait(ips_wait_queue_t * queue, Scsi_Cmnd * item) { Scsi_Cmnd *p; @@ -3223,34 +3159,6 @@ /****************************************************************************/ /* */ -/* Routine Name: ips_putq_copp_head */ -/* */ -/* Routine Description: */ -/* */ -/* Add an item to the head of the queue */ -/* */ -/* ASSUMED to be called from within the HA lock */ -/* */ -/****************************************************************************/ -static inline void -ips_putq_copp_head(ips_copp_queue_t * queue, ips_copp_wait_item_t * item) -{ - METHOD_TRACE("ips_putq_copp_head", 1); - - if (!item) - return; - - item->next = queue->head; - queue->head = item; - - if (!queue->tail) - queue->tail = item; - - queue->count++; -} - -/****************************************************************************/ -/* */ /* Routine Name: ips_putq_copp_tail */ /* */ /* Routine Description: */ @@ -3260,7 +3168,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline void +static void ips_putq_copp_tail(ips_copp_queue_t * queue, ips_copp_wait_item_t * item) { METHOD_TRACE("ips_putq_copp_tail", 1); @@ -3292,7 +3200,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline ips_copp_wait_item_t * +static ips_copp_wait_item_t * ips_removeq_copp_head(ips_copp_queue_t * queue) { ips_copp_wait_item_t *item; @@ -3327,7 +3235,7 @@ /* ASSUMED to be called from within the HA lock */ /* */ /****************************************************************************/ -static inline ips_copp_wait_item_t * +static ips_copp_wait_item_t * ips_removeq_copp(ips_copp_queue_t * queue, ips_copp_wait_item_t * item) { ips_copp_wait_item_t *p; diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/libata-core.c 2004-09-06 16:37:50 -07:00 @@ -1836,7 +1836,7 @@ idx = 0; for (nelem = qc->n_elem; nelem; nelem--,sg++) { - u32 addr, boundary; + u32 addr, offset; u32 sg_len, len; /* determine if physical DMA addr spans 64K boundary. @@ -1847,10 +1847,10 @@ sg_len = sg_dma_len(sg); while (sg_len) { - boundary = (addr & ~0xffff) + (0xffff + 1); + offset = addr & 0xffff; len = sg_len; - if ((addr + sg_len) > boundary) - len = boundary - addr; + if ((offset + sg_len) > 0x10000) + len = 0x10000 - offset; ap->prd[idx].addr = cpu_to_le32(addr); ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff); diff -Nru a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c --- a/drivers/scsi/libata-scsi.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/libata-scsi.c 2004-09-06 16:37:52 -07:00 @@ -94,7 +94,7 @@ return 0; case ATA_IOC_SET_IO32: - val = (long) arg; + val = (unsigned long) arg; if (val != 0) return -EINVAL; return 0; diff -Nru a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c --- a/drivers/scsi/mac_scsi.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/mac_scsi.c 2004-09-06 16:37:50 -07:00 @@ -326,6 +326,7 @@ { if (shpnt->irq != SCSI_IRQ_NONE) free_irq (shpnt->irq, NCR5380_intr); + NCR5380_exit(shpnt); return 0; } diff -Nru a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/Kconfig.megaraid 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,77 @@ +config MEGARAID_NEWGEN + bool "LSI Logic New Generation RAID Device Drivers" + depends on PCI && SCSI + help + LSI Logic RAID Device Drivers + +config MEGARAID_MM + tristate "LSI Logic Management Module (New Driver)" + depends on PCI && SCSI && MEGARAID_NEWGEN + help + Management Module provides ioctl, sysfs support for LSI Logic + RAID controllers. + To compile this driver as a module, choose M here: the + module will be called megaraid_mm + + +config MEGARAID_MAILBOX + tristate "LSI Logic MegaRAID Driver (New Driver)" + depends on PCI && SCSI && MEGARAID_MM + help + List of supported controllers + + OEM Product Name VID :DID :SVID:SSID + --- ------------ ---- ---- ---- ---- + Dell PERC3/QC 101E:1960:1028:0471 + Dell PERC3/DC 101E:1960:1028:0493 + Dell PERC3/SC 101E:1960:1028:0475 + Dell PERC3/Di 1028:000E:1028:0123 + Dell PERC4/SC 1000:1960:1028:0520 + Dell PERC4/DC 1000:1960:1028:0518 + Dell PERC4/QC 1000:0407:1028:0531 + Dell PERC4/Di 1028:000F:1028:014A + Dell PERC 4e/Si 1028:0013:1028:016c + Dell PERC 4e/Di 1028:0013:1028:016d + Dell PERC 4e/Di 1028:0013:1028:016e + Dell PERC 4e/Di 1028:0013:1028:016f + Dell PERC 4e/Di 1028:0013:1028:0170 + Dell PERC 4e/DC 1000:0408:1028:0002 + Dell PERC 4e/SC 1000:0408:1028:0001 + LSI MegaRAID SCSI 320-0 1000:1960:1000:A520 + LSI MegaRAID SCSI 320-1 1000:1960:1000:0520 + LSI MegaRAID SCSI 320-2 1000:1960:1000:0518 + LSI MegaRAID SCSI 320-0X 1000:0407:1000:0530 + LSI MegaRAID SCSI 320-2X 1000:0407:1000:0532 + LSI MegaRAID SCSI 320-4X 1000:0407:1000:0531 + LSI MegaRAID SCSI 320-1E 1000:0408:1000:0001 + LSI MegaRAID SCSI 320-2E 1000:0408:1000:0002 + LSI MegaRAID SATA 150-4 1000:1960:1000:4523 + LSI MegaRAID SATA 150-6 1000:1960:1000:0523 + LSI MegaRAID SATA 300-4X 1000:0409:1000:3004 + LSI MegaRAID SATA 300-8X 1000:0409:1000:3008 + INTEL RAID Controller SRCU42X 1000:0407:8086:0532 + INTEL RAID Controller SRCS16 1000:1960:8086:0523 + INTEL RAID Controller SRCU42E 1000:0408:8086:0002 + INTEL RAID Controller SRCZCRX 1000:0407:8086:0530 + INTEL RAID Controller SRCS28X 1000:0409:8086:3008 + INTEL RAID Controller SROMBU42E 1000:0408:8086:3431 + INTEL RAID Controller SROMBU42E 1000:0408:8086:3499 + INTEL RAID Controller SRCU51L 1000:1960:8086:0520 + FSC MegaRAID PCI Express ROMB 1000:0408:1734:1065 + ACER MegaRAID ROMB-2E 1000:0408:1025:004D + + To compile this driver as a module, choose M here: the + module will be called megaraid_mbox + +if MEGARAID_NEWGEN=n +config MEGARAID_LEGACY + tristate "LSI Logic Legacy MegaRAID Driver" + depends on PCI && SCSI + help + This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490 + and 467 SCSI host adapters. This driver also support the all U320 + RAID controllers + + To compile this driver as a module, choose M here: the + module will be called megaraid +endif diff -Nru a/drivers/scsi/megaraid/Makefile b/drivers/scsi/megaraid/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/Makefile 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,2 @@ +obj-$(CONFIG_MEGARAID_MM) += megaraid_mm.o +obj-$(CONFIG_MEGARAID_MAILBOX) += megaraid_mbox.o diff -Nru a/drivers/scsi/megaraid/mbox_defs.h b/drivers/scsi/megaraid/mbox_defs.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/mbox_defs.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,790 @@ +/* + * + * Linux MegaRAID Unified device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : mbox_defs.h + * + */ +#ifndef _MRAID_MBOX_DEFS_H_ +#define _MRAID_MBOX_DEFS_H_ + +#include + +/* + * Commands and states for mailbox based controllers + */ + +#define MBOXCMD_LREAD 0x01 +#define MBOXCMD_LWRITE 0x02 +#define MBOXCMD_PASSTHRU 0x03 +#define MBOXCMD_ADPEXTINQ 0x04 +#define MBOXCMD_ADAPTERINQ 0x05 +#define MBOXCMD_LREAD64 0xA7 +#define MBOXCMD_LWRITE64 0xA8 +#define MBOXCMD_PASSTHRU64 0xC3 +#define MBOXCMD_EXTPTHRU 0xE3 + +#define MAIN_MISC_OPCODE 0xA4 +#define GET_MAX_SG_SUPPORT 0x01 +#define SUPPORT_EXT_CDB 0x16 + +#define FC_NEW_CONFIG 0xA1 +#define NC_SUBOP_PRODUCT_INFO 0x0E +#define NC_SUBOP_ENQUIRY3 0x0F +#define ENQ3_GET_SOLICITED_FULL 0x02 +#define OP_DCMD_READ_CONFIG 0x04 +#define NEW_READ_CONFIG_8LD 0x67 +#define READ_CONFIG_8LD 0x07 +#define FLUSH_ADAPTER 0x0A +#define FLUSH_SYSTEM 0xFE + +/* + * Command for random deletion of logical drives + */ +#define FC_DEL_LOGDRV 0xA4 +#define OP_SUP_DEL_LOGDRV 0x2A +#define OP_GET_LDID_MAP 0x18 +#define OP_DEL_LOGDRV 0x1C + +/* + * BIOS commands + */ +#define IS_BIOS_ENABLED 0x62 +#define GET_BIOS 0x01 +#define CHNL_CLASS 0xA9 +#define GET_CHNL_CLASS 0x00 +#define SET_CHNL_CLASS 0x01 +#define CH_RAID 0x01 +#define CH_SCSI 0x00 +#define BIOS_PVT_DATA 0x40 +#define GET_BIOS_PVT_DATA 0x00 + + +/* + * Commands to support clustering + */ +#define GET_TARGET_ID 0x7D +#define CLUSTER_OP 0x70 +#define GET_CLUSTER_MODE 0x02 +#define CLUSTER_CMD 0x6E +#define RESERVE_LD 0x01 +#define RELEASE_LD 0x02 +#define RESET_RESERVATIONS 0x03 +#define RESERVATION_STATUS 0x04 +#define RESERVE_PD 0x05 +#define RELEASE_PD 0x06 + + +/* + * Module battery status + */ +#define BATTERY_MODULE_MISSING 0x01 +#define BATTERY_LOW_VOLTAGE 0x02 +#define BATTERY_TEMP_HIGH 0x04 +#define BATTERY_PACK_MISSING 0x08 +#define BATTERY_CHARGE_MASK 0x30 +#define BATTERY_CHARGE_DONE 0x00 +#define BATTERY_CHARGE_INPROG 0x10 +#define BATTERY_CHARGE_FAIL 0x20 +#define BATTERY_CYCLES_EXCEEDED 0x40 + +/* + * Physical drive states. + */ +#define PDRV_UNCNF 0 +#define PDRV_ONLINE 3 +#define PDRV_FAILED 4 +#define PDRV_RBLD 5 +#define PDRV_HOTSPARE 6 + + +/* + * Raid logical drive states. + */ +#define RDRV_OFFLINE 0 +#define RDRV_DEGRADED 1 +#define RDRV_OPTIMAL 2 +#define RDRV_DELETED 3 + +/* + * Read, write and cache policies + */ +#define NO_READ_AHEAD 0 +#define READ_AHEAD 1 +#define ADAP_READ_AHEAD 2 +#define WRMODE_WRITE_THRU 0 +#define WRMODE_WRITE_BACK 1 +#define CACHED_IO 0 +#define DIRECT_IO 1 + +#define MAX_LOGICAL_DRIVES_8LD 8 +#define MAX_LOGICAL_DRIVES_40LD 40 +#define FC_MAX_PHYSICAL_DEVICES 256 +#define MAX_MBOX_CHANNELS 5 +#define MAX_MBOX_TARGET 15 +#define MBOX_MAX_PHYSICAL_DRIVES MAX_MBOX_CHANNELS*MAX_MBOX_TARGET +#define MAX_ROW_SIZE_40LD 32 +#define MAX_ROW_SIZE_8LD 8 +#define SPAN_DEPTH_8_SPANS 8 +#define SPAN_DEPTH_4_SPANS 4 +#define MAX_REQ_SENSE_LEN 0x20 + + + +/** + * struct mbox_t - Driver and f/w handshake structure. + * @cmd : firmware command + * @cmdid : command id + * @numsectors : number of sectors to be transferred + * @lba : Logical Block Address on LD + * @xferaddr : DMA address for data transfer + * @logdrv : logical drive number + * @numsge : number of scatter gather elements in sg list + * @resvd : reserved + * @busy : f/w busy, must wait to issue more commands. + * @numstatus : number of commands completed. + * @status : status of the commands completed + * @completed : array of completed command ids. + * @poll : poll and ack sequence + * @ack : poll and ack sequence + * + * The central handshake structure between the driver and the firmware. This + * structure must be allocated by the driver and aligned at 8-byte boundary. + */ +#define MBOX_MAX_FIRMWARE_STATUS 46 +typedef struct { + uint8_t cmd; + uint8_t cmdid; + uint16_t numsectors; + uint32_t lba; + uint32_t xferaddr; + uint8_t logdrv; + uint8_t numsge; + uint8_t resvd; + uint8_t busy; + uint8_t numstatus; + uint8_t status; + uint8_t completed[MBOX_MAX_FIRMWARE_STATUS]; + uint8_t poll; + uint8_t ack; +} __attribute__ ((packed)) mbox_t; + + +/** + * mbox64_t - 64-bit extension for the mailbox + * @segment_lo : the low 32-bits of the address of the scatter-gather list + * @segment_hi : the upper 32-bits of the address of the scatter-gather list + * @mbox : 32-bit mailbox, whose xferadder field must be set to + * 0xFFFFFFFF + * + * This is the extension of the 32-bit mailbox to be able to perform DMA + * beyond 4GB address range. + */ +typedef struct { + uint32_t xferaddr_lo; + uint32_t xferaddr_hi; + mbox_t mbox32; +} __attribute__ ((packed)) mbox64_t; + +/* + * mailbox structure used for internal commands + */ +typedef struct { + u8 cmd; + u8 cmdid; + u8 opcode; + u8 subopcode; + u32 lba; + u32 xferaddr; + u8 logdrv; + u8 rsvd[3]; + u8 numstatus; + u8 status; +} __attribute__ ((packed)) int_mbox_t; + +/** + * mraid_passthru_t - passthru structure to issue commands to physical devices + * @timeout : command timeout, 0=6sec, 1=60sec, 2=10min, 3=3hr + * @ars : set if ARS required after check condition + * @islogical : set if command meant for logical devices + * @logdrv : logical drive number if command for LD + * @channel : Channel on which physical device is located + * @target : SCSI target of the device + * @queuetag : unused + * @queueaction : unused + * @cdb : SCSI CDB + * @cdblen : length of the CDB + * @reqsenselen : amount of request sense data to be returned + * @reqsensearea : Sense information buffer + * @numsge : number of scatter-gather elements in the sg list + * @scsistatus : SCSI status of the command completed. + * @dataxferaddr : DMA data transfer address + * @dataxferlen : amount of the data to be transferred. + */ +typedef struct { + uint8_t timeout :3; + uint8_t ars :1; + uint8_t reserved :3; + uint8_t islogical :1; + uint8_t logdrv; + uint8_t channel; + uint8_t target; + uint8_t queuetag; + uint8_t queueaction; + uint8_t cdb[10]; + uint8_t cdblen; + uint8_t reqsenselen; + uint8_t reqsensearea[MAX_REQ_SENSE_LEN]; + uint8_t numsge; + uint8_t scsistatus; + uint32_t dataxferaddr; + uint32_t dataxferlen; +} __attribute__ ((packed)) mraid_passthru_t; + +typedef struct { + + uint32_t dataxferaddr_lo; + uint32_t dataxferaddr_hi; + mraid_passthru_t pthru32; + +} __attribute__ ((packed)) mega_passthru64_t; + +/** + * mraid_epassthru_t - passthru structure to issue commands to physical devices + * @timeout : command timeout, 0=6sec, 1=60sec, 2=10min, 3=3hr + * @ars : set if ARS required after check condition + * @rsvd1 : reserved field + * @cd_rom : (?) + * @rsvd2 : reserved field + * @islogical : set if command meant for logical devices + * @logdrv : logical drive number if command for LD + * @channel : Channel on which physical device is located + * @target : SCSI target of the device + * @queuetag : unused + * @queueaction : unused + * @cdblen : length of the CDB + * @rsvd3 : reserved field + * @cdb : SCSI CDB + * @numsge : number of scatter-gather elements in the sg list + * @status : SCSI status of the command completed. + * @reqsenselen : amount of request sense data to be returned + * @reqsensearea : Sense information buffer + * @rsvd4 : reserved field + * @dataxferaddr : DMA data transfer address + * @dataxferlen : amount of the data to be transferred. + */ +typedef struct { + uint8_t timeout :3; + uint8_t ars :1; + uint8_t rsvd1 :1; + uint8_t cd_rom :1; + uint8_t rsvd2 :1; + uint8_t islogical :1; + uint8_t logdrv; + uint8_t channel; + uint8_t target; + uint8_t queuetag; + uint8_t queueaction; + uint8_t cdblen; + uint8_t rsvd3; + uint8_t cdb[16]; + uint8_t numsge; + uint8_t status; + uint8_t reqsenselen; + uint8_t reqsensearea[MAX_REQ_SENSE_LEN]; + uint8_t rsvd4; + uint32_t dataxferaddr; + uint32_t dataxferlen; +} __attribute__ ((packed)) mraid_epassthru_t; + + +/** + * mraid_pinfo_t - product info, static information about the controller + * @data_size : current size in bytes (not including resvd) + * @config_signature : Current value is 0x00282008 + * @fw_version : Firmware version + * @bios_version : version of the BIOS + * @product_name : Name given to the controller + * @max_commands : Maximum concurrent commands supported + * @nchannels : Number of SCSI Channels detected + * @fc_loop_present : Number of Fibre Loops detected + * @mem_type : EDO, FPM, SDRAM etc + * @signature : + * @dram_size : In terms of MB + * @subsysid : device PCI subsystem ID + * @subsysvid : device PCI subsystem vendor ID + * @notify_counters : + * @pad1k : 135 + 889 resvd = 1024 total size + * + * This structures holds the information about the controller which is not + * expected to change dynamically. + * + * The current value of config signature is 0x00282008: + * 0x28 = MAX_LOGICAL_DRIVES, + * 0x20 = Number of stripes and + * 0x08 = Number of spans + */ +typedef struct { + uint32_t data_size; + uint32_t config_signature; + uint8_t fw_version[16]; + uint8_t bios_version[16]; + uint8_t product_name[80]; + uint8_t max_commands; + uint8_t nchannels; + uint8_t fc_loop_present; + uint8_t mem_type; + uint32_t signature; + uint16_t dram_size; + uint16_t subsysid; + uint16_t subsysvid; + uint8_t notify_counters; + uint8_t pad1k[889]; +} __attribute__ ((packed)) mraid_pinfo_t; + + +/** + * mraid_notify_t - the notification structure + * @global_counter : Any change increments this counter + * @param_counter : Indicates any params changed + * @param_id : Param modified - defined below + * @param_val : New val of last param modified + * @write_config_counter : write config occurred + * @write_config_rsvd : + * @ldrv_op_counter : Indicates ldrv op started/completed + * @ldrv_opid : ldrv num + * @ldrv_opcmd : ldrv operation - defined below + * @ldrv_opstatus : status of the operation + * @ldrv_state_counter : Indicates change of ldrv state + * @ldrv_state_id : ldrv num + * @ldrv_state_new : New state + * @ldrv_state_old : old state + * @pdrv_state_counter : Indicates change of ldrv state + * @pdrv_state_id : pdrv id + * @pdrv_state_new : New state + * @pdrv_state_old : old state + * @pdrv_fmt_counter : Indicates pdrv format started/over + * @pdrv_fmt_id : pdrv id + * @pdrv_fmt_val : format started/over + * @pdrv_fmt_rsvd : + * @targ_xfer_counter : Indicates SCSI-2 Xfer rate change + * @targ_xfer_id : pdrv Id + * @targ_xfer_val : new Xfer params of last pdrv + * @targ_xfer_rsvd : + * @fcloop_id_chg_counter : Indicates loopid changed + * @fcloopid_pdrvid : pdrv id + * @fcloop_id0 : loopid on fc loop 0 + * @fcloop_id1 : loopid on fc loop 1 + * @fcloop_state_counter : Indicates loop state changed + * @fcloop_state0 : state of fc loop 0 + * @fcloop_state1 : state of fc loop 1 + * @fcloop_state_rsvd : + */ +typedef struct { + uint32_t global_counter; + uint8_t param_counter; + uint8_t param_id; + uint16_t param_val; + uint8_t write_config_counter; + uint8_t write_config_rsvd[3]; + uint8_t ldrv_op_counter; + uint8_t ldrv_opid; + uint8_t ldrv_opcmd; + uint8_t ldrv_opstatus; + uint8_t ldrv_state_counter; + uint8_t ldrv_state_id; + uint8_t ldrv_state_new; + uint8_t ldrv_state_old; + uint8_t pdrv_state_counter; + uint8_t pdrv_state_id; + uint8_t pdrv_state_new; + uint8_t pdrv_state_old; + uint8_t pdrv_fmt_counter; + uint8_t pdrv_fmt_id; + uint8_t pdrv_fmt_val; + uint8_t pdrv_fmt_rsvd; + uint8_t targ_xfer_counter; + uint8_t targ_xfer_id; + uint8_t targ_xfer_val; + uint8_t targ_xfer_rsvd; + uint8_t fcloop_id_chg_counter; + uint8_t fcloopid_pdrvid; + uint8_t fcloop_id0; + uint8_t fcloop_id1; + uint8_t fcloop_state_counter; + uint8_t fcloop_state0; + uint8_t fcloop_state1; + uint8_t fcloop_state_rsvd; +} __attribute__ ((packed)) mraid_notify_t; + + +/** + * mraid_inquiry3_t - enquiry for device information + * + * @data_size : current size in bytes (not including resvd) + * @notify : + * @notify_rsvd : + * @rebuild_rate : rebuild rate (0% - 100%) + * @cache_flush_int : cache flush interval in seconds + * @sense_alert : + * @drive_insert_count : drive insertion count + * @battery_status : + * @num_ldrv : no. of Log Drives configured + * @recon_state : state of reconstruct + * @ldrv_op_status : logdrv Status + * @ldrv_size : size of each log drv + * @ldrv_prop : + * @ldrv_state : state of log drives + * @pdrv_state : state of phys drvs. + * @pdrv_format : + * @targ_xfer : phys device transfer rate + * @pad1k : 761 + 263reserved = 1024 bytes total size + */ +#define MAX_NOTIFY_SIZE 0x80 +#define CUR_NOTIFY_SIZE sizeof(mraid_notify_t) + +typedef struct { + uint32_t data_size; + + mraid_notify_t notify; + + uint8_t notify_rsvd[MAX_NOTIFY_SIZE - CUR_NOTIFY_SIZE]; + + uint8_t rebuild_rate; + uint8_t cache_flush_int; + uint8_t sense_alert; + uint8_t drive_insert_count; + + uint8_t battery_status; + uint8_t num_ldrv; + uint8_t recon_state[MAX_LOGICAL_DRIVES_40LD / 8]; + uint16_t ldrv_op_status[MAX_LOGICAL_DRIVES_40LD / 8]; + + uint32_t ldrv_size[MAX_LOGICAL_DRIVES_40LD]; + uint8_t ldrv_prop[MAX_LOGICAL_DRIVES_40LD]; + uint8_t ldrv_state[MAX_LOGICAL_DRIVES_40LD]; + uint8_t pdrv_state[FC_MAX_PHYSICAL_DEVICES]; + uint16_t pdrv_format[FC_MAX_PHYSICAL_DEVICES / 16]; + + uint8_t targ_xfer[80]; + uint8_t pad1k[263]; +} __attribute__ ((packed)) mraid_inquiry3_t; + + +/** + * mraid_adapinfo_t - information about the adapter + * @max_commands : max concurrent commands supported + * @rebuild_rate : rebuild rate - 0% thru 100% + * @max_targ_per_chan : max targ per channel + * @nchannels : number of channels on HBA + * @fw_version : firmware version + * @age_of_flash : number of times FW has been flashed + * @chip_set_value : contents of 0xC0000832 + * @dram_size : in MB + * @cache_flush_interval : in seconds + * @bios_version : + * @board_type : + * @sense_alert : + * @write_config_count : increase with every configuration change + * @drive_inserted_count : increase with every drive inserted + * @inserted_drive : channel:Id of inserted drive + * @battery_status : bit 0: battery module missing + * bit 1: VBAD + * bit 2: temprature high + * bit 3: battery pack missing + * bit 4,5: + * 00 - charge complete + * 01 - fast charge in progress + * 10 - fast charge fail + * 11 - undefined + * bit 6: counter > 1000 + * bit 7: Undefined + * @dec_fault_bus_info : + */ +typedef struct { + uint8_t max_commands; + uint8_t rebuild_rate; + uint8_t max_targ_per_chan; + uint8_t nchannels; + uint8_t fw_version[4]; + uint16_t age_of_flash; + uint8_t chip_set_value; + uint8_t dram_size; + uint8_t cache_flush_interval; + uint8_t bios_version[4]; + uint8_t board_type; + uint8_t sense_alert; + uint8_t write_config_count; + uint8_t battery_status; + uint8_t dec_fault_bus_info; +} __attribute__ ((packed)) mraid_adapinfo_t; + + +/** + * mraid_ldrv_info_t - information about the logical drives + * @nldrv : Number of logical drives configured + * @rsvd : + * @size : size of each logical drive + * @prop : + * @state : state of each logical drive + */ +typedef struct { + uint8_t nldrv; + uint8_t rsvd[3]; + uint32_t size[MAX_LOGICAL_DRIVES_8LD]; + uint8_t prop[MAX_LOGICAL_DRIVES_8LD]; + uint8_t state[MAX_LOGICAL_DRIVES_8LD]; +} __attribute__ ((packed)) mraid_ldrv_info_t; + + +/** + * mraid_pdrv_info_t - information about the physical drives + * @pdrv_state : state of each physical drive + */ +typedef struct { + uint8_t pdrv_state[MBOX_MAX_PHYSICAL_DRIVES]; + uint8_t rsvd; +} __attribute__ ((packed)) mraid_pdrv_info_t; + + +/** + * mraid_inquiry_t - RAID inquiry, mailbox command 0x05 + * @mraid_adapinfo_t : adapter information + * @mraid_ldrv_info_t : logical drives information + * @mraid_pdrv_info_t : physical drives information + */ +typedef struct { + mraid_adapinfo_t adapter_info; + mraid_ldrv_info_t logdrv_info; + mraid_pdrv_info_t pdrv_info; +} __attribute__ ((packed)) mraid_inquiry_t; + + +/** + * mraid_extinq_t - RAID extended inquiry, mailbox command 0x04 + * + * @raid_inq : raid inquiry + * @phys_drv_format : + * @stack_attn : + * @modem_status : + * @rsvd : + */ +typedef struct { + mraid_inquiry_t raid_inq; + uint16_t phys_drv_format[MAX_MBOX_CHANNELS]; + uint8_t stack_attn; + uint8_t modem_status; + uint8_t rsvd[2]; +} __attribute__ ((packed)) mraid_extinq_t; + + +/** + * adap_device_t - device information + * @channel : channel fpor the device + * @target : target ID of the device + */ +typedef struct { + uint8_t channel; + uint8_t target; +}__attribute__ ((packed)) adap_device_t; + + +/** + * adap_span_40ld_t - 40LD span + * @start_blk : starting block + * @num_blks : number of blocks + */ +typedef struct { + uint32_t start_blk; + uint32_t num_blks; + adap_device_t device[MAX_ROW_SIZE_40LD]; +}__attribute__ ((packed)) adap_span_40ld_t; + + +/** + * adap_span_8ld_t - 8LD span + * @start_blk : starting block + * @num_blks : number of blocks + */ +typedef struct { + uint32_t start_blk; + uint32_t num_blks; + adap_device_t device[MAX_ROW_SIZE_8LD]; +}__attribute__ ((packed)) adap_span_8ld_t; + + +/** + * logdrv_param_t - logical drives parameters + * + * @span_depth : total number of spans + * @level : RAID level + * @read_ahead : read ahead, no read ahead, adaptive read ahead + * @stripe_sz : encoded stripe size + * @status : status of the logical drive + * @write_mode : write mode, write_through/write_back + * @direct_io : direct io or through cache + * @row_size : number of stripes in a row + */ +typedef struct { + uint8_t span_depth; + uint8_t level; + uint8_t read_ahead; + uint8_t stripe_sz; + uint8_t status; + uint8_t write_mode; + uint8_t direct_io; + uint8_t row_size; +} __attribute__ ((packed)) logdrv_param_t; + + +/** + * logdrv_40ld_t - logical drive definition for 40LD controllers + * @lparam : logical drives parameters + * @span : span + */ +typedef struct { + logdrv_param_t lparam; + adap_span_40ld_t span[SPAN_DEPTH_8_SPANS]; +}__attribute__ ((packed)) logdrv_40ld_t; + + +/** + * logdrv_8ld_span8_t - logical drive definition for 8LD controllers + * @lparam : logical drives parameters + * @span : span + * + * 8-LD logical drive with upto 8 spans + */ +typedef struct { + logdrv_param_t lparam; + adap_span_8ld_t span[SPAN_DEPTH_8_SPANS]; +}__attribute__ ((packed)) logdrv_8ld_span8_t; + + +/** + * logdrv_8ld_span4_t - logical drive definition for 8LD controllers + * @lparam : logical drives parameters + * @span : span + * + * 8-LD logical drive with upto 4 spans + */ +typedef struct { + logdrv_param_t lparam; + adap_span_8ld_t span[SPAN_DEPTH_4_SPANS]; +}__attribute__ ((packed)) logdrv_8ld_span4_t; + + +/** + * phys_drive_t - physical device information + * @type : Type of the device + * @cur_status : current status of the device + * @tag_depth : Level of tagging + * @sync_neg : sync negotiation - ENABLE or DISBALE + * @size : configurable size in terms of 512 byte + */ +typedef struct { + uint8_t type; + uint8_t cur_status; + uint8_t tag_depth; + uint8_t sync_neg; + uint32_t size; +}__attribute__ ((packed)) phys_drive_t; + + +/** + * disk_array_40ld_t - disk array for 40LD controllers + * @numldrv : number of logical drives + * @resvd : + * @ldrv : logical drives information + * @pdrv : physical drives information + */ +typedef struct { + uint8_t numldrv; + uint8_t resvd[3]; + logdrv_40ld_t ldrv[MAX_LOGICAL_DRIVES_40LD]; + phys_drive_t pdrv[MBOX_MAX_PHYSICAL_DRIVES]; +}__attribute__ ((packed)) disk_array_40ld_t; + + +/** + * disk_array_8ld_span8_t - disk array for 8LD controllers + * @numldrv : number of logical drives + * @resvd : + * @ldrv : logical drives information + * @pdrv : physical drives information + * + * Disk array for 8LD logical drives with upto 8 spans + */ +typedef struct { + uint8_t numldrv; + uint8_t resvd[3]; + logdrv_8ld_span8_t ldrv[MAX_LOGICAL_DRIVES_8LD]; + phys_drive_t pdrv[MBOX_MAX_PHYSICAL_DRIVES]; +}__attribute__ ((packed)) disk_array_8ld_span8_t; + + +/** + * disk_array_8ld_span4_t - disk array for 8LD controllers + * @numldrv : number of logical drives + * @resvd : + * @ldrv : logical drives information + * @pdrv : physical drives information + * + * Disk array for 8LD logical drives with upto 4 spans + */ +typedef struct { + uint8_t numldrv; + uint8_t resvd[3]; + logdrv_8ld_span4_t ldrv[MAX_LOGICAL_DRIVES_8LD]; + phys_drive_t pdrv[MBOX_MAX_PHYSICAL_DRIVES]; +}__attribute__ ((packed)) disk_array_8ld_span4_t; + + +/** + * private_bios_data - bios private data for boot devices + * @geometry : bits 0-3 - BIOS geometry, 0x0001 - 1GB, 0x0010 - 2GB, + * 0x1000 - 8GB, Others values are invalid + * @unused : bits 4-7 are unused + * @boot_drv : logical drive set as boot drive, 0..7 - for 8LD cards, + * 0..39 - for 40LD cards + * @cksum : 0-(sum of first 13 bytes of this structure) + */ +struct private_bios_data { + uint8_t geometry :4; + uint8_t unused :4; + uint8_t boot_drv; + uint8_t rsvd[12]; + uint16_t cksum; +} __attribute__ ((packed)); + + +/** + * mbox_sgl64 - 64-bit scatter list for mailbox based controllers + * @address : address of the buffer + * @length : data transfer length + */ +typedef struct { + uint64_t address; + uint32_t length; +} __attribute__ ((packed)) mbox_sgl64; + +/** + * mbox_sgl32 - 32-bit scatter list for mailbox based controllers + * @address : address of the buffer + * @length : data transfer length + */ +typedef struct { + uint32_t address; + uint32_t length; +} __attribute__ ((packed)) mbox_sgl32; + +#endif // _MRAID_MBOX_DEFS_H_ + +/* vim: set ts=8 sw=8 tw=78: */ diff -Nru a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/mega_common.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,283 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : mega_common.h + * + * Libaray of common routine used by all low-level megaraid drivers + */ + +#ifndef _MEGA_COMMON_H_ +#define _MEGA_COMMON_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define LSI_MAX_CHANNELS 16 +#define LSI_MAX_LOGICAL_DRIVES_64LD (64+1) + + +/** + * scb_t - scsi command control block + * @param ccb : command control block for individual driver + * @param list : list of control blocks + * @param gp : general purpose field for LLDs + * @param sno : all SCBs have a serial number + * @param scp : associated scsi command + * @param state : current state of scb + * @param dma_dir : direction of data transfer + * @param dma_type : transfer with sg list, buffer, or no data transfer + * @param dev_channel : actual channel on the device + * @param dev_target : actual target on the device + * @param status : completion status + * + * This is our central data structure to issue commands the each driver. + * Driver specific data structures are maintained in the ccb field. + * scb provides a field 'gp', which can be used by LLD for its own purposes + * + * dev_channel and dev_target must be initialized with the actual channel and + * target on the controller. + */ +typedef struct { + caddr_t ccb; + struct list_head list; + unsigned long gp; + unsigned int sno; + struct scsi_cmnd *scp; + uint32_t state; + uint32_t dma_direction; + uint32_t dma_type; + uint16_t dev_channel; + uint16_t dev_target; + uint32_t status; +} scb_t; + +/* + * SCB states as it transitions from one state to another + */ +#define SCB_FREE 0x0000 /* on the free list */ +#define SCB_ACTIVE 0x0001 /* off the free list */ +#define SCB_PENDQ 0x0002 /* on the pending queue */ +#define SCB_ISSUED 0x0004 /* issued - owner f/w */ +#define SCB_ABORT 0x0008 /* Got an abort for this one */ +#define SCB_RESET 0x0010 /* Got a reset for this one */ + +/* + * DMA types for scb + */ +#define MRAID_DMA_NONE 0x0000 /* no data transfer for this command */ +#define MRAID_DMA_WSG 0x0001 /* data transfer using a sg list */ +#define MRAID_DMA_WBUF 0x0002 /* data transfer using a contiguous buffer */ + + +/** + * struct adapter_t - driver's initialization structure + * @param dpc_h : tasklet handle + * @param pdev : pci configuration pointer for kernel + * @param host : pointer to host structure of mid-layer + * @param host_lock : pointer to appropriate lock + * @param lock : synchronization lock for mid-layer and driver + * @param quiescent : driver is quiescent for now. + * @param outstanding_cmds : number of commands pending in the driver + * @param kscb_list : pointer to the bulk of SCBs pointers for IO + * @param kscb_pool : pool of free scbs for IO + * @param kscb_pool_lock : lock for pool of free scbs + * @param pend_list : pending commands list + * @param pend_list_lock : exlusion lock for pending commands list + * @param completed_list : list of completed commands + * @param completed_list_lock : exclusion lock for list of completed commands + * @param sglen : max sg elements supported + * @param device_ids : to convert kernel device addr to our devices. + * @param raid_device : raid adapter specific pointer + * @param max_channel : maximum channel number supported - inclusive + * @param max_target : max target supported - inclusive + * @param max_lun : max lun supported - inclusive + * @param unique_id : unique identifier for each adapter + * @param irq : IRQ for this adapter + * @param ito : internal timeout value, (-1) means no timeout + * @param ibuf : buffer to issue internal commands + * @param ibuf_dma_h : dma handle for the above buffer + * @param uscb_list : SCB pointers for user cmds, common mgmt module + * @param uscb_pool : pool of SCBs for user commands + * @param uscb_pool_lock : exclusion lock for these SCBs + * @param max_cmds : max outstanding commands + * @param fw_version : firmware version + * @param bios_version : bios version + * @param max_cdb_sz : biggest CDB size supported. + * @param ha : is high availability present - clustering + * @param init_id : initiator ID, the default value should be 7 + * @param max_sectors : max sectors per request + * @param cmd_per_lun : max outstanding commands per LUN + * @param being_detached : set when unloading, no more mgmt calls + * + * + * mraid_setup_device_map() can be called anytime after the device map is + * available and MRAID_GET_DEVICE_MAP() can be called whenever the mapping is + * required, usually from LLD's queue entry point. The formar API sets up the + * MRAID_IS_LOGICAL(adapter_t *, struct scsi_cmnd *) to find out if the + * device in question is a logical drive. + * + * quiescent flag should be set by the driver if it is not accepting more + * commands + * + * NOTE: The fields of this structures are placed to minimize cache misses + */ + +// amount of space required to store the bios and firmware version strings +#define VERSION_SIZE 16 + +typedef struct { + struct tasklet_struct dpc_h; + struct pci_dev *pdev; + struct Scsi_Host *host; + spinlock_t *host_lock; + spinlock_t lock; + uint8_t quiescent; + int outstanding_cmds; + scb_t *kscb_list; + struct list_head kscb_pool; + spinlock_t kscb_pool_lock; + struct list_head pend_list; + spinlock_t pend_list_lock; + struct list_head completed_list; + spinlock_t completed_list_lock; + uint16_t sglen; + int device_ids[LSI_MAX_CHANNELS] + [LSI_MAX_LOGICAL_DRIVES_64LD]; + caddr_t raid_device; + uint8_t max_channel; + uint16_t max_target; + uint8_t max_lun; + + uint32_t unique_id; + uint8_t irq; + uint8_t ito; + caddr_t ibuf; + dma_addr_t ibuf_dma_h; + scb_t *uscb_list; + struct list_head uscb_pool; + spinlock_t uscb_pool_lock; + int max_cmds; + uint8_t fw_version[VERSION_SIZE]; + uint8_t bios_version[VERSION_SIZE]; + uint8_t max_cdb_sz; + uint8_t ha; + uint16_t init_id; + uint16_t max_sectors; + uint16_t cmd_per_lun; + atomic_t being_detached; +} adapter_t; + +#define SCSI_FREE_LIST_LOCK(adapter) (&adapter->kscb_pool_lock) +#define USER_FREE_LIST_LOCK(adapter) (&adapter->uscb_pool_lock) +#define PENDING_LIST_LOCK(adapter) (&adapter->pend_list_lock) +#define COMPLETED_LIST_LOCK(adapter) (&adapter->completed_list_lock) + + +// conversion from scsi command +#define SCP2HOST(scp) (scp)->device->host // to host +#define SCP2HOSTDATA(scp) SCP2HOST(scp)->hostdata // to soft state +#define SCP2CHANNEL(scp) (scp)->device->channel // to channel +#define SCP2TARGET(scp) (scp)->device->id // to target +#define SCP2LUN(scp) (scp)->device->lun // to LUN + +// generic macro to convert scsi command and host to controller's soft state +#define SCSIHOST2ADAP(host) (((caddr_t *)(host->hostdata))[0]) +#define SCP2ADAPTER(scp) (adapter_t *)SCSIHOST2ADAP(SCP2HOST(scp)) + + +/** + * MRAID_GET_DEVICE_MAP - device ids + * @param adp - Adapter's soft state + * @param scp - mid-layer scsi command pointer + * @param p_chan - physical channel on the controller + * @param target - target id of the device or logical drive number + * @param islogical - set if the command is for the logical drive + * + * Macro to retrieve information about device class, logical or physical and + * the corresponding physical channel and target or logical drive number + **/ +#define MRAID_IS_LOGICAL(adp, scp) \ + (SCP2CHANNEL(scp) == (adp)->max_channel) ? 1 : 0 + +#define MRAID_GET_DEVICE_MAP(adp, scp, p_chan, target, islogical) \ + /* \ + * Is the request coming for the virtual channel \ + */ \ + islogical = MRAID_IS_LOGICAL(adp, scp); \ + \ + /* \ + * Get an index into our table of drive ids mapping \ + */ \ + if (islogical) { \ + p_chan = 0xFF; \ + target = \ + (adp)->device_ids[(adp)->max_channel][SCP2TARGET(scp)]; \ + } \ + else { \ + p_chan = ((adp)->device_ids[SCP2CHANNEL(scp)] \ + [SCP2TARGET(scp)] >> 8) & 0xFF; \ + target = ((adp)->device_ids[SCP2CHANNEL(scp)] \ + [SCP2TARGET(scp)] & 0xFF); \ + } + +/* + * ### Helper routines ### + */ +#define LSI_DBGLVL mraid_debug_level // each LLD must define a global + // mraid_debug_level + +#ifdef DEBUG +#if defined (_ASSERT_PANIC) +#define ASSERT_ACTION panic +#else +#define ASSERT_ACTION printk +#endif + +#define ASSERT(expression) \ + if (!(expression)) { \ + ASSERT_ACTION("assertion failed:(%s), file: %s, line: %d:%s\n", \ + #expression, __FILE__, __LINE__, __FUNCTION__); \ + } +#else +#define ASSERT(expression) +#endif + +/* + * struct mraid_pci_blk - structure holds DMA memory block info + * @param vaddr : virtual address to a memory block + * @param dma_addr : DMA handle to a memory block + * + * This structure is filled up for the caller. It is the responsibilty of the + * caller to allocate this array big enough to store addresses for all + * requested elements + */ +struct mraid_pci_blk { + caddr_t vaddr; + dma_addr_t dma_addr; +}; + +#endif // _MEGA_COMMON_H_ + +// vim: set ts=8 sw=8 tw=78: diff -Nru a/drivers/scsi/megaraid/megaraid_ioctl.h b/drivers/scsi/megaraid/megaraid_ioctl.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/megaraid_ioctl.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,291 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : megaraid_ioctl.h + * + * Definitions to interface with user level applications + */ + +#ifndef _MEGARAID_IOCTL_H_ +#define _MEGARAID_IOCTL_H_ + +#include +#include + +#include "mbox_defs.h" + +/** + * con_log() - console log routine + * @param level : indicates the severity of the message. + * @fparam mt : format string + * + * con_log displays the error messages on the console based on the current + * debug level. Also it attaches the appropriate kernel severity level with + * the message. + * + * + * consolge messages debug levels + */ +#define CL_ANN 0 /* print unconditionally, announcements */ +#define CL_DLEVEL1 1 /* debug level 1, informative */ +#define CL_DLEVEL2 2 /* debug level 2, verbose */ +#define CL_DLEVEL3 3 /* debug level 3, very verbose */ + +#define con_log(level, fmt) if (LSI_DBGLVL >= level) printk fmt; + +/* + * Definitions & Declarations needed to use common management module + */ + +#define MEGAIOC_MAGIC 'm' +#define MEGAIOCCMD _IOWR(MEGAIOC_MAGIC, 0, mimd_t) + +#define MEGAIOC_QNADAP 'm' /* Query # of adapters */ +#define MEGAIOC_QDRVRVER 'e' /* Query driver version */ +#define MEGAIOC_QADAPINFO 'g' /* Query adapter information */ + +#define USCSICMD 0x80 +#define UIOC_RD 0x00001 +#define UIOC_WR 0x00002 + +#define MBOX_CMD 0x00000 +#define GET_DRIVER_VER 0x10000 +#define GET_N_ADAP 0x20000 +#define GET_ADAP_INFO 0x30000 +#define GET_CAP 0x40000 +#define GET_STATS 0x50000 +#define GET_IOCTL_VERSION 0x01 + +#define EXT_IOCTL_SIGN_SZ 16 +#define EXT_IOCTL_SIGN "$$_EXTD_IOCTL_$$" + +#define MBOX_LEGACY 0x00 /* ioctl has legacy mbox*/ +#define MBOX_HPE 0x01 /* ioctl has hpe mbox */ + +#define APPTYPE_MIMD 0x00 /* old existing apps */ +#define APPTYPE_UIOC 0x01 /* new apps using uioc */ + +#define IOCTL_ISSUE 0x00000001 /* Issue ioctl */ +#define IOCTL_ABORT 0x00000002 /* Abort previous ioctl */ + +#define DRVRTYPE_MBOX 0x00000001 /* regular mbox driver */ +#define DRVRTYPE_HPE 0x00000002 /* new hpe driver */ + +#define MKADAP(adapno) (MEGAIOC_MAGIC << 8 | (adapno) ) +#define GETADAP(mkadap) ((mkadap) ^ MEGAIOC_MAGIC << 8) + +#define MAX_DMA_POOLS 5 /* 4k, 8k, 16k, 32k, 64k*/ + + +/** + * struct uioc_t - the common ioctl packet structure + * + * @signature : Must be "$$_EXTD_IOCTL_$$" + * @mb_type : Type of the mail box (MB_LEGACY or MB_HPE) + * @app_type : Type of the issuing application (existing or new) + * @opcode : Opcode of the command + * @adapno : Adapter number + * @cmdbuf : Pointer to buffer - can point to mbox or plain data buffer + * @xferlen : xferlen for DCMD and non mailbox commands + * @data_dir : Direction of the data transfer + * @status : Status from the driver + * @reserved : reserved bytes for future expansion + * + * @user_data : user data transfer address is saved in this + * @user_data_len: length of the data buffer sent by user app + * @user_pthru : user passthru address is saves in this (null if DCMD) + * @pthru32 : kernel address passthru (allocated per kioc) + * @pthru32_h : physicall address of @pthru32 + * @list : for kioc free pool list maintenance + * @done : call back routine for llds to call when kioc is completed + * @buf_vaddr : dma pool buffer attached to kioc for data transfer + * @buf_paddr : physical address of the dma pool buffer + * @pool_index : index of the dma pool that @buf_vaddr is taken from + * @free_buf : indicates if buffer needs to be freed after kioc completes + * + * Note : All LSI drivers understand only this packet. Any other + * : format sent by applications would be converted to this. + */ +typedef struct uioc { + +/* User Apps: */ + + uint8_t signature[EXT_IOCTL_SIGN_SZ]; + uint16_t mb_type; + uint16_t app_type; + uint32_t opcode; + uint32_t adapno; + uint64_t cmdbuf; + uint32_t xferlen; + uint32_t data_dir; + int32_t status; + uint8_t reserved[128]; + +/* Driver Data: */ + void __user * user_data; + uint32_t user_data_len; + mraid_passthru_t __user *user_pthru; + + mraid_passthru_t *pthru32; + dma_addr_t pthru32_h; + + struct list_head list; + void (*done)(struct uioc*); + + caddr_t buf_vaddr; + dma_addr_t buf_paddr; + uint8_t pool_index; + uint8_t free_buf; + +} __attribute__ ((aligned(1024),packed)) uioc_t; + + +/** + * struct mraid_hba_info - information about the controller + * + * @param pci_vendor_id : PCI vendor id + * @param pci_device_id : PCI device id + * @param subsystem_vendor_id : PCI subsystem vendor id + * @param subsystem_device_id : PCI subsystem device id + * @param baseport : base port of hba memory + * @param pci_bus : PCI bus + * @param pci_dev_fn : PCI device/function values + * @param irq : interrupt vector for the device + * + * Extended information of 256 bytes about the controller. Align on the single + * byte boundary so that 32-bit applications can be run on 64-bit platform + * drivers withoug re-compilation. + * NOTE: reduce the number of reserved bytes whenever new field are added, so + * that total size of the structure remains 256 bytes. + */ +typedef struct mraid_hba_info { + + uint16_t pci_vendor_id; + uint16_t pci_device_id; + uint16_t subsys_vendor_id; + uint16_t subsys_device_id; + + uint64_t baseport; + uint8_t pci_bus; + uint8_t pci_dev_fn; + uint8_t pci_slot; + uint8_t irq; + + uint32_t unique_id; + uint32_t host_no; + + uint8_t num_ldrv; +} __attribute__ ((aligned(256), packed)) mraid_hba_info_t; + + +/** + * mcontroller : adapter info structure for old mimd_t apps + * + * @base : base address + * @irq : irq number + * @numldrv : number of logical drives + * @pcibus : pci bus + * @pcidev : pci device + * @pcifun : pci function + * @pciid : pci id + * @pcivendor : vendor id + * @pcislot : slot number + * @uid : unique id + */ +typedef struct mcontroller { + + uint64_t base; + uint8_t irq; + uint8_t numldrv; + uint8_t pcibus; + uint16_t pcidev; + uint8_t pcifun; + uint16_t pciid; + uint16_t pcivendor; + uint8_t pcislot; + uint32_t uid; + +} __attribute__ ((packed)) mcontroller_t; + + +/** + * mm_dmapool_t : Represents one dma pool with just one buffer + * + * @vaddr : Virtual address + * @paddr : DMA physicall address + * @bufsize : In KB - 4 = 4k, 8 = 8k etc. + * @handle : Handle to the dma pool + * @lock : lock to synchronize access to the pool + * @in_use : If pool already in use, attach new block + */ +typedef struct mm_dmapool { + caddr_t vaddr; + dma_addr_t paddr; + uint32_t buf_size; + struct dma_pool *handle; + spinlock_t lock; + uint8_t in_use; +} mm_dmapool_t; + + +/** + * mraid_mmadp_t: Structure that drivers pass during (un)registration + * + * @unique_id : Any unique id (usually PCI bus+dev+fn) + * @drvr_type : megaraid or hpe (DRVRTYPE_MBOX or DRVRTYPE_HPE) + * @drv_data : Driver specific; not touched by the common module + * @timeout : timeout for issued kiocs + * @max_kioc : Maximum ioctl packets acceptable by the lld + * @pdev : pci dev; used for allocating dma'ble memory + * @issue_uioc : Driver supplied routine to issue uioc_t commands + * : issue_uioc(drvr_data, kioc, ISSUE/ABORT, uioc_done) + * @list : attach with the global list of adapters + * @kioc_list : block of mem for @max_kioc number of kiocs + * @kioc_pool : pool of free kiocs + * @kioc_pool_lock : protection for free pool + * @kioc_semaphore : so as not to exceed @max_kioc parallel ioctls + * @mbox_list : block of mem for @max_kioc number of mboxes + * @pthru_dma_pool : DMA pool to allocate passthru packets + * @dma_pool_list : array of dma pools + */ + +typedef struct mraid_mmadp { + +/* Filled by driver */ + + uint32_t unique_id; + uint32_t drvr_type; + unsigned long drvr_data; + uint8_t timeout; + uint8_t max_kioc; + + struct pci_dev *pdev; + + int(*issue_uioc)(unsigned long, uioc_t *, uint32_t); + +/* Maintained by common module */ + + struct list_head list; + uioc_t *kioc_list; + struct list_head kioc_pool; + spinlock_t kioc_pool_lock; + struct semaphore kioc_semaphore; + + mbox64_t *mbox_list; + struct dma_pool *pthru_dma_pool; + mm_dmapool_t dma_pool_list[MAX_DMA_POOLS]; + +} mraid_mmadp_t; + +int mraid_mm_register_adp(mraid_mmadp_t *); +int mraid_mm_unregister_adp(uint32_t); + +#endif /* _MEGARAID_IOCTL_H_ */ diff -Nru a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/megaraid_mbox.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,3891 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : megaraid_mbox.c + * Version : v2.20.3.1 (August 24 2004) + * + * Authors: + * Atul Mukker + * Sreenivas Bagalkote + * Manoj Jose + * + * List of supported controllers + * + * OEM Product Name VID DID SSVID SSID + * --- ------------ --- --- ---- ---- + * Dell PERC3/QC 101E 1960 1028 0471 + * Dell PERC3/DC 101E 1960 1028 0493 + * Dell PERC3/SC 101E 1960 1028 0475 + * Dell PERC3/Di 1028 1960 1028 0123 + * Dell PERC4/SC 1000 1960 1028 0520 + * Dell PERC4/DC 1000 1960 1028 0518 + * Dell PERC4/QC 1000 0407 1028 0531 + * Dell PERC4/Di 1028 000F 1028 014A + * Dell PERC 4e/Si 1028 0013 1028 016c + * Dell PERC 4e/Di 1028 0013 1028 016d + * Dell PERC 4e/Di 1028 0013 1028 016e + * Dell PERC 4e/Di 1028 0013 1028 016f + * Dell PERC 4e/Di 1028 0013 1028 0170 + * Dell PERC 4e/DC 1000 0408 1028 0002 + * Dell PERC 4e/SC 1000 0408 1028 0001 + * + * + * LSI MegaRAID SCSI 320-0 1000 1960 1000 A520 + * LSI MegaRAID SCSI 320-1 1000 1960 1000 0520 + * LSI MegaRAID SCSI 320-2 1000 1960 1000 0518 + * LSI MegaRAID SCSI 320-0X 1000 0407 1000 0530 + * LSI MegaRAID SCSI 320-2X 1000 0407 1000 0532 + * LSI MegaRAID SCSI 320-4X 1000 0407 1000 0531 + * LSI MegaRAID SCSI 320-1E 1000 0408 1000 0001 + * LSI MegaRAID SCSI 320-2E 1000 0408 1000 0002 + * LSI MegaRAID SATA 150-4 1000 1960 1000 4523 + * LSI MegaRAID SATA 150-6 1000 1960 1000 0523 + * LSI MegaRAID SATA 300-4X 1000 0409 1000 3004 + * LSI MegaRAID SATA 300-8X 1000 0409 1000 3008 + * + * INTEL RAID Controller SRCU42X 1000 0407 8086 0532 + * INTEL RAID Controller SRCS16 1000 1960 8086 0523 + * INTEL RAID Controller SRCU42E 1000 0408 8086 0002 + * INTEL RAID Controller SRCZCRX 1000 0407 8086 0530 + * INTEL RAID Controller SRCS28X 1000 0409 8086 3008 + * INTEL RAID Controller SROMBU42E 1000 0408 8086 3431 + * INTEL RAID Controller SROMBU42E 1000 0408 8086 3499 + * INTEL RAID Controller SRCU51L 1000 1960 8086 0520 + * + * + * FSC MegaRAID PCI Express ROMB 1000 0408 1734 1065 + * + * + * ACER MegaRAID ROMB-2E 1000 0408 1025 004D + * + * + * For history of changes, see Documentation/ChangeLog.megaraid + */ + +#include "megaraid_mbox.h" + +static int megaraid_init(void); +static void megaraid_exit(void); + +static int megaraid_probe_one(struct pci_dev*, const struct pci_device_id *); +static void megaraid_detach_one(struct pci_dev *); +static void megaraid_mbox_shutdown(struct device *); + +static int megaraid_io_attach(adapter_t *); +static void megaraid_io_detach(adapter_t *); + +static int megaraid_init_mbox(adapter_t *); +static void megaraid_fini_mbox(adapter_t *); + +static int megaraid_alloc_cmd_packets(adapter_t *); +static void megaraid_free_cmd_packets(adapter_t *); + +static int megaraid_mbox_setup_dma_pools(adapter_t *); +static void megaraid_mbox_teardown_dma_pools(adapter_t *); + +static int megaraid_abort_handler(struct scsi_cmnd *); +static int megaraid_reset_handler(struct scsi_cmnd *); + +static int mbox_post_sync_cmd(adapter_t *, uint8_t []); +static int mbox_post_sync_cmd_fast(adapter_t *, uint8_t []); +static int megaraid_busywait_mbox(mraid_device_t *); +static int megaraid_mbox_product_info(adapter_t *); +static int megaraid_mbox_extended_cdb(adapter_t *); +static int megaraid_mbox_support_ha(adapter_t *, uint16_t *); +static int megaraid_mbox_support_random_del(adapter_t *); +static int megaraid_mbox_get_max_sg(adapter_t *); +static void megaraid_mbox_enum_raid_scsi(adapter_t *); +static void megaraid_mbox_flush_cache(adapter_t *); + +static void megaraid_mbox_display_scb(adapter_t *, scb_t *); +static void megaraid_mbox_setup_device_map(adapter_t *); + +static int megaraid_queue_command(struct scsi_cmnd *, + void (*)(struct scsi_cmnd *)); +static scb_t *megaraid_mbox_build_cmd(adapter_t *, struct scsi_cmnd *, int *); +static void megaraid_mbox_runpendq(adapter_t *, scb_t *); +static void megaraid_mbox_prepare_pthru(adapter_t *, scb_t *, + struct scsi_cmnd *); +static void megaraid_mbox_prepare_epthru(adapter_t *, scb_t *, + struct scsi_cmnd *); + +static irqreturn_t megaraid_isr(int, void *, struct pt_regs *); + +static void megaraid_mbox_dpc(unsigned long); + +static int megaraid_cmm_register(adapter_t *); +static int megaraid_cmm_unregister(adapter_t *); +static int megaraid_mbox_mm_handler(unsigned long, uioc_t *, uint32_t); +static int megaraid_mbox_mm_command(adapter_t *, uioc_t *); +static void megaraid_mbox_mm_done(adapter_t *, scb_t *); +static int gather_hbainfo(adapter_t *, mraid_hba_info_t *); +static int wait_till_fw_empty(adapter_t *); + + + +MODULE_AUTHOR("LSI Logic Corporation"); +MODULE_DESCRIPTION("LSI Logic MegaRAID Mailbox Driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(MEGARAID_VERSION); + +/* + * ### modules parameters for driver ### + */ + +/** + * Set to enable driver to expose unconfigured disk to kernel + */ +static int megaraid_expose_unconf_disks = 0; +module_param_named(unconf_disks, megaraid_expose_unconf_disks, int, 0); +MODULE_PARM_DESC(unconf_disks, + "Set to expose unconfigured disks to kernel (default=0)"); + +/** + * driver wait time if the adapter's mailbox is busy + */ +static unsigned int max_mbox_busy_wait = MBOX_BUSY_WAIT; +module_param_named(busy_wait, max_mbox_busy_wait, int, 0); +MODULE_PARM_DESC(busy_wait, + "Max wait for mailbox in microseconds if busy (default=10)"); + +/** + * number of sectors per IO command + */ +static unsigned int megaraid_max_sectors = MBOX_MAX_SECTORS; +module_param_named(max_sectors, megaraid_max_sectors, int, 0); +MODULE_PARM_DESC(max_sectors, + "Maximum number of sectors per IO command (default=128)"); + +/** + * number of commands per logical unit + */ +static unsigned int megaraid_cmd_per_lun = MBOX_DEF_CMD_PER_LUN; +module_param_named(cmd_per_lun, megaraid_cmd_per_lun, int, 0); +MODULE_PARM_DESC(cmd_per_lun, + "Maximum number of commands per logical unit (default=64)"); + + +/** + * Fast driver load option, skip scanning for physical devices during load. + * This would result in non-disk devices being skipped during driver load + * time. These can be later added though, using /proc/scsi/scsi + */ +static unsigned int megaraid_fast_load = 0; +module_param_named(fast_load, megaraid_fast_load, int, 0); +MODULE_PARM_DESC(fast_load, + "Faster loading of the driver, skips physical devices! (default=0)"); + + +/** + * mraid_debug level - threshold for amount of information to be displayed by + * the driver. This level can be changed through modules parameters, ioctl or + * sysfs/proc interface. By default, print the announcement messages only. + */ +int mraid_debug_level = CL_ANN; +module_param_named(debug_level, mraid_debug_level, int, 0); +MODULE_PARM_DESC(debug_level, "Debug level for driver (default=0)"); + +/* + * ### global data ### + */ +static uint8_t megaraid_mbox_version[8] = + { 0x02, 0x20, 0x02, 0x00, 7, 22, 20, 4 }; + + +/* + * PCI table for all supported controllers. + */ +static struct pci_device_id pci_id_table_g[] = { + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4_DI_DISCOVERY, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4_DI_DISCOVERY, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_PERC4_SC, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4_SC, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_PERC4_DC, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4_DC, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_PERC4_QC, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4_QC, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4_DI_EVERGLADES, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4_DI_EVERGLADES, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4E_SI_BIGBEND, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_SI_BIGBEND, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4E_DI_KOBUK, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_DI_KOBUK, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4E_DI_CORVETTE, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_DI_CORVETTE, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4E_DI_EXPEDITION, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_DI_EXPEDITION, + }, + { + PCI_VENDOR_ID_DELL, + PCI_DEVICE_ID_PERC4E_DI_GUADALUPE, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_PERC4E_DC_320_2E, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_DC_320_2E, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_PERC4E_SC_320_1E, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC4E_SC_320_1E, + }, + { + PCI_VENDOR_ID_AMI, + PCI_DEVICE_ID_AMI_MEGARAID3, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC3_QC, + }, + { + PCI_VENDOR_ID_AMI, + PCI_DEVICE_ID_AMI_MEGARAID3, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC3_DC, + }, + { + PCI_VENDOR_ID_AMI, + PCI_DEVICE_ID_AMI_MEGARAID3, + PCI_VENDOR_ID_DELL, + PCI_SUBSYS_ID_PERC3_SC, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_0, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_0, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_1, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_1, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_2, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_2, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_0x, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_2x, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_4x, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_1E, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SCSI_320_2E, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_I4_133_RAID, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_I4_133_RAID, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SATA_150_4, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SATA_150_4, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SATA_150_6, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SATA_150_6, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SATA_300_4x, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SATA_300_4x, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_SATA_300_8x, + PCI_VENDOR_ID_LSI_LOGIC, + PCI_SUBSYS_ID_MEGARAID_SATA_300_8x, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCU42X, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCU42X, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCS16, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCS16, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCU42E, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCU42E, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCZCRX, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCS28X, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCS28X, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK, + PCI_VENDOR_ID_INTEL, + PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB, + PCI_SUBSYS_ID_FSC, + PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB, + }, + { + PCI_VENDOR_ID_LSI_LOGIC, + PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E, + PCI_VENDOR_ID_AI, + PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E, + }, + {0} /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, pci_id_table_g); + + +static struct pci_driver megaraid_pci_driver_g = { + .name = "megaraid", + .id_table = pci_id_table_g, + .probe = megaraid_probe_one, + .remove = __devexit_p(megaraid_detach_one), + .driver = { + .shutdown = megaraid_mbox_shutdown, + } +}; + + +/* + * Scsi host template for megaraid unified driver + */ +static struct scsi_host_template megaraid_template_g = { + .module = THIS_MODULE, + .name = "LSI Logic MegaRAID driver", + .proc_name = "megaraid", + .queuecommand = megaraid_queue_command, + .eh_abort_handler = megaraid_abort_handler, + .eh_device_reset_handler = megaraid_reset_handler, + .eh_bus_reset_handler = megaraid_reset_handler, + .eh_host_reset_handler = megaraid_reset_handler, + .use_clustering = ENABLE_CLUSTERING, +}; + + +/** + * megaraid_init - module load hook + * + * We register ourselves as hotplug enabled module and let PCI subsystem + * discover our adaters + **/ +static int __init +megaraid_init(void) +{ + int rval; + + // Announce the driver version + con_log(CL_ANN, (KERN_INFO "megaraid: %s %s\n", MEGARAID_VERSION, + MEGARAID_EXT_VERSION)); + + // check validity of module parameters + if (megaraid_cmd_per_lun > MBOX_MAX_SCSI_CMDS) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid mailbox: max commands per lun reset to %d\n", + MBOX_MAX_SCSI_CMDS)); + + megaraid_cmd_per_lun = MBOX_MAX_SCSI_CMDS; + } + + + // register as a PCI hot-plug driver module + if ((rval = pci_module_init(&megaraid_pci_driver_g))) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: could not register hotplug support.\n")); + } + + return rval; +} + + +/** + * megaraid_exit - driver unload entry point + * + * We simply unwrap the megaraid_init routine here + */ +static void __exit +megaraid_exit(void) +{ + con_log(CL_DLEVEL1, (KERN_NOTICE "megaraid: unloading framework\n")); + + // unregister as PCI hotplug driver + pci_unregister_driver(&megaraid_pci_driver_g); + + return; +} + + +/** + * megaraid_probe_one - PCI hotplug entry point + * @param pdev : handle to this controller's PCI configuration space + * @param id : pci device id of the class of controllers + * + * This routine should be called whenever a new adapter is detected by the + * PCI hotplug susbsytem. + **/ +static int __devinit +megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + adapter_t *adapter; + + + // detected a new controller + con_log(CL_ANN, (KERN_INFO + "megaraid: probe new device %#4.04x:%#4.04x:%#4.04x:%#4.04x: ", + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device)); + + con_log(CL_ANN, ("bus %d:slot %d:func %d\n", pdev->bus->number, + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn))); + + if (pci_enable_device(pdev)) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: pci_enable_device failed\n")); + + return -ENODEV; + } + + // Enable bus-mastering on this controller + pci_set_master(pdev); + + // Allocate the per driver initialization structure + adapter = kmalloc(sizeof(adapter_t), GFP_KERNEL); + + if (adapter == NULL) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d.\n", __FUNCTION__, __LINE__)); + + goto out_probe_one; + } + memset(adapter, 0, sizeof(adapter_t)); + + + // set up PCI related soft state and other pre-known parameters + adapter->unique_id = pdev->bus->number << 8 | pdev->devfn; + adapter->irq = pdev->irq; + adapter->pdev = pdev; + + atomic_set(&adapter->being_detached, 0); + + // Setup the default DMA mask. This would be changed later on + // depending on hardware capabilities + if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFF) != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: pci_set_dma_mask failed:%d\n", __LINE__)); + + goto out_free_adapter; + } + + + // Initialize the synchronization lock for kernel and LLD + spin_lock_init(&adapter->lock); + adapter->host_lock = &adapter->lock; + + + // Initialize the command queues: the list of free SCBs and the list + // of pending SCBs. + INIT_LIST_HEAD(&adapter->kscb_pool); + spin_lock_init(SCSI_FREE_LIST_LOCK(adapter)); + + INIT_LIST_HEAD(&adapter->pend_list); + spin_lock_init(PENDING_LIST_LOCK(adapter)); + + INIT_LIST_HEAD(&adapter->completed_list); + spin_lock_init(COMPLETED_LIST_LOCK(adapter)); + + + // Start the mailbox based controller + if (megaraid_init_mbox(adapter) != 0) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: maibox adapter did not initialize\n")); + + goto out_free_adapter; + } + + // Register with LSI Common Management Module + if (megaraid_cmm_register(adapter) != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: could not register with management module\n")); + + goto out_fini_mbox; + } + + // setup adapter handle in PCI soft state + pci_set_drvdata(pdev, adapter); + + // attach with scsi mid-layer + if (megaraid_io_attach(adapter) != 0) { + + con_log(CL_ANN, (KERN_WARNING "megaraid: io attach failed\n")); + + goto out_cmm_unreg; + } + + return 0; + +out_cmm_unreg: + pci_set_drvdata(pdev, NULL); + megaraid_cmm_unregister(adapter); +out_fini_mbox: + megaraid_fini_mbox(adapter); +out_free_adapter: + kfree(adapter); +out_probe_one: + pci_disable_device(pdev); + + return -ENODEV; +} + + +/** + * megaraid_detach_one - release the framework resources and call LLD release + * routine + * @param pdev : handle for our PCI cofiguration space + * + * This routine is called during driver unload. We free all the allocated + * resources and call the corresponding LLD so that it can also release all + * its resources. + * + * This routine is also called from the PCI hotplug system + **/ +static void +megaraid_detach_one(struct pci_dev *pdev) +{ + adapter_t *adapter; + struct Scsi_Host *host; + + + // Start a rollback on this adapter + adapter = pci_get_drvdata(pdev); + + if (!adapter) { + con_log(CL_ANN, (KERN_CRIT + "megaraid: Invalid detach on %#4.04x:%#4.04x:%#4.04x:%#4.04x\n", + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device)); + + return; + } + else { + con_log(CL_ANN, (KERN_NOTICE + "megaraid: detaching device %#4.04x:%#4.04x:%#4.04x:%#4.04x\n", + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device)); + } + + + host = adapter->host; + + // do not allow any more requests from the management module for this + // adapter. + // FIXME: How do we account for the request which might still be + // pending with us? + atomic_set(&adapter->being_detached, 1); + + // detach from the IO sub-system + megaraid_io_detach(adapter); + + // reset the device state in the PCI structure. We check this + // condition when we enter here. If the device state is NULL, + // that would mean the device has already been removed + pci_set_drvdata(pdev, NULL); + + // Unregister from common management module + // + // FIXME: this must return success or failure for conditions if there + // is a command pending with LLD or not. + megaraid_cmm_unregister(adapter); + + // finalize the mailbox based controller and release all resources + megaraid_fini_mbox(adapter); + + kfree(adapter); + + scsi_host_put(host); + + pci_disable_device(pdev); + + return; +} + + +/** + * megaraid_mbox_shutdown - PCI shutdown for megaraid HBA + * @param device : generice driver model device + * + * Shutdown notification, perform flush cache + */ +static void +megaraid_mbox_shutdown(struct device *device) +{ + adapter_t *adapter = pci_get_drvdata(to_pci_dev(device)); + static int counter; + + if (!adapter) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: null device in shutdown\n")); + return; + } + + // flush caches now + con_log(CL_ANN, (KERN_INFO "megaraid: flushing adapter %d...", + counter++)); + + megaraid_mbox_flush_cache(adapter); + + con_log(CL_ANN, ("done\n")); +} + + +/** + * megaraid_io_attach - attach a device with the IO subsystem + * @param adapter : controller's soft state + * + * Attach this device with the IO subsystem + **/ +static int +megaraid_io_attach(adapter_t *adapter) +{ + struct Scsi_Host *host; + + // Initialize SCSI Host structure + host = scsi_host_alloc(&megaraid_template_g, 8); + if (!host) { + con_log(CL_ANN, (KERN_WARNING + "megaraid mbox: scsi_register failed\n")); + + return -1; + } + + SCSIHOST2ADAP(host) = (caddr_t)adapter; + adapter->host = host; + + // export the parameters required by the mid-layer + scsi_assign_lock(host, adapter->host_lock); + scsi_set_device(host, &adapter->pdev->dev); + + host->irq = adapter->irq; + host->unique_id = adapter->unique_id; + host->can_queue = adapter->max_cmds; + host->this_id = adapter->init_id; + host->sg_tablesize = adapter->sglen; + host->max_sectors = adapter->max_sectors; + host->cmd_per_lun = adapter->cmd_per_lun; + host->max_channel = adapter->max_channel; + host->max_id = adapter->max_target; + host->max_lun = adapter->max_lun; + + + // notify mid-layer about the new controller + if (scsi_add_host(host, &adapter->pdev->dev)) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid mbox: scsi_add_host failed\n")); + + scsi_host_put(host); + + return -1; + } + + scsi_scan_host(host); + + return 0; +} + + +/** + * megaraid_io_detach - detach a device from the IO subsystem + * @param adapter : controller's soft state + * + * Detach this device from the IO subsystem + **/ +static void +megaraid_io_detach(adapter_t *adapter) +{ + struct Scsi_Host *host; + + con_log(CL_DLEVEL1, (KERN_INFO "megaraid: io detach\n")); + + host = adapter->host; + + scsi_remove_host(host); + + return; +} + + +/* + * START: Mailbox Low Level Driver + * + * This is section specific to the single mailbox based controllers + */ + +/** + * megaraid_init_mbox - initialize controller + * @param adapter - our soft state + * + * . Allocate 16-byte aligned mailbox memory for firmware handshake + * . Allocate controller's memory resources + * . Find out all initialization data + * . Allocate memory required for all the commands + * . Use internal library of FW routines, build up complete soft state + */ +static int __init +megaraid_init_mbox(adapter_t *adapter) +{ + struct pci_dev *pdev; + mraid_device_t *raid_dev; + int i; + + + adapter->ito = MBOX_TIMEOUT; + pdev = adapter->pdev; + + /* + * Allocate and initialize the init data structure for mailbox + * controllers + */ + raid_dev = kmalloc(sizeof(mraid_device_t), GFP_KERNEL); + if (raid_dev == NULL) return -1; + + memset(raid_dev, 0, sizeof(mraid_device_t)); + + /* + * Attach the adapter soft state to raid device soft state + */ + adapter->raid_device = (caddr_t)raid_dev; + raid_dev->fast_load = megaraid_fast_load; + + + // our baseport + raid_dev->baseport = pci_resource_start(pdev, 0); + + if (pci_request_regions(pdev, "MegaRAID: LSI Logic Corporation") != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: mem region busy\n")); + + goto out_free_raid_dev; + } + + raid_dev->baseaddr = (unsigned long) + ioremap_nocache(raid_dev->baseport, 128); + + if (!raid_dev->baseaddr) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: could not map hba memory\n") ); + + goto out_release_regions; + } + + // + // Setup the rest of the soft state using the library of FW routines + // + + // request IRQ and register the interrupt service routine + if (request_irq(adapter->irq, megaraid_isr, SA_SHIRQ, "megaraid", + adapter)) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: Couldn't register IRQ %d!\n", adapter->irq)); + + goto out_iounmap; + } + + + // initialize the mutual exclusion lock for the mailbox + spin_lock_init(&raid_dev->mailbox_lock); + + // allocate memory required for commands + if (megaraid_alloc_cmd_packets(adapter) != 0) { + goto out_free_irq; + } + + // Product info + if (megaraid_mbox_product_info(adapter) != 0) { + goto out_alloc_cmds; + } + + // Do we support extended CDBs + adapter->max_cdb_sz = 10; + if (megaraid_mbox_extended_cdb(adapter) == 0) { + adapter->max_cdb_sz = 16; + } + + /* + * Do we support cluster environment, if we do, what is the initiator + * id. + * NOTE: In a non-cluster aware firmware environment, the LLD should + * return 7 as initiator id. + */ + adapter->ha = 0; + adapter->init_id = -1; + if (megaraid_mbox_support_ha(adapter, &adapter->init_id) == 0) { + adapter->ha = 1; + } + + /* + * Prepare the device ids array to have the mapping between the kernel + * device address and megaraid device address. + * We export the physical devices on their actual addresses. The + * logical drives are exported on a virtual SCSI channel + */ + megaraid_mbox_setup_device_map(adapter); + + // If the firmware supports random deletion, update the device id map + if (megaraid_mbox_support_random_del(adapter)) { + + // Change the logical drives numbers in device_ids array one + // slot in device_ids is reserved for target id, that's why + // "<=" below + for (i = 0; i <= MAX_LOGICAL_DRIVES_40LD; i++) { + adapter->device_ids[adapter->max_channel][i] += 0x80; + } + adapter->device_ids[adapter->max_channel][adapter->init_id] = + 0xFF; + } + + /* + * find out the maximum number of scatter-gather elements supported by + * this firmware + */ + adapter->sglen = megaraid_mbox_get_max_sg(adapter); + + // enumerate RAID and SCSI channels so that all devices on SCSI + // channels can later be exported, including disk devices + megaraid_mbox_enum_raid_scsi(adapter); + + /* + * Other parameters required by upper layer + * + * maximum number of sectors per IO command + */ + adapter->max_sectors = megaraid_max_sectors; + + /* + * number of queued commands per LUN. + */ + adapter->cmd_per_lun = megaraid_cmd_per_lun; + + // Set the DMA mask to 64-bit. All supported controllers as capable of + // DMA in this range + if (pci_set_dma_mask(adapter->pdev, 0xFFFFFFFFFFFFFFFFULL) != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: could not set DMA mask for 64-bit.\n")); + + goto out_alloc_cmds; + } + + // setup tasklet for DPC + tasklet_init(&adapter->dpc_h, megaraid_mbox_dpc, + (unsigned long)adapter); + + con_log(CL_DLEVEL1, (KERN_INFO + "megaraid mbox hba successfully initialized\n")); + + return 0; + +out_alloc_cmds: + megaraid_free_cmd_packets(adapter); +out_free_irq: + free_irq(adapter->irq, adapter); +out_iounmap: + iounmap((caddr_t)raid_dev->baseaddr); +out_release_regions: + pci_release_regions(pdev); +out_free_raid_dev: + kfree(raid_dev); + + return -1; +} + + +/** + * megaraid_fini_mbox - undo controller initialization + * @param adapter : our soft state + */ +static void +megaraid_fini_mbox(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + + // flush all caches + megaraid_mbox_flush_cache(adapter); + + tasklet_kill(&adapter->dpc_h); + + megaraid_free_cmd_packets(adapter); + + free_irq(adapter->irq, adapter); + + iounmap((caddr_t)raid_dev->baseaddr); + + pci_release_regions(adapter->pdev); + + kfree(raid_dev); + + return; +} + + +/** + * megaraid_alloc_cmd_packets - allocate shared mailbox + * @param adapter : soft state of the raid controller + * + * Allocate and align the shared mailbox. This maibox is used to issue + * all the commands. For IO based controllers, the mailbox is also regsitered + * with the FW. Allocate memory for all commands as well. + * This is our big allocator + */ +static int +megaraid_alloc_cmd_packets(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + struct pci_dev *pdev; + unsigned long align; + scb_t *scb; + mbox_ccb_t *ccb; + struct mraid_pci_blk *epthru_pci_blk; + struct mraid_pci_blk *sg_pci_blk; + struct mraid_pci_blk *mbox_pci_blk; + int i; + + pdev = adapter->pdev; + + /* + * Setup the mailbox + * Allocate the common 16-byte aligned memory for the handshake + * mailbox. + */ + raid_dev->una_mbox64 = pci_alloc_consistent(adapter->pdev, + sizeof(mbox64_t), &raid_dev->una_mbox64_dma); + + if (!raid_dev->una_mbox64) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + return -1; + } + memset(raid_dev->una_mbox64, 0, sizeof(mbox64_t)); + + /* + * Align the mailbox at 16-byte boundary + */ + raid_dev->mbox = &raid_dev->una_mbox64->mbox32; + + raid_dev->mbox = (mbox_t *)((((unsigned long)raid_dev->mbox) + 15) & + (~0UL ^ 0xFUL)); + + raid_dev->mbox64 = (mbox64_t *)(((unsigned long)raid_dev->mbox) - 8); + + align = ((void *)raid_dev->mbox - + ((void *)&raid_dev->una_mbox64->mbox32)); + + raid_dev->mbox_dma = (unsigned long)raid_dev->una_mbox64_dma + 8 + + align; + + // Allocate memory for commands issued internally + adapter->ibuf = pci_alloc_consistent(pdev, MBOX_IBUF_SIZE, + &adapter->ibuf_dma_h); + if (!adapter->ibuf) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + + goto out_free_common_mbox; + } + memset(adapter->ibuf, 0, MBOX_IBUF_SIZE); + + // Allocate memory for our SCSI Command Blocks and their associated + // memory + + /* + * Allocate memory for the base list of scb. Later allocate memory for + * CCBs and embedded components of each CCB and point the pointers in + * scb to the allocated components + * NOTE: The code to allocate SCB will be duplicated in all the LLD + * since the calling routine does not yet know the number of available + * commands. + */ + adapter->kscb_list = kmalloc(sizeof(scb_t) * MBOX_MAX_SCSI_CMDS, + GFP_KERNEL); + + if (adapter->kscb_list == NULL) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + goto out_free_ibuf; + } + memset(adapter->kscb_list, 0, sizeof(scb_t) * MBOX_MAX_SCSI_CMDS); + + // memory allocation for our command packets + if (megaraid_mbox_setup_dma_pools(adapter) != 0) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + goto out_free_scb_list; + } + + // Adjust the scb pointers and link in the free pool + epthru_pci_blk = raid_dev->epthru_pool; + sg_pci_blk = raid_dev->sg_pool; + mbox_pci_blk = raid_dev->mbox_pool; + + for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) { + scb = adapter->kscb_list + i; + ccb = raid_dev->ccb_list + i; + + ccb->mbox = (mbox_t *)(mbox_pci_blk[i].vaddr + 16); + ccb->raw_mbox = (uint8_t *)ccb->mbox; + ccb->mbox64 = (mbox64_t *)(mbox_pci_blk[i].vaddr + 8); + ccb->mbox_dma_h = (unsigned long)mbox_pci_blk[i].dma_addr + 16; + + // make sure the mailbox is aligned properly + if (ccb->mbox_dma_h & 0x0F) { + con_log(CL_ANN, (KERN_CRIT + "megaraid mbox: not aligned on 16-bytes\n")); + + goto out_teardown_dma_pools; + } + + ccb->epthru = (mraid_epassthru_t *) + epthru_pci_blk[i].vaddr; + ccb->epthru_dma_h = epthru_pci_blk[i].dma_addr; + ccb->pthru = (mraid_passthru_t *)ccb->epthru; + ccb->pthru_dma_h = ccb->epthru_dma_h; + + + ccb->sgl64 = (mbox_sgl64 *)sg_pci_blk[i].vaddr; + ccb->sgl_dma_h = sg_pci_blk[i].dma_addr; + ccb->sgl32 = (mbox_sgl32 *)ccb->sgl64; + + scb->ccb = (caddr_t)ccb; + scb->gp = 0; + + scb->sno = i; // command index + + scb->scp = NULL; + scb->state = SCB_FREE; + scb->dma_direction = PCI_DMA_NONE; + scb->dma_type = MRAID_DMA_NONE; + scb->dev_channel = -1; + scb->dev_target = -1; + + // put scb in the free pool + list_add_tail(&scb->list, &adapter->kscb_pool); + } + + return 0; + +out_teardown_dma_pools: + megaraid_mbox_teardown_dma_pools(adapter); +out_free_scb_list: + kfree(adapter->kscb_list); +out_free_ibuf: + pci_free_consistent(pdev, MBOX_IBUF_SIZE, (void *)adapter->ibuf, + adapter->ibuf_dma_h); +out_free_common_mbox: + pci_free_consistent(adapter->pdev, sizeof(mbox64_t), + (caddr_t)raid_dev->una_mbox64, raid_dev->una_mbox64_dma); + + return -1; +} + + +/** + * megaraid_free_cmd_packets - free memory + * @param adapter : soft state of the raid controller + * + * Release memory resources allocated for commands + */ +static void +megaraid_free_cmd_packets(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + + megaraid_mbox_teardown_dma_pools(adapter); + + kfree(adapter->kscb_list); + + pci_free_consistent(adapter->pdev, MBOX_IBUF_SIZE, + (void *)adapter->ibuf, adapter->ibuf_dma_h); + + pci_free_consistent(adapter->pdev, sizeof(mbox64_t), + (caddr_t)raid_dev->una_mbox64, raid_dev->una_mbox64_dma); + return; +} + + +/** + * megaraid_mbox_setup_dma_pools - setup dma pool for command packets + * @param adapter : HBA soft state + * + * setup the dma pools for mailbox, passthru and extended passthru structures, + * and scatter-gather lists + */ +static int +megaraid_mbox_setup_dma_pools(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + struct mraid_pci_blk *epthru_pci_blk; + struct mraid_pci_blk *sg_pci_blk; + struct mraid_pci_blk *mbox_pci_blk; + int i; + + + + // Allocate memory for 16-bytes aligned mailboxes + raid_dev->mbox_pool_handle = pci_pool_create("megaraid mbox pool", + adapter->pdev, + sizeof(mbox64_t) + 16, + 16, 0); + + if (raid_dev->mbox_pool_handle == NULL) { + goto fail_setup_dma_pool; + } + + mbox_pci_blk = raid_dev->mbox_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) { + mbox_pci_blk[i].vaddr = pci_pool_alloc( + raid_dev->mbox_pool_handle, + GFP_KERNEL, + &mbox_pci_blk[i].dma_addr); + if (!mbox_pci_blk[i].vaddr) { + goto fail_setup_dma_pool; + } + } + + /* + * Allocate memory for each embedded passthru strucuture pointer + * Request for a 128 bytes aligned structure for each passthru command + * structure + * Since passthru and extended passthru commands are exclusive, they + * share common memory pool. Passthru structures piggyback on memory + * allocted to extended passthru since passthru is smaller of the two + */ + raid_dev->epthru_pool_handle = pci_pool_create("megaraid mbox pthru", + adapter->pdev, sizeof(mraid_epassthru_t), 128, 0); + + if (raid_dev->epthru_pool_handle == NULL) { + goto fail_setup_dma_pool; + } + + epthru_pci_blk = raid_dev->epthru_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) { + epthru_pci_blk[i].vaddr = pci_pool_alloc( + raid_dev->epthru_pool_handle, + GFP_KERNEL, + &epthru_pci_blk[i].dma_addr); + if (!epthru_pci_blk[i].vaddr) { + goto fail_setup_dma_pool; + } + } + + + // Allocate memory for each scatter-gather list. Request for 512 bytes + // alignment for each sg list + raid_dev->sg_pool_handle = pci_pool_create("megaraid mbox sg", + adapter->pdev, + sizeof(mbox_sgl64) * MBOX_MAX_SG_SIZE, + 512, 0); + + if (raid_dev->sg_pool_handle == NULL) { + goto fail_setup_dma_pool; + } + + sg_pci_blk = raid_dev->sg_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) { + sg_pci_blk[i].vaddr = pci_pool_alloc( + raid_dev->sg_pool_handle, + GFP_KERNEL, + &sg_pci_blk[i].dma_addr); + if (!sg_pci_blk[i].vaddr) { + goto fail_setup_dma_pool; + } + } + + return 0; + +fail_setup_dma_pool: + megaraid_mbox_teardown_dma_pools(adapter); + return -1; +} + + +/** + * megaraid_mbox_teardown_dma_pools - teardown dma pools for command packets + * @param adapter : HBA soft state + * + * teardown the dma pool for mailbox, passthru and extended passthru + * structures, and scatter-gather lists + */ +static void +megaraid_mbox_teardown_dma_pools(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + struct mraid_pci_blk *epthru_pci_blk; + struct mraid_pci_blk *sg_pci_blk; + struct mraid_pci_blk *mbox_pci_blk; + int i; + + + sg_pci_blk = raid_dev->sg_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS && sg_pci_blk[i].vaddr; i++) { + pci_pool_free(raid_dev->sg_pool_handle, sg_pci_blk[i].vaddr, + sg_pci_blk[i].dma_addr); + } + if (raid_dev->sg_pool_handle) + pci_pool_destroy(raid_dev->sg_pool_handle); + + + epthru_pci_blk = raid_dev->epthru_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS && epthru_pci_blk[i].vaddr; i++) { + pci_pool_free(raid_dev->epthru_pool_handle, + epthru_pci_blk[i].vaddr, epthru_pci_blk[i].dma_addr); + } + if (raid_dev->epthru_pool_handle) + pci_pool_destroy(raid_dev->epthru_pool_handle); + + + mbox_pci_blk = raid_dev->mbox_pool; + for (i = 0; i < MBOX_MAX_SCSI_CMDS && mbox_pci_blk[i].vaddr; i++) { + pci_pool_free(raid_dev->mbox_pool_handle, + mbox_pci_blk[i].vaddr, mbox_pci_blk[i].dma_addr); + } + if (raid_dev->mbox_pool_handle) + pci_pool_destroy(raid_dev->mbox_pool_handle); + + return; +} + + +/** + * megaraid_alloc_scb - detach and return a scb from the free list + * @adapter : controller's soft state + * + * return the scb from the head of the free list. NULL if there are none + * available + **/ +static inline scb_t * +megaraid_alloc_scb(adapter_t *adapter, struct scsi_cmnd *scp) +{ + struct list_head *head = &adapter->kscb_pool; + scb_t *scb = NULL; + unsigned long flags; + + // detach scb from free pool + spin_lock_irqsave(SCSI_FREE_LIST_LOCK(adapter), flags); + + if (list_empty(head)) { + spin_unlock_irqrestore(SCSI_FREE_LIST_LOCK(adapter), flags); + return NULL; + } + + scb = list_entry(head->next, scb_t, list); + list_del_init(&scb->list); + + spin_unlock_irqrestore(SCSI_FREE_LIST_LOCK(adapter), flags); + + scb->state = SCB_ACTIVE; + scb->scp = scp; + scb->dma_type = MRAID_DMA_NONE; + + return scb; +} + + +/** + * megaraid_dealloc_scb - return the scb to the free pool + * @adapter : controller's soft state + * @scb : scb to be freed + * + * return the scb back to the free list of scbs. The caller must 'flush' the + * SCB before calling us. E.g., performing pci_unamp and/or pci_sync etc. + * NOTE NOTE: Make sure the scb is not on any list before calling this + * routine. + **/ +static inline void +megaraid_dealloc_scb(adapter_t *adapter, scb_t *scb) +{ + unsigned long flags; + + // put scb in the free pool + scb->state = SCB_FREE; + scb->scp = NULL; + spin_lock_irqsave(SCSI_FREE_LIST_LOCK(adapter), flags); + + list_add(&scb->list, &adapter->kscb_pool); + + spin_unlock_irqrestore(SCSI_FREE_LIST_LOCK(adapter), flags); + + return; +} + + +/** + * megaraid_mbox_mksgl - make the scatter-gather list + * @adapter - controller's soft state + * @scb - scsi control block + * + * prepare the scatter-gather list + */ +static inline int +megaraid_mbox_mksgl(adapter_t *adapter, scb_t *scb) +{ + struct scatterlist *sgl; + mbox_ccb_t *ccb; + struct page *page; + unsigned long offset; + struct scsi_cmnd *scp; + int sgcnt; + int i; + + + scp = scb->scp; + ccb = (mbox_ccb_t *)scb->ccb; + + // no mapping required if no data to be transferred + if (!scp->request_buffer || !scp->request_bufflen) + return 0; + + if (!scp->use_sg) { /* scatter-gather list not used */ + + page = virt_to_page(scp->request_buffer); + + offset = ((unsigned long)scp->request_buffer & ~PAGE_MASK); + + ccb->buf_dma_h = pci_map_page(adapter->pdev, page, offset, + scp->request_bufflen, + scb->dma_direction); + scb->dma_type = MRAID_DMA_WBUF; + + /* + * We need to handle special 64-bit commands that need a + * minimum of 1 SG + */ + sgcnt = 1; + ccb->sgl64[0].address = ccb->buf_dma_h; + ccb->sgl64[0].length = scp->request_bufflen; + + return sgcnt; + } + + sgl = (struct scatterlist *)scp->request_buffer; + + // The number of sg elements returned must not exceed our limit + sgcnt = pci_map_sg(adapter->pdev, sgl, scp->use_sg, + scb->dma_direction); + + if (sgcnt > adapter->sglen) { + con_log(CL_ANN, (KERN_CRIT + "megaraid critical: too many sg elements:%d\n", + sgcnt)); + BUG(); + } + + scb->dma_type = MRAID_DMA_WSG; + + for (i = 0; i < sgcnt; i++, sgl++) { + ccb->sgl64[i].address = sg_dma_address(sgl); + ccb->sgl64[i].length = sg_dma_len(sgl); + } + + // Return count of SG nodes + return sgcnt; +} + + +/** + * mbox_post_cmd - issue a mailbox command + * @adapter - controller's soft state + * @scb - command to be issued + * + * post the command to the controller if mailbox is availble. + */ +static inline int +mbox_post_cmd(adapter_t *adapter, scb_t *scb) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox64_t *mbox64; + mbox_t *mbox; + mbox_ccb_t *ccb; + unsigned long flags; + unsigned int i = 0; + + + ccb = (mbox_ccb_t *)scb->ccb; + mbox = raid_dev->mbox; + mbox64 = raid_dev->mbox64; + + /* + * Check for busy mailbox. If it is, return failure - the caller + * should retry later. + */ + spin_lock_irqsave(MAILBOX_LOCK(raid_dev), flags); + + if (unlikely(mbox->busy)) { + do { + udelay(1); + i++; + rmb(); + } while(mbox->busy && (i < max_mbox_busy_wait)); + + if (mbox->busy) { + + spin_unlock_irqrestore(MAILBOX_LOCK(raid_dev), flags); + + return -1; + } + } + + + // Copy this command's mailbox data into "adapter's" mailbox + memcpy((caddr_t)mbox64, (caddr_t)ccb->mbox64, 22); + mbox->cmdid = scb->sno; + + adapter->outstanding_cmds++; + + if (scb->dma_direction == PCI_DMA_TODEVICE) { + if (!scb->scp->use_sg) { // sg list not used + pci_dma_sync_single(adapter->pdev, ccb->buf_dma_h, + scb->scp->request_bufflen, + PCI_DMA_TODEVICE); + } + else { + pci_dma_sync_sg(adapter->pdev, scb->scp->request_buffer, + scb->scp->use_sg, PCI_DMA_TODEVICE); + } + } + + mbox->busy = 1; // Set busy + mbox->poll = 0; + mbox->ack = 0; + wmb(); + + WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x1); + + spin_unlock_irqrestore(MAILBOX_LOCK(raid_dev), flags); + + return 0; +} + + +/** + * megaraid_queue_command - generic queue entry point for all LLDs + * @scp : pointer to the scsi command to be executed + * @done : callback routine to be called after the cmd has be completed + * + * Queue entry point for mailbox based controllers. + */ +static int +megaraid_queue_command(struct scsi_cmnd *scp, void (* done)(struct scsi_cmnd *)) +{ + adapter_t *adapter; + scb_t *scb; + int if_busy; + + adapter = SCP2ADAPTER(scp); + scp->scsi_done = done; + scp->result = 0; + + ASSERT(spin_is_locked(adapter->host_lock)); + + spin_unlock(adapter->host_lock); + + /* + * Allocate and build a SCB request + * if_busy flag will be set if megaraid_mbox_build_cmd() command could + * not allocate scb. We will return non-zero status in that case. + * NOTE: scb can be null even though certain commands completed + * successfully, e.g., MODE_SENSE and TEST_UNIT_READY, it would + * return 0 in that case, and we would do the callback right away. + */ + if_busy = 0; + scb = megaraid_mbox_build_cmd(adapter, scp, &if_busy); + + if (scb) { + megaraid_mbox_runpendq(adapter, scb); + } + + spin_lock(adapter->host_lock); + + if (!scb) { // command already completed + done(scp); + } + + return if_busy; +} + + +/** + * megaraid_mbox_build_cmd - transform the mid-layer scsi command to megaraid + * firmware lingua + * @adapter - controller's soft state + * @scp - mid-layer scsi command pointer + * @busy - set if request could not be completed because of lack of + * resources + * + * convert the command issued by mid-layer to format understood by megaraid + * firmware. We also complete certain command without sending them to firmware + */ +static scb_t * +megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) +{ + mraid_device_t *rdev = ADAP2RAIDDEV(adapter); + int channel; + int target; + int islogical; + mbox_ccb_t *ccb; + mraid_passthru_t *pthru; + mbox64_t *mbox64; + mbox_t *mbox; + scb_t *scb; + char skip[] = "skipping"; + char scan[] = "scanning"; + char *ss; + + + /* + * Get the appropriate device map for the device this command is + * intended for + */ + MRAID_GET_DEVICE_MAP(adapter, scp, channel, target, islogical); + + /* + * Logical drive commands + */ + if (islogical) { + switch (scp->cmnd[0]) { + case TEST_UNIT_READY: + /* + * Do we support clustering and is the support enabled + * If no, return success always + */ + if (!adapter->ha) { + scp->result = (DID_OK << 16); + return NULL; + } + + if (!(scb = megaraid_alloc_scb(adapter, scp))) { + scp->result = (DID_ERROR << 16); + *busy = 1; + return NULL; + } + + scb->dma_direction = scp->sc_data_direction; + scb->dev_channel = 0xFF; + scb->dev_target = target; + ccb = (mbox_ccb_t *)scb->ccb; + + /* + * The command id will be provided by the command + * issuance routine + */ + ccb->raw_mbox[0] = CLUSTER_CMD; + ccb->raw_mbox[2] = RESERVATION_STATUS; + ccb->raw_mbox[3] = target; + + return scb; + + case MODE_SENSE: + if (scp->use_sg) { + struct scatterlist *sgl; + caddr_t vaddr; + + sgl = (struct scatterlist *)scp->request_buffer; + if (sgl->page) { + vaddr = (caddr_t) + (page_address((&sgl[0])->page) + + (&sgl[0])->offset); + + memset(vaddr, 0, scp->cmnd[4]); + } + else { + con_log(CL_ANN, (KERN_WARNING + "megaraid mailbox: invalid sg:%d\n", + __LINE__)); + } + } + else { + memset(scp->request_buffer, 0, scp->cmnd[4]); + } + scp->result = (DID_OK << 16); + return NULL; + + case INQUIRY: + /* + * Display the channel scan for logical drives + * Do not display scan for a channel if already done. + */ + if (!(rdev->last_disp & (1L << SCP2CHANNEL(scp)))) { + + con_log(CL_ANN, (KERN_INFO + "scsi[%d]: scanning scsi channel %d", + adapter->host->host_no, + SCP2CHANNEL(scp))); + + con_log(CL_ANN, ( + " [virtual] for logical drives\n")); + + rdev->last_disp |= (1L << SCP2CHANNEL(scp)); + } + + /* Fall through */ + + case READ_CAPACITY: + /* + * Do not allow LUN > 0 for logical drives and + * requests for more than 40 logical drives + */ + if (SCP2LUN(scp)) { + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + if ((target % 0x80) >= MAX_LOGICAL_DRIVES_40LD) { + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + + + /* Allocate a SCB and initialize passthru */ + if (!(scb = megaraid_alloc_scb(adapter, scp))) { + scp->result = (DID_ERROR << 16); + *busy = 1; + return NULL; + } + + ccb = (mbox_ccb_t *)scb->ccb; + scb->dev_channel = 0xFF; + scb->dev_target = target; + pthru = ccb->pthru; + mbox = ccb->mbox; + mbox64 = ccb->mbox64; + + pthru->timeout = 0; + pthru->ars = 1; + pthru->reqsenselen = 14; + pthru->islogical = 1; + pthru->logdrv = target; + pthru->cdblen = scp->cmd_len; + memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); + + mbox->cmd = MBOXCMD_PASSTHRU64; + scb->dma_direction = scp->sc_data_direction; + + pthru->dataxferlen = scp->request_bufflen; + pthru->dataxferaddr = ccb->sgl_dma_h; + pthru->numsge = megaraid_mbox_mksgl(adapter, + scb); + + mbox->xferaddr = 0xFFFFFFFF; + mbox64->xferaddr_lo = (uint32_t )ccb->pthru_dma_h; + mbox64->xferaddr_hi = 0; + + return scb; + + case READ_6: + case WRITE_6: + case READ_10: + case WRITE_10: + case READ_12: + case WRITE_12: + + /* + * Allocate a SCB and initialize mailbox + */ + if (!(scb = megaraid_alloc_scb(adapter, scp))) { + scp->result = (DID_ERROR << 16); + *busy = 1; + return NULL; + } + ccb = (mbox_ccb_t *)scb->ccb; + scb->dev_channel = 0xFF; + scb->dev_target = target; + mbox = ccb->mbox; + mbox64 = ccb->mbox64; + mbox->logdrv = target; + + /* + * A little HACK: 2nd bit is zero for all scsi read + * commands and is set for all scsi write commands + */ + mbox->cmd = (scp->cmnd[0] & 0x02) ? MBOXCMD_LWRITE64: + MBOXCMD_LREAD64 ; + + /* + * 6-byte READ(0x08) or WRITE(0x0A) cdb + */ + if (scp->cmd_len == 6) { + mbox->numsectors = (uint32_t)scp->cmnd[4]; + mbox->lba = + ((uint32_t)scp->cmnd[1] << 16) | + ((uint32_t)scp->cmnd[2] << 8) | + (uint32_t)scp->cmnd[3]; + + mbox->lba &= 0x1FFFFF; + } + + /* + * 10-byte READ(0x28) or WRITE(0x2A) cdb + */ + else if (scp->cmd_len == 10) { + mbox->numsectors = + (uint32_t)scp->cmnd[8] | + ((uint32_t)scp->cmnd[7] << 8); + mbox->lba = + ((uint32_t)scp->cmnd[2] << 24) | + ((uint32_t)scp->cmnd[3] << 16) | + ((uint32_t)scp->cmnd[4] << 8) | + (uint32_t)scp->cmnd[5]; + } + + /* + * 12-byte READ(0xA8) or WRITE(0xAA) cdb + */ + else if (scp->cmd_len == 12) { + mbox->lba = + ((uint32_t)scp->cmnd[2] << 24) | + ((uint32_t)scp->cmnd[3] << 16) | + ((uint32_t)scp->cmnd[4] << 8) | + (uint32_t)scp->cmnd[5]; + + mbox->numsectors = + ((uint32_t)scp->cmnd[6] << 24) | + ((uint32_t)scp->cmnd[7] << 16) | + ((uint32_t)scp->cmnd[8] << 8) | + (uint32_t)scp->cmnd[9]; + } + else { + con_log(CL_ANN, (KERN_WARNING + "megaraid: unsupported CDB length\n")); + + megaraid_dealloc_scb(adapter, scb); + + scp->result = (DID_ERROR << 16); + return NULL; + } + + scb->dma_direction = scp->sc_data_direction; + + // Calculate Scatter-Gather info + mbox64->xferaddr_lo = (uint32_t )ccb->sgl_dma_h; + mbox->numsge = megaraid_mbox_mksgl(adapter, + scb); + mbox->xferaddr = 0xFFFFFFFF; + mbox64->xferaddr_hi = 0; + + return scb; + + case RESERVE: + case RELEASE: + /* + * Do we support clustering and is the support enabled + */ + if (!adapter->ha) { + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + + /* + * Allocate a SCB and initialize mailbox + */ + if (!(scb = megaraid_alloc_scb(adapter, scp))) { + scp->result = (DID_ERROR << 16); + *busy = 1; + return NULL; + } + + ccb = (mbox_ccb_t *)scb->ccb; + scb->dev_channel = 0xFF; + scb->dev_target = target; + ccb->raw_mbox[0] = CLUSTER_CMD; + ccb->raw_mbox[2] = (scp->cmnd[0] == RESERVE) ? + RESERVE_LD : RELEASE_LD; + + ccb->raw_mbox[3] = target; + scb->dma_direction = scp->sc_data_direction; + + return scb; + + default: + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + } + else { // Passthru device commands + + // Do not allow access to target id > 15 or LUN > 7 + if (target > 15 || SCP2LUN(scp) > 7) { + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + + // if fast load option was set and scan for last device is + // over, reset the fast_load flag so that during a possible + // next scan, devices can be made available + if (rdev->fast_load && (target == 15) && + (SCP2CHANNEL(scp) == adapter->max_channel -1)) { + + con_log(CL_ANN, (KERN_INFO + "megaraid[%d]: physical device scan re-enabled\n", + adapter->host->host_no)); + rdev->fast_load = 0; + } + + /* + * Display the channel scan for physical devices + */ + if (!(rdev->last_disp & (1L << SCP2CHANNEL(scp)))) { + + ss = rdev->fast_load ? skip : scan; + + con_log(CL_ANN, (KERN_INFO + "scsi[%d]: %s scsi channel %d [Phy %d]", + adapter->host->host_no, ss, SCP2CHANNEL(scp), + channel)); + + con_log(CL_ANN, ( + " for non-raid devices\n")); + + rdev->last_disp |= (1L << SCP2CHANNEL(scp)); + } + + // disable channel sweep if fast load option given + if (rdev->fast_load) { + scp->result = (DID_BAD_TARGET << 16); + return NULL; + } + + // Allocate a SCB and initialize passthru + if (!(scb = megaraid_alloc_scb(adapter, scp))) { + scp->result = (DID_ERROR << 16); + *busy = 1; + return NULL; + } + + ccb = (mbox_ccb_t *)scb->ccb; + scb->dev_channel = channel; + scb->dev_target = target; + scb->dma_direction = scp->sc_data_direction; + mbox = ccb->mbox; + mbox64 = ccb->mbox64; + + // Does this firmware support extended CDBs + if (adapter->max_cdb_sz == 16) { + mbox->cmd = MBOXCMD_EXTPTHRU; + + megaraid_mbox_prepare_epthru(adapter, scb, scp); + + mbox64->xferaddr_lo = (uint32_t)ccb->epthru_dma_h; + mbox64->xferaddr_hi = 0; + mbox->xferaddr = 0xFFFFFFFF; + } + else { + mbox->cmd = MBOXCMD_PASSTHRU64; + + megaraid_mbox_prepare_pthru(adapter, scb, scp); + + mbox64->xferaddr_lo = (uint32_t)ccb->pthru_dma_h; + mbox64->xferaddr_hi = 0; + mbox->xferaddr = 0xFFFFFFFF; + } + return scb; + } + + // NOT REACHED +} + + +/** + * megaraid_mbox_runpendq - execute commands queued in the pending queue + * @adapter : controller's soft state + * @scb : SCB to be queued in the pending list + * + * scan the pending list for commands which are not yet issued and try to + * post to the controller. The SCB can be a null pointer, which would indicate + * no SCB to be queue, just try to execute the ones in the pending list. + * + * NOTE: We do not actually traverse the pending list. The SCBs are plucked + * out from the head of the pending list. If it is successfully issued, the + * next SCB is at the head now. + */ +static void +megaraid_mbox_runpendq(adapter_t *adapter, scb_t *scb_q) +{ + scb_t *scb; + unsigned long flags; + + spin_lock_irqsave(PENDING_LIST_LOCK(adapter), flags); + + if (scb_q) { + scb_q->state = SCB_PENDQ; + list_add_tail(&scb_q->list, &adapter->pend_list); + } + + // if the adapter in not in quiescent mode, post the commands to FW + if (adapter->quiescent) { + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), flags); + return; + } + + while (!list_empty(&adapter->pend_list)) { + + ASSERT(spin_is_locked(PENDING_LIST_LOCK(adapter))); + + scb = list_entry(adapter->pend_list.next, scb_t, list); + + // remove the scb from the pending list and try to + // issue. If we are unable to issue it, put back in + // the pending list and return + + list_del_init(&scb->list); + + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), flags); + + // if mailbox was busy, return SCB back to pending + // list. Make sure to add at the head, since that's + // where it would have been removed from + + scb->state = SCB_ISSUED; + + if (mbox_post_cmd(adapter, scb) != 0) { + + spin_lock_irqsave(PENDING_LIST_LOCK(adapter), flags); + + scb->state = SCB_PENDQ; + + list_add(&scb->list, &adapter->pend_list); + + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), + flags); + + return; + } + + spin_lock_irqsave(PENDING_LIST_LOCK(adapter), flags); + } + + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), flags); + + + return; +} + + +/** + * megaraid_mbox_prepare_pthru - prepare a command for physical devices + * @adapter - pointer to controller's soft state + * @scb - scsi control block + * @scp - scsi command from the mid-layer + * + * prepare a command for the scsi physical devices + */ +static void +megaraid_mbox_prepare_pthru(adapter_t *adapter, scb_t *scb, + struct scsi_cmnd *scp) +{ + mbox_ccb_t *ccb; + mraid_passthru_t *pthru; + uint8_t channel; + uint8_t target; + + ccb = (mbox_ccb_t *)scb->ccb; + pthru = ccb->pthru; + channel = scb->dev_channel; + target = scb->dev_target; + + pthru->timeout = 1; // 0=6sec, 1=60sec, 2=10min, 3=3hrs + pthru->ars = 1; + pthru->islogical = 0; + pthru->channel = 0; + pthru->target = (channel << 4) | target; + pthru->logdrv = SCP2LUN(scp); + pthru->reqsenselen = 14; + pthru->cdblen = scp->cmd_len; + + memcpy(pthru->cdb, scp->cmnd, scp->cmd_len); + + if (scp->request_bufflen) { + pthru->dataxferlen = scp->request_bufflen; + pthru->dataxferaddr = ccb->sgl_dma_h; + pthru->numsge = megaraid_mbox_mksgl(adapter, scb); + } + else { + pthru->dataxferaddr = 0; + pthru->dataxferlen = 0; + pthru->numsge = 0; + } + return; +} + + +/** + * megaraid_mbox_prepare_epthru - prepare a command for physical devices + * @adapter - pointer to controller's soft state + * @scb - scsi control block + * @scp - scsi command from the mid-layer + * + * prepare a command for the scsi physical devices. This rountine prepares + * commands for devices which can take extended CDBs (>10 bytes) + */ +static void +megaraid_mbox_prepare_epthru(adapter_t *adapter, scb_t *scb, + struct scsi_cmnd *scp) +{ + mbox_ccb_t *ccb; + mraid_epassthru_t *epthru; + uint8_t channel; + uint8_t target; + + ccb = (mbox_ccb_t *)scb->ccb; + epthru = ccb->epthru; + channel = scb->dev_channel; + target = scb->dev_target; + + epthru->timeout = 1; // 0=6sec, 1=60sec, 2=10min, 3=3hrs + epthru->ars = 1; + epthru->islogical = 0; + epthru->channel = 0; + epthru->target = (channel << 4) | target; + epthru->logdrv = SCP2LUN(scp); + epthru->reqsenselen = 14; + epthru->cdblen = scp->cmd_len; + + memcpy(epthru->cdb, scp->cmnd, scp->cmd_len); + + if (scp->request_bufflen) { + epthru->dataxferlen = scp->request_bufflen; + epthru->dataxferaddr = ccb->sgl_dma_h; + epthru->numsge = megaraid_mbox_mksgl(adapter, scb); + } + else { + epthru->dataxferaddr = 0; + epthru->dataxferlen = 0; + epthru->numsge = 0; + } + return; +} + + +/** + * megaraid_ack_sequence - interrupt ack sequence for memory mapped HBAs + * @adapter - controller's soft state + * + * Interrupt ackrowledgement sequence for memory mapped HBAs. Find out the + * completed command and put them on the completed list for later processing. + * + * Returns: 1 if the interrupt is valid, 0 otherwise + */ +static inline int +megaraid_ack_sequence(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox_t *mbox; + scb_t *scb; + uint8_t nstatus; + uint8_t completed[MBOX_MAX_FIRMWARE_STATUS]; + struct list_head clist; + int handled; + uint32_t dword; + unsigned long flags; + int i, j; + + + mbox = raid_dev->mbox; + + // move the SCBs from the firmware completed array to our local list + INIT_LIST_HEAD(&clist); + + // loop till F/W has more commands for us to complete + handled = 0; + spin_lock_irqsave(MAILBOX_LOCK(raid_dev), flags); + do { + /* + * Check if a valid interrupt is pending. If found, force the + * interrupt line low. + */ + dword = RDOUTDOOR(raid_dev); + if (dword != 0x10001234) break; + + handled = 1; + + WROUTDOOR(raid_dev, 0x10001234); + + nstatus = 0; + // wait for valid numstatus to post + for (i = 0; i < 0xFFFFF; i++) { + if (mbox->numstatus != 0xFF) { + nstatus = mbox->numstatus; + break; + } + rmb(); + } + mbox->numstatus = 0xFF; + + adapter->outstanding_cmds -= nstatus; + + for (i = 0; i < nstatus; i++) { + + // wait for valid command index to post + for (j = 0; j < 0xFFFFF; j++) { + if (mbox->completed[i] != 0xFF) break; + rmb(); + } + completed[i] = mbox->completed[i]; + mbox->completed[i] = 0xFF; + + if (completed[i] == 0xFF) { + con_log(CL_ANN, (KERN_CRIT + "megaraid: command posting timed out\n")); + + BUG(); + continue; + } + + // Get SCB associated with this command id + if (completed[i] >= MBOX_MAX_SCSI_CMDS) { + // a cmm command + scb = adapter->uscb_list + (completed[i] - + MBOX_MAX_SCSI_CMDS); + } + else { + // an os command + scb = adapter->kscb_list + completed[i]; + } + + scb->status = mbox->status; + list_add_tail(&scb->list, &clist); + } + + // Acknowledge interrupt + WRINDOOR(raid_dev, 0x02); + + } while(1); + + spin_unlock_irqrestore(MAILBOX_LOCK(raid_dev), flags); + + + // put the completed commands in the completed list. DPC would + // complete these commands later + spin_lock_irqsave(COMPLETED_LIST_LOCK(adapter), flags); + + list_splice(&clist, &adapter->completed_list); + + spin_unlock_irqrestore(COMPLETED_LIST_LOCK(adapter), flags); + + + // schedule the DPC if there is some work for it + if (handled) + tasklet_schedule(&adapter->dpc_h); + + return handled; +} + + +/** + * megaraid_isr - isr for memory based mailbox based controllers + * @irq - irq + * @devp - pointer to our soft state + * @regs - unused + * + * Interrupt service routine for memory-mapped mailbox controllers. + */ +static irqreturn_t +megaraid_isr(int irq, void *devp, struct pt_regs *regs) +{ + adapter_t *adapter = devp; + int handled; + + handled = megaraid_ack_sequence(adapter); + + /* Loop through any pending requests */ + if (!adapter->quiescent) { + megaraid_mbox_runpendq(adapter, NULL); + } + + return IRQ_RETVAL(handled); +} + + +/** + * megaraid_mbox_sync_scb - sync kernel buffers + * @adapter : controller's soft state + * @scb : pointer to the resource packet + * + * DMA sync if required. + */ +static inline void +megaraid_mbox_sync_scb(adapter_t *adapter, scb_t *scb) +{ + mbox_ccb_t *ccb; + + ccb = (mbox_ccb_t *)scb->ccb; + + switch (scb->dma_type) { + + case MRAID_DMA_WBUF: + if (scb->dma_direction == PCI_DMA_FROMDEVICE) { + pci_dma_sync_single(adapter->pdev, + ccb->buf_dma_h, + scb->scp->request_bufflen, + PCI_DMA_FROMDEVICE); + } + + pci_unmap_page(adapter->pdev, ccb->buf_dma_h, + scb->scp->request_bufflen, scb->dma_direction); + + break; + + case MRAID_DMA_WSG: + if (scb->dma_direction == PCI_DMA_FROMDEVICE) { + pci_dma_sync_sg(adapter->pdev, + scb->scp->request_buffer, + scb->scp->use_sg, PCI_DMA_FROMDEVICE); + } + + pci_unmap_sg(adapter->pdev, scb->scp->request_buffer, + scb->scp->use_sg, scb->dma_direction); + + break; + + default: + break; + } + + return; +} + + +/** + * megaraid_mbox_dpc - the tasklet to complete the commands from completed list + * @devp : pointer to HBA soft state + * + * Pick up the commands from the completed list and send back to the owners. + * This is a reentrant function and does not assume any locks are held while + * it is being called. + */ +static void +megaraid_mbox_dpc(unsigned long devp) +{ + adapter_t *adapter = (adapter_t *)devp; + mraid_device_t *raid_dev; + struct list_head clist; + struct scatterlist *sgl; + scb_t *scb; + scb_t *tmp; + struct scsi_cmnd *scp; + mraid_passthru_t *pthru; + mraid_epassthru_t *epthru; + mbox_ccb_t *ccb; + int islogical; + int pdev_index; + int pdev_state; + mbox_t *mbox; + unsigned long flags; + uint8_t c; + int status; + + + if (!adapter) return; + + raid_dev = ADAP2RAIDDEV(adapter); + + // move the SCBs from the completed list to our local list + INIT_LIST_HEAD(&clist); + + spin_lock_irqsave(COMPLETED_LIST_LOCK(adapter), flags); + + list_splice_init(&adapter->completed_list, &clist); + + spin_unlock_irqrestore(COMPLETED_LIST_LOCK(adapter), flags); + + + list_for_each_entry_safe(scb, tmp, &clist, list) { + + status = scb->status; + scp = scb->scp; + ccb = (mbox_ccb_t *)scb->ccb; + pthru = ccb->pthru; + epthru = ccb->epthru; + mbox = ccb->mbox; + + // Make sure f/w has completed a valid command + if (scb->state != SCB_ISSUED) { + con_log(CL_ANN, (KERN_CRIT + "megaraid critical err: invalid command %d:%d:%p\n", + scb->sno, scb->state, scp)); + BUG(); + continue; // Must never happen! + } + + // check for the management command and complete it right away + if (scb->sno >= MBOX_MAX_SCSI_CMDS) { + scb->state = SCB_FREE; + scb->status = status; + + // remove from local clist + list_del_init(&scb->list); + + megaraid_mbox_mm_done(adapter, scb); + + continue; + } + + // Was an abort issued for this command earlier + if (scb->state & SCB_ABORT) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid: aborted cmd %lx[%x] completed\n", + scp->serial_number, scb->sno)); + } + + /* + * If the inquiry came of a disk drive which is not part of + * any RAID array, expose it to the kernel. For this to be + * enabled, user must set the "megaraid_expose_unconf_disks" + * flag to 1 by specifying it on module parameter list. + * This would enable data migration off drives from other + * configurations. + */ + islogical = MRAID_IS_LOGICAL(adapter, scp); + if (scp->cmnd[0] == INQUIRY && status == 0 && islogical == 0 + && IS_RAID_CH(raid_dev, scb->dev_channel)) { + + if (scp->use_sg) { + sgl = (struct scatterlist *) + scp->request_buffer; + + if (sgl->page) { + c = *(unsigned char *) + (page_address((&sgl[0])->page) + + (&sgl[0])->offset); + } + else { + con_log(CL_ANN, (KERN_WARNING + "megaraid mailbox: invalid sg:%d\n", + __LINE__)); + c = 0; + } + } + else { + c = *(uint8_t *)scp->request_buffer; + } + + if ((c & 0x1F ) == TYPE_DISK) { + pdev_index = (scb->dev_channel * 16) + + scb->dev_target; + pdev_state = + raid_dev->pdrv_state[pdev_index] & 0x0F; + + if (pdev_state == PDRV_ONLINE || + pdev_state == PDRV_FAILED || + pdev_state == PDRV_RBLD || + pdev_state == PDRV_HOTSPARE || + megaraid_expose_unconf_disks == 0) { + + status = 0xF0; + } + } + } + + // Convert MegaRAID status to Linux error code + switch (status) { + + case 0x00: + + scp->result = (DID_OK << 16); + break; + + case 0x02: + + /* set sense_buffer and result fields */ + if (mbox->cmd == MBOXCMD_PASSTHRU || + mbox->cmd == MBOXCMD_PASSTHRU64) { + + memcpy(scp->sense_buffer, pthru->reqsensearea, + 14); + + scp->result = DRIVER_SENSE << 24 | + DID_OK << 16 | CHECK_CONDITION << 1; + } + else { + if (mbox->cmd == MBOXCMD_EXTPTHRU) { + + memcpy(scp->sense_buffer, + epthru->reqsensearea, 14); + + scp->result = DRIVER_SENSE << 24 | + DID_OK << 16 | + CHECK_CONDITION << 1; + } else { + scp->sense_buffer[0] = 0x70; + scp->sense_buffer[2] = ABORTED_COMMAND; + scp->result = CHECK_CONDITION << 1; + } + } + break; + + case 0x08: + + scp->result = DID_BUS_BUSY << 16 | status; + break; + + default: + + /* + * If TEST_UNIT_READY fails, we know RESERVATION_STATUS + * failed + */ + if (scp->cmnd[0] == TEST_UNIT_READY) { + scp->result = DID_ERROR << 16 | + RESERVATION_CONFLICT << 1; + } + else + /* + * Error code returned is 1 if Reserve or Release + * failed or the input parameter is invalid + */ + if (status == 1 && (scp->cmnd[0] == RESERVE || + scp->cmnd[0] == RELEASE)) { + + scp->result = DID_ERROR << 16 | + RESERVATION_CONFLICT << 1; + } + else { + scp->result = DID_BAD_TARGET << 16 | status; + } + } + + // print a debug message for all failed commands + if (status) { + megaraid_mbox_display_scb(adapter, scb); + } + + // Free our internal resources and call the mid-layer callback + // routine + megaraid_mbox_sync_scb(adapter, scb); + + // remove from local clist + list_del_init(&scb->list); + + // put back in free list + megaraid_dealloc_scb(adapter, scb); + + // send the scsi packet back to kernel + spin_lock(adapter->host_lock); + scp->scsi_done(scp); + spin_unlock(adapter->host_lock); + } + + return; +} + + +/** + * megaraid_abort_handler - abort the scsi command + * @scp : command to be aborted + * + * Abort a previous SCSI request. Only commands on the pending list can be + * aborted. All the commands issued to the F/W must complete. + **/ +static int +megaraid_abort_handler(struct scsi_cmnd *scp) +{ + adapter_t *adapter; + mraid_device_t *raid_dev; + scb_t *scb; + scb_t *tmp; + int found; + unsigned long flags; + int i; + + + adapter = SCP2ADAPTER(scp); + raid_dev = ADAP2RAIDDEV(adapter); + + ASSERT(spin_is_locked(adapter->host_lock)); + + con_log(CL_ANN, (KERN_WARNING + "megaraid: aborting-%ld cmd=%x \n", + scp->serial_number, scp->cmnd[0], SCP2CHANNEL(scp), + SCP2TARGET(scp), SCP2LUN(scp))); + + // If FW has stopped responding, simply return failure + if (raid_dev->hw_error) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid: hw error, not aborting\n")); + return FAILED; + } + + // There might a race here, where the command was completed by the + // firmware and now it is on the completed list. Before we could + // complete the command to the kernel in dpc, the abort came. + // Find out if this is the case to avoid the race. + scb = NULL; + spin_lock_irqsave(COMPLETED_LIST_LOCK(adapter), flags); + list_for_each_entry_safe(scb, tmp, &adapter->completed_list, list) { + + if (scb->scp == scp) { // Found command + + list_del_init(&scb->list); // from completed list + + con_log(CL_ANN, (KERN_WARNING + "megaraid: %ld:%d[%d:%d], abort from completed list\n", + scp->serial_number, scb->sno, + scb->dev_channel, scb->dev_target)); + + scp->result = (DID_ABORT << 16); + scp->scsi_done(scp); + + megaraid_dealloc_scb(adapter, scb); + + spin_unlock_irqrestore(COMPLETED_LIST_LOCK(adapter), + flags); + + return SUCCESS; + } + } + spin_unlock_irqrestore(COMPLETED_LIST_LOCK(adapter), flags); + + + // Find out if this command is still on the pending list. If it is and + // was never issued, abort and return success. If the command is owned + // by the firmware, we must wait for it to complete by the FW. + spin_lock_irqsave(PENDING_LIST_LOCK(adapter), flags); + list_for_each_entry_safe(scb, tmp, &adapter->pend_list, list) { + + if (scb->scp == scp) { // Found command + + list_del_init(&scb->list); // from pending list + + ASSERT(!(scb->state & SCB_ISSUED)); + + con_log(CL_ANN, (KERN_WARNING + "megaraid abort: %ld[%d:%d], driver owner\n", + scp->serial_number, scb->dev_channel, + scb->dev_target)); + + scp->result = (DID_ABORT << 16); + scp->scsi_done(scp); + + megaraid_dealloc_scb(adapter, scb); + + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), + flags); + + return SUCCESS; + } + } + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), flags); + + + // Check do we even own this command, in which case this would be + // owned by the firmware. The only way to locate the FW scb is to + // traverse through the list of all SCB, since driver does not + // maintain these SCBs on any list + found = 0; + for (i = 0; i < MBOX_MAX_SCSI_CMDS; i++) { + scb = adapter->kscb_list + i; + + if (scb->scp == scp) { + + found = 1; + + if (!(scb->state & SCB_ISSUED)) { + con_log(CL_ANN, (KERN_WARNING + "megaraid abort: %ld%d[%d:%d], invalid state\n", + scp->serial_number, scb->sno, scb->dev_channel, + scb->dev_target)); + BUG(); + } + else { + con_log(CL_ANN, (KERN_WARNING + "megaraid abort: %ld:%d[%d:%d], fw owner\n", + scp->serial_number, scb->sno, scb->dev_channel, + scb->dev_target)); + } + } + } + + if (!found) { + con_log(CL_ANN, (KERN_WARNING + "megaraid abort: scsi cmd:%ld, do now own\n", + scp->serial_number)); + + // FIXME: Should there be a callback for this command? + return SUCCESS; + } + + // We cannot actually abort a command owned by firmware, return + // failure and wait for reset. In host reset handler, we will find out + // if the HBA is still live + return FAILED; +} + + +/** + * megaraid_reset_handler - device reset hadler for mailbox based driver + * @scp : reference command + * + * Reset handler for the mailbox based controller. First try to find out if + * the FW is still live, in which case the outstanding commands counter mut go + * down to 0. If that happens, also issue the reservation reset command to + * relinquish (possible) reservations on the logical drives connected to this + * host + **/ +static int +megaraid_reset_handler(struct scsi_cmnd *scp) +{ + adapter_t *adapter; + scb_t *scb; + scb_t *tmp; + mraid_device_t *raid_dev; + unsigned long flags; + uint8_t raw_mbox[sizeof(mbox_t)]; + int rval; + int recovery_window; + int recovering; + int i; + + adapter = SCP2ADAPTER(scp); + raid_dev = ADAP2RAIDDEV(adapter); + + ASSERT(spin_is_locked(adapter->host_lock)); + + con_log(CL_ANN, (KERN_WARNING "megaraid: reseting the host...\n")); + + // return failure if adapter is not responding + if (raid_dev->hw_error) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid: hw error, cannot reset\n")); + return FAILED; + } + + + // Under exceptional conditions, FW can take up to 3 minutes to + // complete command processing. Wait for additional 2 minutes for the + // pending commands counter to go down to 0. If it doesn't, let the + // controller be marked offline + // Also, reset all the commands currently owned by the driver + spin_lock_irqsave(PENDING_LIST_LOCK(adapter), flags); + list_for_each_entry_safe(scb, tmp, &adapter->pend_list, list) { + + list_del_init(&scb->list); // from pending list + + con_log(CL_ANN, (KERN_WARNING + "megaraid: %ld:%d[%d:%d], reset from pending list\n", + scp->serial_number, scb->sno, + scb->dev_channel, scb->dev_target)); + + scp->result = (DID_RESET << 16); + scp->scsi_done(scp); + + megaraid_dealloc_scb(adapter, scb); + } + spin_unlock_irqrestore(PENDING_LIST_LOCK(adapter), flags); + + if (adapter->outstanding_cmds) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid: %d outstanding commands. Max wait %d sec\n", + adapter->outstanding_cmds, MBOX_RESET_WAIT)); + } + + spin_unlock(adapter->host_lock); + + recovery_window = MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT; + + recovering = adapter->outstanding_cmds; + + for (i = 0; i < recovery_window && adapter->outstanding_cmds; i++) { + + megaraid_ack_sequence(adapter); + + // print a message once every 5 seconds only + if (!(i % 5)) { + con_log(CL_ANN, ( + "megaraid mbox: Wait for %d commands to complete:%d\n", + adapter->outstanding_cmds, + MBOX_RESET_WAIT - i)); + } + + // bailout if no recovery happended in reset time + if ((i == MBOX_RESET_WAIT) && + (recovering == adapter->outstanding_cmds)) { + break; + } + + msleep(1000); + } + + spin_lock(adapter->host_lock); + + // If still outstanding commands, bail out + if (adapter->outstanding_cmds) { + con_log(CL_ANN, (KERN_WARNING + "megaraid mbox: critical hardware error!\n")); + + raid_dev->hw_error = 1; + + return FAILED; + } + else { + con_log(CL_ANN, (KERN_NOTICE + "megaraid mbox: reset sequence completed sucessfully\n")); + } + + + // If the controller supports clustering, reset reservations + if (!adapter->ha) return SUCCESS; + + // clear reservations if any + raw_mbox[0] = CLUSTER_CMD; + raw_mbox[2] = RESET_RESERVATIONS; + + rval = SUCCESS; + if (mbox_post_sync_cmd_fast(adapter, raw_mbox) == 0) { + con_log(CL_ANN, + (KERN_INFO "megaraid: reservation reset\n")); + } + else { + rval = FAILED; + con_log(CL_ANN, (KERN_WARNING + "megaraid: reservation reset failed\n")); + } + + return rval; +} + + +/* + * START: internal commands library + * + * This section of the driver has the common routine used by the driver and + * also has all the FW routines + */ + +/** + * mbox_post_sync_cmd() - blocking command to the mailbox based controllers + * @adapter - controller's soft state + * @raw_mbox - the mailbox + * + * Issue a scb in synchronous and non-interrupt mode for mailbox based + * controllers + */ +static int +mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[]) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox64_t *mbox64; + mbox_t *mbox; + uint8_t status; + int i; + + + mbox64 = raid_dev->mbox64; + mbox = raid_dev->mbox; + + /* + * Wait until mailbox is free + */ + if (megaraid_busywait_mbox(raid_dev) != 0) + goto blocked_mailbox; + + /* + * Copy mailbox data into host structure + */ + memcpy((caddr_t)mbox, (caddr_t)raw_mbox, 16); + mbox->cmdid = 0xFE; + mbox->busy = 1; + mbox->poll = 0; + mbox->ack = 0; + mbox->numstatus = 0xFF; + mbox->status = 0xFF; + + wmb(); + WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x1); + + // wait for maximum 1 second for status to post. If the status is not + // available within 1 second, assume FW is initializing and wait + // for an extended amount of time + if (mbox->numstatus == 0xFF) { // status not yet available + udelay(25);; + + for (i = 0; mbox->numstatus == 0xFF && i < 1000; i++) { + rmb(); + msleep(1); + } + + + if (i == 1000) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid mailbox: wait for FW to boot ")); + + for (i = 0; (mbox->numstatus == 0xFF) && + (i < MBOX_RESET_WAIT); i++) { + rmb(); + con_log(CL_ANN, ("\b\b\b\b\b[%03d]", + MBOX_RESET_WAIT - i)); + msleep(1000); + } + + if (i == MBOX_RESET_WAIT) { + + con_log(CL_ANN, ( + "\nmegaraid mailbox: status not available\n")); + + return -1; + } + con_log(CL_ANN, ("\b\b\b\b\b[ok] \n")); + } + } + + // wait for maximum 1 second for poll semaphore + if (mbox->poll != 0x77) { + udelay(25); + + for (i = 0; (mbox->poll != 0x77) && (i < 1000); i++) { + rmb(); + msleep(1); + } + + if (i == 1000) { + con_log(CL_ANN, (KERN_WARNING + "megaraid mailbox: could not get poll semaphore\n")); + return -1; + } + } + + WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x2); + wmb(); + + // wait for maximum 1 second for acknowledgement + if (RDINDOOR(raid_dev) & 0x2) { + udelay(25); + + for (i = 0; (RDINDOOR(raid_dev) & 0x2) && (i < 1000); i++) { + rmb(); + msleep(1); + } + + if (i == 1000) { + con_log(CL_ANN, (KERN_WARNING + "megaraid mailbox: could not acknowledge\n")); + return -1; + } + } + mbox->poll = 0; + mbox->ack = 0x77; + + status = mbox->status; + + // invalidate the completed command id array. After command + // completion, firmware would write the valid id. + mbox->numstatus = 0xFF; + mbox->status = 0xFF; + for (i = 0; i < MBOX_MAX_FIRMWARE_STATUS; i++) { + mbox->completed[i] = 0xFF; + } + + return status; + +blocked_mailbox: + + con_log(CL_ANN, (KERN_WARNING "megaraid: blocked mailbox\n") ); + return -1; +} + + +/** + * mbox_post_sync_cmd_fast - blocking command to the mailbox based controllers + * @adapter - controller's soft state + * @raw_mbox - the mailbox + * + * Issue a scb in synchronous and non-interrupt mode for mailbox based + * controllers. This is a faster version of the synchronous command and + * therefore can be called in interrupt-context as well + */ +static int +mbox_post_sync_cmd_fast(adapter_t *adapter, uint8_t raw_mbox[]) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox_t *mbox; + long i; + + + mbox = raid_dev->mbox; + + // return immediately if the mailbox is busy + if (mbox->busy) return -1; + + // Copy mailbox data into host structure + memcpy((caddr_t)mbox, (caddr_t)raw_mbox, 14); + mbox->cmdid = 0xFE; + mbox->busy = 1; + mbox->poll = 0; + mbox->ack = 0; + mbox->numstatus = 0xFF; + mbox->status = 0xFF; + + wmb(); + WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x1); + + for (i = 0; i < 0xFFFFF; i++) { + if (mbox->numstatus != 0xFF) break; + } + + if (i == 0xFFFFF) { + // We may need to re-calibrate the counter + con_log(CL_ANN, (KERN_CRIT + "megaraid: fast sync command timed out\n")); + } + + WRINDOOR(raid_dev, raid_dev->mbox_dma | 0x2); + wmb(); + + return mbox->status; +} + + +/** + * megaraid_busywait_mbox() - Wait until the controller's mailbox is available + * @raid_dev - RAID device (HBA) soft state + * + * wait until the controller's mailbox is available to accept more commands. + * wait for at most 1 second + */ +static int +megaraid_busywait_mbox(mraid_device_t *raid_dev) +{ + mbox_t *mbox = raid_dev->mbox; + int i = 0; + + if (mbox->busy) { + udelay(25); + for (i = 0; mbox->busy && i < 1000; i++) + msleep(1); + } + + if (i < 1000) return 0; + else return -1; +} + + +/** + * megaraid_mbox_product_info - some static information about the controller + * @adapter - our soft state + * + * issue commands to the controller to grab some parameters required by our + * caller. + */ +static int +megaraid_mbox_product_info(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + mraid_pinfo_t *pinfo; + dma_addr_t pinfo_dma_h; + mraid_inquiry3_t *mraid_inq3; + int i; + + + memset((caddr_t)raw_mbox, 0, sizeof(raw_mbox)); + mbox = (mbox_t *)raw_mbox; + + /* + * Issue an ENQUIRY3 command to find out certain adapter parameters, + * e.g., max channels, max commands etc. + */ + pinfo = pci_alloc_consistent(adapter->pdev, sizeof(mraid_pinfo_t), + &pinfo_dma_h); + + if (pinfo == NULL) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + + return -1; + } + memset(pinfo, 0, sizeof(mraid_pinfo_t)); + + mbox->xferaddr = (uint32_t)adapter->ibuf_dma_h; + memset((void *)adapter->ibuf, 0, MBOX_IBUF_SIZE); + + raw_mbox[0] = FC_NEW_CONFIG; + raw_mbox[2] = NC_SUBOP_ENQUIRY3; + raw_mbox[3] = ENQ3_GET_SOLICITED_FULL; + + // Issue the command + if (mbox_post_sync_cmd(adapter, raw_mbox) != 0) { + + con_log(CL_ANN, (KERN_WARNING "megaraid: Inquiry3 failed\n")); + + pci_free_consistent(adapter->pdev, sizeof(mraid_pinfo_t), + pinfo, pinfo_dma_h); + + return -1; + } + + /* + * Collect information about state of each physical drive + * attached to the controller. We will expose all the disks + * which are not part of RAID + */ + mraid_inq3 = (mraid_inquiry3_t *)adapter->ibuf; + for (i = 0; i < MBOX_MAX_PHYSICAL_DRIVES; i++) { + raid_dev->pdrv_state[i] = mraid_inq3->pdrv_state[i]; + } + + /* + * Get product info for information like number of channels, + * maximum commands supported. + */ + memset((caddr_t)raw_mbox, 0, sizeof(raw_mbox)); + mbox->xferaddr = (uint32_t)pinfo_dma_h; + + raw_mbox[0] = FC_NEW_CONFIG; + raw_mbox[2] = NC_SUBOP_PRODUCT_INFO; + + if (mbox_post_sync_cmd(adapter, raw_mbox) != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid: product info failed\n")); + + pci_free_consistent(adapter->pdev, sizeof(mraid_pinfo_t), + pinfo, pinfo_dma_h); + + return -1; + } + + /* + * Setup some parameters for host, as required by our caller + */ + adapter->max_channel = pinfo->nchannels; + + /* + * we will export all the logical drives on a single channel. + * Add 1 since inquires do not come for inititor ID + */ + adapter->max_target = MAX_LOGICAL_DRIVES_40LD + 1; + adapter->max_lun = 8; // up to 8 LUNs for non-disk devices + + /* + * These are the maximum outstanding commands for the scsi-layer + */ + adapter->max_cmds = MBOX_MAX_SCSI_CMDS; + + memset(adapter->fw_version, 0, VERSION_SIZE); + memset(adapter->bios_version, 0, VERSION_SIZE); + + memcpy(adapter->fw_version, pinfo->fw_version, 4); + adapter->fw_version[4] = 0; + + memcpy(adapter->bios_version, pinfo->bios_version, 4); + adapter->bios_version[4] = 0; + + con_log(CL_ANN, (KERN_NOTICE + "megaraid: fw version:[%s] bios version:[%s]\n", + adapter->fw_version, adapter->bios_version)); + + pci_free_consistent(adapter->pdev, sizeof(mraid_pinfo_t), pinfo, + pinfo_dma_h); + + return 0; +} + + + +/** + * megaraid_mbox_extended_cdb - check for support for extended CDBs + * @adapter - soft state for the controller + * + * this routine check whether the controller in question supports extended + * ( > 10 bytes ) CDBs + */ +static int +megaraid_mbox_extended_cdb(adapter_t *adapter) +{ + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + int rval; + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(raw_mbox)); + mbox->xferaddr = (uint32_t)adapter->ibuf_dma_h; + + memset((void *)adapter->ibuf, 0, MBOX_IBUF_SIZE); + + raw_mbox[0] = MAIN_MISC_OPCODE; + raw_mbox[2] = SUPPORT_EXT_CDB; + + /* + * Issue the command + */ + rval = 0; + if (mbox_post_sync_cmd(adapter, raw_mbox) != 0) { + rval = -1; + } + + return rval; +} + + +/** + * megaraid_mbox_support_ha - Do we support clustering + * @adapter - soft state for the controller + * @init_id - ID of the initiator + * + * Determine if the firmware supports clustering and the ID of the initiator. + */ +static int +megaraid_mbox_support_ha(adapter_t *adapter, uint16_t *init_id) +{ + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + int rval; + + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(raw_mbox)); + + mbox->xferaddr = (uint32_t)adapter->ibuf_dma_h; + + memset((void *)adapter->ibuf, 0, MBOX_IBUF_SIZE); + + raw_mbox[0] = GET_TARGET_ID; + + // Issue the command + *init_id = 7; + rval = -1; + if (mbox_post_sync_cmd(adapter, raw_mbox) == 0) { + + *init_id = *(uint8_t *)adapter->ibuf; + + con_log(CL_ANN, (KERN_INFO + "megaraid: cluster firmware, initiator ID: %d\n", + *init_id)); + + rval = 0; + } + + return rval; +} + + +/** + * megaraid_mbox_support_random_del - Do we support random deletion + * @adapter - soft state for the controller + * + * Determine if the firmware supports random deletion + * Return: 1 is operation supported, 0 otherwise + */ +static int +megaraid_mbox_support_random_del(adapter_t *adapter) +{ + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + int rval; + + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); + + raw_mbox[0] = FC_DEL_LOGDRV; + raw_mbox[0] = OP_SUP_DEL_LOGDRV; + + // Issue the command + rval = 0; + if (mbox_post_sync_cmd(adapter, raw_mbox) == 0) { + + con_log(CL_DLEVEL1, ("megaraid: supports random deletion\n")); + + rval = 1; + } + + return rval; +} + + +/** + * megaraid_mbox_get_max_sg - maximum sg elements supported by the firmware + * @adapter - soft state for the controller + * + * Find out the maximum number of scatter-gather elements supported by the + * firmware + */ +static int +megaraid_mbox_get_max_sg(adapter_t *adapter) +{ + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + int nsg; + + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); + + mbox->xferaddr = (uint32_t)adapter->ibuf_dma_h; + + memset((void *)adapter->ibuf, 0, MBOX_IBUF_SIZE); + + raw_mbox[0] = MAIN_MISC_OPCODE; + raw_mbox[2] = GET_MAX_SG_SUPPORT; + + // Issue the command + if (mbox_post_sync_cmd(adapter, raw_mbox) == 0) { + nsg = *(uint8_t *)adapter->ibuf; + } + else { + nsg = MBOX_DEFAULT_SG_SIZE; + } + + if (nsg > MBOX_MAX_SG_SIZE) nsg = MBOX_MAX_SG_SIZE; + + return nsg; +} + + +/** + * megaraid_mbox_enum_raid_scsi - enumerate the RAID and SCSI channels + * @adapter - soft state for the controller + * + * Enumerate the RAID and SCSI channels for ROMB platoforms so that channels + * can be exported as regular SCSI channels + */ +static void +megaraid_mbox_enum_raid_scsi(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); + + mbox->xferaddr = (uint32_t)adapter->ibuf_dma_h; + + memset((void *)adapter->ibuf, 0, MBOX_IBUF_SIZE); + + raw_mbox[0] = CHNL_CLASS; + raw_mbox[2] = GET_CHNL_CLASS; + + // Issue the command. If the command fails, all channels are RAID + // channels + raid_dev->channel_class = 0xFF; + if (mbox_post_sync_cmd(adapter, raw_mbox) == 0) { + raid_dev->channel_class = *(uint8_t *)adapter->ibuf; + } + + return; +} + + +/** + * megaraid_mbox_flush_cache - flush adapter and disks cache + * @param adapter : soft state for the controller + * + * Flush adapter cache followed by disks cache + */ +static void +megaraid_mbox_flush_cache(adapter_t *adapter) +{ + mbox_t *mbox; + uint8_t raw_mbox[sizeof(mbox_t)]; + + + mbox = (mbox_t *)raw_mbox; + + memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); + + raw_mbox[0] = FLUSH_ADAPTER; + + if (mbox_post_sync_cmd(adapter, raw_mbox) != 0) { + con_log(CL_ANN, ("megaraid: flush adapter failed\n")); + } + + raw_mbox[0] = FLUSH_SYSTEM; + + if (mbox_post_sync_cmd(adapter, raw_mbox) != 0) { + con_log(CL_ANN, ("megaraid: flush disks cache failed\n")); + } + + return; +} + + +/** + * megaraid_mbox_display_scb - display SCB information, mostly debug purposes + * @param adapter : controllers' soft state + * @param scb : SCB to be displayed + * @param level : debug level for console print + * + * Diplay information about the given SCB iff the current debug level is + * verbose + */ +static void +megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb) +{ + mbox_ccb_t *ccb; + struct scsi_cmnd *scp; + mbox_t *mbox; + int level; + int i; + + + ccb = (mbox_ccb_t *)scb->ccb; + scp = scb->scp; + mbox = ccb->mbox; + + level = CL_DLEVEL3; + + con_log(level, (KERN_NOTICE + "megaraid mailbox: status:%#x cmd:%#x id:%#x ", scb->status, + mbox->cmd, scb->sno)); + + con_log(level, ("sec:%#x lba:%#x addr:%#x ld:%d sg:%d\n", + mbox->numsectors, mbox->lba, mbox->xferaddr, mbox->logdrv, + mbox->numsge)); + + if (!scp) return; + + con_log(level, (KERN_NOTICE "scsi cmnd: ")); + + for (i = 0; i < scp->cmd_len; i++) { + con_log(level, ("%#2.02x ", scp->cmnd[i])); + } + + con_log(level, ("\n")); + + return; +} + + +/** + * megaraid_mbox_setup_device_map - manage device ids + * @adapter : Driver's soft state + * + * Manange the device ids to have an appropraite mapping between the kernel + * scsi addresses and megaraid scsi and logical drive addresses. We export + * scsi devices on their actual addresses, whereas the logical drives are + * exported on a virtual scsi channel. + **/ +static void +megaraid_mbox_setup_device_map(adapter_t *adapter) +{ + uint8_t c; + uint8_t t; + + /* + * First fill the values on the logical drive channel + */ + for (t = 0; t < LSI_MAX_LOGICAL_DRIVES_64LD; t++) + adapter->device_ids[adapter->max_channel][t] = + (t < adapter->init_id) ? t : t - 1; + + adapter->device_ids[adapter->max_channel][adapter->init_id] = 0xFF; + + /* + * Fill the values on the physical devices channels + */ + for (c = 0; c < adapter->max_channel; c++) + for (t = 0; t < LSI_MAX_LOGICAL_DRIVES_64LD; t++) + adapter->device_ids[c][t] = (c << 8) | t; +} + + +/* + * END: internal commands library + */ + +/* + * START: Interface for the common management module + * + * This is the module, which interfaces with the common mangement module to + * provide support for ioctl and sysfs + */ + +/** + * megaraid_cmm_register - register with the mangement module + * @param adapter : HBA soft state + * + * Register with the management module, which allows applications to issue + * ioctl calls to the drivers. This interface is used by the management module + * to setup sysfs support as well. + */ +static int +megaraid_cmm_register(adapter_t *adapter) +{ + mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); + mraid_mmadp_t adp; + scb_t *scb; + mbox_ccb_t *ccb; + int rval; + int i; + + // Allocate memory for the base list of scb for management module. + adapter->uscb_list = kmalloc(sizeof(scb_t) * MBOX_MAX_USER_CMDS, + GFP_KERNEL); + + if (adapter->uscb_list == NULL) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + return -1; + } + memset(adapter->uscb_list, 0, sizeof(scb_t) * MBOX_MAX_USER_CMDS); + + + // Initialize the synchronization parameters for resources for + // commands for management module + INIT_LIST_HEAD(&adapter->uscb_pool); + + spin_lock_init(USER_FREE_LIST_LOCK(adapter)); + + + + // link all the packets. Note, CCB for commands, coming from the + // commom management module, mailbox physical address are already + // setup by it. We just need placeholder for that in our local command + // control blocks + for (i = 0; i < MBOX_MAX_USER_CMDS; i++) { + + scb = adapter->uscb_list + i; + ccb = raid_dev->ccb_list + i; + + scb->ccb = (caddr_t)ccb; + ccb->mbox64 = raid_dev->umbox64 + i; + ccb->mbox = &ccb->mbox64->mbox32; + ccb->raw_mbox = (uint8_t *)ccb->mbox; + + scb->gp = 0; + + // COMMAND ID 0 - (MBOX_MAX_SCSI_CMDS-1) ARE RESERVED FOR + // COMMANDS COMING FROM IO SUBSYSTEM (MID-LAYER) + scb->sno = i + MBOX_MAX_SCSI_CMDS; + + scb->scp = NULL; + scb->state = SCB_FREE; + scb->dma_direction = PCI_DMA_NONE; + scb->dma_type = MRAID_DMA_NONE; + scb->dev_channel = -1; + scb->dev_target = -1; + + // put scb in the free pool + list_add_tail(&scb->list, &adapter->uscb_pool); + } + + adp.unique_id = adapter->unique_id; + adp.drvr_type = DRVRTYPE_MBOX; + adp.drvr_data = (unsigned long)adapter; + adp.pdev = adapter->pdev; + adp.issue_uioc = megaraid_mbox_mm_handler; + adp.timeout = 30; + adp.max_kioc = MBOX_MAX_USER_CMDS; + + if ((rval = mraid_mm_register_adp(&adp)) != 0) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid mbox: did not register with CMM\n")); + + kfree(adapter->uscb_list); + } + + return rval; +} + + +/** + * megaraid_cmm_unregister - un-register with the mangement module + * @param adapter : HBA soft state + * + * Un-register with the management module. + * FIXME: mgmt module must return failure for unregister if it has pending + * commands in LLD + */ +static int +megaraid_cmm_unregister(adapter_t *adapter) +{ + kfree(adapter->uscb_list); + mraid_mm_unregister_adp(adapter->unique_id); + return 0; +} + + +/** + * megaraid_mbox_mm_handler - interface for CMM to issue commands to LLD + * @param drvr_data : LLD specific data + * @param kioc : CMM interface packet + * @param action : command action + * + * This routine is invoked whenever the Common Mangement Module (CMM) has a + * command for us. The 'action' parameter specifies if this is a new command + * or otherwise. + */ +static int +megaraid_mbox_mm_handler(unsigned long drvr_data, uioc_t *kioc, uint32_t action) +{ + adapter_t *adapter; + + if (action != IOCTL_ISSUE) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: unsupported management action:%#2x\n", + action)); + return (-ENOTSUPP); + } + + adapter = (adapter_t *)drvr_data; + + // make sure this adapter is not being detached right now. + if (atomic_read(&adapter->being_detached)) { + con_log(CL_ANN, (KERN_WARNING + "megaraid: reject management request, detaching\n")); + return (-ENODEV); + } + + switch (kioc->opcode) { + + case GET_ADAP_INFO: + + kioc->status = gather_hbainfo(adapter, (mraid_hba_info_t *) + (unsigned long)kioc->buf_vaddr); + + kioc->done(kioc); + + return kioc->status; + + case MBOX_CMD: + + return megaraid_mbox_mm_command(adapter, kioc); + + default: + kioc->status = (-EINVAL); + kioc->done(kioc); + return (-EINVAL); + } + + return 0; // not reached +} + +/** + * megaraid_mbox_mm_command - issues commands routed through CMM + * @param adapter : HBA soft state + * @param kioc : management command packet + * + * Issues commands, which are routed through the management module. + */ +static int +megaraid_mbox_mm_command(adapter_t *adapter, uioc_t *kioc) +{ + struct list_head *head = &adapter->uscb_pool; + mbox64_t *mbox64; + uint8_t *raw_mbox; + scb_t *scb; + mbox_ccb_t *ccb; + unsigned long flags; + + // detach one scb from free pool + spin_lock_irqsave(USER_FREE_LIST_LOCK(adapter), flags); + + if (list_empty(head)) { // should never happen because of CMM + + con_log(CL_ANN, (KERN_WARNING + "megaraid mbox: bug in cmm handler, lost resources\n")); + + spin_unlock_irqrestore(USER_FREE_LIST_LOCK(adapter), flags); + + return (-EINVAL); + } + + scb = list_entry(head->next, scb_t, list); + list_del_init(&scb->list); + + spin_unlock_irqrestore(USER_FREE_LIST_LOCK(adapter), flags); + + scb->state = SCB_ACTIVE; + scb->dma_type = MRAID_DMA_NONE; + + ccb = (mbox_ccb_t *)scb->ccb; + mbox64 = (mbox64_t *)(unsigned long)kioc->cmdbuf; + raw_mbox = (uint8_t *)&mbox64->mbox32; + + memcpy(ccb->mbox64, mbox64, sizeof(mbox64_t)); + + scb->gp = (unsigned long)kioc; + + /* + * If it is a logdrv random delete operation, we have to wait till + * there are no outstanding cmds at the fw and then issue it directly + */ + if (raw_mbox[0] == FC_DEL_LOGDRV && raw_mbox[2] == OP_DEL_LOGDRV) { + + if (wait_till_fw_empty(adapter)) { + con_log(CL_ANN, (KERN_NOTICE + "megaraid mbox: LD delete, timed out\n")); + + kioc->status = -ETIME; + + scb->status = -1; + + megaraid_mbox_mm_done(adapter, scb); + + return (-ETIME); + } + + INIT_LIST_HEAD(&scb->list); + + scb->state = SCB_ISSUED; + if (mbox_post_cmd(adapter, scb) != 0) { + + con_log(CL_ANN, (KERN_NOTICE + "megaraid mbox: LD delete, mailbox busy\n")); + + kioc->status = -EBUSY; + + scb->status = -1; + + megaraid_mbox_mm_done(adapter, scb); + + return (-EBUSY); + } + + return 0; + } + + // put the command on the pending list and execute + megaraid_mbox_runpendq(adapter, scb); + + return 0; +} + + +static int +wait_till_fw_empty(adapter_t *adapter) +{ + unsigned long flags = 0; + int i; + + + /* + * Set the quiescent flag to stop issuing cmds to FW. + */ + spin_lock_irqsave(adapter->host_lock, flags); + adapter->quiescent++; + spin_unlock_irqrestore(adapter->host_lock, flags); + + /* + * Wait till there are no more cmds outstanding at FW. Try for at most + * 60 seconds + */ + for (i = 0; i < 60 && adapter->outstanding_cmds; i++) { + con_log(CL_DLEVEL1, (KERN_INFO + "megaraid: FW has %d pending commands\n", + adapter->outstanding_cmds)); + + msleep(1000); + } + + return adapter->outstanding_cmds; +} + + +/** + * megaraid_mbox_mm_done - callback for CMM commands + * @adapter : HBA soft state + * @scb : completed command + * + * Callback routine for internal commands originated from the management + * module. + */ +static void +megaraid_mbox_mm_done(adapter_t *adapter, scb_t *scb) +{ + uioc_t *kioc; + mbox64_t *mbox64; + uint8_t *raw_mbox; + unsigned long flags; + + kioc = (uioc_t *)scb->gp; + kioc->status = 0; + mbox64 = (mbox64_t *)(unsigned long)kioc->cmdbuf; + mbox64->mbox32.status = scb->status; + raw_mbox = (uint8_t *)&mbox64->mbox32; + + + // put scb in the free pool + scb->state = SCB_FREE; + scb->scp = NULL; + + spin_lock_irqsave(USER_FREE_LIST_LOCK(adapter), flags); + + list_add(&scb->list, &adapter->uscb_pool); + + spin_unlock_irqrestore(USER_FREE_LIST_LOCK(adapter), flags); + + // if a delete logical drive operation succeeded, restart the + // controller + if (raw_mbox[0] == FC_DEL_LOGDRV && raw_mbox[2] == OP_DEL_LOGDRV) { + + adapter->quiescent--; + + megaraid_mbox_runpendq(adapter, NULL); + } + + kioc->done(kioc); + + return; +} + + +/** + * gather_hbainfo - HBA characteristics for the applications + * @param adapter : HBA soft state + * @param hinfo : pointer to the caller's host info strucuture + */ +static int +gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) +{ + uint8_t dmajor; + + dmajor = megaraid_mbox_version[0]; + + hinfo->pci_vendor_id = adapter->pdev->vendor; + hinfo->pci_device_id = adapter->pdev->device; + hinfo->subsys_vendor_id = adapter->pdev->subsystem_vendor; + hinfo->subsys_device_id = adapter->pdev->subsystem_device; + + hinfo->pci_bus = adapter->pdev->bus->number; + hinfo->pci_dev_fn = adapter->pdev->devfn; + hinfo->pci_slot = PCI_SLOT(adapter->pdev->devfn); + hinfo->irq = adapter->host->irq; + hinfo->baseport = ADAP2RAIDDEV(adapter)->baseport; + + hinfo->unique_id = (hinfo->pci_bus << 8) | adapter->pdev->devfn; + hinfo->host_no = adapter->host->host_no; + + return 0; +} + +/* + * END: Interface for the common management module + */ + + +/* + * END: Mailbox Low Level Driver + */ +module_init(megaraid_init); +module_exit(megaraid_exit); + +/* vim: set ts=8 sw=8 tw=78 ai si: */ diff -Nru a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/megaraid_mbox.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,268 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : megaraid_mbox.h + */ + +#ifndef _MEGARAID_H_ +#define _MEGARAID_H_ + + +#include "mega_common.h" +#include "mbox_defs.h" +#include "megaraid_ioctl.h" + + +#define MEGARAID_VERSION "2.20.3.1" +#define MEGARAID_EXT_VERSION "(Release Date: Tue Aug 24 09:43:35 EDT 2004)" + + +/* + * Define some PCI values here until they are put in the kernel + */ +#define PCI_DEVICE_ID_PERC4_DI_DISCOVERY 0x000E +#define PCI_SUBSYS_ID_PERC4_DI_DISCOVERY 0x0123 + +#define PCI_DEVICE_ID_PERC4_SC 0x1960 +#define PCI_SUBSYS_ID_PERC4_SC 0x0520 + +#define PCI_DEVICE_ID_PERC4_DC 0x1960 +#define PCI_SUBSYS_ID_PERC4_DC 0x0518 + +#define PCI_DEVICE_ID_PERC4_QC 0x0407 +#define PCI_SUBSYS_ID_PERC4_QC 0x0531 + +#define PCI_DEVICE_ID_PERC4_DI_EVERGLADES 0x000F +#define PCI_SUBSYS_ID_PERC4_DI_EVERGLADES 0x014A + +#define PCI_DEVICE_ID_PERC4E_SI_BIGBEND 0x0013 +#define PCI_SUBSYS_ID_PERC4E_SI_BIGBEND 0x016c + +#define PCI_DEVICE_ID_PERC4E_DI_KOBUK 0x0013 +#define PCI_SUBSYS_ID_PERC4E_DI_KOBUK 0x016d + +#define PCI_DEVICE_ID_PERC4E_DI_CORVETTE 0x0013 +#define PCI_SUBSYS_ID_PERC4E_DI_CORVETTE 0x016e + +#define PCI_DEVICE_ID_PERC4E_DI_EXPEDITION 0x0013 +#define PCI_SUBSYS_ID_PERC4E_DI_EXPEDITION 0x016f + +#define PCI_DEVICE_ID_PERC4E_DI_GUADALUPE 0x0013 +#define PCI_SUBSYS_ID_PERC4E_DI_GUADALUPE 0x0170 + +#define PCI_DEVICE_ID_PERC4E_DC_320_2E 0x0408 +#define PCI_SUBSYS_ID_PERC4E_DC_320_2E 0x0002 + +#define PCI_DEVICE_ID_PERC4E_SC_320_1E 0x0408 +#define PCI_SUBSYS_ID_PERC4E_SC_320_1E 0x0001 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0 0xA520 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1 0x0520 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2 0x0518 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_0x 0x0407 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_0x 0x0530 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2x 0x0407 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2x 0x0532 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_4x 0x0407 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_4x 0x0531 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_1E 0x0408 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_1E 0x0001 + +#define PCI_DEVICE_ID_MEGARAID_SCSI_320_2E 0x0408 +#define PCI_SUBSYS_ID_MEGARAID_SCSI_320_2E 0x0002 + +#define PCI_DEVICE_ID_MEGARAID_I4_133_RAID 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_I4_133_RAID 0x0522 + +#define PCI_DEVICE_ID_MEGARAID_SATA_150_4 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_SATA_150_4 0x4523 + +#define PCI_DEVICE_ID_MEGARAID_SATA_150_6 0x1960 +#define PCI_SUBSYS_ID_MEGARAID_SATA_150_6 0x0523 + +#define PCI_DEVICE_ID_MEGARAID_SATA_300_4x 0x0409 +#define PCI_SUBSYS_ID_MEGARAID_SATA_300_4x 0x3004 + +#define PCI_DEVICE_ID_MEGARAID_SATA_300_8x 0x0409 +#define PCI_SUBSYS_ID_MEGARAID_SATA_300_8x 0x3008 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCU42X 0x0407 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42X 0x0532 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCS16 0x1960 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCS16 0x0523 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCU42E 0x0408 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCU42E 0x0002 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCZCRX 0x0407 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCZCRX 0x0530 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCS28X 0x0409 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCS28X 0x3008 + +#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_ALIEF 0x0408 +#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_ALIEF 0x3431 + +#define PCI_DEVICE_ID_INTEL_RAID_SROMBU42E_HARWICH 0x0408 +#define PCI_SUBSYS_ID_INTEL_RAID_SROMBU42E_HARWICH 0x3499 + +#define PCI_DEVICE_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x1960 +#define PCI_SUBSYS_ID_INTEL_RAID_SRCU41L_LAKE_SHETEK 0x0520 + +#define PCI_DEVICE_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x0408 +#define PCI_SUBSYS_ID_FSC_MEGARAID_PCI_EXPRESS_ROMB 0x1065 + +#define PCI_DEVICE_ID_MEGARAID_ACER_ROMB_2E 0x0408 +#define PCI_SUBSYS_ID_MEGARAID_ACER_ROMB_2E 0x004D + +#define PCI_SUBSYS_ID_PERC3_QC 0x0471 +#define PCI_SUBSYS_ID_PERC3_DC 0x0493 +#define PCI_SUBSYS_ID_PERC3_SC 0x0475 + +#ifndef PCI_SUBSYS_ID_FSC +#define PCI_SUBSYS_ID_FSC 0x1734 +#endif + +#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel +#define MBOX_MAX_USER_CMDS 32 // number of cmds for applications +#define MBOX_DEF_CMD_PER_LUN 64 // default commands per lun +#define MBOX_DEFAULT_SG_SIZE 26 // default sg size supported by all fw +#define MBOX_MAX_SG_SIZE 32 // maximum scatter-gather list size +#define MBOX_MAX_SECTORS 128 // maximum sectors per IO +#define MBOX_TIMEOUT 30 // timeout value for internal cmds +#define MBOX_BUSY_WAIT 10 // max usec to wait for busy mailbox +#define MBOX_RESET_WAIT 180 // wait these many seconds in reset +#define MBOX_RESET_EXT_WAIT 120 // extended wait reset + +/* + * maximum transfer that can happen through the firmware commands issued + * internnaly from the driver. + */ +#define MBOX_IBUF_SIZE 4096 + + +/** + * mbox_ccb_t - command control block specific to mailbox based controllers + * @raw_mbox : raw mailbox pointer + * @mbox : mailbox + * @mbox64 : extended mailbox + * @mbox_dma_h : maibox dma address + * @sgl64 : 64-bit scatter-gather list + * @sgl32 : 32-bit scatter-gather list + * @sgl_dma_h : dma handle for the scatter-gather list + * @pthru : passthru structure + * @pthru_dma_h : dma handle for the passthru structure + * @epthru : extended passthru structure + * @epthru_dma_h : dma handle for extended passthru structure + * @buf_dma_h : dma handle for buffers w/o sg list + * + * command control block specific to the mailbox based controllers + */ +typedef struct { + uint8_t *raw_mbox; + mbox_t *mbox; + mbox64_t *mbox64; + dma_addr_t mbox_dma_h; + mbox_sgl64 *sgl64; + mbox_sgl32 *sgl32; + dma_addr_t sgl_dma_h; + mraid_passthru_t *pthru; + dma_addr_t pthru_dma_h; + mraid_epassthru_t *epthru; + dma_addr_t epthru_dma_h; + dma_addr_t buf_dma_h; +} mbox_ccb_t; + + +/** + * mraid_device_t - adapter soft state structure for mailbox controllers + * @param una_mbox64 : 64-bit mbox - unaligned + * @param una_mbox64_dma : mbox dma addr - unaligned + * @param mbox : 32-bit mbox - aligned + * @param mbox64 : 64-bit mbox - aligned + * @param mbox_dma : mbox dma addr - aligned + * @param mailbox_lock : exclusion lock for the mailbox + * @param baseport : base port of hba memory + * @param baseaddr : mapped addr of hba memory + * @param mbox_pool : pool of mailboxes + * @param mbox_pool_handle : handle for the mailbox pool memory + * @param epthru_pool : a pool for extended passthru commands + * @param epthru_pool_handle : handle to the pool above + * @param sg_pool : pool of scatter-gather lists for this driver + * @param sg_pool_handle : handle to the pool above + * @param ccb_list : list of our command control blocks + * @param uccb_list : list of cmd control blocks for mgmt module + * @param umbox64 : array of mailbox for user commands (cmm) + * @param pdrv_state : array for state of each physical drive. + * @param last_disp : flag used to show device scanning + * @param hw_error : set if FW not responding + * @param fast_load : If set, skip physical device scanning + * @channel_class : channel class, RAID or SCSI + * + * Initialization structure for mailbox controllers: memory based and IO based + * All the fields in this structure are LLD specific and may be discovered at + * init() or start() time. + * + * NOTE: The fields of this structures are placed to minimize cache misses + */ +typedef struct { + mbox64_t *una_mbox64; + dma_addr_t una_mbox64_dma; + mbox_t *mbox; + mbox64_t *mbox64; + dma_addr_t mbox_dma; + spinlock_t mailbox_lock; + unsigned long baseport; + unsigned long baseaddr; + struct mraid_pci_blk mbox_pool[MBOX_MAX_SCSI_CMDS]; + struct dma_pool *mbox_pool_handle; + struct mraid_pci_blk epthru_pool[MBOX_MAX_SCSI_CMDS]; + struct dma_pool *epthru_pool_handle; + struct mraid_pci_blk sg_pool[MBOX_MAX_SCSI_CMDS]; + struct dma_pool *sg_pool_handle; + mbox_ccb_t ccb_list[MBOX_MAX_SCSI_CMDS]; + mbox_ccb_t uccb_list[MBOX_MAX_USER_CMDS]; + mbox64_t umbox64[MBOX_MAX_USER_CMDS]; + + uint8_t pdrv_state[MBOX_MAX_PHYSICAL_DRIVES]; + uint32_t last_disp; + int hw_error; + int fast_load; + uint8_t channel_class; +} mraid_device_t; + +// route to raid device from adapter +#define ADAP2RAIDDEV(adp) ((mraid_device_t *)((adp)->raid_device)) + +#define MAILBOX_LOCK(rdev) (&(rdev)->mailbox_lock) + +// Find out if this channel is a RAID or SCSI +#define IS_RAID_CH(rdev, ch) (((rdev)->channel_class >> (ch)) & 0x01) + + +#define RDINDOOR(rdev) readl((rdev)->baseaddr + 0x20) +#define RDOUTDOOR(rdev) readl((rdev)->baseaddr + 0x2C) +#define WRINDOOR(rdev, value) writel(value, (rdev)->baseaddr + 0x20) +#define WROUTDOOR(rdev, value) writel(value, (rdev)->baseaddr + 0x2C) + +#endif // _MEGARAID_H_ + +// vim: set ts=8 sw=8 tw=78: diff -Nru a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/megaraid_mm.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1160 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : megaraid_mm.c + * Version : v2.20.2.0 (August 19 2004) + * + * Common management module + */ + +#include "megaraid_mm.h" + + +// Entry points for char node driver +static int mraid_mm_open(struct inode *, struct file *); +static int mraid_mm_ioctl(struct inode *, struct file *, uint, unsigned long); + + +// routines to convert to and from the old the format +static int mimd_to_kioc(mimd_t __user *, mraid_mmadp_t *, uioc_t *); +static int kioc_to_mimd(uioc_t *, mimd_t __user *); + + +// Helper functions +static int handle_drvrcmd(void __user *, uint8_t, int *); +static int lld_ioctl(mraid_mmadp_t *, uioc_t *); +static void ioctl_done(uioc_t *); +static void lld_timedout(unsigned long); +static void hinfo_to_cinfo(mraid_hba_info_t *, mcontroller_t *); +static mraid_mmadp_t *mraid_mm_get_adapter(mimd_t __user *, int *); +static uioc_t *mraid_mm_alloc_kioc(mraid_mmadp_t *); +static void mraid_mm_dealloc_kioc(mraid_mmadp_t *, uioc_t *); +static int mraid_mm_attach_buf(mraid_mmadp_t *, uioc_t *, int); +static int mraid_mm_setup_dma_pools(mraid_mmadp_t *); +static void mraid_mm_free_adp_resources(mraid_mmadp_t *); +static void mraid_mm_teardown_dma_pools(mraid_mmadp_t *); + +#ifdef CONFIG_COMPAT +static int mraid_mm_compat_ioctl(unsigned int, unsigned int, unsigned long, + struct file *); +#endif + +MODULE_AUTHOR("LSI Logic Corporation"); +MODULE_DESCRIPTION("LSI Logic Management Module"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(LSI_COMMON_MOD_VERSION); + +static int dbglevel = CL_ANN; +module_param_named(dlevel, dbglevel, int, 0); +MODULE_PARM_DESC(dlevel, "Debug level (default=0)"); + +EXPORT_SYMBOL(mraid_mm_register_adp); +EXPORT_SYMBOL(mraid_mm_unregister_adp); + +static int majorno; +static uint32_t drvr_ver = 0x02200100; + +static int adapters_count_g; +static struct list_head adapters_list_g; + +wait_queue_head_t wait_q; + +static struct file_operations lsi_fops = { + .open = mraid_mm_open, + .ioctl = mraid_mm_ioctl, + .owner = THIS_MODULE, +}; + +/** + * mraid_mm_open - open routine for char node interface + * @inod : unused + * @filep : unused + * + * allow ioctl operations by apps only if they superuser privilege + */ +static int +mraid_mm_open(struct inode *inode, struct file *filep) +{ + /* + * Only allow superuser to access private ioctl interface + */ + if (!capable(CAP_SYS_ADMIN)) return (-EACCES); + + return 0; +} + +/** + * mraid_mm_ioctl - module entry-point for ioctls + * @inode : inode (ignored) + * @filep : file operations pointer (ignored) + * @cmd : ioctl command + * @arg : user ioctl packet + */ +static int +mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, + unsigned long arg) +{ + uioc_t *kioc; + char signature[EXT_IOCTL_SIGN_SZ] = {0}; + int rval; + mraid_mmadp_t *adp; + uint8_t old_ioctl; + int drvrcmd_rval; + void __user *argp = (void __user *)arg; + + /* + * Make sure only USCSICMD are issued through this interface. + * MIMD application would still fire different command. + */ + + if ((_IOC_TYPE(cmd) != MEGAIOC_MAGIC) && (cmd != USCSICMD)) { + return (-EINVAL); + } + + /* + * Look for signature to see if this is the new or old ioctl format. + */ + if (copy_from_user(signature, argp, EXT_IOCTL_SIGN_SZ)) { + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: copy from usr addr failed\n")); + return (-EFAULT); + } + + if (memcmp(signature, EXT_IOCTL_SIGN, EXT_IOCTL_SIGN_SZ) == 0) + old_ioctl = 0; + else + old_ioctl = 1; + + /* + * At present, we don't support the new ioctl packet + */ + if (!old_ioctl ) + return (-EINVAL); + + /* + * If it is a driver ioctl (as opposed to fw ioctls), then we can + * handle the command locally. rval > 0 means it is not a drvr cmd + */ + rval = handle_drvrcmd(argp, old_ioctl, &drvrcmd_rval); + + if (rval < 0) + return rval; + else if (rval == 0) + return drvrcmd_rval; + + rval = 0; + if ((adp = mraid_mm_get_adapter(argp, &rval)) == NULL) { + return rval; + } + + /* + * The following call will block till a kioc is available + */ + kioc = mraid_mm_alloc_kioc(adp); + + /* + * User sent the old mimd_t ioctl packet. Convert it to uioc_t. + */ + if ((rval = mimd_to_kioc(argp, adp, kioc))) { + mraid_mm_dealloc_kioc(adp, kioc); + return rval; + } + + kioc->done = ioctl_done; + + /* + * Issue the IOCTL to the low level driver + */ + if ((rval = lld_ioctl(adp, kioc))) { + mraid_mm_dealloc_kioc(adp, kioc); + return rval; + } + + /* + * Convert the kioc back to user space + */ + rval = kioc_to_mimd(kioc, argp); + + /* + * Return the kioc to free pool + */ + mraid_mm_dealloc_kioc(adp, kioc); + + return rval; +} + + +/** + * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet + * @umimd : User space mimd_t ioctl packet + * @adapter : pointer to the adapter (OUT) + */ +static mraid_mmadp_t * +mraid_mm_get_adapter(mimd_t __user *umimd, int *rval) +{ + mraid_mmadp_t *adapter; + mimd_t mimd; + uint32_t adapno; + int iterator; + + + if (copy_from_user(&mimd, umimd, sizeof(mimd_t))) { + *rval = -EFAULT; + return NULL; + } + + adapno = GETADAP(mimd.ui.fcs.adapno); + + if (adapno >= adapters_count_g) { + *rval = -ENODEV; + return NULL; + } + + adapter = NULL; + iterator = 0; + + list_for_each_entry(adapter, &adapters_list_g, list) { + if (iterator++ == adapno) break; + } + + if (!adapter) { + *rval = -ENODEV; + return NULL; + } + + return adapter; +} + +/* + * handle_drvrcmd - This routine checks if the opcode is a driver + * cmd and if it is, handles it. + * @arg : packet sent by the user app + * @old_ioctl : mimd if 1; uioc otherwise + */ +static int +handle_drvrcmd(void __user *arg, uint8_t old_ioctl, int *rval) +{ + mimd_t __user *umimd; + mimd_t kmimd; + uint8_t opcode; + uint8_t subopcode; + + if (old_ioctl) + goto old_packet; + else + goto new_packet; + +new_packet: + return (-ENOTSUPP); + +old_packet: + *rval = 0; + umimd = arg; + + if (copy_from_user(&kmimd, umimd, sizeof(mimd_t))) + return (-EFAULT); + + opcode = kmimd.ui.fcs.opcode; + subopcode = kmimd.ui.fcs.subopcode; + + /* + * If the opcode is 0x82 and the subopcode is either GET_DRVRVER or + * GET_NUMADP, then we can handle. Otherwise we should return 1 to + * indicate that we cannot handle this. + */ + if (opcode != 0x82) + return 1; + + switch (subopcode) { + + case MEGAIOC_QDRVRVER: + + if (copy_to_user(kmimd.data, &drvr_ver, sizeof(uint32_t))) + return (-EFAULT); + + return 0; + + case MEGAIOC_QNADAP: + + *rval = adapters_count_g; + + if (copy_to_user(kmimd.data, &adapters_count_g, + sizeof(uint32_t))) + return (-EFAULT); + + return 0; + + default: + /* cannot handle */ + return 1; + } + + return 0; +} + + +/** + * mimd_to_kioc - Converter from old to new ioctl format + * + * @umimd : user space old MIMD IOCTL + * @kioc : kernel space new format IOCTL + * + * Routine to convert MIMD interface IOCTL to new interface IOCTL packet. The + * new packet is in kernel space so that driver can perform operations on it + * freely. + */ + +static int +mimd_to_kioc(mimd_t __user *umimd, mraid_mmadp_t *adp, uioc_t *kioc) +{ + mbox64_t *mbox64; + mbox_t *mbox; + mraid_passthru_t *pthru32; + uint32_t adapno; + uint8_t opcode; + uint8_t subopcode; + mimd_t mimd; + + if (copy_from_user(&mimd, umimd, sizeof(mimd_t))) + return (-EFAULT); + + /* + * Applications are not allowed to send extd pthru + */ + if ((mimd.mbox[0] == MBOXCMD_PASSTHRU64) || + (mimd.mbox[0] == MBOXCMD_EXTPTHRU)) + return (-EINVAL); + + opcode = mimd.ui.fcs.opcode; + subopcode = mimd.ui.fcs.subopcode; + adapno = GETADAP(mimd.ui.fcs.adapno); + + if (adapno >= adapters_count_g) + return (-ENODEV); + + kioc->adapno = adapno; + kioc->mb_type = MBOX_LEGACY; + kioc->app_type = APPTYPE_MIMD; + + switch (opcode) { + + case 0x82: + + if (subopcode == MEGAIOC_QADAPINFO) { + + kioc->opcode = GET_ADAP_INFO; + kioc->data_dir = UIOC_RD; + kioc->xferlen = sizeof(mraid_hba_info_t); + + if (mraid_mm_attach_buf(adp, kioc, kioc->xferlen)) + return (-ENOMEM); + } + else { + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: Invalid subop\n")); + return (-EINVAL); + } + + break; + + case 0x81: + + kioc->opcode = MBOX_CMD; + kioc->xferlen = mimd.ui.fcs.length; + kioc->user_data_len = kioc->xferlen; + kioc->user_data = mimd.ui.fcs.buffer; + + if (mraid_mm_attach_buf(adp, kioc, kioc->xferlen)) + return (-ENOMEM); + + if (mimd.outlen) kioc->data_dir = UIOC_RD; + if (mimd.inlen) kioc->data_dir |= UIOC_WR; + + break; + + case 0x80: + + kioc->opcode = MBOX_CMD; + kioc->xferlen = (mimd.outlen > mimd.inlen) ? + mimd.outlen : mimd.inlen; + kioc->user_data_len = kioc->xferlen; + kioc->user_data = mimd.data; + + if (mraid_mm_attach_buf(adp, kioc, kioc->xferlen)) + return (-ENOMEM); + + if (mimd.outlen) kioc->data_dir = UIOC_RD; + if (mimd.inlen) kioc->data_dir |= UIOC_WR; + + break; + + default: + return (-EINVAL); + } + + /* + * If driver command, nothing else to do + */ + if (opcode == 0x82) + return 0; + + /* + * This is a mailbox cmd; copy the mailbox from mimd + */ + mbox64 = (mbox64_t *)((unsigned long)kioc->cmdbuf); + mbox = &mbox64->mbox32; + memcpy(mbox, mimd.mbox, 14); + + if (mbox->cmd != MBOXCMD_PASSTHRU) { // regular DCMD + + mbox->xferaddr = (uint32_t)kioc->buf_paddr; + + if (kioc->data_dir & UIOC_WR) { + if (copy_from_user(kioc->buf_vaddr, kioc->user_data, + kioc->xferlen)) { + return (-EFAULT); + } + } + + return 0; + } + + /* + * This is a regular 32-bit pthru cmd; mbox points to pthru struct. + * Just like in above case, the beginning for memblk is treated as + * a mailbox. The passthru will begin at next 1K boundary. And the + * data will start 1K after that. + */ + pthru32 = kioc->pthru32; + kioc->user_pthru = &umimd->pthru; + mbox->xferaddr = (uint32_t)kioc->pthru32_h; + + if (copy_from_user(pthru32, kioc->user_pthru, + sizeof(mraid_passthru_t))) { + return (-EFAULT); + } + + pthru32->dataxferaddr = kioc->buf_paddr; + if (kioc->data_dir & UIOC_WR) { + if (copy_from_user(kioc->buf_vaddr, kioc->user_data, + pthru32->dataxferlen)) { + return (-EFAULT); + } + } + + return 0; +} + +/** + * mraid_mm_attch_buf - Attach a free dma buffer for required size + * + * @adp : Adapter softstate + * @kioc : kioc that the buffer needs to be attached to + * @xferlen : required length for buffer + * + * First we search for a pool with smallest buffer that is >= @xferlen. If + * that pool has no free buffer, we will try for the next bigger size. If none + * is available, we will try to allocate the smallest buffer that is >= + * @xferlen and attach it the pool. + */ +static int +mraid_mm_attach_buf(mraid_mmadp_t *adp, uioc_t *kioc, int xferlen) +{ + mm_dmapool_t *pool; + int right_pool = -1; + unsigned long flags; + int i; + + kioc->pool_index = -1; + kioc->buf_vaddr = NULL; + kioc->buf_paddr = 0; + kioc->free_buf = 0; + + /* + * We need xferlen amount of memory. See if we can get it from our + * dma pools. If we don't get exact size, we will try bigger buffer + */ + + for (i = 0; i < MAX_DMA_POOLS; i++) { + + pool = &adp->dma_pool_list[i]; + + if (xferlen > pool->buf_size) + continue; + + if (right_pool == -1) + right_pool = i; + + spin_lock_irqsave(&pool->lock, flags); + + if (!pool->in_use) { + + pool->in_use = 1; + kioc->pool_index = i; + kioc->buf_vaddr = pool->vaddr; + kioc->buf_paddr = pool->paddr; + + spin_unlock_irqrestore(&pool->lock, flags); + return 0; + } + else { + spin_unlock_irqrestore(&pool->lock, flags); + continue; + } + } + + /* + * If xferlen doesn't match any of our pools, return error + */ + if (right_pool == -1) + return -EINVAL; + + /* + * We did not get any buffer from the preallocated pool. Let us try + * to allocate one new buffer. NOTE: This is a blocking call. + */ + pool = &adp->dma_pool_list[right_pool]; + + spin_lock_irqsave(&pool->lock, flags); + + kioc->pool_index = right_pool; + kioc->free_buf = 1; + kioc->buf_vaddr = pci_pool_alloc(pool->handle, GFP_KERNEL, + &kioc->buf_paddr); + spin_unlock_irqrestore(&pool->lock, flags); + + if (!kioc->buf_vaddr) + return -ENOMEM; + + return 0; +} + +/** + * mraid_mm_alloc_kioc - Returns a uioc_t from free list + * @adp : Adapter softstate for this module + * + * The kioc_semaphore is initialized with number of kioc nodes in the + * free kioc pool. If the kioc pool is empty, this function blocks till + * a kioc becomes free. + */ +static uioc_t * +mraid_mm_alloc_kioc(mraid_mmadp_t *adp) +{ + uioc_t *kioc; + struct list_head* head; + unsigned long flags; + + down(&adp->kioc_semaphore); + + spin_lock_irqsave(&adp->kioc_pool_lock, flags); + + head = &adp->kioc_pool; + + if (list_empty(head)) { + up(&adp->kioc_semaphore); + spin_unlock_irqrestore(&adp->kioc_pool_lock, flags); + + con_log(CL_ANN, ("megaraid cmm: kioc list empty!\n")); + return NULL; + } + + kioc = list_entry(head->next, uioc_t, list); + list_del_init(&kioc->list); + + spin_unlock_irqrestore(&adp->kioc_pool_lock, flags); + + memset((caddr_t)(unsigned long)kioc->cmdbuf, 0, sizeof(mbox64_t)); + memset((caddr_t) kioc->pthru32, 0, sizeof(mraid_passthru_t)); + + kioc->buf_vaddr = NULL; + kioc->buf_paddr = 0; + kioc->pool_index =-1; + kioc->free_buf = 0; + kioc->user_data = NULL; + kioc->user_data_len = 0; + kioc->user_pthru = NULL; + + return kioc; +} + +/** + * mraid_mm_dealloc_kioc - Return kioc to free pool + * + * @adp : Adapter softstate + * @kioc : uioc_t node to be returned to free pool + */ +static void +mraid_mm_dealloc_kioc(mraid_mmadp_t *adp, uioc_t *kioc) +{ + mm_dmapool_t *pool; + unsigned long flags; + + pool = &adp->dma_pool_list[kioc->pool_index]; + + /* This routine may be called in non-isr context also */ + spin_lock_irqsave(&pool->lock, flags); + + /* + * While attaching the dma buffer, if we didn't get the required + * buffer from the pool, we would have allocated it at the run time + * and set the free_buf flag. We must free that buffer. Otherwise, + * just mark that the buffer is not in use + */ + if (kioc->free_buf == 1) + pci_pool_free(pool->handle, kioc->buf_vaddr, kioc->buf_paddr); + else + pool->in_use = 0; + + spin_unlock_irqrestore(&pool->lock, flags); + + /* Return the kioc to the free pool */ + spin_lock_irqsave(&adp->kioc_pool_lock, flags); + list_add(&kioc->list, &adp->kioc_pool); + spin_unlock_irqrestore(&adp->kioc_pool_lock, flags); + + /* increment the free kioc count */ + up(&adp->kioc_semaphore); + + return; +} + +/** + * lld_ioctl - Routine to issue ioctl to low level drvr + * + * @adp : The adapter handle + * @kioc : The ioctl packet with kernel addresses + */ +static int +lld_ioctl(mraid_mmadp_t *adp, uioc_t *kioc) +{ + int rval; + struct timer_list timer; + struct timer_list *tp = NULL; + + kioc->status = -ENODATA; + rval = adp->issue_uioc(adp->drvr_data, kioc, IOCTL_ISSUE); + + if (rval) return rval; + + /* + * Start the timer + */ + if (adp->timeout > 0) { + tp = &timer; + init_timer(tp); + + tp->function = lld_timedout; + tp->data = (unsigned long)kioc; + tp->expires = jiffies + adp->timeout * HZ; + + add_timer(tp); + } + + /* + * Wait till the low level driver completes the ioctl. After this + * call, the ioctl either completed successfully or timedout. + */ + wait_event(wait_q, (kioc->status != -ENODATA)); + if (tp) { + del_timer_sync(tp); + } + + return kioc->status; +} + + +/** + * ioctl_done - callback from the low level driver + * + * @kioc : completed ioctl packet + */ +static void +ioctl_done(uioc_t *kioc) +{ + /* + * When the kioc returns from driver, make sure it still doesn't + * have ENODATA in status. Otherwise, driver will hang on wait_event + * forever + */ + if (kioc->status == -ENODATA) { + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: lld didn't change status!\n")); + + kioc->status = -EINVAL; + } + + wake_up(&wait_q); +} + + +/* + * lld_timedout : callback from the expired timer + * + * @ptr : ioctl packet that timed out + */ +static void +lld_timedout(unsigned long ptr) +{ + uioc_t *kioc = (uioc_t *)ptr; + + kioc->status = -ETIME; + + con_log(CL_ANN, (KERN_WARNING "megaraid cmm: ioctl timed out\n")); + + wake_up(&wait_q); +} + + +/** + * kioc_to_mimd : Converter from new back to old format + * + * @kioc : Kernel space IOCTL packet (successfully issued) + * @mimd : User space MIMD packet + */ +static int +kioc_to_mimd(uioc_t *kioc, mimd_t __user *mimd) +{ + mimd_t kmimd; + uint8_t opcode; + uint8_t subopcode; + + mbox64_t *mbox64; + mraid_passthru_t __user *upthru32; + mraid_passthru_t *kpthru32; + mcontroller_t cinfo; + mraid_hba_info_t *hinfo; + + + if (copy_from_user(&kmimd, mimd, sizeof(mimd_t))) + return (-EFAULT); + + opcode = kmimd.ui.fcs.opcode; + subopcode = kmimd.ui.fcs.subopcode; + + if (opcode == 0x82) { + switch (subopcode) { + + case MEGAIOC_QADAPINFO: + + hinfo = (mraid_hba_info_t *)(unsigned long) + kioc->buf_vaddr; + + hinfo_to_cinfo(hinfo, &cinfo); + + if (copy_to_user(kmimd.data, &cinfo, sizeof(cinfo))) + return (-EFAULT); + + return 0; + + default: + return (-EINVAL); + } + + return 0; + } + + mbox64 = (mbox64_t *)(unsigned long)kioc->cmdbuf; + + if (kioc->user_pthru) { + + upthru32 = kioc->user_pthru; + kpthru32 = kioc->pthru32; + + if (copy_to_user(&upthru32->scsistatus, + &kpthru32->scsistatus, + sizeof(uint8_t))) { + return (-EFAULT); + } + } + + if (kioc->user_data) { + if (copy_to_user(kioc->user_data, kioc->buf_vaddr, + kioc->user_data_len)) { + return (-EFAULT); + } + } + + if (copy_to_user(&mimd->mbox[17], + &mbox64->mbox32.status, sizeof(uint8_t))) { + return (-EFAULT); + } + + return 0; +} + + +/** + * hinfo_to_cinfo - Convert new format hba info into old format + * + * @hinfo : New format, more comprehensive adapter info + * @cinfo : Old format adapter info to support mimd_t apps + */ +static void +hinfo_to_cinfo(mraid_hba_info_t *hinfo, mcontroller_t *cinfo) +{ + if (!hinfo || !cinfo) + return; + + cinfo->base = hinfo->baseport; + cinfo->irq = hinfo->irq; + cinfo->numldrv = hinfo->num_ldrv; + cinfo->pcibus = hinfo->pci_bus; + cinfo->pcidev = hinfo->pci_slot; + cinfo->pcifun = PCI_FUNC(hinfo->pci_dev_fn); + cinfo->pciid = hinfo->pci_device_id; + cinfo->pcivendor = hinfo->pci_vendor_id; + cinfo->pcislot = hinfo->pci_slot; + cinfo->uid = hinfo->unique_id; +} + + +/* + * mraid_mm_register_adp - Registration routine for low level drvrs + * + * @adp : Adapter objejct + */ +int +mraid_mm_register_adp(mraid_mmadp_t *lld_adp) +{ + mraid_mmadp_t *adapter; + mbox64_t *mbox_list; + uioc_t *kioc; + uint32_t rval; + int i; + + + if (lld_adp->drvr_type != DRVRTYPE_MBOX) + return (-EINVAL); + + adapter = kmalloc(sizeof(mraid_mmadp_t), GFP_KERNEL); + + if (!adapter) { + rval = -ENOMEM; + goto memalloc_error; + } + + memset(adapter, 0, sizeof(mraid_mmadp_t)); + + adapter->unique_id = lld_adp->unique_id; + adapter->drvr_type = lld_adp->drvr_type; + adapter->drvr_data = lld_adp->drvr_data; + adapter->pdev = lld_adp->pdev; + adapter->issue_uioc = lld_adp->issue_uioc; + adapter->timeout = lld_adp->timeout; + adapter->max_kioc = lld_adp->max_kioc; + + /* + * Allocate single blocks of memory for all required kiocs, + * mailboxes and passthru structures. + */ + adapter->kioc_list = kmalloc(sizeof(uioc_t) * lld_adp->max_kioc, + GFP_KERNEL); + adapter->mbox_list = kmalloc(sizeof(mbox64_t) * lld_adp->max_kioc, + GFP_KERNEL); + adapter->pthru_dma_pool = pci_pool_create("megaraid mm pthru pool", + adapter->pdev, + sizeof(mraid_passthru_t), + 16, 0); + + if (!adapter->kioc_list || !adapter->mbox_list || + !adapter->pthru_dma_pool) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: out of memory, %s %d\n", __FUNCTION__, + __LINE__)); + + rval = (-ENOMEM); + + goto memalloc_error; + } + + /* + * Slice kioc_list and make a kioc_pool with the individiual kiocs + */ + INIT_LIST_HEAD(&adapter->kioc_pool); + spin_lock_init(&adapter->kioc_pool_lock); + sema_init(&adapter->kioc_semaphore, lld_adp->max_kioc); + + mbox_list = (mbox64_t *)adapter->mbox_list; + + for (i = 0; i < lld_adp->max_kioc; i++) { + + kioc = adapter->kioc_list + i; + kioc->cmdbuf = (uint64_t)(unsigned long)(mbox_list + i); + kioc->pthru32 = pci_pool_alloc(adapter->pthru_dma_pool, + GFP_KERNEL, &kioc->pthru32_h); + + if (!kioc->pthru32) { + + con_log(CL_ANN, (KERN_WARNING + "megaraid cmm: out of memory, %s %d\n", + __FUNCTION__, __LINE__)); + + rval = (-ENOMEM); + + goto pthru_dma_pool_error; + } + + list_add_tail(&kioc->list, &adapter->kioc_pool); + } + + // Setup the dma pools for data buffers + if ((rval = mraid_mm_setup_dma_pools(adapter)) != 0) { + goto dma_pool_error; + } + + list_add_tail(&adapter->list, &adapters_list_g); + + adapters_count_g++; + + return 0; + +dma_pool_error: + /* Do nothing */ + +pthru_dma_pool_error: + + for (i = 0; i < lld_adp->max_kioc; i++) { + kioc = adapter->kioc_list + i; + if (kioc->pthru32) { + pci_pool_free(adapter->pthru_dma_pool, kioc->pthru32, + kioc->pthru32_h); + } + } + +memalloc_error: + + if (adapter->kioc_list) + kfree(adapter->kioc_list); + + if (adapter->mbox_list) + kfree(adapter->mbox_list); + + if (adapter->pthru_dma_pool) + pci_pool_destroy(adapter->pthru_dma_pool); + + if (adapter) + kfree(adapter); + + return rval; +} + +/** + * mraid_mm_setup_dma_pools - Set up dma buffer pools per adapter + * + * @adp : Adapter softstate + * + * We maintain a pool of dma buffers per each adapter. Each pool has one + * buffer. E.g, we may have 5 dma pools - one each for 4k, 8k ... 64k buffers. + * We have just one 4k buffer in 4k pool, one 8k buffer in 8k pool etc. We + * dont' want to waste too much memory by allocating more buffers per each + * pool. + */ +static int +mraid_mm_setup_dma_pools(mraid_mmadp_t *adp) +{ + mm_dmapool_t *pool; + int bufsize; + int i; + + /* + * Create MAX_DMA_POOLS number of pools + */ + bufsize = MRAID_MM_INIT_BUFF_SIZE; + + for (i = 0; i < MAX_DMA_POOLS; i++){ + + pool = &adp->dma_pool_list[i]; + + pool->buf_size = bufsize; + spin_lock_init(&pool->lock); + + pool->handle = pci_pool_create("megaraid mm data buffer", + adp->pdev, bufsize, 16, 0); + + if (!pool->handle) { + goto dma_pool_setup_error; + } + + pool->vaddr = pci_pool_alloc(pool->handle, GFP_KERNEL, + &pool->paddr); + + if (!pool->vaddr) + goto dma_pool_setup_error; + + bufsize = bufsize * 2; + } + + return 0; + +dma_pool_setup_error: + + mraid_mm_teardown_dma_pools(adp); + return (-ENOMEM); +} + + +/* + * mraid_mm_unregister_adp - Unregister routine for low level drivers + * Assume no outstanding ioctls to llds. + * + * @unique_id : UID of the adpater + */ +int +mraid_mm_unregister_adp(uint32_t unique_id) +{ + mraid_mmadp_t *adapter; + mraid_mmadp_t *tmp; + + list_for_each_entry_safe(adapter, tmp, &adapters_list_g, list) { + + + if (adapter->unique_id == unique_id) { + + adapters_count_g--; + + list_del_init(&adapter->list); + + mraid_mm_free_adp_resources(adapter); + + kfree(adapter); + + con_log(CL_ANN, ( + "megaraid cmm: Unregistered one adapter:%#x\n", + unique_id)); + + return 0; + } + } + + return (-ENODEV); +} + +/** + * mraid_mm_free_adp_resources - Free adapter softstate + * + * @adp : Adapter softstate + */ +static void +mraid_mm_free_adp_resources(mraid_mmadp_t *adp) +{ + uioc_t *kioc; + int i; + + mraid_mm_teardown_dma_pools(adp); + + for (i = 0; i < adp->max_kioc; i++) { + + kioc = adp->kioc_list + i; + + pci_pool_free(adp->pthru_dma_pool, kioc->pthru32, + kioc->pthru32_h); + } + + kfree(adp->kioc_list); + + kfree(adp->mbox_list); + + pci_pool_destroy(adp->pthru_dma_pool); + + + return; +} + + +/** + * mraid_mm_teardown_dma_pools - Free all per adapter dma buffers + * + * @adp : Adapter softstate + */ +static void +mraid_mm_teardown_dma_pools(mraid_mmadp_t *adp) +{ + int i; + mm_dmapool_t *pool; + + for (i = 0; i < MAX_DMA_POOLS; i++) { + + pool = &adp->dma_pool_list[i]; + + if (pool->handle) { + + if (pool->vaddr) + pci_pool_free(pool->handle, pool->vaddr, + pool->paddr); + + pci_pool_destroy(pool->handle); + pool->handle = NULL; + } + } + + return; +} + +/** + * mraid_mm_init : Module entry point + */ +static int __init +mraid_mm_init(void) +{ + // Announce the driver version + con_log(CL_ANN, (KERN_INFO "megaraid cmm: %s %s\n", + LSI_COMMON_MOD_VERSION, LSI_COMMON_MOD_EXT_VERSION)); + + majorno = register_chrdev(0, "megadev", &lsi_fops); + + if (majorno < 0) { + con_log(CL_ANN, ("megaraid cmm: cannot get major\n")); + return majorno; + } + + init_waitqueue_head(&wait_q); + + INIT_LIST_HEAD(&adapters_list_g); + +#ifdef CONFIG_COMPAT + register_ioctl32_conversion(MEGAIOCCMD, mraid_mm_compat_ioctl); +#endif + + return 0; +} + + +/** + * mraid_mm_compat_ioctl : 32bit to 64bit ioctl conversion routine + */ +#ifdef CONFIG_COMPAT +static int +mraid_mm_compat_ioctl(unsigned int fd, unsigned int cmd, + unsigned long arg, struct file *filep) +{ + struct inode *inode = filep->f_dentry->d_inode; + + return mraid_mm_ioctl(inode, filep, cmd, arg); +} +#endif + +/** + * mraid_mm_exit : Module exit point + */ +static void __exit +mraid_mm_exit(void) +{ + con_log(CL_DLEVEL1 , ("exiting common mod\n")); + + unregister_chrdev(majorno, "megadev"); + unregister_ioctl32_conversion(MEGAIOCCMD); +} + +module_init(mraid_mm_init); +module_exit(mraid_mm_exit); + +/* vi: set ts=8 sw=8 tw=78: */ diff -Nru a/drivers/scsi/megaraid/megaraid_mm.h b/drivers/scsi/megaraid/megaraid_mm.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/scsi/megaraid/megaraid_mm.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,102 @@ +/* + * + * Linux MegaRAID device driver + * + * Copyright (c) 2003-2004 LSI Logic Corporation. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * FILE : megaraid_mm.h + */ + +#ifndef MEGARAID_MM_H +#define MEGARAID_MM_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mbox_defs.h" +#include "megaraid_ioctl.h" + + +#define LSI_COMMON_MOD_VERSION "2.20.2.0" +#define LSI_COMMON_MOD_EXT_VERSION \ + "(Release Date: Thu Aug 19 09:58:33 EDT 2004)" + + +#define LSI_DBGLVL dbglevel + +// The smallest dma pool +#define MRAID_MM_INIT_BUFF_SIZE 4096 + +/** + * mimd_t : Old style ioctl packet structure (deprecated) + * + * @inlen : + * @outlen : + * @fca : + * @opcode : + * @subopcode : + * @adapno : + * @buffer : + * @pad : + * @length : + * @mbox : + * @pthru : + * @data : + * @pad : + * + * Note : This structure is DEPRECATED. New applications must use + * : uioc_t structure instead. All new hba drivers use the new + * : format. If we get this mimd packet, we will convert it into + * : new uioc_t format and send it to the hba drivers. + */ + +typedef struct mimd { + + uint32_t inlen; + uint32_t outlen; + + union { + uint8_t fca[16]; + struct { + uint8_t opcode; + uint8_t subopcode; + uint16_t adapno; +#if BITS_PER_LONG == 32 + uint8_t __user *buffer; + uint8_t pad[4]; +#endif +#if BITS_PER_LONG == 64 + uint8_t __user *buffer; +#endif + uint32_t length; + } __attribute__ ((packed)) fcs; + } __attribute__ ((packed)) ui; + + uint8_t mbox[18]; /* 16 bytes + 2 status bytes */ + mraid_passthru_t pthru; + +#if BITS_PER_LONG == 32 + char __user *data; /* buffer <= 4096 for 0x80 commands */ + char pad[4]; +#endif +#if BITS_PER_LONG == 64 + char __user *data; +#endif + +} __attribute__ ((packed))mimd_t; + +#endif // MEGARAID_MM_H + +// vi: set ts=8 sw=8 tw=78: diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c --- a/drivers/scsi/megaraid.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/megaraid.c 2004-09-06 16:37:50 -07:00 @@ -25,11 +25,8 @@ * 518, 520, 531, 532 * * This driver is supported by LSI Logic, with assistance from Red Hat, Dell, - * and others. Please send updates to the public mailing list - * linux-megaraid-devel@dell.com, and subscribe to and read archives of this - * list at http://lists.us.dell.com/. - * - * For history of changes, see ChangeLog.megaraid. + * and others. Please send updates to the mailing list + * linux-scsi@vger.kernel.org . * */ @@ -53,9 +50,12 @@ #include "megaraid.h" +#define MEGARAID_MODULE_VERSION "2.00.3" + MODULE_AUTHOR ("LSI Logic Corporation"); MODULE_DESCRIPTION ("LSI Logic MegaRAID driver"); MODULE_LICENSE ("GPL"); +MODULE_VERSION(MEGARAID_MODULE_VERSION); static unsigned int max_cmd_per_lun = DEF_CMD_PER_LUN; MODULE_PARM(max_cmd_per_lun, "i"); diff -Nru a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c --- a/drivers/scsi/nsp32.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/nsp32.c 2004-09-06 16:37:52 -07:00 @@ -267,8 +267,8 @@ static int nsp32_prom_read (nsp32_hw_data *, int); static int nsp32_prom_read_bit (nsp32_hw_data *); static void nsp32_prom_write_bit(nsp32_hw_data *, int); -static inline void nsp32_prom_set (nsp32_hw_data *, int, int); -static inline int nsp32_prom_get (nsp32_hw_data *, int); +static void nsp32_prom_set (nsp32_hw_data *, int, int); +static int nsp32_prom_get (nsp32_hw_data *, int); /* debug/warning/info message */ static void nsp32_message (const char *, int, char *, char *, ...); @@ -3342,7 +3342,7 @@ return val; } -static inline void nsp32_prom_set(nsp32_hw_data *data, int bit, int val) +static void nsp32_prom_set(nsp32_hw_data *data, int bit, int val) { int base = data->BaseAddress; int tmp; @@ -3360,7 +3360,7 @@ udelay(10); } -static inline int nsp32_prom_get(nsp32_hw_data *data, int bit) +static int nsp32_prom_get(nsp32_hw_data *data, int bit) { int base = data->BaseAddress; int tmp, ret; diff -Nru a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c --- a/drivers/scsi/pas16.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/pas16.c 2004-09-06 16:37:50 -07:00 @@ -605,6 +605,7 @@ { if (shost->irq) free_irq(shost->irq, NULL); + NCR5380_exit(shost); if (shost->dma_channel != 0xff) free_dma(shost->dma_channel); if (shost->io_port && shost->n_io_port) diff -Nru a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c --- a/drivers/scsi/qla1280.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla1280.c 2004-09-06 16:37:55 -07:00 @@ -4,7 +4,7 @@ * QLogic QLA1280 (Ultra2) and QLA12160 (Ultra3) SCSI driver * Copyright (C) 2000 Qlogic Corporation (www.qlogic.com) * Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc. -* Copyright (C) 2003 Christoph Hellwig +* Copyright (C) 2003-2004 Christoph Hellwig * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,9 +17,12 @@ * General Public License for more details. * ******************************************************************************/ -#define QLA1280_VERSION "3.24.3" +#define QLA1280_VERSION "3.24.4" /***************************************************************************** Revision History: + Rev 3.24.4 June 7, 2004 Christoph Hellwig + - restructure firmware loading, cleanup initialization code + - prepare support for ISP1020/1040 chips Rev 3.24.3 January 19, 2004, Jes Sorensen - Handle PCI DMA mask settings correctly - Correct order of error handling in probe_one, free_irq should not @@ -485,6 +488,14 @@ #define ia64_platform_is(foo) (!strcmp(x, platform_name)) #endif + +#define IS_ISP1040(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020) +#define IS_ISP1x40(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020 || \ + ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1240) +#define IS_ISP1x160(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160 || \ + ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160) + + static int qla1280_probe_one(struct pci_dev *, const struct pci_device_id *); static void qla1280_remove_one(struct pci_dev *); @@ -501,9 +512,7 @@ /* * QLogic ISP1280 Hardware Support Function Prototypes. */ -static int qla1280_isp_firmware(struct scsi_qla_host *); -static int qla1280_chip_diag(struct scsi_qla_host *); -static int qla1280_setup_chip(struct scsi_qla_host *); +static int qla1280_load_firmware(struct scsi_qla_host *); static int qla1280_init_rings(struct scsi_qla_host *); static int qla1280_nvram_config(struct scsi_qla_host *); static int qla1280_mailbox_command(struct scsi_qla_host *, @@ -1384,16 +1393,10 @@ uint8_t mr; uint16_t mb[MAILBOX_REGISTER_COUNT]; struct nvram *nv; - int is1x160, status; + int status; nv = &ha->nvram; - if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 || - ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) - is1x160 = 1; - else - is1x160 = 0; - mr = BIT_3 | BIT_2 | BIT_1 | BIT_0; /* Set Target Parameters. */ @@ -1403,17 +1406,16 @@ mb[2] = (nv->bus[bus].target[target].parameter.c << 8); - if (is1x160) - mb[3] = nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8; - else - mb[3] = nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8; - mb[3] |= nv->bus[bus].target[target].sync_period; - - if (is1x160) { + if (IS_ISP1x160(ha)) { mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5; - mb[6] = nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8; - mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width; + mb[3] = (nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8) | + nv->bus[bus].target[target].sync_period; + mb[6] = (nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8) | + nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width; mr |= BIT_6; + } else { + mb[3] = (nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8) | + nv->bus[bus].target[target].sync_period; } status = qla1280_mailbox_command(ha, mr, &mb[0]); @@ -1476,8 +1478,7 @@ (driver_setup.wide_mask && (~driver_setup.wide_mask & (1 << target)))) nv->bus[bus].target[target].parameter.f.enable_wide = 0; - if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 || - ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) { + if (IS_ISP1x160(ha)) { if (driver_setup.no_ppr || (driver_setup.ppr_mask && (~driver_setup.ppr_mask & (1 << target)))) @@ -1802,17 +1803,8 @@ */ spin_lock_irqsave(HOST_LOCK, flags); #endif - /* If firmware needs to be loaded */ - if (qla1280_isp_firmware(ha)) { - if (!(status = qla1280_chip_diag(ha))) { - status = qla1280_setup_chip(ha); - } - } else { - printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n", - ha->host_no); - status = 1; - } + status = qla1280_load_firmware(ha); if (status) { printk(KERN_ERR "scsi(%li): initialize: pci probe failed!\n", ha->host_no); @@ -1823,36 +1815,24 @@ dprintk(1, "scsi(%ld): Configure NVRAM parameters\n", ha->host_no); qla1280_nvram_config(ha); - if (!ha->flags.disable_host_adapter && !qla1280_init_rings(ha)) { - /* Issue SCSI reset. */ - /* dg 03/13 if we can't reset twice then bus is dead */ - for (bus = 0; bus < ha->ports; bus++) { - if (!ha->bus_settings[bus].disable_scsi_reset){ - if (qla1280_bus_reset(ha, bus)) { - if (qla1280_bus_reset(ha, bus)) { - ha->bus_settings[bus].scsi_bus_dead = 1; - } - } - } - } + if (ha->flags.disable_host_adapter) { + status = 1; + goto out; + } - /* - * qla1280_bus_reset() will take care of issueing markers, - * no need to do that here as well! - */ -#if 0 - /* Issue marker command. */ - ha->flags.reset_marker = 0; - for (bus = 0; bus < ha->ports; bus++) { - ha->bus_settings[bus].reset_marker = 0; - qla1280_marker(ha, bus, 0, 0, MK_SYNC_ALL); - } -#endif + status = qla1280_init_rings(ha); + if (status) + goto out; - ha->flags.online = 1; - } else - status = 1; + /* Issue SCSI reset, if we can't reset twice then bus is dead */ + for (bus = 0; bus < ha->ports; bus++) { + if (!ha->bus_settings[bus].disable_scsi_reset && + qla1280_bus_reset(ha, bus) && + qla1280_bus_reset(ha, bus)) + ha->bus_settings[bus].scsi_bus_dead = 1; + } + ha->flags.online = 1; out: #if LINUX_VERSION_CODE >= 0x020500 spin_unlock_irqrestore(HOST_LOCK, flags); @@ -1945,13 +1925,13 @@ int status = 0; int cnt; uint16_t data; - dprintk(3, "qla1280_chip_diag: testing device at 0x%p \n", ®->id_l); dprintk(1, "scsi(%ld): Verifying chip\n", ha->host_no); /* Soft reset chip and wait for it to finish. */ WRT_REG_WORD(®->ictrl, ISP_RESET); + /* * We can't do a traditional PCI write flush here by reading * back the register. The card will not respond once the reset @@ -1969,145 +1949,138 @@ data = RD_REG_WORD(®->ictrl); } - if (cnt) { - /* Reset register cleared by chip reset. */ - dprintk(3, "qla1280_chip_diag: reset register cleared by " - "chip reset\n"); + if (!cnt) + goto fail; - WRT_REG_WORD(®->cfg_1, 0); + /* Reset register cleared by chip reset. */ + dprintk(3, "qla1280_chip_diag: reset register cleared by chip reset\n"); - /* Reset RISC and disable BIOS which - allows RISC to execute out of RAM. */ -#if 0 - WRT_REG_WORD(®->host_cmd, HC_RESET_RISC); - RD_REG_WORD(®->id_l); /* Flush PCI write */ - WRT_REG_WORD(®->host_cmd, HC_RELEASE_RISC); - RD_REG_WORD(®->id_l); /* Flush PCI write */ - WRT_REG_WORD(®->host_cmd, HC_DISABLE_BIOS); -#else - WRT_REG_WORD(®->host_cmd, HC_RESET_RISC | - HC_RELEASE_RISC | HC_DISABLE_BIOS); -#endif - RD_REG_WORD(®->id_l); /* Flush PCI write */ - data = qla1280_debounce_register(®->mailbox0); - /* - * I *LOVE* this code! - */ - for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) { - udelay(5); - data = RD_REG_WORD(®->mailbox0); - } + WRT_REG_WORD(®->cfg_1, 0); - if (cnt) { - /* Check product ID of chip */ - dprintk(3, "qla1280_chip_diag: Checking product " - "ID of chip\n"); - - if (RD_REG_WORD(®->mailbox1) != PROD_ID_1 || - (RD_REG_WORD(®->mailbox2) != PROD_ID_2 && - RD_REG_WORD(®->mailbox2) != PROD_ID_2a) || - RD_REG_WORD(®->mailbox3) != PROD_ID_3 || - RD_REG_WORD(®->mailbox4) != PROD_ID_4) { - printk(KERN_INFO "qla1280: Wrong product ID = " - "0x%x,0x%x,0x%x,0x%x\n", - RD_REG_WORD(®->mailbox1), - RD_REG_WORD(®->mailbox2), - RD_REG_WORD(®->mailbox3), - RD_REG_WORD(®->mailbox4)); - status = 1; - } else { - /* - * Enable ints early!!! - */ - qla1280_enable_intrs(ha); - - dprintk(1, "qla1280_chip_diag: Checking " - "mailboxes of chip\n"); - /* Wrap Incoming Mailboxes Test. */ - mb[0] = MBC_MAILBOX_REGISTER_TEST; - mb[1] = 0xAAAA; - mb[2] = 0x5555; - mb[3] = 0xAA55; - mb[4] = 0x55AA; - mb[5] = 0xA5A5; - mb[6] = 0x5A5A; - mb[7] = 0x2525; - if (!(status = qla1280_mailbox_command(ha, - 0xff, - &mb - [0]))) { - if (mb[1] != 0xAAAA || - mb[2] != 0x5555 || - mb[3] != 0xAA55 || - mb[4] != 0x55AA || - mb[5] != 0xA5A5 || - mb[6] != 0x5A5A || - mb[7] != 0x2525) { - status = 1; - printk(KERN_INFO "qla1280: " - "Failed mbox check\n"); - } - } - } - } else - status = 1; - } else - status = 1; + /* Reset RISC and disable BIOS which + allows RISC to execute out of RAM. */ + WRT_REG_WORD(®->host_cmd, HC_RESET_RISC | + HC_RELEASE_RISC | HC_DISABLE_BIOS); + + RD_REG_WORD(®->id_l); /* Flush PCI write */ + data = qla1280_debounce_register(®->mailbox0); + + /* + * I *LOVE* this code! + */ + for (cnt = 1000000; cnt && data == MBS_BUSY; cnt--) { + udelay(5); + data = RD_REG_WORD(®->mailbox0); + } + + if (!cnt) + goto fail; + + /* Check product ID of chip */ + dprintk(3, "qla1280_chip_diag: Checking product ID of chip\n"); + + if (RD_REG_WORD(®->mailbox1) != PROD_ID_1 || + (RD_REG_WORD(®->mailbox2) != PROD_ID_2 && + RD_REG_WORD(®->mailbox2) != PROD_ID_2a) || + RD_REG_WORD(®->mailbox3) != PROD_ID_3 || + RD_REG_WORD(®->mailbox4) != PROD_ID_4) { + printk(KERN_INFO "qla1280: Wrong product ID = " + "0x%x,0x%x,0x%x,0x%x\n", + RD_REG_WORD(®->mailbox1), + RD_REG_WORD(®->mailbox2), + RD_REG_WORD(®->mailbox3), + RD_REG_WORD(®->mailbox4)); + goto fail; + } + /* + * Enable ints early!!! + */ + qla1280_enable_intrs(ha); + + dprintk(1, "qla1280_chip_diag: Checking mailboxes of chip\n"); + /* Wrap Incoming Mailboxes Test. */ + mb[0] = MBC_MAILBOX_REGISTER_TEST; + mb[1] = 0xAAAA; + mb[2] = 0x5555; + mb[3] = 0xAA55; + mb[4] = 0x55AA; + mb[5] = 0xA5A5; + mb[6] = 0x5A5A; + mb[7] = 0x2525; + + status = qla1280_mailbox_command(ha, 0xff, mb); if (status) - dprintk(2, "qla1280_chip_diag: **** FAILED ****\n"); - else - dprintk(3, "qla1280_chip_diag: exiting normally\n"); + goto fail; + if (mb[1] != 0xAAAA || mb[2] != 0x5555 || mb[3] != 0xAA55 || + mb[4] != 0x55AA || mb[5] != 0xA5A5 || mb[6] != 0x5A5A || + mb[7] != 0x2525) { + printk(KERN_INFO "qla1280: Failed mbox check\n"); + goto fail; + } + + dprintk(3, "qla1280_chip_diag: exiting normally\n"); + return 0; + fail: + dprintk(2, "qla1280_chip_diag: **** FAILED ****\n"); return status; } -/* - * Setup chip - * Load and start RISC firmware. - * - * Input: - * ha = adapter block pointer. - * - * Returns: - * 0 = success. - */ -#define DUMP_IT_BACK 0 /* for debug of RISC loading */ static int -qla1280_setup_chip(struct scsi_qla_host *ha) +qla1280_load_firmware_pio(struct scsi_qla_host *ha) { - int status = 0; - uint16_t risc_address; - uint16_t *risc_code_address; - int risc_code_size; - uint16_t mb[MAILBOX_REGISTER_COUNT]; - uint16_t cnt; - int num, i; -#if DUMP_IT_BACK - uint8_t *sp; - uint8_t *tbuf; - dma_addr_t p_tbuf; -#endif + uint16_t risc_address, *risc_code_address, risc_code_size; + uint16_t mb[MAILBOX_REGISTER_COUNT], i; + int err; - ENTER("qla1280_setup_chip"); + /* Load RISC code. */ + risc_address = *ql1280_board_tbl[ha->devnum].fwstart; + risc_code_address = ql1280_board_tbl[ha->devnum].fwcode; + risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen; - dprintk(1, "scsi(%ld): Setup chip\n", ha->host_no); + for (i = 0; i < risc_code_size; i++) { + mb[0] = MBC_WRITE_RAM_WORD; + mb[1] = risc_address + i; + mb[2] = risc_code_address[i]; + + err = qla1280_mailbox_command(ha, BIT_0 | BIT_1 | BIT_2, mb); + if (err) { + printk(KERN_ERR "scsi(%li): Failed to load firmware\n", + ha->host_no); + return err; + } + } + return 0; +} + +#define DUMP_IT_BACK 0 /* for debug of RISC loading */ +static int +qla1280_load_firmware_dma(struct scsi_qla_host *ha) +{ + uint16_t risc_address, *risc_code_address, risc_code_size; + uint16_t mb[MAILBOX_REGISTER_COUNT], cnt; + int err = 0, num, i; #if DUMP_IT_BACK - /* get consistent memory allocated for setup_chip */ + uint8_t *sp, *tbuf; + dma_addr_t p_tbuf; + tbuf = pci_alloc_consistent(ha->pdev, 8000, &p_tbuf); + if (!tbuf) + return -ENOMEM; #endif /* Load RISC code. */ risc_address = *ql1280_board_tbl[ha->devnum].fwstart; risc_code_address = ql1280_board_tbl[ha->devnum].fwcode; - risc_code_size = (int) *ql1280_board_tbl[ha->devnum].fwlen; + risc_code_size = *ql1280_board_tbl[ha->devnum].fwlen; - dprintk(1, "qla1280_setup_chip: DMA RISC code (%i) words\n", - risc_code_size); + dprintk(1, "%s: DMA RISC code (%i) words\n", + __FUNCTION__, risc_code_size); num = 0; - while (risc_code_size > 0 && !status) { + while (risc_code_size > 0) { int warn __attribute__((unused)) = 0; cnt = 2000 >> 1; @@ -2129,15 +2102,16 @@ mb[2] = (ha->request_dma >> 16) & 0xffff; mb[7] = pci_dma_hi32(ha->request_dma) & 0xffff; mb[6] = pci_dma_hi32(ha->request_dma) >> 16; - dprintk(2, "qla1280_setup_chip: op=%d 0x%p = 0x%4x,0x%4x," - "0x%4x,0x%4x\n", mb[0], (void *)(long)ha->request_dma, - mb[6], mb[7], mb[2], mb[3]); - if ((status = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | - BIT_2 | BIT_1 | BIT_0, - &mb[0]))) { + dprintk(2, "%s: op=%d 0x%p = 0x%4x,0x%4x,0x%4x,0x%4x\n", + __FUNCTION__, mb[0], + (void *)(long)ha->request_dma, + mb[6], mb[7], mb[2], mb[3]); + err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 | + BIT_1 | BIT_0, mb); + if (err) { printk(KERN_ERR "scsi(%li): Failed to load partial " "segment of f\n", ha->host_no); - break; + goto out; } #if DUMP_IT_BACK @@ -2149,22 +2123,22 @@ mb[7] = pci_dma_hi32(p_tbuf) & 0xffff; mb[6] = pci_dma_hi32(p_tbuf) >> 16; - if ((status = qla1280_mailbox_command(ha, - BIT_4 | BIT_3 | BIT_2 | - BIT_1 | BIT_0, - &mb[0]))) { + err = qla1280_mailbox_command(ha, BIT_4 | BIT_3 | BIT_2 | + BIT_1 | BIT_0, mb); + if (err) { printk(KERN_ERR "Failed to dump partial segment of f/w\n"); - break; + goto out; } sp = (uint8_t *)ha->request_ring; for (i = 0; i < (cnt << 1); i++) { if (tbuf[i] != sp[i] && warn++ < 10) { - printk(KERN_ERR "qla1280_setup_chip: FW " - "compare error @ byte(0x%x) loop#=%x\n", - i, num); - printk(KERN_ERR "setup_chip: FWbyte=%x " - "FWfromChip=%x\n", sp[i], tbuf[i]); + printk(KERN_ERR "%s: FW compare error @ " + "byte(0x%x) loop#=%x\n", + __FUNCTION__, i, num); + printk(KERN_ERR "%s: FWbyte=%x " + "FWfromChip=%x\n", + __FUNCTION__, sp[i], tbuf[i]); /*break; */ } } @@ -2175,37 +2149,69 @@ num++; } - /* Verify checksum of loaded RISC code. */ - if (!status) { - dprintk(1, "qla1280_setup_chip: Verifying checksum of " - "loaded RISC code.\n"); - mb[0] = MBC_VERIFY_CHECKSUM; - /* mb[1] = ql12_risc_code_addr01; */ - mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; - - if (!(status = - qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]))) { - /* Start firmware execution. */ - dprintk(1, - "qla1280_setup_chip: start firmware running.\n"); - mb[0] = MBC_EXECUTE_FIRMWARE; - mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; - qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); - } else - printk(KERN_ERR "scsi(%li): qla1280_setup_chip: " - "Failed checksum\n", ha->host_no); - } - + out: #if DUMP_IT_BACK - /* free consistent memory allocated for setup_chip */ pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf); #endif + return err; +} - if (status) - dprintk(2, "qla1280_setup_chip: **** FAILED ****\n"); +static int +qla1280_start_firmware(struct scsi_qla_host *ha) +{ + uint16_t mb[MAILBOX_REGISTER_COUNT]; + int err; - LEAVE("qla1280_setup_chip"); - return status; + dprintk(1, "%s: Verifying checksum of loaded RISC code.\n", + __FUNCTION__); + + /* Verify checksum of loaded RISC code. */ + mb[0] = MBC_VERIFY_CHECKSUM; + /* mb[1] = ql12_risc_code_addr01; */ + mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; + err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); + if (err) { + printk(KERN_ERR "scsi(%li): Failed checksum\n", ha->host_no); + return err; + } + + /* Start firmware execution. */ + dprintk(1, "%s: start firmware running.\n", __FUNCTION__); + mb[0] = MBC_EXECUTE_FIRMWARE; + mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; + err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); + if (err) { + printk(KERN_ERR "scsi(%li): Failed to start firmware\n", + ha->host_no); + } + + return err; +} + +static int +qla1280_load_firmware(struct scsi_qla_host *ha) +{ + int err = -ENODEV; + + /* If firmware needs to be loaded */ + if (!qla1280_isp_firmware(ha)) { + printk(KERN_ERR "scsi(%li): isp_firmware() failed!\n", + ha->host_no); + goto out; + } + + err = qla1280_chip_diag(ha); + if (err) + goto out; + if (IS_ISP1040(ha)) + err = qla1280_load_firmware_pio(ha); + else + err = qla1280_load_firmware_dma(ha); + if (err) + goto out; + err = qla1280_start_firmware(ha); + out: + return err; } /* @@ -2271,123 +2277,9 @@ return status; } -/* - * NVRAM configuration. - * - * Input: - * ha = adapter block pointer. - * ha->request_ring = request ring virtual address - * - * Output: - * host adapters parameters in host adapter block - * - * Returns: - * 0 = success. - */ -static int -qla1280_nvram_config(struct scsi_qla_host *ha) +static void +qla1280_print_settings(struct nvram *nv) { - struct device_reg *reg = ha->iobase; - struct nvram *nv; - int is1x160, status = 0; - int bus, target, lun; - uint16_t mb[MAILBOX_REGISTER_COUNT]; - uint16_t mask; - - ENTER("qla1280_nvram_config"); - - if (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP12160 || - ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP10160) - is1x160 = 1; - else - is1x160 = 0; - - nv = &ha->nvram; - if (!ha->nvram_valid) { - dprintk(1, "Using defaults for NVRAM: \n"); - memset(nv, 0, sizeof(struct nvram)); - - /* nv->cntr_flags_1.disable_loading_risc_code = 1; */ - nv->firmware_feature.f.enable_fast_posting = 1; - nv->firmware_feature.f.disable_synchronous_backoff = 1; - - nv->termination.f.scsi_bus_0_control = 3; - nv->termination.f.scsi_bus_1_control = 3; - nv->termination.f.auto_term_support = 1; - - /* - * Set default FIFO magic - What appropriate values - * would be here is unknown. This is what I have found - * testing with 12160s. - * Now, I would love the magic decoder ring for this one, - * the header file provided by QLogic seems to be bogus - * or incomplete at best. - */ - nv->isp_config.c = 0x44; - - if (is1x160) - nv->isp_parameter = 0x01; - - for (bus = 0; bus < MAX_BUSES; bus++) { - nv->bus[bus].config_1.initiator_id = 7; - nv->bus[bus].bus_reset_delay = 5; - /* 8 = 5.0 clocks */ - nv->bus[bus].config_2.async_data_setup_time = 8; - nv->bus[bus].config_2.req_ack_active_negation = 1; - nv->bus[bus].config_2.data_line_active_negation = 1; - nv->bus[bus].selection_timeout = 250; - nv->bus[bus].max_queue_depth = 256; - - for (target = 0; target < MAX_TARGETS; target++) { - nv->bus[bus].target[target].parameter.f. - renegotiate_on_error = 1; - nv->bus[bus].target[target].parameter.f. - auto_request_sense = 1; - nv->bus[bus].target[target].parameter.f. - tag_queuing = 1; - nv->bus[bus].target[target].parameter.f. - enable_sync = 1; -#if 1 /* Some SCSI Processors do not seem to like this */ - nv->bus[bus].target[target].parameter.f. - enable_wide = 1; -#endif - nv->bus[bus].target[target].parameter.f. - parity_checking = 1; - nv->bus[bus].target[target].parameter.f. - disconnect_allowed = 1; - nv->bus[bus].target[target].execution_throttle= - nv->bus[bus].max_queue_depth - 1; - if (is1x160) { - nv->bus[bus].target[target].flags. - flags1x160.device_enable = 1; - nv->bus[bus].target[target].flags. - flags1x160.sync_offset = 0x0e; - nv->bus[bus].target[target]. - sync_period = 9; - nv->bus[bus].target[target]. - ppr_1x160.flags.enable_ppr = 1; - nv->bus[bus].target[target].ppr_1x160. - flags.ppr_options = 2; - nv->bus[bus].target[target].ppr_1x160. - flags.ppr_bus_width = 1; - } else { - nv->bus[bus].target[target].flags. - flags1x80.device_enable = 1; - nv->bus[bus].target[target].flags. - flags1x80.sync_offset = 0x8; - nv->bus[bus].target[target]. - sync_period = 10; - } - } - } - } else { - /* Always force AUTO sense for LINUX SCSI */ - for (bus = 0; bus < MAX_BUSES; bus++) - for (target = 0; target < MAX_TARGETS; target++) { - nv->bus[bus].target[target].parameter.f. - auto_request_sense = 1; - } - } dprintk(1, "qla1280 : initiator scsi id bus[0]=%d\n", nv->bus[0].config_1.initiator_id); dprintk(1, "qla1280 : initiator scsi id bus[1]=%d\n", @@ -2433,36 +2325,264 @@ nv->bus[0].max_queue_depth); dprintk(1, "qla1280 : max queue depth[1]=%d\n", nv->bus[1].max_queue_depth); +} + +static void +qla1280_set_target_defaults(struct scsi_qla_host *ha, int bus, int target) +{ + struct nvram *nv = &ha->nvram; + + nv->bus[bus].target[target].parameter.f.renegotiate_on_error = 1; + nv->bus[bus].target[target].parameter.f.auto_request_sense = 1; + nv->bus[bus].target[target].parameter.f.tag_queuing = 1; + nv->bus[bus].target[target].parameter.f.enable_sync = 1; +#if 1 /* Some SCSI Processors do not seem to like this */ + nv->bus[bus].target[target].parameter.f.enable_wide = 1; +#endif + if (!IS_ISP1040(ha)) + nv->bus[bus].target[target].parameter.f.parity_checking = 1; + + nv->bus[bus].target[target].parameter.f.disconnect_allowed = 1; + nv->bus[bus].target[target].execution_throttle = + nv->bus[bus].max_queue_depth - 1; + + if (IS_ISP1x160(ha)) { + nv->bus[bus].target[target].flags.flags1x160.device_enable = 1; + nv->bus[bus].target[target].flags.flags1x160.sync_offset = 0x0e; + nv->bus[bus].target[target].sync_period = 9; + nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr = 1; + nv->bus[bus].target[target].ppr_1x160.flags.ppr_options = 2; + nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width = 1; + } else { + nv->bus[bus].target[target].flags.flags1x80.device_enable = 1; + nv->bus[bus].target[target].flags.flags1x80.sync_offset = 12; + nv->bus[bus].target[target].sync_period = 10; + } +} + +static void +qla1280_set_defaults(struct scsi_qla_host *ha) +{ + struct nvram *nv = &ha->nvram; + int bus, target; + + dprintk(1, "Using defaults for NVRAM: \n"); + memset(nv, 0, sizeof(struct nvram)); + + /* nv->cntr_flags_1.disable_loading_risc_code = 1; */ + nv->firmware_feature.f.enable_fast_posting = 1; + nv->firmware_feature.f.disable_synchronous_backoff = 1; + nv->termination.f.scsi_bus_0_control = 3; + nv->termination.f.scsi_bus_1_control = 3; + nv->termination.f.auto_term_support = 1; + + /* + * Set default FIFO magic - What appropriate values would be here + * is unknown. This is what I have found testing with 12160s. + * + * Now, I would love the magic decoder ring for this one, the + * header file provided by QLogic seems to be bogus or incomplete + * at best. + */ + nv->isp_config.c = ISP_CFG1_BENAB|ISP_CFG1_F128; + if (IS_ISP1x160(ha)) + nv->isp_parameter = 0x01; /* fast memory enable */ + + for (bus = 0; bus < MAX_BUSES; bus++) { + nv->bus[bus].config_1.initiator_id = 7; + nv->bus[bus].config_2.req_ack_active_negation = 1; + nv->bus[bus].config_2.data_line_active_negation = 1; + nv->bus[bus].selection_timeout = 250; + nv->bus[bus].max_queue_depth = 256; + + if (IS_ISP1040(ha)) { + nv->bus[bus].bus_reset_delay = 3; + nv->bus[bus].config_2.async_data_setup_time = 6; + nv->bus[bus].retry_delay = 1; + } else { + nv->bus[bus].bus_reset_delay = 5; + nv->bus[bus].config_2.async_data_setup_time = 8; + } + + for (target = 0; target < MAX_TARGETS; target++) + qla1280_set_target_defaults(ha, bus, target); + } +} + +static int +qla1280_config_target(struct scsi_qla_host *ha, int bus, int target) +{ + struct nvram *nv = &ha->nvram; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + int status, lun; + + /* Set Target Parameters. */ + mb[0] = MBC_SET_TARGET_PARAMETERS; + mb[1] = (uint16_t) (bus ? target | BIT_7 : target); + mb[1] <<= 8; + + /* + * Do not enable wide, sync, and ppr for the initial + * INQUIRY run. We enable this later if we determine + * the target actually supports it. + */ + nv->bus[bus].target[target].parameter.f. + auto_request_sense = 1; + nv->bus[bus].target[target].parameter.f. + stop_queue_on_check = 0; + + if (IS_ISP1x160(ha)) + nv->bus[bus].target[target].ppr_1x160. + flags.enable_ppr = 0; + + /* + * No sync, wide, etc. while probing + */ + mb[2] = (nv->bus[bus].target[target].parameter.c << 8) & + ~(TP_SYNC /*| TP_WIDE | TP_PPR*/); + + if (IS_ISP1x160(ha)) + mb[3] = nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8; + else + mb[3] = nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8; + mb[3] |= nv->bus[bus].target[target].sync_period; + + status = qla1280_mailbox_command(ha, BIT_3 | BIT_2 | BIT_1 | BIT_0, &mb[0]); + + /* Save Tag queuing enable flag. */ + mb[0] = BIT_0 << target; + if (nv->bus[bus].target[target].parameter.f.tag_queuing) + ha->bus_settings[bus].qtag_enables |= mb[0]; + + /* Save Device enable flag. */ + if (IS_ISP1x160(ha)) { + if (nv->bus[bus].target[target].flags.flags1x160.device_enable) + ha->bus_settings[bus].device_enables |= mb[0]; + ha->bus_settings[bus].lun_disables |= 0; + } else { + if (nv->bus[bus].target[target].flags.flags1x80.device_enable) + ha->bus_settings[bus].device_enables |= mb[0]; + /* Save LUN disable flag. */ + if (nv->bus[bus].target[target].flags.flags1x80.lun_disable) + ha->bus_settings[bus].lun_disables |= mb[0]; + } + + /* Set Device Queue Parameters. */ + for (lun = 0; lun < MAX_LUNS; lun++) { + mb[0] = MBC_SET_DEVICE_QUEUE; + mb[1] = (uint16_t)(bus ? target | BIT_7 : target); + mb[1] = mb[1] << 8 | lun; + mb[2] = nv->bus[bus].max_queue_depth; + mb[3] = nv->bus[bus].target[target].execution_throttle; + status |= qla1280_mailbox_command(ha, 0x0f, &mb[0]); + } + + return status; +} + +static int +qla1280_config_bus(struct scsi_qla_host *ha, int bus) +{ + struct nvram *nv = &ha->nvram; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + int target, status; + + /* SCSI Reset Disable. */ + ha->bus_settings[bus].disable_scsi_reset = + nv->bus[bus].config_1.scsi_reset_disable; + + /* Initiator ID. */ + ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id; + mb[0] = MBC_SET_INITIATOR_ID; + mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 : + ha->bus_settings[bus].id; + status = qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); + + /* Reset Delay. */ + ha->bus_settings[bus].bus_reset_delay = + nv->bus[bus].bus_reset_delay; + + /* Command queue depth per device. */ + ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1; + + /* Set target parameters. */ + for (target = 0; target < MAX_TARGETS; target++) + status |= qla1280_config_target(ha, bus, target); + + return status; +} + +static int +qla1280_nvram_config(struct scsi_qla_host *ha) +{ + struct device_reg *reg = ha->iobase; + struct nvram *nv = &ha->nvram; + int bus, target, status = 0; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + uint16_t mask; + + ENTER("qla1280_nvram_config"); + + if (ha->nvram_valid) { + /* Always force AUTO sense for LINUX SCSI */ + for (bus = 0; bus < MAX_BUSES; bus++) + for (target = 0; target < MAX_TARGETS; target++) { + nv->bus[bus].target[target].parameter.f. + auto_request_sense = 1; + } + } else { + qla1280_set_defaults(ha); + } + + qla1280_print_settings(nv); /* Disable RISC load of firmware. */ ha->flags.disable_risc_code_load = nv->cntr_flags_1.disable_loading_risc_code; - /* Set ISP hardware DMA burst */ - mb[0] = nv->isp_config.c; - /* Enable DMA arbitration on dual channel controllers */ - if (ha->ports > 1) - mb[0] |= BIT_13; - WRT_REG_WORD(®->cfg_1, mb[0]); - -#if 1 /* Is this safe? */ - /* Set SCSI termination. */ - WRT_REG_WORD(®->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0)); - mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0); - WRT_REG_WORD(®->gpio_data, mb[0]); -#endif + if (IS_ISP1040(ha)) { + uint16_t hwrev, cfg1, cdma_conf, ddma_conf; + + hwrev = RD_REG_WORD(®->cfg_0) & ISP_CFG0_HWMSK; + + cfg1 = RD_REG_WORD(®->cfg_1); + cdma_conf = RD_REG_WORD(®->cdma_cfg); + ddma_conf = RD_REG_WORD(®->ddma_cfg); + + /* Busted fifo, says mjacob. */ + if (hwrev == ISP_CFG0_1040A) + WRT_REG_WORD(®->cfg_1, cfg1 | ISP_CFG1_F64); + else + WRT_REG_WORD(®->cfg_1, cfg1 | ISP_CFG1_F64 | ISP_CFG1_BENAB); + + WRT_REG_WORD(®->cdma_cfg, cdma_conf | CDMA_CONF_BENAB); + WRT_REG_WORD(®->ddma_cfg, cdma_conf | DDMA_CONF_BENAB); + } else { + /* Set ISP hardware DMA burst */ + mb[0] = nv->isp_config.c; + /* Enable DMA arbitration on dual channel controllers */ + if (ha->ports > 1) + mb[0] |= BIT_13; + WRT_REG_WORD(®->cfg_1, mb[0]); + + /* Set SCSI termination. */ + WRT_REG_WORD(®->gpio_enable, (BIT_3 + BIT_2 + BIT_1 + BIT_0)); + mb[0] = nv->termination.c & (BIT_3 + BIT_2 + BIT_1 + BIT_0); + WRT_REG_WORD(®->gpio_data, mb[0]); + } /* ISP parameter word. */ mb[0] = MBC_SET_SYSTEM_PARAMETER; mb[1] = nv->isp_parameter; status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); -#if 0 - /* clock rate - for qla1240 and older, only */ - mb[0] = MBC_SET_CLOCK_RATE; - mb[1] = 0x50; - status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); -#endif + if (IS_ISP1x40(ha)) { + /* clock rate - for qla1240 and older, only */ + mb[0] = MBC_SET_CLOCK_RATE; + mb[1] = 40; + status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); + } + /* Firmware feature word. */ mb[0] = MBC_SET_FIRMWARE_FEATURES; mask = BIT_5 | BIT_1 | BIT_0; @@ -2515,112 +2635,18 @@ mb[2] = 2; /* Command DMA Channel Burst Enable */ status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); + mb[0] = MBC_SET_TAG_AGE_LIMIT; + mb[1] = 8; + status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); + /* Selection timeout. */ mb[0] = MBC_SET_SELECTION_TIMEOUT; mb[1] = nv->bus[0].selection_timeout; mb[2] = nv->bus[1].selection_timeout; status |= qla1280_mailbox_command(ha, BIT_2 | BIT_1 | BIT_0, &mb[0]); - for (bus = 0; bus < ha->ports; bus++) { - /* SCSI Reset Disable. */ - ha->bus_settings[bus].disable_scsi_reset = - nv->bus[bus].config_1.scsi_reset_disable; - - /* Initiator ID. */ - ha->bus_settings[bus].id = nv->bus[bus].config_1.initiator_id; - mb[0] = MBC_SET_INITIATOR_ID; - mb[1] = bus ? ha->bus_settings[bus].id | BIT_7 : - ha->bus_settings[bus].id; - status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, &mb[0]); - - /* Reset Delay. */ - ha->bus_settings[bus].bus_reset_delay = - nv->bus[bus].bus_reset_delay; - - /* Command queue depth per device. */ - ha->bus_settings[bus].hiwat = nv->bus[bus].max_queue_depth - 1; - - /* Set target parameters. */ - for (target = 0; target < MAX_TARGETS; target++) { - uint8_t mr = BIT_2 | BIT_1 | BIT_0; - - /* Set Target Parameters. */ - mb[0] = MBC_SET_TARGET_PARAMETERS; - mb[1] = (uint16_t) (bus ? target | BIT_7 : target); - mb[1] <<= 8; - /* - * Do not enable wide, sync, and ppr for the initial - * INQUIRY run. We enable this later if we determine - * the target actually supports it. - */ - nv->bus[bus].target[target].parameter.f. - auto_request_sense = 1; - nv->bus[bus].target[target].parameter.f. - stop_queue_on_check = 0; - - if (is1x160) - nv->bus[bus].target[target].ppr_1x160. - flags.enable_ppr = 0; - /* - * No sync, wide, etc. while probing - */ - mb[2] = (nv->bus[bus].target[target].parameter.c << 8)& - ~(TP_SYNC /*| TP_WIDE | TP_PPR*/); - - if (is1x160) - mb[3] = nv->bus[bus].target[target].flags.flags1x160.sync_offset << 8; - else - mb[3] = nv->bus[bus].target[target].flags.flags1x80.sync_offset << 8; - mb[3] |= nv->bus[bus].target[target].sync_period; - mr |= BIT_3; - - /* - * We don't want to enable ppr etc. before we have - * determined that the target actually supports it - */ -#if 0 - if (is1x160) { - mb[2] |= nv->bus[bus].target[target].ppr_1x160.flags.enable_ppr << 5; - - mb[6] = nv->bus[bus].target[target].ppr_1x160.flags.ppr_options << 8; - mb[6] |= nv->bus[bus].target[target].ppr_1x160.flags.ppr_bus_width; - mr |= BIT_6; - } -#endif - - status = qla1280_mailbox_command(ha, mr, &mb[0]); - - /* Save Tag queuing enable flag. */ - mb[0] = BIT_0 << target; - if (nv->bus[bus].target[target].parameter.f.tag_queuing) - ha->bus_settings[bus].qtag_enables |= mb[0]; - - /* Save Device enable flag. */ - if (is1x160) { - if (nv->bus[bus].target[target].flags.flags1x160.device_enable) - ha->bus_settings[bus].device_enables |= mb[0]; - ha->bus_settings[bus].lun_disables |= 0; - } else { - if (nv->bus[bus].target[target].flags.flags1x80.device_enable) - ha->bus_settings[bus].device_enables |= mb[0]; - /* Save LUN disable flag. */ - if (nv->bus[bus].target[target].flags.flags1x80.lun_disable) - ha->bus_settings[bus].lun_disables |= mb[0]; - } - - - /* Set Device Queue Parameters. */ - for (lun = 0; lun < MAX_LUNS; lun++) { - mb[0] = MBC_SET_DEVICE_QUEUE; - mb[1] = (uint16_t)(bus ? target | BIT_7 : target); - mb[1] = mb[1] << 8 | lun; - mb[2] = nv->bus[bus].max_queue_depth; - mb[3] = nv->bus[bus].target[target].execution_throttle; - status |= qla1280_mailbox_command(ha, 0x0f, - &mb[0]); - } - } - } + for (bus = 0; bus < ha->ports; bus++) + status |= qla1280_config_bus(ha, bus); if (status) dprintk(2, "qla1280_nvram_config: **** FAILED ****\n"); @@ -4231,6 +4257,7 @@ static int qla1280_abort_isp(struct scsi_qla_host *ha) { + struct device_reg *reg = ha->iobase; struct srb *sp; int status = 0; int cnt; @@ -4238,69 +4265,53 @@ ENTER("qla1280_abort_isp"); - if (!ha->flags.abort_isp_active && ha->flags.online) { - struct device_reg *reg = ha->iobase; - ha->flags.abort_isp_active = 1; + if (ha->flags.abort_isp_active || !ha->flags.online) + goto out; + + ha->flags.abort_isp_active = 1; - /* Disable ISP interrupts. */ - qla1280_disable_intrs(ha); - WRT_REG_WORD(®->host_cmd, HC_PAUSE_RISC); - RD_REG_WORD(®->id_l); + /* Disable ISP interrupts. */ + qla1280_disable_intrs(ha); + WRT_REG_WORD(®->host_cmd, HC_PAUSE_RISC); + RD_REG_WORD(®->id_l); - printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n", - ha->host_no); - /* Dequeue all commands in outstanding command list. */ - for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { - struct scsi_cmnd *cmd; - sp = ha->outstanding_cmds[cnt]; - if (sp) { + printk(KERN_INFO "scsi(%li): dequeuing outstanding commands\n", + ha->host_no); + /* Dequeue all commands in outstanding command list. */ + for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { + struct scsi_cmnd *cmd; + sp = ha->outstanding_cmds[cnt]; + if (sp) { - cmd = sp->cmd; - CMD_RESULT(cmd) = DID_RESET << 16; + cmd = sp->cmd; + CMD_RESULT(cmd) = DID_RESET << 16; - sp->cmd = NULL; - ha->outstanding_cmds[cnt] = NULL; + sp->cmd = NULL; + ha->outstanding_cmds[cnt] = NULL; - (*cmd->scsi_done)(cmd); + (*cmd->scsi_done)(cmd); - sp->flags = 0; - } + sp->flags = 0; } + } - /* If firmware needs to be loaded */ - if (qla1280_isp_firmware (ha)) { - if (!(status = qla1280_chip_diag(ha))) - status = qla1280_setup_chip(ha); - } + status = qla1280_load_firmware(ha); + if (status) + goto out; - if (!status) { - /* Setup adapter based on NVRAM parameters. */ - qla1280_nvram_config (ha); - - if (!(status = qla1280_init_rings(ha))) { - /* Issue SCSI reset. */ - for (bus = 0; bus < ha->ports; bus++) { - qla1280_bus_reset(ha, bus); - } - /* - * qla1280_bus_reset() will do the marker - * dance - no reason to repeat here! - */ -#if 0 - /* Issue marker command. */ - ha->flags.reset_marker = 0; - for (bus = 0; bus < ha->ports; bus++) { - ha->bus_settings[bus]. - reset_marker = 0; - qla1280_marker(ha, bus, 0, 0, - MK_SYNC_ALL); - } -#endif - ha->flags.abort_isp_active = 0; - } - } - } + /* Setup adapter based on NVRAM parameters. */ + qla1280_nvram_config (ha); + status = qla1280_init_rings(ha); + if (status) + goto out; + + /* Issue SCSI reset. */ + for (bus = 0; bus < ha->ports; bus++) + qla1280_bus_reset(ha, bus); + + ha->flags.abort_isp_active = 0; + out: if (status) { printk(KERN_WARNING "qla1280: ISP error recovery failed, board disabled"); @@ -4936,6 +4947,7 @@ MODULE_AUTHOR("Qlogic & Jes Sorensen"); MODULE_DESCRIPTION("Qlogic ISP SCSI (qla1x80/qla1x160) driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA1280_VERSION); /* * Overrides for Emacs so that we almost follow Linus's tabbing style. diff -Nru a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h --- a/drivers/scsi/qla1280.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla1280.h 2004-09-06 16:37:55 -07:00 @@ -62,6 +62,7 @@ #define WRT_REG_WORD(addr, data) writew(data, addr) #else /* MEMORY_MAPPED_IO */ #define RD_REG_WORD(addr) inw((unsigned long)addr) +#define RD_REG_WORD_dmasync(addr) RD_REG_WORD(addr) #define WRT_REG_WORD(addr, data) outw(data, (unsigned long)addr) #endif /* MEMORY_MAPPED_IO */ @@ -126,7 +127,20 @@ uint16_t id_l; /* ID low */ uint16_t id_h; /* ID high */ uint16_t cfg_0; /* Configuration 0 */ +#define ISP_CFG0_HWMSK 0x000f /* Hardware revision mask */ +#define ISP_CFG0_1020 BIT_0 /* ISP1020 */ +#define ISP_CFG0_1020A BIT_1 /* ISP1020A */ +#define ISP_CFG0_1040 BIT_2 /* ISP1040 */ +#define ISP_CFG0_1040A BIT_3 /* ISP1040A */ +#define ISP_CFG0_1040B BIT_4 /* ISP1040B */ +#define ISP_CFG0_1040C BIT_5 /* ISP1040C */ uint16_t cfg_1; /* Configuration 1 */ +#define ISP_CFG1_F128 BIT_6 /* 128-byte FIFO threshold */ +#define ISP_CFG1_F64 BIT_4|BIT_5 /* 128-byte FIFO threshold */ +#define ISP_CFG1_F32 BIT_5 /* 128-byte FIFO threshold */ +#define ISP_CFG1_F16 BIT_4 /* 128-byte FIFO threshold */ +#define ISP_CFG1_BENAB BIT_2 /* Global Bus burst enable */ +#define ISP_CFG1_SXP BIT_0 /* SXP register select */ uint16_t ictrl; /* Interface control */ #define ISP_RESET BIT_0 /* ISP soft reset */ #define ISP_EN_INT BIT_1 /* ISP enable interrupts. */ @@ -147,7 +161,42 @@ uint16_t flash_data; /* Flash BIOS data */ uint16_t flash_address; /* Flash BIOS address */ - uint16_t unused_1[0x2e]; /* 0x14-0x6f Gap */ + uint16_t unused_1[0x06]; + + /* cdma_* and ddma_* are 1040 only */ + uint16_t cdma_cfg; +#define CDMA_CONF_SENAB BIT_3 /* SXP to DMA Data enable */ +#define CDMA_CONF_RIRQ BIT_2 /* RISC interrupt enable */ +#define CDMA_CONF_BENAB BIT_1 /* Bus burst enable */ +#define CDMA_CONF_DIR BIT_0 /* DMA direction (0=fifo->host 1=host->fifo) */ + uint16_t cdma_ctrl; + uint16_t cdma_status; + uint16_t cdma_fifo_status; + uint16_t cdma_count; + uint16_t cdma_reserved; + uint16_t cdma_address_count_0; + uint16_t cdma_address_count_1; + uint16_t cdma_address_count_2; + uint16_t cdma_address_count_3; + + uint16_t unused_2[0x06]; + + uint16_t ddma_cfg; +#define DDMA_CONF_SENAB BIT_3 /* SXP to DMA Data enable */ +#define DDMA_CONF_RIRQ BIT_2 /* RISC interrupt enable */ +#define DDMA_CONF_BENAB BIT_1 /* Bus burst enable */ +#define DDMA_CONF_DIR BIT_0 /* DMA direction (0=fifo->host 1=host->fifo) */ + uint16_t ddma_ctrl; + uint16_t ddma_status; + uint16_t ddma_fifo_status; + uint16_t ddma_xfer_count_low; + uint16_t ddma_xfer_count_high; + uint16_t ddma_addr_count_0; + uint16_t ddma_addr_count_1; + uint16_t ddma_addr_count_2; + uint16_t ddma_addr_count_3; + + uint16_t unused_3[0x0e]; uint16_t mailbox0; /* Mailbox 0 */ uint16_t mailbox1; /* Mailbox 1 */ @@ -158,18 +207,18 @@ uint16_t mailbox6; /* Mailbox 6 */ uint16_t mailbox7; /* Mailbox 7 */ - uint16_t unused_2[0x20];/* 0x80-0xbf Gap */ + uint16_t unused_4[0x20];/* 0x80-0xbf Gap */ uint16_t host_cmd; /* Host command and control */ #define HOST_INT BIT_7 /* host interrupt bit */ #define BIOS_ENABLE BIT_0 - uint16_t unused_6[0x5]; /* 0xc2-0xcb Gap */ + uint16_t unused_5[0x5]; /* 0xc2-0xcb Gap */ uint16_t gpio_data; uint16_t gpio_enable; - uint16_t unused_7[0x11]; /* d0-f0 */ + uint16_t unused_6[0x11]; /* d0-f0 */ uint16_t scsiControlPins; /* f2 */ }; diff -Nru a/drivers/scsi/qla2xxx/ql2100.c b/drivers/scsi/qla2xxx/ql2100.c --- a/drivers/scsi/qla2xxx/ql2100.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/qla2xxx/ql2100.c 2004-09-06 16:37:52 -07:00 @@ -89,3 +89,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP21xx FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/ql2200.c b/drivers/scsi/qla2xxx/ql2200.c --- a/drivers/scsi/qla2xxx/ql2200.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/qla2xxx/ql2200.c 2004-09-06 16:37:50 -07:00 @@ -89,3 +89,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP22xx FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/ql2300.c b/drivers/scsi/qla2xxx/ql2300.c --- a/drivers/scsi/qla2xxx/ql2300.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla2xxx/ql2300.c 2004-09-06 16:37:55 -07:00 @@ -100,3 +100,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP2300 FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/ql2322.c b/drivers/scsi/qla2xxx/ql2322.c --- a/drivers/scsi/qla2xxx/ql2322.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/qla2xxx/ql2322.c 2004-09-06 16:37:51 -07:00 @@ -105,3 +105,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP2322 FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/ql6312.c b/drivers/scsi/qla2xxx/ql6312.c --- a/drivers/scsi/qla2xxx/ql6312.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla2xxx/ql6312.c 2004-09-06 16:37:55 -07:00 @@ -87,3 +87,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP6312 FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/ql6322.c b/drivers/scsi/qla2xxx/ql6322.c --- a/drivers/scsi/qla2xxx/ql6322.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/qla2xxx/ql6322.c 2004-09-06 16:37:54 -07:00 @@ -105,3 +105,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic ISP6322 FC-SCSI Host Bus Adapter driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c --- a/drivers/scsi/qla2xxx/qla_init.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla2xxx/qla_init.c 2004-09-06 16:37:55 -07:00 @@ -783,7 +783,6 @@ static void qla2x00_update_fw_options(scsi_qla_host_t *ha) { - /* Setup seriallink options */ uint16_t swing, emphasis; memset(ha->fw_options, 0, sizeof(ha->fw_options)); @@ -807,7 +806,6 @@ emphasis = ha->fw_seriallink_options[0] & (BIT_4 | BIT_3); emphasis >>= 3; ha->fw_options[10] = (emphasis << 14) | (swing << 8) | 0x3; - /* 2G settings */ swing = ha->fw_seriallink_options[0] & (BIT_7 | BIT_6 | BIT_5); swing >>= 5; @@ -818,7 +816,7 @@ /* Return command IOCBs without waiting for an ABTS to complete. */ ha->fw_options[3] |= BIT_13; - /* Update Serial Link options. */ + /* Update firmware options. */ qla2x00_set_fw_options(ha, ha->fw_options); } @@ -869,15 +867,15 @@ spin_unlock_irqrestore(&ha->hardware_lock, flags); + /* Update any ISP specific firmware options before initialization. */ + qla2x00_update_fw_options(ha); + DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); rval = qla2x00_init_firmware(ha, sizeof(init_cb_t)); if (rval) { DEBUG2_3(printk("scsi(%ld): Init firmware **** FAILED ****.\n", ha->host_no)); } else { - /* Update any ISP specific firmware options. */ - qla2x00_update_fw_options(ha); - DEBUG3(printk("scsi(%ld): Init firmware -- success.\n", ha->host_no)); } diff -Nru a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c --- a/drivers/scsi/qla2xxx/qla_iocb.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/qla2xxx/qla_iocb.c 2004-09-06 16:37:53 -07:00 @@ -22,6 +22,8 @@ #include #include +#include + static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd); static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *); static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *); @@ -337,6 +339,7 @@ uint16_t req_cnt; uint16_t tot_dsds; device_reg_t *reg; + char tag[2]; /* Setup device pointers. */ ret = 0; @@ -415,14 +418,17 @@ cmd_pkt->lun = cpu_to_le16(fclun->lun); /* Update tagged queuing modifier */ - cmd_pkt->control_flags = __constant_cpu_to_le16(CF_SIMPLE_TAG); - if (cmd->device->tagged_supported) { - switch (cmd->tag) { - case HEAD_OF_QUEUE_TAG: + if (scsi_populate_tag_msg(cmd, tag)) { + switch (tag[0]) { + case MSG_SIMPLE_TAG: + cmd_pkt->control_flags = + __constant_cpu_to_le16(CF_SIMPLE_TAG); + break; + case MSG_HEAD_TAG: cmd_pkt->control_flags = __constant_cpu_to_le16(CF_HEAD_TAG); break; - case ORDERED_QUEUE_TAG: + case MSG_ORDERED_TAG: cmd_pkt->control_flags = __constant_cpu_to_le16(CF_ORDERED_TAG); break; diff -Nru a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c --- a/drivers/scsi/qla2xxx/qla_os.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/qla2xxx/qla_os.c 2004-09-06 16:37:55 -07:00 @@ -1663,7 +1663,7 @@ goto out; /* Waiting for our command in done_queue to be returned to OS.*/ - if (qla2x00_eh_wait_for_pending_commands(ha)) + if (!qla2x00_eh_wait_for_pending_commands(ha)) rval = FAILED; out: @@ -1784,7 +1784,7 @@ ql2xmaxqdepth = queue_depth; - scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); + scsi_activate_tcq(sdev, queue_depth); qla_printk(KERN_INFO, ha, "scsi(%d:%d:%d:%d): Enabled tagged queuing, queue " @@ -3590,7 +3590,7 @@ { srb_t *sp; - sp = mempool_alloc(ha->srb_mempool, GFP_KERNEL); + sp = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); if (sp) atomic_set(&sp->ref_count, 1); return (sp); @@ -4517,3 +4517,4 @@ MODULE_AUTHOR("QLogic Corporation"); MODULE_DESCRIPTION("QLogic Fibre Channel HBA Driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff -Nru a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h --- a/drivers/scsi/qla2xxx/qla_version.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/qla2xxx/qla_version.h 2004-09-06 16:37:52 -07:00 @@ -19,9 +19,9 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.00.00b14-k" +#define QLA2XXX_VERSION "8.00.00b15-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 0 #define QLA_DRIVER_PATCH_VER 0 -#define QLA_DRIVER_BETA_VER 14 +#define QLA_DRIVER_BETA_VER 15 diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c --- a/drivers/scsi/sata_nv.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/sata_nv.c 2004-09-06 16:37:51 -07:00 @@ -20,6 +20,10 @@ * If you do not delete the provisions above, a recipient may use your * version of this file under either the OSL or the GPL. * + * 0.03 + * - Fixed a bug where the hotplug handlers for non-CK804/MCP04 were using + * mmio_base, which is only set for the CK804/MCP04 case. + * * 0.02 * - Added support for CK804 SATA controller. * @@ -40,7 +44,7 @@ #include #define DRV_NAME "sata_nv" -#define DRV_VERSION "0.02" +#define DRV_VERSION "0.03" #define NV_PORTS 2 #define NV_PIO_MASK 0x1f @@ -422,33 +426,33 @@ u8 intr_mask; outb(NV_INT_STATUS_HOTPLUG, - (unsigned long)probe_ent->mmio_base + NV_INT_STATUS); + probe_ent->port[0].scr_addr + NV_INT_STATUS); - intr_mask = inb((unsigned long)probe_ent->mmio_base + NV_INT_ENABLE); + intr_mask = inb(probe_ent->port[0].scr_addr + NV_INT_ENABLE); intr_mask |= NV_INT_ENABLE_HOTPLUG; - outb(intr_mask, (unsigned long)probe_ent->mmio_base + NV_INT_ENABLE); + outb(intr_mask, probe_ent->port[0].scr_addr + NV_INT_ENABLE); } static void nv_disable_hotplug(struct ata_host_set *host_set) { u8 intr_mask; - intr_mask = inb((unsigned long)host_set->mmio_base + NV_INT_ENABLE); + intr_mask = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE); intr_mask &= ~(NV_INT_ENABLE_HOTPLUG); - outb(intr_mask, (unsigned long)host_set->mmio_base + NV_INT_ENABLE); + outb(intr_mask, host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE); } static void nv_check_hotplug(struct ata_host_set *host_set) { u8 intr_status; - intr_status = inb((unsigned long)host_set->mmio_base + NV_INT_STATUS); + intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); // Clear interrupt status. - outb(0xff, (unsigned long)host_set->mmio_base + NV_INT_STATUS); + outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); if (intr_status & NV_INT_STATUS_HOTPLUG) { if (intr_status & NV_INT_STATUS_PDEV_ADDED) diff -Nru a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c --- a/drivers/scsi/scsi.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/scsi.c 2004-09-06 16:37:53 -07:00 @@ -897,15 +897,16 @@ */ if (tags <= 0) return; - /* - * Limit max queue depth on a single lun to 256 for now. Remember, - * we allocate a struct scsi_command for each of these and keep it - * around forever. Too deep of a depth just wastes memory. - */ - if (tags > 256) - return; spin_lock_irqsave(&device_request_lock, flags); + spin_lock(sdev->request_queue->queue_lock); + + /* Check to see if the queue is managed by the block layer + * if it is, and we fail to adjust the depth, exit */ + if (blk_queue_tagged(sdev->request_queue) && + blk_queue_resize_tags(sdev->request_queue, tags) != 0) + goto out; + sdev->queue_depth = tags; switch (tagged) { case MSG_ORDERED_TAG: @@ -926,6 +927,8 @@ sdev->queue_depth = tags; break; } + out: + spin_unlock(sdev->request_queue->queue_lock); spin_unlock_irqrestore(&device_request_lock, flags); } diff -Nru a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c --- a/drivers/scsi/scsi_error.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/scsi_error.c 2004-09-06 16:37:50 -07:00 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -42,8 +42,8 @@ * These should *probably* be handled by the host itself. * Since it is allowed to sleep, it probably should. */ -#define BUS_RESET_SETTLE_TIME (10*HZ) -#define HOST_RESET_SETTLE_TIME (10*HZ) +#define BUS_RESET_SETTLE_TIME (10) +#define HOST_RESET_SETTLE_TIME (10) /* called with shost->host_lock held */ void scsi_eh_wakeup(struct Scsi_Host *shost) @@ -643,15 +643,13 @@ * Notes: * This has the unfortunate side effect that if a shost adapter does * not automatically request sense information, that we end up shutting - * it down before we request it. All shosts should be doing this - * anyways, so for now all I have to say is tough noogies if you end up - * in here. On second thought, this is probably a good idea. We - * *really* want to give authors an incentive to automatically request - * this. + * it down before we request it. * - * In 2.5 this capability will be going away. + * All drivers should request sense information internally these days, + * so for now all I have to say is tough noogies if you end up in here. * - * Really? --hch + * XXX: Long term this code should go away, but that needs an audit of + * all LLDDs first. **/ static int scsi_eh_get_sense(struct list_head *work_q, struct list_head *done_q) @@ -1044,7 +1042,7 @@ if (rtn == SUCCESS) { if (!scmd->device->host->hostt->skip_settle_delay) - scsi_sleep(BUS_RESET_SETTLE_TIME); + ssleep(BUS_RESET_SETTLE_TIME); spin_lock_irqsave(scmd->device->host->host_lock, flags); scsi_report_bus_reset(scmd->device->host, scmd->device->channel); spin_unlock_irqrestore(scmd->device->host->host_lock, flags); @@ -1076,7 +1074,7 @@ if (rtn == SUCCESS) { if (!scmd->device->host->hostt->skip_settle_delay) - scsi_sleep(HOST_RESET_SETTLE_TIME); + ssleep(HOST_RESET_SETTLE_TIME); spin_lock_irqsave(scmd->device->host->host_lock, flags); scsi_report_bus_reset(scmd->device->host, scmd->device->channel); spin_unlock_irqrestore(scmd->device->host->host_lock, flags); @@ -1216,43 +1214,6 @@ } /** - * scsi_sleep_done - timer function for scsi_sleep - * @sem: semphore to signal - * - **/ -static void scsi_sleep_done(unsigned long data) -{ - struct semaphore *sem = (struct semaphore *)data; - - if (sem) - up(sem); -} - -/** - * scsi_sleep - sleep for specified timeout - * @timeout: timeout value - * - **/ -void scsi_sleep(int timeout) -{ - DECLARE_MUTEX_LOCKED(sem); - struct timer_list timer; - - init_timer(&timer); - timer.data = (unsigned long)&sem; - timer.expires = jiffies + timeout; - timer.function = (void (*)(unsigned long))scsi_sleep_done; - - SCSI_LOG_ERROR_RECOVERY(5, printk("sleeping for timer tics %d\n", - timeout)); - - add_timer(&timer); - - down(&sem); - del_timer(&timer); -} - -/** * scsi_decide_disposition - Disposition a cmd on return from LLD. * @scmd: SCSI cmd to examine. * @@ -1639,8 +1600,6 @@ int rtn; DECLARE_MUTEX_LOCKED(sem); - lock_kernel(); - /* * Flush resources */ @@ -1651,8 +1610,6 @@ shost->eh_wait = &sem; shost->ehandler = current; - - unlock_kernel(); /* * Wake up the thread that created us. diff -Nru a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c --- a/drivers/scsi/scsi_ioctl.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/scsi_ioctl.c 2004-09-06 16:37:55 -07:00 @@ -391,6 +391,21 @@ if (!scsi_block_when_processing_errors(sdev)) return -ENODEV; + /* Check for deprecated ioctls ... all the ioctls which don't + * follow the new unique numbering scheme are deprecated */ + switch (cmd) { + case SCSI_IOCTL_SEND_COMMAND: + case SCSI_IOCTL_TEST_UNIT_READY: + case SCSI_IOCTL_BENCHMARK_COMMAND: + case SCSI_IOCTL_SYNC: + case SCSI_IOCTL_START_UNIT: + case SCSI_IOCTL_STOP_UNIT: + printk(KERN_WARNING "program %s is using a deprecated SCSI ioctl, please convert it to SG_IO\n", current->comm); + break; + default: + break; + } + switch (cmd) { case SCSI_IOCTL_GET_IDLUN: if (verify_area(VERIFY_WRITE, arg, sizeof(struct scsi_idlun))) @@ -417,12 +432,8 @@ case SCSI_IOCTL_DOORUNLOCK: return scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW); case SCSI_IOCTL_TEST_UNIT_READY: - scsi_cmd[0] = TEST_UNIT_READY; - scsi_cmd[1] = 0; - scsi_cmd[2] = scsi_cmd[3] = scsi_cmd[5] = 0; - scsi_cmd[4] = 0; - return ioctl_internal_command(sdev, scsi_cmd, - IOCTL_NORMAL_TIMEOUT, NORMAL_RETRIES); + return scsi_test_unit_ready(sdev, IOCTL_NORMAL_TIMEOUT, + NORMAL_RETRIES); case SCSI_IOCTL_START_UNIT: scsi_cmd[0] = START_STOP; scsi_cmd[1] = 0; diff -Nru a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c --- a/drivers/scsi/scsi_lib.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/scsi_lib.c 2004-09-06 16:37:52 -07:00 @@ -1572,6 +1572,34 @@ return ret; } +int +scsi_test_unit_ready(struct scsi_device *sdev, int timeout, int retries) +{ + struct scsi_request *sreq; + char cmd[] = { + TEST_UNIT_READY, 0, 0, 0, 0, 0, + }; + int result; + + sreq = scsi_allocate_request(sdev, GFP_KERNEL); + if (!sreq) + return -ENOMEM; + + sreq->sr_data_direction = DMA_NONE; + scsi_wait_req(sreq, cmd, NULL, 0, timeout, retries); + + if ((driver_byte(sreq->sr_result) & DRIVER_SENSE) && + (sreq->sr_sense_buffer[2] & 0x0f) == UNIT_ATTENTION && + sdev->removable) { + sdev->changed = 1; + sreq->sr_result = 0; + } + result = sreq->sr_result; + scsi_release_request(sreq); + return result; +} +EXPORT_SYMBOL(scsi_test_unit_ready); + /** * scsi_device_set_state - Take the given device through the device * state model. diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c --- a/drivers/scsi/scsi_scan.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/scsi_scan.c 2004-09-06 16:37:54 -07:00 @@ -200,7 +200,7 @@ * scsi_Device pointer, or NULL on failure. **/ static struct scsi_device *scsi_alloc_sdev(struct Scsi_Host *shost, - uint channel, uint id, uint lun) + uint channel, uint id, uint lun, void *hostdata) { struct scsi_device *sdev, *device; unsigned long flags; @@ -224,6 +224,8 @@ INIT_LIST_HEAD(&sdev->starved_entry); spin_lock_init(&sdev->list_lock); + /* usually NULL and set by ->slave_alloc instead */ + sdev->hostdata = hostdata; /* if the device needs this changing, it may do so in the * slave_configure function */ @@ -697,7 +699,7 @@ **/ static int scsi_probe_and_add_lun(struct Scsi_Host *host, uint channel, uint id, uint lun, int *bflagsp, - struct scsi_device **sdevp, int rescan) + struct scsi_device **sdevp, int rescan, void *hostdata) { struct scsi_device *sdev; struct scsi_request *sreq; @@ -726,7 +728,7 @@ } } - sdev = scsi_alloc_sdev(host, channel, id, lun); + sdev = scsi_alloc_sdev(host, channel, id, lun, hostdata); if (!sdev) goto out; sreq = scsi_allocate_request(sdev, GFP_ATOMIC); @@ -874,7 +876,7 @@ */ for (lun = 1; lun < max_dev_lun; ++lun) if ((scsi_probe_and_add_lun(shost, channel, id, lun, - NULL, NULL, rescan) != SCSI_SCAN_LUN_PRESENT) && + NULL, NULL, rescan, NULL) != SCSI_SCAN_LUN_PRESENT) && !sparse_lun) return; } @@ -1085,7 +1087,7 @@ int res; res = scsi_probe_and_add_lun(sdev->host, sdev->channel, - sdev->id, lun, NULL, NULL, rescan); + sdev->id, lun, NULL, NULL, rescan, NULL); if (res == SCSI_SCAN_NO_RESPONSE) { /* * Got some results, but now none, abort. @@ -1111,14 +1113,15 @@ return 0; } -struct scsi_device *scsi_add_device(struct Scsi_Host *shost, - uint channel, uint id, uint lun) +struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, + uint id, uint lun, void *hostdata) { struct scsi_device *sdev; int res; down(&shost->scan_mutex); - res = scsi_probe_and_add_lun(shost, channel, id, lun, NULL, &sdev, 1); + res = scsi_probe_and_add_lun(shost, channel, id, lun, NULL, + &sdev, 1, hostdata); if (res != SCSI_SCAN_LUN_PRESENT) sdev = ERR_PTR(-ENODEV); up(&shost->scan_mutex); @@ -1178,7 +1181,7 @@ * Scan for a specific host/chan/id/lun. */ scsi_probe_and_add_lun(shost, channel, id, lun, NULL, NULL, - rescan); + rescan, NULL); return; } @@ -1187,7 +1190,7 @@ * would not configure LUN 0 until all LUNs are scanned. */ res = scsi_probe_and_add_lun(shost, channel, id, 0, &bflags, &sdev, - rescan); + rescan, NULL); if (res == SCSI_SCAN_LUN_PRESENT) { if (scsi_report_lun_scan(sdev, bflags, rescan) != 0) /* @@ -1316,7 +1319,7 @@ { struct scsi_device *sdev; - sdev = scsi_alloc_sdev(shost, 0, shost->this_id, 0); + sdev = scsi_alloc_sdev(shost, 0, shost->this_id, 0, NULL); if (sdev) { sdev->borken = 0; } diff -Nru a/drivers/scsi/scsi_syms.c b/drivers/scsi/scsi_syms.c --- a/drivers/scsi/scsi_syms.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/scsi_syms.c 2004-09-06 16:37:52 -07:00 @@ -69,11 +69,9 @@ EXPORT_SYMBOL(scsi_get_host_dev); EXPORT_SYMBOL(scsi_free_host_dev); -EXPORT_SYMBOL(scsi_sleep); - EXPORT_SYMBOL(scsi_io_completion); -EXPORT_SYMBOL(scsi_add_device); +EXPORT_SYMBOL(__scsi_add_device); EXPORT_SYMBOL(scsi_remove_device); EXPORT_SYMBOL(scsi_device_cancel); diff -Nru a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c --- a/drivers/scsi/scsi_sysfs.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/scsi/scsi_sysfs.c 2004-09-06 16:37:51 -07:00 @@ -525,8 +525,11 @@ **/ void scsi_remove_device(struct scsi_device *sdev) { + struct Scsi_Host *shost = sdev->host; + + down(&shost->scan_mutex); if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) - return; + goto out; class_device_unregister(&sdev->sdev_classdev); if (sdev->transport_classdev.class) @@ -538,6 +541,9 @@ if (sdev->host->transportt->cleanup) sdev->host->transportt->cleanup(sdev); put_device(&sdev->sdev_gendev); + +out: + up(&shost->scan_mutex); } int scsi_register_driver(struct device_driver *drv) diff -Nru a/drivers/scsi/scsiiom.c b/drivers/scsi/scsiiom.c --- a/drivers/scsi/scsiiom.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/scsiiom.c 2004-09-06 16:37:50 -07:00 @@ -213,8 +213,17 @@ } #endif + +static void __inline__ +dc390_InvalidCmd(struct dc390_acb* pACB) +{ + if (pACB->pActiveDCB->pActiveSRB->SRBState & (SRB_START_ | SRB_MSGOUT)) + DC390_write8(ScsiCmd, CLEAR_FIFO_CMD); +} + + static irqreturn_t __inline__ -DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs) +DC390_Interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct dc390_acb *pACB, *pACB2; struct dc390_dcb *pDCB; @@ -594,7 +603,7 @@ } /* abort command */ -static void __inline__ +static void dc390_EnableMsgOut_Abort ( struct dc390_acb* pACB, struct dc390_srb* pSRB ) { pSRB->MsgOutBuf[0] = ABORT; @@ -890,14 +899,22 @@ if (pSRB == pACB->pTmpSRB) { - if (pDCB) printk (KERN_ERR "DC390: pSRB == pTmpSRB! (TagQ Error?) (%02i-%i)\n", - pDCB->TargetID, pDCB->TargetLUN); - else printk (KERN_ERR "DC390: pSRB == pTmpSRB! (TagQ Error?) (DCB 0!)\n"); - - pSRB->pSRBDCB = pDCB; - dc390_EnableMsgOut_Abort (pACB, pSRB); - if (pDCB) pDCB->DCBFlag |= ABORT_DEV; - return; + if (pDCB) + printk(KERN_ERR "DC390: pSRB == pTmpSRB! (TagQ Error?) (%02i-%i)\n", pDCB->TargetID, pDCB->TargetLUN); + else + printk(KERN_ERR "DC390: pSRB == pTmpSRB! (TagQ Error?) (DCB 0!)\n"); + + /* Try to recover - some broken disks react badly to tagged INQUIRY */ + if (pDCB && pACB->scan_devices && pDCB->GoingSRBCnt == 1) { + pSRB = pDCB->pGoingSRB; + pDCB->pActiveSRB = pSRB; + } else { + pSRB->pSRBDCB = pDCB; + dc390_EnableMsgOut_Abort(pACB, pSRB); + if (pDCB) + pDCB->DCBFlag |= ABORT_DEV; + return; + } } if( pSRB->SGIndex < pSRB->SGcount ) @@ -1325,6 +1342,35 @@ } +static void __inline__ +dc390_RequestSense(struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB) +{ + struct scsi_cmnd *pcmd; + + pcmd = pSRB->pcmd; + + REMOVABLEDEBUG(printk(KERN_INFO "DC390: RequestSense(Cmd %02x, Id %02x, LUN %02x)\n",\ + pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN)); + + pSRB->SRBFlag |= AUTO_REQSENSE; + pSRB->SavedSGCount = pcmd->use_sg; + pSRB->SavedTotXLen = pSRB->TotalXferredLen; + pSRB->AdaptStatus = 0; + pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */ + + /* We are called from SRBdone, original PCI mapping has been removed + * already, new one is set up from StartSCSI */ + pSRB->SGIndex = 0; + + pSRB->TotalXferredLen = 0; + pSRB->SGToBeXferLen = 0; + if (dc390_StartSCSI(pACB, pDCB, pSRB)) { + dc390_Going_to_Waiting(pDCB, pSRB); + dc390_waiting_timer(pACB, HZ/5); + } +} + + static void dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB ) { @@ -1352,26 +1398,7 @@ pSRB->SRBFlag &= ~AUTO_REQSENSE; pSRB->AdaptStatus = 0; pSRB->TargetStatus = CHECK_CONDITION << 1; -#ifdef DC390_REMOVABLEDEBUG - switch (pcmd->sense_buffer[2] & 0x0f) - { - case NOT_READY: printk (KERN_INFO "DC390: ReqSense: NOT_READY (Cmnd = 0x%02x, Dev = %i-%i, Stat = %i, Scan = %i)\n", - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, - status, pACB->scan_devices); break; - case UNIT_ATTENTION: printk (KERN_INFO "DC390: ReqSense: UNIT_ATTENTION (Cmnd = 0x%02x, Dev = %i-%i, Stat = %i, Scan = %i)\n", - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, - status, pACB->scan_devices); break; - case ILLEGAL_REQUEST: printk (KERN_INFO "DC390: ReqSense: ILLEGAL_REQUEST (Cmnd = 0x%02x, Dev = %i-%i, Stat = %i, Scan = %i)\n", - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, - status, pACB->scan_devices); break; - case MEDIUM_ERROR: printk (KERN_INFO "DC390: ReqSense: MEDIUM_ERROR (Cmnd = 0x%02x, Dev = %i-%i, Stat = %i, Scan = %i)\n", - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, - status, pACB->scan_devices); break; - case HARDWARE_ERROR: printk (KERN_INFO "DC390: ReqSense: HARDWARE_ERROR (Cmnd = 0x%02x, Dev = %i-%i, Stat = %i, Scan = %i)\n", - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN, - status, pACB->scan_devices); break; - } -#endif + //pcmd->result = MK_RES(DRIVER_SENSE,DID_OK,0,status); if (status == (CHECK_CONDITION << 1)) { @@ -1525,23 +1552,6 @@ pDCB->Inquiry7 = ptr->Flags; ckc_e: - if( pACB->scan_devices ) - { - if( pcmd->cmnd[0] == TEST_UNIT_READY || - pcmd->cmnd[0] == INQUIRY) - { -#ifdef DC390_DEBUG0 - printk (KERN_INFO "DC390: %s: result: %08x", - (pcmd->cmnd[0] == INQUIRY? "INQUIRY": "TEST_UNIT_READY"), - pcmd->result); - if (pcmd->result & (DRIVER_SENSE << 24)) printk (" (sense: %02x %02x %02x %02x)\n", - pcmd->sense_buffer[0], pcmd->sense_buffer[1], - pcmd->sense_buffer[2], pcmd->sense_buffer[3]); - else printk ("\n"); -#endif - } - } - if( pcmd->cmnd[0] == INQUIRY && (pcmd->result == (DID_OK << 16) || status_byte(pcmd->result) & CHECK_CONDITION) ) { @@ -1586,18 +1596,6 @@ psrb2 = psrb->pNextSRB; pcmd = psrb->pcmd; dc390_Free_insert (pACB, psrb); -#ifndef USE_NEW_EH - /* New EH will crash on being given timed out cmnds */ - if (pcmd == cmd) - pcmd->result = MK_RES(0,DID_ABORT,0,0); - else - pcmd->result = MK_RES(0,DID_RESET,0,0); - -/* ReleaseSRB( pDCB, pSRB ); */ - - DEBUG0(printk (KERN_DEBUG "DC390: DoingSRB_Done: done pid %li\n", pcmd->pid)); - pcmd->scsi_done( pcmd ); -#endif psrb = psrb2; } pdcb->GoingSRBCnt = 0; @@ -1653,52 +1651,4 @@ dc390_Waiting_process( pACB ); } return; -} - - -static void __inline__ -dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB ) -{ - struct scsi_cmnd *pcmd; - - pcmd = pSRB->pcmd; - - REMOVABLEDEBUG(printk (KERN_INFO "DC390: RequestSense (Cmd %02x, Id %02x, LUN %02x)\n",\ - pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN)); - - pSRB->SRBFlag |= AUTO_REQSENSE; - //pSRB->Segment0[0] = (u32) pSRB->CmdBlock[0]; - //pSRB->Segment0[1] = (u32) pSRB->CmdBlock[4]; - //pSRB->Segment1[0] = ((u32)(pcmd->cmd_len) << 8) + pSRB->SGcount; - //pSRB->Segment1[1] = pSRB->TotalXferredLen; - pSRB->SavedSGCount = pcmd->use_sg; - pSRB->SavedTotXLen = pSRB->TotalXferredLen; - pSRB->AdaptStatus = 0; - pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */ - - /* We are called from SRBdone, original PCI mapping has been removed - * already, new one is set up from StartSCSI */ - pSRB->SGIndex = 0; - - //pSRB->CmdBlock[0] = REQUEST_SENSE; - //pSRB->CmdBlock[1] = pDCB->TargetLUN << 5; - //(u16) pSRB->CmdBlock[2] = 0; - //(u16) pSRB->CmdBlock[4] = sizeof(pcmd->sense_buffer); - //pSRB->ScsiCmdLen = 6; - - pSRB->TotalXferredLen = 0; - pSRB->SGToBeXferLen = 0; - if( dc390_StartSCSI( pACB, pDCB, pSRB ) ) { - dc390_Going_to_Waiting ( pDCB, pSRB ); - dc390_waiting_timer (pACB, HZ/5); - } -} - - - -static void __inline__ -dc390_InvalidCmd( struct dc390_acb* pACB ) -{ - if( pACB->pActiveDCB->pActiveSRB->SRBState & (SRB_START_+SRB_MSGOUT) ) - DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); } diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c --- a/drivers/scsi/sd.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/sd.c 2004-09-06 16:37:54 -07:00 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -62,12 +63,18 @@ #include "scsi_logging.h" - /* - * Remaining dev_t-handling stuff + * More than enough for everybody ;) The huge number of majors + * is a leftover from 16bit dev_t days, we don't really need that + * much numberspace. */ #define SD_MAJORS 16 -#define SD_DISKS 32768 /* anything between 256 and 262144 */ + +/* + * This is limited by the naming scheme enforced in sd_probe, + * add another character to it if you really need more disks. + */ +#define SD_MAX_DISKS (((26 * 26) + 26 + 1) * 26) /* * Time out in seconds for disks and Magneto-opticals (which are slower). @@ -96,8 +103,7 @@ unsigned RCD : 1; /* state of disk RCD bit, unused */ }; - -static unsigned long sd_index_bits[SD_DISKS / BITS_PER_LONG]; +static DEFINE_IDR(sd_index_idr); static spinlock_t sd_index_lock = SPIN_LOCK_UNLOCKED; /* This semaphore is used to mediate the 0->1 reference get in the @@ -130,7 +136,8 @@ .issue_flush = sd_issue_flush, }; -/* Device no to disk mapping: +/* + * Device no to disk mapping: * * major disc2 disc p1 * |............|.............|....|....| <- dev_t @@ -143,7 +150,6 @@ * As we stay compatible with our numbering scheme, we can reuse * the well-know SCSI majors 8, 65--71, 136--143. */ - static int sd_major(int major_idx) { switch (major_idx) { @@ -159,14 +165,6 @@ } } -static unsigned int make_sd_dev(unsigned int sd_nr, unsigned int part) -{ - return (part & 0xf) | ((sd_nr & 0xf) << 4) | - (sd_major((sd_nr & 0xf0) >> 4) << 20) | (sd_nr & 0xfff00); -} - -/* reverse mapping dev -> (sd_nr, part) not currently needed */ - #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,kref) static inline struct scsi_disk *scsi_disk(struct gendisk *disk) @@ -182,16 +180,14 @@ if (disk->private_data == NULL) goto out; sdkp = scsi_disk(disk); - if (!kref_get(&sdkp->kref)) - goto out_sdkp; + kref_get(&sdkp->kref); if (scsi_device_get(sdkp->device)) goto out_put; up(&sd_ref_sem); return sdkp; out_put: - kref_put(&sdkp->kref); - out_sdkp: + kref_put(&sdkp->kref, scsi_disk_release); sdkp = NULL; out: up(&sd_ref_sem); @@ -202,7 +198,7 @@ { down(&sd_ref_sem); scsi_device_put(sdkp->device); - kref_put(&sdkp->kref); + kref_put(&sdkp->kref, scsi_disk_release); up(&sd_ref_sem); } @@ -650,7 +646,7 @@ */ retval = -ENODEV; if (scsi_block_when_processing_errors(sdp)) - retval = scsi_ioctl(sdp, SCSI_IOCTL_TEST_UNIT_READY, NULL); + retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES); /* * Unable to test, unit probably not ready. This usually @@ -1405,7 +1401,7 @@ struct scsi_disk *sdkp; struct gendisk *gd; u32 index; - int error, devno; + int error; error = -ENODEV; if ((sdp->type != TYPE_DISK) && (sdp->type != TYPE_MOD)) @@ -1420,27 +1416,23 @@ goto out; memset (sdkp, 0, sizeof(*sdkp)); - kref_init(&sdkp->kref, scsi_disk_release); + kref_init(&sdkp->kref); - /* Note: We can accomodate 64 partitions, but the genhd code - * assumes partitions allocate consecutive minors, which they don't. - * So for now stay with max 16 partitions and leave two spare bits. - * Later, we may change the genhd code and the alloc_disk() call - * and the ->minors assignment here. KG, 2004-02-10 - */ gd = alloc_disk(16); if (!gd) goto out_free; + if (!idr_pre_get(&sd_index_idr, GFP_KERNEL)) + goto out_put; + spin_lock(&sd_index_lock); - index = find_first_zero_bit(sd_index_bits, SD_DISKS); - if (index == SD_DISKS) { - spin_unlock(&sd_index_lock); + error = idr_get_new(&sd_index_idr, NULL, &index); + spin_unlock(&sd_index_lock); + + if (index >= SD_MAX_DISKS) error = -EBUSY; + if (error) goto out_put; - } - __set_bit(index, sd_index_bits); - spin_unlock(&sd_index_lock); sdkp->device = sdp; sdkp->driver = &sd_template; @@ -1455,15 +1447,14 @@ sdp->timeout = SD_MOD_TIMEOUT; } - devno = make_sd_dev(index, 0); - gd->major = MAJOR(devno); - gd->first_minor = MINOR(devno); + gd->major = sd_major((index & 0xf0) >> 4); + gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); gd->minors = 16; gd->fops = &sd_fops; if (index < 26) { sprintf(gd->disk_name, "sd%c", 'a' + index % 26); - } else if (index < (26*27)) { + } else if (index < (26 + 1) * 26) { sprintf(gd->disk_name, "sd%c%c", 'a' + index / 26 - 1,'a' + index % 26); } else { @@ -1522,7 +1513,7 @@ del_gendisk(sdkp->disk); sd_shutdown(dev); down(&sd_ref_sem); - kref_put(&sdkp->kref); + kref_put(&sdkp->kref, scsi_disk_release); up(&sd_ref_sem); return 0; @@ -1543,7 +1534,7 @@ struct gendisk *disk = sdkp->disk; spin_lock(&sd_index_lock); - clear_bit(sdkp->index, sd_index_bits); + idr_remove(&sd_index_idr, sdkp->index); spin_unlock(&sd_index_lock); disk->private_data = NULL; diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c --- a/drivers/scsi/sg.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/sg.c 2004-09-06 16:37:52 -07:00 @@ -47,8 +47,9 @@ #include #include #include - #include +#include + #include "scsi.h" #include #include @@ -205,8 +206,6 @@ static Sg_request *sg_add_request(Sg_fd * sfp); static int sg_remove_request(Sg_fd * sfp, Sg_request * srp); static int sg_res_in_use(Sg_fd * sfp); -static int sg_ms_to_jif(unsigned int msecs); -static inline unsigned sg_jif_to_ms(int jifs); static int sg_allow_access(unsigned char opcode, char dev_type); static int sg_build_direct(Sg_request * srp, Sg_fd * sfp, int dxfer_len); static Sg_device *sg_get_dev(int dev); @@ -611,7 +610,7 @@ return -EBUSY; /* reserve buffer already being used */ } } - timeout = sg_ms_to_jif(srp->header.timeout); + timeout = msecs_to_jiffies(srp->header.timeout); if ((!hp->cmdp) || (hp->cmd_len < 6) || (hp->cmd_len > sizeof (cmnd))) { sg_remove_request(sfp, srp); return -EMSGSIZE; @@ -719,19 +718,6 @@ return 0; } -static inline unsigned -sg_jif_to_ms(int jifs) -{ - if (jifs <= 0) - return 0U; - else { - unsigned int j = (unsigned int) jifs; - return (j < - (UINT_MAX / 1000)) ? ((j * 1000) / HZ) : ((j / HZ) * - 1000); - } -} - static int sg_ioctl(struct inode *inode, struct file *filp, unsigned int cmd_in, unsigned long arg) @@ -941,7 +927,7 @@ srp->header.driver_status; rinfo[val].duration = srp->done ? srp->header.duration : - sg_jif_to_ms( + jiffies_to_msecs( jiffies - srp->header.duration); rinfo[val].orphan = srp->orphan; rinfo[val].sg_io_owned = srp->sg_io_owned; @@ -1263,7 +1249,7 @@ srp->header.resid = SCpnt->resid; /* N.B. unit of duration changes here from jiffies to millisecs */ srp->header.duration = - sg_jif_to_ms(jiffies - (int) srp->header.duration); + jiffies_to_msecs(jiffies - srp->header.duration); if (0 != SRpnt->sr_result) { memcpy(srp->sense_b, SRpnt->sr_sense_buffer, sizeof (srp->sense_b)); @@ -1547,7 +1533,7 @@ } if (delay) - scsi_sleep(2); /* dirty detach so delay device destruction */ + msleep(10); /* dirty detach so delay device destruction */ } /* Set 'perm' (4th argument) to 0 to disable module_param's definition @@ -2587,17 +2573,6 @@ free_pages((unsigned long) buff, order); } -static int -sg_ms_to_jif(unsigned int msecs) -{ - if ((UINT_MAX / 2U) < msecs) - return INT_MAX; /* special case, set largest possible */ - else - return ((int) msecs < - (INT_MAX / 1000)) ? (((int) msecs * HZ) / 1000) - : (((int) msecs / 1000) * HZ); -} - static unsigned char allow_ops[] = { TEST_UNIT_READY, REQUEST_SENSE, INQUIRY, READ_CAPACITY, READ_BUFFER, READ_6, READ_10, READ_12, MODE_SENSE, MODE_SENSE_10, LOG_SENSE @@ -2960,7 +2935,7 @@ for (k = 0; (fp = sg_get_nth_sfp(sdp, k)); ++k) { seq_printf(s, " FD(%d): timeout=%dms bufflen=%d " "(res)sgat=%d low_dma=%d\n", k + 1, - sg_jif_to_ms(fp->timeout), + jiffies_to_msecs(fp->timeout), fp->reserve.bufflen, (int) fp->reserve.k_use_sg, (int) fp->low_dma); @@ -2996,8 +2971,8 @@ seq_printf(s, " dur=%d", hp->duration); else seq_printf(s, " t_o/elap=%d/%d", - new_interface ? hp->timeout : sg_jif_to_ms(fp->timeout), - sg_jif_to_ms(hp->duration ? (jiffies - hp->duration) : 0)); + new_interface ? hp->timeout : jiffies_to_msecs(fp->timeout), + jiffies_to_msecs(hp->duration ? (jiffies - hp->duration) : 0)); seq_printf(s, "ms sgat=%d op=0x%02x\n", usg, (int) srp->data.cmd_opcode); } diff -Nru a/drivers/scsi/sr.c b/drivers/scsi/sr.c --- a/drivers/scsi/sr.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/sr.c 2004-09-06 16:37:55 -07:00 @@ -140,15 +140,13 @@ if (disk->private_data == NULL) goto out; cd = scsi_cd(disk); - if (!kref_get(&cd->kref)) - goto out_null; + kref_get(&cd->kref); if (scsi_device_get(cd->device)) goto out_put; goto out; out_put: - kref_put(&cd->kref); - out_null: + kref_put(&cd->kref, sr_kref_release); cd = NULL; out: up(&sr_ref_sem); @@ -159,7 +157,7 @@ { down(&sr_ref_sem); scsi_device_put(cd->device); - kref_put(&cd->kref); + kref_put(&cd->kref, sr_kref_release); up(&sr_ref_sem); } @@ -183,7 +181,7 @@ return -EINVAL; } - retval = scsi_ioctl(cd->device, SCSI_IOCTL_TEST_UNIT_READY, NULL); + retval = scsi_test_unit_ready(cd->device, SR_TIMEOUT, MAX_RETRIES); if (retval) { /* Unable to test, unit probably not ready. This usually * means there is no disc in the drive. Mark as changed, @@ -576,7 +574,7 @@ goto fail; memset(cd, 0, sizeof(*cd)); - kref_init(&cd->kref, sr_kref_release); + kref_init(&cd->kref); disk = alloc_disk(1); if (!disk) @@ -937,7 +935,7 @@ del_gendisk(cd->disk); down(&sr_ref_sem); - kref_put(&cd->kref); + kref_put(&cd->kref, sr_kref_release); up(&sr_ref_sem); return 0; diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c --- a/drivers/scsi/sr_ioctl.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/sr_ioctl.c 2004-09-06 16:37:53 -07:00 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -131,7 +132,7 @@ printk(KERN_INFO "%s: CDROM not ready yet.\n", cd->cdi.name); if (retries++ < 10) { /* sleep 2 sec and try again */ - scsi_sleep(2 * HZ); + ssleep(2); goto retry; } else { /* 20 secs are enough? */ diff -Nru a/drivers/scsi/sym53c8xx_2/sym_defs.h b/drivers/scsi/sym53c8xx_2/sym_defs.h --- a/drivers/scsi/sym53c8xx_2/sym_defs.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_defs.h 2004-09-06 16:37:52 -07:00 @@ -53,6 +53,9 @@ #ifndef SYM_DEFS_H #define SYM_DEFS_H +#define SYM_VERSION "2.1.18j" +#define SYM_DRIVER_NAME "sym-" SYM_VERSION + /* * Vendor. */ diff -Nru a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c --- a/drivers/scsi/sym53c8xx_2/sym_glue.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c 2004-09-06 16:37:55 -07:00 @@ -143,13 +143,6 @@ } /* - * Driver host data structure. - */ -struct host_data { - struct sym_hcb *ncb; -}; - -/* * Used by the eh thread to wait for command completion. * It is allocated on the eh thread stack. */ @@ -220,47 +213,12 @@ return use_sg; } -static void __sync_scsi_data_for_cpu(struct pci_dev *pdev, struct scsi_cmnd *cmd) -{ - int dma_dir = cmd->sc_data_direction; - - switch(SYM_UCMD_PTR(cmd)->data_mapped) { - case 2: - pci_dma_sync_sg_for_cpu(pdev, cmd->buffer, cmd->use_sg, dma_dir); - break; - case 1: - pci_dma_sync_single_for_cpu(pdev, SYM_UCMD_PTR(cmd)->data_mapping, - cmd->request_bufflen, dma_dir); - break; - } -} - -static void __sync_scsi_data_for_device(struct pci_dev *pdev, struct scsi_cmnd *cmd) -{ - int dma_dir = cmd->sc_data_direction; - - switch(SYM_UCMD_PTR(cmd)->data_mapped) { - case 2: - pci_dma_sync_sg_for_device(pdev, cmd->buffer, cmd->use_sg, dma_dir); - break; - case 1: - pci_dma_sync_single_for_device(pdev, SYM_UCMD_PTR(cmd)->data_mapping, - cmd->request_bufflen, dma_dir); - break; - } -} - #define unmap_scsi_data(np, cmd) \ __unmap_scsi_data(np->s.device, cmd) #define map_scsi_single_data(np, cmd) \ __map_scsi_single_data(np->s.device, cmd) #define map_scsi_sg_data(np, cmd) \ __map_scsi_sg_data(np->s.device, cmd) -#define sync_scsi_data_for_cpu(np, cmd) \ - __sync_scsi_data_for_cpu(np->s.device, cmd) -#define sync_scsi_data_for_device(np, cmd) \ - __sync_scsi_data_for_device(np->s.device, cmd) - /* * Complete a pending CAM CCB. */ @@ -417,27 +375,6 @@ /* - * Called on successfull INQUIRY response. - */ -void sym_sniff_inquiry(struct sym_hcb *np, struct scsi_cmnd *cmd, int resid) -{ - int retv; - - if (!cmd || cmd->use_sg) - return; - - sync_scsi_data_for_cpu(np, cmd); - retv = __sym_sniff_inquiry(np, cmd->device->id, cmd->device->lun, - (u_char *) cmd->request_buffer, - cmd->request_bufflen - resid); - sync_scsi_data_for_device(np, cmd); - if (retv < 0) - return; - else if (retv) - sym_update_trans_settings(np, &np->target[cmd->device->id]); -} - -/* * Build the scatter/gather array for an I/O. */ @@ -730,14 +667,15 @@ */ static void sym_requeue_awaiting_cmds(struct sym_hcb *np) { - struct scsi_cmnd *cmd; - struct sym_ucmd *ucp = SYM_UCMD_PTR(cmd); + struct sym_ucmd *ucp; SYM_QUEHEAD tmp_cmdq; int sts; sym_que_move(&np->s.wait_cmdq, &tmp_cmdq); while ((ucp = (struct sym_ucmd *) sym_remque_head(&tmp_cmdq)) != 0) { + struct scsi_cmnd *cmd; + sym_insque_tail(&ucp->link_cmdq, &np->s.busy_cmdq); cmd = SYM_SCMD_PTR(ucp); sts = sym_queue_command(np, cmd); @@ -1118,12 +1056,7 @@ np = ((struct host_data *) host->hostdata)->ncb; tp = &np->target[device->id]; - - /* - * Get user settings for transfer parameters. - */ - tp->inq_byte7_valid = (INQ7_SYNC|INQ7_WIDE16); - sym_update_trans_settings(np, tp); + tp->sdev = device; /* * Allocate the LCB if not yet. @@ -2283,6 +2216,7 @@ } MODULE_LICENSE("Dual BSD/GPL"); +MODULE_VERSION(SYM_VERSION); /* * Driver host template. @@ -2383,13 +2317,6 @@ struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb; struct sym_tcb *tp = &np->target[sdev->id]; - if (tp->tinfo.curr.options & PPR_OPT_DT) { - if (offset > np->maxoffs_dt) - offset = np->maxoffs_dt; - } else { - if (offset > np->maxoffs) - offset = np->maxoffs; - } tp->tinfo.goal.offset = offset; } @@ -2407,23 +2334,11 @@ struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb; struct sym_tcb *tp = &np->target[sdev->id]; - if (period <= 9 && np->minsync_dt) { - if (period < np->minsync_dt) - period = np->minsync_dt; - tp->tinfo.goal.options = PPR_OPT_DT; - tp->tinfo.goal.period = period; - if (!tp->tinfo.curr.offset || - tp->tinfo.curr.offset > np->maxoffs_dt) - tp->tinfo.goal.offset = np->maxoffs_dt; - } else { - if (period < np->minsync) - period = np->minsync; - tp->tinfo.goal.options = 0; - tp->tinfo.goal.period = period; - if (!tp->tinfo.curr.offset || - tp->tinfo.curr.offset > np->maxoffs) - tp->tinfo.goal.offset = np->maxoffs; - } + /* have to have DT for these transfers */ + if (period <= np->minsync) + tp->tinfo.goal.options |= PPR_OPT_DT; + + tp->tinfo.goal.period = period; } static void sym2_get_width(struct scsi_device *sdev) @@ -2439,6 +2354,10 @@ struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb; struct sym_tcb *tp = &np->target[sdev->id]; + /* It is illegal to have DT set on narrow transfers */ + if (width == 0) + tp->tinfo.goal.options &= ~PPR_OPT_DT; + tp->tinfo.goal.width = width; } @@ -2455,17 +2374,10 @@ struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb; struct sym_tcb *tp = &np->target[sdev->id]; - if (!dt) { - /* if clearing DT, then we may need to reduce the - * period and the offset */ - if (tp->tinfo.curr.period < np->minsync) - tp->tinfo.goal.period = np->minsync; - if (tp->tinfo.curr.offset > np->maxoffs) - tp->tinfo.goal.offset = np->maxoffs; - tp->tinfo.goal.options &= ~PPR_OPT_DT; - } else { + if (dt) tp->tinfo.goal.options |= PPR_OPT_DT; - } + else + tp->tinfo.goal.options &= ~PPR_OPT_DT; } diff -Nru a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h --- a/drivers/scsi/sym53c8xx_2/sym_glue.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h 2004-09-06 16:37:55 -07:00 @@ -90,7 +90,6 @@ #define SYM_OPT_HANDLE_DIR_UNKNOWN #define SYM_OPT_HANDLE_DEVICE_QUEUEING #define SYM_OPT_NVRAM_PRE_READ -#define SYM_OPT_SNIFF_INQUIRY #define SYM_OPT_LIMIT_COMMAND_REORDERING #define SYM_OPT_ANNOUNCE_TRANSFER_RATE @@ -437,6 +436,13 @@ struct sym_nvram *nvram; u_short device_id; u_char host_id; +}; + +/* + * Driver host data structure. + */ +struct host_data { + struct sym_hcb *ncb; }; /* diff -Nru a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c 2004-09-06 16:37:50 -07:00 @@ -49,10 +49,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -#define SYM_VERSION "2.1.18j" -#define SYM_DRIVER_NAME "sym-" SYM_VERSION - #include "sym_glue.h" #include "sym_nvram.h" @@ -1042,28 +1038,11 @@ for (i = 0 ; i < SYM_CONF_MAX_TARGET ; i++) { tcb_p tp = &np->target[i]; - tp->tinfo.user.scsi_version = tp->tinfo.curr.scsi_version= 2; - tp->tinfo.user.spi_version = tp->tinfo.curr.spi_version = 2; - tp->tinfo.user.period = np->minsync; - tp->tinfo.user.offset = np->maxoffs; - tp->tinfo.user.width = np->maxwide ? BUS_16_BIT : BUS_8_BIT; tp->usrflags |= (SYM_DISC_ENABLED | SYM_TAGS_ENABLED); tp->usrtags = SYM_SETUP_MAX_TAG; sym_nvram_setup_target (np, i, nvram); - /* - * Some single-ended devices may crash on receiving a - * PPR negotiation attempt. Only try PPR if we're in - * LVD mode. - */ - if (np->features & FE_ULTRA3) { - tp->tinfo.user.options |= PPR_OPT_DT; - tp->tinfo.user.period = np->minsync_dt; - tp->tinfo.user.offset = np->maxoffs_dt; - tp->tinfo.user.spi_version = 3; - } - if (!tp->usrtags) tp->usrflags &= ~SYM_TAGS_ENABLED; } @@ -1497,6 +1476,55 @@ } #endif +static void sym_check_goals(struct scsi_device *sdev) +{ + struct sym_hcb *np = ((struct host_data *)sdev->host->hostdata)->ncb; + struct sym_trans *st = &np->target[sdev->id].tinfo.goal; + + /* here we enforce all the fiddly SPI rules */ + + if (!scsi_device_wide(sdev)) + st->width = 0; + + if (!scsi_device_sync(sdev)) { + st->options = 0; + st->period = 0; + st->offset = 0; + return; + } + + if (scsi_device_dt(sdev)) { + if (scsi_device_dt_only(sdev)) + st->options |= PPR_OPT_DT; + + if (st->offset == 0) + st->options &= ~PPR_OPT_DT; + } else { + st->options &= ~PPR_OPT_DT; + } + + if (!(np->features & FE_ULTRA3)) + st->options &= ~PPR_OPT_DT; + + if (st->options & PPR_OPT_DT) { + /* all DT transfers must be wide */ + st->width = 1; + if (st->offset > np->maxoffs_dt) + st->offset = np->maxoffs_dt; + if (st->period < np->minsync_dt) + st->period = np->minsync_dt; + if (st->period > np->maxsync_dt) + st->period = np->maxsync_dt; + } else { + if (st->offset > np->maxoffs) + st->offset = np->maxoffs; + if (st->period < np->minsync) + st->period = np->minsync; + if (st->period > np->maxsync) + st->period = np->maxsync; + } +} + /* * Prepare the next negotiation message if needed. * @@ -1508,6 +1536,10 @@ { tcb_p tp = &np->target[cp->target]; int msglen = 0; + struct scsi_device *sdev = tp->sdev; + + if (likely(sdev)) + sym_check_goals(sdev); /* * Early C1010 chips need a work-around for DT @@ -1518,19 +1550,21 @@ /* * negotiate using PPR ? */ - if (tp->tinfo.goal.options & PPR_OPT_MASK) + if (scsi_device_dt(sdev)) { nego = NS_PPR; - /* - * negotiate wide transfers ? - */ - else if (tp->tinfo.curr.width != tp->tinfo.goal.width) - nego = NS_WIDE; - /* - * negotiate synchronous transfers? - */ - else if (tp->tinfo.curr.period != tp->tinfo.goal.period || - tp->tinfo.curr.offset != tp->tinfo.goal.offset) - nego = NS_SYNC; + } else { + /* + * negotiate wide transfers ? + */ + if (tp->tinfo.curr.width != tp->tinfo.goal.width) + nego = NS_WIDE; + /* + * negotiate synchronous transfers? + */ + else if (tp->tinfo.curr.period != tp->tinfo.goal.period || + tp->tinfo.curr.offset != tp->tinfo.goal.offset) + nego = NS_SYNC; + } switch (nego) { case NS_SYNC: @@ -3999,7 +4033,6 @@ static int sym_sync_nego_check(hcb_p np, int req, int target) { - tcb_p tp = &np->target[target]; u_char chg, ofs, per, fak, div; if (DEBUG_FLAGS & DEBUG_NEGO) { @@ -4019,19 +4052,11 @@ if (ofs) { if (ofs > np->maxoffs) {chg = 1; ofs = np->maxoffs;} - if (req) { - if (ofs > tp->tinfo.user.offset) - {chg = 1; ofs = tp->tinfo.user.offset;} - } } if (ofs) { if (per < np->minsync) {chg = 1; per = np->minsync;} - if (req) { - if (per < tp->tinfo.user.period) - {chg = 1; per = tp->tinfo.user.period;} - } } /* @@ -4151,10 +4176,6 @@ } if (!wide || !(np->features & FE_ULTRA3)) dt &= ~PPR_OPT_DT; - if (req) { - if (wide > tp->tinfo.user.width) - {chg = 1; wide = tp->tinfo.user.width;} - } if (!(np->features & FE_U3EN)) /* Broken U3EN bit not supported */ dt &= ~PPR_OPT_DT; @@ -4168,10 +4189,6 @@ } else if (ofs > np->maxoffs) {chg = 1; ofs = np->maxoffs;} - if (req) { - if (ofs > tp->tinfo.user.offset) - {chg = 1; ofs = tp->tinfo.user.offset;} - } } if (ofs) { @@ -4181,10 +4198,6 @@ } else if (per < np->minsync) {chg = 1; per = np->minsync;} - if (req) { - if (per < tp->tinfo.user.period) - {chg = 1; per = tp->tinfo.user.period;} - } } /* @@ -4286,7 +4299,6 @@ static int sym_wide_nego_check(hcb_p np, int req, int target) { - tcb_p tp = &np->target[target]; u_char chg, wide; if (DEBUG_FLAGS & DEBUG_NEGO) { @@ -4305,10 +4317,6 @@ if (wide > np->maxwide) { chg = 1; wide = np->maxwide; - } - if (req) { - if (wide > tp->tinfo.user.width) - {chg = 1; wide = tp->tinfo.user.width;} } if (DEBUG_FLAGS & DEBUG_NEGO) { diff -Nru a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h --- a/drivers/scsi/sym53c8xx_2/sym_hipd.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h 2004-09-06 16:37:52 -07:00 @@ -69,11 +69,6 @@ * When this option is set, the driver will use a queue per * device and handle QUEUE FULL status requeuing internally. * - * SYM_OPT_SNIFF_INQUIRY - * When this option is set, the driver sniff out successful - * INQUIRY response and performs negotiations accordingly. - * (set for Linux) - * * SYM_OPT_LIMIT_COMMAND_REORDERING * When this option is set, the driver tries to limit tagged * command reordering to some reasonnable value. @@ -82,7 +77,6 @@ #if 0 #define SYM_OPT_HANDLE_DIR_UNKNOWN #define SYM_OPT_HANDLE_DEVICE_QUEUEING -#define SYM_OPT_SNIFF_INQUIRY #define SYM_OPT_LIMIT_COMMAND_REORDERING #endif @@ -364,7 +358,6 @@ struct sym_tinfo { struct sym_trans curr; struct sym_trans goal; - struct sym_trans user; #ifdef SYM_OPT_ANNOUNCE_TRANSFER_RATE struct sym_trans prev; #endif @@ -465,18 +458,7 @@ */ u_char usrflags; u_short usrtags; - -#ifdef SYM_OPT_SNIFF_INQUIRY - /* - * Some minimal information from INQUIRY response. - */ - u32 cmdq_map[(SYM_CONF_MAX_LUN+31)/32]; - u_char inq_version; - u_char inq_byte7; - u_char inq_byte56; - u_char inq_byte7_valid; -#endif - + struct scsi_device *sdev; }; /* @@ -1167,26 +1149,6 @@ #ifdef SYM_OPT_ANNOUNCE_TRANSFER_RATE void sym_announce_transfer_rate(hcb_p np, int target); #endif - -/* - * Optionnaly, the driver may sniff inquiry data. - */ -#ifdef SYM_OPT_SNIFF_INQUIRY -#define INQ7_CMDQ (0x02) -#define INQ7_SYNC (0x10) -#define INQ7_WIDE16 (0x20) - -#define INQ56_CLOCKING (3<<2) -#define INQ56_ST_ONLY (0<<2) -#define INQ56_DT_ONLY (1<<2) -#define INQ56_ST_DT (3<<2) - -void sym_update_trans_settings(hcb_p np, tcb_p tp); -int -__sym_sniff_inquiry(hcb_p np, u_char tn, u_char ln, - u_char *inq_data, int inq_len); -#endif - /* * Build a scatter/gather entry. diff -Nru a/drivers/scsi/sym53c8xx_2/sym_misc.c b/drivers/scsi/sym53c8xx_2/sym_misc.c --- a/drivers/scsi/sym53c8xx_2/sym_misc.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_misc.c 2004-09-06 16:37:54 -07:00 @@ -216,121 +216,3 @@ #undef __tprev #undef __tcurr #endif /* SYM_OPT_ANNOUNCE_TRANSFER_RATE */ - - -#ifdef SYM_OPT_SNIFF_INQUIRY -/* - * Update transfer settings according to user settings - * and bits sniffed out from INQUIRY response. - */ -void sym_update_trans_settings(hcb_p np, tcb_p tp) -{ - memcpy(&tp->tinfo.goal, &tp->tinfo.user, sizeof(tp->tinfo.goal)); - - if (tp->inq_version >= 4) { - switch(tp->inq_byte56 & INQ56_CLOCKING) { - case INQ56_ST_ONLY: - tp->tinfo.goal.options = 0; - break; - case INQ56_DT_ONLY: - case INQ56_ST_DT: - default: - break; - } - } - - if (!((tp->inq_byte7 & tp->inq_byte7_valid) & INQ7_WIDE16)) { - tp->tinfo.goal.width = 0; - tp->tinfo.goal.options = 0; - } - - if (!((tp->inq_byte7 & tp->inq_byte7_valid) & INQ7_SYNC)) { - tp->tinfo.goal.offset = 0; - tp->tinfo.goal.options = 0; - } - - if (tp->tinfo.goal.options & PPR_OPT_DT) { - if (tp->tinfo.goal.offset > np->maxoffs_dt) - tp->tinfo.goal.offset = np->maxoffs_dt; - } - else { - if (tp->tinfo.goal.offset > np->maxoffs) - tp->tinfo.goal.offset = np->maxoffs; - } -} - -/* - * Snoop target capabilities from INQUIRY response. - * We only believe device versions >= SCSI-2 that use - * appropriate response data format (2). But it seems - * that some CCS devices also support SYNC (?). - */ -int -__sym_sniff_inquiry(hcb_p np, u_char tn, u_char ln, - u_char *inq_data, int inq_len) -{ - tcb_p tp = &np->target[tn]; - u_char inq_version; - u_char inq_byte7; - u_char inq_byte56; - - if (!inq_data || inq_len < 2) - return -1; - - /* - * Check device type and qualifier. - */ - if ((inq_data[0] & 0xe0) == 0x60) - return -1; - - /* - * Get SPC version. - */ - if (inq_len <= 2) - return -1; - inq_version = inq_data[2] & 0x7; - - /* - * Get SYNC/WIDE16 capabilities. - */ - inq_byte7 = tp->inq_byte7; - if (inq_version >= 2 && (inq_data[3] & 0xf) == 2) { - if (inq_len > 7) - inq_byte7 = inq_data[7]; - } - else if (inq_version == 1 && (inq_data[3] & 0xf) == 1) - inq_byte7 = INQ7_SYNC; - - /* - * Get Tagged Command Queuing capability. - */ - if (inq_byte7 & INQ7_CMDQ) - sym_set_bit(tp->cmdq_map, ln); - else - sym_clr_bit(tp->cmdq_map, ln); - inq_byte7 &= ~INQ7_CMDQ; - - /* - * Get CLOCKING capability. - */ - inq_byte56 = tp->inq_byte56; - if (inq_version >= 4 && inq_len > 56) - inq_byte56 = inq_data[56]; -#if 0 -printf("XXXXXX [%d] inq_version=%x inq_byte7=%x inq_byte56=%x XXXXX\n", - inq_len, inq_version, inq_byte7, inq_byte56); -#endif - /* - * Trigger a negotiation if needed. - */ - if (tp->inq_version != inq_version || - tp->inq_byte7 != inq_byte7 || - tp->inq_byte56 != inq_byte56) { - tp->inq_version = inq_version; - tp->inq_byte7 = inq_byte7; - tp->inq_byte56 = inq_byte56; - return 1; - } - return 0; -} -#endif /* SYM_OPT_SNIFF_INQUIRY */ diff -Nru a/drivers/scsi/sym53c8xx_2/sym_nvram.c b/drivers/scsi/sym53c8xx_2/sym_nvram.c --- a/drivers/scsi/sym53c8xx_2/sym_nvram.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c 2004-09-06 16:37:53 -07:00 @@ -53,11 +53,6 @@ #include "sym_glue.h" #include "sym_nvram.h" -/* - * Some poor and bogus sync table that refers to Tekram NVRAM layout. - */ -static u_char Tekram_sync[16] = - {25,31,37,43, 50,62,75,125, 12,15,18,21, 6,7,9,10}; #ifdef SYM_CONF_DEBUG_NVRAM static u_char Tekram_boot_delay[7] = {3, 5, 10, 20, 30, 60, 120}; #endif @@ -100,8 +95,6 @@ struct sym_tcb *tp = &np->target[target]; Symbios_target *tn = &nvram->target[target]; - tp->tinfo.user.period = tn->sync_period ? (tn->sync_period + 3) / 4 : 0; - tp->tinfo.user.width = tn->bus_width == 0x10 ? BUS_16_BIT : BUS_8_BIT; tp->usrtags = (tn->flags & SYMBIOS_QUEUE_TAGS_ENABLED)? SYM_SETUP_MAX_TAG : 0; @@ -121,15 +114,6 @@ { struct sym_tcb *tp = &np->target[target]; struct Tekram_target *tn = &nvram->target[target]; - int i; - - if (tn->flags & TEKRAM_SYNC_NEGO) { - i = tn->sync_index & 0xf; - tp->tinfo.user.period = Tekram_sync[i]; - } - - tp->tinfo.user.width = (tn->flags & TEKRAM_WIDE_NEGO) ? - BUS_16_BIT : BUS_8_BIT; if (tn->flags & TEKRAM_TAGGED_COMMANDS) { tp->usrtags = 2 << nvram->max_tags_index; diff -Nru a/drivers/scsi/t128.c b/drivers/scsi/t128.c --- a/drivers/scsi/t128.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/t128.c 2004-09-06 16:37:54 -07:00 @@ -284,6 +284,7 @@ { if (shost->irq) free_irq(shost->irq, NULL); + NCR5380_exit(shost); if (shost->io_port && shost->n_io_port) release_region(shost->io_port, shost->n_io_port); scsi_unregister(shost); diff -Nru a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c --- a/drivers/scsi/tmscsim.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/tmscsim.c 2004-09-06 16:37:55 -07:00 @@ -240,17 +240,15 @@ #include #include -#if 0 #include #include #include -#else -#include "scsi.h" -#endif #include #include -#include "dc390.h" + +#define DC390_BANNER "Tekram DC390/AM53C974" +#define DC390_VERSION "2.1d 2004-05-27" #define PCI_DEVICE_ID_AMD53C974 PCI_DEVICE_ID_AMD_SCSI @@ -291,20 +289,14 @@ static void dc390_DoingSRB_Done( struct dc390_acb* pACB, struct scsi_cmnd * cmd); static void dc390_ScsiRstDetect( struct dc390_acb* pACB ); static void dc390_ResetSCSIBus( struct dc390_acb* pACB ); -static void __inline__ dc390_RequestSense( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB ); -static void __inline__ dc390_InvalidCmd( struct dc390_acb* pACB ); -static void __inline__ dc390_EnableMsgOut_Abort (struct dc390_acb*, struct dc390_srb*); +static void dc390_EnableMsgOut_Abort(struct dc390_acb*, struct dc390_srb*); static irqreturn_t do_DC390_Interrupt( int, void *, struct pt_regs *); static int dc390_initAdapter(struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index ); static void dc390_updateDCB (struct dc390_acb* pACB, struct dc390_dcb* pDCB); -static int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start, - off_t offset, int length, int inout); - static struct dc390_acb* dc390_pACB_start= NULL; static struct dc390_acb* dc390_pACB_current = NULL; -static unsigned long dc390_lastabortedpid = 0; static u32 dc390_laststatus = 0; static u8 dc390_adapterCnt = 0; @@ -617,11 +609,7 @@ { pDCB = pDCB->pNextDCB; if (pDCB == pACB->pLinkDCB) - { - DCBDEBUG(printk (KERN_WARNING "DC390: DCB not found (DCB=%p, DCBmap[%2x]=%2x)\n", - pDCB, id, pACB->DCBmap[id])); return 0; - } } DCBDEBUG1( printk (KERN_DEBUG "DCB %p (%02x,%02x) found.\n", \ pDCB, pDCB->TargetID, pDCB->TargetLUN)); @@ -942,8 +930,6 @@ { pSRB->pSRBDCB = pDCB; pSRB->pcmd = pcmd; - //pSRB->ScsiCmdLen = pcmd->cmd_len; - //memcpy (pSRB->CmdBlock, pcmd->cmnd, pcmd->cmd_len); pSRB->SGIndex = 0; pSRB->AdaptStatus = 0; @@ -991,28 +977,6 @@ struct dc390_srb* pSRB; struct dc390_acb* pACB = (struct dc390_acb*) cmd->device->host->hostdata; - DEBUG0(/* if(pACB->scan_devices) */ \ - printk(KERN_INFO "DC390: Queue Cmd=%02x,Tgt=%d,LUN=%d (pid=%li), buffer=%p\n",\ - cmd->cmnd[0],cmd->device->id,cmd->device->lun,cmd->pid, cmd->buffer)); - - /* TODO: Change the policy: Always accept TEST_UNIT_READY or INQUIRY - * commands and alloc a DCB for the device if not yet there. DCB will - * be removed in dc390_SRBdone if SEL_TIMEOUT */ - if (!(pACB->scan_devices) && !(pACB->DCBmap[cmd->device->id] & (1 << cmd->device->lun))) { - printk(KERN_INFO "DC390: Ignore target %02x lun %02x\n", - cmd->device->id, cmd->device->lun); - goto fail; - } - - /* Should it be: BUG_ON(!pDCB); ? */ - - if (!pDCB) - { /* should never happen */ - printk (KERN_ERR "DC390: no DCB found, target %02x lun %02x\n", - cmd->device->id, cmd->device->lun); - goto fail; - } - pACB->Cmds++; cmd->scsi_done = done; cmd->result = 0; @@ -1033,145 +997,7 @@ requeue: return 1; - fail: - cmd->result = DID_BAD_TARGET << 16; - done(cmd); - return 0; -} - -/* We ignore mapping problems, as we expect everybody to respect - * valid partition tables. Waiting for complaints ;-) */ - -#ifdef CONFIG_SCSI_DC390T_TRADMAP -/* - * The next function, partsize(), is copied from scsicam.c. - * - * This is ugly code duplication, but I didn't find another way to solve it: - * We want to respect the partition table and if it fails, we apply the - * DC390 BIOS heuristic. Too bad, just calling scsicam_bios_param() doesn't do - * the job, because we don't know, whether the values returned are from - * the part. table or determined by setsize(). Unfortunately the setsize() - * values differ from the ones chosen by the DC390 BIOS. - * - * Looking forward to seeing suggestions for a better solution! KG, 98/10/14 - */ -#include - -/* - * Function : static int partsize(unsigned char *buf, unsigned long - * capacity,unsigned int *cyls, unsigned int *hds, unsigned int *secs); - * - * Purpose : to determine the BIOS mapping used to create the partition - * table, storing the results in *cyls, *hds, and *secs - * - * Returns : -1 on failure, 0 on success. - * - */ - -static int partsize(unsigned char *buf, unsigned long capacity, - unsigned int *cyls, unsigned int *hds, unsigned int *secs) { - struct partition *p, *largest = NULL; - int i, largest_cyl; - int cyl, ext_cyl, end_head, end_cyl, end_sector; - unsigned int logical_end, physical_end, ext_physical_end; - - - if (*(unsigned short *) (buf+64) == 0xAA55) { - for (largest_cyl = -1, p = (struct partition *) buf, - i = 0; i < 4; ++i, ++p) { - if (!p->sys_ind) - continue; - cyl = p->cyl + ((p->sector & 0xc0) << 2); - if (cyl > largest_cyl) { - largest_cyl = cyl; - largest = p; - } - } - } - - if (largest) { - end_cyl = largest->end_cyl + ((largest->end_sector & 0xc0) << 2); - end_head = largest->end_head; - end_sector = largest->end_sector & 0x3f; - - physical_end = end_cyl * (end_head + 1) * end_sector + - end_head * end_sector + end_sector; - - /* This is the actual _sector_ number at the end */ - logical_end = get_unaligned(&largest->start_sect) - + get_unaligned(&largest->nr_sects); - - /* This is for >1023 cylinders */ - ext_cyl= (logical_end-(end_head * end_sector + end_sector)) - /(end_head + 1) / end_sector; - ext_physical_end = ext_cyl * (end_head + 1) * end_sector + - end_head * end_sector + end_sector; - - if ((logical_end == physical_end) || - (end_cyl==1023 && ext_physical_end==logical_end)) { - *secs = end_sector; - *hds = end_head + 1; - *cyls = capacity / ((end_head + 1) * end_sector); - return 0; - } - } - return -1; -} - -/*********************************************************************** - * Function: - * DC390_bios_param - * - * Description: - * Return the disk geometry for the given SCSI device. - * Respect the partition table, otherwise try own heuristic - * - * Note: - * In contrary to other externally callable funcs (DC390_), we don't lock - ***********************************************************************/ -static int DC390_bios_param (struct scsi_device *sdev, struct block_device *bdev, - sector_t capacity, int geom[]) -{ - int heads, sectors, cylinders; - struct dc390_acb* pACB = (struct dc390_acb*) sdev->host->hostdata; - int ret_code = -1; - int size = capacity; - unsigned char *buf; - - if ((buf = scsi_bios_ptable(bdev))) - { - /* try to infer mapping from partition table */ - ret_code = partsize (buf, (unsigned long) size, (unsigned int *) geom + 2, - (unsigned int *) geom + 0, (unsigned int *) geom + 1); - kfree (buf); - } - if (ret_code == -1) - { - heads = 64; - sectors = 32; - cylinders = size / (heads * sectors); - - if ( (pACB->Gmode2 & GREATER_1G) && (cylinders > 1024) ) - { - heads = 255; - sectors = 63; - cylinders = size / (heads * sectors); - } - - geom[0] = heads; - geom[1] = sectors; - geom[2] = cylinders; - } - - return (0); } -#else -static int DC390_bios_param (struct scsi_device *sdev, struct block_device *bdev, - sector_t capacity, int geom[]) -{ - return scsicam_bios_param (bdev, capacity, geom); -} -#endif static void dc390_dumpinfo (struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb* pSRB) { @@ -1219,146 +1045,54 @@ } -/*********************************************************************** - * Function : int DC390_abort (struct scsi_cmnd *cmd) - * - * Purpose : Abort an errant SCSI command - * - * Inputs : cmd - command to abort - * - * Returns : 0 on success, -1 on failure. - * - * Status: Buggy ! - ***********************************************************************/ - -static int DC390_abort (struct scsi_cmnd *cmd) +static int DC390_abort(struct scsi_cmnd *cmd) { - struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; - struct dc390_srb *pSRB, *psrb; - u32 count, i; - int status; - //unsigned long sbac; - struct dc390_acb *pACB = (struct dc390_acb*) cmd->device->host->hostdata; - - printk ("DC390: Abort command (pid %li, Device %02i-%02i)\n", - cmd->pid, cmd->device->id, cmd->device->lun); - - if( !pDCB ) goto NOT_RUN; - - /* Added 98/07/02 KG */ - /* - pSRB = pDCB->pActiveSRB; - if (pSRB && pSRB->pcmd == cmd ) - goto ON_GOING; - */ - - pSRB = pDCB->pWaitingSRB; - if( !pSRB ) - goto ON_GOING; + struct dc390_acb *pACB = (struct dc390_acb*) cmd->device->host->hostdata; + struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; + struct dc390_srb *pSRB, *psrb; - /* Now scan Waiting queue */ - if( pSRB->pcmd == cmd ) - { - pDCB->pWaitingSRB = pSRB->pNextSRB; - goto IN_WAIT; - } - else - { - psrb = pSRB; - if( !(psrb->pNextSRB) ) - goto ON_GOING; - while( psrb->pNextSRB->pcmd != cmd ) - { - psrb = psrb->pNextSRB; - if( !(psrb->pNextSRB) || psrb == pSRB) - goto ON_GOING; - } - pSRB = psrb->pNextSRB; - psrb->pNextSRB = pSRB->pNextSRB; - if( pSRB == pDCB->pWaitLast ) - pDCB->pWaitLast = psrb; -IN_WAIT: - dc390_Free_insert (pACB, pSRB); + printk("DC390: Abort command (pid %li, Device %02i-%02i)\n", + cmd->pid, cmd->device->id, cmd->device->lun); + + pSRB = pDCB->pWaitingSRB; + if (!pSRB) + goto on_going; + + /* Now scan Waiting queue */ + if (pSRB->pcmd != cmd) { + psrb = pSRB; + if (!(psrb->pNextSRB)) + goto on_going; + + while (psrb->pNextSRB->pcmd != cmd) { + psrb = psrb->pNextSRB; + if (!(psrb->pNextSRB) || psrb == pSRB) + goto on_going; + } + + pSRB = psrb->pNextSRB; + psrb->pNextSRB = pSRB->pNextSRB; + if (pSRB == pDCB->pWaitLast) + pDCB->pWaitLast = psrb; + } else + pDCB->pWaitingSRB = pSRB->pNextSRB; + + dc390_Free_insert(pACB, pSRB); pDCB->WaitSRBCnt--; INIT_LIST_HEAD((struct list_head*)&cmd->SCp); - status = SCSI_ABORT_SUCCESS; - goto ABO_X; - } - /* SRB has already been sent ! */ -ON_GOING: - /* abort() is too stupid for already sent commands at the moment. - * If it's called we are in trouble anyway, so let's dump some info - * into the syslog at least. (KG, 98/08/20,99/06/20) */ - dc390_dumpinfo (pACB, pDCB, pSRB); - pSRB = pDCB->pGoingSRB; - pDCB->DCBFlag |= ABORT_DEV_; - /* Now for the hard part: The command is currently processed */ - for( count = pDCB->GoingSRBCnt, i=0; ipcmd != cmd ) - pSRB = pSRB->pNextSRB; - else - { - if( (pACB->pActiveDCB == pDCB) && (pDCB->pActiveSRB == pSRB) ) - { - status = SCSI_ABORT_BUSY; - printk ("DC390: Abort current command (pid %li, SRB %p)\n", - cmd->pid, pSRB); - goto ABO_X; - } - else - { - status = SCSI_ABORT_SNOOZE; - goto ABO_X; - } - } - } + return SUCCESS; -NOT_RUN: - status = SCSI_ABORT_NOT_RUNNING; +on_going: + /* abort() is too stupid for already sent commands at the moment. + * If it's called we are in trouble anyway, so let's dump some info + * into the syslog at least. (KG, 98/08/20,99/06/20) */ + dc390_dumpinfo(pACB, pDCB, pSRB); -ABO_X: - cmd->result = DID_ABORT << 16; - printk(KERN_INFO "DC390: Aborted pid %li with status %i\n", cmd->pid, status); -#if 0 - if (cmd->pid == dc390_lastabortedpid) /* repeated failure ? */ - { - /* Let's do something to help the bus getting clean again */ - DC390_write8 (DMA_Cmd, DMA_IDLE_CMD); - DC390_write8 (ScsiCmd, DMA_COMMAND); - //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); - //DC390_write8 (ScsiCmd, RESET_ATN_CMD); - DC390_write8 (ScsiCmd, NOP_CMD); - //udelay (10000); - //DC390_read8 (INT_Status); - //DC390_write8 (ScsiCmd, EN_SEL_RESEL); - } - sbac = DC390_read32 (DMA_ScsiBusCtrl); - if (sbac & SCSI_BUSY) - { /* clear BSY, SEL and ATN */ - printk (KERN_WARNING "DC390: Reset SCSI device: "); - //DC390_write32 (DMA_ScsiBusCtrl, (sbac | SCAM) & ~SCSI_LINES); - //udelay (250); - //sbac = DC390_read32 (DMA_ScsiBusCtrl); - //printk ("%08lx ", sbac); - //DC390_write32 (DMA_ScsiBusCtrl, sbac & ~(SCSI_LINES | SCAM)); - //udelay (100); - //sbac = DC390_read32 (DMA_ScsiBusCtrl); - //printk ("%08lx ", sbac); - DC390_write8 (ScsiCmd, RST_DEVICE_CMD); - udelay (250); - DC390_write8 (ScsiCmd, NOP_CMD); - sbac = DC390_read32 (DMA_ScsiBusCtrl); - printk ("%08lx\n", sbac); - } -#endif - dc390_lastabortedpid = cmd->pid; - //do_DC390_Interrupt (pACB->IRQLevel, 0, 0); -#ifndef USE_NEW_EH - if (status == SCSI_ABORT_SUCCESS) cmd->scsi_done(cmd); -#endif - return( status ); + pDCB->DCBFlag |= ABORT_DEV_; + printk(KERN_INFO "DC390: Aborted pid %li\n", cmd->pid); + + return FAILED; } @@ -1385,93 +1119,38 @@ } -#if 0 -/* Moves all SRBs from Going to Waiting for all DCBs */ -static void dc390_RecoverSRB( struct dc390_acb* pACB ) +static int DC390_bus_reset (struct scsi_cmnd *cmd) { - struct dc390_dcb *pDCB, *pdcb; - struct dc390_srb *psrb, *psrb2; - u32 cnt, i; - - pDCB = pACB->pLinkDCB; - if( !pDCB ) return; - pdcb = pDCB; - do - { - cnt = pdcb->GoingSRBCnt; - psrb = pdcb->pGoingSRB; - for (i=0; ipNextSRB; -/* dc390_RewaitSRB( pDCB, psrb ); */ - if( pdcb->pWaitingSRB ) - { - psrb2->pNextSRB = pdcb->pWaitingSRB; - pdcb->pWaitingSRB = psrb2; - } - else - { - pdcb->pWaitingSRB = psrb2; - pdcb->pWaitLast = psrb2; - psrb2->pNextSRB = NULL; - } - } - pdcb->GoingSRBCnt = 0; - pdcb->pGoingSRB = NULL; - pdcb->TagMask = 0; - pdcb = pdcb->pNextDCB; - } while( pdcb != pDCB ); -} -#endif + struct dc390_acb* pACB = (struct dc390_acb*) cmd->device->host->hostdata; + u8 bval; -/*********************************************************************** - * Function : int DC390_reset (struct scsi_cmnd *cmd, ...) - * - * Purpose : perform a hard reset on the SCSI bus - * - * Inputs : cmd - command which caused the SCSI RESET - * resetFlags - how hard to try - * - * Returns : 0 on success. - ***********************************************************************/ + del_timer (&pACB->Waiting_Timer); -static int DC390_reset (struct scsi_cmnd *cmd) -{ - u8 bval; - struct dc390_acb* pACB = (struct dc390_acb*) cmd->device->host->hostdata; + bval = DC390_read8(CtrlReg1) | DIS_INT_ON_SCSI_RST; + DC390_write8(CtrlReg1, bval); /* disable IRQ on bus reset */ - printk(KERN_INFO "DC390: RESET ... "); + pACB->ACBFlag |= RESET_DEV; + dc390_ResetSCSIBus(pACB); - if (timer_pending (&pACB->Waiting_Timer)) del_timer (&pACB->Waiting_Timer); - bval = DC390_read8 (CtrlReg1); - bval |= DIS_INT_ON_SCSI_RST; - DC390_write8 (CtrlReg1, bval); /* disable IRQ on bus reset */ - - pACB->ACBFlag |= RESET_DEV; - dc390_ResetSCSIBus( pACB ); - - dc390_ResetDevParam( pACB ); - udelay (1000); - pACB->pScsiHost->last_reset = jiffies + 3*HZ/2 + dc390_ResetDevParam(pACB); + udelay(1000); + pACB->pScsiHost->last_reset = jiffies + 3*HZ/2 + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; - DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); - DC390_read8 (INT_Status); /* Reset Pending INT */ + DC390_write8(ScsiCmd, CLEAR_FIFO_CMD); + DC390_read8(INT_Status); /* Reset Pending INT */ - dc390_DoingSRB_Done( pACB, cmd ); - /* dc390_RecoverSRB (pACB); */ - pACB->pActiveDCB = NULL; + dc390_DoingSRB_Done(pACB, cmd); - pACB->ACBFlag = 0; - bval = DC390_read8 (CtrlReg1); - bval &= ~DIS_INT_ON_SCSI_RST; - DC390_write8 (CtrlReg1, bval); /* re-enable interrupt */ + pACB->pActiveDCB = NULL; + pACB->ACBFlag = 0; - dc390_Waiting_process( pACB ); + bval = DC390_read8(CtrlReg1) & ~DIS_INT_ON_SCSI_RST; + DC390_write8(CtrlReg1, bval); /* re-enable interrupt */ - printk("done\n"); - return( SCSI_RESET_SUCCESS ); + dc390_Waiting_process(pACB); + + return SUCCESS; } #include "scsiiom.c" @@ -1548,7 +1227,6 @@ static void __devinit dc390_initACB (struct Scsi_Host *psh, unsigned long io_port, u8 Irq, u8 index) { struct dc390_acb* pACB; - u8 i; psh->can_queue = MAX_CMD_QUEUE; psh->cmd_per_lun = MAX_CMD_PER_LUN; @@ -1595,8 +1273,6 @@ dc390_linkSRB( pACB ); pACB->pTmpSRB = &pACB->TmpSRB; dc390_initSRB( pACB->pTmpSRB ); - for(i=0; iDCBmap[i] = 0; pACB->sel_timeout = SEL_TIMEOUT; pACB->glitch_cfg = EATER_25NS; pACB->Cmds = pACB->CmdInQ = pACB->CmdOutOfSRB = 0; @@ -1757,7 +1433,6 @@ pDCB->CtrlR4 |= NEGATE_REQACKDATA | NEGATE_REQACK; } - pACB->DCBmap[id] |= (1 << lun); dc390_updateDCB(pACB, pDCB); pACB->scan_devices = 1; @@ -1781,8 +1456,6 @@ BUG_ON(pDCB->GoingSRBCnt > 1); - pACB->DCBmap[pDCB->TargetID] &= ~(1 << pDCB->TargetLUN); - if (pDCB == pACB->pLinkDCB) { if (pACB->pLastDCB == pDCB) { pDCB->pNextDCB = NULL; @@ -1818,15 +1491,13 @@ static struct scsi_host_template driver_template = { .module = THIS_MODULE, .proc_name = "tmscsim", - .proc_info = DC390_proc_info, .name = DC390_BANNER " V" DC390_VERSION, .slave_alloc = dc390_slave_alloc, .slave_configure = dc390_slave_configure, .slave_destroy = dc390_slave_destroy, .queuecommand = DC390_queue_command, .eh_abort_handler = DC390_abort, - .eh_bus_reset_handler = DC390_reset, - .bios_param = DC390_bios_param, + .eh_bus_reset_handler = DC390_bus_reset, .can_queue = 42, .this_id = 7, .sg_tablesize = SG_ALL, @@ -1938,152 +1609,6 @@ scsi_host_put(scsi_host); pci_set_drvdata(dev, NULL); } - -/******************************************************************** - * Function: DC390_proc_info(char* buffer, char **start, - * off_t offset, int length, int hostno, int inout) - * - * Purpose: return SCSI Adapter/Device Info - * - * Input: buffer: Pointer to a buffer where to write info - * start : - * offset: - * hostno: Host adapter index - * inout : Read (=0) or set(!=0) info - * - * Output: buffer: contains info - * length; length of info in buffer - * - * return value: length - * - ********************************************************************/ - -#undef SPRINTF -#define SPRINTF(args...) pos += sprintf(pos, ## args) - -#define YESNO(YN) \ - if (YN) SPRINTF(" Yes "); \ - else SPRINTF(" No ") - - -static int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start, - off_t offset, int length, int inout) -{ - int dev, spd, spd1; - char *pos = buffer; - struct dc390_acb* pACB; - struct dc390_dcb* pDCB; - - pACB = dc390_pACB_start; - - while(pACB != (struct dc390_acb*)-1) - { - if (shpnt == pACB->pScsiHost) - break; - pACB = pACB->pNextACB; - } - - if (pACB == (struct dc390_acb*)-1) return(-ESRCH); - - if(inout) /* Has data been written to the file ? */ - return -ENOSYS; - - SPRINTF("Tekram DC390/AM53C974 PCI SCSI Host Adapter, "); - SPRINTF("Driver Version %s\n", DC390_VERSION); - - SPRINTF("SCSI Host Nr %i, ", shpnt->host_no); - SPRINTF("%s Adapter Nr %i\n", dc390_adapname, pACB->AdapterIndex); - SPRINTF("IOPortBase 0x%04x, ", pACB->IOPortBase); - SPRINTF("IRQ %02i\n", pACB->IRQLevel); - - SPRINTF("MaxID %i, MaxLUN %i, ", shpnt->max_id, shpnt->max_lun); - SPRINTF("AdapterID %i, SelTimeout %i ms, DelayReset %i s\n", - shpnt->this_id, (pACB->sel_timeout*164)/100, - dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]); - - SPRINTF("TagMaxNum %i, Status 0x%02x, ACBFlag 0x%02x, GlitchEater %i ns\n", - pACB->TagMaxNum, pACB->status, pACB->ACBFlag, GLITCH_TO_NS(pACB->glitch_cfg)*12); - - SPRINTF("Statistics: Cmnds %li, Cmnds not sent directly %i, Out of SRB conds %i\n", - pACB->Cmds, pACB->CmdInQ, pACB->CmdOutOfSRB); - SPRINTF(" Lost arbitrations %i, Sel. connected %i, Connected: %s\n", - pACB->SelLost, pACB->SelConn, pACB->Connected? "Yes": "No"); - - SPRINTF("Nr of DCBs: %i\n", pACB->DCBCnt); - SPRINTF("Map of attached LUNs: %02x %02x %02x %02x %02x %02x %02x %02x\n", - pACB->DCBmap[0], pACB->DCBmap[1], pACB->DCBmap[2], pACB->DCBmap[3], - pACB->DCBmap[4], pACB->DCBmap[5], pACB->DCBmap[6], pACB->DCBmap[7]); - - SPRINTF("Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd\n"); - - pDCB = pACB->pLinkDCB; - for (dev = 0; dev < pACB->DCBCnt; dev++) - { - SPRINTF("%02i %02i %02i ", dev, pDCB->TargetID, pDCB->TargetLUN); - YESNO(pDCB->DevMode & PARITY_CHK_); - YESNO(pDCB->SyncMode & SYNC_NEGO_DONE); - YESNO(pDCB->DevMode & EN_DISCONNECT_); - YESNO(pDCB->DevMode & SEND_START_); - YESNO(pDCB->SyncMode & EN_TAG_QUEUEING); - if (pDCB->SyncOffset & 0x0f) - { - int sp = pDCB->SyncPeriod; if (! (pDCB->CtrlR3 & FAST_SCSI)) sp++; - SPRINTF(" %03i ns ", (pDCB->NegoPeriod) << 2); - spd = 40/(sp); spd1 = 40%(sp); - spd1 = (spd1 * 10 + sp/2) / (sp); - SPRINTF(" %2i.%1i M %02i", spd, spd1, (pDCB->SyncOffset & 0x0f)); - } - else SPRINTF(" (%03i ns) ", (pDCB->NegoPeriod) << 2); - /* Add more info ...*/ - SPRINTF (" %02i\n", pDCB->MaxCommand); - pDCB = pDCB->pNextDCB; - } - if (timer_pending(&pACB->Waiting_Timer)) SPRINTF ("Waiting queue timer running\n"); - else SPRINTF ("\n"); - pDCB = pACB->pLinkDCB; - - for (dev = 0; dev < pACB->DCBCnt; dev++) - { - struct dc390_srb* pSRB; - if (pDCB->WaitSRBCnt) - SPRINTF ("DCB (%02i-%i): Waiting: %i:", pDCB->TargetID, pDCB->TargetLUN, - pDCB->WaitSRBCnt); - for (pSRB = pDCB->pWaitingSRB; pSRB; pSRB = pSRB->pNextSRB) - SPRINTF(" %li", pSRB->pcmd->pid); - if (pDCB->GoingSRBCnt) - SPRINTF ("\nDCB (%02i-%i): Going : %i:", pDCB->TargetID, pDCB->TargetLUN, - pDCB->GoingSRBCnt); - for (pSRB = pDCB->pGoingSRB; pSRB; pSRB = pSRB->pNextSRB) -#if 0 //def DC390_DEBUGTRACE - SPRINTF(" %s\n ", pSRB->debugtrace); -#else - SPRINTF(" %li", pSRB->pcmd->pid); -#endif - if (pDCB->WaitSRBCnt || pDCB->GoingSRBCnt) SPRINTF ("\n"); - pDCB = pDCB->pNextDCB; - } - -#ifdef DC390_DEBUGDCB - SPRINTF ("DCB list for ACB %p:\n", pACB); - pDCB = pACB->pLinkDCB; - SPRINTF ("%p", pDCB); - for (dev = 0; dev < pACB->DCBCnt; dev++, pDCB=pDCB->pNextDCB) - SPRINTF ("->%p", pDCB->pNextDCB); - SPRINTF("\n"); -#endif - - *start = buffer + offset; - - if (pos - buffer < offset) - return 0; - else if (pos - buffer - offset < length) - return pos - buffer - offset; - else - return length; -} - -#undef YESNO -#undef SPRINTF static struct pci_driver dc390_driver = { .name = "tmscsim", diff -Nru a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h --- a/drivers/scsi/tmscsim.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/scsi/tmscsim.h 2004-09-06 16:37:54 -07:00 @@ -163,7 +163,6 @@ struct dc390_srb *pTmpSRB; u8 msgin123[4]; -u8 DCBmap[MAX_SCSI_ID]; u8 Connected; u8 pad; diff -Nru a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c --- a/drivers/scsi/wd7000.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/scsi/wd7000.c 2004-09-06 16:37:55 -07:00 @@ -190,7 +190,6 @@ #include -#define ANY2SCSI_INLINE /* undef this to use old macros */ #undef WD7000_DEBUG /* general debug */ #ifdef WD7000_DEBUG #define dprintk printk @@ -726,55 +725,17 @@ __setup("wd7000=", wd7000_setup); -#ifdef ANY2SCSI_INLINE -/* - * Since they're used a lot, I've redone the following from the macros - * formerly in wd7000.h, hopefully to speed them up by getting rid of - * all the shifting (it may not matter; GCC might have done as well anyway). - * - * xany2scsi and xscsi2int were not being used, and are no longer defined. - * (They were simply 4-byte versions of these routines). - */ -typedef union { /* let's cheat... */ - int i; - unchar u[sizeof(int)]; /* the sizeof(int) makes it more portable */ -} i_u; - - static inline void any2scsi(unchar * scsi, int any) { - *scsi++ = ((i_u) any).u[2]; - *scsi++ = ((i_u) any).u[1]; - *scsi++ = ((i_u) any).u[0]; + *scsi++ = (unsigned)any >> 16; + *scsi++ = (unsigned)any >> 8; + *scsi++ = any; } - static inline int scsi2int(unchar * scsi) { - i_u result; - - result.i = 0; /* clears unused bytes */ - result.u[2] = *scsi++; - result.u[1] = *scsi++; - result.u[0] = *scsi++; - - return (result.i); + return (scsi[0] << 16) | (scsi[1] << 8) | scsi[2]; } -#else -/* - * These are the old ones - I've just moved them here... - */ -#undef any2scsi -#define any2scsi(up, p) (up)[0] = (((unsigned long) (p)) >> 16); \ - (up)[1] = ((unsigned long) (p)) >> 8; \ - (up)[2] = ((unsigned long) (p)); - -#undef scsi2int -#define scsi2int(up) ( (((unsigned long) *(up)) << 16) + \ - (((unsigned long) (up)[1]) << 8) + \ - ((unsigned long) (up)[2]) ) -#endif - static inline void wd7000_enable_intr(Adapter * host) { diff -Nru a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c --- a/drivers/serial/68360serial.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/serial/68360serial.c 2004-09-06 16:37:55 -07:00 @@ -2592,7 +2592,7 @@ state->icount.rx = state->icount.tx = 0; state->icount.frame = state->icount.parity = 0; state->icount.overrun = state->icount.brk = 0; - printk(KERN_INFO "ttyS%02d at irq 0x%02x is an %s\n", + printk(KERN_INFO "ttyS%d at irq 0x%02x is an %s\n", i, (unsigned int)(state->irq), (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC"); diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/serial/8250.c 2004-09-06 16:37:50 -07:00 @@ -130,6 +130,7 @@ struct timer_list timer; /* "no irq" timer */ struct list_head list; /* ports on this IRQ */ unsigned int capabilities; /* port capabilities */ + unsigned int tx_loadsz; /* transmit fifo load size */ unsigned short rev; unsigned char acr; unsigned char ier; @@ -156,23 +157,23 @@ /* * Here we define the default xmit fifo size used for each type of UART. */ -static const struct serial_uart_config uart_config[PORT_MAX_8250+1] = { - { "unknown", 1, 0 }, - { "8250", 1, 0 }, - { "16450", 1, 0 }, - { "16550", 1, 0 }, - { "16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO }, - { "Cirrus", 1, 0 }, - { "ST16650", 1, UART_CLEAR_FIFO | UART_STARTECH }, - { "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH }, - { "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO }, - { "Startech", 1, 0 }, - { "16C950/954", 128, UART_CLEAR_FIFO | UART_USE_FIFO }, - { "ST16654", 64, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH }, - { "XR16850", 128, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH }, - { "RSA", 2048, UART_CLEAR_FIFO | UART_USE_FIFO }, - { "NS16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO | UART_NATSEMI }, - { "XScale", 32, UART_CLEAR_FIFO | UART_USE_FIFO }, +static const struct serial8250_config uart_config[PORT_MAX_8250+1] = { + { "unknown", 1, 1, 0 }, + { "8250", 1, 1, 0 }, + { "16450", 1, 1, 0 }, + { "16550", 1, 1, 0 }, + { "16550A", 16, 16, UART_CAP_FIFO }, + { "Cirrus", 1, 1, 0 }, + { "ST16650", 1, 1, UART_CAP_FIFO | UART_CAP_SLEEP | UART_CAP_EFR }, + { "ST16650V2", 32, 16, UART_CAP_FIFO | UART_CAP_SLEEP | UART_CAP_EFR }, + { "TI16750", 64, 64, UART_CAP_FIFO | UART_CAP_SLEEP }, + { "Startech", 1, 1, 0 }, + { "16C950/954", 128, 128, UART_CAP_FIFO }, + { "ST16654", 64, 32, UART_CAP_FIFO | UART_CAP_SLEEP | UART_CAP_EFR }, + { "XR16850", 128, 128, UART_CAP_FIFO | UART_CAP_SLEEP | UART_CAP_EFR }, + { "RSA", 2048, 2048, UART_CAP_FIFO }, + { "NS16550A", 16, 16, UART_CAP_FIFO | UART_NATSEMI }, + { "XScale", 32, 32, UART_CAP_FIFO }, }; static _INLINE_ unsigned int serial_in(struct uart_8250_port *up, int offset) @@ -243,6 +244,41 @@ return value; } +/* + * FIFO support. + */ +static inline void serial8250_clear_fifos(struct uart_8250_port *p) +{ + if (p->capabilities & UART_CAP_FIFO) { + serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO); + serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO | + UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); + serial_outp(p, UART_FCR, 0); + } +} + +/* + * IER sleep support. UARTs which have EFRs need the "extended + * capability" bit enabled. Note that on XR16C850s, we need to + * reset LCR to write to IER. + */ +static inline void serial8250_set_sleep(struct uart_8250_port *p, int sleep) +{ + if (p->capabilities & UART_CAP_SLEEP) { + if (p->capabilities & UART_CAP_EFR) { + serial_outp(p, UART_LCR, 0xBF); + serial_outp(p, UART_EFR, UART_EFR_ECB); + serial_outp(p, UART_LCR, 0); + } + serial_outp(p, UART_IER, sleep ? UART_IERX_SLEEP : 0); + if (p->capabilities & UART_CAP_EFR) { + serial_outp(p, UART_LCR, 0xBF); + serial_outp(p, UART_EFR, 0); + serial_outp(p, UART_LCR, 0); + } + } +} + #ifdef CONFIG_SERIAL_8250_RSA /* * Attempts to turn on the RSA FIFO. Returns zero on failure. @@ -697,8 +733,9 @@ #endif serial_outp(up, UART_LCR, save_lcr); - up->port.fifosize = uart_config[up->port.type].dfl_xmit_fifo_size; + up->port.fifosize = uart_config[up->port.type].fifo_size; up->capabilities = uart_config[up->port.type].flags; + up->tx_loadsz = uart_config[up->port.type].tx_loadsz; if (up->port.type == PORT_UNKNOWN) goto out; @@ -711,10 +748,7 @@ serial_outp(up, UART_RSA_FRR, 0); #endif serial_outp(up, UART_MCR, save_mcr); - serial_outp(up, UART_FCR, (UART_FCR_ENABLE_FIFO | - UART_FCR_CLEAR_RCVR | - UART_FCR_CLEAR_XMIT)); - serial_outp(up, UART_FCR, 0); + serial8250_clear_fifos(up); (void)serial_in(up, UART_RX); serial_outp(up, UART_IER, 0); @@ -923,7 +957,7 @@ return; } - count = up->port.fifosize; + count = up->tx_loadsz; do { serial_out(up, UART_TX, xmit->buf[xmit->tail]); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); @@ -1227,12 +1261,7 @@ * Clear the FIFO buffers and disable them. * (they will be reeanbled in set_termios()) */ - if (up->capabilities & UART_CLEAR_FIFO) { - serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO); - serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO | - UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); - serial_outp(up, UART_FCR, 0); - } + serial8250_clear_fifos(up); /* * Clear the interrupt registers. @@ -1254,6 +1283,23 @@ } /* + * For a XR16C850, we need to set the trigger levels + */ + if (up->port.type == PORT_16850) { + unsigned char fctr; + + serial_outp(up, UART_LCR, 0xbf); + + fctr = serial_inp(up, UART_FCTR) & ~(UART_FCTR_RX|UART_FCTR_TX); + serial_outp(up, UART_FCTR, fctr | UART_FCTR_TRGD | UART_FCTR_RX); + serial_outp(up, UART_TRG, UART_TRG_96); + serial_outp(up, UART_FCTR, fctr | UART_FCTR_TRGD | UART_FCTR_TX); + serial_outp(up, UART_TRG, UART_TRG_96); + + serial_outp(up, UART_LCR, 0); + } + + /* * If the "interrupt" for this port doesn't correspond with any * hardware interrupt, we use a timer-based system. The original * driver used to do this with IRQ0. @@ -1345,10 +1391,7 @@ * Disable break condition and FIFOs */ serial_out(up, UART_LCR, serial_inp(up, UART_LCR) & ~UART_LCR_SBC); - serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO | - UART_FCR_CLEAR_RCVR | - UART_FCR_CLEAR_XMIT); - serial_outp(up, UART_FCR, 0); + serial8250_clear_fifos(up); #ifdef CONFIG_SERIAL_8250_RSA /* @@ -1440,7 +1483,7 @@ up->rev == 0x5201) quot ++; - if (up->capabilities & UART_USE_FIFO) { + if (up->capabilities & UART_CAP_FIFO && up->port.fifosize > 1) { if (baud < 2400) fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1; #ifdef CONFIG_SERIAL_8250_RSA @@ -1514,7 +1557,7 @@ serial_out(up, UART_IER, up->ier); - if (up->capabilities & UART_STARTECH) { + if (up->capabilities & UART_CAP_EFR) { serial_outp(up, UART_LCR, 0xBF); serial_outp(up, UART_EFR, termios->c_cflag & CRTSCTS ? UART_EFR_CTS :0); @@ -1554,71 +1597,12 @@ serial8250_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) { - struct uart_8250_port *up = (struct uart_8250_port *)port; - if (state) { - /* sleep */ - if (up->capabilities & UART_STARTECH) { - /* Arrange to enter sleep mode */ - serial_outp(up, UART_LCR, 0xBF); - serial_outp(up, UART_EFR, UART_EFR_ECB); - serial_outp(up, UART_LCR, 0); - serial_outp(up, UART_IER, UART_IERX_SLEEP); - serial_outp(up, UART_LCR, 0xBF); - serial_outp(up, UART_EFR, 0); - serial_outp(up, UART_LCR, 0); - } - if (up->port.type == PORT_16750) { - /* Arrange to enter sleep mode */ - serial_outp(up, UART_IER, UART_IERX_SLEEP); - } - - if (up->pm) - up->pm(port, state, oldstate); - } else { - /* wake */ - if (up->capabilities & UART_STARTECH) { - /* Wake up UART */ - serial_outp(up, UART_LCR, 0xBF); - serial_outp(up, UART_EFR, UART_EFR_ECB); - /* - * Turn off LCR == 0xBF so we actually set the IER - * register on the XR16C850 - */ - serial_outp(up, UART_LCR, 0); - serial_outp(up, UART_IER, 0); - /* - * Now reset LCR so we can turn off the ECB bit - */ - serial_outp(up, UART_LCR, 0xBF); - serial_outp(up, UART_EFR, 0); - /* - * For a XR16C850, we need to set the trigger levels - */ - if (up->port.type == PORT_16850) { - unsigned char fctr; + struct uart_8250_port *p = (struct uart_8250_port *)port; - fctr = serial_inp(up, UART_FCTR) & - ~(UART_FCTR_RX | UART_FCTR_TX); - serial_outp(up, UART_FCTR, fctr | - UART_FCTR_TRGD | - UART_FCTR_RX); - serial_outp(up, UART_TRG, UART_TRG_96); - serial_outp(up, UART_FCTR, fctr | - UART_FCTR_TRGD | - UART_FCTR_TX); - serial_outp(up, UART_TRG, UART_TRG_96); - } - serial_outp(up, UART_LCR, 0); - } + serial8250_set_sleep(p, state != 0); - if (up->port.type == PORT_16750) { - /* Wake up UART */ - serial_outp(up, UART_IER, 0); - } - - if (up->pm) - up->pm(port, state, oldstate); - } + if (p->pm) + p->pm(port, state, oldstate); } /* diff -Nru a/drivers/serial/8250.h b/drivers/serial/8250.h --- a/drivers/serial/8250.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/serial/8250.h 2004-09-06 16:37:50 -07:00 @@ -33,6 +33,20 @@ unsigned short iomem_reg_shift; }; +/* + * This replaces serial_uart_config in include/linux/serial.h + */ +struct serial8250_config { + const char *name; + unsigned int fifo_size; + unsigned int tx_loadsz; + unsigned int flags; +}; + +#define UART_CAP_FIFO (1 << 8) /* UART has FIFO */ +#define UART_CAP_EFR (1 << 9) /* UART has EFR */ +#define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */ + #undef SERIAL_DEBUG_PCI #if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486)) diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig --- a/drivers/serial/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/drivers/serial/Kconfig 2004-09-06 16:37:55 -07:00 @@ -682,6 +682,7 @@ bool "SGI Altix L1 serial console support" depends on IA64_GENERIC || IA64_SGI_SN2 select SERIAL_CORE + select SERIAL_CORE_CONSOLE help If you have an SGI Altix and you would like to use the system controller serial port as your console (you want this!), diff -Nru a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c --- a/drivers/serial/sn_console.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/serial/sn_console.c 2004-09-06 16:37:52 -07:00 @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -80,6 +81,12 @@ #define DEVICE_MAJOR 204 #define DEVICE_MINOR 40 +#ifdef CONFIG_MAGIC_SYSRQ +static char sysrq_serial_str[] = "\eSYS"; +static char *sysrq_serial_ptr = sysrq_serial_str; +static unsigned long sysrq_requested; +#endif /* CONFIG_MAGIC_SYSRQ */ + /* * Port definition - this kinda drives it all */ @@ -532,13 +539,15 @@ * sn_receive_chars - Grab characters, pass them to tty layer * @port: Port to operate on * @regs: Saved registers (needed by uart_handle_sysrq_char) + * @flags: irq flags * * Note: If we're not registered with the serial core infrastructure yet, * we don't try to send characters to it... * */ static void -sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs) +sn_receive_chars(struct sn_cons_port *port, struct pt_regs *regs, + unsigned long flags) { int ch; struct tty_struct *tty; @@ -569,10 +578,29 @@ "obtaining data from the console (0x%0x)\n", ch); break; } -#if defined(CONFIG_SERIAL_SGI_L1_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) - if (uart_handle_sysrq_char(&port->sc_port, ch, regs)) - continue; -#endif /* CONFIG_SERIAL_SGI_L1_CONSOLE && CONFIG_MAGIC_SYSRQ */ +#ifdef CONFIG_MAGIC_SYSRQ + if (sysrq_requested) { + unsigned long sysrq_timeout = sysrq_requested + HZ*5; + + sysrq_requested = 0; + if (ch && time_before(jiffies, sysrq_timeout)) { + spin_unlock_irqrestore(&port->sc_port.lock, flags); + handle_sysrq(ch, regs, NULL); + spin_lock_irqsave(&port->sc_port.lock, flags); + /* ignore actual sysrq command char */ + continue; + } + } + if (ch == *sysrq_serial_ptr) { + if (!(*++sysrq_serial_ptr)) { + sysrq_requested = jiffies; + sysrq_serial_ptr = sysrq_serial_str; + } + continue; /* ignore the whole sysrq string */ + } + else + sysrq_serial_ptr = sysrq_serial_str; +#endif /* CONFIG_MAGIC_SYSRQ */ /* record the character to pass up to the tty layer */ if (tty) { @@ -695,7 +723,7 @@ spin_lock_irqsave(&port->sc_port.lock, flags); if (status & SAL_CONSOLE_INTR_RECV) { - sn_receive_chars(port, regs); + sn_receive_chars(port, regs, flags); } if (status & SAL_CONSOLE_INTR_XMIT) { sn_transmit_chars(port, TRANSMIT_BUFFERED); @@ -744,7 +772,7 @@ if (!port->sc_port.irq) { spin_lock_irqsave(&port->sc_port.lock, flags); - sn_receive_chars(port, NULL); + sn_receive_chars(port, NULL, flags); sn_transmit_chars(port, TRANSMIT_RAW); spin_unlock_irqrestore(&port->sc_port.lock, flags); mod_timer(&port->sc_timer, @@ -852,7 +880,6 @@ * Kernel console definitions */ -#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE static void sn_sal_console_write(struct console *, const char *, unsigned); static int __init sn_sal_console_setup(struct console *, char *); extern struct uart_driver sal_console_uart; @@ -868,9 +895,6 @@ }; #define SAL_CONSOLE &sal_console -#else -#define SAL_CONSOLE 0 -#endif /* CONFIG_SERIAL_SGI_L1_CONSOLE */ static struct uart_driver sal_console_uart = { .owner = THIS_MODULE, @@ -896,11 +920,11 @@ { int retval; - printk(KERN_INFO "sn_console: Console driver init\n"); - if (!ia64_platform_is("sn2")) return -ENODEV; + printk(KERN_INFO "sn_console: Console driver init\n"); + if (USE_DYNAMIC_MINOR == 1) { misc.minor = MISC_DYNAMIC_MINOR; misc.name = DEVICE_NAME_DYNAMIC; @@ -970,8 +994,6 @@ module_init(sn_sal_module_init); module_exit(sn_sal_module_exit); -#ifdef CONFIG_SERIAL_SGI_L1_CONSOLE - /** * puts_raw_fixed - sn_sal_console_write helper for adding \r's as required * @puts_raw : puts function to do the writing @@ -1086,7 +1108,9 @@ spin_unlock_irqrestore(&port->sc_port.lock, flags); puts_raw_fixed(port->sc_ops->sal_puts_raw, s, count); +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) } +#endif } else { /* Not yet registered with serial core - simple case */ @@ -1191,5 +1215,3 @@ } console_initcall(sn_sal_serial_console_init); - -#endif /* CONFIG_SERIAL_SGI_L1_CONSOLE */ diff -Nru a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c --- a/drivers/serial/sunsab.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/serial/sunsab.c 2004-09-06 16:37:52 -07:00 @@ -768,25 +768,6 @@ writeb((readb(&up->regs->rw.ccr2) & ~0xc0) | ((ebrg >> 2) & 0xc0), &up->regs->rw.ccr2); - if (cflag & CRTSCTS) { - writeb(readb(&up->regs->rw.mode) & ~SAB82532_MODE_RTS, - &up->regs->rw.mode); - writeb(readb(&up->regs->rw.mode) | SAB82532_MODE_FRTS, - &up->regs->rw.mode); - writeb(readb(&up->regs->rw.mode) & ~SAB82532_MODE_FCTS, - &up->regs->rw.mode); - up->interrupt_mask1 &= ~SAB82532_IMR1_CSC; - writeb(up->interrupt_mask1, &up->regs->w.imr1); - } else { - writeb(readb(&up->regs->rw.mode) | SAB82532_MODE_RTS, - &up->regs->rw.mode); - writeb(readb(&up->regs->rw.mode) & ~SAB82532_MODE_FRTS, - &up->regs->rw.mode); - writeb(readb(&up->regs->rw.mode) | SAB82532_MODE_FCTS, - &up->regs->rw.mode); - up->interrupt_mask1 |= SAB82532_IMR1_CSC; - writeb(up->interrupt_mask1, &up->regs->w.imr1); - } writeb(readb(&up->regs->rw.mode) | SAB82532_MODE_RAC, &up->regs->rw.mode); } @@ -940,6 +921,7 @@ writeb(up->interrupt_mask1, &up->regs->w.imr1); sunsab_convert_to_sab(up, con->cflag, 0, baud); + sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS); spin_unlock_irqrestore(&up->port.lock, flags); diff -Nru a/drivers/tc/zs.c b/drivers/tc/zs.c --- a/drivers/tc/zs.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/tc/zs.c 2004-09-06 16:37:54 -07:00 @@ -211,10 +211,6 @@ static void change_speed(struct dec_serial *info); static void rs_wait_until_sent(struct tty_struct *tty, int timeout); -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* * tmp_buf is used as a temporary buffer by serial_write. We need to * lock it in case the copy_from_user blocks while swapping in a page, @@ -706,7 +702,7 @@ save_flags(flags); cli(); #ifdef SERIAL_DEBUG_OPEN - printk("starting up ttyS%02d (irq %d)...", info->line, info->irq); + printk("starting up ttyS%d (irq %d)...", info->line, info->irq); #endif /* @@ -950,16 +946,16 @@ save_flags(flags); while (1) { cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) break; if (from_user) { down(&tmp_buf_sem); copy_from_user(tmp_buf, buf, c); - c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c); up(&tmp_buf_sem); } else @@ -1356,7 +1352,7 @@ } #ifdef SERIAL_DEBUG_OPEN - printk("rs_close ttyS%02d, count = %d\n", info->line, info->count); + printk("rs_close ttyS%d, count = %d\n", info->line, info->count); #endif if ((tty->count == 1) && (info->count != 1)) { /* @@ -1371,7 +1367,7 @@ info->count = 1; } if (--info->count < 0) { - printk("rs_close: bad serial port count for ttyS%02d: %d\n", + printk("rs_close: bad serial port count for ttyS%d: %d\n", info->line, info->count); info->count = 0; } @@ -1446,7 +1442,7 @@ if (char_time == 0) char_time = 1; if (timeout) - char_time = MIN(char_time, timeout); + char_time = min_t(unsigned long, char_time, timeout); while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) { current->state = TASK_INTERRUPTIBLE; schedule_timeout(char_time); @@ -1531,7 +1527,7 @@ retval = 0; add_wait_queue(&info->open_wait, &wait); #ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready before block: ttyS%02d, count = %d\n", + printk("block_til_ready before block: ttyS%d, count = %d\n", info->line, info->count); #endif cli(); @@ -1565,7 +1561,7 @@ break; } #ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready blocking: ttyS%02d, count = %d\n", + printk("block_til_ready blocking: ttyS%d, count = %d\n", info->line, info->count); #endif schedule(); @@ -1576,7 +1572,7 @@ info->count++; info->blocked_open--; #ifdef SERIAL_DEBUG_OPEN - printk("block_til_ready after blocking: ttyS%02d, count = %d\n", + printk("block_til_ready after blocking: ttyS%d, count = %d\n", info->line, info->count); #endif if (retval) @@ -1742,14 +1738,10 @@ * We're called early and memory managment isn't up, yet. * Thus check_region would fail. */ - if (check_region((unsigned long) + if (!request_region((unsigned long) zs_channels[n_channels].control, - ZS_CHAN_IO_SIZE) < 0) { + ZS_CHAN_IO_SIZE, "SCC")) panic("SCC I/O region is not free"); - } - request_region((unsigned long) - zs_channels[n_channels].control, - ZS_CHAN_IO_SIZE, "SCC"); #endif zs_soft[n_channels].zs_channel = &zs_channels[n_channels]; zs_soft[n_channels].irq = zs_parms->irq; @@ -1896,7 +1888,7 @@ info->tqueue.data = info; init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); - printk("ttyS%02d at 0x%08x (irq = %d)", info->line, + printk("ttyS%d at 0x%08x (irq = %d)", info->line, info->port, info->irq); printk(" is a Z85C30 SCC\n"); tty_register_device(serial_driver, info->line, NULL); diff -Nru a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c --- a/drivers/telephony/ixj.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/telephony/ixj.c 2004-09-06 16:37:50 -07:00 @@ -7718,6 +7718,23 @@ cleanup(); } +static IXJ *new_ixj(unsigned long port) +{ + IXJ *res; + if (!request_region(port, 16, "ixj DSP")) { + printk(KERN_INFO "ixj: can't get I/O address 0x%lx\n", port); + return NULL; + } + res = ixj_alloc(); + if (!res) { + release_region(port, 16); + printk(KERN_INFO "ixj: out of memory\n"); + return NULL; + } + res->DSPbase = port; + return res; +} + int __init ixj_probe_isapnp(int *cnt) { int probe = 0; @@ -7750,15 +7767,9 @@ return -ENODEV; } - result = check_region(pnp_port_start(dev, 0), 16); - if (result) { - printk(KERN_INFO "ixj: can't get I/O address 0x%lx\n", pnp_port_start(dev, 0)); + j = new_ixj(pnp_port_start(dev, 0)); + if (!j) break; - } - - j = ixj_alloc(); - j->DSPbase = pnp_port_start(dev,0); - request_region(j->DSPbase, 16, "ixj DSP"); if (func != 0x110) j->XILINXbase = pnp_port_start(dev, 1); /* get real port */ @@ -7806,22 +7817,15 @@ int __init ixj_probe_isa(int *cnt) { - int i, result, probe; + int i, probe; /* Use passed parameters for older kernels without PnP */ for (i = 0; i < IXJMAX; i++) { if (dspio[i]) { - IXJ *j; + IXJ *j = new_ixj(dspio[i]); - if ((result = check_region(ixj[*cnt].DSPbase, 16)) < 0) { - printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", ixj[*cnt].DSPbase); + if (!j) break; - } - - j = ixj_alloc(); - - j->DSPbase = dspio[i]; - request_region(j->DSPbase, 16, "ixj DSP"); j->XILINXbase = xio[i]; j->cardtype = 0; @@ -7840,7 +7844,6 @@ struct pci_dev *pci = NULL; int i, probe = 0; IXJ *j = NULL; - int result; for (i = 0; i < IXJMAX - *cnt; i++) { pci = pci_find_device(0x15E2, 0x0500, pci); @@ -7849,20 +7852,12 @@ if (pci_enable_device(pci)) break; - if ((result = check_region(pci_resource_start(pci, 0), 16)) < 0) { - printk(KERN_INFO "ixj: can't get I/O address\n"); + j = new_ixj(pci_resource_start(pci, 0)); + if (!j) break; - } - /* Grab a device slot */ - j = ixj_alloc(); - if(j == NULL) - break; - - j->DSPbase = pci_resource_start(pci, 0); j->serial = (PCIEE_GetSerialNumber)pci_resource_start(pci, 2); j->XILINXbase = j->DSPbase + 0x10; - request_region(j->DSPbase, 16, "ixj DSP"); j->cardtype = QTI_PHONEJACK_PCI; j->board = *cnt; probe = ixj_selfprobe(j); diff -Nru a/drivers/telephony/ixj.h b/drivers/telephony/ixj.h --- a/drivers/telephony/ixj.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/telephony/ixj.h 2004-09-06 16:37:55 -07:00 @@ -1188,12 +1188,12 @@ unsigned int cid_rec_codec; unsigned int cid_rec_volume; unsigned char cid_rec_flag; - char rec_mode; + signed char rec_mode; unsigned int play_codec; unsigned int cid_play_codec; unsigned int cid_play_volume; unsigned char cid_play_flag; - char play_mode; + signed char play_mode; IXJ_FLAGS flags; unsigned long busyflags; unsigned int rec_frame_size; diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/class/cdc-acm.c 2004-09-06 16:37:53 -07:00 @@ -367,7 +367,7 @@ acm->writeurb->dev = acm->dev; acm->ready_for_write = 0; - stat = usb_submit_urb(acm->writeurb, GFP_NOIO); + stat = usb_submit_urb(acm->writeurb, from_user ? GFP_KERNEL : GFP_ATOMIC); if (stat < 0) { dbg("usb_submit_urb(write bulk) failed"); acm->ready_for_write = 1; diff -Nru a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig --- a/drivers/usb/core/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/core/Kconfig 2004-09-06 16:37:55 -07:00 @@ -71,3 +71,29 @@ may not yet work as expected. If you are unsure about this, say N here. + + +config USB_OTG + bool + depends on USB && EXPERIMENTAL + select USB_SUSPEND + default n + + +config USB_OTG_WHITELIST + bool "Rely on OTG Targeted Peripherals List" + depends on USB_OTG + default y + help + If you say Y here, the "otg_whitelist.h" file will be used as a + product whitelist, so USB peripherals not listed there will be + rejected during enumeration. This behavior is required by the + USB OTG specification for all devices not on your product's + "Targeted Peripherals List". + + Otherwise, peripherals not listed there will only generate a + warning and enumeration will continue. That's more like what + normal Linux-USB hosts do (other than the warning), and is + convenient for many stages of product development. + + diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c --- a/drivers/usb/core/config.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/core/config.c 2004-09-06 16:37:50 -07:00 @@ -106,7 +106,7 @@ return buffer - buffer0 + i; } -static void usb_release_interface_cache(struct kref *ref) +void usb_release_interface_cache(struct kref *ref) { struct usb_interface_cache *intfc = ref_to_usb_interface_cache(ref); int j; @@ -356,7 +356,7 @@ if (!intfc) return -ENOMEM; memset(intfc, 0, len); - kref_init(&intfc->ref, usb_release_interface_cache); + kref_init(&intfc->ref); } /* Skip over any Class Specific or Vendor Specific descriptors; @@ -422,7 +422,8 @@ for (i = 0; i < cf->desc.bNumInterfaces; i++) { if (cf->intf_cache[i]) - kref_put(&cf->intf_cache[i]->ref); + kref_put(&cf->intf_cache[i]->ref, + usb_release_interface_cache); } } kfree(dev->config); diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/core/hcd.c 2004-09-06 16:37:53 -07:00 @@ -790,6 +790,8 @@ usb_dev->epmaxpacketin[0] = usb_dev->epmaxpacketout[0] = 64; retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE); if (retval != sizeof usb_dev->descriptor) { + usb_dev->bus->root_hub = NULL; + up (&usb_bus_list_lock); dev_dbg (parent_dev, "can't read %s device descriptor %d\n", usb_dev->dev.bus_id, retval); return (retval < 0) ? retval : -EMSGSIZE; @@ -1399,6 +1401,45 @@ return hcd->driver->hub_resume (hcd); return 0; } + +#endif + +/*-------------------------------------------------------------------------*/ + +#ifdef CONFIG_USB_OTG + +/** + * usb_bus_start_enum - start immediate enumeration (for OTG) + * @bus: the bus (must use hcd framework) + * @port: 1-based number of port; usually bus->otg_port + * Context: in_interrupt() + * + * Starts enumeration, with an immediate reset followed later by + * khubd identifying and possibly configuring the device. + * This is needed by OTG controller drivers, where it helps meet + * HNP protocol timing requirements for starting a port reset. + */ +int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num) +{ + struct usb_hcd *hcd; + int status = -EOPNOTSUPP; + + /* NOTE: since HNP can't start by grabbing the bus's address0_sem, + * boards with root hubs hooked up to internal devices (instead of + * just the OTG port) may need more attention to resetting... + */ + hcd = container_of (bus, struct usb_hcd, self); + if (port_num && hcd->driver->start_port_reset) + status = hcd->driver->start_port_reset(hcd, port_num); + + /* run khubd shortly after (first) root port reset finishes; + * it may issue others, until at least 50 msecs have passed. + */ + if (status == 0) + mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10)); + return status; +} +EXPORT_SYMBOL (usb_bus_start_enum); #endif diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/core/hcd.h 2004-09-06 16:37:51 -07:00 @@ -212,6 +212,7 @@ char *buf, u16 wLength); int (*hub_suspend)(struct usb_hcd *); int (*hub_resume)(struct usb_hcd *); + int (*start_port_reset)(struct usb_hcd *, unsigned port_num); }; extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/core/hub.c 2004-09-06 16:37:52 -07:00 @@ -1095,6 +1095,10 @@ {} #endif +#ifdef CONFIG_USB_OTG +#include "otg_whitelist.h" +#endif + /** * usb_new_device - perform initial device setup (usbcore-internal) * @udev: newly addressed device (in ADDRESS state) @@ -1144,6 +1148,79 @@ show_string(udev, "SerialNumber", udev->descriptor.iSerialNumber); +#ifdef CONFIG_USB_OTG + /* + * OTG-aware devices on OTG-capable root hubs may be able to use SRP, + * to wake us after we've powered off VBUS; and HNP, switching roles + * "host" to "peripheral". The OTG descriptor helps figure this out. + */ + if (!udev->bus->is_b_host + && udev->config + && udev->parent == udev->bus->root_hub) { + struct usb_otg_descriptor *desc = 0; + struct usb_bus *bus = udev->bus; + + /* descriptor may appear anywhere in config */ + if (__usb_get_extra_descriptor (udev->rawdescriptors[0], + udev->config[0].desc.wTotalLength, + USB_DT_OTG, (void **) &desc) == 0) { + if (desc->bmAttributes & USB_OTG_HNP) { + unsigned port; + struct usb_device *root = udev->parent; + + for (port = 0; port < root->maxchild; port++) { + if (root->children[port] == udev) + break; + } + port++; + + dev_info(&udev->dev, + "Dual-Role OTG device on %sHNP port\n", + (port == bus->otg_port) + ? "" : "non-"); + + /* enable HNP before suspend, it's simpler */ + if (port == bus->otg_port) + bus->b_hnp_enable = 1; + err = usb_control_msg(udev, + usb_sndctrlpipe(udev, 0), + USB_REQ_SET_FEATURE, 0, + bus->b_hnp_enable + ? USB_DEVICE_B_HNP_ENABLE + : USB_DEVICE_A_ALT_HNP_SUPPORT, + 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); + if (err < 0) { + /* OTG MESSAGE: report errors here, + * customize to match your product. + */ + dev_info(&udev->dev, + "can't set HNP mode; %d\n", + err); + bus->b_hnp_enable = 0; + } + } + } + } + + if (!is_targeted(udev)) { + + /* Maybe it can talk to us, though we can't talk to it. + * (Includes HNP test device.) + */ + if (udev->bus->b_hnp_enable || udev->bus->is_b_host) { + static int __usb_suspend_device (struct usb_device *, + int port, u32 state); + err = __usb_suspend_device(udev, + udev->bus->otg_port - 1, + PM_SUSPEND_MEM); + if (err < 0) + dev_dbg(&udev->dev, "HNP fail, %d\n", err); + } + err = -ENODEV; + goto fail; + } +#endif + /* put device-specific files into sysfs */ err = device_add (&udev->dev); if (err) { @@ -1934,6 +2011,10 @@ hdev->bus->b_hnp_enable = 0; } + retval = clear_port_feature(hdev, port, USB_PORT_FEAT_SUSPEND); + if (retval < 0 && retval != -EPIPE) + dev_dbg(&udev->dev, "can't clear suspend; %d\n", retval); + /* Some low speed devices have problems with the quick delay, so */ /* be a bit pessimistic with those devices. RHbug #23670 */ if (oldspeed == USB_SPEED_LOW) @@ -2159,6 +2240,12 @@ if (hdev->children[port]) usb_disconnect(&hdev->children[port]); clear_bit(port, hub->change_bits); + +#ifdef CONFIG_USB_OTG + /* during HNP, don't repeat the debounce */ + if (hdev->bus->is_b_host) + portchange &= ~USB_PORT_STAT_C_CONNECTION; +#endif if (portchange & USB_PORT_STAT_C_CONNECTION) { status = hub_port_debounce(hdev, port); diff -Nru a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h --- a/drivers/usb/core/hub.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/core/hub.h 2004-09-06 16:37:51 -07:00 @@ -190,8 +190,8 @@ struct usb_device *hdev; struct urb *urb; /* for interrupt polling pipe */ - /* buffer for urb ... 1 bit each for hub and children, rounded up */ - char (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8]; + /* buffer for urb ... with extra space in case of babble */ + char (*buffer)[8]; dma_addr_t buffer_dma; /* DMA address for buffer */ union { struct usb_hub_status hub; diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/core/message.c 2004-09-06 16:37:51 -07:00 @@ -248,7 +248,7 @@ * unlink pending urbs so they won't rx/tx bad data. */ for (i = 0, found = 0; i < io->entries; i++) { - if (!io->urbs [i]) + if (!io->urbs [i] || !io->urbs [i]->dev) continue; if (found) { status = usb_unlink_urb (io->urbs [i]); @@ -337,7 +337,7 @@ if (io->entries <= 0) return io->entries; - io->count = 0; + io->count = io->entries; io->urbs = kmalloc (io->entries * sizeof *io->urbs, mem_flags); if (!io->urbs) goto nomem; @@ -347,7 +347,7 @@ if (usb_pipein (pipe)) urb_flags |= URB_SHORT_NOT_OK; - for (i = 0; i < io->entries; i++, io->count = i) { + for (i = 0; i < io->entries; i++) { unsigned len; io->urbs [i] = usb_alloc_urb (0, mem_flags); @@ -477,24 +477,19 @@ /* fail any uncompleted urbs */ default: - spin_lock_irq (&io->lock); - io->count -= entries - i; - if (io->status == -EINPROGRESS) - io->status = retval; - if (io->count == 0) - complete (&io->complete); - spin_unlock_irq (&io->lock); - - io->urbs[i]->dev = NULL; + io->urbs [i]->dev = NULL; io->urbs [i]->status = retval; dev_dbg (&io->dev->dev, "%s, submit --> %d\n", __FUNCTION__, retval); usb_sg_cancel (io); } spin_lock_irq (&io->lock); - if (retval && io->status == -ECONNRESET) + if (retval && (io->status == 0 || io->status == -ECONNRESET)) io->status = retval; } + io->count -= entries - i; + if (io->count == 0) + complete (&io->complete); spin_unlock_irq (&io->lock); /* OK, yes, this could be packaged as non-blocking. @@ -1196,7 +1191,7 @@ struct usb_interface_cache *intfc = altsetting_to_usb_interface_cache(intf->altsetting); - kref_put(&intfc->ref); + kref_put(&intfc->ref, usb_release_interface_cache); kfree(intf); } diff -Nru a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/core/otg_whitelist.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,112 @@ +/* + * drivers/usb/core/otg_whitelist.h + * + * Copyright (C) 2004 Texas Instruments + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +/* + * This OTG Whitelist is the OTG "Targeted Peripheral List". It should + * mostly use of USB_DEVICE() or USB_DEVICE_VER() entries.. + * + * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING! + */ + +static struct usb_device_id whitelist_table [] = { + +/* hubs are optional in OTG, but very handy ... */ +{ USB_DEVICE_INFO(USB_CLASS_HUB, 0, 0), }, +{ USB_DEVICE_INFO(USB_CLASS_HUB, 0, 1), }, + +#ifdef CONFIG_USB_PRINTER /* ignoring nonstatic linkage! */ +/* FIXME actually, printers are NOT supposed to use device classes; + * they're supposed to use interface classes... + */ +{ USB_DEVICE_INFO(7, 1, 1) }, +{ USB_DEVICE_INFO(7, 1, 2) }, +{ USB_DEVICE_INFO(7, 1, 3) }, +#endif + +#ifdef CONFIG_USB_CDCETHER +/* Linux-USB CDC Ethernet gadget */ +{ USB_DEVICE(0x0525, 0xa4a1), }, +/* Linux-USB CDC Ethernet + RNDIS gadget */ +{ USB_DEVICE(0x0525, 0xa4a2), }, +#endif + +#if defined(CONFIG_USB_TEST) || defined(CONFIG_USB_TEST_MODULE) +/* gadget zero, for testing */ +{ USB_DEVICE(0x0525, 0xa4a0), }, +#endif + +{ } /* Terminating entry */ +}; + +static int is_targeted(struct usb_device *dev) +{ + struct usb_device_id *id = whitelist_table; + + /* possible in developer configs only! */ + if (!dev->bus->otg_port) + return 1; + + /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ + if (dev->descriptor.idVendor == 0x1a0a + && dev->descriptor.idProduct == 0xbadd) + return 0; + + /* NOTE: can't use usb_match_id() since interface caches + * aren't set up yet. this is cut/paste from that code. + */ + for (id = whitelist_table; id->match_flags; id++) { + if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && + id->idVendor != dev->descriptor.idVendor) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && + id->idProduct != dev->descriptor.idProduct) + continue; + + /* No need to test id->bcdDevice_lo != 0, since 0 is never + greater than any unsigned number. */ + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && + (id->bcdDevice_lo > dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && + (id->bcdDevice_hi < dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && + (id->bDeviceClass != dev->descriptor.bDeviceClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && + (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && + (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) + continue; + + return 1; + } + + /* add other match criteria here ... */ + + + /* OTG MESSAGE: report errors here, customize to match your product */ + dev_err(&dev->dev, "device v%04x p%04x is not supported\n", + dev->descriptor.idVendor, + dev->descriptor.idProduct); +#ifdef CONFIG_USB_OTG_WHITELIST + return 0; +#else + return 1; +#endif +} + diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c --- a/drivers/usb/core/urb.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/core/urb.c 2004-09-06 16:37:53 -07:00 @@ -39,7 +39,7 @@ { if (urb) { memset(urb, 0, sizeof(*urb)); - kref_init(&urb->kref, urb_destroy); + kref_init(&urb->kref); spin_lock_init(&urb->lock); } } @@ -88,7 +88,7 @@ void usb_free_urb(struct urb *urb) { if (urb) - kref_put(&urb->kref); + kref_put(&urb->kref, urb_destroy); } /** diff -Nru a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h --- a/drivers/usb/core/usb.h 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/core/usb.h 2004-09-06 16:37:51 -07:00 @@ -10,6 +10,7 @@ extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr); extern void usb_disable_interface (struct usb_device *dev, struct usb_interface *intf); +extern void usb_release_interface_cache(struct kref *ref); extern void usb_disable_device (struct usb_device *dev, int skip_ep0); extern void usb_enable_endpoint (struct usb_device *dev, diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig --- a/drivers/usb/gadget/Kconfig 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/gadget/Kconfig 2004-09-06 16:37:51 -07:00 @@ -135,6 +135,18 @@ depends on USB_GADGET_SA1100 default USB_GADGET +config USB_GADGET_LH7A40X + boolean "LH7A40X" + depends on ARCH_LH7A40X + help + This driver provides USB Device Controller driver for LH7A40x + +config USB_LH7A40X + tristate + depends on USB_GADGET_LH7A40X + default USB_GADGET + + config USB_GADGET_DUMMY_HCD boolean "Dummy HCD (DEVELOPMENT)" depends on USB && EXPERIMENTAL @@ -162,6 +174,41 @@ tristate depends on USB_GADGET_DUMMY_HCD default USB_GADGET + +config USB_GADGET_OMAP + boolean "OMAP USB Device Controller" + depends on ARCH_OMAP + select ISP1301_OMAP if MACH_OMAP_H2 + help + Many Texas Instruments OMAP processors have flexible full + speed USB device controllers, with support for up to 30 + endpoints (plus endpoint zero). This driver supports the + controller in the OMAP 1611, and should work with controllers + in other OMAP processors too, given minor tweaks. + + Say "y" to link the driver statically, or "m" to build a + dynamically linked module called "omap_udc" and force all + gadget drivers to also be dynamically linked. + +config USB_OMAP + tristate + depends on USB_GADGET_OMAP + default USB_GADGET + +config USB_OTG + boolean "OTG Support" + depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD + help + The most notable feature of USB OTG is support for a + "Dual-Role" device, which can act as either a device + or a host. The initial role choice can be changed + later, when two dual-role devices talk to each other. + + Select this only if your OMAP board has a Mini-AB connector. + +config USB_OMAP_PROC + boolean "/proc/driver/udc file" + depends on USB_GADGET_OMAP endchoice diff -Nru a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile --- a/drivers/usb/gadget/Makefile 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/gadget/Makefile 2004-09-06 16:37:50 -07:00 @@ -5,6 +5,8 @@ obj-$(CONFIG_USB_NET2280) += net2280.o obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o obj-$(CONFIG_USB_GOKU) += goku_udc.o +obj-$(CONFIG_USB_OMAP) += omap_udc.o +obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o # # USB gadget drivers diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c --- a/drivers/usb/gadget/ether.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/gadget/ether.c 2004-09-06 16:37:55 -07:00 @@ -63,6 +63,7 @@ /* * Ethernet gadget driver -- with CDC and non-CDC options + * Builds on hardware support for a full duplex link. * * CDC Ethernet is the standard USB solution for sending Ethernet frames * using USB. Real hardware tends to use the same framing protocol but look @@ -242,6 +243,10 @@ #define DEV_CONFIG_SUBSET #endif +#ifdef CONFIG_USB_GADGET_LH7A40X +#define DEV_CONFIG_CDC +#endif + #ifdef CONFIG_USB_GADGET_SA1100 /* use non-CDC for backwards compatibility */ #define DEV_CONFIG_SUBSET @@ -855,7 +860,7 @@ static char ethaddr [2 * ETH_ALEN + 1]; #endif -/* static strings, in iso 8859/1 */ +/* static strings, in UTF-8 */ static struct usb_string strings [] = { { STRING_MANUFACTURER, manufacturer, }, { STRING_PRODUCT, product_desc, }, @@ -897,9 +902,9 @@ if (type == USB_DT_OTHER_SPEED_CONFIG) hs = !hs; -#define which_fn(t) (hs ? & hs_ ## t ## _function : & fs_ ## t ## _function) +#define which_fn(t) (hs ? hs_ ## t ## _function : fs_ ## t ## _function) #else -#define which_fn(t) (& fs_ ## t ## _function) +#define which_fn(t) (fs_ ## t ## _function) #endif if (index >= device_desc.bNumConfigurations) @@ -911,14 +916,12 @@ */ if (device_desc.bNumConfigurations == 2 && index == 0) { config = &rndis_config; - function = (const struct usb_descriptor_header **) - which_fn (rndis); + function = which_fn (rndis); } else #endif { config = ð_config; - function = (const struct usb_descriptor_header **) - which_fn (eth); + function = which_fn (eth); } /* for now, don't advertise srp-only devices */ @@ -2329,6 +2332,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0207); } else if (gadget_is_omap (gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208); + } else if (gadget_is_lh7a40x(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else { /* can't assume CDC works. don't want to default to * anything less functional on CDC-capable hardware, diff -Nru a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c --- a/drivers/usb/gadget/file_storage.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/gadget/file_storage.c 2004-09-06 16:37:55 -07:00 @@ -3713,6 +3713,8 @@ mod_data.release = __constant_cpu_to_le16(0x0307); else if (gadget_is_omap(fsg->gadget)) mod_data.release = __constant_cpu_to_le16(0x0308); + else if (gadget_is_lh7a40x(gadget)) + mod_data.release = __constant_cpu_to_le16 (0x0309); else { WARN(fsg, "controller '%s' not recognized\n", fsg->gadget->name); diff -Nru a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h --- a/drivers/usb/gadget/gadget_chips.h 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/gadget/gadget_chips.h 2004-09-06 16:37:50 -07:00 @@ -44,6 +44,12 @@ #define gadget_is_sa1100(g) 0 #endif +#ifdef CONFIG_USB_GADGET_LH7A40X +#define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name) +#else +#define gadget_is_lh7a40x(g) 0 +#endif + #ifdef CONFIG_USB_GADGET_MQ11XX #define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name) #else diff -Nru a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c --- a/drivers/usb/gadget/inode.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/gadget/inode.c 2004-09-06 16:37:54 -07:00 @@ -1,7 +1,7 @@ /* * inode.c -- user mode filesystem api for usb gadget controllers * - * Copyright (C) 2003 David Brownell + * Copyright (C) 2003-2004 David Brownell * Copyright (C) 2003 Agilent Technologies * * This program is free software; you can redistribute it and/or modify @@ -71,7 +71,7 @@ */ #define DRIVER_DESC "USB Gadget filesystem" -#define DRIVER_VERSION "18 Nov 2003" +#define DRIVER_VERSION "24 Aug 2004" static const char driver_desc [] = DRIVER_DESC; static const char shortname [] = "gadgetfs"; @@ -229,37 +229,12 @@ /*----------------------------------------------------------------------*/ /* most "how to use the hardware" policy choices are in userspace: - * mapping endpoint roles the driver needs to the capabilities that - * the usb controller exposes. + * mapping endpoint roles (which the driver needs) to the capabilities + * which the usb controller has. most of those capabilities are exposed + * implicitly, starting with the driver name and then endpoint names. */ -#ifdef CONFIG_USB_GADGET_DUMMY_HCD -/* act (mostly) like a net2280 */ -#define CONFIG_USB_GADGET_NET2280 -#endif - -#ifdef CONFIG_USB_GADGET_NET2280 -#define CHIP "net2280" -#define HIGHSPEED -#endif - -#ifdef CONFIG_USB_GADGET_PXA2XX -#define CHIP "pxa2xx_udc" -/* earlier hardware doesn't have UDCCFR, races set_{config,interface} */ -#warning works best with pxa255 or newer -#endif - -#ifdef CONFIG_USB_GADGET_GOKU -#define CHIP "goku_udc" -#endif - -#ifdef CONFIG_USB_GADGET_OMAP -#define CHIP "omap_udc" -#endif - -#ifdef CONFIG_USB_GADGET_SA1100 -#define CHIP "sa1100" -#endif +static const char *CHIP; /*----------------------------------------------------------------------*/ @@ -558,7 +533,7 @@ static int ep_aio_cancel(struct kiocb *iocb, struct io_event *e) { - struct kiocb_priv *priv = (void *) &iocb->private; + struct kiocb_priv *priv = iocb->private; struct ep_data *epdata; int value; @@ -577,10 +552,10 @@ return value; } -static long ep_aio_read_retry(struct kiocb *iocb) +static ssize_t ep_aio_read_retry(struct kiocb *iocb) { - struct kiocb_priv *priv = (void *) &iocb->private; - int status = priv->actual; + struct kiocb_priv *priv = iocb->private; + ssize_t status = priv->actual; /* we "retry" to get the right mm context for this: */ status = copy_to_user(priv->ubuf, priv->buf, priv->actual); @@ -589,6 +564,7 @@ else status = priv->actual; kfree(priv->buf); + kfree(priv); aio_put_req(iocb); return status; } @@ -596,7 +572,7 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req) { struct kiocb *iocb = req->context; - struct kiocb_priv *priv = (void *) &iocb->private; + struct kiocb_priv *priv = iocb->private; struct ep_data *epdata = priv->epdata; /* lock against disconnect (and ideally, cancel) */ @@ -607,6 +583,8 @@ || unlikely(0 == req->actual) || unlikely(kiocbIsCancelled(iocb))) { kfree(req->buf); + kfree(priv); + iocb->private = NULL; /* aio_complete() reports bytes-transferred _and_ faults */ if (unlikely(kiocbIsCancelled(iocb))) aio_put_req(iocb); @@ -631,17 +609,33 @@ } static ssize_t -ep_aio_rwtail(struct kiocb *iocb, char *buf, size_t len, struct ep_data *epdata) +ep_aio_rwtail( + struct kiocb *iocb, + char *buf, + size_t len, + struct ep_data *epdata, + char __user *ubuf +) { struct kiocb_priv *priv = (void *) &iocb->private; struct usb_request *req; ssize_t value; - value = get_ready_ep(iocb->ki_filp->f_flags, epdata); - if (unlikely(value < 0)) { + priv = kmalloc(sizeof *priv, GFP_KERNEL); + if (!priv) { + value = -ENOMEM; +fail: kfree(buf); return value; } + iocb->private = priv; + priv->ubuf = ubuf; + + value = get_ready_ep(iocb->ki_filp->f_flags, epdata); + if (unlikely(value < 0)) { + kfree(priv); + goto fail; + } iocb->ki_cancel = ep_aio_cancel; get_ep(epdata); @@ -671,9 +665,10 @@ up(&epdata->lock); - if (unlikely(value)) + if (unlikely(value)) { + kfree(priv); put_ep(epdata); - else + } else value = -EIOCBQUEUED; return value; } @@ -681,7 +676,6 @@ static ssize_t ep_aio_read(struct kiocb *iocb, char __user *ubuf, size_t len, loff_t o) { - struct kiocb_priv *priv = (void *) &iocb->private; struct ep_data *epdata = iocb->ki_filp->private_data; char *buf; @@ -691,8 +685,7 @@ if (unlikely(!buf)) return -ENOMEM; iocb->ki_retry = ep_aio_read_retry; - priv->ubuf = ubuf; - return ep_aio_rwtail(iocb, buf, len, epdata); + return ep_aio_rwtail(iocb, buf, len, epdata, ubuf); } static ssize_t @@ -710,7 +703,7 @@ kfree(buf); return -EFAULT; } - return ep_aio_rwtail(iocb, buf, len, epdata); + return ep_aio_rwtail(iocb, buf, len, epdata, NULL); } /*----------------------------------------------------------------------*/ @@ -718,6 +711,8 @@ /* used after endpoint configuration */ static struct file_operations ep_io_operations = { .owner = THIS_MODULE, + .llseek = no_llseek, + .read = ep_read, .write = ep_write, .ioctl = ep_ioctl, @@ -874,6 +869,8 @@ /* used before endpoint configuration */ static struct file_operations ep_config_operations = { .owner = THIS_MODULE, + .llseek = no_llseek, + .open = ep_open, .write = ep_config, .release = ep_release, @@ -980,6 +977,18 @@ retval = usb_ep_queue (ep, req, GFP_ATOMIC); dev->state = STATE_CONNECTED; + /* assume that was SET_CONFIGURATION */ + if (dev->current_config) { + unsigned power; +#ifdef HIGHSPEED + if (dev->gadget->speed == USB_SPEED_HIGH) + power = dev->hs_config->bMaxPower; + else +#endif + power = dev->config->bMaxPower; + usb_gadget_vbus_draw(dev->gadget, 2 * power); + } + } else { /* collect OUT data */ if ((fd->f_flags & O_NONBLOCK) != 0 && !dev->setup_out_ready) { @@ -1230,6 +1239,8 @@ /* used after device configuration */ static struct file_operations ep0_io_operations = { .owner = THIS_MODULE, + .llseek = no_llseek, + .read = ep0_read, .write = ep0_write, .fasync = ep0_fasync, @@ -1406,19 +1417,25 @@ if (0 == (u8) ctrl->wValue) { value = 0; dev->current_config = 0; + usb_gadget_vbus_draw(gadget, 8 /* mA */ ); // user mode expected to disable endpoints } else { - u8 config; + u8 config, power; #ifdef HIGHSPEED - if (gadget->speed == USB_SPEED_HIGH) + if (gadget->speed == USB_SPEED_HIGH) { config = dev->hs_config->bConfigurationValue; - else + power = dev->hs_config->bMaxPower; + } else #endif + { config = dev->config->bConfigurationValue; + power = dev->config->bMaxPower; + } if (config == (u8) ctrl->wValue) { value = 0; dev->current_config = config; + usb_gadget_vbus_draw(gadget, 2 * power); } } @@ -1636,8 +1653,8 @@ if (!dev) return -ESRCH; if (0 != strcmp (CHIP, gadget->name)) { - printk (KERN_ERR "%s expected " CHIP " controller not %s\n", - shortname, gadget->name); + printk (KERN_ERR "%s expected %s controller not %s\n", + shortname, CHIP, gadget->name); return -ENODEV; } @@ -1727,6 +1744,26 @@ /*----------------------------------------------------------------------*/ +static void gadgetfs_nop(struct usb_gadget *arg) { } + +static int gadgetfs_probe (struct usb_gadget *gadget) +{ + CHIP = gadget->name; + return -EISNAM; +} + +static struct usb_gadget_driver probe_driver = { + .speed = USB_SPEED_HIGH, + .bind = gadgetfs_probe, + .unbind = gadgetfs_nop, + .setup = (void *)gadgetfs_nop, + .disconnect = gadgetfs_nop, + .driver = { + .name = "nop", + }, +}; + + /* DEVICE INITIALIZATION * * fd = open ("/dev/gadget/$CHIP", O_RDWR) @@ -1763,6 +1800,7 @@ && config->bConfigurationValue != 0 && (config->bmAttributes & USB_CONFIG_ATT_ONE) != 0 && (config->bmAttributes & USB_CONFIG_ATT_WAKEUP) == 0; + /* FIXME if gadget->is_otg, _must_ include an otg descriptor */ /* FIXME check lengths: walk to end */ } @@ -1881,6 +1919,8 @@ static struct file_operations dev_init_operations = { .owner = THIS_MODULE, + .llseek = no_llseek, + .open = dev_open, .write = dev_config, .fasync = ep0_fasync, @@ -1975,6 +2015,11 @@ if (the_device) return -ESRCH; + + /* fake probe to determine $CHIP */ + (void) usb_gadget_register_driver (&probe_driver); + if (!CHIP) + return -ENODEV; /* superblock */ sb->s_blocksize = PAGE_CACHE_SIZE; diff -Nru a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/gadget/lh7a40x_udc.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,2168 @@ +/* + * linux/drivers/usb/gadget/lh7a40x_udc.c + * Sharp LH7A40x on-chip full speed USB device controllers + * + * Copyright (C) 2004 Mikko Lahteenmaki, Nordic ID + * Copyright (C) 2004 Bo Henriksen, Nordic ID + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "lh7a40x_udc.h" + +//#define DEBUG printk +//#define DEBUG_EP0 printk +//#define DEBUG_SETUP printk + +#ifndef DEBUG_EP0 +# define DEBUG_EP0(fmt,args...) +#endif +#ifndef DEBUG_SETUP +# define DEBUG_SETUP(fmt,args...) +#endif +#ifndef DEBUG +# define NO_STATES +# define DEBUG(fmt,args...) +#endif + +#define DRIVER_DESC "LH7A40x USB Device Controller" +#define DRIVER_VERSION __DATE__ + +#ifndef _BIT /* FIXME - what happended to _BIT in 2.6.7bk18? */ +#define _BIT(x) (1<<(x)) +#endif + +struct lh7a40x_udc *the_controller; + +static const char driver_name[] = "lh7a40x_udc"; +static const char driver_desc[] = DRIVER_DESC; +static const char ep0name[] = "ep0-control"; + +/* + Local definintions. +*/ +#define UDC_PROC_FILE + +#ifndef NO_STATES +static char *state_names[] = { + "WAIT_FOR_SETUP", + "DATA_STATE_XMIT", + "DATA_STATE_NEED_ZLP", + "WAIT_FOR_OUT_STATUS", + "DATA_STATE_RECV" +}; +#endif + +/* + Local declarations. +*/ +static int lh7a40x_ep_enable(struct usb_ep *ep, + const struct usb_endpoint_descriptor *); +static int lh7a40x_ep_disable(struct usb_ep *ep); +static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, int); +static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *); +static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned, dma_addr_t *, + int); +static void lh7a40x_free_buffer(struct usb_ep *ep, void *, dma_addr_t, + unsigned); +static int lh7a40x_queue(struct usb_ep *ep, struct usb_request *, int); +static int lh7a40x_dequeue(struct usb_ep *ep, struct usb_request *); +static int lh7a40x_set_halt(struct usb_ep *ep, int); +static int lh7a40x_fifo_status(struct usb_ep *ep); +static int lh7a40x_fifo_status(struct usb_ep *ep); +static void lh7a40x_fifo_flush(struct usb_ep *ep); +static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep); +static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr); + +static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, + int status); +static void pio_irq_enable(int bEndpointAddress); +static void pio_irq_disable(int bEndpointAddress); +static void stop_activity(struct lh7a40x_udc *dev, + struct usb_gadget_driver *driver); +static void flush(struct lh7a40x_ep *ep); +static void udc_enable(struct lh7a40x_udc *dev); +static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address); + +static struct usb_ep_ops lh7a40x_ep_ops = { + .enable = lh7a40x_ep_enable, + .disable = lh7a40x_ep_disable, + + .alloc_request = lh7a40x_alloc_request, + .free_request = lh7a40x_free_request, + + .alloc_buffer = lh7a40x_alloc_buffer, + .free_buffer = lh7a40x_free_buffer, + + .queue = lh7a40x_queue, + .dequeue = lh7a40x_dequeue, + + .set_halt = lh7a40x_set_halt, + .fifo_status = lh7a40x_fifo_status, + .fifo_flush = lh7a40x_fifo_flush, +}; + +/* Inline code */ + +static __inline__ int write_packet(struct lh7a40x_ep *ep, + struct lh7a40x_request *req, int max) +{ + u8 *buf; + int length, count; + volatile u32 *fifo = (volatile u32 *)ep->fifo; + + buf = req->req.buf + req->req.actual; + prefetch(buf); + + length = req->req.length - req->req.actual; + length = min(length, max); + req->req.actual += length; + + DEBUG("Write %d (max %d), fifo %p\n", length, max, fifo); + + count = length; + while (count--) { + *fifo = *buf++; + } + + return length; +} + +static __inline__ void usb_set_index(u32 ep) +{ + *(volatile u32 *)io_p2v(USB_INDEX) = ep; +} + +static __inline__ u32 usb_read(u32 port) +{ + return *(volatile u32 *)io_p2v(port); +} + +static __inline__ void usb_write(u32 val, u32 port) +{ + *(volatile u32 *)io_p2v(port) = val; +} + +static __inline__ void usb_set(u32 val, u32 port) +{ + volatile u32 *ioport = (volatile u32 *)io_p2v(port); + u32 after = (*ioport) | val; + *ioport = after; +} + +static __inline__ void usb_clear(u32 val, u32 port) +{ + volatile u32 *ioport = (volatile u32 *)io_p2v(port); + u32 after = (*ioport) & ~val; + *ioport = after; +} + +/*-------------------------------------------------------------------------*/ + +#define GPIO_PORTC_DR (0x80000E08) +#define GPIO_PORTC_DDR (0x80000E18) +#define GPIO_PORTC_PDR (0x80000E70) + +/* get port C pin data register */ +#define get_portc_pdr(bit) ((usb_read(GPIO_PORTC_PDR) & _BIT(bit)) != 0) +/* get port C data direction register */ +#define get_portc_ddr(bit) ((usb_read(GPIO_PORTC_DDR) & _BIT(bit)) != 0) +/* set port C data register */ +#define set_portc_dr(bit, val) (val ? usb_set(_BIT(bit), GPIO_PORTC_DR) : usb_clear(_BIT(bit), GPIO_PORTC_DR)) +/* set port C data direction register */ +#define set_portc_ddr(bit, val) (val ? usb_set(_BIT(bit), GPIO_PORTC_DDR) : usb_clear(_BIT(bit), GPIO_PORTC_DDR)) + +/* + * LPD7A404 GPIO's: + * Port C bit 1 = USB Port 1 Power Enable + * Port C bit 2 = USB Port 1 Data Carrier Detect + */ +#define is_usb_connected() get_portc_pdr(2) + +#ifdef UDC_PROC_FILE + +static const char proc_node_name[] = "driver/udc"; + +static int +udc_proc_read(char *page, char **start, off_t off, int count, + int *eof, void *_dev) +{ + char *buf = page; + struct lh7a40x_udc *dev = _dev; + char *next = buf; + unsigned size = count; + unsigned long flags; + int t; + + if (off != 0) + return 0; + + local_irq_save(flags); + + /* basic device status */ + t = scnprintf(next, size, + DRIVER_DESC "\n" + "%s version: %s\n" + "Gadget driver: %s\n" + "Host: %s\n\n", + driver_name, DRIVER_VERSION, + dev->driver ? dev->driver->driver.name : "(none)", + is_usb_connected()? "full speed" : "disconnected"); + size -= t; + next += t; + + t = scnprintf(next, size, + "GPIO:\n" + " Port C bit 1: %d, dir %d\n" + " Port C bit 2: %d, dir %d\n\n", + get_portc_pdr(1), get_portc_ddr(1), + get_portc_pdr(2), get_portc_ddr(2) + ); + size -= t; + next += t; + + t = scnprintf(next, size, + "DCP pullup: %d\n\n", + (usb_read(USB_PM) & PM_USB_DCP) != 0); + size -= t; + next += t; + + local_irq_restore(flags); + *eof = 1; + return count - size; +} + +#define create_proc_files() create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev) +#define remove_proc_files() remove_proc_entry(proc_node_name, NULL) + +#else /* !UDC_PROC_FILE */ + +#define create_proc_files() do {} while (0) +#define remove_proc_files() do {} while (0) + +#endif /* UDC_PROC_FILE */ + +/* + * udc_disable - disable USB device controller + */ +static void udc_disable(struct lh7a40x_udc *dev) +{ + DEBUG("%s, %p\n", __FUNCTION__, dev); + + udc_set_address(dev, 0); + + /* Disable interrupts */ + usb_write(0, USB_IN_INT_EN); + usb_write(0, USB_OUT_INT_EN); + usb_write(0, USB_INT_EN); + + /* Disable the USB */ + usb_write(0, USB_PM); + +#ifdef CONFIG_ARCH_LH7A404 + /* Disable USB power */ + set_portc_dr(1, 0); +#endif + + /* if hardware supports it, disconnect from usb */ + /* make_usb_disappear(); */ + + dev->ep0state = WAIT_FOR_SETUP; + dev->gadget.speed = USB_SPEED_UNKNOWN; + dev->usb_address = 0; +} + +/* + * udc_reinit - initialize software state + */ +static void udc_reinit(struct lh7a40x_udc *dev) +{ + u32 i; + + DEBUG("%s, %p\n", __FUNCTION__, dev); + + /* device/ep0 records init */ + INIT_LIST_HEAD(&dev->gadget.ep_list); + INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); + dev->ep0state = WAIT_FOR_SETUP; + + /* basic endpoint records init */ + for (i = 0; i < UDC_MAX_ENDPOINTS; i++) { + struct lh7a40x_ep *ep = &dev->ep[i]; + + if (i != 0) + list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); + + ep->desc = 0; + ep->stopped = 0; + INIT_LIST_HEAD(&ep->queue); + ep->pio_irqs = 0; + } + + /* the rest was statically initialized, and is read-only */ +} + +#define BYTES2MAXP(x) (x / 8) +#define MAXP2BYTES(x) (x * 8) + +/* until it's enabled, this UDC should be completely invisible + * to any USB host. + */ +static void udc_enable(struct lh7a40x_udc *dev) +{ + int ep; + + DEBUG("%s, %p\n", __FUNCTION__, dev); + + dev->gadget.speed = USB_SPEED_UNKNOWN; + +#ifdef CONFIG_ARCH_LH7A404 + /* Set Port C bit 1 & 2 as output */ + set_portc_ddr(1, 1); + set_portc_ddr(2, 1); + + /* Enable USB power */ + set_portc_dr(1, 0); +#endif + + /* + * C.f Chapter 18.1.3.1 Initializing the USB + */ + + /* Disable the USB */ + usb_clear(PM_USB_ENABLE, USB_PM); + + /* Reset APB & I/O sides of the USB */ + usb_set(USB_RESET_APB | USB_RESET_IO, USB_RESET); + mdelay(5); + usb_clear(USB_RESET_APB | USB_RESET_IO, USB_RESET); + + /* Set MAXP values for each */ + for (ep = 0; ep < UDC_MAX_ENDPOINTS; ep++) { + struct lh7a40x_ep *ep_reg = &dev->ep[ep]; + u32 csr; + + usb_set_index(ep); + + switch (ep_reg->ep_type) { + case ep_bulk_in: + case ep_interrupt: + usb_clear(USB_IN_CSR2_USB_DMA_EN | USB_IN_CSR2_AUTO_SET, + ep_reg->csr2); + /* Fall through */ + case ep_control: + usb_write(BYTES2MAXP(ep_maxpacket(ep_reg)), + USB_IN_MAXP); + break; + case ep_bulk_out: + usb_clear(USB_OUT_CSR2_USB_DMA_EN | + USB_OUT_CSR2_AUTO_CLR, ep_reg->csr2); + usb_write(BYTES2MAXP(ep_maxpacket(ep_reg)), + USB_OUT_MAXP); + break; + } + + /* Read & Write CSR1, just in case */ + csr = usb_read(ep_reg->csr1); + usb_write(csr, ep_reg->csr1); + + flush(ep_reg); + } + + /* Disable interrupts */ + usb_write(0, USB_IN_INT_EN); + usb_write(0, USB_OUT_INT_EN); + usb_write(0, USB_INT_EN); + + /* Enable interrupts */ + usb_set(USB_IN_INT_EP0, USB_IN_INT_EN); + usb_set(USB_INT_RESET_INT | USB_INT_RESUME_INT, USB_INT_EN); + /* Dont enable rest of the interrupts */ + /* usb_set(USB_IN_INT_EP3 | USB_IN_INT_EP1 | USB_IN_INT_EP0, USB_IN_INT_EN); + usb_set(USB_OUT_INT_EP2, USB_OUT_INT_EN); */ + + /* Enable SUSPEND */ + usb_set(PM_ENABLE_SUSPEND, USB_PM); + + /* Enable the USB */ + usb_set(PM_USB_ENABLE, USB_PM); + +#ifdef CONFIG_ARCH_LH7A404 + /* NOTE: DOES NOT WORK! */ + /* Let host detect UDC: + * Software must write a 0 to the PMR:DCP_CTRL bit to turn this + * transistor on and pull the USBDP pin HIGH. + */ + /* usb_clear(PM_USB_DCP, USB_PM); + usb_set(PM_USB_DCP, USB_PM); */ +#endif +} + +/* + Register entry point for the peripheral controller driver. +*/ +int usb_gadget_register_driver(struct usb_gadget_driver *driver) +{ + struct lh7a40x_udc *dev = the_controller; + int retval; + + DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name); + + if (!driver + || driver->speed != USB_SPEED_FULL + || !driver->bind + || !driver->unbind || !driver->disconnect || !driver->setup) + return -EINVAL; + if (!dev) + return -ENODEV; + if (dev->driver) + return -EBUSY; + + /* first hook up the driver ... */ + dev->driver = driver; + dev->gadget.dev.driver = &driver->driver; + + device_add(&dev->gadget.dev); + retval = driver->bind(&dev->gadget); + if (retval) { + printk("%s: bind to driver %s --> error %d\n", dev->gadget.name, + driver->driver.name, retval); + device_del(&dev->gadget.dev); + + dev->driver = 0; + dev->gadget.dev.driver = 0; + return retval; + } + + /* ... then enable host detection and ep0; and we're ready + * for set_configuration as well as eventual disconnect. + * NOTE: this shouldn't power up until later. + */ + printk("%s: registered gadget driver '%s'\n", dev->gadget.name, + driver->driver.name); + + udc_enable(dev); + + return 0; +} + +EXPORT_SYMBOL(usb_gadget_register_driver); + +/* + Unregister entry point for the peripheral controller driver. +*/ +int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) +{ + struct lh7a40x_udc *dev = the_controller; + unsigned long flags; + + if (!dev) + return -ENODEV; + if (!driver || driver != dev->driver) + return -EINVAL; + + spin_lock_irqsave(&dev->lock, flags); + dev->driver = 0; + stop_activity(dev, driver); + spin_unlock_irqrestore(&dev->lock, flags); + + driver->unbind(&dev->gadget); + device_del(&dev->gadget.dev); + + udc_disable(dev); + + DEBUG("unregistered gadget driver '%s'\n", driver->driver.name); + return 0; +} + +EXPORT_SYMBOL(usb_gadget_unregister_driver); + +/*-------------------------------------------------------------------------*/ + +/** Write request to FIFO (max write == maxp size) + * Return: 0 = still running, 1 = completed, negative = errno + * NOTE: INDEX register must be set for EP + */ +static int write_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req) +{ + u32 max; + u32 csr; + + max = le16_to_cpu(ep->desc->wMaxPacketSize); + + csr = usb_read(ep->csr1); + DEBUG("CSR: %x %d\n", csr, csr & USB_IN_CSR1_FIFO_NOT_EMPTY); + + if (!(csr & USB_IN_CSR1_FIFO_NOT_EMPTY)) { + unsigned count; + int is_last, is_short; + + count = write_packet(ep, req, max); + usb_set(USB_IN_CSR1_IN_PKT_RDY, ep->csr1); + + /* last packet is usually short (or a zlp) */ + if (unlikely(count != max)) + is_last = is_short = 1; + else { + if (likely(req->req.length != req->req.actual) + || req->req.zero) + is_last = 0; + else + is_last = 1; + /* interrupt/iso maxpacket may not fill the fifo */ + is_short = unlikely(max < ep_maxpacket(ep)); + } + + DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__, + ep->ep.name, count, + is_last ? "/L" : "", is_short ? "/S" : "", + req->req.length - req->req.actual, req); + + /* requests complete when all IN data is in the FIFO */ + if (is_last) { + done(ep, req, 0); + if (list_empty(&ep->queue)) { + pio_irq_disable(ep_index(ep)); + } + return 1; + } + } else { + DEBUG("Hmm.. %d ep FIFO is not empty!\n", ep_index(ep)); + } + + return 0; +} + +/** Read to request from FIFO (max read == bytes in fifo) + * Return: 0 = still running, 1 = completed, negative = errno + * NOTE: INDEX register must be set for EP + */ +static int read_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req) +{ + u32 csr; + u8 *buf; + unsigned bufferspace, count, is_short; + volatile u32 *fifo = (volatile u32 *)ep->fifo; + + /* make sure there's a packet in the FIFO. */ + csr = usb_read(ep->csr1); + if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) { + DEBUG("%s: Packet NOT ready!\n", __FUNCTION__); + return -EINVAL; + } + + buf = req->req.buf + req->req.actual; + prefetchw(buf); + bufferspace = req->req.length - req->req.actual; + + /* read all bytes from this packet */ + count = usb_read(USB_OUT_FIFO_WC1); + req->req.actual += min(count, bufferspace); + + is_short = (count < ep->ep.maxpacket); + DEBUG("read %s %02x, %d bytes%s req %p %d/%d\n", + ep->ep.name, csr, count, + is_short ? "/S" : "", req, req->req.actual, req->req.length); + + while (likely(count-- != 0)) { + u8 byte = (u8) (*fifo & 0xff); + + if (unlikely(bufferspace == 0)) { + /* this happens when the driver's buffer + * is smaller than what the host sent. + * discard the extra data. + */ + if (req->req.status != -EOVERFLOW) + printk("%s overflow %d\n", ep->ep.name, count); + req->req.status = -EOVERFLOW; + } else { + *buf++ = byte; + bufferspace--; + } + } + + usb_clear(USB_OUT_CSR1_OUT_PKT_RDY, ep->csr1); + + /* completion */ + if (is_short || req->req.actual == req->req.length) { + done(ep, req, 0); + usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); + + if (list_empty(&ep->queue)) + pio_irq_disable(ep_index(ep)); + return 1; + } + + /* finished that packet. the next one may be waiting... */ + return 0; +} + +/* + * done - retire a request; caller blocked irqs + * INDEX register is preserved to keep same + */ +static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status) +{ + unsigned int stopped = ep->stopped; + u32 index; + + DEBUG("%s, %p\n", __FUNCTION__, ep); + list_del_init(&req->queue); + + if (likely(req->req.status == -EINPROGRESS)) + req->req.status = status; + else + status = req->req.status; + + if (status && status != -ESHUTDOWN) + DEBUG("complete %s req %p stat %d len %u/%u\n", + ep->ep.name, &req->req, status, + req->req.actual, req->req.length); + + /* don't modify queue heads during completion callback */ + ep->stopped = 1; + /* Read current index (completion may modify it) */ + index = usb_read(USB_INDEX); + + spin_unlock(&ep->dev->lock); + req->req.complete(&ep->ep, &req->req); + spin_lock(&ep->dev->lock); + + /* Restore index */ + usb_set_index(index); + ep->stopped = stopped; +} + +/** Enable EP interrupt */ +static void pio_irq_enable(int ep) +{ + DEBUG("%s: %d\n", __FUNCTION__, ep); + + switch (ep) { + case 1: + usb_set(USB_IN_INT_EP1, USB_IN_INT_EN); + break; + case 2: + usb_set(USB_OUT_INT_EP2, USB_OUT_INT_EN); + break; + case 3: + usb_set(USB_IN_INT_EP3, USB_IN_INT_EN); + break; + default: + DEBUG("Unknown endpoint: %d\n", ep); + break; + } +} + +/** Disable EP interrupt */ +static void pio_irq_disable(int ep) +{ + DEBUG("%s: %d\n", __FUNCTION__, ep); + + switch (ep) { + case 1: + usb_clear(USB_IN_INT_EP1, USB_IN_INT_EN); + break; + case 2: + usb_clear(USB_OUT_INT_EP2, USB_OUT_INT_EN); + break; + case 3: + usb_clear(USB_IN_INT_EP3, USB_IN_INT_EN); + break; + default: + DEBUG("Unknown endpoint: %d\n", ep); + break; + } +} + +/* + * nuke - dequeue ALL requests + */ +void nuke(struct lh7a40x_ep *ep, int status) +{ + struct lh7a40x_request *req; + + DEBUG("%s, %p\n", __FUNCTION__, ep); + + /* Flush FIFO */ + flush(ep); + + /* called with irqs blocked */ + while (!list_empty(&ep->queue)) { + req = list_entry(ep->queue.next, struct lh7a40x_request, queue); + done(ep, req, status); + } + + /* Disable IRQ if EP is enabled (has decriptor) */ + if (ep->desc) + pio_irq_disable(ep_index(ep)); +} + +/* +void nuke_all(struct lh7a40x_udc *dev) +{ + int n; + for(n=0; nep[n]; + usb_set_index(n); + nuke(ep, 0); + } +}*/ + +/* +static void flush_all(struct lh7a40x_udc *dev) +{ + int n; + for (n = 0; n < UDC_MAX_ENDPOINTS; n++) + { + struct lh7a40x_ep *ep = &dev->ep[n]; + flush(ep); + } +} +*/ + +/** Flush EP + * NOTE: INDEX register must be set before this call + */ +static void flush(struct lh7a40x_ep *ep) +{ + DEBUG("%s, %p\n", __FUNCTION__, ep); + + switch (ep->ep_type) { + case ep_control: + /* check, by implication c.f. 15.1.2.11 */ + break; + + case ep_bulk_in: + case ep_interrupt: + /* if(csr & USB_IN_CSR1_IN_PKT_RDY) */ + usb_set(USB_IN_CSR1_FIFO_FLUSH, ep->csr1); + break; + + case ep_bulk_out: + /* if(csr & USB_OUT_CSR1_OUT_PKT_RDY) */ + usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); + break; + } +} + +/** + * lh7a40x_in_epn - handle IN interrupt + */ +static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) +{ + u32 csr; + struct lh7a40x_ep *ep = &dev->ep[ep_idx]; + struct lh7a40x_request *req; + + usb_set_index(ep_idx); + + csr = usb_read(ep->csr1); + DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr); + + if (csr & USB_IN_CSR1_SENT_STALL) { + DEBUG("USB_IN_CSR1_SENT_STALL\n"); + usb_set(USB_IN_CSR1_SENT_STALL /*|USB_IN_CSR1_SEND_STALL */ , + ep->csr1); + return; + } + + if (!ep->desc) { + DEBUG("%s: NO EP DESC\n", __FUNCTION__); + return; + } + + if (list_empty(&ep->queue)) + req = 0; + else + req = list_entry(ep->queue.next, struct lh7a40x_request, queue); + + DEBUG("req: %p\n", req); + + if (!req) + return; + + write_fifo(ep, req); +} + +/* ********************************************************************************************* */ +/* Bulk OUT (recv) + */ + +static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr) +{ + struct lh7a40x_ep *ep = &dev->ep[ep_idx]; + struct lh7a40x_request *req; + + DEBUG("%s: %d\n", __FUNCTION__, ep_idx); + + usb_set_index(ep_idx); + + if (ep->desc) { + u32 csr; + csr = usb_read(ep->csr1); + + while ((csr = + usb_read(ep-> + csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY | + USB_OUT_CSR1_SENT_STALL)) { + DEBUG("%s: %x\n", __FUNCTION__, csr); + + if (csr & USB_OUT_CSR1_SENT_STALL) { + DEBUG("%s: stall sent, flush fifo\n", + __FUNCTION__); + /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */ + flush(ep); + } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) { + if (list_empty(&ep->queue)) + req = 0; + else + req = + list_entry(ep->queue.next, + struct lh7a40x_request, + queue); + + if (!req) { + printk("%s: NULL REQ %d\n", + __FUNCTION__, ep_idx); + flush(ep); + break; + } else { + read_fifo(ep, req); + } + } + + } + + } else { + /* Throw packet away.. */ + printk("%s: No descriptor?!?\n", __FUNCTION__); + flush(ep); + } +} + +static void stop_activity(struct lh7a40x_udc *dev, + struct usb_gadget_driver *driver) +{ + int i; + + /* don't disconnect drivers more than once */ + if (dev->gadget.speed == USB_SPEED_UNKNOWN) + driver = 0; + dev->gadget.speed = USB_SPEED_UNKNOWN; + + /* prevent new request submissions, kill any outstanding requests */ + for (i = 0; i < UDC_MAX_ENDPOINTS; i++) { + struct lh7a40x_ep *ep = &dev->ep[i]; + ep->stopped = 1; + + usb_set_index(i); + nuke(ep, -ESHUTDOWN); + } + + /* report disconnect; the driver is already quiesced */ + if (driver) { + spin_unlock(&dev->lock); + driver->disconnect(&dev->gadget); + spin_lock(&dev->lock); + } + + /* re-init driver-visible data structures */ + udc_reinit(dev); +} + +/** Handle USB RESET interrupt + */ +static void lh7a40x_reset_intr(struct lh7a40x_udc *dev) +{ +#if 0 /* def CONFIG_ARCH_LH7A404 */ + /* Does not work always... */ + + DEBUG("%s: %d\n", __FUNCTION__, dev->usb_address); + + if (!dev->usb_address) { + /*usb_set(USB_RESET_IO, USB_RESET); + mdelay(5); + usb_clear(USB_RESET_IO, USB_RESET); */ + return; + } + /* Put the USB controller into reset. */ + usb_set(USB_RESET_IO, USB_RESET); + + /* Set Device ID to 0 */ + udc_set_address(dev, 0); + + /* Let PLL2 settle down */ + mdelay(5); + + /* Release the USB controller from reset */ + usb_clear(USB_RESET_IO, USB_RESET); + + /* Re-enable UDC */ + udc_enable(dev); + +#endif + dev->gadget.speed = USB_SPEED_FULL; +} + +/* + * lh7a40x usb client interrupt handler. + */ +static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev, struct pt_regs *r) +{ + struct lh7a40x_udc *dev = _dev; + + DEBUG("\n\n"); + + spin_lock(&dev->lock); + + for (;;) { + u32 intr_in = usb_read(USB_IN_INT); + u32 intr_out = usb_read(USB_OUT_INT); + u32 intr_int = usb_read(USB_INT); + + /* Test also against enable bits.. (lh7a40x errata).. Sigh.. */ + u32 in_en = usb_read(USB_IN_INT_EN); + u32 out_en = usb_read(USB_OUT_INT_EN); + + if (!intr_out && !intr_in && !intr_int) + break; + + DEBUG("%s (on state %s)\n", __FUNCTION__, + state_names[dev->ep0state]); + DEBUG("intr_out = %x\n", intr_out); + DEBUG("intr_in = %x\n", intr_in); + DEBUG("intr_int = %x\n", intr_int); + + if (intr_in) { + usb_write(intr_in, USB_IN_INT); + + if ((intr_in & USB_IN_INT_EP1) + && (in_en & USB_IN_INT_EP1)) { + DEBUG("USB_IN_INT_EP1\n"); + lh7a40x_in_epn(dev, 1, intr_in); + } + if ((intr_in & USB_IN_INT_EP3) + && (in_en & USB_IN_INT_EP3)) { + DEBUG("USB_IN_INT_EP3\n"); + lh7a40x_in_epn(dev, 3, intr_in); + } + if (intr_in & USB_IN_INT_EP0) { + DEBUG("USB_IN_INT_EP0 (control)\n"); + lh7a40x_handle_ep0(dev, intr_in); + } + } + + if (intr_out) { + usb_write(intr_out, USB_OUT_INT); + + if ((intr_out & USB_OUT_INT_EP2) + && (out_en & USB_OUT_INT_EP2)) { + DEBUG("USB_OUT_INT_EP2\n"); + lh7a40x_out_epn(dev, 2, intr_out); + } + } + + if (intr_int) { + usb_write(intr_int, USB_INT); + + if (intr_int & USB_INT_RESET_INT) { + lh7a40x_reset_intr(dev); + } + + if (intr_int & USB_INT_RESUME_INT) { + DEBUG("USB resume\n"); + + if (dev->gadget.speed != USB_SPEED_UNKNOWN + && dev->driver + && dev->driver->resume + && is_usb_connected()) { + dev->driver->resume(&dev->gadget); + } + } + + if (intr_int & USB_INT_SUSPEND_INT) { + DEBUG("USB suspend%s\n", + is_usb_connected()? "" : "+disconnect"); + if (!is_usb_connected()) { + stop_activity(dev, dev->driver); + } else if (dev->gadget.speed != + USB_SPEED_UNKNOWN && dev->driver + && dev->driver->suspend) { + dev->driver->suspend(&dev->gadget); + } + } + + } + } + + spin_unlock(&dev->lock); + + return IRQ_HANDLED; +} + +static int lh7a40x_ep_enable(struct usb_ep *_ep, + const struct usb_endpoint_descriptor *desc) +{ + struct lh7a40x_ep *ep; + struct lh7a40x_udc *dev; + unsigned long flags; + + DEBUG("%s, %p\n", __FUNCTION__, _ep); + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (!_ep || !desc || ep->desc || _ep->name == ep0name + || desc->bDescriptorType != USB_DT_ENDPOINT + || ep->bEndpointAddress != desc->bEndpointAddress + || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) { + DEBUG("%s, bad ep or descriptor\n", __FUNCTION__); + return -EINVAL; + } + + /* xfer types must match, except that interrupt ~= bulk */ + if (ep->bmAttributes != desc->bmAttributes + && ep->bmAttributes != USB_ENDPOINT_XFER_BULK + && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { + DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); + return -EINVAL; + } + + /* hardware _could_ do smaller, but driver doesn't */ + if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK + && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep)) + || !desc->wMaxPacketSize) { + DEBUG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); + return -ERANGE; + } + + dev = ep->dev; + if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { + DEBUG("%s, bogus device state\n", __FUNCTION__); + return -ESHUTDOWN; + } + + spin_lock_irqsave(&ep->dev->lock, flags); + + ep->stopped = 0; + ep->desc = desc; + ep->pio_irqs = 0; + ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize); + + /* Reset halt state (does flush) */ + lh7a40x_set_halt(_ep, 0); + + spin_unlock_irqrestore(&ep->dev->lock, flags); + + DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name); + return 0; +} + +/** Disable EP + * NOTE: Sets INDEX register + */ +static int lh7a40x_ep_disable(struct usb_ep *_ep) +{ + struct lh7a40x_ep *ep; + unsigned long flags; + + DEBUG("%s, %p\n", __FUNCTION__, _ep); + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (!_ep || !ep->desc) { + DEBUG("%s, %s not enabled\n", __FUNCTION__, + _ep ? ep->ep.name : NULL); + return -EINVAL; + } + + spin_lock_irqsave(&ep->dev->lock, flags); + + usb_set_index(ep_index(ep)); + + /* Nuke all pending requests (does flush) */ + nuke(ep, -ESHUTDOWN); + + /* Disable ep IRQ */ + pio_irq_disable(ep_index(ep)); + + ep->desc = 0; + ep->stopped = 1; + + spin_unlock_irqrestore(&ep->dev->lock, flags); + + DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name); + return 0; +} + +static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep, + int gfp_flags) +{ + struct lh7a40x_request *req; + + DEBUG("%s, %p\n", __FUNCTION__, ep); + + req = kmalloc(sizeof *req, gfp_flags); + if (!req) + return 0; + + memset(req, 0, sizeof *req); + INIT_LIST_HEAD(&req->queue); + + return &req->req; +} + +static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req) +{ + struct lh7a40x_request *req; + + DEBUG("%s, %p\n", __FUNCTION__, ep); + + req = container_of(_req, struct lh7a40x_request, req); + WARN_ON(!list_empty(&req->queue)); + kfree(req); +} + +static void *lh7a40x_alloc_buffer(struct usb_ep *ep, unsigned bytes, + dma_addr_t * dma, int gfp_flags) +{ + char *retval; + + DEBUG("%s (%p, %d, %d)\n", __FUNCTION__, ep, bytes, gfp_flags); + + retval = kmalloc(bytes, gfp_flags & ~(__GFP_DMA | __GFP_HIGHMEM)); + if (retval) + *dma = virt_to_bus(retval); + return retval; +} + +static void lh7a40x_free_buffer(struct usb_ep *ep, void *buf, dma_addr_t dma, + unsigned bytes) +{ + DEBUG("%s, %p\n", __FUNCTION__, ep); + kfree(buf); +} + +/** Queue one request + * Kickstart transfer if needed + * NOTE: Sets INDEX register + */ +static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req, + int gfp_flags) +{ + struct lh7a40x_request *req; + struct lh7a40x_ep *ep; + struct lh7a40x_udc *dev; + unsigned long flags; + + DEBUG("\n\n\n%s, %p\n", __FUNCTION__, _ep); + + req = container_of(_req, struct lh7a40x_request, req); + if (unlikely + (!_req || !_req->complete || !_req->buf + || !list_empty(&req->queue))) { + DEBUG("%s, bad params\n", __FUNCTION__); + return -EINVAL; + } + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { + DEBUG("%s, bad ep\n", __FUNCTION__); + return -EINVAL; + } + + dev = ep->dev; + if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { + DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver); + return -ESHUTDOWN; + } + + DEBUG("%s queue req %p, len %d buf %p\n", _ep->name, _req, _req->length, + _req->buf); + + spin_lock_irqsave(&dev->lock, flags); + + _req->status = -EINPROGRESS; + _req->actual = 0; + + /* kickstart this i/o queue? */ + DEBUG("Add to %d Q %d %d\n", ep_index(ep), list_empty(&ep->queue), + ep->stopped); + if (list_empty(&ep->queue) && likely(!ep->stopped)) { + u32 csr; + + if (unlikely(ep_index(ep) == 0)) { + /* EP0 */ + list_add_tail(&req->queue, &ep->queue); + lh7a40x_ep0_kick(dev, ep); + req = 0; + } else if (ep_is_in(ep)) { + /* EP1 & EP3 */ + usb_set_index(ep_index(ep)); + csr = usb_read(ep->csr1); + pio_irq_enable(ep_index(ep)); + if ((csr & USB_IN_CSR1_FIFO_NOT_EMPTY) == 0) { + if (write_fifo(ep, req) == 1) + req = 0; + } + } else { + /* EP2 */ + usb_set_index(ep_index(ep)); + csr = usb_read(ep->csr1); + pio_irq_enable(ep_index(ep)); + if (!(csr & USB_OUT_CSR1_FIFO_FULL)) { + if (read_fifo(ep, req) == 1) + req = 0; + } + } + } + + /* pio or dma irq handler advances the queue. */ + if (likely(req != 0)) + list_add_tail(&req->queue, &ep->queue); + + spin_unlock_irqrestore(&dev->lock, flags); + + return 0; +} + +/* dequeue JUST ONE request */ +static int lh7a40x_dequeue(struct usb_ep *_ep, struct usb_request *_req) +{ + struct lh7a40x_ep *ep; + struct lh7a40x_request *req; + unsigned long flags; + + DEBUG("%s, %p\n", __FUNCTION__, _ep); + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (!_ep || ep->ep.name == ep0name) + return -EINVAL; + + spin_lock_irqsave(&ep->dev->lock, flags); + + /* make sure it's actually queued on this endpoint */ + list_for_each_entry(req, &ep->queue, queue) { + if (&req->req == _req) + break; + } + if (&req->req != _req) { + spin_unlock_irqrestore(&ep->dev->lock, flags); + return -EINVAL; + } + + done(ep, req, -ECONNRESET); + + spin_unlock_irqrestore(&ep->dev->lock, flags); + return 0; +} + +/** Halt specific EP + * Return 0 if success + * NOTE: Sets INDEX register to EP ! + */ +static int lh7a40x_set_halt(struct usb_ep *_ep, int value) +{ + struct lh7a40x_ep *ep; + unsigned long flags; + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { + DEBUG("%s, bad ep\n", __FUNCTION__); + return -EINVAL; + } + + usb_set_index(ep_index(ep)); + + DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value); + + spin_lock_irqsave(&ep->dev->lock, flags); + + if (ep_index(ep) == 0) { + /* EP0 */ + usb_set(EP0_SEND_STALL, ep->csr1); + } else if (ep_is_in(ep)) { + u32 csr = usb_read(ep->csr1); + if (value && ((csr & USB_IN_CSR1_FIFO_NOT_EMPTY) + || !list_empty(&ep->queue))) { + /* + * Attempts to halt IN endpoints will fail (returning -EAGAIN) + * if any transfer requests are still queued, or if the controller + * FIFO still holds bytes that the host hasn’t collected. + */ + spin_unlock_irqrestore(&ep->dev->lock, flags); + DEBUG + ("Attempt to halt IN endpoint failed (returning -EAGAIN) %d %d\n", + (csr & USB_IN_CSR1_FIFO_NOT_EMPTY), + !list_empty(&ep->queue)); + return -EAGAIN; + } + flush(ep); + if (value) + usb_set(USB_IN_CSR1_SEND_STALL, ep->csr1); + else { + usb_clear(USB_IN_CSR1_SEND_STALL, ep->csr1); + usb_set(USB_IN_CSR1_CLR_DATA_TOGGLE, ep->csr1); + } + + } else { + + flush(ep); + if (value) + usb_set(USB_OUT_CSR1_SEND_STALL, ep->csr1); + else { + usb_clear(USB_OUT_CSR1_SEND_STALL, ep->csr1); + usb_set(USB_OUT_CSR1_CLR_DATA_REG, ep->csr1); + } + } + + if (value) { + ep->stopped = 1; + } else { + ep->stopped = 0; + } + + spin_unlock_irqrestore(&ep->dev->lock, flags); + + DEBUG("%s %s halted\n", _ep->name, value == 0 ? "NOT" : "IS"); + + return 0; +} + +/** Return bytes in EP FIFO + * NOTE: Sets INDEX register to EP + */ +static int lh7a40x_fifo_status(struct usb_ep *_ep) +{ + u32 csr; + int count = 0; + struct lh7a40x_ep *ep; + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (!_ep) { + DEBUG("%s, bad ep\n", __FUNCTION__); + return -ENODEV; + } + + DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep)); + + /* LPD can't report unclaimed bytes from IN fifos */ + if (ep_is_in(ep)) + return -EOPNOTSUPP; + + usb_set_index(ep_index(ep)); + + csr = usb_read(ep->csr1); + if (ep->dev->gadget.speed != USB_SPEED_UNKNOWN || + csr & USB_OUT_CSR1_OUT_PKT_RDY) { + count = usb_read(USB_OUT_FIFO_WC1); + } + + return count; +} + +/** Flush EP FIFO + * NOTE: Sets INDEX register to EP + */ +static void lh7a40x_fifo_flush(struct usb_ep *_ep) +{ + struct lh7a40x_ep *ep; + + ep = container_of(_ep, struct lh7a40x_ep, ep); + if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { + DEBUG("%s, bad ep\n", __FUNCTION__); + return; + } + + usb_set_index(ep_index(ep)); + flush(ep); +} + +/****************************************************************/ +/* End Point 0 related functions */ +/****************************************************************/ + +/* return: 0 = still running, 1 = completed, negative = errno */ +static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) +{ + u32 max; + unsigned count; + int is_last; + + max = ep_maxpacket(ep); + + DEBUG_EP0("%s\n", __FUNCTION__); + + count = write_packet(ep, req, max); + + /* last packet is usually short (or a zlp) */ + if (unlikely(count != max)) + is_last = 1; + else { + if (likely(req->req.length != req->req.actual) || req->req.zero) + is_last = 0; + else + is_last = 1; + } + + DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__, + ep->ep.name, count, + is_last ? "/L" : "", req->req.length - req->req.actual, req); + + /* requests complete when all IN data is in the FIFO */ + if (is_last) { + done(ep, req, 0); + return 1; + } + + return 0; +} + +static __inline__ int lh7a40x_fifo_read(struct lh7a40x_ep *ep, + unsigned char *cp, int max) +{ + int bytes; + int count = usb_read(USB_OUT_FIFO_WC1); + volatile u32 *fifo = (volatile u32 *)ep->fifo; + + if (count > max) + count = max; + bytes = count; + while (count--) + *cp++ = *fifo & 0xFF; + return bytes; +} + +static __inline__ void lh7a40x_fifo_write(struct lh7a40x_ep *ep, + unsigned char *cp, int count) +{ + volatile u32 *fifo = (volatile u32 *)ep->fifo; + DEBUG_EP0("fifo_write: %d %d\n", ep_index(ep), count); + while (count--) + *fifo = *cp++; +} + +static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req) +{ + u32 csr; + u8 *buf; + unsigned bufferspace, count, is_short; + volatile u32 *fifo = (volatile u32 *)ep->fifo; + + DEBUG_EP0("%s\n", __FUNCTION__); + + csr = usb_read(USB_EP0_CSR); + if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) + return 0; + + buf = req->req.buf + req->req.actual; + prefetchw(buf); + bufferspace = req->req.length - req->req.actual; + + /* read all bytes from this packet */ + if (likely(csr & EP0_OUT_PKT_RDY)) { + count = usb_read(USB_OUT_FIFO_WC1); + req->req.actual += min(count, bufferspace); + } else /* zlp */ + count = 0; + + is_short = (count < ep->ep.maxpacket); + DEBUG_EP0("read %s %02x, %d bytes%s req %p %d/%d\n", + ep->ep.name, csr, count, + is_short ? "/S" : "", req, req->req.actual, req->req.length); + + while (likely(count-- != 0)) { + u8 byte = (u8) (*fifo & 0xff); + + if (unlikely(bufferspace == 0)) { + /* this happens when the driver's buffer + * is smaller than what the host sent. + * discard the extra data. + */ + if (req->req.status != -EOVERFLOW) + DEBUG_EP0("%s overflow %d\n", ep->ep.name, + count); + req->req.status = -EOVERFLOW; + } else { + *buf++ = byte; + bufferspace--; + } + } + + /* completion */ + if (is_short || req->req.actual == req->req.length) { + done(ep, req, 0); + return 1; + } + + /* finished that packet. the next one may be waiting... */ + return 0; +} + +/** + * udc_set_address - set the USB address for this device + * @address: + * + * Called from control endpoint function after it decodes a set address setup packet. + */ +static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address) +{ + DEBUG_EP0("%s: %d\n", __FUNCTION__, address); + /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */ + dev->usb_address = address; + usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA); + usb_set(USB_FA_ADDR_UPDATE | (address & USB_FA_FUNCTION_ADDR), USB_FA); + /* usb_read(USB_FA); */ +} + +/* + * DATA_STATE_RECV (OUT_PKT_RDY) + * - if error + * set EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL bits + * - else + * set EP0_CLR_OUT bit + if last set EP0_DATA_END bit + */ +static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr) +{ + struct lh7a40x_request *req; + struct lh7a40x_ep *ep = &dev->ep[0]; + int ret; + + DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); + + if (list_empty(&ep->queue)) + req = 0; + else + req = list_entry(ep->queue.next, struct lh7a40x_request, queue); + + if (req) { + + if (req->req.length == 0) { + DEBUG_EP0("ZERO LENGTH OUT!\n"); + usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); + dev->ep0state = WAIT_FOR_SETUP; + return; + } + ret = read_fifo_ep0(ep, req); + if (ret) { + /* Done! */ + DEBUG_EP0("%s: finished, waiting for status\n", + __FUNCTION__); + + usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); + dev->ep0state = WAIT_FOR_SETUP; + } else { + /* Not done yet.. */ + DEBUG_EP0("%s: not finished\n", __FUNCTION__); + usb_set(EP0_CLR_OUT, USB_EP0_CSR); + } + } else { + DEBUG_EP0("NO REQ??!\n"); + } +} + +/* + * DATA_STATE_XMIT + */ +static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr) +{ + struct lh7a40x_request *req; + struct lh7a40x_ep *ep = &dev->ep[0]; + int ret, need_zlp = 0; + + DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); + + if (list_empty(&ep->queue)) + req = 0; + else + req = list_entry(ep->queue.next, struct lh7a40x_request, queue); + + if (!req) { + DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__); + return 0; + } + + if (req->req.length == 0) { + + usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); + dev->ep0state = WAIT_FOR_SETUP; + return 1; + } + + if (req->req.length - req->req.actual == EP0_PACKETSIZE) { + /* Next write will end with the packet size, */ + /* so we need Zero-length-packet */ + need_zlp = 1; + } + + ret = write_fifo_ep0(ep, req); + + if (ret == 1 && !need_zlp) { + /* Last packet */ + DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__); + + usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); + dev->ep0state = WAIT_FOR_SETUP; + } else { + DEBUG_EP0("%s: not finished\n", __FUNCTION__); + usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); + } + + if (need_zlp) { + DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__); + usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); + dev->ep0state = DATA_STATE_NEED_ZLP; + } + + return 1; +} + +static int lh7a40x_handle_get_status(struct lh7a40x_udc *dev, + struct usb_ctrlrequest *ctrl) +{ + struct lh7a40x_ep *ep0 = &dev->ep[0]; + struct lh7a40x_ep *qep; + int reqtype = (ctrl->bRequestType & USB_RECIP_MASK); + u16 val = 0; + + if (reqtype == USB_RECIP_INTERFACE) { + /* This is not supported. + * And according to the USB spec, this one does nothing.. + * Just return 0 + */ + DEBUG_SETUP("GET_STATUS: USB_RECIP_INTERFACE\n"); + } else if (reqtype == USB_RECIP_DEVICE) { + DEBUG_SETUP("GET_STATUS: USB_RECIP_DEVICE\n"); + val |= (1 << 0); /* Self powered */ + /*val |= (1<<1); *//* Remote wakeup */ + } else if (reqtype == USB_RECIP_ENDPOINT) { + int ep_num = (ctrl->wIndex & ~USB_DIR_IN); + + DEBUG_SETUP + ("GET_STATUS: USB_RECIP_ENDPOINT (%d), ctrl->wLength = %d\n", + ep_num, ctrl->wLength); + + if (ctrl->wLength > 2 || ep_num > 3) + return -EOPNOTSUPP; + + qep = &dev->ep[ep_num]; + if (ep_is_in(qep) != ((ctrl->wIndex & USB_DIR_IN) ? 1 : 0) + && ep_index(qep) != 0) { + return -EOPNOTSUPP; + } + + usb_set_index(ep_index(qep)); + + /* Return status on next IN token */ + switch (qep->ep_type) { + case ep_control: + val = + (usb_read(qep->csr1) & EP0_SEND_STALL) == + EP0_SEND_STALL; + break; + case ep_bulk_in: + case ep_interrupt: + val = + (usb_read(qep->csr1) & USB_IN_CSR1_SEND_STALL) == + USB_IN_CSR1_SEND_STALL; + break; + case ep_bulk_out: + val = + (usb_read(qep->csr1) & USB_OUT_CSR1_SEND_STALL) == + USB_OUT_CSR1_SEND_STALL; + break; + } + + /* Back to EP0 index */ + usb_set_index(0); + + DEBUG_SETUP("GET_STATUS, ep: %d (%x), val = %d\n", ep_num, + ctrl->wIndex, val); + } else { + DEBUG_SETUP("Unknown REQ TYPE: %d\n", reqtype); + return -EOPNOTSUPP; + } + + /* Clear "out packet ready" */ + usb_set((EP0_CLR_OUT), USB_EP0_CSR); + /* Put status to FIFO */ + lh7a40x_fifo_write(ep0, (u8 *) & val, sizeof(val)); + /* Issue "In packet ready" */ + usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); + + return 0; +} + +/* + * WAIT_FOR_SETUP (OUT_PKT_RDY) + * - read data packet from EP0 FIFO + * - decode command + * - if error + * set EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL bits + * - else + * set EP0_CLR_OUT | EP0_DATA_END bits + */ +static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr) +{ + struct lh7a40x_ep *ep = &dev->ep[0]; + struct usb_ctrlrequest ctrl; + int i, bytes, is_in; + + DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr); + + /* Nuke all previous transfers */ + nuke(ep, -EPROTO); + + /* read control req from fifo (8 bytes) */ + bytes = lh7a40x_fifo_read(ep, (unsigned char *)&ctrl, 8); + + DEBUG_SETUP("Read CTRL REQ %d bytes\n", bytes); + DEBUG_SETUP("CTRL.bRequestType = %d (is_in %d)\n", ctrl.bRequestType, + ctrl.bRequestType == USB_DIR_IN); + DEBUG_SETUP("CTRL.bRequest = %d\n", ctrl.bRequest); + DEBUG_SETUP("CTRL.wLength = %d\n", ctrl.wLength); + DEBUG_SETUP("CTRL.wValue = %d (%d)\n", ctrl.wValue, ctrl.wValue >> 8); + DEBUG_SETUP("CTRL.wIndex = %d\n", ctrl.wIndex); + + /* Set direction of EP0 */ + if (likely(ctrl.bRequestType & USB_DIR_IN)) { + ep->bEndpointAddress |= USB_DIR_IN; + is_in = 1; + } else { + ep->bEndpointAddress &= ~USB_DIR_IN; + is_in = 0; + } + + dev->req_pending = 1; + + /* Handle some SETUP packets ourselves */ + switch (ctrl.bRequest) { + case USB_REQ_SET_ADDRESS: + if (ctrl.bRequestType != (USB_TYPE_STANDARD | USB_RECIP_DEVICE)) + break; + + DEBUG_SETUP("USB_REQ_SET_ADDRESS (%d)\n", ctrl.wValue); + udc_set_address(dev, ctrl.wValue); + usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); + return; + + case USB_REQ_GET_STATUS:{ + if (lh7a40x_handle_get_status(dev, &ctrl) == 0) + return; + + case USB_REQ_CLEAR_FEATURE: + case USB_REQ_SET_FEATURE: + if (ctrl.bRequestType == USB_RECIP_ENDPOINT) { + struct lh7a40x_ep *qep; + int ep_num = (ctrl.wIndex & 0x0f); + + /* Support only HALT feature */ + if (ctrl.wValue != 0 || ctrl.wLength != 0 + || ep_num > 3 || ep_num < 1) + break; + + qep = &dev->ep[ep_num]; + if (ctrl.bRequest == USB_REQ_SET_FEATURE) { + DEBUG_SETUP("SET_FEATURE (%d)\n", + ep_num); + lh7a40x_set_halt(&qep->ep, 1); + } else { + DEBUG_SETUP("CLR_FEATURE (%d)\n", + ep_num); + lh7a40x_set_halt(&qep->ep, 0); + } + usb_set_index(0); + + /* Reply with a ZLP on next IN token */ + usb_set((EP0_CLR_OUT | EP0_DATA_END), + USB_EP0_CSR); + return; + } + break; + } + + default: + break; + } + + if (likely(dev->driver)) { + /* device-2-host (IN) or no data setup command, process immediately */ + spin_unlock(&dev->lock); + i = dev->driver->setup(&dev->gadget, &ctrl); + spin_lock(&dev->lock); + + if (i < 0) { + /* setup processing failed, force stall */ + DEBUG_SETUP + (" --> ERROR: gadget setup FAILED (stalling), setup returned %d\n", + i); + usb_set_index(0); + usb_set((EP0_CLR_OUT | EP0_DATA_END | EP0_SEND_STALL), + USB_EP0_CSR); + + /* ep->stopped = 1; */ + dev->ep0state = WAIT_FOR_SETUP; + } + } +} + +/* + * DATA_STATE_NEED_ZLP + */ +static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr) +{ + DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); + + /* c.f. Table 15-14 */ + usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); + dev->ep0state = WAIT_FOR_SETUP; +} + +/* + * handle ep0 interrupt + */ +static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr) +{ + struct lh7a40x_ep *ep = &dev->ep[0]; + u32 csr; + + /* Set index 0 */ + usb_set_index(0); + csr = usb_read(USB_EP0_CSR); + + DEBUG_EP0("%s: csr = %x\n", __FUNCTION__, csr); + + /* + * For overview of what we should be doing see c.f. Chapter 18.1.2.4 + * We will follow that outline here modified by our own global state + * indication which provides hints as to what we think should be + * happening.. + */ + + /* + * if SENT_STALL is set + * - clear the SENT_STALL bit + */ + if (csr & EP0_SENT_STALL) { + DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __FUNCTION__, csr); + usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR); + nuke(ep, -ECONNABORTED); + dev->ep0state = WAIT_FOR_SETUP; + return; + } + + /* + * if a transfer is in progress && IN_PKT_RDY and OUT_PKT_RDY are clear + * - fill EP0 FIFO + * - if last packet + * - set IN_PKT_RDY | DATA_END + * - else + * set IN_PKT_RDY + */ + if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) { + DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n", + __FUNCTION__); + + switch (dev->ep0state) { + case DATA_STATE_XMIT: + DEBUG_EP0("continue with DATA_STATE_XMIT\n"); + lh7a40x_ep0_in(dev, csr); + return; + case DATA_STATE_NEED_ZLP: + DEBUG_EP0("continue with DATA_STATE_NEED_ZLP\n"); + lh7a40x_ep0_in_zlp(dev, csr); + return; + default: + /* Stall? */ + DEBUG_EP0("Odd state!! state = %s\n", + state_names[dev->ep0state]); + dev->ep0state = WAIT_FOR_SETUP; + /* nuke(ep, 0); */ + /* usb_set(EP0_SEND_STALL, ep->csr1); */ + break; + } + } + + /* + * if SETUP_END is set + * - abort the last transfer + * - set SERVICED_SETUP_END_BIT + */ + if (csr & EP0_SETUP_END) { + DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __FUNCTION__, csr); + + usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR); + + nuke(ep, 0); + dev->ep0state = WAIT_FOR_SETUP; + } + + /* + * if EP0_OUT_PKT_RDY is set + * - read data packet from EP0 FIFO + * - decode command + * - if error + * set SERVICED_OUT_PKT_RDY | DATA_END bits | SEND_STALL + * - else + * set SERVICED_OUT_PKT_RDY | DATA_END bits + */ + if (csr & EP0_OUT_PKT_RDY) { + + DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__, + csr); + + switch (dev->ep0state) { + case WAIT_FOR_SETUP: + DEBUG_EP0("WAIT_FOR_SETUP\n"); + lh7a40x_ep0_setup(dev, csr); + break; + + case DATA_STATE_RECV: + DEBUG_EP0("DATA_STATE_RECV\n"); + lh7a40x_ep0_out(dev, csr); + break; + + default: + /* send stall? */ + DEBUG_EP0("strange state!! 2. send stall? state = %d\n", + dev->ep0state); + break; + } + } +} + +static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep) +{ + u32 csr; + + usb_set_index(0); + csr = usb_read(USB_EP0_CSR); + + DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); + + /* Clear "out packet ready" */ + usb_set(EP0_CLR_OUT, USB_EP0_CSR); + + if (ep_is_in(ep)) { + dev->ep0state = DATA_STATE_XMIT; + lh7a40x_ep0_in(dev, csr); + } else { + dev->ep0state = DATA_STATE_RECV; + lh7a40x_ep0_out(dev, csr); + } +} + +/* --------------------------------------------------------------------------- + * device-scoped parts of the api to the usb controller hardware + * --------------------------------------------------------------------------- + */ + +static int lh7a40x_udc_get_frame(struct usb_gadget *_gadget) +{ + u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */ + u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */ + DEBUG("%s, %p\n", __FUNCTION__, _gadget); + return ((frame2 & 0x07) << 8) | (frame1 & 0xff); +} + +static int lh7a40x_udc_wakeup(struct usb_gadget *_gadget) +{ + /* host may not have enabled remote wakeup */ + /*if ((UDCCS0 & UDCCS0_DRWF) == 0) + return -EHOSTUNREACH; + udc_set_mask_UDCCR(UDCCR_RSM); */ + return -ENOTSUPP; +} + +static const struct usb_gadget_ops lh7a40x_udc_ops = { + .get_frame = lh7a40x_udc_get_frame, + .wakeup = lh7a40x_udc_wakeup, + /* current versions must always be self-powered */ +}; + +static void nop_release(struct device *dev) +{ + DEBUG("%s %s\n", __FUNCTION__, dev->bus_id); +} + +static struct lh7a40x_udc memory = { + .usb_address = 0, + + .gadget = { + .ops = &lh7a40x_udc_ops, + .ep0 = &memory.ep[0].ep, + .name = driver_name, + .dev = { + .bus_id = "gadget", + .release = nop_release, + }, + }, + + /* control endpoint */ + .ep[0] = { + .ep = { + .name = ep0name, + .ops = &lh7a40x_ep_ops, + .maxpacket = EP0_PACKETSIZE, + }, + .dev = &memory, + + .bEndpointAddress = 0, + .bmAttributes = 0, + + .ep_type = ep_control, + .fifo = io_p2v(USB_EP0_FIFO), + .csr1 = USB_EP0_CSR, + .csr2 = USB_EP0_CSR, + }, + + /* first group of endpoints */ + .ep[1] = { + .ep = { + .name = "ep1in-bulk", + .ops = &lh7a40x_ep_ops, + .maxpacket = 64, + }, + .dev = &memory, + + .bEndpointAddress = USB_DIR_IN | 1, + .bmAttributes = USB_ENDPOINT_XFER_BULK, + + .ep_type = ep_bulk_in, + .fifo = io_p2v(USB_EP1_FIFO), + .csr1 = USB_IN_CSR1, + .csr2 = USB_IN_CSR2, + }, + + .ep[2] = { + .ep = { + .name = "ep2out-bulk", + .ops = &lh7a40x_ep_ops, + .maxpacket = 64, + }, + .dev = &memory, + + .bEndpointAddress = 2, + .bmAttributes = USB_ENDPOINT_XFER_BULK, + + .ep_type = ep_bulk_out, + .fifo = io_p2v(USB_EP2_FIFO), + .csr1 = USB_OUT_CSR1, + .csr2 = USB_OUT_CSR2, + }, + + .ep[3] = { + .ep = { + .name = "ep3in-int", + .ops = &lh7a40x_ep_ops, + .maxpacket = 64, + }, + .dev = &memory, + + .bEndpointAddress = USB_DIR_IN | 3, + .bmAttributes = USB_ENDPOINT_XFER_INT, + + .ep_type = ep_interrupt, + .fifo = io_p2v(USB_EP3_FIFO), + .csr1 = USB_IN_CSR1, + .csr2 = USB_IN_CSR2, + }, +}; + +/* + * probe - binds to the platform device + */ +static int lh7a40x_udc_probe(struct device *_dev) +{ + struct lh7a40x_udc *dev = &memory; + int retval; + + DEBUG("%s: %p\n", __FUNCTION__, _dev); + + spin_lock_init(&dev->lock); + dev->dev = _dev; + + device_initialize(&dev->gadget.dev); + dev->gadget.dev.parent = _dev; + + the_controller = dev; + dev_set_drvdata(_dev, dev); + + udc_disable(dev); + udc_reinit(dev); + + /* irq setup after old hardware state is cleaned up */ + retval = + request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name, + dev); + if (retval != 0) { + DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, + IRQ_USBINTR, retval); + return -EBUSY; + } + + create_proc_files(); + + return retval; +} + +static int lh7a40x_udc_remove(struct device *_dev) +{ + struct lh7a40x_udc *dev = _dev->driver_data; + + DEBUG("%s: %p\n", __FUNCTION__, dev); + + udc_disable(dev); + remove_proc_files(); + usb_gadget_unregister_driver(dev->driver); + + free_irq(IRQ_USBINTR, dev); + + dev_set_drvdata(_dev, 0); + + the_controller = 0; + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static struct device_driver udc_driver = { + .name = (char *)driver_name, + .bus = &platform_bus_type, + .probe = lh7a40x_udc_probe, + .remove = lh7a40x_udc_remove + /* FIXME power management support */ + /* .suspend = ... disable UDC */ + /* .resume = ... re-enable UDC */ +}; + +static int __init udc_init(void) +{ + DEBUG("%s: %s version %s\n", __FUNCTION__, driver_name, DRIVER_VERSION); + return driver_register(&udc_driver); +} + +static void __exit udc_exit(void) +{ + driver_unregister(&udc_driver); +} + +module_init(udc_init); +module_exit(udc_exit); + +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_AUTHOR("Mikko Lahteenmaki, Bo Henriksen"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/gadget/lh7a40x_udc.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,261 @@ +/* + * linux/drivers/usb/gadget/lh7a40x_udc.h + * Sharp LH7A40x on-chip full speed USB device controllers + * + * Copyright (C) 2004 Mikko Lahteenmaki, Nordic ID + * Copyright (C) 2004 Bo Henriksen, Nordic ID + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __LH7A40X_H_ +#define __LH7A40X_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* + * Memory map + */ + +#define USB_FA 0x80000200 // function address register +#define USB_PM 0x80000204 // power management register + +#define USB_IN_INT 0x80000208 // IN interrupt register bank (EP0-EP3) +#define USB_OUT_INT 0x80000210 // OUT interrupt register bank (EP2) +#define USB_INT 0x80000218 // interrupt register bank + +#define USB_IN_INT_EN 0x8000021C // IN interrupt enable register bank +#define USB_OUT_INT_EN 0x80000224 // OUT interrupt enable register bank +#define USB_INT_EN 0x8000022C // USB interrupt enable register bank + +#define USB_FRM_NUM1 0x80000230 // Frame number1 register +#define USB_FRM_NUM2 0x80000234 // Frame number2 register +#define USB_INDEX 0x80000238 // index register + +#define USB_IN_MAXP 0x80000240 // IN MAXP register +#define USB_IN_CSR1 0x80000244 // IN CSR1 register/EP0 CSR register +#define USB_EP0_CSR 0x80000244 // IN CSR1 register/EP0 CSR register +#define USB_IN_CSR2 0x80000248 // IN CSR2 register +#define USB_OUT_MAXP 0x8000024C // OUT MAXP register + +#define USB_OUT_CSR1 0x80000250 // OUT CSR1 register +#define USB_OUT_CSR2 0x80000254 // OUT CSR2 register +#define USB_OUT_FIFO_WC1 0x80000258 // OUT FIFO write count1 register +#define USB_OUT_FIFO_WC2 0x8000025C // OUT FIFO write count2 register + +#define USB_RESET 0x8000044C // USB reset register + +#define USB_EP0_FIFO 0x80000280 +#define USB_EP1_FIFO 0x80000284 +#define USB_EP2_FIFO 0x80000288 +#define USB_EP3_FIFO 0x8000028c + +/* + * USB reset register + */ +#define USB_RESET_APB (1<<1) //resets USB APB control side WRITE +#define USB_RESET_IO (1<<0) //resets USB IO side WRITE + +/* + * USB function address register + */ +#define USB_FA_ADDR_UPDATE (1<<7) +#define USB_FA_FUNCTION_ADDR (0x7F) + +/* + * Power Management register + */ +#define PM_USB_DCP (1<<5) +#define PM_USB_ENABLE (1<<4) +#define PM_USB_RESET (1<<3) +#define PM_UC_RESUME (1<<2) +#define PM_SUSPEND_MODE (1<<1) +#define PM_ENABLE_SUSPEND (1<<0) + +/* + * IN interrupt register + */ +#define USB_IN_INT_EP3 (1<<3) +#define USB_IN_INT_EP1 (1<<1) +#define USB_IN_INT_EP0 (1<<0) + +/* + * OUT interrupt register + */ +#define USB_OUT_INT_EP2 (1<<2) + +/* + * USB interrupt register + */ +#define USB_INT_RESET_INT (1<<2) +#define USB_INT_RESUME_INT (1<<1) +#define USB_INT_SUSPEND_INT (1<<0) + +/* + * USB interrupt enable register + */ +#define USB_INT_EN_USB_RESET_INTER (1<<2) +#define USB_INT_EN_RESUME_INTER (1<<1) +#define USB_INT_EN_SUSPEND_INTER (1<<0) + +/* + * INCSR1 register + */ +#define USB_IN_CSR1_CLR_DATA_TOGGLE (1<<6) +#define USB_IN_CSR1_SENT_STALL (1<<5) +#define USB_IN_CSR1_SEND_STALL (1<<4) +#define USB_IN_CSR1_FIFO_FLUSH (1<<3) +#define USB_IN_CSR1_FIFO_NOT_EMPTY (1<<1) +#define USB_IN_CSR1_IN_PKT_RDY (1<<0) + +/* + * INCSR2 register + */ +#define USB_IN_CSR2_AUTO_SET (1<<7) +#define USB_IN_CSR2_USB_DMA_EN (1<<4) + +/* + * OUT CSR1 register + */ +#define USB_OUT_CSR1_CLR_DATA_REG (1<<7) +#define USB_OUT_CSR1_SENT_STALL (1<<6) +#define USB_OUT_CSR1_SEND_STALL (1<<5) +#define USB_OUT_CSR1_FIFO_FLUSH (1<<4) +#define USB_OUT_CSR1_FIFO_FULL (1<<1) +#define USB_OUT_CSR1_OUT_PKT_RDY (1<<0) + +/* + * OUT CSR2 register + */ +#define USB_OUT_CSR2_AUTO_CLR (1<<7) +#define USB_OUT_CSR2_USB_DMA_EN (1<<4) + +/* + * EP0 CSR + */ +#define EP0_CLR_SETUP_END (1<<7) /* Clear "Setup Ends" Bit (w) */ +#define EP0_CLR_OUT (1<<6) /* Clear "Out packet ready" Bit (w) */ +#define EP0_SEND_STALL (1<<5) /* Send STALL Handshake (rw) */ +#define EP0_SETUP_END (1<<4) /* Setup Ends (r) */ + +#define EP0_DATA_END (1<<3) /* Data end (rw) */ +#define EP0_SENT_STALL (1<<2) /* Sent Stall Handshake (r) */ +#define EP0_IN_PKT_RDY (1<<1) /* In packet ready (rw) */ +#define EP0_OUT_PKT_RDY (1<<0) /* Out packet ready (r) */ + +/* general CSR */ +#define OUT_PKT_RDY (1<<0) +#define IN_PKT_RDY (1<<0) + +/* + * IN/OUT MAXP register + */ +#define USB_OUT_MAXP_MAXP (0xF) +#define USB_IN_MAXP_MAXP (0xF) + +// Max packet size +//#define EP0_PACKETSIZE 0x10 +#define EP0_PACKETSIZE 0x8 +#define EP0_MAXPACKETSIZE 0x10 + +#define UDC_MAX_ENDPOINTS 4 + +#define WAIT_FOR_SETUP 0 +#define DATA_STATE_XMIT 1 +#define DATA_STATE_NEED_ZLP 2 +#define WAIT_FOR_OUT_STATUS 3 +#define DATA_STATE_RECV 4 + +/* ********************************************************************************************* */ +/* IO + */ + +typedef enum ep_type { + ep_control, ep_bulk_in, ep_bulk_out, ep_interrupt +} ep_type_t; + +struct lh7a40x_ep { + struct usb_ep ep; + struct lh7a40x_udc *dev; + + const struct usb_endpoint_descriptor *desc; + struct list_head queue; + unsigned long pio_irqs; + + u8 stopped; + u8 bEndpointAddress; + u8 bmAttributes; + + ep_type_t ep_type; + u32 fifo; + u32 csr1; + u32 csr2; +}; + +struct lh7a40x_request { + struct usb_request req; + struct list_head queue; +}; + +struct lh7a40x_udc { + struct usb_gadget gadget; + struct usb_gadget_driver *driver; + struct device *dev; + spinlock_t lock; + + int ep0state; + struct lh7a40x_ep ep[UDC_MAX_ENDPOINTS]; + + unsigned char usb_address; + + unsigned req_pending:1, req_std:1, req_config:1; +}; + +extern struct lh7a40x_udc *the_controller; + +#define ep_is_in(EP) (((EP)->bEndpointAddress&USB_DIR_IN)==USB_DIR_IN) +#define ep_index(EP) ((EP)->bEndpointAddress&0xF) +#define ep_maxpacket(EP) ((EP)->ep.maxpacket) + +#endif diff -Nru a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c --- a/drivers/usb/gadget/net2280.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/gadget/net2280.c 2004-09-06 16:37:50 -07:00 @@ -307,7 +307,6 @@ | (1 << SET_NAK_OUT_PACKETS) | (1 << CLEAR_EP_HIDE_STATUS_PHASE) | (1 << CLEAR_INTERRUPT_MODE) - | (1 << CLEAR_CONTROL_STATUS_PHASE_HANDSHAKE) | (1 << CLEAR_ENDPOINT_TOGGLE) | (1 << CLEAR_ENDPOINT_HALT) , &ep->regs->ep_rsp); @@ -2511,15 +2510,23 @@ static void handle_stat1_irqs (struct net2280 *dev, u32 stat) { struct net2280_ep *ep; - u32 tmp, num, scratch; + u32 tmp, num, mask, scratch; /* after disconnect there's nothing else to do! */ tmp = (1 << VBUS_INTERRUPT) | (1 << ROOT_PORT_RESET_INTERRUPT); + mask = (1 << HIGH_SPEED) | (1 << FULL_SPEED); + + /* VBUS disconnect is indicated by VBUS_PIN and VBUS_INTERRUPT set. + * Root Port Reset is indicated by ROOT_PORT_RESET_INTERRRUPT set and + * both HIGH_SPEED and FULL_SPEED clear (as ROOT_PORT_RESET_INTERRUPT + * only indicates a change in the reset state). + */ if (stat & tmp) { writel (tmp, &dev->regs->irqstat1); - if (((stat & (1 << ROOT_PORT_RESET_INTERRUPT)) != 0 - || (readl (&dev->usb->usbctl) & (1 << VBUS_PIN)) == 0 - ) && dev->gadget.speed != USB_SPEED_UNKNOWN) { + if ((((stat & (1 << ROOT_PORT_RESET_INTERRUPT)) && + ((readl (&dev->usb->usbstat) & mask) == 0)) + || ((readl (&dev->usb->usbctl) & (1 << VBUS_PIN)) == 0) + ) && ( dev->gadget.speed != USB_SPEED_UNKNOWN)) { DEBUG (dev, "disconnect %s\n", dev->driver->driver.name); stop_activity (dev, dev->driver); diff -Nru a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/gadget/omap_udc.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,2695 @@ +/* + * omap_udc.c -- for OMAP 1610 udc, with OTG support + * + * Copyright (C) 2004 Texas Instruments, Inc. + * Copyright (C) 2004 David Brownell + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#undef DEBUG +#undef VERBOSE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "omap_udc.h" + +#undef USB_TRACE + +/* OUT-dma seems to be behaving */ +#define USE_DMA + +/* ISO too */ +#define USE_ISO + + +#define DRIVER_DESC "OMAP UDC driver" +#define DRIVER_VERSION "24 August 2004" + +#define DMA_ADDR_INVALID (~(dma_addr_t)0) + + +/* + * The OMAP UDC needs _very_ early endpoint setup: before enabling the + * D+ pullup to allow enumeration. That's too early for the gadget + * framework to use from usb_endpoint_enable(), which happens after + * enumeration as part of activating an interface. (But if we add an + * optional new "UDC not yet running" state to the gadget driver model, + * even just during driver binding, the endpoint autoconfig logic is the + * natural spot to manufacture new endpoints.) + * + * So instead of using endpoint enable calls to control the hardware setup, + * this driver defines a "fifo mode" parameter. It's used during driver + * initialization to choose among a set of pre-defined endpoint configs. + * See omap_udc_setup() for available modes, or to add others. That code + * lives in an init section, so use this driver as a module if you need + * to change the fifo mode after the kernel boots. + * + * Gadget drivers normally ignore endpoints they don't care about, and + * won't include them in configuration descriptors. That means only + * misbehaving hosts would even notice they exist. + */ +#ifdef USE_ISO +static unsigned fifo_mode = 3; +#else +static unsigned fifo_mode = 0; +#endif + +/* "modprobe omap_udc fifo_mode=42", or else as a kernel + * boot parameter "omap_udc:fifo_mode=42" + */ +module_param (fifo_mode, uint, 0); +MODULE_PARM_DESC (fifo_mode, "endpoint setup (0 == default)"); + + +#ifdef USE_DMA +static unsigned use_dma = 1; + +/* "modprobe omap_udc use_dma=y", or else as a kernel + * boot parameter "omap_udc:use_dma=y" + */ +module_param (use_dma, bool, 0); +MODULE_PARM_DESC (use_dma, "enable/disable DMA"); +#else /* !USE_DMA */ + +/* save a bit of code */ +#define use_dma 0 +#endif /* !USE_DMA */ + + +static const char driver_name [] = "omap_udc"; +static const char driver_desc [] = DRIVER_DESC; + +/*-------------------------------------------------------------------------*/ + +/* there's a notion of "current endpoint" for modifying endpoint + * state, and PIO access to its FIFO. + */ + +static void use_ep(struct omap_ep *ep, u16 select) +{ + u16 num = ep->bEndpointAddress & 0x0f; + + if (ep->bEndpointAddress & USB_DIR_IN) + num |= UDC_EP_DIR; + UDC_EP_NUM_REG = num | select; + /* when select, MUST deselect later !! */ +} + +static inline void deselect_ep(void) +{ + UDC_EP_NUM_REG &= ~UDC_EP_SEL; + /* 6 wait states before TX will happen */ +} + +static void dma_channel_claim(struct omap_ep *ep, unsigned preferred); + +/*-------------------------------------------------------------------------*/ + +static int omap_ep_enable(struct usb_ep *_ep, + const struct usb_endpoint_descriptor *desc) +{ + struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); + struct omap_udc *udc; + unsigned long flags; + u16 maxp; + + /* catch various bogus parameters */ + if (!_ep || !desc || ep->desc + || desc->bDescriptorType != USB_DT_ENDPOINT + || ep->bEndpointAddress != desc->bEndpointAddress + || ep->maxpacket < le16_to_cpu + (desc->wMaxPacketSize)) { + DBG("%s, bad ep or descriptor\n", __FUNCTION__); + return -EINVAL; + } + maxp = le16_to_cpu (desc->wMaxPacketSize); + if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK + && maxp != ep->maxpacket) + || desc->wMaxPacketSize > ep->maxpacket + || !desc->wMaxPacketSize) { + DBG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); + return -ERANGE; + } + +#ifdef USE_ISO + if ((desc->bmAttributes == USB_ENDPOINT_XFER_ISOC + && desc->bInterval != 1)) { + /* hardware wants period = 1; USB allows 2^(Interval-1) */ + DBG("%s, unsupported ISO period %dms\n", _ep->name, + 1 << (desc->bInterval - 1)); + return -EDOM; + } +#else + if (desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { + DBG("%s, ISO nyet\n", _ep->name); + return -EDOM; + } +#endif + + /* xfer types must match, except that interrupt ~= bulk */ + if (ep->bmAttributes != desc->bmAttributes + && ep->bmAttributes != USB_ENDPOINT_XFER_BULK + && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { + DBG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); + return -EINVAL; + } + + udc = ep->udc; + if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { + DBG("%s, bogus device state\n", __FUNCTION__); + return -ESHUTDOWN; + } + + spin_lock_irqsave(&udc->lock, flags); + + ep->desc = desc; + ep->irqs = 0; + ep->stopped = 0; + ep->ep.maxpacket = maxp; + + /* set endpoint to initial state */ + ep->dma_channel = 0; + ep->has_dma = 0; + ep->lch = -1; + use_ep(ep, UDC_EP_SEL); + UDC_CTRL_REG = UDC_RESET_EP; + ep->ackwait = 0; + deselect_ep(); + + if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) + list_add(&ep->iso, &udc->iso); + + /* maybe assign a DMA channel to this endpoint */ + if (use_dma && desc->bmAttributes == USB_ENDPOINT_XFER_BULK + && !(ep->bEndpointAddress & USB_DIR_IN)) + /* FIXME ISO can dma, but prefers first channel. + * IN can dma, but lacks debugging. + */ + dma_channel_claim(ep, 0); + + /* PIO OUT may RX packets */ + if (desc->bmAttributes != USB_ENDPOINT_XFER_ISOC + && !ep->has_dma + && !(ep->bEndpointAddress & USB_DIR_IN)) + UDC_CTRL_REG = UDC_SET_FIFO_EN; + + spin_unlock_irqrestore(&udc->lock, flags); + VDBG("%s enabled\n", _ep->name); + return 0; +} + +static void nuke(struct omap_ep *, int status); + +static int omap_ep_disable(struct usb_ep *_ep) +{ + struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); + unsigned long flags; + + if (!_ep || !ep->desc) { + DBG("%s, %s not enabled\n", __FUNCTION__, + _ep ? ep->ep.name : NULL); + return -EINVAL; + } + + spin_lock_irqsave(&ep->udc->lock, flags); + ep->desc = 0; + nuke (ep, -ESHUTDOWN); + ep->ep.maxpacket = ep->maxpacket; + ep->has_dma = 0; + UDC_CTRL_REG = UDC_SET_HALT; + list_del_init(&ep->iso); + + spin_unlock_irqrestore(&ep->udc->lock, flags); + + VDBG("%s disabled\n", _ep->name); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static struct usb_request * +omap_alloc_request(struct usb_ep *ep, int gfp_flags) +{ + struct omap_req *req; + + req = kmalloc(sizeof *req, gfp_flags); + if (req) { + memset (req, 0, sizeof *req); + req->req.dma = DMA_ADDR_INVALID; + INIT_LIST_HEAD (&req->queue); + } + return &req->req; +} + +static void +omap_free_request(struct usb_ep *ep, struct usb_request *_req) +{ + struct omap_req *req = container_of(_req, struct omap_req, req); + + if (_req) + kfree (req); +} + +/*-------------------------------------------------------------------------*/ + +static void * +omap_alloc_buffer( + struct usb_ep *_ep, + unsigned bytes, + dma_addr_t *dma, + int gfp_flags +) +{ + void *retval; + struct omap_ep *ep; + + ep = container_of(_ep, struct omap_ep, ep); + if (use_dma && ep->has_dma) { + static int warned; + if (!warned && bytes < PAGE_SIZE) { + dev_warn(ep->udc->gadget.dev.parent, + "using dma_alloc_coherent for " + "small allocations wastes memory\n"); + warned++; + } + return dma_alloc_coherent(ep->udc->gadget.dev.parent, + bytes, dma, gfp_flags); + } + + retval = kmalloc(bytes, gfp_flags); + if (retval) + *dma = virt_to_phys(retval); + return retval; +} + +static void omap_free_buffer( + struct usb_ep *_ep, + void *buf, + dma_addr_t dma, + unsigned bytes +) +{ + struct omap_ep *ep; + + ep = container_of(_ep, struct omap_ep, ep); + if (use_dma && _ep && ep->has_dma) + dma_free_coherent(ep->udc->gadget.dev.parent, bytes, buf, dma); + else + kfree (buf); +} + +/*-------------------------------------------------------------------------*/ + +static void +done(struct omap_ep *ep, struct omap_req *req, int status) +{ + unsigned stopped = ep->stopped; + + list_del_init(&req->queue); + + if (req->req.status == -EINPROGRESS) + req->req.status = status; + else + status = req->req.status; + + if (use_dma && ep->has_dma) { + if (req->mapped) { + dma_unmap_single(ep->udc->gadget.dev.parent, + req->req.dma, req->req.length, + (ep->bEndpointAddress & USB_DIR_IN) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + req->req.dma = DMA_ADDR_INVALID; + req->mapped = 0; + } else + dma_sync_single_for_cpu(ep->udc->gadget.dev.parent, + req->req.dma, req->req.length, + (ep->bEndpointAddress & USB_DIR_IN) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + } + +#ifndef USB_TRACE + if (status && status != -ESHUTDOWN) +#endif + VDBG("complete %s req %p stat %d len %u/%u\n", + ep->ep.name, &req->req, status, + req->req.actual, req->req.length); + + /* don't modify queue heads during completion callback */ + ep->stopped = 1; + spin_unlock(&ep->udc->lock); + req->req.complete(&ep->ep, &req->req); + spin_lock(&ep->udc->lock); + ep->stopped = stopped; +} + +/*-------------------------------------------------------------------------*/ + +#define FIFO_FULL (UDC_NON_ISO_FIFO_FULL | UDC_ISO_FIFO_FULL) +#define FIFO_UNWRITABLE (UDC_EP_HALTED | FIFO_FULL) + +#define FIFO_EMPTY (UDC_NON_ISO_FIFO_EMPTY | UDC_ISO_FIFO_EMPTY) +#define FIFO_UNREADABLE (UDC_EP_HALTED | FIFO_EMPTY) + +static inline int +write_packet(u8 *buf, struct omap_req *req, unsigned max) +{ + unsigned len; + u16 *wp; + + len = min(req->req.length - req->req.actual, max); + req->req.actual += len; + + max = len; + if (likely((((int)buf) & 1) == 0)) { + wp = (u16 *)buf; + while (max >= 2) { + UDC_DATA_REG = *wp++; + max -= 2; + } + buf = (u8 *)wp; + } + while (max--) + *(volatile u8 *)&UDC_DATA_REG = *buf++; + return len; +} + +// FIXME change r/w fifo calling convention + + +// return: 0 = still running, 1 = completed, negative = errno +static int write_fifo(struct omap_ep *ep, struct omap_req *req) +{ + u8 *buf; + unsigned count; + int is_last; + u16 ep_stat; + + buf = req->req.buf + req->req.actual; + prefetch(buf); + + /* PIO-IN isn't double buffered except for iso */ + ep_stat = UDC_STAT_FLG_REG; + if (ep_stat & FIFO_UNWRITABLE) + return 0; + + count = ep->ep.maxpacket; + count = write_packet(buf, req, count); + UDC_CTRL_REG = UDC_SET_FIFO_EN; + ep->ackwait = 1; + + /* last packet is often short (sometimes a zlp) */ + if (count != ep->ep.maxpacket) + is_last = 1; + else if (req->req.length == req->req.actual + && !req->req.zero) + is_last = 1; + else + is_last = 0; + + /* NOTE: requests complete when all IN data is in a + * FIFO (or sometimes later, if a zlp was needed). + * Use usb_ep_fifo_status() where needed. + */ + if (is_last) + done(ep, req, 0); + return is_last; +} + +static inline int +read_packet(u8 *buf, struct omap_req *req, unsigned avail) +{ + unsigned len; + u16 *wp; + + len = min(req->req.length - req->req.actual, avail); + req->req.actual += len; + avail = len; + + if (likely((((int)buf) & 1) == 0)) { + wp = (u16 *)buf; + while (avail >= 2) { + *wp++ = UDC_DATA_REG; + avail -= 2; + } + buf = (u8 *)wp; + } + while (avail--) + *buf++ = *(volatile u8 *)&UDC_DATA_REG; + return len; +} + +// return: 0 = still running, 1 = queue empty, negative = errno +static int read_fifo(struct omap_ep *ep, struct omap_req *req) +{ + u8 *buf; + unsigned count, avail; + int is_last; + + buf = req->req.buf + req->req.actual; + prefetchw(buf); + + for (;;) { + u16 ep_stat = UDC_STAT_FLG_REG; + + is_last = 0; + if (ep_stat & FIFO_UNREADABLE) + break; + + if (ep_stat & (UDC_NON_ISO_FIFO_FULL|UDC_ISO_FIFO_FULL)) + avail = ep->ep.maxpacket; + else + avail = UDC_RXFSTAT_REG; + count = read_packet(buf, req, avail); + + // FIXME double buffered PIO OUT wasn't behaving... + + /* partial packet reads may not be errors */ + if (count < ep->ep.maxpacket) { + is_last = 1; + /* overflowed this request? flush extra data */ + if (count != avail) { + req->req.status = -EOVERFLOW; + avail -= count; + while (avail--) + (void) *(volatile u8 *)&UDC_DATA_REG; + } + } else if (req->req.length == req->req.actual) + is_last = 1; + else + is_last = 0; + + if (!ep->bEndpointAddress) + break; + if (!ep->double_buf) { + UDC_CTRL_REG = UDC_SET_FIFO_EN; + if (!is_last) + break; + } + + if (is_last) { + done(ep, req, 0); + if (list_empty(&ep->queue) || !ep->double_buf) + break; + req = container_of(ep->queue.next, + struct omap_req, queue); + is_last = 0; + } + } + return is_last; +} + +/*-------------------------------------------------------------------------*/ + +/* Each USB transfer request using DMA maps to one or more DMA transfers. + * When DMA completion isn't request completion, the UDC continues with + * the next DMA transfer for that USB transfer. + */ + +static void next_in_dma(struct omap_ep *ep, struct omap_req *req) +{ + u16 txdma_ctrl; + unsigned length = req->req.length - req->req.actual; + + /* measure length in either bytes or packets */ + if (length <= (UDC_TXN_TSC + 1)) { + txdma_ctrl = UDC_TXN_EOT | length; + omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, + length, 1, OMAP_DMA_SYNC_ELEMENT); + } else { + length = max(length / ep->maxpacket, + (unsigned) UDC_TXN_TSC + 1); + txdma_ctrl = length; + omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, + ep->ep.maxpacket, length, + OMAP_DMA_SYNC_ELEMENT); + length *= ep->maxpacket; + } + + omap_set_dma_src_params(ep->lch, OMAP_DMA_PORT_EMIFF, + OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); + + omap_start_dma(ep->lch); + UDC_DMA_IRQ_EN_REG |= UDC_TX_DONE_IE(ep->dma_channel); + UDC_TXDMA_REG(ep->dma_channel) = UDC_TXN_START | txdma_ctrl; + req->dma_bytes = length; +} + +static void finish_in_dma(struct omap_ep *ep, struct omap_req *req, int status) +{ + if (status == 0) { + req->req.actual += req->dma_bytes; + + /* return if this request needs to send data or zlp */ + if (req->req.actual < req->req.length) + return; + if (req->req.zero + && req->dma_bytes != 0 + && (req->req.actual % ep->maxpacket) == 0) + return; + } else { + u32 last; + + // FIXME this surely isn't #bytes transferred + last = (omap_readw(OMAP_DMA_CSSA_U(ep->lch)) << 16) + | omap_readw(OMAP_DMA_CSSA_L(ep->lch)); + req->req.actual = last - req->req.dma; + } + + /* tx completion */ + omap_stop_dma(ep->lch); + UDC_DMA_IRQ_EN_REG &= ~UDC_TX_DONE_IE(ep->dma_channel); + done(ep, req, status); +} + +static void next_out_dma(struct omap_ep *ep, struct omap_req *req) +{ + unsigned packets; + + /* NOTE: we filtered out "short reads" before, so we know + * the buffer has only whole numbers of packets. + */ + + /* set up this DMA transfer, enable the fifo, start */ + packets = (req->req.length - req->req.actual) / ep->ep.maxpacket; + packets = min(packets, (unsigned)UDC_RXN_TC + 1); + req->dma_bytes = packets * ep->ep.maxpacket; + omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, + ep->ep.maxpacket, packets, + OMAP_DMA_SYNC_ELEMENT); + omap_set_dma_dest_params(ep->lch, OMAP_DMA_PORT_EMIFF, + OMAP_DMA_AMODE_POST_INC, req->req.dma + req->req.actual); + + UDC_RXDMA_REG(ep->dma_channel) = UDC_RXN_STOP | (packets - 1); + UDC_DMA_IRQ_EN_REG |= UDC_RX_EOT_IE(ep->dma_channel); + UDC_EP_NUM_REG = (ep->bEndpointAddress & 0xf); + UDC_CTRL_REG = UDC_SET_FIFO_EN; + + omap_start_dma(ep->lch); +} + +static void +finish_out_dma(struct omap_ep *ep, struct omap_req *req, int status) +{ + u16 count; + + /* FIXME must be a better way to see how much dma + * happened, even when it never got going... + */ + count = omap_readw(OMAP_DMA_CDAC(ep->lch)); + count -= 0xffff & (req->req.dma + req->req.actual); + count += req->req.actual; + if (count <= req->req.length) + req->req.actual = count; + + if (count != req->dma_bytes || status) + omap_stop_dma(ep->lch); + + /* if this wasn't short, request may need another transfer */ + else if (req->req.actual < req->req.length) + return; + + /* rx completion */ + UDC_DMA_IRQ_EN_REG &= ~UDC_RX_EOT_IE(ep->dma_channel); + done(ep, req, status); +} + +static void dma_irq(struct omap_udc *udc, u16 irq_src) +{ + u16 dman_stat = UDC_DMAN_STAT_REG; + struct omap_ep *ep; + struct omap_req *req; + + /* IN dma: tx to host */ + if (irq_src & UDC_TXN_DONE) { + ep = &udc->ep[16 + UDC_DMA_TX_SRC(dman_stat)]; + ep->irqs++; + /* can see TXN_DONE after dma abort */ + if (!list_empty(&ep->queue)) { + req = container_of(ep->queue.next, + struct omap_req, queue); + finish_in_dma(ep, req, 0); + } + UDC_IRQ_SRC_REG = UDC_TXN_DONE; + + if (!list_empty (&ep->queue)) { + req = container_of(ep->queue.next, + struct omap_req, queue); + next_in_dma(ep, req); + } + } + + /* OUT dma: rx from host */ + if (irq_src & UDC_RXN_EOT) { + ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; + ep->irqs++; + /* can see RXN_EOT after dma abort */ + if (!list_empty(&ep->queue)) { + req = container_of(ep->queue.next, + struct omap_req, queue); + finish_out_dma(ep, req, 0); + } + UDC_IRQ_SRC_REG = UDC_RXN_EOT; + + if (!list_empty (&ep->queue)) { + req = container_of(ep->queue.next, + struct omap_req, queue); + next_out_dma(ep, req); + } + } + + if (irq_src & UDC_RXN_CNT) { + ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; + DBG("%s, RX_CNT irq?\n", ep->ep.name); + UDC_IRQ_SRC_REG = UDC_RXN_CNT; + } +} + +static void dma_error(int lch, u16 ch_status, void *data) +{ + struct omap_ep *ep = data; + + /* if ch_status & OMAP_DMA_DROP_IRQ ... */ + /* if ch_status & OMAP_DMA_TOUT_IRQ ... */ + ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); + + /* complete current transfer ... */ +} + +static void dma_channel_claim(struct omap_ep *ep, unsigned channel) +{ + u16 reg; + int status, restart, is_in; + + is_in = ep->bEndpointAddress & USB_DIR_IN; + if (is_in) + reg = UDC_TXDMA_CFG_REG; + else + reg = UDC_RXDMA_CFG_REG; + reg |= 1 << 12; /* "pulse" activated */ + + ep->dma_channel = 0; + ep->lch = -1; + if (channel == 0 || channel > 3) { + if ((reg & 0x0f00) == 0) + channel = 3; + else if ((reg & 0x00f0) == 0) + channel = 2; + else if ((reg & 0x000f) == 0) /* preferred for ISO */ + channel = 1; + else { + status = -EMLINK; + goto just_restart; + } + } + reg |= (0x0f & ep->bEndpointAddress) << (4 * (channel - 1)); + ep->dma_channel = channel; + + if (is_in) { + status = omap_request_dma(OMAP_DMA_USB_W2FC_TX0 - 1 + channel, + ep->ep.name, dma_error, ep, &ep->lch); + if (status == 0) { + UDC_TXDMA_CFG_REG = reg; + omap_set_dma_dest_params(ep->lch, + OMAP_DMA_PORT_TIPB, + OMAP_DMA_AMODE_CONSTANT, + (unsigned long) io_v2p((u32)&UDC_DATA_DMA_REG)); + } + } else { + status = omap_request_dma(OMAP_DMA_USB_W2FC_RX0 - 1 + channel, + ep->ep.name, dma_error, ep, &ep->lch); + if (status == 0) { + UDC_RXDMA_CFG_REG = reg; + omap_set_dma_src_params(ep->lch, + OMAP_DMA_PORT_TIPB, + OMAP_DMA_AMODE_CONSTANT, + (unsigned long) io_v2p((u32)&UDC_DATA_DMA_REG)); + } + } + if (status) + ep->dma_channel = 0; + else { + ep->has_dma = 1; + omap_disable_dma_irq(ep->lch, OMAP_DMA_BLOCK_IRQ); + + /* channel type P: hw synch (fifo) */ + omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch)); + } + +just_restart: + /* restart any queue, even if the claim failed */ + restart = !ep->stopped && !list_empty(&ep->queue); + + if (status) + DBG("%s no dma channel: %d%s\n", ep->ep.name, status, + restart ? " (restart)" : ""); + else + DBG("%s claimed %cxdma%d lch %d%s\n", ep->ep.name, + is_in ? 't' : 'r', + ep->dma_channel - 1, ep->lch, + restart ? " (restart)" : ""); + + if (restart) { + struct omap_req *req; + req = container_of(ep->queue.next, struct omap_req, queue); + if (ep->has_dma) + (is_in ? next_in_dma : next_out_dma)(ep, req); + else { + use_ep(ep, UDC_EP_SEL); + (is_in ? write_fifo : read_fifo)(ep, req); + deselect_ep(); + /* IN: 6 wait states before it'll tx */ + } + } +} + +static void dma_channel_release(struct omap_ep *ep) +{ + int shift = 4 * (ep->dma_channel - 1); + u16 mask = 0x0f << shift; + struct omap_req *req; + int active; + + /* abort any active usb transfer request */ + if (!list_empty(&ep->queue)) + req = container_of(ep->queue.next, struct omap_req, queue); + else + req = 0; + + active = ((1 << 7) & omap_readl(OMAP_DMA_CCR(ep->lch))) != 0; + + DBG("%s release %s %cxdma%d %p\n", ep->ep.name, + active ? "active" : "idle", + (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r', + ep->dma_channel - 1, req); + + /* wait till current packet DMA finishes, and fifo empties */ + if (ep->bEndpointAddress & USB_DIR_IN) { + UDC_TXDMA_CFG_REG &= ~mask; + + if (req) { + if (active) + udelay(50); + finish_in_dma(ep, req, -ECONNRESET); + if (UDC_TXDMA_CFG_REG & mask) + WARN("%s, SPIN abort TX dma\n", ep->ep.name); + } + + /* host may empty the fifo (or not...) */ + while (UDC_TXDMA_CFG_REG & mask) + udelay(10); + + } else { + UDC_RXDMA_CFG_REG &= ~mask; + + /* dma empties the fifo */ + while (active && (UDC_RXDMA_CFG_REG & mask)) + udelay(10); + omap_stop_dma(ep->lch); + if (req) + finish_out_dma(ep, req, -ECONNRESET); + } + omap_free_dma(ep->lch); + ep->dma_channel = 0; + ep->lch = -1; + /* has_dma still set, till endpoint is fully quiesced */ +} + + +/*-------------------------------------------------------------------------*/ + +static int +omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, int gfp_flags) +{ + struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); + struct omap_req *req = container_of(_req, struct omap_req, req); + struct omap_udc *udc; + unsigned long flags; + int is_iso = 0; + + /* catch various bogus parameters */ + if (!_req || !req->req.complete || !req->req.buf + || !list_empty(&req->queue)) { + DBG("%s, bad params\n", __FUNCTION__); + return -EINVAL; + } + if (!_ep || (!ep->desc && ep->bEndpointAddress)) { + DBG("%s, bad ep\n", __FUNCTION__); + return -EINVAL; + } + if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { + if (req->req.length > ep->ep.maxpacket) + return -EMSGSIZE; + is_iso = 1; + } + + /* this isn't bogus, but OMAP DMA isn't the only hardware to + * have a hard time with partial packet reads... reject it. + */ + if (use_dma + && ep->has_dma + && ep->bEndpointAddress != 0 + && (ep->bEndpointAddress & USB_DIR_IN) == 0 + && (req->req.length % ep->ep.maxpacket) != 0) { + DBG("%s, no partial packet OUT reads\n", __FUNCTION__); + return -EMSGSIZE; + } + + udc = ep->udc; + if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) + return -ESHUTDOWN; + + if (use_dma && ep->has_dma) { + if (req->req.dma == DMA_ADDR_INVALID) { + req->req.dma = dma_map_single( + ep->udc->gadget.dev.parent, + req->req.buf, + req->req.length, + (ep->bEndpointAddress & USB_DIR_IN) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + req->mapped = 1; + } else { + dma_sync_single_for_device( + ep->udc->gadget.dev.parent, + req->req.dma, req->req.length, + (ep->bEndpointAddress & USB_DIR_IN) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + req->mapped = 0; + } + } + + VDBG("%s queue req %p, len %d buf %p\n", + ep->ep.name, _req, _req->length, _req->buf); + + spin_lock_irqsave(&udc->lock, flags); + + req->req.status = -EINPROGRESS; + req->req.actual = 0; + + /* maybe kickstart non-iso i/o queues */ + if (is_iso) + UDC_IRQ_EN_REG |= UDC_SOF_IE; + else if (list_empty(&ep->queue) && !ep->stopped && !ep->ackwait) { + int is_in; + + if (ep->bEndpointAddress == 0) { + if (!udc->ep0_pending || !list_empty (&ep->queue)) { + spin_unlock_irqrestore(&udc->lock, flags); + return -EL2HLT; + } + + /* empty DATA stage? */ + is_in = udc->ep0_in; + if (!req->req.length) { + + /* chip became CONFIGURED or ADDRESSED + * earlier; drivers may already have queued + * requests to non-control endpoints + */ + if (udc->ep0_set_config) { + u16 irq_en = UDC_IRQ_EN_REG; + + irq_en |= UDC_DS_CHG_IE | UDC_EP0_IE; + if (!udc->ep0_reset_config) + irq_en |= UDC_EPN_RX_IE + | UDC_EPN_TX_IE; + UDC_IRQ_EN_REG = irq_en; + } + + /* STATUS is reverse direction */ + UDC_EP_NUM_REG = is_in + ? UDC_EP_SEL + : (UDC_EP_SEL|UDC_EP_DIR); + UDC_CTRL_REG = UDC_CLR_EP; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = udc->ep0_in ? 0 : UDC_EP_DIR; + + /* cleanup */ + udc->ep0_pending = 0; + done(ep, req, 0); + req = 0; + + /* non-empty DATA stage */ + } else if (is_in) { + UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR; + } else { + if (udc->ep0_setup) + goto irq_wait; + UDC_EP_NUM_REG = UDC_EP_SEL; + } + } else { + is_in = ep->bEndpointAddress & USB_DIR_IN; + if (!ep->has_dma) + use_ep(ep, UDC_EP_SEL); + /* if ISO: SOF IRQs must be enabled/disabled! */ + } + + if (ep->has_dma) + (is_in ? next_in_dma : next_out_dma)(ep, req); + else if (req) { + if ((is_in ? write_fifo : read_fifo)(ep, req) == 1) + req = 0; + deselect_ep(); + /* IN: 6 wait states before it'll tx */ + } + } + +irq_wait: + /* irq handler advances the queue */ + if (req != 0) + list_add_tail(&req->queue, &ep->queue); + spin_unlock_irqrestore(&udc->lock, flags); + + return 0; +} + +static int omap_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) +{ + struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); + struct omap_req *req; + unsigned long flags; + + if (!_ep || !_req) + return -EINVAL; + + spin_lock_irqsave(&ep->udc->lock, flags); + + /* make sure it's actually queued on this endpoint */ + list_for_each_entry (req, &ep->queue, queue) { + if (&req->req == _req) + break; + } + if (&req->req != _req) { + spin_unlock_irqrestore(&ep->udc->lock, flags); + return -EINVAL; + } + + if (use_dma && ep->dma_channel && ep->queue.next == &req->queue) { + int channel = ep->dma_channel; + + /* releasing the dma completion cancels the request, + * reclaiming the channel restarts the queue + */ + dma_channel_release(ep); + dma_channel_claim(ep, channel); + } else + done(ep, req, -ECONNRESET); + spin_unlock_irqrestore(&ep->udc->lock, flags); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static int omap_ep_set_halt(struct usb_ep *_ep, int value) +{ + struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); + unsigned long flags; + int status = -EOPNOTSUPP; + + spin_lock_irqsave(&ep->udc->lock, flags); + + /* just use protocol stalls for ep0; real halts are annoying */ + if (ep->bEndpointAddress == 0) { + if (!ep->udc->ep0_pending) + status = -EINVAL; + else if (value) { + if (ep->udc->ep0_set_config) { + WARN("error changing config?\n"); + UDC_SYSCON2_REG = UDC_CLR_CFG; + } + UDC_SYSCON2_REG = UDC_STALL_CMD; + ep->udc->ep0_pending = 0; + status = 0; + } else /* NOP */ + status = 0; + + /* otherwise, all active non-ISO endpoints can halt */ + } else if (ep->bmAttributes != USB_ENDPOINT_XFER_ISOC && ep->desc) { + + /* IN endpoints must already be idle */ + if ((ep->bEndpointAddress & USB_DIR_IN) + && !list_empty(&ep->queue)) { + status = -EAGAIN; + goto done; + } + + if (value) { + int channel; + + if (use_dma && ep->dma_channel + && !list_empty(&ep->queue)) { + channel = ep->dma_channel; + dma_channel_release(ep); + } else + channel = 0; + + use_ep(ep, UDC_EP_SEL); + if (UDC_STAT_FLG_REG & UDC_NON_ISO_FIFO_EMPTY) { + UDC_CTRL_REG = UDC_SET_HALT; + status = 0; + } else + status = -EAGAIN; + deselect_ep(); + + if (channel) + dma_channel_claim(ep, channel); + } else { + use_ep(ep, 0); + UDC_CTRL_REG = UDC_RESET_EP; + ep->ackwait = 0; + if (!(ep->bEndpointAddress & USB_DIR_IN)) + UDC_CTRL_REG = UDC_SET_FIFO_EN; + } + } +done: + VDBG("%s %s halt stat %d\n", ep->ep.name, + value ? "set" : "clear", status); + + spin_unlock_irqrestore(&ep->udc->lock, flags); + return status; +} + +static struct usb_ep_ops omap_ep_ops = { + .enable = omap_ep_enable, + .disable = omap_ep_disable, + + .alloc_request = omap_alloc_request, + .free_request = omap_free_request, + + .alloc_buffer = omap_alloc_buffer, + .free_buffer = omap_free_buffer, + + .queue = omap_ep_queue, + .dequeue = omap_ep_dequeue, + + .set_halt = omap_ep_set_halt, + // fifo_status ... report bytes in fifo + // fifo_flush ... flush fifo +}; + +/*-------------------------------------------------------------------------*/ + +static int omap_get_frame(struct usb_gadget *gadget) +{ + u16 sof = UDC_SOF_REG; + return (sof & UDC_TS_OK) ? (sof & UDC_TS) : -EL2NSYNC; +} + +static int omap_wakeup(struct usb_gadget *gadget) +{ + struct omap_udc *udc; + unsigned long flags; + int retval = -EHOSTUNREACH; + + udc = container_of(gadget, struct omap_udc, gadget); + + spin_lock_irqsave(&udc->lock, flags); + if (udc->devstat & UDC_SUS) { + /* NOTE: OTG spec erratum says that OTG devices may + * issue wakeups without host enable. + */ + if (udc->devstat & (UDC_B_HNP_ENABLE|UDC_R_WK_OK)) { + DBG("remote wakeup...\n"); + UDC_SYSCON2_REG = UDC_RMT_WKP; + retval = 0; + } + + /* NOTE: non-OTG systems may use SRP TOO... */ + } else if (!(udc->devstat & UDC_ATT)) { + if (udc->transceiver) + retval = otg_start_srp(udc->transceiver); + } + spin_unlock_irqrestore(&udc->lock, flags); + + return retval; +} + +static int +omap_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered) +{ + struct omap_udc *udc; + unsigned long flags; + u16 syscon1; + + udc = container_of(gadget, struct omap_udc, gadget); + spin_lock_irqsave(&udc->lock, flags); + syscon1 = UDC_SYSCON1_REG; + if (is_selfpowered) + syscon1 |= UDC_SELF_PWR; + else + syscon1 &= ~UDC_SELF_PWR; + UDC_SYSCON1_REG = syscon1; + spin_unlock_irqrestore(&udc->lock, flags); + + return 0; +} + +static int can_pullup(struct omap_udc *udc) +{ + return udc->driver && udc->softconnect && udc->vbus_active; +} + +static void pullup_enable(struct omap_udc *udc) +{ + UDC_SYSCON1_REG |= UDC_PULLUP_EN; +#ifndef CONFIG_USB_OTG + OTG_CTRL_REG |= OTG_BSESSVLD; +#endif + UDC_IRQ_EN_REG = UDC_DS_CHG_IE; +} + +static void pullup_disable(struct omap_udc *udc) +{ +#ifndef CONFIG_USB_OTG + OTG_CTRL_REG &= ~OTG_BSESSVLD; +#endif + UDC_IRQ_EN_REG = UDC_DS_CHG_IE; + UDC_SYSCON1_REG &= ~UDC_PULLUP_EN; +} + +/* + * Called by whatever detects VBUS sessions: external transceiver + * driver, or maybe GPIO0 VBUS IRQ. + */ +static int omap_vbus_session(struct usb_gadget *gadget, int is_active) +{ + struct omap_udc *udc; + unsigned long flags; + + udc = container_of(gadget, struct omap_udc, gadget); + spin_lock_irqsave(&udc->lock, flags); + VDBG("VBUS %s\n", is_active ? "on" : "off"); + udc->vbus_active = (is_active != 0); + if (can_pullup(udc)) + pullup_enable(udc); + else + pullup_disable(udc); + spin_unlock_irqrestore(&udc->lock, flags); + return 0; +} + +static int omap_vbus_draw(struct usb_gadget *gadget, unsigned mA) +{ + struct omap_udc *udc; + + udc = container_of(gadget, struct omap_udc, gadget); + if (udc->transceiver) + return otg_set_power(udc->transceiver, mA); + return -EOPNOTSUPP; +} + +static int omap_pullup(struct usb_gadget *gadget, int is_on) +{ + struct omap_udc *udc; + unsigned long flags; + + udc = container_of(gadget, struct omap_udc, gadget); + spin_lock_irqsave(&udc->lock, flags); + udc->softconnect = (is_on != 0); + if (can_pullup(udc)) + pullup_enable(udc); + else + pullup_disable(udc); + spin_unlock_irqrestore(&udc->lock, flags); + return 0; +} + +static struct usb_gadget_ops omap_gadget_ops = { + .get_frame = omap_get_frame, + .wakeup = omap_wakeup, + .set_selfpowered = omap_set_selfpowered, + .vbus_session = omap_vbus_session, + .vbus_draw = omap_vbus_draw, + .pullup = omap_pullup, +}; + +/*-------------------------------------------------------------------------*/ + +/* dequeue ALL requests; caller holds udc->lock */ +static void nuke(struct omap_ep *ep, int status) +{ + struct omap_req *req; + + ep->stopped = 1; + + if (use_dma && ep->dma_channel) + dma_channel_release(ep); + + use_ep(ep, 0); + UDC_CTRL_REG = UDC_CLR_EP; + if (ep->bEndpointAddress && ep->bmAttributes != USB_ENDPOINT_XFER_ISOC) + UDC_CTRL_REG = UDC_SET_HALT; + + while (!list_empty(&ep->queue)) { + req = list_entry(ep->queue.next, struct omap_req, queue); + done(ep, req, status); + } +} + +/* caller holds udc->lock */ +static void udc_quiesce(struct omap_udc *udc) +{ + struct omap_ep *ep; + + udc->gadget.speed = USB_SPEED_UNKNOWN; + nuke(&udc->ep[0], -ESHUTDOWN); + list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) + nuke(ep, -ESHUTDOWN); +} + +/*-------------------------------------------------------------------------*/ + +static void update_otg(struct omap_udc *udc) +{ + u16 devstat; + + if (!udc->gadget.is_otg) + return; + + if (OTG_CTRL_REG & OTG_ID) + devstat = UDC_DEVSTAT_REG; + else + devstat = 0; + + udc->gadget.b_hnp_enable = !!(devstat & UDC_B_HNP_ENABLE); + udc->gadget.a_hnp_support = !!(devstat & UDC_A_HNP_SUPPORT); + udc->gadget.a_alt_hnp_support = !!(devstat & UDC_A_ALT_HNP_SUPPORT); + + /* Enable HNP early, avoiding races on suspend irq path. + * ASSUMES OTG state machine B_BUS_REQ input is true. + */ + if (udc->gadget.b_hnp_enable) + OTG_CTRL_REG = (OTG_CTRL_REG | OTG_B_HNPEN | OTG_B_BUSREQ) + & ~OTG_PULLUP; +} + +static void ep0_irq(struct omap_udc *udc, u16 irq_src) +{ + struct omap_ep *ep0 = &udc->ep[0]; + struct omap_req *req = 0; + + ep0->irqs++; + + /* Clear any pending requests and then scrub any rx/tx state + * before starting to handle the SETUP request. + */ + if (irq_src & UDC_SETUP) + nuke(ep0, 0); + + /* IN/OUT packets mean we're in the DATA or STATUS stage. + * This driver uses only uses protocol stalls (ep0 never halts), + * and if we got this far the gadget driver already had a + * chance to stall. Tries to be forgiving of host oddities. + * + * NOTE: the last chance gadget drivers have to stall control + * requests is during their request completion callback. + */ + if (!list_empty(&ep0->queue)) + req = container_of(ep0->queue.next, struct omap_req, queue); + + /* IN == TX to host */ + if (irq_src & UDC_EP0_TX) { + int stat; + + UDC_IRQ_SRC_REG = UDC_EP0_TX; + UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR; + stat = UDC_STAT_FLG_REG; + if (stat & UDC_ACK) { + if (udc->ep0_in) { + /* write next IN packet from response, + * or set up the status stage. + */ + if (req) + stat = write_fifo(ep0, req); + UDC_EP_NUM_REG = UDC_EP_DIR; + if (!req && udc->ep0_pending) { + UDC_EP_NUM_REG = UDC_EP_SEL; + UDC_CTRL_REG = UDC_CLR_EP; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = 0; + udc->ep0_pending = 0; + } /* else: 6 wait states before it'll tx */ + } else { + /* ack status stage of OUT transfer */ + UDC_EP_NUM_REG = UDC_EP_DIR; + if (req) + done(ep0, req, 0); + } + req = 0; + } else if (stat & UDC_STALL) { + UDC_CTRL_REG = UDC_CLR_HALT; + UDC_EP_NUM_REG = UDC_EP_DIR; + } else { + UDC_EP_NUM_REG = UDC_EP_DIR; + } + } + + /* OUT == RX from host */ + if (irq_src & UDC_EP0_RX) { + int stat; + + UDC_IRQ_SRC_REG = UDC_EP0_RX; + UDC_EP_NUM_REG = UDC_EP_SEL; + stat = UDC_STAT_FLG_REG; + if (stat & UDC_ACK) { + if (!udc->ep0_in) { + stat = 0; + /* read next OUT packet of request, maybe + * reactiviting the fifo; stall on errors. + */ + if (!req || (stat = read_fifo(ep0, req)) < 0) { + UDC_SYSCON2_REG = UDC_STALL_CMD; + udc->ep0_pending = 0; + stat = 0; + } else if (stat == 0) + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = 0; + + /* activate status stage */ + if (stat == 1) { + done(ep0, req, 0); + /* that may have STALLed ep0... */ + UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR; + UDC_CTRL_REG = UDC_CLR_EP; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = UDC_EP_DIR; + udc->ep0_pending = 0; + } + } else { + /* ack status stage of IN transfer */ + UDC_EP_NUM_REG = 0; + if (req) + done(ep0, req, 0); + } + } else if (stat & UDC_STALL) { + UDC_CTRL_REG = UDC_CLR_HALT; + UDC_EP_NUM_REG = 0; + } else { + UDC_EP_NUM_REG = 0; + } + } + + /* SETUP starts all control transfers */ + if (irq_src & UDC_SETUP) { + union u { + u16 word[4]; + struct usb_ctrlrequest r; + } u; + int status = -EINVAL; + struct omap_ep *ep; + + /* read the (latest) SETUP message */ + do { + UDC_EP_NUM_REG = UDC_SETUP_SEL; + /* two bytes at a time */ + u.word[0] = UDC_DATA_REG; + u.word[1] = UDC_DATA_REG; + u.word[2] = UDC_DATA_REG; + u.word[3] = UDC_DATA_REG; + UDC_EP_NUM_REG = 0; + } while (UDC_IRQ_SRC_REG & UDC_SETUP); + le16_to_cpus (&u.r.wValue); + le16_to_cpus (&u.r.wIndex); + le16_to_cpus (&u.r.wLength); + + /* Delegate almost all control requests to the gadget driver, + * except for a handful of ch9 status/feature requests that + * hardware doesn't autodecode _and_ the gadget API hides. + */ + udc->ep0_in = (u.r.bRequestType & USB_DIR_IN) != 0; + udc->ep0_set_config = 0; + udc->ep0_pending = 1; + ep0->stopped = 0; + ep0->ackwait = 0; + switch (u.r.bRequest) { + case USB_REQ_SET_CONFIGURATION: + /* udc needs to know when ep != 0 is valid */ + if (u.r.bRequestType != USB_RECIP_DEVICE) + goto delegate; + if (u.r.wLength != 0) + goto do_stall; + udc->ep0_set_config = 1; + udc->ep0_reset_config = (u.r.wValue == 0); + VDBG("set config %d\n", u.r.wValue); + + /* update udc NOW since gadget driver may start + * queueing requests immediately; clear config + * later if it fails the request. + */ + if (udc->ep0_reset_config) + UDC_SYSCON2_REG = UDC_CLR_CFG; + else + UDC_SYSCON2_REG = UDC_DEV_CFG; + update_otg(udc); + goto delegate; + case USB_REQ_CLEAR_FEATURE: + /* clear endpoint halt */ + if (u.r.bRequestType != USB_RECIP_ENDPOINT) + goto delegate; + if (u.r.wValue != USB_ENDPOINT_HALT + || u.r.wLength != 0) + goto do_stall; + ep = &udc->ep[u.r.wIndex & 0xf]; + if (ep != ep0) { + if (u.r.wIndex & USB_DIR_IN) + ep += 16; + if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC + || !ep->desc) + goto do_stall; + use_ep(ep, 0); + UDC_CTRL_REG = UDC_RESET_EP; + ep->ackwait = 0; + if (!(ep->bEndpointAddress & USB_DIR_IN)) + UDC_CTRL_REG = UDC_SET_FIFO_EN; + } + VDBG("%s halt cleared by host\n", ep->name); + goto ep0out_status_stage; + case USB_REQ_SET_FEATURE: + /* set endpoint halt */ + if (u.r.bRequestType != USB_RECIP_ENDPOINT) + goto delegate; + if (u.r.wValue != USB_ENDPOINT_HALT + || u.r.wLength != 0) + goto do_stall; + ep = &udc->ep[u.r.wIndex & 0xf]; + if (u.r.wIndex & USB_DIR_IN) + ep += 16; + if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC + || ep == ep0 || !ep->desc) + goto do_stall; + if (use_dma && ep->has_dma) { + /* this has rude side-effects (aborts) and + * can't really work if DMA-IN is active + */ + DBG("%s host set_halt, NYET \n", ep->name); + goto do_stall; + } + use_ep(ep, 0); + /* can't halt if fifo isn't empty... */ + UDC_CTRL_REG = UDC_CLR_EP; + UDC_CTRL_REG = UDC_SET_HALT; + VDBG("%s halted by host\n", ep->name); +ep0out_status_stage: + status = 0; + UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR; + UDC_CTRL_REG = UDC_CLR_EP; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = UDC_EP_DIR; + udc->ep0_pending = 0; + break; + case USB_REQ_GET_STATUS: + /* return interface status. if we were pedantic, + * we'd detect non-existent interfaces, and stall. + */ + if (u.r.bRequestType + != (USB_DIR_IN|USB_RECIP_INTERFACE)) + goto delegate; + /* return two zero bytes */ + UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR; + UDC_DATA_REG = 0; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + UDC_EP_NUM_REG = UDC_EP_DIR; + status = 0; + VDBG("GET_STATUS, interface %d\n", u.r.wIndex); + /* next, status stage */ + break; + default: +delegate: + /* activate the ep0out fifo right away */ + if (!udc->ep0_in && u.r.wLength) { + UDC_EP_NUM_REG = 0; + UDC_CTRL_REG = UDC_SET_FIFO_EN; + } + + /* gadget drivers see class/vendor specific requests, + * {SET,GET}_{INTERFACE,DESCRIPTOR,CONFIGURATION}, + * and more + */ + VDBG("SETUP %02x.%02x v%04x i%04x l%04x\n", + u.r.bRequestType, u.r.bRequest, + u.r.wValue, u.r.wIndex, u.r.wLength); + + /* The gadget driver may return an error here, + * causing an immediate protocol stall. + * + * Else it must issue a response, either queueing a + * response buffer for the DATA stage, or halting ep0 + * (causing a protocol stall, not a real halt). A + * zero length buffer means no DATA stage. + * + * It's fine to issue that response after the setup() + * call returns, and this IRQ was handled. + */ + udc->ep0_setup = 1; + spin_unlock(&udc->lock); + status = udc->driver->setup (&udc->gadget, &u.r); + spin_lock(&udc->lock); + udc->ep0_setup = 0; + } + + if (status < 0) { +do_stall: + VDBG("req %02x.%02x protocol STALL; stat %d\n", + u.r.bRequestType, u.r.bRequest, status); + if (udc->ep0_set_config) { + if (udc->ep0_reset_config) + WARN("error resetting config?\n"); + else + UDC_SYSCON2_REG = UDC_CLR_CFG; + } + UDC_SYSCON2_REG = UDC_STALL_CMD; + udc->ep0_pending = 0; + } + } +} + +/*-------------------------------------------------------------------------*/ + +#define OTG_FLAGS (UDC_B_HNP_ENABLE|UDC_A_HNP_SUPPORT|UDC_A_ALT_HNP_SUPPORT) + +static void devstate_irq(struct omap_udc *udc, u16 irq_src) +{ + u16 devstat, change; + + devstat = UDC_DEVSTAT_REG; + change = devstat ^ udc->devstat; + udc->devstat = devstat; + + if (change & (UDC_USB_RESET|UDC_ATT)) { + udc_quiesce(udc); + + if (change & UDC_ATT) { + /* driver for any external transceiver will + * have called omap_vbus_session() already + */ + if (devstat & UDC_ATT) { + udc->gadget.speed = USB_SPEED_FULL; + VDBG("connect\n"); + if (!udc->transceiver) + pullup_enable(udc); + // if (driver->connect) call it + } else if (udc->gadget.speed != USB_SPEED_UNKNOWN) { + udc->gadget.speed = USB_SPEED_UNKNOWN; + if (!udc->transceiver) + pullup_disable(udc); + DBG("disconnect, gadget %s\n", + udc->driver->driver.name); + if (udc->driver->disconnect) { + spin_unlock(&udc->lock); + udc->driver->disconnect(&udc->gadget); + spin_lock(&udc->lock); + } + } + change &= ~UDC_ATT; + } + + if (change & UDC_USB_RESET) { + if (devstat & UDC_USB_RESET) { + VDBG("RESET=1\n"); + } else { + udc->gadget.speed = USB_SPEED_FULL; + INFO("USB reset done, gadget %s\n", + udc->driver->driver.name); + /* ep0 traffic is legal from now on */ + UDC_IRQ_EN_REG = UDC_DS_CHG_IE | UDC_EP0_IE; + } + change &= ~UDC_USB_RESET; + } + } + if (change & UDC_SUS) { + if (udc->gadget.speed != USB_SPEED_UNKNOWN) { + // FIXME tell isp1301 to suspend/resume (?) + if (devstat & UDC_SUS) { + VDBG("suspend\n"); + update_otg(udc); + /* HNP could be under way already */ + if (udc->gadget.speed == USB_SPEED_FULL + && udc->driver->suspend) { + spin_unlock(&udc->lock); + udc->driver->suspend(&udc->gadget); + spin_lock(&udc->lock); + } + } else { + VDBG("resume\n"); + if (udc->gadget.speed == USB_SPEED_FULL + && udc->driver->resume) { + spin_unlock(&udc->lock); + udc->driver->resume(&udc->gadget); + spin_lock(&udc->lock); + } + } + } + change &= ~UDC_SUS; + } + if (change & OTG_FLAGS) { + update_otg(udc); + change &= ~OTG_FLAGS; + } + + change &= ~(UDC_CFG|UDC_DEF|UDC_ADD); + if (change) + VDBG("devstat %03x, ignore change %03x\n", + devstat, change); + + UDC_IRQ_SRC_REG = UDC_DS_CHG; +} + +static irqreturn_t +omap_udc_irq(int irq, void *_udc, struct pt_regs *r) +{ + struct omap_udc *udc = _udc; + u16 irq_src; + irqreturn_t status = IRQ_NONE; + unsigned long flags; + + spin_lock_irqsave(&udc->lock, flags); + irq_src = UDC_IRQ_SRC_REG; + + /* Device state change (usb ch9 stuff) */ + if (irq_src & UDC_DS_CHG) { + devstate_irq(_udc, irq_src); + status = IRQ_HANDLED; + irq_src &= ~UDC_DS_CHG; + } + + /* EP0 control transfers */ + if (irq_src & (UDC_EP0_RX|UDC_SETUP|UDC_EP0_TX)) { + ep0_irq(_udc, irq_src); + status = IRQ_HANDLED; + irq_src &= ~(UDC_EP0_RX|UDC_SETUP|UDC_EP0_TX); + } + + /* DMA transfer completion */ + if (use_dma && (irq_src & (UDC_TXN_DONE|UDC_RXN_CNT|UDC_RXN_EOT))) { + dma_irq(_udc, irq_src); + status = IRQ_HANDLED; + irq_src &= ~(UDC_TXN_DONE|UDC_RXN_CNT|UDC_RXN_EOT); + } + + irq_src &= ~(UDC_SOF|UDC_EPN_TX|UDC_EPN_RX); + if (irq_src) + DBG("udc_irq, unhandled %03x\n", irq_src); + spin_unlock_irqrestore(&udc->lock, flags); + + return status; +} + +static irqreturn_t +omap_udc_pio_irq(int irq, void *_dev, struct pt_regs *r) +{ + u16 epn_stat, irq_src; + irqreturn_t status = IRQ_NONE; + struct omap_ep *ep; + int epnum; + struct omap_udc *udc = _dev; + struct omap_req *req; + unsigned long flags; + + spin_lock_irqsave(&udc->lock, flags); + epn_stat = UDC_EPN_STAT_REG; + irq_src = UDC_IRQ_SRC_REG; + + /* handle OUT first, to avoid some wasteful NAKs */ + if (irq_src & UDC_EPN_RX) { + epnum = (epn_stat >> 8) & 0x0f; + UDC_IRQ_SRC_REG = UDC_EPN_RX; + status = IRQ_HANDLED; + ep = &udc->ep[epnum]; + ep->irqs++; + + if (!list_empty(&ep->queue)) { + UDC_EP_NUM_REG = epnum | UDC_EP_SEL; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + int stat; + req = container_of(ep->queue.next, + struct omap_req, queue); + stat = read_fifo(ep, req); + // FIXME double buffered PIO OUT should work + } + UDC_EP_NUM_REG = epnum; + } + } + + /* then IN transfers */ + if (irq_src & UDC_EPN_TX) { + epnum = epn_stat & 0x0f; + UDC_IRQ_SRC_REG = UDC_EPN_TX; + status = IRQ_HANDLED; + ep = &udc->ep[16 + epnum]; + ep->irqs++; + ep->ackwait = 0; + + if (!list_empty(&ep->queue)) { + UDC_EP_NUM_REG = epnum | UDC_EP_DIR | UDC_EP_SEL; + if ((UDC_STAT_FLG_REG & UDC_ACK)) { + req = container_of(ep->queue.next, + struct omap_req, queue); + (void) write_fifo(ep, req); + } + UDC_EP_NUM_REG = epnum | UDC_EP_DIR; + /* 6 wait states before it'll tx */ + } + } + + spin_unlock_irqrestore(&udc->lock, flags); + return status; +} + +#ifdef USE_ISO +static irqreturn_t +omap_udc_iso_irq(int irq, void *_dev, struct pt_regs *r) +{ + struct omap_udc *udc = _dev; + struct omap_ep *ep; + int pending = 0; + unsigned long flags; + + spin_lock_irqsave(&udc->lock, flags); + + /* handle all non-DMA ISO transfers */ + list_for_each_entry (ep, &udc->iso, iso) { + u16 stat; + struct omap_req *req; + + if (ep->has_dma || list_empty(&ep->queue)) + continue; + req = list_entry(ep->queue.next, struct omap_req, queue); + + use_ep(ep, UDC_EP_SEL); + stat = UDC_STAT_FLG_REG; + + /* NOTE: like the other controller drivers, this isn't + * currently reporting lost or damaged frames. + */ + if (ep->bEndpointAddress & USB_DIR_IN) { + if (stat & UDC_MISS_IN) + /* done(ep, req, -EPROTO) */; + else + write_fifo(ep, req); + } else { + int status = 0; + + if (stat & UDC_NO_RXPACKET) + status = -EREMOTEIO; + else if (stat & UDC_ISO_ERR) + status = -EILSEQ; + else if (stat & UDC_DATA_FLUSH) + status = -ENOSR; + + if (status) + /* done(ep, req, status) */; + else + read_fifo(ep, req); + } + deselect_ep(); + /* 6 wait states before next EP */ + + ep->irqs++; + if (!list_empty(&ep->queue)) + pending = 1; + } + if (!pending) + UDC_IRQ_EN_REG &= ~UDC_SOF_IE; + UDC_IRQ_SRC_REG = UDC_SOF; + + spin_unlock_irqrestore(&udc->lock, flags); + return IRQ_HANDLED; +} +#endif + +/*-------------------------------------------------------------------------*/ + +static struct omap_udc *udc; + +int usb_gadget_register_driver (struct usb_gadget_driver *driver) +{ + int status = -ENODEV; + struct omap_ep *ep; + unsigned long flags; + + /* basic sanity tests */ + if (!udc) + return -ENODEV; + if (!driver + // FIXME if otg, check: driver->is_otg + || driver->speed < USB_SPEED_FULL + || !driver->bind + || !driver->unbind + || !driver->setup) + return -EINVAL; + + spin_lock_irqsave(&udc->lock, flags); + if (udc->driver) { + spin_unlock_irqrestore(&udc->lock, flags); + return -EBUSY; + } + + /* reset state */ + list_for_each_entry (ep, &udc->gadget.ep_list, ep.ep_list) { + ep->irqs = 0; + if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) + continue; + use_ep(ep, 0); + UDC_CTRL_REG = UDC_SET_HALT; + } + udc->ep0_pending = 0; + udc->ep[0].irqs = 0; + udc->softconnect = 1; + + /* hook up the driver */ + driver->driver.bus = 0; + udc->driver = driver; + udc->gadget.dev.driver = &driver->driver; + spin_unlock_irqrestore(&udc->lock, flags); + + status = driver->bind (&udc->gadget); + if (status) { + DBG("bind to %s --> %d\n", driver->driver.name, status); + udc->gadget.dev.driver = 0; + udc->driver = 0; + goto done; + } + DBG("bound to driver %s\n", driver->driver.name); + + UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK; + + /* connect to bus through transceiver */ + if (udc->transceiver) { + status = otg_set_peripheral(udc->transceiver, &udc->gadget); + if (status < 0) { + ERR("can't bind to transceiver\n"); + driver->unbind (&udc->gadget); + udc->gadget.dev.driver = 0; + udc->driver = 0; + goto done; + } + } else { + if (can_pullup(udc)) + pullup_enable (udc); + else + pullup_disable (udc); + } + +done: + return status; +} +EXPORT_SYMBOL(usb_gadget_register_driver); + +int usb_gadget_unregister_driver (struct usb_gadget_driver *driver) +{ + unsigned long flags; + int status = -ENODEV; + + if (!udc) + return -ENODEV; + if (!driver || driver != udc->driver) + return -EINVAL; + + if (udc->transceiver) + (void) otg_set_peripheral(udc->transceiver, 0); + else + pullup_disable(udc); + + spin_lock_irqsave(&udc->lock, flags); + udc_quiesce(udc); + spin_unlock_irqrestore(&udc->lock, flags); + + driver->unbind(&udc->gadget); + udc->gadget.dev.driver = 0; + udc->driver = 0; + + + DBG("unregistered driver '%s'\n", driver->driver.name); + return status; +} +EXPORT_SYMBOL(usb_gadget_unregister_driver); + + +/*-------------------------------------------------------------------------*/ + +#ifdef CONFIG_USB_OMAP_PROC + +#include + +static const char proc_filename[] = "driver/udc"; + +#define FOURBITS "%s%s%s%s" +#define EIGHTBITS FOURBITS FOURBITS + +static void proc_ep_show(struct seq_file *s, struct omap_ep *ep) +{ + u16 stat_flg; + struct omap_req *req; + char buf[20]; + + use_ep(ep, 0); + + if (use_dma && ep->has_dma) + snprintf(buf, sizeof buf, "(%cxdma%d lch%d) ", + (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r', + ep->dma_channel - 1, ep->lch); + else + buf[0] = 0; + + stat_flg = UDC_STAT_FLG_REG; + seq_printf(s, + "\n%s %sirqs %ld stat %04x " EIGHTBITS FOURBITS "%s\n", + ep->name, buf, ep->irqs, stat_flg, + (stat_flg & UDC_NO_RXPACKET) ? "no_rxpacket " : "", + (stat_flg & UDC_MISS_IN) ? "miss_in " : "", + (stat_flg & UDC_DATA_FLUSH) ? "data_flush " : "", + (stat_flg & UDC_ISO_ERR) ? "iso_err " : "", + (stat_flg & UDC_ISO_FIFO_EMPTY) ? "iso_fifo_empty " : "", + (stat_flg & UDC_ISO_FIFO_FULL) ? "iso_fifo_full " : "", + (stat_flg & UDC_EP_HALTED) ? "HALT " : "", + (stat_flg & UDC_STALL) ? "STALL " : "", + (stat_flg & UDC_NAK) ? "NAK " : "", + (stat_flg & UDC_ACK) ? "ACK " : "", + (stat_flg & UDC_FIFO_EN) ? "fifo_en " : "", + (stat_flg & UDC_NON_ISO_FIFO_EMPTY) ? "fifo_empty " : "", + (stat_flg & UDC_NON_ISO_FIFO_FULL) ? "fifo_full " : ""); + + if (list_empty (&ep->queue)) + seq_printf(s, "\t(queue empty)\n"); + else + list_for_each_entry (req, &ep->queue, queue) + seq_printf(s, "\treq %p len %d/%d buf %p\n", + &req->req, req->req.actual, + req->req.length, req->req.buf); +} + +static char *trx_mode(unsigned m) +{ + switch (m) { + case 3: + case 0: return "6wire"; + case 1: return "4wire"; + case 2: return "3wire"; + default: return "unknown"; + } +} + +static int proc_udc_show(struct seq_file *s, void *_) +{ + u32 tmp; + struct omap_ep *ep; + unsigned long flags; + + spin_lock_irqsave(&udc->lock, flags); + + seq_printf(s, "%s, version: " DRIVER_VERSION +#ifdef USE_ISO + " (iso)" +#endif + "%s\n", + driver_desc, + use_dma ? " (dma)" : ""); + + tmp = UDC_REV_REG & 0xff; + seq_printf(s, + "UDC rev %d.%d, OTG rev %d.%d, fifo mode %d, gadget %s\n" + "hmc %d, transceiver %08x %s\n", + tmp >> 4, tmp & 0xf, + OTG_REV_REG >> 4, OTG_REV_REG & 0xf, + fifo_mode, + udc->driver ? udc->driver->driver.name : "(none)", + HMC, USB_TRANSCEIVER_CTRL_REG, + udc->transceiver ? udc->transceiver->label : ""); + + /* OTG controller registers */ + tmp = OTG_SYSCON_1_REG; + seq_printf(s, "otg_syscon1 %08x usb2 %s, usb1 %s, usb0 %s," + FOURBITS "\n", tmp, + trx_mode(USB2_TRX_MODE(tmp)), + trx_mode(USB1_TRX_MODE(tmp)), + trx_mode(USB0_TRX_MODE(tmp)), + (tmp & OTG_IDLE_EN) ? " !otg" : "", + (tmp & HST_IDLE_EN) ? " !host" : "", + (tmp & DEV_IDLE_EN) ? " !dev" : "", + (tmp & OTG_RESET_DONE) ? " reset_done" : " reset_active"); + tmp = OTG_SYSCON_2_REG; + seq_printf(s, "otg_syscon2 %08x%s" EIGHTBITS + " b_ase_brst=%d hmc=%d\n", tmp, + (tmp & OTG_EN) ? " otg_en" : "", + (tmp & USBX_SYNCHRO) ? " synchro" : "", + // much more SRP stuff + (tmp & SRP_DATA) ? " srp_data" : "", + (tmp & SRP_VBUS) ? " srp_vbus" : "", + (tmp & OTG_PADEN) ? " otg_paden" : "", + (tmp & HMC_PADEN) ? " hmc_paden" : "", + (tmp & UHOST_EN) ? " uhost_en" : "", + (tmp & HMC_TLLSPEED) ? " tllspeed" : "", + (tmp & HMC_TLLATTACH) ? " tllattach" : "", + B_ASE_BRST(tmp), + OTG_HMC(tmp)); + tmp = OTG_CTRL_REG; + seq_printf(s, "otg_ctrl %06x" EIGHTBITS EIGHTBITS "%s\n", tmp, + (tmp & OTG_ASESSVLD) ? " asess" : "", + (tmp & OTG_BSESSEND) ? " bsess_end" : "", + (tmp & OTG_BSESSVLD) ? " bsess" : "", + (tmp & OTG_VBUSVLD) ? " vbus" : "", + (tmp & OTG_ID) ? " id" : "", + (tmp & OTG_DRIVER_SEL) ? " DEVICE" : " HOST", + (tmp & OTG_A_SETB_HNPEN) ? " a_setb_hnpen" : "", + (tmp & OTG_A_BUSREQ) ? " a_bus" : "", + (tmp & OTG_B_HNPEN) ? " b_hnpen" : "", + (tmp & OTG_B_BUSREQ) ? " b_bus" : "", + (tmp & OTG_BUSDROP) ? " busdrop" : "", + (tmp & OTG_PULLDOWN) ? " down" : "", + (tmp & OTG_PULLUP) ? " up" : "", + (tmp & OTG_DRV_VBUS) ? " drv" : "", + (tmp & OTG_PD_VBUS) ? " pd_vb" : "", + (tmp & OTG_PU_VBUS) ? " pu_vb" : "", + (tmp & OTG_PU_ID) ? " pu_id" : "" + ); + tmp = OTG_IRQ_EN_REG; + seq_printf(s, "otg_irq_en %04x" "\n", tmp); + tmp = OTG_IRQ_SRC_REG; + seq_printf(s, "otg_irq_src %04x" "\n", tmp); + tmp = OTG_OUTCTRL_REG; + seq_printf(s, "otg_outctrl %04x" "\n", tmp); + tmp = OTG_TEST_REG; + seq_printf(s, "otg_test %04x" "\n", tmp); + + tmp = UDC_SYSCON1_REG; + seq_printf(s, "\nsyscon1 %04x" EIGHTBITS "\n", tmp, + (tmp & UDC_CFG_LOCK) ? " cfg_lock" : "", + (tmp & UDC_DATA_ENDIAN) ? " data_endian" : "", + (tmp & UDC_DMA_ENDIAN) ? " dma_endian" : "", + (tmp & UDC_NAK_EN) ? " nak" : "", + (tmp & UDC_AUTODECODE_DIS) ? " autodecode_dis" : "", + (tmp & UDC_SELF_PWR) ? " self_pwr" : "", + (tmp & UDC_SOFF_DIS) ? " soff_dis" : "", + (tmp & UDC_PULLUP_EN) ? " PULLUP" : ""); + // syscon2 is write-only + + /* UDC controller registers */ + if (!(tmp & UDC_PULLUP_EN)) { + seq_printf(s, "(suspended)\n"); + spin_unlock_irqrestore(&udc->lock, flags); + return 0; + } + + tmp = UDC_DEVSTAT_REG; + seq_printf(s, "devstat %04x" EIGHTBITS "%s%s\n", tmp, + (tmp & UDC_B_HNP_ENABLE) ? " b_hnp" : "", + (tmp & UDC_A_HNP_SUPPORT) ? " a_hnp" : "", + (tmp & UDC_A_ALT_HNP_SUPPORT) ? " a_alt_hnp" : "", + (tmp & UDC_R_WK_OK) ? " r_wk_ok" : "", + (tmp & UDC_USB_RESET) ? " usb_reset" : "", + (tmp & UDC_SUS) ? " SUS" : "", + (tmp & UDC_CFG) ? " CFG" : "", + (tmp & UDC_ADD) ? " ADD" : "", + (tmp & UDC_DEF) ? " DEF" : "", + (tmp & UDC_ATT) ? " ATT" : ""); + seq_printf(s, "sof %04x\n", UDC_SOF_REG); + tmp = UDC_IRQ_EN_REG; + seq_printf(s, "irq_en %04x" FOURBITS "%s\n", tmp, + (tmp & UDC_SOF_IE) ? " sof" : "", + (tmp & UDC_EPN_RX_IE) ? " epn_rx" : "", + (tmp & UDC_EPN_TX_IE) ? " epn_tx" : "", + (tmp & UDC_DS_CHG_IE) ? " ds_chg" : "", + (tmp & UDC_EP0_IE) ? " ep0" : ""); + tmp = UDC_IRQ_SRC_REG; + seq_printf(s, "irq_src %04x" EIGHTBITS "%s%s\n", tmp, + (tmp & UDC_TXN_DONE) ? " txn_done" : "", + (tmp & UDC_RXN_CNT) ? " rxn_cnt" : "", + (tmp & UDC_RXN_EOT) ? " rxn_eot" : "", + (tmp & UDC_SOF) ? " sof" : "", + (tmp & UDC_EPN_RX) ? " epn_rx" : "", + (tmp & UDC_EPN_TX) ? " epn_tx" : "", + (tmp & UDC_DS_CHG) ? " ds_chg" : "", + (tmp & UDC_SETUP) ? " setup" : "", + (tmp & UDC_EP0_RX) ? " ep0out" : "", + (tmp & UDC_EP0_TX) ? " ep0in" : ""); + if (use_dma) { + unsigned i; + + tmp = UDC_DMA_IRQ_EN_REG; + seq_printf(s, "dma_irq_en %04x%s" EIGHTBITS "\n", tmp, + (tmp & UDC_TX_DONE_IE(3)) ? " tx2_done" : "", + (tmp & UDC_RX_CNT_IE(3)) ? " rx2_cnt" : "", + (tmp & UDC_RX_EOT_IE(3)) ? " rx2_eot" : "", + + (tmp & UDC_TX_DONE_IE(2)) ? " tx1_done" : "", + (tmp & UDC_RX_CNT_IE(2)) ? " rx1_cnt" : "", + (tmp & UDC_RX_EOT_IE(2)) ? " rx1_eot" : "", + + (tmp & UDC_TX_DONE_IE(1)) ? " tx0_done" : "", + (tmp & UDC_RX_CNT_IE(1)) ? " rx0_cnt" : "", + (tmp & UDC_RX_EOT_IE(1)) ? " rx0_eot" : ""); + + tmp = UDC_RXDMA_CFG_REG; + seq_printf(s, "rxdma_cfg %04x\n", tmp); + if (tmp) { + for (i = 0; i < 3; i++) { + if ((tmp & (0x0f << (i * 4))) == 0) + continue; + seq_printf(s, "rxdma[%d] %04x\n", i, + UDC_RXDMA_REG(i + 1)); + } + } + tmp = UDC_TXDMA_CFG_REG; + seq_printf(s, "txdma_cfg %04x\n", tmp); + if (tmp) { + for (i = 0; i < 3; i++) { + if (!(tmp & (0x0f << (i * 4)))) + continue; + seq_printf(s, "txdma[%d] %04x\n", i, + UDC_TXDMA_REG(i + 1)); + } + } + } + + tmp = UDC_DEVSTAT_REG; + if (tmp & UDC_ATT) { + proc_ep_show(s, &udc->ep[0]); + if (tmp & UDC_ADD) { + list_for_each_entry (ep, &udc->gadget.ep_list, + ep.ep_list) { + if (ep->desc) + proc_ep_show(s, ep); + } + } + } + spin_unlock_irqrestore(&udc->lock, flags); + return 0; +} + +static int proc_udc_open(struct inode *inode, struct file *file) +{ + return single_open(file, proc_udc_show, 0); +} + +static struct file_operations proc_ops = { + .open = proc_udc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static void create_proc_file(void) +{ + struct proc_dir_entry *pde; + + pde = create_proc_entry (proc_filename, 0, NULL); + if (pde) + pde->proc_fops = &proc_ops; +} + +static void remove_proc_file(void) +{ + remove_proc_entry(proc_filename, 0); +} + +#else + +static inline void create_proc_file(void) {} +static inline void remove_proc_file(void) {} + +#endif + +/*-------------------------------------------------------------------------*/ + +/* Before this controller can enumerate, we need to pick an endpoint + * configuration, or "fifo_mode" That involves allocating 2KB of packet + * buffer space among the endpoints we'll be operating. + */ +static unsigned __init +omap_ep_setup(char *name, u8 addr, u8 type, + unsigned buf, unsigned maxp, int dbuf) +{ + struct omap_ep *ep; + u16 epn_rxtx = 0; + + /* OUT endpoints first, then IN */ + ep = &udc->ep[addr & 0xf]; + if (addr & USB_DIR_IN) + ep += 16; + + /* in case of ep init table bugs */ + BUG_ON(ep->name[0]); + + /* chip setup ... bit values are same for IN, OUT */ + if (type == USB_ENDPOINT_XFER_ISOC) { + switch (maxp) { + case 8: epn_rxtx = 0 << 12; break; + case 16: epn_rxtx = 1 << 12; break; + case 32: epn_rxtx = 2 << 12; break; + case 64: epn_rxtx = 3 << 12; break; + case 128: epn_rxtx = 4 << 12; break; + case 256: epn_rxtx = 5 << 12; break; + case 512: epn_rxtx = 6 << 12; break; + default: BUG(); + } + epn_rxtx |= UDC_EPN_RX_ISO; + dbuf = 1; + } else { + /* pio-out could potentially double-buffer, + * as can (should!) DMA-IN + */ + if (!use_dma || (addr & USB_DIR_IN)) + dbuf = 0; + + switch (maxp) { + case 8: epn_rxtx = 0 << 12; break; + case 16: epn_rxtx = 1 << 12; break; + case 32: epn_rxtx = 2 << 12; break; + case 64: epn_rxtx = 3 << 12; break; + default: BUG(); + } + if (dbuf && addr) + epn_rxtx |= UDC_EPN_RX_DB; + } + if (addr) + epn_rxtx |= UDC_EPN_RX_VALID; + BUG_ON(buf & 0x07); + epn_rxtx |= buf >> 3; + + DBG("%s addr %02x rxtx %04x maxp %d%s buf %d\n", + name, addr, epn_rxtx, maxp, dbuf ? "x2" : "", buf); + + if (addr & USB_DIR_IN) + UDC_EP_TX_REG(addr & 0xf) = epn_rxtx; + else + UDC_EP_RX_REG(addr) = epn_rxtx; + + /* next endpoint's buffer starts after this one's */ + buf += maxp; + if (dbuf) + buf += maxp; + BUG_ON(buf > 2048); + + /* set up driver data structures */ + BUG_ON(strlen(name) >= sizeof ep->name); + strlcpy(ep->name, name, sizeof ep->name); + INIT_LIST_HEAD(&ep->queue); + INIT_LIST_HEAD(&ep->iso); + ep->bEndpointAddress = addr; + ep->bmAttributes = type; + ep->double_buf = dbuf; + ep->udc = udc; + + ep->ep.name = ep->name; + ep->ep.ops = &omap_ep_ops; + ep->ep.maxpacket = ep->maxpacket = maxp; + list_add_tail (&ep->ep.ep_list, &udc->gadget.ep_list); + + return buf; +} + +static void omap_udc_release(struct device *dev) +{ + complete(udc->done); + kfree (udc); + udc = 0; +} + +static int __init +omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) +{ + unsigned tmp, buf; + + /* abolish any previous hardware state */ + UDC_SYSCON1_REG = 0; + UDC_IRQ_EN_REG = 0; + UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK; + UDC_DMA_IRQ_EN_REG = 0; + UDC_RXDMA_CFG_REG = 0; + UDC_TXDMA_CFG_REG = 0; + + /* UDC_PULLUP_EN gates the chip clock */ + // OTG_SYSCON_1_REG |= DEV_IDLE_EN; + + udc = kmalloc (sizeof *udc, SLAB_KERNEL); + if (!udc) + return -ENOMEM; + + memset(udc, 0, sizeof *udc); + spin_lock_init (&udc->lock); + + udc->gadget.ops = &omap_gadget_ops; + udc->gadget.ep0 = &udc->ep[0].ep; + INIT_LIST_HEAD(&udc->gadget.ep_list); + INIT_LIST_HEAD(&udc->iso); + udc->gadget.speed = USB_SPEED_UNKNOWN; + udc->gadget.name = driver_name; + + device_initialize(&udc->gadget.dev); + strcpy (udc->gadget.dev.bus_id, "gadget"); + udc->gadget.dev.release = omap_udc_release; + udc->gadget.dev.parent = &odev->dev; + if (use_dma) + udc->gadget.dev.dma_mask = odev->dev.dma_mask; + + udc->transceiver = xceiv; + + /* ep0 is special; put it right after the SETUP buffer */ + buf = omap_ep_setup("ep0", 0, USB_ENDPOINT_XFER_CONTROL, + 8 /* after SETUP */, 64 /* maxpacket */, 0); + list_del_init(&udc->ep[0].ep.ep_list); + + /* initially disable all non-ep0 endpoints */ + for (tmp = 1; tmp < 15; tmp++) { + UDC_EP_RX_REG(tmp) = 0; + UDC_EP_TX_REG(tmp) = 0; + } + +#define OMAP_BULK_EP(name,addr) \ + buf = omap_ep_setup(name "-bulk", addr, \ + USB_ENDPOINT_XFER_BULK, buf, 64, 1); +#define OMAP_INT_EP(name,addr, maxp) \ + buf = omap_ep_setup(name "-int", addr, \ + USB_ENDPOINT_XFER_INT, buf, maxp, 0); +#define OMAP_ISO_EP(name,addr, maxp) \ + buf = omap_ep_setup(name "-iso", addr, \ + USB_ENDPOINT_XFER_ISOC, buf, maxp, 1); + + switch (fifo_mode) { + case 0: + OMAP_BULK_EP("ep1in", USB_DIR_IN | 1); + OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2); + OMAP_INT_EP("ep3in", USB_DIR_IN | 3, 16); + break; + case 1: + OMAP_BULK_EP("ep1in", USB_DIR_IN | 1); + OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2); + OMAP_BULK_EP("ep3in", USB_DIR_IN | 3); + OMAP_BULK_EP("ep4out", USB_DIR_OUT | 4); + + OMAP_BULK_EP("ep5in", USB_DIR_IN | 5); + OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5); + OMAP_BULK_EP("ep6in", USB_DIR_IN | 6); + OMAP_BULK_EP("ep6out", USB_DIR_OUT | 6); + + OMAP_BULK_EP("ep7in", USB_DIR_IN | 7); + OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7); + OMAP_BULK_EP("ep8in", USB_DIR_IN | 8); + OMAP_BULK_EP("ep8out", USB_DIR_OUT | 8); + + OMAP_INT_EP("ep9in", USB_DIR_IN | 9, 16); + OMAP_INT_EP("ep10out", USB_DIR_IN | 10, 16); + OMAP_INT_EP("ep11in", USB_DIR_IN | 9, 16); + OMAP_INT_EP("ep12out", USB_DIR_IN | 10, 16); + break; + +#ifdef USE_ISO + case 2: /* mixed iso/bulk */ + OMAP_ISO_EP("ep1in", USB_DIR_IN | 1, 256); + OMAP_ISO_EP("ep2out", USB_DIR_OUT | 2, 256); + OMAP_ISO_EP("ep3in", USB_DIR_IN | 3, 128); + OMAP_ISO_EP("ep4out", USB_DIR_OUT | 4, 128); + + OMAP_INT_EP("ep5in", USB_DIR_IN | 5, 16); + + OMAP_BULK_EP("ep6in", USB_DIR_IN | 6); + OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7); + OMAP_INT_EP("ep8in", USB_DIR_IN | 8, 16); + break; + case 3: /* mixed bulk/iso */ + OMAP_BULK_EP("ep1in", USB_DIR_IN | 1); + OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2); + OMAP_INT_EP("ep3in", USB_DIR_IN | 3, 16); + + OMAP_BULK_EP("ep4in", USB_DIR_IN | 4); + OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5); + OMAP_INT_EP("ep6in", USB_DIR_IN | 6, 16); + + OMAP_ISO_EP("ep7in", USB_DIR_IN | 7, 256); + OMAP_ISO_EP("ep8out", USB_DIR_OUT | 8, 256); + OMAP_INT_EP("ep9in", USB_DIR_IN | 9, 16); + break; +#endif + + /* add more modes as needed */ + + default: + ERR("unsupported fifo_mode #%d\n", fifo_mode); + return -ENODEV; + } + UDC_SYSCON1_REG = UDC_CFG_LOCK|UDC_SELF_PWR; + INFO("fifo mode %d, %d bytes not used\n", fifo_mode, 2048 - buf); + return 0; +} + +static int __init omap_udc_probe(struct device *dev) +{ + struct platform_device *odev = to_platform_device(dev); + int status = -ENODEV; + int hmc; + struct otg_transceiver *xceiv = 0; + const char *type = 0; + struct omap_usb_config *config = dev->platform_data; + + /* NOTE: "knows" the order of the resources! */ + if (!request_mem_region(odev->resource[0].start, + odev->resource[0].end - odev->resource[0].start + 1, + driver_name)) { + DBG("request_mem_region failed\n"); + return -EBUSY; + } + + INFO("OMAP UDC rev %d.%d, OTG rev %d.%d, %s receptacle\n", + UDC_REV_REG >> 4, UDC_REV_REG & 0xf, + OTG_REV_REG >> 4, OTG_REV_REG & 0xf, + config->otg ? "Mini-AB" : "B/Mini-B"); + + /* use the mode given to us by board init code */ + hmc = HMC; + switch (hmc) { + case 3: + case 11: + case 19: + case 25: + xceiv = otg_get_transceiver(); + if (!xceiv) { + DBG("external transceiver not registered!\n"); + goto cleanup0; + } + type = xceiv->label; + break; + case 0: /* POWERUP DEFAULT == 0 */ + case 4: + case 12: + case 20: + type = "INTEGRATED"; + break; + case 21: /* internal loopback */ + type = "(loopback)"; + break; + case 14: /* transceiverless */ + type = "(none)"; + break; + + default: + ERR("unrecognized UDC HMC mode %d\n", hmc); + return -ENODEV; + } + INFO("hmc mode %d, transceiver %s\n", hmc, type); + + /* a "gadget" abstracts/virtualizes the controller */ + status = omap_udc_setup(odev, xceiv); + if (status) { + goto cleanup0; + } + xceiv = 0; + // "udc" is now valid + pullup_disable(udc); + udc->gadget.is_otg = (config->otg != 0); + + /* USB general purpose IRQ: ep0, state changes, dma, etc */ + status = request_irq(odev->resource[1].start, omap_udc_irq, + SA_SAMPLE_RANDOM, driver_name, udc); + if (status != 0) { + ERR( "can't get irq %ld, err %d\n", + odev->resource[1].start, status); + goto cleanup1; + } + + /* USB "non-iso" IRQ (PIO for all but ep0) */ + status = request_irq(odev->resource[2].start, omap_udc_pio_irq, + SA_SAMPLE_RANDOM, "omap_udc pio", udc); + if (status != 0) { + ERR( "can't get irq %ld, err %d\n", + odev->resource[2].start, status); + goto cleanup2; + } +#ifdef USE_ISO + status = request_irq(odev->resource[3].start, omap_udc_iso_irq, + SA_INTERRUPT, "omap_udc iso", udc); + if (status != 0) { + ERR("can't get irq %ld, err %d\n", + odev->resource[3].start, status); + goto cleanup3; + } +#endif + + create_proc_file(); + device_add(&udc->gadget.dev); + return 0; + +#ifdef USE_ISO +cleanup3: + free_irq(odev->resource[2].start, udc); +#endif + +cleanup2: + free_irq(odev->resource[1].start, udc); + +cleanup1: + kfree (udc); + udc = 0; + +cleanup0: + if (xceiv) + put_device(xceiv->dev); + release_mem_region(odev->resource[0].start, + odev->resource[0].end - odev->resource[0].start + 1); + return status; +} + +static int __exit omap_udc_remove(struct device *dev) +{ + struct platform_device *odev = to_platform_device(dev); + DECLARE_COMPLETION(done); + + if (!udc) + return -ENODEV; + + udc->done = &done; + + pullup_disable(udc); + if (udc->transceiver) { + put_device(udc->transceiver->dev); + udc->transceiver = 0; + } + UDC_SYSCON1_REG = 0; + + remove_proc_file(); + +#ifdef USE_ISO + free_irq(odev->resource[3].start, udc); +#endif + free_irq(odev->resource[2].start, udc); + free_irq(odev->resource[1].start, udc); + + release_mem_region(odev->resource[0].start, + odev->resource[0].end - odev->resource[0].start + 1); + + device_unregister(&udc->gadget.dev); + wait_for_completion(&done); + + return 0; +} + +/* suspend/resume/wakeup from sysfs (echo > power/state) */ + +static int omap_udc_suspend(struct device *dev, u32 state, u32 level) +{ + if (level != 0) + return 0; + + DBG("suspend, state %d\n", state); + omap_pullup(&udc->gadget, 0); + udc->gadget.dev.power.power_state = 3; + udc->gadget.dev.parent->power.power_state = 3; + return 0; +} + +static int omap_udc_resume(struct device *dev, u32 level) +{ + if (level != 0) + return 0; + + DBG("resume + wakeup/SRP\n"); + udc->gadget.dev.parent->power.power_state = 0; + udc->gadget.dev.power.power_state = 0; + omap_pullup(&udc->gadget, 1); + + /* maybe the host would enumerate us if we nudged it */ + msleep(100); + return omap_wakeup(&udc->gadget); +} + +/*-------------------------------------------------------------------------*/ + +static struct device_driver udc_driver = { + .name = (char *) driver_name, + .bus = &platform_bus_type, + .probe = omap_udc_probe, + .remove = __exit_p(omap_udc_remove), + .suspend = omap_udc_suspend, + .resume = omap_udc_resume, +}; + +static int __init udc_init(void) +{ + /* should work on many OMAP systems with at most minor changes, + * but the 1510 doesn't have an OTG controller. + */ + if (cpu_is_omap1510()) { + DBG("no OMAP1510 support yet\n"); + return -ENODEV; + } + INFO("%s, version: " DRIVER_VERSION "%s\n", driver_desc, + use_dma ? " (dma)" : ""); + return driver_register(&udc_driver); +} +module_init(udc_init); + +static void __exit udc_exit(void) +{ + driver_unregister(&udc_driver); +} +module_exit(udc_exit); + +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL"); + diff -Nru a/drivers/usb/gadget/omap_udc.h b/drivers/usb/gadget/omap_udc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/gadget/omap_udc.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,199 @@ +/* + * omap_udc.h -- for omap 3.2 udc, with OTG support + * + * 2004 (C) Texas Instruments, Inc. + * 2004 (C) David Brownell + */ + +/* + * USB device/endpoint management registers + */ +#define UDC_REG(offset) __REG16(UDC_BASE + (offset)) + +#define UDC_REV_REG UDC_REG(0x0) /* Revision */ +#define UDC_EP_NUM_REG UDC_REG(0x4) /* Which endpoint */ +# define UDC_SETUP_SEL (1 << 6) +# define UDC_EP_SEL (1 << 5) +# define UDC_EP_DIR (1 << 4) + /* low 4 bits for endpoint number */ +#define UDC_DATA_REG UDC_REG(0x08) /* Endpoint FIFO */ +#define UDC_CTRL_REG UDC_REG(0x0C) /* Endpoint control */ +# define UDC_CLR_HALT (1 << 7) +# define UDC_SET_HALT (1 << 6) +# define UDC_SET_FIFO_EN (1 << 2) +# define UDC_CLR_EP (1 << 1) +# define UDC_RESET_EP (1 << 0) +#define UDC_STAT_FLG_REG UDC_REG(0x10) /* Endpoint status */ +# define UDC_NO_RXPACKET (1 << 15) +# define UDC_MISS_IN (1 << 14) +# define UDC_DATA_FLUSH (1 << 13) +# define UDC_ISO_ERR (1 << 12) +# define UDC_ISO_FIFO_EMPTY (1 << 9) +# define UDC_ISO_FIFO_FULL (1 << 8) +# define UDC_EP_HALTED (1 << 6) +# define UDC_STALL (1 << 5) +# define UDC_NAK (1 << 4) +# define UDC_ACK (1 << 3) +# define UDC_FIFO_EN (1 << 2) +# define UDC_NON_ISO_FIFO_EMPTY (1 << 1) +# define UDC_NON_ISO_FIFO_FULL (1 << 0) +#define UDC_RXFSTAT_REG UDC_REG(0x14) /* OUT bytecount */ +#define UDC_SYSCON1_REG UDC_REG(0x18) /* System config 1 */ +# define UDC_CFG_LOCK (1 << 8) +# define UDC_DATA_ENDIAN (1 << 7) +# define UDC_DMA_ENDIAN (1 << 6) +# define UDC_NAK_EN (1 << 4) +# define UDC_AUTODECODE_DIS (1 << 3) +# define UDC_SELF_PWR (1 << 2) +# define UDC_SOFF_DIS (1 << 1) +# define UDC_PULLUP_EN (1 << 0) +#define UDC_SYSCON2_REG UDC_REG(0x1C) /* System config 2 */ +# define UDC_RMT_WKP (1 << 6) +# define UDC_STALL_CMD (1 << 5) +# define UDC_DEV_CFG (1 << 3) +# define UDC_CLR_CFG (1 << 2) +#define UDC_DEVSTAT_REG UDC_REG(0x20) /* Device status */ +# define UDC_B_HNP_ENABLE (1 << 9) +# define UDC_A_HNP_SUPPORT (1 << 8) +# define UDC_A_ALT_HNP_SUPPORT (1 << 7) +# define UDC_R_WK_OK (1 << 6) +# define UDC_USB_RESET (1 << 5) +# define UDC_SUS (1 << 4) +# define UDC_CFG (1 << 3) +# define UDC_ADD (1 << 2) +# define UDC_DEF (1 << 1) +# define UDC_ATT (1 << 0) +#define UDC_SOF_REG UDC_REG(0x24) /* Start of frame */ +# define UDC_FT_LOCK (1 << 12) +# define UDC_TS_OK (1 << 11) +# define UDC_TS 0x03ff +#define UDC_IRQ_EN_REG UDC_REG(0x28) /* Interrupt enable */ +# define UDC_SOF_IE (1 << 7) +# define UDC_EPN_RX_IE (1 << 5) +# define UDC_EPN_TX_IE (1 << 4) +# define UDC_DS_CHG_IE (1 << 3) +# define UDC_EP0_IE (1 << 0) +#define UDC_DMA_IRQ_EN_REG UDC_REG(0x2C) /* DMA irq enable */ + /* rx/tx dma channels numbered 1-3 not 0-2 */ +# define UDC_TX_DONE_IE(n) (1 << (4 * (n) - 2)) +# define UDC_RX_CNT_IE(n) (1 << (4 * (n) - 3)) +# define UDC_RX_EOT_IE(n) (1 << (4 * (n) - 4)) +#define UDC_IRQ_SRC_REG UDC_REG(0x30) /* Interrupt source */ +# define UDC_TXN_DONE (1 << 10) +# define UDC_RXN_CNT (1 << 9) +# define UDC_RXN_EOT (1 << 8) +# define UDC_SOF (1 << 7) +# define UDC_EPN_RX (1 << 5) +# define UDC_EPN_TX (1 << 4) +# define UDC_DS_CHG (1 << 3) +# define UDC_SETUP (1 << 2) +# define UDC_EP0_RX (1 << 1) +# define UDC_EP0_TX (1 << 0) +# define UDC_IRQ_SRC_MASK 0x7bf +#define UDC_EPN_STAT_REG UDC_REG(0x34) /* EP irq status */ +#define UDC_DMAN_STAT_REG UDC_REG(0x38) /* DMA irq status */ +# define UDC_DMA_RX_SB (1 << 12) +# define UDC_DMA_RX_SRC(x) (((x)>>8) & 0xf) +# define UDC_DMA_TX_SRC(x) (((x)>>0) & 0xf) + + +/* DMA configuration registers: up to three channels in each direction. */ +#define UDC_RXDMA_CFG_REG UDC_REG(0x40) /* 3 eps for RX DMA */ +#define UDC_TXDMA_CFG_REG UDC_REG(0x44) /* 3 eps for TX DMA */ +#define UDC_DATA_DMA_REG UDC_REG(0x48) /* rx/tx fifo addr */ + +/* rx/tx dma control, numbering channels 1-3 not 0-2 */ +#define UDC_TXDMA_REG(chan) UDC_REG(0x50 - 4 + 4 * (chan)) +# define UDC_TXN_EOT (1 << 15) /* bytes vs packets */ +# define UDC_TXN_START (1 << 14) /* start transfer */ +# define UDC_TXN_TSC 0x03ff /* units in xfer */ +#define UDC_RXDMA_REG(chan) UDC_REG(0x60 - 4 + 4 * (chan)) +# define UDC_RXN_STOP (1 << 15) /* enable EOT irq */ +# define UDC_RXN_TC 0x00ff /* packets in xfer */ + + +/* + * Endpoint configuration registers (used before CFG_LOCK is set) + * UDC_EP_TX_REG(0) is unused + */ +#define UDC_EP_RX_REG(endpoint) UDC_REG(0x80 + (endpoint)*4) +# define UDC_EPN_RX_VALID (1 << 15) +# define UDC_EPN_RX_DB (1 << 14) + /* buffer size in bits 13, 12 */ +# define UDC_EPN_RX_ISO (1 << 11) + /* buffer pointer in low 11 bits */ +#define UDC_EP_TX_REG(endpoint) UDC_REG(0xc0 + (endpoint)*4) + /* same bitfields as in RX_REG */ + +/*-------------------------------------------------------------------------*/ + +struct omap_req { + struct usb_request req; + struct list_head queue; + unsigned dma_bytes; + unsigned mapped:1; +}; + +struct omap_ep { + struct usb_ep ep; + struct list_head queue; + unsigned long irqs; + struct list_head iso; + const struct usb_endpoint_descriptor *desc; + char name[14]; + u16 maxpacket; + u8 bEndpointAddress; + u8 bmAttributes; + unsigned double_buf:1; + unsigned stopped:1; + unsigned ackwait:1; + unsigned has_dma:1; + u8 dma_channel; + int lch; + struct omap_udc *udc; +}; + +struct omap_udc { + struct usb_gadget gadget; + struct usb_gadget_driver *driver; + spinlock_t lock; + struct omap_ep ep[32]; + u16 devstat; + struct otg_transceiver *transceiver; + struct list_head iso; + unsigned softconnect:1; + unsigned vbus_active:1; + unsigned ep0_pending:1; + unsigned ep0_in:1; + unsigned ep0_set_config:1; + unsigned ep0_reset_config:1; + unsigned ep0_setup:1; + unsigned hmc:6; + + struct completion *done; +}; + +/*-------------------------------------------------------------------------*/ + +#ifdef DEBUG +#define DBG(stuff...) printk(KERN_DEBUG "udc: " stuff) +#else +#define DBG(stuff...) do{}while(0) +#endif + +#ifdef VERBOSE +# define VDBG DBG +#else +# define VDBG(stuff...) do{}while(0) +#endif + +#define ERR(stuff...) printk(KERN_ERR "udc: " stuff) +#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff) +#define INFO(stuff...) printk(KERN_INFO "udc: " stuff) + +/*-------------------------------------------------------------------------*/ + +// #define HMC_1510 ((MOD_CONF_CTRL_0_REG >> 1) & 0x3f) +#define HMC_1610 (OTG_SYSCON_2_REG & 0x3f) +#define HMC HMC_1610 + diff -Nru a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c --- a/drivers/usb/gadget/serial.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/gadget/serial.c 2004-09-06 16:37:54 -07:00 @@ -1299,6 +1299,9 @@ } else if (gadget_is_omap(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0007); + } else if (gadget_is_lh7a40x(gadget)) { + gs_device_desc.bcdDevice = + __constant_cpu_to_le16(GS_VERSION_NUM|0x0008); } else { printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", gadget->name); diff -Nru a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c --- a/drivers/usb/gadget/zero.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/gadget/zero.c 2004-09-06 16:37:52 -07:00 @@ -399,7 +399,7 @@ static char manufacturer [40]; static char serial [40]; -/* static strings, in iso 8859/1 */ +/* static strings, in UTF-8 */ static struct usb_string strings [] = { { STRING_MANUFACTURER, manufacturer, }, { STRING_PRODUCT, longname, }, @@ -960,7 +960,8 @@ case USB_DT_STRING: /* wIndex == language code. * this driver only handles one language, you can - * add others even if they don't use iso8859/1 + * add string tables for other languages, using + * any UTF-8 characters */ value = usb_gadget_get_string (&stringtab, ctrl->wValue & 0xff, req->buf); @@ -1185,6 +1186,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0207); } else if (gadget_is_omap (gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208); + } else if (gadget_is_lh7a40x(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209); } else { /* gadget zero is so simple (for now, no altsettings) that * it SHOULD NOT have problems with bulk-capable hardware. @@ -1229,6 +1232,12 @@ hs_source_desc.bEndpointAddress = fs_source_desc.bEndpointAddress; hs_sink_desc.bEndpointAddress = fs_sink_desc.bEndpointAddress; #endif + + if (gadget->is_otg) { + otg_descriptor.bmAttributes |= USB_OTG_HNP, + source_sink_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP; + loopback_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP; + } if (gadget->is_otg) { otg_descriptor.bmAttributes |= USB_OTG_HNP, diff -Nru a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/host/Kconfig 2004-09-06 16:37:55 -07:00 @@ -52,6 +52,7 @@ config USB_OHCI_HCD tristate "OHCI HCD support" depends on USB + select ISP1301_OMAP if MACH_OMAP_H2 ---help--- The Open Host Controller Interface (OHCI) is a standard for accessing USB 1.1 host controller hardware. It does more in hardware than Intel's diff -Nru a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c --- a/drivers/usb/host/ehci-hub.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/host/ehci-hub.c 2004-09-06 16:37:55 -07:00 @@ -146,8 +146,8 @@ #else -#define ehci_hub_suspend 0 -#define ehci_hub_resume 0 +#define ehci_hub_suspend NULL +#define ehci_hub_resume NULL #endif /* CONFIG_PM */ diff -Nru a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c --- a/drivers/usb/host/ehci-mem.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/host/ehci-mem.c 2004-09-06 16:37:55 -07:00 @@ -114,7 +114,7 @@ return qh; memset (qh, 0, sizeof *qh); - kref_init(&qh->kref, qh_destroy); + kref_init(&qh->kref); qh->ehci = ehci; qh->qh_dma = dma; // INIT_LIST_HEAD (&qh->qh_list); @@ -139,7 +139,7 @@ static inline void qh_put (struct ehci_qh *qh) { - kref_put(&qh->kref); + kref_put(&qh->kref, qh_destroy); } /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/host/ohci-hcd.c 2004-09-06 16:37:50 -07:00 @@ -97,6 +97,7 @@ #include #include /* for in_interrupt () */ #include +#include #include "../core/hcd.h" #include #include /* needed by ohci-mem.c when no PCI */ @@ -693,7 +694,7 @@ /* must not be called from interrupt context */ -#ifdef CONFIG_PM +#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) static void mark_children_gone (struct usb_device *dev) { diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c --- a/drivers/usb/host/ohci-hub.c 2004-09-06 16:37:51 -07:00 +++ b/drivers/usb/host/ohci-hub.c 2004-09-06 16:37:51 -07:00 @@ -435,6 +435,89 @@ /*-------------------------------------------------------------------------*/ +#ifdef CONFIG_USB_OTG + +static int ohci_start_port_reset (struct usb_hcd *hcd, unsigned port) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + u32 status; + + if (!port) + return -EINVAL; + port--; + + /* start port reset before HNP protocol times out */ + status = ohci_readl(&ohci->regs->roothub.portstatus [port]); + if (!(status & RH_PS_CCS)) + return -ENODEV; + + /* khubd will finish the reset later */ + writel(RH_PS_PRS, &ohci->regs->roothub.portstatus [port]); + return 0; +} + +static void start_hnp(struct ohci_hcd *ohci); + +#else + +#define ohci_start_port_reset NULL + +#endif + +/*-------------------------------------------------------------------------*/ + + +/* See usb 7.1.7.5: root hubs must issue at least 50 msec reset signaling, + * not necessarily continuous ... to guard against resume signaling. + * The short timeout is safe for non-root hubs, and is backward-compatible + * with earlier Linux hosts. + */ +#ifdef CONFIG_USB_SUSPEND +#define PORT_RESET_MSEC 50 +#else +#define PORT_RESET_MSEC 10 +#endif + +/* this timer value might be vendor-specific ... */ +#define PORT_RESET_HW_MSEC 10 + +/* wrap-aware logic stolen from */ +#define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0) + +/* called from some task, normally khubd */ +static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port) +{ + u32 *portstat = &ohci->regs->roothub.portstatus [port]; + u32 temp; + u16 now = readl(&ohci->regs->fmnumber); + u16 reset_done = now + PORT_RESET_MSEC; + + /* build a "continuous enough" reset signal, with up to + * 3msec gap between pulses. scheduler HZ==100 must work; + * this might need to be deadline-scheduled. + */ + do { + /* spin until any current reset finishes */ + for (;;) { + temp = ohci_readl (portstat); + if (!(temp & RH_PS_PRS)) + break; + udelay (500); + } + + if (!(temp & RH_PS_CCS)) + break; + if (temp & RH_PS_PRSC) + writel (RH_PS_PRSC, portstat); + + /* start the next reset, sleep till it's probably done */ + writel (RH_PS_PRS, portstat); + msleep(PORT_RESET_HW_MSEC); + now = readl(&ohci->regs->fmnumber); + } while (tick_before(now, reset_done)); + /* caller synchronizes using PRSC */ +} + static int ohci_hub_control ( struct usb_hcd *hcd, u16 typeReq, @@ -533,6 +616,12 @@ wIndex--; switch (wValue) { case USB_PORT_FEAT_SUSPEND: +#ifdef CONFIG_USB_OTG + if (ohci->hcd.self.otg_port == (wIndex + 1) + && ohci->hcd.self.b_hnp_enable) + start_hnp(ohci); + else +#endif writel (RH_PS_PSS, &ohci->regs->roothub.portstatus [wIndex]); break; @@ -541,10 +630,7 @@ &ohci->regs->roothub.portstatus [wIndex]); break; case USB_PORT_FEAT_RESET: - temp = ohci_readl (&ohci->regs->roothub.portstatus [wIndex]); - if (temp & RH_PS_CCS) - writel (RH_PS_PRS, - &ohci->regs->roothub.portstatus [wIndex]); + root_port_reset (ohci, wIndex); break; default: goto error; diff -Nru a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c --- a/drivers/usb/host/ohci-omap.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/host/ohci-omap.c 2004-09-06 16:37:53 -07:00 @@ -2,27 +2,30 @@ * OHCI HCD (Host Controller Driver) for USB. * * (C) Copyright 1999 Roman Weissgaerber - * (C) Copyright 2000-2002 David Brownell + * (C) Copyright 2000-2004 David Brownell * (C) Copyright 2002 Hewlett-Packard Company * * OMAP Bus Glue * * Written by Christopher Hoover - * Based on fragments of previous driver by Rusell King et al. + * Based on fragments of previous driver by Russell King et al. * * Modified for OMAP from ohci-sa1111.c by Tony Lindgren * Based on the 2.4 OMAP OHCI driver originally done by MontaVista Software Inc. * * This file is licenced under the GPL. */ - + #include #include +#include -#include #include #include #include +#include +#include +#include #include "ohci-omap.h" @@ -34,122 +37,53 @@ extern int ocpi_enable(void); /* - * Use the first port only by default. Override with hmc_mode option. - * - * NOTE: Many OMAP-1510 Innovators supposedly have bad wiring for the USB ports - * 1 & 2, so only port 0 will work. To use the OHCI on the first port, use - * the Innovator USB client cable with a client-to-client connector and modify - * either the cable or the hub to feed 5V VBUS back to Innovator. VBUS should - * be the red lead in the cable. - * - * To mount USB hard disk as root, see the patch for do_mounts.c that tries - * remounting the root, and use root=0801 if your root is on sda1. Does not - * work with devfs. - */ -static int default_hmc_mode = 16; -static int hmc_mode = 1234; - -/* - * Set the USB host pin multiplexing and the selected HMC mode - */ -static int omap_usb_set_hmc_mode(int hmc_mode) -{ - unsigned int val; - - switch (hmc_mode) { - case 0: - /* 0: function, 1: disabled, 2: disabled */ - omap_cfg_reg(W4_USB_PUEN); - omap_cfg_reg(R18_1510_USB_GPIO0); - break; - case 4: - /* 0: function 1: host 2: host */ - omap_cfg_reg(usb1_speed); - omap_cfg_reg(usb1_susp); - omap_cfg_reg(usb1_seo); - omap_cfg_reg(usb1_txen); - omap_cfg_reg(usb1_txd); - omap_cfg_reg(usb1_vp); - omap_cfg_reg(usb1_vm); - omap_cfg_reg(usb1_rcv); - omap_cfg_reg(usb2_susp); - omap_cfg_reg(usb2_seo); - omap_cfg_reg(usb2_txen); - omap_cfg_reg(usb2_txd); - omap_cfg_reg(usb2_vp); - omap_cfg_reg(usb2_vm); - omap_cfg_reg(usb2_rcv); - break; - case 16: - /* 0: host, 1: disabled, 2: disabled */ - omap_cfg_reg(W9_USB0_TXEN); - omap_cfg_reg(AA9_USB0_VP); - omap_cfg_reg(Y5_USB0_RCV); - omap_cfg_reg(R9_USB0_VM); - omap_cfg_reg(V6_USB0_TXD); - omap_cfg_reg(W5_USB0_SE0); - break; - default: - printk("Unknown USB host configuration: %i\n", hmc_mode); - return -ENODEV; - } - - /* Write the selected HMC mode */ - val = readl(MOD_CONF_CTRL_0) & ~HMC_CLEAR; - val |= (hmc_mode << 1); - writel(val, MOD_CONF_CTRL_0); - - return 0; -} - -/* * OHCI clock initialization for OMAP-1510 and 1610 */ static int omap_ohci_clock_power(int on) { if (on) { - if (cpu_is_omap_1510()) { + if (cpu_is_omap1510()) { /* Use DPLL, not APLL */ - writel(readl(ULPD_APLL_CTRL_REG) & ~APLL_NDPLL_SWITCH, - ULPD_APLL_CTRL_REG); + omap_writel(omap_readl(ULPD_APLL_CTRL) & ~APLL_NDPLL_SWITCH, + ULPD_APLL_CTRL); /* Enable DPLL */ - writel(readl(ULPD_DPLL_CTRL_REG) | DPLL_PLL_ENABLE, - ULPD_DPLL_CTRL_REG); + omap_writel(omap_readl(ULPD_DPLL_CTRL) | DPLL_PLL_ENABLE, + ULPD_DPLL_CTRL); /* Software request for USB 48MHz clock */ - writel(readl(ULPD_SOFT_REQ_REG) | SOFT_REQ_REG_REQ, - ULPD_SOFT_REQ_REG); + omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_REQ_REG_REQ, + ULPD_SOFT_REQ); - while (!(readl(ULPD_DPLL_CTRL_REG) & DPLL_LOCK)); + while (!(omap_readl(ULPD_DPLL_CTRL) & DPLL_LOCK)); } - if (cpu_is_omap_1610()) { + if (cpu_is_omap16xx()) { /* Enable OHCI */ - writel(readl(ULPD_SOFT_REQ_REG) | SOFT_USB_OTG_REQ, - ULPD_SOFT_REQ_REG); + omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_USB_OTG_REQ, + ULPD_SOFT_REQ); /* USB host clock request if not using OTG */ - writel(readl(ULPD_SOFT_REQ_REG) | SOFT_USB_REQ, - ULPD_SOFT_REQ_REG); + omap_writel(omap_readl(ULPD_SOFT_REQ) | SOFT_USB_REQ, + ULPD_SOFT_REQ); - writel(readl(ULPD_STATUS_REQ_REG) | USB_HOST_DPLL_REQ, - ULPD_STATUS_REQ_REG); + omap_writel(omap_readl(ULPD_STATUS_REQ) | USB_HOST_DPLL_REQ, + ULPD_STATUS_REQ); } /* Enable 48MHz clock to USB */ - writel(readl(ULPD_CLOCK_CTRL_REG) | USB_MCLK_EN, - ULPD_CLOCK_CTRL_REG); + omap_writel(omap_readl(ULPD_CLOCK_CTRL) | USB_MCLK_EN, + ULPD_CLOCK_CTRL); - writel(readl(ARM_IDLECT2) | (1 << EN_LBFREECK) | (1 << EN_LBCK), + omap_writel(omap_readl(ARM_IDLECT2) | (1 << EN_LBFREECK) | (1 << EN_LBCK), ARM_IDLECT2); - writel(readl(MOD_CONF_CTRL_0) | USB_HOST_HHC_UHOST_EN, + omap_writel(omap_readl(MOD_CONF_CTRL_0) | USB_HOST_HHC_UHOST_EN, MOD_CONF_CTRL_0); } else { /* Disable 48MHz clock to USB */ - writel(readl(ULPD_CLOCK_CTRL_REG) & ~USB_MCLK_EN, - ULPD_CLOCK_CTRL_REG); + omap_writel(omap_readl(ULPD_CLOCK_CTRL) & ~USB_MCLK_EN, + ULPD_CLOCK_CTRL); /* FIXME: The DPLL stays on for now */ } @@ -163,13 +97,19 @@ static int omap_ohci_transceiver_power(int on) { if (on) { - if (omap_is_innovator()) - writel(readl(OMAP1510_FPGA_HOST_CTRL) | 0x20, - OMAP1510_FPGA_HOST_CTRL); + if (machine_is_omap_innovator() && cpu_is_omap1510()) + fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) | 0x20, + INNOVATOR_FPGA_CAM_USB_CONTROL); + else if (machine_is_omap_osk()) { + /* FIXME: GPIO1 -> 1 on the TPS65010 I2C chip */ + } } else { - if (omap_is_innovator()) - writel(readl(OMAP1510_FPGA_HOST_CTRL) & ~0x20, - OMAP1510_FPGA_HOST_CTRL); + if (machine_is_omap_innovator() && cpu_is_omap1510()) + fpga_write(fpga_read(INNOVATOR_FPGA_CAM_USB_CONTROL) & ~0x20, + INNOVATOR_FPGA_CAM_USB_CONTROL); + else if (machine_is_omap_osk()) { + /* FIXME: GPIO1 -> 0 on the TPS65010 I2C chip */ + } } return 0; @@ -181,10 +121,10 @@ static int omap_1510_local_bus_power(int on) { if (on) { - writel((1 << 1) | (1 << 0), OMAP1510_LB_MMU_CTL); + omap_writel((1 << 1) | (1 << 0), OMAP1510_LB_MMU_CTL); udelay(200); } else { - writel(0, OMAP1510_LB_MMU_CTL); + omap_writel(0, OMAP1510_LB_MMU_CTL); } return 0; @@ -193,8 +133,8 @@ /* * OMAP-1510 specific Local Bus initialization * NOTE: This assumes 32MB memory size in OMAP1510LB_MEMSIZE. - * See also arch/mach-omap/memory.h for __virt_to_bus() and - * __bus_to_virt() which need to match with the physical + * See also arch/mach-omap/memory.h for __virt_to_dma() and + * __dma_to_virt() which need to match with the physical * Local Bus address below. */ static int omap_1510_local_bus_init(void) @@ -202,125 +142,115 @@ unsigned int tlb; unsigned long lbaddr, physaddr; - writel((readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4, + omap_writel((omap_readl(OMAP1510_LB_CLOCK_DIV) & 0xfffffff8) | 0x4, OMAP1510_LB_CLOCK_DIV); /* Configure the Local Bus MMU table */ for (tlb = 0; tlb < OMAP1510_LB_MEMSIZE; tlb++) { lbaddr = tlb * 0x00100000 + OMAP1510_LB_OFFSET; physaddr = tlb * 0x00100000 + PHYS_OFFSET; - writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H); - writel(((lbaddr & 0x003ffc00) >> 6) | 0xc, + omap_writel((lbaddr & 0x0fffffff) >> 22, OMAP1510_LB_MMU_CAM_H); + omap_writel(((lbaddr & 0x003ffc00) >> 6) | 0xc, OMAP1510_LB_MMU_CAM_L); - writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H); - writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L); - writel(tlb << 4, OMAP1510_LB_MMU_LCK); - writel(0x1, OMAP1510_LB_MMU_LD_TLB); + omap_writel(physaddr >> 16, OMAP1510_LB_MMU_RAM_H); + omap_writel((physaddr & 0x0000fc00) | 0x300, OMAP1510_LB_MMU_RAM_L); + omap_writel(tlb << 4, OMAP1510_LB_MMU_LCK); + omap_writel(0x1, OMAP1510_LB_MMU_LD_TLB); } /* Enable the walking table */ - writel(readl(OMAP1510_LB_MMU_CTL) | (1 << 3), OMAP1510_LB_MMU_CTL); + omap_writel(omap_readl(OMAP1510_LB_MMU_CTL) | (1 << 3), OMAP1510_LB_MMU_CTL); udelay(200); return 0; } -/* - * OMAP-1610 specific hardware initialization - * - * Intended to configure OMAP-1610 USB host and OTG ports depending on - * the HMC mode selected. - * - * FIXME: Currently only supports alternate ping group 2 mode, should - * be easy to modify for other configurations once there is some - * hardware to test with. - */ -static int omap_1610_usb_init(int mode) -{ - u_int val = 0; - - /* Configure the OMAP transceiver settings */ - val |= (1 << 8); /* CONF_USB2_UNI TRM p 15-205*/ - val |= (4 << 4); /* TRM p 5-59, p 15-157 (1224) */ - - //val |= (1 << 3); /* Isolate integrated transceiver from port 0 */ - val |= (1 << 2); /* Disable pulldown on integrated transceiver DM */ - val |= (1 << 1); /* Disable pulldown on integraded transceiver DP */ - - writel(val, USB_TRANSCEIVER_CTRL); - - /* Set the USB0_TRX_MODE */ - val = 0; - val &= ~OTG_IDLE_EN; - val &= ~DEV_IDLE_EN; - val &= ~(7 << 16); /* Clear USB0_TRX_MODE */ - val |= (3 << 16); /* 0 or 3, 6-wire DAT/SE0, TRM p 15-159 */ - writel(val, OTG_SYSCON_1); - - /* - * Control via OTG, see TRM p 15-163 - */ - val = 0; - //val |= 1; /* REVISIT: Enable OTG = 1 */ +#ifdef CONFIG_USB_OTG - /* Control via OTG */ - val &= ~HMC_PADEN; - val &= ~OTG_PADEN; - val |= UHOST_EN; - - val &= ~0x3f; /* Clear HMC mode */ - val |= mode; /* Set HMC mode */ - val &= ~(7 << 16); /* Clear ASE0_BRST */ - val |= (4 << 16); /* Must be 4 */ - val |= USBX_SYNCHRO; /* Must be set */ - val |= SRP_VBUS; - writel(val, OTG_SYSCON_2); +static void start_hnp(struct ohci_hcd *ohci) +{ + const unsigned port = ohci->hcd.self.otg_port - 1; + unsigned long flags; - /* Enable OTG idle */ - //writel(readl(OTG_SYSCON_1) | OTG_IDLE_EN, OTG_SYSCON_1); + otg_start_hnp(ohci->transceiver); - return 0; + local_irq_save(flags); + ohci->transceiver->state = OTG_STATE_A_SUSPEND; + writel (RH_PS_PSS, &ohci->regs->roothub.portstatus [port]); + OTG_CTRL_REG &= ~OTG_A_BUSREQ; + local_irq_restore(flags); } +#endif + /*-------------------------------------------------------------------------*/ -static void omap_start_hc(struct omap_dev *dev) +static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev) { - printk(KERN_DEBUG __FILE__ - ": starting OMAP OHCI USB Controller\n"); + struct omap_usb_config *config = pdev->dev.platform_data; + int need_transceiver = (config->otg != 0); - /* - * Set the HMC mode for the USB ports - */ -#if 0 - /* See note about the Innovator wiring above */ - if (omap_is_innovator()) - hmc_mode = 4; /* 0: function 1: host 2: host */ -#endif + dev_dbg(&pdev->dev, "starting USB Controller\n"); + + if (config->otg) { + ohci->hcd.self.otg_port = config->otg; + /* default/minimum OTG power budget: 8 mA */ + ohci->power_budget = 8; + } - if (cpu_is_omap_1610()) + /* boards can use OTG transceivers in non-OTG modes */ + need_transceiver = need_transceiver + || machine_is_omap_h2(); + + if (cpu_is_omap16xx()) ocpi_enable(); - omap_usb_set_hmc_mode(hmc_mode); +#ifdef CONFIG_ARCH_OMAP_OTG + if (need_transceiver) { + ohci->transceiver = otg_get_transceiver(); + if (ohci->transceiver) { + int status = otg_set_host(ohci->transceiver, + &ohci->hcd.self); + dev_dbg(&pdev->dev, "init %s transceiver, status %d\n", + ohci->transceiver->label, status); + if (status) { + if (ohci->transceiver) + put_device(ohci->transceiver->dev); + return status; + } + } else { + dev_err(&pdev->dev, "can't find transceiver\n"); + return -ENODEV; + } + } +#endif + + if (machine_is_omap_osk()) { + omap_request_gpio(9); + omap_set_gpio_direction(9, 1); + omap_set_gpio_dataout(9, 1); + } omap_ohci_clock_power(1); + omap_ohci_transceiver_power(1); - if (cpu_is_omap_1510()) { + if (cpu_is_omap1510()) { omap_1510_local_bus_power(1); omap_1510_local_bus_init(); } - if (cpu_is_omap_1610()) - omap_1610_usb_init(hmc_mode); + /* board init will have already handled HMC and mux setup. + * any external transceiver should already be initialized + * too, so all configured ports use the right signaling now. + */ - //omap_enable_device(dev); + return 0; } -static void omap_stop_hc(struct omap_dev *dev) +static void omap_stop_hc(struct platform_device *pdev) { - printk(KERN_DEBUG __FILE__ - ": stopping OMAP OHCI USB Controller\n"); + dev_dbg(&pdev->dev, "stopping USB Controller\n"); /* * FIXME: Put the USB host controller into reset. @@ -336,16 +266,7 @@ /*-------------------------------------------------------------------------*/ -static irqreturn_t usb_hcd_omap_hcim_irq (int irq, void *__hcd, struct pt_regs * r) -{ - struct usb_hcd *hcd = __hcd; - - return usb_hcd_irq(irq, hcd, r); -} - -/*-------------------------------------------------------------------------*/ - -void usb_hcd_omap_remove (struct usb_hcd *, struct omap_dev *); +void usb_hcd_omap_remove (struct usb_hcd *, struct platform_device *); /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ @@ -358,59 +279,71 @@ * Allocates basic resources for this USB host controller, and * then invokes the start() method for the HCD associated with it * through the hotplug entry's driver_data. - * - * Store this function in the HCD's struct pci_driver as probe(). */ int usb_hcd_omap_probe (const struct hc_driver *driver, - struct usb_hcd **hcd_out, - struct omap_dev *dev) + struct platform_device *pdev) { int retval; struct usb_hcd *hcd = 0; + struct ohci_hcd *ohci; - if (!request_mem_region(dev->res.start, - dev->res.end - dev->res.start + 1, hcd_name)) { - dbg("request_mem_region failed"); - return -EBUSY; + if (pdev->num_resources != 2) { + printk(KERN_ERR "hcd probe: invalid num_resources: %i\n", + pdev->num_resources); + return -ENODEV; + } + + if (pdev->resource[0].flags != IORESOURCE_MEM + || pdev->resource[1].flags != IORESOURCE_IRQ) { + printk(KERN_ERR "hcd probe: invalid resource type\n"); + return -ENODEV; } - omap_start_hc(dev); + if (!request_mem_region(pdev->resource[0].start, + pdev->resource[0].end - pdev->resource[0].start + 1, hcd_name)) { + dev_dbg(&pdev->dev, "request_mem_region failed\n"); + return -EBUSY; + } hcd = driver->hcd_alloc (); if (hcd == NULL){ - dbg ("hcd_alloc failed"); + dev_dbg(&pdev->dev, "hcd_alloc failed\n"); retval = -ENOMEM; goto err1; } + dev_set_drvdata(&pdev->dev, hcd); + ohci = hcd_to_ohci(hcd); hcd->driver = (struct hc_driver *) driver; hcd->description = driver->description; - hcd->irq = dev->irq[0]; - hcd->regs = dev->mapbase; - hcd->self.controller = &dev->dev; + hcd->irq = pdev->resource[1].start; + hcd->regs = (void *)pdev->resource[0].start; + hcd->self.controller = &pdev->dev; + + retval = omap_start_hc(ohci, pdev); + if (retval < 0) + goto err2; retval = hcd_buffer_create (hcd); if (retval != 0) { - dbg ("pool alloc fail"); + dev_dbg(&pdev->dev, "pool alloc fail\n"); goto err1; } - retval = request_irq (hcd->irq, - usb_hcd_omap_hcim_irq, + retval = request_irq (hcd->irq, usb_hcd_irq, SA_INTERRUPT, hcd->description, hcd); if (retval != 0) { - dbg("request_irq failed"); + dev_dbg(&pdev->dev, "request_irq failed\n"); retval = -EBUSY; goto err2; } - info ("%s (OMAP) at 0x%p, irq %d\n", - hcd->description, hcd->regs, hcd->irq); + dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq); usb_bus_init (&hcd->self); hcd->self.op = &usb_hcd_operations; hcd->self.hcpriv = (void *) hcd; - hcd->self.bus_name = "omap"; + hcd->self.bus_name = pdev->dev.bus_id; hcd->product_desc = "OMAP OHCI"; INIT_LIST_HEAD (&hcd->dev_list); @@ -418,11 +351,10 @@ if ((retval = driver->start (hcd)) < 0) { - usb_hcd_omap_remove(hcd, dev); + usb_hcd_omap_remove(hcd, pdev); return retval; } - *hcd_out = hcd; return 0; err2: @@ -430,10 +362,12 @@ if (hcd) driver->hcd_free(hcd); err1: - omap_stop_hc(dev); + omap_stop_hc(pdev); - release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1); + release_mem_region(pdev->resource[0].start, + pdev->resource[0].end - pdev->resource[0].start + 1); + dev_set_drvdata(&pdev->dev, 0); return retval; } @@ -451,24 +385,27 @@ * context, normally "rmmod", "apmd", or something similar. * */ -void usb_hcd_omap_remove (struct usb_hcd *hcd, struct omap_dev *dev) +void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) { void *base; - info ("remove: %s, state %x", hcd->self.bus_name, hcd->state); + dev_info(&pdev->dev, "remove: state %x\n", hcd->state); if (in_interrupt ()) BUG (); hcd->state = USB_STATE_QUIESCING; - dbg ("%s: roothub graceful disconnect", hcd->self.bus_name); + dev_dbg(&pdev->dev, "roothub graceful disconnect\n"); usb_disconnect (&hcd->self.root_hub); hcd->driver->stop (hcd); hcd_buffer_destroy (hcd); hcd->state = USB_STATE_HALT; + if (machine_is_omap_osk()) + omap_free_gpio(9); + free_irq (hcd->irq, hcd); usb_deregister_bus (&hcd->self); @@ -476,9 +413,10 @@ base = hcd->regs; hcd->driver->hcd_free (hcd); - omap_stop_hc(dev); + omap_stop_hc(pdev); - release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1); + release_mem_region(pdev->resource[0].start, + pdev->resource[0].end - pdev->resource[0].start + 1); } /*-------------------------------------------------------------------------*/ @@ -486,11 +424,13 @@ static int __devinit ohci_omap_start (struct usb_hcd *hcd) { + struct omap_usb_config *config; struct ohci_hcd *ohci = hcd_to_ohci (hcd); int ret; - ohci->hcca = dma_alloc_consistent (hcd->self.controller, - sizeof *ohci->hcca, &ohci->hcca_dma); + config = hcd->self.controller->platform_data; + ohci->hcca = dma_alloc_coherent (hcd->self.controller, + sizeof *ohci->hcca, &ohci->hcca_dma, 0); if (!ohci->hcca) return -ENOMEM; @@ -500,6 +440,10 @@ return ret; } ohci->regs = hcd->regs; + + if (config->otg || config->rwc) + writel(OHCI_CTRL_RWC, &ohci->regs->control); + if (hc_reset (ohci) < 0) { ohci_stop (hcd); return -ENODEV; @@ -510,6 +454,9 @@ ohci_stop (hcd); return -EBUSY; } + if (ohci->power_budget) + hub_set_power_budget(ohci->hcd.self.root_hub, + ohci->power_budget); create_debug_files (ohci); #ifdef DEBUG @@ -533,10 +480,6 @@ * basic lifecycle operations */ .start = ohci_omap_start, -#ifdef CONFIG_PM - /* suspend: ohci_omap_suspend, -- tbd */ - /* resume: ohci_omap_resume, -- tbd */ -#endif .stop = ohci_stop, /* @@ -566,104 +509,130 @@ .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif + .start_port_reset = ohci_start_port_reset, }; /*-------------------------------------------------------------------------*/ -static int ohci_hcd_omap_drv_probe(struct omap_dev *dev) +static int ohci_hcd_omap_drv_probe(struct device *dev) { - struct usb_hcd *hcd = NULL; - int ret; - - if (usb_disabled()) - return -ENODEV; + return usb_hcd_omap_probe(&ohci_omap_hc_driver, + to_platform_device(dev)); +} - ret = usb_hcd_omap_probe(&ohci_omap_hc_driver, &hcd, dev); +static int ohci_hcd_omap_drv_remove(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = dev_get_drvdata(dev); + struct ohci_hcd *ohci = hcd_to_ohci (hcd); - if (ret == 0) - omap_set_drvdata(dev, hcd); + usb_hcd_omap_remove(hcd, pdev); + if (ohci->transceiver) { + (void) otg_set_host(ohci->transceiver, 0); + put_device(ohci->transceiver->dev); + } + dev_set_drvdata(dev, NULL); - return ret; + return 0; } -static int ohci_hcd_omap_drv_remove(struct omap_dev *dev) +/*-------------------------------------------------------------------------*/ + +#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) + +/* states match PCI usage, always suspending the root hub except that + * 4 ~= D3cold (ACPI D3) with clock off (resume sees reset). + */ + +static int ohci_omap_suspend(struct device *dev, u32 state, u32 level) { - struct usb_hcd *hcd = omap_get_drvdata(dev); + struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); + int status = -EINVAL; - usb_hcd_omap_remove(hcd, dev); + if (state <= dev->power.power_state) + return 0; - omap_set_drvdata(dev, NULL); + dev_dbg(dev, "suspend to %d\n", state); + down(&ohci->hcd.self.root_hub->serialize); + status = ohci_hub_suspend(&ohci->hcd); + if (status == 0) { + if (state >= 4) { + /* power off + reset */ + OTG_SYSCON_2_REG &= ~UHOST_EN; + ohci->hcd.self.root_hub->state = USB_STATE_SUSPENDED; + state = 4; + } + ohci->hcd.state = HCD_STATE_SUSPENDED; + dev->power.power_state = state; + } + up(&ohci->hcd.self.root_hub->serialize); + return status; +} - return 0; +static int ohci_omap_resume(struct device *dev, u32 level) +{ + struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); + int status = 0; + + switch (dev->power.power_state) { + case 0: + break; + case 4: + if (time_before(jiffies, ohci->next_statechange)) + msleep(5); + ohci->next_statechange = jiffies; + OTG_SYSCON_2_REG |= UHOST_EN; + /* FALLTHROUGH */ + default: + dev_dbg(dev, "resume from %d\n", dev->power.power_state); +#ifdef CONFIG_USB_SUSPEND + /* get extra cleanup even if remote wakeup isn't in use */ + status = usb_resume_device(ohci->hcd.self.root_hub); +#else + down(&ohci->hcd.self.root_hub->serialize); + status = ohci_hub_resume(&ohci->hcd); + up(&ohci->hcd.self.root_hub->serialize); +#endif + if (status == 0) + dev->power.power_state = 0; + break; + } + return status; } +#endif + +/*-------------------------------------------------------------------------*/ + /* * Driver definition to register with the OMAP bus */ -static struct omap_driver ohci_hcd_omap_driver = { - .drv = { - .name = OMAP_OHCI_NAME, - }, - .devid = OMAP_OCP_DEVID_USB, - .busid = OMAP_BUS_OCP, - .clocks = 0, +static struct device_driver ohci_hcd_omap_driver = { + .name = "ohci", + .bus = &platform_bus_type, .probe = ohci_hcd_omap_drv_probe, .remove = ohci_hcd_omap_drv_remove, -}; - -/* Any dma_mask must be set for OHCI to work */ -static u64 omap_dmamask = 0xffffffffUL; - -/* - * Device definition to match the driver above - */ -static struct omap_dev ohci_hcd_omap_device = { - .name = OMAP_OHCI_NAME, - .devid = OMAP_OCP_DEVID_USB, - .busid = OMAP_BUS_OCP, - .mapbase = (void *)OMAP_OHCI_BASE, - .dma_mask = &omap_dmamask, /* Needed only for OHCI */ - .res = { - .start = OMAP_OHCI_BASE, - .end = OMAP_OHCI_BASE + OMAP_OHCI_SIZE, - }, - .irq = { - INT_USB_HHC_1, - }, +#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) + .suspend = ohci_omap_suspend, + .resume = ohci_omap_resume, +#endif }; static int __init ohci_hcd_omap_init (void) { - int ret; - - dbg (DRIVER_INFO " (OMAP)"); - dbg ("block sizes: ed %d td %d\n", - sizeof (struct ed), sizeof (struct td)); - - if (hmc_mode < 0 || hmc_mode > 25) - hmc_mode = default_hmc_mode; - - /* Register the driver with OMAP bus */ - ret = omap_driver_register(&ohci_hcd_omap_driver); - if (ret != 0) + printk (KERN_DEBUG "%s: " DRIVER_INFO " (OMAP)\n", hcd_name); + if (usb_disabled()) return -ENODEV; - /* Register the device with OMAP bus */ - ret = omap_device_register(&ohci_hcd_omap_device); - if (ret != 0) { - omap_driver_unregister(&ohci_hcd_omap_driver); - return -ENODEV; - } + pr_debug("%s: block sizes: ed %Zd td %Zd\n", hcd_name, + sizeof (struct ed), sizeof (struct td)); - return ret; + return driver_register(&ohci_hcd_omap_driver); } -module_param(hmc_mode, int, 0); - static void __exit ohci_hcd_omap_cleanup (void) { - omap_device_unregister(&ohci_hcd_omap_device); - omap_driver_unregister(&ohci_hcd_omap_driver); + driver_unregister(&ohci_hcd_omap_driver); } module_init (ohci_hcd_omap_init); diff -Nru a/drivers/usb/host/ohci-omap.h b/drivers/usb/host/ohci-omap.h --- a/drivers/usb/host/ohci-omap.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,57 +0,0 @@ -/* - * linux/drivers/usb/host/ohci-omap.h - * - * OMAP OHCI USB controller specific defines - */ - -/* OMAP USB OHCI common defines */ -#define OMAP_OHCI_NAME "omap-ohci" -#define OMAP_OHCI_BASE 0xfffba000 -#define OMAP_OHCI_SIZE 4096 - -#define HMC_CLEAR (0x3f << 1) -#define APLL_NDPLL_SWITCH 0x0001 -#define DPLL_PLL_ENABLE 0x0010 -#define DPLL_LOCK 0x0001 -#define SOFT_REQ_REG_REQ 0x0001 -#define USB_MCLK_EN 0x0010 -#define USB_HOST_HHC_UHOST_EN 0x00000200 -#define SOFT_USB_OTG_REQ (1 << 8) -#define SOFT_USB_REQ (1 << 3) -#define STATUS_REQ_REG 0xfffe0840 -#define USB_HOST_DPLL_REQ (1 << 8) -#define SOFT_DPLL_REQ (1 << 0) - -/* OMAP-1510 USB OHCI defines */ -#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */ -#define OMAP1510_LB_CLOCK_DIV 0xfffec10c -#define OMAP1510_LB_MMU_CTL 0xfffec208 -#define OMAP1510_LB_MMU_LCK 0xfffec224 -#define OMAP1510_LB_MMU_LD_TLB 0xfffec228 -#define OMAP1510_LB_MMU_CAM_H 0xfffec22c -#define OMAP1510_LB_MMU_CAM_L 0xfffec230 -#define OMAP1510_LB_MMU_RAM_H 0xfffec234 -#define OMAP1510_LB_MMU_RAM_L 0xfffec238 - -/* OMAP-1610 USB OHCI defines */ -#define USB_TRANSCEIVER_CTRL 0xfffe1064 -#define OTG_REV 0xfffb0400 - -#define OTG_SYSCON_1 0xfffb0404 -#define OTG_IDLE_EN (1 << 15) -#define DEV_IDLE_EN (1 << 13) - -#define OTG_SYSCON_2 0xfffb0408 -#define OTG_CTRL 0xfffb040c -#define OTG_IRQ_EN 0xfffb0410 -#define OTG_IRQ_SRC 0xfffb0414 - -#define OTG_EN (1 << 31) -#define USBX_SYNCHRO (1 << 30) -#define SRP_VBUS (1 << 12) -#define OTG_PADEN (1 << 10) -#define HMC_PADEN (1 << 9) -#define UHOST_EN (1 << 8) - -/* Hardware specific defines */ -#define OMAP1510_FPGA_HOST_CTRL 0xe800020c diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c --- a/drivers/usb/host/ohci-pci.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/host/ohci-pci.c 2004-09-06 16:37:54 -07:00 @@ -242,6 +242,7 @@ .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif + .start_port_reset = ohci_start_port_reset, }; /*-------------------------------------------------------------------------*/ @@ -276,7 +277,7 @@ if (usb_disabled()) return -ENODEV; - printk (KERN_DEBUG "%s: block sizes: ed %Zd td %Zd\n", hcd_name, + pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, sizeof (struct ed), sizeof (struct td)); return pci_module_init (&ohci_pci_driver); } diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/host/ohci-q.c 2004-09-06 16:37:55 -07:00 @@ -900,9 +900,6 @@ /*-------------------------------------------------------------------------*/ -/* wrap-aware logic stolen from */ -#define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0) - /* there are some urbs/eds to unlink; called in_irq(), with HCD locked */ static void finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) diff -Nru a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h --- a/drivers/usb/host/ohci.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/host/ohci.h 2004-09-06 16:37:55 -07:00 @@ -360,6 +360,13 @@ struct ed *periodic [NUM_INTS]; /* shadow int_table */ /* + * OTG controllers and transceivers need software interaction; + * other external transceivers should be software-transparent + */ + struct otg_transceiver *transceiver; + unsigned power_budget; + + /* * memory management for queue data structures */ struct dma_pool *td_cache; diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/host/uhci-hcd.c 2004-09-06 16:37:54 -07:00 @@ -1340,7 +1340,7 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags) { - int ret = -EINVAL; + int ret; struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned long flags; struct urb *eurb; @@ -1348,7 +1348,8 @@ spin_lock_irqsave(&uhci->schedule_lock, flags); - if (urb->status != -EINPROGRESS) /* URB already unlinked! */ + ret = urb->status; + if (ret != -EINPROGRESS) /* URB already unlinked! */ goto out; eurb = uhci_find_urb_ep(uhci, urb); @@ -1633,13 +1634,6 @@ if (up->fsbr && !up->fsbr_timeout && time_after_eq(jiffies, up->fsbrtime + IDLE_TIMEOUT)) uhci_fsbr_timeout(uhci, u); - /* Check if the URB timed out */ - if (u->timeout && u->status == -EINPROGRESS && - time_after_eq(jiffies, up->inserttime + u->timeout)) { - u->status = -ETIMEDOUT; - list_move_tail(&up->urb_list, &list); - } - spin_unlock(&u->lock); } spin_unlock_irqrestore(&uhci->schedule_lock, flags); @@ -2254,7 +2248,8 @@ irq = 7; /* Only place we don't use the frame list routines */ - uhci->fl->frame[i] = cpu_to_le32(uhci->skelqh[irq]->dma_handle); + uhci->fl->frame[i] = UHCI_PTR_QH | + cpu_to_le32(uhci->skelqh[irq]->dma_handle); } /* diff -Nru a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c --- a/drivers/usb/input/ati_remote.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/input/ati_remote.c 2004-09-06 16:37:54 -07:00 @@ -112,11 +112,11 @@ #define ATI_INPUTNUM 1 /* Which input device to register as */ static unsigned long channel_mask = 0; -module_param(channel_mask, ulong, 444); +module_param(channel_mask, ulong, 0444); MODULE_PARM_DESC(channel_mask, "Bitmask of remote control channels to ignore"); static int debug = 0; -module_param(debug, int, 444); +module_param(debug, int, 0444); MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); #define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) diff -Nru a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig --- a/drivers/usb/media/Kconfig 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/media/Kconfig 2004-09-06 16:37:50 -07:00 @@ -106,46 +106,6 @@ To compile this driver as a module, choose M here: the module will be called ov511. -config USB_PWC - tristate "USB Philips Cameras" - depends on USB && VIDEO_DEV - ---help--- - Say Y or M here if you want to use one of these Philips & OEM - webcams: - * Philips PCA645, PCA646 - * Philips PCVC675, PCVC680, PCVC690 - * Philips PCVC720/40, PCVC730, PCVC740, PCVC750 - * Askey VC010 - * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro' - and 'Orbit'/'Sphere' - * Samsung MPC-C10, MPC-C30 - * Creative Webcam 5, Pro Ex - * SOTEC Afina Eye - * Visionite VCS-UC300, VCS-UM100 - - The PCA635, PCVC665 and PCVC720/20 are not supported by this driver - and never will be, but the 665 and 720/20 are supported by other - drivers. - - This driver has an optional plugin (called PWCX), which is - distributed as a binary module only. It contains code that allow you - to use higher resolutions and framerates but may not be distributed - as source. But even without this plugin you can these cams for most - applications. - - See for more information and - installation instructions. - - The built-in microphone is enabled by selecting USB Audio support. - - This driver uses the Video For Linux API. You must say Y or M to - "Video For Linux" (under Character Devices) to use this driver. - Information on this API and pointers to "v4l" programs may be found - at . - - To compile this driver as a module, choose M here: the - module will be called pwc. - config USB_SE401 tristate "USB SE401 Camera support" depends on USB && VIDEO_DEV diff -Nru a/drivers/usb/media/Makefile b/drivers/usb/media/Makefile --- a/drivers/usb/media/Makefile 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/media/Makefile 2004-09-06 16:37:50 -07:00 @@ -2,7 +2,6 @@ # Makefile for USB Media drivers # -pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o sn9c102-objs := sn9c102_core.o sn9c102_pas106b.o sn9c102_tas5110c1b.o sn9c102_tas5130d1b.o sn9c102_pas202bcb.o obj-$(CONFIG_USB_DABUSB) += dabusb.o @@ -10,7 +9,6 @@ obj-$(CONFIG_USB_IBMCAM) += ibmcam.o usbvideo.o ultracam.o obj-$(CONFIG_USB_KONICAWC) += konicawc.o usbvideo.o obj-$(CONFIG_USB_OV511) += ov511.o -obj-$(CONFIG_USB_PWC) += pwc.o obj-$(CONFIG_USB_SE401) += se401.o obj-$(CONFIG_USB_SN9C102) += sn9c102.o obj-$(CONFIG_USB_STV680) += stv680.o diff -Nru a/drivers/usb/media/pwc-ctrl.c b/drivers/usb/media/pwc-ctrl.c --- a/drivers/usb/media/pwc-ctrl.c 2004-09-06 16:37:55 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,1644 +0,0 @@ -/* Driver for Philips webcam - Functions that send various control messages to the webcam, including - video modes. - (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* - Changes - 2001/08/03 Alvarado Added methods for changing white balance and - red/green gains - */ - -/* Control functions for the cam; brightness, contrast, video mode, etc. */ - -#ifdef __KERNEL__ -#include -#endif -#include -#include - -#include "pwc.h" -#include "pwc-ioctl.h" -#include "pwc-uncompress.h" - -/* Request types: video */ -#define SET_LUM_CTL 0x01 -#define GET_LUM_CTL 0x02 -#define SET_CHROM_CTL 0x03 -#define GET_CHROM_CTL 0x04 -#define SET_STATUS_CTL 0x05 -#define GET_STATUS_CTL 0x06 -#define SET_EP_STREAM_CTL 0x07 -#define GET_EP_STREAM_CTL 0x08 -#define SET_MPT_CTL 0x0D -#define GET_MPT_CTL 0x0E - -/* Selectors for the Luminance controls [GS]ET_LUM_CTL */ -#define AGC_MODE_FORMATTER 0x2000 -#define PRESET_AGC_FORMATTER 0x2100 -#define SHUTTER_MODE_FORMATTER 0x2200 -#define PRESET_SHUTTER_FORMATTER 0x2300 -#define PRESET_CONTOUR_FORMATTER 0x2400 -#define AUTO_CONTOUR_FORMATTER 0x2500 -#define BACK_LIGHT_COMPENSATION_FORMATTER 0x2600 -#define CONTRAST_FORMATTER 0x2700 -#define DYNAMIC_NOISE_CONTROL_FORMATTER 0x2800 -#define FLICKERLESS_MODE_FORMATTER 0x2900 -#define AE_CONTROL_SPEED 0x2A00 -#define BRIGHTNESS_FORMATTER 0x2B00 -#define GAMMA_FORMATTER 0x2C00 - -/* Selectors for the Chrominance controls [GS]ET_CHROM_CTL */ -#define WB_MODE_FORMATTER 0x1000 -#define AWB_CONTROL_SPEED_FORMATTER 0x1100 -#define AWB_CONTROL_DELAY_FORMATTER 0x1200 -#define PRESET_MANUAL_RED_GAIN_FORMATTER 0x1300 -#define PRESET_MANUAL_BLUE_GAIN_FORMATTER 0x1400 -#define COLOUR_MODE_FORMATTER 0x1500 -#define SATURATION_MODE_FORMATTER1 0x1600 -#define SATURATION_MODE_FORMATTER2 0x1700 - -/* Selectors for the Status controls [GS]ET_STATUS_CTL */ -#define SAVE_USER_DEFAULTS_FORMATTER 0x0200 -#define RESTORE_USER_DEFAULTS_FORMATTER 0x0300 -#define RESTORE_FACTORY_DEFAULTS_FORMATTER 0x0400 -#define READ_AGC_FORMATTER 0x0500 -#define READ_SHUTTER_FORMATTER 0x0600 -#define READ_RED_GAIN_FORMATTER 0x0700 -#define READ_BLUE_GAIN_FORMATTER 0x0800 -#define SENSOR_TYPE_FORMATTER1 0x0C00 -#define READ_RAW_Y_MEAN_FORMATTER 0x3100 -#define SET_POWER_SAVE_MODE_FORMATTER 0x3200 -#define MIRROR_IMAGE_FORMATTER 0x3300 -#define LED_FORMATTER 0x3400 -#define SENSOR_TYPE_FORMATTER2 0x3700 - -/* Formatters for the Video Endpoint controls [GS]ET_EP_STREAM_CTL */ -#define VIDEO_OUTPUT_CONTROL_FORMATTER 0x0100 - -/* Formatters for the motorized pan & tilt [GS]ET_MPT_CTL */ -#define PT_RELATIVE_CONTROL_FORMATTER 0x01 -#define PT_RESET_CONTROL_FORMATTER 0x02 -#define PT_STATUS_FORMATTER 0x03 - -static char *size2name[PSZ_MAX] = -{ - "subQCIF", - "QSIF", - "QCIF", - "SIF", - "CIF", - "VGA", -}; - -/********/ - -/* Entries for the Nala (645/646) camera; the Nala doesn't have compression - preferences, so you either get compressed or non-compressed streams. - - An alternate value of 0 means this mode is not available at all. - */ - -struct Nala_table_entry { - char alternate; /* USB alternate setting */ - int compressed; /* Compressed yes/no */ - - unsigned char mode[3]; /* precomputed mode table */ -}; - -static struct Nala_table_entry Nala_table[PSZ_MAX][8] = -{ -#include "pwc_nala.h" -}; - -/* This tables contains entries for the 675/680/690 (Timon) camera, with - 4 different qualities (no compression, low, medium, high). - It lists the bandwidth requirements for said mode by its alternate interface - number. An alternate of 0 means that the mode is unavailable. - - There are 6 * 4 * 4 entries: - 6 different resolutions subqcif, qsif, qcif, sif, cif, vga - 6 framerates: 5, 10, 15, 20, 25, 30 - 4 compression modi: none, low, medium, high - - When an uncompressed mode is not available, the next available compressed mode - will be chosen (unless the decompressor is absent). Sometimes there are only - 1 or 2 compressed modes available; in that case entries are duplicated. -*/ -struct Timon_table_entry -{ - char alternate; /* USB alternate interface */ - unsigned short packetsize; /* Normal packet size */ - unsigned short bandlength; /* Bandlength when decompressing */ - unsigned char mode[13]; /* precomputed mode settings for cam */ -}; - -static struct Timon_table_entry Timon_table[PSZ_MAX][6][4] = -{ -#include "pwc_timon.h" -}; - -/* Entries for the Kiara (730/740/750) camera */ - -struct Kiara_table_entry -{ - char alternate; /* USB alternate interface */ - unsigned short packetsize; /* Normal packet size */ - unsigned short bandlength; /* Bandlength when decompressing */ - unsigned char mode[12]; /* precomputed mode settings for cam */ -}; - -static struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4] = -{ -#include "pwc_kiara.h" -}; - - -/****************************************************************************/ - - -#define SendControlMsg(request, value, buflen) \ - usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0), \ - request, \ - USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \ - value, \ - pdev->vcinterface, \ - &buf, buflen, HZ / 2) - -#define RecvControlMsg(request, value, buflen) \ - usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0), \ - request, \ - USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \ - value, \ - pdev->vcinterface, \ - &buf, buflen, HZ / 2) - - -#if PWC_DEBUG -void pwc_hexdump(void *p, int len) -{ - int i; - unsigned char *s; - char buf[100], *d; - - s = (unsigned char *)p; - d = buf; - *d = '\0'; - Debug("Doing hexdump @ %p, %d bytes.\n", p, len); - for (i = 0; i < len; i++) { - d += sprintf(d, "%02X ", *s++); - if ((i & 0xF) == 0xF) { - Debug("%s\n", buf); - d = buf; - *d = '\0'; - } - } - if ((i & 0xF) != 0) - Debug("%s\n", buf); -} -#endif - -static inline int send_video_command(struct usb_device *udev, int index, void *buf, int buflen) -{ - return usb_control_msg(udev, - usb_sndctrlpipe(udev, 0), - SET_EP_STREAM_CTL, - USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - VIDEO_OUTPUT_CONTROL_FORMATTER, - index, - buf, buflen, HZ); -} - - - -static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) -{ - unsigned char buf[3]; - int ret, fps; - struct Nala_table_entry *pEntry; - int frames2frames[31] = - { /* closest match of framerate */ - 0, 0, 0, 0, 4, /* 0-4 */ - 5, 5, 7, 7, 10, /* 5-9 */ - 10, 10, 12, 12, 15, /* 10-14 */ - 15, 15, 15, 20, 20, /* 15-19 */ - 20, 20, 20, 24, 24, /* 20-24 */ - 24, 24, 24, 24, 24, /* 25-29 */ - 24 /* 30 */ - }; - int frames2table[31] = - { 0, 0, 0, 0, 0, /* 0-4 */ - 1, 1, 1, 2, 2, /* 5-9 */ - 3, 3, 4, 4, 4, /* 10-14 */ - 5, 5, 5, 5, 5, /* 15-19 */ - 6, 6, 6, 6, 7, /* 20-24 */ - 7, 7, 7, 7, 7, /* 25-29 */ - 7 /* 30 */ - }; - - if (size < 0 || size > PSZ_CIF || frames < 4 || frames > 25) - return -EINVAL; - frames = frames2frames[frames]; - fps = frames2table[frames]; - pEntry = &Nala_table[size][fps]; - if (pEntry->alternate == 0) - return -EINVAL; - - if (pEntry->compressed && pdev->decompressor == NULL) - return -ENOENT; /* Not supported. */ - - memcpy(buf, pEntry->mode, 3); - ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3); - if (ret < 0) { - Debug("Failed to send video command... %d\n", ret); - return ret; - } - if (pEntry->compressed && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW) - pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data); - - pdev->cmd_len = 3; - memcpy(pdev->cmd_buf, buf, 3); - - /* Set various parameters */ - pdev->vframes = frames; - pdev->vsize = size; - pdev->valternate = pEntry->alternate; - pdev->image = pwc_image_sizes[size]; - pdev->frame_size = (pdev->image.x * pdev->image.y * 3) / 2; - if (pEntry->compressed) { - if (pdev->release < 5) { /* 4 fold compression */ - pdev->vbandlength = 528; - pdev->frame_size /= 4; - } - else { - pdev->vbandlength = 704; - pdev->frame_size /= 3; - } - } - else - pdev->vbandlength = 0; - return 0; -} - - -static inline int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) -{ - unsigned char buf[13]; - struct Timon_table_entry *pChoose; - int ret, fps; - - if (size >= PSZ_MAX || frames < 5 || frames > 30 || compression < 0 || compression > 3) - return -EINVAL; - if (size == PSZ_VGA && frames > 15) - return -EINVAL; - fps = (frames / 5) - 1; - - /* Find a supported framerate with progressively higher compression ratios - if the preferred ratio is not available. - */ - pChoose = NULL; - if (pdev->decompressor == NULL) { -#if PWC_DEBUG - Debug("Trying to find uncompressed mode.\n"); -#endif - pChoose = &Timon_table[size][fps][0]; - } - else { - while (compression <= 3) { - pChoose = &Timon_table[size][fps][compression]; - if (pChoose->alternate != 0) - break; - compression++; - } - } - if (pChoose == NULL || pChoose->alternate == 0) - return -ENOENT; /* Not supported. */ - - memcpy(buf, pChoose->mode, 13); - if (snapshot) - buf[0] |= 0x80; - ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 13); - if (ret < 0) - return ret; - - if (pChoose->bandlength > 0 && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW) - pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data); - - pdev->cmd_len = 13; - memcpy(pdev->cmd_buf, buf, 13); - - /* Set various parameters */ - pdev->vframes = frames; - pdev->vsize = size; - pdev->vsnapshot = snapshot; - pdev->valternate = pChoose->alternate; - pdev->image = pwc_image_sizes[size]; - pdev->vbandlength = pChoose->bandlength; - if (pChoose->bandlength > 0) - pdev->frame_size = (pChoose->bandlength * pdev->image.y) / 4; - else - pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8; - return 0; -} - - -static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) -{ - struct Kiara_table_entry *pChoose = NULL; - int fps, ret; - unsigned char buf[12]; - struct Kiara_table_entry RawEntry = {6, 773, 1272, {0xAD, 0xF4, 0x10, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}}; - - if (size >= PSZ_MAX || frames < 5 || frames > 30 || compression < 0 || compression > 3) - return -EINVAL; - if (size == PSZ_VGA && frames > 15) - return -EINVAL; - fps = (frames / 5) - 1; - - /* special case: VGA @ 5 fps and snapshot is raw bayer mode */ - if (size == PSZ_VGA && frames == 5 && snapshot) - { - /* Only available in case the raw palette is selected or - we have the decompressor available. This mode is - only available in compressed form - */ - if (pdev->vpalette == VIDEO_PALETTE_RAW || pdev->decompressor != NULL) - { - Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette); - pChoose = &RawEntry; - } - else - { - Info("VGA/5 BAYER mode _must_ have a decompressor available, or use RAW palette.\n"); - } - } - else - { - /* Find a supported framerate with progressively higher compression ratios - if the preferred ratio is not available. - Skip this step when using RAW modes. - */ - if (pdev->decompressor == NULL && pdev->vpalette != VIDEO_PALETTE_RAW) { -#if PWC_DEBUG - Debug("Trying to find uncompressed mode.\n"); -#endif - pChoose = &Kiara_table[size][fps][0]; - } - else { - while (compression <= 3) { - pChoose = &Kiara_table[size][fps][compression]; - if (pChoose->alternate != 0) - break; - compression++; - } - } - } - if (pChoose == NULL || pChoose->alternate == 0) - return -ENOENT; /* Not supported. */ - - /* usb_control_msg won't take staticly allocated arrays as argument?? */ - memcpy(buf, pChoose->mode, 12); - if (snapshot) - buf[0] |= 0x80; - - /* Firmware bug: video endpoint is 5, but commands are sent to endpoint 4 */ - ret = send_video_command(pdev->udev, 4 /* pdev->vendpoint */, buf, 12); - if (ret < 0) - return ret; - - if (pChoose->bandlength > 0 && pdev->decompressor != 0 && pdev->vpalette != VIDEO_PALETTE_RAW) - pdev->decompressor->init(pdev->type, pdev->release, buf, pdev->decompress_data); - - pdev->cmd_len = 12; - memcpy(pdev->cmd_buf, buf, 12); - /* All set and go */ - pdev->vframes = frames; - pdev->vsize = size; - pdev->vsnapshot = snapshot; - pdev->valternate = pChoose->alternate; - pdev->image = pwc_image_sizes[size]; - pdev->vbandlength = pChoose->bandlength; - if (pdev->vbandlength > 0) - pdev->frame_size = (pdev->vbandlength * pdev->image.y) / 4; - else - pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8; - return 0; -} - - - -/** - @pdev: device structure - @width: viewport width - @height: viewport height - @frame: framerate, in fps - @compression: preferred compression ratio - @snapshot: snapshot mode or streaming - */ -int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot) -{ - int ret, size; - - Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette); - size = pwc_decode_size(pdev, width, height); - if (size < 0) { - Debug("Could not find suitable size.\n"); - return -ERANGE; - } - Debug("decode_size = %d.\n", size); - - ret = -EINVAL; - switch(pdev->type) { - case 645: - case 646: - ret = set_video_mode_Nala(pdev, size, frames); - break; - - case 675: - case 680: - case 690: - ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot); - break; - - case 720: - case 730: - case 740: - case 750: - ret = set_video_mode_Kiara(pdev, size, frames, compression, snapshot); - break; - } - if (ret < 0) { - if (ret == -ENOENT) - Info("Video mode %s@%d fps is only supported with the decompressor module (pwcx).\n", size2name[size], frames); - else { - Err("Failed to set video mode %s@%d fps; return code = %d\n", size2name[size], frames, ret); - } - return ret; - } - pdev->view.x = width; - pdev->view.y = height; - pdev->frame_total_size = pdev->frame_size + pdev->frame_header_size + pdev->frame_trailer_size; - pwc_set_image_buffer_size(pdev); - Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y); - return 0; -} - - -void pwc_set_image_buffer_size(struct pwc_device *pdev) -{ - int i, factor = 0, filler = 0; - - /* for PALETTE_YUV420P */ - switch(pdev->vpalette) - { - case VIDEO_PALETTE_YUV420P: - factor = 6; - filler = 128; - break; - case VIDEO_PALETTE_RAW: - factor = 6; /* can be uncompressed YUV420P */ - filler = 0; - break; - } - - /* Set sizes in bytes */ - pdev->image.size = pdev->image.x * pdev->image.y * factor / 4; - pdev->view.size = pdev->view.x * pdev->view.y * factor / 4; - - /* Align offset, or you'll get some very weird results in - YUV420 mode... x must be multiple of 4 (to get the Y's in - place), and y even (or you'll mixup U & V). This is less of a - problem for YUV420P. - */ - pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC; - pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE; - - /* Fill buffers with gray or black */ - for (i = 0; i < MAX_IMAGES; i++) { - if (pdev->image_ptr[i] != NULL) - memset(pdev->image_ptr[i], filler, pdev->view.size); - } -} - - - -/* BRIGHTNESS */ - -int pwc_get_brightness(struct pwc_device *pdev) -{ - char buf; - int ret; - - ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1); - if (ret < 0) - return ret; - return buf << 9; -} - -int pwc_set_brightness(struct pwc_device *pdev, int value) -{ - char buf; - - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - buf = (value >> 9) & 0x7f; - return SendControlMsg(SET_LUM_CTL, BRIGHTNESS_FORMATTER, 1); -} - -/* CONTRAST */ - -int pwc_get_contrast(struct pwc_device *pdev) -{ - char buf; - int ret; - - ret = RecvControlMsg(GET_LUM_CTL, CONTRAST_FORMATTER, 1); - if (ret < 0) - return ret; - return buf << 10; -} - -int pwc_set_contrast(struct pwc_device *pdev, int value) -{ - char buf; - - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - buf = (value >> 10) & 0x3f; - return SendControlMsg(SET_LUM_CTL, CONTRAST_FORMATTER, 1); -} - -/* GAMMA */ - -int pwc_get_gamma(struct pwc_device *pdev) -{ - char buf; - int ret; - - ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1); - if (ret < 0) - return ret; - return buf << 11; -} - -int pwc_set_gamma(struct pwc_device *pdev, int value) -{ - char buf; - - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - buf = (value >> 11) & 0x1f; - return SendControlMsg(SET_LUM_CTL, GAMMA_FORMATTER, 1); -} - - -/* SATURATION */ - -int pwc_get_saturation(struct pwc_device *pdev) -{ - char buf; - int ret; - - if (pdev->type < 675) - return -1; - ret = RecvControlMsg(GET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1); - if (ret < 0) - return ret; - return 32768 + buf * 327; -} - -int pwc_set_saturation(struct pwc_device *pdev, int value) -{ - char buf; - - if (pdev->type < 675) - return -EINVAL; - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - /* saturation ranges from -100 to +100 */ - buf = (value - 32768) / 327; - return SendControlMsg(SET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1); -} - -/* AGC */ - -static inline int pwc_set_agc(struct pwc_device *pdev, int mode, int value) -{ - char buf; - int ret; - - if (mode) - buf = 0x0; /* auto */ - else - buf = 0xff; /* fixed */ - - ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1); - - if (!mode && ret >= 0) { - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - buf = (value >> 10) & 0x3F; - ret = SendControlMsg(SET_LUM_CTL, PRESET_AGC_FORMATTER, 1); - } - if (ret < 0) - return ret; - return 0; -} - -static inline int pwc_get_agc(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_LUM_CTL, AGC_MODE_FORMATTER, 1); - if (ret < 0) - return ret; - - if (buf != 0) { /* fixed */ - ret = RecvControlMsg(GET_LUM_CTL, PRESET_AGC_FORMATTER, 1); - if (ret < 0) - return ret; - if (buf > 0x3F) - buf = 0x3F; - *value = (buf << 10); - } - else { /* auto */ - ret = RecvControlMsg(GET_STATUS_CTL, READ_AGC_FORMATTER, 1); - if (ret < 0) - return ret; - /* Gah... this value ranges from 0x00 ... 0x9F */ - if (buf > 0x9F) - buf = 0x9F; - *value = -(48 + buf * 409); - } - - return 0; -} - -static inline int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) -{ - char buf[2]; - int speed, ret; - - - if (mode) - buf[0] = 0x0; /* auto */ - else - buf[0] = 0xff; /* fixed */ - - ret = SendControlMsg(SET_LUM_CTL, SHUTTER_MODE_FORMATTER, 1); - - if (!mode && ret >= 0) { - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - switch(pdev->type) { - case 675: - case 680: - case 690: - /* speed ranges from 0x0 to 0x290 (656) */ - speed = (value / 100); - buf[1] = speed >> 8; - buf[0] = speed & 0xff; - break; - case 720: - case 730: - case 740: - case 750: - /* speed seems to range from 0x0 to 0xff */ - buf[1] = 0; - buf[0] = value >> 8; - break; - } - - ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2); - } - return ret; -} - - -/* POWER */ - -int pwc_camera_power(struct pwc_device *pdev, int power) -{ - char buf; - - if (pdev->type < 675 || (pdev->type < 730 && pdev->release < 6)) - return 0; /* Not supported by Nala or Timon < release 6 */ - - if (power) - buf = 0x00; /* active */ - else - buf = 0xFF; /* power save */ - return SendControlMsg(SET_STATUS_CTL, SET_POWER_SAVE_MODE_FORMATTER, 1); -} - - - -/* private calls */ - -static inline int pwc_restore_user(struct pwc_device *pdev) -{ - char buf; /* dummy */ - return SendControlMsg(SET_STATUS_CTL, RESTORE_USER_DEFAULTS_FORMATTER, 0); -} - -static inline int pwc_save_user(struct pwc_device *pdev) -{ - char buf; /* dummy */ - return SendControlMsg(SET_STATUS_CTL, SAVE_USER_DEFAULTS_FORMATTER, 0); -} - -static inline int pwc_restore_factory(struct pwc_device *pdev) -{ - char buf; /* dummy */ - return SendControlMsg(SET_STATUS_CTL, RESTORE_FACTORY_DEFAULTS_FORMATTER, 0); -} - - /* ************************************************* */ - /* Patch by Alvarado: (not in the original version */ - - /* - * the camera recognizes modes from 0 to 4: - * - * 00: indoor (incandescant lighting) - * 01: outdoor (sunlight) - * 02: fluorescent lighting - * 03: manual - * 04: auto - */ -static inline int pwc_set_awb(struct pwc_device *pdev, int mode) -{ - char buf; - int ret; - - if (mode < 0) - mode = 0; - - if (mode > 4) - mode = 4; - - buf = mode & 0x07; /* just the lowest three bits */ - - ret = SendControlMsg(SET_CHROM_CTL, WB_MODE_FORMATTER, 1); - - if (ret < 0) - return ret; - return 0; -} - -static inline int pwc_get_awb(struct pwc_device *pdev) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_CHROM_CTL, WB_MODE_FORMATTER, 1); - - if (ret < 0) - return ret; - return buf; -} - -static inline int pwc_set_red_gain(struct pwc_device *pdev, int value) -{ - unsigned char buf; - - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - /* only the msb is considered */ - buf = value >> 8; - return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1); -} - -static inline int pwc_get_red_gain(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf << 8; - return 0; -} - - -static inline int pwc_set_blue_gain(struct pwc_device *pdev, int value) -{ - unsigned char buf; - - if (value < 0) - value = 0; - if (value > 0xffff) - value = 0xffff; - /* only the msb is considered */ - buf = value >> 8; - return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1); -} - -static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf << 8; - return 0; -} - - -/* The following two functions are different, since they only read the - internal red/blue gains, which may be different from the manual - gains set or read above. - */ -static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_STATUS_CTL, READ_RED_GAIN_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf << 8; - return 0; -} - -static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_STATUS_CTL, READ_BLUE_GAIN_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf << 8; - return 0; -} - - -static inline int pwc_set_wb_speed(struct pwc_device *pdev, int speed) -{ - unsigned char buf; - - /* useful range is 0x01..0x20 */ - buf = speed / 0x7f0; - return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1); -} - -static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf * 0x7f0; - return 0; -} - - -static inline int pwc_set_wb_delay(struct pwc_device *pdev, int delay) -{ - unsigned char buf; - - /* useful range is 0x01..0x3F */ - buf = (delay >> 10); - return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1); -} - -static inline int pwc_get_wb_delay(struct pwc_device *pdev, int *value) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1); - if (ret < 0) - return ret; - *value = buf << 10; - return 0; -} - - -int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value) -{ - unsigned char buf[2]; - - if (pdev->type < 730) - return 0; - on_value /= 100; - off_value /= 100; - if (on_value < 0) - on_value = 0; - if (on_value > 0xff) - on_value = 0xff; - if (off_value < 0) - off_value = 0; - if (off_value > 0xff) - off_value = 0xff; - - buf[0] = on_value; - buf[1] = off_value; - - return SendControlMsg(SET_STATUS_CTL, LED_FORMATTER, 2); -} - -int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value) -{ - unsigned char buf[2]; - int ret; - - if (pdev->type < 730) { - *on_value = -1; - *off_value = -1; - return 0; - } - - ret = RecvControlMsg(GET_STATUS_CTL, LED_FORMATTER, 2); - if (ret < 0) - return ret; - *on_value = buf[0] * 100; - *off_value = buf[1] * 100; - return 0; -} - -static inline int pwc_set_contour(struct pwc_device *pdev, int contour) -{ - unsigned char buf; - int ret; - - if (contour < 0) - buf = 0xff; /* auto contour on */ - else - buf = 0x0; /* auto contour off */ - ret = SendControlMsg(SET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1); - if (ret < 0) - return ret; - - if (contour < 0) - return 0; - if (contour > 0xffff) - contour = 0xffff; - - buf = (contour >> 10); /* contour preset is [0..3f] */ - ret = SendControlMsg(SET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1); - if (ret < 0) - return ret; - return 0; -} - -static inline int pwc_get_contour(struct pwc_device *pdev, int *contour) -{ - unsigned char buf; - int ret; - - ret = RecvControlMsg(GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1); - if (ret < 0) - return ret; - - if (buf == 0) { - /* auto mode off, query current preset value */ - ret = RecvControlMsg(GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1); - if (ret < 0) - return ret; - *contour = buf << 10; - } - else - *contour = -1; - return 0; -} - - -static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight) -{ - unsigned char buf; - - if (backlight) - buf = 0xff; - else - buf = 0x0; - return SendControlMsg(SET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1); -} - -static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight) -{ - int ret; - unsigned char buf; - - ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1); - if (ret < 0) - return ret; - *backlight = buf; - return 0; -} - - -static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker) -{ - unsigned char buf; - - if (flicker) - buf = 0xff; - else - buf = 0x0; - return SendControlMsg(SET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1); -} - -static inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker) -{ - int ret; - unsigned char buf; - - ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1); - if (ret < 0) - return ret; - *flicker = buf; - return 0; -} - - -static inline int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) -{ - unsigned char buf; - - if (noise < 0) - noise = 0; - if (noise > 3) - noise = 3; - buf = noise; - return SendControlMsg(SET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1); -} - -static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) -{ - int ret; - unsigned char buf; - - ret = RecvControlMsg(GET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1); - if (ret < 0) - return ret; - *noise = buf; - return 0; -} - -int pwc_mpt_reset(struct pwc_device *pdev, int flags) -{ - unsigned char buf; - - buf = flags & 0x03; // only lower two bits are currently used - return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1); -} - -static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) -{ - unsigned char buf[4]; - - /* set new relative angle; angles are expressed in degrees * 100, - but cam as .5 degree resolution, hence devide by 200. Also - the angle must be multiplied by 64 before it's send to - the cam (??) - */ - pan = 64 * pan / 100; - tilt = -64 * tilt / 100; /* positive tilt is down, which is not what the user would expect */ - buf[0] = pan & 0xFF; - buf[1] = (pan >> 8) & 0xFF; - buf[2] = tilt & 0xFF; - buf[3] = (tilt >> 8) & 0xFF; - return SendControlMsg(SET_MPT_CTL, PT_RELATIVE_CONTROL_FORMATTER, 4); -} - -static inline int pwc_mpt_get_status(struct pwc_device *pdev, struct pwc_mpt_status *status) -{ - int ret; - unsigned char buf[5]; - - ret = RecvControlMsg(GET_MPT_CTL, PT_STATUS_FORMATTER, 5); - if (ret < 0) - return ret; - status->status = buf[0] & 0x7; // 3 bits are used for reporting - status->time_pan = (buf[1] << 8) + buf[2]; - status->time_tilt = (buf[3] << 8) + buf[4]; - return 0; -} - - -int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) -{ - unsigned char buf; - int ret = -1, request; - - if (pdev->type < 675) - request = SENSOR_TYPE_FORMATTER1; - else if (pdev->type < 730) - return -1; /* The Vesta series doesn't have this call */ - else - request = SENSOR_TYPE_FORMATTER2; - - ret = RecvControlMsg(GET_STATUS_CTL, request, 1); - if (ret < 0) - return ret; - if (pdev->type < 675) - *sensor = buf | 0x100; - else - *sensor = buf; - return 0; -} - - - /* End of Add-Ons */ - /* ************************************************* */ - -/* Linux 2.5.something and 2.6 pass direct pointers to arguments of - ioctl() calls. With 2.4, you have to do tedious copy_from_user() - and copy_to_user() calls. With these macros we circumvent this, - and let me maintain only one source file. The functionality is - exactly the same otherwise. - */ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) - -/* define local variable for arg */ -#define ARG_DEF(ARG_type, ARG_name)\ - ARG_type *ARG_name = arg; -/* copy arg to local variable */ -#define ARG_IN(ARG_name) /* nothing */ -/* argument itself (referenced) */ -#define ARGR(ARG_name) (*ARG_name) -/* argument address */ -#define ARGA(ARG_name) ARG_name -/* copy local variable to arg */ -#define ARG_OUT(ARG_name) /* nothing */ - -#else - -#define ARG_DEF(ARG_type, ARG_name)\ - ARG_type ARG_name; -#define ARG_IN(ARG_name)\ - if (copy_from_user(&ARG_name, arg, sizeof(ARG_name))) {\ - ret = -EFAULT;\ - break;\ - } -#define ARGR(ARG_name) ARG_name -#define ARGA(ARG_name) &ARG_name -#define ARG_OUT(ARG_name)\ - if (copy_to_user(arg, &ARG_name, sizeof(ARG_name))) {\ - ret = -EFAULT;\ - break;\ - } - -#endif - -int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) -{ - int ret = 0; - - switch(cmd) { - case VIDIOCPWCRUSER: - { - if (pwc_restore_user(pdev)) - ret = -EINVAL; - break; - } - - case VIDIOCPWCSUSER: - { - if (pwc_save_user(pdev)) - ret = -EINVAL; - break; - } - - case VIDIOCPWCFACTORY: - { - if (pwc_restore_factory(pdev)) - ret = -EINVAL; - break; - } - - case VIDIOCPWCSCQUAL: - { - ARG_DEF(int, qual) - - ARG_IN(qual) - if (ARGR(qual) < 0 || ARGR(qual) > 3) - ret = -EINVAL; - else - ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot); - if (ret >= 0) - pdev->vcompression = ARGR(qual); - break; - } - - case VIDIOCPWCGCQUAL: - { - ARG_DEF(int, qual) - - ARGR(qual) = pdev->vcompression; - ARG_OUT(qual) - break; - } - - case VIDIOCPWCPROBE: - { - ARG_DEF(struct pwc_probe, probe) - - strcpy(ARGR(probe).name, pdev->vdev->name); - ARGR(probe).type = pdev->type; - ARG_OUT(probe) - break; - } - - case VIDIOCPWCGSERIAL: - { - ARG_DEF(struct pwc_serial, serial) - - strcpy(ARGR(serial).serial, pdev->serial); - ARG_OUT(serial) - break; - } - - case VIDIOCPWCSAGC: - { - ARG_DEF(int, agc) - - ARG_IN(agc) - if (pwc_set_agc(pdev, ARGR(agc) < 0 ? 1 : 0, ARGR(agc))) - ret = -EINVAL; - break; - } - - case VIDIOCPWCGAGC: - { - ARG_DEF(int, agc) - - if (pwc_get_agc(pdev, ARGA(agc))) - ret = -EINVAL; - ARG_OUT(agc) - break; - } - - case VIDIOCPWCSSHUTTER: - { - ARG_DEF(int, shutter_speed) - - ARG_IN(shutter_speed) - ret = pwc_set_shutter_speed(pdev, ARGR(shutter_speed) < 0 ? 1 : 0, ARGR(shutter_speed)); - break; - } - - case VIDIOCPWCSAWB: - { - ARG_DEF(struct pwc_whitebalance, wb) - - ARG_IN(wb) - ret = pwc_set_awb(pdev, ARGR(wb).mode); - if (ret >= 0 && ARGR(wb).mode == PWC_WB_MANUAL) { - pwc_set_red_gain(pdev, ARGR(wb).manual_red); - pwc_set_blue_gain(pdev, ARGR(wb).manual_blue); - } - break; - } - - case VIDIOCPWCGAWB: - { - ARG_DEF(struct pwc_whitebalance, wb) - - memset(ARGA(wb), 0, sizeof(struct pwc_whitebalance)); - ARGR(wb).mode = pwc_get_awb(pdev); - if (ARGR(wb).mode < 0) - ret = -EINVAL; - else { - if (ARGR(wb).mode == PWC_WB_MANUAL) { - ret = pwc_get_red_gain(pdev, &ARGR(wb).manual_red); - if (ret < 0) - break; - ret = pwc_get_blue_gain(pdev, &ARGR(wb).manual_blue); - if (ret < 0) - break; - } - if (ARGR(wb).mode == PWC_WB_AUTO) { - ret = pwc_read_red_gain(pdev, &ARGR(wb).read_red); - if (ret < 0) - break; - ret =pwc_read_blue_gain(pdev, &ARGR(wb).read_blue); - if (ret < 0) - break; - } - } - ARG_OUT(wb) - break; - } - - case VIDIOCPWCSAWBSPEED: - { - ARG_DEF(struct pwc_wb_speed, wbs) - - if (ARGR(wbs).control_speed > 0) { - ret = pwc_set_wb_speed(pdev, ARGR(wbs).control_speed); - } - if (ARGR(wbs).control_delay > 0) { - ret = pwc_set_wb_delay(pdev, ARGR(wbs).control_delay); - } - break; - } - - case VIDIOCPWCGAWBSPEED: - { - ARG_DEF(struct pwc_wb_speed, wbs) - - ret = pwc_get_wb_speed(pdev, &ARGR(wbs).control_speed); - if (ret < 0) - break; - ret = pwc_get_wb_delay(pdev, &ARGR(wbs).control_delay); - if (ret < 0) - break; - ARG_OUT(wbs) - break; - } - - case VIDIOCPWCSLED: - { - ARG_DEF(struct pwc_leds, leds) - - ARG_IN(leds) - ret = pwc_set_leds(pdev, ARGR(leds).led_on, ARGR(leds).led_off); - break; - } - - - case VIDIOCPWCGLED: - { - ARG_DEF(struct pwc_leds, leds) - - ret = pwc_get_leds(pdev, &ARGR(leds).led_on, &ARGR(leds).led_off); - ARG_OUT(leds) - break; - } - - case VIDIOCPWCSCONTOUR: - { - ARG_DEF(int, contour) - - ARG_IN(contour) - ret = pwc_set_contour(pdev, ARGR(contour)); - break; - } - - case VIDIOCPWCGCONTOUR: - { - ARG_DEF(int, contour) - - ret = pwc_get_contour(pdev, ARGA(contour)); - ARG_OUT(contour) - break; - } - - case VIDIOCPWCSBACKLIGHT: - { - ARG_DEF(int, backlight) - - ARG_IN(backlight) - ret = pwc_set_backlight(pdev, ARGR(backlight)); - break; - } - - case VIDIOCPWCGBACKLIGHT: - { - ARG_DEF(int, backlight) - - ret = pwc_get_backlight(pdev, ARGA(backlight)); - ARG_OUT(backlight) - break; - } - - case VIDIOCPWCSFLICKER: - { - ARG_DEF(int, flicker) - - ARG_IN(flicker) - ret = pwc_set_flicker(pdev, ARGR(flicker)); - break; - } - - case VIDIOCPWCGFLICKER: - { - ARG_DEF(int, flicker) - - ret = pwc_get_flicker(pdev, ARGA(flicker)); - ARG_OUT(flicker) - break; - } - - case VIDIOCPWCSDYNNOISE: - { - ARG_DEF(int, dynnoise) - - ARG_IN(dynnoise) - ret = pwc_set_dynamic_noise(pdev, ARGR(dynnoise)); - break; - } - - case VIDIOCPWCGDYNNOISE: - { - ARG_DEF(int, dynnoise) - - ret = pwc_get_dynamic_noise(pdev, ARGA(dynnoise)); - ARG_OUT(dynnoise); - break; - } - - case VIDIOCPWCGREALSIZE: - { - ARG_DEF(struct pwc_imagesize, size) - - ARGR(size).width = pdev->image.x; - ARGR(size).height = pdev->image.y; - ARG_OUT(size) - break; - } - - case VIDIOCPWCMPTRESET: - { - if (pdev->features & FEATURE_MOTOR_PANTILT) - { - ARG_DEF(int, flags) - - ARG_IN(flags) - ret = pwc_mpt_reset(pdev, ARGR(flags)); - if (ret >= 0) - { - pdev->pan_angle = 0; - pdev->tilt_angle = 0; - } - } - else - { - ret = -ENXIO; - } - break; - } - - case VIDIOCPWCMPTGRANGE: - { - if (pdev->features & FEATURE_MOTOR_PANTILT) - { - ARG_DEF(struct pwc_mpt_range, range) - - ARGR(range) = pdev->angle_range; - ARG_OUT(range) - } - else - { - ret = -ENXIO; - } - break; - } - - case VIDIOCPWCMPTSANGLE: - { - int new_pan, new_tilt; - - if (pdev->features & FEATURE_MOTOR_PANTILT) - { - ARG_DEF(struct pwc_mpt_angles, angles) - - ARG_IN(angles) - /* The camera can only set relative angles, so - do some calculations when getting an absolute angle . - */ - if (ARGR(angles).absolute) - { - new_pan = ARGR(angles).pan; - new_tilt = ARGR(angles).tilt; - } - else - { - new_pan = pdev->pan_angle + ARGR(angles).pan; - new_tilt = pdev->tilt_angle + ARGR(angles).tilt; - } - /* check absolute ranges */ - if (new_pan < pdev->angle_range.pan_min || - new_pan > pdev->angle_range.pan_max || - new_tilt < pdev->angle_range.tilt_min || - new_tilt > pdev->angle_range.tilt_max) - { - ret = -ERANGE; - } - else - { - /* go to relative range, check again */ - new_pan -= pdev->pan_angle; - new_tilt -= pdev->tilt_angle; - /* angles are specified in degrees * 100, thus the limit = 36000 */ - if (new_pan < -36000 || new_pan > 36000 || new_tilt < -36000 || new_tilt > 36000) - ret = -ERANGE; - } - if (ret == 0) /* no errors so far */ - { - ret = pwc_mpt_set_angle(pdev, new_pan, new_tilt); - if (ret >= 0) - { - pdev->pan_angle += new_pan; - pdev->tilt_angle += new_tilt; - } - if (ret == -EPIPE) /* stall -> out of range */ - ret = -ERANGE; - } - } - else - { - ret = -ENXIO; - } - break; - } - - case VIDIOCPWCMPTGANGLE: - { - - if (pdev->features & FEATURE_MOTOR_PANTILT) - { - ARG_DEF(struct pwc_mpt_angles, angles) - - ARGR(angles).absolute = 1; - ARGR(angles).pan = pdev->pan_angle; - ARGR(angles).tilt = pdev->tilt_angle; - ARG_OUT(angles) - } - else - { - ret = -ENXIO; - } - break; - } - - case VIDIOCPWCMPTSTATUS: - { - if (pdev->features & FEATURE_MOTOR_PANTILT) - { - ARG_DEF(struct pwc_mpt_status, status) - - ret = pwc_mpt_get_status(pdev, ARGA(status)); - ARG_OUT(status) - } - else - { - ret = -ENXIO; - } - break; - } - - case VIDIOCPWCGVIDCMD: - { - ARG_DEF(struct pwc_video_command, cmd); - - ARGR(cmd).type = pdev->type; - ARGR(cmd).release = pdev->release; - ARGR(cmd).command_len = pdev->cmd_len; - memcpy(&ARGR(cmd).command_buf, pdev->cmd_buf, pdev->cmd_len); - ARGR(cmd).bandlength = pdev->vbandlength; - ARGR(cmd).frame_size = pdev->frame_size; - ARG_OUT(cmd) - break; - } - - default: - ret = -ENOIOCTLCMD; - break; - } - - if (ret > 0) - return 0; - return ret; -} - - - diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c --- a/drivers/usb/media/pwc-if.c 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,2191 +0,0 @@ -/* Linux driver for Philips webcam - USB and Video4Linux interface part. - (C) 1999-2004 Nemosoft Unv. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ - -/* - This code forms the interface between the USB layers and the Philips - specific stuff. Some adanved stuff of the driver falls under an - NDA, signed between me and Philips B.V., Eindhoven, the Netherlands, and - is thus not distributed in source form. The binary pwcx.o module - contains the code that falls under the NDA. - - In case you're wondering: 'pwc' stands for "Philips WebCam", but - I really didn't want to type 'philips_web_cam' every time (I'm lazy as - any Linux kernel hacker, but I don't like uncomprehensible abbreviations - without explanation). - - Oh yes, convention: to disctinguish between all the various pointers to - device-structures, I use these names for the pointer variables: - udev: struct usb_device * - vdev: struct video_device * - pdev: struct pwc_devive * -*/ - -/* Contributors: - - Alvarado: adding whitebalance code - - Alistar Moire: QuickCam 3000 Pro device/product ID - - Tony Hoyle: Creative Labs Webcam 5 device/product ID - - Mark Burazin: solving hang in VIDIOCSYNC when camera gets unplugged - - Jk Fang: Sotec Afina Eye ID - - Xavier Roche: QuickCam Pro 4000 ID - - Jens Knudsen: QuickCam Zoom ID - - J. Debert: QuickCam for Notebooks ID -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pwc.h" -#include "pwc-ioctl.h" -#include "pwc-uncompress.h" - -/* Function prototypes and driver templates */ - -/* hotplug device table support */ -static struct usb_device_id pwc_device_table [] = { - { USB_DEVICE(0x0471, 0x0302) }, /* Philips models */ - { USB_DEVICE(0x0471, 0x0303) }, - { USB_DEVICE(0x0471, 0x0304) }, - { USB_DEVICE(0x0471, 0x0307) }, - { USB_DEVICE(0x0471, 0x0308) }, - { USB_DEVICE(0x0471, 0x030C) }, - { USB_DEVICE(0x0471, 0x0310) }, - { USB_DEVICE(0x0471, 0x0311) }, - { USB_DEVICE(0x0471, 0x0312) }, - { USB_DEVICE(0x0471, 0x0313) }, /* the 'new' 720K */ - { USB_DEVICE(0x069A, 0x0001) }, /* Askey */ - { USB_DEVICE(0x046D, 0x08B0) }, /* Logitech QuickCam Pro 3000 */ - { USB_DEVICE(0x046D, 0x08B1) }, /* Logitech QuickCam Notebook Pro */ - { USB_DEVICE(0x046D, 0x08B2) }, /* Logitech QuickCam Pro 4000 */ - { USB_DEVICE(0x046D, 0x08B3) }, /* Logitech QuickCam Zoom (old model) */ - { USB_DEVICE(0x046D, 0x08B4) }, /* Logitech QuickCam Zoom (new model) */ - { USB_DEVICE(0x046D, 0x08B5) }, /* Logitech QuickCam Orbit/Sphere */ - { USB_DEVICE(0x046D, 0x08B6) }, /* Logitech (reserved) */ - { USB_DEVICE(0x046D, 0x08B7) }, /* Logitech (reserved) */ - { USB_DEVICE(0x046D, 0x08B8) }, /* Logitech (reserved) */ - { USB_DEVICE(0x055D, 0x9000) }, /* Samsung */ - { USB_DEVICE(0x055D, 0x9001) }, - { USB_DEVICE(0x041E, 0x400C) }, /* Creative Webcam 5 */ - { USB_DEVICE(0x041E, 0x4011) }, /* Creative Webcam Pro Ex */ - { USB_DEVICE(0x04CC, 0x8116) }, /* Afina Eye */ - { USB_DEVICE(0x06BE, 0x8116) }, /* new Afina Eye */ - { USB_DEVICE(0x0d81, 0x1910) }, /* Visionite */ - { USB_DEVICE(0x0d81, 0x1900) }, - { } -}; -MODULE_DEVICE_TABLE(usb, pwc_device_table); - -static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id); -static void usb_pwc_disconnect(struct usb_interface *intf); - -static struct usb_driver pwc_driver = { - .owner = THIS_MODULE, - .name = "Philips webcam", /* name */ - .id_table = pwc_device_table, - .probe = usb_pwc_probe, /* probe() */ - .disconnect = usb_pwc_disconnect, /* disconnect() */ -}; - -#define MAX_DEV_HINTS 20 -#define MAX_ISOC_ERRORS 20 - -static int default_size = PSZ_QCIF; -static int default_fps = 10; -static int default_fbufs = 3; /* Default number of frame buffers */ -static int default_mbufs = 2; /* Default number of mmap() buffers */ - int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX; -static int power_save = 0; -static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */ - int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */ -static struct { - int type; - char serial_number[30]; - int device_node; - struct pwc_device *pdev; -} device_hint[MAX_DEV_HINTS]; - -/***/ - -static int pwc_video_open(struct inode *inode, struct file *file); -static int pwc_video_close(struct inode *inode, struct file *file); -static ssize_t pwc_video_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos); -static unsigned int pwc_video_poll(struct file *file, poll_table *wait); -static int pwc_video_ioctl(struct inode *inode, struct file *file, - unsigned int ioctlnr, unsigned long arg); -static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); - -static struct file_operations pwc_fops = { - .owner = THIS_MODULE, - .open = pwc_video_open, - .release = pwc_video_close, - .read = pwc_video_read, - .poll = pwc_video_poll, - .mmap = pwc_video_mmap, - .ioctl = pwc_video_ioctl, - .llseek = no_llseek, -}; -static struct video_device pwc_template = { - .owner = THIS_MODULE, - .name = "Philips Webcam", /* Filled in later */ - .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_PWC, - .release = video_device_release, - .fops = &pwc_fops, - .minor = -1, -}; - -/***************************************************************************/ - -/* Okay, this is some magic that I worked out and the reasoning behind it... - - The biggest problem with any USB device is of course: "what to do - when the user unplugs the device while it is in use by an application?" - We have several options: - 1) Curse them with the 7 plagues when they do (requires divine intervention) - 2) Tell them not to (won't work: they'll do it anyway) - 3) Oops the kernel (this will have a negative effect on a user's uptime) - 4) Do something sensible. - - Of course, we go for option 4. - - It happens that this device will be linked to two times, once from - usb_device and once from the video_device in their respective 'private' - pointers. This is done when the device is probed() and all initialization - succeeded. The pwc_device struct links back to both structures. - - When a device is unplugged while in use it will be removed from the - list of known USB devices; I also de-register it as a V4L device, but - unfortunately I can't free the memory since the struct is still in use - by the file descriptor. This free-ing is then deferend until the first - opportunity. Crude, but it works. - - A small 'advantage' is that if a user unplugs the cam and plugs it back - in, it should get assigned the same video device minor, but unfortunately - it's non-trivial to re-link the cam back to the video device... (that - would surely be magic! :)) -*/ - -/***************************************************************************/ -/* Private functions */ - -/* Here we want the physical address of the memory. - * This is used when initializing the contents of the area. - */ -static inline unsigned long kvirt_to_pa(unsigned long adr) -{ - unsigned long kva, ret; - - kva = (unsigned long) page_address(vmalloc_to_page((void *)adr)); - kva |= adr & (PAGE_SIZE-1); /* restore the offset */ - ret = __pa(kva); - return ret; -} - -static void * rvmalloc(unsigned long size) -{ - void * mem; - unsigned long adr; - - size=PAGE_ALIGN(size); - mem=vmalloc_32(size); - if (mem) - { - memset(mem, 0, size); /* Clear the ram out, no junk to the user */ - adr=(unsigned long) mem; - while (size > 0) - { - SetPageReserved(vmalloc_to_page((void *)adr)); - adr+=PAGE_SIZE; - size-=PAGE_SIZE; - } - } - return mem; -} - -static void rvfree(void * mem, unsigned long size) -{ - unsigned long adr; - - if (mem) - { - adr=(unsigned long) mem; - while ((long) size > 0) - { - ClearPageReserved(vmalloc_to_page((void *)adr)); - adr+=PAGE_SIZE; - size-=PAGE_SIZE; - } - vfree(mem); - } -} - - - - -static int pwc_allocate_buffers(struct pwc_device *pdev) -{ - int i; - void *kbuf; - - Trace(TRACE_MEMORY, ">> pwc_allocate_buffers(pdev = 0x%p)\n", pdev); - - if (pdev == NULL) - return -ENXIO; - -#ifdef PWC_MAGIC - if (pdev->magic != PWC_MAGIC) { - Err("allocate_buffers(): magic failed.\n"); - return -ENXIO; - } -#endif - /* Allocate Isochronuous pipe buffers */ - for (i = 0; i < MAX_ISO_BUFS; i++) { - if (pdev->sbuf[i].data == NULL) { - kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL); - if (kbuf == NULL) { - Err("Failed to allocate iso buffer %d.\n", i); - return -ENOMEM; - } - Trace(TRACE_MEMORY, "Allocated iso buffer at %p.\n", kbuf); - pdev->sbuf[i].data = kbuf; - memset(kbuf, 0, ISO_BUFFER_SIZE); - } - } - - /* Allocate frame buffer structure */ - if (pdev->fbuf == NULL) { - kbuf = kmalloc(default_fbufs * sizeof(struct pwc_frame_buf), GFP_KERNEL); - if (kbuf == NULL) { - Err("Failed to allocate frame buffer structure.\n"); - return -ENOMEM; - } - Trace(TRACE_MEMORY, "Allocated frame buffer structure at %p.\n", kbuf); - pdev->fbuf = kbuf; - memset(kbuf, 0, default_fbufs * sizeof(struct pwc_frame_buf)); - } - /* create frame buffers, and make circular ring */ - for (i = 0; i < default_fbufs; i++) { - if (pdev->fbuf[i].data == NULL) { - kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */ - if (kbuf == NULL) { - Err("Failed to allocate frame buffer %d.\n", i); - return -ENOMEM; - } - Trace(TRACE_MEMORY, "Allocated frame buffer %d at %p.\n", i, kbuf); - pdev->fbuf[i].data = kbuf; - memset(kbuf, 128, PWC_FRAME_SIZE); - } - } - - /* Allocate decompressor table space */ - kbuf = NULL; - if (pdev->decompressor != NULL) { - kbuf = kmalloc(pdev->decompressor->table_size, GFP_KERNEL); - if (kbuf == NULL) { - Err("Failed to allocate decompress table.\n"); - return -ENOMEM; - } - Trace(TRACE_MEMORY, "Allocated decompress table %p.\n", kbuf); - } - pdev->decompress_data = kbuf; - - /* Allocate image buffer; double buffer for mmap() */ - kbuf = rvmalloc(default_mbufs * pdev->len_per_image); - if (kbuf == NULL) { - Err("Failed to allocate image buffer(s).\n"); - return -ENOMEM; - } - Trace(TRACE_MEMORY, "Allocated image buffer at %p.\n", kbuf); - pdev->image_data = kbuf; - for (i = 0; i < default_mbufs; i++) - pdev->image_ptr[i] = kbuf + i * pdev->len_per_image; - for (; i < MAX_IMAGES; i++) - pdev->image_ptr[i] = NULL; - - kbuf = NULL; - - Trace(TRACE_MEMORY, "<< pwc_allocate_buffers()\n"); - return 0; -} - -static void pwc_free_buffers(struct pwc_device *pdev) -{ - int i; - - Trace(TRACE_MEMORY, "Entering free_buffers(%p).\n", pdev); - - if (pdev == NULL) - return; -#ifdef PWC_MAGIC - if (pdev->magic != PWC_MAGIC) { - Err("free_buffers(): magic failed.\n"); - return; - } -#endif - - /* Release Iso-pipe buffers */ - for (i = 0; i < MAX_ISO_BUFS; i++) - if (pdev->sbuf[i].data != NULL) { - Trace(TRACE_MEMORY, "Freeing ISO buffer at %p.\n", pdev->sbuf[i].data); - kfree(pdev->sbuf[i].data); - pdev->sbuf[i].data = NULL; - } - - /* The same for frame buffers */ - if (pdev->fbuf != NULL) { - for (i = 0; i < default_fbufs; i++) { - if (pdev->fbuf[i].data != NULL) { - Trace(TRACE_MEMORY, "Freeing frame buffer %d at %p.\n", i, pdev->fbuf[i].data); - vfree(pdev->fbuf[i].data); - pdev->fbuf[i].data = NULL; - } - } - kfree(pdev->fbuf); - pdev->fbuf = NULL; - } - - /* Intermediate decompression buffer & tables */ - if (pdev->decompress_data != NULL) { - Trace(TRACE_MEMORY, "Freeing decompression buffer at %p.\n", pdev->decompress_data); - kfree(pdev->decompress_data); - pdev->decompress_data = NULL; - } - pdev->decompressor = NULL; - - /* Release image buffers */ - if (pdev->image_data != NULL) { - Trace(TRACE_MEMORY, "Freeing image buffer at %p.\n", pdev->image_data); - rvfree(pdev->image_data, default_mbufs * pdev->len_per_image); - } - pdev->image_data = NULL; - - Trace(TRACE_MEMORY, "Leaving free_buffers().\n"); -} - -/* The frame & image buffer mess. - - Yes, this is a mess. Well, it used to be simple, but alas... In this - module, 3 buffers schemes are used to get the data from the USB bus to - the user program. The first scheme involves the ISO buffers (called thus - since they transport ISO data from the USB controller), and not really - interesting. Suffices to say the data from this buffer is quickly - gathered in an interrupt handler (pwc_isoc_handler) and placed into the - frame buffer. - - The frame buffer is the second scheme, and is the central element here. - It collects the data from a single frame from the camera (hence, the - name). Frames are delimited by the USB camera with a short USB packet, - so that's easy to detect. The frame buffers form a list that is filled - by the camera+USB controller and drained by the user process through - either read() or mmap(). - - The image buffer is the third scheme, in which frames are decompressed - and converted into planar format. For mmap() there is more than - one image buffer available. - - The frame buffers provide the image buffering. In case the user process - is a bit slow, this introduces lag and some undesired side-effects. - The problem arises when the frame buffer is full. I used to drop the last - frame, which makes the data in the queue stale very quickly. But dropping - the frame at the head of the queue proved to be a litte bit more difficult. - I tried a circular linked scheme, but this introduced more problems than - it solved. - - Because filling and draining are completely asynchronous processes, this - requires some fiddling with pointers and mutexes. - - Eventually, I came up with a system with 2 lists: an 'empty' frame list - and a 'full' frame list: - * Initially, all frame buffers but one are on the 'empty' list; the one - remaining buffer is our initial fill frame. - * If a frame is needed for filling, we try to take it from the 'empty' - list, unless that list is empty, in which case we take the buffer at - the head of the 'full' list. - * When our fill buffer has been filled, it is appended to the 'full' - list. - * If a frame is needed by read() or mmap(), it is taken from the head of - the 'full' list, handled, and then appended to the 'empty' list. If no - buffer is present on the 'full' list, we wait. - The advantage is that the buffer that is currently being decompressed/ - converted, is on neither list, and thus not in our way (any other scheme - I tried had the problem of old data lingering in the queue). - - Whatever strategy you choose, it always remains a tradeoff: with more - frame buffers the chances of a missed frame are reduced. On the other - hand, on slower machines it introduces lag because the queue will - always be full. - */ - -/** - \brief Find next frame buffer to fill. Take from empty or full list, whichever comes first. - */ -static inline int pwc_next_fill_frame(struct pwc_device *pdev) -{ - int ret; - unsigned long flags; - - ret = 0; - spin_lock_irqsave(&pdev->ptrlock, flags); - if (pdev->fill_frame != NULL) { - /* append to 'full' list */ - if (pdev->full_frames == NULL) { - pdev->full_frames = pdev->fill_frame; - pdev->full_frames_tail = pdev->full_frames; - } - else { - pdev->full_frames_tail->next = pdev->fill_frame; - pdev->full_frames_tail = pdev->fill_frame; - } - } - if (pdev->empty_frames != NULL) { - /* We have empty frames available. That's easy */ - pdev->fill_frame = pdev->empty_frames; - pdev->empty_frames = pdev->empty_frames->next; - } - else { - /* Hmm. Take it from the full list */ -#if PWC_DEBUG - /* sanity check */ - if (pdev->full_frames == NULL) { - Err("Neither empty or full frames available!\n"); - spin_unlock_irqrestore(&pdev->ptrlock, flags); - return -EINVAL; - } -#endif - pdev->fill_frame = pdev->full_frames; - pdev->full_frames = pdev->full_frames->next; - ret = 1; - } - pdev->fill_frame->next = NULL; -#if PWC_DEBUG - Trace(TRACE_SEQUENCE, "Assigning sequence number %d.\n", pdev->sequence); - pdev->fill_frame->sequence = pdev->sequence++; -#endif - spin_unlock_irqrestore(&pdev->ptrlock, flags); - return ret; -} - - -/** - \brief Reset all buffers, pointers and lists, except for the image_used[] buffer. - - If the image_used[] buffer is cleared too, mmap()/VIDIOCSYNC will run into trouble. - */ -static void pwc_reset_buffers(struct pwc_device *pdev) -{ - int i; - unsigned long flags; - - spin_lock_irqsave(&pdev->ptrlock, flags); - pdev->full_frames = NULL; - pdev->full_frames_tail = NULL; - for (i = 0; i < default_fbufs; i++) { - pdev->fbuf[i].filled = 0; - if (i > 0) - pdev->fbuf[i].next = &pdev->fbuf[i - 1]; - else - pdev->fbuf->next = NULL; - } - pdev->empty_frames = &pdev->fbuf[default_fbufs - 1]; - pdev->empty_frames_tail = pdev->fbuf; - pdev->read_frame = NULL; - pdev->fill_frame = pdev->empty_frames; - pdev->empty_frames = pdev->empty_frames->next; - - pdev->image_read_pos = 0; - pdev->fill_image = 0; - spin_unlock_irqrestore(&pdev->ptrlock, flags); -} - - -/** - \brief Do all the handling for getting one frame: get pointer, decompress, advance pointers. - */ -static int pwc_handle_frame(struct pwc_device *pdev) -{ - int ret = 0; - unsigned long flags; - - spin_lock_irqsave(&pdev->ptrlock, flags); - /* First grab our read_frame; this is removed from all lists, so - we can release the lock after this without problems */ - if (pdev->read_frame != NULL) { - /* This can't theoretically happen */ - Err("Huh? Read frame still in use?\n"); - } - else { - if (pdev->full_frames == NULL) { - Err("Woops. No frames ready.\n"); - } - else { - pdev->read_frame = pdev->full_frames; - pdev->full_frames = pdev->full_frames->next; - pdev->read_frame->next = NULL; - } - - if (pdev->read_frame != NULL) { -#if PWC_DEBUG - Trace(TRACE_SEQUENCE, "Decompressing frame %d\n", pdev->read_frame->sequence); -#endif - /* Decompression is a lenghty process, so it's outside of the lock. - This gives the isoc_handler the opportunity to fill more frames - in the mean time. - */ - spin_unlock_irqrestore(&pdev->ptrlock, flags); - ret = pwc_decompress(pdev); - spin_lock_irqsave(&pdev->ptrlock, flags); - - /* We're done with read_buffer, tack it to the end of the empty buffer list */ - if (pdev->empty_frames == NULL) { - pdev->empty_frames = pdev->read_frame; - pdev->empty_frames_tail = pdev->empty_frames; - } - else { - pdev->empty_frames_tail->next = pdev->read_frame; - pdev->empty_frames_tail = pdev->read_frame; - } - pdev->read_frame = NULL; - } - } - spin_unlock_irqrestore(&pdev->ptrlock, flags); - return ret; -} - -/** - \brief Advance pointers of image buffer (after each user request) -*/ -static inline void pwc_next_image(struct pwc_device *pdev) -{ - pdev->image_used[pdev->fill_image] = 0; - pdev->fill_image = (pdev->fill_image + 1) % default_mbufs; -} - - -/* This gets called for the Isochronous pipe (video). This is done in - * interrupt time, so it has to be fast, not crash, and not stall. Neat. - */ -static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) -{ - struct pwc_device *pdev; - int i, fst, flen; - int awake; - struct pwc_frame_buf *fbuf; - unsigned char *fillptr = NULL; - unsigned char *iso_buf = NULL; - - awake = 0; - pdev = (struct pwc_device *)urb->context; - if (pdev == NULL) { - Err("isoc_handler() called with NULL device?!\n"); - return; - } -#ifdef PWC_MAGIC - if (pdev->magic != PWC_MAGIC) { - Err("isoc_handler() called with bad magic!\n"); - return; - } -#endif - if (urb->status == -ENOENT || urb->status == -ECONNRESET) { - Trace(TRACE_OPEN, "pwc_isoc_handler(): URB (%p) unlinked %ssynchronuously.\n", urb, urb->status == -ENOENT ? "" : "a"); - return; - } - if (urb->status != -EINPROGRESS && urb->status != 0) { - const char *errmsg; - - errmsg = "Unknown"; - switch(urb->status) { - case -ENOSR: errmsg = "Buffer error (overrun)"; break; - case -EPIPE: errmsg = "Stalled (device not responding)"; break; - case -EOVERFLOW: errmsg = "Babble (bad cable?)"; break; - case -EPROTO: errmsg = "Bit-stuff error (bad cable?)"; break; - case -EILSEQ: errmsg = "CRC/Timeout (could be anything)"; break; - case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break; - } - Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg); - /* Give up after a number of contiguous errors on the USB bus. - Appearantly something is wrong so we simulate an unplug event. - */ - if (++pdev->visoc_errors > MAX_ISOC_ERRORS) - { - Info("Too many ISOC errors, bailing out.\n"); - pdev->error_status = EIO; - awake = 1; - wake_up_interruptible(&pdev->frameq); - } - goto handler_end; // ugly, but practical - } - - fbuf = pdev->fill_frame; - if (fbuf == NULL) { - Err("pwc_isoc_handler without valid fill frame.\n"); - awake = 1; - goto handler_end; - } - else { - fillptr = fbuf->data + fbuf->filled; - } - - /* Reset ISOC error counter. We did get here, after all. */ - pdev->visoc_errors = 0; - - /* vsync: 0 = don't copy data - 1 = sync-hunt - 2 = synched - */ - /* Compact data */ - for (i = 0; i < urb->number_of_packets; i++) { - fst = urb->iso_frame_desc[i].status; - flen = urb->iso_frame_desc[i].actual_length; - iso_buf = urb->transfer_buffer + urb->iso_frame_desc[i].offset; - if (fst == 0) { - if (flen > 0) { /* if valid data... */ - if (pdev->vsync > 0) { /* ...and we are not sync-hunting... */ - pdev->vsync = 2; - - /* ...copy data to frame buffer, if possible */ - if (flen + fbuf->filled > pdev->frame_total_size) { - Trace(TRACE_FLOW, "Frame buffer overflow (flen = %d, frame_total_size = %d).\n", flen, pdev->frame_total_size); - pdev->vsync = 0; /* Hmm, let's wait for an EOF (end-of-frame) */ - pdev->vframes_error++; - } - else { - memmove(fillptr, iso_buf, flen); - fillptr += flen; - } - } - fbuf->filled += flen; - } /* ..flen > 0 */ - - if (flen < pdev->vlast_packet_size) { - /* Shorter packet... We probably have the end of an image-frame; - wake up read() process and let select()/poll() do something. - Decompression is done in user time over there. - */ - if (pdev->vsync == 2) { - /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus - frames on the USB wire after an exposure change. This conditition is - however detected in the cam and a bit is set in the header. - */ - if (pdev->type == 730) { - unsigned char *ptr = (unsigned char *)fbuf->data; - - if (ptr[1] == 1 && ptr[0] & 0x10) { -#if PWC_DEBUG - Debug("Hyundai CMOS sensor bug. Dropping frame %d.\n", fbuf->sequence); -#endif - pdev->drop_frames += 2; - pdev->vframes_error++; - } - if ((ptr[0] ^ pdev->vmirror) & 0x01) { - if (ptr[0] & 0x01) - Info("Snapshot button pressed.\n"); - else - Info("Snapshot button released.\n"); - } - if ((ptr[0] ^ pdev->vmirror) & 0x02) { - if (ptr[0] & 0x02) - Info("Image is mirrored.\n"); - else - Info("Image is normal.\n"); - } - pdev->vmirror = ptr[0] & 0x03; - /* Sometimes the trailer of the 730 is still sent as a 4 byte packet - after a short frame; this condition is filtered out specifically. A 4 byte - frame doesn't make sense anyway. - So we get either this sequence: - drop_bit set -> 4 byte frame -> short frame -> good frame - Or this one: - drop_bit set -> short frame -> good frame - So we drop either 3 or 2 frames in all! - */ - if (fbuf->filled == 4) - pdev->drop_frames++; - } - - /* In case we were instructed to drop the frame, do so silently. - The buffer pointers are not updated either (but the counters are reset below). - */ - if (pdev->drop_frames > 0) - pdev->drop_frames--; - else { - /* Check for underflow first */ - if (fbuf->filled < pdev->frame_total_size) { - Trace(TRACE_FLOW, "Frame buffer underflow (%d bytes); discarded.\n", fbuf->filled); - pdev->vframes_error++; - } - else { - /* Send only once per EOF */ - awake = 1; /* delay wake_ups */ - - /* Find our next frame to fill. This will always succeed, since we - * nick a frame from either empty or full list, but if we had to - * take it from the full list, it means a frame got dropped. - */ - if (pwc_next_fill_frame(pdev)) { - pdev->vframes_dumped++; - if ((pdev->vframe_count > FRAME_LOWMARK) && (pwc_trace & TRACE_FLOW)) { - if (pdev->vframes_dumped < 20) - Trace(TRACE_FLOW, "Dumping frame %d.\n", pdev->vframe_count); - if (pdev->vframes_dumped == 20) - Trace(TRACE_FLOW, "Dumping frame %d (last message).\n", pdev->vframe_count); - } - } - fbuf = pdev->fill_frame; - } - } /* !drop_frames */ - pdev->vframe_count++; - } - fbuf->filled = 0; - fillptr = fbuf->data; - pdev->vsync = 1; - } /* .. flen < last_packet_size */ - pdev->vlast_packet_size = flen; - } /* ..status == 0 */ -#if PWC_DEBUG - /* This is normally not interesting to the user, unless you are really debugging something */ - else { - static int iso_error = 0; - iso_error++; - if (iso_error < 20) - Trace(TRACE_FLOW, "Iso frame %d of USB has error %d\n", i, fst); - } -#endif - } - -handler_end: - if (awake) - wake_up_interruptible(&pdev->frameq); - - urb->dev = pdev->udev; - i = usb_submit_urb(urb, GFP_ATOMIC); - if (i != 0) - Err("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i); -} - - -static int pwc_isoc_init(struct pwc_device *pdev) -{ - struct usb_device *udev; - struct urb *urb; - int i, j, ret; - - struct usb_interface *intf; - struct usb_host_interface *idesc = NULL; - - if (pdev == NULL) - return -EFAULT; - if (pdev->iso_init) - return 0; - pdev->vsync = 0; - udev = pdev->udev; - - /* Get the current alternate interface, adjust packet size */ - if (!udev->actconfig) - return -EFAULT; - intf = usb_ifnum_to_if(udev, 0); - if (intf) - idesc = usb_altnum_to_altsetting(intf, pdev->valternate); - if (!idesc) - return -EFAULT; - - /* Search video endpoint */ - pdev->vmax_packet_size = -1; - for (i = 0; i < idesc->desc.bNumEndpoints; i++) - if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) { - pdev->vmax_packet_size = idesc->endpoint[i].desc.wMaxPacketSize; - break; - } - - if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { - Err("Failed to find packet size for video endpoint in current alternate setting.\n"); - return -ENFILE; /* Odd error, that should be noticable */ - } - - /* Set alternate interface */ - ret = 0; - Trace(TRACE_OPEN, "Setting alternate interface %d\n", pdev->valternate); - ret = usb_set_interface(pdev->udev, 0, pdev->valternate); - if (ret < 0) - return ret; - - for (i = 0; i < MAX_ISO_BUFS; i++) { - urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL); - if (urb == NULL) { - Err("Failed to allocate urb %d\n", i); - ret = -ENOMEM; - break; - } - pdev->sbuf[i].urb = urb; - Trace(TRACE_MEMORY, "Allocated URB at 0x%p\n", urb); - } - if (ret) { - /* De-allocate in reverse order */ - while (i >= 0) { - if (pdev->sbuf[i].urb != NULL) - usb_free_urb(pdev->sbuf[i].urb); - pdev->sbuf[i].urb = NULL; - i--; - } - return ret; - } - - /* init URB structure */ - for (i = 0; i < MAX_ISO_BUFS; i++) { - urb = pdev->sbuf[i].urb; - - urb->interval = 1; // devik - urb->dev = udev; - urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint); - urb->transfer_flags = URB_ISO_ASAP; - urb->transfer_buffer = pdev->sbuf[i].data; - urb->transfer_buffer_length = ISO_BUFFER_SIZE; - urb->complete = pwc_isoc_handler; - urb->context = pdev; - urb->start_frame = 0; - urb->number_of_packets = ISO_FRAMES_PER_DESC; - for (j = 0; j < ISO_FRAMES_PER_DESC; j++) { - urb->iso_frame_desc[j].offset = j * ISO_MAX_FRAME_SIZE; - urb->iso_frame_desc[j].length = pdev->vmax_packet_size; - } - } - - /* link */ - for (i = 0; i < MAX_ISO_BUFS; i++) { - ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL); - if (ret) - Err("isoc_init() submit_urb %d failed with error %d\n", i, ret); - else - Trace(TRACE_MEMORY, "URB 0x%p submitted.\n", pdev->sbuf[i].urb); - } - - /* All is done... */ - pdev->iso_init = 1; - Trace(TRACE_OPEN, "<< pwc_isoc_init()\n"); - return 0; -} - -static void pwc_isoc_cleanup(struct pwc_device *pdev) -{ - int i; - - Trace(TRACE_OPEN, ">> pwc_isoc_cleanup()\n"); - if (pdev == NULL) - return; - - /* Unlinking ISOC buffers one by one */ - for (i = 0; i < MAX_ISO_BUFS; i++) { - struct urb *urb; - - urb = pdev->sbuf[i].urb; - if (urb != 0) { - if (pdev->iso_init) { - Trace(TRACE_MEMORY, "Unlinking URB %p\n", urb); - usb_unlink_urb(urb); - } - Trace(TRACE_MEMORY, "Freeing URB\n"); - usb_free_urb(urb); - pdev->sbuf[i].urb = NULL; - } - } - - /* Stop camera, but only if we are sure the camera is still there (unplug - is signalled by EPIPE) - */ - if (pdev->error_status && pdev->error_status != EPIPE) { - Trace(TRACE_OPEN, "Setting alternate interface 0.\n"); - usb_set_interface(pdev->udev, 0, 0); - } - - pdev->iso_init = 0; - Trace(TRACE_OPEN, "<< pwc_isoc_cleanup()\n"); -} - -int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot) -{ - int ret, start; - - /* Stop isoc stuff */ - pwc_isoc_cleanup(pdev); - /* Reset parameters */ - pwc_reset_buffers(pdev); - /* Try to set video mode... */ - start = ret = pwc_set_video_mode(pdev, width, height, new_fps, new_compression, new_snapshot); - if (ret) { - Trace(TRACE_FLOW, "pwc_set_video_mode attempt 1 failed.\n"); - /* That failed... restore old mode (we know that worked) */ - start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); - if (start) { - Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n"); - } - } - if (start == 0) - { - if (pwc_isoc_init(pdev) < 0) - { - Info("Failed to restart ISOC transfers in pwc_try_video_mode.\n"); - ret = -EAGAIN; /* let's try again, who knows if it works a second time */ - } - } - pdev->drop_frames++; /* try to avoid garbage during switch */ - return ret; /* Return original error code */ -} - - -/***************************************************************************/ -/* Video4Linux functions */ - -static int pwc_video_open(struct inode *inode, struct file *file) -{ - int i; - struct video_device *vdev = video_devdata(file); - struct pwc_device *pdev; - - Trace(TRACE_OPEN, ">> video_open called(vdev = 0x%p).\n", vdev); - - pdev = (struct pwc_device *)vdev->priv; - if (pdev == NULL) - BUG(); - if (pdev->vopen) - return -EBUSY; - - down(&pdev->modlock); - if (!pdev->usb_init) { - Trace(TRACE_OPEN, "Doing first time initialization.\n"); - pdev->usb_init = 1; - - if (pwc_trace & TRACE_OPEN) - { - /* Query sensor type */ - const char *sensor_type = NULL; - int ret; - - ret = pwc_get_cmos_sensor(pdev, &i); - if (ret >= 0) - { - switch(i) { - case 0x00: sensor_type = "Hyundai CMOS sensor"; break; - case 0x20: sensor_type = "Sony CCD sensor + TDA8787"; break; - case 0x2E: sensor_type = "Sony CCD sensor + Exas 98L59"; break; - case 0x2F: sensor_type = "Sony CCD sensor + ADI 9804"; break; - case 0x30: sensor_type = "Sharp CCD sensor + TDA8787"; break; - case 0x3E: sensor_type = "Sharp CCD sensor + Exas 98L59"; break; - case 0x3F: sensor_type = "Sharp CCD sensor + ADI 9804"; break; - case 0x40: sensor_type = "UPA 1021 sensor"; break; - case 0x100: sensor_type = "VGA sensor"; break; - case 0x101: sensor_type = "PAL MR sensor"; break; - default: sensor_type = "unknown type of sensor"; break; - } - } - if (sensor_type != NULL) - Info("This %s camera is equipped with a %s (%d).\n", pdev->vdev->name, sensor_type, i); - } - } - - /* Turn on camera */ - if (power_save) { - i = pwc_camera_power(pdev, 1); - if (i < 0) - Info("Failed to restore power to the camera! (%d)\n", i); - } - /* Set LED on/off time */ - if (pwc_set_leds(pdev, led_on, led_off) < 0) - Info("Failed to set LED on/off time.\n"); - - /* Find our decompressor, if any */ - pdev->decompressor = pwc_find_decompressor(pdev->type); -#if PWC_DEBUG - Debug("Found decompressor for %d at 0x%p\n", pdev->type, pdev->decompressor); -#endif - pwc_construct(pdev); /* set min/max sizes correct */ - - /* So far, so good. Allocate memory. */ - i = pwc_allocate_buffers(pdev); - if (i < 0) { - Trace(TRACE_OPEN, "Failed to allocate buffer memory.\n"); - up(&pdev->modlock); - return i; - } - - /* Reset buffers & parameters */ - pwc_reset_buffers(pdev); - for (i = 0; i < default_mbufs; i++) - pdev->image_used[i] = 0; - pdev->vframe_count = 0; - pdev->vframes_dumped = 0; - pdev->vframes_error = 0; - pdev->visoc_errors = 0; - pdev->error_status = 0; -#if PWC_DEBUG - pdev->sequence = 0; -#endif - pwc_construct(pdev); /* set min/max sizes correct */ - - /* Set some defaults */ - pdev->vsnapshot = 0; - - /* Start iso pipe for video; first try the last used video size - (or the default one); if that fails try QCIF/10 or QSIF/10; - it that fails too, give up. - */ - i = pwc_set_video_mode(pdev, pwc_image_sizes[pdev->vsize].x, pwc_image_sizes[pdev->vsize].y, pdev->vframes, pdev->vcompression, 0); - if (i) { - Trace(TRACE_OPEN, "First attempt at set_video_mode failed.\n"); - if (pdev->type == 730 || pdev->type == 740 || pdev->type == 750) - i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QSIF].x, pwc_image_sizes[PSZ_QSIF].y, 10, pdev->vcompression, 0); - else - i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QCIF].x, pwc_image_sizes[PSZ_QCIF].y, 10, pdev->vcompression, 0); - } - if (i) { - Trace(TRACE_OPEN, "Second attempt at set_video_mode failed.\n"); - up(&pdev->modlock); - return i; - } - - i = pwc_isoc_init(pdev); - if (i) { - Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i); - up(&pdev->modlock); - return i; - } - - pdev->vopen++; - file->private_data = vdev; - /* lock decompressor; this has a small race condition, since we - could in theory unload pwcx.o between pwc_find_decompressor() - above and this call. I doubt it's ever going to be a problem. - */ - if (pdev->decompressor != NULL) - pdev->decompressor->lock(); - up(&pdev->modlock); - Trace(TRACE_OPEN, "<< video_open() returns 0.\n"); - return 0; -} - -/* Note that all cleanup is done in the reverse order as in _open */ -static int pwc_video_close(struct inode *inode, struct file *file) -{ - struct video_device *vdev = file->private_data; - struct pwc_device *pdev; - int i; - - Trace(TRACE_OPEN, ">> video_close called(vdev = 0x%p).\n", vdev); - - pdev = (struct pwc_device *)vdev->priv; - if (pdev->vopen == 0) - Info("video_close() called on closed device?\n"); - - /* Dump statistics, but only if a reasonable amount of frames were - processed (to prevent endless log-entries in case of snap-shot - programs) - */ - if (pdev->vframe_count > 20) - Info("Closing video device: %d frames received, dumped %d frames, %d frames with errors.\n", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error); - - if (pdev->decompressor != NULL) { - pdev->decompressor->exit(); - pdev->decompressor->unlock(); - pdev->decompressor = NULL; - } - - pwc_isoc_cleanup(pdev); - pwc_free_buffers(pdev); - - /* Turn off LEDS and power down camera, but only when not unplugged */ - if (pdev->error_status != EPIPE) { - /* Turn LEDs off */ - if (pwc_set_leds(pdev, 0, 0) < 0) - Info("Failed to set LED on/off time.\n"); - if (power_save) { - i = pwc_camera_power(pdev, 0); - if (i < 0) - Err("Failed to power down camera (%d)\n", i); - } - } - pdev->vopen = 0; - Trace(TRACE_OPEN, "<< video_close()\n"); - return 0; -} - -/* - * FIXME: what about two parallel reads ???? - * ANSWER: Not supported. You can't open the device more than once, - despite what the V4L1 interface says. First, I don't see - the need, second there's no mechanism of alerting the - 2nd/3rd/... process of events like changing image size. - And I don't see the point of blocking that for the - 2nd/3rd/... process. - In multi-threaded environments reading parallel from any - device is tricky anyhow. - */ - -static ssize_t pwc_video_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos) -{ - struct video_device *vdev = file->private_data; - struct pwc_device *pdev; - int noblock = file->f_flags & O_NONBLOCK; - DECLARE_WAITQUEUE(wait, current); - int bytes_to_read; - - Trace(TRACE_READ, "video_read(0x%p, %p, %zd) called.\n", vdev, buf, count); - if (vdev == NULL) - return -EFAULT; - pdev = vdev->priv; - if (pdev == NULL) - return -EFAULT; - if (pdev->error_status) - return -pdev->error_status; /* Something happened, report what. */ - - /* In case we're doing partial reads, we don't have to wait for a frame */ - if (pdev->image_read_pos == 0) { - /* Do wait queueing according to the (doc)book */ - add_wait_queue(&pdev->frameq, &wait); - while (pdev->full_frames == NULL) { - /* Check for unplugged/etc. here */ - if (pdev->error_status) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -pdev->error_status ; - } - if (noblock) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -EWOULDBLOCK; - } - if (signal_pending(current)) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -ERESTARTSYS; - } - schedule(); - set_current_state(TASK_INTERRUPTIBLE); - } - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - - /* Decompress and release frame */ - if (pwc_handle_frame(pdev)) - return -EFAULT; - } - - Trace(TRACE_READ, "Copying data to user space.\n"); - if (pdev->vpalette == VIDEO_PALETTE_RAW) - bytes_to_read = pdev->frame_size; - else - bytes_to_read = pdev->view.size; - - /* copy bytes to user space; we allow for partial reads */ - if (count + pdev->image_read_pos > bytes_to_read) - count = bytes_to_read - pdev->image_read_pos; - if (copy_to_user(buf, pdev->image_ptr[pdev->fill_image] + pdev->image_read_pos, count)) - return -EFAULT; - pdev->image_read_pos += count; - if (pdev->image_read_pos >= bytes_to_read) { /* All data has been read */ - pdev->image_read_pos = 0; - pwc_next_image(pdev); - } - return count; -} - -static unsigned int pwc_video_poll(struct file *file, poll_table *wait) -{ - struct video_device *vdev = file->private_data; - struct pwc_device *pdev; - - if (vdev == NULL) - return -EFAULT; - pdev = vdev->priv; - if (pdev == NULL) - return -EFAULT; - - poll_wait(file, &pdev->frameq, wait); - if (pdev->error_status) - return POLLERR; - if (pdev->full_frames != NULL) /* we have frames waiting */ - return (POLLIN | POLLRDNORM); - - return 0; -} - -static int pwc_video_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) -{ - struct video_device *vdev = file->private_data; - struct pwc_device *pdev; - DECLARE_WAITQUEUE(wait, current); - - if (vdev == NULL) - return -EFAULT; - pdev = vdev->priv; - if (pdev == NULL) - return -EFAULT; - - switch (cmd) { - /* Query cabapilities */ - case VIDIOCGCAP: - { - struct video_capability *caps = arg; - - strcpy(caps->name, vdev->name); - caps->type = VID_TYPE_CAPTURE; - caps->channels = 1; - caps->audios = 1; - caps->minwidth = pdev->view_min.x; - caps->minheight = pdev->view_min.y; - caps->maxwidth = pdev->view_max.x; - caps->maxheight = pdev->view_max.y; - break; - } - - /* Channel functions (simulate 1 channel) */ - case VIDIOCGCHAN: - { - struct video_channel *v = arg; - - if (v->channel != 0) - return -EINVAL; - v->flags = 0; - v->tuners = 0; - v->type = VIDEO_TYPE_CAMERA; - strcpy(v->name, "Webcam"); - return 0; - } - - case VIDIOCSCHAN: - { - /* The spec says the argument is an integer, but - the bttv driver uses a video_channel arg, which - makes sense becasue it also has the norm flag. - */ - struct video_channel *v = arg; - if (v->channel != 0) - return -EINVAL; - return 0; - } - - - /* Picture functions; contrast etc. */ - case VIDIOCGPICT: - { - struct video_picture *p = arg; - int val; - - val = pwc_get_brightness(pdev); - if (val >= 0) - p->brightness = val; - else - p->brightness = 0xffff; - val = pwc_get_contrast(pdev); - if (val >= 0) - p->contrast = val; - else - p->contrast = 0xffff; - /* Gamma, Whiteness, what's the difference? :) */ - val = pwc_get_gamma(pdev); - if (val >= 0) - p->whiteness = val; - else - p->whiteness = 0xffff; - val = pwc_get_saturation(pdev); - if (val >= 0) - p->colour = val; - else - p->colour = 0xffff; - p->depth = 24; - p->palette = pdev->vpalette; - p->hue = 0xFFFF; /* N/A */ - break; - } - - case VIDIOCSPICT: - { - struct video_picture *p = arg; - /* - * FIXME: Suppose we are mid read - ANSWER: No problem: the firmware of the camera - can handle brightness/contrast/etc - changes at _any_ time, and the palette - is used exactly once in the uncompress - routine. - */ - pwc_set_brightness(pdev, p->brightness); - pwc_set_contrast(pdev, p->contrast); - pwc_set_gamma(pdev, p->whiteness); - pwc_set_saturation(pdev, p->colour); - if (p->palette && p->palette != pdev->vpalette) { - switch (p->palette) { - case VIDEO_PALETTE_YUV420P: - case VIDEO_PALETTE_RAW: - pdev->vpalette = p->palette; - return pwc_try_video_mode(pdev, pdev->image.x, pdev->image.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); - break; - default: - return -EINVAL; - break; - } - } - break; - } - - /* Window/size parameters */ - case VIDIOCGWIN: - { - struct video_window *vw = arg; - - vw->x = 0; - vw->y = 0; - vw->width = pdev->view.x; - vw->height = pdev->view.y; - vw->chromakey = 0; - vw->flags = (pdev->vframes << PWC_FPS_SHIFT) | - (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0); - break; - } - - case VIDIOCSWIN: - { - struct video_window *vw = arg; - int fps, snapshot, ret; - - fps = (vw->flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT; - snapshot = vw->flags & PWC_FPS_SNAPSHOT; - if (fps == 0) - fps = pdev->vframes; - if (pdev->view.x == vw->width && pdev->view.y && fps == pdev->vframes && snapshot == pdev->vsnapshot) - return 0; - ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot); - if (ret) - return ret; - break; - } - - /* We don't have overlay support (yet) */ - case VIDIOCGFBUF: - { - struct video_buffer *vb = arg; - - memset(vb,0,sizeof(*vb)); - break; - } - - /* mmap() functions */ - case VIDIOCGMBUF: - { - /* Tell the user program how much memory is needed for a mmap() */ - struct video_mbuf *vm = arg; - int i; - - memset(vm, 0, sizeof(*vm)); - vm->size = default_mbufs * pdev->len_per_image; - vm->frames = default_mbufs; /* double buffering should be enough for most applications */ - for (i = 0; i < default_mbufs; i++) - vm->offsets[i] = i * pdev->len_per_image; - break; - } - - case VIDIOCMCAPTURE: - { - /* Start capture into a given image buffer (called 'frame' in video_mmap structure) */ - struct video_mmap *vm = arg; - - Trace(TRACE_READ, "VIDIOCMCAPTURE: %dx%d, frame %d, format %d\n", vm->width, vm->height, vm->frame, vm->format); - if (vm->frame < 0 || vm->frame >= default_mbufs) - return -EINVAL; - - /* xawtv is nasty. It probes the available palettes - by setting a very small image size and trying - various palettes... The driver doesn't support - such small images, so I'm working around it. - */ - if (vm->format) - { - switch (vm->format) - { - case VIDEO_PALETTE_YUV420P: - case VIDEO_PALETTE_RAW: - break; - default: - return -EINVAL; - break; - } - } - - if ((vm->width != pdev->view.x || vm->height != pdev->view.y) && - (vm->width >= pdev->view_min.x && vm->height >= pdev->view_min.y)) { - int ret; - - Trace(TRACE_OPEN, "VIDIOCMCAPTURE: changing size to please xawtv :-(.\n"); - ret = pwc_try_video_mode(pdev, vm->width, vm->height, pdev->vframes, pdev->vcompression, pdev->vsnapshot); - if (ret) - return ret; - } /* ... size mismatch */ - - /* FIXME: should we lock here? */ - if (pdev->image_used[vm->frame]) - return -EBUSY; /* buffer wasn't available. Bummer */ - pdev->image_used[vm->frame] = 1; - - /* Okay, we're done here. In the SYNC call we wait until a - frame comes available, then expand image into the given - buffer. - In contrast to the CPiA cam the Philips cams deliver a - constant stream, almost like a grabber card. Also, - we have separate buffers for the rawdata and the image, - meaning we can nearly always expand into the requested buffer. - */ - Trace(TRACE_READ, "VIDIOCMCAPTURE done.\n"); - break; - } - - case VIDIOCSYNC: - { - /* The doc says: "Whenever a buffer is used it should - call VIDIOCSYNC to free this frame up and continue." - - The only odd thing about this whole procedure is - that MCAPTURE flags the buffer as "in use", and - SYNC immediately unmarks it, while it isn't - after SYNC that you know that the buffer actually - got filled! So you better not start a CAPTURE in - the same frame immediately (use double buffering). - This is not a problem for this cam, since it has - extra intermediate buffers, but a hardware - grabber card will then overwrite the buffer - you're working on. - */ - int *mbuf = arg; - int ret; - - Trace(TRACE_READ, "VIDIOCSYNC called (%d).\n", *mbuf); - - /* bounds check */ - if (*mbuf < 0 || *mbuf >= default_mbufs) - return -EINVAL; - /* check if this buffer was requested anyway */ - if (pdev->image_used[*mbuf] == 0) - return -EINVAL; - - /* Add ourselves to the frame wait-queue. - - FIXME: needs auditing for safety. - QUESTION: In what respect? I think that using the - frameq is safe now. - */ - add_wait_queue(&pdev->frameq, &wait); - while (pdev->full_frames == NULL) { - if (pdev->error_status) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -pdev->error_status; - } - - if (signal_pending(current)) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -ERESTARTSYS; - } - schedule(); - set_current_state(TASK_INTERRUPTIBLE); - } - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - - /* The frame is ready. Expand in the image buffer - requested by the user. I don't care if you - mmap() 5 buffers and request data in this order: - buffer 4 2 3 0 1 2 3 0 4 3 1 . . . - Grabber hardware may not be so forgiving. - */ - Trace(TRACE_READ, "VIDIOCSYNC: frame ready.\n"); - pdev->fill_image = *mbuf; /* tell in which buffer we want the image to be expanded */ - /* Decompress, etc */ - ret = pwc_handle_frame(pdev); - pdev->image_used[*mbuf] = 0; - if (ret) - return -EFAULT; - break; - } - - case VIDIOCGAUDIO: - { - struct video_audio *v = arg; - - strcpy(v->name, "Microphone"); - v->audio = -1; /* unknown audio minor */ - v->flags = 0; - v->mode = VIDEO_SOUND_MONO; - v->volume = 0; - v->bass = 0; - v->treble = 0; - v->balance = 0x8000; - v->step = 1; - break; - } - - case VIDIOCSAUDIO: - { - /* Dummy: nothing can be set */ - break; - } - - case VIDIOCGUNIT: - { - struct video_unit *vu = arg; - - vu->video = pdev->vdev->minor & 0x3F; - vu->audio = -1; /* not known yet */ - vu->vbi = -1; - vu->radio = -1; - vu->teletext = -1; - break; - } - default: - return pwc_ioctl(pdev, cmd, arg); - } /* ..switch */ - return 0; -} - -static int pwc_video_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - return video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl); -} - - -static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) -{ - struct video_device *vdev = file->private_data; - struct pwc_device *pdev; - unsigned long start = vma->vm_start; - unsigned long size = vma->vm_end-vma->vm_start; - unsigned long page, pos; - - Trace(TRACE_MEMORY, "mmap(0x%p, 0x%lx, %lu) called.\n", vdev, start, size); - pdev = vdev->priv; - - pos = (unsigned long)pdev->image_data; - while (size > 0) { - page = kvirt_to_pa(pos); - if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) - return -EAGAIN; - - start += PAGE_SIZE; - pos += PAGE_SIZE; - if (size > PAGE_SIZE) - size -= PAGE_SIZE; - else - size = 0; - } - - return 0; -} - -/***************************************************************************/ -/* USB functions */ - -/* This function gets called when a new device is plugged in or the usb core - * is loaded. - */ - -static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id *id) -{ - struct usb_device *udev = interface_to_usbdev(intf); - struct pwc_device *pdev = NULL; - int vendor_id, product_id, type_id; - int i, hint; - int features = 0; - int video_nr = -1; /* default: use next available device */ - char serial_number[30], *name; - - /* Check if we can handle this device */ - Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n", - udev->descriptor.idVendor, udev->descriptor.idProduct, - intf->altsetting->desc.bInterfaceNumber); - - /* the interfaces are probed one by one. We are only interested in the - video interface (0) now. - Interface 1 is the Audio Control, and interface 2 Audio itself. - */ - if (intf->altsetting->desc.bInterfaceNumber > 0) - return -ENODEV; - - vendor_id = udev->descriptor.idVendor; - product_id = udev->descriptor.idProduct; - - if (vendor_id == 0x0471) { - switch (product_id) { - case 0x0302: - Info("Philips PCA645VC USB webcam detected.\n"); - name = "Philips 645 webcam"; - type_id = 645; - break; - case 0x0303: - Info("Philips PCA646VC USB webcam detected.\n"); - name = "Philips 646 webcam"; - type_id = 646; - break; - case 0x0304: - Info("Askey VC010 type 2 USB webcam detected.\n"); - name = "Askey VC010 webcam"; - type_id = 646; - break; - case 0x0307: - Info("Philips PCVC675K (Vesta) USB webcam detected.\n"); - name = "Philips 675 webcam"; - type_id = 675; - break; - case 0x0308: - Info("Philips PCVC680K (Vesta Pro) USB webcam detected.\n"); - name = "Philips 680 webcam"; - type_id = 680; - break; - case 0x030C: - Info("Philips PCVC690K (Vesta Pro Scan) USB webcam detected.\n"); - name = "Philips 690 webcam"; - type_id = 690; - break; - case 0x0310: - Info("Philips PCVC730K (ToUCam Fun)/PCVC830 (ToUCam II) USB webcam detected.\n"); - name = "Philips 730 webcam"; - type_id = 730; - break; - case 0x0311: - Info("Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam detected.\n"); - name = "Philips 740 webcam"; - type_id = 740; - break; - case 0x0312: - Info("Philips PCVC750K (ToUCam Pro Scan) USB webcam detected.\n"); - name = "Philips 750 webcam"; - type_id = 750; - break; - case 0x0313: - Info("Philips PCVC720K/40 (ToUCam XS) USB webcam detected.\n"); - name = "Philips 720K/40 webcam"; - type_id = 720; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x069A) { - switch(product_id) { - case 0x0001: - Info("Askey VC010 type 1 USB webcam detected.\n"); - name = "Askey VC010 webcam"; - type_id = 645; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x046d) { - switch(product_id) { - case 0x08b0: - Info("Logitech QuickCam Pro 3000 USB webcam detected.\n"); - name = "Logitech QuickCam Pro 3000"; - type_id = 740; /* CCD sensor */ - break; - case 0x08b1: - Info("Logitech QuickCam Notebook Pro USB webcam detected.\n"); - name = "Logitech QuickCam Notebook Pro"; - type_id = 740; /* CCD sensor */ - break; - case 0x08b2: - Info("Logitech QuickCam 4000 Pro USB webcam detected.\n"); - name = "Logitech QuickCam Pro 4000"; - type_id = 740; /* CCD sensor */ - break; - case 0x08b3: - Info("Logitech QuickCam Zoom USB webcam detected.\n"); - name = "Logitech QuickCam Zoom"; - type_id = 740; /* CCD sensor */ - break; - case 0x08B4: - Info("Logitech QuickCam Zoom (new model) USB webcam detected.\n"); - name = "Logitech QuickCam Zoom"; - type_id = 740; /* CCD sensor */ - break; - case 0x08b5: - Info("Logitech QuickCam Orbit/Sphere USB webcam detected.\n"); - name = "Logitech QuickCam Orbit"; - type_id = 740; /* CCD sensor */ - features |= FEATURE_MOTOR_PANTILT; - break; - case 0x08b6: - case 0x08b7: - case 0x08b8: - Info("Logitech QuickCam detected (reserved ID).\n"); - name = "Logitech QuickCam (res.)"; - type_id = 730; /* Assuming CMOS */ - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x055d) { - /* I don't know the difference between the C10 and the C30; - I suppose the difference is the sensor, but both cameras - work equally well with a type_id of 675 - */ - switch(product_id) { - case 0x9000: - Info("Samsung MPC-C10 USB webcam detected.\n"); - name = "Samsung MPC-C10"; - type_id = 675; - break; - case 0x9001: - Info("Samsung MPC-C30 USB webcam detected.\n"); - name = "Samsung MPC-C30"; - type_id = 675; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x041e) { - switch(product_id) { - case 0x400c: - Info("Creative Labs Webcam 5 detected.\n"); - name = "Creative Labs Webcam 5"; - type_id = 730; - break; - case 0x4011: - Info("Creative Labs Webcam Pro Ex detected.\n"); - name = "Creative Labs Webcam Pro Ex"; - type_id = 740; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x04cc) { - switch(product_id) { - case 0x8116: - Info("Sotec Afina Eye USB webcam detected.\n"); - name = "Sotec Afina Eye"; - type_id = 730; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x06be) { - switch(product_id) { - case 0x8116: - /* Basicly the same as the Sotec Afina Eye */ - Info("AME CU-001 USB webcam detected.\n"); - name = "AME CU-001"; - type_id = 730; - break; - default: - return -ENODEV; - break; - } - } - else if (vendor_id == 0x06be) { - switch(product_id) { - case 0x8116: - /* This is essentially the same cam as the Sotec Afina Eye */ - Info("AME Co. Afina Eye USB webcam detected.\n"); - name = "AME Co. Afina Eye"; - type_id = 750; - break; - default: - return -ENODEV; - break; - } - - } - else if (vendor_id == 0x0d81) { - switch(product_id) { - case 0x1900: - Info("Visionite VCS-UC300 USB webcam detected.\n"); - name = "Visionite VCS-UC300"; - type_id = 740; /* CCD sensor */ - break; - case 0x1910: - Info("Visionite VCS-UM100 USB webcam detected.\n"); - name = "Visionite VCS-UM100"; - type_id = 730; /* CMOS sensor */ - break; - default: - return -ENODEV; - break; - } - } - else - return -ENODEV; /* Not any of the know types; but the list keeps growing. */ - - memset(serial_number, 0, 30); - usb_string(udev, udev->descriptor.iSerialNumber, serial_number, 29); - Trace(TRACE_PROBE, "Device serial number is %s\n", serial_number); - - if (udev->descriptor.bNumConfigurations > 1) - Info("Warning: more than 1 configuration available.\n"); - - /* Allocate structure, initialize pointers, mutexes, etc. and link it to the usb_device */ - pdev = kmalloc(sizeof(struct pwc_device), GFP_KERNEL); - if (pdev == NULL) { - Err("Oops, could not allocate memory for pwc_device.\n"); - return -ENOMEM; - } - memset(pdev, 0, sizeof(struct pwc_device)); - pdev->type = type_id; - pdev->vsize = default_size; - pdev->vframes = default_fps; - strcpy(pdev->serial, serial_number); - pdev->features = features; - if (vendor_id == 0x046D && product_id == 0x08B5) - { - /* Logitech QuickCam Orbit - The ranges have been determined experimentally; they may differ from cam to cam. - Also, the exact ranges left-right and up-down are different for my cam - */ - pdev->angle_range.pan_min = -7000; - pdev->angle_range.pan_max = 7000; - pdev->angle_range.tilt_min = -3000; - pdev->angle_range.tilt_max = 2500; - } - - init_MUTEX(&pdev->modlock); - pdev->ptrlock = SPIN_LOCK_UNLOCKED; - - pdev->udev = udev; - init_waitqueue_head(&pdev->frameq); - pdev->vcompression = pwc_preferred_compression; - - /* Allocate video_device structure */ - pdev->vdev = video_device_alloc(); - if (pdev->vdev == 0) - { - Err("Err, cannot allocate video_device struture. Failing probe."); - kfree(pdev); - return -ENOMEM; - } - memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template)); - strcpy(pdev->vdev->name, name); - pdev->vdev->owner = THIS_MODULE; - video_set_drvdata(pdev->vdev, pdev); - - pdev->release = udev->descriptor.bcdDevice; - Trace(TRACE_PROBE, "Release: %04x\n", pdev->release); - - /* Now search device_hint[] table for a match, so we can hint a node number. */ - for (hint = 0; hint < MAX_DEV_HINTS; hint++) { - if (((device_hint[hint].type == -1) || (device_hint[hint].type == pdev->type)) && - (device_hint[hint].pdev == NULL)) { - /* so far, so good... try serial number */ - if ((device_hint[hint].serial_number[0] == '*') || !strcmp(device_hint[hint].serial_number, serial_number)) { - /* match! */ - video_nr = device_hint[hint].device_node; - Trace(TRACE_PROBE, "Found hint, will try to register as /dev/video%d\n", video_nr); - break; - } - } - } - - pdev->vdev->release = video_device_release; - i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr); - if (i < 0) { - Err("Failed to register as video device (%d).\n", i); - video_device_release(pdev->vdev); /* Drip... drip... drip... */ - kfree(pdev); /* Oops, no memory leaks please */ - return -EIO; - } - else { - Info("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F); - } - - /* occupy slot */ - if (hint < MAX_DEV_HINTS) - device_hint[hint].pdev = pdev; - - Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev); - usb_set_intfdata (intf, pdev); - return 0; -} - -/* The user janked out the cable... */ -static void usb_pwc_disconnect(struct usb_interface *intf) -{ - struct pwc_device *pdev; - int hint; - - lock_kernel(); - pdev = usb_get_intfdata (intf); - usb_set_intfdata (intf, NULL); - if (pdev == NULL) { - Err("pwc_disconnect() Called without private pointer.\n"); - goto disconnect_out; - } - if (pdev->udev == NULL) { - Err("pwc_disconnect() already called for %p\n", pdev); - goto disconnect_out; - } - if (pdev->udev != interface_to_usbdev(intf)) { - Err("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n"); - goto disconnect_out; - } -#ifdef PWC_MAGIC - if (pdev->magic != PWC_MAGIC) { - Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n"); - goto disconnect_out; - } -#endif - - /* We got unplugged; this is signalled by an EPIPE error code */ - if (pdev->vopen) { - Info("Disconnected while webcam is in use!\n"); - pdev->error_status = EPIPE; - } - - /* Alert waiting processes */ - wake_up_interruptible(&pdev->frameq); - /* Wait until device is closed */ - while (pdev->vopen) - schedule(); - /* Device is now closed, so we can safely unregister it */ - Trace(TRACE_PROBE, "Unregistering video device in disconnect().\n"); - video_unregister_device(pdev->vdev); - - /* Free memory (don't set pdev to 0 just yet) */ - kfree(pdev); - -disconnect_out: - /* search device_hint[] table if we occupy a slot, by any chance */ - for (hint = 0; hint < MAX_DEV_HINTS; hint++) - if (device_hint[hint].pdev == pdev) - device_hint[hint].pdev = NULL; - - unlock_kernel(); -} - - -/* *grunt* We have to do atoi ourselves :-( */ -static int pwc_atoi(const char *s) -{ - int k = 0; - - k = 0; - while (*s != '\0' && *s >= '0' && *s <= '9') { - k = 10 * k + (*s - '0'); - s++; - } - return k; -} - - -/* - * Initialization code & module stuff - */ - -static char size[PSZ_MAX]; -static int fps = 0; -static int fbufs = 0; -static int mbufs = 0; -static int trace = -1; -static int compression = -1; -static char *dev_hint[MAX_DEV_HINTS] = { }; - -module_param_string(size, size, PSZ_MAX, 0); -MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); -module_param(fps, int, 0); -MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); -module_param(fbufs, int, 0); -MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); -module_param(mbufs, int, 0); -MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); -module_param(trace, int, 0); -MODULE_PARM_DESC(trace, "For debugging purposes"); -module_param(power_save, int, 0); -MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); -module_param(compression, int, 0); -MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); -module_param(led_on, int, 0); -MODULE_PARM_DESC(led_on, "LED on time in milliseconds"); -module_param(led_off, int, 0); -MODULE_PARM_DESC(led_off, "LED off time in milliseconds"); -/* Commented out, as you should be using udev instead of crud like this... */ -/* MODULE_PARM(dev_hint, "0-20s"); */ -/* MODULE_PARM_DESC(dev_hint, "Device node hints"); */ - -MODULE_DESCRIPTION("Philips & OEM USB webcam driver"); -MODULE_AUTHOR("Nemosoft Unv. "); -MODULE_LICENSE("GPL"); - -static int __init usb_pwc_init(void) -{ - int i, sz; - char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" }; - - Info("Philips webcam module version " PWC_VERSION " loaded.\n"); - Info("Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.\n"); - Info("Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,\n"); - Info("the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n"); - - if (fps) { - if (fps < 4 || fps > 30) { - Err("Framerate out of bounds (4-30).\n"); - return -EINVAL; - } - default_fps = fps; - Info("Default framerate set to %d.\n", default_fps); - } - - if (strlen(size)) { - /* string; try matching with array */ - for (sz = 0; sz < PSZ_MAX; sz++) { - if (!strcmp(sizenames[sz], size)) { /* Found! */ - default_size = sz; - break; - } - } - if (sz == PSZ_MAX) { - Err("Size not recognized; try size=[sqcif | qsif | qcif | sif | cif | vga].\n"); - return -EINVAL; - } - Info("Default image size set to %s [%dx%d].\n", sizenames[default_size], pwc_image_sizes[default_size].x, pwc_image_sizes[default_size].y); - } - if (mbufs) { - if (mbufs < 1 || mbufs > MAX_IMAGES) { - Err("Illegal number of mmap() buffers; use a number between 1 and %d.\n", MAX_IMAGES); - return -EINVAL; - } - default_mbufs = mbufs; - Info("Number of image buffers set to %d.\n", default_mbufs); - } - if (fbufs) { - if (fbufs < 2 || fbufs > MAX_FRAMES) { - Err("Illegal number of frame buffers; use a number between 2 and %d.\n", MAX_FRAMES); - return -EINVAL; - } - default_fbufs = fbufs; - Info("Number of frame buffers set to %d.\n", default_fbufs); - } - if (trace >= 0) { - Info("Trace options: 0x%04x\n", trace); - pwc_trace = trace; - } - if (compression >= 0) { - if (compression > 3) { - Err("Invalid compression setting; use a number between 0 (uncompressed) and 3 (high).\n"); - return -EINVAL; - } - pwc_preferred_compression = compression; - Info("Preferred compression set to %d.\n", pwc_preferred_compression); - } - if (power_save) - Info("Enabling power save on open/close.\n"); - - /* Big device node whoopla. Basicly, it allows you to assign a - device node (/dev/videoX) to a camera, based on its type - & serial number. The format is [type[.serialnumber]:]node. - - Any camera that isn't matched by these rules gets the next - available free device node. - */ - for (i = 0; i < MAX_DEV_HINTS; i++) { - char *s, *colon, *dot; - - /* This loop also initializes the array */ - device_hint[i].pdev = NULL; - s = dev_hint[i]; - if (s != NULL && *s != '\0') { - device_hint[i].type = -1; /* wildcard */ - strcpy(device_hint[i].serial_number, "*"); - - /* parse string: chop at ':' & '/' */ - colon = dot = s; - while (*colon != '\0' && *colon != ':') - colon++; - while (*dot != '\0' && *dot != '.') - dot++; - /* Few sanity checks */ - if (*dot != '\0' && dot > colon) { - Err("Malformed camera hint: the colon must be after the dot.\n"); - return -EINVAL; - } - - if (*colon == '\0') { - /* No colon */ - if (*dot != '\0') { - Err("Malformed camera hint: no colon + device node given.\n"); - return -EINVAL; - } - else { - /* No type or serial number specified, just a number. */ - device_hint[i].device_node = pwc_atoi(s); - } - } - else { - /* There's a colon, so we have at least a type and a device node */ - device_hint[i].type = pwc_atoi(s); - device_hint[i].device_node = pwc_atoi(colon + 1); - if (*dot != '\0') { - /* There's a serial number as well */ - int k; - - dot++; - k = 0; - while (*dot != ':' && k < 29) { - device_hint[i].serial_number[k++] = *dot; - dot++; - } - device_hint[i].serial_number[k] = '\0'; - } - } -#if PWC_DEBUG - Debug("device_hint[%d]:\n", i); - Debug(" type : %d\n", device_hint[i].type); - Debug(" serial# : %s\n", device_hint[i].serial_number); - Debug(" node : %d\n", device_hint[i].device_node); -#endif - } - else - device_hint[i].type = 0; /* not filled */ - } /* ..for MAX_DEV_HINTS */ - - Trace(TRACE_PROBE, "Registering driver at address 0x%p.\n", &pwc_driver); - return usb_register(&pwc_driver); -} - -static void __exit usb_pwc_exit(void) -{ - Trace(TRACE_MODULE, "Deregistering driver.\n"); - usb_deregister(&pwc_driver); - Info("Philips webcam module removed.\n"); -} - -module_init(usb_pwc_init); -module_exit(usb_pwc_exit); - diff -Nru a/drivers/usb/media/pwc-ioctl.h b/drivers/usb/media/pwc-ioctl.h --- a/drivers/usb/media/pwc-ioctl.h 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,279 +0,0 @@ -#ifndef PWC_IOCTL_H -#define PWC_IOCTL_H - -/* (C) 2001-2004 Nemosoft Unv. webcam@smcc.demon.nl - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* This is pwc-ioctl.h belonging to PWC 8.12.1 - It contains structures and defines to communicate from user space - directly to the driver. - */ - -/* - Changes - 2001/08/03 Alvarado Added ioctl constants to access methods for - changing white balance and red/blue gains - 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE - 2003/12/13 Nemosft Unv. Some modifications to make interfacing to - PWCX easier - */ - -/* These are private ioctl() commands, specific for the Philips webcams. - They contain functions not found in other webcams, and settings not - specified in the Video4Linux API. - - The #define names are built up like follows: - VIDIOC VIDeo IOCtl prefix - PWC Philps WebCam - G optional: Get - S optional: Set - ... the function - */ - - - /* Enumeration of image sizes */ -#define PSZ_SQCIF 0x00 -#define PSZ_QSIF 0x01 -#define PSZ_QCIF 0x02 -#define PSZ_SIF 0x03 -#define PSZ_CIF 0x04 -#define PSZ_VGA 0x05 -#define PSZ_MAX 6 - - -/* The frame rate is encoded in the video_window.flags parameter using - the upper 16 bits, since some flags are defined nowadays. The following - defines provide a mask and shift to filter out this value. - - In 'Snapshot' mode the camera freezes its automatic exposure and colour - balance controls. - */ -#define PWC_FPS_SHIFT 16 -#define PWC_FPS_MASK 0x00FF0000 -#define PWC_FPS_FRMASK 0x003F0000 -#define PWC_FPS_SNAPSHOT 0x00400000 - - -/* structure for transfering x & y coordinates */ -struct pwc_coord -{ - int x, y; /* guess what */ - int size; /* size, or offset */ -}; - - -/* Used with VIDIOCPWCPROBE */ -struct pwc_probe -{ - char name[32]; - int type; -}; - -struct pwc_serial -{ - char serial[30]; /* String with serial number. Contains terminating 0 */ -}; - -/* pwc_whitebalance.mode values */ -#define PWC_WB_INDOOR 0 -#define PWC_WB_OUTDOOR 1 -#define PWC_WB_FL 2 -#define PWC_WB_MANUAL 3 -#define PWC_WB_AUTO 4 - -/* Used with VIDIOCPWC[SG]AWB (Auto White Balance). - Set mode to one of the PWC_WB_* values above. - *red and *blue are the respective gains of these colour components inside - the camera; range 0..65535 - When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; - otherwise undefined. - 'read_red' and 'read_blue' are read-only. -*/ -struct pwc_whitebalance -{ - int mode; - int manual_red, manual_blue; /* R/W */ - int read_red, read_blue; /* R/O */ -}; - -/* - 'control_speed' and 'control_delay' are used in automatic whitebalance mode, - and tell the camera how fast it should react to changes in lighting, and - with how much delay. Valid values are 0..65535. -*/ -struct pwc_wb_speed -{ - int control_speed; - int control_delay; - -}; - -/* Used with VIDIOCPWC[SG]LED */ -struct pwc_leds -{ - int led_on; /* Led on-time; range = 0..25000 */ - int led_off; /* Led off-time; range = 0..25000 */ -}; - -/* Image size (used with GREALSIZE) */ -struct pwc_imagesize -{ - int width; - int height; -}; - -/* Defines and structures for Motorized Pan & Tilt */ -#define PWC_MPT_PAN 0x01 -#define PWC_MPT_TILT 0x02 -#define PWC_MPT_TIMEOUT 0x04 /* for status */ - -/* Set angles; when absolute != 0, the angle is absolute and the - driver calculates the relative offset for you. This can only - be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns - absolute angles. - */ -struct pwc_mpt_angles -{ - int absolute; /* write-only */ - int pan; /* degrees * 100 */ - int tilt; /* degress * 100 */ -}; - -/* Range of angles of the camera, both horizontally and vertically. - */ -struct pwc_mpt_range -{ - int pan_min, pan_max; /* degrees * 100 */ - int tilt_min, tilt_max; -}; - -struct pwc_mpt_status -{ - int status; - int time_pan; - int time_tilt; -}; - - -/* This is used for out-of-kernel decompression. With it, you can get - all the necessary information to initialize and use the decompressor - routines in standalone applications. - */ -struct pwc_video_command -{ - int type; /* camera type (645, 675, 730, etc.) */ - int release; /* release number */ - - int size; /* one of PSZ_* */ - int alternate; - int command_len; /* length of USB video command */ - unsigned char command_buf[13]; /* Actual USB video command */ - int bandlength; /* >0 = compressed */ - int frame_size; /* Size of one (un)compressed frame */ -}; - -/* Flags for PWCX subroutines. Not all modules honour all flags. */ -#define PWCX_FLAG_PLANAR 0x0001 -#define PWCX_FLAG_BAYER 0x0008 - - -/* IOCTL definitions */ - - /* Restore user settings */ -#define VIDIOCPWCRUSER _IO('v', 192) - /* Save user settings */ -#define VIDIOCPWCSUSER _IO('v', 193) - /* Restore factory settings */ -#define VIDIOCPWCFACTORY _IO('v', 194) - - /* You can manipulate the compression factor. A compression preference of 0 - means use uncompressed modes when available; 1 is low compression, 2 is - medium and 3 is high compression preferred. Of course, the higher the - compression, the lower the bandwidth used but more chance of artefacts - in the image. The driver automatically chooses a higher compression when - the preferred mode is not available. - */ - /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ -#define VIDIOCPWCSCQUAL _IOW('v', 195, int) - /* Get preferred compression quality */ -#define VIDIOCPWCGCQUAL _IOR('v', 195, int) - - -/* Retrieve serial number of camera */ -#define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) - - /* This is a probe function; since so many devices are supported, it - becomes difficult to include all the names in programs that want to - check for the enhanced Philips stuff. So in stead, try this PROBE; - it returns a structure with the original name, and the corresponding - Philips type. - To use, fill the structure with zeroes, call PROBE and if that succeeds, - compare the name with that returned from VIDIOCGCAP; they should be the - same. If so, you can be assured it is a Philips (OEM) cam and the type - is valid. - */ -#define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) - - /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ -#define VIDIOCPWCSAGC _IOW('v', 200, int) - /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCGAGC _IOR('v', 200, int) - /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCSSHUTTER _IOW('v', 201, int) - - /* Color compensation (Auto White Balance) */ -#define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) -#define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) - - /* Auto WB speed */ -#define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) -#define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) - - /* LEDs on/off/blink; int range 0..65535 */ -#define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) -#define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) - - /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ -#define VIDIOCPWCSCONTOUR _IOW('v', 206, int) -#define VIDIOCPWCGCONTOUR _IOR('v', 206, int) - - /* Backlight compensation; 0 = off, otherwise on */ -#define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) -#define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) - - /* Flickerless mode; = 0 off, otherwise on */ -#define VIDIOCPWCSFLICKER _IOW('v', 208, int) -#define VIDIOCPWCGFLICKER _IOR('v', 208, int) - - /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ -#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) -#define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) - - /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ -#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) - - /* Motorized pan & tilt functions */ -#define VIDIOCPWCMPTRESET _IOW('v', 211, int) -#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) -#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) - - /* Get the USB set-video command; needed for initializing libpwcx */ -#define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) - -#endif diff -Nru a/drivers/usb/media/pwc-misc.c b/drivers/usb/media/pwc-misc.c --- a/drivers/usb/media/pwc-misc.c 2004-09-06 16:37:52 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,146 +0,0 @@ -/* Linux driver for Philips webcam - Various miscellaneous functions and tables. - (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include - -#include "pwc.h" - -struct pwc_coord pwc_image_sizes[PSZ_MAX] = -{ - { 128, 96, 0 }, - { 160, 120, 0 }, - { 176, 144, 0 }, - { 320, 240, 0 }, - { 352, 288, 0 }, - { 640, 480, 0 }, -}; - -/* x,y -> PSZ_ */ -int pwc_decode_size(struct pwc_device *pdev, int width, int height) -{ - int i, find; - - /* Make sure we don't go beyond our max size. - NB: we have different limits for RAW and normal modes. In case - you don't have the decompressor loaded or use RAW mode, - the maximum viewable size is smaller. - */ - if (pdev->vpalette == VIDEO_PALETTE_RAW) - { - if (width > pdev->abs_max.x || height > pdev->abs_max.y) - { - Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n"); - return -1; - } - } - else - { - if (width > pdev->view_max.x || height > pdev->view_max.y) - { - Debug("VIDEO_PALETTE_ not RAW: going beyond view_max.\n"); - return -1; - } - } - - /* Find the largest size supported by the camera that fits into the - requested size. - */ - find = -1; - for (i = 0; i < PSZ_MAX; i++) { - if (pdev->image_mask & (1 << i)) { - if (pwc_image_sizes[i].x <= width && pwc_image_sizes[i].y <= height) - find = i; - } - } - return find; -} - -/* initialize variables depending on type and decompressor*/ -void pwc_construct(struct pwc_device *pdev) -{ - switch(pdev->type) { - case 645: - case 646: - pdev->view_min.x = 128; - pdev->view_min.y = 96; - pdev->view_max.x = 352; - pdev->view_max.y = 288; - pdev->abs_max.x = 352; - pdev->abs_max.y = 288; - pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF; - pdev->vcinterface = 2; - pdev->vendpoint = 4; - pdev->frame_header_size = 0; - pdev->frame_trailer_size = 0; - break; - case 675: - case 680: - case 690: - pdev->view_min.x = 128; - pdev->view_min.y = 96; - /* Anthill bug #38: PWC always reports max size, even without PWCX */ - if (pdev->decompressor != NULL) { - pdev->view_max.x = 640; - pdev->view_max.y = 480; - } - else { - pdev->view_max.x = 352; - pdev->view_max.y = 288; - } - pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA; - pdev->abs_max.x = 640; - pdev->abs_max.y = 480; - pdev->vcinterface = 3; - pdev->vendpoint = 4; - pdev->frame_header_size = 0; - pdev->frame_trailer_size = 0; - break; - case 720: - case 730: - case 740: - case 750: - pdev->view_min.x = 160; - pdev->view_min.y = 120; - /* Anthill bug #38: PWC always reports max size, even without PWCX */ - if (pdev->decompressor != NULL) { - pdev->view_max.x = 640; - pdev->view_max.y = 480; - } - else { - /* We use CIF, not SIF since some tools really need CIF. So we cheat a bit. */ - pdev->view_max.x = 352; - pdev->view_max.y = 288; - } - pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA; - pdev->abs_max.x = 640; - pdev->abs_max.y = 480; - pdev->vcinterface = 3; - pdev->vendpoint = 5; - pdev->frame_header_size = TOUCAM_HEADER_SIZE; - pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE; - break; - } - pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */ - pdev->view_min.size = pdev->view_min.x * pdev->view_min.y; - pdev->view_max.size = pdev->view_max.x * pdev->view_max.y; - /* length of image, in YUV format; always allocate enough memory. */ - pdev->len_per_image = (pdev->abs_max.x * pdev->abs_max.y * 3) / 2; -} - - diff -Nru a/drivers/usb/media/pwc-uncompress.c b/drivers/usb/media/pwc-uncompress.c --- a/drivers/usb/media/pwc-uncompress.c 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,180 +0,0 @@ -/* Linux driver for Philips webcam - Decompression frontend. - (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* - This is where the decompression routines register and unregister - themselves. It also has a decompressor wrapper function. -*/ - -#include -#include -// #include - -#include "pwc.h" -#include "pwc-uncompress.h" - - -/* This contains a list of all registered decompressors */ -static LIST_HEAD(pwc_decompressor_list); - -/* Should the pwc_decompress structure ever change, we increase the - version number so that we don't get nasty surprises, or can - dynamically adjust our structure. - */ -const int pwc_decompressor_version = PWC_MAJOR; - -/* Add decompressor to list, ignoring duplicates */ -void pwc_register_decompressor(struct pwc_decompressor *pwcd) -{ - if (pwc_find_decompressor(pwcd->type) == NULL) { - Trace(TRACE_PWCX, "Adding decompressor for model %d.\n", pwcd->type); - list_add_tail(&pwcd->pwcd_list, &pwc_decompressor_list); - } -} - -/* Remove decompressor from list */ -void pwc_unregister_decompressor(int type) -{ - struct pwc_decompressor *find; - - find = pwc_find_decompressor(type); - if (find != NULL) { - Trace(TRACE_PWCX, "Removing decompressor for model %d.\n", type); - list_del(&find->pwcd_list); - } -} - -/* Find decompressor in list */ -struct pwc_decompressor *pwc_find_decompressor(int type) -{ - struct list_head *tmp; - struct pwc_decompressor *pwcd; - - list_for_each(tmp, &pwc_decompressor_list) { - pwcd = list_entry(tmp, struct pwc_decompressor, pwcd_list); - if (pwcd->type == type) - return pwcd; - } - return NULL; -} - - - -int pwc_decompress(struct pwc_device *pdev) -{ - struct pwc_frame_buf *fbuf; - int n, line, col, stride; - void *yuv, *image; - u16 *src; - u16 *dsty, *dstu, *dstv; - - if (pdev == NULL) - return -EFAULT; -#if defined(__KERNEL__) && defined(PWC_MAGIC) - if (pdev->magic != PWC_MAGIC) { - Err("pwc_decompress(): magic failed.\n"); - return -EFAULT; - } -#endif - - fbuf = pdev->read_frame; - if (fbuf == NULL) - return -EFAULT; - image = pdev->image_ptr[pdev->fill_image]; - if (!image) - return -EFAULT; - - yuv = fbuf->data + pdev->frame_header_size; /* Skip header */ - - /* Raw format; that's easy... */ - if (pdev->vpalette == VIDEO_PALETTE_RAW) - { - memcpy(image, yuv, pdev->frame_size); - return 0; - } - - if (pdev->vbandlength == 0) { - /* Uncompressed mode. We copy the data into the output buffer, - using the viewport size (which may be larger than the image - size). Unfortunately we have to do a bit of byte stuffing - to get the desired output format/size. - */ - /* - * We do some byte shuffling here to go from the - * native format to YUV420P. - */ - src = (u16 *)yuv; - n = pdev->view.x * pdev->view.y; - - /* offset in Y plane */ - stride = pdev->view.x * pdev->offset.y + pdev->offset.x; - dsty = (u16 *)(image + stride); - - /* offsets in U/V planes */ - stride = pdev->view.x * pdev->offset.y / 4 + pdev->offset.x / 2; - dstu = (u16 *)(image + n + stride); - dstv = (u16 *)(image + n + n / 4 + stride); - - /* increment after each line */ - stride = (pdev->view.x - pdev->image.x) / 2; /* u16 is 2 bytes */ - - for (line = 0; line < pdev->image.y; line++) { - for (col = 0; col < pdev->image.x; col += 4) { - *dsty++ = *src++; - *dsty++ = *src++; - if (line & 1) - *dstv++ = *src++; - else - *dstu++ = *src++; - } - dsty += stride; - if (line & 1) - dstv += (stride >> 1); - else - dstu += (stride >> 1); - } - } - else { - /* Compressed; the decompressor routines will write the data - in planar format immediately. - */ - int flags; - - flags = PWCX_FLAG_PLANAR; - if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot) - flags |= PWCX_FLAG_BAYER; - - if (pdev->decompressor) - pdev->decompressor->decompress( - &pdev->image, &pdev->view, &pdev->offset, - yuv, image, - flags, - pdev->decompress_data, pdev->vbandlength); - else - return -ENXIO; /* No such device or address: missing decompressor */ - } - return 0; -} - -/* Make sure these functions are available for the decompressor plugin - both when this code is compiled into the kernel or as as module. - */ - -EXPORT_SYMBOL_NOVERS(pwc_decompressor_version); -EXPORT_SYMBOL(pwc_register_decompressor); -EXPORT_SYMBOL(pwc_unregister_decompressor); diff -Nru a/drivers/usb/media/pwc-uncompress.h b/drivers/usb/media/pwc-uncompress.h --- a/drivers/usb/media/pwc-uncompress.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,84 +0,0 @@ -/* (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* This file is the bridge between the kernel module and the plugin; it - describes the structures and datatypes used in both modules. Any - significant change should be reflected by increasing the - pwc_decompressor_version major number. - */ -#ifndef PWC_UNCOMPRESS_H -#define PWC_UNCOMPRESS_H - -#include -#include -#include - -#include "pwc-ioctl.h" - -/* from pwc-dec.h */ -#define PWCX_FLAG_PLANAR 0x0001 -/* */ - - -#ifdef __cplusplus -extern "C" { -#endif - -/* The decompressor structure. - Every type of decompressor registers itself with the main module. - When a device is opened, it looks up the correct compressor, and - uses that when a compressed video mode is requested. - */ -struct pwc_decompressor -{ - int type; /* type of camera (645, 680, etc) */ - int table_size; /* memory needed */ - - void (* init)(int type, int release, void *buffer, void *table); /* Initialization routine; should be called after each set_video_mode */ - void (* exit)(void); /* Cleanup routine */ - void (* decompress)(struct pwc_coord *image, struct pwc_coord *view, - struct pwc_coord *offset, - void *src, void *dst, int flags, - void *table, int bandlength); - void (* lock)(void); /* make sure module cannot be unloaded */ - void (* unlock)(void); /* release lock on module */ - - struct list_head pwcd_list; -}; - - -/* Our structure version number. Is set to the version number major */ -extern const int pwc_decompressor_version; - -/* Adds decompressor to list, based on its 'type' field (which matches the 'type' field in pwc_device; ignores any double requests */ -extern void pwc_register_decompressor(struct pwc_decompressor *pwcd); -/* Removes decompressor, based on the type number */ -extern void pwc_unregister_decompressor(int type); -/* Returns pointer to decompressor struct, or NULL if it doesn't exist */ -extern struct pwc_decompressor *pwc_find_decompressor(int type); - -#ifdef CONFIG_USB_PWCX -/* If the decompressor is compiled in, we must call these manually */ -extern int usb_pwcx_init(void); -extern void usb_pwcx_exit(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff -Nru a/drivers/usb/media/pwc.h b/drivers/usb/media/pwc.h --- a/drivers/usb/media/pwc.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,271 +0,0 @@ -/* (C) 1999-2003 Nemosoft Unv. (webcam@smcc.demon.nl) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef PWC_H -#define PWC_H - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pwc-uncompress.h" -#include "pwc-ioctl.h" - -/* Defines and structures for the Philips webcam */ -/* Used for checking memory corruption/pointer validation */ -#define PWC_MAGIC 0x89DC10ABUL -#undef PWC_MAGIC - -/* Turn some debugging options on/off */ -#define PWC_DEBUG 0 - -/* Trace certain actions in the driver */ -#define TRACE_MODULE 0x0001 -#define TRACE_PROBE 0x0002 -#define TRACE_OPEN 0x0004 -#define TRACE_READ 0x0008 -#define TRACE_MEMORY 0x0010 -#define TRACE_FLOW 0x0020 -#define TRACE_SIZE 0x0040 -#define TRACE_PWCX 0x0080 -#define TRACE_SEQUENCE 0x1000 - -#define Trace(R, A...) if (pwc_trace & R) printk(KERN_DEBUG PWC_NAME " " A) -#define Debug(A...) printk(KERN_DEBUG PWC_NAME " " A) -#define Info(A...) printk(KERN_INFO PWC_NAME " " A) -#define Err(A...) printk(KERN_ERR PWC_NAME " " A) - - -/* Defines for ToUCam cameras */ -#define TOUCAM_HEADER_SIZE 8 -#define TOUCAM_TRAILER_SIZE 4 - -#define FEATURE_MOTOR_PANTILT 0x0001 - -/* Version block */ -#define PWC_MAJOR 9 -#define PWC_MINOR 0 -#define PWC_VERSION "9.0.1" -#define PWC_NAME "pwc" - -/* Turn certain features on/off */ -#define PWC_INT_PIPE 0 - -/* Ignore errors in the first N frames, to allow for startup delays */ -#define FRAME_LOWMARK 5 - -/* Size and number of buffers for the ISO pipe. */ -#define MAX_ISO_BUFS 2 -#define ISO_FRAMES_PER_DESC 10 -#define ISO_MAX_FRAME_SIZE 960 -#define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE) - -/* Frame buffers: contains compressed or uncompressed video data. */ -#define MAX_FRAMES 5 -/* Maximum size after decompression is 640x480 YUV data, 1.5 * 640 * 480 */ -#define PWC_FRAME_SIZE (460800 + TOUCAM_HEADER_SIZE + TOUCAM_TRAILER_SIZE) - -/* Absolute maximum number of buffers available for mmap() */ -#define MAX_IMAGES 10 - -/* The following structures were based on cpia.h. Why reinvent the wheel? :-) */ -struct pwc_iso_buf -{ - void *data; - int length; - int read; - struct urb *urb; -}; - -/* intermediate buffers with raw data from the USB cam */ -struct pwc_frame_buf -{ - void *data; - volatile int filled; /* number of bytes filled */ - struct pwc_frame_buf *next; /* list */ -#if PWC_DEBUG - int sequence; /* Sequence number */ -#endif -}; - -struct pwc_device -{ - struct video_device *vdev; -#ifdef PWC_MAGIC - int magic; -#endif - /* Pointer to our usb_device */ - struct usb_device *udev; - - int type; /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */ - int release; /* release number */ - int features; /* feature bits */ - char serial[30]; /* serial number (string) */ - int error_status; /* set when something goes wrong with the cam (unplugged, USB errors) */ - int usb_init; /* set when the cam has been initialized over USB */ - - /*** Video data ***/ - int vopen; /* flag */ - int vendpoint; /* video isoc endpoint */ - int vcinterface; /* video control interface */ - int valternate; /* alternate interface needed */ - int vframes, vsize; /* frames-per-second & size (see PSZ_*) */ - int vpalette; /* palette: 420P, RAW or RGBBAYER */ - int vframe_count; /* received frames */ - int vframes_dumped; /* counter for dumped frames */ - int vframes_error; /* frames received in error */ - int vmax_packet_size; /* USB maxpacket size */ - int vlast_packet_size; /* for frame synchronisation */ - int visoc_errors; /* number of contiguous ISOC errors */ - int vcompression; /* desired compression factor */ - int vbandlength; /* compressed band length; 0 is uncompressed */ - char vsnapshot; /* snapshot mode */ - char vsync; /* used by isoc handler */ - char vmirror; /* for ToUCaM series */ - - int cmd_len; - unsigned char cmd_buf[13]; - - /* The image acquisition requires 3 to 4 steps: - 1. data is gathered in short packets from the USB controller - 2. data is synchronized and packed into a frame buffer - 3a. in case data is compressed, decompress it directly into image buffer - 3b. in case data is uncompressed, copy into image buffer with viewport - 4. data is transferred to the user process - - Note that MAX_ISO_BUFS != MAX_FRAMES != MAX_IMAGES.... - We have in effect a back-to-back-double-buffer system. - */ - /* 1: isoc */ - struct pwc_iso_buf sbuf[MAX_ISO_BUFS]; - char iso_init; - - /* 2: frame */ - struct pwc_frame_buf *fbuf; /* all frames */ - struct pwc_frame_buf *empty_frames, *empty_frames_tail; /* all empty frames */ - struct pwc_frame_buf *full_frames, *full_frames_tail; /* all filled frames */ - struct pwc_frame_buf *fill_frame; /* frame currently being filled */ - struct pwc_frame_buf *read_frame; /* frame currently read by user process */ - int frame_header_size, frame_trailer_size; - int frame_size; - int frame_total_size; /* including header & trailer */ - int drop_frames; -#if PWC_DEBUG - int sequence; /* Debugging aid */ -#endif - - /* 3: decompression */ - struct pwc_decompressor *decompressor; /* function block with decompression routines */ - void *decompress_data; /* private data for decompression engine */ - - /* 4: image */ - /* We have an 'image' and a 'view', where 'image' is the fixed-size image - as delivered by the camera, and 'view' is the size requested by the - program. The camera image is centered in this viewport, laced with - a gray or black border. view_min <= image <= view <= view_max; - */ - int image_mask; /* bitmask of supported sizes */ - struct pwc_coord view_min, view_max; /* minimum and maximum viewable sizes */ - struct pwc_coord abs_max; /* maximum supported size with compression */ - struct pwc_coord image, view; /* image and viewport size */ - struct pwc_coord offset; /* offset within the viewport */ - - void *image_data; /* total buffer, which is subdivided into ... */ - void *image_ptr[MAX_IMAGES]; /* ...several images... */ - int fill_image; /* ...which are rotated. */ - int len_per_image; /* length per image */ - int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */ - int image_used[MAX_IMAGES]; /* For MCAPTURE and SYNC */ - - struct semaphore modlock; /* to prevent races in video_open(), etc */ - spinlock_t ptrlock; /* for manipulating the buffer pointers */ - - /*** motorized pan/tilt feature */ - struct pwc_mpt_range angle_range; - int pan_angle; /* in degrees * 100 */ - int tilt_angle; /* absolute angle; 0,0 is home position */ - - /*** Misc. data ***/ - wait_queue_head_t frameq; /* When waiting for a frame to finish... */ -#if PWC_INT_PIPE - void *usb_int_handler; /* for the interrupt endpoint */ -#endif -}; - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Global variables */ -extern int pwc_trace; -extern int pwc_preferred_compression; - -/** functions in pwc-if.c */ -int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot); - -/** Functions in pwc-misc.c */ -/* sizes in pixels */ -extern struct pwc_coord pwc_image_sizes[PSZ_MAX]; - -int pwc_decode_size(struct pwc_device *pdev, int width, int height); -void pwc_construct(struct pwc_device *pdev); - -/** Functions in pwc-ctrl.c */ -/* Request a certain video mode. Returns < 0 if not possible */ -extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot); -/* Calculate the number of bytes per image (not frame) */ -extern void pwc_set_image_buffer_size(struct pwc_device *pdev); - -/* Various controls; should be obvious. Value 0..65535, or < 0 on error */ -extern int pwc_get_brightness(struct pwc_device *pdev); -extern int pwc_set_brightness(struct pwc_device *pdev, int value); -extern int pwc_get_contrast(struct pwc_device *pdev); -extern int pwc_set_contrast(struct pwc_device *pdev, int value); -extern int pwc_get_gamma(struct pwc_device *pdev); -extern int pwc_set_gamma(struct pwc_device *pdev, int value); -extern int pwc_get_saturation(struct pwc_device *pdev); -extern int pwc_set_saturation(struct pwc_device *pdev, int value); -extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value); -extern int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value); -extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor); - -/* Power down or up the camera; not supported by all models */ -extern int pwc_camera_power(struct pwc_device *pdev, int power); - -/* Private ioctl()s; see pwc-ioctl.h */ -extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg); - - -/** pwc-uncompress.c */ -/* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */ -extern int pwc_decompress(struct pwc_device *pdev); - -#ifdef __cplusplus -} -#endif - - -#endif diff -Nru a/drivers/usb/media/pwc_kiara.h b/drivers/usb/media/pwc_kiara.h --- a/drivers/usb/media/pwc_kiara.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,270 +0,0 @@ - /* SQCIF */ - { - /* 5 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 10 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 15 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 20 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 25 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 30 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - }, - /* QSIF */ - { - /* 5 fps */ - { - {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, - {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, - {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, - {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, - }, - /* 10 fps */ - { - {2, 291, 0, {0x1C, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0x01, 0x80}}, - {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, - {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, - {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, - }, - /* 15 fps */ - { - {3, 437, 0, {0x1B, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x01, 0x80}}, - {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}}, - {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}}, - {1, 192, 420, {0x13, 0xF4, 0x30, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x18, 0xC0, 0x00, 0x80}}, - }, - /* 20 fps */ - { - {4, 589, 0, {0x1A, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4D, 0x02, 0x80}}, - {3, 448, 730, {0x12, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xC0, 0x01, 0x80}}, - {2, 292, 476, {0x12, 0xF4, 0x30, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0x01, 0x80}}, - {1, 192, 312, {0x12, 0xF4, 0x50, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0x00, 0x80}}, - }, - /* 25 fps */ - { - {5, 703, 0, {0x19, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x02, 0x80}}, - {3, 447, 610, {0x11, 0xF4, 0x30, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x28, 0xBF, 0x01, 0x80}}, - {2, 292, 398, {0x11, 0xF4, 0x50, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x28, 0x24, 0x01, 0x80}}, - {1, 193, 262, {0x11, 0xF4, 0x50, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x28, 0xC1, 0x00, 0x80}}, - }, - /* 30 fps */ - { - {8, 874, 0, {0x18, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x6A, 0x03, 0x80}}, - {5, 704, 730, {0x10, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x28, 0xC0, 0x02, 0x80}}, - {3, 448, 492, {0x10, 0xF4, 0x30, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x28, 0xC0, 0x01, 0x80}}, - {2, 292, 320, {0x10, 0xF4, 0x50, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x28, 0x24, 0x01, 0x80}}, - }, - }, - /* QCIF */ - { - /* 5 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 10 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 15 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 20 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 25 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 30 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - }, - /* SIF */ - { - /* 5 fps */ - { - {4, 582, 0, {0x0D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x02, 0x80}}, - {3, 387, 1276, {0x05, 0xF4, 0x30, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x01, 0x80}}, - {2, 291, 960, {0x05, 0xF4, 0x30, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0x01, 0x80}}, - {1, 191, 630, {0x05, 0xF4, 0x50, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x18, 0xBF, 0x00, 0x80}}, - }, - /* 10 fps */ - { - {0, }, - {6, 775, 1278, {0x04, 0xF4, 0x30, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x03, 0x80}}, - {3, 447, 736, {0x04, 0xF4, 0x30, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x28, 0xBF, 0x01, 0x80}}, - {2, 292, 480, {0x04, 0xF4, 0x70, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x28, 0x24, 0x01, 0x80}}, - }, - /* 15 fps */ - { - {0, }, - {9, 955, 1050, {0x03, 0xF4, 0x30, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x03, 0x80}}, - {4, 592, 650, {0x03, 0xF4, 0x30, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x50, 0x02, 0x80}}, - {3, 448, 492, {0x03, 0xF4, 0x50, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x38, 0xC0, 0x01, 0x80}}, - }, - /* 20 fps */ - { - {0, }, - {9, 958, 782, {0x02, 0xF4, 0x30, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x03, 0x80}}, - {5, 703, 574, {0x02, 0xF4, 0x50, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x02, 0x80}}, - {3, 446, 364, {0x02, 0xF4, 0x90, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x38, 0xBE, 0x01, 0x80}}, - }, - /* 25 fps */ - { - {0, }, - {9, 958, 654, {0x01, 0xF4, 0x30, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x03, 0x80}}, - {6, 776, 530, {0x01, 0xF4, 0x50, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x03, 0x80}}, - {4, 592, 404, {0x01, 0xF4, 0x70, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x48, 0x50, 0x02, 0x80}}, - }, - /* 30 fps */ - { - {0, }, - {9, 957, 526, {0x00, 0xF4, 0x50, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x03, 0x80}}, - {6, 775, 426, {0x00, 0xF4, 0x70, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x03, 0x80}}, - {4, 590, 324, {0x00, 0x7A, 0x88, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x50, 0x4E, 0x02, 0x80}}, - }, - }, - /* CIF */ - { - /* 5 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 10 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 15 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 20 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 25 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 30 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - }, - /* VGA */ - { - /* 5 fps */ - { - {0, }, - {6, 773, 1272, {0x25, 0xF4, 0x30, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}}, - {4, 592, 976, {0x25, 0xF4, 0x50, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x02, 0x80}}, - {3, 448, 738, {0x25, 0xF4, 0x90, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x01, 0x80}}, - }, - /* 10 fps */ - { - {0, }, - {9, 956, 788, {0x24, 0xF4, 0x70, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x03, 0x80}}, - {6, 776, 640, {0x24, 0xF4, 0xB0, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x03, 0x80}}, - {4, 592, 488, {0x24, 0x7A, 0xE8, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x02, 0x80}}, - }, - /* 15 fps */ - { - {0, }, - {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}}, - {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}}, - {8, 895, 492, {0x23, 0x7A, 0xE8, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x03, 0x80}}, - }, - /* 20 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 25 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 30 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - }, diff -Nru a/drivers/usb/media/pwc_nala.h b/drivers/usb/media/pwc_nala.h --- a/drivers/usb/media/pwc_nala.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,66 +0,0 @@ - /* SQCIF */ - { - {0, 0, {0x04, 0x01, 0x03}}, - {8, 0, {0x05, 0x01, 0x03}}, - {7, 0, {0x08, 0x01, 0x03}}, - {7, 0, {0x0A, 0x01, 0x03}}, - {6, 0, {0x0C, 0x01, 0x03}}, - {5, 0, {0x0F, 0x01, 0x03}}, - {4, 0, {0x14, 0x01, 0x03}}, - {3, 0, {0x18, 0x01, 0x03}}, - }, - /* QSIF */ - { - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - }, - /* QCIF */ - { - {0, 0, {0x04, 0x01, 0x02}}, - {8, 0, {0x05, 0x01, 0x02}}, - {7, 0, {0x08, 0x01, 0x02}}, - {6, 0, {0x0A, 0x01, 0x02}}, - {5, 0, {0x0C, 0x01, 0x02}}, - {4, 0, {0x0F, 0x01, 0x02}}, - {1, 0, {0x14, 0x01, 0x02}}, - {1, 0, {0x18, 0x01, 0x02}}, - }, - /* SIF */ - { - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - }, - /* CIF */ - { - {4, 0, {0x04, 0x01, 0x01}}, - {7, 1, {0x05, 0x03, 0x01}}, - {6, 1, {0x08, 0x03, 0x01}}, - {4, 1, {0x0A, 0x03, 0x01}}, - {3, 1, {0x0C, 0x03, 0x01}}, - {2, 1, {0x0F, 0x03, 0x01}}, - {0}, - {0}, - }, - /* VGA */ - { - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - }, diff -Nru a/drivers/usb/media/pwc_timon.h b/drivers/usb/media/pwc_timon.h --- a/drivers/usb/media/pwc_timon.h 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,270 +0,0 @@ - /* SQCIF */ - { - /* 5 fps */ - { - {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, - {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, - {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, - {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, - }, - /* 10 fps */ - { - {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, - {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, - {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, - {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, - }, - /* 15 fps */ - { - {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, - {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, - {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, - {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, - }, - /* 20 fps */ - { - {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, - {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, - {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, - {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, - }, - /* 25 fps */ - { - {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, - {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, - {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, - {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, - }, - /* 30 fps */ - { - {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, - {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, - {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, - {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, - }, - }, - /* QSIF */ - { - /* 5 fps */ - { - {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, - {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, - {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, - {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, - }, - /* 10 fps */ - { - {2, 291, 0, {0x2C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0xA1, 0xC0, 0x02}}, - {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, - {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, - {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, - }, - /* 15 fps */ - { - {3, 437, 0, {0x2B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x6D, 0xC0, 0x02}}, - {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, - {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, - {1, 191, 420, {0x2B, 0xF4, 0x0D, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, - }, - /* 20 fps */ - { - {4, 588, 0, {0x2A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4C, 0x52, 0xC0, 0x02}}, - {3, 447, 730, {0x2A, 0xF4, 0x05, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, - {2, 292, 476, {0x2A, 0xF4, 0x0D, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, - {1, 192, 312, {0x2A, 0xF4, 0x1D, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}}, - }, - /* 25 fps */ - { - {5, 703, 0, {0x29, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x42, 0xC0, 0x02}}, - {3, 447, 610, {0x29, 0xF4, 0x05, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, - {2, 292, 398, {0x29, 0xF4, 0x0D, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, - {1, 192, 262, {0x29, 0xF4, 0x25, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}}, - }, - /* 30 fps */ - { - {8, 873, 0, {0x28, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x69, 0x37, 0xC0, 0x02}}, - {5, 704, 774, {0x28, 0xF4, 0x05, 0x18, 0x21, 0x17, 0x59, 0x0F, 0x18, 0xC0, 0x42, 0xC0, 0x02}}, - {3, 448, 492, {0x28, 0xF4, 0x05, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x18, 0xC0, 0x69, 0xC0, 0x02}}, - {2, 291, 320, {0x28, 0xF4, 0x1D, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}}, - }, - }, - /* QCIF */ - { - /* 5 fps */ - { - {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, - {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, - {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, - {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, - }, - /* 10 fps */ - { - {3, 385, 0, {0x0C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x81, 0x79, 0xC0, 0x02}}, - {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, - {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, - {1, 194, 532, {0x0C, 0xF4, 0x05, 0x10, 0x9A, 0x0F, 0xBE, 0x1B, 0x08, 0xC2, 0xF0, 0xC0, 0x02}}, - }, - /* 15 fps */ - { - {4, 577, 0, {0x0B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x41, 0x52, 0xC0, 0x02}}, - {3, 447, 818, {0x0B, 0xF4, 0x05, 0x19, 0x89, 0x18, 0xAD, 0x0F, 0x10, 0xBF, 0x69, 0xC0, 0x02}}, - {2, 292, 534, {0x0B, 0xF4, 0x05, 0x10, 0xA3, 0x0F, 0xC7, 0x19, 0x10, 0x24, 0xA1, 0xC0, 0x02}}, - {1, 195, 356, {0x0B, 0xF4, 0x15, 0x0B, 0x11, 0x0A, 0x35, 0x1E, 0x10, 0xC3, 0xF0, 0xC0, 0x02}}, - }, - /* 20 fps */ - { - {6, 776, 0, {0x0A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x3F, 0xC0, 0x02}}, - {4, 591, 804, {0x0A, 0xF4, 0x05, 0x19, 0x1E, 0x18, 0x42, 0x0F, 0x18, 0x4F, 0x4E, 0xC0, 0x02}}, - {3, 447, 608, {0x0A, 0xF4, 0x05, 0x12, 0xFD, 0x12, 0x21, 0x15, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, - {2, 291, 396, {0x0A, 0xF4, 0x15, 0x0C, 0x5E, 0x0B, 0x82, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}}, - }, - /* 25 fps */ - { - {9, 928, 0, {0x09, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xA0, 0x33, 0xC0, 0x02}}, - {5, 703, 800, {0x09, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x10, 0x18, 0xBF, 0x42, 0xC0, 0x02}}, - {3, 447, 508, {0x09, 0xF4, 0x0D, 0x0F, 0xD2, 0x0E, 0xF6, 0x1B, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, - {2, 292, 332, {0x09, 0xF4, 0x1D, 0x0A, 0x5A, 0x09, 0x7E, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, - }, - /* 30 fps */ - { - {0, }, - {9, 956, 876, {0x08, 0xF4, 0x05, 0x1B, 0x58, 0x1A, 0x7C, 0x0E, 0x20, 0xBC, 0x33, 0x10, 0x02}}, - {4, 592, 542, {0x08, 0xF4, 0x05, 0x10, 0xE4, 0x10, 0x08, 0x17, 0x20, 0x50, 0x4E, 0x10, 0x02}}, - {2, 291, 266, {0x08, 0xF4, 0x25, 0x08, 0x48, 0x07, 0x6C, 0x1E, 0x20, 0x23, 0xA1, 0x10, 0x02}}, - }, - }, - /* SIF */ - { - /* 5 fps */ - { - {4, 582, 0, {0x35, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x52, 0x60, 0x02}}, - {3, 387, 1276, {0x35, 0xF4, 0x05, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x79, 0x60, 0x02}}, - {2, 291, 960, {0x35, 0xF4, 0x0D, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0xA1, 0x60, 0x02}}, - {1, 191, 630, {0x35, 0xF4, 0x1D, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x08, 0xBF, 0xF4, 0x60, 0x02}}, - }, - /* 10 fps */ - { - {0, }, - {6, 775, 1278, {0x34, 0xF4, 0x05, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x3F, 0x10, 0x02}}, - {3, 447, 736, {0x34, 0xF4, 0x15, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x18, 0xBF, 0x69, 0x10, 0x02}}, - {2, 291, 480, {0x34, 0xF4, 0x2D, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x18, 0x23, 0xA1, 0x10, 0x02}}, - }, - /* 15 fps */ - { - {0, }, - {9, 955, 1050, {0x33, 0xF4, 0x05, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x33, 0x10, 0x02}}, - {4, 591, 650, {0x33, 0xF4, 0x15, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x4F, 0x4E, 0x10, 0x02}}, - {3, 448, 492, {0x33, 0xF4, 0x25, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x28, 0xC0, 0x69, 0x10, 0x02}}, - }, - /* 20 fps */ - { - {0, }, - {9, 958, 782, {0x32, 0xF4, 0x0D, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x33, 0xD0, 0x02}}, - {5, 703, 574, {0x32, 0xF4, 0x1D, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x42, 0xD0, 0x02}}, - {3, 446, 364, {0x32, 0xF4, 0x3D, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x30, 0xBE, 0x69, 0xD0, 0x02}}, - }, - /* 25 fps */ - { - {0, }, - {9, 958, 654, {0x31, 0xF4, 0x15, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x33, 0x90, 0x02}}, - {6, 776, 530, {0x31, 0xF4, 0x25, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x3F, 0x90, 0x02}}, - {4, 592, 404, {0x31, 0xF4, 0x35, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x38, 0x50, 0x4E, 0x90, 0x02}}, - }, - /* 30 fps */ - { - {0, }, - {9, 957, 526, {0x30, 0xF4, 0x25, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x33, 0x60, 0x02}}, - {6, 775, 426, {0x30, 0xF4, 0x35, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x3F, 0x60, 0x02}}, - {4, 590, 324, {0x30, 0x7A, 0x4B, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x40, 0x4E, 0x52, 0x60, 0x02}}, - }, - }, - /* CIF */ - { - /* 5 fps */ - { - {6, 771, 0, {0x15, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x3F, 0x80, 0x02}}, - {4, 465, 1278, {0x15, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x03, 0x18, 0xD1, 0x65, 0x80, 0x02}}, - {2, 291, 800, {0x15, 0xF4, 0x15, 0x18, 0xF4, 0x17, 0x3C, 0x05, 0x18, 0x23, 0xA1, 0x80, 0x02}}, - {1, 193, 528, {0x15, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x18, 0xC1, 0xF4, 0x80, 0x02}}, - }, - /* 10 fps */ - { - {0, }, - {9, 932, 1278, {0x14, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x04, 0x30, 0xA4, 0x33, 0x10, 0x02}}, - {4, 591, 812, {0x14, 0xF4, 0x15, 0x19, 0x56, 0x17, 0x9E, 0x06, 0x28, 0x4F, 0x4E, 0x10, 0x02}}, - {2, 291, 400, {0x14, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x28, 0x23, 0xA1, 0x10, 0x02}}, - }, - /* 15 fps */ - { - {0, }, - {9, 956, 876, {0x13, 0xF4, 0x0D, 0x1B, 0x58, 0x19, 0xA0, 0x05, 0x38, 0xBC, 0x33, 0x60, 0x02}}, - {5, 703, 644, {0x13, 0xF4, 0x1D, 0x14, 0x1C, 0x12, 0x64, 0x08, 0x38, 0xBF, 0x42, 0x60, 0x02}}, - {3, 448, 410, {0x13, 0xF4, 0x3D, 0x0C, 0xC4, 0x0B, 0x0C, 0x0E, 0x38, 0xC0, 0x69, 0x60, 0x02}}, - }, - /* 20 fps */ - { - {0, }, - {9, 956, 650, {0x12, 0xF4, 0x1D, 0x14, 0x4A, 0x12, 0x92, 0x09, 0x48, 0xBC, 0x33, 0x10, 0x03}}, - {6, 776, 528, {0x12, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x40, 0x08, 0x3F, 0x10, 0x03}}, - {4, 591, 402, {0x12, 0xF4, 0x3D, 0x0C, 0x8F, 0x0A, 0xD7, 0x0E, 0x40, 0x4F, 0x4E, 0x10, 0x03}}, - }, - /* 25 fps */ - { - {0, }, - {9, 956, 544, {0x11, 0xF4, 0x25, 0x10, 0xF4, 0x0F, 0x3C, 0x0A, 0x48, 0xBC, 0x33, 0xC0, 0x02}}, - {7, 840, 478, {0x11, 0xF4, 0x2D, 0x0E, 0xEB, 0x0D, 0x33, 0x0B, 0x48, 0x48, 0x3B, 0xC0, 0x02}}, - {5, 703, 400, {0x11, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x48, 0xBF, 0x42, 0xC0, 0x02}}, - }, - /* 30 fps */ - { - {0, }, - {9, 956, 438, {0x10, 0xF4, 0x35, 0x0D, 0xAC, 0x0B, 0xF4, 0x0D, 0x50, 0xBC, 0x33, 0x10, 0x02}}, - {7, 838, 384, {0x10, 0xF4, 0x45, 0x0B, 0xFD, 0x0A, 0x45, 0x0F, 0x50, 0x46, 0x3B, 0x10, 0x02}}, - {6, 773, 354, {0x10, 0x7A, 0x4B, 0x0B, 0x0C, 0x09, 0x80, 0x10, 0x50, 0x05, 0x3F, 0x10, 0x02}}, - }, - }, - /* VGA */ - { - /* 5 fps */ - { - {0, }, - {6, 773, 1272, {0x1D, 0xF4, 0x15, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x3F, 0x10, 0x02}}, - {4, 592, 976, {0x1D, 0xF4, 0x25, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x4E, 0x10, 0x02}}, - {3, 448, 738, {0x1D, 0xF4, 0x3D, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x69, 0x10, 0x02}}, - }, - /* 10 fps */ - { - {0, }, - {9, 956, 788, {0x1C, 0xF4, 0x35, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x33, 0x10, 0x02}}, - {6, 776, 640, {0x1C, 0x7A, 0x53, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x3F, 0x10, 0x02}}, - {4, 592, 488, {0x1C, 0x7A, 0x6B, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x4E, 0x10, 0x02}}, - }, - /* 15 fps */ - { - {0, }, - {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}}, - {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}}, - {8, 895, 492, {0x1B, 0x7A, 0x6B, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x37, 0x80, 0x02}}, - }, - /* 20 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 25 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - /* 30 fps */ - { - {0, }, - {0, }, - {0, }, - {0, }, - }, - }, diff -Nru a/drivers/usb/media/sn9c102.h b/drivers/usb/media/sn9c102.h --- a/drivers/usb/media/sn9c102.h 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/media/sn9c102.h 2004-09-06 16:37:52 -07:00 @@ -40,6 +40,7 @@ #define SN9C102_DEBUG #define SN9C102_DEBUG_LEVEL 2 #define SN9C102_MAX_DEVICES 64 +#define SN9C102_PRESERVE_IMGSCALE 0 #define SN9C102_MAX_FRAMES 32 #define SN9C102_URBS 2 #define SN9C102_ISO_PACKETS 7 @@ -52,8 +53,8 @@ #define SN9C102_MODULE_AUTHOR "(C) 2004 Luca Risolia" #define SN9C102_AUTHOR_EMAIL "" #define SN9C102_MODULE_LICENSE "GPL" -#define SN9C102_MODULE_VERSION "1:1.07" -#define SN9C102_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 7) +#define SN9C102_MODULE_VERSION "1:1.08" +#define SN9C102_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 8) SN9C102_ID_TABLE; SN9C102_SENSOR_TABLE; diff -Nru a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c --- a/drivers/usb/media/sn9c102_core.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/media/sn9c102_core.c 2004-09-06 16:37:50 -07:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1731,13 +1732,15 @@ rect->width &= ~15L; rect->height &= ~15L; - { /* calculate the actual scaling factor */ + if (SN9C102_PRESERVE_IMGSCALE) { + /* Calculate the actual scaling factor */ u32 a, b; a = rect->width * rect->height; b = pix_format->width * pix_format->height; scale = b ? (u8)((a / b) < 4 ? 1 : ((a / b) < 16 ? 2 : 4)) : 1; - } + } else + scale = 1; if (cam->stream == STREAM_ON) { cam->stream = STREAM_INTERRUPT; @@ -2111,7 +2114,7 @@ spin_lock_irqsave(&cam->queue_lock, lock_flags); f = list_entry(cam->outqueue.next, struct sn9c102_frame_t, frame); - list_del(&cam->outqueue); + list_del(cam->outqueue.next); spin_unlock_irqrestore(&cam->queue_lock, lock_flags); f->state = F_UNUSED; diff -Nru a/drivers/usb/media/sn9c102_pas106b.c b/drivers/usb/media/sn9c102_pas106b.c --- a/drivers/usb/media/sn9c102_pas106b.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/media/sn9c102_pas106b.c 2004-09-06 16:37:50 -07:00 @@ -109,7 +109,7 @@ err += sn9c102_i2c_write(cam, 0x0e, ctrl->value & 0x1f); break; case V4L2_CID_BRIGHTNESS: - err += sn9c102_i2c_write(cam, 0x0d, ctrl->value & 0x1f); + err += sn9c102_i2c_write(cam, 0x0d, 0x1f-(ctrl->value & 0x1f)); break; case V4L2_CID_CONTRAST: err += sn9c102_i2c_write(cam, 0x0f, ctrl->value & 0x03); @@ -180,11 +180,11 @@ { .id = V4L2_CID_BRIGHTNESS, .type = V4L2_CTRL_TYPE_INTEGER, - .name = "darkness", + .name = "brightness", .minimum = 0x00, .maximum = 0x1f, .step = 0x01, - .default_value = 0x00, + .default_value = 0x1f, .flags = 0, }, { diff -Nru a/drivers/usb/media/sn9c102_pas202bcb.c b/drivers/usb/media/sn9c102_pas202bcb.c --- a/drivers/usb/media/sn9c102_pas202bcb.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/media/sn9c102_pas202bcb.c 2004-09-06 16:37:54 -07:00 @@ -104,7 +104,7 @@ err += sn9c102_i2c_write(cam, 0x10, ctrl->value & 0x1f); break; case V4L2_CID_BRIGHTNESS: - err += sn9c102_i2c_write(cam, 0x06, ctrl->value & 0x0f); + err += sn9c102_i2c_write(cam, 0x06, 0x0f-(ctrl->value & 0x0f)); break; default: return -EINVAL; @@ -173,11 +173,11 @@ { .id = V4L2_CID_BRIGHTNESS, .type = V4L2_CTRL_TYPE_INTEGER, - .name = "darkness", + .name = "brightness", .minimum = 0x00, .maximum = 0x0f, .step = 0x01, - .default_value = 0x00, + .default_value = 0x0f, .flags = 0, }, }, diff -Nru a/drivers/usb/media/sn9c102_tas5110c1b.c b/drivers/usb/media/sn9c102_tas5110c1b.c --- a/drivers/usb/media/sn9c102_tas5110c1b.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/media/sn9c102_tas5110c1b.c 2004-09-06 16:37:50 -07:00 @@ -27,7 +27,6 @@ static int tas5110c1b_init(struct sn9c102_device* cam) { - const u8 DARKNESS = 0xb7; int err = 0; err += sn9c102_write_reg(cam, 0x01, 0x01); @@ -41,13 +40,26 @@ err += sn9c102_i2c_try_raw_write(cam, &tas5110c1b, 4, 0x11, 0x00, 0xc0, 0x80, 0, 0); - err += sn9c102_i2c_try_raw_write(cam, &tas5110c1b, 4, 0x11, 0x02, 0x20, - DARKNESS, 0, 0); return err; } +static int tas5110c1b_set_ctrl(struct sn9c102_device* cam, + const struct v4l2_control* ctrl) +{ + switch (ctrl->id) { + case V4L2_CID_GAIN: + return sn9c102_i2c_try_raw_write(cam, &tas5110c1b, 4, 0x11, + 0x02, 0x20, + 0xff - (ctrl->value & 0xff), + 0, 0); + default: + return -EINVAL; + } +} + + static int tas5110c1b_set_crop(struct sn9c102_device* cam, const struct v4l2_rect* rect) { @@ -74,6 +86,19 @@ .frequency = SN9C102_I2C_100KHZ, .interface = SN9C102_I2C_3WIRES, .init = &tas5110c1b_init, + .qctrl = { + { + .id = V4L2_CID_GAIN, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "global gain", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x01, + .default_value = 0x48, + .flags = 0, + }, + }, + .set_ctrl = &tas5110c1b_set_ctrl, .cropcap = { .bounds = { .left = 0, diff -Nru a/drivers/usb/media/sn9c102_tas5130d1b.c b/drivers/usb/media/sn9c102_tas5130d1b.c --- a/drivers/usb/media/sn9c102_tas5130d1b.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/media/sn9c102_tas5130d1b.c 2004-09-06 16:37:53 -07:00 @@ -27,7 +27,6 @@ static int tas5130d1b_init(struct sn9c102_device* cam) { - const u8 DARKNESS = 0xff, CONTRAST = 0xb0, GAIN = 0x08; int err = 0; err += sn9c102_write_reg(cam, 0x01, 0x01); @@ -39,19 +38,28 @@ err += sn9c102_write_reg(cam, 0x60, 0x17); err += sn9c102_write_reg(cam, 0x07, 0x18); - err += sn9c102_i2c_try_raw_write(cam, &tas5130d1b, 4, 0x11, 0x00, 0x80, - 0x00, 0, 0); - err += sn9c102_i2c_try_raw_write(cam, &tas5130d1b, 4, 0x11, 0x00, 0xc0, - GAIN, 0, 0); err += sn9c102_i2c_try_raw_write(cam, &tas5130d1b, 4, 0x11, 0x00, 0x40, - CONTRAST, 0, 0); - err += sn9c102_i2c_try_raw_write(cam, &tas5130d1b, 4, 0x11, 0x02, 0x20, - DARKNESS, 0, 0); + 0x47, 0, 0); return err; } +static int tas5130d1b_set_ctrl(struct sn9c102_device* cam, + const struct v4l2_control* ctrl) +{ + switch (ctrl->id) { + case V4L2_CID_GAIN: + return sn9c102_i2c_try_raw_write(cam, &tas5130d1b, 4, 0x11, + 0x02, 0x20, + 0xff - (ctrl->value & 0xff), + 0, 0); + default: + return -EINVAL; + } +} + + static int tas5130d1b_set_crop(struct sn9c102_device* cam, const struct v4l2_rect* rect) { @@ -78,6 +86,19 @@ .frequency = SN9C102_I2C_100KHZ, .interface = SN9C102_I2C_3WIRES, .init = &tas5130d1b_init, + .qctrl = { + { + .id = V4L2_CID_GAIN, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "global gain", + .minimum = 0x00, + .maximum = 0xff, + .step = 0x01, + .default_value = 0x00, + .flags = 0, + }, + }, + .set_ctrl = &tas5130d1b_set_ctrl, .cropcap = { .bounds = { .left = 0, diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c --- a/drivers/usb/media/stv680.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/media/stv680.c 2004-09-06 16:37:53 -07:00 @@ -704,7 +704,6 @@ usb_rcvbulkpipe (stv680->udev, stv680->bulk_in_endpointAddr), stv680->sbuf[i].data, stv680->rawbufsize, stv680_video_irq, stv680); - urb->timeout = PENCAM_TIMEOUT * 2; stv680->urb[i] = urb; err = usb_submit_urb (stv680->urb[i], GFP_KERNEL); if (err) diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c --- a/drivers/usb/misc/auerswald.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/misc/auerswald.c 2004-09-06 16:37:52 -07:00 @@ -1037,7 +1037,8 @@ /* now extract the information */ channelid = cp->intbufp[2]; - bytecount = le16_to_cpup (&cp->intbufp[3]); + bytecount = (unsigned char)cp->intbufp[3]; + bytecount |= (unsigned char)cp->intbufp[4] << 8; /* check the channel id */ if (channelid >= AUH_TYPESIZE) { @@ -1930,7 +1931,7 @@ struct usb_device *usbdev = interface_to_usbdev(intf); pauerswald_t cp = NULL; unsigned int u = 0; - char *pbuf; + u16 *pbuf; int ret; dbg ("probe: vendor id 0x%x, device id 0x%x", @@ -2002,7 +2003,7 @@ info("device is a %s", cp->dev_desc); /* get the maximum allowed control transfer length */ - pbuf = (char *) kmalloc (2, GFP_KERNEL); /* use an allocated buffer because of urb target */ + pbuf = (u16 *) kmalloc (2, GFP_KERNEL); /* use an allocated buffer because of urb target */ if (!pbuf) { err( "out of memory"); goto pfail; diff -Nru a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c --- a/drivers/usb/misc/legousbtower.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/misc/legousbtower.c 2004-09-06 16:37:52 -07:00 @@ -115,7 +115,7 @@ * In this case read_buffer_size should exceed the maximal packet length * (417 for datalog uploads), and packet_timeout should be set. */ -static size_t read_buffer_size = 480; +static int read_buffer_size = 480; module_param(read_buffer_size, int, 0); MODULE_PARM_DESC(read_buffer_size, "Read buffer size"); @@ -125,7 +125,7 @@ * A problem with long writes is that the following read may time out * if the software is not prepared to wait long enough. */ -static size_t write_buffer_size = 480; +static int write_buffer_size = 480; module_param(write_buffer_size, int, 0); MODULE_PARM_DESC(write_buffer_size, "Write buffer size"); @@ -714,7 +714,7 @@ } /* write the data into interrupt_out_buffer from userspace */ - bytes_to_write = min(count, write_buffer_size); + bytes_to_write = min_t(int, count, write_buffer_size); dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __FUNCTION__, count, bytes_to_write); if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { diff -Nru a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c --- a/drivers/usb/misc/phidgetservo.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/misc/phidgetservo.c 2004-09-06 16:37:53 -07:00 @@ -12,8 +12,6 @@ * controllers available at: http://www.phidgets.com/ * * Note that the driver takes input as: degrees.minutes - * -23 < degrees < 203 - * 0 < minutes < 59 * * CAUTION: Generally you should use 0 < degrees < 180 as anything else * is probably beyond the range of your servo and may damage it. @@ -21,6 +19,10 @@ * Jun 16, 2004: Sean Young * - cleanups * - was using memory after kfree() + * Aug 8, 2004: Sean Young + * - set the highest angle as high as the hardware allows, there are + * some odd servos out there + * */ #include @@ -87,6 +89,9 @@ int retval; unsigned char *buffer; + if (degrees < -23 || degrees > 362) + return -EINVAL; + buffer = kmalloc(6, GFP_KERNEL); if (!buffer) { dev_err(&servo->udev->dev, "%s - out of memory\n", @@ -157,6 +162,9 @@ int retval; unsigned char *buffer; + if (degrees < -23 || degrees > 278) + return -EINVAL; + buffer = kmalloc(2, GFP_KERNEL); if (!buffer) { dev_err(&servo->udev->dev, "%s - out of memory\n", @@ -212,10 +220,8 @@ return -EINVAL; \ } \ \ - if (degrees < -23 || degrees > (180 + 23) || \ - minutes < 0 || minutes > 59) { \ + if (minutes < 0 || minutes > 59) \ return -EINVAL; \ - } \ \ if (servo->type & SERVO_VERSION_30) \ retval = change_position_v30 (servo, value, degrees, \ diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/misc/usbtest.c 2004-09-06 16:37:55 -07:00 @@ -1054,8 +1054,7 @@ urb = simple_alloc_urb (testdev_to_usbdev (dev), pipe, size); if (!urb) return -ENOMEM; - if (async) - urb->transfer_flags |= URB_ASYNC_UNLINK; + urb->transfer_flags |= URB_ASYNC_UNLINK; urb->context = &completion; urb->complete = unlink1_callback; @@ -1074,17 +1073,20 @@ * hcd states and code paths, even with little other system load. */ msleep (jiffies % (2 * INTERRUPT_RATE)); + if (async) { retry: - retval = usb_unlink_urb (urb); - if (retval == -EBUSY || retval == -EIDRM) { - /* we can't unlink urbs while they're completing. - * or if they've completed, and we haven't resubmitted. - * "normal" drivers would prevent resubmission, but - * since we're testing unlink paths, we can't. - */ - dev_dbg (&dev->intf->dev, "unlink retry\n"); - goto retry; - } + retval = usb_unlink_urb (urb); + if (retval == -EBUSY || retval == -EIDRM) { + /* we can't unlink urbs while they're completing. + * or if they've completed, and we haven't resubmitted. + * "normal" drivers would prevent resubmission, but + * since we're testing unlink paths, we can't. + */ + dev_dbg (&dev->intf->dev, "unlink retry\n"); + goto retry; + } + } else + usb_kill_urb (urb); if (!(retval == 0 || retval == -EINPROGRESS)) { dev_dbg (&dev->intf->dev, "unlink fail %d\n", retval); return retval; @@ -1095,9 +1097,10 @@ simple_free_urb (urb); if (async) - return (retval != -ECONNRESET) ? -ECONNRESET : 0; + return (retval == -ECONNRESET) ? 0 : retval - 1000; else - return (retval != -ENOENT) ? -ENOENT : 0; + return (retval == -ENOENT || retval == -EPERM) ? + 0 : retval - 2000; } static int unlink_simple (struct usbtest_dev *dev, int pipe, int len) diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/net/kaweth.c 2004-09-06 16:37:54 -07:00 @@ -668,7 +668,7 @@ INTBUFFERSIZE, int_callback, kaweth, - HZ/4); + 8); kaweth->irq_urb->transfer_dma = kaweth->intbufferhandle; kaweth->irq_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c --- a/drivers/usb/net/rtl8150.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/net/rtl8150.c 2004-09-06 16:37:53 -07:00 @@ -265,7 +265,7 @@ if (i < MII_TIMEOUT) { get_registers(dev, PHYDAT, 2, data); - *reg = le16_to_cpup(data); + *reg = data[0] | (data[1] << 8); return 0; } else return 1; diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c 2004-09-06 16:37:50 -07:00 +++ b/drivers/usb/serial/io_edgeport.c 2004-09-06 16:37:50 -07:00 @@ -653,7 +653,7 @@ memset (product_info, 0, sizeof(struct edgeport_product_info)); - product_info->ProductId = (__u16)(edge_serial->serial->dev->descriptor.idProduct & ~ION_DEVICE_ID_GENERATION_2); + product_info->ProductId = (__u16)(edge_serial->serial->dev->descriptor.idProduct & ~ION_DEVICE_ID_80251_NETCHIP); product_info->NumPorts = edge_serial->manuf_descriptor.NumPorts; product_info->ProdInfoVer = 0; @@ -669,7 +669,7 @@ memcpy(product_info->ManufactureDescDate, edge_serial->manuf_descriptor.DescDate, sizeof(edge_serial->manuf_descriptor.DescDate)); // check if this is 2nd generation hardware - if (edge_serial->serial->dev->descriptor.idProduct & ION_DEVICE_ID_GENERATION_2) { + if (edge_serial->serial->dev->descriptor.idProduct & ION_DEVICE_ID_80251_NETCHIP) { product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN2.MajorVersion; product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN2.MinorVersion; product_info->FirmwareBuildNumber = cpu_to_le16(OperationalCodeImageVersion_GEN2.BuildNumber); @@ -1389,7 +1389,7 @@ // to bother queueing a write. If it's too small, say a few bytes, // it's better to wait for more credits so we can do a larger // write. - if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) { + if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits,EDGE_FW_BULK_MAX_PACKET_SIZE)) { dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits ); return; } @@ -3007,9 +3007,6 @@ static int __init edgeport_init(void) { int retval; - retval = usb_serial_register(&edgeport_1port_device); - if (retval) - goto failed_1port_device_register; retval = usb_serial_register(&edgeport_2port_device); if (retval) goto failed_2port_device_register; @@ -3031,8 +3028,6 @@ failed_4port_device_register: usb_serial_deregister(&edgeport_2port_device); failed_2port_device_register: - usb_serial_deregister(&edgeport_1port_device); -failed_1port_device_register: return retval; } @@ -3045,7 +3040,6 @@ static void __exit edgeport_exit (void) { usb_deregister (&io_driver); - usb_serial_deregister (&edgeport_1port_device); usb_serial_deregister (&edgeport_2port_device); usb_serial_deregister (&edgeport_4port_device); usb_serial_deregister (&edgeport_8port_device); diff -Nru a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h --- a/drivers/usb/serial/io_fw_down.h 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/serial/io_fw_down.h 2004-09-06 16:37:55 -07:00 @@ -17,7 +17,7 @@ unsigned short Addr; unsigned short Len; unsigned char Data[0]; - } __attribute ((packed)); + } __attribute__ ((packed)); struct edge_firmware_version_info { unsigned char MajorVersion; @@ -36,11 +36,11 @@ // Segment #1, Start Address 00ff0000, Length 6 0xff,0x00,0x00,0x00,0x06,0x00, - 0x02, 0x00, 0x80, 0x02, 0x49, 0x39, + 0x02, 0x00, 0x80, 0x02, 0x44, 0xb0, // Segment #2, Start Address 00ff000b, Length 3 0xff,0x00,0x0b,0x00,0x03,0x00, - 0x02, 0x44, 0x1a, + 0x02, 0x44, 0x72, // Segment #3, Start Address 00ff0013, Length 3 0xff,0x00,0x13,0x00,0x03,0x00, @@ -72,11 +72,11 @@ // Segment #10, Start Address 00ff004b, Length 3 0xff,0x00,0x4b,0x00,0x03,0x00, - 0x02, 0x70, 0xd4, + 0x02, 0x6e, 0xc4, // Segment #11, Start Address 00ff0053, Length 3 0xff,0x00,0x53,0x00,0x03,0x00, - 0x02, 0x77, 0x9d, + 0x02, 0x75, 0x8d, // Segment #12, Start Address 00ff007b, Length 3 0xff,0x00,0x7b,0x00,0x03,0x00, @@ -86,657 +86,745 @@ 0xff,0x00,0x80,0x00,0x07,0x00, 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x51, -// Segment #14, Start Address 00ff4000, Length 15920 -0xff,0x00,0x00,0x40,0x30,0x3e, +// Segment #14, Start Address 00ff3000, Length 2178 +0xff,0x00,0x00,0x30,0x82,0x08, + 0x12, 0x37, 0x28, 0x12, 0x30, 0x3e, 0x12, 0x30, 0x54, 0x12, 0x30, 0xe5, 0x12, 0x31, 0x68, 0x12, + 0x35, 0x20, 0x12, 0x38, 0x58, 0x12, 0x31, 0x15, 0x12, 0x31, 0x40, 0x12, 0x30, 0xa0, 0x80, 0xe0, + 0xe5, 0x23, 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, 0x09, 0xb1, 0x01, 0xcf, 0xb4, 0x00, 0x02, 0x80, + 0x05, 0x14, 0x19, 0xb1, 0x01, 0xcf, 0xa5, 0x0b, 0xbe, 0x31, 0x2f, 0x78, 0xeb, 0x22, 0xc2, 0xaf, + 0x7e, 0xb3, 0x3f, 0xf1, 0xb4, 0x01, 0x0a, 0xc0, 0xf1, 0x75, 0xf1, 0x02, 0x12, 0x70, 0xef, 0xd0, + 0xf1, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, 0x60, 0x43, 0x7e, 0x07, 0x01, 0xe1, 0xbe, 0x04, + 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0, + 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, 0x04, 0x0a, 0x32, 0x09, 0x53, 0x67, 0x8e, 0x5e, + 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e, + 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22, + 0xc2, 0xaf, 0x7e, 0x20, 0x00, 0x7e, 0x30, 0x01, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x32, 0x01, + 0x8f, 0xbe, 0x34, 0x00, 0x00, 0x68, 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, 0x21, 0xca, + 0x19, 0x49, 0x22, 0x30, 0xd5, 0x99, 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, + 0x78, 0xd6, 0xd2, 0xaf, 0x22, 0x46, 0x0f, 0x49, 0x67, 0x4c, 0xbf, 0x50, 0x17, 0x53, 0x6f, 0x56, + 0xc7, 0x5a, 0x1f, 0x5d, 0x77, 0xc2, 0xaf, 0xe5, 0x32, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, + 0x07, 0xca, 0xb8, 0x12, 0x31, 0x02, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, + 0xaf, 0x22, 0xca, 0x28, 0x12, 0x67, 0xab, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, 0xb2, 0x67, + 0x8e, 0xf4, 0x52, 0x32, 0x22, 0xc2, 0xaf, 0xe5, 0x34, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, + 0x07, 0xca, 0xb8, 0x12, 0x31, 0x32, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, + 0xaf, 0x22, 0xca, 0x28, 0x0a, 0x22, 0x09, 0x42, 0x00, 0x3e, 0x12, 0x69, 0xc2, 0xda, 0x28, 0x22, + 0xc2, 0xaf, 0xe5, 0x35, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, + 0x5d, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x7e, + 0x40, 0x00, 0x12, 0x6c, 0x5b, 0xda, 0x28, 0x22, 0xc2, 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20, + 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x85, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, + 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x31, 0x90, 0x89, 0x24, + 0x31, 0xa0, 0x32, 0x10, 0x32, 0x80, 0x32, 0xf0, 0x33, 0x60, 0x33, 0xd0, 0x34, 0x40, 0x34, 0xb0, + 0x7e, 0x27, 0x01, 0x8f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x49, 0x30, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0x9f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x9f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xcf, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xcf, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x18, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xcf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x91, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x4c, 0x88, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xa1, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa1, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd0, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd0, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x19, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd0, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x93, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x4f, 0xe0, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xa3, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa3, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd1, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd1, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1a, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd1, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x95, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x53, 0x38, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xa5, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa5, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd2, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd2, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1b, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd2, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x97, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x56, 0x90, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xa7, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa7, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd3, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd3, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1c, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd3, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x99, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x59, 0xe8, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xa9, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xa9, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd4, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd4, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1d, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd4, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x9b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x5d, 0x40, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xab, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xab, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd5, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd5, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1e, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd5, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x27, 0x01, 0x9d, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x60, 0x98, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0xad, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0xad, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xd6, 0x80, + 0x2e, 0x7e, 0x63, 0x01, 0xd6, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x62, 0xb6, 0x40, 0x18, 0x75, 0x31, 0xb3, 0x12, 0x7c, 0x15, 0xc2, 0x1f, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xd6, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0xc2, 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x35, + 0x3d, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, + 0x0a, 0x2b, 0x49, 0x22, 0x35, 0x48, 0x89, 0x24, 0x35, 0x58, 0x35, 0x92, 0x35, 0xcc, 0x36, 0x06, + 0x36, 0x40, 0x36, 0x7a, 0x36, 0xb4, 0x36, 0xee, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x14, + 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x49, 0x30, + 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, + 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x20, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, + 0xf1, 0x22, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, + 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4c, 0x88, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, + 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, + 0x21, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x82, 0x00, + 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, + 0x12, 0x12, 0x4f, 0xe0, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, + 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x22, 0xc0, 0xf1, 0x75, 0xf1, 0x01, + 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, + 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x53, 0x38, 0x7d, 0x21, + 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, + 0x12, 0x7c, 0x15, 0xc2, 0x23, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, + 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, + 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x56, 0x90, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, + 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x24, 0xc0, + 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x59, 0xe8, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, + 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x25, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, + 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, + 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5d, 0x40, 0x7d, 0x21, 0xda, 0x19, + 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, + 0x15, 0xc2, 0x26, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, + 0x87, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, + 0x19, 0x7d, 0x12, 0x12, 0x60, 0x98, 0x7d, 0x21, 0xda, 0x19, 0x5e, 0xb0, 0x01, 0x7e, 0xa0, 0x90, + 0x12, 0x62, 0x93, 0x40, 0x12, 0x75, 0x31, 0xb8, 0x12, 0x7c, 0x15, 0xc2, 0x27, 0xc0, 0xf1, 0x75, + 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0xc2, 0xaf, 0xe5, 0x33, 0x60, 0x14, 0x7e, 0x20, + 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x37, 0x45, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2f, + 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x37, 0x50, 0x89, 0x24, + 0x37, 0x60, 0x37, 0x7f, 0x37, 0x9e, 0x37, 0xbd, 0x37, 0xdc, 0x37, 0xfb, 0x38, 0x1a, 0x38, 0x39, + 0x7e, 0x24, 0x80, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x48, 0x1b, 0xda, 0x19, 0x10, 0x04, 0x02, + 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, + 0x24, 0x81, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4b, 0x73, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, + 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, + 0x82, 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4e, 0xcb, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, + 0xd2, 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x83, + 0x00, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x52, 0x23, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, + 0x01, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x84, 0x00, + 0xca, 0x19, 0x7d, 0x12, 0x12, 0x55, 0x7b, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, + 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x85, 0x00, 0xca, + 0x19, 0x7d, 0x12, 0x12, 0x58, 0xd3, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0, + 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x86, 0x00, 0xca, 0x19, + 0x7d, 0x12, 0x12, 0x5c, 0x2b, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1, + 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x7e, 0x24, 0x87, 0x00, 0xca, 0x19, 0x7d, + 0x12, 0x12, 0x5f, 0x83, 0xda, 0x19, 0x10, 0x04, 0x02, 0x80, 0x0c, 0xd2, 0x01, 0xc0, 0xf1, 0x75, + 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0xc2, 0xaf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0xa9, + 0x32, 0xf2, 0x1a, 0x7e, 0x07, 0x01, 0xe1, 0xbe, 0x04, 0x00, 0x00, 0x78, 0x10, 0xe5, 0xf5, 0x33, + 0x82, 0xe7, 0x40, 0x09, 0x85, 0x31, 0x31, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x00, 0xd0, 0xf1, 0xd2, + 0xaf, 0x22, + +// Segment #15, Start Address 00ff4000, Length 15381 +0xff,0x00,0x00,0x40,0x15,0x3c, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8, 0x7e, 0x24, 0x00, 0xfe, 0x7d, 0x31, 0x0b, 0x1a, - 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x6a, 0x7e, 0xf8, 0x00, 0x59, 0xd2, - 0x04, 0xc2, 0x94, 0xd2, 0x95, 0x7e, 0xf4, 0x40, 0x2c, 0x02, 0x40, 0x7c, 0x12, 0x7f, 0x3f, 0xf5, - 0x2e, 0x7a, 0xa1, 0x2d, 0x7a, 0x11, 0x58, 0x12, 0x77, 0xda, 0x12, 0x40, 0xdc, 0x7e, 0xb3, 0x3f, - 0xf1, 0x60, 0x03, 0x12, 0x43, 0x68, 0x75, 0xf1, 0x00, 0x12, 0x78, 0x7f, 0xd2, 0xaf, 0x02, 0x44, - 0x06, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x5f, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xa9, + 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x6a, 0x7e, 0xf8, 0x00, 0x6f, 0xd2, + 0x04, 0xc2, 0x94, 0xd2, 0x95, 0x7e, 0xf4, 0x40, 0x2c, 0x02, 0x40, 0x7c, 0x12, 0x7d, 0x30, 0xf5, + 0x2f, 0x7a, 0xa1, 0x30, 0x7a, 0x11, 0x6e, 0x12, 0x75, 0xca, 0x12, 0x40, 0xdc, 0x7e, 0xb3, 0x3f, + 0xf1, 0x60, 0x03, 0x12, 0x43, 0xd4, 0x75, 0xf1, 0x00, 0x12, 0x76, 0x6f, 0xd2, 0xaf, 0x02, 0x30, + 0x00, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x5f, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xa9, 0x25, 0x87, 0x03, 0xa9, 0xd5, 0x87, 0xd2, 0x93, 0x89, 0x08, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x78, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xc2, 0x93, 0x89, 0x08, 0x7e, 0x08, 0x00, 0x20, - 0x7e, 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x8e, 0x02, 0x7e, 0x4b, 0x7e, 0x08, - 0x01, 0x59, 0x7e, 0x44, 0x28, 0x7c, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xa0, 0x02, 0x7e, 0x4b, - 0x7e, 0x08, 0x00, 0x59, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xb2, 0x02, - 0x7e, 0x4b, 0x75, 0x57, 0x20, 0x75, 0x56, 0x30, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x54, 0x58, 0x75, - 0x55, 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, - 0x00, 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, + 0x7e, 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x8e, 0x02, 0x7c, 0x30, 0x7e, 0x08, + 0x01, 0x6f, 0x7e, 0x44, 0x28, 0x7c, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xa0, 0x02, 0x7c, 0x30, + 0x7e, 0x08, 0x00, 0x6f, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xb2, 0x02, + 0x7c, 0x30, 0x75, 0x6d, 0x20, 0x75, 0x6c, 0x30, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x6a, 0x58, 0x75, + 0x6b, 0x08, 0x75, 0x67, 0x08, 0x75, 0x69, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, + 0x00, 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x58, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, 0xb8, 0x7f, 0x75, 0xb3, 0x07, 0x75, 0xb2, 0x07, 0xd2, 0xa9, 0x22, 0xd2, 0x92, 0xe4, 0xd5, 0xe0, - 0xfd, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, - 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x72, 0x0b, 0x20, - 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, 0xb0, + 0xfd, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2f, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, + 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x7e, 0x0b, 0x20, + 0xbe, 0x21, 0x2f, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c, - 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74, 0xbf, - 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, 0x74, - 0x03, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, 0x00, - 0x10, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0, 0x00, - 0x10, 0x54, 0x08, 0x19, 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c, 0xb2, - 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x41, 0x99, 0x89, 0x24, 0x41, 0xa9, 0x41, 0xc6, 0x41, 0xe3, 0x42, - 0x00, 0x42, 0x1d, 0x42, 0x3a, 0x42, 0x57, 0x42, 0x74, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x08, 0x7e, - 0x04, 0x09, 0xcd, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x6d, 0x00, 0x7a, 0x07, 0x01, - 0x79, 0x7a, 0x07, 0x01, 0x89, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x09, 0x7e, 0x04, 0x0d, 0xcd, - 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7b, 0x7a, 0x07, - 0x01, 0x8b, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x0a, 0x7e, 0x04, 0x11, 0xcd, 0x7a, 0x07, 0x01, - 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d, 0x22, - 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x0b, 0x7e, 0x04, 0x15, 0xcd, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, - 0x01, 0x6f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7f, 0x7a, 0x07, 0x01, 0x8f, 0x22, 0xc2, 0x14, 0xc2, - 0x1c, 0xc2, 0x0c, 0x7e, 0x04, 0x19, 0xcd, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x6d, - 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2, 0x0d, - 0x7e, 0x04, 0x1d, 0xcd, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a, 0x07, - 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04, 0x21, - 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85, 0x7a, - 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07, - 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01, 0x97, - 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0x9c, 0x89, 0x24, 0x42, 0xac, 0x42, 0xc3, - 0x42, 0xda, 0x42, 0xf1, 0x43, 0x08, 0x43, 0x1f, 0x43, 0x36, 0x43, 0x4d, 0x30, 0x40, 0x07, 0x20, - 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80, 0x02, - 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, 0x07, - 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a, 0x04, - 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07, 0x20, 0x52, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2a, - 0x22, 0x30, 0x43, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, 0x4b, 0x07, 0x20, 0x53, - 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x44, 0x07, 0x20, 0x5c, 0x04, 0xc2, 0x2c, - 0x80, 0x0c, 0x30, 0x4c, 0x07, 0x20, 0x54, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22, 0x30, - 0x45, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x55, 0x04, 0xc2, - 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x46, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80, 0x0c, - 0x30, 0x4e, 0x07, 0x20, 0x56, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, 0x47, 0x07, - 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x57, 0x04, 0xc2, 0x2f, 0x80, - 0x02, 0xd2, 0x2f, 0x22, 0x43, 0xcc, 0x43, 0x79, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23, 0x0a, - 0x5b, 0x49, 0x55, 0x43, 0x64, 0x99, 0x54, 0xd3, 0x22, 0xa9, 0xc5, 0x87, 0x12, 0x43, 0xd7, 0x7e, - 0x04, 0x05, 0xcd, 0x7a, 0x07, 0x01, 0xc1, 0x7a, 0x07, 0x01, 0xc3, 0x7e, 0x04, 0x01, 0xcd, 0x7a, - 0x07, 0x01, 0xc7, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x04, 0x76, 0xbd, 0x7a, 0x05, 0x4b, 0x75, 0xf1, - 0x01, 0x75, 0xe1, 0x1f, 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x75, 0xf1, 0x02, 0x75, 0xe1, 0x03, - 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x43, 0xa2, 0x1c, 0x12, 0x40, 0xeb, 0x7e, 0x20, 0x00, 0x12, - 0x41, 0x8e, 0x0b, 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0xa9, 0xd5, 0x87, 0x12, - 0x43, 0xd7, 0xd2, 0x92, 0xc2, 0xa8, 0x22, 0x75, 0xa3, 0x00, 0x53, 0xa2, 0x03, 0x75, 0xc1, 0x00, - 0x53, 0xc0, 0x03, 0x7e, 0x00, 0x05, 0x7a, 0x01, 0xf1, 0x43, 0xf4, 0x80, 0x43, 0xe4, 0x80, 0xe5, - 0xf2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xf2, 0xe5, 0xe2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xe2, 0x75, - 0xe1, 0x10, 0xa5, 0xd8, 0xe1, 0x22, 0x12, 0x44, 0x76, 0x12, 0x44, 0x8c, 0x12, 0x45, 0x27, 0x12, - 0x45, 0x57, 0x12, 0x49, 0x0f, 0x12, 0x44, 0xd8, 0x80, 0xec, 0xca, 0x09, 0x12, 0x44, 0x58, 0x10, - 0x01, 0x12, 0xd5, 0x51, 0x1e, 0x63, 0x53, 0x01, 0x7e, 0x00, 0x54, 0x2e, 0x01, 0x53, 0xa5, 0xe6, - 0xf5, 0x51, 0x80, 0x12, 0x20, 0x02, 0x1e, 0x75, 0x53, 0x00, 0x85, 0x54, 0x51, 0xd2, 0x02, 0x74, - 0x00, 0x80, 0x0d, 0x30, 0x02, 0x0f, 0xc2, 0x02, 0x7e, 0x00, 0x56, 0x2e, 0x01, 0x53, 0xa5, 0xe6, - 0x53, 0x90, 0xcf, 0x42, 0x90, 0xda, 0x09, 0x32, 0xe5, 0x23, 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, - 0x09, 0xb1, 0x01, 0xb9, 0xb4, 0x00, 0x02, 0x80, 0x05, 0x14, 0x19, 0xb1, 0x01, 0xb9, 0xa5, 0x0a, - 0xbe, 0x21, 0x2e, 0x78, 0xeb, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, 0x3f, 0xf1, 0xb4, 0x01, 0x0a, 0xc0, - 0xf1, 0x75, 0xf1, 0x02, 0x12, 0x72, 0xff, 0xd0, 0xf1, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, - 0x60, 0x43, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, - 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0, 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, - 0x04, 0x0a, 0x32, 0x09, 0x53, 0x6a, 0x93, 0x5e, 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, - 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e, 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, - 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x26, 0x60, 0x36, 0x7e, 0x20, - 0x00, 0x7e, 0x30, 0x01, 0xe5, 0x26, 0xa5, 0x5b, 0x68, 0x21, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, - 0x32, 0x01, 0x79, 0xbe, 0x34, 0x00, 0x00, 0x68, 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, - 0x21, 0xca, 0x19, 0x49, 0x22, 0x45, 0x17, 0x99, 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, - 0x21, 0x2e, 0x78, 0xd0, 0xd2, 0xaf, 0x22, 0x4a, 0x98, 0x4d, 0xcd, 0x51, 0x02, 0x54, 0x37, 0x57, - 0x6c, 0x5a, 0xa1, 0x5d, 0xd6, 0x61, 0x0b, 0xc2, 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, - 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x45, 0x44, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, - 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x12, 0x6a, 0xac, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, - 0xb2, 0x6a, 0x93, 0xf4, 0x52, 0x24, 0x22, 0xc2, 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20, 0x00, - 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x45, 0x74, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, - 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x45, 0x7f, 0x89, 0x24, 0x45, - 0x8f, 0x45, 0xff, 0x46, 0x6f, 0x46, 0xdf, 0x47, 0x4f, 0x47, 0xbf, 0x48, 0x2f, 0x48, 0x9f, 0x7e, - 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4d, - 0x96, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x89, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x89, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xb9, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xb9, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x18, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xb9, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x50, - 0xcb, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x8b, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8b, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xba, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xba, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x19, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xba, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x54, - 0x00, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x8d, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8d, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbb, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xbb, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1a, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xbb, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x57, - 0x35, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x8f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbc, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xbc, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1b, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xbc, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x81, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5a, - 0x6a, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x91, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x91, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbd, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xbd, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1c, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xbd, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5d, - 0x9f, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x93, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x93, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbe, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xbe, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1d, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xbe, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x60, - 0xd4, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x95, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x95, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbf, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xbf, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1e, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xbf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, - 0x27, 0x01, 0x87, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x64, - 0x09, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, - 0x97, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x97, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xc0, 0x80, 0x2e, - 0x7e, 0x63, 0x01, 0xc0, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, - 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1f, 0x6c, 0x00, - 0x7a, 0x03, 0x01, 0xc0, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0xc2, - 0xaf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0xa9, 0x32, 0xf2, 0x1a, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, - 0x00, 0x00, 0x78, 0x10, 0xe5, 0xf5, 0x33, 0x82, 0xe7, 0x40, 0x09, 0x85, 0x31, 0x2f, 0x12, 0x7e, - 0x30, 0x75, 0xf6, 0x00, 0xd0, 0xf1, 0xd2, 0xaf, 0x22, 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, - 0xf0, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xd2, 0x01, 0x75, 0x2f, 0x89, 0x12, 0x7e, 0x30, 0x7e, - 0x14, 0x80, 0x00, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x49, 0xd8, 0x20, 0x70, 0x5a, - 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x49, 0xf0, 0x20, 0x71, 0x4b, 0xa5, - 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x08, 0xa5, 0x0a, 0x09, 0xb1, 0x00, - 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x20, 0x20, 0x72, 0x30, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, - 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x38, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, - 0x4a, 0x50, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x68, 0xa5, 0x0a, - 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x80, 0x30, 0x04, 0x0c, 0xc2, 0x04, 0xc0, - 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, - 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x75, 0x2f, 0x80, 0x12, 0x7e, 0x30, 0x54, 0x3e, - 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x66, 0x34, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, - 0x75, 0x2f, 0x81, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, - 0x66, 0x74, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x82, 0x12, 0x7e, 0x30, 0x54, 0x3e, - 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x66, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, - 0x75, 0x2f, 0x83, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, - 0x66, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x84, 0x12, 0x7e, 0x30, 0x54, 0x3e, - 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0x34, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, - 0x75, 0x2f, 0x85, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, - 0x67, 0x74, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x86, 0x12, 0x7e, 0x30, 0x54, 0x3e, - 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, - 0x75, 0x2f, 0x87, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, - 0x67, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x10, 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, - 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, - 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, - 0x03, 0x12, 0x4d, 0x96, 0x30, 0x30, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02, - 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01, 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, - 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, - 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, - 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x60, 0xc4, 0x22, 0xc2, - 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, - 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01, - 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, - 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, - 0x59, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, - 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x0d, 0xcd, - 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x09, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, - 0x59, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4b, 0x0b, 0x22, 0xd2, 0x08, 0x7e, - 0x04, 0x09, 0xcd, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x7e, - 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, - 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, - 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, - 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, - 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, - 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, - 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, - 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, - 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51, - 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x00, 0x00, 0x2e, 0x67, - 0x01, 0xa9, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, - 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, - 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, - 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, - 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, - 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, - 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, - 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, - 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, - 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, - 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, - 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, - 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4c, 0x6f, 0x75, - 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, - 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0xda, - 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4c, 0x6f, 0xda, 0xb8, 0x02, - 0x4d, 0x96, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, - 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, - 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, - 0x50, 0x80, 0x02, 0xc2, 0x50, 0x12, 0x42, 0xac, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, - 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, - 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, - 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, - 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4c, 0xc3, 0x75, - 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x09, 0x01, - 0x22, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x81, - 0x00, 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, - 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x50, 0xcb, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2, - 0x09, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d, - 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e, - 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, - 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, - 0x10, 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, - 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9b, 0x28, 0x04, 0x7e, 0x27, - 0x01, 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, - 0x7a, 0x37, 0x01, 0x7b, 0x7e, 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xcc, - 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, - 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, - 0x30, 0x9e, 0x44, 0x11, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x0d, 0xcd, 0x7d, 0x24, - 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5b, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4e, - 0x40, 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x0d, 0xcd, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, - 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, - 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, - 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xab, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, - 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, - 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, - 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27, 0x01, 0xab, 0x1b, 0x38, 0x20, 0x0b, 0x35, - 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, - 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, - 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, - 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, - 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xab, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, - 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, - 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, - 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, - 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, - 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, - 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, - 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, - 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, - 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, - 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, - 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, - 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, - 0xe7, 0x02, 0x4f, 0xa4, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, - 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, - 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, - 0x4f, 0xa4, 0xda, 0xb8, 0x02, 0x50, 0xcb, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, - 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, - 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, - 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x12, 0x42, 0xc3, 0x02, 0x65, 0x9c, - 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, - 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, - 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, - 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, - 0x22, 0x02, 0x4f, 0xf8, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, - 0x30, 0x22, 0x10, 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x75, 0x2f, 0xa2, 0x12, - 0x7e, 0x30, 0x7e, 0x14, 0x82, 0x00, 0x80, 0x06, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, - 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x54, 0x00, 0x30, 0x32, - 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0a, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x62, 0x7e, 0x37, 0x01, 0x7d, - 0x7e, 0x27, 0x01, 0x9d, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, - 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xcc, - 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, - 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x62, 0xc4, 0x22, 0xc2, 0x62, 0x2d, 0x23, 0x68, 0x78, 0x6d, - 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, - 0x9d, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x9d, 0x32, 0x7d, 0x02, 0x2e, - 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, - 0x42, 0xbe, 0x44, 0x15, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x7e, - 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, - 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x15, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, - 0x34, 0x11, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5d, 0x12, 0x68, 0x34, 0xbe, 0x25, - 0x20, 0x78, 0x03, 0x02, 0x51, 0x75, 0x22, 0xd2, 0x0a, 0x7e, 0x04, 0x11, 0xcd, 0x7a, 0x07, 0x01, - 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, - 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, - 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24, - 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, - 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, - 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad, - 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, - 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, - 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, - 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, - 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x02, 0x00, 0x2e, 0x67, 0x01, 0xad, 0x9e, 0x24, 0x00, 0x02, - 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, - 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, - 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, - 0x23, 0x23, 0x44, 0x02, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, - 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, - 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, - 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, - 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, - 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, - 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, - 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, - 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, - 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x52, 0xd9, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, - 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, - 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, - 0x68, 0x07, 0xca, 0xb8, 0x12, 0x52, 0xd9, 0xda, 0xb8, 0x02, 0x54, 0x00, 0x09, 0xb1, 0x00, 0x18, - 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, - 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, - 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x12, - 0x42, 0xda, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, - 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, - 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, - 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, - 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x53, 0x2d, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, - 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b, - 0x22, 0x75, 0x2f, 0xa3, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03, + 0x74, 0x07, 0xa9, 0x20, 0x30, 0x0b, 0xa9, 0x35, 0x30, 0x05, 0xbe, 0x20, 0x01, 0x28, 0x02, 0x74, + 0x0f, 0x19, 0xb0, 0x00, 0x04, 0xa9, 0x33, 0x30, 0x18, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74, + 0x28, 0xa9, 0x20, 0x30, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, 0x74, 0x03, 0x19, 0xb0, 0x00, + 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, 0x00, 0x10, 0x22, 0x7e, 0x04, + 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0, 0x00, 0x10, 0x54, 0x08, 0x19, + 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, + 0x22, 0x41, 0xa5, 0x89, 0x24, 0x41, 0xb5, 0x41, 0xd4, 0x41, 0xf3, 0x42, 0x12, 0x42, 0x31, 0x42, + 0x50, 0x42, 0x6f, 0x42, 0x8e, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x20, 0xc2, 0x08, 0x7e, 0x04, 0x09, + 0xe3, 0x7a, 0x07, 0x01, 0x6f, 0x7a, 0x07, 0x01, 0x7f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x8f, 0x7a, + 0x07, 0x01, 0x9f, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x21, 0xc2, 0x09, 0x7e, 0x04, 0x0d, 0xe3, + 0x7a, 0x07, 0x01, 0x71, 0x7a, 0x07, 0x01, 0x81, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x91, 0x7a, 0x07, + 0x01, 0xa1, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x22, 0xc2, 0x0a, 0x7e, 0x04, 0x11, 0xe3, 0x7a, + 0x07, 0x01, 0x73, 0x7a, 0x07, 0x01, 0x83, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x93, 0x7a, 0x07, 0x01, + 0xa3, 0x22, 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x23, 0xc2, 0x0b, 0x7e, 0x04, 0x15, 0xe3, 0x7a, 0x07, + 0x01, 0x75, 0x7a, 0x07, 0x01, 0x85, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x95, 0x7a, 0x07, 0x01, 0xa5, + 0x22, 0xc2, 0x14, 0xc2, 0x1c, 0xc2, 0x24, 0xc2, 0x0c, 0x7e, 0x04, 0x19, 0xe3, 0x7a, 0x07, 0x01, + 0x77, 0x7a, 0x07, 0x01, 0x87, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x97, 0x7a, 0x07, 0x01, 0xa7, 0x22, + 0xc2, 0x15, 0xc2, 0x1d, 0xc2, 0x25, 0xc2, 0x0d, 0x7e, 0x04, 0x1d, 0xe3, 0x7a, 0x07, 0x01, 0x79, + 0x7a, 0x07, 0x01, 0x89, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x99, 0x7a, 0x07, 0x01, 0xa9, 0x22, 0xc2, + 0x16, 0xc2, 0x1e, 0xc2, 0x26, 0xc2, 0x0e, 0x7e, 0x04, 0x21, 0xe3, 0x7a, 0x07, 0x01, 0x7b, 0x7a, + 0x07, 0x01, 0x8b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x9b, 0x7a, 0x07, 0x01, 0xab, 0x22, 0xc2, 0x17, + 0xc2, 0x1f, 0xc2, 0x27, 0xc2, 0x0f, 0x7e, 0x04, 0x25, 0xe3, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07, + 0x01, 0x8d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x9d, 0x7a, 0x07, 0x01, 0xad, 0x22, 0x7c, 0xb2, 0x23, + 0x0a, 0x2b, 0x49, 0x22, 0x42, 0xb8, 0x89, 0x24, 0x42, 0xc8, 0x42, 0xe9, 0x43, 0x0a, 0x43, 0x2b, + 0x43, 0x4c, 0x43, 0x6d, 0x43, 0x8e, 0x43, 0xaf, 0x30, 0x50, 0x07, 0x20, 0x68, 0x04, 0xc2, 0x28, + 0x80, 0x16, 0x30, 0x40, 0x07, 0x20, 0x60, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, + 0x58, 0x04, 0xc2, 0x28, 0x80, 0x02, 0xd2, 0x28, 0x22, 0x30, 0x51, 0x07, 0x20, 0x69, 0x04, 0xc2, + 0x29, 0x80, 0x16, 0x30, 0x41, 0x07, 0x20, 0x61, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, 0x07, + 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x52, 0x07, 0x20, 0x6a, 0x04, + 0xc2, 0x2a, 0x80, 0x16, 0x30, 0x42, 0x07, 0x20, 0x62, 0x04, 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, + 0x07, 0x20, 0x5a, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2a, 0x22, 0x30, 0x53, 0x07, 0x20, 0x6b, + 0x04, 0xc2, 0x2b, 0x80, 0x16, 0x30, 0x43, 0x07, 0x20, 0x63, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, + 0x4b, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x54, 0x07, 0x20, + 0x6c, 0x04, 0xc2, 0x2c, 0x80, 0x16, 0x30, 0x44, 0x07, 0x20, 0x64, 0x04, 0xc2, 0x2c, 0x80, 0x0c, + 0x30, 0x4c, 0x07, 0x20, 0x5c, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22, 0x30, 0x55, 0x07, + 0x20, 0x6d, 0x04, 0xc2, 0x2d, 0x80, 0x16, 0x30, 0x45, 0x07, 0x20, 0x65, 0x04, 0xc2, 0x2d, 0x80, + 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x56, + 0x07, 0x20, 0x6e, 0x04, 0xc2, 0x2e, 0x80, 0x16, 0x30, 0x46, 0x07, 0x20, 0x66, 0x04, 0xc2, 0x2e, + 0x80, 0x0c, 0x30, 0x4e, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, + 0x57, 0x07, 0x20, 0x6f, 0x04, 0xc2, 0x2f, 0x80, 0x16, 0x30, 0x47, 0x07, 0x20, 0x67, 0x04, 0xc2, + 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x02, 0xd2, 0x2f, 0x22, + 0x44, 0x38, 0x43, 0xe5, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23, 0x0a, 0x5b, 0x49, 0x55, 0x43, + 0xd0, 0x99, 0x54, 0xd3, 0x22, 0xa9, 0xc5, 0x87, 0x12, 0x44, 0x43, 0x7e, 0x04, 0x05, 0xe3, 0x7a, + 0x07, 0x01, 0xd7, 0x7a, 0x07, 0x01, 0xd9, 0x7e, 0x04, 0x01, 0xe3, 0x7a, 0x07, 0x01, 0xdd, 0x7a, + 0x07, 0x01, 0xdf, 0x7e, 0x04, 0x74, 0xad, 0x7a, 0x05, 0x61, 0x75, 0xf1, 0x01, 0x75, 0xe1, 0x1f, + 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x75, 0xf1, 0x02, 0x75, 0xe1, 0x03, 0x75, 0xe4, 0x04, 0x75, + 0xf4, 0x04, 0x43, 0xa2, 0x1c, 0x12, 0x40, 0xeb, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x9a, 0x0b, 0x20, + 0xbe, 0x21, 0x2f, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0xa9, 0xd5, 0x87, 0x12, 0x44, 0x43, 0xd2, 0x92, + 0xc2, 0xa8, 0x22, 0x75, 0xa3, 0x00, 0x53, 0xa2, 0x03, 0x75, 0xc1, 0x00, 0x53, 0xc0, 0x03, 0x7e, + 0x00, 0x05, 0x7a, 0x01, 0xf1, 0x43, 0xf4, 0x80, 0x43, 0xe4, 0x80, 0xe5, 0xf2, 0x54, 0x7f, 0x44, + 0x08, 0xf5, 0xf2, 0xe5, 0xe2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xe2, 0x75, 0xe1, 0x10, 0xa5, 0xd8, + 0xe1, 0x22, 0xca, 0x09, 0x12, 0x30, 0x20, 0x10, 0x01, 0x12, 0xd5, 0x67, 0x1e, 0x63, 0x69, 0x01, + 0x7e, 0x00, 0x6a, 0x2e, 0x01, 0x69, 0xa5, 0xe6, 0xf5, 0x67, 0x80, 0x12, 0x20, 0x02, 0x1e, 0x75, + 0x69, 0x00, 0x85, 0x6a, 0x67, 0xd2, 0x02, 0x74, 0x00, 0x80, 0x0d, 0x30, 0x02, 0x0f, 0xc2, 0x02, + 0x7e, 0x00, 0x6c, 0x2e, 0x01, 0x69, 0xa5, 0xe6, 0x53, 0x90, 0xcf, 0x42, 0x90, 0xda, 0x09, 0x32, + 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, 0xf0, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xd2, 0x01, + 0x75, 0x31, 0x89, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x80, 0x00, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, + 0x03, 0x02, 0x45, 0x4f, 0x20, 0x78, 0x5a, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, + 0x02, 0x45, 0x67, 0x20, 0x79, 0x4b, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, + 0x45, 0x7f, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0x97, 0x20, 0x7a, + 0x30, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0xaf, 0xa5, 0x0a, 0x09, + 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, 0xc7, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, + 0xe0, 0x03, 0x02, 0x45, 0xdf, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x45, + 0xf7, 0x30, 0x04, 0x0c, 0xc2, 0x04, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, + 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x75, + 0x31, 0x80, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, + 0x2b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x81, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, + 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x6b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, + 0x31, 0x82, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, + 0xab, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x83, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, + 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0xeb, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, + 0x31, 0x84, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, + 0x2b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x85, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, + 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, 0x6b, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, + 0x31, 0x86, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, + 0xab, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x75, 0x31, 0x87, 0x12, 0x7c, 0x15, 0x54, 0x3e, 0x0a, + 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x64, 0xeb, 0xca, 0x06, 0xc6, 0x44, 0x89, 0x54, 0x10, + 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x75, 0x31, 0xa0, 0x12, 0x7c, 0x15, 0x7e, + 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x49, 0x30, 0x20, 0xe6, 0x03, 0xd2, 0x08, + 0x22, 0x30, 0x30, 0x49, 0xd2, 0x70, 0x7e, 0x37, 0x01, 0x8f, 0x7e, 0x27, 0x01, 0xaf, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x48, 0x7a, 0x05, 0x48, 0x7a, 0x37, 0x01, 0x8f, 0x7e, 0x37, + 0x01, 0x6f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x6f, + 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, + 0x70, 0xc4, 0x22, 0xc2, 0x70, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x8f, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xaf, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0xaf, 0x7e, 0x37, 0x01, 0x8f, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x48, 0x7a, 0x05, 0x48, 0x7a, + 0x37, 0x01, 0x8f, 0x7e, 0x37, 0x01, 0x6f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xe2, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x6f, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, + 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x0d, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x09, 0xe3, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x6f, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x46, 0x7f, + 0x22, 0xd2, 0x08, 0x7e, 0x04, 0x09, 0xe3, 0x7a, 0x07, 0x01, 0x6f, 0x7a, 0x07, 0x01, 0x7f, 0x75, + 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, + 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, + 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xbf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, + 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, + 0x01, 0xdf, 0x7e, 0x24, 0x00, 0x00, 0x2e, 0x27, 0x01, 0xbf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, + 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, + 0x30, 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, + 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, + 0x00, 0x00, 0x2e, 0x67, 0x01, 0xbf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, + 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, + 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, + 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69, + 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, + 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, + 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, + 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, + 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, + 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, + 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, + 0x02, 0x47, 0xe3, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, + 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, + 0xd2, 0x10, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x47, + 0xe3, 0xda, 0xb8, 0x02, 0x49, 0x30, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, + 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, + 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, + 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, + 0x68, 0x80, 0x02, 0xc2, 0x68, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x60, 0x80, 0x02, + 0xc2, 0x60, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0x12, + 0x42, 0xc8, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x48, 0x35, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, + 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x09, 0x01, 0x22, 0x20, 0x29, 0x03, 0xd2, 0x09, + 0x22, 0x75, 0x31, 0xa1, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x81, 0x00, 0x80, 0x06, 0x20, 0x29, 0x03, + 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, + 0x12, 0x4c, 0x88, 0x20, 0xe6, 0x03, 0xd2, 0x09, 0x22, 0x30, 0x31, 0x49, 0xd2, 0x71, 0x7e, 0x37, + 0x01, 0x91, 0x7e, 0x27, 0x01, 0xb1, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4a, 0x7a, + 0x05, 0x4a, 0x7a, 0x37, 0x01, 0x91, 0x7e, 0x37, 0x01, 0x71, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x11, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x71, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, + 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x71, 0xc4, 0x22, 0xc2, 0x71, 0x2d, 0x23, 0x68, + 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x91, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, + 0x27, 0x01, 0xb1, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb1, 0x7e, 0x37, 0x01, 0x91, 0x9d, 0x32, 0x7d, + 0x02, 0x2e, 0x05, 0x4a, 0x7a, 0x05, 0x4a, 0x7a, 0x37, 0x01, 0x91, 0x7e, 0x37, 0x01, 0x71, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x71, 0x75, 0x31, 0x94, + 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, + 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x11, 0xe3, 0x9d, 0x24, 0x12, 0x65, + 0x2b, 0x7e, 0x34, 0x0d, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x71, 0x12, 0x65, 0x2b, + 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x49, 0xd7, 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x0d, 0xe3, 0x7a, + 0x07, 0x01, 0x71, 0x7a, 0x07, 0x01, 0x81, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, + 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc1, + 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, + 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27, + 0x01, 0xc1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, + 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xc1, 0x9e, 0x24, + 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, + 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, + 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, + 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, + 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, + 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, + 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, + 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, + 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, + 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4b, 0x3b, 0x75, 0x31, 0x99, 0x12, 0x7c, + 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, + 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4b, 0x3b, 0xda, 0xb8, 0x02, 0x4c, 0x88, 0x09, 0xb1, + 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, + 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, + 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, + 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x69, 0x80, 0x02, 0xc2, 0x69, 0xa5, 0xfd, 0x5e, + 0x50, 0x20, 0x68, 0x04, 0xd2, 0x61, 0x80, 0x02, 0xc2, 0x61, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, + 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0x12, 0x42, 0xe9, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, + 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, + 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, + 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, + 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4b, + 0x8d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, + 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x75, 0x31, 0xa2, 0x12, 0x7c, 0x15, 0x7e, + 0x14, 0x82, 0x00, 0x80, 0x06, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x4f, 0xe0, 0x20, 0xe6, 0x03, 0xd2, 0x0a, + 0x22, 0x30, 0x32, 0x49, 0xd2, 0x72, 0x7e, 0x37, 0x01, 0x93, 0x7e, 0x27, 0x01, 0xb3, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4c, 0x7a, 0x05, 0x4c, 0x7a, 0x37, 0x01, 0x93, 0x7e, 0x37, + 0x01, 0x73, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x73, + 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, + 0x72, 0xc4, 0x22, 0xc2, 0x72, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x93, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xb3, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0xb3, 0x7e, 0x37, 0x01, 0x93, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x4c, 0x7a, 0x05, 0x4c, 0x7a, + 0x37, 0x01, 0x93, 0x7e, 0x37, 0x01, 0x73, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xe2, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x73, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, + 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x15, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x11, 0xe3, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x73, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4d, 0x2f, + 0x22, 0xd2, 0x0a, 0x7e, 0x04, 0x11, 0xe3, 0x7a, 0x07, 0x01, 0x73, 0x7a, 0x07, 0x01, 0x83, 0x75, + 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, + 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, + 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc3, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, + 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, + 0x01, 0xdf, 0x7e, 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xc3, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, + 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, + 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, + 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, + 0x02, 0x00, 0x2e, 0x67, 0x01, 0xc3, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, + 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, + 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, + 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x02, 0x7a, 0x69, + 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, + 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, + 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, + 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, + 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, + 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, + 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, + 0x02, 0x4e, 0x93, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, + 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, + 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4e, + 0x93, 0xda, 0xb8, 0x02, 0x4f, 0xe0, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, + 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, + 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, + 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, + 0x6a, 0x80, 0x02, 0xc2, 0x6a, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x62, 0x80, 0x02, + 0xc2, 0x62, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0x12, + 0x43, 0x0a, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4e, 0xe5, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, + 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b, + 0x22, 0x75, 0x31, 0xa3, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03, 0xd2, 0x0b, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, - 0x12, 0x57, 0x35, 0x30, 0x33, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0b, 0x22, 0x30, 0xe6, 0x02, 0xd2, - 0x63, 0x7e, 0x37, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x9f, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, - 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01, 0x5f, 0x7d, 0x43, 0x2d, - 0x42, 0xbe, 0x44, 0x19, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5f, 0x75, 0x2f, 0x94, 0x12, 0x7e, - 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x63, 0xc4, 0x22, 0xc2, 0x63, - 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, - 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9f, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9f, 0x7e, 0x37, 0x01, 0x7f, - 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, - 0x01, 0x5f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x19, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5f, - 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, - 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x19, 0xcd, 0x9d, - 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x15, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5f, - 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x54, 0xaa, 0x22, 0xd2, 0x0b, 0x7e, 0x04, - 0x15, 0xcd, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, 0x01, 0x6f, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, - 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, - 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, - 0x27, 0x01, 0xaf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, - 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, - 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x03, - 0x00, 0x2e, 0x27, 0x01, 0xaf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, - 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, - 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, - 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, - 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, - 0xaf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, - 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, - 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, - 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, - 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, - 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, - 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, - 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, - 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, - 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, - 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, - 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, - 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x56, 0x0e, 0x75, 0x2f, - 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, - 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, - 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x56, 0x0e, 0xda, 0xb8, 0x02, 0x57, - 0x35, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, - 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, - 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, - 0x80, 0x02, 0xc2, 0x53, 0x12, 0x42, 0xf1, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, - 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, - 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, - 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, - 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x56, 0x62, 0x75, 0x2f, - 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0c, 0x01, 0x22, - 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x2f, 0xa4, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x84, 0x00, - 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, - 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5a, 0x6a, 0x30, 0x34, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0c, - 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x64, 0x7e, 0x37, 0x01, 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32, - 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, - 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61, - 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, - 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, - 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01, - 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, - 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38, - 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, - 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, - 0x9e, 0x44, 0x1d, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x19, 0xcd, 0x7d, 0x24, 0x2d, - 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x57, 0xdf, - 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x19, 0xcd, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75, - 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, - 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, - 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb1, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, - 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, - 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, - 0x01, 0xc9, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, 0xb1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, - 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, - 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, + 0x12, 0x53, 0x38, 0x20, 0xe6, 0x03, 0xd2, 0x0b, 0x22, 0x30, 0x33, 0x49, 0xd2, 0x73, 0x7e, 0x37, + 0x01, 0x95, 0x7e, 0x27, 0x01, 0xb5, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x4e, 0x7a, + 0x05, 0x4e, 0x7a, 0x37, 0x01, 0x95, 0x7e, 0x37, 0x01, 0x75, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x19, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x75, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, + 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x73, 0xc4, 0x22, 0xc2, 0x73, 0x2d, 0x23, 0x68, + 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x95, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, + 0x27, 0x01, 0xb5, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb5, 0x7e, 0x37, 0x01, 0x95, 0x9d, 0x32, 0x7d, + 0x02, 0x2e, 0x05, 0x4e, 0x7a, 0x05, 0x4e, 0x7a, 0x37, 0x01, 0x95, 0x7e, 0x37, 0x01, 0x75, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x19, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x75, 0x75, 0x31, 0x94, + 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, + 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x19, 0xe3, 0x9d, 0x24, 0x12, 0x65, + 0x2b, 0x7e, 0x34, 0x15, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x75, 0x12, 0x65, 0x2b, + 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x50, 0x87, 0x22, 0xd2, 0x0b, 0x7e, 0x04, 0x15, 0xe3, 0x7a, + 0x07, 0x01, 0x75, 0x7a, 0x07, 0x01, 0x85, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, + 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc5, + 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, + 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x03, 0x00, 0x2e, 0x27, + 0x01, 0xc5, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, + 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, 0xc5, 0x9e, 0x24, + 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, + 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, + 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, + 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, + 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, + 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, + 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, + 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, + 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, + 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x51, 0xeb, 0x75, 0x31, 0x99, 0x12, 0x7c, + 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, + 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x51, 0xeb, 0xda, 0xb8, 0x02, 0x53, 0x38, 0x09, 0xb1, + 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, + 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, + 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, + 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6b, 0x80, 0x02, 0xc2, 0x6b, 0xa5, 0xfd, 0x5e, + 0x50, 0x20, 0x68, 0x04, 0xd2, 0x63, 0x80, 0x02, 0xc2, 0x63, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, + 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0x12, 0x43, 0x2b, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, + 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, + 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, + 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, + 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x52, + 0x3d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, + 0x0c, 0x01, 0x22, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x31, 0xa4, 0x12, 0x7c, 0x15, 0x7e, + 0x14, 0x84, 0x00, 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x56, 0x90, 0x20, 0xe6, 0x03, 0xd2, 0x0c, + 0x22, 0x30, 0x34, 0x49, 0xd2, 0x74, 0x7e, 0x37, 0x01, 0x97, 0x7e, 0x27, 0x01, 0xb7, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x50, 0x7a, 0x05, 0x50, 0x7a, 0x37, 0x01, 0x97, 0x7e, 0x37, + 0x01, 0x77, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x77, + 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, + 0x74, 0xc4, 0x22, 0xc2, 0x74, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x97, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xb7, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0xb7, 0x7e, 0x37, 0x01, 0x97, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x50, 0x7a, 0x05, 0x50, 0x7a, + 0x37, 0x01, 0x97, 0x7e, 0x37, 0x01, 0x77, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xe2, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x77, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, + 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x1d, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x19, 0xe3, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x77, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x53, 0xdf, + 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x19, 0xe3, 0x7a, 0x07, 0x01, 0x77, 0x7a, 0x07, 0x01, 0x87, 0x75, + 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, + 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, + 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, + 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, + 0x01, 0xdf, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, 0xc7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, + 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22, - 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, - 0x04, 0x00, 0x2e, 0x67, 0x01, 0xb1, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, - 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, - 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, + 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, + 0x04, 0x00, 0x2e, 0x67, 0x01, 0xc7, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, + 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, + 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x04, 0x7a, 0x69, - 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, - 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, - 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, - 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, - 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, - 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, - 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, + 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, + 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, + 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, + 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, + 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, - 0x02, 0x59, 0x43, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, + 0x02, 0x55, 0x43, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, - 0xd2, 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x59, - 0x43, 0xda, 0xb8, 0x02, 0x5a, 0x6a, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, - 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, - 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, - 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x12, 0x43, 0x08, 0x02, 0x65, 0x9c, 0x75, - 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, - 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, - 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, - 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, - 0x02, 0x59, 0x97, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, - 0x22, 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x7e, - 0x30, 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, - 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5d, 0x9f, 0x30, 0x35, 0x06, - 0x20, 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e, - 0x27, 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a, - 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x21, 0xcc, 0x38, - 0x68, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, - 0x30, 0x12, 0x68, 0x34, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, - 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3, - 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, - 0x3c, 0x7a, 0x05, 0x3c, 0x7a, 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, - 0xbe, 0x44, 0x21, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, - 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, - 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x21, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, - 0x1d, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x63, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, - 0x78, 0x03, 0x02, 0x5b, 0x14, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x1d, 0xcd, 0x7a, 0x07, 0x01, 0x63, - 0x7a, 0x07, 0x01, 0x73, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, - 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, - 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb3, 0x2e, 0x24, 0x00, - 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, - 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, - 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, 0x01, 0xb3, 0x1b, - 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, - 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, - 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, - 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, - 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67, 0x01, 0xb3, 0x9e, 0x24, 0x00, 0x02, 0x40, - 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, - 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, - 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, - 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, - 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, - 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, - 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, - 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, - 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, - 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, - 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, - 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, - 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5c, 0x78, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, + 0xd2, 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x55, + 0x43, 0xda, 0xb8, 0x02, 0x56, 0x90, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, + 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, + 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, + 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, + 0x6c, 0x80, 0x02, 0xc2, 0x6c, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x64, 0x80, 0x02, + 0xc2, 0x64, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0x12, + 0x43, 0x4c, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x55, 0x95, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, + 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, + 0x22, 0x75, 0x31, 0xa5, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, + 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, + 0x12, 0x59, 0xe8, 0x20, 0xe6, 0x03, 0xd2, 0x0d, 0x22, 0x30, 0x35, 0x49, 0xd2, 0x75, 0x7e, 0x37, + 0x01, 0x99, 0x7e, 0x27, 0x01, 0xb9, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x52, 0x7a, + 0x05, 0x52, 0x7a, 0x37, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x21, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x79, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, + 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x75, 0xc4, 0x22, 0xc2, 0x75, 0x2d, 0x23, 0x68, + 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x99, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, + 0x27, 0x01, 0xb9, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xb9, 0x7e, 0x37, 0x01, 0x99, 0x9d, 0x32, 0x7d, + 0x02, 0x2e, 0x05, 0x52, 0x7a, 0x05, 0x52, 0x7a, 0x37, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x21, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x79, 0x75, 0x31, 0x94, + 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, + 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x21, 0xe3, 0x9d, 0x24, 0x12, 0x65, + 0x2b, 0x7e, 0x34, 0x1d, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x79, 0x12, 0x65, 0x2b, + 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x57, 0x37, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x1d, 0xe3, 0x7a, + 0x07, 0x01, 0x79, 0x7a, 0x07, 0x01, 0x89, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, + 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xc9, + 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, + 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, + 0x01, 0xc9, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, + 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, - 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, - 0x07, 0xca, 0xb8, 0x12, 0x5c, 0x78, 0xda, 0xb8, 0x02, 0x5d, 0x9f, 0x09, 0xb1, 0x00, 0x18, 0x7e, - 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, - 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, - 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, 0x02, 0xc2, 0x55, 0x12, 0x43, - 0x1f, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, - 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, - 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, - 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, - 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5c, 0xcc, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, - 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0e, 0x01, 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, - 0x75, 0x2f, 0xa6, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x86, 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, - 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, - 0x60, 0xd4, 0x30, 0x36, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0e, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x66, - 0x7e, 0x37, 0x01, 0x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, - 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, - 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, - 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d, - 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68, - 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d, - 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, - 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75, - 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, - 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x25, 0xcd, 0x9d, 0x24, - 0x12, 0x68, 0x34, 0x7e, 0x34, 0x21, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12, - 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5e, 0x49, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x21, - 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, - 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, - 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, - 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, - 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, - 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00, - 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, - 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, - 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, - 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, - 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x06, 0x00, 0x2e, 0x67, 0x01, 0xb5, - 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, - 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, - 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, - 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, - 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, - 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, - 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, - 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, - 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, - 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, - 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, - 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, - 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5f, 0xad, 0x75, 0x2f, 0x99, - 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, - 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, - 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5f, 0xad, 0xda, 0xb8, 0x02, 0x60, 0xd4, - 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, - 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, - 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, - 0x02, 0xc2, 0x56, 0x12, 0x43, 0x36, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, - 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, - 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, - 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, - 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x60, 0x01, 0x75, 0x2f, 0x95, - 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, - 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x87, 0x00, 0x80, - 0x06, 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, - 0xda, 0xb8, 0x68, 0x03, 0x12, 0x64, 0x09, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22, - 0x30, 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40, - 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01, - 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75, - 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x67, - 0xc4, 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87, - 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7, - 0x7e, 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, - 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x13, - 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, - 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, - 0x44, 0x29, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x25, 0xcd, 0x7d, 0x24, 0x2d, 0x43, - 0x7a, 0x47, 0x01, 0x67, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x61, 0x7e, 0x22, - 0xd2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f, - 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, - 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, - 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, - 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, - 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, - 0xc9, 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, 0x01, 0xb7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, - 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, - 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, - 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, - 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x07, - 0x00, 0x2e, 0x67, 0x01, 0xb7, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, - 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, - 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, - 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, - 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, - 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, - 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, - 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, - 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, - 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, - 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, - 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, - 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, - 0x62, 0xe2, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, - 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, - 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x62, 0xe2, - 0xda, 0xb8, 0x02, 0x64, 0x09, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, - 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, - 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, - 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x12, 0x43, 0x4d, 0x02, 0x65, 0x9c, 0x75, 0x2f, - 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, - 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, - 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, - 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, - 0x63, 0x36, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, - 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, - 0x20, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, - 0xd2, 0x50, 0x80, 0x02, 0xc2, 0x50, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, - 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, - 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02, - 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, - 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, - 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, - 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, - 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, - 0x53, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, - 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, - 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, - 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, - 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, - 0x02, 0xc2, 0x55, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, - 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, - 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, 0x02, 0xc2, 0x56, 0x02, 0x65, 0x88, 0x7c, - 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, - 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, - 0x57, 0x80, 0x02, 0xc2, 0x57, 0x02, 0x65, 0x88, 0x54, 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, - 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0x22, 0xca, 0x19, 0x5e, 0x20, - 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xcd, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, - 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e, 0x64, 0x00, 0x02, 0x02, 0x65, 0xe7, 0xca, - 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xcd, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, - 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, - 0x7e, 0x64, 0x00, 0x03, 0x02, 0x65, 0xe7, 0xd2, 0x04, 0x7e, 0x27, 0x01, 0xcb, 0x2d, 0x26, 0xbe, - 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7e, 0x79, 0xa0, - 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04, 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, - 0x01, 0xcb, 0x7e, 0x25, 0x30, 0x2d, 0x26, 0x7a, 0x25, 0x30, 0x7a, 0x07, 0x01, 0xc9, 0xda, 0x19, - 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0x9a, 0x12, 0x7e, 0x30, 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, - 0x01, 0xcd, 0x80, 0xd7, 0x4d, 0x42, 0x4a, 0xae, 0x4b, 0xa8, 0x4d, 0x7b, 0x49, 0x4f, 0x49, 0x4f, - 0x4c, 0xa7, 0x49, 0x4f, 0x4d, 0xbf, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x4d, 0xc6, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x50, 0x77, 0x4d, 0xe3, 0x4e, 0xdd, 0x50, 0xb0, 0x49, 0x4f, 0x49, 0x4f, - 0x4f, 0xdc, 0x49, 0x4f, 0x50, 0xf4, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x50, 0xfb, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x53, 0xac, 0x51, 0x18, 0x52, 0x12, 0x53, 0xe5, 0x49, 0x4f, 0x49, 0x4f, - 0x53, 0x11, 0x49, 0x4f, 0x54, 0x29, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x54, 0x30, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x56, 0xe1, 0x54, 0x4d, 0x55, 0x47, 0x57, 0x1a, 0x49, 0x4f, 0x49, 0x4f, - 0x56, 0x46, 0x49, 0x4f, 0x57, 0x5e, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x57, 0x65, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x5a, 0x16, 0x57, 0x82, 0x58, 0x7c, 0x5a, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x59, 0x7b, 0x49, 0x4f, 0x5a, 0x93, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x5a, 0x9a, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x5d, 0x4b, 0x5a, 0xb7, 0x5b, 0xb1, 0x5d, 0x84, 0x49, 0x4f, 0x49, 0x4f, - 0x5c, 0xb0, 0x49, 0x4f, 0x5d, 0xc8, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x5d, 0xcf, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x60, 0x80, 0x5d, 0xec, 0x5e, 0xe6, 0x60, 0xb9, 0x49, 0x4f, 0x49, 0x4f, - 0x5f, 0xe5, 0x49, 0x4f, 0x60, 0xfd, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x61, 0x04, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x63, 0xb5, 0x61, 0x21, 0x62, 0x1b, 0x63, 0xee, 0x49, 0x4f, 0x49, 0x4f, - 0x63, 0x1a, 0x49, 0x4f, 0x64, 0x32, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x64, 0x39, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, - 0x49, 0x4f, 0x49, 0x4f, 0xca, 0x29, 0x1e, 0x50, 0x40, 0x0d, 0x7e, 0x54, 0x0b, 0x10, 0x9c, 0xb5, - 0xa4, 0x2e, 0x54, 0x68, 0x51, 0x89, 0x54, 0x7e, 0x39, 0x00, 0x7a, 0x19, 0x00, 0x0b, 0x34, 0x80, - 0xe9, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, - 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, - 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, - 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67, 0x01, 0xc9, 0x9e, 0x24, + 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, + 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, + 0x0f, 0x23, 0x23, 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, + 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, + 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, + 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, + 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, + 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, + 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, + 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x58, 0x9b, 0x75, 0x31, 0x99, 0x12, 0x7c, + 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, + 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x58, 0x9b, 0xda, 0xb8, 0x02, 0x59, 0xe8, 0x09, 0xb1, + 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, + 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, + 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, + 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6d, 0x80, 0x02, 0xc2, 0x6d, 0xa5, 0xfd, 0x5e, + 0x50, 0x20, 0x68, 0x04, 0xd2, 0x65, 0x80, 0x02, 0xc2, 0x65, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, + 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0x12, 0x43, 0x6d, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, + 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, + 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, + 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, + 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x58, + 0xed, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, + 0x0e, 0x01, 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x75, 0x31, 0xa6, 0x12, 0x7c, 0x15, 0x7e, + 0x14, 0x86, 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5d, 0x40, 0x20, 0xe6, 0x03, 0xd2, 0x0e, + 0x22, 0x30, 0x36, 0x49, 0xd2, 0x76, 0x7e, 0x37, 0x01, 0x9b, 0x7e, 0x27, 0x01, 0xbb, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x54, 0x7a, 0x05, 0x54, 0x7a, 0x37, 0x01, 0x9b, 0x7e, 0x37, + 0x01, 0x7b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x7b, + 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, + 0x76, 0xc4, 0x22, 0xc2, 0x76, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x9b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xbb, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0xbb, 0x7e, 0x37, 0x01, 0x9b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x54, 0x7a, 0x05, 0x54, 0x7a, + 0x37, 0x01, 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xe2, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x7b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, + 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x25, 0xe3, 0x9d, 0x24, 0x12, 0x65, 0x2b, 0x7e, 0x34, 0x21, 0xe3, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x7b, 0x12, 0x65, 0x2b, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5a, 0x8f, + 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x21, 0xe3, 0x7a, 0x07, 0x01, 0x7b, 0x7a, 0x07, 0x01, 0x8b, 0x75, + 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, + 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, + 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xcb, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, + 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, + 0x01, 0xdf, 0x7e, 0x24, 0x06, 0x00, 0x2e, 0x27, 0x01, 0xcb, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, + 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, + 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, + 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, + 0x06, 0x00, 0x2e, 0x67, 0x01, 0xcb, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, + 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, + 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, + 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69, + 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, + 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, + 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, + 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, + 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, + 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, + 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, + 0x02, 0x5b, 0xf3, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, + 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, + 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5b, + 0xf3, 0xda, 0xb8, 0x02, 0x5d, 0x40, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, + 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, + 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, + 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, + 0x6e, 0x80, 0x02, 0xc2, 0x6e, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x66, 0x80, 0x02, + 0xc2, 0x66, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0x12, + 0x43, 0x8e, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5c, 0x45, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, + 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, 0x2f, 0x03, 0xd2, 0x0f, + 0x22, 0x75, 0x31, 0xa7, 0x12, 0x7c, 0x15, 0x7e, 0x14, 0x87, 0x00, 0x80, 0x06, 0x20, 0x2f, 0x03, + 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, + 0x12, 0x60, 0x98, 0x20, 0xe6, 0x03, 0xd2, 0x0f, 0x22, 0x30, 0x37, 0x49, 0xd2, 0x77, 0x7e, 0x37, + 0x01, 0x9d, 0x7e, 0x27, 0x01, 0xbd, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x56, 0x7a, + 0x05, 0x56, 0x7a, 0x37, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x29, 0xe2, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x7d, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x7a, 0x51, + 0x31, 0x12, 0x7c, 0x15, 0x12, 0x65, 0x2b, 0x10, 0x77, 0xc4, 0x22, 0xc2, 0x77, 0x2d, 0x23, 0x68, + 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x9d, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, + 0x27, 0x01, 0xbd, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xbd, 0x7e, 0x37, 0x01, 0x9d, 0x9d, 0x32, 0x7d, + 0x02, 0x2e, 0x05, 0x56, 0x7a, 0x05, 0x56, 0x7a, 0x37, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xe2, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x7d, 0x75, 0x31, 0x94, + 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x02, 0x65, 0x2b, 0x75, 0x31, 0x94, 0x12, + 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x29, 0xe3, 0x9d, 0x24, 0x12, 0x65, + 0x2b, 0x7e, 0x34, 0x25, 0xe3, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x7d, 0x12, 0x65, 0x2b, + 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5d, 0xe7, 0x22, 0xd2, 0x0f, 0x7e, 0x04, 0x25, 0xe3, 0x7a, + 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d, 0x75, 0x31, 0x94, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x00, + 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x92, 0x12, 0x7c, 0x15, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x27, 0x01, 0xcd, + 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, + 0x46, 0x7a, 0x05, 0x46, 0x7a, 0x37, 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdf, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xdf, 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, + 0x01, 0xcd, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0xbe, 0x50, 0x38, + 0x78, 0x03, 0x02, 0x66, 0x16, 0x02, 0x65, 0xfb, 0x75, 0x31, 0x99, 0x12, 0x7c, 0x15, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, 0x7d, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, + 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x24, 0x7e, 0x64, 0x07, 0x00, 0x2e, 0x67, 0x01, 0xcd, 0x9e, 0x24, + 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x65, 0xfb, 0x7e, 0x34, 0x01, 0xe3, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdf, 0x02, 0x65, 0xfb, 0x7a, 0x39, 0xc0, 0x7e, 0x34, + 0x01, 0xe3, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, + 0x0f, 0x23, 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x31, + 0x93, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xbd, 0x04, 0x68, 0x29, 0x7a, 0x07, + 0x01, 0xdf, 0x7e, 0x47, 0x01, 0xe1, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xe1, 0x2e, 0x35, 0x46, 0x7a, + 0x35, 0x46, 0x22, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, + 0x2a, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0x2c, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd1, 0xd2, 0x04, 0x7e, + 0x07, 0x01, 0xe1, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xdf, 0x7e, + 0x44, 0x05, 0xe3, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x70, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xce, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, + 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5f, 0x4b, 0x75, 0x31, 0x99, 0x12, 0x7c, + 0x15, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, + 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5f, 0x4b, 0xda, 0xb8, 0x02, 0x60, 0x98, 0x09, 0xb1, + 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, 0x7c, 0x15, + 0xa5, 0xfc, 0x5e, 0xb0, 0xf0, 0xa5, 0xfd, 0x09, 0xb1, 0x00, 0x18, 0x4c, 0x4b, 0x5e, 0xb0, 0xf0, + 0xbc, 0xb5, 0x78, 0xf1, 0x5e, 0x40, 0x0f, 0x4c, 0x54, 0x7c, 0xb5, 0x5e, 0x50, 0x0b, 0x68, 0x2a, + 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6f, 0x80, 0x02, 0xc2, 0x6f, 0xa5, 0xfd, 0x5e, + 0x50, 0x20, 0x68, 0x04, 0xd2, 0x67, 0x80, 0x02, 0xc2, 0x67, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, + 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0x12, 0x43, 0xaf, 0x02, 0x62, 0x93, 0x75, 0x31, 0x91, + 0x12, 0x7c, 0x15, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x20, 0xe0, 0x08, + 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x62, 0x93, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, + 0x12, 0x62, 0x93, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, + 0x61, 0x00, 0x00, 0x12, 0x62, 0xb6, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5f, + 0x9d, 0x75, 0x31, 0x95, 0x12, 0x7c, 0x15, 0x22, 0x75, 0x31, 0x96, 0x12, 0x7c, 0x15, 0x22, 0x7c, + 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, + 0x68, 0x04, 0xd2, 0x68, 0x80, 0x02, 0xc2, 0x68, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, + 0x60, 0x80, 0x02, 0xc2, 0x60, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, + 0xc2, 0x58, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, + 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x69, 0x80, 0x02, 0xc2, 0x69, 0xa5, 0xfd, + 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x61, 0x80, 0x02, 0xc2, 0x61, 0xa5, 0xfd, 0x5e, 0x50, 0x80, + 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, + 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6a, + 0x80, 0x02, 0xc2, 0x6a, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x62, 0x80, 0x02, 0xc2, + 0x62, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0x02, 0x62, + 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, + 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6b, 0x80, 0x02, 0xc2, 0x6b, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, + 0x04, 0xd2, 0x63, 0x80, 0x02, 0xc2, 0x63, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5b, + 0x80, 0x02, 0xc2, 0x5b, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, + 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6c, 0x80, 0x02, 0xc2, 0x6c, + 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x64, 0x80, 0x02, 0xc2, 0x64, 0xa5, 0xfd, 0x5e, + 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, + 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, + 0xd2, 0x6d, 0x80, 0x02, 0xc2, 0x6d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x65, 0x80, + 0x02, 0xc2, 0x65, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, + 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, + 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6e, 0x80, 0x02, 0xc2, 0x6e, 0xa5, 0xfd, 0x5e, 0x50, + 0x20, 0x68, 0x04, 0xd2, 0x66, 0x80, 0x02, 0xc2, 0x66, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, + 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0x02, 0x62, 0x7f, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, + 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x10, 0x68, 0x04, 0xd2, 0x6f, 0x80, 0x02, + 0xc2, 0x6f, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x67, 0x80, 0x02, 0xc2, 0x67, 0xa5, + 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0x02, 0x62, 0x7f, 0x54, + 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, 0x75, 0x31, 0x90, 0x12, 0x7c, 0x15, 0xf5, 0x31, 0x12, + 0x7c, 0x15, 0x22, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xe3, 0xca, 0x79, + 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e, + 0x64, 0x00, 0x02, 0x02, 0x62, 0xde, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, + 0xe3, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60, + 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, 0x7e, 0x64, 0x00, 0x03, 0x02, 0x62, 0xde, 0xd2, 0x04, + 0x7e, 0x27, 0x01, 0xe1, 0x2d, 0x26, 0xbe, 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xdf, + 0x7e, 0x44, 0x05, 0xe3, 0x7e, 0x79, 0xa0, 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04, + 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, 0x01, 0xe1, 0x7e, 0x25, 0x46, 0x2d, 0x26, 0x7a, 0x25, + 0x46, 0x7a, 0x07, 0x01, 0xdf, 0xda, 0x19, 0xc2, 0xd7, 0x22, 0x75, 0x31, 0x9a, 0x12, 0x7c, 0x15, + 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, 0x01, 0xe3, 0x80, 0xd7, 0x48, 0xb6, 0x46, 0x25, 0x47, + 0x1c, 0x49, 0x15, 0x44, 0xc6, 0x44, 0xc6, 0x48, 0x1b, 0x44, 0xc6, 0x49, 0x59, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x49, 0x60, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4c, 0x0e, 0x49, 0x7d, 0x4a, + 0x74, 0x4c, 0x6d, 0x44, 0xc6, 0x44, 0xc6, 0x4b, 0x73, 0x44, 0xc6, 0x4c, 0xb1, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4c, 0xb8, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x4f, 0x66, 0x4c, 0xd5, 0x4d, + 0xcc, 0x4f, 0xc5, 0x44, 0xc6, 0x44, 0xc6, 0x4e, 0xcb, 0x44, 0xc6, 0x50, 0x09, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x50, 0x10, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x52, 0xbe, 0x50, 0x2d, 0x51, + 0x24, 0x53, 0x1d, 0x44, 0xc6, 0x44, 0xc6, 0x52, 0x23, 0x44, 0xc6, 0x53, 0x61, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x53, 0x68, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x56, 0x16, 0x53, 0x85, 0x54, + 0x7c, 0x56, 0x75, 0x44, 0xc6, 0x44, 0xc6, 0x55, 0x7b, 0x44, 0xc6, 0x56, 0xb9, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x56, 0xc0, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x59, 0x6e, 0x56, 0xdd, 0x57, + 0xd4, 0x59, 0xcd, 0x44, 0xc6, 0x44, 0xc6, 0x58, 0xd3, 0x44, 0xc6, 0x5a, 0x11, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5a, 0x18, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5c, 0xc6, 0x5a, 0x35, 0x5b, + 0x2c, 0x5d, 0x25, 0x44, 0xc6, 0x44, 0xc6, 0x5c, 0x2b, 0x44, 0xc6, 0x5d, 0x69, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x5d, 0x70, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x60, 0x1e, 0x5d, 0x8d, 0x5e, + 0x84, 0x60, 0x7d, 0x44, 0xc6, 0x44, 0xc6, 0x5f, 0x83, 0x44, 0xc6, 0x60, 0xc1, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x60, 0xc8, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, + 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0x44, 0xc6, 0xca, 0x29, 0x1e, 0x50, 0x40, + 0x0d, 0x7e, 0x54, 0x0b, 0x10, 0x9c, 0xb5, 0xa4, 0x2e, 0x54, 0x65, 0x48, 0x89, 0x54, 0x7e, 0x39, + 0x00, 0x7a, 0x19, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, @@ -744,12 +832,12 @@ 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, - 0x35, 0xda, 0x29, 0x22, 0x1e, 0x50, 0x40, 0x0d, 0x7e, 0x54, 0x0b, 0x1c, 0x9c, 0xb5, 0xa4, 0x2e, - 0x54, 0x69, 0x1f, 0x89, 0x54, 0x7e, 0x19, 0x00, 0x7a, 0x39, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x7e, - 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, - 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, - 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, - 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, + 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, + 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, + 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, + 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0xda, 0x29, 0x22, 0x1e, 0x50, 0x40, 0x0d, 0x7e, + 0x54, 0x0b, 0x1c, 0x9c, 0xb5, 0xa4, 0x2e, 0x54, 0x66, 0x16, 0x89, 0x54, 0x7e, 0x19, 0x00, 0x7a, + 0x39, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, @@ -765,157 +853,176 @@ 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, - 0x00, 0x0b, 0x35, 0x22, 0x6a, 0x9b, 0x6c, 0x4f, 0x6c, 0x67, 0x6c, 0x82, 0x6d, 0x1d, 0x6d, 0xb5, - 0x6d, 0xd0, 0x6e, 0x62, 0x6d, 0xeb, 0x6e, 0x2c, 0x7c, 0xb3, 0xbe, 0xb0, 0x09, 0x28, 0x14, 0x75, - 0x2f, 0x09, 0x12, 0x7e, 0x30, 0x75, 0x57, 0x10, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x43, 0xe1, 0xc0, - 0xd0, 0xf1, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x6a, 0x54, 0x0b, 0x58, - 0x50, 0x89, 0x54, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x2f, 0xb0, 0x12, 0x7e, - 0x30, 0x0a, 0x22, 0x09, 0xb2, 0x6a, 0x93, 0x42, 0x24, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, - 0x3b, 0x49, 0x33, 0x6a, 0xb7, 0x89, 0x34, 0x6a, 0xc7, 0x6a, 0xf5, 0x6b, 0x23, 0x6b, 0x51, 0x6b, - 0x7f, 0x6b, 0xad, 0x6b, 0xdb, 0x6c, 0x09, 0x12, 0x41, 0xa9, 0xd2, 0x28, 0xd2, 0x08, 0xc2, 0x40, - 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x7e, 0x04, 0x00, 0x20, - 0x7a, 0x07, 0x01, 0x99, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xa9, 0x12, 0x41, 0x16, 0x12, - 0x64, 0x40, 0x02, 0x6c, 0x37, 0x12, 0x41, 0xc6, 0xd2, 0x29, 0xd2, 0x09, 0xc2, 0x41, 0xc2, 0x49, - 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xba, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, - 0x01, 0x9b, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xab, 0x12, 0x41, 0x16, 0x12, 0x64, 0x69, - 0x02, 0x6c, 0x37, 0x12, 0x41, 0xe3, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42, 0xc2, 0x4a, 0xc2, 0x3a, - 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9d, - 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xad, 0x12, 0x41, 0x16, 0x12, 0x64, 0x92, 0x02, 0x6c, - 0x37, 0x12, 0x42, 0x00, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b, 0xc2, 0x3b, 0xc2, 0x33, - 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9f, 0x7e, 0x04, - 0x00, 0x38, 0x7a, 0x07, 0x01, 0xaf, 0x12, 0x41, 0x16, 0x12, 0x64, 0xbb, 0x02, 0x6c, 0x37, 0x12, - 0x42, 0x1d, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c, 0xc2, 0x34, 0x6d, 0x00, - 0x7a, 0x03, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa1, 0x7e, 0x04, 0x00, 0x38, - 0x7a, 0x07, 0x01, 0xb1, 0x12, 0x41, 0x16, 0x12, 0x64, 0xe4, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x3a, - 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35, 0x6d, 0x00, 0x7a, 0x03, - 0x01, 0xbe, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, - 0x01, 0xb3, 0x12, 0x41, 0x16, 0x12, 0x65, 0x0d, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x57, 0xd2, 0x2e, - 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbf, - 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb5, - 0x12, 0x41, 0x16, 0x12, 0x65, 0x36, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x74, 0xd2, 0x2f, 0xd2, 0x0f, - 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x7e, 0x04, - 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa7, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb7, 0x12, 0x41, - 0x16, 0x12, 0x65, 0x5f, 0x02, 0x6c, 0x37, 0x7e, 0xa0, 0xd0, 0x7e, 0x60, 0x0f, 0x12, 0x65, 0xbf, - 0x40, 0x0c, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xc2, 0xd7, 0x22, 0x75, - 0x2f, 0xb1, 0x12, 0x7e, 0x30, 0x0a, 0x52, 0x23, 0x6d, 0x00, 0x59, 0x05, 0x00, 0x32, 0x12, 0x41, - 0x72, 0x12, 0x41, 0x8e, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb2, 0x12, 0x7e, 0x30, 0x0a, 0x22, 0x09, - 0xb2, 0x6a, 0x93, 0x42, 0x23, 0x7e, 0xb0, 0x9c, 0x19, 0xb2, 0x01, 0xb9, 0x12, 0x45, 0x74, 0xd0, - 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, - 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, - 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, - 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, - 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, - 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0x3e, 0x20, - 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, - 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44, - 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, - 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, - 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, - 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f, - 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, - 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, - 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5, - 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5, - 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26, - 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74, - 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26, 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12, - 0x42, 0x91, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, - 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, - 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, - 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb5, 0x12, 0x7e, - 0x30, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, - 0x0c, 0xe5, 0x58, 0xb4, 0x07, 0x23, 0x09, 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, - 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, - 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb6, 0x12, - 0x7e, 0x30, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe5, 0x58, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, - 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, - 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, - 0xa8, 0x22, 0x75, 0x2f, 0xb4, 0x12, 0x7e, 0x30, 0x7a, 0x21, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x41, - 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0xb0, 0x01, 0x7e, 0xa0, 0xc8, 0x7c, 0x64, 0x12, 0x65, 0xbf, 0xc0, - 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xd0, 0xa8, 0x22, 0x6e, 0x9c, 0x6e, 0xe3, - 0x6f, 0x2a, 0x6f, 0x71, 0x6f, 0xb8, 0x6f, 0xff, 0x70, 0x46, 0x70, 0x8d, 0x75, 0x2f, 0x55, 0x12, - 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, - 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x69, 0x7e, 0x27, 0x01, 0x79, 0x2d, 0x23, 0x7e, 0x09, - 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x0d, 0xcc, 0x38, 0x0f, 0x1b, 0x34, - 0x78, 0xec, 0x7a, 0x17, 0x01, 0x69, 0x7a, 0x27, 0x01, 0x79, 0x02, 0x4a, 0x98, 0x7e, 0x14, 0x09, - 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x01, 0x12, 0x7e, 0x30, 0x7a, - 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6b, 0x7e, - 0x27, 0x01, 0x7b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, - 0x14, 0x11, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6b, 0x7a, 0x27, 0x01, - 0x7b, 0x02, 0x4d, 0xcd, 0x7e, 0x14, 0x0d, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, - 0x75, 0x2f, 0x02, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, - 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6d, 0x7e, 0x27, 0x01, 0x7d, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, - 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x15, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, - 0x7a, 0x17, 0x01, 0x6d, 0x7a, 0x27, 0x01, 0x7d, 0x02, 0x51, 0x02, 0x7e, 0x14, 0x11, 0xcd, 0x80, - 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x03, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, - 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6f, 0x7e, 0x27, 0x01, - 0x7f, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x19, - 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6f, 0x7a, 0x27, 0x01, 0x7f, 0x02, - 0x54, 0x37, 0x7e, 0x14, 0x15, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, - 0x04, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, - 0x7e, 0x17, 0x01, 0x71, 0x7e, 0x27, 0x01, 0x81, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, - 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1d, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, - 0x01, 0x71, 0x7a, 0x27, 0x01, 0x81, 0x02, 0x57, 0x6c, 0x7e, 0x14, 0x19, 0xcd, 0x80, 0xeb, 0x75, - 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x05, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, - 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x73, 0x7e, 0x27, 0x01, 0x83, 0x2d, - 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x21, 0xcc, 0x38, - 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x73, 0x7a, 0x27, 0x01, 0x83, 0x02, 0x5a, 0xa1, - 0x7e, 0x14, 0x1d, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x06, 0x12, - 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, - 0x01, 0x75, 0x7e, 0x27, 0x01, 0x85, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, - 0x0b, 0x14, 0xbe, 0x14, 0x25, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x75, - 0x7a, 0x27, 0x01, 0x85, 0x02, 0x5d, 0xd6, 0x7e, 0x14, 0x21, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, - 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, - 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x77, 0x7e, 0x27, 0x01, 0x87, 0x2d, 0x23, 0x7e, - 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x29, 0xcc, 0x38, 0x0f, 0x1b, - 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x77, 0x7a, 0x27, 0x01, 0x87, 0x02, 0x61, 0x0b, 0x7e, 0x14, - 0x25, 0xcd, 0x80, 0xeb, 0xca, 0xb8, 0xc0, 0xf1, 0x75, 0x2f, 0x02, 0x12, 0x7e, 0x30, 0xe5, 0xc0, - 0x54, 0x03, 0x68, 0x05, 0x12, 0x77, 0xdd, 0x80, 0xf5, 0x30, 0xc2, 0x08, 0x75, 0xf1, 0x01, 0x12, - 0x71, 0xe9, 0x80, 0x14, 0x30, 0xc3, 0x08, 0x75, 0xf1, 0x01, 0x12, 0x71, 0x0d, 0x80, 0x09, 0x30, - 0xc4, 0x06, 0x75, 0xf1, 0x02, 0x12, 0x72, 0xf9, 0xd0, 0xf1, 0xda, 0xb8, 0x32, 0x75, 0x2f, 0x10, - 0x12, 0x7e, 0x30, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x5c, 0xe5, - 0xe5, 0x54, 0xc0, 0x68, 0x4f, 0xe5, 0xe6, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xc5, 0x2d, 0x35, 0xbe, - 0x34, 0x04, 0x00, 0x38, 0x4a, 0x7a, 0x37, 0x01, 0xc5, 0x7e, 0x37, 0x01, 0xc3, 0x7d, 0x43, 0x2d, - 0x45, 0xbe, 0x44, 0x09, 0xcc, 0x38, 0x40, 0x7a, 0x47, 0x01, 0xc3, 0x75, 0x2f, 0x11, 0x12, 0x7e, - 0x30, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x73, 0xc8, 0xa9, 0x21, 0xe5, 0x1f, 0xa9, 0xd4, + 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, + 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, + 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, + 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x22, 0x67, 0x96, 0x69, 0x63, 0x69, + 0x7b, 0x6a, 0x49, 0x6a, 0xe4, 0x6b, 0x8e, 0x6b, 0xa9, 0x6c, 0x3b, 0x6b, 0xc4, 0x6c, 0x05, 0x69, + 0x96, 0x69, 0xaa, 0x7c, 0xb3, 0xbe, 0xb0, 0x0b, 0x28, 0x14, 0x75, 0x31, 0x09, 0x12, 0x7c, 0x15, + 0x75, 0x6d, 0x10, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x22, 0xc0, 0xa8, + 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x67, 0x4b, 0x0b, 0x58, 0x50, 0x89, 0x54, 0x01, 0x02, + 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x31, 0xb0, 0x12, 0x7c, 0x15, 0x0a, 0x32, 0x09, 0xb3, + 0x67, 0x8e, 0x42, 0x32, 0x19, 0x43, 0x00, 0x36, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x3b, + 0x49, 0x33, 0x67, 0xcb, 0x0a, 0x22, 0x09, 0x32, 0x00, 0x36, 0x09, 0xb2, 0x67, 0x8e, 0xa5, 0xbb, + 0x00, 0x05, 0xf4, 0x52, 0x33, 0x80, 0x02, 0x42, 0x33, 0x89, 0x34, 0x67, 0xdb, 0x68, 0x09, 0x68, + 0x37, 0x68, 0x65, 0x68, 0x93, 0x68, 0xc1, 0x68, 0xef, 0x69, 0x1d, 0x12, 0x41, 0xb5, 0xd2, 0x28, + 0xd2, 0x08, 0xc2, 0x40, 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xcf, + 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xaf, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xbf, + 0x12, 0x41, 0x16, 0x12, 0x60, 0xcf, 0x02, 0x69, 0x4b, 0x12, 0x41, 0xd4, 0xd2, 0x29, 0xd2, 0x09, + 0xc2, 0x41, 0xc2, 0x49, 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd0, 0x7e, 0x04, + 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb1, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc1, 0x12, 0x41, + 0x16, 0x12, 0x61, 0x05, 0x02, 0x69, 0x4b, 0x12, 0x41, 0xf3, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42, + 0xc2, 0x4a, 0xc2, 0x3a, 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd1, 0x7e, 0x04, 0x00, 0x20, + 0x7a, 0x07, 0x01, 0xb3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc3, 0x12, 0x41, 0x16, 0x12, + 0x61, 0x3b, 0x02, 0x69, 0x4b, 0x12, 0x42, 0x12, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b, + 0xc2, 0x3b, 0xc2, 0x33, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd2, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, + 0x01, 0xb5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc5, 0x12, 0x41, 0x16, 0x12, 0x61, 0x71, + 0x02, 0x69, 0x4b, 0x12, 0x42, 0x31, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c, + 0xc2, 0x34, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd3, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb7, + 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc7, 0x12, 0x41, 0x16, 0x12, 0x61, 0xa7, 0x02, 0x69, + 0x4b, 0x12, 0x42, 0x50, 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35, + 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xd4, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xb9, 0x7e, 0x04, + 0x00, 0x38, 0x7a, 0x07, 0x01, 0xc9, 0x12, 0x41, 0x16, 0x12, 0x61, 0xdd, 0x02, 0x69, 0x4b, 0x12, + 0x42, 0x6f, 0xd2, 0x2e, 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00, + 0x7a, 0x03, 0x01, 0xd5, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x38, + 0x7a, 0x07, 0x01, 0xcb, 0x12, 0x41, 0x16, 0x12, 0x62, 0x13, 0x02, 0x69, 0x4b, 0x12, 0x42, 0x8e, + 0xd2, 0x2f, 0xd2, 0x0f, 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03, + 0x01, 0xd6, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, + 0x01, 0xcd, 0x12, 0x41, 0x16, 0x12, 0x62, 0x49, 0x02, 0x69, 0x4b, 0x7e, 0xa0, 0xd0, 0x7e, 0x60, + 0x0f, 0x12, 0x62, 0xb6, 0x40, 0x0c, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, + 0xc2, 0xd7, 0x22, 0x75, 0x31, 0xb1, 0x12, 0x7c, 0x15, 0x0a, 0x52, 0x23, 0x6d, 0x00, 0x59, 0x05, + 0x00, 0x48, 0x12, 0x41, 0x7e, 0x12, 0x41, 0x9a, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb2, 0x12, 0x7c, + 0x15, 0x0a, 0x22, 0x09, 0xb2, 0x67, 0x8e, 0x42, 0x23, 0x7e, 0xb0, 0x9c, 0x19, 0xb2, 0x01, 0xcf, + 0x12, 0x31, 0x85, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb7, 0x12, 0x7c, 0x15, 0x0a, 0x22, 0x09, 0xb2, + 0x67, 0x8e, 0x42, 0x24, 0x12, 0x35, 0x3d, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb9, 0x12, 0x7c, 0x15, + 0x0a, 0x32, 0x09, 0xb3, 0x67, 0x8e, 0x42, 0x34, 0x19, 0x43, 0x00, 0x3e, 0x12, 0x69, 0xc2, 0xd0, + 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x0b, 0x7c, 0xb4, 0x20, 0xe0, 0x04, 0x6d, 0x33, 0x80, 0x04, + 0x49, 0x30, 0x01, 0x8f, 0x7e, 0xa0, 0xd8, 0xa5, 0xef, 0xca, 0x0b, 0xca, 0x29, 0x12, 0x62, 0xb6, + 0xda, 0x29, 0xda, 0x0b, 0x40, 0x62, 0x75, 0x31, 0xba, 0x12, 0x7c, 0x15, 0x7c, 0xb4, 0x30, 0xe0, + 0x1e, 0x6d, 0x33, 0x59, 0x30, 0x01, 0x8f, 0x7e, 0x34, 0x09, 0xe3, 0x0a, 0x82, 0x7e, 0x94, 0x04, + 0x00, 0xad, 0x89, 0x2d, 0x39, 0x59, 0x30, 0x01, 0x6f, 0x59, 0x30, 0x01, 0x7f, 0x7c, 0xb4, 0x30, + 0xe1, 0x10, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0xb0, 0x00, 0x08, 0x44, 0x04, 0x19, 0xb0, + 0x00, 0x08, 0x0a, 0x02, 0x09, 0xb0, 0x67, 0x8e, 0x42, 0x21, 0xf4, 0x52, 0x34, 0x7c, 0xb2, 0x23, + 0x0a, 0x0b, 0xca, 0x19, 0x49, 0x00, 0x30, 0xd5, 0x99, 0x04, 0xda, 0x19, 0xc0, 0xf1, 0x75, 0xf1, + 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0xc2, 0xd7, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, + 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, + 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, 0x00, 0x10, + 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, 0x5e, 0x70, + 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, 0xb8, 0x74, + 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, + 0x62, 0x09, 0xb6, 0x67, 0x8e, 0x3e, 0x20, 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x20, + 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, 0x59, 0x46, + 0x01, 0xbf, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x11, + 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, 0x46, 0x01, + 0xbf, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x0a, 0x62, 0x09, 0xb6, + 0x67, 0x8e, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xa5, 0xee, 0x52, + 0x26, 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0xaf, 0xda, 0x28, 0x09, 0x30, 0x00, 0x0c, 0x74, + 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x0c, + 0x44, 0x80, 0xca, 0xb8, 0xa5, 0xed, 0x42, 0x2a, 0xda, 0xb8, 0x80, 0x0a, 0x54, 0x7f, 0xca, 0xb8, + 0xa5, 0xee, 0x52, 0x2a, 0xda, 0xb8, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x02, 0x80, + 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x02, + 0x68, 0x10, 0xa5, 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0xaf, + 0x80, 0x04, 0xa5, 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, + 0x29, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0xaf, 0x80, 0x0b, 0xa5, 0xee, 0x52, + 0x29, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x78, 0x00, 0x12, 0x42, 0xad, 0xd0, 0xa8, 0x22, 0x7e, 0x04, + 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, + 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, + 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00, + 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb5, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, + 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, 0x0c, 0xe5, 0x6e, 0xb4, 0x07, 0x23, 0x09, + 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, + 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, + 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb6, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x80, 0x00, 0x4c, + 0x02, 0xe5, 0x6e, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, + 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0, + 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x31, 0xb4, 0x12, 0x7c, + 0x15, 0x7a, 0x21, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x41, 0x31, 0x12, 0x7c, 0x15, 0x0a, 0x32, 0x09, + 0xb3, 0x67, 0x8e, 0x42, 0x35, 0x12, 0x6c, 0x5b, 0xd0, 0xa8, 0x22, 0x7e, 0xb0, 0x01, 0x7e, 0xa0, + 0xc8, 0x7c, 0x64, 0x12, 0x62, 0xb6, 0x40, 0x13, 0x0a, 0x32, 0x09, 0xb3, 0x67, 0x8e, 0xf4, 0x52, + 0x35, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x6f, 0xd9, 0xd0, 0xf1, 0x22, 0x6c, 0x8c, 0x6c, 0xd3, + 0x6d, 0x1a, 0x6d, 0x61, 0x6d, 0xa8, 0x6d, 0xef, 0x6e, 0x36, 0x6e, 0x7d, 0x75, 0x31, 0x55, 0x12, + 0x7c, 0x15, 0x75, 0x31, 0x00, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, + 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x8f, 0x2d, 0x23, 0x7e, 0x09, + 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x0d, 0xe2, 0x38, 0x0f, 0x1b, 0x34, + 0x78, 0xec, 0x7a, 0x17, 0x01, 0x7f, 0x7a, 0x27, 0x01, 0x8f, 0x02, 0x46, 0x0f, 0x7e, 0x14, 0x09, + 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x01, 0x12, 0x7c, 0x15, 0x7a, + 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x81, 0x7e, + 0x27, 0x01, 0x91, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, + 0x14, 0x11, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x81, 0x7a, 0x27, 0x01, + 0x91, 0x02, 0x49, 0x67, 0x7e, 0x14, 0x0d, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, + 0x75, 0x31, 0x02, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, + 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x83, 0x7e, 0x27, 0x01, 0x93, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, + 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x15, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, + 0x7a, 0x17, 0x01, 0x83, 0x7a, 0x27, 0x01, 0x93, 0x02, 0x4c, 0xbf, 0x7e, 0x14, 0x11, 0xe3, 0x80, + 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x03, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, + 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x85, 0x7e, 0x27, 0x01, + 0x95, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x19, + 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x85, 0x7a, 0x27, 0x01, 0x95, 0x02, + 0x50, 0x17, 0x7e, 0x14, 0x15, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, + 0x04, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, + 0x7e, 0x17, 0x01, 0x87, 0x7e, 0x27, 0x01, 0x97, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, + 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1d, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, + 0x01, 0x87, 0x7a, 0x27, 0x01, 0x97, 0x02, 0x53, 0x6f, 0x7e, 0x14, 0x19, 0xe3, 0x80, 0xeb, 0x75, + 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x05, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, + 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x89, 0x7e, 0x27, 0x01, 0x99, 0x2d, + 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x21, 0xe2, 0x38, + 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x89, 0x7a, 0x27, 0x01, 0x99, 0x02, 0x56, 0xc7, + 0x7e, 0x14, 0x1d, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, 0x12, 0x7c, 0x15, 0x75, 0x31, 0x06, 0x12, + 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, + 0x01, 0x8b, 0x7e, 0x27, 0x01, 0x9b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, + 0x0b, 0x14, 0xbe, 0x14, 0x25, 0xe2, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x8b, + 0x7a, 0x27, 0x01, 0x9b, 0x02, 0x5a, 0x1f, 0x7e, 0x14, 0x21, 0xe3, 0x80, 0xeb, 0x75, 0x31, 0x55, + 0x12, 0x7c, 0x15, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, 0x15, 0x7a, + 0x71, 0x31, 0x12, 0x7c, 0x15, 0x7e, 0x17, 0x01, 0x8d, 0x7e, 0x27, 0x01, 0x9d, 0x2d, 0x23, 0x7e, + 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x29, 0xe2, 0x38, 0x0f, 0x1b, + 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x8d, 0x7a, 0x27, 0x01, 0x9d, 0x02, 0x5d, 0x77, 0x7e, 0x14, + 0x25, 0xe3, 0x80, 0xeb, 0xca, 0xb8, 0xc0, 0xf1, 0x75, 0x31, 0x02, 0x12, 0x7c, 0x15, 0xe5, 0xc0, + 0x54, 0x03, 0x68, 0x05, 0x12, 0x75, 0xcd, 0x80, 0xf5, 0x30, 0xc2, 0x08, 0x75, 0xf1, 0x01, 0x12, + 0x6f, 0xd9, 0x80, 0x14, 0x30, 0xc3, 0x08, 0x75, 0xf1, 0x01, 0x12, 0x6e, 0xfd, 0x80, 0x09, 0x30, + 0xc4, 0x06, 0x75, 0xf1, 0x02, 0x12, 0x70, 0xe9, 0xd0, 0xf1, 0xda, 0xb8, 0x32, 0x75, 0x31, 0x10, + 0x12, 0x7c, 0x15, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x5c, 0xe5, + 0xe5, 0x54, 0xc0, 0x68, 0x4f, 0xe5, 0xe6, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xdb, 0x2d, 0x35, 0xbe, + 0x34, 0x04, 0x00, 0x38, 0x4a, 0x7a, 0x37, 0x01, 0xdb, 0x7e, 0x37, 0x01, 0xd9, 0x7d, 0x43, 0x2d, + 0x45, 0xbe, 0x44, 0x09, 0xe2, 0x38, 0x40, 0x7a, 0x47, 0x01, 0xd9, 0x75, 0x31, 0x11, 0x12, 0x7c, + 0x15, 0x7a, 0xb1, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x71, 0xb8, 0xa9, 0x21, 0xe5, 0x1f, 0xa9, 0xd4, 0xe4, 0xa9, 0x24, 0xe4, 0xfc, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x3b, 0xe5, 0xe5, 0x54, 0xc0, 0x78, - 0xb4, 0x12, 0x76, 0x6a, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x80, 0x29, 0x80, 0x58, 0x75, - 0x2f, 0x16, 0x12, 0x7e, 0x30, 0x80, 0xed, 0x75, 0x2f, 0x12, 0x12, 0x7e, 0x30, 0x7a, 0xb1, 0x2f, - 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x09, 0xcd, 0x9d, 0x54, 0x12, 0x73, 0xc8, 0x7e, 0x34, 0x05, 0xcd, - 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xa1, 0xe5, 0xe5, 0x54, 0x03, 0x78, 0x12, 0x75, 0x2f, 0x13, 0x12, - 0x7e, 0x30, 0x7e, 0x0f, 0x29, 0xe9, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xe9, 0x80, 0xa7, 0x75, 0x2f, - 0x14, 0x12, 0x7e, 0x30, 0x7e, 0x0f, 0x29, 0xed, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xed, 0xa9, 0xd7, - 0xe4, 0xa9, 0x27, 0xe4, 0xfc, 0x80, 0x9d, 0x75, 0x2f, 0x15, 0x12, 0x7e, 0x30, 0x7e, 0x0f, 0x29, - 0xf1, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf1, 0x80, 0xe5, 0x75, 0x2f, 0x18, 0x12, 0x7e, 0x30, 0xca, + 0xb4, 0x12, 0x74, 0x5a, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x80, 0x29, 0x80, 0x58, 0x75, + 0x31, 0x16, 0x12, 0x7c, 0x15, 0x80, 0xed, 0x75, 0x31, 0x12, 0x12, 0x7c, 0x15, 0x7a, 0xb1, 0x31, + 0x12, 0x7c, 0x15, 0x9e, 0x44, 0x09, 0xe3, 0x9d, 0x54, 0x12, 0x71, 0xb8, 0x7e, 0x34, 0x05, 0xe3, + 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xa1, 0xe5, 0xe5, 0x54, 0x03, 0x78, 0x12, 0x75, 0x31, 0x13, 0x12, + 0x7c, 0x15, 0x7e, 0x0f, 0x29, 0xff, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xff, 0x80, 0xa7, 0x75, 0x31, + 0x14, 0x12, 0x7c, 0x15, 0x7e, 0x0f, 0x2a, 0x03, 0x0b, 0x0c, 0x7a, 0x0f, 0x2a, 0x03, 0xa9, 0xd7, + 0xe4, 0xa9, 0x27, 0xe4, 0xfc, 0x80, 0x9d, 0x75, 0x31, 0x15, 0x12, 0x7c, 0x15, 0x7e, 0x0f, 0x2a, + 0x07, 0x0b, 0x0c, 0x7a, 0x0f, 0x2a, 0x07, 0x80, 0xe5, 0x75, 0x31, 0x18, 0x12, 0x7c, 0x15, 0xca, 0x09, 0xca, 0x39, 0xca, 0x2b, 0xc2, 0xc2, 0xa9, 0x21, 0xf2, 0x52, 0xe5, 0xf5, 0x33, 0x82, 0xe7, - 0x40, 0x44, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x54, 0x00, 0x40, 0x9d, 0x35, 0x40, 0x43, 0x7a, 0x37, - 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc7, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x52, - 0x7a, 0x47, 0x01, 0xc7, 0x7d, 0x45, 0x12, 0x75, 0x26, 0xa9, 0x20, 0xf5, 0x22, 0x75, 0x2f, 0x19, - 0x12, 0x7e, 0x30, 0x7a, 0x91, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x81, 0xf7, 0x7a, 0x91, 0xf6, 0xe5, + 0x40, 0x44, 0x7e, 0x37, 0x01, 0xe1, 0x7e, 0x54, 0x00, 0x40, 0x9d, 0x35, 0x40, 0x43, 0x7a, 0x37, + 0x01, 0xe1, 0x7e, 0x37, 0x01, 0xdd, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x05, 0xe2, 0x38, 0x52, + 0x7a, 0x47, 0x01, 0xdd, 0x7d, 0x45, 0x12, 0x73, 0x16, 0xa9, 0x20, 0xf5, 0x22, 0x75, 0x31, 0x19, + 0x12, 0x7c, 0x15, 0x7a, 0x91, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x81, 0xf7, 0x7a, 0x91, 0xf6, 0xe5, 0xf5, 0x33, 0x82, 0xe7, 0x50, 0xbc, 0xda, 0x2b, 0xda, 0x39, 0xda, 0x09, 0x22, 0x80, 0x41, 0x80, - 0x64, 0x2d, 0x53, 0x6d, 0x33, 0x70, 0xb7, 0x7e, 0x04, 0x01, 0xcd, 0x7a, 0x07, 0x01, 0xc9, 0x7a, - 0x07, 0x01, 0xc7, 0xa9, 0x32, 0xf2, 0xdf, 0x85, 0x30, 0x2f, 0x12, 0x7e, 0x30, 0x75, 0xf6, 0x00, - 0x80, 0xd4, 0xca, 0x59, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x54, 0x12, 0x75, 0x26, 0x7e, 0x34, 0x01, - 0xcd, 0x7d, 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc7, 0x12, 0x75, 0x26, 0xda, 0x49, 0x80, 0x99, - 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x0f, 0x29, 0xd9, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xd9, - 0x80, 0x9d, 0x7e, 0x0f, 0x29, 0xe1, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xe1, 0xa9, 0xd7, 0xf4, 0xa9, - 0x27, 0xf4, 0xfc, 0x80, 0x8a, 0x7e, 0x0f, 0x29, 0xdd, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xdd, 0x80, - 0xeb, 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x2f, 0x29, 0xf9, 0x0b, 0x2c, 0x7a, 0x2f, 0x29, - 0xf9, 0x80, 0x34, 0x7e, 0x2f, 0x2a, 0x01, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x01, 0xa9, 0xd7, 0xf4, - 0xa9, 0x27, 0xf4, 0xfc, 0x80, 0x21, 0x7e, 0x2f, 0x29, 0xfd, 0x0b, 0x2c, 0x7a, 0x2f, 0x29, 0xfd, - 0x80, 0xeb, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x2f, 0x28, 0x12, 0x7e, 0x30, 0xca, + 0x64, 0x2d, 0x53, 0x6d, 0x33, 0x70, 0xb7, 0x7e, 0x04, 0x01, 0xe3, 0x7a, 0x07, 0x01, 0xdf, 0x7a, + 0x07, 0x01, 0xdd, 0xa9, 0x32, 0xf2, 0xdf, 0x85, 0x30, 0x31, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x00, + 0x80, 0xd4, 0xca, 0x59, 0x9e, 0x44, 0x05, 0xe3, 0x9d, 0x54, 0x12, 0x73, 0x16, 0x7e, 0x34, 0x01, + 0xe3, 0x7d, 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xdd, 0x12, 0x73, 0x16, 0xda, 0x49, 0x80, 0x99, + 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x0f, 0x29, 0xef, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xef, + 0x80, 0x9d, 0x7e, 0x0f, 0x29, 0xf7, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf7, 0xa9, 0xd7, 0xf4, 0xa9, + 0x27, 0xf4, 0xfc, 0x80, 0x8a, 0x7e, 0x0f, 0x29, 0xf3, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf3, 0x80, + 0xeb, 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x2f, 0x2a, 0x0f, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, + 0x0f, 0x80, 0x34, 0x7e, 0x2f, 0x2a, 0x17, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x17, 0xa9, 0xd7, 0xf4, + 0xa9, 0x27, 0xf4, 0xfc, 0x80, 0x21, 0x7e, 0x2f, 0x2a, 0x13, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x13, + 0x80, 0xeb, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x31, 0x28, 0x12, 0x7c, 0x15, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xc2, 0xc4, 0xa9, 0x21, 0xf2, 0xb6, 0xe5, 0xf5, 0x33, 0x72, 0xe7, - 0x40, 0xe0, 0x7e, 0x0d, 0x30, 0x7e, 0x1d, 0x34, 0x7e, 0x2d, 0x38, 0x7e, 0x3d, 0x3c, 0x7e, 0x85, - 0x40, 0x7d, 0x90, 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d, + 0x40, 0xe0, 0x7e, 0x0d, 0x46, 0x7e, 0x1d, 0x4a, 0x7e, 0x2d, 0x4e, 0x7e, 0x3d, 0x52, 0x7e, 0x85, + 0x56, 0x7d, 0x90, 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d, 0x97, 0x4d, 0x98, 0x68, 0x72, 0x7a, 0x11, 0xf3, 0x7a, 0x01, 0xf3, 0x7a, 0x31, 0xf3, 0x7a, 0x21, 0xf3, 0x7a, 0x51, 0xf3, 0x7a, 0x41, 0xf3, 0x7a, 0x71, 0xf3, 0x7a, 0x61, 0xf3, 0x7a, 0x91, 0xf3, - 0x7a, 0x81, 0xf3, 0x30, 0x73, 0x1a, 0x7a, 0xb1, 0xf3, 0x7a, 0xa1, 0xf3, 0x7a, 0xd1, 0xf3, 0x7a, + 0x7a, 0x81, 0xf3, 0x30, 0x7b, 0x1a, 0x7a, 0xb1, 0xf3, 0x7a, 0xa1, 0xf3, 0x7a, 0xd1, 0xf3, 0x7a, 0xc1, 0xf3, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3, 0x7d, 0x78, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3, - 0xa9, 0x30, 0xf5, 0x03, 0x02, 0x72, 0xe6, 0x75, 0x2f, 0x29, 0x12, 0x7e, 0x30, 0x20, 0x73, 0x0b, - 0x75, 0x2f, 0x0a, 0x12, 0x7e, 0x30, 0x75, 0xf6, 0x0a, 0x80, 0x09, 0x75, 0x2f, 0x12, 0x12, 0x7e, - 0x30, 0x75, 0xf6, 0x12, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x30, 0x7a, 0x0d, 0x34, 0x7a, 0x0d, - 0x38, 0x7a, 0x0d, 0x3c, 0x7a, 0x05, 0x40, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x1e, 0xb0, - 0x40, 0x0c, 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x75, 0x0b, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0xa1, + 0xa9, 0x30, 0xf5, 0x03, 0x02, 0x70, 0xd6, 0x75, 0x31, 0x29, 0x12, 0x7c, 0x15, 0x20, 0x7b, 0x0b, + 0x75, 0x31, 0x0a, 0x12, 0x7c, 0x15, 0x75, 0xf6, 0x0a, 0x80, 0x09, 0x75, 0x31, 0x12, 0x12, 0x7c, + 0x15, 0x75, 0xf6, 0x12, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x46, 0x7a, 0x0d, 0x4a, 0x7a, 0x0d, + 0x4e, 0x7a, 0x0d, 0x52, 0x7a, 0x05, 0x56, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x1e, 0xb0, + 0x40, 0x0c, 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x72, 0xfb, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0xa1, 0xe3, 0x7a, 0x39, 0xa0, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, @@ -937,7 +1044,7 @@ 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x22, 0x1e, 0xb0, 0x40, 0x0c, - 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x76, 0x69, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0x39, 0xa0, 0x7a, + 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x74, 0x59, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0x39, 0xa0, 0x7a, 0xa1, 0xf3, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, @@ -958,144 +1065,144 @@ 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, - 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x22, 0xc2, 0xaf, 0x7e, 0x37, 0x01, 0xc5, - 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xc1, 0x7e, 0x54, 0x09, 0xcd, 0x9d, 0x50, 0xbd, 0x35, - 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x4b, 0x99, 0x64, 0xda, 0x39, 0x7e, 0x07, 0x01, - 0xc5, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xc5, 0x2e, 0x37, 0x01, 0xc1, 0x7a, 0x37, 0x01, 0xc1, 0xbe, - 0x34, 0x09, 0xcc, 0x28, 0xc7, 0x7e, 0x34, 0x05, 0xcd, 0x7a, 0x37, 0x01, 0xc1, 0x80, 0xbd, 0xd2, - 0xaf, 0x22, 0x75, 0x2f, 0x53, 0x12, 0x7e, 0x30, 0x7e, 0x15, 0x4d, 0x80, 0x11, 0x75, 0x2f, 0x51, - 0x12, 0x7e, 0x30, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d, 0x7c, 0xb2, - 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x6e, 0x8c, 0x7c, 0xb2, 0x54, 0x78, - 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x4d, 0x7a, 0x25, - 0x4f, 0x7e, 0x64, 0x77, 0x47, 0x7a, 0x65, 0x4b, 0x89, 0x24, 0x02, 0x77, 0x55, 0x7e, 0x64, 0x76, - 0xbd, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, 0x19, 0xca, - 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x4d, 0x7e, 0x64, - 0x77, 0x33, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x76, 0xb2, 0x7a, - 0x65, 0x4b, 0x22, 0x75, 0x2f, 0x52, 0x12, 0x7e, 0x30, 0x7e, 0x21, 0x4d, 0x7e, 0x09, 0x30, 0x0b, - 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x2f, 0x54, 0x12, 0x7e, 0x30, 0x7e, 0x15, 0x4d, - 0x7e, 0x25, 0x4f, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x77, 0xd1, 0x30, 0xe6, - 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, 0x6a, 0x68, - 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x77, 0xd9, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, 0x39, 0xda, - 0x09, 0x7e, 0x64, 0x76, 0xbd, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x4d, 0xf5, 0x4f, - 0x7e, 0x64, 0x77, 0x96, 0x80, 0x99, 0x7e, 0x15, 0x4d, 0xe5, 0x4f, 0x80, 0xc4, 0xc0, 0xd0, 0xc0, - 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0xa9, 0x20, 0xdf, 0x12, 0xa9, 0x21, 0xdf, 0x1b, 0x75, 0x2f, 0x01, - 0x12, 0x7e, 0x30, 0x53, 0xdf, 0xf7, 0x12, 0x40, 0xdc, 0x80, 0x0d, 0x75, 0x2f, 0xfe, 0x12, 0x7e, - 0x30, 0x7e, 0x14, 0x00, 0x53, 0x02, 0x40, 0x51, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, - 0x32, 0x03, 0xa5, 0xcb, 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x02, 0x78, 0x52, 0xca, 0x0b, 0xca, + 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x22, 0xc2, 0xaf, 0x7e, 0x37, 0x01, 0xdb, + 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xd7, 0x7e, 0x54, 0x09, 0xe3, 0x9d, 0x50, 0xbd, 0x35, + 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x61, 0x99, 0x64, 0xda, 0x39, 0x7e, 0x07, 0x01, + 0xdb, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xdb, 0x2e, 0x37, 0x01, 0xd7, 0x7a, 0x37, 0x01, 0xd7, 0xbe, + 0x34, 0x09, 0xe2, 0x28, 0xc7, 0x7e, 0x34, 0x05, 0xe3, 0x7a, 0x37, 0x01, 0xd7, 0x80, 0xbd, 0xd2, + 0xaf, 0x22, 0x75, 0x31, 0x53, 0x12, 0x7c, 0x15, 0x7e, 0x15, 0x63, 0x80, 0x11, 0x75, 0x31, 0x51, + 0x12, 0x7c, 0x15, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d, 0x7c, 0xb2, + 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x6c, 0x7c, 0x7c, 0xb2, 0x54, 0x78, + 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x63, 0x7a, 0x25, + 0x65, 0x7e, 0x64, 0x75, 0x37, 0x7a, 0x65, 0x61, 0x89, 0x24, 0x02, 0x75, 0x45, 0x7e, 0x64, 0x74, + 0xad, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, 0x19, 0xca, + 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x63, 0x7e, 0x64, + 0x75, 0x23, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x74, 0xa2, 0x7a, + 0x65, 0x61, 0x22, 0x75, 0x31, 0x52, 0x12, 0x7c, 0x15, 0x7e, 0x21, 0x63, 0x7e, 0x09, 0x30, 0x0b, + 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x31, 0x54, 0x12, 0x7c, 0x15, 0x7e, 0x15, 0x63, + 0x7e, 0x25, 0x65, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x75, 0xc1, 0x30, 0xe6, + 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, 0x67, 0x63, + 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x75, 0xc9, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, 0x39, 0xda, + 0x09, 0x7e, 0x64, 0x74, 0xad, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x63, 0xf5, 0x65, + 0x7e, 0x64, 0x75, 0x86, 0x80, 0x99, 0x7e, 0x15, 0x63, 0xe5, 0x65, 0x80, 0xc4, 0xc0, 0xd0, 0xc0, + 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0xa9, 0x20, 0xdf, 0x12, 0xa9, 0x21, 0xdf, 0x1b, 0x75, 0x31, 0x01, + 0x12, 0x7c, 0x15, 0x53, 0xdf, 0xf7, 0x12, 0x40, 0xdc, 0x80, 0x0d, 0x75, 0x31, 0xfe, 0x12, 0x7c, + 0x15, 0x7e, 0x14, 0x00, 0x53, 0x02, 0x40, 0x51, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, + 0x32, 0x03, 0xa5, 0xcb, 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x02, 0x76, 0x42, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0, - 0xf1, 0x7e, 0xb3, 0x2a, 0x1d, 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, - 0x75, 0xf1, 0x00, 0x12, 0x78, 0x3c, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x78, - 0xcd, 0x80, 0x14, 0x30, 0xc1, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x78, 0xcd, 0x80, 0x09, 0x30, 0xc0, - 0x06, 0x75, 0xf1, 0x00, 0x12, 0x78, 0x3c, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, + 0xf1, 0x7e, 0xb3, 0x2a, 0x33, 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, + 0x75, 0xf1, 0x00, 0x12, 0x76, 0x2c, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x76, + 0xbd, 0x80, 0x14, 0x30, 0xc1, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x76, 0xbd, 0x80, 0x09, 0x30, 0xc0, + 0x06, 0x75, 0xf1, 0x00, 0x12, 0x76, 0x2c, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3, - 0x2a, 0x1d, 0xb4, 0x02, 0x07, 0x12, 0x78, 0x5e, 0x02, 0x78, 0x52, 0x22, 0xb4, 0x01, 0xfc, 0x02, - 0x78, 0x98, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2a, 0x1d, 0x7a, 0x03, 0x2a, 0x1e, 0x22, 0x7e, 0xb3, - 0x2a, 0x15, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, - 0x05, 0x0c, 0x75, 0x2f, 0x71, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xf5, 0x8f, 0x22, 0x75, - 0xf6, 0x00, 0x22, 0xbe, 0x57, 0x2a, 0x1b, 0x28, 0x04, 0x7e, 0x57, 0x2a, 0x1b, 0x7a, 0x0f, 0x2a, - 0x20, 0x7a, 0x57, 0x2a, 0x24, 0x02, 0x78, 0x98, 0x7e, 0xef, 0x2a, 0x20, 0x7e, 0xf7, 0x2a, 0x24, - 0x7e, 0x07, 0x2a, 0x24, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3, - 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x2a, 0x20, 0x7a, - 0xf7, 0x2a, 0x24, 0x75, 0x2f, 0x06, 0x12, 0x7e, 0x30, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75, - 0x2f, 0x03, 0x12, 0x7e, 0x30, 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9, - 0xd7, 0xf4, 0xa9, 0x27, 0xf4, 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x79, 0x44, 0x7e, - 0xb3, 0x2a, 0x1e, 0xb4, 0x02, 0x0f, 0xa9, 0xd4, 0xe4, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x2a, 0x1e, - 0x7a, 0xb3, 0x2a, 0x1d, 0x22, 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6, 0x7c, 0x32, 0x7e, 0x13, 0x2a, - 0x1f, 0x2c, 0x21, 0x7a, 0x23, 0x2a, 0x1f, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x2a, 0x26, 0xe5, 0xe3, - 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4, 0x75, 0x2f, 0x70, 0x12, 0x7e, - 0x30, 0x7e, 0xb3, 0x2a, 0x1f, 0x7e, 0xa3, 0x2a, 0x1c, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x79, 0xdb, - 0x22, 0x02, 0x7d, 0x44, 0xe5, 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4, 0xe2, 0x7e, 0x01, 0xe3, 0x7e, - 0x11, 0xe3, 0x7e, 0x31, 0xe3, 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3, 0x7e, 0x41, 0xe3, 0x7e, 0x71, - 0xe3, 0x7e, 0x61, 0xe3, 0x7a, 0x0f, 0x2a, 0x15, 0x7a, 0x1f, 0x2a, 0x19, 0x75, 0x2f, 0x04, 0x12, - 0x7e, 0x30, 0x7a, 0x01, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x21, - 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x31, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x41, 0x2f, 0x12, 0x7e, 0x30, - 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, - 0x7e, 0x30, 0xa9, 0xd4, 0xe4, 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2, 0x12, 0x79, 0xaf, 0x22, 0x6d, - 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2a, 0x24, 0x7a, 0x03, 0x2a, 0x1f, 0x7e, 0xb3, 0x2a, - 0x15, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x2a, 0x1e, 0x7a, 0x33, 0x2a, 0x1d, 0xbe, 0x07, 0x2a, 0x1b, - 0x68, 0x09, 0x22, 0x7a, 0x33, 0x2a, 0x1e, 0x7a, 0x23, 0x2a, 0x1d, 0x7e, 0xb3, 0x2a, 0x15, 0x54, - 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, - 0x30, 0xe4, 0x03, 0x02, 0x7d, 0x44, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, - 0x90, 0x7a, 0x07, 0x75, 0x84, 0xff, 0x73, 0x02, 0x7b, 0x5b, 0x02, 0x7a, 0x4f, 0x02, 0x7b, 0xf8, - 0x02, 0x7c, 0x13, 0x02, 0x7a, 0xf4, 0x02, 0x7a, 0xb5, 0x02, 0x7c, 0x2c, 0x02, 0x7c, 0x2c, 0x02, - 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, - 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x35, 0x02, 0x7c, 0xe9, 0x02, 0x7c, 0x32, - 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x7e, - 0xb3, 0x2a, 0x16, 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x2a, 0x17, 0x60, 0x56, 0x7c, 0x0b, 0x7e, 0x13, - 0x2a, 0x18, 0x7e, 0x17, 0x2a, 0x19, 0x75, 0x2f, 0x72, 0x12, 0x7e, 0x30, 0x7a, 0x01, 0x2f, 0x12, - 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x7d, 0x4e, 0x40, 0x35, 0x02, 0x78, 0x83, - 0xb4, 0x08, 0x10, 0x75, 0x2f, 0x74, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x3f, 0xf1, 0xf5, 0xf3, 0x75, - 0xf6, 0x01, 0x22, 0xb4, 0x00, 0x1c, 0x75, 0x2f, 0x75, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x3f, 0xf2, - 0x30, 0xe0, 0x05, 0x75, 0xf3, 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, 0x75, 0xf3, 0x00, 0x75, 0xf6, - 0x02, 0x22, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x00, 0x35, 0x75, 0x2f, 0x76, 0x12, - 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, 0xb3, 0x2a, 0x1a, 0x20, 0xe7, - 0x09, 0xe5, 0xe1, 0x30, 0xe7, 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, 0xe1, 0x30, 0xe6, 0x04, 0x74, - 0x01, 0x80, 0x02, 0x74, 0x00, 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, - 0x22, 0x02, 0x7d, 0x44, 0xc0, 0xf1, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0x42, 0xf1, 0x7e, 0xb3, - 0x2a, 0x18, 0xb4, 0x00, 0x45, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x01, 0x24, 0x75, 0x2f, 0x77, 0x12, - 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0x78, 0x05, 0x53, 0xe1, 0x3f, 0x80, 0x37, 0x7e, - 0xb3, 0x2a, 0x1a, 0x20, 0xe7, 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, 0x53, 0xe1, 0xbf, 0x80, 0x26, - 0xb4, 0x03, 0x17, 0x75, 0x2f, 0x78, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x20, 0xe7, 0x05, - 0x43, 0xe1, 0x80, 0x80, 0x11, 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x75, - 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x22, 0xd0, 0xf1, 0x02, 0x78, 0x7f, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, - 0x09, 0x23, 0x75, 0x2f, 0x79, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xbe, 0xb3, 0x3f, 0xf1, - 0x68, 0x11, 0xca, 0xb8, 0xc0, 0xf1, 0x12, 0x43, 0x68, 0xd0, 0xf1, 0xda, 0xb8, 0x50, 0x76, 0x7a, - 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x2f, 0x7a, 0x12, 0x7e, 0x30, 0x80, 0x62, - 0xb4, 0x03, 0x19, 0x75, 0x2f, 0x7b, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xb4, 0x01, 0x55, - 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19, 0x75, - 0x2f, 0x7c, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f, 0xf2, - 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x2a, 0x17, 0x60, - 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x18, 0x7e, 0x17, 0x2a, 0x19, 0x75, 0x2f, 0x73, 0x12, 0x7e, - 0x30, 0x7a, 0x01, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x7d, 0x7a, - 0x40, 0x03, 0x02, 0x78, 0x7f, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x0b, 0xf6, 0x75, - 0x2f, 0x7d, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0x7e, 0xa3, 0x2a, 0x1a, 0x4c, 0xab, 0x78, - 0xe4, 0x80, 0xdf, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x0a, 0xdb, 0x75, 0x2f, 0x7e, 0x12, 0x7e, 0x30, - 0x7e, 0xb3, 0x2a, 0x18, 0x70, 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0x02, 0x7d, 0x44, 0x02, - 0x7d, 0x44, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x04, 0x20, 0x75, 0x2f, 0xc3, 0x12, - 0x7e, 0x30, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x17, 0x7e, 0x18, 0x2a, 0x26, 0x7a, 0x1c, - 0x00, 0x00, 0x7e, 0x47, 0x2a, 0x1b, 0x12, 0x7e, 0x3c, 0x02, 0x7c, 0xe3, 0xb4, 0x06, 0x3a, 0x75, - 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, - 0xd7, 0x2a, 0x17, 0x7e, 0x78, 0x2a, 0x26, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2a, 0x1b, 0x75, - 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7e, - 0x75, 0xd0, 0x87, 0xd0, 0xa8, 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00, 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, - 0x87, 0x12, 0x78, 0x7f, 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, - 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, 0x7e, 0x57, 0x2a, 0x17, 0x4d, - 0x55, 0x68, 0x05, 0xa9, 0xd2, 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, 0x80, 0x16, 0xb4, 0x07, 0x16, - 0xc2, 0xaf, 0x7e, 0x07, 0x2a, 0x19, 0x7e, 0x17, 0x2a, 0x17, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, - 0xca, 0x28, 0x32, 0x02, 0x78, 0x7f, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x03, 0x15, - 0x75, 0x2f, 0xc2, 0x12, 0x7e, 0x30, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x17, 0x7e, 0x57, - 0x2a, 0x1b, 0x02, 0x78, 0x83, 0xb4, 0x05, 0x39, 0x75, 0x2f, 0xc0, 0x12, 0x7e, 0x30, 0xc0, 0xa8, - 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x7e, 0x08, 0x2a, 0x26, 0x7a, 0x0c, 0x00, 0x00, 0x7e, - 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2a, 0x17, 0x7e, 0x47, 0x2a, 0x1b, 0x12, 0x7e, 0x3c, 0xd0, 0x87, - 0xd0, 0xa8, 0x7e, 0x08, 0x2a, 0x26, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x2a, 0x1b, 0x02, 0x78, - 0x83, 0x02, 0x7d, 0x44, 0x75, 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x43, 0xe1, 0xc0, 0x22, 0xc0, 0xa8, - 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7d, 0xb9, 0x40, 0x19, 0x7e, 0x08, 0x2a, 0x26, - 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x7e, 0x3c, 0xda, 0x59, 0xda, 0x0b, 0xd0, - 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, - 0xa9, 0xd5, 0x87, 0x12, 0x7d, 0xb9, 0x40, 0x2b, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, - 0x7f, 0x61, 0x7e, 0x78, 0x2a, 0x26, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2a, 0x1b, 0xbd, 0x74, - 0x78, 0x11, 0x75, 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0x12, 0x7e, 0x75, 0x40, 0x06, 0xd0, 0x87, 0xd0, - 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, - 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0xc2, - 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e, 0x34, 0x7f, 0xcc, 0x7e, 0x1b, - 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, - 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, - 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, - 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, - 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22, + 0x2a, 0x33, 0xb4, 0x02, 0x07, 0x12, 0x76, 0x4e, 0x02, 0x76, 0x42, 0x22, 0xb4, 0x01, 0xfc, 0x02, + 0x76, 0x88, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2a, 0x33, 0x7a, 0x03, 0x2a, 0x34, 0x22, 0x7e, 0xb3, + 0x2a, 0x2b, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, + 0x05, 0x0c, 0x75, 0x31, 0x71, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0xf5, 0x8f, 0x22, 0x75, + 0xf6, 0x00, 0x22, 0xbe, 0x57, 0x2a, 0x31, 0x28, 0x04, 0x7e, 0x57, 0x2a, 0x31, 0x7a, 0x0f, 0x2a, + 0x36, 0x7a, 0x57, 0x2a, 0x3a, 0x02, 0x76, 0x88, 0x7e, 0xef, 0x2a, 0x36, 0x7e, 0xf7, 0x2a, 0x3a, + 0x7e, 0x07, 0x2a, 0x3a, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3, + 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x2a, 0x36, 0x7a, + 0xf7, 0x2a, 0x3a, 0x75, 0x31, 0x06, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75, + 0x31, 0x03, 0x12, 0x7c, 0x15, 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9, + 0xd7, 0xf4, 0xa9, 0x27, 0xf4, 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x77, 0x29, 0x7e, + 0xb3, 0x2a, 0x34, 0xb4, 0x02, 0x04, 0xa9, 0xd4, 0xe4, 0x22, 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6, + 0x7c, 0x32, 0x7e, 0x13, 0x2a, 0x35, 0x2c, 0x21, 0x7a, 0x23, 0x2a, 0x35, 0x7e, 0x00, 0x00, 0x2e, + 0x04, 0x2a, 0x3c, 0xe5, 0xe3, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4, + 0x75, 0x31, 0x70, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x35, 0x7e, 0xa3, 0x2a, 0x32, 0xbc, 0xab, + 0x78, 0x03, 0x12, 0x77, 0xc0, 0x22, 0x02, 0x7b, 0x29, 0xe5, 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4, + 0xe2, 0x7e, 0x01, 0xe3, 0x7e, 0x11, 0xe3, 0x7e, 0x31, 0xe3, 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3, + 0x7e, 0x41, 0xe3, 0x7e, 0x71, 0xe3, 0x7e, 0x61, 0xe3, 0x7a, 0x0f, 0x2a, 0x2b, 0x7a, 0x1f, 0x2a, + 0x2f, 0x75, 0x31, 0x04, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31, + 0x12, 0x7c, 0x15, 0x7a, 0x21, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x31, 0x31, 0x12, 0x7c, 0x15, 0x7a, + 0x41, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x51, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x61, 0x31, 0x12, 0x7c, + 0x15, 0x7a, 0x71, 0x31, 0x12, 0x7c, 0x15, 0xa9, 0xd4, 0xe4, 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2, + 0x12, 0x77, 0x94, 0x22, 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2a, 0x3a, 0x7a, 0x03, + 0x2a, 0x35, 0x7e, 0xb3, 0x2a, 0x2b, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x2a, 0x34, 0x7a, 0x33, 0x2a, + 0x33, 0xbe, 0x07, 0x2a, 0x31, 0x68, 0x09, 0x22, 0x7a, 0x33, 0x2a, 0x34, 0x7a, 0x23, 0x2a, 0x33, + 0x7e, 0xb3, 0x2a, 0x2b, 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, + 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, 0x03, 0x02, 0x7b, 0x29, 0x54, 0x3e, 0xf5, 0xf0, 0x03, + 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x77, 0xec, 0x75, 0x84, 0xff, 0x73, 0x02, 0x79, 0x40, 0x02, + 0x78, 0x34, 0x02, 0x79, 0xdd, 0x02, 0x79, 0xf8, 0x02, 0x78, 0xd9, 0x02, 0x78, 0x9a, 0x02, 0x7a, + 0x11, 0x02, 0x7a, 0x11, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, + 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x14, 0x02, 0x7a, 0x1a, 0x02, + 0x7a, 0xce, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a, 0x17, 0x02, 0x7a, + 0x17, 0x02, 0x7a, 0x17, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x2a, 0x2d, 0x60, + 0x56, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x2e, 0x7e, 0x17, 0x2a, 0x2f, 0x75, 0x31, 0x72, 0x12, 0x7c, + 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31, 0x12, 0x7c, 0x15, 0x12, 0x7b, 0x33, + 0x40, 0x35, 0x02, 0x76, 0x73, 0xb4, 0x08, 0x10, 0x75, 0x31, 0x74, 0x12, 0x7c, 0x15, 0x7e, 0xb3, + 0x3f, 0xf1, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0xb4, 0x00, 0x1c, 0x75, 0x31, 0x75, 0x12, 0x7c, + 0x15, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x05, 0x75, 0xf3, 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, + 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x00, + 0x35, 0x75, 0x31, 0x76, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x30, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, + 0xb3, 0x2a, 0x30, 0x20, 0xe7, 0x09, 0xe5, 0xe1, 0x30, 0xe7, 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, + 0xe1, 0x30, 0xe6, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, 0x00, 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, + 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x7b, 0x29, 0xc0, 0xf1, 0x7e, 0xb3, 0x2a, 0x30, 0x54, + 0x0f, 0x42, 0xf1, 0x7e, 0xb3, 0x2a, 0x2e, 0xb4, 0x00, 0x45, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x01, + 0x24, 0x75, 0x31, 0x77, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x30, 0x54, 0x0f, 0x78, 0x05, 0x53, + 0xe1, 0x3f, 0x80, 0x37, 0x7e, 0xb3, 0x2a, 0x30, 0x20, 0xe7, 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, + 0x53, 0xe1, 0xbf, 0x80, 0x26, 0xb4, 0x03, 0x17, 0x75, 0x31, 0x78, 0x12, 0x7c, 0x15, 0x7e, 0xb3, + 0x2a, 0x30, 0x20, 0xe7, 0x05, 0x43, 0xe1, 0x80, 0x80, 0x11, 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43, + 0xe1, 0xc0, 0xd0, 0xf1, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x22, 0xd0, 0xf1, 0x02, 0x76, 0x6f, + 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x09, 0x23, 0x75, 0x31, 0x79, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, + 0x2e, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x11, 0xca, 0xb8, 0xc0, 0xf1, 0x12, 0x43, 0xd4, 0xd0, 0xf1, + 0xda, 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x31, 0x7a, + 0x12, 0x7c, 0x15, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x31, 0x7b, 0x12, 0x7c, 0x15, 0x7e, 0xb3, + 0x2a, 0x2e, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, + 0x46, 0xb4, 0x01, 0x19, 0x75, 0x31, 0x7c, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0xb4, 0x01, + 0x39, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, + 0x7e, 0xb3, 0x2a, 0x2d, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x2e, 0x7e, 0x17, 0x2a, 0x2f, + 0x75, 0x31, 0x73, 0x12, 0x7c, 0x15, 0x7a, 0x01, 0x31, 0x12, 0x7c, 0x15, 0x7a, 0x11, 0x31, 0x12, + 0x7c, 0x15, 0x12, 0x7b, 0x5f, 0x40, 0x03, 0x02, 0x76, 0x6f, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a, + 0x2c, 0xb4, 0x0b, 0xf6, 0x75, 0x31, 0x7d, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0x7e, 0xa3, + 0x2a, 0x30, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x0a, 0xdb, 0x75, + 0x31, 0x7e, 0x12, 0x7c, 0x15, 0x7e, 0xb3, 0x2a, 0x2e, 0x70, 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01, + 0x22, 0x02, 0x7b, 0x29, 0x02, 0x7b, 0x29, 0x02, 0x7b, 0x29, 0x7e, 0xb3, 0x2a, 0x2c, 0xb4, 0x04, + 0x20, 0x75, 0x31, 0xc3, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x2d, 0x7e, + 0x18, 0x2a, 0x3c, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x2a, 0x31, 0x12, 0x7c, 0x21, 0x02, 0x7a, + 0xc8, 0xb4, 0x06, 0x3a, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, + 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x2a, 0x2d, 0x7e, 0x78, 0x2a, 0x3c, 0x7a, 0x7c, 0x00, 0x00, + 0x7e, 0x77, 0x2a, 0x31, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, + 0xa9, 0xd5, 0x87, 0x12, 0x7c, 0x5a, 0xd0, 0x87, 0xd0, 0xa8, 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00, + 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x76, 0x6f, 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, + 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, + 0x7e, 0x57, 0x2a, 0x2d, 0x4d, 0x55, 0x68, 0x05, 0xa9, 0xd2, 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, + 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x2a, 0x2f, 0x7e, 0x17, 0x2a, 0x2d, 0xc0, + 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x76, 0x6f, 0x02, 0x7b, 0x29, 0x7e, 0xb3, + 0x2a, 0x2c, 0xb4, 0x03, 0x15, 0x75, 0x31, 0xc2, 0x12, 0x7c, 0x15, 0x7e, 0x04, 0x00, 0x01, 0x7e, + 0x17, 0x2a, 0x2d, 0x7e, 0x57, 0x2a, 0x31, 0x02, 0x76, 0x73, 0xb4, 0x05, 0x39, 0x75, 0x31, 0xc0, + 0x12, 0x7c, 0x15, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x7e, 0x08, 0x2a, 0x3c, + 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2a, 0x2d, 0x7e, 0x47, 0x2a, 0x31, + 0x12, 0x7c, 0x21, 0xd0, 0x87, 0xd0, 0xa8, 0x7e, 0x08, 0x2a, 0x3c, 0x7a, 0x0c, 0x00, 0x00, 0x7e, + 0x57, 0x2a, 0x31, 0x02, 0x76, 0x73, 0x02, 0x7b, 0x29, 0x75, 0x31, 0x07, 0x12, 0x7c, 0x15, 0x43, + 0xe1, 0xc0, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7b, 0x9e, 0x40, + 0x19, 0x7e, 0x08, 0x2a, 0x3c, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x7c, 0x21, + 0xda, 0x59, 0xda, 0x0b, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0, + 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7b, 0x9e, 0x40, 0x2b, 0x7e, 0x58, 0x00, + 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x2a, 0x3c, 0x7a, 0x7c, 0x00, 0x00, 0x7e, + 0x77, 0x2a, 0x31, 0xbd, 0x74, 0x78, 0x11, 0x75, 0x31, 0xc1, 0x12, 0x7c, 0x15, 0x12, 0x7c, 0x5a, + 0x40, 0x06, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, + 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, + 0x87, 0x7e, 0x34, 0x7f, 0xc2, 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e, + 0x34, 0x7f, 0xcc, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, + 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, + 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, + 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, + 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, + 0xff, 0xc3, 0x22, 0xd3, 0x22, -// Segment #15, Start Address 00ff7fc6, Length 4 +// Segment #16, Start Address 00ff7fc6, Length 4 0xff,0x00,0xc6,0x7f,0x04,0x00, - 0x01, 0x0c, 0x03, 0x00, + 0x01, 0x10, 0x04, 0x00, -// Segment #16, Start Address 00ff7e30, Length 315 -0xff,0x00,0x30,0x7e,0x3b,0x01, - 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a, +// Segment #17, Start Address 00ff7c15, Length 330 +0xff,0x00,0x15,0x7c,0x4a,0x01, + 0xca, 0x08, 0x7e, 0x01, 0x31, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, - 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x7e, 0x9f, + 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x7c, 0x84, 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43, 0x90, 0x30, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, @@ -1104,16 +1211,17 @@ 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2, - 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, - 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, - 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, 0xfe, 0x0b, 0x1a, 0x00, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, - 0x51, 0x23, 0x7e, 0x18, 0x7f, 0x15, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, - 0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, + 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x42, 0x08, 0x06, 0x04, 0x02, 0x04, 0x00, + 0x02, 0x01, 0x04, 0x01, 0x02, 0x82, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x04, 0x02, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x02, 0x02, 0x08, 0x02, 0x04, 0x20, 0x04, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, + 0x1c, 0x00, 0xfe, 0x0b, 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x1a, 0x38, 0x1a, 0x0a, 0x51, + 0x23, 0x7e, 0x18, 0x7c, 0xfa, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, + 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, }; static struct edge_firmware_version_info IMAGE_VERSION_NAME = { - 1, 12, 3 }; // Major, Minor, Build + 1, 16, 4 }; // Major, Minor, Build #undef IMAGE_VERSION_NAME diff -Nru a/drivers/usb/serial/io_fw_down3.h b/drivers/usb/serial/io_fw_down3.h --- a/drivers/usb/serial/io_fw_down3.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/serial/io_fw_down3.h 2004-09-06 16:37:54 -07:00 @@ -1,11 +1,11 @@ //************************************************************** //* Edgeport Binary Image (for TI based products) -//* Generated by TIBin2C v1.00 +//* Generated by TIBin2C v2.00 (watchport) //* Copyright (C) 2001 Inside Out Networks, All rights reserved. //************************************************************** -static int IMAGE_SIZE = 12166; +static int IMAGE_SIZE = 12749; struct EDGE_FIRMWARE_VERSION_INFO { @@ -16,7 +16,7 @@ static struct EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = { - 4, 1, 0 // Major, Minor, Build + 4, 10, 0 // Major, Minor, Build }; @@ -27,20 +27,20 @@ // WORD Length; // BYTE CheckSum; // }; -0x83, 0x2f, -0x33, +0xca, 0x31, +0xa8, -0x02, 0x24, 0x84, 0x02, 0x1f, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1e, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x1a, 0x85, 0x45, -0x8c, 0x85, 0x46, 0x8a, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, -0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xe5, 0x44, -0x24, 0x08, 0xf8, 0xe6, 0x60, 0x2b, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0xa6, 0x81, 0xe5, 0x44, 0x75, -0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0x78, 0x92, 0xe5, 0x81, -0x04, 0xc3, 0x98, 0xf9, 0x94, 0x22, 0x40, 0x03, 0x02, 0x11, 0x1a, 0xe6, 0xf0, 0x08, 0xa3, 0xd9, -0xfa, 0x74, 0x08, 0x25, 0x44, 0xf8, 0x05, 0x44, 0x08, 0xe6, 0x54, 0x80, 0x70, 0x0c, 0xe5, 0x44, -0xb4, 0x07, 0xf3, 0x78, 0x08, 0x75, 0x44, 0x00, 0x80, 0xef, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0x86, -0x81, 0xe5, 0x44, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, -0x78, 0x92, 0xe5, 0x81, 0x04, 0xc3, 0x98, 0xf9, 0xe0, 0xf6, 0x08, 0xa3, 0xd9, 0xfa, 0xd0, 0x07, +0x02, 0x26, 0xfe, 0x02, 0x21, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1e, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x1a, 0x85, 0x3f, +0x8c, 0x85, 0x40, 0x8a, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, +0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xe5, 0x3e, +0x24, 0x08, 0xf8, 0xe6, 0x60, 0x2b, 0xe5, 0x3e, 0x24, 0x10, 0xf8, 0xa6, 0x81, 0xe5, 0x3e, 0x75, +0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0x78, 0x8c, 0xe5, 0x81, +0x04, 0xc3, 0x98, 0xf9, 0x94, 0x22, 0x40, 0x03, 0x02, 0x11, 0x94, 0xe6, 0xf0, 0x08, 0xa3, 0xd9, +0xfa, 0x74, 0x08, 0x25, 0x3e, 0xf8, 0x05, 0x3e, 0x08, 0xe6, 0x54, 0x80, 0x70, 0x0c, 0xe5, 0x3e, +0xb4, 0x07, 0xf3, 0x78, 0x08, 0x75, 0x3e, 0x00, 0x80, 0xef, 0xe5, 0x3e, 0x24, 0x10, 0xf8, 0x86, +0x81, 0xe5, 0x3e, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, +0x78, 0x8c, 0xe5, 0x81, 0x04, 0xc3, 0x98, 0xf9, 0xe0, 0xf6, 0x08, 0xa3, 0xd9, 0xfa, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x30, 0x01, 0x4d, 0x30, 0xb4, 0x48, 0x10, 0x00, 0x45, 0x90, 0xff, 0x08, 0xe0, 0x54, 0x20, 0xf8, 0x90, 0xff, 0x48, 0xe0, 0x54, 0x20, 0xf9, @@ -50,747 +50,783 @@ 0xa3, 0xe0, 0xcb, 0xf0, 0x6b, 0x60, 0x02, 0x7e, 0x04, 0x22, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0xff, 0x93, 0x74, 0x01, 0xf0, 0xe5, 0x81, 0x94, 0xfd, 0x40, 0x03, -0x02, 0x11, 0x1a, 0x85, 0x47, 0x8d, 0x85, 0x48, 0x8b, 0x74, 0xae, 0xf5, 0x82, 0x74, 0xfa, 0xf5, +0x02, 0x11, 0x94, 0x85, 0x41, 0x8d, 0x85, 0x42, 0x8b, 0x74, 0xaf, 0xf5, 0x82, 0x74, 0xfa, 0xf5, 0x83, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x4a, 0xe0, 0x30, 0xe7, 0x2c, 0x90, 0xff, 0x4e, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, -0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, -0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, +0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x27, +0x8d, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, 0xa3, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x52, 0xe0, 0x30, 0xe7, 0x2c, -0x90, 0xff, 0x56, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, -0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, -0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, -0x20, 0x02, 0x03, 0x30, 0x01, 0x7b, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, 0x14, -0xfc, 0xf0, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0x64, 0x04, 0x70, 0x0f, 0xec, 0x70, 0x62, 0x7e, -0x01, 0x12, 0x00, 0xc9, 0x7c, 0x0a, 0x7d, 0xfa, 0x02, 0x02, 0x22, 0x12, 0x00, 0xc9, 0xee, 0x64, -0x04, 0x60, 0x1d, 0xec, 0x70, 0x4b, 0x7c, 0x0a, 0xed, 0x14, 0xfd, 0x70, 0x15, 0xee, 0x64, 0x02, -0x60, 0x07, 0x7e, 0x02, 0x7d, 0x32, 0x02, 0x02, 0x22, 0x7e, 0x01, 0x7d, 0xfa, 0x02, 0x02, 0x22, -0x7c, 0x0a, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, -0xee, 0xf0, 0x14, 0x60, 0x18, 0x20, 0xe1, 0x0f, 0x20, 0x01, 0x06, 0xd2, 0xb1, 0xc2, 0xb0, 0x80, -0x10, 0xc2, 0xb1, 0xd2, 0xb0, 0x80, 0x0a, 0xc2, 0xb1, 0xc2, 0xb0, 0x80, 0x04, 0xd2, 0xb0, 0xd2, -0xb1, 0x78, 0x19, 0x79, 0x09, 0x7a, 0x07, 0xe7, 0x70, 0x04, 0xa6, 0x00, 0x80, 0x0b, 0xe6, 0x60, -0x08, 0x16, 0xe6, 0x70, 0x04, 0xe7, 0x44, 0x80, 0xf7, 0x08, 0x09, 0xda, 0xea, 0xe5, 0x43, 0x60, -0x13, 0x14, 0xf5, 0x43, 0x70, 0x0e, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x10, 0x95, -0xd2, 0x8c, 0xd2, 0x8d, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, -0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x90, -0xff, 0x04, 0xe0, 0x90, 0xfa, 0xb5, 0xf0, 0x90, 0xff, 0x06, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, -0xff, 0xea, 0xfe, 0xef, 0xc3, 0x94, 0x08, 0xee, 0x94, 0x01, 0x50, 0x02, 0x80, 0x04, 0x7e, 0x01, -0x7f, 0x08, 0x8e, 0x34, 0x8f, 0x35, 0x90, 0xff, 0x02, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, 0xff, -0xea, 0x90, 0xfa, 0xb9, 0xf0, 0xef, 0xa3, 0xf0, 0x12, 0x18, 0x49, 0x78, 0x24, 0x7c, 0x00, 0x7d, -0x00, 0x12, 0x19, 0x6c, 0x7e, 0x00, 0x7f, 0x05, 0x12, 0x13, 0x8f, 0xe4, 0xf5, 0x53, 0xe5, 0x53, -0xc3, 0x94, 0x02, 0x50, 0x0f, 0x12, 0x18, 0x2a, 0xe4, 0x12, 0x13, 0xfb, 0x05, 0x53, 0x04, 0x12, -0x18, 0x1b, 0x80, 0xea, 0x12, 0x18, 0x49, 0x90, 0xff, 0x00, 0xe0, 0xff, 0x54, 0x60, 0x24, 0xc0, -0x70, 0x03, 0x02, 0x08, 0xb8, 0x24, 0x40, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, -0xfe, 0x54, 0x0f, 0xf5, 0x53, 0xee, 0x30, 0xe7, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0a, 0x90, -0xff, 0x01, 0xe0, 0x12, 0x15, 0x0f, 0x03, 0x55, 0x00, 0x04, 0x28, 0x01, 0x05, 0x2f, 0x03, 0x05, -0xf6, 0x05, 0x06, 0x38, 0x06, 0x07, 0x9a, 0x08, 0x07, 0xe2, 0x09, 0x08, 0x3e, 0x0a, 0x08, 0x7e, -0x0b, 0x00, 0x00, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, -0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x02, 0x45, 0x34, -0x60, 0x03, 0x02, 0x0e, 0xac, 0xef, 0x54, 0x1f, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x47, 0x24, 0x02, -0x60, 0x03, 0x02, 0x0e, 0xac, 0xee, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0x2a, 0x74, 0x01, -0x12, 0x13, 0xfb, 0x78, 0x6d, 0xe6, 0x30, 0xe0, 0x08, 0x12, 0x18, 0x2a, 0x74, 0x02, 0x12, 0x13, -0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x09, 0x90, 0xfa, 0xb5, 0xe0, 0x60, -0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, -0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x0e, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x60, -0x07, 0x64, 0x80, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, -0xe5, 0x53, 0x70, 0x19, 0x30, 0x0a, 0x0b, 0x90, 0xff, 0x80, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, -0x80, 0x24, 0x90, 0xff, 0x82, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, 0x80, 0x19, 0x15, 0x53, 0x30, -0x0a, 0x0b, 0x12, 0x18, 0xbd, 0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x80, 0x09, 0x12, 0x18, 0xcb, -0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0x60, 0x05, 0x74, 0x01, -0x12, 0x13, 0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, -0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, -0x60, 0x59, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, -0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, -0xac, 0x78, 0x6d, 0xe6, 0x54, 0xfe, 0xf6, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, -0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x09, 0x90, 0xfa, 0xb5, 0xe0, -0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0c, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, -0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, 0xb9, 0xe0, 0x70, -0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, -0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x07, -0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x0f, 0x90, 0xff, 0x82, 0xe0, 0x54, -0xf7, 0xf0, 0x90, 0xff, 0x80, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0xe5, 0x53, 0x24, 0xfe, 0x60, 0x1b, -0x04, 0x70, 0x2e, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, -0x80, 0x1f, 0xe4, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, 0x80, 0x16, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, -0xe4, 0x33, 0xfd, 0x7f, 0x04, 0x12, 0x2a, 0xce, 0x80, 0x07, 0xe4, 0xfd, 0x7f, 0x04, 0x12, 0x2a, -0xce, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x80, -0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, -0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, -0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x55, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, -0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, -0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x78, 0x6d, 0xe6, 0x44, 0x01, 0xf6, 0xe4, 0xff, -0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, -0x30, 0xe0, 0x07, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0a, 0xe5, -0x53, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, -0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xff, -0x12, 0x2f, 0x3b, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, -0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x09, 0x30, 0x0a, 0x03, 0x02, 0x19, 0x7a, 0x02, 0x19, 0x3e, -0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, -0xf5, 0x83, 0xe0, 0x44, 0x08, 0xf0, 0x80, 0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x44, 0x08, -0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, -0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, -0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xac, -0x90, 0xfa, 0xba, 0xe0, 0x90, 0xff, 0xff, 0xf0, 0xe0, 0x60, 0x05, 0x43, 0x2c, 0x01, 0x80, 0x03, -0x53, 0x2c, 0xfe, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, -0xe5, 0x35, 0x45, 0x34, 0x70, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, -0xac, 0x90, 0xfa, 0xb9, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0x24, 0xfe, 0x60, 0x3a, 0x14, 0x60, -0x75, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xed, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, -0x49, 0x12, 0x19, 0x73, 0x7d, 0x03, 0x12, 0x0e, 0xf3, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, -0xb0, 0x90, 0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, -0x04, 0xae, 0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x18, 0x49, 0x90, 0xf9, 0x65, 0xe0, 0x30, -0xe4, 0x0d, 0x12, 0x19, 0x73, 0x7d, 0x14, 0x12, 0x0e, 0xf3, 0x60, 0x10, 0x02, 0x0e, 0xac, 0x12, -0x19, 0x73, 0x7d, 0x04, 0x12, 0x0f, 0x47, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, 0xb0, 0x90, -0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, 0x04, 0xae, -0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x19, 0x73, 0x7d, 0x05, 0x12, 0x0f, 0x47, 0x60, 0x03, -0x02, 0x0e, 0xac, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x12, 0x18, 0x90, 0x7d, 0x01, 0x12, 0x23, -0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xba, 0xe0, 0x90, -0xfa, 0xb1, 0xf0, 0xe4, 0xf5, 0x52, 0x90, 0xfa, 0xb1, 0xe0, 0xff, 0xe5, 0x52, 0xc3, 0x9f, 0x50, -0x24, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0xff, 0xfd, 0x90, 0xfa, 0xb3, 0xe4, 0x8d, 0xf0, 0x12, -0x14, 0x2f, 0x90, 0xfa, 0xb2, 0xe0, 0xc3, 0x9f, 0xf0, 0xd3, 0x94, 0x00, 0x50, 0x03, 0x02, 0x0e, -0xac, 0x05, 0x52, 0x80, 0xd1, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0x24, 0xfe, 0xff, 0x90, 0xfa, -0xb2, 0xf0, 0xfd, 0xa3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0x7a, 0xf9, 0x79, 0x6e, 0x7b, -0x01, 0x8b, 0x2d, 0x8a, 0x2e, 0x89, 0x2f, 0xe9, 0x24, 0x02, 0xf9, 0xe4, 0x3a, 0xfa, 0x12, 0x18, -0x90, 0x12, 0x23, 0xee, 0x8f, 0x52, 0x05, 0x52, 0x05, 0x52, 0x12, 0x18, 0x2a, 0xe5, 0x52, 0x12, -0x13, 0xfb, 0x12, 0x18, 0x2a, 0x90, 0x00, 0x01, 0x74, 0x03, 0x12, 0x14, 0x0d, 0xaf, 0x52, 0x7e, -0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x50, 0x02, 0x80, 0x04, 0xae, 0x34, 0xaf, 0x35, -0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, -0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, -0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, -0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, -0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x00, 0x75, 0x2f, 0x29, 0x02, -0x0f, 0x2f, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, -0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, 0x90, 0xfa, 0xba, -0xe0, 0x94, 0x01, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, -0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, 0x02, 0x0e, -0xac, 0x90, 0xfa, 0xba, 0xe0, 0xf5, 0x29, 0xe5, 0x29, 0x70, 0x08, 0x43, 0x2c, 0x01, 0x53, 0x2c, -0xfd, 0x80, 0x06, 0x53, 0x2c, 0xfe, 0x43, 0x2c, 0x02, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, -0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, -0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, -0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, -0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x7f, 0x01, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, -0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, -0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, -0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, -0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xff, 0x01, 0x12, 0x19, 0x8a, 0xef, 0x12, -0x13, 0xfb, 0x90, 0xfa, 0xb5, 0x12, 0x19, 0x8a, 0x90, 0x00, 0x01, 0xef, 0x12, 0x14, 0x0d, 0x90, -0x00, 0x02, 0xe4, 0x12, 0x14, 0x0d, 0x74, 0x03, 0x12, 0x18, 0x1b, 0x90, 0xfa, 0xb9, 0xe0, 0xff, -0xa3, 0xe0, 0x85, 0x2f, 0x82, 0x85, 0x2e, 0x83, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xff, 0x01, -0xe0, 0x12, 0x15, 0x0f, 0x09, 0x3d, 0x02, 0x09, 0x5f, 0x04, 0x09, 0x81, 0x05, 0x09, 0xad, 0x06, -0x09, 0xcb, 0x07, 0x09, 0xe9, 0x08, 0x0a, 0x07, 0x09, 0x0a, 0x25, 0x0b, 0x0a, 0xda, 0x80, 0x0c, -0xfa, 0x81, 0x0d, 0x1c, 0x82, 0x0b, 0x21, 0x83, 0x0b, 0x6a, 0x84, 0x0b, 0x89, 0x85, 0x0b, 0xc5, -0x86, 0x0c, 0x07, 0x87, 0x0c, 0x95, 0x88, 0x0c, 0xd0, 0x89, 0x0a, 0x43, 0x92, 0x0a, 0x43, 0x93, -0x0d, 0xcf, 0xc0, 0x0e, 0x00, 0xc1, 0x0e, 0x11, 0xc2, 0x00, 0x00, 0x0e, 0x9b, 0xe5, 0x2c, 0x20, -0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, -0xfd, 0x7c, 0x00, 0x7f, 0x07, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, 0xc0, 0xe5, -0x2c, 0x20, 0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, -0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0c, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, -0xc0, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x19, 0x99, 0x50, 0x06, 0xe5, 0x35, -0x45, 0x34, 0x70, 0x05, 0x7f, 0x02, 0x02, 0x2e, 0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x24, 0xfe, 0x24, -0xfd, 0x50, 0x02, 0x80, 0x03, 0x02, 0x2f, 0x28, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, -0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, -0x00, 0x7f, 0x08, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, -0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, -0x09, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, -0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0a, 0x02, -0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, -0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0b, 0x02, 0x10, 0x9c, -0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, -0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0e, 0x02, 0x10, 0x9c, 0x7f, 0x07, -0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x56, 0x12, 0x18, 0xd9, 0x70, 0x4a, 0x90, 0xff, 0x02, -0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, 0x80, 0x12, 0xe5, 0x52, 0xb4, -0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, 0xf0, 0x04, 0xf5, 0x52, 0x12, -0x17, 0x8b, 0x12, 0x19, 0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x05, -0x12, 0x2f, 0x76, 0x80, 0x06, 0x85, 0x2a, 0x30, 0x85, 0x2b, 0x31, 0x75, 0x2d, 0x01, 0x75, 0x2e, -0xf9, 0x75, 0x2f, 0x71, 0x02, 0x29, 0x2d, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x12, 0x18, -0xd9, 0x60, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x19, 0x99, 0x40, 0x05, 0x7f, 0x03, 0x02, -0x2e, 0xa5, 0x90, 0xff, 0x02, 0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, -0x80, 0x12, 0xe5, 0x52, 0xb4, 0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, -0xf0, 0x04, 0xf5, 0x52, 0x12, 0x17, 0x8b, 0x02, 0x2f, 0x28, 0x12, 0x19, 0xa3, 0x12, 0x27, 0x19, -0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x78, -0x6e, 0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0xf2, 0x90, 0x00, 0x02, -0xe4, 0x12, 0x14, 0x0d, 0x90, 0xfa, 0xb6, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0x78, 0x82, 0xe6, 0xfc, -0x08, 0xe6, 0x8c, 0x83, 0x12, 0x18, 0xa3, 0xef, 0xf0, 0x12, 0x2f, 0x80, 0xe4, 0xff, 0x02, 0x2e, -0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x64, 0x01, 0x70, 0x1f, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, -0x70, 0x06, 0xa3, 0xe0, 0xf5, 0x90, 0x80, 0x2d, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0x90, 0x90, 0xfa, -0xba, 0xe0, 0x42, 0x90, 0xd2, 0xaf, 0x80, 0x1d, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, 0x70, -0x06, 0xa3, 0xe0, 0xf5, 0xb0, 0x80, 0x0e, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0xb0, 0x90, 0xfa, 0xba, -0xe0, 0x42, 0xb0, 0xd2, 0xaf, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x49, 0x90, 0xfa, 0xb5, -0xe0, 0xb4, 0x01, 0x0a, 0x12, 0x18, 0x2a, 0xe5, 0x90, 0x12, 0x13, 0xfb, 0x80, 0x08, 0x12, 0x18, -0x2a, 0xe5, 0xb0, 0x12, 0x13, 0xfb, 0x02, 0x0f, 0x2f, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x30, -0x12, 0x18, 0x53, 0x60, 0x18, 0x04, 0x70, 0x28, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, -0xa4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x19, 0x12, 0x19, 0xad, 0xf0, 0x80, 0x13, 0x90, 0xfa, 0xb6, -0xe0, 0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x04, 0x12, 0x19, 0xb4, 0xf0, -0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x36, 0x12, 0x18, 0x53, 0x60, -0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, -0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, -0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, -0xdf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x46, 0x04, 0x60, 0x03, 0x02, -0x0c, 0x90, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x04, 0xf0, 0x90, -0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x6a, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x61, 0x90, -0xff, 0xa4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x53, 0x30, 0x95, 0x09, -0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x47, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, -0x80, 0x3e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x04, 0xf0, 0x90, -0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x2a, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x21, 0x90, -0xff, 0xb4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x13, 0x30, 0x93, 0x09, -0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xfd, 0xf0, -0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, -0xe0, 0x60, 0x09, 0x90, 0xff, 0xa2, 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa2, 0xe0, -0x54, 0xbf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xb2, 0xe0, 0x44, -0x40, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb2, 0xe0, 0x54, 0xbf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, -0x12, 0x18, 0x49, 0x12, 0x18, 0x5b, 0x60, 0x0f, 0x04, 0x70, 0x16, 0x90, 0xff, 0xa4, 0xe0, 0x12, -0x18, 0x2a, 0x12, 0x13, 0xfb, 0x80, 0x0a, 0x90, 0xff, 0xb4, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, -0xfb, 0x75, 0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x12, -0x19, 0x46, 0x7f, 0x03, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xfc, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0xff, -0x7e, 0x00, 0x12, 0x2d, 0xee, 0xc2, 0x90, 0xc2, 0xaf, 0x00, 0x80, 0xfd, 0xe4, 0xf5, 0x54, 0xf5, -0x55, 0x90, 0xfa, 0xbb, 0x74, 0x3e, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0xfa, 0xb3, 0xf0, 0xa3, 0x74, -0x15, 0xf0, 0xe0, 0x54, 0x3f, 0xff, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0xfa, 0xb8, 0xf0, 0xd3, 0x94, -0x00, 0xe4, 0x94, 0x3e, 0x40, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, -0xd6, 0xe5, 0x23, 0x45, 0x22, 0x70, 0x73, 0x12, 0x18, 0x62, 0x90, 0xfa, 0xbb, 0x12, 0x19, 0x65, -0x60, 0x27, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x08, 0x90, 0xfa, 0xb8, 0x74, 0x40, -0xf0, 0x80, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, 0xd6, 0xe5, 0x23, -0x45, 0x22, 0x70, 0x46, 0x12, 0x18, 0x62, 0x80, 0xd1, 0x75, 0x52, 0x02, 0x90, 0xfa, 0xbb, 0xe4, -0xf0, 0xa3, 0x04, 0xf0, 0x90, 0xfa, 0xb3, 0xe4, 0xf0, 0xa3, 0x74, 0x0f, 0xf0, 0x7b, 0x00, 0x7a, -0x00, 0x79, 0x52, 0x90, 0xfa, 0xbc, 0xe0, 0xf5, 0x50, 0x7d, 0x0f, 0x7c, 0x00, 0x12, 0x26, 0x25, -0x75, 0x22, 0x00, 0x8f, 0x23, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x52, 0xe4, 0xf5, 0x40, 0xf5, 0x41, -0x7d, 0x01, 0x12, 0x23, 0xee, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0xaf, 0x23, 0x02, 0x2e, 0xa5, 0x90, -0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x30, 0xe7, 0x10, 0xe0, 0x54, 0x0f, 0x90, 0xf9, 0x62, -0xf0, 0xd3, 0x94, 0x00, 0x40, 0x15, 0xc2, 0x95, 0x80, 0x11, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0f, -0x90, 0xf9, 0x61, 0xf0, 0xd3, 0x94, 0x00, 0x40, 0x02, 0xc2, 0x94, 0xe4, 0xff, 0x02, 0x2e, 0xa5, -0x12, 0x19, 0xa3, 0xbf, 0x01, 0x04, 0xd2, 0x93, 0x80, 0x02, 0xc2, 0x93, 0xe4, 0xff, 0x02, 0x2e, -0xa5, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x54, 0x03, 0x14, 0x60, 0x0a, 0x14, 0x60, -0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x91, 0x80, 0x27, 0xc2, 0x91, 0x80, 0x23, -0x12, 0x19, 0xad, 0x12, 0x0e, 0xfe, 0x60, 0x04, 0xd2, 0x91, 0x80, 0x17, 0x90, 0xff, 0xa4, 0xe0, -0x44, 0x10, 0x12, 0x0e, 0xfe, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x91, 0x80, 0x02, 0xd2, 0x91, 0x12, -0x19, 0xad, 0xf0, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0c, 0xff, 0x13, 0x13, 0x54, 0x3f, 0x14, 0x60, -0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x92, 0x80, 0x27, 0xc2, -0x92, 0x80, 0x23, 0x12, 0x19, 0xb4, 0x12, 0x0f, 0x1e, 0x60, 0x04, 0xd2, 0x92, 0x80, 0x17, 0x90, -0xff, 0xb4, 0xe0, 0x44, 0x10, 0x12, 0x0f, 0x1e, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x92, 0x80, 0x02, -0xd2, 0x92, 0x12, 0x19, 0xb4, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x07, -0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x2f, 0x76, 0x22, -0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, -0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0xab, -0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x22, 0xaa, 0x54, 0xa9, 0x55, 0x7b, 0xff, 0x90, 0xfa, 0xb3, 0xe0, -0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xb8, 0xe0, 0xf5, 0x50, 0x12, 0x26, 0x25, 0x75, 0x22, 0x00, -0x8f, 0x23, 0x22, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, 0xef, 0x22, 0xf0, 0x7f, -0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x12, -0x23, 0xee, 0x8f, 0x52, 0x7e, 0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x22, 0xf0, 0x7f, -0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x75, -0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x02, 0x2f, 0x3b, -0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, -0xef, 0x22, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb0, 0xe0, 0x22, 0xef, 0x90, 0xf8, 0x04, -0xf0, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0xee, 0x60, 0x0a, 0xc0, 0x05, 0x7d, 0x7f, 0xdd, 0xfe, 0xde, -0xfa, 0xd0, 0x05, 0xef, 0xc3, 0x94, 0x15, 0x50, 0x03, 0xd0, 0xa8, 0x22, 0x13, 0x70, 0x03, 0xd0, -0xa8, 0x22, 0xff, 0xd5, 0x07, 0xfd, 0xd0, 0xa8, 0x22, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, -0x04, 0xc0, 0x05, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x86, 0x05, 0x53, 0x05, 0x7f, 0x7c, 0xff, 0x12, -0x0f, 0xfe, 0x7f, 0x00, 0x7e, 0x00, 0xe5, 0x49, 0x60, 0x46, 0xfc, 0x90, 0xf9, 0x19, 0xe0, 0x54, -0x7f, 0x6d, 0x70, 0x0f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xa3, 0x15, -0x49, 0x80, 0x07, 0xa3, 0xa3, 0xa3, 0xdc, 0xe6, 0x80, 0x26, 0xdc, 0x06, 0xd0, 0x82, 0xd0, 0x83, -0x80, 0x1e, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, -0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, -0x12, 0x10, 0x95, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x85, 0xa8, -0x4a, 0x75, 0xa8, 0x88, 0xec, 0x70, 0x02, 0x7c, 0x3f, 0x8c, 0x43, 0x22, 0xe5, 0x44, 0x24, 0x08, -0xf8, 0x76, 0x00, 0x12, 0x10, 0xec, 0x80, 0xfb, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, -0xc0, 0x06, 0x7c, 0xff, 0x12, 0x0f, 0xfe, 0xe5, 0x49, 0x60, 0x42, 0xfe, 0x90, 0xf9, 0x19, 0xe0, -0x54, 0x7f, 0x6f, 0x70, 0x0b, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x15, 0x49, 0x80, 0x07, -0xa3, 0xa3, 0xa3, 0xde, 0xea, 0x80, 0x26, 0xde, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0xd8, 0xe0, -0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, -0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x78, 0x08, 0x08, -0x79, 0x18, 0x09, 0x7c, 0x01, 0xe6, 0x54, 0x7f, 0x6f, 0x70, 0x06, 0x76, 0x00, 0x77, 0x00, 0x80, -0x06, 0x08, 0x09, 0x0c, 0xbc, 0x08, 0xee, 0x12, 0x10, 0x95, 0xd0, 0x06, 0xd0, 0x04, 0xd0, 0x02, -0xd0, 0x01, 0xd0, 0x00, 0x22, 0x75, 0x43, 0x00, 0x85, 0x4a, 0xa8, 0x22, 0xc0, 0xf0, 0xc0, 0x82, -0xc0, 0x83, 0xc3, 0xe5, 0x49, 0x24, 0xe8, 0x50, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf4, 0xef, 0x60, -0x31, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9f, 0x40, 0x2f, 0xc0, 0x04, 0x7c, 0xff, 0x12, 0x0f, -0xfe, 0xd0, 0x04, 0x43, 0x07, 0x80, 0xe5, 0x49, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x19, 0xf5, 0x82, -0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xef, 0xf0, 0xec, 0xa3, 0xf0, 0xed, 0xa3, 0xf0, 0x05, 0x49, 0x12, -0x10, 0x95, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x02, 0x11, 0x1a, 0xc0, 0x04, 0x7c, 0x20, -0xd2, 0x8c, 0xd2, 0x8d, 0xd5, 0x04, 0xfd, 0xd0, 0x04, 0x22, 0x75, 0xa8, 0x00, 0x75, 0x88, 0x00, -0x75, 0xb8, 0x00, 0x75, 0xf0, 0x00, 0x75, 0xd0, 0x00, 0xe4, 0xf8, 0x90, 0xf8, 0x04, 0xf0, 0x90, -0x00, 0x00, 0xf6, 0x08, 0xb8, 0x00, 0xfb, 0x02, 0x00, 0x00, 0xc2, 0xaf, 0xe4, 0x90, 0xff, 0x48, -0xf0, 0x90, 0xff, 0x50, 0xf0, 0x90, 0xff, 0x08, 0xf0, 0x90, 0xff, 0x10, 0xf0, 0x90, 0xff, 0x80, -0xf0, 0xa3, 0xa3, 0xf0, 0xd2, 0xb1, 0xc2, 0xb0, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, -0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0xd2, 0xb0, 0xd2, -0xb1, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, -0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x80, 0xcc, 0xc3, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x03, -0x7f, 0xe8, 0xef, 0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x48, 0x8e, -0x47, 0x22, 0xc3, 0xef, 0x94, 0xbc, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x07, 0x7f, 0xd0, 0xef, -0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x46, 0x8e, 0x45, 0x22, 0xef, -0x70, 0x01, 0x22, 0xc0, 0x00, 0xe5, 0x44, 0x24, 0x18, 0xf8, 0xa6, 0x07, 0xe5, 0x44, 0x24, 0x08, -0xf8, 0xc6, 0x54, 0x7f, 0xf6, 0xe6, 0x30, 0xe7, 0x03, 0xd0, 0x00, 0x22, 0x12, 0x10, 0xec, 0x80, +0x90, 0xff, 0x56, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x25, +0xb4, 0x02, 0x22, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x27, +0x8d, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, +0x80, 0x03, 0x02, 0x02, 0x62, 0x74, 0x15, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, 0x20, 0x04, +0xf1, 0x20, 0x02, 0x03, 0x30, 0x01, 0xeb, 0x74, 0x18, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, +0x14, 0xfc, 0xf0, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0x64, 0x04, 0x70, 0x0f, 0xec, 0x70, 0x62, +0x7e, 0x01, 0x12, 0x00, 0xc9, 0x7c, 0x0a, 0x7d, 0xfa, 0x02, 0x02, 0x33, 0x12, 0x00, 0xc9, 0xee, +0x64, 0x04, 0x60, 0x1d, 0xec, 0x70, 0x4b, 0x7c, 0x0a, 0xed, 0x14, 0xfd, 0x70, 0x15, 0xee, 0x64, +0x02, 0x60, 0x07, 0x7e, 0x02, 0x7d, 0x32, 0x02, 0x02, 0x33, 0x7e, 0x01, 0x7d, 0xfa, 0x02, 0x02, +0x33, 0x7c, 0x0a, 0x74, 0x18, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, +0xa3, 0xee, 0xf0, 0x14, 0x60, 0x18, 0x20, 0xe1, 0x0f, 0x20, 0x01, 0x06, 0xd2, 0xb1, 0xc2, 0xb0, +0x80, 0x10, 0xc2, 0xb1, 0xd2, 0xb0, 0x80, 0x0a, 0xc2, 0xb1, 0xc2, 0xb0, 0x80, 0x04, 0xd2, 0xb0, +0xd2, 0xb1, 0x78, 0x19, 0x79, 0x09, 0x7a, 0x07, 0xe7, 0x70, 0x04, 0xa6, 0x00, 0x80, 0x0b, 0xe6, +0x60, 0x08, 0x16, 0xe6, 0x70, 0x04, 0xe7, 0x44, 0x80, 0xf7, 0x08, 0x09, 0xda, 0xea, 0xe5, 0x3d, +0x60, 0x13, 0x14, 0xf5, 0x3d, 0x70, 0x0e, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x11, +0x0f, 0xd2, 0x8c, 0xd2, 0x8d, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, +0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, +0x90, 0xff, 0x04, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x90, 0xff, 0x06, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, +0xec, 0xff, 0xea, 0xfe, 0xef, 0xc3, 0x94, 0x08, 0xee, 0x94, 0x01, 0x50, 0x02, 0x80, 0x04, 0x7e, +0x01, 0x7f, 0x08, 0x8e, 0x3b, 0x8f, 0x3c, 0x90, 0xff, 0x02, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, +0xff, 0xea, 0x90, 0xfa, 0xba, 0xf0, 0xef, 0xa3, 0xf0, 0x12, 0x1c, 0x30, 0xe4, 0xf5, 0x4d, 0xe5, +0x4d, 0xc3, 0x94, 0x02, 0x50, 0x0f, 0x12, 0x1c, 0x11, 0xe4, 0x12, 0x1a, 0x38, 0x05, 0x4d, 0x04, +0x12, 0x1c, 0x02, 0x80, 0xea, 0x12, 0x1c, 0x30, 0x90, 0xff, 0x00, 0xe0, 0xff, 0x54, 0x60, 0x24, +0xc0, 0x70, 0x03, 0x02, 0x08, 0xc5, 0x24, 0x40, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, +0xe0, 0xfe, 0x54, 0x0f, 0xf5, 0x4d, 0xee, 0x30, 0xe7, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0a, +0x90, 0xff, 0x01, 0xe0, 0x12, 0x1b, 0x4c, 0x03, 0x56, 0x00, 0x04, 0x29, 0x01, 0x05, 0x3c, 0x03, +0x06, 0x03, 0x05, 0x06, 0x45, 0x06, 0x07, 0xa7, 0x08, 0x07, 0xef, 0x09, 0x08, 0x4b, 0x0a, 0x08, +0x8b, 0x0b, 0x00, 0x00, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, +0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x64, 0x02, 0x45, +0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xef, 0x54, 0x1f, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x47, 0x24, +0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xee, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0x11, 0x74, +0x01, 0x12, 0x1a, 0x38, 0x78, 0x67, 0xe6, 0x30, 0xe0, 0x08, 0x12, 0x1c, 0x11, 0x74, 0x02, 0x12, +0x1a, 0x38, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe1, 0x09, 0x90, 0xfa, 0xb6, 0xe0, +0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0f, +0x26, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe1, 0x0e, 0x90, 0xfa, 0xb6, 0xe0, 0xff, +0x60, 0x07, 0x64, 0x80, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0xb2, 0x40, 0x03, 0x02, 0x0f, +0x26, 0xe5, 0x4d, 0x70, 0x19, 0x30, 0x0a, 0x0b, 0x90, 0xff, 0x80, 0x12, 0x1c, 0x0e, 0x12, 0x1a, +0x38, 0x80, 0x24, 0x90, 0xff, 0x82, 0x12, 0x1c, 0x0e, 0x12, 0x1a, 0x38, 0x80, 0x19, 0x15, 0x4d, +0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0x12, 0x1c, 0x0c, 0x12, 0x1a, 0x38, 0x80, 0x09, 0x12, 0x1c, +0xb3, 0x12, 0x1c, 0x0c, 0x12, 0x1a, 0x38, 0x12, 0x1c, 0x11, 0x12, 0x19, 0xf2, 0x60, 0x05, 0x74, +0x01, 0x12, 0x1a, 0x38, 0x7f, 0x02, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, +0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x14, 0x60, 0x2d, +0x14, 0x60, 0x59, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x04, +0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02, +0x0f, 0x26, 0x78, 0x67, 0xe6, 0x54, 0xfe, 0xf6, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, +0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0, 0x09, 0x90, 0xfa, 0xb6, +0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x0c, 0x90, 0xfa, 0xb6, 0xe0, 0xd3, +0x94, 0x01, 0x40, 0x03, 0x02, 0x0f, 0x26, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xfa, 0xba, 0xe0, +0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0xb2, 0x40, 0x03, 0x02, 0x0f, +0x26, 0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0, +0x07, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x4d, 0x70, 0x0f, 0x90, 0xff, 0x82, 0xe0, +0x54, 0xf7, 0xf0, 0x90, 0xff, 0x80, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0xe5, 0x4d, 0x24, 0xfe, 0x60, +0x20, 0x24, 0xfb, 0x60, 0x34, 0x24, 0x06, 0x70, 0x35, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, +0xfd, 0x7f, 0x03, 0x12, 0x2d, 0xa8, 0x80, 0x26, 0xe4, 0xfd, 0x7f, 0x03, 0x12, 0x2d, 0xa8, 0x80, +0x1d, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, 0xfd, 0x7f, 0x04, 0x12, 0x2d, 0xa8, 0x80, 0x0e, +0xe4, 0xfd, 0x7f, 0x04, 0x12, 0x2d, 0xa8, 0x80, 0x05, 0x7f, 0x87, 0x12, 0x31, 0x32, 0x15, 0x4d, +0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x80, 0x09, 0x12, 0x1c, +0xb3, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, +0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, +0x14, 0x60, 0x2d, 0x14, 0x60, 0x55, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, +0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, +0x60, 0x03, 0x02, 0x0f, 0x26, 0x78, 0x67, 0xe6, 0x44, 0x01, 0xf6, 0xe4, 0xff, 0x02, 0x31, 0xb1, +0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe0, 0x07, +0xe5, 0x4d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x0a, 0xe5, 0x4d, 0xd3, 0x94, +0x01, 0x40, 0x03, 0x02, 0x0f, 0x26, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xfa, 0xba, 0xe0, 0x70, +0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x12, 0x31, 0x82, +0x40, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0f, 0x26, +0xe5, 0x4d, 0x70, 0x09, 0x30, 0x0a, 0x03, 0x02, 0x1d, 0x64, 0x02, 0x1d, 0x2f, 0xe5, 0x35, 0x20, +0xe1, 0x03, 0x02, 0x0f, 0x26, 0x15, 0x4d, 0x30, 0x0a, 0x0b, 0x12, 0x1c, 0xa5, 0xf5, 0x83, 0xe0, +0x44, 0x08, 0xf0, 0x80, 0x09, 0x12, 0x1c, 0xb3, 0xf5, 0x83, 0xe0, 0x44, 0x08, 0xf0, 0xe4, 0xff, +0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, +0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, +0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x30, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xbb, +0xe0, 0x90, 0xff, 0xff, 0xf0, 0xe0, 0x60, 0x05, 0x43, 0x35, 0x01, 0x80, 0x03, 0x53, 0x35, 0xfe, +0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, +0x3b, 0x70, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, +0xba, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0x24, 0xfe, 0x60, 0x3a, 0x14, 0x60, 0x75, 0x24, 0x02, +0x60, 0x03, 0x02, 0x0f, 0x26, 0xed, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0x30, 0x12, 0x1d, +0x5d, 0x7d, 0x03, 0x12, 0x0f, 0x6d, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0x2a, 0x90, 0xfa, +0xb3, 0xe0, 0xfd, 0xa3, 0x12, 0x1c, 0x7b, 0x12, 0x0f, 0x89, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b, +0xaf, 0x3c, 0x02, 0x0f, 0xba, 0x12, 0x1c, 0x30, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe4, 0x0d, 0x12, +0x1d, 0x5d, 0x7d, 0x14, 0x12, 0x0f, 0x6d, 0x60, 0x10, 0x02, 0x0f, 0x26, 0x12, 0x1d, 0x5d, 0x7d, +0x04, 0x12, 0x0f, 0xc1, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x0f, 0x2a, 0x90, 0xfa, 0xb3, 0xe0, +0xfd, 0xa3, 0x12, 0x1c, 0x7b, 0x12, 0x0f, 0x89, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b, 0xaf, 0x3c, +0x02, 0x0f, 0xba, 0x12, 0x1d, 0x5d, 0x7d, 0x05, 0x12, 0x0f, 0xc1, 0x60, 0x03, 0x02, 0x0f, 0x26, +0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, 0x12, 0x1c, 0x78, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa, +0xb4, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xbb, 0xe0, 0x90, 0xfa, 0xb2, 0xf0, +0xe4, 0xf5, 0x4c, 0x90, 0xfa, 0xb2, 0xe0, 0xff, 0xe5, 0x4c, 0xc3, 0x9f, 0x50, 0x24, 0x12, 0x1c, +0x72, 0x12, 0x0f, 0xcc, 0xff, 0xfd, 0x90, 0xfa, 0xb4, 0xe4, 0x8d, 0xf0, 0x12, 0x1a, 0x6c, 0x90, +0xfa, 0xb3, 0xe0, 0xc3, 0x9f, 0xf0, 0xd3, 0x94, 0x00, 0x50, 0x03, 0x02, 0x0f, 0x26, 0x05, 0x4c, +0x80, 0xd1, 0x12, 0x1c, 0x72, 0x12, 0x0f, 0xcc, 0x24, 0xfe, 0xff, 0x90, 0xfa, 0xb3, 0xf0, 0xfd, +0xa3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x1a, 0x6c, 0x7a, 0xf9, 0x79, 0x6f, 0x7b, 0x01, 0x8b, 0x36, +0x8a, 0x37, 0x89, 0x38, 0xe9, 0x24, 0x02, 0xf9, 0xe4, 0x3a, 0xfa, 0x12, 0x1c, 0x78, 0x12, 0x25, +0xd7, 0x8f, 0x4c, 0x05, 0x4c, 0x05, 0x4c, 0x12, 0x1c, 0x11, 0xe5, 0x4c, 0x12, 0x1a, 0x38, 0x12, +0x1c, 0x11, 0x90, 0x00, 0x01, 0x74, 0x03, 0x12, 0x1a, 0x4a, 0xaf, 0x4c, 0x7e, 0x00, 0xc3, 0xef, +0x95, 0x3c, 0xee, 0x95, 0x3b, 0x50, 0x02, 0x80, 0x04, 0xae, 0x3b, 0xaf, 0x3c, 0x8e, 0x39, 0x8f, +0x3a, 0x02, 0x2c, 0x07, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, +0x3c, 0x64, 0x01, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, +0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, +0x12, 0x1c, 0xc9, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, +0x02, 0x0f, 0x26, 0x75, 0x36, 0x00, 0x75, 0x37, 0x00, 0x75, 0x38, 0x32, 0x02, 0x0f, 0xa9, 0xe5, +0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, +0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xd3, 0x90, 0xfa, 0xbb, 0xe0, 0x94, 0x01, +0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x60, 0x03, +0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, +0xbb, 0xe0, 0xf5, 0x32, 0xe5, 0x32, 0x70, 0x08, 0x43, 0x35, 0x01, 0x53, 0x35, 0xfd, 0x80, 0x06, +0x53, 0x35, 0xfe, 0x43, 0x35, 0x02, 0xe4, 0xff, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x20, 0xe7, 0x03, +0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x64, 0x01, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, +0xb6, 0xe0, 0x60, 0x03, 0x02, 0x0f, 0x26, 0x90, 0xfa, 0xba, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, +0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, 0xc9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, +0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26, 0x7f, 0x01, 0x02, 0x31, 0xb1, 0xe5, 0x35, 0x30, 0xe7, 0x03, +0x02, 0x0f, 0x26, 0xe5, 0x3c, 0x45, 0x3b, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xd3, 0x90, 0xfa, 0xbb, +0xe0, 0x94, 0x00, 0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0f, 0x26, 0x12, 0x1c, +0xc9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0f, 0x26, 0xe5, 0x35, 0x20, 0xe1, 0x03, 0x02, 0x0f, 0x26, +0xe4, 0xff, 0x02, 0x31, 0xb1, 0x90, 0xff, 0x01, 0x12, 0x1d, 0x74, 0xef, 0x12, 0x1a, 0x38, 0x90, +0xfa, 0xb6, 0x12, 0x1d, 0x74, 0x90, 0x00, 0x01, 0xef, 0x12, 0x1a, 0x4a, 0x90, 0x00, 0x02, 0xe4, +0x12, 0x1a, 0x4a, 0x74, 0x03, 0x12, 0x1c, 0x02, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0xa3, 0xe0, 0x85, +0x38, 0x82, 0x85, 0x37, 0x83, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xff, 0x01, 0xe0, 0x12, 0x1b, +0x4c, 0x09, 0x4a, 0x02, 0x09, 0x6c, 0x04, 0x09, 0x8e, 0x05, 0x09, 0xba, 0x06, 0x09, 0xd8, 0x07, +0x09, 0xf6, 0x08, 0x0a, 0x14, 0x09, 0x0a, 0x32, 0x0b, 0x0a, 0xe7, 0x80, 0x0d, 0x6f, 0x81, 0x0d, +0xa0, 0x82, 0x0b, 0x2e, 0x83, 0x0b, 0x77, 0x84, 0x0b, 0x96, 0x85, 0x0b, 0xdb, 0x86, 0x0c, 0x26, +0x87, 0x0c, 0xb7, 0x88, 0x0d, 0x42, 0x89, 0x0a, 0x50, 0x92, 0x0a, 0x50, 0x93, 0x0e, 0x53, 0xc0, +0x0e, 0x7f, 0xc1, 0x0e, 0x90, 0xc2, 0x00, 0x00, 0x0f, 0x15, 0xe5, 0x35, 0x20, 0xe7, 0x05, 0x7f, +0x05, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, +0x7f, 0x07, 0x02, 0x11, 0x16, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2f, 0x18, 0xe5, 0x35, 0x20, 0xe7, +0x05, 0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, +0x7c, 0x00, 0x7f, 0x0c, 0x02, 0x11, 0x16, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2f, 0x18, 0xe5, 0x35, +0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1d, 0x92, 0x50, 0x06, 0xe5, 0x3c, 0x45, 0x3b, 0x70, +0x05, 0x7f, 0x02, 0x02, 0x30, 0xec, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfe, 0x24, 0xfd, 0x50, 0x02, +0x80, 0x03, 0x02, 0x31, 0x6f, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, +0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x08, +0x02, 0x11, 0x16, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, +0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x09, 0x02, 0x11, +0x16, 0x7f, 0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c, +0xc1, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0a, 0x02, 0x11, 0x16, 0x7f, +0x07, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60, +0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0b, 0x02, 0x11, 0x16, 0x7f, 0x07, 0x02, +0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x03, 0x02, 0x0f, 0x29, 0x12, 0x1c, 0xc1, 0x60, 0x03, 0x04, +0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0e, 0x02, 0x11, 0x16, 0x7f, 0x07, 0x02, 0x30, 0xec, +0xe5, 0x35, 0x30, 0xe7, 0x56, 0x12, 0x1c, 0xc9, 0x70, 0x4a, 0x90, 0xff, 0x02, 0xe0, 0xf5, 0x4c, +0xe5, 0x4c, 0xb4, 0x82, 0x05, 0x75, 0x4c, 0x61, 0x80, 0x12, 0xe5, 0x4c, 0xb4, 0x83, 0x05, 0x75, +0x4c, 0x62, 0x80, 0x08, 0xe5, 0x4c, 0xc4, 0x54, 0xf0, 0x04, 0xf5, 0x4c, 0x12, 0x1b, 0x72, 0x12, +0x1d, 0x8b, 0x12, 0x25, 0x39, 0x12, 0x1c, 0xd9, 0x12, 0x1a, 0x0b, 0x60, 0x05, 0x12, 0x31, 0xbd, +0x80, 0x06, 0x85, 0x33, 0x39, 0x85, 0x34, 0x3a, 0x75, 0x36, 0x01, 0x75, 0x37, 0xf9, 0x75, 0x38, +0x72, 0x02, 0x2c, 0x07, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2f, 0x18, 0x12, 0x1c, 0xc9, 0x60, 0x05, +0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x1d, 0x92, 0x40, 0x05, 0x7f, 0x03, 0x02, 0x30, 0xec, 0x90, +0xff, 0x02, 0xe0, 0xf5, 0x4c, 0xe5, 0x4c, 0xb4, 0x82, 0x05, 0x75, 0x4c, 0x61, 0x80, 0x12, 0xe5, +0x4c, 0xb4, 0x83, 0x05, 0x75, 0x4c, 0x62, 0x80, 0x08, 0xe5, 0x4c, 0xc4, 0x54, 0xf0, 0x04, 0xf5, +0x4c, 0x12, 0x1b, 0x72, 0x02, 0x31, 0x6f, 0x12, 0x1d, 0x9c, 0x12, 0x2a, 0x06, 0x12, 0x1c, 0x83, +0xe0, 0x54, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x78, 0x68, 0x12, 0x1b, +0x28, 0x90, 0x00, 0x02, 0x12, 0x1a, 0x0b, 0x30, 0xe7, 0xf2, 0x90, 0x00, 0x02, 0xe4, 0x12, 0x1a, +0x4a, 0x90, 0xfa, 0xb7, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0x78, 0x7c, 0xe6, 0xfc, 0x08, 0xe6, 0x8c, +0x83, 0x12, 0x1c, 0x8b, 0xef, 0xf0, 0x12, 0x31, 0xc7, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x90, 0xfa, +0xb6, 0xe0, 0x64, 0x01, 0x70, 0x1f, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x7e, 0x00, 0x70, 0x06, 0xa3, +0xe0, 0xf5, 0x90, 0x80, 0x2d, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0x90, 0x90, 0xfa, 0xbb, 0xe0, 0x42, +0x90, 0xd2, 0xaf, 0x80, 0x1d, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x7e, 0x00, 0x70, 0x06, 0xa3, 0xe0, +0xf5, 0xb0, 0x80, 0x0e, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0xb0, 0x90, 0xfa, 0xbb, 0xe0, 0x42, 0xb0, +0xd2, 0xaf, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0x30, 0x90, 0xfa, 0xb6, 0xe0, 0xb4, 0x01, +0x0a, 0x12, 0x1c, 0x11, 0xe5, 0x90, 0x12, 0x1a, 0x38, 0x80, 0x08, 0x12, 0x1c, 0x11, 0xe5, 0xb0, +0x12, 0x1a, 0x38, 0x02, 0x0f, 0xa9, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x24, 0x12, 0x12, 0x1c, 0x41, +0x20, 0xe1, 0x33, 0x12, 0x1c, 0xd0, 0xef, 0x24, 0xfc, 0x60, 0x18, 0x04, 0x70, 0x28, 0x90, 0xfa, +0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x19, 0x12, 0x1d, 0xa6, +0xf0, 0x80, 0x13, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0xf0, +0x80, 0x04, 0x12, 0x1d, 0xad, 0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x90, 0xfa, 0xb6, 0xe0, 0xff, +0x24, 0x12, 0x12, 0x1c, 0x41, 0x20, 0xe1, 0x39, 0x12, 0x1c, 0xd0, 0xef, 0x24, 0xfc, 0x60, 0x1b, +0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0, +0x80, 0x1f, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb7, 0xe0, 0x60, +0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xdf, +0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x12, 0x1c, 0xc1, 0x60, 0x4d, 0x04, 0x60, +0x03, 0x02, 0x0c, 0xb2, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x0f, 0x90, 0xff, 0xa4, 0x12, 0x1c, 0x3a, +0x30, 0xe1, 0x6f, 0x12, 0x1d, 0x7c, 0x02, 0x0c, 0xb2, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfb, 0x12, +0x1c, 0x3d, 0xfe, 0x30, 0xe1, 0x5c, 0x30, 0xe2, 0x11, 0x30, 0xb4, 0x05, 0x12, 0x1d, 0x7c, 0x80, +0x51, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 0x80, 0x48, 0x30, 0x95, 0x05, 0x12, 0x1d, 0x7c, +0x80, 0x40, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 0x80, 0x37, 0x90, 0xfa, 0xb7, 0xe0, 0x60, +0x12, 0x90, 0xff, 0xb4, 0x12, 0x1c, 0x3a, 0x30, 0xe1, 0x28, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, +0xf0, 0x80, 0x1f, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xfb, 0x12, 0x1c, 0x3d, 0x30, 0xe1, 0x13, 0x30, +0x93, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, +0xfd, 0xf0, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfc, +0x60, 0x40, 0x04, 0x70, 0x78, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x1d, 0x90, 0xff, 0xa2, 0xe0, 0x44, +0x40, 0xf0, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 0x65, 0xd2, 0x03, 0xa3, 0xe0, 0x54, 0xdf, 0xf0, 0x90, +0xff, 0xa3, 0xef, 0x54, 0x7f, 0xf0, 0x80, 0x55, 0x30, 0x03, 0x0e, 0x90, 0xff, 0xa3, 0xe0, 0x44, +0x80, 0xf0, 0xc2, 0x03, 0xa3, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x54, 0xbf, 0xf0, +0x80, 0x3b, 0x90, 0xfa, 0xb7, 0xe0, 0x60, 0x1d, 0x90, 0xff, 0xb2, 0xe0, 0x44, 0x40, 0xf0, 0xa3, +0xe0, 0xff, 0x30, 0xe7, 0x28, 0xd2, 0x04, 0xa3, 0xe0, 0x54, 0xdf, 0xf0, 0x90, 0xff, 0xb3, 0xef, +0x54, 0x7f, 0xf0, 0x80, 0x18, 0x30, 0x04, 0x0e, 0x90, 0xff, 0xb3, 0xe0, 0x44, 0x80, 0xf0, 0xc2, +0x04, 0xa3, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x54, 0xbf, 0xf0, 0xe4, 0xff, 0x02, +0x30, 0xec, 0x12, 0x1c, 0x30, 0x90, 0xfa, 0xb6, 0xe0, 0x24, 0xfc, 0x60, 0x0f, 0x04, 0x70, 0x16, +0x90, 0xff, 0xa6, 0xe0, 0x12, 0x1c, 0x11, 0x12, 0x1a, 0x38, 0x80, 0x0a, 0x90, 0xff, 0xb6, 0xe0, +0x12, 0x1c, 0x11, 0x12, 0x1a, 0x38, 0x75, 0x39, 0x00, 0x75, 0x3a, 0x01, 0x02, 0x2c, 0x07, 0xe4, +0xff, 0x12, 0x30, 0xec, 0x12, 0x1d, 0x37, 0x7f, 0x03, 0x12, 0x12, 0x19, 0x90, 0xf9, 0x15, 0xe0, +0x30, 0xe4, 0x08, 0x90, 0xff, 0x93, 0x74, 0x80, 0xf0, 0x80, 0x10, 0x90, 0xff, 0xfc, 0xe0, 0x54, +0x7f, 0xf0, 0x7f, 0xff, 0x7e, 0x00, 0x12, 0x30, 0x16, 0xc2, 0x90, 0xc2, 0xaf, 0x00, 0x80, 0xfd, +0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x90, 0xfa, 0xbc, 0x74, 0x3e, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0xfa, +0xb4, 0xf0, 0xa3, 0x74, 0x15, 0xf0, 0xe0, 0x54, 0x3f, 0xff, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0xfa, +0xb9, 0xf0, 0xd3, 0x94, 0x00, 0xe4, 0x94, 0x3e, 0x40, 0x08, 0x90, 0xfa, 0xbd, 0xe0, 0x90, 0xfa, +0xb9, 0xf0, 0x12, 0x0f, 0x50, 0xe5, 0x31, 0x45, 0x30, 0x70, 0x73, 0x12, 0x1c, 0x4a, 0x90, 0xfa, +0xbc, 0x12, 0x1d, 0x56, 0x60, 0x27, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x08, 0x90, +0xfa, 0xb9, 0x74, 0x40, 0xf0, 0x80, 0x08, 0x90, 0xfa, 0xbd, 0xe0, 0x90, 0xfa, 0xb9, 0xf0, 0x12, +0x0f, 0x50, 0xe5, 0x31, 0x45, 0x30, 0x70, 0x46, 0x12, 0x1c, 0x4a, 0x80, 0xd1, 0x75, 0x4c, 0x02, +0x90, 0xfa, 0xbc, 0xe4, 0xf0, 0xa3, 0x04, 0xf0, 0x90, 0xfa, 0xb4, 0xe4, 0xf0, 0xa3, 0x74, 0x0f, +0xf0, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x4c, 0x90, 0xfa, 0xbd, 0xe0, 0xf5, 0x4a, 0x7d, 0x0f, 0x7c, +0x00, 0x12, 0x28, 0x9f, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x4c, 0xe4, +0xf5, 0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0xe4, 0xf5, 0x30, 0xf5, 0x31, 0xaf, 0x31, +0x02, 0x30, 0xec, 0x12, 0x1c, 0xd0, 0x30, 0xe7, 0x10, 0xe0, 0x54, 0x0f, 0x90, 0xf9, 0x64, 0xf0, +0xd3, 0x94, 0x00, 0x40, 0x15, 0xc2, 0x95, 0x80, 0x11, 0x90, 0xfa, 0xb7, 0xe0, 0x54, 0x0f, 0x90, +0xf9, 0x63, 0xf0, 0xd3, 0x94, 0x00, 0x40, 0x02, 0xc2, 0x94, 0xe4, 0xff, 0x02, 0x30, 0xec, 0x12, +0x1d, 0x9c, 0xbf, 0x01, 0x04, 0xd2, 0x93, 0x80, 0x02, 0xc2, 0x93, 0xe4, 0xff, 0x02, 0x30, 0xec, +0x12, 0x1c, 0xd0, 0x54, 0x03, 0x14, 0x60, 0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, +0x70, 0x2b, 0xd2, 0x91, 0x80, 0x27, 0xc2, 0x91, 0x80, 0x23, 0x12, 0x1d, 0xa6, 0x12, 0x0f, 0x78, +0x60, 0x04, 0xd2, 0x91, 0x80, 0x17, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x10, 0x12, 0x0f, 0x78, 0xff, +0xbf, 0xa0, 0x04, 0xc2, 0x91, 0x80, 0x02, 0xd2, 0x91, 0x12, 0x1d, 0xa6, 0xf0, 0x90, 0xfa, 0xb7, +0xe0, 0x54, 0x0c, 0xff, 0x13, 0x13, 0x54, 0x3f, 0x14, 0x60, 0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, +0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x92, 0x80, 0x27, 0xc2, 0x92, 0x80, 0x23, 0x12, 0x1d, 0xad, +0x12, 0x0f, 0x98, 0x60, 0x04, 0xd2, 0x92, 0x80, 0x17, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0x12, +0x0f, 0x98, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x92, 0x80, 0x02, 0xd2, 0x92, 0x12, 0x1d, 0xad, 0xf0, +0xe4, 0xff, 0x02, 0x30, 0xec, 0xe5, 0x35, 0x30, 0xe7, 0x07, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2f, +0x18, 0x7f, 0x05, 0x02, 0x30, 0xec, 0x12, 0x31, 0xbd, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, +0x90, 0xfa, 0xb4, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, +0xfa, 0xb4, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x22, +0xaa, 0x4e, 0xa9, 0x4f, 0x7b, 0xff, 0x90, 0xfa, 0xb4, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, +0xb9, 0xe0, 0xf5, 0x4a, 0x12, 0x28, 0x9f, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x22, 0x12, 0x22, 0xa0, +0x7e, 0x00, 0x8e, 0x30, 0x8f, 0x31, 0xef, 0x22, 0xf0, 0x7f, 0x01, 0x12, 0x12, 0x19, 0x90, 0xff, +0xa6, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x54, 0xa0, 0x22, 0x12, 0x25, 0xd7, 0x8f, 0x4c, 0x7e, 0x00, +0xc3, 0xef, 0x95, 0x3c, 0xee, 0x95, 0x3b, 0x22, 0xf0, 0x7f, 0x01, 0x12, 0x12, 0x19, 0x90, 0xff, +0xb6, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x54, 0xa0, 0x22, 0x75, 0x39, 0x00, 0x75, 0x3a, 0x01, 0x02, +0x2c, 0x07, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x02, 0x31, 0x82, 0x8e, 0x39, 0x8f, 0x3a, 0x02, 0x2c, +0x07, 0x12, 0x22, 0xa0, 0x7e, 0x00, 0x8e, 0x30, 0x8f, 0x31, 0xef, 0x22, 0x7d, 0x01, 0x12, 0x25, +0xd7, 0x90, 0xfa, 0xb1, 0xe0, 0x22, 0xef, 0x90, 0xf8, 0x04, 0xf0, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, +0xee, 0x60, 0x0a, 0xc0, 0x05, 0x7d, 0x7f, 0xdd, 0xfe, 0xde, 0xfa, 0xd0, 0x05, 0xef, 0xc3, 0x94, +0x15, 0x50, 0x03, 0xd0, 0xa8, 0x22, 0x13, 0x70, 0x03, 0xd0, 0xa8, 0x22, 0xff, 0xd5, 0x07, 0xfd, +0xd0, 0xa8, 0x22, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 0xc0, 0x05, 0xe5, 0x3e, 0x24, +0x08, 0xf8, 0x86, 0x05, 0x53, 0x05, 0x7f, 0x7c, 0xff, 0x12, 0x10, 0x78, 0x7f, 0x00, 0x7e, 0x00, +0xe5, 0x43, 0x60, 0x46, 0xfc, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x7f, 0x6d, 0x70, 0x0f, 0xc0, 0x83, +0xc0, 0x82, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xa3, 0x15, 0x43, 0x80, 0x07, 0xa3, 0xa3, 0xa3, +0xdc, 0xe6, 0x80, 0x26, 0xdc, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0x1e, 0xe0, 0xf8, 0xa3, 0xe0, +0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, +0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x12, 0x11, 0x0f, 0xd0, 0x05, 0xd0, +0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x85, 0xa8, 0x44, 0x75, 0xa8, 0x88, 0xec, 0x70, +0x02, 0x7c, 0x3f, 0x8c, 0x3d, 0x22, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x11, 0x66, +0x80, 0xfb, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 0xc0, 0x06, 0x7c, 0xff, 0x12, 0x10, +0x78, 0xe5, 0x43, 0x60, 0x42, 0xfe, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x7f, 0x6f, 0x70, 0x0b, 0xc0, +0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x15, 0x43, 0x80, 0x07, 0xa3, 0xa3, 0xa3, 0xde, 0xea, 0x80, +0x26, 0xde, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0xd8, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, +0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, +0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x78, 0x08, 0x08, 0x79, 0x18, 0x09, 0x7c, 0x01, 0xe6, +0x54, 0x7f, 0x6f, 0x70, 0x06, 0x76, 0x00, 0x77, 0x00, 0x80, 0x06, 0x08, 0x09, 0x0c, 0xbc, 0x08, +0xee, 0x12, 0x11, 0x0f, 0xd0, 0x06, 0xd0, 0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x75, +0x3d, 0x00, 0x85, 0x44, 0xa8, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc3, 0xe5, 0x43, 0x24, +0xe8, 0x50, 0x05, 0x12, 0x11, 0x66, 0x80, 0xf4, 0xef, 0x60, 0x31, 0x90, 0x30, 0x54, 0xe4, 0x93, +0xc3, 0x9f, 0x40, 0x2f, 0xc0, 0x04, 0x7c, 0xff, 0x12, 0x10, 0x78, 0xd0, 0x04, 0x43, 0x07, 0x80, +0xe5, 0x43, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xef, +0xf0, 0xec, 0xa3, 0xf0, 0xed, 0xa3, 0xf0, 0x05, 0x43, 0x12, 0x11, 0x0f, 0xd0, 0x83, 0xd0, 0x82, +0xd0, 0xf0, 0x22, 0x02, 0x11, 0x94, 0xc0, 0x04, 0x7c, 0x20, 0xd2, 0x8c, 0xd2, 0x8d, 0xd5, 0x04, +0xfd, 0xd0, 0x04, 0x22, 0x75, 0xa8, 0x00, 0x75, 0x88, 0x00, 0x75, 0xb8, 0x00, 0x75, 0xf0, 0x00, +0x75, 0xd0, 0x00, 0xe4, 0xf8, 0x90, 0xf8, 0x04, 0xf0, 0x90, 0x00, 0x00, 0xf6, 0x08, 0xb8, 0x00, +0xfb, 0x02, 0x00, 0x00, 0xc2, 0xaf, 0xe4, 0x90, 0xff, 0x48, 0xf0, 0x90, 0xff, 0x50, 0xf0, 0x90, +0xff, 0x08, 0xf0, 0x90, 0xff, 0x10, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xa3, 0xa3, 0xf0, 0xd2, 0xb1, +0xc2, 0xb0, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, +0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0xd2, 0xb0, 0xd2, 0xb1, 0x7e, 0xff, 0x7f, 0xff, 0x12, +0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0xdc, +0x80, 0xcc, 0xc3, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x03, 0x7f, 0xe8, 0xef, 0xf4, 0xff, 0xee, +0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x42, 0x8e, 0x41, 0x22, 0xc3, 0xef, 0x94, 0xbc, +0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x07, 0x7f, 0xd0, 0xef, 0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, +0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x40, 0x8e, 0x3f, 0x22, 0xef, 0x70, 0x01, 0x22, 0xc0, 0x00, 0xc0, +0xa8, 0xc2, 0xaf, 0xe5, 0x3e, 0x24, 0x18, 0xf8, 0xa6, 0x07, 0xe5, 0x3e, 0x24, 0x08, 0xf8, 0xc6, +0x54, 0x7f, 0xf6, 0xd0, 0xa8, 0xe6, 0x30, 0xe7, 0x03, 0xd0, 0x00, 0x22, 0x12, 0x11, 0x66, 0x80, 0xf4, 0xc0, 0x00, 0x7f, 0x01, 0xef, 0x24, 0x08, 0xf8, 0xe6, 0x60, 0x09, 0x0f, 0xbf, 0x08, 0xf5, -0x12, 0x10, 0xec, 0x80, 0xee, 0xd0, 0x00, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, -0xc0, 0x06, 0xc0, 0x04, 0xed, 0x24, 0x10, 0xf8, 0x76, 0xa0, 0xed, 0x75, 0xf0, 0x21, 0xa4, 0x24, +0x12, 0x11, 0x66, 0x80, 0xee, 0xd0, 0x00, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, +0xc0, 0x06, 0xc0, 0x04, 0xed, 0x24, 0x10, 0xf8, 0x76, 0x9a, 0xed, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0xc0, 0x82, 0xc0, 0x83, 0xa3, 0xa3, 0xe4, 0x78, -0x0d, 0xf0, 0xa3, 0xd8, 0xfc, 0xef, 0x54, 0x7f, 0x75, 0xf0, 0x02, 0xa4, 0x24, 0x0e, 0xf5, 0x82, -0xe5, 0xf0, 0x34, 0x2e, 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xfc, 0xd0, 0x83, 0xd0, +0x0d, 0xf0, 0xa3, 0xd8, 0xfc, 0xef, 0x54, 0x7f, 0x75, 0xf0, 0x02, 0xa4, 0x24, 0x36, 0xf5, 0x82, +0xe5, 0xf0, 0x34, 0x30, 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xfc, 0xd0, 0x83, 0xd0, 0x82, 0xec, 0xf0, 0xa3, 0xee, 0xf0, 0xed, 0x24, 0x08, 0xf8, 0xef, 0x44, 0x80, 0xf6, 0xd0, 0x04, -0xd0, 0x06, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x75, 0x44, 0x00, 0x75, 0x49, +0xd0, 0x06, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x75, 0x3e, 0x00, 0x75, 0x43, 0x00, 0x7a, 0x08, 0x79, 0x18, 0x78, 0x08, 0x76, 0x00, 0x77, 0x00, 0x08, 0x09, 0xda, 0xf8, 0x90, -0xf8, 0x04, 0xe0, 0xfc, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9c, 0x50, 0x05, 0xe4, 0x90, 0xf8, +0xf8, 0x04, 0xe0, 0xfc, 0x90, 0x30, 0x54, 0xe4, 0x93, 0xc3, 0x9c, 0x50, 0x05, 0xe4, 0x90, 0xf8, 0x04, 0xf0, 0x78, 0x08, 0x74, 0x80, 0x44, 0x7f, 0xf6, 0x74, 0x01, 0x44, 0x10, 0xf5, 0x89, 0x75, -0xb8, 0x00, 0xd2, 0xab, 0xd2, 0xa9, 0x22, 0x75, 0x81, 0x91, 0xd2, 0x8e, 0xd2, 0x8c, 0xd2, 0xaf, -0xe5, 0x49, 0x60, 0x36, 0xff, 0x90, 0xf9, 0x19, 0xe0, 0x54, 0x80, 0x60, 0x28, 0x78, 0x08, 0x79, +0xb8, 0x00, 0xd2, 0xab, 0xd2, 0xa9, 0x22, 0x75, 0x81, 0x8b, 0xd2, 0x8e, 0xd2, 0x8c, 0xd2, 0xaf, +0xe5, 0x43, 0x60, 0x36, 0xff, 0x90, 0xf9, 0x1b, 0xe0, 0x54, 0x80, 0x60, 0x28, 0x78, 0x08, 0x79, 0x08, 0xe0, 0x54, 0x7f, 0xfa, 0x7b, 0x00, 0xe6, 0x54, 0x7f, 0xb5, 0x02, 0x02, 0x7b, 0xff, 0x08, -0xd9, 0xf5, 0xeb, 0x70, 0x10, 0xea, 0xf0, 0xc0, 0x07, 0x12, 0x11, 0xc1, 0xad, 0x07, 0xaf, 0x02, -0x12, 0x11, 0xd8, 0xd0, 0x07, 0xa3, 0xa3, 0xa3, 0xdf, 0xce, 0x12, 0x10, 0xec, 0x80, 0xc1, 0xe7, -0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e, 0x88, -0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08, 0xdf, -0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83, 0xe3, -0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08, 0xdf, -0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c, 0x80, -0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10, 0x80, -0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33, 0x89, -0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, -0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0x0d, -0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0, 0xed, -0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, -0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde, 0xe8, -0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc, 0x88, -0xf0, 0xef, 0x60, 0x01, 0x0e, 0x4e, 0x60, 0xc3, 0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, -0x50, 0xb9, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xaf, 0x23, 0x23, 0x45, 0x82, -0x23, 0x90, 0x13, 0x0f, 0x73, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, -0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, -0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, -0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, -0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, -0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xf8, 0xbb, 0x01, -0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0x22, 0x50, 0x06, -0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0x22, 0xc5, -0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, -0x83, 0xe0, 0x38, 0xf0, 0x22, 0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, -0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22, 0xbb, 0x01, 0x10, 0xe5, 0x82, -0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, -0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, -0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, -0xe9, 0x93, 0x22, 0xbb, 0x01, 0x0a, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, -0x50, 0x06, 0xf7, 0x09, 0xa7, 0xf0, 0x19, 0x22, 0xbb, 0xfe, 0x06, 0xf3, 0xe5, 0xf0, 0x09, 0xf3, -0x19, 0x22, 0xf8, 0xbb, 0x01, 0x11, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, -0xe8, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x08, 0xa6, -0xf0, 0x22, 0xbb, 0xfe, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0xe5, 0xf0, 0x08, 0xf2, 0x22, 0xa4, -0x25, 0x82, 0xf5, 0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xfa, -0x08, 0xe6, 0xf9, 0x22, 0xeb, 0xf6, 0x08, 0xea, 0xf6, 0x08, 0xe9, 0xf6, 0x22, 0xe0, 0xfb, 0xa3, -0xe0, 0xfa, 0xa3, 0xe0, 0xf9, 0x22, 0xeb, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xe9, 0xf0, 0x22, 0xd0, -0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, -0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, -0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0xff, 0xfa, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x16, 0xf0, 0x90, -0xff, 0xf9, 0x74, 0x02, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x7b, 0x00, -0x7a, 0x00, 0x79, 0x37, 0x75, 0x40, 0x00, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0xe5, 0x37, -0x24, 0x80, 0x90, 0xff, 0xf8, 0xf0, 0xe5, 0x37, 0x64, 0x07, 0x60, 0x0b, 0xe5, 0x37, 0x64, 0x06, -0x60, 0x05, 0xe5, 0x37, 0xb4, 0x14, 0x1b, 0xd2, 0x94, 0xd2, 0x95, 0xd2, 0x92, 0xd2, 0x93, 0xe5, -0x37, 0xb4, 0x07, 0x08, 0x90, 0xf9, 0x65, 0x74, 0x02, 0xf0, 0x80, 0x06, 0x90, 0xf9, 0x65, 0x74, -0x01, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0d, 0xf0, 0x12, 0x17, 0x71, 0x90, 0xff, -0xf5, 0xe5, 0x37, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, -0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x12, 0x17, 0x71, 0xe5, 0x37, 0x30, 0xe7, -0x02, 0xd2, 0x02, 0xe4, 0xf5, 0x2c, 0xf5, 0x2a, 0xf5, 0x2b, 0xf5, 0x29, 0x12, 0x19, 0x92, 0x12, -0x18, 0x49, 0x12, 0x19, 0x6c, 0x90, 0xf9, 0x66, 0x12, 0x15, 0x06, 0x90, 0xf9, 0x6b, 0x12, 0x15, -0x06, 0x90, 0xff, 0xff, 0xe4, 0xf0, 0x90, 0xff, 0x83, 0xe0, 0xe4, 0xf0, 0x90, 0xff, 0x81, 0x74, -0x80, 0xf0, 0xa3, 0x74, 0x84, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0x12, -0x18, 0xbf, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x37, 0x12, 0x18, 0xcd, 0xf5, 0x83, 0xe4, 0xf0, 0x05, -0x37, 0xe5, 0x37, 0xb4, 0x07, 0xe7, 0x78, 0x80, 0x76, 0xfe, 0x08, 0x76, 0xf0, 0x90, 0x2f, 0x06, -0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xad, 0x07, 0x90, 0x2f, 0x13, 0xe4, 0x93, 0xff, 0x08, -0xf6, 0xff, 0xed, 0x54, 0x0f, 0xfd, 0x12, 0x18, 0xaf, 0x74, 0x84, 0xf0, 0xed, 0x75, 0xf0, 0x08, -0xa4, 0x24, 0x47, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xc3, 0x74, 0xf0, 0x9f, -0x78, 0x81, 0xf6, 0x74, 0xfe, 0x94, 0x00, 0x18, 0x12, 0x18, 0x41, 0xce, 0xc3, 0x13, 0xce, 0x13, -0xd8, 0xf9, 0xff, 0xed, 0x12, 0x19, 0x07, 0xef, 0xf0, 0xed, 0x12, 0x19, 0x2d, 0xe4, 0xf5, 0x37, -0xe5, 0x37, 0x90, 0x2f, 0x00, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xe5, 0x37, 0x25, 0xe0, 0x24, -0x07, 0xf5, 0x82, 0xe4, 0x34, 0x2f, 0xf5, 0x83, 0xe4, 0x93, 0x08, 0xf6, 0xed, 0x30, 0xe7, 0x53, -0x18, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xaf, 0x12, 0x19, 0x15, 0x24, 0x47, 0xf5, 0x82, 0xe4, -0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0xe9, 0x12, 0x19, -0x07, 0xef, 0xf0, 0x12, 0x18, 0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, -0x24, 0x45, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x12, 0x19, 0x2d, 0xe9, -0x75, 0xf0, 0x08, 0xa4, 0x24, 0x46, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, -0x02, 0x17, 0x46, 0x78, 0x7e, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xf9, 0x12, 0x19, 0x15, 0x24, -0x07, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, -0x12, 0x19, 0x1a, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x18, -0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, 0x24, 0x05, 0xf5, 0x82, 0xe4, -0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, -0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, -0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5, 0x37, 0x64, 0x04, 0x60, 0x03, 0x02, 0x16, -0x70, 0x90, 0x2f, 0x05, 0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0x12, 0x18, 0xf7, 0xe4, 0xf0, 0x90, -0x2f, 0x04, 0x93, 0xff, 0xf6, 0x12, 0x18, 0xad, 0xe4, 0xf0, 0x90, 0xff, 0xfd, 0x74, 0x05, 0xf0, -0x22, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, -0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, -0x2f, 0xe5, 0x52, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, -0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0x74, 0x11, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, -0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x06, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, -0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0xab, 0x2d, -0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, -0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, -0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x04, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, -0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x05, 0xe0, -0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, -0x35, 0x2e, 0xf5, 0x2e, 0x22, 0xf5, 0x83, 0xe0, 0x54, 0x08, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, -0x22, 0xf5, 0x83, 0xef, 0xf0, 0xfd, 0x7c, 0x00, 0xc3, 0x78, 0x81, 0xe6, 0x9d, 0xf6, 0x18, 0xe6, -0x9c, 0xf6, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x03, 0x22, 0x75, 0x2d, 0x01, 0x75, 0x2e, 0xf9, 0x75, -0x2f, 0x6e, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x90, 0xfa, 0xb5, 0xe0, 0x24, -0xfc, 0x22, 0x90, 0xfa, 0xb8, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xbc, 0xe0, 0x9f, 0xf0, -0x90, 0xfa, 0xbb, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xb3, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, -0x25, 0x55, 0xf5, 0x55, 0xee, 0x35, 0x54, 0xf5, 0x54, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb0, -0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x22, 0x78, 0x82, 0xe6, 0xfe, 0x08, -0xe6, 0x8e, 0x83, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x54, 0x0f, 0x75, -0xf0, 0x08, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0xe5, 0x53, 0x75, -0xf0, 0x08, 0xa4, 0x24, 0x48, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0xe5, 0x53, 0x75, 0xf0, 0x08, -0xa4, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0x90, 0xff, 0x00, 0xe0, 0x54, 0x1f, 0x22, -0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x24, 0xfc, 0x22, 0x75, 0x2a, 0x00, 0x8f, 0x2b, 0x90, 0xf9, 0x6b, -0x12, 0x14, 0xfd, 0x90, 0x00, 0x02, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, -0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x41, 0xf5, 0x82, 0xe4, -0x34, 0xff, 0xf5, 0x83, 0x22, 0x74, 0x80, 0xf0, 0x08, 0xe6, 0xff, 0xe9, 0x75, 0xf0, 0x08, 0xa4, -0x22, 0x74, 0xae, 0x25, 0x36, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, -0xa4, 0x24, 0x42, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x22, 0x90, 0xff, -0x82, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x03, 0xf0, 0x90, 0xff, 0xfc, -0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x78, 0x6d, 0xe6, 0x54, 0xfd, 0xf6, 0x90, 0xff, 0xfd, 0x74, 0x65, -0xf0, 0x22, 0x12, 0x14, 0xdf, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x22, 0x7b, 0x01, 0x7a, 0xf9, -0x79, 0x6e, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, 0x22, 0x90, 0xff, 0x80, 0xe0, 0x44, 0x08, -0xf0, 0x22, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe0, 0xff, 0x90, 0xf9, 0x66, 0x02, -0x14, 0xfd, 0x75, 0x30, 0x01, 0x75, 0x31, 0x09, 0x22, 0xd3, 0xe5, 0x35, 0x94, 0x08, 0xe5, 0x34, -0x94, 0x01, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x90, 0xfa, 0xb6, 0xf0, 0x22, 0x90, 0xff, 0xa4, -0xe0, 0x54, 0xef, 0x22, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xef, 0x22, 0x8f, 0x38, 0x12, 0x27, 0x19, -0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xe0, 0xfd, -0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x12, 0x20, 0x7c, 0x24, -0x07, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x12, 0x20, 0xbe, 0x24, 0x09, 0x12, 0x20, 0x25, 0xef, 0xf0, -0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe4, 0x20, 0x08, 0x12, 0x20, 0x2f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, -0xe0, 0x25, 0xe0, 0xff, 0x05, 0x82, 0xd5, 0x82, 0x02, 0x15, 0x83, 0x15, 0x82, 0xe0, 0x33, 0xd0, -0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xe0, 0xfc, 0xa3, 0xe0, -0xfd, 0xec, 0xff, 0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xef, 0xf0, 0xed, -0x12, 0x20, 0xbe, 0x24, 0x07, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, -0xe0, 0xff, 0x53, 0x07, 0xc7, 0x08, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x12, 0x20, 0x69, 0xa3, 0xe0, -0x30, 0xe3, 0x12, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, -0x2f, 0x4d, 0x93, 0x42, 0x07, 0x53, 0x07, 0xfb, 0x12, 0x20, 0xae, 0x24, 0x06, 0x12, 0x20, 0x25, -0xe0, 0x60, 0x03, 0x43, 0x07, 0x04, 0x53, 0x07, 0xfc, 0x78, 0x86, 0x12, 0x20, 0x96, 0x24, 0x04, -0x12, 0x20, 0x25, 0xe0, 0x42, 0x07, 0x43, 0x07, 0x80, 0x12, 0x20, 0xa6, 0xf5, 0x82, 0x8a, 0x83, -0xa3, 0xa3, 0xef, 0xf0, 0x12, 0x20, 0xbe, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x8d, 0x82, -0x8c, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe1, 0x05, 0x53, 0x07, 0xdf, 0x80, -0x03, 0x43, 0x07, 0x20, 0xec, 0x30, 0xe4, 0x05, 0x53, 0x07, 0xef, 0x80, 0x03, 0x43, 0x07, 0x10, -0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, 0x4c, 0x53, 0x07, 0xdf, 0xee, 0x30, 0xe1, 0x42, -0x12, 0x20, 0xae, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, 0x60, 0x31, 0x14, 0x60, 0x29, 0x14, -0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, 0x38, 0xb4, 0x03, 0x0d, 0x30, 0x95, -0x05, 0x43, 0x07, 0x02, 0x80, 0x1f, 0x53, 0x07, 0xfd, 0x80, 0x1a, 0x30, 0x93, 0x05, 0x43, 0x07, -0x02, 0x80, 0x12, 0x53, 0x07, 0xfd, 0x80, 0x0d, 0x43, 0x07, 0x02, 0x80, 0x08, 0x53, 0x07, 0xfd, -0x80, 0x03, 0x53, 0x07, 0xfd, 0x12, 0x20, 0x94, 0x24, 0x04, 0x12, 0x20, 0x25, 0xef, 0xf0, 0x8d, -0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xff, 0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, -0x4a, 0xee, 0x30, 0xe1, 0x43, 0x08, 0x12, 0x20, 0xb0, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, -0x60, 0x2c, 0x14, 0x60, 0x2e, 0x14, 0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, -0x38, 0xb4, 0x03, 0x0d, 0x30, 0x94, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x1f, 0x43, 0x07, 0x80, 0x80, -0x1a, 0x30, 0x92, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x12, 0x43, 0x07, 0x80, 0x80, 0x0d, 0x53, 0x07, -0x7f, 0x80, 0x08, 0x43, 0x07, 0x80, 0x80, 0x03, 0x53, 0x07, 0x7f, 0x78, 0x86, 0x12, 0x20, 0x65, -0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x20, 0x80, 0x03, 0x53, 0x07, 0xdf, -0xec, 0x30, 0xe3, 0x05, 0x43, 0x07, 0x40, 0x80, 0x03, 0x53, 0x07, 0xbf, 0xec, 0x30, 0xe0, 0x05, -0x43, 0x07, 0x10, 0x80, 0x03, 0x53, 0x07, 0xef, 0xed, 0x30, 0xe4, 0x05, 0x43, 0x07, 0x08, 0x80, -0x03, 0x53, 0x07, 0xf7, 0xed, 0x30, 0xe5, 0x05, 0x43, 0x07, 0x04, 0x80, 0x03, 0x53, 0x07, 0xfb, -0xed, 0x30, 0xe6, 0x05, 0x43, 0x07, 0x01, 0x80, 0x03, 0x53, 0x07, 0xfe, 0xed, 0x30, 0xe7, 0x05, -0x43, 0x07, 0x02, 0x80, 0x03, 0x53, 0x07, 0xfd, 0x78, 0x84, 0x12, 0x20, 0x65, 0xa3, 0xef, 0xf0, -0x12, 0x2f, 0x80, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x8e, 0xef, 0xf6, 0x12, 0x27, 0x19, -0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0xfd, 0x12, 0x20, 0x53, 0x90, -0x00, 0x0a, 0x12, 0x20, 0x78, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x0b, 0x12, 0x14, -0x0d, 0x12, 0x20, 0x70, 0xf5, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x59, 0x12, 0x20, -0x7c, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xf5, 0x5a, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, -0xf5, 0x5b, 0xe5, 0x59, 0xc4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x78, 0x8e, 0xf6, 0xd3, 0x94, 0x00, -0x40, 0x06, 0xe5, 0x5a, 0x30, 0xe1, 0x01, 0x06, 0x78, 0x8e, 0xe6, 0x12, 0x20, 0x52, 0x90, 0x00, -0x0c, 0xef, 0x12, 0x14, 0x0d, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, -0xff, 0x53, 0x07, 0x0c, 0x53, 0x06, 0xe6, 0xe5, 0x59, 0x30, 0xe5, 0x03, 0x43, 0x07, 0x01, 0xe5, -0x5a, 0x20, 0xe5, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, 0x20, 0xe7, 0x03, 0x43, -0x07, 0x02, 0xe5, 0x59, 0x30, 0xe3, 0x03, 0x43, 0x07, 0x10, 0xe5, 0x59, 0x30, 0xe2, 0x03, 0x43, -0x07, 0x20, 0xe5, 0x59, 0x54, 0x03, 0x60, 0x03, 0x43, 0x07, 0x40, 0xe5, 0x59, 0x30, 0xe1, 0x03, -0x43, 0x07, 0x80, 0xe5, 0x59, 0x30, 0xe4, 0x03, 0x43, 0x06, 0x01, 0xe5, 0x59, 0x30, 0xe6, 0x03, -0x43, 0x06, 0x08, 0xe5, 0x5a, 0x20, 0xe4, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, -0x20, 0xe7, 0x03, 0x43, 0x06, 0x10, 0x53, 0x07, 0xfb, 0x53, 0x06, 0x79, 0x90, 0x00, 0x05, 0xee, -0x8f, 0xf0, 0x12, 0x14, 0xb2, 0xe5, 0x5b, 0x30, 0xe3, 0x12, 0x54, 0x30, 0xff, 0xc4, 0x54, 0x0f, -0x12, 0x20, 0x52, 0x90, 0x00, 0x08, 0xef, 0x12, 0x14, 0x0d, 0x80, 0x0a, 0x12, 0x20, 0x53, 0x90, -0x00, 0x08, 0xe4, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x03, 0x12, 0x20, 0x52, 0x90, 0x00, 0x07, -0xef, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x04, 0xff, 0xc3, 0x13, 0x90, 0x00, 0x09, 0x12, 0x14, -0x0d, 0x90, 0x00, 0x07, 0x12, 0x13, 0xce, 0x70, 0x13, 0x12, 0x20, 0x53, 0xe9, 0x24, 0x09, 0xf9, -0xe4, 0x3a, 0xfa, 0x12, 0x13, 0xb5, 0xff, 0xc3, 0x13, 0x12, 0x13, 0xfb, 0x12, 0x20, 0x94, 0x24, -0x08, 0x12, 0x20, 0x25, 0xe0, 0xfe, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x07, 0x12, 0x20, -0x25, 0xe0, 0xfd, 0xee, 0xed, 0x12, 0x20, 0x52, 0x90, 0x00, 0x03, 0xee, 0x8f, 0xf0, 0x12, 0x14, -0xb2, 0x12, 0x2f, 0x80, 0x7d, 0x0a, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, 0x90, 0xfa, -0xe2, 0xe0, 0xb4, 0x03, 0x06, 0x7e, 0x00, 0x7f, 0x40, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x08, 0x90, -0xfa, 0xd6, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xff, 0x7e, 0x00, -0x90, 0xfa, 0xd2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x70, 0x03, 0x7f, 0x08, 0x22, 0x90, 0x00, 0x08, -0x12, 0x14, 0x5b, 0xff, 0x90, 0xfa, 0xd4, 0xe5, 0xf0, 0xf0, 0xa3, 0xef, 0xf0, 0xae, 0x02, 0xaf, -0x01, 0x8e, 0x56, 0x8f, 0x57, 0x74, 0x0a, 0x25, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, -0x90, 0xfa, 0xd7, 0xe0, 0xff, 0x14, 0xfe, 0x90, 0xfa, 0xd5, 0xe0, 0x5e, 0xfe, 0xc3, 0xef, 0x9e, -0xff, 0x90, 0xfa, 0xd9, 0xf0, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0x90, 0xfa, 0xd2, 0xe0, 0x94, -0x00, 0x50, 0x06, 0xa3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, 0x60, 0x03, 0xe0, 0xff, -0x22, 0x12, 0x2a, 0x80, 0x90, 0xfa, 0xd2, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x60, 0x2b, 0x90, -0xfa, 0xd6, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x40, 0x07, 0xe0, 0x90, -0xfa, 0xd9, 0xf0, 0x80, 0x08, 0x90, 0xfa, 0xd3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, -0x60, 0x03, 0xe0, 0xff, 0x22, 0x12, 0x2a, 0x80, 0x80, 0xca, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x58, -0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7f, 0x00, 0x22, 0xaa, 0x56, 0xa9, -0x57, 0x7b, 0x01, 0x90, 0xfa, 0xd4, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xd9, 0xe0, 0xf5, -0x50, 0x12, 0x26, 0x25, 0x90, 0xfa, 0xd8, 0xef, 0xf0, 0x22, 0xef, 0x24, 0xae, 0x60, 0x52, 0x24, -0xfe, 0x60, 0x2e, 0x24, 0xfe, 0x70, 0x03, 0x02, 0x1e, 0xed, 0x24, 0x06, 0x60, 0x03, 0x02, 0x1f, -0x35, 0x78, 0x77, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xa5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, -0x74, 0x33, 0x90, 0xfa, 0x90, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xae, 0x74, 0x01, 0xf0, -0x22, 0x78, 0x78, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xb5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, -0x74, 0x43, 0x90, 0xfa, 0x92, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xaf, 0x74, 0x01, 0xf0, -0x22, 0x90, 0xfa, 0x9c, 0xe0, 0xa3, 0x20, 0xe5, 0x03, 0x02, 0x1f, 0x35, 0x90, 0xff, 0xa6, 0xe0, -0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, -0x90, 0xff, 0xa6, 0x12, 0x20, 0x83, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, -0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x34, 0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x57, 0x90, 0xfa, -0xca, 0xe0, 0xff, 0x74, 0x34, 0x90, 0xfa, 0x94, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0x90, 0xfa, 0xa6, -0xe0, 0xa3, 0x30, 0xe5, 0x40, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, -0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, 0xb6, 0x12, 0x20, 0x83, 0x90, -0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, -0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x0e, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, 0x90, 0xfa, -0x96, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, -0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, -0x06, 0xc0, 0x07, 0x90, 0xff, 0x92, 0xe0, 0xff, 0x90, 0xfa, 0xc8, 0xf0, 0x90, 0xff, 0x92, 0xe4, -0xf0, 0xef, 0x12, 0x15, 0x0f, 0x1f, 0xed, 0x26, 0x1f, 0xed, 0x2e, 0x1f, 0x90, 0x30, 0x1f, 0x90, -0x32, 0x1f, 0x9e, 0x38, 0x1f, 0xb0, 0x3a, 0x1f, 0xe2, 0x3e, 0x1f, 0xcd, 0x44, 0x1f, 0xc2, 0x46, -0x1f, 0xd8, 0x50, 0x1f, 0xd8, 0x52, 0x1f, 0xd8, 0x54, 0x1f, 0xd8, 0x56, 0x00, 0x00, 0x1f, 0xf2, -0x90, 0xfa, 0xc8, 0xe0, 0xfd, 0x7c, 0x00, 0x7f, 0x01, 0x12, 0x10, 0x9c, 0x80, 0x62, 0x7c, 0x00, -0x7d, 0x01, 0x7f, 0x03, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x50, -0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x02, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x40, 0xf0, -0x80, 0x3e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x05, 0x12, 0x10, 0x9c, 0x80, 0x33, 0x7c, 0x00, 0x7d, -0x01, 0x7f, 0x06, 0x12, 0x10, 0x9c, 0x80, 0x28, 0x90, 0xfa, 0xc8, 0xe0, 0xff, 0x12, 0x1e, 0x4a, -0x80, 0x1e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x04, 0x12, 0x10, 0x9c, 0x80, 0x13, 0x12, 0x25, 0x13, -0x80, 0x0e, 0x90, 0xfa, 0xc8, 0xe0, 0x24, 0x00, 0xff, 0xe4, 0x34, 0xff, 0xfe, 0x12, 0x29, 0xda, -0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, -0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x78, 0x82, 0xe6, 0xfe, 0x08, -0xe6, 0x24, 0x04, 0x8e, 0x83, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x78, 0x82, 0xe6, -0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 0x83, 0x22, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xaa, 0x06, -0xf8, 0xac, 0x02, 0x7d, 0x01, 0x7b, 0xff, 0x7a, 0x2f, 0x79, 0x52, 0x7e, 0x00, 0x7f, 0x0a, 0x02, -0x13, 0x8f, 0xff, 0x90, 0xf9, 0x6b, 0x02, 0x14, 0xfd, 0x90, 0xf9, 0x66, 0x12, 0x14, 0xfd, 0x90, -0x00, 0x04, 0x02, 0x13, 0xce, 0xe6, 0xfc, 0x08, 0xe6, 0xf5, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0x22, -0x78, 0x84, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xed, 0x12, 0x14, 0x0d, 0x8f, 0x82, 0x8e, 0x83, -0xe5, 0x82, 0x22, 0xef, 0xf0, 0x90, 0xfa, 0xca, 0xe0, 0x54, 0x0f, 0x4e, 0xfe, 0xf0, 0xef, 0x54, -0xf0, 0x4e, 0xf0, 0x22, 0x78, 0x84, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x8c, 0x83, 0x22, 0xa6, 0x07, -0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x22, 0x78, 0x84, 0xe6, 0xfa, 0x08, 0xe6, 0xfb, 0x22, 0x78, 0x86, -0xe6, 0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x22, 0x26, 0xf6, 0x18, 0xee, 0x36, 0xf6, 0x22, 0x8b, 0x82, -0x8a, 0x83, 0xe5, 0x82, 0x22, 0x8b, 0x38, 0x8a, 0x39, 0x89, 0x3a, 0x8d, 0x3b, 0x90, 0xfa, 0xce, -0xe4, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe0, -0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xcd, 0xe0, 0x65, -0x3b, 0x60, 0x46, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0xa3, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x12, 0x21, -0x54, 0x90, 0xfa, 0xcd, 0xe0, 0xff, 0x90, 0xfa, 0xd0, 0xe4, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0x12, -0x21, 0x54, 0x90, 0xfa, 0xd0, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0xfa, 0xce, 0xcf, 0xf0, 0xa3, 0xef, -0xf0, 0x90, 0xfa, 0xcd, 0xe0, 0xa3, 0x75, 0xf0, 0x00, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xce, 0xe4, -0x75, 0xf0, 0x04, 0x12, 0x14, 0x2f, 0x02, 0x20, 0xd6, 0x90, 0xfa, 0xcf, 0xe0, 0x24, 0x01, 0xff, -0x90, 0xfa, 0xce, 0xe0, 0x34, 0x00, 0xab, 0x38, 0xaa, 0x39, 0xa9, 0x3a, 0x8f, 0xf0, 0x12, 0x14, -0x93, 0x7f, 0x00, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe4, 0x75, 0xf0, -0x01, 0x12, 0x14, 0x2f, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x8f, 0x68, -0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xfb, -0xf0, 0x44, 0x02, 0xf0, 0x08, 0x12, 0x20, 0x65, 0xe0, 0xa3, 0x30, 0xe5, 0x0c, 0x12, 0x20, 0x7c, -0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x78, 0x82, 0xe6, 0xfe, 0x08, 0xe6, 0xff, -0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x54, 0xb8, 0xfd, 0xf0, 0xe5, 0x68, 0x24, 0xfe, 0x44, 0x20, 0xfc, -0x4d, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xb8, 0xf0, 0x4c, 0xf0, 0x8f, -0x82, 0x8e, 0x83, 0xa3, 0x74, 0x03, 0xf0, 0x18, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, -0x05, 0x12, 0x20, 0x25, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x74, 0x95, 0x25, 0x68, 0xf5, 0x82, -0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0x44, 0x03, 0xfc, 0xed, 0x4c, 0xd0, 0x82, 0xd0, -0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, -0x25, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x68, 0xf8, 0x74, 0x04, 0x46, -0xf6, 0x7f, 0x00, 0x22, 0x8b, 0x62, 0x8a, 0x63, 0x89, 0x64, 0x12, 0x2a, 0x62, 0x90, 0xfa, 0xbf, -0x12, 0x15, 0x06, 0xaa, 0x63, 0xa9, 0x64, 0x90, 0xfa, 0xc2, 0x12, 0x15, 0x06, 0x90, 0xfa, 0xc3, -0xe4, 0x75, 0xf0, 0x0a, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xc2, 0x12, 0x14, 0xfd, 0xe9, 0x24, 0x01, -0xf9, 0xe4, 0x3a, 0xfa, 0x90, 0xfa, 0xc5, 0x12, 0x15, 0x06, 0xab, 0x62, 0xaa, 0x63, 0xa9, 0x64, -0x12, 0x2a, 0x6e, 0xe0, 0xff, 0xc3, 0x13, 0xf0, 0xe4, 0x78, 0x88, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, -0xff, 0x78, 0x88, 0xe6, 0xc3, 0x9f, 0x50, 0x4a, 0x90, 0xfa, 0xbf, 0x12, 0x2a, 0x43, 0xff, 0x78, -0x89, 0xf6, 0x90, 0xfa, 0xc2, 0x12, 0x2a, 0x43, 0xfe, 0xf4, 0x5f, 0xff, 0x78, 0x89, 0xf6, 0x12, -0x2a, 0x40, 0x5e, 0x4f, 0xff, 0x78, 0x89, 0xf6, 0x12, 0x2a, 0x49, 0x75, 0xf0, 0x02, 0x12, 0x14, -0x2f, 0x90, 0xfa, 0xc3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0xab, 0x62, 0xaa, 0x63, 0xa9, -0x64, 0x90, 0x00, 0x04, 0x12, 0x13, 0xce, 0x30, 0xe4, 0x03, 0x12, 0x2a, 0x58, 0x78, 0x88, 0x06, -0x80, 0xaa, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x22, 0x8b, 0x5c, 0x8a, 0x5d, 0x89, 0x5e, 0x90, 0xfa, -0xbe, 0x74, 0x06, 0xf0, 0xe4, 0x90, 0xfa, 0xbd, 0xf0, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x26, -0x14, 0x70, 0x70, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x12, 0x12, 0x22, 0x14, 0x80, -0x62, 0x12, 0x2a, 0x79, 0x12, 0x1d, 0x5e, 0x90, 0xfa, 0xbe, 0xef, 0xf0, 0x80, 0x55, 0x90, 0xfa, -0xbe, 0x74, 0x81, 0xf0, 0x80, 0x4d, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x3e, 0x12, -0x29, 0x85, 0x80, 0x3f, 0xe5, 0x5e, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x5d, 0xfa, 0x7b, 0x01, 0xc0, -0x03, 0xc0, 0x02, 0xc0, 0x01, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xfd, 0x90, -0x00, 0x08, 0x12, 0x14, 0x5b, 0xf5, 0x41, 0x85, 0xf0, 0x40, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, -0x12, 0x23, 0xee, 0x90, 0xfa, 0xbd, 0xef, 0xf0, 0xe4, 0xa3, 0xf0, 0x80, 0x06, 0x90, 0xfa, 0xbe, -0x74, 0x81, 0xf0, 0x90, 0xfa, 0xbe, 0xe0, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x02, 0x12, 0x14, 0x0d, -0x90, 0xfa, 0xbd, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0x89, 0x7f, 0x02, 0x12, 0x11, 0x9f, 0x78, 0x6d, -0xe6, 0x44, 0x02, 0xf6, 0xd2, 0xb0, 0xd2, 0xb1, 0xd2, 0xb3, 0x90, 0xff, 0xa4, 0xe0, 0x90, 0xfa, -0x7a, 0xf0, 0x90, 0xff, 0xb4, 0xe0, 0x90, 0xfa, 0x7b, 0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x90, 0xfa, -0x78, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x90, 0xfa, 0x79, 0xf0, 0x90, 0xff, 0xa4, 0x74, 0x30, 0xf0, -0x90, 0xff, 0xb4, 0xf0, 0x90, 0xff, 0xa2, 0x74, 0x40, 0xf0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xfa, -0xe3, 0xe5, 0xa8, 0xf0, 0x75, 0xa8, 0x81, 0x90, 0xff, 0x92, 0xe0, 0x60, 0x04, 0xe4, 0xf0, 0x80, -0xf6, 0x90, 0xff, 0xfd, 0x74, 0x3a, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x90, 0xfa, 0x7a, -0xe0, 0x90, 0xff, 0xa4, 0xf0, 0x90, 0xfa, 0x7b, 0xe0, 0x90, 0xff, 0xb4, 0xf0, 0x90, 0xfa, 0x78, -0xe0, 0x90, 0xff, 0xa2, 0xf0, 0x90, 0xfa, 0x79, 0xe0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xf9, 0x15, -0xe0, 0x60, 0x02, 0xc2, 0xb3, 0x90, 0xfa, 0xe3, 0xe0, 0xf5, 0xa8, 0x02, 0x10, 0x0c, 0x8b, 0x3c, -0x8a, 0x3d, 0x89, 0x3e, 0x8d, 0x3f, 0xe5, 0x3f, 0x70, 0x03, 0xaf, 0x3f, 0x22, 0x12, 0x2a, 0xa8, -0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x40, 0x90, 0xff, 0xf1, 0xf0, 0x12, 0x2e, 0xd4, 0x50, 0xf2, -0x12, 0x24, 0x7b, 0x40, 0x0b, 0x7f, 0x00, 0x22, 0x12, 0x2a, 0xc7, 0x12, 0x24, 0x7b, 0x50, 0xf8, -0x90, 0xff, 0xf3, 0x74, 0xa1, 0xf0, 0xe5, 0x3f, 0xb4, 0x01, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, -0x02, 0xf0, 0x90, 0xff, 0xf1, 0xe4, 0xf0, 0xf5, 0x42, 0xe5, 0x3f, 0x14, 0xff, 0xe5, 0x42, 0xc3, -0x9f, 0x50, 0x2a, 0x12, 0x2e, 0xbd, 0x40, 0x03, 0xaf, 0x42, 0x22, 0xc3, 0xe5, 0x3f, 0x95, 0x42, -0xff, 0xbf, 0x02, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x2a, 0xba, 0x05, 0x42, -0x74, 0x01, 0x25, 0x3e, 0xf5, 0x3e, 0xe4, 0x35, 0x3d, 0xf5, 0x3d, 0x80, 0xcc, 0x12, 0x2e, 0xbd, -0x40, 0x03, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xba, 0xaf, 0x3f, 0x22, 0x90, 0xff, 0xf1, 0xe5, 0x41, -0xf0, 0x02, 0x2e, 0xd4, 0x75, 0xa8, 0x40, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x91, -0x02, 0x24, 0xce, 0x02, 0x2e, 0x88, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, -0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, -0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, -0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x28, -0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, -0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, -0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, -0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, -0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x36, 0x12, 0x19, 0x21, 0xe0, 0xb4, 0x04, 0x0d, 0xe5, 0x36, 0x24, -0x03, 0xff, 0x12, 0x2d, 0x4f, 0x12, 0x19, 0x21, 0xe4, 0xf0, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, -0x02, 0x40, 0xe3, 0xe4, 0xf5, 0x36, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x90, 0x12, 0x19, -0x62, 0x60, 0x2c, 0x12, 0x29, 0xda, 0xef, 0x60, 0x52, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, -0x90, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, 0xf0, 0x75, 0xf0, 0x0a, 0xe5, 0x36, 0x90, 0xfa, 0x9c, -0x12, 0x14, 0xdf, 0xe0, 0xa3, 0x30, 0xe6, 0x33, 0x12, 0x19, 0x21, 0x74, 0x04, 0xf0, 0x22, 0x75, -0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x19, 0x62, 0x60, 0x16, 0x12, 0x29, 0xda, 0xef, -0x60, 0x19, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, -0xf0, 0x22, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, 0x02, 0x40, 0x9b, 0x22, 0xe4, 0xff, 0x90, 0xff, -0x83, 0xe0, 0x54, 0x0f, 0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x17, 0x74, 0xf0, 0x2f, 0xf5, 0x82, 0xe4, -0x34, 0xfe, 0xf5, 0x83, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xfb, 0x0f, 0x12, 0x18, 0x19, 0x80, -0xdd, 0xef, 0xfd, 0xc3, 0xe5, 0x31, 0x9d, 0xf5, 0x31, 0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0xd3, -0xe5, 0x31, 0x94, 0x00, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x06, 0xe4, 0x90, 0xff, 0x83, 0xf0, 0x22, -0x12, 0x19, 0x3e, 0x12, 0x19, 0x92, 0x12, 0x19, 0x8c, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x1e, -0x14, 0x60, 0x1b, 0x24, 0x8e, 0x70, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x13, 0xce, 0xff, 0x24, 0xfc, -0x60, 0x03, 0x04, 0x70, 0x1f, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0d, 0x02, 0x10, 0x9c, 0x12, 0x19, -0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, -0xff, 0x12, 0x2f, 0x6a, 0x22, 0x8b, 0x4b, 0x8a, 0x4c, 0x89, 0x4d, 0x8c, 0x4e, 0x8d, 0x4f, 0xd2, -0x00, 0x12, 0x2a, 0xa8, 0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x4e, 0x90, 0xff, 0xf1, 0xf0, 0x12, -0x2e, 0xd4, 0x50, 0xf2, 0x12, 0x26, 0x9a, 0x40, 0x0b, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xc7, 0x12, -0x26, 0x9a, 0x50, 0xf8, 0xe4, 0xf5, 0x51, 0xe5, 0x50, 0x14, 0xff, 0xe5, 0x51, 0xc3, 0x9f, 0x50, -0x17, 0x12, 0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x05, 0x51, 0x74, 0x01, 0x25, 0x4d, 0xf5, -0x4d, 0xe4, 0x35, 0x4c, 0xf5, 0x4c, 0x80, 0xdf, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x12, -0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x7f, 0x00, 0x22, 0xab, 0x4b, 0xaa, 0x4c, 0xa9, 0x4d, -0x12, 0x13, 0xb5, 0x90, 0xff, 0xf1, 0xf0, 0x02, 0x2e, 0xd4, 0x90, 0xff, 0xf1, 0xe5, 0x4f, 0xf0, -0x02, 0x2e, 0xd4, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, 0xfa, -0xcb, 0xe4, 0x75, 0xf0, 0x09, 0x12, 0x14, 0x2f, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, -0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x12, -0x23, 0xee, 0x90, 0xff, 0xf7, 0xe5, 0x37, 0x12, 0x26, 0xfe, 0x90, 0xff, 0xf6, 0xe5, 0x37, 0xf0, -0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x06, 0x12, 0x26, 0xfe, 0xe5, 0x37, 0x30, 0xe0, 0x07, -0x90, 0xff, 0xfc, 0x74, 0x94, 0xf0, 0x22, 0x90, 0xff, 0xfc, 0x74, 0x90, 0xf0, 0x22, 0xf0, 0x7b, -0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, -0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x15, 0x6b, 0xa8, 0x6b, 0xa6, 0x07, 0x30, -0x08, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf8, 0xd2, 0x08, 0xa8, 0x6b, 0xe6, 0xff, 0xb4, 0x03, 0x0f, -0x78, 0x82, 0x76, 0xff, 0x08, 0x76, 0xe0, 0x08, 0x76, 0xff, 0x08, 0x76, 0xa0, 0x80, 0x0d, 0x78, -0x82, 0x76, 0xff, 0x08, 0x76, 0xe2, 0x08, 0x76, 0xff, 0x08, 0x76, 0xb0, 0x78, 0x86, 0x76, 0xfa, -0x08, 0x76, 0x9a, 0xef, 0x24, 0xfd, 0x75, 0xf0, 0x0a, 0xa4, 0xae, 0xf0, 0x12, 0x20, 0xb7, 0x7b, -0x01, 0x7a, 0xff, 0x79, 0x48, 0x78, 0x6e, 0x12, 0x14, 0xf4, 0xa8, 0x6b, 0xe6, 0x24, 0xfd, 0x75, -0xf0, 0x08, 0xa4, 0xff, 0xae, 0xf0, 0x78, 0x70, 0x12, 0x20, 0xb7, 0x79, 0x08, 0x78, 0x71, 0x12, -0x14, 0xf4, 0x78, 0x73, 0xef, 0x12, 0x20, 0xb7, 0x05, 0x6b, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, -0xab, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xfa, 0xe2, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, -0x79, 0xcb, 0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7e, 0x00, 0x90, 0xfa, -0xe0, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x52, -0x09, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x29, 0x90, 0xfa, 0xe0, 0xe0, 0x70, 0x04, -0xa3, 0xe0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x10, 0x09, 0x90, 0xf9, 0x65, -0xe0, 0x44, 0x10, 0xf0, 0x80, 0x0d, 0x90, 0xfa, 0xe2, 0x74, 0x03, 0xf0, 0x90, 0xf9, 0x65, 0xe0, -0x54, 0xef, 0xf0, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x90, 0xff, 0x93, 0x74, 0x2a, -0xf0, 0x90, 0xff, 0xff, 0xe0, 0x60, 0x06, 0x90, 0xff, 0xfc, 0x74, 0x10, 0xf0, 0x90, 0xff, 0x91, -0xe0, 0x44, 0x90, 0xf0, 0x12, 0x27, 0x8b, 0x12, 0x15, 0x35, 0x12, 0x2d, 0xa5, 0x7e, 0x07, 0x7f, -0xd0, 0x12, 0x11, 0x68, 0x7e, 0x0f, 0x7f, 0xa0, 0x12, 0x11, 0x82, 0xe4, 0x78, 0x7d, 0xf6, 0x78, -0x7d, 0xe6, 0xff, 0xc3, 0x94, 0x06, 0x50, 0x0b, 0x74, 0x74, 0x2f, 0xf8, 0xe4, 0xf6, 0x78, 0x7d, -0x06, 0x80, 0xec, 0x7f, 0x03, 0x12, 0x2c, 0x5b, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe4, 0x05, 0x7f, -0x04, 0x12, 0x2c, 0x5b, 0x90, 0xff, 0x9b, 0xe4, 0xf0, 0x90, 0xff, 0x9a, 0xf0, 0x90, 0xff, 0xe8, -0xe0, 0x54, 0x1f, 0xf0, 0xd2, 0xa8, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x90, 0xef, 0xf6, 0x12, 0x27, -0x19, 0x12, 0x20, 0x59, 0x30, 0xe0, 0x25, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x7f, 0xf0, 0x78, 0x71, -0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0x09, 0x90, 0x00, 0x02, 0xe4, -0x12, 0x14, 0x0d, 0x80, 0xe9, 0x12, 0x20, 0x2d, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x20, 0x59, 0x30, -0xe1, 0x1e, 0x12, 0x20, 0x1b, 0xe0, 0x54, 0x7f, 0xf0, 0x12, 0x2f, 0x15, 0x78, 0x6e, 0x12, 0x14, -0xeb, 0x90, 0x00, 0x02, 0x74, 0x80, 0x12, 0x14, 0x0d, 0x12, 0x20, 0x1b, 0xe0, 0x44, 0x80, 0xf0, -0x12, 0x2f, 0x80, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x03, 0x6e, 0x01, 0xff, 0x48, -0x03, 0x71, 0x01, 0xff, 0x08, 0x02, 0x6c, 0x00, 0x00, 0x44, 0xfa, 0x94, 0x00, 0x00, 0x00, 0x00, -0x44, 0xfa, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xae, 0x00, 0x00, 0x42, 0xfa, 0x7a, 0x00, -0x00, 0x42, 0xfa, 0x78, 0x00, 0x00, 0x42, 0xf9, 0x69, 0xff, 0xff, 0x42, 0xfa, 0x76, 0x00, 0x00, -0x43, 0xf9, 0x16, 0x0a, 0x32, 0x02, 0x41, 0xf9, 0x63, 0x20, 0x41, 0xf9, 0x64, 0x20, 0x41, 0xf9, -0x61, 0x00, 0x41, 0xf9, 0x62, 0x00, 0x44, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xf9, 0x65, -0x00, 0x41, 0xf9, 0x15, 0x00, 0x01, 0x20, 0x00, 0x41, 0xf8, 0x04, 0x00, 0x00, 0x12, 0x19, 0x82, -0xe5, 0x31, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x48, 0xc3, 0xe5, 0x31, 0x94, -0x08, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x11, 0x7f, 0x08, 0xef, 0xe5, 0x31, 0x94, 0x08, 0xf5, 0x31, -0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0x80, 0x05, 0xaf, 0x31, 0x12, 0x19, 0x92, 0xe4, 0xfe, 0xee, -0xc3, 0x9f, 0x50, 0x19, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0xfd, 0x74, 0xf8, 0x2e, 0xf5, 0x82, -0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xed, 0xf0, 0x0e, 0x12, 0x18, 0x19, 0x80, 0xe2, 0xef, 0x54, 0x7f, -0x90, 0xff, 0x81, 0xf0, 0x22, 0x8b, 0x5f, 0x8a, 0x60, 0x89, 0x61, 0x12, 0x2a, 0x6e, 0x70, 0x05, -0xa3, 0x74, 0x08, 0xf0, 0x22, 0xab, 0x5f, 0xaa, 0x60, 0xa9, 0x61, 0x12, 0x2a, 0x62, 0x90, 0xfa, -0xc5, 0x12, 0x15, 0x06, 0xe5, 0x61, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x60, 0xfa, 0x90, 0xfa, 0xbf, -0x12, 0x15, 0x06, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x78, 0x91, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, 0xff, -0x78, 0x91, 0xe6, 0xc3, 0x9f, 0x50, 0x12, 0x12, 0x2a, 0x40, 0xff, 0x12, 0x2a, 0x49, 0x12, 0x2a, -0x5c, 0x78, 0x91, 0x06, 0x12, 0x2a, 0x58, 0x80, 0xe2, 0x22, 0xad, 0x07, 0xac, 0x06, 0x90, 0x2f, -0x06, 0xe4, 0x93, 0xff, 0x78, 0x7a, 0xf6, 0x54, 0x0f, 0x12, 0x19, 0x07, 0xe0, 0x08, 0x76, 0x00, -0x08, 0xf6, 0x18, 0x12, 0x18, 0x42, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x78, 0x7b, -0xee, 0xf6, 0x08, 0xef, 0xf6, 0xee, 0x44, 0xf8, 0x18, 0xf6, 0xef, 0x08, 0xf6, 0x90, 0xff, 0x7a, -0xe0, 0x20, 0xe7, 0x03, 0x7f, 0x00, 0x22, 0x78, 0x7b, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, -0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0x90, 0xff, 0x7a, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0x22, 0xab, -0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x90, 0x00, 0x03, 0x12, 0x13, 0xce, 0x54, 0xf0, 0x24, 0xa0, 0x22, -0x90, 0xfa, 0xc5, 0x12, 0x14, 0xfd, 0x02, 0x13, 0xb5, 0x90, 0xfa, 0xbf, 0x12, 0x14, 0xfd, 0xef, -0x12, 0x13, 0xfb, 0x90, 0xfa, 0xc6, 0xe4, 0x22, 0x90, 0xfa, 0xc0, 0xe4, 0x75, 0xf0, 0x01, 0x02, -0x14, 0x2f, 0x90, 0x00, 0x08, 0x12, 0x14, 0x5b, 0xaa, 0xf0, 0xf9, 0x7b, 0x01, 0x22, 0x90, 0x00, -0x05, 0x12, 0x13, 0xce, 0x90, 0xfa, 0xbd, 0xf0, 0x22, 0xab, 0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x22, -0x90, 0xfa, 0xd9, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, -0xd2, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xd4, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, 0x25, 0x57, -0xf5, 0x57, 0xee, 0x35, 0x56, 0xf5, 0x56, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, -0x54, 0xfd, 0xf0, 0x90, 0xfa, 0xe2, 0xe0, 0x64, 0x03, 0x22, 0x90, 0xff, 0xf2, 0xe0, 0xab, 0x3c, -0xaa, 0x3d, 0xa9, 0x3e, 0x02, 0x13, 0xfb, 0x90, 0xff, 0xf3, 0x74, 0xa0, 0xf0, 0x22, 0x8f, 0x6a, -0xed, 0x70, 0x0f, 0xe5, 0x6a, 0xb4, 0x03, 0x05, 0x7f, 0x01, 0x02, 0x2e, 0xeb, 0x7f, 0x02, 0x02, -0x2e, 0xeb, 0xaf, 0x6a, 0x12, 0x27, 0x19, 0x74, 0x74, 0x25, 0x6a, 0xf8, 0xe6, 0x30, 0xe2, 0x0b, -0xd2, 0x09, 0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x02, 0xc2, 0x09, 0xe5, 0x6a, 0xb4, -0x03, 0x07, 0x7f, 0x81, 0x12, 0x2e, 0xeb, 0x80, 0x05, 0x7f, 0x82, 0x12, 0x2e, 0xeb, 0x30, 0x09, -0x07, 0x12, 0x18, 0x9b, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x22, 0x12, 0x0f, 0x89, 0x90, -0xff, 0xfd, 0xe0, 0x44, 0x60, 0xf0, 0xd2, 0x01, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x02, 0xf0, 0x90, -0xff, 0x00, 0xe0, 0x30, 0xe7, 0x13, 0x90, 0xff, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x2c, 0x80, -0x90, 0xff, 0xfc, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0d, 0x12, 0x19, 0x3e, 0x53, 0x2c, 0x7f, 0x90, -0xff, 0xfc, 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0xff, 0x81, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x02, 0x9f, -0x12, 0x19, 0x46, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, 0x8a, 0x12, 0x20, 0x9e, 0x30, 0xe1, -0x07, 0x7f, 0x13, 0x12, 0x2e, 0xa5, 0x80, 0x34, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, 0x16, -0x78, 0x8a, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x07, 0x90, -0xff, 0xb4, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0xb3, 0x90, 0xf9, 0x15, 0xe0, 0x04, 0xf0, 0x78, 0x8a, -0xe6, 0xff, 0x12, 0x20, 0x59, 0xfd, 0x12, 0x2d, 0x21, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, -0x0f, 0x89, 0x78, 0x8f, 0xef, 0xf6, 0xd2, 0x00, 0x12, 0x27, 0x19, 0x90, 0xf9, 0x66, 0x12, 0x14, -0xfd, 0xe9, 0x24, 0x03, 0xf9, 0xe4, 0x3a, 0xfa, 0xc0, 0x02, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, -0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0xd0, 0x02, 0x12, 0x20, 0x4b, 0x12, 0x2f, 0x80, 0x78, -0x8f, 0xe6, 0xff, 0x12, 0x19, 0xbb, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, -0x8b, 0xef, 0xf6, 0x12, 0x2e, 0x4c, 0x12, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, -0x16, 0x78, 0x8b, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, -0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x14, 0xf0, 0xe0, 0x70, 0x02, -0xd2, 0xb3, 0x02, 0x10, 0x0c, 0x8f, 0x69, 0x12, 0x27, 0x19, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x3f, -0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0x3f, 0xf0, 0x08, 0xe6, 0xfe, 0x08, -0xe6, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0x74, -0x74, 0x25, 0x69, 0xf8, 0x74, 0xfb, 0x56, 0xf6, 0x7f, 0x00, 0x22, 0x8f, 0x37, 0xc2, 0x08, 0x12, -0x27, 0x19, 0x12, 0x20, 0x38, 0x78, 0x84, 0x12, 0x20, 0x1d, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x20, -0x70, 0x12, 0x20, 0x21, 0xe0, 0x20, 0xe0, 0xf6, 0xef, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, -0x83, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0xaf, 0x37, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, -0x89, 0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x24, 0x06, 0x12, 0x20, 0x23, 0xe0, 0xfd, 0x12, 0x20, -0x53, 0x90, 0x00, 0x03, 0x12, 0x20, 0x78, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x04, -0x12, 0x14, 0x0d, 0x12, 0x2f, 0x80, 0x7d, 0x02, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, -0xae, 0x05, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0x0e, 0x0e, 0x0e, 0xee, 0xd3, 0x95, 0x35, -0xe4, 0x95, 0x34, 0x40, 0x02, 0xae, 0x35, 0xee, 0xd3, 0x94, 0x08, 0x74, 0x80, 0x94, 0x81, 0x40, -0x0a, 0x7e, 0x03, 0x90, 0x00, 0x02, 0x74, 0x02, 0x12, 0x14, 0x0d, 0xaf, 0x06, 0x12, 0x2f, 0x6a, -0x22, 0x12, 0x0f, 0x89, 0x78, 0x8c, 0x12, 0x20, 0x9e, 0x30, 0xe2, 0x07, 0x7f, 0x13, 0x12, 0x2e, -0xa5, 0x80, 0x1b, 0x78, 0x8c, 0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x20, 0xe1, 0x07, 0x7f, 0x12, 0x12, -0x2e, 0xa5, 0x80, 0x0a, 0x78, 0x8c, 0xe6, 0xff, 0x12, 0x21, 0x6e, 0x12, 0x2e, 0xa5, 0x02, 0x10, -0x0c, 0xae, 0x07, 0xed, 0x54, 0x03, 0x64, 0x01, 0x60, 0x03, 0x7f, 0x10, 0x22, 0xed, 0x54, 0x7c, -0xc3, 0x94, 0x04, 0x50, 0x03, 0x7f, 0x0b, 0x22, 0x74, 0x74, 0x2e, 0xf8, 0x74, 0x02, 0x46, 0xf6, -0x74, 0x95, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xed, 0xf0, 0x7f, 0x00, 0x22, 0xbf, -0x03, 0x06, 0x7c, 0xff, 0x7d, 0xe0, 0x80, 0x04, 0x7c, 0xff, 0x7d, 0xe2, 0x8d, 0x82, 0x8c, 0x83, -0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x80, 0xf0, 0x74, -0x74, 0x2f, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, 0x64, -0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x16, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xff, -0xc3, 0xe5, 0x31, 0x9f, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x05, 0x12, 0x25, 0x9c, 0x80, 0x03, 0x12, -0x2f, 0x76, 0x02, 0x10, 0x0c, 0x90, 0xff, 0xfc, 0xe0, 0x20, 0xe7, 0x1f, 0xc2, 0xaf, 0x7d, 0xff, -0xac, 0x05, 0x1d, 0xec, 0x60, 0x15, 0x7e, 0x04, 0x7f, 0x00, 0xef, 0x1f, 0xaa, 0x06, 0x70, 0x01, -0x1e, 0x4a, 0x60, 0xec, 0x90, 0xff, 0x92, 0xe4, 0xf0, 0x80, 0xef, 0x22, 0x12, 0x0f, 0x89, 0x78, -0x6c, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x30, 0xe0, 0x12, 0x30, 0xe1, 0x0f, 0x90, 0xff, 0xfc, 0xe0, -0x44, 0x20, 0xf0, 0x7f, 0x04, 0x12, 0x11, 0x9f, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x8e, 0x65, -0x8f, 0x66, 0xe5, 0x66, 0x15, 0x66, 0xae, 0x65, 0x70, 0x02, 0x15, 0x65, 0xd3, 0x94, 0x00, 0xee, -0x94, 0x00, 0x40, 0x09, 0x7e, 0x07, 0x7f, 0xd0, 0x12, 0x0f, 0x62, 0x80, 0xe5, 0x22, 0x11, 0x1a, -0x2b, 0x1c, 0x23, 0x56, 0x2f, 0x5c, 0x2d, 0xcc, 0x2d, 0x7a, 0x2e, 0x6b, 0x2c, 0x8e, 0x2b, 0x66, -0x2b, 0xec, 0x2c, 0xf1, 0x2e, 0x2d, 0x1b, 0xe6, 0x2b, 0xaf, 0x28, 0x67, 0x0e, 0x12, 0x0f, 0x89, -0x78, 0x8d, 0x12, 0x20, 0x9e, 0x20, 0xe2, 0x07, 0x7f, 0x11, 0x12, 0x2e, 0xa5, 0x80, 0x0a, 0x78, -0x8d, 0xe6, 0xff, 0x12, 0x2c, 0x25, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x8f, 0x67, 0x12, 0x2c, -0x25, 0xaf, 0x67, 0x12, 0x27, 0x19, 0x12, 0x20, 0x38, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x67, -0xf8, 0x74, 0xfd, 0x56, 0xf6, 0xaf, 0x67, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, -0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x05, 0x12, 0x29, 0x2d, 0x80, 0x06, 0x12, -0x19, 0x7a, 0x12, 0x19, 0x82, 0x02, 0x10, 0x0c, 0x12, 0x27, 0xfb, 0x12, 0x12, 0x3b, 0x90, 0xf8, -0x04, 0xe0, 0xff, 0x60, 0x05, 0x7d, 0x01, 0x12, 0x11, 0xd8, 0x12, 0x26, 0xa3, 0x12, 0x12, 0x77, -0x12, 0x10, 0xfa, 0x80, 0xe3, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0xe4, 0xf5, 0x2a, 0xf5, -0x2b, 0xef, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, 0xff, 0x12, 0x2f, 0x6a, 0x22, 0x90, 0xff, 0xf0, -0xe0, 0xff, 0x54, 0xa0, 0x60, 0xf7, 0xef, 0x30, 0xe5, 0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, -0xc3, 0x22, 0xd3, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, 0x54, 0x28, 0x60, 0xf7, 0xef, 0x30, 0xe5, -0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, 0xd3, 0x22, 0xef, 0x30, 0xe7, 0x08, 0x12, -0x18, 0xad, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0xef, 0x12, 0x18, 0xf7, 0xe0, 0x54, 0xdf, 0xf0, 0x22, -0x81, 0x01, 0x82, 0x02, 0x83, 0x03, 0x87, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, -0x00, 0x40, 0x00, 0x08, 0x00, 0x78, 0x84, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xff, 0x30, 0xe7, -0x06, 0x54, 0x7f, 0xf0, 0x44, 0x80, 0xf0, 0x22, 0x85, 0x34, 0x30, 0x85, 0x35, 0x31, 0x90, 0xff, -0x82, 0xe0, 0x54, 0xf7, 0xf0, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe4, 0xfe, 0xee, 0x90, 0x2f, -0x00, 0x93, 0xb5, 0x07, 0x02, 0xd3, 0x22, 0x0e, 0xbe, 0x07, 0xf2, 0xc3, 0x22, 0x00, 0x08, 0x18, -0x38, 0x28, 0x01, 0x81, 0x10, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0f, 0x89, 0x7f, -0x02, 0x12, 0x10, 0x18, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x12, -0x18, 0x49, 0x12, 0x29, 0x2d, 0x22, 0x12, 0x19, 0x82, 0x12, 0x19, 0x3e, 0x12, 0x19, 0x7a, 0x22, -0xc2, 0x08, 0x22, +0xd9, 0xf5, 0xeb, 0x70, 0x10, 0xea, 0xf0, 0xc0, 0x07, 0x12, 0x12, 0x41, 0xad, 0x07, 0xaf, 0x02, +0x12, 0x12, 0x58, 0xd0, 0x07, 0xa3, 0xa3, 0xa3, 0xdf, 0xce, 0x12, 0x11, 0x66, 0x80, 0xc1, 0x8f, +0x24, 0x12, 0x2a, 0x06, 0x78, 0x80, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x08, 0x12, +0x21, 0xf3, 0xe0, 0xfd, 0x12, 0x22, 0x8a, 0x8a, 0x83, 0x24, 0x0a, 0x12, 0x21, 0xf3, 0xed, 0xf0, +0x12, 0x22, 0x56, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xe0, 0xff, 0x12, 0x22, 0x99, 0x24, 0x09, 0x12, +0x21, 0xf3, 0xef, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe4, 0x20, 0x08, 0x12, 0x22, 0x09, 0xc0, +0x83, 0xc0, 0x82, 0xa3, 0xe0, 0x25, 0xe0, 0xff, 0x05, 0x82, 0xd5, 0x82, 0x02, 0x15, 0x83, 0x15, +0x82, 0xe0, 0x33, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0x78, 0x80, 0x12, 0x22, 0x09, +0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0xff, 0x12, 0x22, 0x8a, 0x8a, 0x83, 0x24, 0x08, 0x12, 0x21, +0xf3, 0xef, 0xf0, 0xed, 0x12, 0x22, 0x99, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xed, 0xf0, 0x12, 0x21, +0xfb, 0xe0, 0xff, 0x30, 0xe7, 0x19, 0x12, 0x22, 0x6e, 0x12, 0x21, 0xf3, 0xe0, 0x60, 0x09, 0x12, +0x21, 0xfb, 0xef, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x12, 0x21, 0xfb, 0xef, 0x54, 0xfd, 0xf0, 0x78, +0x7e, 0x12, 0x22, 0x09, 0xa3, 0xa3, 0xe0, 0xff, 0x53, 0x07, 0xc7, 0x08, 0xe6, 0xfc, 0x08, 0xe6, +0xfd, 0x12, 0x22, 0x43, 0xa3, 0xe0, 0x30, 0xe3, 0x12, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, +0x05, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x31, 0x94, 0x93, 0x42, 0x07, 0x53, 0x07, 0xfb, 0x78, 0x80, +0xe6, 0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x24, 0x06, 0x12, 0x21, 0xf3, 0xe0, 0x60, 0x03, 0x43, 0x07, +0x04, 0x53, 0x07, 0xfc, 0x78, 0x80, 0x12, 0x22, 0x7a, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0x42, +0x07, 0x43, 0x07, 0x80, 0x12, 0x22, 0x8a, 0xf5, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xef, 0xf0, 0x12, +0x22, 0x99, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0xff, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xe0, +0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe1, 0x05, 0x53, 0x07, 0xdf, 0x80, 0x03, 0x43, 0x07, 0x20, 0xec, +0x30, 0xe4, 0x05, 0x53, 0x07, 0xef, 0x80, 0x03, 0x43, 0x07, 0x10, 0x12, 0x21, 0xfb, 0xe0, 0xfe, +0x54, 0x03, 0x60, 0x73, 0x53, 0x07, 0xdf, 0xee, 0x30, 0xe1, 0x69, 0x78, 0x80, 0x12, 0x22, 0x6f, +0x12, 0x21, 0xf3, 0xe0, 0x12, 0x1b, 0x4c, 0x14, 0xa6, 0x00, 0x14, 0xda, 0x01, 0x14, 0xdf, 0x03, +0x14, 0xda, 0x05, 0x14, 0xdf, 0x07, 0x14, 0xda, 0x09, 0x14, 0xdf, 0x0b, 0x14, 0xda, 0x0d, 0x14, +0xdf, 0x0f, 0x00, 0x00, 0x14, 0xe7, 0xe5, 0x24, 0x64, 0x03, 0x70, 0x21, 0x90, 0xf9, 0x15, 0xe0, +0x30, 0xe2, 0x0d, 0x30, 0xb4, 0x05, 0x43, 0x07, 0x02, 0x80, 0x2c, 0x53, 0x07, 0xfd, 0x80, 0x27, +0x30, 0x95, 0x05, 0x43, 0x07, 0x02, 0x80, 0x1f, 0x53, 0x07, 0xfd, 0x80, 0x1a, 0x30, 0x93, 0x05, +0x43, 0x07, 0x02, 0x80, 0x12, 0x53, 0x07, 0xfd, 0x80, 0x0d, 0x43, 0x07, 0x02, 0x80, 0x08, 0x53, +0x07, 0xfd, 0x80, 0x03, 0x53, 0x07, 0xfd, 0x12, 0x22, 0x78, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xef, +0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xff, 0x12, 0x21, 0xfb, 0xe0, 0xfe, 0x54, +0x03, 0x70, 0x03, 0x02, 0x15, 0xd7, 0xee, 0x20, 0xe1, 0x03, 0x02, 0x15, 0xd4, 0x12, 0x22, 0x6e, +0x12, 0x21, 0xf3, 0xe0, 0x12, 0x1b, 0x4c, 0x15, 0x36, 0x00, 0x15, 0x6c, 0x01, 0x15, 0x6c, 0x03, +0x15, 0xa0, 0x05, 0x15, 0xa0, 0x07, 0x15, 0x86, 0x09, 0x15, 0x86, 0x0b, 0x15, 0xba, 0x0d, 0x15, +0xba, 0x0f, 0x00, 0x00, 0x15, 0xd7, 0xe5, 0x24, 0x64, 0x03, 0x70, 0x23, 0x90, 0xf9, 0x15, 0xe0, +0x30, 0xe2, 0x0f, 0x30, 0xb1, 0x06, 0x53, 0x07, 0x7f, 0x02, 0x15, 0xd7, 0x43, 0x07, 0x80, 0x02, +0x15, 0xd7, 0x30, 0x94, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x7d, 0x43, 0x07, 0x80, 0x80, 0x78, 0x30, +0x92, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x70, 0x43, 0x07, 0x80, 0x80, 0x6b, 0xe5, 0x24, 0xb4, 0x03, +0x09, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xdf, +0xf0, 0x53, 0x07, 0x7f, 0x80, 0x51, 0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90, 0xff, 0x9e, 0xe0, 0x44, +0x10, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x44, 0x20, 0xf0, 0x53, 0x07, 0x7f, 0x80, 0x37, +0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0xff, +0x9e, 0xe0, 0x54, 0xdf, 0xf0, 0x43, 0x07, 0x80, 0x80, 0x1d, 0xe5, 0x24, 0xb4, 0x03, 0x09, 0x90, +0xff, 0x9e, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x07, 0x90, 0xff, 0x9e, 0xe0, 0x44, 0x20, 0xf0, 0x43, +0x07, 0x80, 0x80, 0x03, 0x53, 0x07, 0x7f, 0x78, 0x80, 0x12, 0x22, 0x3f, 0xe0, 0xfc, 0xa3, 0xe0, +0xfd, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x20, 0x80, 0x03, 0x53, 0x07, 0xdf, 0xec, 0x30, 0xe3, 0x05, +0x43, 0x07, 0x40, 0x80, 0x03, 0x53, 0x07, 0xbf, 0xec, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x10, 0x80, +0x03, 0x53, 0x07, 0xef, 0xed, 0x30, 0xe4, 0x05, 0x43, 0x07, 0x08, 0x80, 0x03, 0x53, 0x07, 0xf7, +0xed, 0x30, 0xe5, 0x05, 0x43, 0x07, 0x04, 0x80, 0x03, 0x53, 0x07, 0xfb, 0xed, 0x30, 0xe6, 0x05, +0x43, 0x07, 0x01, 0x80, 0x03, 0x53, 0x07, 0xfe, 0xed, 0x30, 0xe7, 0x05, 0x43, 0x07, 0x02, 0x80, +0x03, 0x53, 0x07, 0xfd, 0x78, 0x7e, 0x12, 0x22, 0x3f, 0xa3, 0xef, 0xf0, 0x12, 0x31, 0xc7, 0x7f, +0x00, 0x22, 0x90, 0xff, 0xfa, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x16, 0xf0, 0x90, 0xff, 0xf9, 0x74, +0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcc, 0xe4, 0xfd, 0x12, 0x22, 0xa0, 0x90, 0xfa, 0xcc, +0xe4, 0x75, 0xf0, 0x03, 0x12, 0x1a, 0x6c, 0x12, 0x18, 0xe2, 0xe5, 0x23, 0x30, 0xe7, 0x02, 0xd2, +0x02, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x24, 0x90, 0xfa, 0xcc, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5, +0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x7b, +0x00, 0x7a, 0x00, 0x79, 0x23, 0x75, 0x2d, 0x00, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0xe5, +0x23, 0x24, 0x80, 0x90, 0xff, 0xf8, 0xf0, 0xe5, 0x23, 0x64, 0x07, 0x60, 0x1e, 0xe5, 0x23, 0x64, +0x06, 0x60, 0x18, 0xe5, 0x23, 0x64, 0x14, 0x60, 0x12, 0xe5, 0x23, 0x64, 0x41, 0x60, 0x0c, 0xe5, +0x23, 0x64, 0x1a, 0x70, 0x46, 0xe5, 0x24, 0x64, 0x02, 0x70, 0x40, 0xe5, 0x23, 0xb4, 0x07, 0x16, +0xd2, 0x94, 0xd2, 0x95, 0xd2, 0x92, 0xd2, 0x93, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x02, 0xf0, 0xa3, +0xe0, 0x44, 0x02, 0xf0, 0x80, 0x1e, 0xe5, 0x23, 0xb4, 0x41, 0x12, 0x90, 0xf9, 0x15, 0xe0, 0x44, +0x06, 0xf0, 0xa3, 0xe0, 0x44, 0x06, 0xf0, 0xd2, 0xb1, 0xd2, 0xb4, 0x80, 0x07, 0x90, 0xf9, 0x15, +0xe0, 0x44, 0x01, 0xf0, 0x90, 0xf9, 0x16, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x23, 0x64, 0x42, 0x60, +0x05, 0xe5, 0x23, 0xb4, 0x43, 0x0c, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x80, 0xf0, 0xa3, 0xe0, 0x44, +0x80, 0xf0, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3, 0x74, 0x0d, 0xf0, 0x12, 0x18, 0xe2, 0x90, 0xff, +0xf5, 0xe5, 0x23, 0xf0, 0xe4, 0xf5, 0x35, 0xf5, 0x33, 0xf5, 0x34, 0xf5, 0x32, 0x12, 0x1d, 0x84, +0x12, 0x1c, 0x30, 0x12, 0x1d, 0x8b, 0x90, 0xf9, 0x67, 0x12, 0x1b, 0x43, 0x90, 0xf9, 0x6c, 0x12, +0x1b, 0x43, 0x90, 0xff, 0xff, 0xe4, 0xf0, 0x90, 0xff, 0x83, 0xe0, 0xe4, 0xf0, 0x90, 0xff, 0x81, +0x74, 0x80, 0xf0, 0xa3, 0x74, 0x84, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xe4, 0xf5, 0x23, 0xe5, 0x23, +0x12, 0x1c, 0xa7, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x23, 0x12, 0x1c, 0xb5, 0xf5, 0x83, 0xe4, 0xf0, +0x05, 0x23, 0xe5, 0x23, 0xb4, 0x07, 0xe7, 0x78, 0x7a, 0x76, 0xfe, 0x08, 0x76, 0xf0, 0x90, 0x31, +0x4d, 0xe4, 0x93, 0xff, 0x78, 0x78, 0xf6, 0xfd, 0xad, 0x07, 0x90, 0x31, 0x5a, 0xe4, 0x93, 0xff, +0x08, 0xf6, 0xff, 0xed, 0x54, 0x0f, 0xfd, 0x12, 0x1c, 0x97, 0x74, 0x84, 0xf0, 0xed, 0x75, 0xf0, +0x08, 0xa4, 0x24, 0x47, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xc3, 0x74, 0xf0, +0x9f, 0x78, 0x7b, 0xf6, 0x74, 0xfe, 0x94, 0x00, 0x18, 0x12, 0x1c, 0x28, 0xce, 0xc3, 0x13, 0xce, +0x13, 0xd8, 0xf9, 0xff, 0xed, 0x12, 0x1c, 0xf8, 0xef, 0xf0, 0xed, 0x12, 0x1d, 0x1e, 0xe4, 0xf5, +0x23, 0xe5, 0x23, 0x90, 0x31, 0x47, 0x93, 0xff, 0x78, 0x78, 0xf6, 0xfd, 0xe5, 0x23, 0x25, 0xe0, +0x24, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x31, 0xf5, 0x83, 0xe4, 0x93, 0x08, 0xf6, 0xed, 0x30, 0xe7, +0x53, 0x18, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x1c, 0x97, 0x12, 0x1d, 0x06, 0x24, 0x47, 0xf5, 0x82, +0xe4, 0x34, 0xff, 0x12, 0x1c, 0x18, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0xe9, 0x12, +0x1c, 0xf8, 0xef, 0xf0, 0x12, 0x1c, 0x1f, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x1d, +0x0b, 0x24, 0x45, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x12, 0x1d, 0x1e, +0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x46, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, +0xf0, 0x02, 0x18, 0xb7, 0x78, 0x78, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x1c, 0xea, 0x12, 0x1d, 0x06, +0x24, 0x07, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x12, 0x1c, 0x18, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, +0xf9, 0x12, 0x1d, 0x0b, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0x12, +0x1c, 0x1f, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x1d, 0x0b, 0x24, 0x05, 0xf5, 0x82, +0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, +0xe4, 0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, +0xe4, 0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x23, 0xe5, 0x23, 0x64, 0x04, 0x60, 0x03, 0x02, +0x17, 0xe1, 0x90, 0x31, 0x4c, 0xe4, 0x93, 0xff, 0x78, 0x78, 0xf6, 0x12, 0x1c, 0xe8, 0xe4, 0xf0, +0x90, 0x31, 0x4b, 0x93, 0xff, 0xf6, 0x12, 0x1c, 0x95, 0xe4, 0xf0, 0x90, 0xff, 0xfd, 0x74, 0x05, +0xf0, 0x22, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12, +0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x02, 0x25, 0xd7, 0xe7, 0x09, 0xf6, 0x08, +0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e, 0x88, 0x82, 0x8c, 0x83, +0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x78, +0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83, 0xe3, 0x09, 0xf0, 0xa3, +0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x58, +0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c, 0x80, 0xd2, 0x80, 0xfa, +0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10, 0x80, 0xa6, 0x80, 0xea, +0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33, 0x89, 0x82, 0x8a, 0x83, +0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, +0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0x0d, 0x89, 0x82, 0x8a, +0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0, 0xed, 0xfb, 0x22, 0x89, +0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xf0, +0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde, 0xe8, 0x80, 0xdb, 0x89, +0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc, 0x88, 0xf0, 0xef, 0x60, +0x01, 0x0e, 0x4e, 0x60, 0xc3, 0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xb9, 0xf5, +0x82, 0xeb, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xaf, 0x23, 0x23, 0x45, 0x82, 0x23, 0x90, 0x19, +0x4c, 0x73, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, +0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, +0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, +0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, +0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, +0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0x22, 0xc5, 0xf0, 0xf8, 0xa3, +0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, 0x38, +0xf0, 0x22, 0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, +0x15, 0x83, 0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22, 0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, +0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, +0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, +0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22, +0xbb, 0x01, 0x0a, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x06, 0xf7, +0x09, 0xa7, 0xf0, 0x19, 0x22, 0xbb, 0xfe, 0x06, 0xf3, 0xe5, 0xf0, 0x09, 0xf3, 0x19, 0x22, 0xf8, +0xbb, 0x01, 0x11, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0xe5, +0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x08, 0xa6, 0xf0, 0x22, 0xbb, +0xfe, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0xe5, 0xf0, 0x08, 0xf2, 0x22, 0xa4, 0x25, 0x82, 0xf5, +0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xfa, 0x08, 0xe6, 0xf9, +0x22, 0xeb, 0xf6, 0x08, 0xea, 0xf6, 0x08, 0xe9, 0xf6, 0x22, 0xe0, 0xfb, 0xa3, 0xe0, 0xfa, 0xa3, +0xe0, 0xf9, 0x22, 0xeb, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xe9, 0xf0, 0x22, 0xd0, 0x83, 0xd0, 0x82, +0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, +0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, +0x80, 0xdf, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0xe5, 0x4c, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25, +0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0x74, 0x11, 0x12, +0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x90, 0xff, 0x06, +0xe0, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, +0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0xe4, 0x12, 0x1a, 0x38, 0x04, 0x25, +0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0xab, 0x36, 0xfa, 0xa9, 0x38, 0xe4, 0x12, 0x1a, +0x38, 0x04, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x90, 0xff, 0x04, 0xe0, 0xab, +0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38, 0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, +0x37, 0xf5, 0x37, 0x90, 0xff, 0x05, 0xe0, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x12, 0x1a, 0x38, +0x74, 0x01, 0x25, 0x38, 0xf5, 0x38, 0xe4, 0x35, 0x37, 0xf5, 0x37, 0x22, 0xf5, 0x83, 0xe0, 0x54, +0x08, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38, 0x22, 0xf5, 0x83, 0xef, 0xf0, 0xfd, 0x7c, 0x00, 0xc3, +0x78, 0x7b, 0xe6, 0x9d, 0xf6, 0x18, 0xe6, 0x9c, 0xf6, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x03, 0x22, +0x75, 0x36, 0x01, 0x75, 0x37, 0xf9, 0x75, 0x38, 0x6f, 0x22, 0xe0, 0x44, 0x04, 0xf0, 0x74, 0x12, +0x2f, 0xf5, 0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xe0, 0x22, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, +0x00, 0xc3, 0x90, 0xfa, 0xbd, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 0xbc, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, +0xb4, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0xef, 0x25, 0x4f, 0xf5, 0x4f, 0xee, 0x35, 0x4e, 0xf5, +0x4e, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb1, 0x90, 0xfa, 0xb4, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, +0xf5, 0x2e, 0x22, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0x8e, 0x83, 0x24, 0x04, 0xf5, 0x82, 0xe4, +0x35, 0x83, 0xf5, 0x83, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe4, +0x34, 0xff, 0xf5, 0x83, 0x22, 0xe5, 0x4d, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x48, 0xf5, 0x82, 0xe4, +0x34, 0xff, 0x22, 0xe5, 0x4d, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x34, 0xff, +0x22, 0x90, 0xfa, 0xb6, 0xe0, 0xff, 0x24, 0xfc, 0x22, 0x90, 0xff, 0x00, 0xe0, 0x54, 0x1f, 0x22, +0x90, 0xfa, 0xbb, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x22, 0x75, 0x33, 0x00, 0x8f, 0x34, 0x90, 0xf9, +0x6c, 0x12, 0x1b, 0x3a, 0x90, 0x00, 0x02, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, +0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x41, 0xf5, 0x82, +0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x74, 0x80, 0xf0, 0x08, 0xe6, 0xff, 0xe9, 0x75, 0xf0, 0x08, +0xa4, 0x22, 0x74, 0xaf, 0x25, 0x22, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0x22, 0x75, 0xf0, +0x08, 0xa4, 0x24, 0x42, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x22, 0x90, +0xff, 0x82, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x03, 0xf0, 0x90, 0xff, +0xfc, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x78, 0x67, 0xe6, 0x54, 0xfd, 0xf6, 0x90, 0xff, 0xfd, 0x74, +0x65, 0xf0, 0x22, 0x12, 0x1b, 0x1c, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x22, 0x7b, 0x01, 0x7a, +0xfa, 0x79, 0xb4, 0x22, 0x90, 0xff, 0x80, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0x83, 0xe0, +0x54, 0x7f, 0xf0, 0x22, 0xe0, 0xff, 0x90, 0xf9, 0x67, 0x02, 0x1b, 0x3a, 0x90, 0xff, 0xa4, 0xe0, +0x44, 0x02, 0xf0, 0x22, 0x75, 0x39, 0x01, 0x75, 0x3a, 0x09, 0x22, 0x7b, 0x01, 0x7a, 0xf9, 0x79, +0x6f, 0x22, 0xd3, 0xe5, 0x3c, 0x94, 0x08, 0xe5, 0x3b, 0x94, 0x01, 0x22, 0x90, 0xfa, 0xbb, 0xe0, +0xff, 0x90, 0xfa, 0xb7, 0xf0, 0x22, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xef, 0x22, 0x90, 0xff, 0xb4, +0xe0, 0x54, 0xef, 0x22, 0x12, 0x10, 0x03, 0x78, 0x88, 0xef, 0xf6, 0x12, 0x2a, 0x06, 0x12, 0x22, +0x4a, 0x8e, 0x83, 0x24, 0x09, 0x12, 0x21, 0xf3, 0xe0, 0xfd, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x0a, +0x12, 0x22, 0x52, 0x24, 0x0a, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x00, 0x0b, 0x12, 0x1a, 0x4a, 0x12, +0x22, 0x4a, 0xf5, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x53, 0x12, 0x22, 0x56, 0x24, +0x04, 0x12, 0x21, 0xf3, 0xe0, 0xf5, 0x54, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xf5, 0x55, +0xe5, 0x53, 0xc4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x78, 0x88, 0xf6, 0xd3, 0x94, 0x00, 0x40, 0x06, +0xe5, 0x54, 0x30, 0xe1, 0x01, 0x06, 0x78, 0x88, 0xe6, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x0c, 0xef, +0x12, 0x1a, 0x4a, 0x78, 0x80, 0x12, 0x22, 0x09, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x53, +0x07, 0x0c, 0x53, 0x06, 0xe6, 0xe5, 0x53, 0x30, 0xe5, 0x03, 0x43, 0x07, 0x01, 0xe5, 0x54, 0x20, +0xe5, 0x0e, 0xe5, 0x53, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x53, 0x20, 0xe7, 0x03, 0x43, 0x07, 0x02, +0xe5, 0x53, 0x30, 0xe3, 0x03, 0x43, 0x07, 0x10, 0xe5, 0x53, 0x30, 0xe2, 0x03, 0x43, 0x07, 0x20, +0xe5, 0x53, 0x54, 0x03, 0x60, 0x03, 0x43, 0x07, 0x40, 0xe5, 0x53, 0x30, 0xe1, 0x03, 0x43, 0x07, +0x80, 0xe5, 0x53, 0x30, 0xe4, 0x03, 0x43, 0x06, 0x01, 0xe5, 0x53, 0x30, 0xe6, 0x03, 0x43, 0x06, +0x08, 0xe5, 0x54, 0x20, 0xe4, 0x0e, 0xe5, 0x53, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x53, 0x20, 0xe7, +0x03, 0x43, 0x06, 0x10, 0x53, 0x07, 0xfb, 0x53, 0x06, 0x79, 0x90, 0x00, 0x05, 0xee, 0x8f, 0xf0, +0x12, 0x1a, 0xef, 0xe5, 0x55, 0x30, 0xe3, 0x12, 0x54, 0x30, 0xff, 0xc4, 0x54, 0x0f, 0x12, 0x22, +0x2c, 0x90, 0x00, 0x08, 0xef, 0x12, 0x1a, 0x4a, 0x80, 0x0a, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x08, +0xe4, 0x12, 0x1a, 0x4a, 0xe5, 0x55, 0x54, 0x03, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x07, 0xef, 0x12, +0x1a, 0x4a, 0xe5, 0x55, 0x54, 0x04, 0xff, 0xc3, 0x13, 0x90, 0x00, 0x09, 0x12, 0x1a, 0x4a, 0x90, +0x00, 0x07, 0x12, 0x1a, 0x0b, 0x70, 0x13, 0x12, 0x22, 0x2d, 0xe9, 0x24, 0x09, 0xf9, 0xe4, 0x3a, +0xfa, 0x12, 0x19, 0xf2, 0xff, 0xc3, 0x13, 0x12, 0x1a, 0x38, 0x12, 0x22, 0x78, 0x24, 0x08, 0x12, +0x21, 0xf3, 0xe0, 0xfe, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x07, 0x12, 0x21, 0xf3, 0xe0, +0xfd, 0xee, 0xed, 0x12, 0x22, 0x2c, 0x90, 0x00, 0x03, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0xef, 0x12, +0x31, 0xc7, 0x7d, 0x0a, 0xe4, 0xff, 0x12, 0x2f, 0x18, 0x02, 0x10, 0x86, 0x90, 0xfa, 0xe3, 0xe0, +0xb4, 0x03, 0x06, 0x7e, 0x00, 0x7f, 0x40, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x08, 0x90, 0xfa, 0xd7, +0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0xff, 0x7e, 0x00, 0x90, 0xfa, +0xd3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x70, 0x03, 0x7f, 0x08, 0x22, 0x90, 0x00, 0x08, 0x12, 0x1a, +0x98, 0xff, 0x90, 0xfa, 0xd5, 0xe5, 0xf0, 0xf0, 0xa3, 0xef, 0xf0, 0xae, 0x02, 0xaf, 0x01, 0x8e, +0x50, 0x8f, 0x51, 0x74, 0x0a, 0x25, 0x51, 0xf5, 0x51, 0xe4, 0x35, 0x50, 0xf5, 0x50, 0x90, 0xfa, +0xd8, 0xe0, 0xff, 0x14, 0xfe, 0x90, 0xfa, 0xd6, 0xe0, 0x5e, 0xfe, 0xc3, 0xef, 0x9e, 0xff, 0x90, +0xfa, 0xda, 0xf0, 0xc3, 0x90, 0xfa, 0xd4, 0xe0, 0x9f, 0x90, 0xfa, 0xd3, 0xe0, 0x94, 0x00, 0x50, +0x06, 0xa3, 0xe0, 0x90, 0xfa, 0xda, 0xf0, 0x12, 0x1f, 0xfb, 0x60, 0x03, 0xe0, 0xff, 0x22, 0x12, +0x2d, 0x5a, 0x90, 0xfa, 0xd3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x60, 0x2b, 0x90, 0xfa, 0xd7, +0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x40, 0x07, 0xe0, 0x90, 0xfa, 0xda, +0xf0, 0x80, 0x08, 0x90, 0xfa, 0xd4, 0xe0, 0x90, 0xfa, 0xda, 0xf0, 0x12, 0x1f, 0xfb, 0x60, 0x03, +0xe0, 0xff, 0x22, 0x12, 0x2d, 0x5a, 0x80, 0xca, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x52, 0xe4, 0xf5, +0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x7f, 0x00, 0x22, 0xaa, 0x50, 0xa9, 0x51, 0x7b, +0x01, 0x90, 0xfa, 0xd5, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xda, 0xe0, 0xf5, 0x4a, 0x12, +0x28, 0x9f, 0x90, 0xfa, 0xd9, 0xef, 0xf0, 0x22, 0xef, 0x24, 0xae, 0x60, 0x52, 0x24, 0xfe, 0x60, +0x2e, 0x24, 0xfe, 0x70, 0x03, 0x02, 0x20, 0xbb, 0x24, 0x06, 0x60, 0x03, 0x02, 0x21, 0x03, 0x78, +0x71, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xa5, 0xe0, 0xf5, 0x22, 0x44, 0x0f, 0xf0, 0x74, 0x33, +0x90, 0xfa, 0x91, 0xf0, 0xe5, 0x22, 0xa3, 0xf0, 0x90, 0xfa, 0xaf, 0x74, 0x01, 0xf0, 0x22, 0x78, +0x72, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xb5, 0xe0, 0xf5, 0x22, 0x44, 0x0f, 0xf0, 0x74, 0x43, +0x90, 0xfa, 0x93, 0xf0, 0xe5, 0x22, 0xa3, 0xf0, 0x90, 0xfa, 0xb0, 0x74, 0x01, 0xf0, 0x22, 0x90, +0xfa, 0x9d, 0xe0, 0xa3, 0x20, 0xe5, 0x03, 0x02, 0x21, 0x03, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, +0xca, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, +0xa6, 0x12, 0x22, 0x5d, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xca, 0xf0, 0x80, 0xe6, 0x90, 0xfa, +0xcb, 0xe0, 0xff, 0x74, 0x34, 0xfe, 0x12, 0x2c, 0xb4, 0xef, 0x70, 0x57, 0x90, 0xfa, 0xcb, 0xe0, +0xff, 0x74, 0x34, 0x90, 0xfa, 0x95, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0x90, 0xfa, 0xa7, 0xe0, 0xa3, +0x30, 0xe5, 0x40, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xca, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xca, +0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, 0xb6, 0x12, 0x22, 0x5d, 0x90, 0xff, 0xb6, +0xe0, 0x90, 0xfa, 0xca, 0xf0, 0x80, 0xe6, 0x90, 0xfa, 0xcb, 0xe0, 0xff, 0x74, 0x44, 0xfe, 0x12, +0x2c, 0xb4, 0xef, 0x70, 0x0e, 0x90, 0xfa, 0xcb, 0xe0, 0xff, 0x74, 0x44, 0x90, 0xfa, 0x97, 0xf0, +0xef, 0xa3, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, +0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, +0x07, 0x90, 0xff, 0x92, 0xe0, 0xff, 0x90, 0xfa, 0xc9, 0xf0, 0x90, 0xff, 0x92, 0xe4, 0xf0, 0xef, +0x12, 0x1b, 0x4c, 0x21, 0xbb, 0x26, 0x21, 0xbb, 0x2e, 0x21, 0x5e, 0x30, 0x21, 0x5e, 0x32, 0x21, +0x6c, 0x38, 0x21, 0x7e, 0x3a, 0x21, 0xb0, 0x3e, 0x21, 0x9b, 0x44, 0x21, 0x90, 0x46, 0x21, 0xa6, +0x50, 0x21, 0xa6, 0x52, 0x21, 0xa6, 0x54, 0x21, 0xa6, 0x56, 0x00, 0x00, 0x21, 0xc0, 0x90, 0xfa, +0xc9, 0xe0, 0xfd, 0x7c, 0x00, 0x7f, 0x01, 0x12, 0x11, 0x16, 0x80, 0x62, 0x7c, 0x00, 0x7d, 0x01, +0x7f, 0x03, 0x12, 0x11, 0x16, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x50, 0x7c, 0x00, +0x7d, 0x01, 0x7f, 0x02, 0x12, 0x11, 0x16, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x3e, +0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x05, 0x12, 0x11, 0x16, 0x80, 0x33, 0x7c, 0x00, 0x7d, 0x01, 0x7f, +0x06, 0x12, 0x11, 0x16, 0x80, 0x28, 0x90, 0xfa, 0xc9, 0xe0, 0xff, 0x12, 0x20, 0x18, 0x80, 0x1e, +0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x04, 0x12, 0x11, 0x16, 0x80, 0x13, 0x12, 0x27, 0x8d, 0x80, 0x0e, +0x90, 0xfa, 0xc9, 0xe0, 0x24, 0x00, 0xff, 0xe4, 0x34, 0xff, 0xfe, 0x12, 0x2c, 0xb4, 0xd0, 0x07, +0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, +0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0x24, +0x04, 0x8e, 0x83, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x74, 0x12, 0x25, 0x24, 0xf5, +0x82, 0xe4, 0x34, 0xf9, 0xf5, 0x83, 0x22, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, +0x83, 0x22, 0x78, 0x80, 0xe6, 0xfe, 0x08, 0xe6, 0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0x7b, +0xff, 0x7a, 0x31, 0x79, 0x99, 0x7e, 0x00, 0x7f, 0x0a, 0x02, 0x19, 0xcc, 0xff, 0x90, 0xf9, 0x6c, +0x02, 0x1b, 0x3a, 0x90, 0xf9, 0x67, 0x12, 0x1b, 0x3a, 0x90, 0x00, 0x04, 0x02, 0x1a, 0x0b, 0xe6, +0xfc, 0x08, 0xe6, 0xf5, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0x22, 0x78, 0x7e, 0xe6, 0xfe, 0x08, 0xe6, +0xff, 0x22, 0xed, 0x12, 0x1a, 0x4a, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x22, 0xef, 0xf0, 0x90, +0xfa, 0xcb, 0xe0, 0x54, 0x0f, 0x4e, 0xfe, 0xf0, 0xef, 0x54, 0xf0, 0x4e, 0xf0, 0x22, 0x08, 0xe6, +0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x24, 0x09, 0x22, 0x78, 0x7e, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x8c, +0x83, 0x22, 0xa6, 0x07, 0xe6, 0x24, 0x6e, 0xf8, 0xe6, 0x22, 0x78, 0x7e, 0xe6, 0xfa, 0x08, 0xe6, +0xfb, 0x22, 0x26, 0xf6, 0x18, 0xee, 0x36, 0xf6, 0x22, 0x8b, 0x82, 0x8a, 0x83, 0xe5, 0x82, 0x22, +0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0x8d, 0x28, 0x90, 0xfa, 0xcf, 0xe4, 0xf0, 0xa3, 0x74, 0x02, +0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xce, 0x90, 0xfa, 0xcf, 0xe0, 0xf5, 0x2d, 0xa3, 0xe0, 0xf5, +0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xce, 0xe0, 0x65, 0x28, 0x60, 0x46, 0xa3, 0xe0, +0xff, 0xa3, 0xe0, 0xa3, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x12, 0x23, 0x2f, 0x90, 0xfa, 0xce, 0xe0, +0xff, 0x90, 0xfa, 0xd1, 0xe4, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0x12, 0x23, 0x2f, 0x90, 0xfa, 0xd1, +0xe0, 0xff, 0xa3, 0xe0, 0x90, 0xfa, 0xcf, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xfa, 0xce, 0xe0, +0xa3, 0x75, 0xf0, 0x00, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xcf, 0xe4, 0x75, 0xf0, 0x04, 0x12, 0x1a, +0x6c, 0x02, 0x22, 0xb1, 0x90, 0xfa, 0xd0, 0xe0, 0x24, 0x01, 0xff, 0x90, 0xfa, 0xcf, 0xe0, 0x34, +0x00, 0xab, 0x25, 0xaa, 0x26, 0xa9, 0x27, 0x8f, 0xf0, 0x12, 0x1a, 0xd0, 0x7f, 0x00, 0x22, 0x7b, +0x01, 0x7a, 0xfa, 0x79, 0xce, 0x90, 0xfa, 0xcf, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x1a, 0x6c, 0x85, +0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x02, 0x25, 0xd7, 0x8f, 0x62, 0x12, 0x2a, 0x06, 0x12, 0x22, +0x4a, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x21, 0xf3, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x02, 0xf0, 0x08, +0x12, 0x22, 0x3f, 0xe0, 0xa3, 0x30, 0xe5, 0x0c, 0x12, 0x22, 0x56, 0x24, 0x0b, 0x12, 0x21, 0xf3, +0xe0, 0x44, 0x01, 0xf0, 0x78, 0x7c, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, +0x54, 0xb8, 0xfd, 0xf0, 0xe5, 0x62, 0x24, 0xfe, 0x44, 0x20, 0xfc, 0x4d, 0xf0, 0xe5, 0x82, 0x24, +0x04, 0x12, 0x21, 0xf3, 0xe0, 0x54, 0xb8, 0xf0, 0x4c, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0x74, +0x03, 0xf0, 0x18, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x05, 0x12, 0x21, 0xf3, 0xc0, +0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x74, 0x96, 0x25, 0x62, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, +0xe0, 0x54, 0xfc, 0x44, 0x03, 0xfc, 0xed, 0x4c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, +0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x21, 0xf3, 0xe0, 0x44, 0x80, 0xf0, +0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x62, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, 0x00, 0x22, 0x12, +0x10, 0x03, 0x7f, 0x02, 0x12, 0x12, 0x19, 0x78, 0x67, 0xe6, 0x44, 0x02, 0xf6, 0xd2, 0xb0, 0xd2, +0xb1, 0x90, 0xf9, 0x15, 0xe0, 0x30, 0xe7, 0x07, 0x90, 0xff, 0x9e, 0xe4, 0xf0, 0x80, 0x36, 0xd2, +0xb3, 0x90, 0xff, 0xa4, 0xe0, 0x90, 0xfa, 0x7b, 0xf0, 0x90, 0xff, 0xb4, 0xe0, 0x90, 0xfa, 0x7c, +0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x90, 0xfa, 0x79, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x90, 0xfa, 0x7a, +0xf0, 0x90, 0xff, 0xa4, 0x74, 0x30, 0xf0, 0x90, 0xff, 0xb4, 0xf0, 0x90, 0xff, 0xa2, 0x74, 0x40, +0xf0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xfa, 0xe4, 0xe5, 0xa8, 0xf0, 0x75, 0xa8, 0x81, 0x90, 0xff, +0x92, 0xe0, 0x60, 0x04, 0xe4, 0xf0, 0x80, 0xf6, 0x90, 0xff, 0xfd, 0x74, 0x3a, 0xf0, 0x43, 0x87, +0x01, 0x00, 0x00, 0x00, 0x90, 0xfa, 0x7b, 0xe0, 0x90, 0xff, 0xa4, 0xf0, 0x90, 0xfa, 0x7c, 0xe0, +0x90, 0xff, 0xb4, 0xf0, 0x90, 0xfa, 0x79, 0xe0, 0x90, 0xff, 0xa2, 0xf0, 0x90, 0xfa, 0x7a, 0xe0, +0x90, 0xff, 0xb2, 0xf0, 0x90, 0xf9, 0x17, 0xe0, 0x60, 0x02, 0xc2, 0xb3, 0x90, 0xfa, 0xe4, 0xe0, +0xf5, 0xa8, 0x02, 0x10, 0x86, 0x8b, 0x5c, 0x8a, 0x5d, 0x89, 0x5e, 0x12, 0x2d, 0x3c, 0x90, 0xfa, +0xc0, 0x12, 0x1b, 0x43, 0xaa, 0x5d, 0xa9, 0x5e, 0x90, 0xfa, 0xc3, 0x12, 0x1b, 0x43, 0x90, 0xfa, +0xc4, 0xe4, 0x75, 0xf0, 0x0a, 0x12, 0x1a, 0x6c, 0x90, 0xfa, 0xc3, 0x12, 0x1b, 0x3a, 0xe9, 0x24, +0x01, 0xf9, 0xe4, 0x3a, 0xfa, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x43, 0xab, 0x5c, 0xaa, 0x5d, 0xa9, +0x5e, 0x12, 0x2d, 0x48, 0xe0, 0xff, 0xc3, 0x13, 0xf0, 0xe4, 0x78, 0x82, 0xf6, 0x90, 0xfa, 0xbe, +0xe0, 0xff, 0x78, 0x82, 0xe6, 0xc3, 0x9f, 0x50, 0x4a, 0x90, 0xfa, 0xc0, 0x12, 0x2d, 0x1d, 0xff, +0x78, 0x83, 0xf6, 0x90, 0xfa, 0xc3, 0x12, 0x2d, 0x1d, 0xfe, 0xf4, 0x5f, 0xff, 0x78, 0x83, 0xf6, +0x12, 0x2d, 0x1a, 0x5e, 0x4f, 0xff, 0x78, 0x83, 0xf6, 0x12, 0x2d, 0x23, 0x75, 0xf0, 0x02, 0x12, +0x1a, 0x6c, 0x90, 0xfa, 0xc4, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x1a, 0x6c, 0xab, 0x5c, 0xaa, 0x5d, +0xa9, 0x5e, 0x90, 0x00, 0x04, 0x12, 0x1a, 0x0b, 0x30, 0xe4, 0x03, 0x12, 0x2d, 0x32, 0x78, 0x82, +0x06, 0x80, 0xaa, 0xe4, 0x90, 0xfa, 0xbf, 0xf0, 0x22, 0x8b, 0x56, 0x8a, 0x57, 0x89, 0x58, 0x90, +0xfa, 0xbf, 0x74, 0x06, 0xf0, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x12, 0x19, 0xf2, 0x24, 0x6e, 0x60, +0x26, 0x14, 0x70, 0x70, 0x12, 0x2d, 0x09, 0x60, 0x09, 0x24, 0x30, 0x70, 0x12, 0x12, 0x24, 0x95, +0x80, 0x62, 0x12, 0x2d, 0x53, 0x12, 0x1f, 0x2c, 0x90, 0xfa, 0xbf, 0xef, 0xf0, 0x80, 0x55, 0x90, +0xfa, 0xbf, 0x74, 0x81, 0xf0, 0x80, 0x4d, 0x12, 0x2d, 0x09, 0x60, 0x09, 0x24, 0x30, 0x70, 0x3e, +0x12, 0x2c, 0x5f, 0x80, 0x3f, 0xe5, 0x58, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x57, 0xfa, 0x7b, 0x01, +0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0x12, 0x2d, 0x53, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0xfd, +0x90, 0x00, 0x08, 0x12, 0x1a, 0x98, 0xf5, 0x2e, 0x85, 0xf0, 0x2d, 0xd0, 0x01, 0xd0, 0x02, 0xd0, +0x03, 0x12, 0x25, 0xd7, 0x90, 0xfa, 0xbe, 0xef, 0xf0, 0xe4, 0xa3, 0xf0, 0x80, 0x06, 0x90, 0xfa, +0xbf, 0x74, 0x81, 0xf0, 0x90, 0xfa, 0xbf, 0xe0, 0x12, 0x2d, 0x53, 0x90, 0x00, 0x02, 0x12, 0x1a, +0x4a, 0x90, 0xfa, 0xbe, 0xe0, 0xff, 0x22, 0x8b, 0x29, 0x8a, 0x2a, 0x89, 0x2b, 0x8d, 0x2c, 0xe5, +0x2c, 0x70, 0x03, 0xaf, 0x2c, 0x22, 0x12, 0x2d, 0x82, 0x70, 0x16, 0x12, 0x2d, 0xa1, 0xe5, 0x2d, +0x90, 0xff, 0xf1, 0xf0, 0x12, 0x31, 0x1b, 0x50, 0xf2, 0x12, 0x26, 0x64, 0x40, 0x0b, 0x7f, 0x00, +0x22, 0x12, 0x2d, 0xa1, 0x12, 0x26, 0x64, 0x50, 0xf8, 0x90, 0xff, 0xf3, 0x74, 0xa1, 0xf0, 0xe5, +0x2c, 0xb4, 0x01, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0xff, 0xf1, 0xe4, 0xf0, +0xf5, 0x2f, 0xe5, 0x2c, 0x14, 0xff, 0xe5, 0x2f, 0xc3, 0x9f, 0x50, 0x2a, 0x12, 0x31, 0x04, 0x40, +0x03, 0xaf, 0x2f, 0x22, 0xc3, 0xe5, 0x2c, 0x95, 0x2f, 0xff, 0xbf, 0x02, 0x07, 0x90, 0xff, 0xf0, +0xe0, 0x44, 0x02, 0xf0, 0x12, 0x2d, 0x94, 0x05, 0x2f, 0x74, 0x01, 0x25, 0x2b, 0xf5, 0x2b, 0xe4, +0x35, 0x2a, 0xf5, 0x2a, 0x80, 0xcc, 0x12, 0x31, 0x04, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x12, 0x2d, +0x94, 0xaf, 0x2c, 0x22, 0x90, 0xff, 0xf1, 0xe5, 0x2e, 0xf0, 0x02, 0x31, 0x1b, 0x12, 0x10, 0x03, +0x78, 0x84, 0x12, 0x22, 0x82, 0x30, 0xe1, 0x08, 0x7f, 0x13, 0x12, 0x30, 0xec, 0x02, 0x26, 0xfb, +0x78, 0x84, 0xe6, 0xf9, 0x24, 0x12, 0x12, 0x21, 0xff, 0xe0, 0xff, 0x30, 0xe7, 0x40, 0x54, 0x03, +0x60, 0x1e, 0xe9, 0xb4, 0x03, 0x0d, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x44, 0x04, +0xf0, 0x80, 0x46, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x80, 0x39, +0xe9, 0xb4, 0x03, 0x0d, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x80, +0x28, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x1b, 0xef, 0x54, +0x03, 0x60, 0x14, 0xe9, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x07, +0x90, 0xff, 0xb4, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0xb3, 0x90, 0xf9, 0x17, 0xe0, 0x04, 0xf0, 0xaf, +0x01, 0x12, 0x22, 0x33, 0xfd, 0x12, 0x2f, 0x49, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x75, 0xa8, +0x40, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x8b, 0x02, 0x27, 0x48, 0x02, 0x30, 0xcf, +0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, +0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, +0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, +0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x2b, 0x4c, 0xe4, 0x7e, 0x01, 0x93, 0x60, +0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, +0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, +0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, +0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x22, +0x12, 0x1d, 0x12, 0xe0, 0xb4, 0x04, 0x0d, 0xe5, 0x22, 0x24, 0x03, 0xff, 0x12, 0x2f, 0x77, 0x12, +0x1d, 0x12, 0xe4, 0xf0, 0x05, 0x22, 0xe5, 0x22, 0xc3, 0x94, 0x02, 0x40, 0xe3, 0xe4, 0xf5, 0x22, +0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa, 0x91, 0x12, 0x1d, 0x53, 0x60, 0x2c, 0x12, 0x2c, 0xb4, +0xef, 0x60, 0x52, 0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa, 0x91, 0x12, 0x1b, 0x1c, 0xe4, 0xf0, +0xa3, 0xf0, 0x75, 0xf0, 0x0a, 0xe5, 0x22, 0x90, 0xfa, 0x9d, 0x12, 0x1b, 0x1c, 0xe0, 0xa3, 0x30, +0xe6, 0x33, 0x12, 0x1d, 0x12, 0x74, 0x04, 0xf0, 0x22, 0x75, 0xf0, 0x02, 0xe5, 0x22, 0x90, 0xfa, +0x95, 0x12, 0x1d, 0x53, 0x60, 0x16, 0x12, 0x2c, 0xb4, 0xef, 0x60, 0x19, 0x75, 0xf0, 0x02, 0xe5, +0x22, 0x90, 0xfa, 0x95, 0x12, 0x1b, 0x1c, 0xe4, 0xf0, 0xa3, 0xf0, 0x22, 0x05, 0x22, 0xe5, 0x22, +0xc3, 0x94, 0x02, 0x40, 0x9b, 0x22, 0xe4, 0xff, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xfe, 0xef, +0xc3, 0x9e, 0x50, 0x17, 0x74, 0xf0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xe0, 0x12, +0x1c, 0x11, 0x12, 0x1a, 0x38, 0x0f, 0x12, 0x1c, 0x00, 0x80, 0xdd, 0xef, 0xfd, 0xc3, 0xe5, 0x3a, +0x9d, 0xf5, 0x3a, 0xe5, 0x39, 0x94, 0x00, 0xf5, 0x39, 0xd3, 0xe5, 0x3a, 0x94, 0x00, 0xe5, 0x39, +0x94, 0x00, 0x40, 0x06, 0xe4, 0x90, 0xff, 0x83, 0xf0, 0x22, 0x12, 0x1d, 0x2f, 0x12, 0x1d, 0x84, +0x12, 0x1d, 0x76, 0x12, 0x19, 0xf2, 0x24, 0x6e, 0x60, 0x1e, 0x14, 0x60, 0x1b, 0x24, 0x8e, 0x70, +0x2d, 0x90, 0x00, 0x01, 0x12, 0x1a, 0x0b, 0xff, 0x24, 0xfc, 0x60, 0x03, 0x04, 0x70, 0x1f, 0xef, +0xfd, 0x7c, 0x00, 0x7f, 0x0d, 0x02, 0x11, 0x16, 0x12, 0x1d, 0x8b, 0x12, 0x25, 0x39, 0x12, 0x1c, +0xd9, 0x12, 0x1a, 0x0b, 0x60, 0x03, 0x02, 0x31, 0xbd, 0xe4, 0xff, 0x12, 0x31, 0xb1, 0x22, 0x8b, +0x45, 0x8a, 0x46, 0x89, 0x47, 0x8c, 0x48, 0x8d, 0x49, 0xd2, 0x00, 0x12, 0x2d, 0x82, 0x70, 0x16, +0x12, 0x2d, 0xa1, 0xe5, 0x48, 0x90, 0xff, 0xf1, 0xf0, 0x12, 0x31, 0x1b, 0x50, 0xf2, 0x12, 0x29, +0x14, 0x40, 0x0b, 0x7f, 0x18, 0x22, 0x12, 0x2d, 0xa1, 0x12, 0x29, 0x14, 0x50, 0xf8, 0xe4, 0xf5, +0x4b, 0xe5, 0x4a, 0x14, 0xff, 0xe5, 0x4b, 0xc3, 0x9f, 0x50, 0x17, 0x12, 0x29, 0x04, 0x40, 0x03, +0x7f, 0x18, 0x22, 0x05, 0x4b, 0x74, 0x01, 0x25, 0x47, 0xf5, 0x47, 0xe4, 0x35, 0x46, 0xf5, 0x46, +0x80, 0xdf, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x29, 0x04, 0x40, 0x03, 0x7f, 0x18, +0x22, 0x7f, 0x00, 0x22, 0xab, 0x45, 0xaa, 0x46, 0xa9, 0x47, 0x12, 0x19, 0xf2, 0x90, 0xff, 0xf1, +0xf0, 0x02, 0x31, 0x1b, 0x90, 0xff, 0xf1, 0xe5, 0x49, 0xf0, 0x02, 0x31, 0x1b, 0x7b, 0x01, 0x7a, +0xfa, 0x79, 0xcc, 0xe4, 0xfd, 0x12, 0x22, 0xa0, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x09, 0x12, +0x1a, 0x6c, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90, 0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12, +0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x90, 0xff, 0xf7, 0xe5, +0x23, 0x12, 0x29, 0x78, 0x90, 0xff, 0xf6, 0xe5, 0x23, 0xf0, 0x90, 0xfa, 0xcc, 0xe4, 0xf0, 0xa3, +0x74, 0x06, 0x12, 0x29, 0x78, 0xe5, 0x23, 0x30, 0xe0, 0x07, 0x90, 0xff, 0xfc, 0x74, 0x94, 0xf0, +0x22, 0x90, 0xff, 0xfc, 0x74, 0x90, 0xf0, 0x22, 0xf0, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x23, 0x90, +0xfa, 0xcc, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x1a, 0x82, 0x85, 0xf0, 0x2e, 0xf5, 0x2d, 0x7d, 0x01, +0x02, 0x25, 0xd7, 0x90, 0xff, 0x93, 0x74, 0x2a, 0xf0, 0x90, 0xff, 0xff, 0xe0, 0x60, 0x06, 0x90, +0xff, 0xfc, 0x74, 0x10, 0xf0, 0x90, 0xff, 0x91, 0xe0, 0x44, 0x90, 0xf0, 0xe4, 0x90, 0xf9, 0x15, +0xf0, 0xa3, 0xf0, 0x12, 0x2a, 0x78, 0x12, 0x16, 0x42, 0x12, 0x2f, 0xcd, 0x7e, 0x07, 0x7f, 0xd0, +0x12, 0x11, 0xe2, 0x7e, 0x0f, 0x7f, 0xa0, 0x12, 0x11, 0xfc, 0xe4, 0x78, 0x77, 0xf6, 0x78, 0x77, +0xe6, 0xff, 0xc3, 0x94, 0x06, 0x50, 0x0b, 0x74, 0x6e, 0x2f, 0xf8, 0xe4, 0xf6, 0x78, 0x77, 0x06, +0x80, 0xec, 0x7f, 0x03, 0x12, 0x2e, 0xb3, 0x90, 0xf9, 0x15, 0xe0, 0x20, 0xe4, 0x05, 0x7f, 0x04, +0x12, 0x2e, 0xb3, 0x90, 0xff, 0x9b, 0xe4, 0xf0, 0x90, 0xff, 0x9a, 0xf0, 0x90, 0xff, 0xe8, 0xe0, +0x54, 0x1f, 0xf0, 0xd2, 0xa8, 0x22, 0x15, 0x65, 0xa8, 0x65, 0xa6, 0x07, 0x30, 0x08, 0x05, 0x12, +0x11, 0x66, 0x80, 0xf8, 0xd2, 0x08, 0xa8, 0x65, 0xe6, 0xff, 0xb4, 0x03, 0x0f, 0x78, 0x7c, 0x76, +0xff, 0x08, 0x76, 0xe0, 0x08, 0x76, 0xff, 0x08, 0x76, 0xa0, 0x80, 0x0d, 0x78, 0x7c, 0x76, 0xff, +0x08, 0x76, 0xe2, 0x08, 0x76, 0xff, 0x08, 0x76, 0xb0, 0x78, 0x80, 0x76, 0xfa, 0x08, 0x76, 0x9b, +0xef, 0x24, 0xfd, 0x75, 0xf0, 0x0a, 0xa4, 0xae, 0xf0, 0x12, 0x22, 0x92, 0x7b, 0x01, 0x7a, 0xff, +0x79, 0x48, 0x78, 0x68, 0x12, 0x1b, 0x31, 0xa8, 0x65, 0xe6, 0x24, 0xfd, 0x75, 0xf0, 0x08, 0xa4, +0xff, 0xae, 0xf0, 0x78, 0x6a, 0x12, 0x22, 0x92, 0x79, 0x08, 0x78, 0x6b, 0x12, 0x1b, 0x31, 0x78, +0x6d, 0xef, 0x12, 0x22, 0x92, 0x05, 0x65, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xab, 0xf0, 0xe0, +0x44, 0x20, 0xf0, 0x90, 0xfa, 0xe3, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcc, 0xe4, +0xf5, 0x2d, 0xf5, 0x2e, 0x7d, 0x01, 0x12, 0x25, 0xd7, 0x7e, 0x00, 0x90, 0xfa, 0xe1, 0xee, 0xf0, +0xa3, 0xef, 0xf0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcc, 0xe0, 0xb4, 0x52, 0x09, 0x90, 0xf9, +0x15, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x29, 0x90, 0xfa, 0xe1, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, +0x01, 0x70, 0x10, 0x90, 0xfa, 0xcc, 0xe0, 0xb4, 0x10, 0x09, 0x90, 0xf9, 0x15, 0xe0, 0x44, 0x10, +0xf0, 0x80, 0x0d, 0x90, 0xfa, 0xe3, 0x74, 0x03, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x54, 0xef, 0xf0, +0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x12, 0x10, 0x03, 0x78, 0x8a, 0xef, 0xf6, 0x12, +0x2a, 0x06, 0x12, 0x22, 0x33, 0x30, 0xe0, 0x25, 0x12, 0x22, 0x07, 0xe0, 0x54, 0x7f, 0xf0, 0x78, +0x6b, 0x12, 0x1b, 0x28, 0x90, 0x00, 0x02, 0x12, 0x1a, 0x0b, 0x30, 0xe7, 0x09, 0x90, 0x00, 0x02, +0xe4, 0x12, 0x1a, 0x4a, 0x80, 0xe9, 0x12, 0x22, 0x07, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x22, 0x33, +0x30, 0xe1, 0x1e, 0x12, 0x21, 0xe9, 0xe0, 0x54, 0x7f, 0xf0, 0x12, 0x31, 0x5c, 0x78, 0x68, 0x12, +0x1b, 0x28, 0x90, 0x00, 0x02, 0x74, 0x80, 0x12, 0x1a, 0x4a, 0x12, 0x21, 0xe9, 0xe0, 0x44, 0x80, +0xf0, 0x12, 0x31, 0xc7, 0xe4, 0xff, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x03, 0x68, 0x01, 0xff, +0x48, 0x03, 0x6b, 0x01, 0xff, 0x08, 0x02, 0x66, 0x00, 0x00, 0x44, 0xfa, 0x95, 0x00, 0x00, 0x00, +0x00, 0x44, 0xfa, 0x91, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xaf, 0x00, 0x00, 0x42, 0xfa, 0x7b, +0x00, 0x00, 0x42, 0xfa, 0x79, 0x00, 0x00, 0x42, 0xf9, 0x6a, 0xff, 0xff, 0x42, 0xfa, 0x77, 0x00, +0x00, 0x43, 0xf9, 0x18, 0x0a, 0x32, 0x02, 0x41, 0xf9, 0x65, 0x20, 0x41, 0xf9, 0x66, 0x20, 0x41, +0xf9, 0x63, 0x00, 0x41, 0xf9, 0x64, 0x00, 0x44, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xf9, +0x15, 0x00, 0x00, 0x41, 0xf9, 0x17, 0x00, 0x01, 0x20, 0x00, 0x41, 0xf8, 0x04, 0x00, 0x00, 0x12, +0x10, 0x03, 0x78, 0x85, 0xef, 0xf6, 0x12, 0x30, 0x93, 0x12, 0x30, 0xec, 0x78, 0x85, 0xe6, 0xff, +0x24, 0x12, 0x12, 0x21, 0xff, 0xe0, 0xfe, 0x30, 0xe7, 0x16, 0xef, 0xb4, 0x03, 0x09, 0x90, 0xff, +0x9e, 0xe0, 0x54, 0xfa, 0xf0, 0x80, 0x22, 0x90, 0xff, 0x9e, 0xe0, 0x54, 0xf5, 0xf0, 0x80, 0x19, +0xee, 0x54, 0x03, 0x60, 0x14, 0xef, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0, +0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xf9, 0x17, 0xe0, 0x14, 0xf0, 0xe0, +0x70, 0x02, 0xd2, 0xb3, 0x02, 0x10, 0x86, 0x12, 0x1d, 0x6c, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04, +0xe5, 0x39, 0x64, 0x01, 0x60, 0x48, 0xc3, 0xe5, 0x3a, 0x94, 0x08, 0xe5, 0x39, 0x94, 0x00, 0x40, +0x11, 0x7f, 0x08, 0xef, 0xe5, 0x3a, 0x94, 0x08, 0xf5, 0x3a, 0xe5, 0x39, 0x94, 0x00, 0xf5, 0x39, +0x80, 0x05, 0xaf, 0x3a, 0x12, 0x1d, 0x84, 0xe4, 0xfe, 0xee, 0xc3, 0x9f, 0x50, 0x19, 0x12, 0x1c, +0x11, 0x12, 0x19, 0xf2, 0xfd, 0x74, 0xf8, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xed, +0xf0, 0x0e, 0x12, 0x1c, 0x00, 0x80, 0xe2, 0xef, 0x54, 0x7f, 0x90, 0xff, 0x81, 0xf0, 0x22, 0x8b, +0x59, 0x8a, 0x5a, 0x89, 0x5b, 0x12, 0x2d, 0x48, 0x70, 0x05, 0xa3, 0x74, 0x08, 0xf0, 0x22, 0xab, +0x59, 0xaa, 0x5a, 0xa9, 0x5b, 0x12, 0x2d, 0x3c, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x43, 0xe5, 0x5b, +0x24, 0x03, 0xf9, 0xe4, 0x35, 0x5a, 0xfa, 0x90, 0xfa, 0xc0, 0x12, 0x1b, 0x43, 0xe4, 0x90, 0xfa, +0xbf, 0xf0, 0x78, 0x8b, 0xf6, 0x90, 0xfa, 0xbe, 0xe0, 0xff, 0x78, 0x8b, 0xe6, 0xc3, 0x9f, 0x50, +0x12, 0x12, 0x2d, 0x1a, 0xff, 0x12, 0x2d, 0x23, 0x12, 0x2d, 0x36, 0x78, 0x8b, 0x06, 0x12, 0x2d, +0x32, 0x80, 0xe2, 0x22, 0xad, 0x07, 0xac, 0x06, 0x90, 0x31, 0x4d, 0xe4, 0x93, 0xff, 0x78, 0x74, +0xf6, 0x54, 0x0f, 0x12, 0x1c, 0xf8, 0xe0, 0x08, 0x76, 0x00, 0x08, 0xf6, 0x18, 0x12, 0x1c, 0x29, +0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x78, 0x75, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0xee, +0x44, 0xf8, 0x18, 0xf6, 0xef, 0x08, 0xf6, 0x90, 0xff, 0x7a, 0xe0, 0x20, 0xe7, 0x03, 0x7f, 0x00, +0x22, 0x78, 0x75, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, +0x90, 0xff, 0x7a, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0x22, 0xab, 0x56, 0xaa, 0x57, 0xa9, 0x58, 0x90, +0x00, 0x03, 0x12, 0x1a, 0x0b, 0x54, 0xf0, 0x24, 0xa0, 0x22, 0x90, 0xfa, 0xc6, 0x12, 0x1b, 0x3a, +0x02, 0x19, 0xf2, 0x90, 0xfa, 0xc0, 0x12, 0x1b, 0x3a, 0xef, 0x12, 0x1a, 0x38, 0x90, 0xfa, 0xc7, +0xe4, 0x22, 0x90, 0xfa, 0xc1, 0xe4, 0x75, 0xf0, 0x01, 0x02, 0x1a, 0x6c, 0x90, 0x00, 0x08, 0x12, +0x1a, 0x98, 0xaa, 0xf0, 0xf9, 0x7b, 0x01, 0x22, 0x90, 0x00, 0x05, 0x12, 0x1a, 0x0b, 0x90, 0xfa, +0xbe, 0xf0, 0x22, 0xab, 0x56, 0xaa, 0x57, 0xa9, 0x58, 0x22, 0x90, 0xfa, 0xda, 0xe0, 0xff, 0x7e, +0x00, 0xc3, 0x90, 0xfa, 0xd4, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 0xd3, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, +0xd5, 0xee, 0x8f, 0xf0, 0x12, 0x1a, 0x6c, 0xef, 0x25, 0x51, 0xf5, 0x51, 0xee, 0x35, 0x50, 0xf5, +0x50, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0xfa, 0xe3, +0xe0, 0x64, 0x03, 0x22, 0x90, 0xff, 0xf2, 0xe0, 0xab, 0x29, 0xaa, 0x2a, 0xa9, 0x2b, 0x02, 0x1a, +0x38, 0x90, 0xff, 0xf3, 0x74, 0xa0, 0xf0, 0x22, 0x8f, 0x64, 0xed, 0x70, 0x0f, 0xe5, 0x64, 0xb4, +0x03, 0x05, 0x7f, 0x01, 0x02, 0x31, 0x32, 0x7f, 0x02, 0x02, 0x31, 0x32, 0xaf, 0x64, 0x12, 0x2a, +0x06, 0x74, 0x6e, 0x25, 0x64, 0xf8, 0xe6, 0x30, 0xe2, 0x0b, 0xd2, 0x09, 0x12, 0x1c, 0x83, 0xe0, +0x54, 0x7f, 0xf0, 0x80, 0x02, 0xc2, 0x09, 0xe5, 0x64, 0xb4, 0x03, 0x07, 0x7f, 0x81, 0x12, 0x31, +0x32, 0x80, 0x05, 0x7f, 0x82, 0x12, 0x31, 0x32, 0x30, 0x09, 0x07, 0x12, 0x1c, 0x83, 0xe0, 0x44, +0x80, 0xf0, 0x12, 0x31, 0xc7, 0x22, 0x12, 0x10, 0x03, 0x90, 0xff, 0xfd, 0xe0, 0x44, 0x60, 0xf0, +0xd2, 0x01, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0xff, 0x00, 0xe0, 0x30, 0xe7, 0x13, +0x90, 0xff, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x35, 0x80, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x01, +0xf0, 0x80, 0x0d, 0x12, 0x1d, 0x2f, 0x53, 0x35, 0x7f, 0x90, 0xff, 0xfc, 0xe0, 0x54, 0xfe, 0xf0, +0x90, 0xff, 0x81, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x02, 0xb0, 0x12, 0x1d, 0x37, 0x02, 0x10, 0x86, +0x12, 0x10, 0x03, 0x78, 0x89, 0xef, 0xf6, 0xd2, 0x00, 0x12, 0x2a, 0x06, 0x90, 0xf9, 0x67, 0x12, +0x1b, 0x3a, 0xe9, 0x24, 0x03, 0xf9, 0xe4, 0x3a, 0xfa, 0xc0, 0x02, 0x78, 0x80, 0xe6, 0xfe, 0x08, +0xe6, 0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0xd0, 0x02, 0x12, 0x22, 0x25, 0x12, 0x31, 0xc7, +0x78, 0x89, 0xe6, 0xff, 0x12, 0x13, 0x3f, 0x12, 0x30, 0xec, 0x02, 0x10, 0x86, 0x8f, 0x63, 0x12, +0x2a, 0x06, 0x12, 0x22, 0x07, 0xe0, 0x54, 0x3f, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x21, 0xf3, +0xe0, 0x54, 0x3f, 0xf0, 0x08, 0xe6, 0xfe, 0x08, 0xe6, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x21, 0xf3, +0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x63, 0xf8, 0x74, 0xfb, 0x56, 0xf6, +0x7f, 0x00, 0x22, 0x8f, 0x23, 0xc2, 0x08, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x12, 0x78, 0x7e, 0x12, +0x21, 0xeb, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x22, 0x4a, 0x12, 0x21, 0xef, 0xe0, 0x20, 0xe0, 0xf6, +0xef, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x31, 0xc7, +0xaf, 0x23, 0x12, 0x13, 0x3f, 0x22, 0x12, 0x10, 0x03, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x4a, 0x24, +0x06, 0x12, 0x21, 0xf1, 0xe0, 0xfd, 0x12, 0x22, 0x2d, 0x90, 0x00, 0x03, 0x12, 0x22, 0x52, 0x24, +0x05, 0x12, 0x21, 0xf3, 0xe0, 0x90, 0x00, 0x04, 0x12, 0x1a, 0x4a, 0x12, 0x31, 0xc7, 0x7d, 0x02, +0xe4, 0xff, 0x12, 0x2f, 0x18, 0x02, 0x10, 0x86, 0xae, 0x05, 0x12, 0x1c, 0xde, 0xef, 0x12, 0x1a, +0x4a, 0x0e, 0x0e, 0x0e, 0xee, 0xd3, 0x95, 0x3c, 0xe4, 0x95, 0x3b, 0x40, 0x02, 0xae, 0x3c, 0xee, +0xd3, 0x94, 0x08, 0x74, 0x80, 0x94, 0x81, 0x40, 0x0a, 0x7e, 0x03, 0x90, 0x00, 0x02, 0x74, 0x02, +0x12, 0x1a, 0x4a, 0xaf, 0x06, 0x12, 0x31, 0xb1, 0x22, 0xae, 0x07, 0xed, 0x54, 0x03, 0x64, 0x01, +0x60, 0x03, 0x7f, 0x10, 0x22, 0xed, 0x54, 0x7c, 0xc3, 0x94, 0x04, 0x50, 0x03, 0x7f, 0x0b, 0x22, +0x74, 0x6e, 0x2e, 0xf8, 0x74, 0x02, 0x46, 0xf6, 0x74, 0x96, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfa, +0xf5, 0x83, 0xed, 0xf0, 0x7f, 0x00, 0x22, 0xbf, 0x03, 0x06, 0x7c, 0xff, 0x7d, 0xe0, 0x80, 0x04, +0x7c, 0xff, 0x7d, 0xe2, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, +0x12, 0x21, 0xf3, 0xe0, 0x44, 0x80, 0xf0, 0x74, 0x6e, 0x2f, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, +0x00, 0x22, 0x12, 0x10, 0x03, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x39, 0x64, 0x01, 0x60, +0x16, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xff, 0xc3, 0xe5, 0x3a, 0x9f, 0xe5, 0x39, 0x94, 0x00, +0x40, 0x05, 0x12, 0x28, 0x16, 0x80, 0x03, 0x12, 0x31, 0xbd, 0x02, 0x10, 0x86, 0x90, 0xff, 0xfc, +0xe0, 0x20, 0xe7, 0x1f, 0xc2, 0xaf, 0x7d, 0xff, 0xac, 0x05, 0x1d, 0xec, 0x60, 0x15, 0x7e, 0x04, +0x7f, 0x00, 0xef, 0x1f, 0xaa, 0x06, 0x70, 0x01, 0x1e, 0x4a, 0x60, 0xec, 0x90, 0xff, 0x92, 0xe4, +0xf0, 0x80, 0xef, 0x22, 0x12, 0x10, 0x03, 0x78, 0x66, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x30, 0xe0, +0x12, 0x30, 0xe1, 0x0f, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x20, 0xf0, 0x7f, 0x04, 0x12, 0x12, 0x19, +0x12, 0x1d, 0x46, 0x02, 0x10, 0x86, 0x8e, 0x5f, 0x8f, 0x60, 0xe5, 0x60, 0x15, 0x60, 0xae, 0x5f, +0x70, 0x02, 0x15, 0x5f, 0xd3, 0x94, 0x00, 0xee, 0x94, 0x00, 0x40, 0x09, 0x7e, 0x07, 0x7f, 0xd0, +0x12, 0x0f, 0xdc, 0x80, 0xe5, 0x22, 0x11, 0x94, 0x2d, 0xf6, 0x23, 0xef, 0x31, 0xa3, 0x2f, 0xf4, +0x2f, 0xa2, 0x30, 0xb2, 0x2e, 0xe6, 0x26, 0x6d, 0x2b, 0xaf, 0x30, 0x55, 0x30, 0x74, 0x1d, 0xb4, +0x2e, 0x40, 0x2a, 0xe8, 0x0e, 0x12, 0x10, 0x03, 0x78, 0x86, 0x12, 0x22, 0x82, 0x20, 0xe1, 0x07, +0x7f, 0x12, 0x12, 0x30, 0xec, 0x80, 0x0a, 0x78, 0x86, 0xe6, 0xff, 0x12, 0x23, 0x49, 0x12, 0x30, +0xec, 0x02, 0x10, 0x86, 0x12, 0x10, 0x03, 0x78, 0x87, 0x12, 0x22, 0x82, 0x20, 0xe2, 0x07, 0x7f, +0x11, 0x12, 0x30, 0xec, 0x80, 0x0a, 0x78, 0x87, 0xe6, 0xff, 0x12, 0x2e, 0x7d, 0x12, 0x30, 0xec, +0x02, 0x10, 0x86, 0x8f, 0x61, 0x12, 0x2e, 0x7d, 0xaf, 0x61, 0x12, 0x2a, 0x06, 0x12, 0x22, 0x12, +0x12, 0x31, 0xc7, 0x74, 0x6e, 0x25, 0x61, 0xf8, 0x74, 0xfd, 0x56, 0xf6, 0xaf, 0x61, 0x12, 0x13, +0x3f, 0x22, 0x12, 0x10, 0x03, 0xe5, 0x3a, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x39, 0x64, 0x01, 0x60, +0x05, 0x12, 0x2c, 0x07, 0x80, 0x06, 0x12, 0x1d, 0x64, 0x12, 0x1d, 0x6c, 0x02, 0x10, 0x86, 0x12, +0x29, 0x93, 0x12, 0x12, 0xbb, 0x90, 0xf8, 0x04, 0xe0, 0xff, 0x60, 0x05, 0x7d, 0x01, 0x12, 0x12, +0x58, 0x12, 0x29, 0x1d, 0x12, 0x12, 0xf7, 0x12, 0x11, 0x74, 0x80, 0xe3, 0x12, 0x1c, 0xde, 0xef, +0x12, 0x1a, 0x4a, 0xe4, 0xf5, 0x33, 0xf5, 0x34, 0xef, 0x60, 0x03, 0x02, 0x31, 0xbd, 0xe4, 0xff, +0x12, 0x31, 0xb1, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, 0x54, 0xa0, 0x60, 0xf7, 0xef, 0x30, 0xe5, +0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, 0xd3, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, +0x54, 0x28, 0x60, 0xf7, 0xef, 0x30, 0xe5, 0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, +0xd3, 0x22, 0xef, 0x30, 0xe7, 0x08, 0x12, 0x1c, 0x95, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0xef, 0x12, +0x1c, 0xe8, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0x81, 0x01, 0x82, 0x02, 0x83, 0x03, 0x87, 0x40, 0x00, +0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x78, 0x7e, 0x12, 0x22, +0x09, 0xa3, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 0x06, 0x54, 0x7f, 0xf0, 0x44, 0x80, 0xf0, 0x22, 0x85, +0x3b, 0x39, 0x85, 0x3c, 0x3a, 0x90, 0xff, 0x82, 0xe0, 0x54, 0xf7, 0xf0, 0xa3, 0xe0, 0x54, 0x7f, +0xf0, 0x22, 0xe4, 0xfe, 0xee, 0x90, 0x31, 0x47, 0x93, 0xb5, 0x07, 0x02, 0xd3, 0x22, 0x0e, 0xbe, +0x07, 0xf2, 0xc3, 0x22, 0x00, 0x08, 0x18, 0x28, 0x38, 0x01, 0x81, 0x10, 0x0a, 0x02, 0x00, 0x00, +0x00, 0x00, 0x00, 0x12, 0x10, 0x03, 0x7f, 0x02, 0x12, 0x10, 0x92, 0x12, 0x1d, 0x46, 0x02, 0x10, +0x86, 0x75, 0x39, 0x00, 0x8f, 0x3a, 0x12, 0x1c, 0x30, 0x12, 0x2c, 0x07, 0x22, 0x12, 0x1d, 0x6c, +0x12, 0x1d, 0x2f, 0x12, 0x1d, 0x64, 0x22, 0xc2, 0x08, 0x22, }; #undef IMAGE_VERSION_NAME diff -Nru a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h --- a/drivers/usb/serial/io_tables.h 2004-09-06 16:37:53 -07:00 +++ b/drivers/usb/serial/io_tables.h 2004-09-06 16:37:53 -07:00 @@ -14,22 +14,12 @@ #ifndef IO_TABLES_H #define IO_TABLES_H -static struct usb_device_id edgeport_1port_id_table [] = { - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) }, - { } -}; - static struct usb_device_id edgeport_2port_id_table [] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) }, { } }; @@ -41,12 +31,9 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) }, { } }; @@ -54,9 +41,9 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) }, { } }; @@ -69,7 +56,6 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) }, @@ -77,50 +63,17 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_22I) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8R) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8RR) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_412_8) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, id_table_combined); - -static struct usb_serial_device_type edgeport_1port_device = { - .owner = THIS_MODULE, - .name = "Edgeport 1 port adapter", - .short_name = "edgeport_1", - .id_table = edgeport_1port_id_table, - .num_interrupt_in = 1, - .num_bulk_in = 1, - .num_bulk_out = 1, - .num_ports = 1, - .open = edge_open, - .close = edge_close, - .throttle = edge_throttle, - .unthrottle = edge_unthrottle, - .attach = edge_startup, - .shutdown = edge_shutdown, - .ioctl = edge_ioctl, - .set_termios = edge_set_termios, - .tiocmget = edge_tiocmget, - .tiocmset = edge_tiocmset, - .write = edge_write, - .write_room = edge_write_room, - .chars_in_buffer = edge_chars_in_buffer, - .break_ctl = edge_break, -}; static struct usb_serial_device_type edgeport_2port_device = { .owner = THIS_MODULE, diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/usb/serial/io_ti.c 2004-09-06 16:37:55 -07:00 @@ -124,15 +124,11 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) }, { } }; @@ -143,15 +139,11 @@ { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) }, - { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) }, + { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) }, { } }; diff -Nru a/drivers/usb/serial/io_usbvend.h b/drivers/usb/serial/io_usbvend.h --- a/drivers/usb/serial/io_usbvend.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/serial/io_usbvend.h 2004-09-06 16:37:54 -07:00 @@ -18,14 +18,6 @@ #if !defined(_USBVEND_H) #define _USBVEND_H -#ifndef __KERNEL__ -#include "ionprag.h" /* Extra I/O Networks pragmas */ - -#include - -#include "iondef.h" /* Standard I/O Networks definitions */ -#endif - /************************************************************************ * * D e f i n e s / T y p e d e f s @@ -37,6 +29,7 @@ // #define USB_VENDOR_ID_ION 0x1608 // Our VID +#define USB_VENDOR_ID_TI 0x0451 // TI VID // // Definitions of USB product IDs (PID) @@ -48,36 +41,41 @@ // ION-device OEM IDs #define ION_OEM_ID_ION 0 // 00h Inside Out Networks -#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems +#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems #define ION_OEM_ID_GENERIC 2 // 02h Generic OEM #define ION_OEM_ID_MAC 3 // 03h Mac Version #define ION_OEM_ID_MEGAWOLF 4 // 04h Lupusb OEM Mac version (MegaWolf) #define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports +#define ION_OEM_ID_AGILENT 6 // 06h AGILENT board - -// ION-device Device IDs -// Product IDs - assigned to match middle digit of serial number +// ION-device Device IDs +// Product IDs - assigned to match middle digit of serial number (No longer true) -// The ION_DEVICE_ID_GENERATION_2 bit (0x20) will be ORed into the existing edgeport -// PIDs to identify 80251+Netchip hardware. This will guarantee that if a second -// generation edgeport device is plugged into a PC with an older (pre 2.0) driver, -// it will not enumerate. +#define ION_DEVICE_ID_80251_NETCHIP 0x020 // This bit is set in the PID if this edgeport hardware$ + // is based on the 80251+Netchip. -#define ION_DEVICE_ID_GENERATION_2 0x020 // This bit is set in the PID if this edgeport hardware - // is based on the 80251+Netchip. +#define ION_DEVICE_ID_GENERATION_1 0x00 // Value for 930 based edgeports +#define ION_DEVICE_ID_GENERATION_2 0x01 // Value for 80251+Netchip. +#define ION_DEVICE_ID_GENERATION_3 0x02 // Value for Texas Instruments TUSB5052 chip +#define ION_DEVICE_ID_GENERATION_4 0x03 // Watchport Family of products +#define ION_GENERATION_MASK 0x03 + +#define ION_DEVICE_ID_HUB_MASK 0x0080 // This bit in the PID designates a HUB device + // for example 8C would be a 421 4 port hub + // and 8D would be a 2 port embedded hub -#define EDGEPORT_DEVICE_ID_MASK 0x3df // Not including GEN_2 bit +#define EDGEPORT_DEVICE_ID_MASK 0x0ff // Not including OEM or GENERATION fields #define ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE 0x000 // In manufacturing only #define ION_DEVICE_ID_EDGEPORT_4 0x001 // Edgeport/4 RS232 -// ION_DEVICE_ID_HUBPORT_7 0x002 // Hubport/7 (Placeholder, not used by software) +#define ION_DEVICE_ID_EDGEPORT_8R 0x002 // Edgeport with RJ45 no Ring #define ION_DEVICE_ID_RAPIDPORT_4 0x003 // Rapidport/4 #define ION_DEVICE_ID_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport") #define ION_DEVICE_ID_EDGEPORT_2 0x005 // Edgeport/2 RS232 #define ION_DEVICE_ID_EDGEPORT_4I 0x006 // Edgeport/4 RS422 #define ION_DEVICE_ID_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485 -// ION_DEVICE_ID_HUBPORT_4 0x008 // Hubport/4 (Placeholder, not used by software) +#define ION_DEVICE_ID_EDGEPORT_8RR 0x008 // Edgeport with RJ45 with Data and RTS/CTS only // ION_DEVICE_ID_EDGEPORT_8_HANDBUILT 0x009 // Hand-built Edgeport/8 (Placeholder, used in middle digit of serial number only!) // ION_DEVICE_ID_MULTIMODEM_4X56 0x00A // MultiTech version of RP/4 (Placeholder, used in middle digit of serial number only!) #define ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT 0x00B // Edgeport/(4)21 Parallel port (USS720) @@ -90,41 +88,134 @@ #define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s) #define ION_DEVICE_ID_EDGEPORT_COMPATIBLE 0x013 // Edgeport Compatible, for NCR, Axiohm etc. testing #define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU) +#define ION_DEVICE_ID_EDGEPORT_1 0x015 // Edgeport/1 RS232 +#define ION_DEVICE_ID_EPOS44 0x016 // Half of an EPOS/44 (TIUMP BASED) +#define ION_DEVICE_ID_EDGEPORT_42 0x017 // Edgeport/42 +#define ION_DEVICE_ID_EDGEPORT_412_8 0x018 // Edgeport/412 8 port part +#define ION_DEVICE_ID_EDGEPORT_412_4 0x019 // Edgeport/412 4 port part +#define ION_DEVICE_ID_EDGEPORT_22I 0x01A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 + +// Compact Form factor TI based devices 2c, 21c, 22c, 221c +#define ION_DEVICE_ID_EDGEPORT_2C 0x01B // Edgeport/2c is a TI based Edgeport/2 - Small I2c +#define ION_DEVICE_ID_EDGEPORT_221C 0x01C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and + // 2 external hub ports - Large I2C +#define ION_DEVICE_ID_EDGEPORT_22C 0x01D // Edgeport/22c is a TI based Edgeport/2 with + // 2 external hub ports - Large I2C +#define ION_DEVICE_ID_EDGEPORT_21C 0x01E // Edgeport/21c is a TI based Edgeport/2 with lucent chip + // Small I2C + + +/* + * DANGER DANGER The 0x20 bit was used to indicate a 8251/netchip GEN 2 device. + * Since the MAC, Linux, and Optimal drivers still used the old code + * I suggest that you skip the 0x20 bit when creating new PIDs + */ + + +// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C) +#define ION_DEVICE_ID_TI3410_EDGEPORT_1 0x040 // Edgeport/1 RS232 +#define ION_DEVICE_ID_TI3410_EDGEPORT_1I 0x041 // Edgeport/1i- RS422 model + +// Ti based software switchable RS232/RS422/RS485 devices +#define ION_DEVICE_ID_EDGEPORT_4S 0x042 // Edgeport/4s - software switchable model +#define ION_DEVICE_ID_EDGEPORT_8S 0x043 // Edgeport/8s - software switchable model + +// Usb to Ethernet dongle +#define ION_DEVICE_ID_EDGEPORT_E 0x0E0 // Edgeport/E Usb to Ethernet + +// Edgeport TI based devices +#define ION_DEVICE_ID_TI_EDGEPORT_4 0x0201 // Edgeport/4 RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 // Edgeport/2 RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 // Edgeport/4i RS422 +#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 // Edgeport/2i RS422/RS485 +#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C // Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) +#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D // Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) +#define ION_DEVICE_ID_TI_EDGEPORT_8 0x020F // Edgeport/8 (single-CPU) +#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 // Edgeport/1 RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 // Edgeport/42 4 hub 2 RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_22I 0x021A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B // Edgeport/2c RS232 +#define ION_DEVICE_ID_TI_EDGEPORT_221C 0x021C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and + // 2 external hub ports - Large I2C +#define ION_DEVICE_ID_TI_EDGEPORT_22C 0x021D // Edgeport/22c is a TI based Edgeport/2 with + // 2 external hub ports - Large I2C +#define ION_DEVICE_ID_TI_EDGEPORT_21C 0x021E // Edgeport/21c is a TI based Edgeport/2 with lucent chip + +// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C) +#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1 0x240 // Edgeport/1 RS232 +#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I 0x241 // Edgeport/1i- RS422 model + +// Ti based software switchable RS232/RS422/RS485 devices +#define ION_DEVICE_ID_TI_EDGEPORT_4S 0x242 // Edgeport/4s - software switchable model +#define ION_DEVICE_ID_IT_EDGEPORT_8S 0x243 // Edgeport/8s - software switchable model + + +/************************************************************************ + * + * Generation 4 devices + * + ************************************************************************/ + +// Watchport based on 3410 both 1-wire and binary products (16K I2C) +#define ION_DEVICE_ID_WP_UNSERIALIZED 0x300 // Watchport based on 3410 both 1-wire and binary products +#define ION_DEVICE_ID_WP_PROXIMITY 0x301 // Watchport/P Discontinued +#define ION_DEVICE_ID_WP_MOTION 0x302 // Watchport/M +#define ION_DEVICE_ID_WP_MOISTURE 0x303 // Watchport/W +#define ION_DEVICE_ID_WP_TEMPERATURE 0x304 // Watchport/T +#define ION_DEVICE_ID_WP_HUMIDITY 0x305 // Watchport/H + +#define ION_DEVICE_ID_WP_POWER 0x306 // Watchport +#define ION_DEVICE_ID_WP_LIGHT 0x307 // Watchport +#define ION_DEVICE_ID_WP_RADIATION 0x308 // Watchport +#define ION_DEVICE_ID_WP_ACCELERATION 0x309 // Watchport/A +#define ION_DEVICE_ID_WP_DISTANCE 0x30A // Watchport/D Discontinued +#define ION_DEVICE_ID_WP_PROX_DIST 0x30B // Watchport/D uses distance sensor + // Default to /P function + +#define ION_DEVICE_ID_PLUS_PWR_HP4CD 0x30C // 5052 Plus Power HubPort/4CD+ (for Dell) +#define ION_DEVICE_ID_PLUS_PWR_HP4C 0x30D // 5052 Plus Power HubPort/4C+ +#define ION_DEVICE_ID_PLUS_PWR_PCI 0x30E // 3410 Plus Power PCI Host Controller 4 port + + +// +// Definitions for AXIOHM USB product IDs +// +#define USB_VENDOR_ID_AXIOHM 0x05D9 // Axiohm VID + +#define AXIOHM_DEVICE_ID_MASK 0xffff +#define AXIOHM_DEVICE_ID_EPIC_A758 0xA758 +#define AXIOHM_DEVICE_ID_EPIC_A794 0xA794 +#define AXIOHM_DEVICE_ID_EPIC_A225 0xA225 + + +// +// Definitions for NCR USB product IDs +// +#define USB_VENDOR_ID_NCR 0x0404 // NCR VID + +#define NCR_DEVICE_ID_MASK 0xffff +#define NCR_DEVICE_ID_EPIC_0202 0x0202 +#define NCR_DEVICE_ID_EPIC_0203 0x0203 +#define NCR_DEVICE_ID_EPIC_0310 0x0310 +#define NCR_DEVICE_ID_EPIC_0311 0x0311 +#define NCR_DEVICE_ID_EPIC_0312 0x0312 + + +// +// Definitions for SYMBOL USB product IDs +// +#define USB_VENDOR_ID_SYMBOL 0x05E0 // Symbol VID +#define SYMBOL_DEVICE_ID_MASK 0xffff +#define SYMBOL_DEVICE_ID_KEYFOB 0x0700 + + +// +// Definitions for other product IDs #define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device -// BlackBox OEM devices -#define ION_DEVICE_ID_BB_EDGEPORT_4 0x001 // Edgeport/4 RS232 -#define ION_DEVICE_ID_BB_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport") -#define ION_DEVICE_ID_BB_EDGEPORT_2 0x005 // Edgeport/2 RS232 -#define ION_DEVICE_ID_BB_EDGEPORT_4I 0x006 // Edgeport/4 RS422 -#define ION_DEVICE_ID_BB_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485 -#define ION_DEVICE_ID_BB_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel -#define ION_DEVICE_ID_BB_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel -#define ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB) -#define ION_DEVICE_ID_BB_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU) -#define ION_DEVICE_ID_BB_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector -#define ION_DEVICE_ID_BB_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector -#define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s) -#define ION_DEVICE_ID_BB_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU) - - -/* Edgeport TI based devices */ -#define ION_DEVICE_ID_TI_EDGEPORT_4 0x0201 /* Edgeport/4 RS232 */ -#define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 /* Edgeport/2 RS232 */ -#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 /* Edgeport/4i RS422 */ -#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 /* Edgeport/2i RS422/RS485 */ -#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C /* Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) */ -#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D /* Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) */ -#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 /* Edgeport/1 RS232 */ -#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 /* Edgeport/42 4 hub 2 RS232 */ -#define ION_DEVICE_ID_TI_EDGEPORT_22 0x021A /* Edgeport/22 Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 */ -#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B /* Edgeport/2c RS232 */ - -#define ION_DEVICE_ID_TI_EDGEPORT_421_BOOT 0x0240 /* Edgeport/421 in boot mode */ -#define ION_DEVICE_ID_TI_EDGEPORT_421_DOWN 0x0241 /* Edgeport/421 in download mode first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */ -#define ION_DEVICE_ID_TI_EDGEPORT_21_BOOT 0x0242 /* Edgeport/21 in boot mode */ -#define ION_DEVICE_ID_TI_EDGEPORT_21_DOWN 0x0243 /*Edgeport/42 in download mode: first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */ +#define GENERATION_ID_FROM_USB_PRODUCT_ID( ProductId ) \ + ( (__u16) ((ProductId >> 8) & (ION_GENERATION_MASK)) ) #define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \ ( (__u16) (((OemId) << 10) || (DeviceId)) ) @@ -143,7 +234,7 @@ // TxCredits value below which driver won't bother sending (to prevent too many small writes). // Send only if above 25% -#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit) (max(((InitialCredit) / 4), EDGE_FW_BULK_MAX_PACKET_SIZE)) +#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit, MaxPacketSize) (max( ((InitialCredit) / 4), (MaxPacketSize) )) #define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1) #define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads @@ -158,8 +249,8 @@ // Definitions of I/O Networks vendor-specific requests // for default endpoint // -// bmRequestType = 00100000 Set vendor-specific, to device -// bmRequestType = 10100000 Get vendor-specific, to device +// bmRequestType = 01000000 Set vendor-specific, to device +// bmRequestType = 11000000 Get vendor-specific, to device // // These are the definitions for the bRequest field for the // above bmRequestTypes. @@ -184,11 +275,87 @@ #define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature // (wValue != 0: Enable; wValue = 0: Disable) +#define USB_REQUEST_ION_SEND_IOSP 10 // Send an IOSP command to the edgeport over the control pipe +#define USB_REQUEST_ION_RECV_IOSP 11 // Receive an IOSP command from the edgeport over the control pipe + + +#define USB_REQUEST_ION_DIS_INT_TIMER 0x80 // Sent to Axiohm to enable/ disable + // interrupt token timer + // wValue = 1, enable (default) + // wValue = 0, disable // // Define parameter values for our vendor-specific commands // +// +// Edgeport Compatiblity Descriptor +// +// This descriptor is only returned by Edgeport-compatible devices +// supporting the EPiC spec. True ION devices do not return this +// descriptor, but instead return STALL on receipt of the +// GET_EPIC_DESC command. The driver interprets a STALL to mean that +// this is a "real" Edgeport. +// + +struct edge_compatibility_bits +{ + // This __u32 defines which Vendor-specific commands/functionality + // the device supports on the default EP0 pipe. + + __u32 VendEnableSuspend : 1; // 0001 Set if device supports ION_ENABLE_SUSPEND + __u32 VendUnused : 31; // Available for future expansion, must be 0 + + // This __u32 defines which IOSP commands are supported over the + // bulk pipe EP1. + + // xxxx Set if device supports: + __u32 IOSPOpen : 1; // 0001 OPEN / OPEN_RSP (Currently must be 1) + __u32 IOSPClose : 1; // 0002 CLOSE + __u32 IOSPChase : 1; // 0004 CHASE / CHASE_RSP + __u32 IOSPSetRxFlow : 1; // 0008 SET_RX_FLOW + __u32 IOSPSetTxFlow : 1; // 0010 SET_TX_FLOW + __u32 IOSPSetXChar : 1; // 0020 SET_XON_CHAR/SET_XOFF_CHAR + __u32 IOSPRxCheck : 1; // 0040 RX_CHECK_REQ/RX_CHECK_RSP + __u32 IOSPSetClrBreak : 1; // 0080 SET_BREAK/CLEAR_BREAK + __u32 IOSPWriteMCR : 1; // 0100 MCR register writes (set/clr DTR/RTS) + __u32 IOSPWriteLCR : 1; // 0200 LCR register writes (wordlen/stop/parity) + __u32 IOSPSetBaudRate : 1; // 0400 setting Baud rate (writes to LCR.80h and DLL/DLM register) + __u32 IOSPDisableIntPipe : 1; // 0800 Do not use the interrupt pipe for TxCredits or RxButesAvailable + __u32 IOSPRxDataAvail : 1; // 1000 Return status of RX Fifo (Data available in Fifo) + __u32 IOSPTxPurge : 1; // 2000 Purge TXBuffer and/or Fifo in Edgeport hardware + __u32 IOSPUnused : 18; // Available for future expansion, must be 0 + + // This __u32 defines which 'general' features are supported + + __u32 TrueEdgeport : 1; // 0001 Set if device is a 'real' Edgeport + // (Used only by driver, NEVER set by an EPiC device) + __u32 GenUnused : 31; // Available for future expansion, must be 0 + +}; + +struct edge_compatibility_descriptor +{ + __u8 Length; // Descriptor Length (per USB spec) + __u8 DescType; // Descriptor Type (per USB spec, =DEVICE type) + __u8 EpicVer; // Version of EPiC spec supported + // (Currently must be 1) + __u8 NumPorts; // Number of serial ports supported + __u8 iDownloadFile; // Index of string containing download code filename + // 0=no download, FF=download compiled into driver. + __u8 Unused[ 3 ]; // Available for future expansion, must be 0 + // (Currently must be 0). + __u8 MajorVersion; // Firmware version: xx. + __u8 MinorVersion; // yy. + __u16 BuildNumber; // zzzz (LE format) + + // The following structure contains __u32s, with each bit + // specifying whether the EPiC device supports the given + // command or functionality. + + struct edge_compatibility_bits Supports; + +}; // Values for iDownloadFile #define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested @@ -272,7 +439,7 @@ __u8 NumPorts; // F08 Number of ports __u8 DescDate[3]; // F09 MM/DD/YY when descriptor template was compiler, - // so host can track changes to USB-only descriptors. + // so host can track changes to USB-only descriptors. __u8 SerNumLength; // F0C USB string descriptor len __u8 SerNumDescType; // F0D USB descriptor type (=STRING type) @@ -294,8 +461,8 @@ __u8 UartType; // FBD Uart Type __u8 IonPid; // FBE Product ID, == LSB of USB DevDesc.PID - // (Note: Edgeport/4s before 11/98 will have - // 00 here instead of 01) + // (Note: Edgeport/4s before 11/98 will have + // 00 here instead of 01) __u8 IonConfig; // FBF Config byte for ION manufacturing use // FBF end of structure, total len = 3C0h @@ -312,7 +479,7 @@ // both 00 and 01 values mean '654. #define MANUF_UART_EXAR_654_EARLY 0 // Exar 16C654 in Edgeport/4s before 11/98 #define MANUF_UART_EXAR_654 1 // Exar 16C654 -#define MANUF_UART_EXAR_2852 2 // Exar 16C2852 +#define MANUF_UART_EXAR_2852 2 // Exar 16C2852 // // Note: The CpuRev and BoardRev values do not conform to manufacturing @@ -334,25 +501,22 @@ #define MANUF_BOARD_REV_GENERATION_2 0x20 // Second generaiton edgeport - - // Values of bottom 5 bits of CpuRev & BoardRev for // Implementation 1 (ie, 251+Netchip-based) #define MANUF_CPU_REV_1 1 // C251TB Rev 1 (Need actual Intel rev here) #define MANUF_BOARD_REV_A 1 // First rev of 251+Netchip design - - #define MANUF_SERNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->SerialNumber) #define MANUF_ASSYNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->AssemblyNumber) #define MANUF_OEMASSYNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->OemAssyNumber) #define MANUF_MANUFDATE_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->ManufDate) -#define MANUF_ION_CONFIG_MASTER 0x80 // 1=Master mode, 0=Normal -#define MANUF_ION_CONFIG_DIAG 0x40 // 1=Run h/w diags, 0=norm -#define MANUF_ION_CONFIG_DIAG_NO_LOOP 0x20 // As above but no ext loopback test - +#define MANUF_ION_CONFIG_DIAG_NO_LOOP 0x20 // As below but no ext loopback test +#define MANUF_ION_CONFIG_DIAG 0x40 // 930 based device: 1=Run h/w diags, 0=norm + // TIUMP Device : 1=IONSERIAL needs to run Final Test +#define MANUF_ION_CONFIG_MASTER 0x80 // 930 based device: 1=Master mode, 0=Normal + // TIUMP Device : 1=First device on a multi TIUMP Device // // This structure describes parameters for the boot code, and @@ -398,23 +562,29 @@ #define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE - /************************************************************************ T I U M P D E F I N I T I O N S ***********************************************************************/ +// Chip definitions in I2C +#define UMP5152 0x52 +#define UMP3410 0x10 + + //************************************************************************ // TI I2C Format Definitions //************************************************************************ -#define I2C_DESC_TYPE_INFO_BASIC 1 -#define I2C_DESC_TYPE_FIRMWARE_BASIC 2 -#define I2C_DESC_TYPE_DEVICE 3 -#define I2C_DESC_TYPE_CONFIG 4 -#define I2C_DESC_TYPE_STRING 5 -#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2 +#define I2C_DESC_TYPE_INFO_BASIC 0x01 +#define I2C_DESC_TYPE_FIRMWARE_BASIC 0x02 +#define I2C_DESC_TYPE_DEVICE 0x03 +#define I2C_DESC_TYPE_CONFIG 0x04 +#define I2C_DESC_TYPE_STRING 0x05 +#define I2C_DESC_TYPE_FIRMWARE_AUTO 0x07 // for 3410 download +#define I2C_DESC_TYPE_CONFIG_KLUDGE 0x14 // for 3410 +#define I2C_DESC_TYPE_WATCHPORT_VERSION 0x15 // firmware version number for watchport +#define I2C_DESC_TYPE_WATCHPORT_CALIBRATION_DATA 0x16 // Watchport Calibration Data -#define I2C_DESC_TYPE_MAX 5 -// 3410 may define types 6, 7 for other firmware downloads +#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2 // Special section defined by ION #define I2C_DESC_TYPE_ION 0 // Not defined by TI @@ -428,7 +598,9 @@ __u8 Data[0]; // Data starts here }__attribute__((packed)); -struct ti_i2c_firmware_rec +// for 5152 devices only (type 2 record) +// for 3410 the version is stored in the WATCHPORT_FIRMWARE_VERSION descriptor +struct ti_i2c_firmware_rec { __u8 Ver_Major; // Firmware Major version number __u8 Ver_Minor; // Firmware Minor version number @@ -436,6 +608,14 @@ }__attribute__((packed)); +struct watchport_firmware_version +{ +// Added 2 bytes for version number + __u8 Version_Major; // Download Version (for Watchport) + __u8 Version_Minor; +}__attribute__((packed)); + + // Structure of header of download image in fw_down.h struct ti_i2c_image_header { @@ -461,6 +641,15 @@ } __attribute__((packed)); +// CPU / Board Rev Definitions +#define TI_CPU_REV_5052 2 // 5052 based edgeports +#define TI_CPU_REV_3410 3 // 3410 based edgeports + +#define TI_BOARD_REV_TI_EP 0 // Basic ti based edgeport +#define TI_BOARD_REV_COMPACT 1 // Compact board +#define TI_BOARD_REV_WATCHPORT 2 // Watchport + + #define TI_GET_CPU_REVISION(x) (__u8)((((x)>>4)&0x0f)) #define TI_GET_BOARD_REVISION(x) (__u8)(((x)&0x0f)) @@ -469,20 +658,30 @@ #define TI_MAX_I2C_SIZE ( 16 * 1024 ) -/* TI USB 5052 definitions */ +#define TI_MANUF_VERSION_0 0 + +// IonConig2 flags +#define TI_CONFIG2_RS232 0x01 +#define TI_CONFIG2_RS422 0x02 +#define TI_CONFIG2_RS485 0x04 +#define TI_CONFIG2_SWITCHABLE 0x08 + +#define TI_CONFIG2_WATCHPORT 0x10 + + struct edge_ti_manuf_descriptor { __u8 IonConfig; // Config byte for ION manufacturing use __u8 IonConfig2; // Expansion - __u8 Version; // Verqsion + __u8 Version; // Version __u8 CpuRev_BoardRev; // CPU revision level (0xF0) and Board Rev Level (0x0F) __u8 NumPorts; // Number of ports for this UMP __u8 NumVirtualPorts; // Number of Virtual ports __u8 HubConfig1; // Used to configure the Hub __u8 HubConfig2; // Used to configure the Hub __u8 TotalPorts; // Total Number of Com Ports for the entire device (All UMPs) - __u8 Reserved; + __u8 Reserved; // Reserved }__attribute__((packed)); -#endif // if !defined() +#endif // if !defined(_USBVEND_H) diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2004-09-06 16:37:56 -07:00 +++ b/drivers/usb/serial/usb-serial.c 2004-09-06 16:37:56 -07:00 @@ -421,6 +421,63 @@ return; } +static void destroy_serial(struct kref *kref) +{ + struct usb_serial *serial; + struct usb_serial_port *port; + int i; + + serial = to_usb_serial(kref); + + dbg ("%s - %s", __FUNCTION__, serial->type->name); + + serial->type->shutdown(serial); + + /* return the minor range that this device had */ + return_serial(serial); + + for (i = 0; i < serial->num_ports; ++i) + serial->port[i]->open_count = 0; + + /* the ports are cleaned up and released in port_release() */ + for (i = 0; i < serial->num_ports; ++i) + if (serial->port[i]->dev.parent != NULL) { + device_unregister(&serial->port[i]->dev); + serial->port[i] = NULL; + } + + /* If this is a "fake" port, we have to clean it up here, as it will + * not get cleaned up in port_release() as it was never registered with + * the driver core */ + if (serial->num_ports < serial->num_port_pointers) { + for (i = serial->num_ports; i < serial->num_port_pointers; ++i) { + port = serial->port[i]; + if (!port) + continue; + if (port->read_urb) { + usb_unlink_urb(port->read_urb); + usb_free_urb(port->read_urb); + } + if (port->write_urb) { + usb_unlink_urb(port->write_urb); + usb_free_urb(port->write_urb); + } + if (port->interrupt_in_urb) { + usb_unlink_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); + } + kfree(port->bulk_in_buffer); + kfree(port->bulk_out_buffer); + kfree(port->interrupt_in_buffer); + } + } + + usb_put_dev(serial->dev); + + /* free up any memory that we allocated */ + kfree (serial); +} + /***************************************************************************** * Driver tty interface functions *****************************************************************************/ @@ -465,7 +522,7 @@ if (retval) { port->open_count = 0; module_put(serial->type->owner); - kref_put(&serial->kref); + kref_put(&serial->kref, destroy_serial); } } bailout: @@ -496,7 +553,7 @@ } module_put(port->serial->type->owner); - kref_put(&port->serial->kref); + kref_put(&port->serial->kref, destroy_serial); } static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count) @@ -654,13 +711,6 @@ ; } -static void serial_shutdown (struct usb_serial *serial) -{ - dbg ("%s", __FUNCTION__); - - serial->type->shutdown(serial); -} - static int serial_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data) { struct usb_serial *serial; @@ -694,7 +744,7 @@ begin += length; length = 0; } - kref_put(&serial->kref); + kref_put(&serial->kref, destroy_serial); } *eof = 1; done: @@ -763,62 +813,6 @@ wake_up_interruptible(&tty->write_wait); } -static void destroy_serial(struct kref *kref) -{ - struct usb_serial *serial; - struct usb_serial_port *port; - int i; - - serial = to_usb_serial(kref); - - dbg ("%s - %s", __FUNCTION__, serial->type->name); - serial_shutdown (serial); - - /* return the minor range that this device had */ - return_serial(serial); - - for (i = 0; i < serial->num_ports; ++i) - serial->port[i]->open_count = 0; - - /* the ports are cleaned up and released in port_release() */ - for (i = 0; i < serial->num_ports; ++i) - if (serial->port[i]->dev.parent != NULL) { - device_unregister(&serial->port[i]->dev); - serial->port[i] = NULL; - } - - /* If this is a "fake" port, we have to clean it up here, as it will - * not get cleaned up in port_release() as it was never registered with - * the driver core */ - if (serial->num_ports < serial->num_port_pointers) { - for (i = serial->num_ports; i < serial->num_port_pointers; ++i) { - port = serial->port[i]; - if (!port) - continue; - if (port->read_urb) { - usb_unlink_urb(port->read_urb); - usb_free_urb(port->read_urb); - } - if (port->write_urb) { - usb_unlink_urb(port->write_urb); - usb_free_urb(port->write_urb); - } - if (port->interrupt_in_urb) { - usb_unlink_urb(port->interrupt_in_urb); - usb_free_urb(port->interrupt_in_urb); - } - kfree(port->bulk_in_buffer); - kfree(port->bulk_out_buffer); - kfree(port->interrupt_in_buffer); - } - } - - usb_put_dev(serial->dev); - - /* free up any memory that we allocated */ - kfree (serial); -} - static void port_release(struct device *dev) { struct usb_serial_port *port = to_usb_serial_port(dev); @@ -859,7 +853,7 @@ serial->interface = interface; serial->vendor = dev->descriptor.idVendor; serial->product = dev->descriptor.idProduct; - kref_init(&serial->kref, destroy_serial); + kref_init(&serial->kref); return serial; } @@ -1209,7 +1203,7 @@ if (serial) { /* let the last holder of this object * cause it to be cleaned up */ - kref_put(&serial->kref); + kref_put(&serial->kref, destroy_serial); } dev_info(dev, "device disconnected\n"); } diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c 2004-09-06 16:37:52 -07:00 +++ b/drivers/usb/storage/transport.c 2004-09-06 16:37:52 -07:00 @@ -911,6 +911,7 @@ int result; /* issue the command */ + us->iobuf[0] = 0; result = usb_stor_control_msg(us, us->recv_ctrl_pipe, US_BULK_GET_MAX_LUN, USB_DIR_IN | USB_TYPE_CLASS | @@ -921,7 +922,7 @@ result, us->iobuf[0]); /* if we have a successful request, return the result */ - if (result == 1) + if (result >= 0) return us->iobuf[0]; /* diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h --- a/drivers/usb/storage/unusual_devs.h 2004-09-06 16:37:54 -07:00 +++ b/drivers/usb/storage/unusual_devs.h 2004-09-06 16:37:54 -07:00 @@ -490,6 +490,13 @@ US_FL_SINGLE_LUN ), #endif +/* Reported by Darsen Lu */ +UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, + "SigmaTel", + "USBMSC Audio Player", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY ), + /* Submitted by Benny Sjostrand */ UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001, "Minolta", diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile --- a/drivers/video/Makefile 2004-09-06 16:37:51 -07:00 +++ b/drivers/video/Makefile 2004-09-06 16:37:51 -07:00 @@ -35,6 +35,9 @@ obj-$(CONFIG_FB_GBE) += gbefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_SGIVW) += sgivwfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_3DFX) += tdfxfb.o cfbimgblt.o +ifneq ($(CONFIG_FB_3DFX_ACCEL),y) +obj-$(CONFIG_FB_3DFX) += cfbfillrect.o cfbcopyarea.o +endif obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o diff -Nru a/drivers/video/bw2.c b/drivers/video/bw2.c --- a/drivers/video/bw2.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/video/bw2.c 2004-09-06 16:37:53 -07:00 @@ -338,7 +338,7 @@ } #endif all->info.var.red.length = all->info.var.green.length = - all->info.var.blue.length = all_info.var.bits_per_pixel; + all->info.var.blue.length = all->info.var.bits_per_pixel; all->info.var.red.offset = all->info.var.green.offset = all->info.var.blue.offset = 0; diff -Nru a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig --- a/drivers/video/console/Kconfig 2004-09-06 16:37:51 -07:00 +++ b/drivers/video/console/Kconfig 2004-09-06 16:37:51 -07:00 @@ -43,7 +43,7 @@ about the Video mode selection support. If unsure, say N. config MDA_CONSOLE - depends on !M68K + depends on !M68K && ISA tristate "MDA text console (dual-headed) (EXPERIMENTAL)" ---help--- Say Y here if you have an old MDA or monochrome Hercules graphics diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c 2004-09-06 16:37:49 -07:00 +++ b/drivers/video/fbmem.c 2004-09-06 16:37:49 -07:00 @@ -878,6 +878,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; + u32 *buffer, *dst, *src; + int c, i, cnt = 0, err = 0; if (!info || ! info->screen_base) return -ENODEV; @@ -894,18 +896,45 @@ count = info->fix.smem_len; if (count + p > info->fix.smem_len) count = info->fix.smem_len - p; + + cnt = 0; + buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count, + GFP_KERNEL); + if (!buffer) + return -ENOMEM; + + src = (u32 *) (info->screen_base + p); + if (info->fbops->fb_sync) info->fbops->fb_sync(info); - if (count) { - char *base_addr; - base_addr = info->screen_base; - count -= copy_to_user(buf, base_addr+p, count); - if (!count) - return -EFAULT; - *ppos += count; + while (count) { + c = (count > PAGE_SIZE) ? PAGE_SIZE : count; + dst = buffer; + for (i = c >> 2; i--; ) + *dst++ = fb_readl(src++); + if (c & 3) { + u8 *dst8 = (u8 *) dst; + u8 *src8 = (u8 *) src; + + for (i = c & 3; i--;) + *dst8++ = fb_readb(src8++); + + src = (u32 *) src8; + } + + if (copy_to_user(buf, buffer, c)) { + err = -EFAULT; + break; + } + *ppos += c; + buf += c; + cnt += c; + count -= c; } - return count; + + kfree(buffer); + return (err) ? err : cnt; } static ssize_t @@ -915,7 +944,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; - int err; + u32 *buffer, *dst, *src; + int c, i, cnt = 0, err; if (!info || !info->screen_base) return -ENODEV; @@ -935,19 +965,43 @@ count = info->fix.smem_len - p; err = -ENOSPC; } + cnt = 0; + buffer = kmalloc((count > PAGE_SIZE) ? PAGE_SIZE : count, + GFP_KERNEL); + if (!buffer) + return -ENOMEM; + + dst = (u32 *) (info->screen_base + p); + if (info->fbops->fb_sync) info->fbops->fb_sync(info); - if (count) { - char *base_addr; - base_addr = info->screen_base; - count -= copy_from_user(base_addr+p, buf, count); - *ppos += count; - err = -EFAULT; + while (count) { + c = (count > PAGE_SIZE) ? PAGE_SIZE : count; + src = buffer; + if (copy_from_user(src, buf, c)) { + err = -EFAULT; + break; + } + for (i = c >> 2; i--; ) + fb_writel(*src++, dst++); + if (c & 3) { + u8 *src8 = (u8 *) src; + u8 *dst8 = (u8 *) dst; + + for (i = c & 3; i--; ) + fb_writeb(*src8++, dst8++); + + dst = (u32 *) dst8; + } + *ppos += c; + buf += c; + cnt += c; + count -= c; } - if (count) - return count; - return err; + kfree(buffer); + + return (err) ? err : cnt; } #ifdef CONFIG_KMOD @@ -974,7 +1028,7 @@ { struct fb_cursor_user cursor_user; struct fb_cursor cursor; - char *data = NULL, *mask = NULL; + char *data = NULL, *mask = NULL, *info_mask = NULL; u16 *red = NULL, *green = NULL, *blue = NULL, *transp = NULL; int err = -EINVAL; @@ -982,12 +1036,12 @@ return -EFAULT; memcpy(&cursor, &cursor_user, sizeof(cursor_user)); - cursor.mask = NULL; - cursor.image.data = NULL; - cursor.image.cmap.red = NULL; - cursor.image.cmap.green = NULL; - cursor.image.cmap.blue = NULL; - cursor.image.cmap.transp = NULL; + cursor.mask = info->cursor.mask; + cursor.image.data = info->cursor.image.data; + cursor.image.cmap.red = info->cursor.image.cmap.red; + cursor.image.cmap.green = info->cursor.image.cmap.green; + cursor.image.cmap.blue = info->cursor.image.cmap.blue; + cursor.image.cmap.transp = info->cursor.image.cmap.transp; cursor.data = NULL; if (cursor.set & FB_CUR_SETCUR) @@ -1047,6 +1101,8 @@ cursor.image.data = data; cursor.mask = mask; + info_mask = (char *) info->cursor.mask; + info->cursor.mask = mask; } info->cursor.set = cursor.set; info->cursor.rop = cursor.rop; @@ -1058,6 +1114,8 @@ kfree(green); kfree(blue); kfree(transp); + if (info_mask) + info->cursor.mask = info_mask; return err; } diff -Nru a/drivers/video/ffb.c b/drivers/video/ffb.c --- a/drivers/video/ffb.c 2004-09-06 16:37:55 -07:00 +++ b/drivers/video/ffb.c 2004-09-06 16:37:55 -07:00 @@ -362,61 +362,6 @@ struct list_head list; }; -#undef FFB_DO_DEBUG_LOG - -#ifdef FFB_DO_DEBUG_LOG -#define FFB_DEBUG_LOG_ENTS 32 -static struct ffb_log { - int op; -#define OP_FILLRECT 1 -#define OP_IMAGEBLIT 2 - - int depth, x, y, w, h; -} ffb_debug_log[FFB_DEBUG_LOG_ENTS]; -static int ffb_debug_log_ent; - -static void ffb_do_log(unsigned long unused) -{ - int i; - - for (i = 0; i < FFB_DEBUG_LOG_ENTS; i++) { - struct ffb_log *p = &ffb_debug_log[i]; - - printk("FFB_LOG: OP[%s] depth(%d) x(%d) y(%d) w(%d) h(%d)\n", - (p->op == OP_FILLRECT ? "FILLRECT" : "IMAGEBLIT"), - p->depth, p->x, p->y, p->w, p->h); - } -} -static struct timer_list ffb_log_timer = - TIMER_INITIALIZER(ffb_do_log, 0, 0); - -static void ffb_log(int op, int depth, int x, int y, int w, int h) -{ - if (ffb_debug_log_ent < FFB_DEBUG_LOG_ENTS) { - struct ffb_log *p = &ffb_debug_log[ffb_debug_log_ent]; - - if (ffb_debug_log_ent != 0 && - p[-1].op == op && p[-1].depth == depth) - return; - p->op = op; - p->depth = depth; - p->x = x; - p->y = y; - p->w = w; - p->h = h; - - if (++ffb_debug_log_ent == FFB_DEBUG_LOG_ENTS) { - ffb_log_timer.expires = jiffies + 2; - add_timer(&ffb_log_timer); - } - } -} -#else -#define ffb_log(a,b,c,d,e,f) do { } while(0) -#endif - -#undef FORCE_WAIT_EVERY_ROP - static void FFBFifo(struct ffb_par *par, int n) { struct ffb_fbc *fbc; @@ -479,7 +424,7 @@ upa_writel(0x2000707f, &fbc->fbc); upa_writel(par->rop_cache, &fbc->rop); upa_writel(0xffffffff, &fbc->pmask); - upa_writel((0 << 16) | (32 << 0), &fbc->fontinc); + upa_writel((1 << 16) | (0 << 0), &fbc->fontinc); upa_writel(par->fg_cache, &fbc->fg); upa_writel(par->bg_cache, &fbc->bg); FFBWait(par); @@ -526,8 +471,6 @@ if (rect->rop != ROP_COPY && rect->rop != ROP_XOR) BUG(); - ffb_log(OP_FILLRECT, 0, rect->dx, rect->dy, rect->width, rect->height); - fg = ((u32 *)info->pseudo_palette)[rect->color]; spin_lock_irqsave(&par->lock, flags); @@ -548,9 +491,6 @@ upa_writel(rect->dx, &fbc->bx); upa_writel(rect->height, &fbc->bh); upa_writel(rect->width, &fbc->bw); -#ifdef FORCE_WAIT_EVERY_ROP - FFBWait(par); -#endif spin_unlock_irqrestore(&par->lock, flags); } @@ -572,7 +512,7 @@ unsigned long flags; if (area->dx != area->sx || - area->dy == area->dy) { + area->dy == area->sy) { cfb_copyarea(info, area); return; } @@ -609,10 +549,7 @@ unsigned long flags; u32 fg, bg, xy; u64 fgbg; - int i, width; - - ffb_log(OP_IMAGEBLIT, image->depth, - image->dx, image->dy, image->width, image->height); + int i, width, stride; if (image->depth > 1) { cfb_imageblit(info, image); @@ -623,6 +560,8 @@ bg = ((u32 *)info->pseudo_palette)[image->bg_color]; fgbg = ((u64) fg << 32) | (u64) bg; xy = (image->dy << 16) | image->dx; + width = image->width; + stride = ((width + 7) >> 3); spin_lock_irqsave(&par->lock, flags); @@ -632,55 +571,49 @@ *(u64 *)&par->fg_cache = fgbg; } - ffb_rop(par, FFB_ROP_NEW); + if (width >= 32) { + FFBFifo(par, 1); + upa_writel(32, &fbc->fontw); + } - for (i = 0; i < image->height; i++) { - width = image->width; + while (width >= 32) { + const u8 *next_data = data + 4; FFBFifo(par, 1); upa_writel(xy, &fbc->fontxy); - xy += (1 << 16); - - while (width >= 32) { - u32 val; - - FFBFifo(par, 2); - upa_writel(32, &fbc->fontw); + xy += (32 << 0); - val = ((u32)data[0] << 24) | - ((u32)data[1] << 16) | - ((u32)data[2] << 8) | - ((u32)data[3] << 0); + for (i = 0; i < image->height; i++) { + u32 val = (((u32)data[0] << 24) | + ((u32)data[1] << 16) | + ((u32)data[2] << 8) | + ((u32)data[3] << 0)); + FFBFifo(par, 1); upa_writel(val, &fbc->font); - data += 4; - width -= 32; + data += stride; } - if (width) { - u32 val; + data = next_data; + width -= 32; + } + + if (width) { + FFBFifo(par, 2); + upa_writel(width, &fbc->fontw); + upa_writel(xy, &fbc->fontxy); - FFBFifo(par, 2); - upa_writel(width, &fbc->fontw); - if (width <= 8) { - val = (u32) data[0] << 24; - data += 1; - } else if (width <= 16) { - val = ((u32) data[0] << 24) | - ((u32) data[1] << 16); - data += 2; - } else { - val = ((u32) data[0] << 24) | - ((u32) data[1] << 16) | - ((u32) data[2] << 8); - data += 3; - } + for (i = 0; i < image->height; i++) { + u32 val = (((u32)data[0] << 24) | + ((u32)data[1] << 16) | + ((u32)data[2] << 8) | + ((u32)data[3] << 0)); + FFBFifo(par, 1); upa_writel(val, &fbc->font); + + data += stride; } } -#ifdef FORCE_WAIT_EVERY_ROP - FFBWait(par); -#endif spin_unlock_irqrestore(&par->lock, flags); } @@ -1027,7 +960,13 @@ all->par.prom_node = node; all->par.prom_parent_node = parent; - all->info.flags = FBINFO_DEFAULT; + /* Don't mention copyarea, so SCROLL_REDRAW is always + * used. It is the fastest on this chip. + */ + all->info.flags = (FBINFO_DEFAULT | + /* FBINFO_HWACCEL_COPYAREA | */ + FBINFO_HWACCEL_FILLRECT | + FBINFO_HWACCEL_IMAGEBLIT); all->info.fbops = &ffb_ops; all->info.screen_base = (char *) all->par.physbase + FFB_DFB24_POFF; all->info.currcon = -1; diff -Nru a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c --- a/drivers/video/riva/fbdev.c 2004-09-06 16:37:54 -07:00 +++ b/drivers/video/riva/fbdev.c 2004-09-06 16:37:54 -07:00 @@ -1713,7 +1713,7 @@ } #endif /* CONFIG_PPC_OF */ -#ifdef CONFIG_FB_RIVA_I2C +#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) static int __devinit riva_get_EDID_i2c(struct fb_info *info) { struct riva_par *par = (struct riva_par *) info->par; diff -Nru a/drivers/video/softcursor.c b/drivers/video/softcursor.c --- a/drivers/video/softcursor.c 2004-09-06 16:37:53 -07:00 +++ b/drivers/video/softcursor.c 2004-09-06 16:37:53 -07:00 @@ -22,7 +22,8 @@ unsigned int scan_align = info->sprite.scan_align - 1; unsigned int buf_align = info->sprite.buf_align - 1; unsigned int i, size, dsize, s_pitch, d_pitch; - u8 *dst, src[64]; + struct fb_cursor *cur; + u8 *dst, *src; if (cursor->set & FB_CUR_SETSIZE) { info->cursor.image.height = cursor->image.height; @@ -48,9 +49,17 @@ info->cursor.image.depth = cursor->image.depth; } + info->cursor.image.data = cursor->image.data; + if (info->state != FBINFO_STATE_RUNNING) return 0; + src = kmalloc(64 + sizeof(struct fb_cursor), GFP_ATOMIC); + if (!src) + return -ENOMEM; + cur = (struct fb_cursor *) (src + 64); + *cur = info->cursor; + s_pitch = (info->cursor.image.width + 7) >> 3; dsize = s_pitch * info->cursor.image.height; d_pitch = (s_pitch + scan_align) & ~scan_align; @@ -79,9 +88,12 @@ else fb_sysmove_buf_aligned(info, &info->sprite, dst, d_pitch, src, s_pitch, info->cursor.image.height); - info->cursor.image.data = dst; + cur->image.data = dst; - info->fbops->fb_imageblit(info, &info->cursor.image); + info->fbops->fb_imageblit(info, &cur->image); + + kfree(src); + return 0; } diff -Nru a/fs/Kconfig b/fs/Kconfig --- a/fs/Kconfig 2004-09-06 16:37:53 -07:00 +++ b/fs/Kconfig 2004-09-06 16:37:53 -07:00 @@ -650,18 +650,21 @@ default 437 help This option should be set to the codepage of your FAT filesystems. - It can be overridden with the 'codepage' mount option. + It can be overridden with the "codepage" mount option. + See for more information. config FAT_DEFAULT_IOCHARSET string "Default iocharset for FAT" depends on VFAT_FS default "iso8859-1" help - Set this to the default I/O character set you'd like FAT to use. - It should probably match the character set that most of your - FAT filesystems use, and can be overridded with the 'iocharset' - mount option for FAT filesystems. Note that UTF8 is *not* a - supported charset for FAT filesystems. + Set this to the default input/output character set you'd + like FAT to use. It should probably match the character set + that most of your FAT filesystems use, and can be overridden + with the "iocharset" mount option for FAT filesystems. + Note that "utf8" is not recommended for FAT filesystems. + If unsure, you shouldn't set "utf8" here. + See for more information. config UMSDOS_FS #dep_tristate ' UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS @@ -1213,7 +1216,7 @@ endchoice config CRAMFS - tristate "Compressed ROM file system support" + tristate "Compressed ROM file system support (cramfs)" select ZLIB_INFLATE help Saying Y here includes support for CramFs (Compressed ROM File diff -Nru a/fs/Makefile b/fs/Makefile --- a/fs/Makefile 2004-09-06 16:37:53 -07:00 +++ b/fs/Makefile 2004-09-06 16:37:53 -07:00 @@ -91,3 +91,5 @@ obj-$(CONFIG_XFS_FS) += xfs/ obj-$(CONFIG_AFS_FS) += afs/ obj-$(CONFIG_BEFS_FS) += befs/ +obj-$(CONFIG_HOSTFS) += hostfs/ +obj-$(CONFIG_HPPFS) += hppfs/ diff -Nru a/fs/adfs/super.c b/fs/adfs/super.c --- a/fs/adfs/super.c 2004-09-06 16:37:50 -07:00 +++ b/fs/adfs/super.c 2004-09-06 16:37:50 -07:00 @@ -62,7 +62,7 @@ * are unable to represent sector offsets in * 32 bits. This works out at 2.0 TB. */ - if (dr->disc_size_high >> dr->log2secsize) + if (le32_to_cpu(dr->disc_size_high) >> dr->log2secsize) return 1; /* idlen must be no greater than 19 v2 [1.0] */ @@ -241,7 +241,7 @@ { adfs_inode_cachep = kmem_cache_create("adfs_inode_cache", sizeof(struct adfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (adfs_inode_cachep == NULL) return -ENOMEM; @@ -300,8 +300,8 @@ i = zone - 1; dm[0].dm_startblk = 0; dm[0].dm_startbit = ADFS_DR_SIZE_BITS; - dm[i].dm_endbit = (dr->disc_size_high << (32 - dr->log2bpmb)) + - (dr->disc_size >> dr->log2bpmb) + + dm[i].dm_endbit = (le32_to_cpu(dr->disc_size_high) << (32 - dr->log2bpmb)) + + (le32_to_cpu(dr->disc_size) >> dr->log2bpmb) + (ADFS_DR_SIZE_BITS - i * zone_size); if (adfs_checkmap(sb, dm)) @@ -439,7 +439,7 @@ * get the root_size from the disc record. */ if (asb->s_version) { - root_obj.size = dr->root_size; + root_obj.size = le32_to_cpu(dr->root_size); asb->s_dir = &adfs_fplus_dir_ops; asb->s_namelen = ADFS_FPLUS_NAME_LEN; } else { diff -Nru a/fs/affs/super.c b/fs/affs/super.c --- a/fs/affs/super.c 2004-09-06 16:37:54 -07:00 +++ b/fs/affs/super.c 2004-09-06 16:37:54 -07:00 @@ -115,7 +115,7 @@ { affs_inode_cachep = kmem_cache_create("affs_inode_cache", sizeof(struct affs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (affs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/afs/main.c b/fs/afs/main.c --- a/fs/afs/main.c 2004-09-06 16:37:51 -07:00 +++ b/fs/afs/main.c 2004-09-06 16:37:51 -07:00 @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -47,7 +48,7 @@ static char *rootcell; -MODULE_PARM(rootcell, "s"); +module_param(rootcell, charp, 0); MODULE_PARM_DESC(rootcell, "root AFS cell name and VL server IP addr list"); diff -Nru a/fs/afs/mntpt.c b/fs/afs/mntpt.c --- a/fs/afs/mntpt.c 2004-09-06 16:37:51 -07:00 +++ b/fs/afs/mntpt.c 2004-09-06 16:37:51 -07:00 @@ -235,8 +235,8 @@ */ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) { - struct nameidata newnd; struct vfsmount *newmnt; + struct dentry *old_dentry; int err; kenter("%p{%s},{%s:%p{%s}}", @@ -247,15 +247,19 @@ nd->dentry->d_name.name); newmnt = afs_mntpt_do_automount(dentry); - if (IS_ERR(newmnt)) + if (IS_ERR(newmnt)) { + path_release(nd); return PTR_ERR(newmnt); + } + + old_dentry = nd->dentry; + nd->dentry = dentry; + err = do_add_mount(newmnt, nd, 0, &afs_vfsmounts); + nd->dentry = old_dentry; - newnd = *nd; - newnd.dentry = dentry; - err = do_add_mount(newmnt, &newnd, 0, &afs_vfsmounts); + path_release(nd); if (!err) { - path_release(nd); mntget(newmnt); nd->mnt = newmnt; dget(newmnt->mnt_root); diff -Nru a/fs/aio.c b/fs/aio.c --- a/fs/aio.c 2004-09-06 16:37:52 -07:00 +++ b/fs/aio.c 2004-09-06 16:37:52 -07:00 @@ -39,6 +39,9 @@ #define dprintk(x...) do { ; } while (0) #endif +long aio_run = 0; /* for testing only */ +long aio_wakeups = 0; /* for testing only */ + /*------ sysctl variables----*/ atomic_t aio_nr = ATOMIC_INIT(0); /* current system wide number of aio requests */ unsigned aio_max_nr = 0x10000; /* system wide maximum number of aio requests */ @@ -277,6 +280,7 @@ struct kiocb *iocb = list_kiocb(pos); list_del_init(&iocb->ki_list); cancel = iocb->ki_cancel; + kiocbSetCancelled(iocb); if (cancel) { iocb->ki_users++; spin_unlock_irq(&ctx->ctx_lock); @@ -337,6 +341,11 @@ aio_cancel_all(ctx); wait_for_all_aios(ctx); + /* + * this is an overkill, but ensures we don't leave + * the ctx on the aio_wq + */ + flush_workqueue(aio_wq); if (1 != atomic_read(&ctx->users)) printk(KERN_DEBUG @@ -359,6 +368,8 @@ if (unlikely(ctx->reqs_active)) BUG(); + cancel_delayed_work(&ctx->wq); + flush_workqueue(aio_wq); aio_free_ring(ctx); mmdrop(ctx->mm); ctx->mm = NULL; @@ -398,6 +409,7 @@ req->ki_obj.user = NULL; req->ki_dtor = NULL; req->private = NULL; + INIT_LIST_HEAD(&req->ki_run_list); /* Check if the completion queue has enough free space to * accept an event from this io. @@ -543,85 +555,367 @@ return ioctx; } +/* + * use_mm + * Makes the calling kernel thread take on the specified + * mm context. + * Called by the retry thread execute retries within the + * iocb issuer's mm context, so that copy_from/to_user + * operations work seamlessly for aio. + * (Note: this routine is intended to be called only + * from a kernel thread context) + */ static void use_mm(struct mm_struct *mm) { struct mm_struct *active_mm; + struct task_struct *tsk = current; + task_lock(tsk); + active_mm = tsk->active_mm; atomic_inc(&mm->mm_count); - task_lock(current); - active_mm = current->active_mm; - current->mm = mm; - if (mm != active_mm) { - current->active_mm = mm; - activate_mm(active_mm, mm); - } - task_unlock(current); + tsk->mm = mm; + tsk->active_mm = mm; + activate_mm(active_mm, mm); + task_unlock(tsk); + mmdrop(active_mm); } -static void unuse_mm(struct mm_struct *mm) +/* + * unuse_mm + * Reverses the effect of use_mm, i.e. releases the + * specified mm context which was earlier taken on + * by the calling kernel thread + * (Note: this routine is intended to be called only + * from a kernel thread context) + * + * Comments: Called with ctx->ctx_lock held. This nests + * task_lock instead ctx_lock. + */ +void unuse_mm(struct mm_struct *mm) { - task_lock(current); - current->mm = NULL; - task_unlock(current); + struct task_struct *tsk = current; + + task_lock(tsk); + tsk->mm = NULL; /* active_mm is still 'mm' */ - enter_lazy_tlb(mm, current); + enter_lazy_tlb(mm, tsk); + task_unlock(tsk); } -/* Run on kevent's context. FIXME: needs to be per-cpu and warn if an - * operation blocks. +/* + * Queue up a kiocb to be retried. Assumes that the kiocb + * has already been marked as kicked, and places it on + * the retry run list for the corresponding ioctx, if it + * isn't already queued. Returns 1 if it actually queued + * the kiocb (to tell the caller to activate the work + * queue to process it), or 0, if it found that it was + * already queued. + * + * Should be called with the spin lock iocb->ki_ctx->ctx_lock + * held */ -static void aio_kick_handler(void *data) +static inline int __queue_kicked_iocb(struct kiocb *iocb) { - struct kioctx *ctx = data; + struct kioctx *ctx = iocb->ki_ctx; - use_mm(ctx->mm); + if (list_empty(&iocb->ki_run_list)) { + list_add_tail(&iocb->ki_run_list, + &ctx->run_list); + iocb->ki_queued++; + return 1; + } + return 0; +} - spin_lock_irq(&ctx->ctx_lock); - while (!list_empty(&ctx->run_list)) { - struct kiocb *iocb; - long ret; +/* aio_run_iocb + * This is the core aio execution routine. It is + * invoked both for initial i/o submission and + * subsequent retries via the aio_kick_handler. + * Expects to be invoked with iocb->ki_ctx->lock + * already held. The lock is released and reaquired + * as needed during processing. + * + * Calls the iocb retry method (already setup for the + * iocb on initial submission) for operation specific + * handling, but takes care of most of common retry + * execution details for a given iocb. The retry method + * needs to be non-blocking as far as possible, to avoid + * holding up other iocbs waiting to be serviced by the + * retry kernel thread. + * + * The trickier parts in this code have to do with + * ensuring that only one retry instance is in progress + * for a given iocb at any time. Providing that guarantee + * simplifies the coding of individual aio operations as + * it avoids various potential races. + */ +static ssize_t aio_run_iocb(struct kiocb *iocb) +{ + struct kioctx *ctx = iocb->ki_ctx; + ssize_t (*retry)(struct kiocb *); + ssize_t ret; - iocb = list_entry(ctx->run_list.next, struct kiocb, - ki_run_list); - list_del(&iocb->ki_run_list); - iocb->ki_users ++; - spin_unlock_irq(&ctx->ctx_lock); + if (iocb->ki_retried++ > 1024*1024) { + printk("Maximal retry count. Bytes done %Zd\n", + iocb->ki_nbytes - iocb->ki_left); + return -EAGAIN; + } + + if (!(iocb->ki_retried & 0xff)) { + pr_debug("%ld retry: %d of %d (kick %ld, Q %ld run %ld, wake %ld)\n", + iocb->ki_retried, + iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes, + iocb->ki_kicked, iocb->ki_queued, aio_run, aio_wakeups); + } - kiocbClearKicked(iocb); - ret = iocb->ki_retry(iocb); - if (-EIOCBQUEUED != ret) { + if (!(retry = iocb->ki_retry)) { + printk("aio_run_iocb: iocb->ki_retry = NULL\n"); + return 0; + } + + /* + * We don't want the next retry iteration for this + * operation to start until this one has returned and + * updated the iocb state. However, wait_queue functions + * can trigger a kick_iocb from interrupt context in the + * meantime, indicating that data is available for the next + * iteration. We want to remember that and enable the + * next retry iteration _after_ we are through with + * this one. + * + * So, in order to be able to register a "kick", but + * prevent it from being queued now, we clear the kick + * flag, but make the kick code *think* that the iocb is + * still on the run list until we are actually done. + * When we are done with this iteration, we check if + * the iocb was kicked in the meantime and if so, queue + * it up afresh. + */ + + kiocbClearKicked(iocb); + + /* + * This is so that aio_complete knows it doesn't need to + * pull the iocb off the run list (We can't just call + * INIT_LIST_HEAD because we don't want a kick_iocb to + * queue this on the run list yet) + */ + iocb->ki_run_list.next = iocb->ki_run_list.prev = NULL; + spin_unlock_irq(&ctx->ctx_lock); + + /* Quit retrying if the i/o has been cancelled */ + if (kiocbIsCancelled(iocb)) { + ret = -EINTR; + aio_complete(iocb, ret, 0); + /* must not access the iocb after this */ + goto out; + } + + /* + * Now we are all set to call the retry method in async + * context. By setting this thread's io_wait context + * to point to the wait queue entry inside the currently + * running iocb for the duration of the retry, we ensure + * that async notification wakeups are queued by the + * operation instead of blocking waits, and when notified, + * cause the iocb to be kicked for continuation (through + * the aio_wake_function callback). + */ + BUG_ON(current->io_wait != NULL); + current->io_wait = &iocb->ki_wait; + ret = retry(iocb); + current->io_wait = NULL; + + if (-EIOCBRETRY != ret) { + if (-EIOCBQUEUED != ret) { + BUG_ON(!list_empty(&iocb->ki_wait.task_list)); aio_complete(iocb, ret, 0); - iocb = NULL; + /* must not access the iocb after this */ } + } else { + /* + * Issue an additional retry to avoid waiting forever if + * no waits were queued (e.g. in case of a short read). + */ + if (list_empty(&iocb->ki_wait.task_list)) + kiocbSetKicked(iocb); + } +out: + spin_lock_irq(&ctx->ctx_lock); - spin_lock_irq(&ctx->ctx_lock); - if (NULL != iocb) - __aio_put_req(ctx, iocb); + if (-EIOCBRETRY == ret) { + /* + * OK, now that we are done with this iteration + * and know that there is more left to go, + * this is where we let go so that a subsequent + * "kick" can start the next iteration + */ + + /* will make __queue_kicked_iocb succeed from here on */ + INIT_LIST_HEAD(&iocb->ki_run_list); + /* we must queue the next iteration ourselves, if it + * has already been kicked */ + if (kiocbIsKicked(iocb)) { + __queue_kicked_iocb(iocb); + } } + return ret; +} + +/* + * __aio_run_iocbs: + * Process all pending retries queued on the ioctx + * run list. + * Assumes it is operating within the aio issuer's mm + * context. Expects to be called with ctx->ctx_lock held + */ +static int __aio_run_iocbs(struct kioctx *ctx) +{ + struct kiocb *iocb; + int count = 0; + LIST_HEAD(run_list); + + list_splice_init(&ctx->run_list, &run_list); + while (!list_empty(&run_list)) { + iocb = list_entry(run_list.next, struct kiocb, + ki_run_list); + list_del(&iocb->ki_run_list); + /* + * Hold an extra reference while retrying i/o. + */ + iocb->ki_users++; /* grab extra reference */ + aio_run_iocb(iocb); + if (__aio_put_req(ctx, iocb)) /* drop extra ref */ + put_ioctx(ctx); + count++; + } + aio_run++; + if (!list_empty(&ctx->run_list)) + return 1; + return 0; +} + +static void aio_queue_work(struct kioctx * ctx) +{ + unsigned long timeout; + /* + * if someone is waiting, get the work started right + * away, otherwise, use a longer delay + */ + smp_mb(); + if (waitqueue_active(&ctx->wait)) + timeout = 1; + else + timeout = HZ/10; + queue_delayed_work(aio_wq, &ctx->wq, timeout); +} + + +/* + * aio_run_iocbs: + * Process all pending retries queued on the ioctx + * run list. + * Assumes it is operating within the aio issuer's mm + * context. + */ +static inline void aio_run_iocbs(struct kioctx *ctx) +{ + int requeue; + + spin_lock_irq(&ctx->ctx_lock); + + requeue = __aio_run_iocbs(ctx); spin_unlock_irq(&ctx->ctx_lock); + if (requeue) + aio_queue_work(ctx); +} - unuse_mm(ctx->mm); +/* + * just like aio_run_iocbs, but keeps running them until + * the list stays empty + */ +static inline void aio_run_all_iocbs(struct kioctx *ctx) +{ + spin_lock_irq(&ctx->ctx_lock); + while (__aio_run_iocbs(ctx)) + ; + spin_unlock_irq(&ctx->ctx_lock); } -void fastcall kick_iocb(struct kiocb *iocb) +/* + * aio_kick_handler: + * Work queue handler triggered to process pending + * retries on an ioctx. Takes on the aio issuer's + * mm context before running the iocbs, so that + * copy_xxx_user operates on the issuer's address + * space. + * Run on aiod's context. + */ +static void aio_kick_handler(void *data) { - struct kioctx *ctx = iocb->ki_ctx; + struct kioctx *ctx = data; + mm_segment_t oldfs = get_fs(); + int requeue; + set_fs(USER_DS); + use_mm(ctx->mm); + spin_lock_irq(&ctx->ctx_lock); + requeue =__aio_run_iocbs(ctx); + unuse_mm(ctx->mm); + spin_unlock_irq(&ctx->ctx_lock); + set_fs(oldfs); + /* + * we're in a worker thread already, don't use queue_delayed_work, + */ + if (requeue) + queue_work(aio_wq, &ctx->wq); +} + + +/* + * Called by kick_iocb to queue the kiocb for retry + * and if required activate the aio work queue to process + * it + */ +void queue_kicked_iocb(struct kiocb *iocb) +{ + struct kioctx *ctx = iocb->ki_ctx; + unsigned long flags; + int run = 0; + + WARN_ON((!list_empty(&iocb->ki_wait.task_list))); + + spin_lock_irqsave(&ctx->ctx_lock, flags); + run = __queue_kicked_iocb(iocb); + spin_unlock_irqrestore(&ctx->ctx_lock, flags); + if (run) { + aio_queue_work(ctx); + aio_wakeups++; + } +} + +/* + * kick_iocb: + * Called typically from a wait queue callback context + * (aio_wake_function) to trigger a retry of the iocb. + * The retry is usually executed by aio workqueue + * threads (See aio_kick_handler). + */ +void fastcall kick_iocb(struct kiocb *iocb) +{ /* sync iocbs are easy: they can only ever be executing from a * single context. */ if (is_sync_kiocb(iocb)) { kiocbSetKicked(iocb); - wake_up_process(iocb->ki_obj.tsk); + wake_up_process(iocb->ki_obj.tsk); return; } + iocb->ki_kicked++; + /* If its already kicked we shouldn't queue it again */ if (!kiocbTryKick(iocb)) { - unsigned long flags; - spin_lock_irqsave(&ctx->ctx_lock, flags); - list_add_tail(&iocb->ki_run_list, &ctx->run_list); - spin_unlock_irqrestore(&ctx->ctx_lock, flags); - queue_work(aio_wq, &ctx->wq); + queue_kicked_iocb(iocb); } } EXPORT_SYMBOL(kick_iocb); @@ -675,6 +969,16 @@ */ spin_lock_irqsave(&ctx->ctx_lock, flags); + if (iocb->ki_run_list.prev && !list_empty(&iocb->ki_run_list)) + list_del_init(&iocb->ki_run_list); + + /* + * cancelled requests don't get events, userland was given one + * when the event got cancelled. + */ + if (kiocbIsCancelled(iocb)) + goto put_rq; + ring = kmap_atomic(info->ring_pages[0], KM_IRQ1); tail = info->tail; @@ -703,6 +1007,11 @@ pr_debug("added to ring %p at [%lu]\n", iocb, tail); + pr_debug("%ld retries: %d of %d (kicked %ld, Q %ld run %ld wake %ld)\n", + iocb->ki_retried, + iocb->ki_nbytes - iocb->ki_left, iocb->ki_nbytes, + iocb->ki_kicked, iocb->ki_queued, aio_run, aio_wakeups); +put_rq: /* everything turned out well, dispose of the aiocb. */ ret = __aio_put_req(ctx, iocb); @@ -809,13 +1118,15 @@ int i = 0; struct io_event ent; struct aio_timeout to; + int event_loop = 0; /* testing only */ + int retry = 0; /* needed to zero any padding within an entry (there shouldn't be * any, but C is fun! */ memset(&ent, 0, sizeof(ent)); +retry: ret = 0; - while (likely(i < nr)) { ret = aio_read_evt(ctx, &ent); if (unlikely(ret <= 0)) @@ -844,6 +1155,13 @@ /* End fast path */ + /* racey check, but it gets redone */ + if (!retry && unlikely(!list_empty(&ctx->run_list))) { + retry = 1; + aio_run_all_iocbs(ctx); + goto retry; + } + init_timeout(&to); if (timeout) { struct timespec ts; @@ -858,7 +1176,6 @@ add_wait_queue_exclusive(&ctx->wait, &wait); do { set_task_state(tsk, TASK_INTERRUPTIBLE); - ret = aio_read_evt(ctx, &ent); if (ret) break; @@ -868,6 +1185,7 @@ if (to.timed_out) /* Only check after read evt */ break; schedule(); + event_loop++; if (signal_pending(tsk)) { ret = -EINTR; break; @@ -895,6 +1213,9 @@ if (timeout) clear_timeout(&to); out: + pr_debug("event loop executed %d times\n", event_loop); + pr_debug("aio_run %ld\n", aio_run); + pr_debug("aio_wakeups %ld\n", aio_wakeups); return i ? i : ret; } @@ -962,7 +1283,7 @@ ret = put_user(ioctx->user_id, ctxp); if (!ret) return 0; - get_ioctx(ioctx); + io_destroy(ioctx); } @@ -987,13 +1308,181 @@ return -EINVAL; } +/* + * Default retry method for aio_read (also used for first time submit) + * Responsible for updating iocb state as retries progress + */ +static ssize_t aio_pread(struct kiocb *iocb) +{ + struct file *file = iocb->ki_filp; + struct address_space *mapping = file->f_mapping; + struct inode *inode = mapping->host; + ssize_t ret = 0; + + ret = file->f_op->aio_read(iocb, iocb->ki_buf, + iocb->ki_left, iocb->ki_pos); + + /* + * Can't just depend on iocb->ki_left to determine + * whether we are done. This may have been a short read. + */ + if (ret > 0) { + iocb->ki_buf += ret; + iocb->ki_left -= ret; + /* + * For pipes and sockets we return once we have + * some data; for regular files we retry till we + * complete the entire read or find that we can't + * read any more data (e.g short reads). + */ + if (!S_ISFIFO(inode->i_mode) && !S_ISSOCK(inode->i_mode)) + ret = -EIOCBRETRY; + } + + /* This means we must have transferred all that we could */ + /* No need to retry anymore */ + if ((ret == 0) || (iocb->ki_left == 0)) + ret = iocb->ki_nbytes - iocb->ki_left; + + return ret; +} + +/* + * Default retry method for aio_write (also used for first time submit) + * Responsible for updating iocb state as retries progress + */ +static ssize_t aio_pwrite(struct kiocb *iocb) +{ + struct file *file = iocb->ki_filp; + ssize_t ret = 0; + + ret = file->f_op->aio_write(iocb, iocb->ki_buf, + iocb->ki_left, iocb->ki_pos); + + if (ret > 0) { + iocb->ki_buf += ret; + iocb->ki_left -= ret; + + ret = -EIOCBRETRY; + } + + /* This means we must have transferred all that we could */ + /* No need to retry anymore */ + if ((ret == 0) || (iocb->ki_left == 0)) + ret = iocb->ki_nbytes - iocb->ki_left; + + return ret; +} + +static ssize_t aio_fdsync(struct kiocb *iocb) +{ + struct file *file = iocb->ki_filp; + ssize_t ret = -EINVAL; + + if (file->f_op->aio_fsync) + ret = file->f_op->aio_fsync(iocb, 1); + return ret; +} + +static ssize_t aio_fsync(struct kiocb *iocb) +{ + struct file *file = iocb->ki_filp; + ssize_t ret = -EINVAL; + + if (file->f_op->aio_fsync) + ret = file->f_op->aio_fsync(iocb, 0); + return ret; +} + +/* + * aio_setup_iocb: + * Performs the initial checks and aio retry method + * setup for the kiocb at the time of io submission. + */ +ssize_t aio_setup_iocb(struct kiocb *kiocb) +{ + struct file *file = kiocb->ki_filp; + ssize_t ret = 0; + + switch (kiocb->ki_opcode) { + case IOCB_CMD_PREAD: + ret = -EBADF; + if (unlikely(!(file->f_mode & FMODE_READ))) + break; + ret = -EFAULT; + if (unlikely(!access_ok(VERIFY_WRITE, kiocb->ki_buf, + kiocb->ki_left))) + break; + ret = -EINVAL; + if (file->f_op->aio_read) + kiocb->ki_retry = aio_pread; + break; + case IOCB_CMD_PWRITE: + ret = -EBADF; + if (unlikely(!(file->f_mode & FMODE_WRITE))) + break; + ret = -EFAULT; + if (unlikely(!access_ok(VERIFY_READ, kiocb->ki_buf, + kiocb->ki_left))) + break; + ret = -EINVAL; + if (file->f_op->aio_write) + kiocb->ki_retry = aio_pwrite; + break; + case IOCB_CMD_FDSYNC: + ret = -EINVAL; + if (file->f_op->aio_fsync) + kiocb->ki_retry = aio_fdsync; + break; + case IOCB_CMD_FSYNC: + ret = -EINVAL; + if (file->f_op->aio_fsync) + kiocb->ki_retry = aio_fsync; + break; + default: + dprintk("EINVAL: io_submit: no operation provided\n"); + ret = -EINVAL; + } + + if (!kiocb->ki_retry) + return ret; + + return 0; +} + +/* + * aio_wake_function: + * wait queue callback function for aio notification, + * Simply triggers a retry of the operation via kick_iocb. + * + * This callback is specified in the wait queue entry in + * a kiocb (current->io_wait points to this wait queue + * entry when an aio operation executes; it is used + * instead of a synchronous wait when an i/o blocking + * condition is encountered during aio). + * + * Note: + * This routine is executed with the wait queue lock held. + * Since kick_iocb acquires iocb->ctx->ctx_lock, it nests + * the ioctx lock inside the wait queue lock. This is safe + * because this callback isn't used for wait queues which + * are nested inside ioctx lock (i.e. ctx->wait) + */ +int aio_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) +{ + struct kiocb *iocb = container_of(wait, struct kiocb, ki_wait); + + list_del_init(&wait->task_list); + kick_iocb(iocb); + return 1; +} + int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, struct iocb *iocb) { struct kiocb *req; struct file *file; ssize_t ret; - char __user *buf; /* enforce forwards compatibility on users */ if (unlikely(iocb->aio_reserved1 || iocb->aio_reserved2 || @@ -1034,58 +1523,31 @@ req->ki_user_data = iocb->aio_data; req->ki_pos = iocb->aio_offset; - buf = (char __user *)(unsigned long)iocb->aio_buf; + req->ki_buf = (char __user *)(unsigned long)iocb->aio_buf; + req->ki_left = req->ki_nbytes = iocb->aio_nbytes; + req->ki_opcode = iocb->aio_lio_opcode; + init_waitqueue_func_entry(&req->ki_wait, aio_wake_function); + INIT_LIST_HEAD(&req->ki_wait.task_list); + req->ki_run_list.next = req->ki_run_list.prev = NULL; + req->ki_retry = NULL; + req->ki_retried = 0; + req->ki_kicked = 0; + req->ki_queued = 0; + aio_run = 0; + aio_wakeups = 0; - switch (iocb->aio_lio_opcode) { - case IOCB_CMD_PREAD: - ret = -EBADF; - if (unlikely(!(file->f_mode & FMODE_READ))) - goto out_put_req; - ret = -EFAULT; - if (unlikely(!access_ok(VERIFY_WRITE, buf, iocb->aio_nbytes))) - goto out_put_req; - ret = security_file_permission (file, MAY_READ); - if (ret) - goto out_put_req; - ret = -EINVAL; - if (file->f_op->aio_read) - ret = file->f_op->aio_read(req, buf, - iocb->aio_nbytes, req->ki_pos); - break; - case IOCB_CMD_PWRITE: - ret = -EBADF; - if (unlikely(!(file->f_mode & FMODE_WRITE))) - goto out_put_req; - ret = -EFAULT; - if (unlikely(!access_ok(VERIFY_READ, buf, iocb->aio_nbytes))) - goto out_put_req; - ret = security_file_permission (file, MAY_WRITE); - if (ret) - goto out_put_req; - ret = -EINVAL; - if (file->f_op->aio_write) - ret = file->f_op->aio_write(req, buf, - iocb->aio_nbytes, req->ki_pos); - break; - case IOCB_CMD_FDSYNC: - ret = -EINVAL; - if (file->f_op->aio_fsync) - ret = file->f_op->aio_fsync(req, 1); - break; - case IOCB_CMD_FSYNC: - ret = -EINVAL; - if (file->f_op->aio_fsync) - ret = file->f_op->aio_fsync(req, 0); - break; - default: - dprintk("EINVAL: io_submit: no operation provided\n"); - ret = -EINVAL; - } + ret = aio_setup_iocb(req); + if (ret) + goto out_put_req; + + spin_lock_irq(&ctx->ctx_lock); + list_add_tail(&req->ki_run_list, &ctx->run_list); + /* drain the run list */ + while (__aio_run_iocbs(ctx)) + ; + spin_unlock_irq(&ctx->ctx_lock); aio_put_req(req); /* drop extra ref to req */ - if (likely(-EIOCBQUEUED == ret)) - return 0; - aio_complete(req, ret, 0); /* will drop i/o ref to req */ return 0; out_put_req: @@ -1201,6 +1663,7 @@ if (kiocb && kiocb->ki_cancel) { cancel = kiocb->ki_cancel; kiocb->ki_users ++; + kiocbSetCancelled(kiocb); } else cancel = NULL; spin_unlock_irq(&ctx->ctx_lock); diff -Nru a/fs/autofs/root.c b/fs/autofs/root.c --- a/fs/autofs/root.c 2004-09-06 16:37:52 -07:00 +++ b/fs/autofs/root.c 2004-09-06 16:37:52 -07:00 @@ -238,9 +238,15 @@ * a signal. If so we can force a restart.. */ if (dentry->d_flags & DCACHE_AUTOFS_PENDING) { + /* See if we were interrupted */ if (signal_pending(current)) { - unlock_kernel(); - return ERR_PTR(-ERESTARTNOINTR); + sigset_t *sigset = ¤t->pending.signal; + if (sigismember (sigset, SIGKILL) || + sigismember (sigset, SIGQUIT) || + sigismember (sigset, SIGINT)) { + unlock_kernel(); + return ERR_PTR(-ERESTARTNOINTR); + } } } unlock_kernel(); diff -Nru a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c --- a/fs/befs/linuxvfs.c 2004-09-06 16:37:52 -07:00 +++ b/fs/befs/linuxvfs.c 2004-09-06 16:37:52 -07:00 @@ -433,7 +433,7 @@ { befs_inode_cachep = kmem_cache_create("befs_inode_cache", sizeof (struct befs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (befs_inode_cachep == NULL) { printk(KERN_ERR "befs_init_inodecache: " @@ -857,10 +857,14 @@ befs_sb->nls = load_nls(befs_sb->mount_opts.iocharset); if (!befs_sb->nls) { befs_warning(sb, "Cannot load nls %s" - "loding default nls", - befs_sb->mount_opts.iocharset); + " loading default nls", + befs_sb->mount_opts.iocharset); befs_sb->nls = load_nls_default(); } + /* load default nls if none is specified in mount options */ + } else { + befs_debug(sb, "Loading default nls"); + befs_sb->nls = load_nls_default(); } return 0; diff -Nru a/fs/bfs/inode.c b/fs/bfs/inode.c --- a/fs/bfs/inode.c 2004-09-06 16:37:52 -07:00 +++ b/fs/bfs/inode.c 2004-09-06 16:37:52 -07:00 @@ -245,7 +245,7 @@ { bfs_inode_cachep = kmem_cache_create("bfs_inode_cache", sizeof(struct bfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (bfs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/binfmt_aout.c b/fs/binfmt_aout.c --- a/fs/binfmt_aout.c 2004-09-06 16:37:51 -07:00 +++ b/fs/binfmt_aout.c 2004-09-06 16:37:51 -07:00 @@ -307,7 +307,7 @@ (current->mm->start_data = N_DATADDR(ex)); current->mm->brk = ex.a_bss + (current->mm->start_brk = N_BSSADDR(ex)); - current->mm->free_area_cache = TASK_UNMAPPED_BASE; + current->mm->free_area_cache = current->mm->mmap_base; current->mm->rss = 0; current->mm->mmap = NULL; diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2004-09-06 16:37:52 -07:00 +++ b/fs/binfmt_elf.c 2004-09-06 16:37:52 -07:00 @@ -40,6 +40,7 @@ #include #include +#include #include @@ -703,10 +704,12 @@ if (elf_read_implies_exec(elf_ex, have_pt_gnu_stack)) current->personality |= READ_IMPLIES_EXEC; + arch_pick_mmap_layout(current->mm); + /* Do this so that we can load the interpreter, if need be. We will change some of these later */ current->mm->rss = 0; - current->mm->free_area_cache = TASK_UNMAPPED_BASE; + current->mm->free_area_cache = current->mm->mmap_base; retval = setup_arg_pages(bprm, executable_stack); if (retval < 0) { send_sig(SIGKILL, current, 0); @@ -1176,10 +1179,27 @@ prstatus->pr_ppid = p->parent->pid; prstatus->pr_pgrp = process_group(p); prstatus->pr_sid = p->signal->session; - jiffies_to_timeval(p->utime, &prstatus->pr_utime); - jiffies_to_timeval(p->stime, &prstatus->pr_stime); - jiffies_to_timeval(p->cutime, &prstatus->pr_cutime); - jiffies_to_timeval(p->cstime, &prstatus->pr_cstime); + if (p->pid == p->tgid) { + /* + * This is the record for the group leader. Add in the + * cumulative times of previous dead threads. This total + * won't include the time of each live thread whose state + * is included in the core dump. The final total reported + * to our parent process when it calls wait4 will include + * those sums as well as the little bit more time it takes + * this and each other thread to finish dying after the + * core dump synchronization phase. + */ + jiffies_to_timeval(p->utime + p->signal->utime, + &prstatus->pr_utime); + jiffies_to_timeval(p->stime + p->signal->stime, + &prstatus->pr_stime); + } else { + jiffies_to_timeval(p->utime, &prstatus->pr_utime); + jiffies_to_timeval(p->stime, &prstatus->pr_stime); + } + jiffies_to_timeval(p->signal->cutime, &prstatus->pr_cutime); + jiffies_to_timeval(p->signal->cstime, &prstatus->pr_cstime); } static void fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, diff -Nru a/fs/bio.c b/fs/bio.c --- a/fs/bio.c 2004-09-06 16:37:53 -07:00 +++ b/fs/bio.c 2004-09-06 16:37:53 -07:00 @@ -388,20 +388,17 @@ struct bio_vec *bvec; int i, ret = 0; - if (bio_data_dir(bio) == READ) { - char *uaddr = bio->bi_private; + char *uaddr = bio->bi_private; - __bio_for_each_segment(bvec, bio, i, 0) { - char *addr = page_address(bvec->bv_page); - - if (!ret && copy_to_user(uaddr, addr, bvec->bv_len)) - ret = -EFAULT; + __bio_for_each_segment(bvec, bio, i, 0) { + char *addr = page_address(bvec->bv_page); + if (bio_data_dir(bio) == READ && !ret && + copy_to_user(uaddr, addr, bvec->bv_len)) + ret = -EFAULT; - __free_page(bvec->bv_page); - uaddr += bvec->bv_len; - } + __free_page(bvec->bv_page); + uaddr += bvec->bv_len; } - bio_put(bio); return ret; } @@ -457,6 +454,7 @@ */ if (!ret) { if (!write_to_vm) { + unsigned long p = uaddr; bio->bi_rw |= (1 << BIO_RW); /* * for a write, copy in data to kernel pages @@ -465,8 +463,9 @@ bio_for_each_segment(bvec, bio, i) { char *addr = page_address(bvec->bv_page); - if (copy_from_user(addr, (char *) uaddr, bvec->bv_len)) + if (copy_from_user(addr, (char *) p, bvec->bv_len)) goto cleanup; + p += bvec->bv_len; } } diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c 2004-09-06 16:37:53 -07:00 +++ b/fs/buffer.c 2004-09-06 16:37:53 -07:00 @@ -1551,6 +1551,7 @@ { struct buffer_head *bh = __find_get_block(bdev, block, size); + might_sleep(); if (bh == NULL) bh = __getblk_slow(bdev, block, size); return bh; @@ -1775,6 +1776,8 @@ void unmap_underlying_metadata(struct block_device *bdev, sector_t block) { struct buffer_head *old_bh; + + might_sleep(); old_bh = __find_get_block_slow(bdev, block, 0); if (old_bh) { diff -Nru a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS --- a/fs/cifs/AUTHORS 2004-09-06 16:37:50 -07:00 +++ b/fs/cifs/AUTHORS 2004-09-06 16:37:50 -07:00 @@ -24,6 +24,7 @@ Sergey Vlasov Richard Hughes Yury Umanets +Mark Hamzy Test case and Bug Report contributors ------------------------------------- @@ -31,7 +32,9 @@ and debug of problems they have found: Jochen Dolze, David Blaine, Rene Scharfe, Martin Josefsson, Alexander Wild, Anthony Liguori, Lars Muller, Urban Widmark, Massimiliano Ferrero, Howard Owen, -Olaf Kirch, Kieron Briggs, Nick Millington and others. +Olaf Kirch, Kieron Briggs, Nick Millington and others. Also special +mention to the Stanford Checker (SWAT) which pointed out many minor +bugs in error paths. And thanks to the IBM LTC and Power test teams and SuSE testers for finding multiple bugs during excellent stress test runs. diff -Nru a/fs/cifs/CHANGES b/fs/cifs/CHANGES --- a/fs/cifs/CHANGES 2004-09-06 16:37:54 -07:00 +++ b/fs/cifs/CHANGES 2004-09-06 16:37:54 -07:00 @@ -1,7 +1,9 @@ Version 1.22 ------------ Add config option to enable XATTR (extended attribute) support, mapping -xattr names in the "user." namespace space to SMB/CIFS EAs. +xattr names in the "user." namespace space to SMB/CIFS EAs. Lots of +minor fixes pointed out by the Stanford SWAT checker (mostly missing +or out of order NULL pointer checks in little used error paths). Version 1.21 ------------ diff -Nru a/fs/cifs/asn1.c b/fs/cifs/asn1.c --- a/fs/cifs/asn1.c 2004-09-06 16:37:50 -07:00 +++ b/fs/cifs/asn1.c 2004-09-06 16:37:50 -07:00 @@ -375,7 +375,7 @@ return 1; } -static unsigned char +static int asn1_oid_decode(struct asn1_ctx *ctx, unsigned char *eoc, unsigned long **oid, unsigned int *len) { @@ -454,11 +454,11 @@ struct asn1_ctx ctx; unsigned char *end; unsigned char *sequence_end; - unsigned long *oid; + unsigned long *oid = NULL; unsigned int cls, con, tag, oidlen, rc; int use_ntlmssp = FALSE; - *secType = NTLM; /* BB eventually make Kerberos or NLTMSSP the default */ + *secType = NTLM; /* BB eventually make Kerberos or NLTMSSP the default */ /* cifs_dump_mem(" Received SecBlob ", security_blob, length); */ @@ -543,16 +543,19 @@ return 0; } if ((tag == ASN1_OJI) && (con == ASN1_PRI)) { - asn1_oid_decode(&ctx, end, &oid, &oidlen); - cFYI(1, - ("OID len = %d oid = 0x%lx 0x%lx 0x%lx 0x%lx", - oidlen, *oid, *(oid + 1), *(oid + 2), - *(oid + 3))); - rc = compare_oid(oid, oidlen, NTLMSSP_OID, + rc = asn1_oid_decode(&ctx, end, &oid, &oidlen); + if(rc) { + cFYI(1, + ("OID len = %d oid = 0x%lx 0x%lx 0x%lx 0x%lx", + oidlen, *oid, *(oid + 1), *(oid + 2), + *(oid + 3))); + rc = compare_oid(oid, oidlen, NTLMSSP_OID, NTLMSSP_OID_LEN); - kfree(oid); - if (rc) - use_ntlmssp = TRUE; + if(oid) + kfree(oid); + if (rc) + use_ntlmssp = TRUE; + } } else { cFYI(1,("This should be an oid what is going on? ")); } diff -Nru a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c --- a/fs/cifs/cifsencrypt.c 2004-09-06 16:37:53 -07:00 +++ b/fs/cifs/cifsencrypt.c 2004-09-06 16:37:53 -07:00 @@ -153,7 +153,7 @@ wchar_t * unicode_buf; unsigned int i,user_name_len,dom_name_len; - if(ses) + if(ses == NULL) return -EINVAL; E_md4hash(ses->password, temp_hash); @@ -167,7 +167,13 @@ return -EINVAL; ucase_buf = kmalloc((MAX_USERNAME_SIZE+1), GFP_KERNEL); + if(ucase_buf == NULL) + return -ENOMEM; unicode_buf = kmalloc((MAX_USERNAME_SIZE+1)*4, GFP_KERNEL); + if(unicode_buf == NULL) { + kfree(ucase_buf); + return -ENOMEM; + } for(i=0;icharset2upper[(int)ses->userName[i]]; diff -Nru a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c --- a/fs/cifs/cifsfs.c 2004-09-06 16:37:53 -07:00 +++ b/fs/cifs/cifsfs.c 2004-09-06 16:37:53 -07:00 @@ -255,12 +255,14 @@ if (cifs_sb) { if (cifs_sb->tcon) { seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName); - if ((cifs_sb->tcon->ses) && (cifs_sb->tcon->ses->userName)) - seq_printf(s, ",username=%s", + if (cifs_sb->tcon->ses) { + if (cifs_sb->tcon->ses->userName) + seq_printf(s, ",username=%s", cifs_sb->tcon->ses->userName); - if(cifs_sb->tcon->ses->domainName) - seq_printf(s, ",domain=%s", - cifs_sb->tcon->ses->domainName); + if(cifs_sb->tcon->ses->domainName) + seq_printf(s, ",domain=%s", + cifs_sb->tcon->ses->domainName); + } } seq_printf(s, ",rsize=%d",cifs_sb->rsize); seq_printf(s, ",wsize=%d",cifs_sb->wsize); @@ -510,8 +512,9 @@ }; struct inode_operations cifs_symlink_inode_ops = { - .readlink = cifs_readlink, + .readlink = generic_readlink, .follow_link = cifs_follow_link, + .put_link = cifs_put_link, .permission = cifs_permission, /* BB add the following two eventually */ /* revalidate: cifs_revalidate, @@ -561,7 +564,7 @@ { cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", sizeof (struct cifsInodeInfo), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, cifs_init_once, NULL); if (cifs_inode_cachep == NULL) return -ENOMEM; @@ -756,11 +759,14 @@ if (!rc) { rc = register_filesystem(&cifs_fs_type); if (!rc) { - kernel_thread(cifs_oplock_thread, NULL, + rc = (int)kernel_thread(cifs_oplock_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_VM); - return rc; /* Success */ - } else - cifs_destroy_request_bufs(); + if(rc > 0) + return 0; + else + cERROR(1,("error %d create oplock thread",rc)); + } + cifs_destroy_request_bufs(); } cifs_destroy_mids(); } diff -Nru a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h --- a/fs/cifs/cifsfs.h 2004-09-06 16:37:51 -07:00 +++ b/fs/cifs/cifsfs.h 2004-09-06 16:37:51 -07:00 @@ -81,6 +81,7 @@ /* Functions related to symlinks */ extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd); +extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd); extern int cifs_readlink(struct dentry *direntry, char __user *buffer, int buflen); extern int cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname); diff -Nru a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h --- a/fs/cifs/cifspdu.h 2004-09-06 16:37:54 -07:00 +++ b/fs/cifs/cifspdu.h 2004-09-06 16:37:54 -07:00 @@ -1726,6 +1726,7 @@ void (*free) (struct data_blob * data_blob); }; + #ifdef CONFIG_CIFS_POSIX /* For better POSIX semantics from Linux client, (even better @@ -1774,9 +1775,9 @@ COPY (note support for copy across directories) - FUTURE, OPTIONAL setting/getting OS/2 EAs - FUTURE (BB can this handle - setting Linux xattrs perfectly) - OPTIONAL - dnotify - FUTURE, OPTIONAL - quota - FUTURE, OPTIONAL + setting Linux xattrs perfectly) - OPTIONAL + dnotify - FUTURE, OPTIONAL + quota - FUTURE, OPTIONAL Note that various requests implemented for NT interop such as NT_TRANSACT (IOCTL) QueryReparseInfo @@ -1801,6 +1802,34 @@ */ + +/* xsymlink is a symlink format that can be used + to save symlink info in a regular file when + mounted to operating systems that do not + support the cifs Unix extensions or EAs (for xattr + based symlinks). For such a file to be recognized + as containing symlink data: + + 1) file size must be 1067, + 2) signature must begin file data, + 3) length field must be set to ASCII representation + of a number which is less than or equal to 1024, + 4) md5 must match that of the path data */ + +struct xsymlink { + /* 1067 bytes */ + char signature[4]; /* XSym */ /* not null terminated */ + char cr0; /* \n */ +/* ASCII representation of length (4 bytes decimal) terminated by \n not null */ + char length[4]; + char cr1; /* \n */ +/* md5 of valid subset of path ie path[0] through path[length-1] */ + __u8 md5[32]; + char cr2; /* \n */ +/* if room left, then end with \n then 0x20s by convention but not required */ + char path[1024]; +}; + #endif #pragma pack() /* resume default structure packing */ diff -Nru a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h --- a/fs/cifs/cifsproto.h 2004-09-06 16:37:50 -07:00 +++ b/fs/cifs/cifsproto.h 2004-09-06 16:37:50 -07:00 @@ -37,7 +37,7 @@ extern unsigned int _GetXid(void); extern void _FreeXid(unsigned int); #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__FUNCTION__, xid,current->fsuid)); -#define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__FUNCTION__,curr_xid,rc));} +#define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__FUNCTION__,curr_xid,(int)rc));} extern char *build_path_from_dentry(struct dentry *); extern char *build_wildcard_path_from_dentry(struct dentry *direntry); extern void renew_parental_timestamps(struct dentry *direntry); diff -Nru a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c --- a/fs/cifs/cifssmb.c 2004-09-06 16:37:51 -07:00 +++ b/fs/cifs/cifssmb.c 2004-09-06 16:37:51 -07:00 @@ -234,7 +234,8 @@ /* BB might be helpful to save off the domain of server here */ - if (pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) { + if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) && + (server->capabilities & CAP_EXTENDED_SECURITY)) { if (pSMBr->ByteCount < 16) rc = -EIO; else if (pSMBr->ByteCount == 16) { @@ -365,9 +366,12 @@ rc = smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL /* no tcon anymore */, (void **) &pSMB, (void **) &smb_buffer_response); - - if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) - pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; + + if(ses->server) { + if(ses->server->secMode & + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) + pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; + } if (rc) { up(&ses->sesSem); @@ -818,7 +822,7 @@ pSMB->AndXCommand = 0xFF; /* none */ pSMB->Fid = smb_file_id; /* netfid stays le */ - if(numLock != 0) { + if((numLock != 0) || (numUnlock != 0)) { pSMB->Locks[0].Pid = cpu_to_le16(current->tgid); /* BB where to store pid high? */ temp = cpu_to_le64(len); @@ -2173,6 +2177,10 @@ /* BB add check for name_len bigger than bcc */ *targetUNCs = kmalloc(name_len+1+ (*number_of_UNC_in_array),GFP_KERNEL); + if(*targetUNCs == NULL) { + rc = -ENOMEM; + goto GetDFSRefExit; + } /* copy the ref strings */ referrals = (struct dfs_referral_level_3 *) @@ -2196,6 +2204,7 @@ } } +GetDFSRefExit: if (pSMB) cifs_buf_release(pSMB); @@ -3105,7 +3114,7 @@ rc += temp_fea->name_len; /* account for prefix user. and trailing null */ rc = rc + 5 + 1; - if(rcname_len); @@ -3141,7 +3150,7 @@ if (rc == -EAGAIN) goto QAllEAsRetry; - return rc; + return (ssize_t)rc; } ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon, @@ -3255,7 +3264,7 @@ /* found a match */ rc = temp_fea->value_len; /* account for prefix user. and trailing null */ - if(rc<=buf_size) { + if(rc<=(int)buf_size) { memcpy(ea_value, temp_fea->name+temp_fea->name_len+1, rc); @@ -3288,7 +3297,7 @@ if (rc == -EAGAIN) goto QEARetry; - return rc; + return (ssize_t)rc; } int diff -Nru a/fs/cifs/connect.c b/fs/cifs/connect.c --- a/fs/cifs/connect.c 2004-09-06 16:37:54 -07:00 +++ b/fs/cifs/connect.c 2004-09-06 16:37:54 -07:00 @@ -814,19 +814,23 @@ } static struct cifsSesInfo * -cifs_find_tcp_session(__u32 new_target_ip_addr, +cifs_find_tcp_session(struct in_addr * target_ip_addr, + struct in6_addr *target_ip6_addr, char *userName, struct TCP_Server_Info **psrvTcp) { struct list_head *tmp; struct cifsSesInfo *ses; - *psrvTcp = NULL; read_lock(&GlobalSMBSeslock); + list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); if (ses->server) { - if (ses->server->addr.sockAddr.sin_addr.s_addr == - new_target_ip_addr) { + if((target_ip_addr && + (ses->server->addr.sockAddr.sin_addr.s_addr + == target_ip_addr->s_addr)) || (target_ip6_addr + && memcmp(&ses->server->addr.sockAddr6.sin6_addr, + target_ip6_addr,sizeof(*target_ip6_addr)))){ /* BB lock server and tcp session and increment use count here?? */ *psrvTcp = ses->server; /* found a match on the TCP session */ /* BB check if reconnection needed */ @@ -1029,7 +1033,7 @@ /* send RFC1001 sessinit */ - if(psin_server->sin_port == htons(139)) { + if(psin_server->sin_port == htons(RFC1001_PORT)) { /* some servers require RFC1001 sessinit before sending negprot - BB check reconnection in case where second sessinit is sent but no second negprot */ @@ -1072,6 +1076,7 @@ { int rc = 0; int connected = 0; + unsigned short int orig_port = 0; if(*csocket == NULL) { rc = sock_create_kern(PF_INET6, SOCK_STREAM, IPPROTO_TCP, csocket); @@ -1097,6 +1102,10 @@ } if(!connected) { + /* save original port so we can retry user specified port + later if fall back ports fail this time */ + + orig_port = psin_server->sin6_port; /* do not retry on the same port we just failed on */ if(psin_server->sin6_port != htons(CIFS_PORT)) { psin_server->sin6_port = htons(CIFS_PORT); @@ -1119,6 +1128,8 @@ /* give up here - unless we want to retry on different protocol families some day */ if (!connected) { + if(orig_port) + psin_server->sin6_port = orig_port; cFYI(1,("Error %d connecting to server via ipv6",rc)); sock_release(*csocket); *csocket = NULL; @@ -1138,6 +1149,7 @@ { int rc = 0; int xid; + int address_type = AF_INET; struct socket *csocket = NULL; struct sockaddr_in sin_server; struct sockaddr_in6 sin_server6; @@ -1179,12 +1191,16 @@ if (volume_info.UNCip && volume_info.UNC) { rc = cifs_inet_pton(AF_INET, volume_info.UNCip,&sin_server.sin_addr.s_addr); - if(rc == 0) { + if(rc <= 0) { /* not ipv4 address, try ipv6 */ rc = cifs_inet_pton(AF_INET6,volume_info.UNCip,&sin_server6.sin6_addr.in6_u); - } + if(rc > 0) + address_type = AF_INET6; + } else { + address_type = AF_INET; + } - if(rc != 1) { + if(rc <= 0) { /* we failed translating address */ if(volume_info.UNC) kfree(volume_info.UNC); @@ -1234,9 +1250,24 @@ } } - existingCifsSes = - cifs_find_tcp_session(sin_server.sin_addr.s_addr, - volume_info.username, &srvTcp); + if(address_type == AF_INET) + existingCifsSes = cifs_find_tcp_session(&sin_server.sin_addr, + NULL /* no ipv6 addr */, + volume_info.username, &srvTcp); + else if(address_type == AF_INET6) + existingCifsSes = cifs_find_tcp_session(NULL /* no ipv4 addr */, + &sin_server6.sin6_addr, + volume_info.username, &srvTcp); + else { + if(volume_info.UNC) + kfree(volume_info.UNC); + if(volume_info.password) + kfree(volume_info.password); + FreeXid(xid); + return -EINVAL; + } + + if (srvTcp) { cFYI(1, ("Existing tcp session with server found ")); } else { /* create socket */ @@ -1283,8 +1314,19 @@ so no need to spinlock this init of tcpStatus */ srvTcp->tcpStatus = CifsNew; init_MUTEX(&srvTcp->tcpSem); - kernel_thread((void *)(void *)cifs_demultiplex_thread, srvTcp, + rc = (int)kernel_thread((void *)(void *)cifs_demultiplex_thread, srvTcp, CLONE_FS | CLONE_FILES | CLONE_VM); + if(rc < 0) { + rc = -ENOMEM; + sock_release(csocket); + if(volume_info.UNC) + kfree(volume_info.UNC); + if(volume_info.password) + kfree(volume_info.password); + FreeXid(xid); + return rc; + } else + rc = 0; memcpy(srvTcp->workstation_RFC1001_name, volume_info.source_rfc1001_name,16); } } @@ -1464,15 +1506,18 @@ SESSION_SETUP_ANDX *pSMB; SESSION_SETUP_ANDX *pSMBr; char *bcc_ptr; - char *user = ses->userName; - char *domain = ses->domainName; + char *user; + char *domain; int rc = 0; int remaining_words = 0; int bytes_returned = 0; int len; cFYI(1, ("In sesssetup ")); - + if(ses == NULL) + return -EINVAL; + user = ses->userName; + domain = ses->domainName; smb_buffer = cifs_buf_get(); if (smb_buffer == 0) { return -ENOMEM; @@ -1591,111 +1636,104 @@ pSMBr->resp.Action = le16_to_cpu(pSMBr->resp.Action); if (pSMBr->resp.Action & GUEST_LOGIN) cFYI(1, (" Guest login")); /* do we want to mark SesInfo struct ? */ - if (ses) { - ses->Suid = smb_buffer_response->Uid; /* UID left in wire format (le) */ - cFYI(1, ("UID = %d ", ses->Suid)); + ses->Suid = smb_buffer_response->Uid; /* UID left in wire format (le) */ + cFYI(1, ("UID = %d ", ses->Suid)); /* response can have either 3 or 4 word count - Samba sends 3 */ - bcc_ptr = pByteArea(smb_buffer_response); - if ((pSMBr->resp.hdr.WordCount == 3) - || ((pSMBr->resp.hdr.WordCount == 4) - && (pSMBr->resp.SecurityBlobLength < - pSMBr->resp.ByteCount))) { - if (pSMBr->resp.hdr.WordCount == 4) - bcc_ptr += - pSMBr->resp.SecurityBlobLength; - - if (smb_buffer->Flags2 & SMBFLG2_UNICODE) { - if ((long) (bcc_ptr) % 2) { - remaining_words = - (BCC(smb_buffer_response) - - 1) / 2; - bcc_ptr++; /* Unicode strings must be word aligned */ - } else { - remaining_words = - BCC - (smb_buffer_response) / 2; - } - len = - UniStrnlen((wchar_t *) bcc_ptr, - remaining_words - 1); + bcc_ptr = pByteArea(smb_buffer_response); + if ((pSMBr->resp.hdr.WordCount == 3) + || ((pSMBr->resp.hdr.WordCount == 4) + && (pSMBr->resp.SecurityBlobLength < + pSMBr->resp.ByteCount))) { + if (pSMBr->resp.hdr.WordCount == 4) + bcc_ptr += + pSMBr->resp.SecurityBlobLength; + + if (smb_buffer->Flags2 & SMBFLG2_UNICODE) { + if ((long) (bcc_ptr) % 2) { + remaining_words = + (BCC(smb_buffer_response) - 1) /2; + bcc_ptr++; /* Unicode strings must be word aligned */ + } else { + remaining_words = + BCC(smb_buffer_response) / 2; + } + len = + UniStrnlen((wchar_t *) bcc_ptr, + remaining_words - 1); /* We look for obvious messed up bcc or strings in response so we do not go off the end since (at least) WIN2K and Windows XP have a major bug in not null terminating last Unicode string in response */ - ses->serverOS = cifs_kcalloc(2 * (len + 1), GFP_KERNEL); - cifs_strfromUCS_le(ses->serverOS, - (wchar_t *)bcc_ptr, len,nls_codepage); + ses->serverOS = cifs_kcalloc(2 * (len + 1), GFP_KERNEL); + cifs_strfromUCS_le(ses->serverOS, + (wchar_t *)bcc_ptr, len,nls_codepage); + bcc_ptr += 2 * (len + 1); + remaining_words -= len + 1; + ses->serverOS[2 * len] = 0; + ses->serverOS[1 + (2 * len)] = 0; + if (remaining_words > 0) { + len = UniStrnlen((wchar_t *)bcc_ptr, + remaining_words-1); + ses->serverNOS =cifs_kcalloc(2 * (len + 1),GFP_KERNEL); + cifs_strfromUCS_le(ses->serverNOS, + (wchar_t *)bcc_ptr,len,nls_codepage); bcc_ptr += 2 * (len + 1); + ses->serverNOS[2 * len] = 0; + ses->serverNOS[1 + (2 * len)] = 0; remaining_words -= len + 1; - ses->serverOS[2 * len] = 0; - ses->serverOS[1 + (2 * len)] = 0; if (remaining_words > 0) { - len = UniStrnlen((wchar_t *)bcc_ptr, - remaining_words - - 1); - ses->serverNOS =cifs_kcalloc(2 * (len + 1),GFP_KERNEL); - cifs_strfromUCS_le(ses->serverNOS, - (wchar_t *)bcc_ptr,len,nls_codepage); - bcc_ptr += 2 * (len + 1); - ses->serverNOS[2 * len] = 0; - ses->serverNOS[1 + (2 * len)] = 0; - remaining_words -= len + 1; - if (remaining_words > 0) { - len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); + len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ - ses->serverDomain = - cifs_kcalloc(2*(len+1),GFP_KERNEL); - cifs_strfromUCS_le(ses->serverDomain, - (wchar_t *)bcc_ptr,len,nls_codepage); - bcc_ptr += 2 * (len + 1); - ses->serverDomain[2*len] = 0; - ses->serverDomain[1+(2*len)] = 0; - } /* else no more room so create dummy domain string */ - else - ses->serverDomain = - cifs_kcalloc(2, - GFP_KERNEL); - } else { /* no room so create dummy domain and NOS string */ ses->serverDomain = - cifs_kcalloc(2, GFP_KERNEL); - ses->serverNOS = - cifs_kcalloc(2, GFP_KERNEL); - } - } else { /* ASCII */ - len = strnlen(bcc_ptr, 1024); - if (((long) bcc_ptr + len) - (long) - pByteArea(smb_buffer_response) + cifs_kcalloc(2*(len+1),GFP_KERNEL); + cifs_strfromUCS_le(ses->serverDomain, + (wchar_t *)bcc_ptr,len,nls_codepage); + bcc_ptr += 2 * (len + 1); + ses->serverDomain[2*len] = 0; + ses->serverDomain[1+(2*len)] = 0; + } /* else no more room so create dummy domain string */ + else + ses->serverDomain = + cifs_kcalloc(2, + GFP_KERNEL); + } else { /* no room so create dummy domain and NOS string */ + ses->serverDomain = + cifs_kcalloc(2, GFP_KERNEL); + ses->serverNOS = + cifs_kcalloc(2, GFP_KERNEL); + } + } else { /* ASCII */ + len = strnlen(bcc_ptr, 1024); + if (((long) bcc_ptr + len) - (long) + pByteArea(smb_buffer_response) <= BCC(smb_buffer_response)) { - ses->serverOS = cifs_kcalloc(len + 1,GFP_KERNEL); - strncpy(ses->serverOS,bcc_ptr, len); + ses->serverOS = cifs_kcalloc(len + 1,GFP_KERNEL); + strncpy(ses->serverOS,bcc_ptr, len); - bcc_ptr += len; - bcc_ptr[0] = 0; /* null terminate the string */ - bcc_ptr++; + bcc_ptr += len; + bcc_ptr[0] = 0; /* null terminate the string */ + bcc_ptr++; - len = strnlen(bcc_ptr, 1024); - ses->serverNOS = cifs_kcalloc(len + 1,GFP_KERNEL); - strncpy(ses->serverNOS, bcc_ptr, len); - bcc_ptr += len; - bcc_ptr[0] = 0; - bcc_ptr++; + len = strnlen(bcc_ptr, 1024); + ses->serverNOS = cifs_kcalloc(len + 1,GFP_KERNEL); + strncpy(ses->serverNOS, bcc_ptr, len); + bcc_ptr += len; + bcc_ptr[0] = 0; + bcc_ptr++; - len = strnlen(bcc_ptr, 1024); - ses->serverDomain = cifs_kcalloc(len + 1,GFP_KERNEL); - strncpy(ses->serverDomain, bcc_ptr, len); - bcc_ptr += len; - bcc_ptr[0] = 0; - bcc_ptr++; - } else - cFYI(1, - ("Variable field of length %d extends beyond end of smb ", - len)); - } - } else { - cERROR(1, - (" Security Blob Length extends beyond end of SMB")); + len = strnlen(bcc_ptr, 1024); + ses->serverDomain = cifs_kcalloc(len + 1,GFP_KERNEL); + strncpy(ses->serverDomain, bcc_ptr, len); + bcc_ptr += len; + bcc_ptr[0] = 0; + bcc_ptr++; + } else + cFYI(1, + ("Variable field of length %d extends beyond end of smb ", + len)); } } else { - cERROR(1, ("No session structure passed in.")); + cERROR(1, + (" Security Blob Length extends beyond end of SMB")); } } else { cERROR(1, @@ -1720,14 +1758,18 @@ SESSION_SETUP_ANDX *pSMB; SESSION_SETUP_ANDX *pSMBr; char *bcc_ptr; - char *user = ses->userName; - char *domain = ses->domainName; + char *user; + char *domain; int rc = 0; int remaining_words = 0; int bytes_returned = 0; int len; cFYI(1, ("In spnego sesssetup ")); + if(ses == NULL) + return -EINVAL; + user = ses->userName; + domain = ses->domainName; smb_buffer = cifs_buf_get(); if (smb_buffer == 0) { @@ -1979,7 +2021,7 @@ SESSION_SETUP_ANDX *pSMB; SESSION_SETUP_ANDX *pSMBr; char *bcc_ptr; - char *domain = ses->domainName; + char *domain; int rc = 0; int remaining_words = 0; int bytes_returned = 0; @@ -1989,6 +2031,9 @@ PCHALLENGE_MESSAGE SecurityBlob2; cFYI(1, ("In NTLMSSP sesssetup (negotiate) ")); + if(ses == NULL) + return -EINVAL; + domain = ses->domainName; *pNTLMv2_flag = FALSE; smb_buffer = cifs_buf_get(); if (smb_buffer == 0) { @@ -2319,8 +2364,8 @@ SESSION_SETUP_ANDX *pSMB; SESSION_SETUP_ANDX *pSMBr; char *bcc_ptr; - char *user = ses->userName; - char *domain = ses->domainName; + char *user; + char *domain; int rc = 0; int remaining_words = 0; int bytes_returned = 0; @@ -2329,7 +2374,10 @@ PAUTHENTICATE_MESSAGE SecurityBlob; cFYI(1, ("In NTLMSSPSessSetup (Authenticate)")); - + if(ses == NULL) + return -EINVAL; + user = ses->userName; + domain = ses->domainName; smb_buffer = cifs_buf_get(); if (smb_buffer == 0) { return -ENOMEM; diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c --- a/fs/cifs/file.c 2004-09-06 16:37:50 -07:00 +++ b/fs/cifs/file.c 2004-09-06 16:37:50 -07:00 @@ -148,7 +148,7 @@ and the first handle has writebehind data, we might be able to simply do a filemap_fdatawrite/filemap_fdatawait first */ buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); - if(buf==0) { + if(buf== NULL) { if (full_path) kfree(full_path); FreeXid(xid); @@ -1687,8 +1687,12 @@ } data = kmalloc(bufsize, GFP_KERNEL); pfindData = (FILE_DIRECTORY_INFO *) data; - + if(data == NULL) { + FreeXid(xid); + return -ENOMEM; + } if(file->f_dentry == NULL) { + kfree(data); FreeXid(xid); return -EIO; } @@ -1696,7 +1700,11 @@ full_path = build_wildcard_path_from_dentry(file->f_dentry); up(&file->f_dentry->d_sb->s_vfs_rename_sem); - + if(full_path == NULL) { + kfree(data); + FreeXid(xid); + return -ENOMEM; + } cFYI(1, ("Full path: %s start at: %lld ", full_path, file->f_pos)); switch ((int) file->f_pos) { @@ -1784,6 +1792,10 @@ cFYI(1,("Last file: %s with name %d bytes long", lastFindData->FileName, cifsFile->resume_name_length)); + if(cifsFile->search_resume_name == NULL) { + rc = -ENOMEM; + break; + } memcpy(cifsFile->search_resume_name, lastFindData->FileName, cifsFile->resume_name_length); @@ -1813,6 +1825,10 @@ cFYI(1,("Last file: %s with name %d bytes long", pfindDataUnix->FileName, cifsFile->resume_name_length)); + if(cifsFile->search_resume_name == NULL) { + rc = -ENOMEM; + break; + } memcpy(cifsFile->search_resume_name, pfindDataUnix->FileName, cifsFile->resume_name_length); @@ -1966,6 +1982,11 @@ cFYI(1,("Last file: %s with name %d bytes long", lastFindData->FileName, cifsFile->resume_name_length)); + if(cifsFile->search_resume_name == NULL) { + rc = -ENOMEM; + break; + } + memcpy(cifsFile->search_resume_name, lastFindData->FileName, cifsFile->resume_name_length); @@ -2001,6 +2022,10 @@ cFYI(1,("fnext last file: %s with name %d bytes long", pfindDataUnix->FileName, cifsFile->resume_name_length)); + if(cifsFile->search_resume_name == NULL) { + rc = -ENOMEM; + break; + } memcpy(cifsFile->search_resume_name, pfindDataUnix->FileName, cifsFile->resume_name_length); diff -Nru a/fs/cifs/inode.c b/fs/cifs/inode.c --- a/fs/cifs/inode.c 2004-09-06 16:37:50 -07:00 +++ b/fs/cifs/inode.c 2004-09-06 16:37:50 -07:00 @@ -201,6 +201,8 @@ /* if file info not passed in then get it from server */ if(pfindData == NULL) { buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); + if(buf == NULL) + return -ENOMEM; pfindData = (FILE_ALL_INFO *)buf; /* could do find first instead but this returns more info */ rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData, @@ -293,7 +295,7 @@ /* 512 bytes (2**9) is the fake blocksize that must be used */ /* for this calculation */ - inode->i_blocks = (512 - 1 + pfindData->AllocationSize) + inode->i_blocks = (512 - 1 + le64_to_cpu(pfindData->AllocationSize)) >> 9; } pfindData->AllocationSize = le64_to_cpu(pfindData->AllocationSize); diff -Nru a/fs/cifs/link.c b/fs/cifs/link.c --- a/fs/cifs/link.c 2004-09-06 16:37:51 -07:00 +++ b/fs/cifs/link.c 2004-09-06 16:37:51 -07:00 @@ -20,6 +20,7 @@ */ #include #include +#include #include "cifsfs.h" #include "cifspdu.h" #include "cifsglob.h" @@ -94,7 +95,7 @@ int rc = -EACCES; int xid; char *full_path = NULL; - char * target_path; + char * target_path = ERR_PTR(-ENOMEM); struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon; @@ -104,22 +105,17 @@ full_path = build_path_from_dentry(direntry); up(&direntry->d_sb->s_vfs_rename_sem); - if(full_path == NULL) { - FreeXid(xid); - return -ENOMEM; - } + if (!full_path) + goto out_no_free; + cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); cifs_sb = CIFS_SB(inode->i_sb); pTcon = cifs_sb->tcon; target_path = kmalloc(PATH_MAX, GFP_KERNEL); - if(target_path == NULL) { - if (full_path) - kfree(full_path); - FreeXid(xid); - return -ENOMEM; + if (!target_path) { + target_path = ERR_PTR(-ENOMEM); + goto out; } - /* can not call the following line due to EFAULT in vfs_readlink which is presumably expecting a user space buffer */ - /* length = cifs_readlink(direntry,target_path, sizeof(target_path) - 1); */ /* BB add read reparse point symlink code and Unix extensions symlink code here BB */ if (pTcon->ses->capabilities & CAP_UNIX) @@ -130,25 +126,25 @@ else { /* rc = CIFSSMBQueryReparseLinkInfo */ /* BB Add code to Query ReparsePoint info */ + /* BB Add MAC style xsymlink check here if enabled */ } - /* BB Anything else to do to handle recursive links? */ - /* BB Should we be using page symlink ops here? */ if (rc == 0) { /* BB Add special case check for Samba DFS symlinks */ target_path[PATH_MAX-1] = 0; - rc = vfs_follow_link(nd, target_path); + } else { + kfree(target_path); + target_path = ERR_PTR(rc); } - /* else EACCESS */ - if (target_path) - kfree(target_path); - if (full_path) - kfree(full_path); +out: + kfree(full_path); +out_no_free: FreeXid(xid); - return rc; + nd_set_link(nd, target_path); + return 0; } int @@ -297,10 +293,7 @@ if(referrals) kfree(referrals); kfree(tmp_path); - if(referrals) { - kfree(referrals); - } - } +} /* BB add code like else decode referrals then memcpy to tmpbuffer and free referrals string array BB */ } @@ -325,4 +318,11 @@ } FreeXid(xid); return rc; +} + +void cifs_put_link(struct dentry *direntry, struct nameidata *nd) +{ + char *p = nd_get_link(nd); + if (!IS_ERR(p)) + kfree(p); } diff -Nru a/fs/cifs/misc.c b/fs/cifs/misc.c --- a/fs/cifs/misc.c 2004-09-06 16:37:55 -07:00 +++ b/fs/cifs/misc.c 2004-09-06 16:37:55 -07:00 @@ -276,7 +276,7 @@ } if (treeCon->Flags & SMB_SHARE_IS_IN_DFS) buffer->Flags2 |= SMBFLG2_DFS; - if(treeCon->ses->server) + if((treeCon->ses) && (treeCon->ses->server)) if(treeCon->ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; diff -Nru a/fs/cifs/transport.c b/fs/cifs/transport.c --- a/fs/cifs/transport.c 2004-09-06 16:37:51 -07:00 +++ b/fs/cifs/transport.c 2004-09-06 16:37:51 -07:00 @@ -181,7 +181,7 @@ { int rc = 0; unsigned int receive_len; - long timeout; + unsigned long timeout; struct mid_q_entry *midQ; if (ses == NULL) { @@ -307,23 +307,25 @@ if (signal_pending(current)) { /* if signal pending do not hold up user for full smb timeout but we still give response a change to complete */ - if(midQ->midState & MID_REQUEST_SUBMITTED) { - set_current_state(TASK_UNINTERRUPTIBLE); - timeout = sleep_on_timeout(&ses->server->response_q,2 * HZ); - } - } else { /* using normal timeout */ - /* timeout = wait_event_interruptible_timeout(ses->server->response_q, + timeout = 2 * HZ; + + } + + /* No user interrupts in wait - wreaks havoc with performance */ + if(timeout != MAX_SCHEDULE_TIMEOUT) { + timeout += jiffies; + wait_event(ses->server->response_q, (midQ->midState & MID_RESPONSE_RECEIVED) || + time_after(jiffies, timeout) || ((ses->server->tcpStatus != CifsGood) && - (ses->server->tcpStatus != CifsNew)), - timeout); */ - /* Can not allow user interrupts- wreaks havoc with performance */ - if(midQ->midState & MID_REQUEST_SUBMITTED) { - set_current_state(TASK_UNINTERRUPTIBLE); - timeout = sleep_on_timeout(&ses->server->response_q,timeout); - } + (ses->server->tcpStatus != CifsNew))); + } else { + wait_event(ses->server->response_q, + (midQ->midState & MID_RESPONSE_RECEIVED) || + ((ses->server->tcpStatus != CifsGood) && + (ses->server->tcpStatus != CifsNew))); } - + spin_lock(&GlobalMid_Lock); if (midQ->resp_buf) { spin_unlock(&GlobalMid_Lock); diff -Nru a/fs/coda/coda_linux.c b/fs/coda/coda_linux.c --- a/fs/coda/coda_linux.c 2004-09-06 16:37:50 -07:00 +++ b/fs/coda/coda_linux.c 2004-09-06 16:37:50 -07:00 @@ -28,7 +28,7 @@ char * coda_f2s(struct CodaFid *f) { static char s[60]; -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]); #else sprintf(s, "(%08x.%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2], f->opaque[3]); diff -Nru a/fs/coda/file.c b/fs/coda/file.c --- a/fs/coda/file.c 2004-09-06 16:37:52 -07:00 +++ b/fs/coda/file.c 2004-09-06 16:37:52 -07:00 @@ -45,6 +45,23 @@ } static ssize_t +coda_file_sendfile(struct file *coda_file, loff_t *ppos, size_t count, + read_actor_t actor, void __user *target) +{ + struct coda_file_info *cfi; + struct file *host_file; + + cfi = CODA_FTOC(coda_file); + BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + host_file = cfi->cfi_container; + + if (!host_file->f_op || !host_file->f_op->sendfile) + return -EINVAL; + + return host_file->f_op->sendfile(host_file, ppos, count, actor, target); +} + +static ssize_t coda_file_write(struct file *coda_file, const char __user *buf, size_t count, loff_t *ppos) { struct inode *host_inode, *coda_inode = coda_file->f_dentry->d_inode; @@ -278,5 +295,6 @@ .flush = coda_flush, .release = coda_release, .fsync = coda_fsync, + .sendfile = coda_file_sendfile, }; diff -Nru a/fs/coda/inode.c b/fs/coda/inode.c --- a/fs/coda/inode.c 2004-09-06 16:37:52 -07:00 +++ b/fs/coda/inode.c 2004-09-06 16:37:52 -07:00 @@ -69,7 +69,7 @@ { coda_inode_cachep = kmem_cache_create("coda_inode_cache", sizeof(struct coda_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (coda_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/coda/psdev.c b/fs/coda/psdev.c --- a/fs/coda/psdev.c 2004-09-06 16:37:53 -07:00 +++ b/fs/coda/psdev.c 2004-09-06 16:37:53 -07:00 @@ -405,7 +405,7 @@ int status; int i; printk(KERN_INFO "Coda Kernel/Venus communications, " -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API "v5.3.20" #else "v6.0.0" diff -Nru a/fs/coda/upcall.c b/fs/coda/upcall.c --- a/fs/coda/upcall.c 2004-09-06 16:37:54 -07:00 +++ b/fs/coda/upcall.c 2004-09-06 16:37:54 -07:00 @@ -55,7 +55,7 @@ inp->ih.opcode = opcode; inp->ih.pid = current->pid; inp->ih.pgid = process_group(current); -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API memset(&inp->ih.cred, 0, sizeof(struct coda_cred)); inp->ih.cred.cr_fsuid = current->fsuid; #else @@ -172,7 +172,7 @@ union inputArgs *inp; union outputArgs *outp; int insize, outsize, error; -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API struct coda_cred cred = { 0, }; cred.cr_fsuid = uid; #endif @@ -180,7 +180,7 @@ insize = SIZE(store); UPARG(CODA_STORE); -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API memcpy(&(inp->ih.cred), &cred, sizeof(cred)); #else inp->ih.uid = uid; @@ -219,7 +219,7 @@ union inputArgs *inp; union outputArgs *outp; int insize, outsize, error; -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API struct coda_cred cred = { 0, }; cred.cr_fsuid = uid; #endif @@ -227,7 +227,7 @@ insize = SIZE(release); UPARG(CODA_CLOSE); -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API memcpy(&(inp->ih.cred), &cred, sizeof(cred)); #else inp->ih.uid = uid; diff -Nru a/fs/compat.c b/fs/compat.c --- a/fs/compat.c 2004-09-06 16:37:52 -07:00 +++ b/fs/compat.c 2004-09-06 16:37:52 -07:00 @@ -291,8 +291,8 @@ __initcall(init_sys32_ioctl); -int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, - unsigned int, unsigned long, struct file *)) +int register_ioctl32_conversion(unsigned int cmd, + ioctl_trans_handler_t handler) { struct ioctl_trans *t; struct ioctl_trans *new_t; @@ -429,6 +429,8 @@ fn = d_path(filp->f_dentry, filp->f_vfsmnt, path, PAGE_SIZE); + if (IS_ERR(fn)) + fn = "?"; } sprintf(buf,"'%c'", (cmd>>24) & 0x3f); @@ -979,19 +981,14 @@ dirent = buf->previous; if (dirent) { - if (__put_user(offset, (u32 __user *)&dirent->d_off)) - goto efault; - if (__put_user(offset >> 32, - ((u32 __user *)&dirent->d_off) + 1)) + if (__put_user_unaligned(offset, &dirent->d_off)) goto efault; } dirent = buf->current_dir; - if ((__put_user(ino, (u32 __user *)&dirent->d_ino)) - || (__put_user(ino >> 32, ((u32 __user *)&dirent->d_ino) + 1))) + if (__put_user_unaligned(ino, &dirent->d_ino)) goto efault; off = 0; - if ((__put_user(off, (u32 __user *)&dirent->d_off)) - || (__put_user(off >> 32, ((u32 __user *)&dirent->d_off) + 1))) + if (__put_user_unaligned(off, &dirent->d_off)) goto efault; if (__put_user(reclen, &dirent->d_reclen)) goto efault; @@ -1040,8 +1037,7 @@ lastdirent = buf.previous; if (lastdirent) { typeof(lastdirent->d_off) d_off = file->f_pos; - __put_user(d_off, (u32 __user *)&lastdirent->d_off); - __put_user(d_off >> 32, ((u32 __user *)&lastdirent->d_off) + 1); + __put_user_unaligned(d_off, &lastdirent->d_off); error = count - buf.count; } @@ -1373,14 +1369,14 @@ int retval; int i; - sched_balance_exec(); - file = open_exec(filename); retval = PTR_ERR(file); if (IS_ERR(file)) return retval; + sched_exec(); + bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0])); @@ -1390,6 +1386,8 @@ bprm.sh_bang = 0; bprm.loader = 0; bprm.exec = 0; + bprm.interp_flags = 0; + bprm.interp_data = 0; bprm.security = NULL; bprm.mm = mm_alloc(); retval = -ENOMEM; diff -Nru a/fs/dcache.c b/fs/dcache.c --- a/fs/dcache.c 2004-09-06 16:37:51 -07:00 +++ b/fs/dcache.c 2004-09-06 16:37:51 -07:00 @@ -144,6 +144,8 @@ return; repeat: + if (atomic_read(&dentry->d_count) == 1) + might_sleep(); if (!atomic_dec_and_lock(&dentry->d_count, &dcache_lock)) return; diff -Nru a/fs/devpts/inode.c b/fs/devpts/inode.c --- a/fs/devpts/inode.c 2004-09-06 16:37:51 -07:00 +++ b/fs/devpts/inode.c 2004-09-06 16:37:51 -07:00 @@ -179,8 +179,12 @@ struct dentry *dentry = get_node(number); struct tty_struct *tty; - tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL : - dentry->d_inode->u.generic_ip; + tty = NULL; + if (!IS_ERR(dentry)) { + if (dentry->d_inode) + tty = dentry->d_inode->u.generic_ip; + dput(dentry); + } up(&devpts_root->d_inode->i_sem); diff -Nru a/fs/efs/super.c b/fs/efs/super.c --- a/fs/efs/super.c 2004-09-06 16:37:54 -07:00 +++ b/fs/efs/super.c 2004-09-06 16:37:54 -07:00 @@ -58,7 +58,7 @@ { efs_inode_cachep = kmem_cache_create("efs_inode_cache", sizeof(struct efs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (efs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/exec.c b/fs/exec.c --- a/fs/exec.c 2004-09-06 16:37:52 -07:00 +++ b/fs/exec.c 2004-09-06 16:37:52 -07:00 @@ -433,7 +433,7 @@ mpnt->vm_flags |= mm->def_flags; mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7]; insert_vm_struct(mm, mpnt); - mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; + mm->stack_vm = mm->total_vm = vma_pages(mpnt); } for (i = 0 ; i < MAX_ARG_PAGES ; i++) { @@ -546,6 +546,7 @@ tsk->active_mm = mm; activate_mm(active_mm, mm); task_unlock(tsk); + arch_pick_mmap_layout(mm); if (old_mm) { if (active_mm != old_mm) BUG(); mmput(old_mm); @@ -1102,7 +1103,7 @@ if (IS_ERR(file)) return retval; - sched_balance_exec(); + sched_exec(); bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0])); @@ -1210,7 +1211,7 @@ * name into corename, which must have space for at least * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. */ -void format_corename(char *corename, const char *pattern, long signr) +static void format_corename(char *corename, const char *pattern, long signr) { const char *pat_ptr = pattern; char *out_ptr = corename; @@ -1374,7 +1375,6 @@ struct file * file; int retval = 0; - lock_kernel(); binfmt = current->binfmt; if (!binfmt || !binfmt->core_dump) goto fail; @@ -1392,7 +1392,13 @@ if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) goto fail_unlock; - format_corename(corename, core_pattern, signr); + /* + * lock_kernel() because format_corename() is controlled by sysctl, which + * uses lock_kernel() + */ + lock_kernel(); + format_corename(corename, core_pattern, signr); + unlock_kernel(); file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE, 0600); if (IS_ERR(file)) goto fail_unlock; @@ -1419,6 +1425,5 @@ fail_unlock: complete_all(&mm->core_done); fail: - unlock_kernel(); return retval; } diff -Nru a/fs/ext2/balloc.c b/fs/ext2/balloc.c --- a/fs/ext2/balloc.c 2004-09-06 16:37:52 -07:00 +++ b/fs/ext2/balloc.c 2004-09-06 16:37:52 -07:00 @@ -88,8 +88,8 @@ if (!bh) ext2_error (sb, "read_block_bitmap", "Cannot read block bitmap - " - "block_group = %d, block_bitmap = %lu", - block_group, (unsigned long) desc->bg_block_bitmap); + "block_group = %d, block_bitmap = %u", + block_group, le32_to_cpu(desc->bg_block_bitmap)); error_out: return bh; } diff -Nru a/fs/ext2/ext2.h b/fs/ext2/ext2.h --- a/fs/ext2/ext2.h 2004-09-06 16:37:55 -07:00 +++ b/fs/ext2/ext2.h 2004-09-06 16:37:55 -07:00 @@ -131,9 +131,6 @@ /* super.c */ extern void ext2_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); -extern NORET_TYPE void ext2_panic (struct super_block *, const char *, - const char *, ...) - __attribute__ ((NORET_AND format (printf, 3, 4))); extern void ext2_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); extern void ext2_update_dynamic_rev (struct super_block *sb); diff -Nru a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c --- a/fs/ext2/ialloc.c 2004-09-06 16:37:53 -07:00 +++ b/fs/ext2/ialloc.c 2004-09-06 16:37:53 -07:00 @@ -57,8 +57,8 @@ if (!bh) ext2_error(sb, "read_inode_bitmap", "Cannot read inode bitmap - " - "block_group = %lu, inode_bitmap = %lu", - block_group, (unsigned long) desc->bg_inode_bitmap); + "block_group = %lu, inode_bitmap = %u", + block_group, le32_to_cpu(desc->bg_inode_bitmap)); error_out: return bh; } diff -Nru a/fs/ext2/super.c b/fs/ext2/super.c --- a/fs/ext2/super.c 2004-09-06 16:37:53 -07:00 +++ b/fs/ext2/super.c 2004-09-06 16:37:53 -07:00 @@ -190,7 +190,7 @@ { ext2_inode_cachep = kmem_cache_create("ext2_inode_cache", sizeof(struct ext2_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (ext2_inode_cachep == NULL) return -ENOMEM; @@ -573,6 +573,7 @@ int blocksize = BLOCK_SIZE; int db_count; int i, j; + __u32 features; sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) @@ -662,17 +663,18 @@ * previously didn't change the revision level when setting the flags, * so there is a chance incompat flags are set on a rev 0 filesystem. */ - if ((i = EXT2_HAS_INCOMPAT_FEATURE(sb, ~EXT2_FEATURE_INCOMPAT_SUPP))) { + features = EXT2_HAS_INCOMPAT_FEATURE(sb, ~EXT2_FEATURE_INCOMPAT_SUPP); + if (features) { printk("EXT2-fs: %s: couldn't mount because of " "unsupported optional features (%x).\n", - sb->s_id, i); + sb->s_id, le32_to_cpu(features)); goto failed_mount; } if (!(sb->s_flags & MS_RDONLY) && - (i = EXT2_HAS_RO_COMPAT_FEATURE(sb, ~EXT2_FEATURE_RO_COMPAT_SUPP))){ + (features = EXT2_HAS_RO_COMPAT_FEATURE(sb, ~EXT2_FEATURE_RO_COMPAT_SUPP))){ printk("EXT2-fs: %s: couldn't mount RDWR because of " "unsupported optional features (%x).\n", - sb->s_id, i); + sb->s_id, le32_to_cpu(features)); goto failed_mount; } blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); @@ -938,12 +940,12 @@ es->s_state = cpu_to_le16(sbi->s_mount_state); es->s_mtime = cpu_to_le32(get_seconds()); } else { - int ret; - if ((ret = EXT2_HAS_RO_COMPAT_FEATURE(sb, - ~EXT2_FEATURE_RO_COMPAT_SUPP))) { + __u32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb, + ~EXT2_FEATURE_RO_COMPAT_SUPP); + if (ret) { printk("EXT2-fs: %s: couldn't remount RDWR because of " "unsupported optional features (%x).\n", - sb->s_id, ret); + sb->s_id, le32_to_cpu(ret)); return -EROFS; } /* diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c --- a/fs/ext3/inode.c 2004-09-06 16:37:53 -07:00 +++ b/fs/ext3/inode.c 2004-09-06 16:37:53 -07:00 @@ -66,6 +66,8 @@ { int err; + might_sleep(); + BUFFER_TRACE(bh, "enter"); jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, " @@ -2966,6 +2968,7 @@ struct ext3_iloc iloc; int err; + might_sleep(); err = ext3_reserve_inode_write(handle, inode, &iloc); if (!err) err = ext3_mark_iloc_dirty(handle, inode, &iloc); diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c --- a/fs/ext3/super.c 2004-09-06 16:37:54 -07:00 +++ b/fs/ext3/super.c 2004-09-06 16:37:54 -07:00 @@ -477,7 +477,7 @@ { ext3_inode_cachep = kmem_cache_create("ext3_inode_cache", sizeof(struct ext3_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (ext3_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/fat/cache.c b/fs/fat/cache.c --- a/fs/fat/cache.c 2004-09-06 16:37:54 -07:00 +++ b/fs/fat/cache.c 2004-09-06 16:37:54 -07:00 @@ -146,7 +146,8 @@ sbi->cache = sbi->cache_array; } -void fat_cache_lookup(struct inode *inode, int cluster, int *f_clu, int *d_clu) +static void +fat_cache_lookup(struct inode *inode, int cluster, int *f_clu, int *d_clu) { struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); struct fat_cache *walk; diff -Nru a/fs/fat/dir.c b/fs/fat/dir.c --- a/fs/fat/dir.c 2004-09-06 16:37:50 -07:00 +++ b/fs/fat/dir.c 2004-09-06 16:37:50 -07:00 @@ -745,12 +745,12 @@ memcpy(de[0].name,MSDOS_DOT,MSDOS_NAME); memcpy(de[1].name,MSDOS_DOTDOT,MSDOS_NAME); de[0].attr = de[1].attr = ATTR_DIR; - de[0].time = de[1].time = CT_LE_W(time); - de[0].date = de[1].date = CT_LE_W(date); + de[0].time = de[1].time = time; + de[0].date = de[1].date = date; if (is_vfat) { /* extra timestamps */ - de[0].ctime = de[1].ctime = CT_LE_W(time); + de[0].ctime = de[1].ctime = time; de[0].adate = de[0].cdate = - de[1].adate = de[1].cdate = CT_LE_W(date); + de[1].adate = de[1].cdate = date; } de[0].start = CT_LE_W(MSDOS_I(dir)->i_logstart); de[0].starthi = CT_LE_W(MSDOS_I(dir)->i_logstart>>16); diff -Nru a/fs/fat/file.c b/fs/fat/file.c --- a/fs/fat/file.c 2004-09-06 16:37:51 -07:00 +++ b/fs/fat/file.c 2004-09-06 16:37:51 -07:00 @@ -90,12 +90,6 @@ const unsigned int cluster_size = sbi->cluster_size; int nr_clusters; - /* Why no return value? Surely the disk could fail... */ - if (IS_RDONLY (inode)) - return /* -EPERM */; - if (IS_IMMUTABLE(inode)) - return /* -EPERM */; - /* * This protects against truncating a file bigger than it was then * trying to write into the hole. diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c --- a/fs/fat/inode.c 2004-09-06 16:37:52 -07:00 +++ b/fs/fat/inode.c 2004-09-06 16:37:52 -07:00 @@ -59,7 +59,7 @@ #define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) #define FAT_HASH_MASK (FAT_HASH_SIZE-1) static struct list_head fat_inode_hashtable[FAT_HASH_SIZE]; -spinlock_t fat_inode_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t fat_inode_lock = SPIN_LOCK_UNLOCKED; void fat_hash_init(void) { @@ -579,12 +579,11 @@ * of i_logstart is used to store the directory entry offset. */ -struct dentry *fat_decode_fh(struct super_block *sb, __u32 *fh, - int len, int fhtype, - int (*acceptable)(void *context, struct dentry *de), - void *context) +static struct dentry * +fat_decode_fh(struct super_block *sb, __u32 *fh, int len, int fhtype, + int (*acceptable)(void *context, struct dentry *de), + void *context) { - if (fhtype != 3) return ERR_PTR(-ESTALE); if (len < 5) @@ -593,7 +592,7 @@ return sb->s_export_op->find_exported_dentry(sb, fh, NULL, acceptable, context); } -struct dentry *fat_get_dentry(struct super_block *sb, void *inump) +static struct dentry *fat_get_dentry(struct super_block *sb, void *inump) { struct inode *inode = NULL; struct dentry *result; @@ -653,7 +652,8 @@ return result; } -int fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable) +static int +fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable) { int len = *lenp; struct inode *inode = de->d_inode; @@ -676,7 +676,7 @@ return 3; } -struct dentry *fat_get_parent(struct dentry *child) +static struct dentry *fat_get_parent(struct dentry *child) { struct buffer_head *bh=NULL; struct msdos_dir_entry *de = NULL; @@ -744,7 +744,7 @@ { fat_inode_cachep = kmem_cache_create("fat_inode_cache", sizeof(struct msdos_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (fat_inode_cachep == NULL) return -ENOMEM; @@ -1268,14 +1268,10 @@ MSDOS_I(inode)->i_attrs; raw_entry->start = CT_LE_W(MSDOS_I(inode)->i_logstart); raw_entry->starthi = CT_LE_W(MSDOS_I(inode)->i_logstart >> 16); - fat_date_unix2dos(inode->i_mtime.tv_sec,&raw_entry->time,&raw_entry->date); - raw_entry->time = CT_LE_W(raw_entry->time); - raw_entry->date = CT_LE_W(raw_entry->date); + fat_date_unix2dos(inode->i_mtime.tv_sec, &raw_entry->time, &raw_entry->date); if (MSDOS_SB(sb)->options.isvfat) { fat_date_unix2dos(inode->i_ctime.tv_sec,&raw_entry->ctime,&raw_entry->cdate); raw_entry->ctime_ms = MSDOS_I(inode)->i_ctime_ms; /* use i_ctime.tv_nsec? */ - raw_entry->ctime = CT_LE_W(raw_entry->ctime); - raw_entry->cdate = CT_LE_W(raw_entry->cdate); } spin_unlock(&fat_inode_lock); mark_buffer_dirty(bh); diff -Nru a/fs/fat/misc.c b/fs/fat/misc.c --- a/fs/fat/misc.c 2004-09-06 16:37:54 -07:00 +++ b/fs/fat/misc.c 2004-09-06 16:37:54 -07:00 @@ -254,8 +254,8 @@ if (unix_date < 315532800) unix_date = 315532800; - *time = (unix_date % 60)/2+(((unix_date/60) % 60) << 5)+ - (((unix_date/3600) % 24) << 11); + *time = cpu_to_le16((unix_date % 60)/2+(((unix_date/60) % 60) << 5)+ + (((unix_date/3600) % 24) << 11)); day = unix_date/86400-3652; year = day/365; if ((year+3)/4+365*year > day) year--; @@ -269,7 +269,7 @@ for (month = 0; month < 12; month++) if (day_n[month] > nl_day) break; } - *date = nl_day-day_n[month-1]+1+(month << 5)+(year << 9); + *date = cpu_to_le16(nl_day-day_n[month-1]+1+(month << 5)+(year << 9)); } diff -Nru a/fs/fcntl.c b/fs/fcntl.c --- a/fs/fcntl.c 2004-09-06 16:37:53 -07:00 +++ b/fs/fcntl.c 2004-09-06 16:37:53 -07:00 @@ -497,11 +497,9 @@ send_sigio_to_task(p, fown, fd, band); } } else { - struct list_head *l; - struct pid *pidptr; - for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr) { + do_each_task_pid(-pid, PIDTYPE_PGID, p) { send_sigio_to_task(p, fown, fd, band); - } + } while_each_task_pid(-pid, PIDTYPE_PGID, p); } read_unlock(&tasklist_lock); out_unlock_fown: @@ -534,11 +532,9 @@ send_sigurg_to_task(p, fown); } } else { - struct list_head *l; - struct pid *pidptr; - for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr) { + do_each_task_pid(-pid, PIDTYPE_PGID, p) { send_sigurg_to_task(p, fown); - } + } while_each_task_pid(-pid, PIDTYPE_PGID, p); } read_unlock(&tasklist_lock); out_unlock_fown: diff -Nru a/fs/file_table.c b/fs/file_table.c --- a/fs/file_table.c 2004-09-06 16:37:50 -07:00 +++ b/fs/file_table.c 2004-09-06 16:37:50 -07:00 @@ -123,6 +123,7 @@ struct vfsmount *mnt = file->f_vfsmnt; struct inode *inode = dentry->d_inode; + might_sleep(); /* * The function eventpoll_release() should be the first called * in the file cleanup chain. diff -Nru a/fs/freevxfs/vxfs_extern.h b/fs/freevxfs/vxfs_extern.h --- a/fs/freevxfs/vxfs_extern.h 2004-09-06 16:37:55 -07:00 +++ b/fs/freevxfs/vxfs_extern.h 2004-09-06 16:37:55 -07:00 @@ -59,7 +59,7 @@ extern struct vxfs_inode_info * vxfs_blkiget(struct super_block *, u_long, ino_t); extern struct vxfs_inode_info * vxfs_stiget(struct super_block *, ino_t); extern void vxfs_read_inode(struct inode *); -extern void vxfs_put_inode(struct inode *); +extern void vxfs_clear_inode(struct inode *); /* vxfs_lookup.c */ extern struct inode_operations vxfs_dir_inode_ops; diff -Nru a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c --- a/fs/freevxfs/vxfs_inode.c 2004-09-06 16:37:51 -07:00 +++ b/fs/freevxfs/vxfs_inode.c 2004-09-06 16:37:51 -07:00 @@ -337,16 +337,15 @@ } /** - * vxfs_put_inode - remove inode from main memory + * vxfs_clear_inode - remove inode from main memory * @ip: inode to discard. * * Description: - * vxfs_put_inode() is called on each iput. If we are the last - * link in memory, free the fspriv inode area. + * vxfs_clear_inode() is called on the final iput and frees the private + * inode area. */ void -vxfs_put_inode(struct inode *ip) +vxfs_clear_inode(struct inode *ip) { - if (atomic_read(&ip->i_count) == 1) - kmem_cache_free(vxfs_inode_cachep, ip->u.generic_ip); + kmem_cache_free(vxfs_inode_cachep, ip->u.generic_ip); } diff -Nru a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c --- a/fs/freevxfs/vxfs_super.c 2004-09-06 16:37:54 -07:00 +++ b/fs/freevxfs/vxfs_super.c 2004-09-06 16:37:54 -07:00 @@ -60,7 +60,7 @@ static struct super_operations vxfs_super_ops = { .read_inode = vxfs_read_inode, - .put_inode = vxfs_put_inode, + .clear_inode = vxfs_clear_inode, .put_super = vxfs_put_super, .statfs = vxfs_statfs, .remount_fs = vxfs_remount, diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c --- a/fs/fs-writeback.c 2004-09-06 16:37:55 -07:00 +++ b/fs/fs-writeback.c 2004-09-06 16:37:55 -07:00 @@ -398,6 +398,7 @@ { struct super_block *sb; + might_sleep(); spin_lock(&inode_lock); spin_lock(&sb_lock); restart: @@ -553,6 +554,7 @@ if (inode->i_mapping->backing_dev_info->memory_backed) return; + might_sleep(); spin_lock(&inode_lock); __writeback_single_inode(inode, &wbc); spin_unlock(&inode_lock); diff -Nru a/fs/hfs/inode.c b/fs/hfs/inode.c --- a/fs/hfs/inode.c 2004-09-06 16:37:55 -07:00 +++ b/fs/hfs/inode.c 2004-09-06 16:37:55 -07:00 @@ -609,6 +609,7 @@ .read = generic_file_read, .write = generic_file_write, .mmap = generic_file_mmap, + .sendfile = generic_file_sendfile, .fsync = file_fsync, .open = hfs_file_open, .release = hfs_file_release, diff -Nru a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c --- a/fs/hfsplus/inode.c 2004-09-06 16:37:51 -07:00 +++ b/fs/hfsplus/inode.c 2004-09-06 16:37:51 -07:00 @@ -308,6 +308,7 @@ .read = generic_file_read, .write = generic_file_write, .mmap = generic_file_mmap, + .sendfile = generic_file_sendfile, .fsync = file_fsync, .open = hfsplus_file_open, .release = hfsplus_file_release, diff -Nru a/fs/hostfs/Makefile b/fs/hostfs/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hostfs/Makefile 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,26 @@ +# +# Copyright (C) 2000 Jeff Dike (jdike@karaya.com) +# Licensed under the GPL +# + +# struct stat64 changed the inode field name between 2.2 and 2.4 from st_ino +# to __st_ino. It stayed in the same place, so as long as the correct name +# is used, hostfs compiled on 2.2 should work on 2.4 and vice versa. + +STAT64_INO_FIELD := $(shell grep -q __st_ino /usr/include/bits/stat.h && \ + echo __)st_ino + +hostfs-objs := hostfs_kern.o hostfs_user.o + +obj-y = +obj-$(CONFIG_HOSTFS) += hostfs.o + +SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs)) + +USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(SINGLE_OBJS)) +USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) + +USER_CFLAGS += -DSTAT64_INO_FIELD=$(STAT64_INO_FIELD) + +$(USER_OBJS) : %.o: %.c + $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< diff -Nru a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hostfs/hostfs.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,79 @@ +#ifndef __UM_FS_HOSTFS +#define __UM_FS_HOSTFS + +#include "os.h" + +/* These are exactly the same definitions as in fs.h, but the names are + * changed so that this file can be included in both kernel and user files. + */ + +#define HOSTFS_ATTR_MODE 1 +#define HOSTFS_ATTR_UID 2 +#define HOSTFS_ATTR_GID 4 +#define HOSTFS_ATTR_SIZE 8 +#define HOSTFS_ATTR_ATIME 16 +#define HOSTFS_ATTR_MTIME 32 +#define HOSTFS_ATTR_CTIME 64 +#define HOSTFS_ATTR_ATIME_SET 128 +#define HOSTFS_ATTR_MTIME_SET 256 +#define HOSTFS_ATTR_FORCE 512 /* Not a change, but a change it */ +#define HOSTFS_ATTR_ATTR_FLAG 1024 + +struct hostfs_iattr { + unsigned int ia_valid; + mode_t ia_mode; + uid_t ia_uid; + gid_t ia_gid; + loff_t ia_size; + struct timespec ia_atime; + struct timespec ia_mtime; + struct timespec ia_ctime; + unsigned int ia_attr_flags; +}; + +extern int stat_file(const char *path, unsigned long long *inode_out, + int *mode_out, int *nlink_out, int *uid_out, int *gid_out, + unsigned long long *size_out, struct timespec *atime_out, + struct timespec *mtime_out, struct timespec *ctime_out, + int *blksize_out, unsigned long long *blocks_out); +extern int access_file(char *path, int r, int w, int x); +extern int open_file(char *path, int r, int w, int append); +extern int file_type(const char *path, int *rdev); +extern void *open_dir(char *path, int *err_out); +extern char *read_dir(void *stream, unsigned long long *pos, + unsigned long long *ino_out, int *len_out); +extern void close_file(void *stream); +extern void close_dir(void *stream); +extern int read_file(int fd, unsigned long long *offset, char *buf, int len); +extern int write_file(int fd, unsigned long long *offset, const char *buf, + int len); +extern int lseek_file(int fd, long long offset, int whence); +extern int file_create(char *name, int ur, int uw, int ux, int gr, + int gw, int gx, int or, int ow, int ox); +extern int set_attr(const char *file, struct hostfs_iattr *attrs); +extern int make_symlink(const char *from, const char *to); +extern int unlink_file(const char *file); +extern int do_mkdir(const char *file, int mode); +extern int do_rmdir(const char *file); +extern int do_mknod(const char *file, int mode, int dev); +extern int link_file(const char *from, const char *to); +extern int do_readlink(char *file, char *buf, int size); +extern int rename_file(char *from, char *to); +extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, + long long *bfree_out, long long *bavail_out, + long long *files_out, long long *ffree_out, + void *fsid_out, int fsid_size, long *namelen_out, + long *spare_out); + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hostfs/hostfs_kern.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1024 @@ +/* + * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + * + * Ported the filesystem routines to 2.5. + * 2003-02-10 Petr Baudis + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "hostfs.h" +#include "kern_util.h" +#include "kern.h" +#include "user_util.h" +#include "2_5compat.h" +#include "init.h" + +struct hostfs_inode_info { + char *host_filename; + int fd; + int mode; + struct inode vfs_inode; +}; + +static inline struct hostfs_inode_info *HOSTFS_I(struct inode *inode) +{ + return(list_entry(inode, struct hostfs_inode_info, vfs_inode)); +} + +#define FILE_HOSTFS_I(file) HOSTFS_I((file)->f_dentry->d_inode) + +int hostfs_d_delete(struct dentry *dentry) +{ + return(1); +} + +struct dentry_operations hostfs_dentry_ops = { + .d_delete = hostfs_d_delete, +}; + +/* Changed in hostfs_args before the kernel starts running */ +static char *root_ino = "/"; +static int append = 0; + +#define HOSTFS_SUPER_MAGIC 0x00c0ffee + +static struct inode_operations hostfs_iops; +static struct inode_operations hostfs_dir_iops; +static struct address_space_operations hostfs_link_aops; + +#ifndef MODULE +static int __init hostfs_args(char *options, int *add) +{ + char *ptr; + + ptr = strchr(options, ','); + if(ptr != NULL) + *ptr++ = '\0'; + if(*options != '\0') + root_ino = options; + + options = ptr; + while(options){ + ptr = strchr(options, ','); + if(ptr != NULL) + *ptr++ = '\0'; + if(*options != '\0'){ + if(!strcmp(options, "append")) + append = 1; + else printf("hostfs_args - unsupported option - %s\n", + options); + } + options = ptr; + } + return(0); +} + +__uml_setup("hostfs=", hostfs_args, +"hostfs=,,...\n" +" This is used to set hostfs parameters. The root directory argument\n" +" is used to confine all hostfs mounts to within the specified directory\n" +" tree on the host. If this isn't specified, then a user inside UML can\n" +" mount anything on the host that's accessible to the user that's running\n" +" it.\n" +" The only flag currently supported is 'append', which specifies that all\n" +" files opened by hostfs will be opened in append mode.\n\n" +); +#endif + +static char *dentry_name(struct dentry *dentry, int extra) +{ + struct dentry *parent; + char *root, *name; + int len; + + len = 0; + parent = dentry; + while(parent->d_parent != parent){ + len += parent->d_name.len + 1; + parent = parent->d_parent; + } + + root = HOSTFS_I(parent->d_inode)->host_filename; + len += strlen(root); + name = kmalloc(len + extra + 1, GFP_KERNEL); + if(name == NULL) return(NULL); + + name[len] = '\0'; + parent = dentry; + while(parent->d_parent != parent){ + len -= parent->d_name.len + 1; + name[len] = '/'; + strncpy(&name[len + 1], parent->d_name.name, + parent->d_name.len); + parent = parent->d_parent; + } + strncpy(name, root, strlen(root)); + return(name); +} + +static char *inode_name(struct inode *ino, int extra) +{ + struct dentry *dentry; + + dentry = list_entry(ino->i_dentry.next, struct dentry, d_alias); + return(dentry_name(dentry, extra)); +} + +static int read_name(struct inode *ino, char *name) +{ + /* The non-int inode fields are copied into ints by stat_file and + * then copied into the inode because passing the actual pointers + * in and having them treated as int * breaks on big-endian machines + */ + int err; + int i_mode, i_nlink, i_blksize; + unsigned long long i_size; + unsigned long long i_ino; + unsigned long long i_blocks; + + err = stat_file(name, &i_ino, &i_mode, &i_nlink, &ino->i_uid, + &ino->i_gid, &i_size, &ino->i_atime, &ino->i_mtime, + &ino->i_ctime, &i_blksize, &i_blocks); + if(err) + return(err); + + ino->i_ino = i_ino; + ino->i_mode = i_mode; + ino->i_nlink = i_nlink; + ino->i_size = i_size; + ino->i_blksize = i_blksize; + ino->i_blocks = i_blocks; + if((ino->i_sb->s_dev == ROOT_DEV) && (ino->i_uid == getuid())) + ino->i_uid = 0; + return(0); +} + +static char *follow_link(char *link) +{ + int len, n; + char *name, *resolved, *end; + + len = 64; + while(1){ + n = -ENOMEM; + name = kmalloc(len, GFP_KERNEL); + if(name == NULL) + goto out; + + n = do_readlink(link, name, len); + if(n < len) + break; + len *= 2; + kfree(name); + } + if(n < 0) + goto out_free; + + if(*name == '/') + return(name); + + end = strrchr(link, '/'); + if(end == NULL) + return(name); + + *(end + 1) = '\0'; + len = strlen(link) + strlen(name) + 1; + + resolved = kmalloc(len, GFP_KERNEL); + if(resolved == NULL){ + n = -ENOMEM; + goto out_free; + } + + sprintf(resolved, "%s%s", link, name); + kfree(name); + kfree(link); + return(resolved); + + out_free: + kfree(name); + out: + return(ERR_PTR(n)); +} + +static int read_inode(struct inode *ino) +{ + char *name; + int err = 0; + + /* Unfortunately, we are called from iget() when we don't have a dentry + * allocated yet. + */ + if(list_empty(&ino->i_dentry)) + goto out; + + err = -ENOMEM; + name = inode_name(ino, 0); + if(name == NULL) + goto out; + + if(file_type(name, NULL) == OS_TYPE_SYMLINK){ + name = follow_link(name); + if(IS_ERR(name)){ + err = PTR_ERR(name); + goto out; + } + } + + err = read_name(ino, name); + kfree(name); + out: + return(err); +} + +int hostfs_statfs(struct super_block *sb, struct kstatfs *sf) +{ + /* do_statfs uses struct statfs64 internally, but the linux kernel + * struct statfs still has 32-bit versions for most of these fields, + * so we convert them here + */ + int err; + long long f_blocks; + long long f_bfree; + long long f_bavail; + long long f_files; + long long f_ffree; + + err = do_statfs(HOSTFS_I(sb->s_root->d_inode)->host_filename, + &sf->f_bsize, &f_blocks, &f_bfree, &f_bavail, &f_files, + &f_ffree, &sf->f_fsid, sizeof(sf->f_fsid), + &sf->f_namelen, sf->f_spare); + if(err) return(err); + sf->f_blocks = f_blocks; + sf->f_bfree = f_bfree; + sf->f_bavail = f_bavail; + sf->f_files = f_files; + sf->f_ffree = f_ffree; + sf->f_type = HOSTFS_SUPER_MAGIC; + return(0); +} + +static struct inode *hostfs_alloc_inode(struct super_block *sb) +{ + struct hostfs_inode_info *hi; + + hi = kmalloc(sizeof(*hi), GFP_KERNEL); + if(hi == NULL) + return(NULL); + + *hi = ((struct hostfs_inode_info) { .host_filename = NULL, + .fd = -1, + .mode = 0 }); + inode_init_once(&hi->vfs_inode); + return(&hi->vfs_inode); +} + +static void hostfs_delete_inode(struct inode *inode) +{ + if(HOSTFS_I(inode)->fd != -1) { + close_file(&HOSTFS_I(inode)->fd); + printk("Closing host fd in .delete_inode\n"); + HOSTFS_I(inode)->fd = -1; + } + clear_inode(inode); +} + +static void hostfs_destroy_inode(struct inode *inode) +{ + if(HOSTFS_I(inode)->host_filename) + kfree(HOSTFS_I(inode)->host_filename); + + if(HOSTFS_I(inode)->fd != -1) { + close_file(&HOSTFS_I(inode)->fd); + printk("Closing host fd in .destroy_inode\n"); + } + + kfree(HOSTFS_I(inode)); +} + +static void hostfs_read_inode(struct inode *inode) +{ + read_inode(inode); +} + +static struct super_operations hostfs_sbops = { + .alloc_inode = hostfs_alloc_inode, + .drop_inode = generic_delete_inode, + .delete_inode = hostfs_delete_inode, + .destroy_inode = hostfs_destroy_inode, + .read_inode = hostfs_read_inode, + .statfs = hostfs_statfs, +}; + +int hostfs_readdir(struct file *file, void *ent, filldir_t filldir) +{ + void *dir; + char *name; + unsigned long long next, ino; + int error, len; + + name = dentry_name(file->f_dentry, 0); + if(name == NULL) return(-ENOMEM); + dir = open_dir(name, &error); + kfree(name); + if(dir == NULL) return(-error); + next = file->f_pos; + while((name = read_dir(dir, &next, &ino, &len)) != NULL){ + error = (*filldir)(ent, name, len, file->f_pos, + ino, DT_UNKNOWN); + if(error) break; + file->f_pos = next; + } + close_dir(dir); + return(0); +} + +int hostfs_file_open(struct inode *ino, struct file *file) +{ + char *name; + int mode = 0, r = 0, w = 0, fd; + + mode = file->f_mode & (FMODE_READ | FMODE_WRITE); + if((mode & HOSTFS_I(ino)->mode) == mode) + return(0); + + /* The file may already have been opened, but with the wrong access, + * so this resets things and reopens the file with the new access. + */ + if(HOSTFS_I(ino)->fd != -1){ + close_file(&HOSTFS_I(ino)->fd); + HOSTFS_I(ino)->fd = -1; + } + + HOSTFS_I(ino)->mode |= mode; + if(HOSTFS_I(ino)->mode & FMODE_READ) + r = 1; + if(HOSTFS_I(ino)->mode & FMODE_WRITE) + w = 1; + if(w) + r = 1; + + name = dentry_name(file->f_dentry, 0); + if(name == NULL) + return(-ENOMEM); + + fd = open_file(name, r, w, append); + kfree(name); + if(fd < 0) return(fd); + FILE_HOSTFS_I(file)->fd = fd; + + return(0); +} + +int hostfs_fsync(struct file *file, struct dentry *dentry, int datasync) +{ + return(0); +} + +static struct file_operations hostfs_file_fops = { + .llseek = generic_file_llseek, + .read = generic_file_read, + .write = generic_file_write, + .mmap = generic_file_mmap, + .open = hostfs_file_open, + .release = NULL, + .fsync = hostfs_fsync, +}; + +static struct file_operations hostfs_dir_fops = { + .readdir = hostfs_readdir, + .read = generic_read_dir, +}; + +int hostfs_writepage(struct page *page, struct writeback_control *wbc) +{ + struct address_space *mapping = page->mapping; + struct inode *inode = mapping->host; + char *buffer; + unsigned long long base; + int count = PAGE_CACHE_SIZE; + int end_index = inode->i_size >> PAGE_CACHE_SHIFT; + int err; + + if (page->index >= end_index) + count = inode->i_size & (PAGE_CACHE_SIZE-1); + + buffer = kmap(page); + base = ((unsigned long long) page->index) << PAGE_CACHE_SHIFT; + + err = write_file(HOSTFS_I(inode)->fd, &base, buffer, count); + if(err != count){ + ClearPageUptodate(page); + goto out; + } + + if (base > inode->i_size) + inode->i_size = base; + + if (PageError(page)) + ClearPageError(page); + err = 0; + + out: + kunmap(page); + + unlock_page(page); + return err; +} + +int hostfs_readpage(struct file *file, struct page *page) +{ + char *buffer; + long long start; + int err = 0; + + start = (long long) page->index << PAGE_CACHE_SHIFT; + buffer = kmap(page); + err = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer, + PAGE_CACHE_SIZE); + if(err < 0) goto out; + + memset(&buffer[err], 0, PAGE_CACHE_SIZE - err); + + flush_dcache_page(page); + SetPageUptodate(page); + if (PageError(page)) ClearPageError(page); + err = 0; + out: + kunmap(page); + unlock_page(page); + return(err); +} + +int hostfs_prepare_write(struct file *file, struct page *page, + unsigned int from, unsigned int to) +{ + char *buffer; + long long start, tmp; + int err; + + start = (long long) page->index << PAGE_CACHE_SHIFT; + buffer = kmap(page); + if(from != 0){ + tmp = start; + err = read_file(FILE_HOSTFS_I(file)->fd, &tmp, buffer, + from); + if(err < 0) goto out; + } + if(to != PAGE_CACHE_SIZE){ + start += to; + err = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer + to, + PAGE_CACHE_SIZE - to); + if(err < 0) goto out; + } + err = 0; + out: + kunmap(page); + return(err); +} + +int hostfs_commit_write(struct file *file, struct page *page, unsigned from, + unsigned to) +{ + struct address_space *mapping = page->mapping; + struct inode *inode = mapping->host; + char *buffer; + long long start; + int err = 0; + + start = (long long) (page->index << PAGE_CACHE_SHIFT) + from; + buffer = kmap(page); + err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from, + to - from); + if(err > 0) err = 0; + if(!err && (start > inode->i_size)) + inode->i_size = start; + + kunmap(page); + return(err); +} + +static struct address_space_operations hostfs_aops = { + .writepage = hostfs_writepage, + .readpage = hostfs_readpage, +/* .set_page_dirty = __set_page_dirty_nobuffers, */ + .prepare_write = hostfs_prepare_write, + .commit_write = hostfs_commit_write +}; + +static int init_inode(struct inode *inode, struct dentry *dentry) +{ + char *name; + int type, err = -ENOMEM, rdev; + + if(dentry){ + name = dentry_name(dentry, 0); + if(name == NULL) + goto out; + type = file_type(name, &rdev); + kfree(name); + } + else type = OS_TYPE_DIR; + + err = 0; + if(type == OS_TYPE_SYMLINK) + inode->i_op = &page_symlink_inode_operations; + else if(type == OS_TYPE_DIR) + inode->i_op = &hostfs_dir_iops; + else inode->i_op = &hostfs_iops; + + if(type == OS_TYPE_DIR) inode->i_fop = &hostfs_dir_fops; + else inode->i_fop = &hostfs_file_fops; + + if(type == OS_TYPE_SYMLINK) + inode->i_mapping->a_ops = &hostfs_link_aops; + else inode->i_mapping->a_ops = &hostfs_aops; + + switch (type) { + case OS_TYPE_CHARDEV: + init_special_inode(inode, S_IFCHR, rdev); + break; + case OS_TYPE_BLOCKDEV: + init_special_inode(inode, S_IFBLK, rdev); + break; + case OS_TYPE_FIFO: + init_special_inode(inode, S_IFIFO, 0); + break; + case OS_TYPE_SOCK: + init_special_inode(inode, S_IFSOCK, 0); + break; + } + out: + return(err); +} + +int hostfs_create(struct inode *dir, struct dentry *dentry, int mode, + struct nameidata *nd) +{ + struct inode *inode; + char *name; + int error, fd; + + error = -ENOMEM; + inode = iget(dir->i_sb, 0); + if(inode == NULL) goto out; + + error = init_inode(inode, dentry); + if(error) + goto out_put; + + error = -ENOMEM; + name = dentry_name(dentry, 0); + if(name == NULL) + goto out_put; + + fd = file_create(name, + mode & S_IRUSR, mode & S_IWUSR, mode & S_IXUSR, + mode & S_IRGRP, mode & S_IWGRP, mode & S_IXGRP, + mode & S_IROTH, mode & S_IWOTH, mode & S_IXOTH); + if(fd < 0) + error = fd; + else error = read_name(inode, name); + + kfree(name); + if(error) + goto out_put; + + HOSTFS_I(inode)->fd = fd; + HOSTFS_I(inode)->mode = FMODE_READ | FMODE_WRITE; + d_instantiate(dentry, inode); + return(0); + + out_put: + iput(inode); + out: + return(error); +} + +struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, + struct nameidata *nd) +{ + struct inode *inode; + char *name; + int err; + + err = -ENOMEM; + inode = iget(ino->i_sb, 0); + if(inode == NULL) + goto out; + + err = init_inode(inode, dentry); + if(err) + goto out_put; + + err = -ENOMEM; + name = dentry_name(dentry, 0); + if(name == NULL) + goto out_put; + + err = read_name(inode, name); + kfree(name); + if(err == -ENOENT){ + iput(inode); + inode = NULL; + } + else if(err) + goto out_put; + + d_add(dentry, inode); + dentry->d_op = &hostfs_dentry_ops; + return(NULL); + + out_put: + iput(inode); + out: + return(ERR_PTR(err)); +} + +static char *inode_dentry_name(struct inode *ino, struct dentry *dentry) +{ + char *file; + int len; + + file = inode_name(ino, dentry->d_name.len + 1); + if(file == NULL) return(NULL); + strcat(file, "/"); + len = strlen(file); + strncat(file, dentry->d_name.name, dentry->d_name.len); + file[len + dentry->d_name.len] = '\0'; + return(file); +} + +int hostfs_link(struct dentry *to, struct inode *ino, struct dentry *from) +{ + char *from_name, *to_name; + int err; + + if((from_name = inode_dentry_name(ino, from)) == NULL) + return(-ENOMEM); + to_name = dentry_name(to, 0); + if(to_name == NULL){ + kfree(from_name); + return(-ENOMEM); + } + err = link_file(to_name, from_name); + kfree(from_name); + kfree(to_name); + return(err); +} + +int hostfs_unlink(struct inode *ino, struct dentry *dentry) +{ + char *file; + int err; + + if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM); + if(append) + return(-EPERM); + + err = unlink_file(file); + kfree(file); + return(err); +} + +int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to) +{ + char *file; + int err; + + if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM); + err = make_symlink(file, to); + kfree(file); + return(err); +} + +int hostfs_mkdir(struct inode *ino, struct dentry *dentry, int mode) +{ + char *file; + int err; + + if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM); + err = do_mkdir(file, mode); + kfree(file); + return(err); +} + +int hostfs_rmdir(struct inode *ino, struct dentry *dentry) +{ + char *file; + int err; + + if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM); + err = do_rmdir(file); + kfree(file); + return(err); +} + +int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) +{ + struct inode *inode; + char *name; + int err = -ENOMEM; + + inode = iget(dir->i_sb, 0); + if(inode == NULL) + goto out; + + err = init_inode(inode, dentry); + if(err) + goto out_put; + + err = -ENOMEM; + name = dentry_name(dentry, 0); + if(name == NULL) + goto out_put; + + init_special_inode(inode, mode, dev); + err = do_mknod(name, mode, dev); + if(err) + goto out_free; + + err = read_name(inode, name); + kfree(name); + if(err) + goto out_put; + + d_instantiate(dentry, inode); + return(0); + + out_free: + kfree(name); + out_put: + iput(inode); + out: + return(err); +} + +int hostfs_rename(struct inode *from_ino, struct dentry *from, + struct inode *to_ino, struct dentry *to) +{ + char *from_name, *to_name; + int err; + + if((from_name = inode_dentry_name(from_ino, from)) == NULL) + return(-ENOMEM); + if((to_name = inode_dentry_name(to_ino, to)) == NULL){ + kfree(from_name); + return(-ENOMEM); + } + err = rename_file(from_name, to_name); + kfree(from_name); + kfree(to_name); + return(err); +} + +void hostfs_truncate(struct inode *ino) +{ + not_implemented(); +} + +int hostfs_permission(struct inode *ino, int desired, struct nameidata *nd) +{ + char *name; + int r = 0, w = 0, x = 0, err; + + if(desired & MAY_READ) r = 1; + if(desired & MAY_WRITE) w = 1; + if(desired & MAY_EXEC) x = 1; + name = inode_name(ino, 0); + if(name == NULL) return(-ENOMEM); + err = access_file(name, r, w, x); + kfree(name); + if(!err) err = vfs_permission(ino, desired); + return(err); +} + +int hostfs_setattr(struct dentry *dentry, struct iattr *attr) +{ + struct hostfs_iattr attrs; + char *name; + int err; + + if(append) + attr->ia_valid &= ~ATTR_SIZE; + + attrs.ia_valid = 0; + if(attr->ia_valid & ATTR_MODE){ + attrs.ia_valid |= HOSTFS_ATTR_MODE; + attrs.ia_mode = attr->ia_mode; + } + if(attr->ia_valid & ATTR_UID){ + if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && + (attr->ia_uid == 0)) + attr->ia_uid = getuid(); + attrs.ia_valid |= HOSTFS_ATTR_UID; + attrs.ia_uid = attr->ia_uid; + } + if(attr->ia_valid & ATTR_GID){ + if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && + (attr->ia_gid == 0)) + attr->ia_gid = getuid(); + attrs.ia_valid |= HOSTFS_ATTR_GID; + attrs.ia_gid = attr->ia_gid; + } + if(attr->ia_valid & ATTR_SIZE){ + attrs.ia_valid |= HOSTFS_ATTR_SIZE; + attrs.ia_size = attr->ia_size; + } + if(attr->ia_valid & ATTR_ATIME){ + attrs.ia_valid |= HOSTFS_ATTR_ATIME; + attrs.ia_atime = attr->ia_atime; + } + if(attr->ia_valid & ATTR_MTIME){ + attrs.ia_valid |= HOSTFS_ATTR_MTIME; + attrs.ia_mtime = attr->ia_mtime; + } + if(attr->ia_valid & ATTR_CTIME){ + attrs.ia_valid |= HOSTFS_ATTR_CTIME; + attrs.ia_ctime = attr->ia_ctime; + } + if(attr->ia_valid & ATTR_ATIME_SET){ + attrs.ia_valid |= HOSTFS_ATTR_ATIME_SET; + } + if(attr->ia_valid & ATTR_MTIME_SET){ + attrs.ia_valid |= HOSTFS_ATTR_MTIME_SET; + } + name = dentry_name(dentry, 0); + if(name == NULL) return(-ENOMEM); + err = set_attr(name, &attrs); + kfree(name); + if(err) + return(err); + + return(inode_setattr(dentry->d_inode, attr)); +} + +int hostfs_getattr(struct vfsmount *mnt, struct dentry *dentry, + struct kstat *stat) +{ + generic_fillattr(dentry->d_inode, stat); + return(0); +} + +static struct inode_operations hostfs_iops = { + .create = hostfs_create, + .link = hostfs_link, + .unlink = hostfs_unlink, + .symlink = hostfs_symlink, + .mkdir = hostfs_mkdir, + .rmdir = hostfs_rmdir, + .mknod = hostfs_mknod, + .rename = hostfs_rename, + .truncate = hostfs_truncate, + .permission = hostfs_permission, + .setattr = hostfs_setattr, + .getattr = hostfs_getattr, +}; + +static struct inode_operations hostfs_dir_iops = { + .create = hostfs_create, + .lookup = hostfs_lookup, + .link = hostfs_link, + .unlink = hostfs_unlink, + .symlink = hostfs_symlink, + .mkdir = hostfs_mkdir, + .rmdir = hostfs_rmdir, + .mknod = hostfs_mknod, + .rename = hostfs_rename, + .truncate = hostfs_truncate, + .permission = hostfs_permission, + .setattr = hostfs_setattr, + .getattr = hostfs_getattr, +}; + +int hostfs_link_readpage(struct file *file, struct page *page) +{ + char *buffer, *name; + long long start; + int err; + + start = page->index << PAGE_CACHE_SHIFT; + buffer = kmap(page); + name = inode_name(page->mapping->host, 0); + if(name == NULL) return(-ENOMEM); + err = do_readlink(name, buffer, PAGE_CACHE_SIZE); + kfree(name); + if(err == PAGE_CACHE_SIZE) + err = -E2BIG; + else if(err > 0){ + flush_dcache_page(page); + SetPageUptodate(page); + if (PageError(page)) ClearPageError(page); + err = 0; + } + kunmap(page); + unlock_page(page); + return(err); +} + +static struct address_space_operations hostfs_link_aops = { + .readpage = hostfs_link_readpage, +}; + +static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) +{ + struct inode *root_inode; + char *name, *data = d; + int err; + + sb->s_blocksize = 1024; + sb->s_blocksize_bits = 10; + sb->s_magic = HOSTFS_SUPER_MAGIC; + sb->s_op = &hostfs_sbops; + + if((data == NULL) || (*data == '\0')) + data = root_ino; + + err = -ENOMEM; + name = kmalloc(strlen(data) + 1, GFP_KERNEL); + if(name == NULL) + goto out; + + strcpy(name, data); + + root_inode = iget(sb, 0); + if(root_inode == NULL) + goto out_free; + + err = init_inode(root_inode, NULL); + if(err) + goto out_put; + + HOSTFS_I(root_inode)->host_filename = name; + + err = -ENOMEM; + sb->s_root = d_alloc_root(root_inode); + if(sb->s_root == NULL) + goto out_put; + + err = read_inode(root_inode); + if(err) + goto out_put; + + return(0); + + out_put: + iput(root_inode); + out_free: + kfree(name); + out: + return(err); +} + +static struct super_block *hostfs_read_sb(struct file_system_type *type, + int flags, const char *dev_name, + void *data) +{ + return(get_sb_nodev(type, flags, data, hostfs_fill_sb_common)); +} + +static struct file_system_type hostfs_type = { + .owner = THIS_MODULE, + .name = "hostfs", + .get_sb = hostfs_read_sb, + .kill_sb = kill_anon_super, + .fs_flags = 0, +}; + +static int __init init_hostfs(void) +{ + return(register_filesystem(&hostfs_type)); +} + +static void __exit exit_hostfs(void) +{ + unregister_filesystem(&hostfs_type); +} + +module_init(init_hostfs) +module_exit(exit_hostfs) +MODULE_LICENSE("GPL"); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hostfs/hostfs_user.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,361 @@ +/* + * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "hostfs.h" +#include "kern_util.h" +#include "user.h" + +int stat_file(const char *path, unsigned long long *inode_out, int *mode_out, + int *nlink_out, int *uid_out, int *gid_out, + unsigned long long *size_out, struct timespec *atime_out, + struct timespec *mtime_out, struct timespec *ctime_out, + int *blksize_out, unsigned long long *blocks_out) +{ + struct stat64 buf; + + if(lstat64(path, &buf) < 0) + return(-errno); + + /* See the Makefile for why STAT64_INO_FIELD is passed in + * by the build + */ + if(inode_out != NULL) *inode_out = buf.STAT64_INO_FIELD; + if(mode_out != NULL) *mode_out = buf.st_mode; + if(nlink_out != NULL) *nlink_out = buf.st_nlink; + if(uid_out != NULL) *uid_out = buf.st_uid; + if(gid_out != NULL) *gid_out = buf.st_gid; + if(size_out != NULL) *size_out = buf.st_size; + if(atime_out != NULL) { + atime_out->tv_sec = buf.st_atime; + atime_out->tv_nsec = 0; + } + if(mtime_out != NULL) { + mtime_out->tv_sec = buf.st_mtime; + mtime_out->tv_nsec = 0; + } + if(ctime_out != NULL) { + ctime_out->tv_sec = buf.st_ctime; + ctime_out->tv_nsec = 0; + } + if(blksize_out != NULL) *blksize_out = buf.st_blksize; + if(blocks_out != NULL) *blocks_out = buf.st_blocks; + return(0); +} + +int file_type(const char *path, int *rdev) +{ + struct stat64 buf; + + if(lstat64(path, &buf) < 0) + return(-errno); + if(rdev != NULL) + *rdev = buf.st_rdev; + + if(S_ISDIR(buf.st_mode)) return(OS_TYPE_DIR); + else if(S_ISLNK(buf.st_mode)) return(OS_TYPE_SYMLINK); + else if(S_ISCHR(buf.st_mode)) return(OS_TYPE_CHARDEV); + else if(S_ISBLK(buf.st_mode)) return(OS_TYPE_BLOCKDEV); + else if(S_ISFIFO(buf.st_mode))return(OS_TYPE_FIFO); + else if(S_ISSOCK(buf.st_mode))return(OS_TYPE_SOCK); + else return(OS_TYPE_FILE); +} + +int access_file(char *path, int r, int w, int x) +{ + int mode = 0; + + if(r) mode = R_OK; + if(w) mode |= W_OK; + if(x) mode |= X_OK; + if(access(path, mode) != 0) return(-errno); + else return(0); +} + +int open_file(char *path, int r, int w, int append) +{ + int mode = 0, fd; + + if(r && !w) + mode = O_RDONLY; + else if(!r && w) + mode = O_WRONLY; + else if(r && w) + mode = O_RDWR; + else panic("Impossible mode in open_file"); + + if(append) + mode |= O_APPEND; + fd = open64(path, mode); + if(fd < 0) return(-errno); + else return(fd); +} + +void *open_dir(char *path, int *err_out) +{ + DIR *dir; + + dir = opendir(path); + *err_out = errno; + if(dir == NULL) return(NULL); + return(dir); +} + +char *read_dir(void *stream, unsigned long long *pos, + unsigned long long *ino_out, int *len_out) +{ + DIR *dir = stream; + struct dirent *ent; + + seekdir(dir, *pos); + ent = readdir(dir); + if(ent == NULL) return(NULL); + *len_out = strlen(ent->d_name); + *ino_out = ent->d_ino; + *pos = telldir(dir); + return(ent->d_name); +} + +int read_file(int fd, unsigned long long *offset, char *buf, int len) +{ + int n; + + n = pread64(fd, buf, len, *offset); + if(n < 0) return(-errno); + *offset += n; + return(n); +} + +int write_file(int fd, unsigned long long *offset, const char *buf, int len) +{ + int n; + + n = pwrite64(fd, buf, len, *offset); + if(n < 0) return(-errno); + *offset += n; + return(n); +} + +int lseek_file(int fd, long long offset, int whence) +{ + int ret; + + ret = lseek64(fd, offset, whence); + if(ret < 0) return(-errno); + return(0); +} + +void close_file(void *stream) +{ + close(*((int *) stream)); +} + +void close_dir(void *stream) +{ + closedir(stream); +} + +int file_create(char *name, int ur, int uw, int ux, int gr, + int gw, int gx, int or, int ow, int ox) +{ + int mode, fd; + + mode = 0; + mode |= ur ? S_IRUSR : 0; + mode |= uw ? S_IWUSR : 0; + mode |= ux ? S_IXUSR : 0; + mode |= gr ? S_IRGRP : 0; + mode |= gw ? S_IWGRP : 0; + mode |= gx ? S_IXGRP : 0; + mode |= or ? S_IROTH : 0; + mode |= ow ? S_IWOTH : 0; + mode |= ox ? S_IXOTH : 0; + fd = open64(name, O_CREAT | O_RDWR, mode); + if(fd < 0) + return(-errno); + return(fd); +} + +int set_attr(const char *file, struct hostfs_iattr *attrs) +{ + struct utimbuf buf; + int err, ma; + + if(attrs->ia_valid & HOSTFS_ATTR_MODE){ + if(chmod(file, attrs->ia_mode) != 0) return(-errno); + } + if(attrs->ia_valid & HOSTFS_ATTR_UID){ + if(chown(file, attrs->ia_uid, -1)) return(-errno); + } + if(attrs->ia_valid & HOSTFS_ATTR_GID){ + if(chown(file, -1, attrs->ia_gid)) return(-errno); + } + if(attrs->ia_valid & HOSTFS_ATTR_SIZE){ + if(truncate(file, attrs->ia_size)) return(-errno); + } + ma = HOSTFS_ATTR_ATIME_SET | HOSTFS_ATTR_MTIME_SET; + if((attrs->ia_valid & ma) == ma){ + buf.actime = attrs->ia_atime.tv_sec; + buf.modtime = attrs->ia_mtime.tv_sec; + if(utime(file, &buf) != 0) return(-errno); + } + else { + struct timespec ts; + + if(attrs->ia_valid & HOSTFS_ATTR_ATIME_SET){ + err = stat_file(file, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, &ts, NULL, NULL, NULL); + if(err != 0) + return(err); + buf.actime = attrs->ia_atime.tv_sec; + buf.modtime = ts.tv_sec; + if(utime(file, &buf) != 0) + return(-errno); + } + if(attrs->ia_valid & HOSTFS_ATTR_MTIME_SET){ + err = stat_file(file, NULL, NULL, NULL, NULL, NULL, + NULL, &ts, NULL, NULL, NULL, NULL); + if(err != 0) + return(err); + buf.actime = ts.tv_sec; + buf.modtime = attrs->ia_mtime.tv_sec; + if(utime(file, &buf) != 0) + return(-errno); + } + } + if(attrs->ia_valid & HOSTFS_ATTR_CTIME) ; + if(attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)){ + err = stat_file(file, NULL, NULL, NULL, NULL, NULL, NULL, + &attrs->ia_atime, &attrs->ia_mtime, NULL, + NULL, NULL); + if(err != 0) return(err); + } + return(0); +} + +int make_symlink(const char *from, const char *to) +{ + int err; + + err = symlink(to, from); + if(err) return(-errno); + return(0); +} + +int unlink_file(const char *file) +{ + int err; + + err = unlink(file); + if(err) return(-errno); + return(0); +} + +int do_mkdir(const char *file, int mode) +{ + int err; + + err = mkdir(file, mode); + if(err) return(-errno); + return(0); +} + +int do_rmdir(const char *file) +{ + int err; + + err = rmdir(file); + if(err) return(-errno); + return(0); +} + +int do_mknod(const char *file, int mode, int dev) +{ + int err; + + err = mknod(file, mode, dev); + if(err) return(-errno); + return(0); +} + +int link_file(const char *to, const char *from) +{ + int err; + + err = link(to, from); + if(err) return(-errno); + return(0); +} + +int do_readlink(char *file, char *buf, int size) +{ + int n; + + n = readlink(file, buf, size); + if(n < 0) + return(-errno); + if(n < size) + buf[n] = '\0'; + return(n); +} + +int rename_file(char *from, char *to) +{ + int err; + + err = rename(from, to); + if(err < 0) return(-errno); + return(0); +} + +int do_statfs(char *root, long *bsize_out, long long *blocks_out, + long long *bfree_out, long long *bavail_out, + long long *files_out, long long *ffree_out, + void *fsid_out, int fsid_size, long *namelen_out, + long *spare_out) +{ + struct statfs64 buf; + int err; + + err = statfs64(root, &buf); + if(err < 0) return(-errno); + *bsize_out = buf.f_bsize; + *blocks_out = buf.f_blocks; + *bfree_out = buf.f_bfree; + *bavail_out = buf.f_bavail; + *files_out = buf.f_files; + *ffree_out = buf.f_ffree; + memcpy(fsid_out, &buf.f_fsid, + sizeof(buf.f_fsid) > fsid_size ? fsid_size : + sizeof(buf.f_fsid)); + *namelen_out = buf.f_namelen; + spare_out[0] = buf.f_spare[0]; + spare_out[1] = buf.f_spare[1]; + spare_out[2] = buf.f_spare[2]; + spare_out[3] = buf.f_spare[3]; + spare_out[4] = buf.f_spare[4]; + spare_out[5] = buf.f_spare[5]; + return(0); +} + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/fs/hpfs/super.c b/fs/hpfs/super.c --- a/fs/hpfs/super.c 2004-09-06 16:37:53 -07:00 +++ b/fs/hpfs/super.c 2004-09-06 16:37:53 -07:00 @@ -191,7 +191,7 @@ { hpfs_inode_cachep = kmem_cache_create("hpfs_inode_cache", sizeof(struct hpfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (hpfs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/hppfs/Makefile b/fs/hppfs/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hppfs/Makefile 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,19 @@ +# +# Copyright (C) 2002, 2003 Jeff Dike (jdike@karaya.com) +# Licensed under the GPL +# + +hppfs-objs := hppfs_kern.o + +obj-y = +obj-$(CONFIG_HPPFS) += hppfs.o + +clean: + +modules: + +fastdep: + +dep: + +archmrproper: clean diff -Nru a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/fs/hppfs/hppfs_kern.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,815 @@ +/* + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "os.h" + +static int init_inode(struct inode *inode, struct dentry *dentry); + +struct hppfs_data { + struct list_head list; + char contents[PAGE_SIZE - sizeof(struct list_head)]; +}; + +struct hppfs_private { + struct file *proc_file; + int host_fd; + loff_t len; + struct hppfs_data *contents; +}; + +struct hppfs_inode_info { + struct dentry *proc_dentry; + struct inode vfs_inode; +}; + +static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) +{ + return(list_entry(inode, struct hppfs_inode_info, vfs_inode)); +} + +#define HPPFS_SUPER_MAGIC 0xb00000ee + +static struct super_operations hppfs_sbops; + +static int is_pid(struct dentry *dentry) +{ + struct super_block *sb; + int i; + + sb = dentry->d_sb; + if((sb->s_op != &hppfs_sbops) || (dentry->d_parent != sb->s_root)) + return(0); + + for(i = 0; i < dentry->d_name.len; i++){ + if(!isdigit(dentry->d_name.name[i])) + return(0); + } + return(1); +} + +static char *dentry_name(struct dentry *dentry, int extra) +{ + struct dentry *parent; + char *root, *name; + const char *seg_name; + int len, seg_len; + + len = 0; + parent = dentry; + while(parent->d_parent != parent){ + if(is_pid(parent)) + len += strlen("pid") + 1; + else len += parent->d_name.len + 1; + parent = parent->d_parent; + } + + root = "proc"; + len += strlen(root); + name = kmalloc(len + extra + 1, GFP_KERNEL); + if(name == NULL) return(NULL); + + name[len] = '\0'; + parent = dentry; + while(parent->d_parent != parent){ + if(is_pid(parent)){ + seg_name = "pid"; + seg_len = strlen("pid"); + } + else { + seg_name = parent->d_name.name; + seg_len = parent->d_name.len; + } + + len -= seg_len + 1; + name[len] = '/'; + strncpy(&name[len + 1], seg_name, seg_len); + parent = parent->d_parent; + } + strncpy(name, root, strlen(root)); + return(name); +} + +struct dentry_operations hppfs_dentry_ops = { +}; + +static int file_removed(struct dentry *dentry, const char *file) +{ + char *host_file; + int extra, fd; + + extra = 0; + if(file != NULL) extra += strlen(file) + 1; + + host_file = dentry_name(dentry, extra + strlen("/remove")); + if(host_file == NULL){ + printk("file_removed : allocation failed\n"); + return(-ENOMEM); + } + + if(file != NULL){ + strcat(host_file, "/"); + strcat(host_file, file); + } + strcat(host_file, "/remove"); + + fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); + kfree(host_file); + if(fd > 0){ + os_close_file(fd); + return(1); + } + return(0); +} + +static void hppfs_read_inode(struct inode *ino) +{ + struct inode *proc_ino; + + if(HPPFS_I(ino)->proc_dentry == NULL) + return; + + proc_ino = HPPFS_I(ino)->proc_dentry->d_inode; + ino->i_uid = proc_ino->i_uid; + ino->i_gid = proc_ino->i_gid; + ino->i_atime = proc_ino->i_atime; + ino->i_mtime = proc_ino->i_mtime; + ino->i_ctime = proc_ino->i_ctime; + ino->i_ino = proc_ino->i_ino; + ino->i_mode = proc_ino->i_mode; + ino->i_nlink = proc_ino->i_nlink; + ino->i_size = proc_ino->i_size; + ino->i_blksize = proc_ino->i_blksize; + ino->i_blocks = proc_ino->i_blocks; +} + +static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry, + struct nameidata *nd) +{ + struct dentry *proc_dentry, *new, *parent; + struct inode *inode; + int err, deleted; + + deleted = file_removed(dentry, NULL); + if(deleted < 0) + return(ERR_PTR(deleted)); + else if(deleted) + return(ERR_PTR(-ENOENT)); + + err = -ENOMEM; + parent = HPPFS_I(ino)->proc_dentry; + down(&parent->d_inode->i_sem); + proc_dentry = d_lookup(parent, &dentry->d_name); + if(proc_dentry == NULL){ + proc_dentry = d_alloc(parent, &dentry->d_name); + if(proc_dentry == NULL){ + up(&parent->d_inode->i_sem); + goto out; + } + new = (*parent->d_inode->i_op->lookup)(parent->d_inode, + proc_dentry, NULL); + if(new){ + dput(proc_dentry); + proc_dentry = new; + } + } + up(&parent->d_inode->i_sem); + + if(IS_ERR(proc_dentry)) + return(proc_dentry); + + inode = iget(ino->i_sb, 0); + if(inode == NULL) + goto out_dput; + + err = init_inode(inode, proc_dentry); + if(err) + goto out_put; + + hppfs_read_inode(inode); + + d_add(dentry, inode); + dentry->d_op = &hppfs_dentry_ops; + return(NULL); + + out_put: + iput(inode); + out_dput: + dput(proc_dentry); + out: + return(ERR_PTR(err)); +} + +static struct inode_operations hppfs_file_iops = { +}; + +static ssize_t read_proc(struct file *file, char *buf, ssize_t count, + loff_t *ppos, int is_user) +{ + ssize_t (*read)(struct file *, char *, size_t, loff_t *); + ssize_t n; + + read = file->f_dentry->d_inode->i_fop->read; + + if(!is_user) + set_fs(KERNEL_DS); + + n = (*read)(file, buf, count, &file->f_pos); + + if(!is_user) + set_fs(USER_DS); + + if(ppos) *ppos = file->f_pos; + return(n); +} + +static ssize_t hppfs_read_file(int fd, char *buf, ssize_t count) +{ + ssize_t n; + int cur, err; + char *new_buf; + + n = -ENOMEM; + new_buf = kmalloc(PAGE_SIZE, GFP_KERNEL); + if(new_buf == NULL){ + printk("hppfs_read_file : kmalloc failed\n"); + goto out; + } + n = 0; + while(count > 0){ + cur = min_t(ssize_t, count, PAGE_SIZE); + err = os_read_file(fd, new_buf, cur); + if(err < 0){ + printk("hppfs_read : read failed, errno = %d\n", + count); + n = err; + goto out_free; + } + else if(err == 0) + break; + + if(copy_to_user(buf, new_buf, err)){ + n = -EFAULT; + goto out_free; + } + n += err; + count -= err; + } + out_free: + kfree(new_buf); + out: + return(n); +} + +static ssize_t hppfs_read(struct file *file, char *buf, size_t count, + loff_t *ppos) +{ + struct hppfs_private *hppfs = file->private_data; + struct hppfs_data *data; + loff_t off; + int err; + + if(hppfs->contents != NULL){ + if(*ppos >= hppfs->len) return(0); + + data = hppfs->contents; + off = *ppos; + while(off >= sizeof(data->contents)){ + data = list_entry(data->list.next, struct hppfs_data, + list); + off -= sizeof(data->contents); + } + + if(off + count > hppfs->len) + count = hppfs->len - off; + copy_to_user(buf, &data->contents[off], count); + *ppos += count; + } + else if(hppfs->host_fd != -1){ + err = os_seek_file(hppfs->host_fd, *ppos); + if(err){ + printk("hppfs_read : seek failed, errno = %d\n", err); + return(err); + } + count = hppfs_read_file(hppfs->host_fd, buf, count); + if(count > 0) + *ppos += count; + } + else count = read_proc(hppfs->proc_file, buf, count, ppos, 1); + + return(count); +} + +static ssize_t hppfs_write(struct file *file, const char *buf, size_t len, + loff_t *ppos) +{ + struct hppfs_private *data = file->private_data; + struct file *proc_file = data->proc_file; + ssize_t (*write)(struct file *, const char *, size_t, loff_t *); + int err; + + write = proc_file->f_dentry->d_inode->i_fop->write; + + proc_file->f_pos = file->f_pos; + err = (*write)(proc_file, buf, len, &proc_file->f_pos); + file->f_pos = proc_file->f_pos; + + return(err); +} + +static int open_host_sock(char *host_file, int *filter_out) +{ + char *end; + int fd; + + end = &host_file[strlen(host_file)]; + strcpy(end, "/rw"); + *filter_out = 1; + fd = os_connect_socket(host_file); + if(fd > 0) + return(fd); + + strcpy(end, "/r"); + *filter_out = 0; + fd = os_connect_socket(host_file); + return(fd); +} + +static void free_contents(struct hppfs_data *head) +{ + struct hppfs_data *data; + struct list_head *ele, *next; + + if(head == NULL) return; + + list_for_each_safe(ele, next, &head->list){ + data = list_entry(ele, struct hppfs_data, list); + kfree(data); + } + kfree(head); +} + +static struct hppfs_data *hppfs_get_data(int fd, int filter, + struct file *proc_file, + struct file *hppfs_file, + loff_t *size_out) +{ + struct hppfs_data *data, *new, *head; + int n, err; + + err = -ENOMEM; + data = kmalloc(sizeof(*data), GFP_KERNEL); + if(data == NULL){ + printk("hppfs_get_data : head allocation failed\n"); + goto failed; + } + + INIT_LIST_HEAD(&data->list); + + head = data; + *size_out = 0; + + if(filter){ + while((n = read_proc(proc_file, data->contents, + sizeof(data->contents), NULL, 0)) > 0) + os_write_file(fd, data->contents, n); + err = os_shutdown_socket(fd, 0, 1); + if(err){ + printk("hppfs_get_data : failed to shut down " + "socket\n"); + goto failed_free; + } + } + while(1){ + n = os_read_file(fd, data->contents, sizeof(data->contents)); + if(n < 0){ + err = n; + printk("hppfs_get_data : read failed, errno = %d\n", + err); + goto failed_free; + } + else if(n == 0) + break; + + *size_out += n; + + if(n < sizeof(data->contents)) + break; + + new = kmalloc(sizeof(*data), GFP_KERNEL); + if(new == 0){ + printk("hppfs_get_data : data allocation failed\n"); + err = -ENOMEM; + goto failed_free; + } + + INIT_LIST_HEAD(&new->list); + list_add(&new->list, &data->list); + data = new; + } + return(head); + + failed_free: + free_contents(head); + failed: + return(ERR_PTR(err)); +} + +static struct hppfs_private *hppfs_data(void) +{ + struct hppfs_private *data; + + data = kmalloc(sizeof(*data), GFP_KERNEL); + if(data == NULL) + return(data); + + *data = ((struct hppfs_private ) { .host_fd = -1, + .len = -1, + .contents = NULL } ); + return(data); +} + +static int file_mode(int fmode) +{ + if(fmode == (FMODE_READ | FMODE_WRITE)) + return(O_RDWR); + if(fmode == FMODE_READ) + return(O_RDONLY); + if(fmode == FMODE_WRITE) + return(O_WRONLY); + return(0); +} + +static int hppfs_open(struct inode *inode, struct file *file) +{ + struct hppfs_private *data; + struct dentry *proc_dentry; + char *host_file; + int err, fd, type, filter; + + err = -ENOMEM; + data = hppfs_data(); + if(data == NULL) + goto out; + + host_file = dentry_name(file->f_dentry, strlen("/rw")); + if(host_file == NULL) + goto out_free2; + + proc_dentry = HPPFS_I(inode)->proc_dentry; + + /* XXX This isn't closed anywhere */ + data->proc_file = dentry_open(dget(proc_dentry), NULL, + file_mode(file->f_mode)); + err = PTR_ERR(data->proc_file); + if(IS_ERR(data->proc_file)) + goto out_free1; + + type = os_file_type(host_file); + if(type == OS_TYPE_FILE){ + fd = os_open_file(host_file, of_read(OPENFLAGS()), 0); + if(fd >= 0) + data->host_fd = fd; + else printk("hppfs_open : failed to open '%s', errno = %d\n", + host_file, -fd); + + data->contents = NULL; + } + else if(type == OS_TYPE_DIR){ + fd = open_host_sock(host_file, &filter); + if(fd > 0){ + data->contents = hppfs_get_data(fd, filter, + &data->proc_file, + file, &data->len); + if(!IS_ERR(data->contents)) + data->host_fd = fd; + } + else printk("hppfs_open : failed to open a socket in " + "'%s', errno = %d\n", host_file, -fd); + } + kfree(host_file); + + file->private_data = data; + return(0); + + out_free1: + kfree(host_file); + out_free2: + free_contents(data->contents); + kfree(data); + out: + return(err); +} + +static int hppfs_dir_open(struct inode *inode, struct file *file) +{ + struct hppfs_private *data; + struct dentry *proc_dentry; + int err; + + err = -ENOMEM; + data = hppfs_data(); + if(data == NULL) + goto out; + + proc_dentry = HPPFS_I(inode)->proc_dentry; + data->proc_file = dentry_open(dget(proc_dentry), NULL, + file_mode(file->f_mode)); + err = PTR_ERR(data->proc_file); + if(IS_ERR(data->proc_file)) + goto out_free; + + file->private_data = data; + return(0); + + out_free: + kfree(data); + out: + return(err); +} + +static loff_t hppfs_llseek(struct file *file, loff_t off, int where) +{ + struct hppfs_private *data = file->private_data; + struct file *proc_file = &data->proc_file; + loff_t (*llseek)(struct file *, loff_t, int); + loff_t ret; + + llseek = proc_file->f_dentry->d_inode->i_fop->llseek; + if(llseek != NULL){ + ret = (*llseek)(proc_file, off, where); + if(ret < 0) + return(ret); + } + + return(default_llseek(file, off, where)); +} + +static struct file_operations hppfs_file_fops = { + .owner = NULL, + .llseek = hppfs_llseek, + .read = hppfs_read, + .write = hppfs_write, + .open = hppfs_open, +}; + +struct hppfs_dirent { + void *vfs_dirent; + filldir_t filldir; + struct dentry *dentry; +}; + +static int hppfs_filldir(void *d, const char *name, int size, + loff_t offset, ino_t inode, unsigned int type) +{ + struct hppfs_dirent *dirent = d; + + if(file_removed(dirent->dentry, name)) + return(0); + + return((*dirent->filldir)(dirent->vfs_dirent, name, size, offset, + inode, type)); +} + +static int hppfs_readdir(struct file *file, void *ent, filldir_t filldir) +{ + struct hppfs_private *data = file->private_data; + struct file *proc_file = &data->proc_file; + int (*readdir)(struct file *, void *, filldir_t); + struct hppfs_dirent dirent = ((struct hppfs_dirent) + { .vfs_dirent = ent, + .filldir = filldir, + .dentry = file->f_dentry } ); + int err; + + readdir = proc_file->f_dentry->d_inode->i_fop->readdir; + + proc_file->f_pos = file->f_pos; + err = (*readdir)(proc_file, &dirent, hppfs_filldir); + file->f_pos = proc_file->f_pos; + + return(err); +} + +static int hppfs_fsync(struct file *file, struct dentry *dentry, int datasync) +{ + return(0); +} + +static struct file_operations hppfs_dir_fops = { + .owner = NULL, + .readdir = hppfs_readdir, + .open = hppfs_dir_open, + .fsync = hppfs_fsync, +}; + +static int hppfs_statfs(struct super_block *sb, struct kstatfs *sf) +{ + sf->f_blocks = 0; + sf->f_bfree = 0; + sf->f_bavail = 0; + sf->f_files = 0; + sf->f_ffree = 0; + sf->f_type = HPPFS_SUPER_MAGIC; + return(0); +} + +static struct inode *hppfs_alloc_inode(struct super_block *sb) +{ + struct hppfs_inode_info *hi; + + hi = kmalloc(sizeof(*hi), GFP_KERNEL); + if(hi == NULL) + return(NULL); + + *hi = ((struct hppfs_inode_info) { .proc_dentry = NULL }); + inode_init_once(&hi->vfs_inode); + return(&hi->vfs_inode); +} + +void hppfs_delete_inode(struct inode *ino) +{ + clear_inode(ino); +} + +static void hppfs_destroy_inode(struct inode *inode) +{ + kfree(HPPFS_I(inode)); +} + +static struct super_operations hppfs_sbops = { + .alloc_inode = hppfs_alloc_inode, + .destroy_inode = hppfs_destroy_inode, + .read_inode = hppfs_read_inode, + .delete_inode = hppfs_delete_inode, + .statfs = hppfs_statfs, +}; + +static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen) +{ + struct file *proc_file; + struct dentry *proc_dentry; + int (*readlink)(struct dentry *, char *, int); + int err, n; + + proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; + proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); + err = PTR_ERR(proc_dentry); + if(IS_ERR(proc_dentry)) + return(err); + + readlink = proc_dentry->d_inode->i_op->readlink; + n = (*readlink)(proc_dentry, buffer, buflen); + + fput(proc_file); + + return(n); +} + +static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) +{ + struct file *proc_file; + struct dentry *proc_dentry; + int (*follow_link)(struct dentry *, struct nameidata *); + int err, n; + + proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; + proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); + err = PTR_ERR(proc_dentry); + if(IS_ERR(proc_dentry)) + return(err); + + follow_link = proc_dentry->d_inode->i_op->follow_link; + n = (*follow_link)(proc_dentry, nd); + + fput(proc_file); + + return(n); +} + +static struct inode_operations hppfs_dir_iops = { + .lookup = hppfs_lookup, +}; + +static struct inode_operations hppfs_link_iops = { + .readlink = hppfs_readlink, + .follow_link = hppfs_follow_link, +}; + +static int init_inode(struct inode *inode, struct dentry *dentry) +{ + if(S_ISDIR(dentry->d_inode->i_mode)){ + inode->i_op = &hppfs_dir_iops; + inode->i_fop = &hppfs_dir_fops; + } + else if(S_ISLNK(dentry->d_inode->i_mode)){ + inode->i_op = &hppfs_link_iops; + inode->i_fop = &hppfs_file_fops; + } + else { + inode->i_op = &hppfs_file_iops; + inode->i_fop = &hppfs_file_fops; + } + + HPPFS_I(inode)->proc_dentry = dentry; + + return(0); +} + +static int hppfs_fill_super(struct super_block *sb, void *d, int silent) +{ + struct inode *root_inode; + struct file_system_type *procfs; + struct super_block *proc_sb; + int err; + + err = -ENOENT; + procfs = get_fs_type("proc"); + if(procfs == NULL) + goto out; + + if(list_empty(&procfs->fs_supers)) + goto out; + + proc_sb = list_entry(procfs->fs_supers.next, struct super_block, + s_instances); + + sb->s_blocksize = 1024; + sb->s_blocksize_bits = 10; + sb->s_magic = HPPFS_SUPER_MAGIC; + sb->s_op = &hppfs_sbops; + + root_inode = iget(sb, 0); + if(root_inode == NULL) + goto out; + + err = init_inode(root_inode, proc_sb->s_root); + if(err) + goto out_put; + + err = -ENOMEM; + sb->s_root = d_alloc_root(root_inode); + if(sb->s_root == NULL) + goto out_put; + + hppfs_read_inode(root_inode); + + return(0); + + out_put: + iput(root_inode); + out: + return(err); +} + +static struct super_block *hppfs_read_super(struct file_system_type *type, + int flags, const char *dev_name, + void *data) +{ + return(get_sb_nodev(type, flags, data, hppfs_fill_super)); +} + +static struct file_system_type hppfs_type = { + .owner = THIS_MODULE, + .name = "hppfs", + .get_sb = hppfs_read_super, + .kill_sb = kill_anon_super, + .fs_flags = 0, +}; + +static int __init init_hppfs(void) +{ + return(register_filesystem(&hppfs_type)); +} + +static void __exit exit_hppfs(void) +{ + unregister_filesystem(&hppfs_type); +} + +module_init(init_hppfs) +module_exit(exit_hppfs) +MODULE_LICENSE("GPL"); + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c --- a/fs/hugetlbfs/inode.c 2004-09-06 16:37:54 -07:00 +++ b/fs/hugetlbfs/inode.c 2004-09-06 16:37:54 -07:00 @@ -52,6 +52,9 @@ loff_t len, vma_len; int ret; + if ((vma->vm_flags & (VM_MAYSHARE | VM_WRITE)) == VM_WRITE) + return -EINVAL; + if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1)) return -EINVAL; @@ -70,10 +73,19 @@ file_accessed(file); vma->vm_flags |= VM_HUGETLB | VM_RESERVED; vma->vm_ops = &hugetlb_vm_ops; + + ret = -ENOMEM; + len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); + if (!(vma->vm_flags & VM_WRITE) && len > inode->i_size) + goto out; + ret = hugetlb_prefault(mapping, vma); - len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); - if (ret == 0 && inode->i_size < len) + if (ret) + goto out; + + if (inode->i_size < len) inode->i_size = len; +out: up(&inode->i_sem); return ret; diff -Nru a/fs/inode.c b/fs/inode.c --- a/fs/inode.c 2004-09-06 16:37:55 -07:00 +++ b/fs/inode.c 2004-09-06 16:37:55 -07:00 @@ -243,6 +243,7 @@ */ void clear_inode(struct inode *inode) { + might_sleep(); invalidate_inode_buffers(inode); if (inode->i_data.nrpages) @@ -1373,8 +1374,7 @@ /* inode slab cache */ inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode), - 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, init_once, - NULL); + 0, SLAB_PANIC, init_once, NULL); set_shrinker(DEFAULT_SEEKS, shrink_icache_memory); } diff -Nru a/fs/isofs/inode.c b/fs/isofs/inode.c --- a/fs/isofs/inode.c 2004-09-06 16:37:55 -07:00 +++ b/fs/isofs/inode.c 2004-09-06 16:37:55 -07:00 @@ -108,7 +108,7 @@ { isofs_inode_cachep = kmem_cache_create("isofs_inode_cache", sizeof(struct iso_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (isofs_inode_cachep == NULL) return -ENOMEM; @@ -715,6 +715,7 @@ } s->s_magic = ISOFS_SUPER_MAGIC; + s->s_maxbytes = 0xffffffff; /* We can handle files up to 4 GB */ /* The CDROM is read-only, has no nodes (devices) on it, and since all of the files appear to be owned by root, we really do not want diff -Nru a/fs/isofs/rock.c b/fs/isofs/rock.c --- a/fs/isofs/rock.c 2004-09-06 16:37:53 -07:00 +++ b/fs/isofs/rock.c 2004-09-06 16:37:53 -07:00 @@ -153,6 +153,7 @@ } } MAYBE_CONTINUE(repeat,inode); + if (buffer) kfree(buffer); return retnamlen; /* If 0, this file did not have a NM field */ out: if(buffer) kfree(buffer); @@ -351,7 +352,6 @@ } } MAYBE_CONTINUE(repeat,inode); - return 0; out: if(buffer) kfree(buffer); return 0; @@ -515,6 +515,8 @@ } } MAYBE_CONTINUE(repeat, inode); + if (buffer) + kfree(buffer); if (rpnt == link) goto fail; diff -Nru a/fs/jbd/journal.c b/fs/jbd/journal.c --- a/fs/jbd/journal.c 2004-09-06 16:37:51 -07:00 +++ b/fs/jbd/journal.c 2004-09-06 16:37:51 -07:00 @@ -34,6 +34,7 @@ #include #include #include +#include #include EXPORT_SYMBOL(journal_start); diff -Nru a/fs/jbd/revoke.c b/fs/jbd/revoke.c --- a/fs/jbd/revoke.c 2004-09-06 16:37:50 -07:00 +++ b/fs/jbd/revoke.c 2004-09-06 16:37:50 -07:00 @@ -332,6 +332,7 @@ struct block_device *bdev; int err; + might_sleep(); if (bh_in) BUFFER_TRACE(bh_in, "enter"); diff -Nru a/fs/jffs2/super.c b/fs/jffs2/super.c --- a/fs/jffs2/super.c 2004-09-06 16:37:51 -07:00 +++ b/fs/jffs2/super.c 2004-09-06 16:37:51 -07:00 @@ -302,7 +302,7 @@ jffs2_inode_cachep = kmem_cache_create("jffs2_i", sizeof(struct jffs2_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, jffs2_i_init_once, NULL); if (!jffs2_inode_cachep) { printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n"); diff -Nru a/fs/jfs/acl.c b/fs/jfs/acl.c --- a/fs/jfs/acl.c 2004-09-06 16:37:50 -07:00 +++ b/fs/jfs/acl.c 2004-09-06 16:37:50 -07:00 @@ -1,7 +1,7 @@ /* - * Copyright (c) International Business Machines Corp., 2002 - * Copyright (c) Andreas Gruenbacher, 2001 - * Copyright (c) Linus Torvalds, 1991, 1992 + * Copyright (C) International Business Machines Corp., 2002-2004 + * Copyright (C) Andreas Gruenbacher, 2001 + * Copyright (C) Linus Torvalds, 1991, 1992 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include #include +#include #include "jfs_incore.h" #include "jfs_xattr.h" #include "jfs_acl.h" @@ -280,6 +281,12 @@ rc = inode_change_ok(inode, iattr); if (rc) return rc; + + if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || + (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { + if (DQUOT_TRANSFER(inode, iattr)) + return -EDQUOT; + } rc = inode_setattr(inode, iattr); diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c --- a/fs/jfs/inode.c 2004-09-06 16:37:50 -07:00 +++ b/fs/jfs/inode.c 2004-09-06 16:37:50 -07:00 @@ -1,6 +1,6 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 - * Portions Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) International Business Machines Corp., 2000-2004 + * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_imap.h" @@ -133,6 +134,13 @@ freeZeroLink(inode); diFree(inode); + + /* + * Free the inode from the quota allocation. + */ + DQUOT_INIT(inode); + DQUOT_FREE_INODE(inode); + DQUOT_DROP(inode); clear_inode(inode); } diff -Nru a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c --- a/fs/jfs/jfs_dtree.c 2004-09-06 16:37:54 -07:00 +++ b/fs/jfs/jfs_dtree.c 2004-09-06 16:37:54 -07:00 @@ -101,6 +101,7 @@ */ #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_filsys.h" @@ -380,7 +381,8 @@ * It's time to move the inline table to an external * page and begin to build the xtree */ - if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) + if (DQUOT_ALLOC_BLOCK(ip, sbi->nbperpage) || + dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) goto clean_up; /* No space */ /* @@ -405,7 +407,6 @@ goto clean_up; } ip->i_size = PSIZE; - ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage); if ((mp = get_index_page(ip, 0)) == 0) { jfs_err("add_index: get_metapage failed!"); @@ -447,7 +448,6 @@ goto clean_up; } ip->i_size += PSIZE; - ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage); if ((mp = get_index_page(ip, blkno))) memset(mp->data, 0, PSIZE); /* Just looks better */ @@ -946,6 +946,7 @@ struct dt_lock *dtlck; struct tlock *tlck; struct lv *lv; + int quota_allocation = 0; /* get split page */ smp = split->mp; @@ -992,7 +993,9 @@ split->pxdlist = &pxdlist; rc = dtSplitRoot(tid, ip, split, &rmp); - if (!rc) + if (rc) + dbFree(ip, xaddr, xlen); + else DT_PUTPAGE(rmp); DT_PUTPAGE(smp); @@ -1017,6 +1020,14 @@ n = xlen + (xlen << 1); else n = xlen; + + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, n)) { + rc = -EDQUOT; + goto extendOut; + } + quota_allocation += n; + if ((rc = dbReAlloc(sbi->ipbmap, xaddr, (s64) xlen, (s64) n, &nxaddr))) goto extendOut; @@ -1285,6 +1296,10 @@ freeKeyName: kfree(key.name); + /* Rollback quota allocation */ + if (rc && quota_allocation) + DQUOT_FREE_BLOCK(ip, quota_allocation); + dtSplitUp_Exit: return rc; @@ -1305,7 +1320,6 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split, struct metapage ** rmpp, dtpage_t ** rpp, pxd_t * rpxdp) { - struct super_block *sb = ip->i_sb; int rc = 0; struct metapage *smp; dtpage_t *sp; @@ -1344,6 +1358,12 @@ if (rmp == NULL) return -EIO; + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) { + release_metapage(rmp); + return -EDQUOT; + } + jfs_info("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp); BT_MARK_DIRTY(rmp, ip); @@ -1593,8 +1613,6 @@ *rmpp = rmp; *rpxdp = *pxd; - ip->i_blocks += LBLK2PBLK(sb, lengthPXD(pxd)); - return rc; } @@ -1823,16 +1841,6 @@ tpxd = (pxd_t *) & pp->slot[1]; *tpxd = *pxd; - /* Since the directory might have an EA and/or ACL associated with it - * we need to make sure we take that into account when setting the - * i_nblocks - */ - ip->i_blocks = LBLK2PBLK(ip->i_sb, xlen + - ((JFS_IP(ip)->ea.flag & DXD_EXTENT) ? - lengthDXD(&JFS_IP(ip)->ea) : 0) + - ((JFS_IP(ip)->acl.flag & DXD_EXTENT) ? - lengthDXD(&JFS_IP(ip)->acl) : 0)); - DT_PUTPAGE(pmp); return 0; } @@ -1900,6 +1908,12 @@ rp = rmp->data; + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) { + release_metapage(rmp); + return -EDQUOT; + } + BT_MARK_DIRTY(rmp, ip); /* * acquire a transaction lock on the new right page @@ -2042,7 +2056,6 @@ *rmpp = rmp; - ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); return 0; } @@ -2265,7 +2278,9 @@ } xlen = lengthPXD(&fp->header.self); - ip->i_blocks -= LBLK2PBLK(ip->i_sb, xlen); + + /* Free quota allocation. */ + DQUOT_FREE_BLOCK(ip, xlen); /* free/invalidate its buffer page */ discard_metapage(fmp); @@ -2339,7 +2354,9 @@ } xlen = lengthPXD(&p->header.self); - ip->i_blocks -= LBLK2PBLK(ip->i_sb, xlen); + + /* Free quota allocation */ + DQUOT_FREE_BLOCK(ip, xlen); /* free/invalidate its buffer page */ discard_metapage(mp); @@ -2876,14 +2893,6 @@ /* init '..' entry */ p->header.idotdot = cpu_to_le32(idotdot); - -#if 0 - ip->i_blocks = LBLK2PBLK(ip->i_sb, - ((jfs_ip->ea.flag & DXD_EXTENT) ? - lengthDXD(&jfs_ip->ea) : 0) + - ((jfs_ip->acl.flag & DXD_EXTENT) ? - lengthDXD(&jfs_ip->acl) : 0)); -#endif return; } diff -Nru a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c --- a/fs/jfs/jfs_extent.c 2004-09-06 16:37:53 -07:00 +++ b/fs/jfs/jfs_extent.c 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2003 + * Copyright (C) International Business Machines Corp., 2000-2004 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ */ #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_dmap.h" @@ -144,6 +145,13 @@ return (rc); } + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { + dbFree(ip, nxaddr, (s64) nxlen); + up(&JFS_IP(ip)->commit_sem); + return -EDQUOT; + } + /* determine the value of the extent flag */ xflag = (abnr == TRUE) ? XAD_NOTRECORDED : 0; @@ -161,13 +169,11 @@ */ if (rc) { dbFree(ip, nxaddr, nxlen); + DQUOT_FREE_BLOCK(ip, nxlen); up(&JFS_IP(ip)->commit_sem); return (rc); } - /* update the number of blocks allocated to the file */ - ip->i_blocks += LBLK2PBLK(ip->i_sb, nxlen); - /* set the results of the extent allocation */ XADaddress(xp, nxaddr); XADlength(xp, nxlen); @@ -254,6 +260,13 @@ if ((rc = extBrealloc(ip, xaddr, xlen, &nxlen, &nxaddr))) goto exit; + /* Allocat blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, nxlen)) { + dbFree(ip, nxaddr, (s64) nxlen); + up(&JFS_IP(ip)->commit_sem); + return -EDQUOT; + } + delta = nxlen - xlen; /* check if the extend page is not abnr but the request is abnr @@ -289,6 +302,7 @@ /* extend the extent */ if ((rc = xtExtend(0, ip, xoff + xlen, (int) nextend, 0))) { dbFree(ip, xaddr + xlen, delta); + DQUOT_FREE_BLOCK(ip, nxlen); goto exit; } } else { @@ -299,6 +313,7 @@ */ if ((rc = xtTailgate(0, ip, xoff, (int) ntail, nxaddr, 0))) { dbFree(ip, nxaddr, nxlen); + DQUOT_FREE_BLOCK(ip, nxlen); goto exit; } } @@ -319,9 +334,6 @@ xflag = 0; } } - - /* update the inode with the number of blocks allocated */ - ip->i_blocks += LBLK2PBLK(sb, delta); /* set the return results */ XADaddress(xp, nxaddr); diff -Nru a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c --- a/fs/jfs/jfs_imap.c 2004-09-06 16:37:51 -07:00 +++ b/fs/jfs/jfs_imap.c 2004-09-06 16:37:51 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2003 + * Copyright (C) International Business Machines Corp., 2000-2004 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,6 +44,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" @@ -504,6 +505,9 @@ ip->i_mapping->a_ops = &jfs_aops; mapping_set_gfp_mask(ip->i_mapping, GFP_NOFS); + /* Allocations to metadata inodes should not affect quotas */ + ip->i_flags |= S_NOQUOTA; + if ((inum == FILESYSTEM_I) && (JFS_IP(ip)->ipimap == sbi->ipaimap)) { sbi->gengen = le32_to_cpu(dp->di_gengen); sbi->inostamp = le32_to_cpu(dp->di_inostamp); @@ -2601,28 +2605,11 @@ iagp->inosmap[i] = ONES; flush_metapage(mp); -#ifdef _STILL_TO_PORT - /* synchronously write the iag page */ - if (bmWrite(bp)) { - /* Free the blocks allocated for the iag since it was - * not successfully added to the inode map - */ - dbFree(ipimap, xaddr, (s64) xlen); - - /* release the inode map lock */ - IWRITE_UNLOCK(ipimap); - - rc = -EIO; - goto out; - } - - /* Now the iag is on disk */ /* * start tyransaction of update of the inode map * addressing structure pointing to the new iag page; */ -#endif /* _STILL_TO_PORT */ tid = txBegin(sb, COMMIT_FORCE); down(&JFS_IP(ipimap)->commit_sem); @@ -2644,7 +2631,7 @@ /* update the inode map's inode to reflect the extension */ ipimap->i_size += PSIZE; - ipimap->i_blocks += LBLK2PBLK(sb, xlen); + inode_add_bytes(ipimap, PSIZE); /* * txCommit(COMMIT_FORCE) will synchronously write address @@ -3085,7 +3072,7 @@ } /* update the inode map's inode to reflect the extension */ ip->i_size += PSIZE; - ip->i_blocks += LBLK2PBLK(sb, xlen); + inode_add_bytes(ip, PSIZE); txCommit(tid, 1, &ip, COMMIT_FORCE); cleanup: txEnd(tid); diff -Nru a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c --- a/fs/jfs/jfs_inode.c 2004-09-06 16:37:50 -07:00 +++ b/fs/jfs/jfs_inode.c 2004-09-06 16:37:50 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 + * Copyright (C) International Business Machines Corp., 2000-2004 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ */ #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_imap.h" @@ -59,6 +60,17 @@ mode |= S_ISGID; } else inode->i_gid = current->fsgid; + + /* + * Allocate inode to quota. + */ + if (DQUOT_ALLOC_INODE(inode)) { + DQUOT_DROP(inode); + inode->i_flags |= S_NOQUOTA; + inode->i_nlink = 0; + iput(inode); + return NULL; + } inode->i_mode = mode; if (S_ISDIR(mode)) diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c --- a/fs/jfs/jfs_metapage.c 2004-09-06 16:37:51 -07:00 +++ b/fs/jfs/jfs_metapage.c 2004-09-06 16:37:51 -07:00 @@ -557,6 +557,7 @@ if (page) { block_invalidatepage(page, 0); unlock_page(page); + page_cache_release(page); } } } diff -Nru a/fs/jfs/jfs_mount.c b/fs/jfs/jfs_mount.c --- a/fs/jfs/jfs_mount.c 2004-09-06 16:37:51 -07:00 +++ b/fs/jfs/jfs_mount.c 2004-09-06 16:37:51 -07:00 @@ -197,9 +197,6 @@ /* * unwind on error */ -//errout42: /* close fileset inode allocation map */ - diUnmount(ipimap, 1); - errout41: /* close fileset inode allocation map inode */ diFreeSpecial(ipimap); diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c 2004-09-06 16:37:53 -07:00 +++ b/fs/jfs/jfs_txnmgr.c 2004-09-06 16:37:53 -07:00 @@ -2621,8 +2621,6 @@ struct tblock *tblk = tid_to_tblock(tid); struct tlock *tlck; - jfs_warn("txAbort: tid:%d dirty:0x%x", tid, dirty); - /* * free tlocks of the transaction */ diff -Nru a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c --- a/fs/jfs/jfs_xtree.c 2004-09-06 16:37:52 -07:00 +++ b/fs/jfs/jfs_xtree.c 2004-09-06 16:37:52 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2003 + * Copyright (C) International Business Machines Corp., 2000-2004 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ */ #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_metapage.h" @@ -829,8 +830,12 @@ hint = addressXAD(xad) + lengthXAD(xad) - 1; } else hint = 0; - if ((rc = dbAlloc(ip, hint, (s64) xlen, &xaddr))) + if ((rc = DQUOT_ALLOC_BLOCK(ip, xlen))) goto out; + if ((rc = dbAlloc(ip, hint, (s64) xlen, &xaddr))) { + DQUOT_FREE_BLOCK(ip, xlen); + goto out; + } } /* @@ -855,8 +860,10 @@ split.pxdlist = NULL; if ((rc = xtSplitUp(tid, ip, &split, &btstack))) { /* undo data extent allocation */ - if (*xaddrp == 0) + if (*xaddrp == 0) { dbFree(ip, xaddr, (s64) xlen); + DQUOT_FREE_BLOCK(ip, xlen); + } return rc; } @@ -1214,22 +1221,34 @@ pxd_t *pxd; struct tlock *tlck; struct xtlock *sxtlck = NULL, *rxtlck = NULL; + int quota_allocation = 0; smp = split->mp; sp = XT_PAGE(ip, smp); INCREMENT(xtStat.split); - /* - * allocate the new right page for the split - */ pxdlist = split->pxdlist; pxd = &pxdlist->pxd[pxdlist->npxd]; pxdlist->npxd++; rbn = addressPXD(pxd); + + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) { + rc = -EDQUOT; + goto clean_up; + } + + quota_allocation += lengthPXD(pxd); + + /* + * allocate the new right page for the split + */ rmp = get_metapage(ip, rbn, PSIZE, 1); - if (rmp == NULL) - return -EIO; + if (rmp == NULL) { + rc = -EIO; + goto clean_up; + } jfs_info("xtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp); @@ -1304,8 +1323,6 @@ *rmpp = rmp; *rbnp = rbn; - ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); - jfs_info("xtSplitPage: sp:0x%p rp:0x%p", sp, rp); return 0; } @@ -1321,7 +1338,7 @@ XT_GETPAGE(ip, nextbn, mp, PSIZE, p, rc); if (rc) { XT_PUTPAGE(rmp); - return rc; + goto clean_up; } BT_MARK_DIRTY(mp, ip); @@ -1420,10 +1437,16 @@ *rmpp = rmp; *rbnp = rbn; - ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); - jfs_info("xtSplitPage: sp:0x%p rp:0x%p", sp, rp); return rc; + + clean_up: + + /* Rollback quota allocation. */ + if (quota_allocation) + DQUOT_FREE_BLOCK(ip, quota_allocation); + + return (rc); } @@ -1478,6 +1501,12 @@ if (rmp == NULL) return -EIO; + /* Allocate blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, lengthPXD(pxd))) { + release_metapage(rmp); + return -EDQUOT; + } + jfs_info("xtSplitRoot: ip:0x%p rmp:0x%p", ip, rmp); /* @@ -1561,8 +1590,6 @@ *rmpp = rmp; - ip->i_blocks += LBLK2PBLK(ip->i_sb, lengthPXD(pxd)); - jfs_info("xtSplitRoot: sp:0x%p rp:0x%p", sp, rp); return 0; } @@ -3909,8 +3936,8 @@ else ip->i_size = newsize; - /* update nblocks to reflect freed blocks */ - ip->i_blocks -= LBLK2PBLK(ip->i_sb, nfreed); + /* update quota allocation to reflect freed blocks */ + DQUOT_FREE_BLOCK(ip, nfreed); /* * free tlock of invalidated pages diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c --- a/fs/jfs/namei.c 2004-09-06 16:37:54 -07:00 +++ b/fs/jfs/namei.c 2004-09-06 16:37:54 -07:00 @@ -19,6 +19,7 @@ #include #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_inode.h" @@ -123,10 +124,10 @@ */ ino = ip->i_ino; if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { - jfs_err("jfs_create: dtInsert returned %d", rc); - if (rc == -EIO) + if (rc == -EIO) { + jfs_err("jfs_create: dtInsert returned -EIO"); txAbort(tid, 1); /* Marks Filesystem dirty */ - else + } else txAbort(tid, 0); /* Filesystem full */ goto out3; } @@ -250,11 +251,10 @@ */ ino = ip->i_ino; if ((rc = dtInsert(tid, dip, &dname, &ino, &btstack))) { - jfs_err("jfs_mkdir: dtInsert returned %d", rc); - - if (rc == -EIO) + if (rc == -EIO) { + jfs_err("jfs_mkdir: dtInsert returned -EIO"); txAbort(tid, 1); /* Marks Filesystem dirty */ - else + } else txAbort(tid, 0); /* Filesystem full */ goto out3; } @@ -330,6 +330,9 @@ jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name); + /* Init inode for quota operations. */ + DQUOT_INIT(ip); + /* directory must be empty to be removed */ if (!dtEmpty(ip)) { rc = -ENOTEMPTY; @@ -455,6 +458,9 @@ jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name); + /* Init inode for quota operations. */ + DQUOT_INIT(ip); + if ((rc = get_UCSname(&dname, dentry))) goto out; @@ -813,7 +819,10 @@ iplist[1] = dir; rc = txCommit(tid, 2, &iplist[0], 0); - if (!rc) + if (rc) { + ip->i_nlink--; + iput(ip); + } else d_instantiate(dentry, ip); free_dname: @@ -964,7 +973,7 @@ mp = get_metapage(ip, xaddr, PSIZE, 1); if (mp == NULL) { - dbFree(ip, extent, xlen); + xtTruncate(tid, ip, 0, COMMIT_PWMAP); rc = -EIO; txAbort(tid, 0); goto out3; @@ -975,7 +984,6 @@ name += copy_size; xaddr += JFS_SBI(sb)->nbperpage; } - ip->i_blocks = LBLK2PBLK(sb, xlen); } /* @@ -988,7 +996,7 @@ } if (rc) { if (xlen) - dbFree(ip, extent, xlen); + xtTruncate(tid, ip, 0, COMMIT_PWMAP); txAbort(tid, 0); /* discard new inode */ goto out3; @@ -1104,8 +1112,11 @@ rc = -EMLINK; goto out3; } - } else if (new_ip) + } else if (new_ip) { IWRITE_LOCK(new_ip); + /* Init inode for quota operations. */ + DQUOT_INIT(new_ip); + } /* * The real work starts here @@ -1174,8 +1185,8 @@ ino = old_ip->i_ino; rc = dtInsert(tid, new_dir, &new_dname, &ino, &btstack); if (rc) { - jfs_err("jfs_rename: dtInsert failed w/rc = %d", - rc); + if (rc == -EIO) + jfs_err("jfs_rename: dtInsert returned -EIO"); goto out4; } if (S_ISDIR(old_ip->i_mode)) diff -Nru a/fs/jfs/resize.c b/fs/jfs/resize.c --- a/fs/jfs/resize.c 2004-09-06 16:37:53 -07:00 +++ b/fs/jfs/resize.c 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2003 + * Copyright (C) International Business Machines Corp., 2000-2004 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_metapage.h" @@ -390,7 +391,7 @@ } /* update bmap file size */ ipbmap->i_size += xlen << sbi->l2bsize; - ipbmap->i_blocks += LBLK2PBLK(sb, xlen); + inode_add_bytes(ipbmap, xlen << sbi->l2bsize); iplist[0] = ipbmap; rc = txCommit(tid, 1, &iplist[0], COMMIT_FORCE); diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c --- a/fs/jfs/super.c 2004-09-06 16:37:52 -07:00 +++ b/fs/jfs/super.c 2004-09-06 16:37:52 -07:00 @@ -58,7 +58,7 @@ #ifdef CONFIG_JFS_DEBUG int jfsloglevel = JFS_LOGLEVEL_WARN; -module_param(jfsloglevel, int, 644); +module_param(jfsloglevel, int, 0644); MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); #endif diff -Nru a/fs/jfs/xattr.c b/fs/jfs/xattr.c --- a/fs/jfs/xattr.c 2004-09-06 16:37:52 -07:00 +++ b/fs/jfs/xattr.c 2004-09-06 16:37:52 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) International Business Machines Corp., 2000-2003 + * Copyright (C) International Business Machines Corp., 2000-2004 * Copyright (C) Christoph Hellwig, 2002 * * This program is free software; you can redistribute it and/or modify @@ -19,6 +19,7 @@ #include #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_dmap.h" @@ -251,9 +252,17 @@ /* figure out how many blocks we need */ nblocks = (size + (sb->s_blocksize - 1)) >> sb->s_blocksize_bits; + /* Allocate new blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(ip, nblocks)) { + return -EDQUOT; + } + rc = dbAlloc(ip, INOHINT(ip), nblocks, &blkno); - if (rc) + if (rc) { + /*Rollback quota allocation. */ + DQUOT_FREE_BLOCK(ip, nblocks); return rc; + } /* * Now have nblocks worth of storage to stuff into the FEALIST. @@ -315,6 +324,9 @@ return 0; failed: + /* Rollback quota allocation. */ + DQUOT_FREE_BLOCK(ip, nblocks); + dbFree(ip, blkno, nblocks); return rc; } @@ -448,6 +460,7 @@ int blocks_needed, current_blocks; s64 blkno; int rc; + int quota_allocation = 0; /* When fsck.jfs clears a bad ea, it doesn't clear the size */ if (ji->ea.flag == 0) @@ -517,10 +530,16 @@ sb->s_blocksize_bits; if (blocks_needed > current_blocks) { + /* Allocate new blocks to quota. */ + if (DQUOT_ALLOC_BLOCK(inode, blocks_needed)) + return -EDQUOT; + + quota_allocation = blocks_needed; + rc = dbAlloc(inode, INOHINT(inode), (s64) blocks_needed, &blkno); if (rc) - return rc; + goto clean_up; DXDlength(&ea_buf->new_ea, blocks_needed); DXDaddress(&ea_buf->new_ea, blkno); @@ -534,7 +553,8 @@ 1); if (ea_buf->mp == NULL) { dbFree(inode, blkno, (s64) blocks_needed); - return -EIO; + rc = -EIO; + goto clean_up; } ea_buf->xattr = ea_buf->mp->data; ea_buf->max_size = (min_size + sb->s_blocksize - 1) & @@ -544,7 +564,7 @@ if ((rc = ea_read(inode, ea_buf->xattr))) { discard_metapage(ea_buf->mp); dbFree(inode, blkno, (s64) blocks_needed); - return rc; + goto clean_up; } goto size_check; } @@ -552,8 +572,10 @@ ea_buf->mp = read_metapage(inode, addressDXD(&ji->ea), lengthDXD(&ji->ea) << sb->s_blocksize_bits, 1); - if (ea_buf->mp == NULL) - return -EIO; + if (ea_buf->mp == NULL) { + rc = -EIO; + goto clean_up; + } ea_buf->xattr = ea_buf->mp->data; ea_buf->max_size = (ea_size + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); @@ -563,10 +585,18 @@ printk(KERN_ERR "ea_get: invalid extended attribute\n"); dump_mem("xattr", ea_buf->xattr, ea_size); ea_release(inode, ea_buf); - return -EIO; + rc = -EIO; + goto clean_up; } return ea_size; + + clean_up: + /* Rollback quota allocation */ + if (quota_allocation) + DQUOT_FREE_BLOCK(inode, quota_allocation); + + return (rc); } static void ea_release(struct inode *inode, struct ea_buffer *ea_buf) @@ -640,7 +670,10 @@ ji->ea.size = 0; } - inode->i_blocks += LBLK2PBLK(inode->i_sb, new_blocks - old_blocks); + /* If old blocks exist, they must be removed from quota allocation. */ + if (old_blocks) + DQUOT_FREE_BLOCK(inode, old_blocks); + inode->i_ctime = CURRENT_TIME; rc = txCommit(tid, 1, &inode, 0); txEnd(tid); diff -Nru a/fs/libfs.c b/fs/libfs.c --- a/fs/libfs.c 2004-09-06 16:37:50 -07:00 +++ b/fs/libfs.c 2004-09-06 16:37:50 -07:00 @@ -27,14 +27,27 @@ } /* - * Lookup the data. This is trivial - if the dentry didn't already - * exist, we know it is negative. + * Retaining negative dentries for an in-memory filesystem just wastes + * memory and lookup time: arrange for them to be deleted immediately. */ +static int simple_delete_dentry(struct dentry *dentry) +{ + return 1; +} +/* + * Lookup the data. This is trivial - if the dentry didn't already + * exist, we know it is negative. Set d_op to delete negative dentries. + */ struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { + static struct dentry_operations simple_dentry_operations = { + .d_delete = simple_delete_dentry, + }; + if (dentry->d_name.len > NAME_MAX) return ERR_PTR(-ENAMETOOLONG); + dentry->d_op = &simple_dentry_operations; d_add(dentry, NULL); return NULL; } @@ -456,6 +469,58 @@ return count; } +/* + * Transaction based IO. + * The file expects a single write which triggers the transaction, and then + * possibly a read which collects the result - which is stored in a + * file-local buffer. + */ +char *simple_transaction_get(struct file *file, const char __user *buf, size_t size) +{ + struct simple_transaction_argresp *ar; + static spinlock_t simple_transaction_lock = SPIN_LOCK_UNLOCKED; + + if (size > SIMPLE_TRANSACTION_LIMIT - 1) + return ERR_PTR(-EFBIG); + + ar = (struct simple_transaction_argresp *)get_zeroed_page(GFP_KERNEL); + if (!ar) + return ERR_PTR(-ENOMEM); + + spin_lock(&simple_transaction_lock); + + /* only one write allowed per open */ + if (file->private_data) { + spin_unlock(&simple_transaction_lock); + free_page((unsigned long)ar); + return ERR_PTR(-EBUSY); + } + + file->private_data = ar; + + spin_unlock(&simple_transaction_lock); + + if (copy_from_user(ar->data, buf, size)) + return ERR_PTR(-EFAULT); + + return ar->data; +} + +ssize_t simple_transaction_read(struct file *file, char __user *buf, size_t size, loff_t *pos) +{ + struct simple_transaction_argresp *ar = file->private_data; + + if (!ar) + return 0; + return simple_read_from_buffer(buf, size, pos, ar->data, ar->size); +} + +int simple_transaction_release(struct inode *inode, struct file *file) +{ + free_page((unsigned long)file->private_data); + return 0; +} + EXPORT_SYMBOL(dcache_dir_close); EXPORT_SYMBOL(dcache_dir_lseek); EXPORT_SYMBOL(dcache_dir_open); @@ -479,3 +544,6 @@ EXPORT_SYMBOL(simple_sync_file); EXPORT_SYMBOL(simple_unlink); EXPORT_SYMBOL(simple_read_from_buffer); +EXPORT_SYMBOL(simple_transaction_get); +EXPORT_SYMBOL(simple_transaction_read); +EXPORT_SYMBOL(simple_transaction_release); diff -Nru a/fs/lockd/svc.c b/fs/lockd/svc.c --- a/fs/lockd/svc.c 2004-09-06 16:37:53 -07:00 +++ b/fs/lockd/svc.c 2004-09-06 16:37:53 -07:00 @@ -409,13 +409,13 @@ MODULE_LICENSE("GPL"); module_param_call(nlm_grace_period, param_set_grace_period, param_get_ulong, - &nlm_grace_period, 644); + &nlm_grace_period, 0644); module_param_call(nlm_timeout, param_set_timeout, param_get_ulong, - &nlm_timeout, 644); + &nlm_timeout, 0644); module_param_call(nlm_udpport, param_set_port, param_get_int, - &nlm_udpport, 644); + &nlm_udpport, 0644); module_param_call(nlm_tcpport, param_set_port, param_get_int, - &nlm_tcpport, 644); + &nlm_tcpport, 0644); /* * Initialising and terminating the module. diff -Nru a/fs/locks.c b/fs/locks.c --- a/fs/locks.c 2004-09-06 16:37:55 -07:00 +++ b/fs/locks.c 2004-09-06 16:37:55 -07:00 @@ -2063,4 +2063,4 @@ return 0; } -module_init(filelock_init) +core_initcall(filelock_init); diff -Nru a/fs/minix/inode.c b/fs/minix/inode.c --- a/fs/minix/inode.c 2004-09-06 16:37:53 -07:00 +++ b/fs/minix/inode.c 2004-09-06 16:37:53 -07:00 @@ -79,7 +79,7 @@ { minix_inode_cachep = kmem_cache_create("minix_inode_cache", sizeof(struct minix_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (minix_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/mpage.c b/fs/mpage.c --- a/fs/mpage.c 2004-09-06 16:37:51 -07:00 +++ b/fs/mpage.c 2004-09-06 16:37:51 -07:00 @@ -290,7 +290,8 @@ alloc_new: if (bio == NULL) { bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), - nr_pages, GFP_KERNEL); + min_t(int, nr_pages, bio_get_nr_vecs(bdev)), + GFP_KERNEL); if (bio == NULL) goto confused; } diff -Nru a/fs/namei.c b/fs/namei.c --- a/fs/namei.c 2004-09-06 16:37:51 -07:00 +++ b/fs/namei.c 2004-09-06 16:37:52 -07:00 @@ -868,29 +868,31 @@ return 0; /* something went wrong... */ if (!nd->dentry->d_inode || S_ISDIR(nd->dentry->d_inode->i_mode)) { - struct nameidata nd_root; + struct dentry *old_dentry = nd->dentry; + struct vfsmount *old_mnt = nd->mnt; + struct qstr last = nd->last; + int last_type = nd->last_type; /* * NAME was not found in alternate root or it's a directory. Try to find * it in the normal root: */ - nd_root.last_type = LAST_ROOT; - nd_root.flags = nd->flags; - nd_root.depth = 0; - memcpy(&nd_root.intent, &nd->intent, sizeof(nd_root.intent)); + nd->last_type = LAST_ROOT; read_lock(¤t->fs->lock); - nd_root.mnt = mntget(current->fs->rootmnt); - nd_root.dentry = dget(current->fs->root); + nd->mnt = mntget(current->fs->rootmnt); + nd->dentry = dget(current->fs->root); read_unlock(¤t->fs->lock); - if (path_walk(name, &nd_root)) - return 1; - if (nd_root.dentry->d_inode) { + if (path_walk(name, nd) == 0) { + if (nd->dentry->d_inode) { + dput(old_dentry); + mntput(old_mnt); + return 1; + } path_release(nd); - nd->dentry = nd_root.dentry; - nd->mnt = nd_root.mnt; - nd->last = nd_root.last; - return 1; } - path_release(&nd_root); + nd->dentry = old_dentry; + nd->mnt = old_mnt; + nd->last = last; + nd->last_type = last_type; } return 1; } @@ -943,8 +945,7 @@ } nd->mnt = mntget(current->fs->rootmnt); nd->dentry = dget(current->fs->root); - } - else{ + } else { nd->mnt = mntget(current->fs->pwdmnt); nd->dentry = dget(current->fs->pwd); } @@ -1094,8 +1095,12 @@ static inline int may_delete(struct inode *dir,struct dentry *victim,int isdir) { int error; - if (!victim->d_inode || victim->d_parent->d_inode != dir) + + if (!victim->d_inode) return -ENOENT; + + BUG_ON(victim->d_parent->d_inode != dir); + error = permission(dir,MAY_WRITE | MAY_EXEC, NULL); if (error) return error; @@ -2299,12 +2304,8 @@ int page_follow_link_light(struct dentry *dentry, struct nameidata *nd) { struct page *page; - char *s = page_getlink(dentry, &page); - if (!IS_ERR(s)) { - nd_set_link(nd, s); - s = NULL; - } - return PTR_ERR(s); + nd_set_link(nd, page_getlink(dentry, &page)); + return 0; } void page_put_link(struct dentry *dentry, struct nameidata *nd) diff -Nru a/fs/namespace.c b/fs/namespace.c --- a/fs/namespace.c 2004-09-06 16:37:53 -07:00 +++ b/fs/namespace.c 2004-09-06 16:37:53 -07:00 @@ -930,7 +930,35 @@ EXPORT_SYMBOL_GPL(mark_mounts_for_expiry); -int copy_mount_options (const void __user *data, unsigned long *where) +/* + * Some copy_from_user() implementations do not return the exact number of + * bytes remaining to copy on a fault. But copy_mount_options() requires that. + * Note that this function differs from copy_from_user() in that it will oops + * on bad values of `to', rather than returning a short copy. + */ +static long +exact_copy_from_user(void *to, const void __user *from, unsigned long n) +{ + char *t = to; + const char __user *f = from; + char c; + + if (!access_ok(VERIFY_READ, from, n)) + return n; + + while (n) { + if (__get_user(c, f)) { + memset(t, 0, n); + break; + } + *t++ = c; + f++; + n--; + } + return n; +} + +int copy_mount_options(const void __user *data, unsigned long *where) { int i; unsigned long page; @@ -952,7 +980,7 @@ if (size > PAGE_SIZE) size = PAGE_SIZE; - i = size - copy_from_user((void *)page, data, size); + i = size - exact_copy_from_user((void *)page, data, size); if (!i) { free_page(page); return -EFAULT; diff -Nru a/fs/ncpfs/file.c b/fs/ncpfs/file.c --- a/fs/ncpfs/file.c 2004-09-06 16:37:50 -07:00 +++ b/fs/ncpfs/file.c 2004-09-06 16:37:50 -07:00 @@ -115,11 +115,6 @@ if (!ncp_conn_valid(NCP_SERVER(inode))) return -EIO; - if (!S_ISREG(inode->i_mode)) { - DPRINTK("ncp_file_read: read from non-file, mode %07o\n", - inode->i_mode); - return -EINVAL; - } pos = *ppos; @@ -175,10 +170,8 @@ *ppos = pos; - if (!IS_RDONLY(inode)) { - inode->i_atime = CURRENT_TIME; - } - + file_accessed(file); + DPRINTK("ncp_file_read: exit %s/%s\n", dentry->d_parent->d_name.name, dentry->d_name.name); outrel: @@ -201,11 +194,6 @@ dentry->d_parent->d_name.name, dentry->d_name.name); if (!ncp_conn_valid(NCP_SERVER(inode))) return -EIO; - if (!S_ISREG(inode->i_mode)) { - DPRINTK("ncp_file_write: write to non-file, mode %07o\n", - inode->i_mode); - return -EINVAL; - } if ((ssize_t) count < 0) return -EINVAL; pos = *ppos; @@ -273,8 +261,9 @@ } } vfree(bouncebuffer); - inode->i_mtime = inode->i_atime = CURRENT_TIME; - + + inode_update_time(inode, 1); + *ppos = pos; if (pos > inode->i_size) { diff -Nru a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c --- a/fs/ncpfs/inode.c 2004-09-06 16:37:52 -07:00 +++ b/fs/ncpfs/inode.c 2004-09-06 16:37:52 -07:00 @@ -72,7 +72,7 @@ { ncp_inode_cachep = kmem_cache_create("ncp_inode_cache", sizeof(struct ncp_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (ncp_inode_cachep == NULL) return -ENOMEM; @@ -235,8 +235,9 @@ #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) static struct inode_operations ncp_symlink_inode_operations = { - .readlink = page_readlink, - .follow_link = page_follow_link, + .readlink = generic_readlink, + .follow_link = page_follow_link_light, + .put_link = page_put_link, .setattr = ncp_notify_change, }; #endif diff -Nru a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c --- a/fs/ncpfs/mmap.c 2004-09-06 16:37:54 -07:00 +++ b/fs/ncpfs/mmap.c 2004-09-06 16:37:54 -07:00 @@ -110,23 +110,19 @@ DPRINTK("ncp_mmap: called\n"); - if (!ncp_conn_valid(NCP_SERVER(inode))) { + if (!ncp_conn_valid(NCP_SERVER(inode))) return -EIO; - } + /* only PAGE_COW or read-only supported now */ if (vma->vm_flags & VM_SHARED) return -EINVAL; - if (!inode->i_sb || !S_ISREG(inode->i_mode)) - return -EACCES; /* we do not support files bigger than 4GB... We eventually supports just 4GB... */ if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff > (1U << (32 - PAGE_SHIFT))) return -EFBIG; - if (!IS_RDONLY(inode)) { - inode->i_atime = CURRENT_TIME; - } vma->vm_ops = &ncp_file_mmap; + file_accessed(file); return 0; } diff -Nru a/fs/nfs/inode.c b/fs/nfs/inode.c --- a/fs/nfs/inode.c 2004-09-06 16:37:54 -07:00 +++ b/fs/nfs/inode.c 2004-09-06 16:37:54 -07:00 @@ -1377,9 +1377,6 @@ /* Zero out the NFS state stuff */ init_nfsv4_state(server); - root = &server->fh; - nfs_copy_fh(root, (struct nfs_fh *) &data->root); - if (data->version != NFS_MOUNT_VERSION) { printk("nfs warning: mount version %s than kernel\n", data->version < NFS_MOUNT_VERSION ? "older" : "newer"); @@ -1389,18 +1386,25 @@ data->bsize = 0; if (data->version < 4) { data->flags &= ~NFS_MOUNT_VER3; - root->size = NFS2_FHSIZE; - memcpy(root->data, data->old_root.data, NFS2_FHSIZE); + data->root.size = NFS2_FHSIZE; + memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE); } if (data->version < 5) data->flags &= ~NFS_MOUNT_SECFLAVOUR; } + root = &server->fh; + if (data->flags & NFS_MOUNT_VER3) + root->size = data->root.size; + else + root->size = NFS2_FHSIZE; if (root->size > sizeof(root->data)) { printk("nfs_get_sb: invalid root filehandle\n"); kfree(server); return ERR_PTR(-EINVAL); } + memcpy(root->data, data->root.data, root->size); + /* We now require that the mount process passes the remote address */ memcpy(&server->addr, &data->addr, sizeof(server->addr)); if (server->addr.sin_addr.s_addr == INADDR_ANY) { @@ -1859,7 +1863,7 @@ { nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", sizeof(struct nfs_inode), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (nfs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c --- a/fs/nfs/nfs2xdr.c 2004-09-06 16:37:52 -07:00 +++ b/fs/nfs/nfs2xdr.c 2004-09-06 16:37:52 -07:00 @@ -57,7 +57,7 @@ #define NFS_attrstat_sz (1+NFS_fattr_sz) #define NFS_diropres_sz (1+NFS_fhandle_sz+NFS_fattr_sz) -#define NFS_readlinkres_sz (1) +#define NFS_readlinkres_sz (2) #define NFS_readres_sz (1+NFS_fattr_sz+1) #define NFS_writeres_sz (NFS_attrstat_sz) #define NFS_stat_sz (1) @@ -530,7 +530,6 @@ nfs_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs_readlinkargs *args) { struct rpc_auth *auth = req->rq_task->tk_auth; - unsigned int count = args->count - 5; unsigned int replen; p = xdr_encode_fhandle(p, args->fh); @@ -538,7 +537,7 @@ /* Inline the page array */ replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS_readlinkres_sz) << 2; - xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, 0, count); + xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, args->pgbase, args->pglen); return 0; } @@ -550,32 +549,38 @@ { struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct kvec *iov = rcvbuf->head; - unsigned int hdrlen; - u32 *strlen, len; - char *string; + int hdrlen, len, recvd; + char *kaddr; int status; if ((status = ntohl(*p++))) return -nfs_stat_to_errno(status); + /* Convert length of symlink */ + len = ntohl(*p++); + if (len >= rcvbuf->page_len || len <= 0) { + dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); + return -ENAMETOOLONG; + } hdrlen = (u8 *) p - (u8 *) iov->iov_base; - if (iov->iov_len > hdrlen) { + if (iov->iov_len < hdrlen) { + printk(KERN_WARNING "NFS: READLINK reply header overflowed:" + "length %d > %Zu\n", hdrlen, iov->iov_len); + return -errno_NFSERR_IO; + } else if (iov->iov_len != hdrlen) { dprintk("NFS: READLINK header is short. iovec will be shifted.\n"); xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen); } - - strlen = (u32*)kmap_atomic(rcvbuf->pages[0], KM_USER0); - /* Convert length of symlink */ - len = ntohl(*strlen); - if (len > rcvbuf->page_len) { - dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); - kunmap_atomic(strlen, KM_USER0); - return -ENAMETOOLONG; + recvd = req->rq_rcv_buf.len - hdrlen; + if (recvd < len) { + printk(KERN_WARNING "NFS: server cheating in readlink reply: " + "count %u > recvd %u\n", len, recvd); + return -EIO; } - *strlen = len; + /* NULL terminate the string we got */ - string = (char *)(strlen + 1); - string[len] = '\0'; - kunmap_atomic(strlen, KM_USER0); + kaddr = (char *)kmap_atomic(rcvbuf->pages[0], KM_USER0); + kaddr[len+rcvbuf->page_base] = '\0'; + kunmap_atomic(kaddr, KM_USER0); return 0; } diff -Nru a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c --- a/fs/nfs/nfs3proc.c 2004-09-06 16:37:52 -07:00 +++ b/fs/nfs/nfs3proc.c 2004-09-06 16:37:52 -07:00 @@ -202,13 +202,14 @@ return status; } -static int -nfs3_proc_readlink(struct inode *inode, struct page *page) +static int nfs3_proc_readlink(struct inode *inode, struct page *page, + unsigned int pgbase, unsigned int pglen) { struct nfs_fattr fattr; struct nfs3_readlinkargs args = { .fh = NFS_FH(inode), - .count = PAGE_CACHE_SIZE, + .pgbase = pgbase, + .pglen = pglen, .pages = &page }; int status; @@ -417,20 +418,21 @@ static int nfs3_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name) { - struct nfs3_diropargs *arg; - struct nfs_fattr *res; + struct unlinkxdr { + struct nfs3_diropargs arg; + struct nfs_fattr res; + } *ptr; - arg = (struct nfs3_diropargs *)kmalloc(sizeof(*arg)+sizeof(*res), GFP_KERNEL); - if (!arg) + ptr = (struct unlinkxdr *)kmalloc(sizeof(*ptr), GFP_KERNEL); + if (!ptr) return -ENOMEM; - res = (struct nfs_fattr*)(arg + 1); - arg->fh = NFS_FH(dir->d_inode); - arg->name = name->name; - arg->len = name->len; - res->valid = 0; + ptr->arg.fh = NFS_FH(dir->d_inode); + ptr->arg.name = name->name; + ptr->arg.len = name->len; + ptr->res.valid = 0; msg->rpc_proc = &nfs3_procedures[NFS3PROC_REMOVE]; - msg->rpc_argp = arg; - msg->rpc_resp = res; + msg->rpc_argp = &ptr->arg; + msg->rpc_resp = &ptr->res; return 0; } diff -Nru a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c --- a/fs/nfs/nfs3xdr.c 2004-09-06 16:37:55 -07:00 +++ b/fs/nfs/nfs3xdr.c 2004-09-06 16:37:55 -07:00 @@ -67,7 +67,7 @@ #define NFS3_wccstat_sz (1+NFS3_wcc_data_sz) #define NFS3_lookupres_sz (1+NFS3_fh_sz+(2 * NFS3_post_op_attr_sz)) #define NFS3_accessres_sz (1+NFS3_post_op_attr_sz+1) -#define NFS3_readlinkres_sz (1+NFS3_post_op_attr_sz) +#define NFS3_readlinkres_sz (1+NFS3_post_op_attr_sz+1) #define NFS3_readres_sz (1+NFS3_post_op_attr_sz+3) #define NFS3_writeres_sz (1+NFS3_wcc_data_sz+4) #define NFS3_createres_sz (1+NFS3_fh_sz+NFS3_post_op_attr_sz+NFS3_wcc_data_sz) @@ -698,7 +698,6 @@ nfs3_xdr_readlinkargs(struct rpc_rqst *req, u32 *p, struct nfs3_readlinkargs *args) { struct rpc_auth *auth = req->rq_task->tk_auth; - unsigned int count = args->count - 5; unsigned int replen; p = xdr_encode_fhandle(p, args->fh); @@ -706,7 +705,7 @@ /* Inline the page array */ replen = (RPC_REPHDRSIZE + auth->au_rslack + NFS3_readlinkres_sz) << 2; - xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, 0, count); + xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, args->pgbase, args->pglen); return 0; } @@ -718,9 +717,8 @@ { struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct kvec *iov = rcvbuf->head; - unsigned int hdrlen; - u32 *strlen, len; - char *string; + int hdrlen, len, recvd; + char *kaddr; int status; status = ntohl(*p++); @@ -729,25 +727,33 @@ if (status != 0) return -nfs_stat_to_errno(status); + /* Convert length of symlink */ + len = ntohl(*p++); + if (len >= rcvbuf->page_len || len <= 0) { + dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); + return -ENAMETOOLONG; + } + hdrlen = (u8 *) p - (u8 *) iov->iov_base; - if (iov->iov_len > hdrlen) { + if (iov->iov_len < hdrlen) { + printk(KERN_WARNING "NFS: READLINK reply header overflowed:" + "length %d > %Zu\n", hdrlen, iov->iov_len); + return -errno_NFSERR_IO; + } else if (iov->iov_len != hdrlen) { dprintk("NFS: READLINK header is short. iovec will be shifted.\n"); xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen); } - - strlen = (u32*)kmap_atomic(rcvbuf->pages[0], KM_USER0); - /* Convert length of symlink */ - len = ntohl(*strlen); - if (len > rcvbuf->page_len) { - dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); - kunmap_atomic(strlen, KM_USER0); - return -ENAMETOOLONG; + recvd = req->rq_rcv_buf.len - hdrlen; + if (recvd < len) { + printk(KERN_WARNING "NFS: server cheating in readlink reply: " + "count %u > recvd %u\n", len, recvd); + return -EIO; } - *strlen = len; + /* NULL terminate the string we got */ - string = (char *)(strlen + 1); - string[len] = '\0'; - kunmap_atomic(strlen, KM_USER0); + kaddr = (char*)kmap_atomic(rcvbuf->pages[0], KM_USER0); + kaddr[len+rcvbuf->page_base] = '\0'; + kunmap_atomic(kaddr, KM_USER0); return 0; } diff -Nru a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c --- a/fs/nfs/nfs4proc.c 2004-09-06 16:37:54 -07:00 +++ b/fs/nfs/nfs4proc.c 2004-09-06 16:37:54 -07:00 @@ -1173,11 +1173,13 @@ * Both of these changes to the XDR layer would in fact be quite * minor, but I decided to leave them for a subsequent patch. */ -static int _nfs4_proc_readlink(struct inode *inode, struct page *page) +static int _nfs4_proc_readlink(struct inode *inode, struct page *page, + unsigned int pgbase, unsigned int pglen) { struct nfs4_readlink args = { .fh = NFS_FH(inode), - .count = PAGE_CACHE_SIZE, + .pgbase = pgbase, + .pglen = pglen, .pages = &page, }; struct rpc_message msg = { @@ -1189,13 +1191,14 @@ return rpc_call_sync(NFS_CLIENT(inode), &msg, 0); } -static int nfs4_proc_readlink(struct inode *inode, struct page *page) +static int nfs4_proc_readlink(struct inode *inode, struct page *page, + unsigned int pgbase, unsigned int pglen) { struct nfs4_exception exception = { }; int err; do { err = nfs4_handle_exception(NFS_SERVER(inode), - _nfs4_proc_readlink(inode, page), + _nfs4_proc_readlink(inode, page, pgbase, pglen), &exception); } while (exception.retry); return err; diff -Nru a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c --- a/fs/nfs/nfs4xdr.c 2004-09-06 16:37:55 -07:00 +++ b/fs/nfs/nfs4xdr.c 2004-09-06 16:37:55 -07:00 @@ -1027,7 +1027,6 @@ static int encode_readlink(struct xdr_stream *xdr, const struct nfs4_readlink *readlink, struct rpc_rqst *req) { struct rpc_auth *auth = req->rq_task->tk_auth; - unsigned int count = readlink->count - 5; unsigned int replen; uint32_t *p; @@ -1036,10 +1035,11 @@ /* set up reply kvec * toplevel_status + taglen + rescount + OP_PUTFH + status - * + OP_READLINK + status = 7 + * + OP_READLINK + status + string length = 8 */ - replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2; - xdr_inline_pages(&req->rq_rcv_buf, replen, readlink->pages, 0, count); + replen = (RPC_REPHDRSIZE + auth->au_rslack + 8) << 2; + xdr_inline_pages(&req->rq_rcv_buf, replen, readlink->pages, + readlink->pgbase, readlink->pglen); return 0; } @@ -3053,21 +3053,30 @@ { struct xdr_buf *rcvbuf = &req->rq_rcv_buf; struct kvec *iov = rcvbuf->head; - uint32_t *strlen; - unsigned int hdrlen, len; - char *string; + int hdrlen, len, recvd; + uint32_t *p; + char *kaddr; int status; status = decode_op_hdr(xdr, OP_READLINK); if (status) return status; + /* Convert length of symlink */ + READ_BUF(4); + READ32(len); + if (len >= rcvbuf->page_len || len <= 0) { + dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); + return -ENAMETOOLONG; + } hdrlen = (char *) xdr->p - (char *) iov->iov_base; - if (iov->iov_len > hdrlen) { - dprintk("NFS: READLINK header is short. iovec will be shifted.\n"); - xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen); - + recvd = req->rq_rcv_buf.len - hdrlen; + if (recvd < len) { + printk(KERN_WARNING "NFS: server cheating in readlink reply: " + "count %u > recvd %u\n", len, recvd); + return -EIO; } + xdr_read_pages(xdr, len); /* * The XDR encode routine has set things up so that * the link text will be copied directly into the @@ -3075,18 +3084,9 @@ * and and null-terminate the text (the VFS expects * null-termination). */ - strlen = (uint32_t *) kmap_atomic(rcvbuf->pages[0], KM_USER0); - len = ntohl(*strlen); - if (len > rcvbuf->page_len) { - dprintk(KERN_WARNING "nfs: server returned giant symlink!\n"); - kunmap_atomic(strlen, KM_USER0); - return -ENAMETOOLONG; - } - *strlen = len; - - string = (char *)(strlen + 1); - string[len] = '\0'; - kunmap_atomic(strlen, KM_USER0); + kaddr = (char *)kmap_atomic(rcvbuf->pages[0], KM_USER0); + kaddr[len+rcvbuf->page_base] = '\0'; + kunmap_atomic(kaddr, KM_USER0); return 0; } diff -Nru a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c --- a/fs/nfs/nfsroot.c 2004-09-06 16:37:54 -07:00 +++ b/fs/nfs/nfsroot.c 2004-09-06 16:37:54 -07:00 @@ -495,8 +495,10 @@ if (status < 0) printk(KERN_ERR "Root-NFS: Server returned error %d " "while mounting %s\n", status, nfs_path); - else - nfs_copy_fh(nfs_data.root, fh); + else { + nfs_data.root.size = fh.size; + memcpy(nfs_data.root.data, fh.data, fh.size); + } return status; } diff -Nru a/fs/nfs/proc.c b/fs/nfs/proc.c --- a/fs/nfs/proc.c 2004-09-06 16:37:55 -07:00 +++ b/fs/nfs/proc.c 2004-09-06 16:37:55 -07:00 @@ -140,12 +140,13 @@ return status; } -static int -nfs_proc_readlink(struct inode *inode, struct page *page) +static int nfs_proc_readlink(struct inode *inode, struct page *page, + unsigned int pgbase, unsigned int pglen) { struct nfs_readlinkargs args = { .fh = NFS_FH(inode), - .count = PAGE_CACHE_SIZE, + .pgbase = pgbase, + .pglen = pglen, .pages = &page }; int status; @@ -390,6 +391,7 @@ return -ENAMETOOLONG; dprintk("NFS call symlink %s -> %s\n", name->name, path->name); fattr->valid = 0; + fhandle->size = 0; status = rpc_call(NFS_CLIENT(dir), NFSPROC_SYMLINK, &arg, NULL, 0); dprintk("NFS reply symlink: %d\n", status); return status; diff -Nru a/fs/nfs/symlink.c b/fs/nfs/symlink.c --- a/fs/nfs/symlink.c 2004-09-06 16:37:53 -07:00 +++ b/fs/nfs/symlink.c 2004-09-06 16:37:53 -07:00 @@ -23,20 +23,30 @@ #include #include #include +#include /* Symlink caching in the page cache is even more simplistic * and straight-forward than readdir caching. + * + * At the beginning of the page we store pointer to struct page in question, + * simplifying nfs_put_link() (if inode got invalidated we can't find the page + * to be freed via pagecache lookup). + * The NUL-terminated string follows immediately thereafter. */ + +struct nfs_symlink { + struct page *page; + char body[0]; +}; + static int nfs_symlink_filler(struct inode *inode, struct page *page) { + const unsigned int pgbase = offsetof(struct nfs_symlink, body); + const unsigned int pglen = PAGE_SIZE - pgbase; int error; - /* We place the length at the beginning of the page, - * in host byte order, followed by the string. The - * XDR response verification will NULL terminate it. - */ lock_kernel(); - error = NFS_PROTO(inode)->readlink(inode, page); + error = NFS_PROTO(inode)->readlink(inode, page, pgbase, pglen); unlock_kernel(); if (error < 0) goto error; @@ -50,61 +60,58 @@ return -EIO; } -static char *nfs_getlink(struct inode *inode, struct page **ppage) +static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) { + struct inode *inode = dentry->d_inode; struct page *page; - u32 *p; - - page = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); - if (page) + struct nfs_symlink *p; + void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); + if (err) goto read_failed; page = read_cache_page(&inode->i_data, 0, (filler_t *)nfs_symlink_filler, inode); - if (IS_ERR(page)) + if (IS_ERR(page)) { + err = page; goto read_failed; - if (!PageUptodate(page)) + } + if (!PageUptodate(page)) { + err = ERR_PTR(-EIO); goto getlink_read_error; - *ppage = page; + } p = kmap(page); - return (char*)(p+1); + p->page = page; + nd_set_link(nd, p->body); + return 0; getlink_read_error: page_cache_release(page); - page = ERR_PTR(-EIO); read_failed: - return (char*)page; + nd_set_link(nd, err); + return 0; } -static int nfs_readlink(struct dentry *dentry, char __user *buffer, int buflen) +static void nfs_put_link(struct dentry *dentry, struct nameidata *nd) { - struct inode *inode = dentry->d_inode; - struct page *page = NULL; - int res = vfs_readlink(dentry,buffer,buflen,nfs_getlink(inode,&page)); - if (page) { - kunmap(page); - page_cache_release(page); - } - return res; -} + char *s = nd_get_link(nd); + if (!IS_ERR(s)) { + struct nfs_symlink *p; + struct page *page; + + p = container_of(s, struct nfs_symlink, body[0]); + page = p->page; -static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) -{ - struct inode *inode = dentry->d_inode; - struct page *page = NULL; - int res = vfs_follow_link(nd, nfs_getlink(inode,&page)); - if (page) { kunmap(page); page_cache_release(page); } - return res; } /* * symlinks can't do much... */ struct inode_operations nfs_symlink_inode_operations = { - .readlink = nfs_readlink, + .readlink = generic_readlink, .follow_link = nfs_follow_link, + .put_link = nfs_put_link, .getattr = nfs_getattr, .setattr = nfs_setattr, }; diff -Nru a/fs/nfsd/export.c b/fs/nfsd/export.c --- a/fs/nfsd/export.c 2004-09-06 16:37:53 -07:00 +++ b/fs/nfsd/export.c 2004-09-06 16:37:53 -07:00 @@ -294,6 +294,11 @@ qword_add(bpp, blen, exp->ex_client->name); pth = d_path(exp->ex_dentry, exp->ex_mnt, *bpp, *blen); + if (IS_ERR(pth)) { + /* is this correct? */ + (*bpp)[0] = '\n'; + return; + } qword_add(bpp, blen, pth); (*bpp)[-1] = '\n'; } diff -Nru a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c --- a/fs/nfsd/nfsctl.c 2004-09-06 16:37:51 -07:00 +++ b/fs/nfsd/nfsctl.c 2004-09-06 16:37:51 -07:00 @@ -80,101 +80,31 @@ [NFSD_Leasetime] = write_leasetime, }; -/* an argresp is stored in an allocated page and holds the - * size of the argument or response, along with its content - */ -struct argresp { - ssize_t size; - char data[0]; -}; - -/* - * transaction based IO methods. - * The file expects a single write which triggers the transaction, and then - * possibly a read which collects the result - which is stored in a - * file-local buffer. - */ -static ssize_t TA_write(struct file *file, const char __user *buf, size_t size, loff_t *pos) +static ssize_t nfsctl_transaction_write(struct file *file, const char __user *buf, size_t size, loff_t *pos) { ino_t ino = file->f_dentry->d_inode->i_ino; - struct argresp *ar; - ssize_t rv = 0; + char *data; + ssize_t rv; if (ino >= sizeof(write_op)/sizeof(write_op[0]) || !write_op[ino]) return -EINVAL; - if (file->private_data) - return -EINVAL; /* only one write allowed per open */ - if (size > PAGE_SIZE - sizeof(struct argresp)) - return -EFBIG; - ar = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!ar) - return -ENOMEM; - ar->size = 0; - down(&file->f_dentry->d_inode->i_sem); - if (file->private_data) - rv = -EINVAL; - else - file->private_data = ar; - up(&file->f_dentry->d_inode->i_sem); - if (rv) { - kfree(ar); - return rv; - } - if (copy_from_user(ar->data, buf, size)) - return -EFAULT; - - rv = write_op[ino](file, ar->data, size); + data = simple_transaction_get(file, buf, size); + if (IS_ERR(data)) + return PTR_ERR(data); + + rv = write_op[ino](file, data, size); if (rv>0) { - ar->size = rv; + simple_transaction_set(file, rv); rv = size; } return rv; } - -static ssize_t TA_read(struct file *file, char __user *buf, size_t size, loff_t *pos) -{ - struct argresp *ar; - ssize_t rv = 0; - - if (file->private_data == NULL) - rv = TA_write(file, buf, 0, pos); - if (rv < 0) - return rv; - - ar = file->private_data; - if (!ar) - return 0; - if (*pos >= ar->size) - return 0; - if (*pos + size > ar->size) - size = ar->size - *pos; - if (copy_to_user(buf, ar->data + *pos, size)) - return -EFAULT; - *pos += size; - return size; -} - -static int TA_open(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} - -static int TA_release(struct inode *inode, struct file *file) -{ - void *p = file->private_data; - file->private_data = NULL; - kfree(p); - return 0; -} - static struct file_operations transaction_ops = { - .write = TA_write, - .read = TA_read, - .open = TA_open, - .release = TA_release, + .write = nfsctl_transaction_write, + .read = simple_transaction_read, + .release = simple_transaction_release, }; extern struct seq_operations nfs_exports_op; @@ -366,7 +296,7 @@ if (len) return len; - mesg = buf; len = PAGE_SIZE-sizeof(struct argresp); + mesg = buf; len = SIMPLE_TRANSACTION_LIMIT; qword_addhex(&mesg, &len, (char*)&fh.fh_base, fh.fh_size); mesg[-1] = '\n'; return mesg - buf; diff -Nru a/fs/nls/nls_cp932.c b/fs/nls/nls_cp932.c --- a/fs/nls/nls_cp932.c 2004-09-06 16:37:51 -07:00 +++ b/fs/nls/nls_cp932.c 2004-09-06 16:37:51 -07:00 @@ -1619,6 +1619,33 @@ NULL, NULL, c2u_FA, c2u_FB, c2u_FC, NULL, NULL, NULL, }; +static unsigned char u2c_00hi[256 - 0xA0][2] = { + {0x00, 0x00}, {0x00, 0x00}, {0x81, 0x91}, {0x81, 0x92},/* 0xA0-0xA3 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x81, 0x98},/* 0xA4-0xA7 */ + {0x81, 0x4E}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xA8-0xAB */ + {0x81, 0xCA}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xAC-0xAF */ + {0x81, 0x8B}, {0x81, 0x7D}, {0x00, 0x00}, {0x00, 0x00},/* 0xB0-0xB3 */ + {0x81, 0x4C}, {0x00, 0x00}, {0x81, 0xF7}, {0x00, 0x00},/* 0xB4-0xB7 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xB8-0xBB */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xBC-0xBF */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xC0-0xC3 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xC4-0xC7 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xC8-0xCB */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xCC-0xCF */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xD0-0xD3 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x81, 0x7E},/* 0xD4-0xD7 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xD8-0xDB */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xDC-0xDF */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xE0-0xE3 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xE4-0xE7 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xE8-0xEB */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xEC-0xEF */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xF0-0xF3 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x81, 0x80},/* 0xF4-0xF7 */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xF8-0xFB */ + {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x00},/* 0xFC-0xFF */ +}; + static unsigned char u2c_03[512] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x03 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04-0x07 */ @@ -7708,7 +7735,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xD4-0xD7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xD8-0xDB */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xDC-0xDF */ - 0x81, 0x91, 0x81, 0x92, 0xEE, 0xF9, 0x81, 0x50, /* 0xE0-0xE3 */ + 0x81, 0x91, 0x81, 0x92, 0x81, 0xCA, 0x81, 0x50, /* 0xE0-0xE3 */ 0xEE, 0xFA, 0x81, 0x8F, 0x00, 0x00, 0x00, 0x00, /* 0xE4-0xE7 */ }; @@ -7842,9 +7869,17 @@ if (out[0] == 0x00 && out[1] == 0x00) return -EINVAL; return 2; - } else if ((ch == 0) && (cl <= 0x7F)) { - out[0] = cl; - return 1; + } else if (ch == 0) { + if (cl <= 0x7F) { + out[0] = cl; + return 1; + } else if (0xA0 <= cl) { + out[0] = u2c_00hi[cl - 0xA0][0]; + out[1] = u2c_00hi[cl - 0xA0][1]; + if (out[0] && out[1]) + return 2; + } + return -EINVAL; } else return -EINVAL; diff -Nru a/fs/ntfs/super.c b/fs/ntfs/super.c --- a/fs/ntfs/super.c 2004-09-06 16:37:54 -07:00 +++ b/fs/ntfs/super.c 2004-09-06 16:37:54 -07:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include "ntfs.h" #include "sysctl.h" @@ -2638,7 +2639,7 @@ ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name, sizeof(ntfs_inode), 0, - SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, NULL, NULL); + SLAB_RECLAIM_ACCOUNT, NULL, NULL); if (!ntfs_inode_cache) { printk(KERN_CRIT "NTFS: Failed to create %s!\n", ntfs_inode_cache_name); @@ -2724,7 +2725,7 @@ MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2004 Anton Altaparmakov"); MODULE_LICENSE("GPL"); #ifdef DEBUG -MODULE_PARM(debug_msgs, "i"); +module_param(debug_msgs, bool, 0); MODULE_PARM_DESC(debug_msgs, "Enable debug messages."); #endif diff -Nru a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c --- a/fs/openpromfs/inode.c 2004-09-06 16:37:52 -07:00 +++ b/fs/openpromfs/inode.c 2004-09-06 16:37:52 -07:00 @@ -79,7 +79,7 @@ count = 9 - file->f_pos; if (copy_to_user(buf, buffer + file->f_pos, count)) return -EFAULT; - file->f_pos += count; + *ppos += count; return count; } @@ -94,7 +94,7 @@ openprom_property *op; char buffer[64]; - if (filp->f_pos >= 0xffffff || count >= 0xffffff) + if (*ppos >= 0xffffff || count >= 0xffffff) return -EINVAL; if (!filp->private_data) { node = nodes[(u16)((long)inode->u.generic_ip)].node; @@ -180,7 +180,7 @@ } else { i = (op->len << 1) + 1; } - k = filp->f_pos; + k = *ppos; if (k >= i) return 0; if (count > i - k) count = i - k; if (op->flag & OPP_STRING) { @@ -197,7 +197,7 @@ j = count; if (j >= 0) { - if (copy_to_user(buf + k - filp->f_pos, + if (copy_to_user(buf + k - *ppos, op->value + k - 1, j)) return -EFAULT; count -= j; @@ -205,11 +205,11 @@ } if (count) { - if (put_user('\'', &buf [k++ - filp->f_pos])) + if (put_user('\'', &buf [k++ - *ppos])) return -EFAULT; } if (count > 1) { - if (put_user('\n', &buf [k++ - filp->f_pos])) + if (put_user('\n', &buf [k++ - *ppos])) return -EFAULT; } } else if (op->flag & OPP_STRINGLIST) { @@ -287,7 +287,7 @@ if ((k < i - 1) && (k & 1)) { sprintf (buffer, "%02x", (unsigned char) *(op->value + (k >> 1)) & 0xff); - if (put_user(buffer[1], &buf[k++ - filp->f_pos])) + if (put_user(buffer[1], &buf[k++ - *ppos])) return -EFAULT; count--; } @@ -295,7 +295,7 @@ for (; (count > 1) && (k < i - 1); k += 2) { sprintf (buffer, "%02x", (unsigned char) *(op->value + (k >> 1)) & 0xff); - if (copy_to_user(buf + k - filp->f_pos, buffer, 2)) + if (copy_to_user(buf + k - *ppos, buffer, 2)) return -EFAULT; count -= 2; } @@ -303,18 +303,18 @@ if (count && (k < i - 1)) { sprintf (buffer, "%02x", (unsigned char) *(op->value + (k >> 1)) & 0xff); - if (put_user(buffer[0], &buf[k++ - filp->f_pos])) + if (put_user(buffer[0], &buf[k++ - *ppos])) return -EFAULT; count--; } if (count) { - if (put_user('\n', &buf [k++ - filp->f_pos])) + if (put_user('\n', &buf [k++ - *ppos])) return -EFAULT; } } - count = k - filp->f_pos; - filp->f_pos = k; + count = k - *ppos; + *ppos = k; return count; } @@ -327,14 +327,14 @@ void *b; openprom_property *op; - if (filp->f_pos >= 0xffffff || count >= 0xffffff) + if (*ppos >= 0xffffff || count >= 0xffffff) return -EINVAL; if (!filp->private_data) { i = property_read (filp, NULL, 0, NULL); if (i) return i; } - k = filp->f_pos; + k = *ppos; op = (openprom_property *)filp->private_data; if (!(op->flag & OPP_STRING)) { u32 *first, *last; @@ -462,7 +462,7 @@ op->len = i; } else op->len = i; - filp->f_pos += count; + *ppos += count; } write_try_string: if (!(op->flag & OPP_BINARY)) { @@ -480,7 +480,7 @@ op->flag |= OPP_QUOTED; buf++; count--; - filp->f_pos++; + (*ppos)++; if (!count) { op->flag |= OPP_STRING; return 1; @@ -489,9 +489,9 @@ op->flag |= OPP_NOTQUOTED; } op->flag |= OPP_STRING; - if (op->alloclen <= count + filp->f_pos) { + if (op->alloclen <= count + *ppos) { b = kmalloc (sizeof (openprom_property) - + 2 * (count + filp->f_pos), GFP_KERNEL); + + 2 * (count + *ppos), GFP_KERNEL); if (!b) return -ENOMEM; memcpy (b, filp->private_data, @@ -499,14 +499,14 @@ + strlen (op->name) + op->alloclen); memset (((char *)b) + sizeof (openprom_property) + strlen (op->name) + op->alloclen, - 0, 2*(count - filp->f_pos) - op->alloclen); + 0, 2*(count - *ppos) - op->alloclen); op = (openprom_property *)b; - op->alloclen = 2*(count + filp->f_pos); + op->alloclen = 2*(count + *ppos); b = filp->private_data; filp->private_data = (void *)op; kfree (b); } - p = op->value + filp->f_pos - ((op->flag & OPP_QUOTED) ? 1 : 0); + p = op->value + *ppos - ((op->flag & OPP_QUOTED) ? 1 : 0); if (copy_from_user(p, buf, count)) return -EFAULT; op->flag |= OPP_DIRTY; @@ -517,17 +517,17 @@ } if (i < count) { op->len = p - op->value; - filp->f_pos += i + 1; + *ppos += i + 1; if ((p > op->value) && (op->flag & OPP_QUOTED) && (*(p - 1) == '\'')) op->len--; } else { if (p - op->value > op->len) op->len = p - op->value; - filp->f_pos += count; + *ppos += count; } } - return filp->f_pos - k; + return *ppos - k; } int property_release (struct inode *inode, struct file *filp) diff -Nru a/fs/partitions/acorn.c b/fs/partitions/acorn.c --- a/fs/partitions/acorn.c 2004-09-06 16:37:53 -07:00 +++ b/fs/partitions/acorn.c 2004-09-06 16:37:53 -07:00 @@ -61,7 +61,7 @@ struct riscix_record { __u32 magic; -#define RISCIX_MAGIC (0x4a657320) +#define RISCIX_MAGIC cpu_to_le32(0x4a657320) __u32 date; struct riscix_part part[8]; }; diff -Nru a/fs/partitions/amiga.c b/fs/partitions/amiga.c --- a/fs/partitions/amiga.c 2004-09-06 16:37:52 -07:00 +++ b/fs/partitions/amiga.c 2004-09-06 16:37:52 -07:00 @@ -31,6 +31,7 @@ struct RigidDiskBlock *rdb; struct PartitionBlock *pb; int start_sect, nr_sects, blk, part, res = 0; + int blksize = 1; /* Multiplier for disk block size */ int slot = 1; char b[BDEVNAME_SIZE]; @@ -65,10 +66,14 @@ bdevname(bdev, b), blk); } - printk(" RDSK"); + /* blksize is blocks per 512 byte standard block */ + blksize = be32_to_cpu( rdb->rdb_BlockBytes ) / 512; + + printk(" RDSK (%d)", blksize * 512); /* Be more informative */ blk = be32_to_cpu(rdb->rdb_PartitionList); put_dev_sector(sect); for (part = 1; blk>0 && part<=16; part++, put_dev_sector(sect)) { + blk *= blksize; /* Read in terms partition table understands */ data = read_dev_sector(bdev, blk, §); if (!data) { if (warn_no_part) @@ -88,13 +93,32 @@ nr_sects = (be32_to_cpu(pb->pb_Environment[10]) + 1 - be32_to_cpu(pb->pb_Environment[9])) * be32_to_cpu(pb->pb_Environment[3]) * - be32_to_cpu(pb->pb_Environment[5]); + be32_to_cpu(pb->pb_Environment[5]) * + blksize; if (!nr_sects) continue; start_sect = be32_to_cpu(pb->pb_Environment[9]) * be32_to_cpu(pb->pb_Environment[3]) * - be32_to_cpu(pb->pb_Environment[5]); + be32_to_cpu(pb->pb_Environment[5]) * + blksize; put_partition(state,slot++,start_sect,nr_sects); + { + /* Be even more informative to aid mounting */ + char dostype[4]; + u32 *dt = (u32 *)dostype; + *dt = pb->pb_Environment[16]; + if (dostype[3] < ' ') + printk(" (%c%c%c^%c)", + dostype[0], dostype[1], + dostype[2], dostype[3] + '@' ); + else + printk(" (%c%c%c%c)", + dostype[0], dostype[1], + dostype[2], dostype[3]); + printk("(res %d spb %d)", + be32_to_cpu(pb->pb_Environment[6]), + be32_to_cpu(pb->pb_Environment[4])); + } res = 1; } printk("\n"); diff -Nru a/fs/proc/array.c b/fs/proc/array.c --- a/fs/proc/array.c 2004-09-06 16:37:53 -07:00 +++ b/fs/proc/array.c 2004-09-06 16:37:53 -07:00 @@ -278,7 +278,6 @@ cap_t(p->cap_effective)); } -extern char *task_mem(struct mm_struct *, char *); int proc_pid_status(struct task_struct *task, char * buffer) { char * orig = buffer; @@ -299,7 +298,6 @@ return buffer - orig; } -extern unsigned long task_vsize(struct mm_struct *); int proc_pid_stat(struct task_struct *task, char * buffer) { unsigned long vsize, eip, esp, wchan; @@ -312,21 +310,16 @@ int num_threads = 0; struct mm_struct *mm; unsigned long long start_time; + unsigned long cmin_flt = 0, cmaj_flt = 0, cutime = 0, cstime = 0; char tcomm[sizeof(task->comm)]; state = *get_task_state(task); vsize = eip = esp = 0; - task_lock(task); - mm = task->mm; - if(mm) - mm = mmgrab(mm); - task_unlock(task); + mm = get_task_mm(task); if (mm) { - down_read(&mm->mmap_sem); vsize = task_vsize(mm); eip = KSTK_EIP(task); esp = KSTK_ESP(task); - up_read(&mm->mmap_sem); } get_task_comm(tcomm, task); @@ -348,6 +341,10 @@ } pgid = process_group(task); sid = task->signal->session; + cmin_flt = task->signal->cmin_flt; + cmaj_flt = task->signal->cmaj_flt; + cutime = task->signal->cutime; + cstime = task->signal->cstime; } read_unlock(&tasklist_lock); @@ -376,13 +373,13 @@ tty_pgrp, task->flags, task->min_flt, - task->cmin_flt, + cmin_flt, task->maj_flt, - task->cmaj_flt, + cmaj_flt, jiffies_to_clock_t(task->utime), jiffies_to_clock_t(task->stime), - jiffies_to_clock_t(task->cutime), - jiffies_to_clock_t(task->cstime), + jiffies_to_clock_t(cutime), + jiffies_to_clock_t(cstime), priority, nice, num_threads, @@ -416,17 +413,13 @@ return res; } -extern int task_statm(struct mm_struct *, int *, int *, int *, int *); int proc_pid_statm(struct task_struct *task, char *buffer) { int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0; struct mm_struct *mm = get_task_mm(task); if (mm) { - down_read(&mm->mmap_sem); size = task_statm(mm, &shared, &text, &data, &resident); - up_read(&mm->mmap_sem); - mmput(mm); } diff -Nru a/fs/proc/base.c b/fs/proc/base.c --- a/fs/proc/base.c 2004-09-06 16:37:53 -07:00 +++ b/fs/proc/base.c 2004-09-06 16:37:53 -07:00 @@ -60,6 +60,9 @@ PROC_TGID_MAPS, PROC_TGID_MOUNTS, PROC_TGID_WCHAN, +#ifdef CONFIG_SCHEDSTATS + PROC_TGID_SCHEDSTAT, +#endif #ifdef CONFIG_SECURITY PROC_TGID_ATTR, PROC_TGID_ATTR_CURRENT, @@ -83,6 +86,9 @@ PROC_TID_MAPS, PROC_TID_MOUNTS, PROC_TID_WCHAN, +#ifdef CONFIG_SCHEDSTATS + PROC_TID_SCHEDSTAT, +#endif #ifdef CONFIG_SECURITY PROC_TID_ATTR, PROC_TID_ATTR_CURRENT, @@ -123,6 +129,9 @@ #ifdef CONFIG_KALLSYMS E(PROC_TGID_WCHAN, "wchan", S_IFREG|S_IRUGO), #endif +#ifdef CONFIG_SCHEDSTATS + E(PROC_TGID_SCHEDSTAT, "schedstat", S_IFREG|S_IRUGO), +#endif {0,0,NULL,0} }; static struct pid_entry tid_base_stuff[] = { @@ -145,6 +154,9 @@ #ifdef CONFIG_KALLSYMS E(PROC_TID_WCHAN, "wchan", S_IFREG|S_IRUGO), #endif +#ifdef CONFIG_SCHEDSTATS + E(PROC_TID_SCHEDSTAT, "schedstat",S_IFREG|S_IRUGO), +#endif {0,0,NULL,0} }; @@ -340,7 +352,7 @@ // If the nul at the end of args has been overwritten, then // assume application is using setproctitle(3). - if (res > 0 && buffer[res-1] != '\0') { + if (res > 0 && buffer[res-1] != '\0' && len < PAGE_SIZE) { len = strnlen(buffer, res); if (len < res) { res = len; @@ -398,6 +410,19 @@ } #endif /* CONFIG_KALLSYMS */ +#ifdef CONFIG_SCHEDSTATS +/* + * Provides /proc/PID/schedstat + */ +static int proc_pid_schedstat(struct task_struct *task, char *buffer) +{ + return sprintf(buffer, "%lu %lu %lu\n", + task->sched_info.cpu_time, + task->sched_info.run_delay, + task->sched_info.pcnt); +} +#endif + /************************************************************************/ /* Here the fs part begins */ /************************************************************************/ @@ -518,7 +543,6 @@ struct inode * inode = file->f_dentry->d_inode; unsigned long page; ssize_t length; - ssize_t end; struct task_struct *task = proc_task(inode); if (count > PROC_BLOCK_SIZE) @@ -528,24 +552,10 @@ length = PROC_I(inode)->op.proc_read(task, (char*)page); - if (length < 0) { - free_page(page); - return length; - } - /* Static 4kB (or whatever) block capacity */ - if (*ppos >= length) { - free_page(page); - return 0; - } - if (count + *ppos > length) - count = length - *ppos; - end = count + *ppos; - if (copy_to_user(buf, (char *) page + *ppos, count)) - count = -EFAULT; - else - *ppos = end; + if (length >= 0) + length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); free_page(page); - return count; + return length; } static struct file_operations proc_info_file_operations = { @@ -768,10 +778,9 @@ .follow_link = proc_pid_follow_link }; -static int pid_alive(struct task_struct *p) +static inline int pid_alive(struct task_struct *p) { - BUG_ON(p->pids[PIDTYPE_PID].pidptr != &p->pids[PIDTYPE_PID].pid); - return atomic_read(&p->pids[PIDTYPE_PID].pid.count); + return p->pids[PIDTYPE_PID].nr != 0; } #define NUMBUF 10 @@ -1169,7 +1178,6 @@ struct inode * inode = file->f_dentry->d_inode; unsigned long page; ssize_t length; - ssize_t end; struct task_struct *task = proc_task(inode); if (count > PAGE_SIZE) @@ -1180,24 +1188,10 @@ length = security_getprocattr(task, (char*)file->f_dentry->d_name.name, (void*)page, count); - if (length < 0) { - free_page(page); - return length; - } - /* Static 4kB (or whatever) block capacity */ - if (*ppos >= length) { - free_page(page); - return 0; - } - if (count + *ppos > length) - count = length - *ppos; - end = count + *ppos; - if (copy_to_user(buf, (char *) page + *ppos, count)) - count = -EFAULT; - else - *ppos = end; + if (length >= 0) + length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); free_page(page); - return count; + return length; } static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, @@ -1376,6 +1370,13 @@ ei->op.proc_read = proc_pid_wchan; break; #endif +#ifdef CONFIG_SCHEDSTATS + case PROC_TID_SCHEDSTAT: + case PROC_TGID_SCHEDSTAT: + inode->i_fop = &proc_info_file_operations; + ei->op.proc_read = proc_pid_schedstat; + break; +#endif default: printk("procfs: impossible type (%d)",p->type); iput(inode); @@ -1527,6 +1528,7 @@ void proc_pid_flush(struct dentry *proc_dentry) { + might_sleep(); if(proc_dentry != NULL) { shrink_dcache_parent(proc_dentry); dput(proc_dentry); diff -Nru a/fs/proc/inode.c b/fs/proc/inode.c --- a/fs/proc/inode.c 2004-09-06 16:37:54 -07:00 +++ b/fs/proc/inode.c 2004-09-06 16:37:54 -07:00 @@ -120,7 +120,7 @@ { proc_inode_cachep = kmem_cache_create("proc_inode_cache", sizeof(struct proc_inode), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (proc_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c --- a/fs/proc/proc_misc.c 2004-09-06 16:37:51 -07:00 +++ b/fs/proc/proc_misc.c 2004-09-06 16:37:51 -07:00 @@ -541,70 +541,6 @@ return proc_calc_metrics(page, start, off, count, eof, len); } -/* - * This function accesses profiling information. The returned data is - * binary: the sampling step and the actual contents of the profile - * buffer. Use of the program readprofile is recommended in order to - * get meaningful info out of these data. - */ -static ssize_t -read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) -{ - unsigned long p = *ppos; - ssize_t read; - char * pnt; - unsigned int sample_step = 1 << prof_shift; - - if (p >= (prof_len+1)*sizeof(unsigned int)) - return 0; - if (count > (prof_len+1)*sizeof(unsigned int) - p) - count = (prof_len+1)*sizeof(unsigned int) - p; - read = 0; - - while (p < sizeof(unsigned int) && count > 0) { - put_user(*((char *)(&sample_step)+p),buf); - buf++; p++; count--; read++; - } - pnt = (char *)prof_buffer + p - sizeof(unsigned int); - if (copy_to_user(buf,(void *)pnt,count)) - return -EFAULT; - read += count; - *ppos += read; - return read; -} - -/* - * Writing to /proc/profile resets the counters - * - * Writing a 'profiling multiplier' value into it also re-sets the profiling - * interrupt frequency, on architectures that support this. - */ -static ssize_t write_profile(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) -{ -#ifdef CONFIG_SMP - extern int setup_profiling_timer (unsigned int multiplier); - - if (count == sizeof(int)) { - unsigned int multiplier; - - if (copy_from_user(&multiplier, buf, sizeof(int))) - return -EFAULT; - - if (setup_profiling_timer(multiplier)) - return -EINVAL; - } -#endif - - memset(prof_buffer, 0, prof_len * sizeof(*prof_buffer)); - return count; -} - -static struct file_operations proc_profile_operations = { - .read = read_profile, - .write = write_profile, -}; - #ifdef CONFIG_MAGIC_SYSRQ /* * writing 'C' to /proc/sysrq-trigger is like sysrq-C @@ -681,6 +617,9 @@ #ifdef CONFIG_MODULES create_seq_entry("modules", 0, &proc_modules_operations); #endif +#ifdef CONFIG_SCHEDSTATS + create_seq_entry("schedstat", 0, &proc_schedstat_operations); +#endif #ifdef CONFIG_PROC_KCORE proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL); if (proc_root_kcore) { @@ -689,13 +628,6 @@ (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE; } #endif - if (prof_on) { - entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL); - if (entry) { - entry->proc_fops = &proc_profile_operations; - entry->size = (1+prof_len) * sizeof(unsigned int); - } - } #ifdef CONFIG_MAGIC_SYSRQ entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL); if (entry) diff -Nru a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c --- a/fs/proc/task_mmu.c 2004-09-06 16:37:51 -07:00 +++ b/fs/proc/task_mmu.c 2004-09-06 16:37:51 -07:00 @@ -6,27 +6,11 @@ char *task_mem(struct mm_struct *mm, char *buffer) { - unsigned long data = 0, stack = 0, exec = 0, lib = 0; - struct vm_area_struct *vma; + unsigned long data, text, lib; - down_read(&mm->mmap_sem); - for (vma = mm->mmap; vma; vma = vma->vm_next) { - unsigned long len = (vma->vm_end - vma->vm_start) >> 10; - if (!vma->vm_file) { - data += len; - if (vma->vm_flags & VM_GROWSDOWN) - stack += len; - continue; - } - if (vma->vm_flags & VM_WRITE) - continue; - if (vma->vm_flags & VM_EXEC) { - exec += len; - if (vma->vm_flags & VM_EXECUTABLE) - continue; - lib += len; - } - } + data = mm->total_vm - mm->shared_vm - mm->stack_vm; + text = (mm->end_code - mm->start_code) >> 10; + lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; buffer += sprintf(buffer, "VmSize:\t%8lu kB\n" "VmLck:\t%8lu kB\n" @@ -35,12 +19,11 @@ "VmStk:\t%8lu kB\n" "VmExe:\t%8lu kB\n" "VmLib:\t%8lu kB\n", - mm->total_vm << (PAGE_SHIFT-10), + (mm->total_vm - mm->reserved_vm) << (PAGE_SHIFT-10), mm->locked_vm << (PAGE_SHIFT-10), mm->rss << (PAGE_SHIFT-10), - data - stack, stack, - exec - lib, lib); - up_read(&mm->mmap_sem); + data << (PAGE_SHIFT-10), + mm->stack_vm << (PAGE_SHIFT-10), text, lib); return buffer; } @@ -52,28 +35,11 @@ int task_statm(struct mm_struct *mm, int *shared, int *text, int *data, int *resident) { - struct vm_area_struct *vma; - int size = 0; - + *shared = mm->shared_vm; + *text = (mm->end_code - mm->start_code) >> PAGE_SHIFT; + *data = mm->total_vm - mm->shared_vm - *text; *resident = mm->rss; - for (vma = mm->mmap; vma; vma = vma->vm_next) { - int pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; - - size += pages; - if (is_vm_hugetlb_page(vma)) { - if (!(vma->vm_flags & VM_DONTCOPY)) - *shared += pages; - continue; - } - if (vma->vm_file) - *shared += pages; - if (vma->vm_flags & VM_EXECUTABLE) - *text += pages; - else - *data += pages; - } - - return size; + return mm->total_vm; } static int show_map(struct seq_file *m, void *v) diff -Nru a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c --- a/fs/proc/task_nommu.c 2004-09-06 16:37:53 -07:00 +++ b/fs/proc/task_nommu.c 2004-09-06 16:37:53 -07:00 @@ -68,11 +68,12 @@ struct mm_tblock_struct *tbp; unsigned long vsize = 0; + down_read(&mm->mmap_sem); for (tbp = &mm->context.tblock; tbp; tbp = tbp->next) { if (tbp->rblock) vsize += kobjsize(tbp->rblock->kblock); } - + up_read(&mm->mmap_sem); return vsize; } @@ -81,7 +82,8 @@ { struct mm_tblock_struct *tbp; int size = kobjsize(mm); - + + down_read(&mm->mmap_sem); for (tbp = &mm->context.tblock; tbp; tbp = tbp->next) { if (tbp->next) size += kobjsize(tbp->next); @@ -93,7 +95,7 @@ size += (*text = mm->end_code - mm->start_code); size += (*data = mm->start_stack - mm->start_data); - + up_read(&mm->mmap_sem); *resident = size; return size; } diff -Nru a/fs/qnx4/inode.c b/fs/qnx4/inode.c --- a/fs/qnx4/inode.c 2004-09-06 16:37:54 -07:00 +++ b/fs/qnx4/inode.c 2004-09-06 16:37:54 -07:00 @@ -544,7 +544,7 @@ { qnx4_inode_cachep = kmem_cache_create("qnx4_inode_cache", sizeof(struct qnx4_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (qnx4_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/quota_v2.c b/fs/quota_v2.c --- a/fs/quota_v2.c 2004-09-06 16:37:54 -07:00 +++ b/fs/quota_v2.c 2004-09-06 16:37:54 -07:00 @@ -383,7 +383,7 @@ if (depth == V2_DQTREEDEPTH-1) { #ifdef __QUOTA_V2_PARANOIA if (newblk) { - printk(KERN_ERR "VFS: Inserting already present quota entry (block %u).\n", ref[GETIDINDEX(dquot->dq_id, depth)]); + printk(KERN_ERR "VFS: Inserting already present quota entry (block %u).\n", le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)])); ret = -EIO; goto out_buf; } diff -Nru a/fs/ramfs/inode.c b/fs/ramfs/inode.c --- a/fs/ramfs/inode.c 2004-09-06 16:37:51 -07:00 +++ b/fs/ramfs/inode.c 2004-09-06 16:37:51 -07:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -39,7 +40,6 @@ static struct super_operations ramfs_ops; static struct address_space_operations ramfs_aops; -static struct file_operations ramfs_file_operations; static struct inode_operations ramfs_file_inode_operations; static struct inode_operations ramfs_dir_inode_operations; @@ -48,7 +48,7 @@ .memory_backed = 1, /* Does not contribute to dirty memory */ }; -static struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev) +struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev) { struct inode * inode = new_inode(sb); @@ -146,7 +146,7 @@ .commit_write = simple_commit_write }; -static struct file_operations ramfs_file_operations = { +struct file_operations ramfs_file_operations = { .read = generic_file_read, .write = generic_file_write, .mmap = generic_file_mmap, @@ -199,7 +199,7 @@ return 0; } -static struct super_block *ramfs_get_sb(struct file_system_type *fs_type, +struct super_block *ramfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { return get_sb_nodev(fs_type, flags, data, ramfs_fill_super); diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c --- a/fs/reiserfs/super.c 2004-09-06 16:37:52 -07:00 +++ b/fs/reiserfs/super.c 2004-09-06 16:37:52 -07:00 @@ -444,7 +444,7 @@ { reiserfs_inode_cachep = kmem_cache_create("reiser_inode_cache", sizeof(struct reiserfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (reiserfs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c --- a/fs/reiserfs/xattr.c 2004-09-06 16:37:55 -07:00 +++ b/fs/reiserfs/xattr.c 2004-09-06 16:37:55 -07:00 @@ -761,6 +761,11 @@ err = __reiserfs_xattr_del (dir, name, strlen (name)); dput (dir); + if (!err) { + inode->i_ctime = CURRENT_TIME; + mark_inode_dirty (inode); + } + out: return err; } @@ -1240,8 +1245,10 @@ name->hash == priv_root->d_name.hash && !memcmp (name->name, priv_root->d_name.name, name->len)) { return -ENOENT; - } - return 0; + } else if (q1->len == name->len && + !memcmp(q1->name, name->name, name->len)) + return 0; + return 1; } static struct dentry_operations xattr_lookup_poison_ops = { diff -Nru a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c --- a/fs/reiserfs/xattr_acl.c 2004-09-06 16:37:54 -07:00 +++ b/fs/reiserfs/xattr_acl.c 2004-09-06 16:37:54 -07:00 @@ -289,8 +289,14 @@ error = reiserfs_xattr_set(inode, name, value, size, 0); } else { error = reiserfs_xattr_del (inode, name); - if (error == -ENODATA) + if (error == -ENODATA) { + /* This may seem odd here, but it means that the ACL was set + * with a value representable with mode bits. If there was + * an ACL before, reiserfs_xattr_del already dirtied the inode. + */ + mark_inode_dirty (inode); error = 0; + } } if (value) diff -Nru a/fs/romfs/inode.c b/fs/romfs/inode.c --- a/fs/romfs/inode.c 2004-09-06 16:37:53 -07:00 +++ b/fs/romfs/inode.c 2004-09-06 16:37:53 -07:00 @@ -579,7 +579,7 @@ { romfs_inode_cachep = kmem_cache_create("romfs_inode_cache", sizeof(struct romfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (romfs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/select.c b/fs/select.c --- a/fs/select.c 2004-09-06 16:37:50 -07:00 +++ b/fs/select.c 2004-09-06 16:37:50 -07:00 @@ -118,15 +118,11 @@ } } +#define FDS_IN(fds, n) (fds->in + n) +#define FDS_OUT(fds, n) (fds->out + n) +#define FDS_EX(fds, n) (fds->ex + n) -#define __IN(fds, n) (fds->in + n) -#define __OUT(fds, n) (fds->out + n) -#define __EX(fds, n) (fds->ex + n) -#define __RES_IN(fds, n) (fds->res_in + n) -#define __RES_OUT(fds, n) (fds->res_out + n) -#define __RES_EX(fds, n) (fds->res_ex + n) - -#define BITS(fds, n) (*__IN(fds, n)|*__OUT(fds, n)|*__EX(fds, n)) +#define BITS(fds, n) (*FDS_IN(fds, n)|*FDS_OUT(fds, n)|*FDS_EX(fds, n)) static int max_select_fd(unsigned long n, fd_set_bits *fds) { @@ -377,9 +373,10 @@ ret = 0; } - set_fd_set(n, inp, fds.res_in); - set_fd_set(n, outp, fds.res_out); - set_fd_set(n, exp, fds.res_ex); + if (set_fd_set(n, inp, fds.res_in) || + set_fd_set(n, outp, fds.res_out) || + set_fd_set(n, exp, fds.res_ex)) + ret = -EFAULT; out: select_bits_free(bits, size); diff -Nru a/fs/smbfs/inode.c b/fs/smbfs/inode.c --- a/fs/smbfs/inode.c 2004-09-06 16:37:51 -07:00 +++ b/fs/smbfs/inode.c 2004-09-06 16:37:51 -07:00 @@ -80,7 +80,7 @@ { smb_inode_cachep = kmem_cache_create("smb_inode_cache", sizeof(struct smb_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (smb_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c --- a/fs/sysfs/symlink.c 2004-09-06 16:37:52 -07:00 +++ b/fs/sysfs/symlink.c 2004-09-06 16:37:52 -07:00 @@ -5,12 +5,14 @@ #include #include #include +#include #include "sysfs.h" static struct inode_operations sysfs_symlink_inode_operations = { - .readlink = sysfs_readlink, + .readlink = generic_readlink, .follow_link = sysfs_follow_link, + .put_link = sysfs_put_link, }; static int init_symlink(struct inode * inode) @@ -140,38 +142,21 @@ } -int sysfs_readlink(struct dentry *dentry, char __user *buffer, int buflen) +int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) { - int error = 0; + int error = -ENOMEM; unsigned long page = get_zeroed_page(GFP_KERNEL); - - if (!page) - return -ENOMEM; - - error = sysfs_getlink(dentry, (char *) page); - if (!error) - error = vfs_readlink(dentry, buffer, buflen, (char *) page); - - free_page(page); - - return error; + if (page) + error = sysfs_getlink(dentry, (char *) page); + nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); + return 0; } -int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) +void sysfs_put_link(struct dentry *dentry, struct nameidata *nd) { - int error = 0; - unsigned long page = get_zeroed_page(GFP_KERNEL); - - if (!page) - return -ENOMEM; - - error = sysfs_getlink(dentry, (char *) page); - if (!error) - error = vfs_follow_link(nd, (char *) page); - - free_page(page); - - return error; + char *page = nd_get_link(nd); + if (!IS_ERR(page)) + free_page((unsigned long)page); } EXPORT_SYMBOL(sysfs_create_link); diff -Nru a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h --- a/fs/sysfs/sysfs.h 2004-09-06 16:37:54 -07:00 +++ b/fs/sysfs/sysfs.h 2004-09-06 16:37:54 -07:00 @@ -12,8 +12,8 @@ extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **); extern void sysfs_remove_subdir(struct dentry *); -extern int sysfs_readlink(struct dentry *, char __user *, int ); extern int sysfs_follow_link(struct dentry *, struct nameidata *); +extern void sysfs_put_link(struct dentry *, struct nameidata *); extern struct rw_semaphore sysfs_rename_sem; static inline struct kobject *sysfs_get_kobject(struct dentry *dentry) diff -Nru a/fs/sysv/inode.c b/fs/sysv/inode.c --- a/fs/sysv/inode.c 2004-09-06 16:37:50 -07:00 +++ b/fs/sysv/inode.c 2004-09-06 16:37:50 -07:00 @@ -340,7 +340,7 @@ { sysv_inode_cachep = kmem_cache_create("sysv_inode_cache", sizeof(struct sysv_inode_info), 0, - SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (!sysv_inode_cachep) return -ENOMEM; diff -Nru a/fs/udf/inode.c b/fs/udf/inode.c --- a/fs/udf/inode.c 2004-09-06 16:37:55 -07:00 +++ b/fs/udf/inode.c 2004-09-06 16:37:55 -07:00 @@ -268,12 +268,12 @@ return NULL; } UDF_I_ALLOCTYPE(inode) = alloctype; - sfi->descTag.tagLocation = *block; + sfi->descTag.tagLocation = cpu_to_le32(*block); dfibh.soffset = dfibh.eoffset; dfibh.eoffset += (sfibh.eoffset - sfibh.soffset); dfi = (struct fileIdentDesc *)(dbh->b_data + dfibh.soffset); if (udf_write_fi(inode, sfi, dfi, &dfibh, sfi->impUse, - sfi->fileIdent + sfi->lengthOfImpUse)) + sfi->fileIdent + le16_to_cpu(sfi->lengthOfImpUse))) { UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_IN_ICB; udf_release_data(dbh); @@ -1411,11 +1411,11 @@ udf_add_extendedattr(inode, sizeof(struct deviceSpec) + sizeof(regid), 12, 0x3); - dsea->attrType = 12; + dsea->attrType = cpu_to_le32(12); dsea->attrSubtype = 1; - dsea->attrLength = sizeof(struct deviceSpec) + - sizeof(regid); - dsea->impUseLength = sizeof(regid); + dsea->attrLength = cpu_to_le32(sizeof(struct deviceSpec) + + sizeof(regid)); + dsea->impUseLength = cpu_to_le32(sizeof(regid)); } eid = (regid *)dsea->impUse; memset(eid, 0, sizeof(regid)); diff -Nru a/fs/udf/namei.c b/fs/udf/namei.c --- a/fs/udf/namei.c 2004-09-06 16:37:54 -07:00 +++ b/fs/udf/namei.c 2004-09-06 16:37:54 -07:00 @@ -119,7 +119,7 @@ crc = udf_crc(fibh->ebh->b_data, fibh->eoffset, crc); } - cfi->descTag.descCRC = cpu_to_le32(crc); + cfi->descTag.descCRC = cpu_to_le16(crc); cfi->descTag.descCRCLength = cpu_to_le16(crclen); for (i=0; i<16; i++) diff -Nru a/fs/udf/partition.c b/fs/udf/partition.c --- a/fs/udf/partition.c 2004-09-06 16:37:50 -07:00 +++ b/fs/udf/partition.c 2004-09-06 16:37:50 -07:00 @@ -119,7 +119,7 @@ if (st) { - for (i=0; ireallocationTableLen; i++) + for (i=0; ireallocationTableLen); i++) { if (le32_to_cpu(st->mapEntry[i].origLocation) >= 0xFFFFFFF0) break; @@ -163,7 +163,7 @@ if (!st) return 1; - for (k=0; kreallocationTableLen; k++) + for (k=0; kreallocationTableLen); k++) { if (le32_to_cpu(st->mapEntry[k].origLocation) == 0xFFFFFFFF) { @@ -173,7 +173,7 @@ { st = (struct sparingTable *)sdata->s_spar_map[j]->b_data; st->mapEntry[k].origLocation = cpu_to_le32(packet); - udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry)); + udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry)); mark_buffer_dirty(sdata->s_spar_map[j]); } } @@ -190,7 +190,7 @@ else if (le32_to_cpu(st->mapEntry[k].origLocation) > packet) break; } - for (l=k; lreallocationTableLen; l++) + for (l=k; lreallocationTableLen); l++) { if (le32_to_cpu(st->mapEntry[l].origLocation) == 0xFFFFFFFF) { @@ -203,7 +203,7 @@ mapEntry.origLocation = cpu_to_le32(packet); memmove(&st->mapEntry[k+1], &st->mapEntry[k], (l-k)*sizeof(struct sparingEntry)); st->mapEntry[k] = mapEntry; - udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry)); + udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry)); mark_buffer_dirty(sdata->s_spar_map[j]); } } diff -Nru a/fs/udf/super.c b/fs/udf/super.c --- a/fs/udf/super.c 2004-09-06 16:37:53 -07:00 +++ b/fs/udf/super.c 2004-09-06 16:37:53 -07:00 @@ -145,7 +145,7 @@ { udf_inode_cachep = kmem_cache_create("udf_inode_cache", sizeof(struct udf_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (udf_inode_cachep == NULL) return -ENOMEM; @@ -1455,7 +1455,7 @@ UDF_SB_LVIDIU(sb)->minUDFReadRev = cpu_to_le16(UDF_SB_UDFREV(sb)); if (UDF_SB_UDFREV(sb) > le16_to_cpu(UDF_SB_LVIDIU(sb)->minUDFWriteRev)) UDF_SB_LVIDIU(sb)->minUDFWriteRev = cpu_to_le16(UDF_SB_UDFREV(sb)); - UDF_SB_LVID(sb)->integrityType = LVID_INTEGRITY_TYPE_CLOSE; + UDF_SB_LVID(sb)->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_CLOSE); UDF_SB_LVID(sb)->descTag.descCRC = cpu_to_le16(udf_crc((char *)UDF_SB_LVID(sb) + sizeof(tag), @@ -1585,7 +1585,8 @@ if (minUDFReadRev > UDF_MAX_READ_VERSION) { printk("UDF-fs: minUDFReadRev=%x (max is %x)\n", - UDF_SB_LVIDIU(sb)->minUDFReadRev, UDF_MAX_READ_VERSION); + le16_to_cpu(UDF_SB_LVIDIU(sb)->minUDFReadRev), + UDF_MAX_READ_VERSION); goto error_out; } else if (minUDFWriteRev > UDF_MAX_WRITE_VERSION) @@ -1824,7 +1825,7 @@ } bm = (struct spaceBitmapDesc *)bh->b_data; - bytes = bm->numOfBytes; + bytes = le32_to_cpu(bm->numOfBytes); index = sizeof(struct spaceBitmapDesc); /* offset in first block only */ ptr = (uint8_t *)bh->b_data; diff -Nru a/fs/ufs/super.c b/fs/ufs/super.c --- a/fs/ufs/super.c 2004-09-06 16:37:50 -07:00 +++ b/fs/ufs/super.c 2004-09-06 16:37:50 -07:00 @@ -1183,7 +1183,7 @@ { ufs_inode_cachep = kmem_cache_create("ufs_inode_cache", sizeof(struct ufs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (ufs_inode_cachep == NULL) return -ENOMEM; diff -Nru a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c --- a/fs/xfs/linux-2.6/xfs_buf.c 2004-09-06 16:37:50 -07:00 +++ b/fs/xfs/linux-2.6/xfs_buf.c 2004-09-06 16:37:50 -07:00 @@ -626,11 +626,8 @@ pb = _pagebuf_find(target, ioff, isize, flags, new_pb); if (pb == new_pb) { error = _pagebuf_lookup_pages(pb, flags); - if (unlikely(error)) { - printk(KERN_WARNING - "pagebuf_get: failed to lookup pages\n"); + if (error) goto no_buffer; - } } else { pagebuf_deallocate(new_pb); if (unlikely(pb == NULL)) diff -Nru a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c --- a/fs/xfs/linux-2.6/xfs_file.c 2004-09-06 16:37:53 -07:00 +++ b/fs/xfs/linux-2.6/xfs_file.c 2004-09-06 16:37:53 -07:00 @@ -116,17 +116,10 @@ ssize_t rval; BUG_ON(iocb->ki_pos != pos); - if (unlikely(file->f_flags & O_DIRECT)) { + if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos, - ioflags, NULL, rval); - } else { - down(&inode->i_sem); - VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos, - ioflags, NULL, rval); - up(&inode->i_sem); - } + VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval); return rval; } @@ -171,8 +164,6 @@ if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; VOP_READ(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); - if (rval == -EIOCBQUEUED) - rval = wait_on_sync_kiocb(&kiocb); *ppos = kiocb.ki_pos; return rval; @@ -214,19 +205,10 @@ init_sync_kiocb(&kiocb, file); kiocb.ki_pos = *ppos; - if (unlikely(file->f_flags & O_DIRECT)) { + if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, - ioflags, NULL, rval); - } else { - down(&inode->i_sem); - VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, - ioflags, NULL, rval); - up(&inode->i_sem); - } - if (rval == -EIOCBQUEUED) - rval = wait_on_sync_kiocb(&kiocb); + VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); *ppos = kiocb.ki_pos; return rval; @@ -259,7 +241,7 @@ loff_t *ppos, size_t count, read_actor_t actor, - void __user *target) + void *target) { vnode_t *vp = LINVFS_GET_VP(filp->f_dentry->d_inode); ssize_t rval; diff -Nru a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c --- a/fs/xfs/linux-2.6/xfs_ioctl32.c 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c 2004-09-06 16:37:55 -07:00 @@ -45,8 +45,7 @@ #if defined(CONFIG_IA64) || defined(CONFIG_X86_64) #define BROKEN_X86_ALIGNMENT -#endif - +#else typedef struct xfs_fsop_bulkreq32 { compat_uptr_t lastip; /* last inode # pointer */ @@ -77,6 +76,7 @@ return sys_ioctl(fd, cmd, (unsigned long)p); } +#endif struct ioctl_trans xfs_ioctl32_trans[] = { { XFS_IOC_DIOINFO, }, diff -Nru a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c --- a/fs/xfs/linux-2.6/xfs_lrw.c 2004-09-06 16:37:49 -07:00 +++ b/fs/xfs/linux-2.6/xfs_lrw.c 2004-09-06 16:37:49 -07:00 @@ -74,6 +74,7 @@ #include "xfs_iomap.h" #include +#include #if defined(XFS_RW_TRACE) @@ -225,40 +226,11 @@ int write, int relock) { - xfs_mount_t *mp; - - if (!VN_CACHED(vp)) { - return; - } - - mp = io->io_mount; - - /* - * We need to get the I/O lock exclusively in order - * to safely invalidate pages and mappings. - */ - if (relock) { - XFS_IUNLOCK(mp, io, XFS_IOLOCK_SHARED); - XFS_ILOCK(mp, io, XFS_IOLOCK_EXCL); + if (VN_CACHED(vp)) { + xfs_inval_cached_trace(io, offset, -1, ctooff(offtoct(offset)), -1); + VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(offset)), -1, FI_REMAPF_LOCKED); } - /* Writing beyond EOF creates a hole that must be zeroed */ - if (write && (offset > XFS_SIZE(mp, io))) { - xfs_fsize_t isize; - - XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD); - isize = XFS_SIZE(mp, io); - if (offset > isize) { - xfs_zero_eof(vp, io, offset, isize, offset); - } - XFS_IUNLOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD); - } - - xfs_inval_cached_trace(io, offset, -1, ctooff(offtoct(offset)), -1); - VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(offset)), -1, FI_REMAPF_LOCKED); - if (relock) { - XFS_ILOCK_DEMOTE(mp, io, XFS_IOLOCK_EXCL); - } } ssize_t /* bytes read, or (-) error */ @@ -347,6 +319,8 @@ xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, (void *)iovp, segs, *offset, ioflags); ret = __generic_file_aio_read(iocb, iovp, segs, offset); + if (ret == -EIOCBQUEUED) + ret = wait_on_sync_kiocb(iocb); xfs_iunlock(ip, XFS_IOLOCK_SHARED); if (ret > 0) @@ -366,7 +340,7 @@ int ioflags, size_t count, read_actor_t actor, - void __user *target, + void *target, cred_t *credp) { ssize_t ret; @@ -637,32 +611,34 @@ bhv_desc_t *bdp, struct kiocb *iocb, const struct iovec *iovp, - unsigned int segs, + unsigned int nsegs, loff_t *offset, int ioflags, cred_t *credp) { struct file *file = iocb->ki_filp; - size_t size = 0; + struct address_space *mapping = file->f_mapping; + struct inode *inode = mapping->host; + unsigned long segs = nsegs; xfs_inode_t *xip; xfs_mount_t *mp; - ssize_t ret; - int error = 0; + ssize_t ret = 0, error = 0; xfs_fsize_t isize, new_size; - xfs_fsize_t n, limit; xfs_iocore_t *io; vnode_t *vp; unsigned long seg; int iolock; int eventsent = 0; vrwlock_t locktype; + size_t ocount = 0, count; + loff_t pos; + int need_isem = 1, need_flush = 0; XFS_STATS_INC(xs_write_calls); vp = BHV_TO_VNODE(bdp); xip = XFS_BHVTOI(bdp); - /* START copy & waste from filemap.c */ for (seg = 0; seg < segs; seg++) { const struct iovec *iv = &iovp[seg]; @@ -670,73 +646,90 @@ * If any segment has a negative length, or the cumulative * length ever wraps negative then return -EINVAL. */ - size += iv->iov_len; - if (unlikely((ssize_t)(size|iv->iov_len) < 0)) - return XFS_ERROR(-EINVAL); + ocount += iv->iov_len; + if (unlikely((ssize_t)(ocount|iv->iov_len) < 0)) + return -EINVAL; + if (access_ok(VERIFY_READ, iv->iov_base, iv->iov_len)) + continue; + if (seg == 0) + return -EFAULT; + segs = seg; + ocount -= iv->iov_len; /* This segment is no good */ + break; } - /* END copy & waste from filemap.c */ - if (size == 0) + count = ocount; + pos = *offset; + + if (count == 0) return 0; io = &xip->i_iocore; mp = io->io_mount; - if (XFS_FORCED_SHUTDOWN(mp)) { + if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; - } if (ioflags & IO_ISDIRECT) { xfs_buftarg_t *target = (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? mp->m_rtdev_targp : mp->m_ddev_targp; - if ((*offset & target->pbr_smask) || - (size & target->pbr_smask)) { + if ((pos & target->pbr_smask) || (count & target->pbr_smask)) return XFS_ERROR(-EINVAL); - } - iolock = XFS_IOLOCK_SHARED; - locktype = VRWLOCK_WRITE_DIRECT; - } else { + + if (!VN_CACHED(vp) && pos < i_size_read(inode)) + need_isem = 0; + + if (VN_CACHED(vp)) + need_flush = 1; + } + +relock: + if (need_isem) { iolock = XFS_IOLOCK_EXCL; locktype = VRWLOCK_WRITE; + + down(&inode->i_sem); + } else { + iolock = XFS_IOLOCK_SHARED; + locktype = VRWLOCK_WRITE_DIRECT; } xfs_ilock(xip, XFS_ILOCK_EXCL|iolock); - isize = xip->i_d.di_size; - limit = XFS_MAXIOFFSET(mp); + isize = i_size_read(inode); if (file->f_flags & O_APPEND) *offset = isize; start: - n = limit - *offset; - if (n <= 0) { + error = -generic_write_checks(file, &pos, &count, + S_ISBLK(inode->i_mode)); + if (error) { xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock); - return -EFBIG; + goto out_unlock_isem; } - if (n < size) - size = n; - - new_size = *offset + size; - if (new_size > isize) { + new_size = pos + count; + if (new_size > isize) io->io_new_size = new_size; - } if ((DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS) && !eventsent)) { - loff_t savedsize = *offset; - int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); + loff_t savedsize = pos; + int dmflags = FILP_DELAY_FLAG(file); + + if (need_isem) + dmflags |= DM_FLAGS_ISEM; xfs_iunlock(xip, XFS_ILOCK_EXCL); error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp, - *offset, size, + pos, count, dmflags, &locktype); if (error) { xfs_iunlock(xip, iolock); - return -error; + goto out_unlock_isem; } xfs_ilock(xip, XFS_ILOCK_EXCL); eventsent = 1; @@ -748,9 +741,8 @@ * event prevents another call to XFS_SEND_DATA, which is * what allows the size to change in the first place. */ - if ((file->f_flags & O_APPEND) && - savedsize != xip->i_d.di_size) { - *offset = isize = xip->i_d.di_size; + if ((file->f_flags & O_APPEND) && savedsize != isize) { + pos = isize = xip->i_d.di_size; goto start; } } @@ -761,8 +753,10 @@ * * We must update xfs' times since revalidate will overcopy xfs. */ - if (size && !(ioflags & IO_INVIS)) + if (!(ioflags & IO_INVIS)) { xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); + inode_update_time(inode, 1); + } /* * If the offset is beyond the size of the file, we have a couple @@ -773,12 +767,12 @@ * to zero it out up to the new size. */ - if (!(ioflags & IO_ISDIRECT) && (*offset > isize && isize)) { - error = xfs_zero_eof(BHV_TO_VNODE(bdp), io, *offset, - isize, *offset + size); + if (pos > isize) { + error = xfs_zero_eof(BHV_TO_VNODE(bdp), io, pos, + isize, pos + count); if (error) { xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock); - return(-error); + goto out_unlock_isem; } } xfs_iunlock(xip, XFS_ILOCK_EXCL); @@ -795,22 +789,67 @@ (S_ISGID | S_IXGRP))) && !capable(CAP_FSETID)) { error = xfs_write_clear_setuid(xip); - if (error) { + if (likely(!error)) + error = -remove_suid(file->f_dentry); + if (unlikely(error)) { xfs_iunlock(xip, iolock); - return -error; + goto out_unlock_isem; } } retry: - if (ioflags & IO_ISDIRECT) { - xfs_inval_cached_pages(vp, io, *offset, 1, 1); - xfs_rw_enter_trace(XFS_DIOWR_ENTER, - io, (void *)iovp, segs, *offset, ioflags); + /* We can write back this queue in page reclaim */ + current->backing_dev_info = mapping->backing_dev_info; + + if ((ioflags & IO_ISDIRECT)) { + if (need_flush) { + xfs_inval_cached_trace(io, pos, -1, + ctooff(offtoct(pos)), -1); + VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(pos)), + -1, FI_REMAPF_LOCKED); + } + + if (need_isem) { + /* demote the lock now the cached pages are gone */ + XFS_ILOCK_DEMOTE(mp, io, XFS_IOLOCK_EXCL); + up(&inode->i_sem); + + iolock = XFS_IOLOCK_SHARED; + locktype = VRWLOCK_WRITE_DIRECT; + need_isem = 0; + } + + xfs_rw_enter_trace(XFS_DIOWR_ENTER, io, (void *)iovp, segs, + *offset, ioflags); + ret = generic_file_direct_write(iocb, iovp, + &segs, pos, offset, count, ocount); + + /* + * direct-io write to a hole: fall through to buffered I/O + * for completing the rest of the request. + */ + if (ret >= 0 && ret != count) { + XFS_STATS_ADD(xs_write_bytes, ret); + + pos += ret; + count -= ret; + + need_isem = 1; + ioflags &= ~IO_ISDIRECT; + xfs_iunlock(xip, iolock); + goto relock; + } } else { - xfs_rw_enter_trace(XFS_WRITE_ENTER, - io, (void *)iovp, segs, *offset, ioflags); + xfs_rw_enter_trace(XFS_WRITE_ENTER, io, (void *)iovp, segs, + *offset, ioflags); + ret = generic_file_buffered_write(iocb, iovp, segs, + pos, offset, count, ret); } - ret = generic_file_aio_write_nolock(iocb, iovp, segs, offset); + + current->backing_dev_info = NULL; + + if (ret == -EIOCBQUEUED) + ret = wait_on_sync_kiocb(iocb); if ((ret == -ENOSPC) && DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_NOSPACE) && @@ -821,17 +860,15 @@ DM_RIGHT_NULL, vp, DM_RIGHT_NULL, NULL, NULL, 0, 0, 0); /* Delay flag intentionally unused */ if (error) - return -error; + goto out_unlock_isem; xfs_rwlock(bdp, locktype); - *offset = xip->i_d.di_size; + pos = xip->i_d.di_size; goto retry; } if (*offset > xip->i_d.di_size) { xfs_ilock(xip, XFS_ILOCK_EXCL); if (*offset > xip->i_d.di_size) { - struct inode *inode = LINVFS_GET_IP(vp); - xip->i_d.di_size = *offset; i_size_write(inode, *offset); xip->i_update_core = 1; @@ -840,23 +877,22 @@ xfs_iunlock(xip, XFS_ILOCK_EXCL); } - if (ret <= 0) { - xfs_rwunlock(bdp, locktype); - return ret; - } + error = -ret; + if (ret <= 0) + goto out_unlock_internal; XFS_STATS_ADD(xs_write_bytes, ret); /* Handle various SYNC-type writes */ - if ((file->f_flags & O_SYNC) || IS_SYNC(file->f_dentry->d_inode)) { - + if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { /* * If we're treating this as O_DSYNC and we have not updated the * size, force the log. */ + if (!(mp->m_flags & XFS_MOUNT_OSYNCISOSYNC) && + !(xip->i_update_size)) { + xfs_inode_log_item_t *iip = xip->i_itemp; - if (!(mp->m_flags & XFS_MOUNT_OSYNCISOSYNC) - && !(xip->i_update_size)) { /* * If an allocation transaction occurred * without extending the size, then we have to force @@ -876,14 +912,8 @@ * all changes affecting the inode are permanent * when we return. */ - - xfs_inode_log_item_t *iip; - xfs_lsn_t lsn; - - iip = xip->i_itemp; if (iip && iip->ili_last_lsn) { - lsn = iip->ili_last_lsn; - xfs_log_force(mp, lsn, + xfs_log_force(mp, iip->ili_last_lsn, XFS_LOG_FORCE | XFS_LOG_SYNC); } else if (xfs_ipincount(xip) > 0) { xfs_log_force(mp, (xfs_lsn_t)0, @@ -924,12 +954,27 @@ xfs_trans_set_sync(tp); error = xfs_trans_commit(tp, 0, NULL); xfs_iunlock(xip, XFS_ILOCK_EXCL); + if (error) + goto out_unlock_internal; } } - } /* (ioflags & O_SYNC) */ + + xfs_rwunlock(bdp, locktype); + if (need_isem) + up(&inode->i_sem); + + error = sync_page_range(inode, mapping, pos, ret); + if (!error) + error = ret; + return error; + } + out_unlock_internal: xfs_rwunlock(bdp, locktype); - return(ret); + out_unlock_isem: + if (need_isem) + up(&inode->i_sem); + return -error; } /* diff -Nru a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h --- a/fs/xfs/linux-2.6/xfs_lrw.h 2004-09-06 16:37:50 -07:00 +++ b/fs/xfs/linux-2.6/xfs_lrw.h 2004-09-06 16:37:50 -07:00 @@ -104,7 +104,7 @@ loff_t *, int, struct cred *); extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, loff_t *, int, size_t, read_actor_t, - void __user *, struct cred *); + void *, struct cred *); extern int xfs_dev_is_read_only(struct xfs_mount *, char *); diff -Nru a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c --- a/fs/xfs/linux-2.6/xfs_super.c 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/linux-2.6/xfs_super.c 2004-09-06 16:37:55 -07:00 @@ -335,8 +335,7 @@ init_inodecache( void ) { linvfs_inode_zone = kmem_cache_create("linvfs_icache", - sizeof(vnode_t), 0, - SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + sizeof(vnode_t), 0, SLAB_RECLAIM_ACCOUNT, init_once, NULL); if (linvfs_inode_zone == NULL) diff -Nru a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h --- a/fs/xfs/linux-2.6/xfs_vnode.h 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/linux-2.6/xfs_vnode.h 2004-09-06 16:37:55 -07:00 @@ -192,7 +192,7 @@ loff_t *, int, struct cred *); typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *, loff_t *, int, size_t, read_actor_t, - void __user *, struct cred *); + void *, struct cred *); typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, int, unsigned int, void __user *); typedef int (*vop_getattr_t)(bhv_desc_t *, struct vattr *, int, diff -Nru a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c --- a/fs/xfs/quota/xfs_dquot.c 2004-09-06 16:37:52 -07:00 +++ b/fs/xfs/quota/xfs_dquot.c 2004-09-06 16:37:52 -07:00 @@ -187,9 +187,9 @@ */ STATIC void xfs_qm_dqinit_core( - xfs_dqid_t id, - uint type, - xfs_dqblk_t *d) + xfs_dqid_t id, + uint type, + xfs_dqblk_t *d) { /* * Caller has zero'd the entire dquot 'chunk' already. @@ -250,6 +250,36 @@ /* + * If default limits are in force, push them into the dquot now. + * We overwrite the dquot limits only if they are zero and this + * is not the root dquot. + */ +void +xfs_qm_adjust_dqlimits( + xfs_mount_t *mp, + xfs_disk_dquot_t *d) +{ + xfs_quotainfo_t *q = mp->m_quotainfo; + + ASSERT(!INT_ISZERO(d->d_id, ARCH_CONVERT)); + + if (q->qi_bsoftlimit && INT_ISZERO(d->d_blk_softlimit, ARCH_CONVERT)) + INT_SET(d->d_blk_softlimit, ARCH_CONVERT, q->qi_bsoftlimit); + if (q->qi_bhardlimit && INT_ISZERO(d->d_blk_hardlimit, ARCH_CONVERT)) + INT_SET(d->d_blk_hardlimit, ARCH_CONVERT, q->qi_bhardlimit); + if (q->qi_isoftlimit && INT_ISZERO(d->d_ino_softlimit, ARCH_CONVERT)) + INT_SET(d->d_ino_softlimit, ARCH_CONVERT, q->qi_isoftlimit); + if (q->qi_ihardlimit && INT_ISZERO(d->d_ino_hardlimit, ARCH_CONVERT)) + INT_SET(d->d_ino_hardlimit, ARCH_CONVERT, q->qi_ihardlimit); + if (q->qi_rtbsoftlimit && + INT_ISZERO(d->d_rtb_softlimit, ARCH_CONVERT)) + INT_SET(d->d_rtb_softlimit, ARCH_CONVERT, q->qi_rtbsoftlimit); + if (q->qi_rtbhardlimit && + INT_ISZERO(d->d_rtb_hardlimit, ARCH_CONVERT)) + INT_SET(d->d_rtb_hardlimit, ARCH_CONVERT, q->qi_rtbhardlimit); +} + +/* * Check the limits and timers of a dquot and start or reset timers * if necessary. * This gets called even when quota enforcement is OFF, which makes our @@ -265,51 +295,79 @@ xfs_mount_t *mp, xfs_disk_dquot_t *d) { - /* - * The dquot had better be locked. We are modifying it here. - */ - - /* - * root's limits are not real limits. - */ - if (INT_ISZERO(d->d_id, ARCH_CONVERT)) - return; + ASSERT(!INT_ISZERO(d->d_id, ARCH_CONVERT)); #ifdef QUOTADEBUG if (INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)) - ASSERT(INT_GET(d->d_blk_softlimit, ARCH_CONVERT) <= INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)); + ASSERT(INT_GET(d->d_blk_softlimit, ARCH_CONVERT) <= + INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)); if (INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)) - ASSERT(INT_GET(d->d_ino_softlimit, ARCH_CONVERT) <= INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)); + ASSERT(INT_GET(d->d_ino_softlimit, ARCH_CONVERT) <= + INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)); + if (INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)) + ASSERT(INT_GET(d->d_rtb_softlimit, ARCH_CONVERT) <= + INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)); #endif if (INT_ISZERO(d->d_btimer, ARCH_CONVERT)) { if ((INT_GET(d->d_blk_softlimit, ARCH_CONVERT) && - (INT_GET(d->d_bcount, ARCH_CONVERT) >= INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) || + (INT_GET(d->d_bcount, ARCH_CONVERT) >= + INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) || (INT_GET(d->d_blk_hardlimit, ARCH_CONVERT) && - (INT_GET(d->d_bcount, ARCH_CONVERT) >= INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { - INT_SET(d->d_btimer, ARCH_CONVERT, get_seconds() + XFS_QI_BTIMELIMIT(mp)); + (INT_GET(d->d_bcount, ARCH_CONVERT) >= + INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { + INT_SET(d->d_btimer, ARCH_CONVERT, + get_seconds() + XFS_QI_BTIMELIMIT(mp)); } } else { if ((INT_ISZERO(d->d_blk_softlimit, ARCH_CONVERT) || - (INT_GET(d->d_bcount, ARCH_CONVERT) < INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) && + (INT_GET(d->d_bcount, ARCH_CONVERT) < + INT_GET(d->d_blk_softlimit, ARCH_CONVERT))) && (INT_ISZERO(d->d_blk_hardlimit, ARCH_CONVERT) || - (INT_GET(d->d_bcount, ARCH_CONVERT) < INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { + (INT_GET(d->d_bcount, ARCH_CONVERT) < + INT_GET(d->d_blk_hardlimit, ARCH_CONVERT)))) { INT_ZERO(d->d_btimer, ARCH_CONVERT); } } if (INT_ISZERO(d->d_itimer, ARCH_CONVERT)) { if ((INT_GET(d->d_ino_softlimit, ARCH_CONVERT) && - (INT_GET(d->d_icount, ARCH_CONVERT) >= INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) || + (INT_GET(d->d_icount, ARCH_CONVERT) >= + INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) || (INT_GET(d->d_ino_hardlimit, ARCH_CONVERT) && - (INT_GET(d->d_icount, ARCH_CONVERT) >= INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { - INT_SET(d->d_itimer, ARCH_CONVERT, get_seconds() + XFS_QI_ITIMELIMIT(mp)); + (INT_GET(d->d_icount, ARCH_CONVERT) >= + INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { + INT_SET(d->d_itimer, ARCH_CONVERT, + get_seconds() + XFS_QI_ITIMELIMIT(mp)); } } else { if ((INT_ISZERO(d->d_ino_softlimit, ARCH_CONVERT) || - (INT_GET(d->d_icount, ARCH_CONVERT) < INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) && + (INT_GET(d->d_icount, ARCH_CONVERT) < + INT_GET(d->d_ino_softlimit, ARCH_CONVERT))) && (INT_ISZERO(d->d_ino_hardlimit, ARCH_CONVERT) || - (INT_GET(d->d_icount, ARCH_CONVERT) < INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { + (INT_GET(d->d_icount, ARCH_CONVERT) < + INT_GET(d->d_ino_hardlimit, ARCH_CONVERT)))) { INT_ZERO(d->d_itimer, ARCH_CONVERT); + } + } + + if (INT_ISZERO(d->d_rtbtimer, ARCH_CONVERT)) { + if ((INT_GET(d->d_rtb_softlimit, ARCH_CONVERT) && + (INT_GET(d->d_rtbcount, ARCH_CONVERT) >= + INT_GET(d->d_rtb_softlimit, ARCH_CONVERT))) || + (INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT) && + (INT_GET(d->d_rtbcount, ARCH_CONVERT) >= + INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)))) { + INT_SET(d->d_rtbtimer, ARCH_CONVERT, + get_seconds() + XFS_QI_RTBTIMELIMIT(mp)); + } + } else { + if ((INT_ISZERO(d->d_rtb_softlimit, ARCH_CONVERT) || + (INT_GET(d->d_rtbcount, ARCH_CONVERT) < + INT_GET(d->d_rtb_softlimit, ARCH_CONVERT))) && + (INT_ISZERO(d->d_rtb_hardlimit, ARCH_CONVERT) || + (INT_GET(d->d_rtbcount, ARCH_CONVERT) < + INT_GET(d->d_rtb_hardlimit, ARCH_CONVERT)))) { + INT_ZERO(d->d_rtbtimer, ARCH_CONVERT); } } } diff -Nru a/fs/xfs/quota/xfs_dquot.h b/fs/xfs/quota/xfs_dquot.h --- a/fs/xfs/quota/xfs_dquot.h 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/quota/xfs_dquot.h 2004-09-06 16:37:55 -07:00 @@ -209,6 +209,8 @@ extern void xfs_qm_dqflock_pushbuf_wait(xfs_dquot_t *dqp); extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, xfs_disk_dquot_t *); +extern void xfs_qm_adjust_dqlimits(xfs_mount_t *, + xfs_disk_dquot_t *); extern int xfs_qm_dqwarn(xfs_disk_dquot_t *, uint); extern int xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *, xfs_dqid_t, uint, uint, xfs_dquot_t **); diff -Nru a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c --- a/fs/xfs/quota/xfs_qm.c 2004-09-06 16:37:50 -07:00 +++ b/fs/xfs/quota/xfs_qm.c 2004-09-06 16:37:50 -07:00 @@ -1213,22 +1213,46 @@ XFS_QMOPT_DQSUSER|XFS_QMOPT_DOWARN, &dqp); if (! error) { + xfs_disk_dquot_t *ddqp = &dqp->q_core; + /* * The warnings and timers set the grace period given to * a user or group before he or she can not perform any * more writing. If it is zero, a default is used. */ - qinf->qi_btimelimit = INT_GET(dqp->q_core.d_btimer, ARCH_CONVERT) ? - INT_GET(dqp->q_core.d_btimer, ARCH_CONVERT) : XFS_QM_BTIMELIMIT; - qinf->qi_itimelimit = INT_GET(dqp->q_core.d_itimer, ARCH_CONVERT) ? - INT_GET(dqp->q_core.d_itimer, ARCH_CONVERT) : XFS_QM_ITIMELIMIT; - qinf->qi_rtbtimelimit = INT_GET(dqp->q_core.d_rtbtimer, ARCH_CONVERT) ? - INT_GET(dqp->q_core.d_rtbtimer, ARCH_CONVERT) : XFS_QM_RTBTIMELIMIT; - qinf->qi_bwarnlimit = INT_GET(dqp->q_core.d_bwarns, ARCH_CONVERT) ? - INT_GET(dqp->q_core.d_bwarns, ARCH_CONVERT) : XFS_QM_BWARNLIMIT; - qinf->qi_iwarnlimit = INT_GET(dqp->q_core.d_iwarns, ARCH_CONVERT) ? - INT_GET(dqp->q_core.d_iwarns, ARCH_CONVERT) : XFS_QM_IWARNLIMIT; - + qinf->qi_btimelimit = + INT_GET(ddqp->d_btimer, ARCH_CONVERT) ? + INT_GET(ddqp->d_btimer, ARCH_CONVERT) : + XFS_QM_BTIMELIMIT; + qinf->qi_itimelimit = + INT_GET(ddqp->d_itimer, ARCH_CONVERT) ? + INT_GET(ddqp->d_itimer, ARCH_CONVERT) : + XFS_QM_ITIMELIMIT; + qinf->qi_rtbtimelimit = + INT_GET(ddqp->d_rtbtimer, ARCH_CONVERT) ? + INT_GET(ddqp->d_rtbtimer, ARCH_CONVERT) : + XFS_QM_RTBTIMELIMIT; + qinf->qi_bwarnlimit = + INT_GET(ddqp->d_bwarns, ARCH_CONVERT) ? + INT_GET(ddqp->d_bwarns, ARCH_CONVERT) : + XFS_QM_BWARNLIMIT; + qinf->qi_iwarnlimit = + INT_GET(ddqp->d_iwarns, ARCH_CONVERT) ? + INT_GET(ddqp->d_iwarns, ARCH_CONVERT) : + XFS_QM_IWARNLIMIT; + qinf->qi_bhardlimit = + INT_GET(ddqp->d_blk_hardlimit, ARCH_CONVERT); + qinf->qi_bsoftlimit = + INT_GET(ddqp->d_blk_softlimit, ARCH_CONVERT); + qinf->qi_ihardlimit = + INT_GET(ddqp->d_ino_hardlimit, ARCH_CONVERT); + qinf->qi_isoftlimit = + INT_GET(ddqp->d_ino_softlimit, ARCH_CONVERT); + qinf->qi_rtbhardlimit = + INT_GET(ddqp->d_rtb_hardlimit, ARCH_CONVERT); + qinf->qi_rtbsoftlimit = + INT_GET(ddqp->d_rtb_softlimit, ARCH_CONVERT); + /* * We sent the XFS_QMOPT_DQSUSER flag to dqget because * we don't want this dquot cached. We haven't done a @@ -1688,10 +1712,12 @@ } /* - * Adjust the timers since we just changed usages + * Set default limits, adjust timers (since we changed usages) */ - if (! XFS_IS_SUSER_DQUOT(dqp)) + if (! XFS_IS_SUSER_DQUOT(dqp)) { + xfs_qm_adjust_dqlimits(dqp->q_mount, &dqp->q_core); xfs_qm_adjust_dqtimers(dqp->q_mount, &dqp->q_core); + } dqp->dq_flags |= XFS_DQ_DIRTY; } diff -Nru a/fs/xfs/quota/xfs_qm.h b/fs/xfs/quota/xfs_qm.h --- a/fs/xfs/quota/xfs_qm.h 2004-09-06 16:37:51 -07:00 +++ b/fs/xfs/quota/xfs_qm.h 2004-09-06 16:37:51 -07:00 @@ -136,9 +136,14 @@ xfs_qwarncnt_t qi_bwarnlimit; /* limit for num warnings */ xfs_qwarncnt_t qi_iwarnlimit; /* limit for num warnings */ mutex_t qi_quotaofflock;/* to serialize quotaoff */ - /* Some useful precalculated constants */ xfs_filblks_t qi_dqchunklen; /* # BBs in a chunk of dqs */ uint qi_dqperchunk; /* # ondisk dqs in above chunk */ + xfs_qcnt_t qi_bhardlimit; /* default data blk hard limit */ + xfs_qcnt_t qi_bsoftlimit; /* default data blk soft limit */ + xfs_qcnt_t qi_ihardlimit; /* default inode count hard limit */ + xfs_qcnt_t qi_isoftlimit; /* default inode count soft limit */ + xfs_qcnt_t qi_rtbhardlimit;/* default realtime blk hard limit */ + xfs_qcnt_t qi_rtbsoftlimit;/* default realtime blk soft limit */ } xfs_quotainfo_t; diff -Nru a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c --- a/fs/xfs/quota/xfs_qm_syscalls.c 2004-09-06 16:37:53 -07:00 +++ b/fs/xfs/quota/xfs_qm_syscalls.c 2004-09-06 16:37:53 -07:00 @@ -648,8 +648,11 @@ if (hard == 0 || hard >= soft) { INT_SET(ddq->d_blk_hardlimit, ARCH_CONVERT, hard); INT_SET(ddq->d_blk_softlimit, ARCH_CONVERT, soft); - } - else { + if (id == 0) { + mp->m_quotainfo->qi_bhardlimit = hard; + mp->m_quotainfo->qi_bsoftlimit = soft; + } + } else { qdprintk("blkhard %Ld < blksoft %Ld\n", hard, soft); } hard = (newlim->d_fieldmask & FS_DQ_RTBHARD) ? @@ -661,40 +664,49 @@ if (hard == 0 || hard >= soft) { INT_SET(ddq->d_rtb_hardlimit, ARCH_CONVERT, hard); INT_SET(ddq->d_rtb_softlimit, ARCH_CONVERT, soft); - } - else + if (id == 0) { + mp->m_quotainfo->qi_rtbhardlimit = hard; + mp->m_quotainfo->qi_rtbsoftlimit = soft; + } + } else { qdprintk("rtbhard %Ld < rtbsoft %Ld\n", hard, soft); + } hard = (newlim->d_fieldmask & FS_DQ_IHARD) ? (xfs_qcnt_t) newlim->d_ino_hardlimit : - INT_GET(ddq->d_ino_hardlimit, ARCH_CONVERT); + INT_GET(ddq->d_ino_hardlimit, ARCH_CONVERT); soft = (newlim->d_fieldmask & FS_DQ_ISOFT) ? (xfs_qcnt_t) newlim->d_ino_softlimit : - INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT); + INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT); if (hard == 0 || hard >= soft) { INT_SET(ddq->d_ino_hardlimit, ARCH_CONVERT, hard); INT_SET(ddq->d_ino_softlimit, ARCH_CONVERT, soft); - } - else + if (id == 0) { + mp->m_quotainfo->qi_ihardlimit = hard; + mp->m_quotainfo->qi_isoftlimit = soft; + } + } else { qdprintk("ihard %Ld < isoft %Ld\n", hard, soft); + } if (id == 0) { /* * Timelimits for the super user set the relative time * the other users can be over quota for this file system. - * If it is zero a default is used. + * If it is zero a default is used. Ditto for the default + * soft and hard limit values (already done, above). */ if (newlim->d_fieldmask & FS_DQ_BTIMER) { mp->m_quotainfo->qi_btimelimit = newlim->d_btimer; - INT_SET(dqp->q_core.d_btimer, ARCH_CONVERT, newlim->d_btimer); + INT_SET(ddq->d_btimer, ARCH_CONVERT, newlim->d_btimer); } if (newlim->d_fieldmask & FS_DQ_ITIMER) { mp->m_quotainfo->qi_itimelimit = newlim->d_itimer; - INT_SET(dqp->q_core.d_itimer, ARCH_CONVERT, newlim->d_itimer); + INT_SET(ddq->d_itimer, ARCH_CONVERT, newlim->d_itimer); } if (newlim->d_fieldmask & FS_DQ_RTBTIMER) { mp->m_quotainfo->qi_rtbtimelimit = newlim->d_rtbtimer; - INT_SET(dqp->q_core.d_rtbtimer, ARCH_CONVERT, newlim->d_rtbtimer); + INT_SET(ddq->d_rtbtimer, ARCH_CONVERT, newlim->d_rtbtimer); } } else /* if (XFS_IS_QUOTA_ENFORCED(mp)) */ { /* diff -Nru a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c --- a/fs/xfs/quota/xfs_trans_dquot.c 2004-09-06 16:37:51 -07:00 +++ b/fs/xfs/quota/xfs_trans_dquot.c 2004-09-06 16:37:51 -07:00 @@ -452,9 +452,13 @@ INT_MOD(d->d_rtbcount, ARCH_CONVERT, (xfs_qcnt_t)totalrtbdelta); /* + * Get any default limits in use. * Start/reset the timer(s) if needed. */ - xfs_qm_adjust_dqtimers(tp->t_mountp, d); + if (!INT_ISZERO(d->d_id, ARCH_CONVERT)) { + xfs_qm_adjust_dqlimits(tp->t_mountp, d); + xfs_qm_adjust_dqtimers(tp->t_mountp, d); + } dqp->dq_flags |= XFS_DQ_DIRTY; /* @@ -625,6 +629,7 @@ STATIC int xfs_trans_dqresv( xfs_trans_t *tp, + xfs_mount_t *mp, xfs_dquot_t *dqp, long nblks, long ninos, @@ -635,6 +640,7 @@ xfs_qcnt_t softlimit; time_t btimer; xfs_qcnt_t *resbcountp; + xfs_quotainfo_t *q = mp->m_quotainfo; if (! (flags & XFS_QMOPT_DQLOCK)) { xfs_dqlock(dqp); @@ -642,13 +648,21 @@ ASSERT(XFS_DQ_IS_LOCKED(dqp)); if (flags & XFS_TRANS_DQ_RES_BLKS) { hardlimit = INT_GET(dqp->q_core.d_blk_hardlimit, ARCH_CONVERT); + if (!hardlimit) + hardlimit = q->qi_bhardlimit; softlimit = INT_GET(dqp->q_core.d_blk_softlimit, ARCH_CONVERT); + if (!softlimit) + softlimit = q->qi_bsoftlimit; btimer = INT_GET(dqp->q_core.d_btimer, ARCH_CONVERT); resbcountp = &dqp->q_res_bcount; } else { ASSERT(flags & XFS_TRANS_DQ_RES_RTBLKS); hardlimit = INT_GET(dqp->q_core.d_rtb_hardlimit, ARCH_CONVERT); + if (!hardlimit) + hardlimit = q->qi_rtbhardlimit; softlimit = INT_GET(dqp->q_core.d_rtb_softlimit, ARCH_CONVERT); + if (!softlimit) + softlimit = q->qi_rtbsoftlimit; btimer = INT_GET(dqp->q_core.d_rtbtimer, ARCH_CONVERT); resbcountp = &dqp->q_res_rtbcount; } @@ -689,14 +703,18 @@ } } if (ninos > 0) { - if (INT_GET(dqp->q_core.d_ino_hardlimit, ARCH_CONVERT) > 0ULL && - INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= - INT_GET(dqp->q_core.d_ino_hardlimit, ARCH_CONVERT)) { + hardlimit = INT_GET(dqp->q_core.d_ino_hardlimit, ARCH_CONVERT); + if (!hardlimit) + hardlimit = q->qi_ihardlimit; + softlimit = INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT); + if (!softlimit) + softlimit = q->qi_isoftlimit; + if (hardlimit > 0ULL && + INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= hardlimit) { error = EDQUOT; goto error_return; - } else if (INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT) > 0ULL && - INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= - INT_GET(dqp->q_core.d_ino_softlimit, ARCH_CONVERT)) { + } else if (softlimit > 0ULL && + INT_GET(dqp->q_core.d_icount, ARCH_CONVERT) >= softlimit) { /* * If timer or warnings has expired, * return EDQUOT @@ -786,19 +804,20 @@ resvd = 0; if (udqp) { - if (xfs_trans_dqresv(tp, udqp, nblks, ninos, flags)) + if (xfs_trans_dqresv(tp, mp, udqp, nblks, ninos, flags)) return (EDQUOT); resvd = 1; } if (gdqp) { - if (xfs_trans_dqresv(tp, gdqp, nblks, ninos, flags)) { + if (xfs_trans_dqresv(tp, mp, gdqp, nblks, ninos, flags)) { /* * can't do it, so backout previous reservation */ if (resvd) { - xfs_trans_dqresv(tp, udqp, -nblks, -ninos, - flags); + flags |= XFS_QMOPT_FORCE_RES; + xfs_trans_dqresv(tp, mp, udqp, + -nblks, -ninos, flags); } return (EDQUOT); } diff -Nru a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c --- a/fs/xfs/xfs_bmap.c 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/xfs_bmap.c 2004-09-06 16:37:55 -07:00 @@ -3427,19 +3427,20 @@ int high; /* high index of binary search */ int low; /* low index of binary search */ - /* Initialize the extent entry structure to catch access to - * uninitialized br_startblock field. - */ + /* + * Initialize the extent entry structure to catch access to + * uninitialized br_startblock field. + */ + got.br_startoff = 0xffa5a5a5a5a5a5a5LL; + got.br_blockcount = 0xa55a5a5a5a5a5a5aLL; + got.br_state = XFS_EXT_INVALID; - got.br_startoff = 0xffa5a5a5a5a5a5a5; - got.br_blockcount = 0xa55a5a5a5a5a5a5a; - got.br_state = XFS_EXT_INVALID; +#if XFS_BIG_BLKNOS + got.br_startblock = 0xffffa5a5a5a5a5a5LL; +#else + got.br_startblock = 0xffffa5a5; +#endif - #if XFS_BIG_BLKNOS - got.br_startblock = 0xffffa5a5a5a5a5a5; - #else - got.br_startblock = 0xffffa5a5; - #endif if (lastx != NULLEXTNUM && lastx < nextents) ep = base + lastx; else diff -Nru a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c --- a/fs/xfs/xfs_fsops.c 2004-09-06 16:37:54 -07:00 +++ b/fs/xfs/xfs_fsops.c 2004-09-06 16:37:54 -07:00 @@ -142,6 +142,7 @@ int dpct; int error; xfs_agnumber_t nagcount; + xfs_agnumber_t nagimax = 0; xfs_rfsblock_t nb, nb_mod; xfs_rfsblock_t new; xfs_rfsblock_t nfree; @@ -183,7 +184,7 @@ memset(&mp->m_perag[oagcount], 0, (nagcount - oagcount) * sizeof(xfs_perag_t)); mp->m_flags |= XFS_MOUNT_32BITINODES; - xfs_initialize_perag(mp, nagcount); + nagimax = xfs_initialize_perag(mp, nagcount); up_write(&mp->m_peraglock); } tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); @@ -372,6 +373,9 @@ if (error) { return error; } + /* New allocation groups fully initialized, so update mount struct */ + if (nagimax) + mp->m_maxagi = nagimax; if (mp->m_sb.sb_imax_pct) { __uint64_t icount = mp->m_sb.sb_dblocks * mp->m_sb.sb_imax_pct; do_div(icount, 100); diff -Nru a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c --- a/fs/xfs/xfs_log.c 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/xfs_log.c 2004-09-06 16:37:55 -07:00 @@ -1411,9 +1411,13 @@ xlog_pack_data(log, iclog); /* put cycle number in every block */ /* real byte length */ - INT_SET(iclog->ic_header.h_len, - ARCH_CONVERT, - iclog->ic_offset + iclog->ic_roundoff); + if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) { + INT_SET(iclog->ic_header.h_len, + ARCH_CONVERT, + iclog->ic_offset + iclog->ic_roundoff); + } else { + INT_SET(iclog->ic_header.h_len, ARCH_CONVERT, iclog->ic_offset); + } /* put ops count in correct order */ ops = iclog->ic_header.h_num_logops; diff -Nru a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c --- a/fs/xfs/xfs_log_recover.c 2004-09-06 16:37:53 -07:00 +++ b/fs/xfs/xfs_log_recover.c 2004-09-06 16:37:53 -07:00 @@ -2047,12 +2047,11 @@ errs++; } - if (! errs) { + if (! errs && !INT_ISZERO(ddq->d_id, ARCH_CONVERT)) { if (INT_GET(ddq->d_blk_softlimit, ARCH_CONVERT) && INT_GET(ddq->d_bcount, ARCH_CONVERT) >= INT_GET(ddq->d_blk_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(ddq->d_btimer, ARCH_CONVERT) && - !INT_ISZERO(ddq->d_id, ARCH_CONVERT)) { + if (INT_ISZERO(ddq->d_btimer, ARCH_CONVERT)) { if (flags & XFS_QMOPT_DOWARN) cmn_err(CE_ALERT, "%s : Dquot ID 0x%x (0x%p) " @@ -2065,12 +2064,24 @@ if (INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT) && INT_GET(ddq->d_icount, ARCH_CONVERT) >= INT_GET(ddq->d_ino_softlimit, ARCH_CONVERT)) { - if (INT_ISZERO(ddq->d_itimer, ARCH_CONVERT) && - !INT_ISZERO(ddq->d_id, ARCH_CONVERT)) { + if (INT_ISZERO(ddq->d_itimer, ARCH_CONVERT)) { if (flags & XFS_QMOPT_DOWARN) cmn_err(CE_ALERT, "%s : Dquot ID 0x%x (0x%p) " "INODE TIMER NOT STARTED", + str, (int) + INT_GET(ddq->d_id, ARCH_CONVERT), ddq); + errs++; + } + } + if (INT_GET(ddq->d_rtb_softlimit, ARCH_CONVERT) && + INT_GET(ddq->d_rtbcount, ARCH_CONVERT) >= + INT_GET(ddq->d_rtb_softlimit, ARCH_CONVERT)) { + if (INT_ISZERO(ddq->d_rtbtimer, ARCH_CONVERT)) { + if (flags & XFS_QMOPT_DOWARN) + cmn_err(CE_ALERT, + "%s : Dquot ID 0x%x (0x%p) " + "RTBLK TIMER NOT STARTED", str, (int) INT_GET(ddq->d_id, ARCH_CONVERT), ddq); errs++; diff -Nru a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c --- a/fs/xfs/xfs_mount.c 2004-09-06 16:37:52 -07:00 +++ b/fs/xfs/xfs_mount.c 2004-09-06 16:37:52 -07:00 @@ -318,10 +318,10 @@ return 0; } -void -xfs_initialize_perag(xfs_mount_t *mp, int agcount) +xfs_agnumber_t +xfs_initialize_perag(xfs_mount_t *mp, xfs_agnumber_t agcount) { - int index, max_metadata; + xfs_agnumber_t index, max_metadata; xfs_perag_t *pag; xfs_agino_t agino; xfs_ino_t ino; @@ -377,7 +377,7 @@ pag->pagi_inodeok = 1; } } - mp->m_maxagi = index; + return index; } /* @@ -951,7 +951,7 @@ mp->m_perag = kmem_zalloc(sbp->sb_agcount * sizeof(xfs_perag_t), KM_SLEEP); - xfs_initialize_perag(mp, sbp->sb_agcount); + mp->m_maxagi = xfs_initialize_perag(mp, sbp->sb_agcount); /* * log's mount-time initialization. Perform 1st part recovery if needed diff -Nru a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h --- a/fs/xfs/xfs_mount.h 2004-09-06 16:37:50 -07:00 +++ b/fs/xfs/xfs_mount.h 2004-09-06 16:37:50 -07:00 @@ -551,7 +551,7 @@ extern void xfs_freesb(xfs_mount_t *); extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); extern int xfs_syncsub(xfs_mount_t *, int, int, int *); -extern void xfs_initialize_perag(xfs_mount_t *, int); +extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); extern void xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t, __int64_t); diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c --- a/fs/xfs/xfs_vnodeops.c 2004-09-06 16:37:55 -07:00 +++ b/fs/xfs/xfs_vnodeops.c 2004-09-06 16:37:55 -07:00 @@ -283,7 +283,7 @@ /* * xfs_setattr */ -STATIC int +int xfs_setattr( bhv_desc_t *bdp, vattr_t *vap, @@ -305,6 +305,7 @@ int mandlock_before, mandlock_after; struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; int file_owner; + int need_iolock = (flags & ATTR_DMI) == 0; vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -406,7 +407,8 @@ goto error_return; } } - lock_flags |= XFS_IOLOCK_EXCL; + if (need_iolock) + lock_flags |= XFS_IOLOCK_EXCL; } xfs_ilock(ip, lock_flags); @@ -678,7 +680,8 @@ XFS_TRANS_PERM_LOG_RES, XFS_ITRUNCATE_LOG_COUNT))) { xfs_trans_cancel(tp, 0); - xfs_iunlock(ip, XFS_IOLOCK_EXCL); + if (need_iolock) + xfs_iunlock(ip, XFS_IOLOCK_EXCL); return code; } commit_flags = XFS_TRANS_RELEASE_LOG_RES; @@ -4297,6 +4300,7 @@ int rt; xfs_fileoff_t startoffset_fsb; xfs_trans_t *tp; + int need_iolock = (attr_flags & ATTR_DMI) == 0; vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); mp = ip->i_mount; @@ -4324,7 +4328,8 @@ return(error); } - xfs_ilock(ip, XFS_IOLOCK_EXCL); + if (need_iolock) + xfs_ilock(ip, XFS_IOLOCK_EXCL); rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog), (__uint8_t)NBPP); ilen = len + (offset & (rounding - 1)); @@ -4342,10 +4347,8 @@ nimap = 1; error = xfs_bmapi(NULL, ip, startoffset_fsb, 1, 0, NULL, 0, &imap, &nimap, NULL); - if (error) { - xfs_iunlock(ip, XFS_IOLOCK_EXCL); - return error; - } + if (error) + goto out_unlock_iolock; ASSERT(nimap == 0 || nimap == 1); if (nimap && imap.br_startblock != HOLESTARTBLOCK) { xfs_daddr_t block; @@ -4359,10 +4362,8 @@ nimap = 1; error = xfs_bmapi(NULL, ip, endoffset_fsb - 1, 1, 0, NULL, 0, &imap, &nimap, NULL); - if (error) { - xfs_iunlock(ip, XFS_IOLOCK_EXCL); - return error; - } + if (error) + goto out_unlock_iolock; ASSERT(nimap == 0 || nimap == 1); if (nimap && imap.br_startblock != HOLESTARTBLOCK) { ASSERT(imap.br_startblock != DELAYSTARTBLOCK); @@ -4451,14 +4452,17 @@ xfs_iunlock(ip, XFS_ILOCK_EXCL); } - xfs_iunlock(ip, XFS_IOLOCK_EXCL); + out_unlock_iolock: + if (need_iolock) + xfs_iunlock(ip, XFS_IOLOCK_EXCL); return error; error0: xfs_bmap_cancel(&free_list); error1: xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT); - xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); + xfs_iunlock(ip, need_iolock ? (XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL) : + XFS_ILOCK_EXCL); return error; } @@ -4615,20 +4619,21 @@ xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); xfs_trans_ihold(tp, ip); - ip->i_d.di_mode &= ~S_ISUID; - - /* - * Note that we don't have to worry about mandatory - * file locking being disabled here because we only - * clear the S_ISGID bit if the Group execute bit is - * on, but if it was on then mandatory locking wouldn't - * have been enabled. - */ - if (ip->i_d.di_mode & S_IXGRP) - ip->i_d.di_mode &= ~S_ISGID; + if ((attr_flags & ATTR_DMI) == 0) { + ip->i_d.di_mode &= ~S_ISUID; - xfs_ichgtime(ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); + /* + * Note that we don't have to worry about mandatory + * file locking being disabled here because we only + * clear the S_ISGID bit if the Group execute bit is + * on, but if it was on then mandatory locking wouldn't + * have been enabled. + */ + if (ip->i_d.di_mode & S_IXGRP) + ip->i_d.di_mode &= ~S_ISGID; + xfs_ichgtime(ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); + } if (setprealloc) ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC; else if (clrprealloc) diff -Nru a/include/asm-alpha/a.out.h b/include/asm-alpha/a.out.h --- a/include/asm-alpha/a.out.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-alpha/a.out.h 2004-09-06 16:37:54 -07:00 @@ -95,7 +95,7 @@ Worse, we have to notice the start address before swapping to use /sbin/loader, which of course is _not_ a TASO application. */ #define SET_AOUT_PERSONALITY(BFPM, EX) \ - set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000 \ + set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \ ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) #define STACK_TOP \ diff -Nru a/include/asm-alpha/cache.h b/include/asm-alpha/cache.h --- a/include/asm-alpha/cache.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-alpha/cache.h 2004-09-06 16:37:52 -07:00 @@ -20,6 +20,6 @@ #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define SMP_CACHE_BYTES L1_CACHE_BYTES -#define L1_CACHE_SHIFT_MAX 6 /* largest L1 which this arch supports */ +#define L1_CACHE_SHIFT_MAX L1_CACHE_SHIFT #endif diff -Nru a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h --- a/include/asm-alpha/dma-mapping.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-alpha/dma-mapping.h 2004-09-06 16:37:52 -07:00 @@ -1 +1,63 @@ -#include +#ifndef _ALPHA_DMA_MAPPING_H +#define _ALPHA_DMA_MAPPING_H + +#include + +#ifdef CONFIG_PCI + +#include + +#define dma_map_single(dev, va, size, dir) \ + pci_map_single(alpha_gendev_to_pci(dev), va, size, dir) +#define dma_unmap_single(dev, addr, size, dir) \ + pci_unmap_single(alpha_gendev_to_pci(dev), addr, size, dir) +#define dma_alloc_coherent(dev, size, addr, gfp) \ + pci_alloc_consistent(alpha_gendev_to_pci(dev), size, addr) +#define dma_free_coherent(dev, size, va, addr) \ + pci_free_consistent(alpha_gendev_to_pci(dev), size, va, addr) +#define dma_map_page(dev, page, off, size, dir) \ + pci_map_single(alpha_gendev_to_pci(dev), page, off, size, dir) +#define dma_unmap_page(dev, addr, size, dir) \ + pci_unmap_page(alpha_gendev_to_pci(dev), addr, size, dir) +#define dma_map_sg(dev, sg, nents, dir) \ + pci_map_sg(alpha_gendev_to_pci(dev), sg, nents, dir) +#define dma_unmap_sg(dev, sg, nents, dir) \ + pci_unmap_sg(alpha_gendev_to_pci(dev), sg, nents, dir) +#define dma_supported(dev, mask) \ + pci_dma_supported(alpha_gendev_to_pci(dev), mask) + +#else /* no PCI - no IOMMU. */ + +void *dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, int gfp); +int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, + enum dma_data_direction direction); + +#define dma_free_coherent(dev, size, va, addr) \ + free_pages((unsigned long)va, get_order(size)) +#define dma_supported(dev, mask) (mask < 0x00ffffffUL ? 0 : 1) +#define dma_map_single(dev, va, size, dir) virt_to_phys(va) +#define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off) + +#define dma_unmap_single(dev, addr, size, dir) do { } while (0) +#define dma_unmap_page(dev, addr, size, dir) do { } while (0) +#define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) + +#endif /* !CONFIG_PCI */ + +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) +#define dma_is_consistent(dev) (1) + +int dma_set_mask(struct device *dev, u64 mask); + +#define dma_sync_single_for_cpu(dev, addr, size, dir) do { } while (0) +#define dma_sync_single_for_device(dev, addr, size, dir) do { } while (0) +#define dma_sync_single_range(dev, addr, off, size, dir) do { } while (0) +#define dma_sync_sg_for_cpu(dev, sg, nents, dir) do { } while (0) +#define dma_sync_sg_for_device(dev, sg, nents, dir) do { } while (0) +#define dma_cache_sync(va, size, dir) do { } while (0) + +#define dma_get_cache_alignment() L1_CACHE_BYTES + +#endif /* _ALPHA_DMA_MAPPING_H */ diff -Nru a/include/asm-alpha/page.h b/include/asm-alpha/page.h --- a/include/asm-alpha/page.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-alpha/page.h 2004-09-06 16:37:54 -07:00 @@ -1,6 +1,7 @@ #ifndef _ALPHA_PAGE_H #define _ALPHA_PAGE_H +#include #include /* PAGE_SHIFT determines the page size */ diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h --- a/include/asm-alpha/pci.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-alpha/pci.h 2004-09-06 16:37:50 -07:00 @@ -169,7 +169,7 @@ static inline void pci_dma_sync_single_for_device(struct pci_dev *dev, dma_addr_t dma_addr, - long size, int direction) + size_t size, int direction) { /* Nothing to do. */ } @@ -245,6 +245,8 @@ pcibios_add_platform_entries(struct pci_dev *dev) { } + +struct pci_dev *alpha_gendev_to_pci(struct device *dev); #endif /* __KERNEL__ */ diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h --- a/include/asm-alpha/pgtable.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-alpha/pgtable.h 2004-09-06 16:37:51 -07:00 @@ -328,7 +328,7 @@ #endif #define io_remap_page_range(vma, start, busaddr, size, prot) \ - remap_page_range(vma, start, virt_to_phys(__ioremap(busaddr, size)), size, prot) + remap_page_range(vma, start, virt_to_phys((void *)__ioremap(busaddr, size)), size, prot) #define pte_ERROR(e) \ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) diff -Nru a/include/asm-alpha/ptrace.h b/include/asm-alpha/ptrace.h --- a/include/asm-alpha/ptrace.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-alpha/ptrace.h 2004-09-06 16:37:51 -07:00 @@ -69,6 +69,7 @@ #ifdef __KERNEL__ #define user_mode(regs) (((regs)->ps & 8) != 0) #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #define alpha_task_regs(task) \ diff -Nru a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h --- a/include/asm-alpha/semaphore.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-alpha/semaphore.h 2004-09-06 16:37:54 -07:00 @@ -18,21 +18,13 @@ struct semaphore { atomic_t count; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ - { ATOMIC_INIT(count), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -53,9 +45,6 @@ atomic_set(&sem->count, val); init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -142,7 +131,7 @@ __up_wakeup(sem); } -#if !defined(WAITQUEUE_DEBUG) && !defined(CONFIG_DEBUG_SEMAPHORE) +#if !defined(CONFIG_DEBUG_SEMAPHORE) extern inline void down(struct semaphore *sem) { __down(sem); diff -Nru a/include/asm-alpha/sysinfo.h b/include/asm-alpha/sysinfo.h --- a/include/asm-alpha/sysinfo.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-alpha/sysinfo.h 2004-09-06 16:37:51 -07:00 @@ -18,6 +18,7 @@ #define SSI_IEEE_FP_CONTROL 14 #define SSI_IEEE_STATE_AT_SIGNAL 15 #define SSI_IEEE_IGNORE_STATE_AT_SIGNAL 16 +#define SSI_IEEE_RAISE_EXCEPTION 1001 /* linux specific */ #define SSIN_UACPROC 6 diff -Nru a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h --- a/include/asm-alpha/thread_info.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-alpha/thread_info.h 2004-09-06 16:37:55 -07:00 @@ -19,7 +19,7 @@ struct exec_domain *exec_domain; /* execution domain */ mm_segment_t addr_limit; /* thread address space */ - long cpu; /* current CPU */ + unsigned cpu; /* current CPU */ int preempt_count; /* 0 => preemptable, <0 => BUG */ int bpt_nsaved; diff -Nru a/include/asm-alpha/uaccess.h b/include/asm-alpha/uaccess.h --- a/include/asm-alpha/uaccess.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-alpha/uaccess.h 2004-09-06 16:37:54 -07:00 @@ -108,7 +108,6 @@ ({ \ long __gu_err = -EFAULT, __gu_val = 0; \ const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ - __chk_user_ptr(ptr); \ if (__access_ok((unsigned long)__gu_addr,size,segment)) { \ __gu_err = 0; \ switch (size) { \ @@ -223,7 +222,6 @@ ({ \ long __pu_err = -EFAULT; \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ - __chk_user_ptr(ptr); \ if (__access_ok((unsigned long)__pu_addr,size,segment)) { \ __pu_err = 0; \ switch (size) { \ @@ -394,6 +392,10 @@ __chk_user_ptr(from); \ __copy_tofrom_user_nocheck((to),(__force void *)(from),(n)); \ }) + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + extern inline long copy_to_user(void __user *to, const void *from, long n) diff -Nru a/include/asm-arm/apm.h b/include/asm-arm/apm.h --- a/include/asm-arm/apm.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/apm.h 2004-09-06 16:37:55 -07:00 @@ -15,7 +15,7 @@ #include -#ifdef CONFIG_APM +#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) #define APM_AC_OFFLINE 0 diff -Nru a/include/asm-arm/arch-iop3xx/dma.h b/include/asm-arm/arch-iop3xx/dma.h --- a/include/asm-arm/arch-iop3xx/dma.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-arm/arch-iop3xx/dma.h 2004-09-06 16:37:54 -07:00 @@ -11,44 +11,6 @@ #ifndef _IOP3XX_DMA_H_P #define _IOP3XX_DMA_H_P -/* 80310 not supported */ -#define MAX_IOP3XX_DMA_CHANNEL 2 -#define MAX_DMA_DESC 64 /*128 */ - -#define DMA_FREE 0x0 -#define DMA_ACTIVE 0x1 -#define DMA_COMPLETE 0x2 -#define DMA_ERROR 0x4 - -/* - * Make the generic DMA bits go away since we don't use it - */ -#define MAX_DMA_CHANNELS 0 - #define MAX_DMA_ADDRESS 0xffffffff - -#define DMA_POLL 0x0 -#define DMA_INTERRUPT 0x1 - -#define DMA_DCR_MTM 0x00000040 /* memory to memory transfer */ -#define DMA_DCR_DAC 0x00000020 /* Dual Addr Cycle Enab */ -#define DMA_DCR_IE 0x00000010 /* Interrupt Enable */ -#define DMA_DCR_PCI_IOR 0x00000002 /* I/O Read */ -#define DMA_DCR_PCI_IOW 0x00000003 /* I/O Write */ -#define DMA_DCR_PCI_MR 0x00000006 /* Memory Read */ -#define DMA_DCR_PCI_MW 0x00000007 /* Memory Write */ -#define DMA_DCR_PCI_CR 0x0000000A /* Configuration Read */ -#define DMA_DCR_PCI_CW 0x0000000B /* Configuration Write */ -#define DMA_DCR_PCI_MRM 0x0000000C /* Memory Read Multiple */ -#define DMA_DCR_PCI_MRL 0x0000000E /* Memory Read Line */ -#define DMA_DCR_PCI_MWI 0x0000000F /* Mem Write and Inval */ - - -//extern iop3xx_dma_t dma_chan[2]; -/* function prototypes */ -#ifdef CONFIG_IOP3XX_DMACOPY -extern int iop_memcpy; -void * dma_memcpy(void * to, const void* from, __kernel_size_t n); -#endif #endif /* _ASM_ARCH_DMA_H_P */ diff -Nru a/include/asm-arm/arch-iop3xx/hardware.h b/include/asm-arm/arch-iop3xx/hardware.h --- a/include/asm-arm/arch-iop3xx/hardware.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-arm/arch-iop3xx/hardware.h 2004-09-06 16:37:51 -07:00 @@ -4,8 +4,6 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H -#include - /* * Note about PCI IO space mappings * @@ -15,24 +13,42 @@ * The PCI IO space is located at virtual 0xfe000000 from physical * 0x90000000. The PCI BARs must be programmed with physical addresses, * but when we read them, we convert them to virtual addresses. See - * arch/arm/mach-iop3xx/iop3XX-pci.c + * arch/arm/mach-iop3xx/iop3xx-pci.c */ #define pcibios_assign_all_busses() 1 -#ifdef CONFIG_ARCH_IOP321 - -#define PCIBIOS_MIN_IO 0x90000000 -#define PCIBIOS_MIN_MEM 0x80000000 -#include "iop321.h" +/* + * The min PCI I/O and MEM space are dependent on what specific + * chipset/platform we are running on, so instead of hardcoding with + * #ifdefs, we just fill these in the platform level PCI init code. + */ +#ifndef __ASSEMBLY__ +extern unsigned long iop3xx_pcibios_min_io; +extern unsigned long iop3xx_pcibios_min_mem; -#ifdef CONFIG_ARCH_IQ80321 -#include "iq80321.h" -#endif +extern unsigned int processor_id; #endif +/* + * We just set these to zero since they are really bogus anyways + */ +#define PCIBIOS_MIN_IO (iop3xx_pcibios_min_io) +#define PCIBIOS_MIN_MEM (iop3xx_pcibios_min_mem) +/* + * Generic chipset bits + * + */ +#include "iop321.h" +#include "iop331.h" +/* + * Board specific bits + */ +#include "iq80321.h" +#include "iq31244.h" +#include "iq80331.h" #endif /* _ASM_ARCH_HARDWARE_H */ diff -Nru a/include/asm-arm/arch-iop3xx/iop321-irqs.h b/include/asm-arm/arch-iop3xx/iop321-irqs.h --- a/include/asm-arm/arch-iop3xx/iop321-irqs.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-arm/arch-iop3xx/iop321-irqs.h 2004-09-06 16:37:52 -07:00 @@ -9,8 +9,8 @@ * published by the Free Software Foundation. * */ - -#include +#ifndef _IOP321_IRQS_H_ +#define _IOP321_IRQS_H_ /* * IOP80321 chipset interrupts @@ -62,7 +62,6 @@ /* * Interrupts available on the IQ80321 board */ -#ifdef CONFIG_ARCH_IQ80321 /* * On board devices @@ -78,7 +77,24 @@ #define IRQ_IQ80321_INTC IRQ_IOP321_XINT2 #define IRQ_IQ80321_INTD IRQ_IOP321_XINT3 -#endif // CONFIG_ARCH_IQ80321 +/* + * Interrupts on the IQ31244 board + */ + +/* + * On board devices + */ +#define IRQ_IQ31244_UART IRQ_IOP321_XINT1 +#define IRQ_IQ31244_I82546 IRQ_IOP321_XINT0 +#define IRQ_IQ31244_SATA IRQ_IOP321_XINT2 +#define IRQ_IQ31244_PCIX_SLOT IRQ_IOP321_XINT3 -#define XSCALE_PMU_IRQ IRQ_IOP321_CORE_PMU +/* + * PCI interrupts + */ +#define IRQ_IQ31244_INTA IRQ_IOP321_XINT0 +#define IRQ_IQ31244_INTB IRQ_IOP321_XINT1 +#define IRQ_IQ31244_INTC IRQ_IOP321_XINT2 +#define IRQ_IQ31244_INTD IRQ_IOP321_XINT3 +#endif // _IOP321_IRQ_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iop321.h b/include/asm-arm/arch-iop3xx/iop321.h --- a/include/asm-arm/arch-iop3xx/iop321.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/arch-iop3xx/iop321.h 2004-09-06 16:37:55 -07:00 @@ -20,23 +20,29 @@ * IOP3xx variants but behave slightly differently on each. */ #ifndef __ASSEMBLY__ -#define iop_is_321() ((processor_id & 0xfffff7e0) == 0x69052420) +#ifdef CONFIG_ARCH_IOP321 +#define iop_is_321() (((processor_id & 0xfffff5e0) == 0x69052420)) +#else +#define iop_is_321() 0 +#endif #endif - /* * IOP321 I/O and Mem space regions for PCI autoconfiguration */ +#define IOP321_PCI_LOWER_IO 0x90000000 +#define IOP321_PCI_UPPER_IO 0x9000ffff +#define IOP321_PCI_LOWER_MEM 0x80000000 +#define IOP321_PCI_UPPER_MEM 0x83ffffff + +#define IOP321_PCI_WINDOW_SIZE 64 * 0x100000 -#define IOP321_PCI_IO_BASE 0x90000000 -#define IOP321_PCI_IO_SIZE 0x00010000 -#define IOP321_PCI_MEM_BASE 0x80000000 -#define IOP321_PCI_MEM_SIZE 0x40000000 /* * IOP321 chipset registers */ -#define IOP321_VIRT_MEM_BASE 0xfff00000 /* chip virtual mem address*/ +#define IOP321_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/ +//#define IOP321_VIRT_MEM_BASE 0xfff00000 /* chip virtual mem address*/ #define IOP321_PHY_MEM_BASE 0xffffe000 /* chip physical memory address */ #define IOP321_REG_ADDR(reg) (IOP321_VIRT_MEM_BASE | (reg)) @@ -134,6 +140,16 @@ #define IOP321_OPHPR (volatile u32 *)IOP321_REG_ADDR(0x00000378) #define IOP321_OPTPR (volatile u32 *)IOP321_REG_ADDR(0x0000037C) #define IOP321_IAR (volatile u32 *)IOP321_REG_ADDR(0x00000380) + +#define IOP321_IIxR_MASK 0x7f /* masks all */ +#define IOP321_IIxR_IRI 0x40 /* RC Index Register Interrupt */ +#define IOP321_IIxR_OFQF 0x20 /* RC Output Free Q Full (ERROR) */ +#define IOP321_IIxR_ipq 0x10 /* RC Inbound Post Q (post) */ +#define IOP321_IIxR_ERRDI 0x08 /* RO Error Doorbell Interrupt */ +#define IOP321_IIxR_IDI 0x04 /* RO Inbound Doorbell Interrupt */ +#define IOP321_IIxR_IM1 0x02 /* RC Inbound Message 1 Interrupt */ +#define IOP321_IIxR_IM0 0x01 /* RC Inbound Message 0 Interrupt */ + /* Reserved 0x00000384 through 0x000003FF */ /* DMA Controller 0x00000400 through 0x000004FF */ @@ -186,10 +202,21 @@ #define IOP321_PBISR_BOOR_ERR 0x1 +/* Peripheral performance monitoring unit 0x00000700 through 0x00077F */ +#define IOP321_GTMR (volatile u32 *)IOP321_REG_ADDR(0x00000700) +#define IOP321_ESR (volatile u32 *)IOP321_REG_ADDR(0x00000704) +#define IOP321_EMISR (volatile u32 *)IOP321_REG_ADDR(0x00000708) +/* reserved 0x00000070c */ +#define IOP321_GTSR (volatile u32 *)IOP321_REG_ADDR(0x00000710) +/* PERC0 DOESN'T EXIST - index from 1! */ +#define IOP321_PERCR0 (volatile u32 *)IOP321_REG_ADDR(0x00000710) +#define IOP321_GTMR_NGCE 0x04 /* (Not) Global Counter Enable */ -/* Peripheral performance monitoring unit 0x00000700 through 0x00077F */ /* Internal arbitration unit 0x00000780 through 0x0007BF */ +#define IOP321_IACR (volatile u32 *)IOP321_REG_ADDR(0x00000780) +#define IOP321_MTTR1 (volatile u32 *)IOP321_REG_ADDR(0x00000784) +#define IOP321_MTTR2 (volatile u32 *)IOP321_REG_ADDR(0x00000788) /* General Purpose I/O Registers */ #define IOP321_GPOE (volatile u32 *)IOP321_REG_ADDR(0x000007C4) @@ -207,6 +234,17 @@ #define IOP321_TU_TMR0 (volatile u32 *)IOP321_REG_ADDR(0x000007E0) #define IOP321_TU_TMR1 (volatile u32 *)IOP321_REG_ADDR(0x000007E4) +#ifdef CONFIG_ARCH_IQ80321 +#define IOP321_TICK_RATE 200000000 /* 200 MHz clock */ +#elif defined(CONFIG_ARCH_IQ31244) +#define IOP321_TICK_RATE 198000000 /* 33.000 MHz crystal */ +#endif + +#ifdef CONFIG_ARCH_EP80219 +#undef IOP321_TICK_RATE +#define IOP321_TICK_RATE 200000000 /* 33.333333 Mhz crystal */ +#endif + #define IOP321_TMR_TC 0x01 #define IOP321_TMR_EN 0x02 #define IOP321_TMR_RELOAD 0x04 @@ -224,15 +262,43 @@ #define IOP321_TU_TISR (volatile u32 *)IOP321_REG_ADDR(0x000007F8) #define IOP321_TU_WDTCR (volatile u32 *)IOP321_REG_ADDR(0x000007FC) - - /* Application accelerator unit 0x00000800 - 0x000008FF */ #define IOP321_AAU_ACR (volatile u32 *)IOP321_REG_ADDR(0x00000800) #define IOP321_AAU_ASR (volatile u32 *)IOP321_REG_ADDR(0x00000804) #define IOP321_AAU_ADAR (volatile u32 *)IOP321_REG_ADDR(0x00000808) #define IOP321_AAU_ANDAR (volatile u32 *)IOP321_REG_ADDR(0x0000080C) #define IOP321_AAU_SAR1 (volatile u32 *)IOP321_REG_ADDR(0x00000810) -/* SAR2...SAR32 0x00000814 - 0x000008A4 */ +#define IOP321_AAU_SAR2 (volatile u32 *)IOP321_REG_ADDR(0x00000814) +#define IOP321_AAU_SAR3 (volatile u32 *)IOP321_REG_ADDR(0x00000818) +#define IOP321_AAU_SAR4 (volatile u32 *)IOP321_REG_ADDR(0x0000081C) +#define IOP321_AAU_SAR5 (volatile u32 *)IOP321_REG_ADDR(0x0000082C) +#define IOP321_AAU_SAR6 (volatile u32 *)IOP321_REG_ADDR(0x00000830) +#define IOP321_AAU_SAR7 (volatile u32 *)IOP321_REG_ADDR(0x00000834) +#define IOP321_AAU_SAR8 (volatile u32 *)IOP321_REG_ADDR(0x00000838) +#define IOP321_AAU_SAR9 (volatile u32 *)IOP321_REG_ADDR(0x00000840) +#define IOP321_AAU_SAR10 (volatile u32 *)IOP321_REG_ADDR(0x00000844) +#define IOP321_AAU_SAR11 (volatile u32 *)IOP321_REG_ADDR(0x00000848) +#define IOP321_AAU_SAR12 (volatile u32 *)IOP321_REG_ADDR(0x0000084C) +#define IOP321_AAU_SAR13 (volatile u32 *)IOP321_REG_ADDR(0x00000850) +#define IOP321_AAU_SAR14 (volatile u32 *)IOP321_REG_ADDR(0x00000854) +#define IOP321_AAU_SAR15 (volatile u32 *)IOP321_REG_ADDR(0x00000858) +#define IOP321_AAU_SAR16 (volatile u32 *)IOP321_REG_ADDR(0x0000085C) +#define IOP321_AAU_SAR17 (volatile u32 *)IOP321_REG_ADDR(0x00000864) +#define IOP321_AAU_SAR18 (volatile u32 *)IOP321_REG_ADDR(0x00000868) +#define IOP321_AAU_SAR19 (volatile u32 *)IOP321_REG_ADDR(0x0000086C) +#define IOP321_AAU_SAR20 (volatile u32 *)IOP321_REG_ADDR(0x00000870) +#define IOP321_AAU_SAR21 (volatile u32 *)IOP321_REG_ADDR(0x00000874) +#define IOP321_AAU_SAR22 (volatile u32 *)IOP321_REG_ADDR(0x00000878) +#define IOP321_AAU_SAR23 (volatile u32 *)IOP321_REG_ADDR(0x0000087C) +#define IOP321_AAU_SAR24 (volatile u32 *)IOP321_REG_ADDR(0x00000880) +#define IOP321_AAU_SAR25 (volatile u32 *)IOP321_REG_ADDR(0x00000888) +#define IOP321_AAU_SAR26 (volatile u32 *)IOP321_REG_ADDR(0x0000088C) +#define IOP321_AAU_SAR27 (volatile u32 *)IOP321_REG_ADDR(0x00000890) +#define IOP321_AAU_SAR28 (volatile u32 *)IOP321_REG_ADDR(0x00000894) +#define IOP321_AAU_SAR29 (volatile u32 *)IOP321_REG_ADDR(0x00000898) +#define IOP321_AAU_SAR30 (volatile u32 *)IOP321_REG_ADDR(0x0000089C) +#define IOP321_AAU_SAR31 (volatile u32 *)IOP321_REG_ADDR(0x000008A0) +#define IOP321_AAU_SAR32 (volatile u32 *)IOP321_REG_ADDR(0x000008A4) #define IOP321_AAU_DAR (volatile u32 *)IOP321_REG_ADDR(0x00000820) #define IOP321_AAU_ABCR (volatile u32 *)IOP321_REG_ADDR(0x00000824) #define IOP321_AAU_ADCR (volatile u32 *)IOP321_REG_ADDR(0x00000828) @@ -259,5 +325,12 @@ /* Reserved 0x000016B8 through 0x000016FC */ /* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */ + + +#ifndef __ASSEMBLY__ +extern void iop321_map_io(void); +extern void iop321_init_irq(void); +extern void iop321_time_init(void); +#endif #endif // _IOP321_HW_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iop331-irqs.h b/include/asm-arm/arch-iop3xx/iop331-irqs.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-iop3xx/iop331-irqs.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,113 @@ +/* + * linux/include/asm-arm/arch-iop3xx/irqs.h + * + * Author: Dave Jiang (dave.jiang@intel.com) + * Copyright: (C) 2003 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#ifndef _IOP331_IRQS_H_ +#define _IOP331_IRQS_H_ + +/* + * IOP80331 chipset interrupts + */ +#define IOP331_IRQ_OFS 0 +#define IOP331_IRQ(x) (IOP331_IRQ_OFS + (x)) + +/* + * On IRQ or FIQ register + */ +#define IRQ_IOP331_DMA0_EOT IOP331_IRQ(0) +#define IRQ_IOP331_DMA0_EOC IOP331_IRQ(1) +#define IRQ_IOP331_DMA1_EOT IOP331_IRQ(2) +#define IRQ_IOP331_DMA1_EOC IOP331_IRQ(3) +#define IRQ_IOP331_RSVD_4 IOP331_IRQ(4) +#define IRQ_IOP331_RSVD_5 IOP331_IRQ(5) +#define IRQ_IOP331_AA_EOT IOP331_IRQ(6) +#define IRQ_IOP331_AA_EOC IOP331_IRQ(7) +#define IRQ_IOP331_TIMER0 IOP331_IRQ(8) +#define IRQ_IOP331_TIMER1 IOP331_IRQ(9) +#define IRQ_IOP331_I2C_0 IOP331_IRQ(10) +#define IRQ_IOP331_I2C_1 IOP331_IRQ(11) +#define IRQ_IOP331_MSG IOP331_IRQ(12) +#define IRQ_IOP331_MSGIBQ IOP331_IRQ(13) +#define IRQ_IOP331_ATU_BIST IOP331_IRQ(14) +#define IRQ_IOP331_PERFMON IOP331_IRQ(15) +#define IRQ_IOP331_CORE_PMU IOP331_IRQ(16) +#define IRQ_IOP331_RSVD_17 IOP331_IRQ(17) +#define IRQ_IOP331_RSVD_18 IOP331_IRQ(18) +#define IRQ_IOP331_RSVD_19 IOP331_IRQ(19) +#define IRQ_IOP331_RSVD_20 IOP331_IRQ(20) +#define IRQ_IOP331_RSVD_21 IOP331_IRQ(21) +#define IRQ_IOP331_RSVD_22 IOP331_IRQ(22) +#define IRQ_IOP331_RSVD_23 IOP331_IRQ(23) +#define IRQ_IOP331_XINT0 IOP331_IRQ(24) +#define IRQ_IOP331_XINT1 IOP331_IRQ(25) +#define IRQ_IOP331_XINT2 IOP331_IRQ(26) +#define IRQ_IOP331_XINT3 IOP331_IRQ(27) +#define IRQ_IOP331_RSVD_28 IOP331_IRQ(28) +#define IRQ_IOP331_RSVD_29 IOP331_IRQ(29) +#define IRQ_IOP331_RSVD_30 IOP331_IRQ(30) +#define IRQ_IOP331_RSVD_31 IOP331_IRQ(31) +#define IRQ_IOP331_XINT8 IOP331_IRQ(32) // 0 +#define IRQ_IOP331_XINT9 IOP331_IRQ(33) // 1 +#define IRQ_IOP331_XINT10 IOP331_IRQ(34) // 2 +#define IRQ_IOP331_XINT11 IOP331_IRQ(35) // 3 +#define IRQ_IOP331_XINT12 IOP331_IRQ(36) // 4 +#define IRQ_IOP331_XINT13 IOP331_IRQ(37) // 5 +#define IRQ_IOP331_XINT14 IOP331_IRQ(38) // 6 +#define IRQ_IOP331_XINT15 IOP331_IRQ(39) // 7 +#define IRQ_IOP331_RSVD_40 IOP331_IRQ(40) // 8 +#define IRQ_IOP331_RSVD_41 IOP331_IRQ(41) // 9 +#define IRQ_IOP331_RSVD_42 IOP331_IRQ(42) // 10 +#define IRQ_IOP331_RSVD_43 IOP331_IRQ(43) // 11 +#define IRQ_IOP331_RSVD_44 IOP331_IRQ(44) // 12 +#define IRQ_IOP331_RSVD_45 IOP331_IRQ(45) // 13 +#define IRQ_IOP331_RSVD_46 IOP331_IRQ(46) // 14 +#define IRQ_IOP331_RSVD_47 IOP331_IRQ(47) // 15 +#define IRQ_IOP331_RSVD_48 IOP331_IRQ(48) // 16 +#define IRQ_IOP331_RSVD_49 IOP331_IRQ(49) // 17 +#define IRQ_IOP331_RSVD_50 IOP331_IRQ(50) // 18 +#define IRQ_IOP331_UART0 IOP331_IRQ(51) // 19 +#define IRQ_IOP331_UART1 IOP331_IRQ(52) // 20 +#define IRQ_IOP331_PBIE IOP331_IRQ(53) // 21 +#define IRQ_IOP331_ATU_CRW IOP331_IRQ(54) // 22 +#define IRQ_IOP331_ATU_ERR IOP331_IRQ(55) // 23 +#define IRQ_IOP331_MCU_ERR IOP331_IRQ(56) // 24 +#define IRQ_IOP331_DMA0_ERR IOP331_IRQ(57) // 25 +#define IRQ_IOP331_DMA1_ERR IOP331_IRQ(58) // 26 +#define IRQ_IOP331_RSVD_59 IOP331_IRQ(59) // 27 +#define IRQ_IOP331_AA_ERR IOP331_IRQ(60) // 28 +#define IRQ_IOP331_RSVD_61 IOP331_IRQ(61) // 29 +#define IRQ_IOP331_MSG_ERR IOP331_IRQ(62) // 30 +#define IRQ_IOP331_HPI IOP331_IRQ(63) // 31 + +#define NR_IOP331_IRQS (IOP331_IRQ(63) + 1) + +#define NR_IRQS NR_IOP331_IRQS + + +/* + * Interrupts available on the IQ80331 board + */ + +/* + * On board devices + */ +#define IRQ_IQ80331_I82544 IRQ_IOP331_XINT0 +#define IRQ_IQ80331_UART0 IRQ_IOP331_UART0 +#define IRQ_IQ80331_UART1 IRQ_IOP331_UART1 + +/* + * PCI interrupts + */ +#define IRQ_IQ80331_INTA IRQ_IOP331_XINT0 +#define IRQ_IQ80331_INTB IRQ_IOP331_XINT1 +#define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 +#define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 + +#endif // _IOP331_IRQ_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iop331.h b/include/asm-arm/arch-iop3xx/iop331.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-iop3xx/iop331.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,342 @@ +/* + * linux/include/asm/arch-iop3xx/iop331.h + * + * Intel IOP331 Chip definitions + * + * Author: Dave Jiang (dave.jiang@intel.com) + * Copyright (C) 2003 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _IOP331_HW_H_ +#define _IOP331_HW_H_ + + +/* + * This is needed for mixed drivers that need to work on all + * IOP3xx variants but behave slightly differently on each. + */ +#ifndef __ASSEMBLY__ +#ifdef CONFIG_ARCH_IOP331 +#define iop_is_331() ((processor_id & 0xffffffb0) == 0x69054090) +#else +#define iop_is_331() 0 +#endif +#endif + +/* + * IOP331 I/O and Mem space regions for PCI autoconfiguration + */ +#define IOP331_PCI_LOWER_IO 0x90000000 +#define IOP331_PCI_UPPER_IO 0x900fffff +#define IOP331_PCI_LOWER_MEM 0x80000000 +#define IOP331_PCI_UPPER_MEM 0x87ffffff + +#define IOP331_PCI_WINDOW_SIZE 128 * 0x100000 + + +/* + * IOP331 chipset registers + */ +#define IOP331_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/ +// #define IOP331_VIRT_MEM_BASE 0xfff00000 /* chip virtual mem address*/ + +#define IOP331_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */ +#define IOP331_REG_ADDR(reg) (IOP331_VIRT_MEM_BASE | (reg)) + +/* Reserved 0x00000000 through 0x000000FF */ + +/* Address Translation Unit 0x00000100 through 0x000001FF */ +#define IOP331_ATUVID (volatile u16 *)IOP331_REG_ADDR(0x00000100) +#define IOP331_ATUDID (volatile u16 *)IOP331_REG_ADDR(0x00000102) +#define IOP331_ATUCMD (volatile u16 *)IOP331_REG_ADDR(0x00000104) +#define IOP331_ATUSR (volatile u16 *)IOP331_REG_ADDR(0x00000106) +#define IOP331_ATURID (volatile u8 *)IOP331_REG_ADDR(0x00000108) +#define IOP331_ATUCCR (volatile u32 *)IOP331_REG_ADDR(0x00000109) +#define IOP331_ATUCLSR (volatile u8 *)IOP331_REG_ADDR(0x0000010C) +#define IOP331_ATULT (volatile u8 *)IOP331_REG_ADDR(0x0000010D) +#define IOP331_ATUHTR (volatile u8 *)IOP331_REG_ADDR(0x0000010E) +#define IOP331_ATUBIST (volatile u8 *)IOP331_REG_ADDR(0x0000010F) +#define IOP331_IABAR0 (volatile u32 *)IOP331_REG_ADDR(0x00000110) +#define IOP331_IAUBAR0 (volatile u32 *)IOP331_REG_ADDR(0x00000114) +#define IOP331_IABAR1 (volatile u32 *)IOP331_REG_ADDR(0x00000118) +#define IOP331_IAUBAR1 (volatile u32 *)IOP331_REG_ADDR(0x0000011C) +#define IOP331_IABAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000120) +#define IOP331_IAUBAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000124) +#define IOP331_ASVIR (volatile u16 *)IOP331_REG_ADDR(0x0000012C) +#define IOP331_ASIR (volatile u16 *)IOP331_REG_ADDR(0x0000012E) +#define IOP331_ERBAR (volatile u32 *)IOP331_REG_ADDR(0x00000130) +#define IOP331_ATU_CAPPTR (volatile u32 *)IOP331_REG_ADDR(0x00000134) +/* Reserved 0x00000138 through 0x0000013B */ +#define IOP331_ATUILR (volatile u8 *)IOP331_REG_ADDR(0x0000013C) +#define IOP331_ATUIPR (volatile u8 *)IOP331_REG_ADDR(0x0000013D) +#define IOP331_ATUMGNT (volatile u8 *)IOP331_REG_ADDR(0x0000013E) +#define IOP331_ATUMLAT (volatile u8 *)IOP331_REG_ADDR(0x0000013F) +#define IOP331_IALR0 (volatile u32 *)IOP331_REG_ADDR(0x00000140) +#define IOP331_IATVR0 (volatile u32 *)IOP331_REG_ADDR(0x00000144) +#define IOP331_ERLR (volatile u32 *)IOP331_REG_ADDR(0x00000148) +#define IOP331_ERTVR (volatile u32 *)IOP331_REG_ADDR(0x0000014C) +#define IOP331_IALR1 (volatile u32 *)IOP331_REG_ADDR(0x00000150) +#define IOP331_IALR2 (volatile u32 *)IOP331_REG_ADDR(0x00000154) +#define IOP331_IATVR2 (volatile u32 *)IOP331_REG_ADDR(0x00000158) +#define IOP331_OIOWTVR (volatile u32 *)IOP331_REG_ADDR(0x0000015C) +#define IOP331_OMWTVR0 (volatile u32 *)IOP331_REG_ADDR(0x00000160) +#define IOP331_OUMWTVR0 (volatile u32 *)IOP331_REG_ADDR(0x00000164) +#define IOP331_OMWTVR1 (volatile u32 *)IOP331_REG_ADDR(0x00000168) +#define IOP331_OUMWTVR1 (volatile u32 *)IOP331_REG_ADDR(0x0000016C) +/* Reserved 0x00000170 through 0x00000177*/ +#define IOP331_OUDWTVR (volatile u32 *)IOP331_REG_ADDR(0x00000178) +/* Reserved 0x0000017C through 0x0000017F*/ +#define IOP331_ATUCR (volatile u32 *)IOP331_REG_ADDR(0x00000180) +#define IOP331_PCSR (volatile u32 *)IOP331_REG_ADDR(0x00000184) +#define IOP331_ATUISR (volatile u32 *)IOP331_REG_ADDR(0x00000188) +#define IOP331_ATUIMR (volatile u32 *)IOP331_REG_ADDR(0x0000018C) +#define IOP331_IABAR3 (volatile u32 *)IOP331_REG_ADDR(0x00000190) +#define IOP331_IAUBAR3 (volatile u32 *)IOP331_REG_ADDR(0x00000194) +#define IOP331_IALR3 (volatile u32 *)IOP331_REG_ADDR(0x00000198) +#define IOP331_IATVR3 (volatile u32 *)IOP331_REG_ADDR(0x0000019C) +/* Reserved 0x000001A0 through 0x000001A3*/ +#define IOP331_OCCAR (volatile u32 *)IOP331_REG_ADDR(0x000001A4) +/* Reserved 0x000001A8 through 0x000001AB*/ +#define IOP331_OCCDR (volatile u32 *)IOP331_REG_ADDR(0x000001AC) +/* Reserved 0x000001B0 through 0x000001BB*/ +#define IOP331_VPDCAPID (volatile u8 *)IOP331_REG_ADDR(0x000001B8) +#define IOP331_VPDNXTP (volatile u8 *)IOP331_REG_ADDR(0x000001B9) +#define IOP331_VPDAR (volatile u16 *)IOP331_REG_ADDR(0x000001BA) +#define IOP331_VPDDR (volatile u32 *)IOP331_REG_ADDR(0x000001BC) +#define IOP331_PMCAPID (volatile u8 *)IOP331_REG_ADDR(0x000001C0) +#define IOP331_PMNEXT (volatile u8 *)IOP331_REG_ADDR(0x000001C1) +#define IOP331_APMCR (volatile u16 *)IOP331_REG_ADDR(0x000001C2) +#define IOP331_APMCSR (volatile u16 *)IOP331_REG_ADDR(0x000001C4) +/* Reserved 0x000001C6 through 0x000001CF */ +#define IOP331_MSICAPID (volatile u8 *)IOP331_REG_ADDR(0x000001D0) +#define IOP331_MSINXTP (volatile u8 *)IOP331_REG_ADDR(0x000001D1) +#define IOP331_MSIMCR (volatile u16 *)IOP331_REG_ADDR(0x000001D2) +#define IOP331_MSIMAR (volatile u32 *)IOP331_REG_ADDR(0x000001D4) +#define IOP331_MSIMUAR (volatile u32 *)IOP331_REG_ADDR(0x000001D8) +#define IOP331_MSIMDR (volatile u32 *)IOP331_REG_ADDR(0x000001DC) +#define IOP331_PCIXCAPID (volatile u8 *)IOP331_REG_ADDR(0x000001E0) +#define IOP331_PCIXNEXT (volatile u8 *)IOP331_REG_ADDR(0x000001E1) +#define IOP331_PCIXCMD (volatile u16 *)IOP331_REG_ADDR(0x000001E2) +#define IOP331_PCIXSR (volatile u32 *)IOP331_REG_ADDR(0x000001E4) +#define IOP331_PCIIRSR (volatile u32 *)IOP331_REG_ADDR(0x000001EC) + +/* Messaging Unit 0x00000300 through 0x000003FF */ + +/* Reserved 0x00000300 through 0x0000030c */ +#define IOP331_IMR0 (volatile u32 *)IOP331_REG_ADDR(0x00000310) +#define IOP331_IMR1 (volatile u32 *)IOP331_REG_ADDR(0x00000314) +#define IOP331_OMR0 (volatile u32 *)IOP331_REG_ADDR(0x00000318) +#define IOP331_OMR1 (volatile u32 *)IOP331_REG_ADDR(0x0000031C) +#define IOP331_IDR (volatile u32 *)IOP331_REG_ADDR(0x00000320) +#define IOP331_IISR (volatile u32 *)IOP331_REG_ADDR(0x00000324) +#define IOP331_IIMR (volatile u32 *)IOP331_REG_ADDR(0x00000328) +#define IOP331_ODR (volatile u32 *)IOP331_REG_ADDR(0x0000032C) +#define IOP331_OISR (volatile u32 *)IOP331_REG_ADDR(0x00000330) +#define IOP331_OIMR (volatile u32 *)IOP331_REG_ADDR(0x00000334) +/* Reserved 0x00000338 through 0x0000034F */ +#define IOP331_MUCR (volatile u32 *)IOP331_REG_ADDR(0x00000350) +#define IOP331_QBAR (volatile u32 *)IOP331_REG_ADDR(0x00000354) +/* Reserved 0x00000358 through 0x0000035C */ +#define IOP331_IFHPR (volatile u32 *)IOP331_REG_ADDR(0x00000360) +#define IOP331_IFTPR (volatile u32 *)IOP331_REG_ADDR(0x00000364) +#define IOP331_IPHPR (volatile u32 *)IOP331_REG_ADDR(0x00000368) +#define IOP331_IPTPR (volatile u32 *)IOP331_REG_ADDR(0x0000036C) +#define IOP331_OFHPR (volatile u32 *)IOP331_REG_ADDR(0x00000370) +#define IOP331_OFTPR (volatile u32 *)IOP331_REG_ADDR(0x00000374) +#define IOP331_OPHPR (volatile u32 *)IOP331_REG_ADDR(0x00000378) +#define IOP331_OPTPR (volatile u32 *)IOP331_REG_ADDR(0x0000037C) +#define IOP331_IAR (volatile u32 *)IOP331_REG_ADDR(0x00000380) +/* Reserved 0x00000384 through 0x000003FF */ + +/* DMA Controller 0x00000400 through 0x000004FF */ +#define IOP331_DMA0_CCR (volatile u32 *)IOP331_REG_ADDR(0x00000400) +#define IOP331_DMA0_CSR (volatile u32 *)IOP331_REG_ADDR(0x00000404) +#define IOP331_DMA0_DAR (volatile u32 *)IOP331_REG_ADDR(0x0000040C) +#define IOP331_DMA0_NDAR (volatile u32 *)IOP331_REG_ADDR(0x00000410) +#define IOP331_DMA0_PADR (volatile u32 *)IOP331_REG_ADDR(0x00000414) +#define IOP331_DMA0_PUADR (volatile u32 *)IOP331_REG_ADDR(0x00000418) +#define IOP331_DMA0_LADR (volatile u32 *)IOP331_REG_ADDR(0X0000041C) +#define IOP331_DMA0_BCR (volatile u32 *)IOP331_REG_ADDR(0x00000420) +#define IOP331_DMA0_DCR (volatile u32 *)IOP331_REG_ADDR(0x00000424) +/* Reserved 0x00000428 through 0x0000043C */ +#define IOP331_DMA1_CCR (volatile u32 *)IOP331_REG_ADDR(0x00000440) +#define IOP331_DMA1_CSR (volatile u32 *)IOP331_REG_ADDR(0x00000444) +#define IOP331_DMA1_DAR (volatile u32 *)IOP331_REG_ADDR(0x0000044C) +#define IOP331_DMA1_NDAR (volatile u32 *)IOP331_REG_ADDR(0x00000450) +#define IOP331_DMA1_PADR (volatile u32 *)IOP331_REG_ADDR(0x00000454) +#define IOP331_DMA1_PUADR (volatile u32 *)IOP331_REG_ADDR(0x00000458) +#define IOP331_DMA1_LADR (volatile u32 *)IOP331_REG_ADDR(0x0000045C) +#define IOP331_DMA1_BCR (volatile u32 *)IOP331_REG_ADDR(0x00000460) +#define IOP331_DMA1_DCR (volatile u32 *)IOP331_REG_ADDR(0x00000464) +/* Reserved 0x00000468 through 0x000004FF */ + +/* Memory controller 0x00000500 through 0x0005FF */ + +/* Peripheral bus interface unit 0x00000680 through 0x0006FF */ +#define IOP331_PBCR (volatile u32 *)IOP331_REG_ADDR(0x00000680) +#define IOP331_PBISR (volatile u32 *)IOP331_REG_ADDR(0x00000684) +#define IOP331_PBBAR0 (volatile u32 *)IOP331_REG_ADDR(0x00000688) +#define IOP331_PBLR0 (volatile u32 *)IOP331_REG_ADDR(0x0000068C) +#define IOP331_PBBAR1 (volatile u32 *)IOP331_REG_ADDR(0x00000690) +#define IOP331_PBLR1 (volatile u32 *)IOP331_REG_ADDR(0x00000694) +#define IOP331_PBBAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000698) +#define IOP331_PBLR2 (volatile u32 *)IOP331_REG_ADDR(0x0000069C) +#define IOP331_PBBAR3 (volatile u32 *)IOP331_REG_ADDR(0x000006A0) +#define IOP331_PBLR3 (volatile u32 *)IOP331_REG_ADDR(0x000006A4) +#define IOP331_PBBAR4 (volatile u32 *)IOP331_REG_ADDR(0x000006A8) +#define IOP331_PBLR4 (volatile u32 *)IOP331_REG_ADDR(0x000006AC) +#define IOP331_PBBAR5 (volatile u32 *)IOP331_REG_ADDR(0x000006B0) +#define IOP331_PBLR5 (volatile u32 *)IOP331_REG_ADDR(0x000006B4) +#define IOP331_PBDSCR (volatile u32 *)IOP331_REG_ADDR(0x000006B8) +/* Reserved 0x000006BC */ +#define IOP331_PMBR0 (volatile u32 *)IOP331_REG_ADDR(0x000006C0) +/* Reserved 0x000006C4 through 0x000006DC */ +#define IOP331_PMBR1 (volatile u32 *)IOP331_REG_ADDR(0x000006E0) +#define IOP331_PMBR2 (volatile u32 *)IOP331_REG_ADDR(0x000006E4) + +#define IOP331_PBCR_EN 0x1 + +#define IOP331_PBISR_BOOR_ERR 0x1 + + + +/* Peripheral performance monitoring unit 0x00000700 through 0x00077F */ +/* Internal arbitration unit 0x00000780 through 0x0007BF */ + +/* Interrupt Controller */ +#define IOP331_INTCTL0 (volatile u32 *)IOP331_REG_ADDR(0x00000790) +#define IOP331_INTCTL1 (volatile u32 *)IOP331_REG_ADDR(0x00000794) +#define IOP331_INTSTR0 (volatile u32 *)IOP331_REG_ADDR(0x00000798) +#define IOP331_INTSTR1 (volatile u32 *)IOP331_REG_ADDR(0x0000079C) +#define IOP331_IINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A0) +#define IOP331_IINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007A4) +#define IOP331_FINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A8) +#define IOP331_FINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007AC) +#define IOP331_IPR0 (volatile u32 *)IOP331_REG_ADDR(0x000007B0) +#define IOP331_IPR1 (volatile u32 *)IOP331_REG_ADDR(0x000007B4) +#define IOP331_IPR2 (volatile u32 *)IOP331_REG_ADDR(0x000007B8) +#define IOP331_IPR3 (volatile u32 *)IOP331_REG_ADDR(0x000007BC) +#define IOP331_INTBASE (volatile u32 *)IOP331_REG_ADDR(0x000007C0) +#define IOP331_INTSIZE (volatile u32 *)IOP331_REG_ADDR(0x000007C4) +#define IOP331_IINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007C8) +#define IOP331_FINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007CC) + + +/* Timers */ + +#define IOP331_TU_TMR0 (volatile u32 *)IOP331_REG_ADDR(0x000007D0) +#define IOP331_TU_TMR1 (volatile u32 *)IOP331_REG_ADDR(0x000007D4) + +#define IOP331_TMR_TC 0x01 +#define IOP331_TMR_EN 0x02 +#define IOP331_TMR_RELOAD 0x04 +#define IOP331_TMR_PRIVILEGED 0x09 + +#define IOP331_TMR_RATIO_1_1 0x00 +#define IOP331_TMR_RATIO_4_1 0x10 +#define IOP331_TMR_RATIO_8_1 0x20 +#define IOP331_TMR_RATIO_16_1 0x30 + +#define IOP331_TU_TCR0 (volatile u32 *)IOP331_REG_ADDR(0x000007D8) +#define IOP331_TU_TCR1 (volatile u32 *)IOP331_REG_ADDR(0x000007DC) +#define IOP331_TU_TRR0 (volatile u32 *)IOP331_REG_ADDR(0x000007E0) +#define IOP331_TU_TRR1 (volatile u32 *)IOP331_REG_ADDR(0x000007E4) +#define IOP331_TU_TISR (volatile u32 *)IOP331_REG_ADDR(0x000007E8) +#define IOP331_TU_WDTCR (volatile u32 *)IOP331_REG_ADDR(0x000007EC) + +#define IOP331_TICK_RATE 266000000 /* 266 MHz clock */ + + +/* Application accelerator unit 0x00000800 - 0x000008FF */ +#define IOP331_AAU_ACR (volatile u32 *)IOP331_REG_ADDR(0x00000800) +#define IOP331_AAU_ASR (volatile u32 *)IOP331_REG_ADDR(0x00000804) +#define IOP331_AAU_ADAR (volatile u32 *)IOP331_REG_ADDR(0x00000808) +#define IOP331_AAU_ANDAR (volatile u32 *)IOP331_REG_ADDR(0x0000080C) +#define IOP331_AAU_SAR1 (volatile u32 *)IOP331_REG_ADDR(0x00000810) +#define IOP331_AAU_SAR2 (volatile u32 *)IOP331_REG_ADDR(0x00000814) +#define IOP331_AAU_SAR3 (volatile u32 *)IOP331_REG_ADDR(0x00000818) +#define IOP331_AAU_SAR4 (volatile u32 *)IOP331_REG_ADDR(0x0000081C) +#define IOP331_AAU_SAR5 (volatile u32 *)IOP331_REG_ADDR(0x0000082C) +#define IOP331_AAU_SAR6 (volatile u32 *)IOP331_REG_ADDR(0x00000830) +#define IOP331_AAU_SAR7 (volatile u32 *)IOP331_REG_ADDR(0x00000834) +#define IOP331_AAU_SAR8 (volatile u32 *)IOP331_REG_ADDR(0x00000838) +#define IOP331_AAU_SAR9 (volatile u32 *)IOP331_REG_ADDR(0x00000840) +#define IOP331_AAU_SAR10 (volatile u32 *)IOP331_REG_ADDR(0x00000844) +#define IOP331_AAU_SAR11 (volatile u32 *)IOP331_REG_ADDR(0x00000848) +#define IOP331_AAU_SAR12 (volatile u32 *)IOP331_REG_ADDR(0x0000084C) +#define IOP331_AAU_SAR13 (volatile u32 *)IOP331_REG_ADDR(0x00000850) +#define IOP331_AAU_SAR14 (volatile u32 *)IOP331_REG_ADDR(0x00000854) +#define IOP331_AAU_SAR15 (volatile u32 *)IOP331_REG_ADDR(0x00000858) +#define IOP331_AAU_SAR16 (volatile u32 *)IOP331_REG_ADDR(0x0000085C) +#define IOP331_AAU_SAR17 (volatile u32 *)IOP331_REG_ADDR(0x00000864) +#define IOP331_AAU_SAR18 (volatile u32 *)IOP331_REG_ADDR(0x00000868) +#define IOP331_AAU_SAR19 (volatile u32 *)IOP331_REG_ADDR(0x0000086C) +#define IOP331_AAU_SAR20 (volatile u32 *)IOP331_REG_ADDR(0x00000870) +#define IOP331_AAU_SAR21 (volatile u32 *)IOP331_REG_ADDR(0x00000874) +#define IOP331_AAU_SAR22 (volatile u32 *)IOP331_REG_ADDR(0x00000878) +#define IOP331_AAU_SAR23 (volatile u32 *)IOP331_REG_ADDR(0x0000087C) +#define IOP331_AAU_SAR24 (volatile u32 *)IOP331_REG_ADDR(0x00000880) +#define IOP331_AAU_SAR25 (volatile u32 *)IOP331_REG_ADDR(0x00000888) +#define IOP331_AAU_SAR26 (volatile u32 *)IOP331_REG_ADDR(0x0000088C) +#define IOP331_AAU_SAR27 (volatile u32 *)IOP331_REG_ADDR(0x00000890) +#define IOP331_AAU_SAR28 (volatile u32 *)IOP331_REG_ADDR(0x00000894) +#define IOP331_AAU_SAR29 (volatile u32 *)IOP331_REG_ADDR(0x00000898) +#define IOP331_AAU_SAR30 (volatile u32 *)IOP331_REG_ADDR(0x0000089C) +#define IOP331_AAU_SAR31 (volatile u32 *)IOP331_REG_ADDR(0x000008A0) +#define IOP331_AAU_SAR32 (volatile u32 *)IOP331_REG_ADDR(0x000008A4) +#define IOP331_AAU_DAR (volatile u32 *)IOP331_REG_ADDR(0x00000820) +#define IOP331_AAU_ABCR (volatile u32 *)IOP331_REG_ADDR(0x00000824) +#define IOP331_AAU_ADCR (volatile u32 *)IOP331_REG_ADDR(0x00000828) +#define IOP331_AAU_EDCR0 (volatile u32 *)IOP331_REG_ADDR(0x0000083c) +#define IOP331_AAU_EDCR1 (volatile u32 *)IOP331_REG_ADDR(0x00000860) +#define IOP331_AAU_EDCR2 (volatile u32 *)IOP331_REG_ADDR(0x00000884) + + +#define IOP331_SPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C0) +#define IOP331_PPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C8) +/* SSP serial port unit 0x00001600 - 0x0000167F */ + +/* I2C bus interface unit 0x00001680 - 0x000016FF */ +/* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */ + +#define IOP331_ICR0 (volatile u32 *)IOP331_REG_ADDR(0x00001680) +#define IOP331_ISR0 (volatile u32 *)IOP331_REG_ADDR(0x00001684) +#define IOP331_ISAR0 (volatile u32 *)IOP331_REG_ADDR(0x00001688) +#define IOP331_IDBR0 (volatile u32 *)IOP331_REG_ADDR(0x0000168C) +/* Reserved 0x00001690 */ +#define IOP331_IBMR0 (volatile u32 *)IOP331_REG_ADDR(0x00001694) +/* Reserved 0x00001698 */ +/* Reserved 0x0000169C */ +#define IOP331_ICR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A0) +#define IOP331_ISR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A4) +#define IOP331_ISAR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A8) +#define IOP331_IDBR1 (volatile u32 *)IOP331_REG_ADDR(0x000016AC) +#define IOP331_IBMR1 (volatile u32 *)IOP331_REG_ADDR(0x000016B4) +/* Reserved 0x000016B8 through 0x000016FF */ + +/* 0x00001700 through 0x0000172C UART 0 */ + +/* Reserved 0x00001730 through 0x0000173F */ + +/* 0x00001740 through 0x0000176C UART 1 */ + +/* Reserved 0x00001770 through 0x0000177F */ + +/* General Purpose I/O Registers */ +#define IOP331_GPOE (volatile u32 *)IOP331_REG_ADDR(0x00001780) +#define IOP331_GPID (volatile u32 *)IOP331_REG_ADDR(0x00001784) +#define IOP331_GPOD (volatile u32 *)IOP331_REG_ADDR(0x00001788) + +/* Reserved 0x0000178c through 0x000019ff */ + +#ifndef __ASSEMBLY__ +extern void iop331_map_io(void); +extern void iop331_init_irq(void); +extern void iop331_time_init(void); +#endif + +#endif // _IOP331_HW_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iq31244.h b/include/asm-arm/arch-iop3xx/iq31244.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-iop3xx/iq31244.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,36 @@ +/* + * linux/include/asm/arch-iop3xx/iq31244.h + * + * Intel IQ31244 evaluation board registers + */ + +#ifndef _IQ31244_H_ +#define _IQ31244_H_ + +#define IQ31244_RAMBASE 0xa0000000 + +#define IQ31244_FLASHBASE 0xf0000000 /* Flash */ +#define IQ31244_FLASHSIZE 0x00800000 +#define IQ31244_FLASHWIDTH 2 + +#define IQ31244_UART 0xfe800000 /* UART #1 */ +#define IQ31244_7SEG_1 0xfe840000 /* 7-Segment MSB */ +#define IQ31244_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */ +#define IQ31244_ROTARY_SW 0xfe8d0000 /* Rotary Switch */ +#define IQ31244_BATT_STAT 0xfe8f0000 /* Battery Status */ + +/* + * IQ31244 PCI I/O and Mem space regions + */ +#define IQ31244_PCI_IO_BASE 0x90000000 +#define IQ31244_PCI_IO_SIZE 0x00010000 +#define IQ31244_PCI_MEM_BASE 0x80000000 +//#define IQ31244_PCI_MEM_SIZE 0x04000000 +#define IQ31244_PCI_MEM_SIZE 0x08000000 +#define IQ31244_PCI_IO_OFFSET 0x6e000000 + +#ifndef __ASSEMBLY__ +extern void iq31244_map_io(void); +#endif + +#endif // _IQ31244_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iq80321.h b/include/asm-arm/arch-iop3xx/iq80321.h --- a/include/asm-arm/arch-iop3xx/iq80321.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-arm/arch-iop3xx/iq80321.h 2004-09-06 16:37:52 -07:00 @@ -1,17 +1,35 @@ /* * linux/include/asm/arch-iop3xx/iq80321.h * - * Intel IQ-80321 evaluation board registers + * Intel IQ80321 evaluation board registers */ #ifndef _IQ80321_H_ #define _IQ80321_H_ -#define IQ80321_RAMBASE 0xa0000000 -#define IQ80321_UART1 0xfe800000 /* UART #1 */ -#define IQ80321_7SEG_1 0xfe840000 /* 7-Segment MSB */ -#define IQ80321_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */ -#define IQ80321_ROTARY_SW 0xfe8d0000 /* Rotary Switch */ -#define IQ80321_BATT_STAT 0xfe8f0000 /* Battery Status */ +#define IQ80321_RAMBASE 0xa0000000 + +#define IQ80321_FLASHBASE 0xf0000000 /* Flash */ +#define IQ80321_FLASHSIZE 0x00800000 +#define IQ80321_FLASHWIDTH 1 + +#define IQ80321_UART 0xfe800000 /* UART #1 */ +#define IQ80321_7SEG_1 0xfe840000 /* 7-Segment MSB */ +#define IQ80321_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */ +#define IQ80321_ROTARY_SW 0xfe8d0000 /* Rotary Switch */ +#define IQ80321_BATT_STAT 0xfe8f0000 /* Battery Status */ + +/* + * IQ80321 PCI I/O and Mem space regions + */ +#define IQ80321_PCI_IO_BASE 0x90000000 +#define IQ80321_PCI_IO_SIZE 0x00010000 +#define IQ80321_PCI_MEM_BASE 0x80000000 +#define IQ80321_PCI_MEM_SIZE 0x04000000 +#define IQ80321_PCI_IO_OFFSET 0x6e000000 + +#ifndef __ASSEMBLY__ +extern void iq80321_map_io(void); +#endif #endif // _IQ80321_H_ diff -Nru a/include/asm-arm/arch-iop3xx/iq80331.h b/include/asm-arm/arch-iop3xx/iq80331.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-iop3xx/iq80331.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,38 @@ +/* + * linux/include/asm/arch-iop3xx/iq80331.h + * + * Intel IQ80331 evaluation board registers + */ + +#ifndef _IQ80331_H_ +#define _IQ80331_H_ + +#define IQ80331_RAMBASE 0x00000000 + +#define IQ80331_FLASHBASE 0xc0000000 /* Flash */ +#define IQ80331_FLASHSIZE 0x00800000 +#define IQ80331_FLASHWIDTH 1 + +#define IQ80331_UART0_PHYS (IOP331_PHYS_MEM_BASE | 0x00001700) /* UART #1 physical */ +#define IQ80331_UART1_PHYS (IOP331_PHYS_MEM_BASE | 0x00001740) /* UART #2 physical */ +#define IQ80331_UART0_VIRT (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */ +#define IQ80331_UART1_VIRT (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */ +#define IQ80331_7SEG_1 0xce840000 /* 7-Segment MSB */ +#define IQ80331_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */ +#define IQ80331_ROTARY_SW 0xce8d0000 /* Rotary Switch */ +#define IQ80331_BATT_STAT 0xce8f0000 /* Battery Status */ + +/* + * IQ80331 PCI I/O and Mem space regions + */ +#define IQ80331_PCI_IO_BASE 0x90000000 +#define IQ80331_PCI_IO_SIZE 0x00010000 +#define IQ80331_PCI_MEM_BASE 0x80000000 +#define IQ80331_PCI_MEM_SIZE 0x08000000 +#define IQ80331_PCI_IO_OFFSET 0x6e000000 + +#ifndef __ASSEMBLY__ +extern void iq80331_map_io(void); +#endif + +#endif // _IQ80331_H_ diff -Nru a/include/asm-arm/arch-iop3xx/irqs.h b/include/asm-arm/arch-iop3xx/irqs.h --- a/include/asm-arm/arch-iop3xx/irqs.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-arm/arch-iop3xx/irqs.h 2004-09-06 16:37:52 -07:00 @@ -1,23 +1,21 @@ /* * linux/include/asm-arm/arch-iop3xx/irqs.h * - * Copyright: (C) 2001 MontaVista Software Inc. + * Copyright: (C) 2001-2003 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * */ -#include - /* - * Whic iop3xx implementation is this? + * Chipset-specific bits */ #ifdef CONFIG_ARCH_IOP321 - #include "iop321-irqs.h" - #endif +#ifdef CONFIG_ARCH_IOP331 +#include "iop331-irqs.h" +#endif diff -Nru a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h --- a/include/asm-arm/arch-iop3xx/memory.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-arm/arch-iop3xx/memory.h 2004-09-06 16:37:54 -07:00 @@ -6,15 +6,19 @@ #define __ASM_ARCH_MEMORY_H #include -#include +#include /* * Physical DRAM offset. */ +#ifndef CONFIG_ARCH_IOP331 #define PHYS_OFFSET (0xa0000000UL) +#else +#define PHYS_OFFSET (0x00000000UL) +#endif /* - * Virtual view <-> DMA view memory address translations + * Virtual view <-> PCI DMA view memory address translations * virt_to_bus: Used to translate the virtual address to an * address suitable to be passed to set_dma_addr * bus_to_virt: Used to convert an address for DMA operations @@ -24,6 +28,11 @@ #define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP321_IATVR2)) | ((*IOP321_IABAR2) & 0xfffffff0)) #define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP321_IALR2)) | ( *IOP321_IATVR2))) + +#elif defined(CONFIG_ARCH_IOP331) + +#define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP331_IATVR2)) | ((*IOP331_IABAR2) & 0xfffffff0)) +#define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP331_IALR2)) | ( *IOP331_IATVR2))) #endif diff -Nru a/include/asm-arm/arch-iop3xx/serial.h b/include/asm-arm/arch-iop3xx/serial.h --- a/include/asm-arm/arch-iop3xx/serial.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-arm/arch-iop3xx/serial.h 2004-09-06 16:37:54 -07:00 @@ -19,10 +19,57 @@ #define IRQ_UART1 IRQ_IQ80321_UART +#define RS_TABLE_SIZE 1 + #define STD_SERIAL_PORT_DEFNS \ /* UART CLK PORT IRQ FLAGS */ \ { 0, BASE_BAUD, 0xfe800000, IRQ_UART1, STD_COM_FLAGS }, /* ttyS0 */ #endif // CONFIG_ARCH_IQ80321 + +#ifdef CONFIG_ARCH_IQ31244 + +#define IRQ_UART1 IRQ_IQ31244_UART + +#define RS_TABLE_SIZE 1 + +#define STD_SERIAL_PORT_DEFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, BASE_BAUD, 0xfe800000, IRQ_UART1, STD_COM_FLAGS }, /* ttyS0 */ +#endif // CONFIG_ARCH_IQ31244 + +#ifdef CONFIG_ARCH_IQ80331 + +#undef BASE_BAUD + +#define BASE_BAUD ( 33334000 / 16 ) + +#define IRQ_UART0 IRQ_IQ80331_UART0 +#define IRQ_UART1 IRQ_IQ80331_UART1 + +#define RS_TABLE_SIZE 2 + +#define STD_SERIAL_PORT_DEFNS \ + { \ + /*type: PORT_XSCALE,*/ \ + /*xmit_fifo_size: 32,*/ \ + baud_base: BASE_BAUD, \ + irq: IRQ_UART0, \ + flags: STD_COM_FLAGS, \ + iomem_base: IQ80331_UART0_VIRT, \ + io_type: SERIAL_IO_MEM, \ + iomem_reg_shift: 2 \ + }, /* ttyS0 */ \ + { \ + /*type: PORT_XSCALE,*/ \ + /*xmit_fifo_size: 32,*/ \ + baud_base: BASE_BAUD, \ + irq: IRQ_UART1, \ + flags: STD_COM_FLAGS, \ + iomem_base: IQ80331_UART1_VIRT, \ + io_type: SERIAL_IO_MEM, \ + iomem_reg_shift: 2 \ + } /* ttyS1 */ +#endif // CONFIG_ARCH_IQ80331 #define EXTRA_SERIAL_PORT_DEFNS diff -Nru a/include/asm-arm/arch-iop3xx/system.h b/include/asm-arm/arch-iop3xx/system.h --- a/include/asm-arm/arch-iop3xx/system.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/arch-iop3xx/system.h 2004-09-06 16:37:55 -07:00 @@ -16,6 +16,14 @@ static inline void arch_reset(char mode) { +#ifdef CONFIG_ARCH_IOP321 + *IOP321_PCSR = 0x30; +#endif + +#ifdef CONFIG_ARCH_IOP331 + *IOP331_PCSR = 0x30; +#endif + if ( 1 && mode == 's') { /* Jump into ROM at address 0 */ cpu_reset(0); diff -Nru a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h --- a/include/asm-arm/arch-iop3xx/timex.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/arch-iop3xx/timex.h 2004-09-06 16:37:53 -07:00 @@ -6,9 +6,13 @@ #include -#if defined(CONFIG_ARCH_IQ80321) +#if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) -#define CLOCK_TICK_RATE 200000000 +#define CLOCK_TICK_RATE IOP321_TICK_RATE + +#elif defined(CONFIG_ARCH_IQ80331) + +#define CLOCK_TICK_RATE IOP331_TICK_RATE #else diff -Nru a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h --- a/include/asm-arm/arch-iop3xx/uncompress.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/arch-iop3xx/uncompress.h 2004-09-06 16:37:53 -07:00 @@ -2,17 +2,25 @@ * linux/include/asm-arm/arch-iop3xx/uncompress.h */ #include +#include +#include #include #include -#if defined(CONFIG_ARCH_IQ80321) -#define UART2_BASE ((volatile unsigned char *)IQ80321_UART1) +#ifdef CONFIG_ARCH_IOP321 +#define UTYPE unsigned char * +#else +#define UTYPE u32 * #endif +static volatile UTYPE uart_base; + +#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) + static __inline__ void putc(char c) { - while ((UART2_BASE[5] & 0x60) != 0x60); - UART2_BASE[0] = c; + while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE); + *uart_base = c; } /* @@ -28,8 +36,20 @@ } } +static __inline__ void __arch_decomp_setup(unsigned long arch_id) +{ + if(machine_is_iq80321()) + uart_base = (volatile UTYPE)IQ80321_UART; + else if(machine_is_iq31244()) + uart_base = (volatile UTYPE)IQ31244_UART; + else if(machine_is_iq80331()) + uart_base = (volatile UTYPE)IQ80331_UART0_PHYS; + else + uart_base = (volatile UTYPE)0xfe800000; +} + /* * nothing to do */ -#define arch_decomp_setup() +#define arch_decomp_setup() __arch_decomp_setup(arch_id) #define arch_decomp_wdog() diff -Nru a/include/asm-arm/arch-iop3xx/vmalloc.h b/include/asm-arm/arch-iop3xx/vmalloc.h --- a/include/asm-arm/arch-iop3xx/vmalloc.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/arch-iop3xx/vmalloc.h 2004-09-06 16:37:53 -07:00 @@ -12,4 +12,5 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (0xe8000000) diff -Nru a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h --- a/include/asm-arm/arch-rpc/io.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/arch-rpc/io.h 2004-09-06 16:37:53 -07:00 @@ -22,40 +22,40 @@ */ #define __arch_base_getb(b,o) \ ({ \ - unsigned int v, r = (b); \ + unsigned int __v, __r = (b); \ __asm__ __volatile__( \ "ldrb %0, [%1, %2]" \ - : "=r" (v) \ - : "r" (r), "Ir" (o)); \ - v; \ + : "=r" (__v) \ + : "r" (__r), "Ir" (o)); \ + __v; \ }) #define __arch_base_getl(b,o) \ ({ \ - unsigned int v, r = (b); \ + unsigned int __v, __r = (b); \ __asm__ __volatile__( \ "ldr %0, [%1, %2]" \ - : "=r" (v) \ - : "r" (r), "Ir" (o)); \ - v; \ + : "=r" (__v) \ + : "r" (__r), "Ir" (o)); \ + __v; \ }) #define __arch_base_putb(v,b,o) \ ({ \ - unsigned int r = (b); \ + unsigned int __r = (b); \ __asm__ __volatile__( \ "strb %0, [%1, %2]" \ : \ - : "r" (v), "r" (r), "Ir" (o)); \ + : "r" (v), "r" (__r), "Ir" (o));\ }) #define __arch_base_putl(v,b,o) \ ({ \ - unsigned int r = (b); \ + unsigned int __r = (b); \ __asm__ __volatile__( \ "str %0, [%1, %2]" \ : \ - : "r" (v), "r" (r), "Ir" (o)); \ + : "r" (v), "r" (__r), "Ir" (o));\ }) /* @@ -176,15 +176,15 @@ #define __outwc(value,port) \ ({ \ - unsigned long v = value; \ + unsigned long __v = value; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ "str %0, [%1, %2] @ outwc" \ - : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + : : "r" (__v|__v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ "str %0, [%1, %2] @ outwc" \ - : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ + : : "r" (__v|__v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ }) #define __inwc(port) \ @@ -203,15 +203,15 @@ #define __outlc(value,port) \ ({ \ - unsigned long v = value; \ + unsigned long __v = value; \ if (__PORT_PCIO((port))) \ __asm__ __volatile__( \ "str %0, [%1, %2] @ outlc" \ - : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + : : "r" (__v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ else \ __asm__ __volatile__( \ "str %0, [%1, %2] @ outlc" \ - : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ + : : "r" (__v), "r" (IO_BASE), "r" ((port) << 2)); \ }) #define __inlc(port) \ @@ -250,6 +250,6 @@ /* * 1:1 mapping for ioremapped regions. */ -#define __mem_pci(x) (x) +#define __mem_pci(x) ((unsigned long)(x)) #endif diff -Nru a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h --- a/include/asm-arm/arch-s3c2410/bast-cpld.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h 2004-09-06 16:37:55 -07:00 @@ -1,6 +1,6 @@ /* linux/include/asm-arm/arch-s3c2410/bast-cpld.h * - * (c) 2003 Simtec Electronics + * (c) 2003,2004 Simtec Electronics * Ben Dooks * * BAST - CPLD control constants @@ -11,15 +11,48 @@ * * Changelog: * 25-May-2003 BJD Created file, added CTRL1 registers + * 30-Aug-2004 BJD Updated definitions from 2.4.26 port + * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions */ #ifndef __ASM_ARCH_BASTCPLD_H #define __ASM_ARCH_BASTCPLD_H +/* CTRL1 - Audio LR routing */ + #define BAST_CPLD_CTRL1_LRCOFF (0x00) #define BAST_CPLD_CTRL1_LRCADC (0x01) #define BAST_CPLD_CTRL1_LRCDAC (0x02) #define BAST_CPLD_CTRL1_LRCARM (0x03) #define BAST_CPLD_CTRL1_LRMASK (0x03) + +/* CTRL2 - NAND WP control, IDE Reset assert/check */ + +#define BAST_CPLD_CTRL2_WNAND (0x04) +#define BAST_CPLD_CTLR2_IDERST (0x08) + +/* CTRL3 - rom write control, CPLD identity */ + +#define BAST_CPLD_CTRL3_IDMASK (0x0e) +#define BAST_CPLD_CTRL3_ROMWEN (0x01) + +/* CTRL4 - 8bit LCD interface control/status */ + +#define BAST_CPLD_CTRL4_LLAT (0x01) +#define BAST_CPLD_CTRL4_LCDRW (0x02) +#define BAST_CPLD_CTRL4_LCDCMD (0x04) +#define BAST_CPLD_CTRL4_LCDE2 (0x01) + +/* CTRL5 - DMA routing */ + +#define BAST_CPLD_DMA0_PRIIDE (0<<0) +#define BAST_CPLD_DMA0_SECIDE (1<<0) +#define BAST_CPLD_DMA0_ISA15 (2<<0) +#define BAST_CPLD_DMA0_ISA36 (3<<0) + +#define BAST_CPLD_DMA1_PRIIDE (0<<2) +#define BAST_CPLD_DMA1_SECIDE (1<<2) +#define BAST_CPLD_DMA1_ISA15 (2<<2) +#define BAST_CPLD_DMA1_ISA36 (3<<2) #endif /* __ASM_ARCH_BASTCPLD_H */ diff -Nru a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h --- a/include/asm-arm/arch-s3c2410/regs-clock.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-arm/arch-s3c2410/regs-clock.h 2004-09-06 16:37:50 -07:00 @@ -10,6 +10,7 @@ * S3C2410 clock register definitions * * Changelog: + * 18-Aug-2004 Ben Dooks Added 2440 definitions * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions * 19-06-2003 Ben Dooks Created file * 12-03-2004 Ben Dooks Updated include protection @@ -87,5 +88,30 @@ return (baseclk * (mdiv + 8)) / ((pdiv + 2) << sdiv); } + +#ifdef CONFIG_CPU_S3C2440 + +/* extra registers */ +#define S3C2440_CAMDIVN S3C2410_CLKREG(0x14) + +#define S3C2440_CLKCON_CAMERA (1<<19) +#define S3C2440_CLKCON_AC97 (1<<20) + +#define S3C2440_CLKDIVN_PDIVN (1<<0) +#define S3C2440_CLKDIVN_HDIVN_MASK (3<<1) +#define S3C2440_CLKDIVN_HDIVN_1 (0<<1) +#define S3C2440_CLKDIVN_HDIVN_2 (1<<1) +#define S3C2440_CLKDIVN_HDIVN_4_8 (2<<1) +#define S3C2440_CLKDIVN_HDIVN_3_6 (3<<1) +#define S3C2440_CLKDIVN_UCLK (1<<3) + +#define S3C2440_CAMDIVN_CAMCLK_MASK (0xf<<0) +#define S3C2440_CAMDIVN_CAMCLK_SEL (1<<4) +#define S3C2440_CAMDIVN_HCLK3_HALF (1<<8) +#define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) +#define S3C2440_CAMDIVN_DVSEN (1<<12) + +#endif /* CONFIG_CPU_S3C2440 */ + #endif /* __ASM_ARM_REGS_CLOCK */ diff -Nru a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,183 @@ +/* linux/include/asm/hardware/s3c2410/regs-dsc.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2440 Signal Drive Strength Control + * + * Changelog: + * 11-Aug-2004 BJD Created file + * 25-Aug-2004 BJD Added the _SELECT_* defs for using with functions +*/ + + +#ifndef __ASM_ARCH_REGS_DSC_H +#define __ASM_ARCH_REGS_DSC_H "2440-dsc" + +#ifdef CONFIG_CPU_S3C2440 + +#define S3C2440_DSC0 S3C2410_GPIOREG(0xc0) +#define S3C2440_DSC1 S3C2410_GPIOREG(0xc4) + +#define S3C2440_SELECT_DSC0 (0) +#define S3C2440_SELECT_DSC1 (1<<31) + +#define S3C2440_DSC_GETSHIFT(x) ((x) & 31) + +#define S3C2440_DSC0_ENABLE (1<<31) + +#define S3C2440_DSC0_ADDR (S3C2440_SELECT_DSC0 | 8) +#define S3C2440_DSC0_ADDR_12mA (0<<8) +#define S3C2440_DSC0_ADDR_10mA (1<<8) +#define S3C2440_DSC0_ADDR_8mA (2<<8) +#define S3C2440_DSC0_ADDR_6mA (3<<8) +#define S3C2440_DSC0_ADDR_MASK (3<<8) + +/* D24..D31 */ +#define S3C2440_DSC0_DATA3 (S3C2440_SELECT_DSC0 | 6) +#define S3C2440_DSC0_DATA3_12mA (0<<6) +#define S3C2440_DSC0_DATA3_10mA (1<<6) +#define S3C2440_DSC0_DATA3_8mA (2<<6) +#define S3C2440_DSC0_DATA3_6mA (3<<6) +#define S3C2440_DSC0_DATA3_MASK (3<<6) + +/* D16..D23 */ +#define S3C2440_DSC0_DATA2 (S3C2440_SELECT_DSC0 | 4) +#define S3C2440_DSC0_DATA2_12mA (0<<4) +#define S3C2440_DSC0_DATA2_10mA (1<<4) +#define S3C2440_DSC0_DATA2_8mA (2<<4) +#define S3C2440_DSC0_DATA2_6mA (3<<4) +#define S3C2440_DSC0_DATA2_MASK (3<<4) + +/* D8..D15 */ +#define S3C2440_DSC0_DATA1 (S3C2440_SELECT_DSC0 | 2) +#define S3C2440_DSC0_DATA1_12mA (0<<2) +#define S3C2440_DSC0_DATA1_10mA (1<<2) +#define S3C2440_DSC0_DATA1_8mA (2<<2) +#define S3C2440_DSC0_DATA1_6mA (3<<2) +#define S3C2440_DSC0_DATA1_MASK (3<<2) + +/* D0..D7 */ +#define S3C2440_DSC0_DATA0 (S3C2440_SELECT_DSC0 | 0) +#define S3C2440_DSC0_DATA0_12mA (0<<0) +#define S3C2440_DSC0_DATA0_10mA (1<<0) +#define S3C2440_DSC0_DATA0_8mA (2<<0) +#define S3C2440_DSC0_DATA0_6mA (3<<0) +#define S3C2440_DSC0_DATA0_MASK (3<<0) + +#define S3C2440_DSC1_SCK0 (S3C2440_SELECT_DSC1 | 28) +#define S3C2440_DSC1_SCK0_12mA (0<<28) +#define S3C2440_DSC1_SCK0_10mA (1<<28) +#define S3C2440_DSC1_SCK0_8mA (2<<28) +#define S3C2440_DSC1_SCK0_6mA (3<<28) +#define S3C2440_DSC1_SCK0_MASK (3<<28) + +#define S3C2440_DSC1_SCK1 (S3C2440_SELECT_DSC1 | 26) +#define S3C2440_DSC1_SCK1_12mA (0<<26) +#define S3C2440_DSC1_SCK1_10mA (1<<26) +#define S3C2440_DSC1_SCK1_8mA (2<<26) +#define S3C2440_DSC1_SCK1_6mA (3<<26) +#define S3C2440_DSC1_SCK1_MASK (3<<26) + +#define S3C2440_DSC1_SCKE (S3C2440_SELECT_DSC1 | 24) +#define S3C2440_DSC1_SCKE_10mA (0<<24) +#define S3C2440_DSC1_SCKE_8mA (1<<24) +#define S3C2440_DSC1_SCKE_6mA (2<<24) +#define S3C2440_DSC1_SCKE_4mA (3<<24) +#define S3C2440_DSC1_SCKE_MASK (3<<24) + +/* SDRAM nRAS/nCAS */ +#define S3C2440_DSC1_SDR (S3C2440_SELECT_DSC1 | 22) +#define S3C2440_DSC1_SDR_10mA (0<<22) +#define S3C2440_DSC1_SDR_8mA (1<<22) +#define S3C2440_DSC1_SDR_6mA (2<<22) +#define S3C2440_DSC1_SDR_4mA (3<<22) +#define S3C2440_DSC1_SDR_MASK (3<<22) + +/* NAND Flash Controller */ +#define S3C2440_DSC1_NFC (S3C2440_SELECT_DSC1 | 20) +#define S3C2440_DSC1_NFC_10mA (0<<20) +#define S3C2440_DSC1_NFC_8mA (1<<20) +#define S3C2440_DSC1_NFC_6mA (2<<20) +#define S3C2440_DSC1_NFC_4mA (3<<20) +#define S3C2440_DSC1_NFC_MASK (3<<20) + +/* nBE[0..3] */ +#define S3C2440_DSC1_nBE (S3C2440_SELECT_DSC1 | 18) +#define S3C2440_DSC1_nBE_10mA (0<<18) +#define S3C2440_DSC1_nBE_8mA (1<<18) +#define S3C2440_DSC1_nBE_6mA (2<<18) +#define S3C2440_DSC1_nBE_4mA (3<<18) +#define S3C2440_DSC1_nBE_MASK (3<<18) + +#define S3C2440_DSC1_WOE (S3C2440_SELECT_DSC1 | 16) +#define S3C2440_DSC1_WOE_10mA (0<<16) +#define S3C2440_DSC1_WOE_8mA (1<<16) +#define S3C2440_DSC1_WOE_6mA (2<<16) +#define S3C2440_DSC1_WOE_4mA (3<<16) +#define S3C2440_DSC1_WOE_MASK (3<<16) + +#define S3C2440_DSC1_CS7 (S3C2440_SELECT_DSC1 | 14) +#define S3C2440_DSC1_CS7_10mA (0<<14) +#define S3C2440_DSC1_CS7_8mA (1<<14) +#define S3C2440_DSC1_CS7_6mA (2<<14) +#define S3C2440_DSC1_CS7_4mA (3<<14) +#define S3C2440_DSC1_CS7_MASK (3<<14) + +#define S3C2440_DSC1_CS6 (S3C2440_SELECT_DSC1 | 12) +#define S3C2440_DSC1_CS6_10mA (0<<12) +#define S3C2440_DSC1_CS6_8mA (1<<12) +#define S3C2440_DSC1_CS6_6mA (2<<12) +#define S3C2440_DSC1_CS6_4mA (3<<12) +#define S3C2440_DSC1_CS6_MASK (3<<12) + +#define S3C2440_DSC1_CS5 (S3C2440_SELECT_DSC1 | 10) +#define S3C2440_DSC1_CS5_10mA (0<<10) +#define S3C2440_DSC1_CS5_8mA (1<<10) +#define S3C2440_DSC1_CS5_6mA (2<<10) +#define S3C2440_DSC1_CS5_4mA (3<<10) +#define S3C2440_DSC1_CS5_MASK (3<<10) + +#define S3C2440_DSC1_CS4 (S3C2440_SELECT_DSC1 | 8) +#define S3C2440_DSC1_CS4_10mA (0<<8) +#define S3C2440_DSC1_CS4_8mA (1<<8) +#define S3C2440_DSC1_CS4_6mA (2<<8) +#define S3C2440_DSC1_CS4_4mA (3<<8) +#define S3C2440_DSC1_CS4_MASK (3<<8) + +#define S3C2440_DSC1_CS3 (S3C2440_SELECT_DSC1 | 6) +#define S3C2440_DSC1_CS3_10mA (0<<6) +#define S3C2440_DSC1_CS3_8mA (1<<6) +#define S3C2440_DSC1_CS3_6mA (2<<6) +#define S3C2440_DSC1_CS3_4mA (3<<6) +#define S3C2440_DSC1_CS3_MASK (3<<6) + +#define S3C2440_DSC1_CS2 (S3C2440_SELECT_DSC1 | 4) +#define S3C2440_DSC1_CS2_10mA (0<<4) +#define S3C2440_DSC1_CS2_8mA (1<<4) +#define S3C2440_DSC1_CS2_6mA (2<<4) +#define S3C2440_DSC1_CS2_4mA (3<<4) +#define S3C2440_DSC1_CS2_MASK (3<<4) + +#define S3C2440_DSC1_CS1 (S3C2440_SELECT_DSC1 | 2) +#define S3C2440_DSC1_CS1_10mA (0<<2) +#define S3C2440_DSC1_CS1_8mA (1<<2) +#define S3C2440_DSC1_CS1_6mA (2<<2) +#define S3C2440_DSC1_CS1_4mA (3<<2) +#define S3C2440_DSC1_CS1_MASK (3<<2) + +#define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0 +#define S3C2440_DSC1_CS0_10mA (0<<0) +#define S3C2440_DSC1_CS0_8mA (1<<0) +#define S3C2440_DSC1_CS0_6mA (2<<0) +#define S3C2440_DSC1_CS0_4mA (3<<0) +#define S3C2440_DSC1_CS0_MASK (3<<0) + +#endif /* CONFIG_CPU_S3C2440 */ + +#endif /* __ASM_ARCH_REGS_DSC_H */ + diff -Nru a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,100 @@ +/* linux/include/asm/hardware/s3c2410/regs-gpioj.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2440 GPIO J register definitions + * + * Changelog: + * 11-Aug-2004 BJD Created file +*/ + + +#ifndef __ASM_ARCH_REGS_GPIOJ_H +#define __ASM_ARCH_REGS_GPIOJ_H "gpioj" + +/* Port J consists of 13 GPIO/Camera pins + * + * GPJCON has 2 bits for each of the input pins on port F + * 00 = 0 input, 1 output, 2 Camera + * + * pull up works like all other ports. +*/ + +#define S3C2440_GPIO_BANKJ (416) + +#define S3C2440_GPJCON S3C2410_GPIOREG(0xd0) +#define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) +#define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) + +#define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) +#define S3C2440_GPJ0_INP (0x00 << 0) +#define S3C2440_GPJ0_OUTP (0x01 << 0) +#define S3C2440_GPJ0_CAMDATA0 (0x02 << 0) + +#define S3C2440_GPJ1 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 1) +#define S3C2440_GPJ1_INP (0x00 << 2) +#define S3C2440_GPJ1_OUTP (0x01 << 2) +#define S3C2440_GPJ1_CAMDATA1 (0x02 << 2) + +#define S3C2440_GPJ2 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 2) +#define S3C2440_GPJ2_INP (0x00 << 4) +#define S3C2440_GPJ2_OUTP (0x01 << 4) +#define S3C2440_GPJ2_CAMDATA2 (0x02 << 4) + +#define S3C2440_GPJ3 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 3) +#define S3C2440_GPJ3_INP (0x00 << 6) +#define S3C2440_GPJ3_OUTP (0x01 << 6) +#define S3C2440_GPJ3_CAMDATA3 (0x02 << 6) + +#define S3C2440_GPJ4 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 4) +#define S3C2440_GPJ4_INP (0x00 << 8) +#define S3C2440_GPJ4_OUTP (0x01 << 8) +#define S3C2440_GPJ4_CAMDATA4 (0x02 << 8) + +#define S3C2440_GPJ5 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 5) +#define S3C2440_GPJ5_INP (0x00 << 10) +#define S3C2440_GPJ5_OUTP (0x01 << 10) +#define S3C2440_GPJ5_CAMDATA5 (0x02 << 10) + +#define S3C2440_GPJ6 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 6) +#define S3C2440_GPJ6_INP (0x00 << 12) +#define S3C2440_GPJ6_OUTP (0x01 << 12) +#define S3C2440_GPJ6_CAMDATA6 (0x02 << 12) + +#define S3C2440_GPJ7 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 7) +#define S3C2440_GPJ7_INP (0x00 << 14) +#define S3C2440_GPJ7_OUTP (0x01 << 14) +#define S3C2440_GPJ7_CAMDATA7 (0x02 << 14) + +#define S3C2440_GPJ8 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 8) +#define S3C2440_GPJ8_INP (0x00 << 16) +#define S3C2440_GPJ8_OUTP (0x01 << 16) +#define S3C2440_GPJ8_CAMPCLK (0x02 << 16) + +#define S3C2440_GPJ9 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 9) +#define S3C2440_GPJ9_INP (0x00 << 18) +#define S3C2440_GPJ9_OUTP (0x01 << 18) +#define S3C2440_GPJ9_CAMVSYNC (0x02 << 18) + +#define S3C2440_GPJ10 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 10) +#define S3C2440_GPJ10_INP (0x00 << 20) +#define S3C2440_GPJ10_OUTP (0x01 << 20) +#define S3C2440_GPJ10_CAMHREF (0x02 << 20) + +#define S3C2440_GPJ11 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 11) +#define S3C2440_GPJ11_INP (0x00 << 22) +#define S3C2440_GPJ11_OUTP (0x01 << 22) +#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22) + +#define S3C2440_GPJ12 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 12) +#define S3C2440_GPJ12_INP (0x00 << 24) +#define S3C2440_GPJ12_OUTP (0x01 << 24) +#define S3C2440_GPJ12_CAMCLKOUT (0x02 << 24) + +#endif /* __ASM_ARCH_REGS_GPIOJ_H */ + diff -Nru a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-nand.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,43 @@ +/* linux/include/asm-arm/arch-s3c2410/regs-nand.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2410 clock register definitions + * + * Changelog: + * 18-Aug-2004 BJD Copied file from 2.4 and updated +*/ + +#ifndef __ASM_ARM_REGS_NAND +#define __ASM_ARM_REGS_NAND "$Id: nand.h,v 1.3 2003/12/09 11:36:29 ben Exp $" + + +#define S3C2410_NFREG(x) (x) + +#define S3C2410_NFCONF S3C2410_NFREG(0x00) +#define S3C2410_NFCMD S3C2410_NFREG(0x04) +#define S3C2410_NFADDR S3C2410_NFREG(0x08) +#define S3C2410_NFDATA S3C2410_NFREG(0x0C) +#define S3C2410_NFSTAT S3C2410_NFREG(0x10) +#define S3C2410_NFECC S3C2410_NFREG(0x14) + +#define S3C2410_NFCONF_EN (1<<15) +#define S3C2410_NFCONF_512BYTE (1<<14) +#define S3C2410_NFCONF_4STEP (1<<13) +#define S3C2410_NFCONF_INITECC (1<<12) +#define S3C2410_NFCONF_nFCE (1<<11) +#define S3C2410_NFCONF_TACLS(x) ((x)<<8) +#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) +#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) + +#define S3C2410_NFSTAT_BUSY (1<<0) + +/* think ECC can only be 8bit read? */ + +#endif /* __ASM_ARM_REGS_NAND */ + diff -Nru a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,112 @@ +/* linux/include/asm/arch-s3c2410/regs-sdi.h + * + * Copyright (c) 2004 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2410 MMC/SDIO register definitions + * + * Changelog: + * 18-Aug-2004 Ben Dooks Created initial file +*/ + +#ifndef __ASM_ARM_REGS_SDI +#define __ASM_ARM_REGS_SDI "regs-sdi.h" + +#define S3C2410_SDICON (0x00) +#define S3C2410_SDIPRE (0x04) +#define S3C2410_SDICMDARG (0x08) +#define S3C2410_SDICMDCON (0x0C) +#define S3C2410_SDICMDSTAT (0x10) +#define S3C2410_SDIRSP0 (0x14) +#define S3C2410_SDIRSP1 (0x18) +#define S3C2410_SDIRSP2 (0x1C) +#define S3C2410_SDIRSP3 (0x20) +#define S3C2410_SDITIMER (0x24) +#define S3C2410_SDIBSIZE (0x28) +#define S3C2410_SDIDCON (0x2C) +#define S3C2410_SDIDCNT (0x30) +#define S3C2410_SDIDSTA (0x34) +#define S3C2410_SDIFSTA (0x38) +#define S3C2410_SDIDATA (0x3C) +#define S3C2410_SDIIMSK (0x40) + +#define S3C2410_SDICON_BYTEORDER (1<<4) +#define S3C2410_SDICON_SDIOIRQ (1<<3) +#define S3C2410_SDICON_RWAITEN (1<<2) +#define S3C2410_SDICON_FIFORESET (1<<1) +#define S3C2410_SDICON_CLOCKTYPE (1<<0) + +#define S3C2410_SDICMDCON_ABORT (1<<12) +#define S3C2410_SDICMDCON_WITHDATA (1<<11) +#define S3C2410_SDICMDCON_LONGRSP (1<<10) +#define S3C2410_SDICMDCON_WAITRSP (1<<9) +#define S3C2410_SDICMDCON_CMDSTART (1<<8) +#define S3C2410_SDICMDCON_INDEX (0xff) + +#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) +#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) +#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) +#define S3C2410_SDICMDSTAT_RSPFIN (1<<9) +#define S3C2410_SDICMDSTAT_XFERING (1<<8) +#define S3C2410_SDICMDSTAT_INDEX (0xff) + +#define S3C2410_SDIDCON_IRQPERIOD (1<<21) +#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) +#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) +#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) +#define S3C2410_SDIDCON_BLOCKMODE (1<<17) +#define S3C2410_SDIDCON_WIDEBUS (1<<16) +#define S3C2410_SDIDCON_DMAEN (1<<15) +#define S3C2410_SDIDCON_STOP (1<<14) + +#define S3C2410_SDIDCON_XFER_MASK (3<<12) +#define S3C2410_SDIDCON_XFER_READY (0<<12) +#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) +#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) +#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) + +#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) + +#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) +#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) +#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) +#define S3C2410_SDIDSTA_CRCFAIL (1<<7) +#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) +#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) +#define S3C2410_SDIDSTA_XFERFINISH (1<<4) +#define S3C2410_SDIDSTA_BUSYFINISH (1<<3) +#define S3C2410_SDIDSTA_TXDATAON (1<<1) +#define S3C2410_SDIDSTA_RXDATAON (1<<0) + +#define S3C2410_SDIFSTA_TXFULL (1<<13) +#define S3C2410_SDIFSTA_RXFULL (1<<12) +#define S3C2410_SDIFSTA_TXHALF (1<<11) +#define S3C2410_SDIFSTA_TXEMPTY (1<<10) +#define S3C2410_SDIFSTA_RXLAST (1<<9) +#define S3C2410_SDIFSTA_RXFULL (1<<8) +#define S3C2410_SDIFSTA_RXHALF (1<<7) +#define S3C2410_SDIFSTA_COUNTMASK (0x7f) + +#define S3C2410_SDIIMSK_RESPONSECRC (1<<17) +#define S3C2410_SDIIMSK_CMDSENT (1<<16) +#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) +#define S3C2410_SDIIMSK_RESPONSEND (1<<14) +#define S3C2410_SDIIMSK_READWAIT (1<<13) +#define S3C2410_SDIIMSK_SDIOIRQ (1<<12) +#define S3C2410_SDIIMSK_FIFOFAIL (1<<11) +#define S3C2410_SDIIMSK_CRCSTATUS (1<<10) +#define S3C2410_SDIIMSK_DATACRC (1<<9) +#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) +#define S3C2410_SDIIMSK_DATAFINISH (1<<7) +#define S3C2410_SDIIMSK_BUSYFINISH (1<<6) +#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) +#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) +#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) +#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) +#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) + +#endif /* __ASM_ARM_REGS_SDI */ diff -Nru a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h --- a/include/asm-arm/arch-s3c2410/regs-timer.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/arch-s3c2410/regs-timer.h 2004-09-06 16:37:55 -07:00 @@ -29,6 +29,8 @@ #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) #define S3C2410_TCFG_PRESCALER1_SHIFT (8) +#define S3C2410_TCFG_DEADZONE_MASK (255<<16) +#define S3C2410_TCFG_DEADZONE_SHIFT (16) #define S3C2410_TCFG1_MUX4_DIV2 (0<<16) #define S3C2410_TCFG1_MUX4_DIV4 (1<<16) diff -Nru a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h --- a/include/asm-arm/checksum.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-arm/checksum.h 2004-09-06 16:37:54 -07:00 @@ -37,7 +37,7 @@ csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum); unsigned int -csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr); +csum_partial_copy_from_user(const char __user *src, char *dst, int len, int sum, int *err_ptr); /* * This is the old (and unsafe) way of doing checksums, a warning message will diff -Nru a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h --- a/include/asm-arm/hardirq.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/hardirq.h 2004-09-06 16:37:53 -07:00 @@ -22,12 +22,20 @@ * * - bits 0-7 are the preemption count (max depth: 256) * - bits 8-15 are the softirq count (max # of softirqs: 256) - * - bits 16-23 are the hardirq count (max # of hardirqs: 256) + * - bits 16-24 are the hardirq count (max # of hardirqs: 512) * - bit 26 is the PREEMPT_ACTIVE flag + * + * We optimize HARDIRQ_BITS for immediate constant, and only + * increase it if really needed. */ #define PREEMPT_BITS 8 #define SOFTIRQ_BITS 8 + +#if NR_IRQS > 256 +#define HARDIRQ_BITS 9 +#else #define HARDIRQ_BITS 8 +#endif #define PREEMPT_SHIFT 0 #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) diff -Nru a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h --- a/include/asm-arm/mach/pci.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-arm/mach/pci.h 2004-09-06 16:37:52 -07:00 @@ -56,6 +56,10 @@ extern struct pci_bus *iop321_scan_bus(int nr, struct pci_sys_data *); extern void iop321_init(void); +extern int iop331_setup(int nr, struct pci_sys_data *); +extern struct pci_bus *iop331_scan_bus(int nr, struct pci_sys_data *); +extern void iop331_init(void); + extern int dc21285_setup(int nr, struct pci_sys_data *); extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); extern void dc21285_preinit(void); diff -Nru a/include/asm-arm/memory.h b/include/asm-arm/memory.h --- a/include/asm-arm/memory.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm/memory.h 2004-09-06 16:37:55 -07:00 @@ -13,6 +13,7 @@ #define __ASM_ARM_MEMORY_H #include +#include #include #ifndef TASK_SIZE @@ -186,8 +187,8 @@ */ #ifndef __arch_page_to_dma #define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page))) -#define dma_to_virt(dev, addr) (__bus_to_virt(addr)) -#define virt_to_dma(dev, addr) (__virt_to_bus((unsigned long)(addr))) +#define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr)) +#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr))) #else #define page_to_dma(dev, page) (__arch_page_to_dma(dev, page)) #define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr)) diff -Nru a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h --- a/include/asm-arm/ptrace.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/ptrace.h 2004-09-06 16:37:53 -07:00 @@ -131,6 +131,12 @@ #define instruction_pointer(regs) \ (pc_pointer((regs)->ARM_pc)) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif + #ifdef __KERNEL__ extern void show_regs(struct pt_regs *); diff -Nru a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h --- a/include/asm-arm/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-arm/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -16,21 +16,12 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) .__magic = (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INIT(name,cnt) { \ +#define __SEMAPHORE_INIT(name, cnt) \ +{ \ .count = ATOMIC_INIT(cnt), \ .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ - __SEM_DEBUG_INIT(name) \ } #define __MUTEX_INITIALIZER(name) __SEMAPHORE_INIT(name,1) @@ -46,9 +37,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX(struct semaphore *sem) @@ -85,9 +73,6 @@ */ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __down_op(sem, __down_failed); } @@ -98,19 +83,12 @@ */ static inline int down_interruptible (struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); return __down_op_ret(sem, __down_interruptible_failed); } static inline int down_trylock(struct semaphore *sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - return __down_op_ret(sem, __down_trylock_failed); } @@ -122,10 +100,6 @@ */ static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __up_op(sem, __up_wakeup); } diff -Nru a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h --- a/include/asm-arm/uaccess.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-arm/uaccess.h 2004-09-06 16:37:53 -07:00 @@ -394,6 +394,9 @@ return __arch_copy_to_user(to, from, n); } +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + static inline unsigned long clear_user (void __user *to, unsigned long n) { if (access_ok(VERIFY_WRITE, to, n)) diff -Nru a/include/asm-arm26/ptrace.h b/include/asm-arm26/ptrace.h --- a/include/asm-arm26/ptrace.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-arm26/ptrace.h 2004-09-06 16:37:51 -07:00 @@ -30,6 +30,7 @@ #define pc_pointer(v) ((v) & ~PCMASK) /* convert v to pc type address */ #define instruction_pointer(regs) (pc_pointer((regs)->ARM_pc)) /* get pc */ +#define profile_pc(regs) instruction_pointer(regs) /* this struct defines the way the registers are stored on the stack during a system call. */ diff -Nru a/include/asm-arm26/semaphore.h b/include/asm-arm26/semaphore.h --- a/include/asm-arm26/semaphore.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-arm26/semaphore.h 2004-09-06 16:37:55 -07:00 @@ -16,22 +16,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INIT(name,count) \ - { ATOMIC_INIT(count), 0, \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INIT(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INIT(name,1) @@ -47,9 +39,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#if WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX(struct semaphore *sem) @@ -81,9 +70,6 @@ */ static inline void down(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __down_op(sem, __down_failed); } @@ -94,19 +80,12 @@ */ static inline int down_interruptible (struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); return __down_op_ret(sem, __down_interruptible_failed); } static inline int down_trylock(struct semaphore *sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - return __down_op_ret(sem, __down_trylock_failed); } @@ -118,10 +97,6 @@ */ static inline void up(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __up_op(sem, __up_wakeup); } diff -Nru a/include/asm-arm26/uaccess.h b/include/asm-arm26/uaccess.h --- a/include/asm-arm26/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-arm26/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -217,6 +217,9 @@ return n; } +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + static __inline__ unsigned long clear_user (void *to, unsigned long n) { if (access_ok(VERIFY_WRITE, to, n)) diff -Nru a/include/asm-cris/arch-v10/ptrace.h b/include/asm-cris/arch-v10/ptrace.h --- a/include/asm-cris/arch-v10/ptrace.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-cris/arch-v10/ptrace.h 2004-09-06 16:37:51 -07:00 @@ -109,6 +109,7 @@ /* bit 8 is user-mode flag */ #define user_mode(regs) (((regs)->dccr & 0x100) != 0) #define instruction_pointer(regs) ((regs)->irp) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif diff -Nru a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h --- a/include/asm-cris/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-cris/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -24,21 +24,14 @@ atomic_t count; atomic_t waking; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ - { ATOMIC_INIT(count), ATOMIC_INIT(0), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .waking = ATOMIC_INIT(0), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -76,9 +69,6 @@ unsigned long flags; int failed; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); /* atomically decrement the semaphores count, and if its negative, we wait */ @@ -102,9 +92,6 @@ unsigned long flags; int failed; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); /* atomically decrement the semaphores count, and if its negative, we wait */ @@ -122,10 +109,6 @@ unsigned long flags; int failed; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - local_save_flags(flags); local_irq_disable(); failed = --(sem->count.counter) < 0; @@ -145,10 +128,6 @@ { unsigned long flags; int wakeup; - -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif /* atomically increment the semaphores count, and if it was negative, we wake people */ local_save_flags(flags); diff -Nru a/include/asm-cris/uaccess.h b/include/asm-cris/uaccess.h --- a/include/asm-cris/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-cris/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -434,6 +434,8 @@ #define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n)) #define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n)) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #define __clear_user(to,n) __generic_clear_user_nocheck((to),(n)) #define strlen_user(str) strnlen_user((str), 0x7ffffffe) diff -Nru a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h --- a/include/asm-generic/siginfo.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-generic/siginfo.h 2004-09-06 16:37:51 -07:00 @@ -3,6 +3,7 @@ #include #include +#include typedef union sigval { int sival_int; @@ -74,6 +75,7 @@ int _status; /* exit code */ clock_t _utime; clock_t _stime; + struct rusage _rusage; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ @@ -105,6 +107,7 @@ #define si_status _sifields._sigchld._status #define si_utime _sifields._sigchld._utime #define si_stime _sifields._sigchld._stime +#define si_rusage _sifields._sigchld._rusage #define si_value _sifields._rt._sigval #define si_int _sifields._rt._sigval.sival_int #define si_ptr _sifields._rt._sigval.sival_ptr diff -Nru a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-generic/uaccess.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,26 @@ +#ifndef _ASM_GENERIC_UACCESS_H_ +#define _ASM_GENERIC_UACCESS_H_ + +/* + * This macro should be used instead of __get_user() when accessing + * values at locations that are not known to be aligned. + */ +#define __get_user_unaligned(x, ptr) \ +({ \ + __typeof__ (*(ptr)) __x; \ + __copy_from_user(&__x, (ptr), sizeof(*(ptr))) ? -EFAULT : 0; \ + (x) = __x; \ +}) + + +/* + * This macro should be used instead of __put_user() when accessing + * values at locations that are not known to be aligned. + */ +#define __put_user_unaligned(x, ptr) \ +({ \ + __typeof__ (*(ptr)) __x = (x); \ + __copy_to_user((ptr), &__x, sizeof(*(ptr))) ? -EFAULT : 0; \ +}) + +#endif /* _ASM_GENERIC_UACCESS_H */ diff -Nru a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h --- a/include/asm-generic/vmlinux.lds.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-generic/vmlinux.lds.h 2004-09-06 16:37:50 -07:00 @@ -57,6 +57,13 @@ /* Kernel symbol table: strings */ \ __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ *(__ksymtab_strings) \ + } \ + \ + /* Built-in module parameters. */ \ + __param : AT(ADDR(__param) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__start___param) = .; \ + *(__param) \ + VMLINUX_SYMBOL(__stop___param) = .; \ } #define SECURITY_INIT \ @@ -70,3 +77,8 @@ VMLINUX_SYMBOL(__sched_text_start) = .; \ *(.sched.text) \ VMLINUX_SYMBOL(__sched_text_end) = .; + +#define LOCK_TEXT \ + VMLINUX_SYMBOL(__lock_text_start) = .; \ + *(.spinlock.text) \ + VMLINUX_SYMBOL(__lock_text_end) = .; diff -Nru a/include/asm-h8300/ptrace.h b/include/asm-h8300/ptrace.h --- a/include/asm-h8300/ptrace.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-h8300/ptrace.h 2004-09-06 16:37:55 -07:00 @@ -57,6 +57,7 @@ #define user_mode(regs) (!((regs)->ccr & PS_S)) #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-h8300/semaphore.h b/include/asm-h8300/semaphore.h --- a/include/asm-h8300/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-h8300/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -26,21 +26,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -87,9 +80,6 @@ { register atomic_t *count asm("er0"); -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); count = &(sem->count); @@ -116,9 +106,6 @@ { register atomic_t *count asm("er0"); -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); count = &(sem->count); @@ -147,10 +134,6 @@ { register atomic_t *count asm("er0"); -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - count = &(sem->count); __asm__ __volatile__( "stc ccr,r3l\n\t" @@ -186,10 +169,6 @@ static inline void up(struct semaphore * sem) { register atomic_t *count asm("er0"); - -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif count = &(sem->count); __asm__ __volatile__( diff -Nru a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h --- a/include/asm-h8300/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-h8300/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -123,6 +123,8 @@ #define __copy_from_user(to, from, n) copy_from_user(to, from, n) #define __copy_to_user(to, from, n) copy_to_user(to, from, n) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) diff -Nru a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h --- a/include/asm-i386/bitops.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-i386/bitops.h 2004-09-06 16:37:53 -07:00 @@ -31,6 +31,11 @@ * * This function is atomic and may not be reordered. See __set_bit() * if you do not require the atomic guarantees. + * + * Note: there are no guarantees that this function will not be reordered + * on non x86 architectures, so if you are writting portable code, + * make sure not to rely on its reordering guarantees. + * * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ @@ -109,7 +114,8 @@ * @nr: Bit to change * @addr: Address to start counting from * - * change_bit() is atomic and may not be reordered. + * change_bit() is atomic and may not be reordered. It may be + * reordered on other architectures than x86. * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ @@ -127,6 +133,7 @@ * @addr: Address to count from * * This operation is atomic and cannot be reordered. + * It may be reordered on other architectures than x86. * It also implies a memory barrier. */ static inline int test_and_set_bit(int nr, volatile unsigned long * addr) @@ -165,7 +172,8 @@ * @nr: Bit to clear * @addr: Address to count from * - * This operation is atomic and cannot be reordered. + * This operation is atomic and cannot be reordered. + * It can be reorderdered on other architectures other than x86. * It also implies a memory barrier. */ static inline int test_and_clear_bit(int nr, volatile unsigned long * addr) diff -Nru a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h --- a/include/asm-i386/checksum.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-i386/checksum.h 2004-09-06 16:37:54 -07:00 @@ -43,10 +43,12 @@ } static __inline__ -unsigned int csum_partial_copy_from_user ( const char __user *src, char *dst, +unsigned int csum_partial_copy_from_user(const char __user *src, char *dst, int len, int sum, int *err_ptr) { - return csum_partial_copy_generic ( (__force char *)src, dst, len, sum, err_ptr, NULL); + might_sleep(); + return csum_partial_copy_generic((__force char *)src, dst, + len, sum, err_ptr, NULL); } /* @@ -177,6 +179,7 @@ int len, int sum, int *err_ptr) { + might_sleep(); if (access_ok(VERIFY_WRITE, dst, len)) return csum_partial_copy_generic(src, (__force char *)dst, len, sum, NULL, err_ptr); diff -Nru a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h --- a/include/asm-i386/cpufeature.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-i386/cpufeature.h 2004-09-06 16:37:54 -07:00 @@ -71,9 +71,13 @@ #define X86_FEATURE_P4 (3*32+ 7) /* P4 */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ -#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ +#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ #define X86_FEATURE_MWAIT (4*32+ 3) /* Monitor/Mwait support */ - +#define X86_FEATURE_DSCPL (4*32+ 4) /* CPL Qualified Debug Store */ +#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ +#define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */ +#define X86_FEATURE_CID (4*32+10) /* Context ID */ +#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */ #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */ @@ -92,13 +96,14 @@ #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) #define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE) #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) -#define cpu_has_sse2 boot_cpu_has(X86_FEATURE_XMM2) #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) #define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) #define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR) #define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX) #define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR) #define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM) +#define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2) +#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) #define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) #define cpu_has_mp boot_cpu_has(X86_FEATURE_MP) #define cpu_has_nx boot_cpu_has(X86_FEATURE_NX) @@ -106,7 +111,9 @@ #define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR) #define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR) #define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE) +#define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) +#define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) #endif /* __ASM_I386_CPUFEATURE_H */ diff -Nru a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h --- a/include/asm-i386/dma-mapping.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-i386/dma-mapping.h 2004-09-06 16:37:55 -07:00 @@ -163,4 +163,16 @@ flush_write_buffers(); } +#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY +extern int +dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int flags); + +extern void +dma_release_declared_memory(struct device *dev); + +extern void * +dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size); + #endif diff -Nru a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h --- a/include/asm-i386/fixmap.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-i386/fixmap.h 2004-09-06 16:37:50 -07:00 @@ -14,6 +14,15 @@ #define _ASM_FIXMAP_H #include + +/* used by vmalloc.c, vsyscall.lds.S. + * + * Leave one empty page between vmalloc'ed areas and + * the start of the fixmap. + */ +#define __FIXADDR_TOP 0xfffff000 + +#ifndef __ASSEMBLY__ #include #include #include @@ -97,13 +106,8 @@ #define clear_fixmap(idx) \ __set_fixmap(idx, 0, __pgprot(0)) -/* - * used by vmalloc.c. - * - * Leave one empty page between vmalloc'ed areas and - * the start of the fixmap. - */ -#define FIXADDR_TOP (0xfffff000UL) +#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) + #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE) @@ -148,4 +152,5 @@ return __virt_to_fix(vaddr); } +#endif /* !__ASSEMBLY__ */ #endif diff -Nru a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h --- a/include/asm-i386/hw_irq.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-i386/hw_irq.h 2004-09-06 16:37:55 -07:00 @@ -68,46 +68,6 @@ #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) -/* - * The profiling function is SMP safe. (nothing can mess - * around with "current", and the profiling counters are - * updated with atomic operations). This is especially - * useful with a profiling multiplier != 1 - */ -static inline void x86_do_profile(struct pt_regs * regs) -{ - unsigned long eip; - extern unsigned long prof_cpu_mask; - - profile_hook(regs); - - if (user_mode(regs)) - return; - - if (!prof_buffer) - return; - - eip = regs->eip; - - /* - * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. - * (default is all CPUs.) - */ - if (!((1<>= prof_shift; - /* - * Don't ignore out-of-bounds EIP values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (eip > prof_len-1) - eip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[eip]); -} - #if defined(CONFIG_X86_IO_APIC) static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { diff -Nru a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-i386/kdebug.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,50 @@ +#ifndef _I386_KDEBUG_H +#define _I386_KDEBUG_H 1 + +/* + * Aug-05 2004 Ported by Prasanna S Panchamukhi + * from x86_64 architecture. + */ +#include + +struct pt_regs; + +struct die_args { + struct pt_regs *regs; + const char *str; + long err; + int trapnr; + int signr; +}; + +/* Note - you should never unregister because that can race with NMIs. + If you really want to do it first unregister - then synchronize_kernel - then free. + */ +int register_die_notifier(struct notifier_block *nb); +extern struct notifier_block *i386die_chain; + + +/* Grossly misnamed. */ +enum die_val { + DIE_OOPS = 1, + DIE_INT3, + DIE_DEBUG, + DIE_PANIC, + DIE_NMI, + DIE_DIE, + DIE_NMIWATCHDOG, + DIE_KERNELDEBUG, + DIE_TRAP, + DIE_GPF, + DIE_CALL, + DIE_NMI_IPI, + DIE_PAGE_FAULT, +}; + +static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig) +{ + struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig }; + return notifier_call_chain(&i386die_chain, val, &args); +} + +#endif diff -Nru a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-i386/kprobes.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,60 @@ +#ifndef _ASM_KPROBES_H +#define _ASM_KPROBES_H +/* + * Kernel Probes (KProbes) + * include/asm-i386/kprobes.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (C) IBM Corporation, 2002, 2004 + * + * 2002-Oct Created by Vamsi Krishna S Kernel + * Probes initial implementation ( includes suggestions from + * Rusty Russell). + */ +#include +#include + +struct pt_regs; + +typedef u8 kprobe_opcode_t; +#define BREAKPOINT_INSTRUCTION 0xcc +#define MAX_INSN_SIZE 16 +#define MAX_STACK_SIZE 64 +#define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \ + (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \ + ? (MAX_STACK_SIZE) \ + : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) + +/* trap3/1 are intr gates for kprobes. So, restore the status of IF, + * if necessary, before executing the original int3/1 (trap) handler. + */ +static inline void restore_interrupts(struct pt_regs *regs) +{ + if (regs->eflags & IF_MASK) + local_irq_enable(); +} + +#ifdef CONFIG_KPROBES +extern int kprobe_exceptions_notify(struct notifier_block *self, + unsigned long val, void *data); +#else /* !CONFIG_KPROBES */ +static inline int kprobe_exceptions_notify(struct notifier_block *self, + unsigned long val, void *data) +{ + return 0; +} +#endif +#endif /* _ASM_KPROBES_H */ diff -Nru a/include/asm-i386/mach-bigsmp/mach_ipi.h b/include/asm-i386/mach-bigsmp/mach_ipi.h --- a/include/asm-i386/mach-bigsmp/mach_ipi.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-i386/mach-bigsmp/mach_ipi.h 2004-09-06 16:37:52 -07:00 @@ -1,7 +1,7 @@ #ifndef __ASM_MACH_IPI_H #define __ASM_MACH_IPI_H -inline void send_IPI_mask_sequence(cpumask_t mask, int vector); +void send_IPI_mask_sequence(cpumask_t mask, int vector); static inline void send_IPI_mask(cpumask_t mask, int vector) { diff -Nru a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h --- a/include/asm-i386/mach-default/do_timer.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-i386/mach-default/do_timer.h 2004-09-06 16:37:55 -07:00 @@ -22,7 +22,7 @@ * system, in that case we have to call the local interrupt handler. */ #ifndef CONFIG_X86_LOCAL_APIC - x86_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #else if (!using_apic_timer) smp_local_timer_interrupt(regs); diff -Nru a/include/asm-i386/mach-es7000/mach_ipi.h b/include/asm-i386/mach-es7000/mach_ipi.h --- a/include/asm-i386/mach-es7000/mach_ipi.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/mach-es7000/mach_ipi.h 2004-09-06 16:37:51 -07:00 @@ -1,7 +1,7 @@ #ifndef __ASM_MACH_IPI_H #define __ASM_MACH_IPI_H -inline void send_IPI_mask_sequence(cpumask_t mask, int vector); +void send_IPI_mask_sequence(cpumask_t mask, int vector); static inline void send_IPI_mask(cpumask_t mask, int vector) { diff -Nru a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h --- a/include/asm-i386/mach-es7000/mach_mpparse.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-i386/mach-es7000/mach_mpparse.h 2004-09-06 16:37:50 -07:00 @@ -21,7 +21,8 @@ if (mpc->mpc_oemptr) { struct mp_config_oemtable *oem_table = (struct mp_config_oemtable *)mpc->mpc_oemptr; - return parse_unisys_oem((char *)oem_table, oem_table->oem_length); + if (!strncmp(oem, "UNISYS", 6)) + return parse_unisys_oem((char *)oem_table, oem_table->oem_length); } return 0; } diff -Nru a/include/asm-i386/mach-es7000/mach_mpspec.h b/include/asm-i386/mach-es7000/mach_mpspec.h --- a/include/asm-i386/mach-es7000/mach_mpspec.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/mach-es7000/mach_mpspec.h 2004-09-06 16:37:51 -07:00 @@ -3,6 +3,6 @@ #define MAX_IRQ_SOURCES 256 -#define MAX_MP_BUSSES 32 +#define MAX_MP_BUSSES 256 #endif /* __ASM_MACH_MPSPEC_H */ diff -Nru a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h --- a/include/asm-i386/mach-summit/mach_apic.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-i386/mach-summit/mach_apic.h 2004-09-06 16:37:53 -07:00 @@ -19,11 +19,15 @@ static inline cpumask_t target_cpus(void) { - return CPU_MASK_ALL; + /* CPU_MASK_ALL (0xff) has undefined behaviour with + * dest_LowestPrio mode logical clustered apic interrupt routing + * Just start on cpu 0. IRQ balancing will spread load + */ + return cpumask_of_cpu(0); } #define TARGET_CPUS (target_cpus()) -#define INT_DELIVERY_MODE (dest_Fixed) +#define INT_DELIVERY_MODE (dest_LowestPrio) #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) diff -Nru a/include/asm-i386/mach-summit/mach_ipi.h b/include/asm-i386/mach-summit/mach_ipi.h --- a/include/asm-i386/mach-summit/mach_ipi.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/mach-summit/mach_ipi.h 2004-09-06 16:37:51 -07:00 @@ -1,7 +1,7 @@ #ifndef __ASM_MACH_IPI_H #define __ASM_MACH_IPI_H -inline void send_IPI_mask_sequence(cpumask_t mask, int vector); +void send_IPI_mask_sequence(cpumask_t mask, int vector); static inline void send_IPI_mask(cpumask_t mask, int vector) { diff -Nru a/include/asm-i386/mach-visws/do_timer.h b/include/asm-i386/mach-visws/do_timer.h --- a/include/asm-i386/mach-visws/do_timer.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/mach-visws/do_timer.h 2004-09-06 16:37:51 -07:00 @@ -15,7 +15,7 @@ * system, in that case we have to call the local interrupt handler. */ #ifndef CONFIG_X86_LOCAL_APIC - x86_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #else if (!using_apic_timer) smp_local_timer_interrupt(regs); diff -Nru a/include/asm-i386/page.h b/include/asm-i386/page.h --- a/include/asm-i386/page.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/page.h 2004-09-06 16:37:51 -07:00 @@ -116,6 +116,8 @@ return order; } +extern int sysctl_legacy_va_layout; + #endif /* __ASSEMBLY__ */ #ifdef __ASSEMBLY__ diff -Nru a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h --- a/include/asm-i386/pgtable-2level.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-i386/pgtable-2level.h 2004-09-06 16:37:53 -07:00 @@ -75,4 +75,11 @@ #define pgoff_to_pte(off) \ ((pte_t) { (((off) & 0x1f) << 1) + (((off) >> 5) << 8) + _PAGE_FILE }) +/* Encode and de-code a swap entry */ +#define __swp_type(x) (((x).val >> 1) & 0x1f) +#define __swp_offset(x) ((x).val >> 8) +#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) +#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) +#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) + #endif /* _I386_PGTABLE_2LEVEL_H */ diff -Nru a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-i386/pgtable-3level.h 2004-09-06 16:37:54 -07:00 @@ -134,4 +134,11 @@ #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) }) #define PTE_FILE_MAX_BITS 32 +/* Encode and de-code a swap entry */ +#define __swp_type(x) (((x).val) & 0x1f) +#define __swp_offset(x) ((x).val >> 5) +#define __swp_entry(type, offset) ((swp_entry_t){(type) | (offset) << 5}) +#define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) +#define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) + #endif /* _I386_PGTABLE_3LEVEL_H */ diff -Nru a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h --- a/include/asm-i386/pgtable.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-i386/pgtable.h 2004-09-06 16:37:54 -07:00 @@ -398,13 +398,6 @@ } \ } while (0) -/* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val >> 1) & 0x1f) -#define __swp_offset(x) ((x).val >> 8) -#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) - #endif /* !__ASSEMBLY__ */ #ifndef CONFIG_DISCONTIGMEM diff -Nru a/include/asm-i386/processor.h b/include/asm-i386/processor.h --- a/include/asm-i386/processor.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-i386/processor.h 2004-09-06 16:37:50 -07:00 @@ -297,6 +297,8 @@ */ #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) +#define HAVE_ARCH_PICK_MMAP_LAYOUT + /* * Size of io_bitmap. */ @@ -646,10 +648,5 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); #define cache_line_size() (boot_cpu_data.x86_cache_alignment) - -#ifdef CONFIG_SCHED_SMT -#define ARCH_HAS_SCHED_DOMAIN -#define ARCH_HAS_SCHED_WAKE_IDLE -#endif #endif /* __ASM_I386_PROCESSOR_H */ diff -Nru a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h --- a/include/asm-i386/ptrace.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-i386/ptrace.h 2004-09-06 16:37:50 -07:00 @@ -57,6 +57,11 @@ #ifdef __KERNEL__ #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs)) #define instruction_pointer(regs) ((regs)->eip) +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif #endif #endif diff -Nru a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h --- a/include/asm-i386/rwlock.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-i386/rwlock.h 2004-09-06 16:37:55 -07:00 @@ -22,25 +22,19 @@ #define __build_read_lock_ptr(rw, helper) \ asm volatile(LOCK "subl $1,(%0)\n\t" \ - "js 2f\n" \ + "jns 1f\n" \ + "call " helper "\n\t" \ "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ ::"a" (rw) : "memory") #define __build_read_lock_const(rw, helper) \ asm volatile(LOCK "subl $1,%0\n\t" \ - "js 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ + "jns 1f\n" \ + "pushl %%eax\n\t" \ "leal %0,%%eax\n\t" \ "call " helper "\n\t" \ "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ + "1:\n" \ :"=m" (*(volatile int *)rw) : : "memory") #define __build_read_lock(rw, helper) do { \ @@ -52,25 +46,19 @@ #define __build_write_lock_ptr(rw, helper) \ asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ - "jnz 2f\n" \ + "jz 1f\n" \ + "call " helper "\n\t" \ "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ ::"a" (rw) : "memory") #define __build_write_lock_const(rw, helper) \ asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ - "jnz 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ + "jz 1f\n" \ + "pushl %%eax\n\t" \ "leal %0,%%eax\n\t" \ "call " helper "\n\t" \ "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ + "1:\n" \ :"=m" (*(volatile int *)rw) : : "memory") #define __build_write_lock(rw, helper) do { \ diff -Nru a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h --- a/include/asm-i386/semaphore.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/semaphore.h 2004-09-06 16:37:51 -07:00 @@ -45,21 +45,15 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } + +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -81,9 +75,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -113,9 +104,6 @@ */ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "# atomic down operation\n\t" @@ -139,9 +127,6 @@ { int result; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "# atomic interruptible down operation\n\t" @@ -167,10 +152,6 @@ { int result; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( "# atomic interruptible down operation\n\t" LOCK "decl %1\n\t" /* --sem->count */ @@ -195,9 +176,6 @@ */ static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif __asm__ __volatile__( "# atomic up operation\n\t" LOCK "incl %0\n\t" /* ++sem->count */ diff -Nru a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h --- a/include/asm-i386/spinlock.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/spinlock.h 2004-09-06 16:37:51 -07:00 @@ -46,20 +46,18 @@ #define spin_lock_string \ "\n1:\t" \ "lock ; decb %0\n\t" \ - "js 2f\n" \ - LOCK_SECTION_START("") \ + "jns 3f\n" \ "2:\t" \ "rep;nop\n\t" \ "cmpb $0,%0\n\t" \ "jle 2b\n\t" \ "jmp 1b\n" \ - LOCK_SECTION_END + "3:\n\t" #define spin_lock_string_flags \ "\n1:\t" \ "lock ; decb %0\n\t" \ - "js 2f\n\t" \ - LOCK_SECTION_START("") \ + "jns 4f\n\t" \ "2:\t" \ "testl $0x200, %1\n\t" \ "jz 3f\n\t" \ @@ -70,7 +68,7 @@ "jle 3b\n\t" \ "cli\n\t" \ "jmp 1b\n" \ - LOCK_SECTION_END + "4:\n\t" /* * This works. Despite all the confusion. diff -Nru a/include/asm-i386/timex.h b/include/asm-i386/timex.h --- a/include/asm-i386/timex.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/timex.h 2004-09-06 16:37:51 -07:00 @@ -7,7 +7,7 @@ #define _ASMi386_TIMEX_H #include -#include +#include #ifdef CONFIG_X86_ELAN # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ @@ -40,14 +40,17 @@ static inline cycles_t get_cycles (void) { + unsigned long long ret=0; + #ifndef CONFIG_X86_TSC - return 0; -#else - unsigned long long ret; + if (!cpu_has_tsc) + return 0; +#endif +#if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) rdtscll(ret); - return ret; #endif + return ret; } extern unsigned long cpu_khz; diff -Nru a/include/asm-i386/topology.h b/include/asm-i386/topology.h --- a/include/asm-i386/topology.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/topology.h 2004-09-06 16:37:51 -07:00 @@ -67,7 +67,7 @@ } /* Node-to-Node distance */ -#define node_distance(from, to) (from != to) +#define node_distance(from, to) ((from) != (to)) /* Cross-node load balancing interval. */ #define NODE_BALANCE_RATE 100 diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h --- a/include/asm-i386/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-i386/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -375,8 +375,10 @@ : "m"(__m(addr)), "i"(errret), "0"(err)) -unsigned long __copy_to_user_ll(void __user *to, const void *from, unsigned long n); -unsigned long __copy_from_user_ll(void *to, const void __user *from, unsigned long n); +unsigned long __must_check __copy_to_user_ll(void __user *to, + const void *from, unsigned long n); +unsigned long __must_check __copy_from_user_ll(void *to, + const void __user *from, unsigned long n); /* * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault @@ -399,8 +401,8 @@ * Returns number of bytes that could not be copied. * On success, this will be zero. */ -static inline unsigned long -__copy_to_user(void __user *to, const void *from, unsigned long n) +static inline unsigned long __must_check +__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n) { if (__builtin_constant_p(n)) { unsigned long ret; @@ -420,6 +422,13 @@ return __copy_to_user_ll(to, from, n); } +static inline unsigned long __must_check +__copy_to_user(void __user *to, const void *from, unsigned long n) +{ + might_sleep(); + return __copy_to_user_inatomic(to, from, n); +} + /** * __copy_from_user: - Copy a block of data from user space, with less checking. * @to: Destination address, in kernel space. @@ -438,7 +447,7 @@ * data to the requested size using zero bytes. */ static inline unsigned long -__copy_from_user(void *to, const void __user *from, unsigned long n) +__copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) { if (__builtin_constant_p(n)) { unsigned long ret; @@ -458,11 +467,20 @@ return __copy_from_user_ll(to, from, n); } -unsigned long copy_to_user(void __user *to, const void *from, unsigned long n); -unsigned long copy_from_user(void *to, - const void __user *from, unsigned long n); -long strncpy_from_user(char *dst, const char __user *src, long count); -long __strncpy_from_user(char *dst, const char __user *src, long count); +static inline unsigned long +__copy_from_user(void *to, const void __user *from, unsigned long n) +{ + might_sleep(); + return __copy_from_user_inatomic(to, from, n); +} +unsigned long __must_check copy_to_user(void __user *to, + const void *from, unsigned long n); +unsigned long __must_check copy_from_user(void *to, + const void __user *from, unsigned long n); +long __must_check strncpy_from_user(char *dst, const char __user *src, + long count); +long __must_check __strncpy_from_user(char *dst, + const char __user *src, long count); /** * strlen_user: - Get the size of a string in user space. @@ -481,7 +499,7 @@ #define strlen_user(str) strnlen_user(str, ~0UL >> 1) long strnlen_user(const char __user *str, long n); -unsigned long clear_user(void __user *mem, unsigned long len); -unsigned long __clear_user(void __user *mem, unsigned long len); +unsigned long __must_check clear_user(void __user *mem, unsigned long len); +unsigned long __must_check __clear_user(void __user *mem, unsigned long len); #endif /* __i386_UACCESS_H */ diff -Nru a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h --- a/include/asm-i386/unistd.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-i386/unistd.h 2004-09-06 16:37:53 -07:00 @@ -289,8 +289,9 @@ #define __NR_mq_notify (__NR_mq_open+4) #define __NR_mq_getsetattr (__NR_mq_open+5) #define __NR_sys_kexec_load 283 +#define __NR_waitid 284 -#define NR_syscalls 284 +#define NR_syscalls 285 /* user-visible error numbers are in the range -1 - -124: see */ diff -Nru a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h --- a/include/asm-ia64/acpi.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ia64/acpi.h 2004-09-06 16:37:54 -07:00 @@ -96,7 +96,6 @@ const char *acpi_get_sysname (void); int acpi_request_vector (u32 int_type); -int acpi_register_irq (u32 gsi, u32 polarity, u32 trigger); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); #ifdef CONFIG_ACPI_NUMA diff -Nru a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h --- a/include/asm-ia64/dma-mapping.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ia64/dma-mapping.h 2004-09-06 16:37:54 -07:00 @@ -5,7 +5,8 @@ * Copyright (C) 2003-2004 Hewlett-Packard Co * David Mosberger-Tang */ - +#include +#include #include #define dma_alloc_coherent platform_dma_alloc_coherent diff -Nru a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h --- a/include/asm-ia64/mmu_context.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ia64/mmu_context.h 2004-09-06 16:37:51 -07:00 @@ -28,36 +28,6 @@ #include -#define MMU_CONTEXT_DEBUG 0 - -#if MMU_CONTEXT_DEBUG - -#include - -extern struct mmu_trace_entry { - char op; - u8 cpu; - u32 context; - void *mm; -} mmu_tbuf[1024]; - -extern volatile int mmu_tbuf_index; - -# define MMU_TRACE(_op,_cpu,_mm,_ctx) \ -do { \ - int i = __sync_fetch_and_add(&mmu_tbuf_index, 1) % ARRAY_SIZE(mmu_tbuf); \ - struct mmu_trace_entry e; \ - e.op = (_op); \ - e.cpu = (_cpu); \ - e.mm = (_mm); \ - e.context = (_ctx); \ - mmu_tbuf[i] = e; \ -} while (0) - -#else -# define MMU_TRACE(op,cpu,mm,ctx) do { ; } while (0) -#endif - struct ia64_ctx { spinlock_t lock; unsigned int next; /* next context number to use */ @@ -123,7 +93,6 @@ static inline int init_new_context (struct task_struct *p, struct mm_struct *mm) { - MMU_TRACE('N', smp_processor_id(), mm, 0); mm->context = 0; return 0; } @@ -132,7 +101,6 @@ destroy_context (struct mm_struct *mm) { /* Nothing to do. */ - MMU_TRACE('D', smp_processor_id(), mm, mm->context); } static inline void @@ -171,19 +139,14 @@ do { context = get_mmu_context(mm); - MMU_TRACE('A', smp_processor_id(), mm, context); if (!cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) cpu_set(smp_processor_id(), mm->cpu_vm_mask); reload_context(context); - MMU_TRACE('a', smp_processor_id(), mm, context); /* in the unlikely event of a TLB-flush by another thread, redo the load: */ } while (unlikely(context != mm->context)); } -#define deactivate_mm(tsk,mm) \ -do { \ - MMU_TRACE('d', smp_processor_id(), mm, mm->context); \ -} while (0) +#define deactivate_mm(tsk,mm) do { } while (0) /* * Switch from address space PREV to address space NEXT. diff -Nru a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h --- a/include/asm-ia64/numa.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ia64/numa.h 2004-09-06 16:37:52 -07:00 @@ -59,7 +59,7 @@ */ extern u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES]; -#define node_distance(from,to) (numa_slit[from * numnodes + to]) +#define node_distance(from,to) (numa_slit[(from) * numnodes + (to)]) extern int paddr_to_nid(unsigned long paddr); diff -Nru a/include/asm-ia64/page.h b/include/asm-ia64/page.h --- a/include/asm-ia64/page.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ia64/page.h 2004-09-06 16:37:51 -07:00 @@ -84,6 +84,13 @@ #endif #ifndef CONFIG_DISCONTIGMEM +# ifdef CONFIG_VIRTUAL_MEM_MAP +extern struct page *vmem_map; +# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) +# define page_to_pfn(page) ((unsigned long) (page - vmem_map)) +# define pfn_to_page(pfn) (vmem_map + (pfn)) +# endif +#else /* !CONFIG_VIRTUAL_MEM_MAP */ #define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) #define page_to_pfn(page) ((unsigned long) (page - mem_map)) #define pfn_to_page(pfn) (mem_map + (pfn)) diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ia64/pgtable.h 2004-09-06 16:37:51 -07:00 @@ -520,7 +520,7 @@ # ifdef CONFIG_VIRTUAL_MEM_MAP /* arch mem_map init routine is needed due to holes in a virtual mem_map */ # define __HAVE_ARCH_MEMMAP_INIT - extern void memmap_init (struct page *start, unsigned long size, int nid, unsigned long zone, + extern void memmap_init (unsigned long size, int nid, unsigned long zone, unsigned long start_pfn); # endif /* CONFIG_VIRTUAL_MEM_MAP */ # endif /* !__ASSEMBLY__ */ diff -Nru a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h --- a/include/asm-ia64/processor.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ia64/processor.h 2004-09-06 16:37:52 -07:00 @@ -334,6 +334,26 @@ /* Prepare to copy thread state - unlazy all lazy status */ #define prepare_to_copy(tsk) do { } while (0) +#ifdef CONFIG_NUMA +#define SD_NODE_INIT (struct sched_domain) { \ + .span = CPU_MASK_NONE, \ + .parent = NULL, \ + .groups = NULL, \ + .min_interval = 80, \ + .max_interval = 320, \ + .busy_factor = 320, \ + .imbalance_pct = 125, \ + .cache_hot_time = (10*1000000), \ + .cache_nice_tries = 1, \ + .per_cpu_gain = 100, \ + .flags = SD_BALANCE_EXEC \ + | SD_WAKE_BALANCE, \ + .last_balance = jiffies, \ + .balance_interval = 10, \ + .nr_balance_failed = 0, \ +} +#endif + /* * This is the mechanism for creating a new kernel thread. * diff -Nru a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h --- a/include/asm-ia64/ptrace.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ia64/ptrace.h 2004-09-06 16:37:53 -07:00 @@ -229,6 +229,15 @@ * the canonical representation by adding to instruction pointer. */ # define instruction_pointer(regs) ((regs)->cr_iip + ia64_psr(regs)->ri) +/* Conserve space in histogram by encoding slot bits in address + * bits 2 and 3 rather than bits 0 and 1. + */ +#define profile_pc(regs) \ +({ \ + unsigned long __ip = instruction_pointer(regs); \ + (__ip & ~3UL) + ((__ip & 3UL) << 2); \ +}) + /* given a pointer to a task_struct, return the user's pt_regs */ # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) diff -Nru a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h --- a/include/asm-ia64/sal.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ia64/sal.h 2004-09-06 16:37:55 -07:00 @@ -364,7 +364,7 @@ u64 cr[128]; u64 ar[128]; u64 rr[8]; - struct ia64_fpreg fr[128]; + struct ia64_fpreg __attribute__ ((packed)) fr[128]; } sal_processor_static_info_t; struct sal_cpuid_info { @@ -818,6 +818,16 @@ struct sal_ret_values { long r8; long r9; long r10; long r11; }; + +#define IA64_SAL_OEMFUNC_MIN 0x02000000 +#define IA64_SAL_OEMFUNC_MAX 0x03ffffff + +extern int ia64_sal_oemcall(struct ia64_sal_retval *, u64, u64, u64, u64, u64, + u64, u64, u64); +extern int ia64_sal_oemcall_nolock(struct ia64_sal_retval *, u64, u64, u64, + u64, u64, u64, u64, u64); +extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64, + u64, u64, u64, u64, u64); #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h --- a/include/asm-ia64/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ia64/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -15,21 +15,13 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; /* initialized by __SEM_DEBUG_INIT() */ -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) , (long) &(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ \ - ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) \ +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ } #define __MUTEX_INITIALIZER(name) __SEMAPHORE_INITIALIZER(name,1) @@ -70,9 +62,6 @@ static inline void down (struct semaphore *sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (atomic_dec_return(&sem->count) < 0) __down(sem); @@ -87,9 +76,6 @@ { int ret = 0; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (atomic_dec_return(&sem->count) < 0) ret = __down_interruptible(sem); @@ -101,9 +87,6 @@ { int ret = 0; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_trylock(sem); return ret; @@ -112,9 +95,6 @@ static inline void up (struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_inc_return(&sem->count) <= 0) __up(sem); } diff -Nru a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h --- a/include/asm-ia64/siginfo.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ia64/siginfo.h 2004-09-06 16:37:55 -07:00 @@ -56,6 +56,7 @@ int _status; /* exit code */ clock_t _utime; clock_t _stime; + struct rusage _rusage; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ diff -Nru a/include/asm-ia64/sn/sn2/shubio.h b/include/asm-ia64/sn/sn2/shubio.h --- a/include/asm-ia64/sn/sn2/shubio.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ia64/sn/sn2/shubio.h 2004-09-06 16:37:52 -07:00 @@ -3384,7 +3384,7 @@ #define IO_PERF_SETS 32 -#if __KERNEL__ +#ifdef __KERNEL__ #include #include #include diff -Nru a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h --- a/include/asm-ia64/sn/sn_cpuid.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ia64/sn/sn_cpuid.h 2004-09-06 16:37:51 -07:00 @@ -4,7 +4,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved. */ @@ -93,6 +93,7 @@ */ #define cpu_physical_id_to_nasid(cpi) ((cpi) &0xfff) #define cpu_physical_id_to_slice(cpi) ((cpi>>12) & 3) +#define cpu_physical_id_to_coherence_id(cpi) (cpu_physical_id_to_nasid(cpi) >> 9) #define get_nasid() ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xfff) #define get_slice() ((ia64_getreg(_IA64_REG_CR_LID) >> 28) & 0xf) #define get_node_number(addr) (((unsigned long)(addr)>>38) & 0x7ff) @@ -172,6 +173,11 @@ #define smp_physical_node_id() (cpuid_to_nasid(smp_processor_id())) +/* + * cpuid_to_coherence_id - convert a cpuid to the coherence domain id it + * resides on + */ +#define cpuid_to_coherence_id(cpuid) cpu_physical_id_to_coherence_id(cpu_physical_id(cpuid)) #endif /* _ASM_IA64_SN_SN_CPUID_H */ diff -Nru a/include/asm-ia64/sn/xtalk/xtalk.h b/include/asm-ia64/sn/xtalk/xtalk.h --- a/include/asm-ia64/sn/xtalk/xtalk.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ia64/sn/xtalk/xtalk.h 2004-09-06 16:37:53 -07:00 @@ -55,7 +55,7 @@ /* * Kernel/driver only definitions */ -#if __KERNEL__ +#ifdef __KERNEL__ #include #include diff -Nru a/include/asm-ia64/sn/xtalk/xwidget.h b/include/asm-ia64/sn/xtalk/xwidget.h --- a/include/asm-ia64/sn/xtalk/xwidget.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ia64/sn/xtalk/xwidget.h 2004-09-06 16:37:50 -07:00 @@ -183,7 +183,7 @@ /* Generic crosstalk widget initialization interface */ -#if __KERNEL__ +#ifdef __KERNEL__ extern int xwidget_driver_register(xwidget_part_num_t part_num, xwidget_mfg_num_t mfg_num, diff -Nru a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h --- a/include/asm-ia64/tlb.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ia64/tlb.h 2004-09-06 16:37:52 -07:00 @@ -39,6 +39,7 @@ */ #include #include +#include #include #include diff -Nru a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h --- a/include/asm-ia64/tlbflush.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ia64/tlbflush.h 2004-09-06 16:37:54 -07:00 @@ -48,22 +48,19 @@ static inline void flush_tlb_mm (struct mm_struct *mm) { - MMU_TRACE('F', smp_processor_id(), mm, mm->context); if (!mm) - goto out; + return; mm->context = 0; if (atomic_read(&mm->mm_users) == 0) - goto out; /* happens as a result of exit_mmap() */ + return; /* happens as a result of exit_mmap() */ #ifdef CONFIG_SMP smp_flush_tlb_mm(mm); #else local_finish_flush_tlb_mm(mm); #endif - out: - MMU_TRACE('f', smp_processor_id(), mm, mm->context); } extern void flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end); diff -Nru a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h --- a/include/asm-ia64/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ia64/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -91,6 +91,42 @@ #define __put_user(x, ptr) __put_user_nocheck((__typeof__(*(ptr))) (x), (ptr), sizeof(*(ptr))) #define __get_user(x, ptr) __get_user_nocheck((x), (ptr), sizeof(*(ptr))) +extern long __put_user_unaligned_unknown (void); + +#define __put_user_unaligned(x, ptr) \ +({ \ + long __ret; \ + switch (sizeof(*(ptr))) { \ + case 1: __ret = __put_user((x), (ptr)); break; \ + case 2: __ret = (__put_user((x), (u8 __user *)(ptr))) \ + | (__put_user((x) >> 8, ((u8 __user *)(ptr) + 1))); break; \ + case 4: __ret = (__put_user((x), (u16 __user *)(ptr))) \ + | (__put_user((x) >> 16, ((u16 __user *)(ptr) + 1))); break; \ + case 8: __ret = (__put_user((x), (u32 __user *)(ptr))) \ + | (__put_user((x) >> 32, ((u32 __user *)(ptr) + 1))); break; \ + default: __ret = __put_user_unaligned_unknown(); \ + } \ + __ret; \ +}) + +extern long __get_user_unaligned_unknown (void); + +#define __get_user_unaligned(x, ptr) \ +({ \ + long __ret; \ + switch (sizeof(*(ptr))) { \ + case 1: __ret = __get_user((x), (ptr)); break; \ + case 2: __ret = (__get_user((x), (u8 __user *)(ptr))) \ + | (__get_user((x) >> 8, ((u8 __user *)(ptr) + 1))); break; \ + case 4: __ret = (__get_user((x), (u16 __user *)(ptr))) \ + | (__get_user((x) >> 16, ((u16 __user *)(ptr) + 1))); break; \ + case 8: __ret = (__get_user((x), (u32 __user *)(ptr))) \ + | (__get_user((x) >> 32, ((u32 __user *)(ptr) + 1))); break; \ + default: __ret = __get_user_unaligned_unknown(); \ + } \ + __ret; \ +}) + #ifdef ASM_SUPPORTED struct __large_struct { unsigned long buf[100]; }; # define __m(x) (*(struct __large_struct *)(x)) @@ -202,7 +238,8 @@ #define __copy_to_user(to, from, n) __copy_user((to), (from), (n)) #define __copy_from_user(to, from, n) __copy_user((to), (from), (n)) - +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #define copy_to_user(to, from, n) __copy_tofrom_user((to), (from), (n), 1) #define copy_from_user(to, from, n) __copy_tofrom_user((to), (from), (n), 0) diff -Nru a/include/asm-m68k/ptrace.h b/include/asm-m68k/ptrace.h --- a/include/asm-m68k/ptrace.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-m68k/ptrace.h 2004-09-06 16:37:55 -07:00 @@ -73,6 +73,7 @@ #define user_mode(regs) (!((regs)->sr & PS_S)) #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-m68k/semaphore.h b/include/asm-m68k/semaphore.h --- a/include/asm-m68k/semaphore.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-m68k/semaphore.h 2004-09-06 16:37:55 -07:00 @@ -27,21 +27,14 @@ atomic_t count; atomic_t waking; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), ATOMIC_INIT(0), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .waking = ATOMIC_INIT(0), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -86,9 +79,6 @@ { register struct semaphore *sem1 __asm__ ("%a1") = sem; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "| atomic down operation\n\t" @@ -109,9 +99,6 @@ register struct semaphore *sem1 __asm__ ("%a1") = sem; register int result __asm__ ("%d0"); -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "| atomic interruptible down operation\n\t" @@ -134,10 +121,6 @@ register struct semaphore *sem1 __asm__ ("%a1") = sem; register int result __asm__ ("%d0"); -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( "| atomic down trylock operation\n\t" "subql #1,%1@\n\t" @@ -163,10 +146,6 @@ static inline void up(struct semaphore *sem) { register struct semaphore *sem1 __asm__ ("%a1") = sem; - -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif __asm__ __volatile__( "| atomic up operation\n\t" diff -Nru a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h --- a/include/asm-m68k/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-m68k/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -521,6 +521,9 @@ : "0"(to), "1"(from), "2"(n/4) \ : "d0", "memory") +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + static inline unsigned long __constant_copy_to_user(void *to, const void *from, unsigned long n) { diff -Nru a/include/asm-m68knommu/ptrace.h b/include/asm-m68knommu/ptrace.h --- a/include/asm-m68knommu/ptrace.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-m68knommu/ptrace.h 2004-09-06 16:37:50 -07:00 @@ -84,6 +84,7 @@ #define user_mode(regs) (!((regs)->sr & PS_S)) #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-m68knommu/semaphore.h b/include/asm-m68knommu/semaphore.h --- a/include/asm-m68knommu/semaphore.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-m68knommu/semaphore.h 2004-09-06 16:37:53 -07:00 @@ -26,21 +26,14 @@ atomic_t count; atomic_t waking; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), ATOMIC_INIT(0), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .waking = ATOMIC_INIT(0), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -85,9 +78,6 @@ */ extern inline void down(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "| atomic down operation\n\t" @@ -105,9 +95,6 @@ { int ret; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( "| atomic down operation\n\t" @@ -128,10 +115,6 @@ register struct semaphore *sem1 __asm__ ("%a1") = sem; register int result __asm__ ("%d0"); -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( "| atomic down trylock operation\n\t" "subql #1,%1@\n\t" @@ -157,10 +140,6 @@ */ extern inline void up(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( "| atomic up operation\n\t" "movel %0, %%a1\n\t" diff -Nru a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h --- a/include/asm-m68knommu/uaccess.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-m68knommu/uaccess.h 2004-09-06 16:37:54 -07:00 @@ -134,6 +134,8 @@ #define __copy_from_user(to, from, n) copy_from_user(to, from, n) #define __copy_to_user(to, from, n) copy_to_user(to, from, n) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) diff -Nru a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h --- a/include/asm-mips/ptrace.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-mips/ptrace.h 2004-09-06 16:37:53 -07:00 @@ -66,6 +66,7 @@ #define user_mode(regs) (((regs)->cp0_status & KU_MASK) == KU_USER) #define instruction_pointer(regs) ((regs)->cp0_epc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); diff -Nru a/include/asm-mips/semaphore.h b/include/asm-mips/semaphore.h --- a/include/asm-mips/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-mips/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -37,22 +37,13 @@ */ atomic_t count; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name, count) \ - { ATOMIC_INIT(count), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name, 1) @@ -67,9 +58,6 @@ { atomic_set(&sem->count, val); init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -88,9 +76,6 @@ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); /* @@ -104,9 +89,6 @@ { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (unlikely(atomic_dec_return(&sem->count) < 0)) @@ -116,19 +98,11 @@ static inline int down_trylock(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - return atomic_dec_if_positive(&sem->count) < 0; } static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - if (unlikely(atomic_inc_return(&sem->count) <= 0)) __up(sem); } diff -Nru a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h --- a/include/asm-mips/uaccess.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-mips/uaccess.h 2004-09-06 16:37:50 -07:00 @@ -13,6 +13,7 @@ #include #include #include +#include /* * The fs value determines whether argument validity checking should be @@ -462,6 +463,9 @@ __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ __cu_len; \ }) + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user /* * copy_to_user: - Copy a block of data into user space. diff -Nru a/include/asm-parisc/ptrace.h b/include/asm-parisc/ptrace.h --- a/include/asm-parisc/ptrace.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-parisc/ptrace.h 2004-09-06 16:37:52 -07:00 @@ -48,6 +48,7 @@ /* XXX should we use iaoq[1] or iaoq[0] ? */ #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif diff -Nru a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h --- a/include/asm-parisc/semaphore.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-parisc/semaphore.h 2004-09-06 16:37:50 -07:00 @@ -40,21 +40,14 @@ spinlock_t sentry; int count; wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif }; -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ SPIN_LOCK_UNLOCKED, count, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .sentry = SPIN_LOCK_UNLOCKED, \ + .count = n, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -95,9 +88,6 @@ extern __inline__ void down(struct semaphore * sem) { -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); spin_lock_irq(&sem->sentry); if (sem->count > 0) { @@ -111,9 +101,6 @@ extern __inline__ int down_interruptible(struct semaphore * sem) { int ret = 0; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); spin_lock_irq(&sem->sentry); if (sem->count > 0) { @@ -132,9 +119,6 @@ extern __inline__ int down_trylock(struct semaphore * sem) { int flags, count; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif spin_lock_irqsave(&sem->sentry, flags); count = sem->count - 1; @@ -151,9 +135,6 @@ extern __inline__ void up(struct semaphore * sem) { int flags; -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif spin_lock_irqsave(&sem->sentry, flags); if (sem->count < 0) { __up(sem); diff -Nru a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h --- a/include/asm-parisc/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-parisc/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -279,5 +279,7 @@ #define __copy_to_user lcopy_to_user #define copy_in_user lcopy_in_user #define __copy_in_user lcopy_in_user +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #endif /* __PARISC_UACCESS_H */ diff -Nru a/include/asm-ppc/checksum.h b/include/asm-ppc/checksum.h --- a/include/asm-ppc/checksum.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-ppc/checksum.h 2004-09-06 16:37:51 -07:00 @@ -33,7 +33,7 @@ int *src_err, int *dst_err); #define csum_partial_copy_from_user(src, dst, len, sum, errp) \ - csum_partial_copy_generic((src), (dst), (len), (sum), (errp), NULL) + csum_partial_copy_generic((__force void *)(src), (dst), (len), (sum), (errp), NULL) /* FIXME: this needs to be written to really do no check -- Cort */ #define csum_partial_copy_nocheck(src, dst, len, sum) \ diff -Nru a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h --- a/include/asm-ppc/mpc8260.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc/mpc8260.h 2004-09-06 16:37:50 -07:00 @@ -40,6 +40,10 @@ #include #endif +#ifdef CONFIG_PCI_8260 +#include +#endif + /* Make sure the memory translation stuff is there if PCI not used. */ #ifndef _IO_BASE diff -Nru a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h --- a/include/asm-ppc/open_pic.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ppc/open_pic.h 2004-09-06 16:37:52 -07:00 @@ -23,7 +23,7 @@ #define OPENPIC_VEC_TIMER 110 /* and up */ #define OPENPIC_VEC_IPI 118 /* and up */ -#define OPENPIC_VEC_SPURIOUS 127 +#define OPENPIC_VEC_SPURIOUS 239 /* OpenPIC IRQ controller structure */ extern struct hw_interrupt_type open_pic; diff -Nru a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h --- a/include/asm-ppc/ptrace.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ppc/ptrace.h 2004-09-06 16:37:53 -07:00 @@ -47,6 +47,12 @@ #ifndef __ASSEMBLY__ #define instruction_pointer(regs) ((regs)->nip) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif + #define user_mode(regs) (((regs)->msr & MSR_PR) != 0) #define force_successful_syscall_return() \ diff -Nru a/include/asm-ppc/residual.h b/include/asm-ppc/residual.h --- a/include/asm-ppc/residual.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ppc/residual.h 2004-09-06 16:37:52 -07:00 @@ -315,11 +315,20 @@ } RESIDUAL; +/* + * Forward declaration - we can't include because it + * breaks the boot loader + */ +struct pci_dev; + extern RESIDUAL *res; extern void print_residual_device_info(void); extern PPC_DEVICE *residual_find_device(unsigned long BusMask, unsigned char * DevID, int BaseType, int SubType, int Interface, int n); +extern int residual_pcidev_irq(struct pci_dev *dev); +extern void residual_irq_mask(char *irq_edge_mask_lo, char *irq_edge_mask_hi); +extern unsigned int residual_isapic_addr(void); extern PnP_TAG_PACKET *PnP_find_packet(unsigned char *p, unsigned packet_tag, int n); extern PnP_TAG_PACKET *PnP_find_small_vendor_packet(unsigned char *p, @@ -328,6 +337,13 @@ extern PnP_TAG_PACKET *PnP_find_large_vendor_packet(unsigned char *p, unsigned packet_type, int n); + +#ifdef CONFIG_PREP_RESIDUAL +#define have_residual_data (res && res->ResidualLength) +#else +#define have_residual_data 0 +#endif + #endif /* __ASSEMBLY__ */ #endif /* ndef _RESIDUAL_ */ diff -Nru a/include/asm-ppc/semaphore.h b/include/asm-ppc/semaphore.h --- a/include/asm-ppc/semaphore.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ppc/semaphore.h 2004-09-06 16:37:53 -07:00 @@ -29,22 +29,13 @@ */ atomic_t count; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name, count) \ - { ATOMIC_INIT(count), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name, 1) @@ -59,9 +50,6 @@ { atomic_set(&sem->count, val); init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -80,9 +68,6 @@ extern inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); /* @@ -97,9 +82,6 @@ { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (atomic_dec_return(&sem->count) < 0) @@ -112,10 +94,6 @@ { int ret; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - ret = atomic_dec_if_positive(&sem->count) < 0; smp_wmb(); return ret; @@ -123,10 +101,6 @@ extern inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - smp_wmb(); if (atomic_inc_return(&sem->count) <= 0) __up(sem); diff -Nru a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h --- a/include/asm-ppc/serial.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ppc/serial.h 2004-09-06 16:37:55 -07:00 @@ -13,17 +13,17 @@ #elif defined(CONFIG_GEMINI) #include #elif defined(CONFIG_POWERPMC250) -#include +#include #elif defined(CONFIG_LOPEC) -#include +#include #elif defined(CONFIG_MCPN765) -#include +#include #elif defined(CONFIG_MVME5100) -#include +#include #elif defined(CONFIG_PRPMC750) -#include +#include #elif defined(CONFIG_PRPMC800) -#include +#include #elif defined(CONFIG_SANDPOINT) #include #elif defined(CONFIG_SPRUCE) diff -Nru a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h --- a/include/asm-ppc/uaccess.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc/uaccess.h 2004-09-06 16:37:50 -07:00 @@ -331,6 +331,8 @@ __copy_tofrom_user((void __user *)(to), (from), (size)) #define __copy_to_user(to, from, size) \ __copy_tofrom_user((to), (void __user *)(from), (size)) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user extern unsigned long __clear_user(void __user *addr, unsigned long size); diff -Nru a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h --- a/include/asm-ppc64/eeh.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ppc64/eeh.h 2004-09-06 16:37:54 -07:00 @@ -44,6 +44,7 @@ extern void __init eeh_init(void); unsigned long eeh_check_failure(void *token, unsigned long val); +int eeh_dn_check_failure (struct device_node *dn, struct pci_dev *dev); void *eeh_ioremap(unsigned long addr, void *vaddr); void __init pci_addr_cache_build(void); @@ -89,7 +90,15 @@ */ #define EEH_POSSIBLE_IO_ERROR(val, type) ((val) == (type)~0) -/* The vaddr will equal the addr if EEH checking is disabled for +/* + * Reads from a device which has been isolated by EEH will return + * all 1s. This macro gives an all-1s value of the given size (in + * bytes: 1, 2, or 4) for comparing with the result of a read. + */ +#define EEH_IO_ERROR_VALUE(size) (~0U >> ((4 - (size)) * 8)) + +/* + * The vaddr will equal the addr if EEH checking is disabled for * this device. This is because eeh_ioremap() will not have * remapped to 0xA0, and thus both vaddr and addr will be 0xE0... */ diff -Nru a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h --- a/include/asm-ppc64/hvcall.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc64/hvcall.h 2004-09-06 16:37:50 -07:00 @@ -101,10 +101,12 @@ #define H_VIO_SIGNAL 0x104 #define H_SEND_CRQ 0x108 #define H_COPY_RDMA 0x110 -#define H_POLL_PENDING 0x1D8 +#define H_STUFF_TCE 0x138 +#define H_PUT_TCE_INDIRECT 0x13C #define H_VTERM_PARTNER_INFO 0x150 -#define H_REGISTER_VTERM 0x154 -#define H_FREE_VTERM 0x158 +#define H_REGISTER_VTERM 0x154 +#define H_FREE_VTERM 0x158 +#define H_POLL_PENDING 0x1D8 /* plpar_hcall() -- Generic call interface using above opcodes * diff -Nru a/include/asm-ppc64/hvconsole.h b/include/asm-ppc64/hvconsole.h --- a/include/asm-ppc64/hvconsole.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ppc64/hvconsole.h 2004-09-06 16:37:53 -07:00 @@ -22,9 +22,19 @@ #ifndef _PPC64_HVCONSOLE_H #define _PPC64_HVCONSOLE_H -extern int hvc_get_chars(int index, char *buf, int count); -extern int hvc_put_chars(int index, const char *buf, int count); -extern int hvc_count(int *start_termno); +/* + * This is the max number of console adapters that can/will be found as + * console devices on first stage console init. Any number beyond this range + * can't be used as a console device but is still a valid tty device. + */ +#define MAX_NR_HVC_CONSOLES 16 -#endif /* _PPC64_HVCONSOLE_H */ +extern int hvc_get_chars(uint32_t vtermno, char *buf, int count); +extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count); + +/* Early discovery of console adapters. */ +extern int hvc_find_vtys(void); +/* Implemented by a console driver */ +extern int hvc_instantiate(uint32_t vtermno, int index); +#endif /* _PPC64_HVCONSOLE_H */ diff -Nru a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h --- a/include/asm-ppc64/lmb.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ppc64/lmb.h 2004-09-06 16:37:54 -07:00 @@ -47,7 +47,7 @@ struct lmb_region reserved; }; -extern struct lmb lmb __initdata; +extern struct lmb lmb; extern void __init lmb_init(void); extern void __init lmb_analyze(void); diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h --- a/include/asm-ppc64/mmu.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ppc64/mmu.h 2004-09-06 16:37:53 -07:00 @@ -27,16 +27,6 @@ #endif } mm_context_t; -#ifdef CONFIG_HUGETLB_PAGE -#define KERNEL_LOW_HPAGES .htlb_segs = 0, -#else -#define KERNEL_LOW_HPAGES -#endif - -#define KERNEL_CONTEXT(ea) ({ \ - mm_context_t ctx = { .id = REGION_ID(ea), KERNEL_LOW_HPAGES}; \ - ctx; }) - #define STE_ESID_V 0x80 #define STE_ESID_KS 0x20 #define STE_ESID_KP 0x10 @@ -208,7 +198,7 @@ #define STAB0_PHYS_ADDR (STAB0_PAGE<node_start_pfn) diff -Nru a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h --- a/include/asm-ppc64/paca.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ppc64/paca.h 2004-09-06 16:37:52 -07:00 @@ -105,21 +105,6 @@ */ struct ItLpPaca lppaca __attribute__((aligned(0x80))); struct ItLpRegSave reg_save; - - /* - * iSeries profiling support - * - * FIXME: do we still want this, or can we ditch it in favour - * of oprofile? - */ - u32 *prof_buffer; /* iSeries profiling buffer */ - u32 *prof_stext; /* iSeries start of kernel text */ - u32 prof_multiplier; - u32 prof_counter; - u32 prof_shift; /* iSeries shift for profile - * bucket size */ - u32 prof_len; /* iSeries length of profile */ - u8 prof_enabled; /* 1=iSeries profiling enabled */ }; #endif /* _PPC64_PACA_H */ diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h --- a/include/asm-ppc64/page.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc64/page.h 2004-09-06 16:37:50 -07:00 @@ -181,8 +181,7 @@ #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) -/* Not 100% correct, for use by /dev/mem only */ -extern int page_is_ram(unsigned long physaddr); +extern int page_is_ram(unsigned long pfn); #endif /* __ASSEMBLY__ */ @@ -240,6 +239,7 @@ #endif #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) +#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) diff -Nru a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h --- a/include/asm-ppc64/pgalloc.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc64/pgalloc.h 2004-09-06 16:37:50 -07:00 @@ -7,6 +7,7 @@ #include #include #include +#include extern kmem_cache_t *zero_cache; diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ppc64/pgtable.h 2004-09-06 16:37:55 -07:00 @@ -167,6 +167,7 @@ #endif /* __ASSEMBLY__ */ #define HAVE_ARCH_UNMAPPED_AREA +#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN #else #define hash_huge_page(mm,a,ea,vsid,local) -1 diff -Nru a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h --- a/include/asm-ppc64/processor.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc64/processor.h 2004-09-06 16:37:50 -07:00 @@ -20,12 +20,6 @@ #include #include -/* - * Default implementation of macro that returns current - * instruction pointer ("program counter"). - */ -#define current_text_addr() ({ __label__ _l; _l: &&_l;}) - /* Machine State Register (MSR) Fields */ #define MSR_SF_LG 63 /* Enable 64 bit mode */ #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ @@ -410,6 +404,12 @@ #define XGLUE(a,b) a##b #define GLUE(a,b) XGLUE(a,b) +/* iSeries CTRL register (for runlatch) */ + +#define CTRLT 0x098 +#define CTRLF 0x088 +#define RUNLATCH 0x0001 + #ifdef __ASSEMBLY__ #define _GLOBAL(name) \ @@ -438,8 +438,13 @@ .type GLUE(.,name),@function; \ GLUE(.,name): -#endif /* __ASSEMBLY__ */ +#else /* __ASSEMBLY__ */ +/* + * Default implementation of macro that returns current + * instruction pointer ("program counter"). + */ +#define current_text_addr() ({ __label__ _l; _l: &&_l;}) /* Macros for setting and retrieving special purpose registers */ @@ -461,20 +466,9 @@ #define mttbl(v) asm volatile("mttbl %0":: "r"(v)) #define mttbu(v) asm volatile("mttbu %0":: "r"(v)) -/* iSeries CTRL register (for runlatch) */ - -#define CTRLT 0x098 -#define CTRLF 0x088 -#define RUNLATCH 0x0001 - -/* Size of an exception stack frame contained in the paca. */ -#define EXC_FRAME_SIZE 64 - #define mfasr() ({unsigned long rval; \ asm volatile("mfasr %0" : "=r" (rval)); rval;}) -#ifndef __ASSEMBLY__ - static inline void set_tb(unsigned int upper, unsigned int lower) { mttbl(0); @@ -485,6 +479,8 @@ #define __get_SP() ({unsigned long sp; \ asm volatile("mr %0,1": "=r" (sp)); sp;}) +#ifdef __KERNEL__ + extern int have_of; struct task_struct; @@ -507,8 +503,6 @@ extern struct task_struct *last_task_used_math; extern struct task_struct *last_task_used_altivec; - -#ifdef __KERNEL__ /* 64-bit user address space is 41-bits (2TBs user VM) */ #define TASK_SIZE_USER64 (0x0000020000000000UL) @@ -520,8 +514,6 @@ #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ TASK_SIZE_USER32 : TASK_SIZE_USER64) -#endif /* __KERNEL__ */ - /* This decides where the kernel will search for a free chunk of vm * space during mmap's. @@ -538,6 +530,7 @@ struct thread_struct { unsigned long ksp; /* Kernel stack pointer */ + unsigned long ksp_vsid; struct pt_regs *regs; /* Pointer to saved register state */ mm_segment_t fs; /* for get_fs() validation */ double fpr[32]; /* Complete floating point set */ @@ -626,12 +619,11 @@ #define spin_lock_prefetch(x) prefetchw(x) -#ifdef CONFIG_SCHED_SMT -#define ARCH_HAS_SCHED_DOMAIN -#define ARCH_HAS_SCHED_WAKE_IDLE -#endif +#define HAVE_ARCH_PICK_MMAP_LAYOUT + +#endif /* __KERNEL__ */ -#endif /* ASSEMBLY */ +#endif /* __ASSEMBLY__ */ /* * Number of entries in the SLB. If this ever changes we should handle diff -Nru a/include/asm-ppc64/ptrace.h b/include/asm-ppc64/ptrace.h --- a/include/asm-ppc64/ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-ppc64/ptrace.h 2004-09-06 16:37:54 -07:00 @@ -60,15 +60,21 @@ PPC_REG_32 result; /* Result of a system call */ }; +#define instruction_pointer(regs) ((regs)->nip) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) #endif +#endif /* __ASSEMBLY__ */ + #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ /* Size of dummy stack frame allocated when calling signal handler. */ #define __SIGNAL_FRAMESIZE 128 #define __SIGNAL_FRAMESIZE32 64 -#define instruction_pointer(regs) ((regs)->nip) #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) #define force_successful_syscall_return() \ diff -Nru a/include/asm-ppc64/rtas.h b/include/asm-ppc64/rtas.h --- a/include/asm-ppc64/rtas.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ppc64/rtas.h 2004-09-06 16:37:55 -07:00 @@ -211,8 +211,14 @@ #define RTAS_DEBUG KERN_DEBUG "RTAS: " #define RTAS_ERROR_LOG_MAX 2048 - - + +/* + * Return the firmware-specified size of the error log buffer + * for all rtas calls that require an error buffer argument. + * This includes 'check-exception' and 'rtas-last-error'. + */ +extern int rtas_get_error_log_max(void); + /* Event Scan Parameters */ #define EVENT_SCAN_ALL_EVENTS 0xf0000000 #define SURVEILLANCE_TOKEN 9000 diff -Nru a/include/asm-ppc64/semaphore.h b/include/asm-ppc64/semaphore.h --- a/include/asm-ppc64/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-ppc64/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -23,22 +23,13 @@ */ atomic_t count; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name, count) \ - { ATOMIC_INIT(count), \ - __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name, 1) @@ -53,9 +44,6 @@ { atomic_set(&sem->count, val); init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -74,9 +62,6 @@ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); /* @@ -90,9 +75,6 @@ { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (unlikely(atomic_dec_return(&sem->count) < 0)) @@ -102,19 +84,11 @@ static inline int down_trylock(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - return atomic_dec_if_positive(&sem->count) < 0; } static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - if (unlikely(atomic_inc_return(&sem->count) <= 0)) __up(sem); } diff -Nru a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h --- a/include/asm-ppc64/smp.h 2004-09-06 16:37:49 -07:00 +++ b/include/asm-ppc64/smp.h 2004-09-06 16:37:49 -07:00 @@ -36,6 +36,8 @@ #define smp_processor_id() (get_paca()->paca_index) #define hard_smp_processor_id() (get_paca()->hw_cpu_id) +extern cpumask_t cpu_sibling_map[NR_CPUS]; + /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. * * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up @@ -61,7 +63,7 @@ #define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id) #define set_hard_smp_processor_id(CPU, VAL) \ - do { (paca[(CPU)].hw_proc_num = (VAL)); } while (0) + do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0) #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h --- a/include/asm-ppc64/spinlock.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-ppc64/spinlock.h 2004-09-06 16:37:50 -07:00 @@ -6,6 +6,8 @@ * * Copyright (C) 2001-2004 Paul Mackerras , IBM * Copyright (C) 2001 Anton Blanchard , IBM + * Copyright (C) 2002 Dave Engebretsen , IBM + * Rework to support virtual processors * * Type of int is used as a full 64b word is not necessary. * @@ -16,6 +18,8 @@ */ #include #include +#include +#include typedef struct { volatile unsigned int lock; @@ -34,101 +38,91 @@ } /* - * Normally we use the spinlock functions in arch/ppc64/lib/locks.c. - * For special applications such as profiling, we can have the - * spinlock functions inline by defining CONFIG_SPINLINE. - * This is not recommended on partitioned systems with shared - * processors, since the inline spinlock functions don't include - * the code for yielding the CPU to the lock holder. + * On a system with shared processors (that is, where a physical + * processor is multiplexed between several virtual processors), + * there is no point spinning on a lock if the holder of the lock + * isn't currently scheduled on a physical processor. Instead + * we detect this situation and ask the hypervisor to give the + * rest of our timeslice to the lock holder. + * + * So that we can tell which virtual processor is holding a lock, + * we put 0x80000000 | smp_processor_id() in the lock when it is + * held. Conveniently, we have a word in the paca that holds this + * value. */ -#ifndef CONFIG_SPINLINE -extern int _raw_spin_trylock(spinlock_t *lock); -extern void _raw_spin_lock(spinlock_t *lock); -extern void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags); +#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) +/* We only yield to the hypervisor if we are in shared processor mode */ +#define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc) +extern void __spin_yield(spinlock_t *lock); +extern void __rw_yield(spinlock_t *lock); +#else /* SPLPAR || ISERIES */ +#define __spin_yield(x) barrier() +#define __rw_yield(x) barrier() +#define SHARED_PROCESSOR 0 +#endif extern void spin_unlock_wait(spinlock_t *lock); -#else - -static __inline__ int _raw_spin_trylock(spinlock_t *lock) +/* + * This returns the old value in the lock, so we succeeded + * in getting the lock if the return value is 0. + */ +static __inline__ unsigned long __spin_trylock(spinlock_t *lock) { - unsigned int tmp, tmp2; + unsigned long tmp, tmp2; __asm__ __volatile__( -"1: lwarx %0,0,%2 # spin_trylock\n\ +" lwz %1,%3(13) # __spin_trylock\n\ +1: lwarx %0,0,%2\n\ cmpwi 0,%0,0\n\ bne- 2f\n\ - lwz %1,%3(13)\n\ stwcx. %1,0,%2\n\ bne- 1b\n\ isync\n\ -2:" : "=&r"(tmp), "=&r"(tmp2) - : "r"(&lock->lock), "i"(offsetof(struct paca_struct, lock_token)) +2:" : "=&r" (tmp), "=&r" (tmp2) + : "r" (&lock->lock), "i" (offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); - return tmp == 0; + return tmp; } -static __inline__ void _raw_spin_lock(spinlock_t *lock) +static int __inline__ _raw_spin_trylock(spinlock_t *lock) { - unsigned int tmp; - - __asm__ __volatile__( - "b 2f # spin_lock\n\ -1:" - HMT_LOW -" lwzx %0,0,%1\n\ - cmpwi 0,%0,0\n\ - bne+ 1b\n" - HMT_MEDIUM -"2: lwarx %0,0,%1\n\ - cmpwi 0,%0,0\n\ - bne- 1b\n\ - lwz %0,%2(13)\n\ - stwcx. %0,0,%1\n\ - bne- 2b\n\ - isync" - : "=&r"(tmp) - : "r"(&lock->lock), "i"(offsetof(struct paca_struct, lock_token)) - : "cr0", "memory"); + return __spin_trylock(lock) == 0; } -/* - * Note: if we ever want to inline the spinlocks on iSeries, - * we will have to change the irq enable/disable stuff in here. - */ -static __inline__ void _raw_spin_lock_flags(spinlock_t *lock, - unsigned long flags) +static void __inline__ _raw_spin_lock(spinlock_t *lock) { - unsigned int tmp; - unsigned long tmp2; - - __asm__ __volatile__( - "b 3f # spin_lock\n\ -1: mfmsr %1\n\ - mtmsrd %3,1\n\ -2:" HMT_LOW -" lwzx %0,0,%2\n\ - cmpwi 0,%0,0\n\ - bne+ 2b\n" - HMT_MEDIUM -" mtmsrd %1,1\n\ -3: lwarx %0,0,%2\n\ - cmpwi 0,%0,0\n\ - bne- 1b\n\ - lwz %1,%4(13)\n\ - stwcx. %1,0,%2\n\ - bne- 3b\n\ - isync" - : "=&r"(tmp), "=&r"(tmp2) - : "r"(&lock->lock), "r"(flags), - "i" (offsetof(struct paca_struct, lock_token)) - : "cr0", "memory"); + while (1) { + if (likely(__spin_trylock(lock) == 0)) + break; + do { + HMT_low(); + if (SHARED_PROCESSOR) + __spin_yield(lock); + } while (likely(lock->lock != 0)); + HMT_medium(); + } } -#define spin_unlock_wait(x) do { cpu_relax(); } while (spin_is_locked(x)) +static void __inline__ _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags) +{ + unsigned long flags_dis; -#endif /* CONFIG_SPINLINE */ + while (1) { + if (likely(__spin_trylock(lock) == 0)) + break; + local_save_flags(flags_dis); + local_irq_restore(flags); + do { + HMT_low(); + if (SHARED_PROCESSOR) + __spin_yield(lock); + } while (likely(lock->lock != 0)); + HMT_medium(); + local_irq_restore(flags_dis); + } +} /* * Read-write spinlocks, allowing multiple readers @@ -165,67 +159,54 @@ rw->lock = 0; } -#ifndef CONFIG_SPINLINE -extern int _raw_read_trylock(rwlock_t *rw); -extern void _raw_read_lock(rwlock_t *rw); -extern void _raw_read_unlock(rwlock_t *rw); -extern int _raw_write_trylock(rwlock_t *rw); -extern void _raw_write_lock(rwlock_t *rw); -extern void _raw_write_unlock(rwlock_t *rw); - -#else -static __inline__ int _raw_read_trylock(rwlock_t *rw) +/* + * This returns the old value in the lock + 1, + * so we got a read lock if the return value is > 0. + */ +static long __inline__ __read_trylock(rwlock_t *rw) { - unsigned int tmp; - unsigned int ret; + long tmp; __asm__ __volatile__( -"1: lwarx %0,0,%2 # read_trylock\n\ - li %1,0\n\ +"1: lwarx %0,0,%1 # read_trylock\n\ extsw %0,%0\n\ addic. %0,%0,1\n\ ble- 2f\n\ - stwcx. %0,0,%2\n\ + stwcx. %0,0,%1\n\ bne- 1b\n\ - li %1,1\n\ isync\n\ -2:" : "=&r"(tmp), "=&r"(ret) - : "r"(&rw->lock) - : "cr0", "memory"); +2:" : "=&r" (tmp) + : "r" (&rw->lock) + : "cr0", "xer", "memory"); - return ret; + return tmp; } -static __inline__ void _raw_read_lock(rwlock_t *rw) +static int __inline__ _raw_read_trylock(rwlock_t *rw) { - unsigned int tmp; + return __read_trylock(rw) > 0; +} - __asm__ __volatile__( - "b 2f # read_lock\n\ -1:" - HMT_LOW -" lwax %0,0,%1\n\ - cmpwi 0,%0,0\n\ - blt+ 1b\n" - HMT_MEDIUM -"2: lwarx %0,0,%1\n\ - extsw %0,%0\n\ - addic. %0,%0,1\n\ - ble- 1b\n\ - stwcx. %0,0,%1\n\ - bne- 2b\n\ - isync" - : "=&r"(tmp) - : "r"(&rw->lock) - : "cr0", "memory"); +static void __inline__ _raw_read_lock(rwlock_t *rw) +{ + while (1) { + if (likely(__read_trylock(rw) > 0)) + break; + do { + HMT_low(); + if (SHARED_PROCESSOR) + __rw_yield(rw); + } while (likely(rw->lock < 0)); + HMT_medium(); + } } -static __inline__ void _raw_read_unlock(rwlock_t *rw) +static void __inline__ _raw_read_unlock(rwlock_t *rw) { - unsigned int tmp; + long tmp; __asm__ __volatile__( - "lwsync # read_unlock\n\ + "eieio # read_unlock\n\ 1: lwarx %0,0,%1\n\ addic %0,%0,-1\n\ stwcx. %0,0,%1\n\ @@ -235,50 +216,47 @@ : "cr0", "memory"); } -static __inline__ int _raw_write_trylock(rwlock_t *rw) +/* + * This returns the old value in the lock, + * so we got the write lock if the return value is 0. + */ +static __inline__ long __write_trylock(rwlock_t *rw) { - unsigned int tmp; - unsigned int ret; + long tmp, tmp2; __asm__ __volatile__( -"1: lwarx %0,0,%2 # write_trylock\n\ +" lwz %1,%3(13) # write_trylock\n\ +1: lwarx %0,0,%2\n\ cmpwi 0,%0,0\n\ - li %1,0\n\ bne- 2f\n\ - stwcx. %3,0,%2\n\ + stwcx. %1,0,%2\n\ bne- 1b\n\ - li %1,1\n\ isync\n\ -2:" : "=&r"(tmp), "=&r"(ret) - : "r"(&rw->lock), "r"(-1) +2:" : "=&r" (tmp), "=&r" (tmp2) + : "r" (&rw->lock), "i" (offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); - return ret; + return tmp; } -static __inline__ void _raw_write_lock(rwlock_t *rw) +static int __inline__ _raw_write_trylock(rwlock_t *rw) { - unsigned int tmp; + return __write_trylock(rw) == 0; +} - __asm__ __volatile__( - "b 2f # write_lock\n\ -1:" - HMT_LOW - "lwax %0,0,%1\n\ - cmpwi 0,%0,0\n\ - bne+ 1b\n" - HMT_MEDIUM -"2: lwarx %0,0,%1\n\ - cmpwi 0,%0,0\n\ - bne- 1b\n\ - stwcx. %2,0,%1\n\ - bne- 2b\n\ - isync" - : "=&r"(tmp) - : "r"(&rw->lock), "r"(-1) - : "cr0", "memory"); +static void __inline__ _raw_write_lock(rwlock_t *rw) +{ + while (1) { + if (likely(__write_trylock(rw) == 0)) + break; + do { + HMT_low(); + if (SHARED_PROCESSOR) + __rw_yield(rw); + } while (likely(rw->lock != 0)); + HMT_medium(); + } } -#endif /* CONFIG_SPINLINE */ #endif /* __KERNEL__ */ #endif /* __ASM_SPINLOCK_H */ diff -Nru a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h --- a/include/asm-ppc64/system.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-ppc64/system.h 2004-09-06 16:37:55 -07:00 @@ -105,6 +105,7 @@ extern void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig); extern void show_regs(struct pt_regs * regs); +extern void low_hash_fault(struct pt_regs *regs, unsigned long address); extern int die(const char *str, struct pt_regs *regs, long err); extern void flush_instruction_cache(void); diff -Nru a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h --- a/include/asm-ppc64/uaccess.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-ppc64/uaccess.h 2004-09-06 16:37:53 -07:00 @@ -111,6 +111,9 @@ #define __put_user(x,ptr) \ __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) +#define __get_user_unaligned __get_user +#define __put_user_unaligned __put_user + extern long __put_user_bad(void); #define __put_user_nocheck(x,ptr,size) \ @@ -280,6 +283,9 @@ unsigned long n); extern unsigned long __clear_user(void __user *addr, unsigned long size); + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user static inline unsigned long clear_user(void __user *addr, unsigned long size) diff -Nru a/include/asm-s390/idals.h b/include/asm-s390/idals.h --- a/include/asm-s390/idals.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-s390/idals.h 2004-09-06 16:37:50 -07:00 @@ -35,7 +35,7 @@ idal_is_needed(void *vaddr, unsigned int length) { #ifdef __s390x__ - return ((__pa(vaddr) + length) >> 31) != 0; + return ((__pa(vaddr) + length - 1) >> 31) != 0; #else return 0; #endif diff -Nru a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h --- a/include/asm-s390/lowcore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-s390/lowcore.h 2004-09-06 16:37:52 -07:00 @@ -68,6 +68,7 @@ #define __LC_ASYNC_STACK 0xC48 #define __LC_KERNEL_ASCE 0xC4C #define __LC_USER_ASCE 0xC50 +#define __LC_PANIC_STACK 0xC54 #define __LC_CPUID 0xC60 #define __LC_CPUADDR 0xC68 #define __LC_IPLDEV 0xC7C @@ -80,6 +81,7 @@ #define __LC_ASYNC_STACK 0xD50 #define __LC_KERNEL_ASCE 0xD58 #define __LC_USER_ASCE 0xD60 +#define __LC_PANIC_STACK 0xD68 #define __LC_CPUID 0xD90 #define __LC_CPUADDR 0xD98 #define __LC_IPLDEV 0xDB8 @@ -176,7 +178,8 @@ __u32 async_stack; /* 0xc48 */ __u32 kernel_asce; /* 0xc4c */ __u32 user_asce; /* 0xc50 */ - __u8 pad10[0xc60-0xc54]; /* 0xc54 */ + __u32 panic_stack; /* 0xc54 */ + __u8 pad10[0xc60-0xc58]; /* 0xc58 */ /* entry.S sensitive area start */ struct cpuinfo_S390 cpu_data; /* 0xc60 */ __u32 ipl_device; /* 0xc7c */ @@ -257,7 +260,8 @@ __u64 async_stack; /* 0xd50 */ __u64 kernel_asce; /* 0xd58 */ __u64 user_asce; /* 0xd60 */ - __u8 pad10[0xd80-0xd68]; /* 0xd68 */ + __u64 panic_stack; /* 0xd68 */ + __u8 pad10[0xd80-0xd70]; /* 0xd70 */ /* entry.S sensitive area start */ struct cpuinfo_S390 cpu_data; /* 0xd80 */ __u32 ipl_device; /* 0xdb8 */ diff -Nru a/include/asm-s390/processor.h b/include/asm-s390/processor.h --- a/include/asm-s390/processor.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-s390/processor.h 2004-09-06 16:37:52 -07:00 @@ -76,6 +76,8 @@ #define MM_VM_SIZE(mm) DEFAULT_TASK_SIZE +#define HAVE_ARCH_PICK_MMAP_LAYOUT + typedef struct { __u32 ar4; } mm_segment_t; @@ -100,6 +102,25 @@ }; typedef struct thread_struct thread_struct; + +/* + * Stack layout of a C stack frame. + */ +#ifndef __PACK_STACK +struct stack_frame { + unsigned long back_chain; + unsigned long empty1[5]; + unsigned long gprs[10]; + unsigned int empty2[8]; +}; +#else +struct stack_frame { + unsigned long empty1[5]; + unsigned int empty2[8]; + unsigned long gprs[10]; + unsigned long back_chain; +}; +#endif #define ARCH_MIN_TASKALIGN 8 diff -Nru a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h --- a/include/asm-s390/ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-s390/ptrace.h 2004-09-06 16:37:54 -07:00 @@ -466,6 +466,7 @@ #ifdef __KERNEL__ #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs * regs); #endif diff -Nru a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h --- a/include/asm-s390/thread_info.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-s390/thread_info.h 2004-09-06 16:37:53 -07:00 @@ -11,6 +11,30 @@ #ifdef __KERNEL__ +/* + * Size of kernel stack for each process + */ +#ifndef __s390x__ +#ifndef __SMALL_STACK +#define THREAD_ORDER 1 +#define ASYNC_ORDER 1 +#else +#define THREAD_ORDER 0 +#define ASYNC_ORDER 0 +#endif +#else /* __s390x__ */ +#ifndef __SMALL_STACK_STACK +#define THREAD_ORDER 2 +#define ASYNC_ORDER 2 +#else +#define THREAD_ORDER 1 +#define ASYNC_ORDER 1 +#endif +#endif /* __s390x__ */ + +#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) +#define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER) + #ifndef __ASSEMBLY__ #include #include @@ -46,20 +70,6 @@ #define init_thread_info (init_thread_union.thread_info) #define init_stack (init_thread_union.stack) - -/* - * Size of kernel stack for each process - */ -#ifndef __s390x__ -#define THREAD_ORDER 1 -#define ASYNC_ORDER 1 -#else /* __s390x__ */ -#define THREAD_ORDER 2 -#define ASYNC_ORDER 2 -#endif /* __s390x__ */ - -#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) -#define ASYNC_SIZE (PAGE_SIZE << ASYNC_ORDER) /* how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) diff -Nru a/include/asm-s390/timer.h b/include/asm-s390/timer.h --- a/include/asm-s390/timer.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-s390/timer.h 2004-09-06 16:37:51 -07:00 @@ -45,6 +45,4 @@ extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); extern int del_virt_timer(struct vtimer_list *timer); -int stop_timers(void); - #endif diff -Nru a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h --- a/include/asm-s390/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-s390/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -250,6 +250,9 @@ extern int __get_user_bad(void); +#define __put_user_unaligned __put_user +#define __get_user_unaligned __get_user + extern long __copy_to_user_asm(const void *from, long n, void __user *to); /** @@ -271,6 +274,9 @@ { return __copy_to_user_asm(from, n, to); } + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user /** * copy_to_user: - Copy a block of data into user space. diff -Nru a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h --- a/include/asm-sh/ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-sh/ptrace.h 2004-09-06 16:37:54 -07:00 @@ -90,6 +90,15 @@ #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define instruction_pointer(regs) ((regs)->pc) extern void show_regs(struct pt_regs *); + +static inline unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (pc >= 0xa0000000UL && pc < 0xc0000000UL) + pc -= 0x20000000; + return pc; +} #endif #endif /* __ASM_SH_PTRACE_H */ diff -Nru a/include/asm-sh/semaphore.h b/include/asm-sh/semaphore.h --- a/include/asm-sh/semaphore.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-sh/semaphore.h 2004-09-06 16:37:55 -07:00 @@ -24,21 +24,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -60,9 +53,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -91,10 +81,6 @@ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - might_sleep(); if (atomic_dec_return(&sem->count) < 0) __down(sem); @@ -103,9 +89,6 @@ static inline int down_interruptible(struct semaphore * sem) { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); if (atomic_dec_return(&sem->count) < 0) @@ -116,9 +99,6 @@ static inline int down_trylock(struct semaphore * sem) { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_trylock(sem); @@ -131,9 +111,6 @@ */ static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_inc_return(&sem->count) <= 0) __up(sem); } diff -Nru a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h --- a/include/asm-sh/uaccess.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-sh/uaccess.h 2004-09-06 16:37:52 -07:00 @@ -446,6 +446,10 @@ __copy_user((void *)(to), \ (void *)(from), n) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + + #define copy_from_user(to,from,n) ({ \ void *__copy_to = (void *) (to); \ void *__copy_from = (void *) (from); \ diff -Nru a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h --- a/include/asm-sh64/ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-sh64/ptrace.h 2004-09-06 16:37:54 -07:00 @@ -28,6 +28,7 @@ #ifdef __KERNEL__ #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif diff -Nru a/include/asm-sh64/semaphore.h b/include/asm-sh64/semaphore.h --- a/include/asm-sh64/semaphore.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-sh64/semaphore.h 2004-09-06 16:37:52 -07:00 @@ -31,21 +31,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -67,9 +60,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -98,10 +88,6 @@ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - if (atomic_dec_return(&sem->count) < 0) __down(sem); } @@ -109,9 +95,6 @@ static inline int down_interruptible(struct semaphore * sem) { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_interruptible(sem); @@ -121,9 +104,6 @@ static inline int down_trylock(struct semaphore * sem) { int ret = 0; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_dec_return(&sem->count) < 0) ret = __down_trylock(sem); @@ -136,9 +116,6 @@ */ static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif if (atomic_inc_return(&sem->count) <= 0) __up(sem); } diff -Nru a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h --- a/include/asm-sh64/uaccess.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sh64/uaccess.h 2004-09-06 16:37:51 -07:00 @@ -261,6 +261,9 @@ return retval; \ }) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + /* XXX: Not sure it works well.. should be such that: 4byte clear and the rest. */ extern __kernel_size_t __clear_user(void *addr, __kernel_size_t size); diff -Nru a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h --- a/include/asm-sparc/ptrace.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-sparc/ptrace.h 2004-09-06 16:37:54 -07:00 @@ -62,6 +62,7 @@ #ifdef __KERNEL__ #define user_mode(regs) (!((regs)->psr & PSR_PS)) #define instruction_pointer(regs) ((regs)->pc) +unsigned long profile_pc(struct pt_regs *); extern void show_regs(struct pt_regs *); #endif diff -Nru a/include/asm-sparc/semaphore.h b/include/asm-sparc/semaphore.h --- a/include/asm-sparc/semaphore.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-sparc/semaphore.h 2004-09-06 16:37:55 -07:00 @@ -13,21 +13,14 @@ atomic24_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (long)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC24_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC24_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -43,9 +36,6 @@ atomic24_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (long)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -68,9 +58,6 @@ register volatile int *ptr asm("g1"); register int increment asm("g2"); -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); ptr = &(sem->count.counter); @@ -105,9 +92,6 @@ register volatile int *ptr asm("g1"); register int increment asm("g2"); -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); ptr = &(sem->count.counter); @@ -145,10 +129,6 @@ register volatile int *ptr asm("g1"); register int increment asm("g2"); -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - ptr = &(sem->count.counter); increment = 1; @@ -183,10 +163,6 @@ { register volatile int *ptr asm("g1"); register int increment asm("g2"); - -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif ptr = &(sem->count.counter); increment = 1; diff -Nru a/include/asm-sparc/sigcontext.h b/include/asm-sparc/sigcontext.h --- a/include/asm-sparc/sigcontext.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sparc/sigcontext.h 2004-09-06 16:37:51 -07:00 @@ -57,20 +57,6 @@ } si_fpqueue [16]; } __siginfo_fpu_t; -#ifdef __KERNEL__ - -/* This magic should be in g_upper[0] for all upper parts - to be valid. - This is generated by sparc64 only, but for 32bit processes, - so we define it here as well. */ -#define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269 -typedef struct { - unsigned int g_upper[8]; - unsigned int o_upper[8]; -} siginfo_extra_v8plus_t; - -#endif - #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC_SIGCONTEXT_H) */ diff -Nru a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h --- a/include/asm-sparc/uaccess.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-sparc/uaccess.h 2004-09-06 16:37:54 -07:00 @@ -322,6 +322,9 @@ return __copy_user((void __user *) to, from, n); } +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + static inline unsigned long __clear_user(void __user *addr, unsigned long size) { unsigned long ret; diff -Nru a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h --- a/include/asm-sparc/unistd.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-sparc/unistd.h 2004-09-06 16:37:50 -07:00 @@ -290,11 +290,12 @@ #define __NR_io_cancel 271 #define __NR_io_getevents 272 #define __NR_mq_open 273 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#define __NR_waitid 279 /* WARNING: You MAY NOT add syscall numbers larger than 282, since * all of the syscall tables in the Sparc kernel are diff -Nru a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h --- a/include/asm-sparc64/delay.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-sparc64/delay.h 2004-09-06 16:37:53 -07:00 @@ -1,7 +1,11 @@ -/* $Id: delay.h,v 1.13 2002/02/02 03:33:48 kanoj Exp $ - * delay.h: Linux delay routines on the V9. +/* delay.h: Linux delay routines on sparc64. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu). + * Copyright (C) 1996, 2004 David S. Miller (davem@davemloft.net). + * + * Based heavily upon x86 variant which is: + * Copyright (C) 1993 Linus Torvalds + * + * Delay routines calling functions in arch/sparc64/lib/delay.c */ #ifndef __SPARC64_DELAY_H @@ -13,50 +17,21 @@ #ifndef __ASSEMBLY__ -static __inline__ void __delay(unsigned long loops) -{ - __asm__ __volatile__( -" b,pt %%xcc, 1f\n" -" cmp %0, 0\n" -" .align 32\n" -"1:\n" -" bne,pt %%xcc, 1b\n" -" subcc %0, 1, %0\n" - : "=&r" (loops) - : "0" (loops) - : "cc"); -} - -static __inline__ void __udelay(unsigned long usecs, unsigned long lps) -{ - usecs *= 0x00000000000010c6UL; /* 2**32 / 1000000 */ - - __asm__ __volatile__( -" mulx %1, %2, %0\n" -" srlx %0, 32, %0\n" - : "=r" (usecs) - : "r" (usecs), "r" (lps)); - - __delay(usecs * HZ); -} - -extern __inline__ void __ndelay(unsigned long usecs, unsigned long lps) -{ - usecs *= 0x0000000000000005UL; /* 2**32 / 10000 */ - - __asm__ __volatile__( -" mulx %1, %2, %0\n" -" srlx %0, 32, %0\n" - : "=r" (usecs) - : "r" (usecs), "r" (lps)); - - __delay(usecs * HZ); -} - -#define __udelay_val cpu_data(smp_processor_id()).udelay_val +extern void __bad_udelay(void); +extern void __bad_ndelay(void); -#define udelay(usecs) __udelay((usecs),__udelay_val) -#define ndelay(usecs) __ndelay((usecs),__udelay_val) +extern void __udelay(unsigned long usecs); +extern void __ndelay(unsigned long nsecs); +extern void __const_udelay(unsigned long usecs); +extern void __delay(unsigned long loops); + +#define udelay(n) (__builtin_constant_p(n) ? \ + ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \ + __udelay(n)) + +#define ndelay(n) (__builtin_constant_p(n) ? \ + ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ + __ndelay(n)) #endif /* !__ASSEMBLY__ */ diff -Nru a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h --- a/include/asm-sparc64/kdebug.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-sparc64/kdebug.h 2004-09-06 16:37:55 -07:00 @@ -1,9 +1,52 @@ #ifndef _SPARC64_KDEBUG_H #define _SPARC64_KDEBUG_H -/* - * No kernel debugger on sparc64. Kept here because drivers/sbus/char/ - * includes it for sparc32 sake. +/* Nearly identical to x86_64/i386 code. */ + +#include + +struct pt_regs; + +struct die_args { + struct pt_regs *regs; + const char *str; + long err; + int trapnr; + int signr; +}; + +/* Note - you should never unregister because that can race with NMIs. + * If you really want to do it first unregister - then synchronize_kernel + * - then free. */ +int register_die_notifier(struct notifier_block *nb); +extern struct notifier_block *sparc64die_chain; + +extern void bad_trap(struct pt_regs *, long); + +/* Grossly misnamed. */ +enum die_val { + DIE_OOPS = 1, + DIE_DEBUG, /* ta 0x70 */ + DIE_DEBUG_2, /* ta 0x71 */ + DIE_DIE, + DIE_TRAP, + DIE_TRAP_TL1, + DIE_GPF, + DIE_CALL, + DIE_PAGE_FAULT, +}; + +static inline int notify_die(enum die_val val,char *str, struct pt_regs *regs, + long err, int trap, int sig) +{ + struct die_args args = { .regs = regs, + .str = str, + .err = err, + .trapnr = trap, + .signr = sig }; + + return notifier_call_chain(&sparc64die_chain, val, &args); +} #endif diff -Nru a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-sparc64/kprobes.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,24 @@ +#ifndef _SPARC64_KPROBES_H +#define _SPARC64_KPROBES_H + +#include +#include + +typedef u32 kprobe_opcode_t; + +#define BREAKPOINT_INSTRUCTION 0x91d02070 /* ta 0x70 */ +#define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ +#define MAX_INSN_SIZE 2 + +#ifdef CONFIG_KPROBES +extern int kprobe_exceptions_notify(struct notifier_block *self, + unsigned long val, void *data); +#else /* !CONFIG_KPROBES */ +static inline int kprobe_exceptions_notify(struct notifier_block *self, + unsigned long val, void *data) +{ + return 0; +} +#endif + +#endif /* _SPARC64_KPROBES_H */ diff -Nru a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h --- a/include/asm-sparc64/ptrace.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-sparc64/ptrace.h 2004-09-06 16:37:53 -07:00 @@ -98,6 +98,11 @@ set_thread_flag(TIF_SYSCALL_SUCCESS) #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) #define instruction_pointer(regs) ((regs)->tpc) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif extern void show_regs(struct pt_regs *); #endif diff -Nru a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h --- a/include/asm-sparc64/sigcontext.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sparc64/sigcontext.h 2004-09-06 16:37:51 -07:00 @@ -83,18 +83,6 @@ unsigned long sigc_mask; }; -#ifdef __KERNEL__ - -/* This magic should be in g_upper[0] for all upper parts - to be valid. */ -#define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269 -typedef struct { - unsigned int g_upper[8]; - unsigned int o_upper[8]; -} siginfo_extra_v8plus_t; - -#endif - #endif /* !(__ASSEMBLY__) */ #endif /* !(__SPARC64_SIGCONTEXT_H) */ diff -Nru a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h --- a/include/asm-sparc64/siginfo.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-sparc64/siginfo.h 2004-09-06 16:37:54 -07:00 @@ -24,57 +24,8 @@ u32 sival_ptr; } sigval_t32; -typedef struct siginfo32 { - int si_signo; - int si_errno; - int si_code; +struct siginfo32; - union { - int _pad[SI_PAD_SIZE32]; - - /* kill() */ - struct { - compat_pid_t _pid; /* sender's pid */ - unsigned int _uid; /* sender's uid */ - } _kill; - - /* POSIX.1b timers */ - struct { - timer_t _tid; /* timer id */ - int _overrun; /* overrun count */ - sigval_t32 _sigval; /* same as below */ - int _sys_private; /* not to be passed to user */ - } _timer; - - /* POSIX.1b signals */ - struct { - compat_pid_t _pid; /* sender's pid */ - unsigned int _uid; /* sender's uid */ - sigval_t32 _sigval; - } _rt; - - /* SIGCHLD */ - struct { - compat_pid_t _pid; /* which child */ - unsigned int _uid; /* sender's uid */ - int _status; /* exit code */ - compat_clock_t _utime; - compat_clock_t _stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */ - struct { - u32 _addr; /* faulting insn/memory ref. */ - int _trapno; - } _sigfault; - - /* SIGPOLL */ - struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ - int _fd; - } _sigpoll; - } _sifields; -} siginfo_t32; #endif /* CONFIG_COMPAT */ #endif /* __KERNEL__ */ @@ -105,7 +56,8 @@ } _sigev_un; } sigevent_t32; -extern int copy_siginfo_to_user32(siginfo_t32 __user *to, siginfo_t *from); +extern int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from); +extern int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from); #endif /* CONFIG_COMPAT */ diff -Nru a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h --- a/include/asm-sparc64/spinlock.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sparc64/spinlock.h 2004-09-06 16:37:51 -07:00 @@ -41,8 +41,20 @@ do { membar("#LoadLoad"); \ } while(*((volatile unsigned char *)lock)) -/* arch/sparc64/lib/spinlock.S */ -extern void _raw_spin_lock(spinlock_t *lock); +static __inline__ void _raw_spin_lock(spinlock_t *lock) +{ + + __asm__ __volatile__("1: ldstub [%0], %%g7\n\t" + "brnz,pn %%g7, 2f\n\t" + "membar #StoreLoad | #StoreStore\n\t" + "b 3f\n\t" + "2: ldub [%0], %%g7\n\t" + "brnz,pt %%g7, 2b\n\t" + "membar #LoadLoad\n\t" + "ba,a,pt %%xcc, 1b\n\t" + "3:\n\t" + : : "r" (lock) : "memory"); +} static __inline__ int _raw_spin_trylock(spinlock_t *lock) { @@ -64,7 +76,22 @@ : "memory"); } -extern void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags); +static __inline__ void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags) +{ + __asm__ __volatile__ ("1:ldstub [%0], %%g7\n\t" + "brnz,pn %%g7, 2f\n\t" + "membar #StoreLoad | #StoreStore\n\t" + "b 4f\n\t" + "2: rdpr %%pil, %%g2 ! Save PIL\n\t" + "wrpr %1, %%pil ! Set previous PIL\n\t" + "3:ldub [%0], %%g7 ! Spin on lock set\n\t" + "brnz,pt %%g7, 3b\n\t" + "membar #LoadLoad\n\t" + "ba,pt %%xcc, 1b ! Retry lock acquire\n\t" + "wrpr %%g2, %%pil ! Restore PIL\n\t" + "4:\n\t" + : : "r"(lock), "r"(flags) : "memory"); +} #else /* !(CONFIG_DEBUG_SPINLOCK) */ @@ -86,9 +113,9 @@ extern void _do_spin_lock (spinlock_t *lock, char *str); extern void _do_spin_unlock (spinlock_t *lock); -extern int _spin_trylock (spinlock_t *lock); +extern int _do_spin_trylock (spinlock_t *lock); -#define _raw_spin_trylock(lp) _spin_trylock(lp) +#define _raw_spin_trylock(lp) _do_spin_trylock(lp) #define _raw_spin_lock(lock) _do_spin_lock(lock, "spin_lock") #define _raw_spin_unlock(lock) _do_spin_unlock(lock) #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) @@ -104,11 +131,86 @@ #define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0) #define rwlock_is_locked(x) (*(x) != RW_LOCK_UNLOCKED) -extern void __read_lock(rwlock_t *); -extern void __read_unlock(rwlock_t *); -extern void __write_lock(rwlock_t *); -extern void __write_unlock(rwlock_t *); -extern int __write_trylock(rwlock_t *); +static void __inline__ __read_lock(rwlock_t *lock) +{ + __asm__ __volatile__ ("b 1f\n\t" + "99:\n\t" + "ldsw [%0], %%g5\n\t" + "brlz,pt %%g5, 99b\n\t" + "membar #LoadLoad\n\t" + "ba,a,pt %%xcc, 4f\n\t" + "1: ldsw [%0], %%g5\n\t" + "brlz,pn %%g5, 99b\n\t" + "4:add %%g5, 1, %%g7\n\t" + "cas [%0], %%g5, %%g7\n\t" + "cmp %%g5, %%g7\n\t" + "bne,pn %%icc, 1b\n\t" + "membar #StoreLoad | #StoreStore\n\t" + : : "r"(lock) : "memory"); +} + +static void __inline__ __read_unlock(rwlock_t *lock) +{ + __asm__ __volatile__ ("1: lduw [%0], %%g5\n\t" + "sub %%g5, 1, %%g7\n\t" + "cas [%0], %%g5, %%g7\n\t" + "cmp %%g5, %%g7\n\t" + "be,pt %%xcc, 2f\n\t" + "membar #StoreLoad | #StoreStore\n\t" + "ba,a,pt %%xcc, 1b\n\t" + "2:\n\t" + : : "r" (lock) : "memory"); +} + +static void __inline__ __write_lock(rwlock_t *lock) +{ + __asm__ __volatile__ ("sethi %%hi(0x80000000), %%g2\n\t" + "b 1f\n\t" + "99:\n\t" + "lduw [%0], %%g5\n\t" + "brnz,pt %%g5, 99b\n\t" + "membar #LoadLoad\n\t" + "ba,a,pt %%xcc, 4f\n\t" + "1: lduw [%0], %%g5\n\t" + "brnz,pn %%g5, 99b\n\t" + "4: or %%g5, %%g2, %%g7\n\t" + "cas [%0], %%g5, %%g7\n\t" + "cmp %%g5, %%g7\n\t" + "be,pt %%icc, 2f\n\t" + "membar #StoreLoad | #StoreStore\n\t" + "ba,a,pt %%xcc, 1b\n\t" + "2:\n\t" + : : "r"(lock) : "memory"); +} + +static void __inline__ __write_unlock(rwlock_t *lock) +{ + __asm__ __volatile__ ("membar #LoadStore | #StoreStore\n\t" + "retl\n\t" + "stw %%g0, [%0]\n\t" + : : "r"(lock) : "memory"); +} + +static int __inline__ __write_trylock(rwlock_t *lock) +{ + __asm__ __volatile__ ("sethi %%hi(0x80000000), %%g2\n\t" + "1: lduw [%0], %%g5\n\t" + "brnz,pn %%g5, 100f\n\t" + "4: or %%g5, %%g2, %%g7\n\t" + "cas [%0], %%g5, %%g7\n\t" + "cmp %%g5, %%g7\n\t" + "be,pt %%icc, 99f\n\t" + "membar #StoreLoad | #StoreStore\n\t" + "ba,pt %%xcc, 1b\n\t" + "99:\n\t" + "retl\n\t" + "mov 1, %0\n\t" + "100:\n\t" + "retl\n\t" + "mov 0, %0\n\t" + : : "r"(lock) : "memory"); + return rwlock_is_locked(lock); +} #define _raw_read_lock(p) __read_lock(p) #define _raw_read_unlock(p) __read_unlock(p) diff -Nru a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h --- a/include/asm-sparc64/ttable.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-sparc64/ttable.h 2004-09-06 16:37:50 -07:00 @@ -176,6 +176,12 @@ ba,pt %xcc, rtrap_clr_l6; \ stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]; +#ifdef CONFIG_KPROBES +#define KPROBES_TRAP(lvl) TRAP_IRQ(kprobe_trap, lvl) +#else +#define KPROBES_TRAP(lvl) TRAP_ARG(bad_trap, lvl) +#endif + /* Before touching these macros, you owe it to yourself to go and * see how arch/sparc64/kernel/winfixup.S works... -DaveM * diff -Nru a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h --- a/include/asm-sparc64/uaccess.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-sparc64/uaccess.h 2004-09-06 16:37:55 -07:00 @@ -14,6 +14,7 @@ #include #include #include +#include #endif #ifndef __ASSEMBLY__ @@ -316,6 +317,8 @@ #define strlen_user __strlen_user #define strnlen_user __strnlen_user +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h --- a/include/asm-sparc64/unistd.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sparc64/unistd.h 2004-09-06 16:37:51 -07:00 @@ -292,11 +292,13 @@ #define __NR_io_cancel 271 #define __NR_io_getevents 272 #define __NR_mq_open 273 -#define __NR_mq_unlink (__NR_mq_open+1) -#define __NR_mq_timedsend (__NR_mq_open+2) -#define __NR_mq_timedreceive (__NR_mq_open+3) -#define __NR_mq_notify (__NR_mq_open+4) -#define __NR_mq_getsetattr (__NR_mq_open+5) +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#define __NR_waitid 279 + /* WARNING: You MAY NOT add syscall numbers larger than 282, since * all of the syscall tables in the Sparc kernel are * sized to have 283 entries (starting at zero). Therefore diff -Nru a/include/asm-sparc64/vga.h b/include/asm-sparc64/vga.h --- a/include/asm-sparc64/vga.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-sparc64/vga.h 2004-09-06 16:37:51 -07:00 @@ -11,6 +11,9 @@ #define VT_BUF_HAVE_RW +#undef scr_writew +#undef scr_readw + static inline void scr_writew(u16 val, u16 *addr) { BUG_ON((long) addr >= 0); diff -Nru a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h --- a/include/asm-um/archparam-i386.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-um/archparam-i386.h 2004-09-06 16:37:54 -07:00 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ @@ -55,6 +55,93 @@ pr_reg[15] = PT_REGS_SP(regs); \ pr_reg[16] = PT_REGS_SS(regs); \ } while(0); + +#if 0 /* Turn this back on when UML has VSYSCALL working */ +#define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) +#else +#define VSYSCALL_BASE 0 +#endif + +#define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) +#define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall) +extern void *__kernel_vsyscall; + +/* + * Architecture-neutral AT_ values in 0-17, leave some room + * for more of them, start the x86-specific ones at 32. + */ +#define AT_SYSINFO 32 +#define AT_SYSINFO_EHDR 33 + +#define ARCH_DLINFO \ +do { \ + NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ +} while (0) + +/* + * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out + * extra segments containing the vsyscall DSO contents. Dumping its + * contents makes post-mortem fully interpretable later without matching up + * the same kernel and hardware config to see what PC values meant. + * Dumping its extra ELF program headers includes all the other information + * a debugger needs to easily find how the vsyscall DSO was being used. + */ +#if 0 +#define ELF_CORE_EXTRA_PHDRS (VSYSCALL_EHDR->e_phnum) +#endif + +#undef ELF_CORE_EXTRA_PHDRS + +#if 0 +#define ELF_CORE_WRITE_EXTRA_PHDRS \ +do { \ + const struct elf_phdr *const vsyscall_phdrs = \ + (const struct elf_phdr *) (VSYSCALL_BASE \ + + VSYSCALL_EHDR->e_phoff); \ + int i; \ + Elf32_Off ofs = 0; \ + for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ + struct elf_phdr phdr = vsyscall_phdrs[i]; \ + if (phdr.p_type == PT_LOAD) { \ + ofs = phdr.p_offset = offset; \ + offset += phdr.p_filesz; \ + } \ + else \ + phdr.p_offset += ofs; \ + phdr.p_paddr = 0; /* match other core phdrs */ \ + DUMP_WRITE(&phdr, sizeof(phdr)); \ + } \ +} while (0) +#define ELF_CORE_WRITE_EXTRA_DATA \ +do { \ + const struct elf_phdr *const vsyscall_phdrs = \ + (const struct elf_phdr *) (VSYSCALL_BASE \ + + VSYSCALL_EHDR->e_phoff); \ + int i; \ + for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ + if (vsyscall_phdrs[i].p_type == PT_LOAD) \ + DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ + vsyscall_phdrs[i].p_filesz); \ + } \ +} while (0) +#endif + +#undef ELF_CORE_WRITE_EXTRA_PHDRS +#undef ELF_CORE_WRITE_EXTRA_DATA + +#define R_386_NONE 0 +#define R_386_32 1 +#define R_386_PC32 2 +#define R_386_GOT32 3 +#define R_386_PLT32 4 +#define R_386_COPY 5 +#define R_386_GLOB_DAT 6 +#define R_386_JMP_SLOT 7 +#define R_386_RELATIVE 8 +#define R_386_GOTOFF 9 +#define R_386_GOTPC 10 +#define R_386_NUM 11 /********* Bits for asm-um/delay.h **********/ diff -Nru a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S --- a/include/asm-um/common.lds.S 2004-09-06 16:37:51 -07:00 +++ b/include/asm-um/common.lds.S 2004-09-06 16:37:51 -07:00 @@ -1,3 +1,5 @@ +#include + .fini : { *(.fini) } =0x9090 _etext = .; PROVIDE (etext = .); @@ -13,18 +15,6 @@ RODATA - __start___ksymtab = .; /* Kernel symbol table */ - __ksymtab : { *(__ksymtab) } - __stop___ksymtab = .; - - __start___gpl_ksymtab = .; /* Kernel symbol table: GPL-only symbols */ - __gpl_ksymtab : { *(__gpl_ksymtab) } - __stop___gpl_ksymtab = .; - - __start___kallsyms = .; /* All kernel symbols */ - __kallsyms : { *(__kallsyms) } - __stop___kallsyms = .; - .unprotected : { *(.unprotected) } . = ALIGN(4096); PROVIDE (_unprotected_end = .); @@ -46,10 +36,6 @@ .init.setup : { *(.init.setup) } __setup_end = .; - __start___param = .; - __param : { *(__param) } - __stop___param = .; - . = ALIGN(32); __per_cpu_start = . ; .data.percpu : { *(.data.percpu) } @@ -67,11 +53,17 @@ } __initcall_end = .; + __con_initcall_start = .; + .con_initcall.init : { *(.con_initcall.init) } + __con_initcall_end = .; + __uml_initcall_start = .; .uml.initcall.init : { *(.uml.initcall.init) } __uml_initcall_end = .; __init_end = .; + SECURITY_INIT + __exitcall_begin = .; .exitcall : { *(.exitcall.exit) } __exitcall_end = .; @@ -80,7 +72,33 @@ .uml.exitcall : { *(.uml.exitcall.exit) } __uml_exitcall_end = .; - . = ALIGN(4096); + . = ALIGN(4); + __alt_instructions = .; + .altinstructions : { *(.altinstructions) } + __alt_instructions_end = .; + .altinstr_replacement : { *(.altinstr_replacement) } + /* .exit.text is discard at runtime, not link time, to deal with references + from .altinstructions and .eh_frame */ + .exit.text : { *(.exit.text) } + .exit.data : { *(.exit.data) } + + __preinit_array_start = .; + .preinit_array : { *(.preinit_array) } + __preinit_array_end = .; + __init_array_start = .; + .init_array : { *(.init_array) } + __init_array_end = .; + __fini_array_start = .; + .fini_array : { *(.fini_array) } + __fini_array_end = .; + + . = ALIGN(4096); __initramfs_start = .; .init.ramfs : { *(.init.ramfs) } __initramfs_end = .; + + /* Sections to be discarded */ + /DISCARD/ : { + *(.exitcall.exit) + } + diff -Nru a/include/asm-um/cpufeature.h b/include/asm-um/cpufeature.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-um/cpufeature.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,6 @@ +#ifndef __UM_CPUFEATURE_H +#define __UM_CPUFEATURE_H + +#include "asm/arch/cpufeature.h" + +#endif diff -Nru a/include/asm-um/current.h b/include/asm-um/current.h --- a/include/asm-um/current.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-um/current.h 2004-09-06 16:37:50 -07:00 @@ -16,8 +16,10 @@ #define CURRENT_THREAD(dummy) (((unsigned long) &dummy) & \ (PAGE_MASK << CONFIG_KERNEL_STACK_ORDER)) -#define current ({ int dummy; \ - ((struct thread_info *) CURRENT_THREAD(dummy))->task; }) +#define current_thread \ + ({ int dummy; ((struct thread_info *) CURRENT_THREAD(dummy)); }) + +#define current (current_thread->task) #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-um/dma-mapping.h b/include/asm-um/dma-mapping.h --- a/include/asm-um/dma-mapping.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-um/dma-mapping.h 2004-09-06 16:37:51 -07:00 @@ -1 +1,119 @@ -#include +#ifndef _ASM_DMA_MAPPING_H +#define _ASM_DMA_MAPPING_H + +static inline int +dma_supported(struct device *dev, u64 mask) +{ + BUG(); + return(0); +} + +static inline int +dma_set_mask(struct device *dev, u64 dma_mask) +{ + BUG(); + return(0); +} + +static inline void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + int flag) +{ + BUG(); + return((void *) 0); +} + +static inline void +dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, + dma_addr_t dma_handle) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_single(struct device *dev, void *cpu_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return(0); +} + +static inline void +dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_page(struct device *dev, struct page *page, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return(0); +} + +static inline void +dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline int +dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, + enum dma_data_direction direction) +{ + BUG(); + return(0); +} + +static inline void +dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems, + enum dma_data_direction direction) +{ + BUG(); +} + +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) +#define dma_is_consistent(d) (1) + +static inline int +dma_get_cache_alignment(void) +{ + BUG(); + return(0); +} + +static inline void +dma_sync_single_range(struct device *dev, dma_addr_t dma_handle, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_cache_sync(void *vaddr, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +#endif diff -Nru a/include/asm-um/elf.h b/include/asm-um/elf.h --- a/include/asm-um/elf.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-um/elf.h 2004-09-06 16:37:53 -07:00 @@ -15,4 +15,17 @@ #define USE_ELF_CORE_DUMP +#define R_386_NONE 0 +#define R_386_32 1 +#define R_386_PC32 2 +#define R_386_GOT32 3 +#define R_386_PLT32 4 +#define R_386_COPY 5 +#define R_386_GLOB_DAT 6 +#define R_386_JMP_SLOT 7 +#define R_386_RELATIVE 8 +#define R_386_GOTOFF 9 +#define R_386_GOTPC 10 +#define R_386_NUM 11 + #endif diff -Nru a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h --- a/include/asm-um/fixmap.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-um/fixmap.h 2004-09-06 16:37:55 -07:00 @@ -34,6 +34,7 @@ FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, #endif + FIX_VSYSCALL, __end_of_fixed_addresses }; @@ -62,6 +63,13 @@ #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) + +/* + * This is the range that is readable by user mode, and things + * acting like user mode such as get_user_pages. + */ +#define FIXADDR_USER_START (__fix_to_virt(FIX_VSYSCALL)) +#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) extern void __this_fixmap_does_not_exist(void); diff -Nru a/include/asm-um/irq.h b/include/asm-um/irq.h --- a/include/asm-um/irq.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-um/irq.h 2004-09-06 16:37:55 -07:00 @@ -1,15 +1,6 @@ #ifndef __UM_IRQ_H #define __UM_IRQ_H -/* The i386 irq.h has a struct task_struct in a prototype without including - * sched.h. This forward declaration kills the resulting warning. - */ -struct task_struct; - -#include "asm/ptrace.h" - -#undef NR_IRQS - #define TIMER_IRQ 0 #define UMN_IRQ 1 #define CONSOLE_IRQ 2 @@ -27,14 +18,5 @@ #define LAST_IRQ XTERM_IRQ #define NR_IRQS (LAST_IRQ + 1) - -extern int um_request_irq(unsigned int irq, int fd, int type, - void (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, const char * devname, - void *dev_id); - -struct irqaction; -struct pt_regs; -int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); #endif diff -Nru a/include/asm-um/local.h b/include/asm-um/local.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-um/local.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,6 @@ +#ifndef __UM_LOCAL_H +#define __UM_LOCAL_H + +#include "asm/arch/local.h" + +#endif diff -Nru a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h --- a/include/asm-um/mmu_context.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-um/mmu_context.h 2004-09-06 16:37:53 -07:00 @@ -26,8 +26,8 @@ unsigned cpu = smp_processor_id(); if(prev != next){ - clear_bit(cpu, &prev->cpu_vm_mask); - set_bit(cpu, &next->cpu_vm_mask); + cpu_clear(cpu, prev->cpu_vm_mask); + cpu_set(cpu, next->cpu_vm_mask); if(next != &init_mm) CHOOSE_MODE((void) 0, switch_mm_skas(next->context.skas.mm_fd)); diff -Nru a/include/asm-um/module-generic.h b/include/asm-um/module-generic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-um/module-generic.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,6 @@ +#ifndef __UM_MODULE_GENERIC_H +#define __UM_MODULE_GENERIC_H + +#include "asm/arch/module.h" + +#endif diff -Nru a/include/asm-um/module-i386.h b/include/asm-um/module-i386.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-um/module-i386.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,13 @@ +#ifndef __UM_MODULE_I386_H +#define __UM_MODULE_I386_H + +/* UML is simple */ +struct mod_arch_specific +{ +}; + +#define Elf_Shdr Elf32_Shdr +#define Elf_Sym Elf32_Sym +#define Elf_Ehdr Elf32_Ehdr + +#endif diff -Nru a/include/asm-um/module.h b/include/asm-um/module.h --- a/include/asm-um/module.h 2004-09-06 16:37:53 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,13 +0,0 @@ -#ifndef __UM_MODULE_H -#define __UM_MODULE_H - -/* UML is simple */ -struct mod_arch_specific -{ -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr - -#endif diff -Nru a/include/asm-um/page.h b/include/asm-um/page.h --- a/include/asm-um/page.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-um/page.h 2004-09-06 16:37:53 -07:00 @@ -1,10 +1,14 @@ +/* + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + #ifndef __UM_PAGE_H #define __UM_PAGE_H struct page; #include "asm/arch/page.h" -#include "asm/bug.h" #undef __pa #undef __va @@ -24,25 +28,25 @@ #define __va_space (8*1024*1024) -extern unsigned long region_pa(void *virt); -extern void *region_va(unsigned long phys); - -#define __pa(virt) region_pa((void *) (virt)) -#define __va(phys) region_va((unsigned long) (phys)) - -extern unsigned long page_to_pfn(struct page *page); -extern struct page *pfn_to_page(unsigned long pfn); +extern unsigned long to_phys(void *virt); +extern void *to_virt(unsigned long phys); -extern struct page *phys_to_page(unsigned long phys); +#define __pa(virt) to_phys((void *) virt) +#define __va(phys) to_virt((unsigned long) phys) -#define virt_to_page(v) (phys_to_page(__pa(v))) +#define page_to_pfn(page) ((page) - mem_map) +#define pfn_to_page(pfn) (mem_map + (pfn)) -extern struct page *page_mem_map(struct page *page); - -#define pfn_valid(pfn) (page_mem_map(pfn_to_page(pfn)) != NULL) -#define virt_addr_valid(v) pfn_valid(__pa(v) >> PAGE_SHIFT) +#define phys_to_pfn(p) ((p) >> PAGE_SHIFT) +#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) +#define pfn_valid(pfn) ((pfn) < max_mapnr) +#define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) + extern struct page *arch_validate(struct page *page, int mask, int order); #define HAVE_ARCH_VALIDATE + +extern void arch_free_page(struct page *page, int order); +#define HAVE_ARCH_FREE_PAGE #endif diff -Nru a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h --- a/include/asm-um/pgtable.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-um/pgtable.h 2004-09-06 16:37:55 -07:00 @@ -12,8 +12,6 @@ #include "asm/page.h" #include "asm/fixmap.h" -extern pgd_t swapper_pg_dir[1024]; - extern void *um_virt_to_phys(struct task_struct *task, unsigned long virt, pte_t *pte_out); @@ -49,6 +47,8 @@ #define pgd_ERROR(e) \ printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + /* * pgd entries used up by user/kernel: */ @@ -65,10 +65,10 @@ * area for the same reason. ;) */ -extern unsigned long high_physmem; +extern unsigned long end_iomem; #define VMALLOC_OFFSET (__va_space) -#define VMALLOC_START (((unsigned long) high_physmem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) @@ -78,12 +78,13 @@ #define _PAGE_PRESENT 0x001 #define _PAGE_NEWPAGE 0x002 -#define _PAGE_PROTNONE 0x004 /* If not present */ -#define _PAGE_RW 0x008 -#define _PAGE_USER 0x010 -#define _PAGE_ACCESSED 0x020 -#define _PAGE_DIRTY 0x040 -#define _PAGE_NEWPROT 0x080 +#define _PAGE_NEWPROT 0x004 +#define _PAGE_FILE 0x008 /* set:pagecache unset:swap */ +#define _PAGE_PROTNONE 0x010 /* If not present */ +#define _PAGE_RW 0x020 +#define _PAGE_USER 0x040 +#define _PAGE_ACCESSED 0x080 +#define _PAGE_DIRTY 0x100 #define REGION_MASK 0xf0000000 #define REGION_SHIFT 28 @@ -143,7 +144,8 @@ #define BAD_PAGETABLE __bad_pagetable() #define BAD_PAGE __bad_page() -#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) + +#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) /* number of bits that fit into a memory pointer */ #define BITS_PER_PTR (8*sizeof(unsigned long)) @@ -164,9 +166,6 @@ #define pte_clear(xp) do { pte_val(*(xp)) = _PAGE_NEWPAGE; } while (0) -#define phys_region_index(x) (((x) & REGION_MASK) >> REGION_SHIFT) -#define pte_region_index(x) phys_region_index(pte_val(x)) - #define pmd_none(x) (!(pmd_val(x) & ~_PAGE_NEWPAGE)) #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) @@ -188,19 +187,25 @@ #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) -extern struct page *pte_mem_map(pte_t pte); -extern struct page *phys_mem_map(unsigned long phys); -extern unsigned long phys_to_pfn(unsigned long p); -extern unsigned long pfn_to_phys(unsigned long pfn); - -#define pte_page(x) pfn_to_page(pte_pfn(x)) -#define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) -#define mk_phys(a, r) ((a) + (r << REGION_SHIFT)) -#define phys_addr(p) ((p) & ~REGION_MASK) -#define phys_page(p) (phys_mem_map(p) + ((phys_addr(p)) >> PAGE_SHIFT)) +#define pte_page(pte) phys_to_page(pte_val(pte)) +#define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) + #define pte_pfn(x) phys_to_pfn(pte_val(x)) #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) -#define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) + +extern struct page *phys_to_page(const unsigned long phys); +extern struct page *__virt_to_page(const unsigned long virt); +#define virt_to_page(addr) __virt_to_page((const unsigned long) addr) + +/* + * Bits 0 through 3 are taken + */ +#define PTE_FILE_MAX_BITS 28 + +#define pte_to_pgoff(pte) ((pte).pte_low >> 4) + +#define pgoff_to_pte(off) \ + ((pte_t) { ((off) << 4) + _PAGE_FILE }) static inline pte_t pte_mknewprot(pte_t pte) { @@ -235,6 +240,12 @@ * The following only work if pte_present() is true. * Undefined behaviour if not.. */ +static inline int pte_user(pte_t pte) +{ + return((pte_val(pte) & _PAGE_USER) && + !(pte_val(pte) & _PAGE_PROTNONE)); +} + static inline int pte_read(pte_t pte) { return((pte_val(pte) & _PAGE_USER) && @@ -252,6 +263,14 @@ !(pte_val(pte) & _PAGE_PROTNONE)); } +/* + * The following only works if pte_present() is not true. + */ +static inline int pte_file(pte_t pte) +{ + return (pte).pte_low & _PAGE_FILE; +} + static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } static inline int pte_newpage(pte_t pte) { return pte_val(pte) & _PAGE_NEWPAGE; } @@ -334,14 +353,7 @@ * and a page entry and page directory to the page they refer to. */ -#define mk_pte(page, pgprot) \ -({ \ - pte_t __pte; \ - \ - pte_val(__pte) = page_to_phys(page) + pgprot_val(pgprot);\ - if(pte_present(__pte)) pte_mknewprot(pte_mknewpage(__pte)); \ - __pte; \ -}) +extern pte_t mk_pte(struct page *page, pgprot_t pgprot); static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { @@ -351,17 +363,27 @@ } #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) -#define pmd_page(pmd) (phys_mem_map(pmd_val(pmd) & PAGE_MASK) + \ - ((phys_addr(pmd_val(pmd)) >> PAGE_SHIFT))) -/* to find an entry in a page-table-directory. */ +/* + * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD] + * + * this macro returns the index of the entry in the pgd page which would + * control the given virtual address + */ #define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) -/* to find an entry in a page-table-directory */ +/* + * pgd_offset() returns a (pgd_t *) + * pgd_index() is used get the offset into the pgd page's array of pgd_t's; + */ #define pgd_offset(mm, address) \ ((mm)->pgd + ((address) >> PGDIR_SHIFT)) -/* to find an entry in a kernel page-table-directory */ + +/* + * a shortcut which implies the use of the kernel's pgd, instead + * of a process's + */ #define pgd_offset_k(address) pgd_offset(&init_mm, address) #define pmd_index(address) \ @@ -373,7 +395,12 @@ return (pmd_t *) dir; } -/* Find an entry in the third-level page table.. */ +/* + * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE] + * + * this macro returns the index of the entry in the pte page which would + * control the given virtual address + */ #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) #define pte_offset_kernel(dir, address) \ ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) @@ -387,11 +414,11 @@ #define update_mmu_cache(vma,address,pte) do ; while (0) /* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val >> 3) & 0x7f) -#define __swp_offset(x) ((x).val >> 10) +#define __swp_type(x) (((x).val >> 4) & 0x3f) +#define __swp_offset(x) ((x).val >> 11) #define __swp_entry(type, offset) \ - ((swp_entry_t) { ((type) << 3) | ((offset) << 10) }) + ((swp_entry_t) { ((type) << 4) | ((offset) << 11) }) #define __pte_to_swp_entry(pte) \ ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) diff -Nru a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h --- a/include/asm-um/processor-generic.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-um/processor-generic.h 2004-09-06 16:37:51 -07:00 @@ -11,33 +11,14 @@ struct task_struct; #include "linux/config.h" -#include "linux/signal.h" #include "asm/ptrace.h" -#include "asm/siginfo.h" #include "choose-mode.h" struct mm_struct; #define current_text_addr() ((void *) 0) -#define cpu_relax() do ; while (0) - -#ifdef CONFIG_MODE_TT -struct proc_tt_mode { - int extern_pid; - int tracing; - int switch_pipe[2]; - int singlestep_syscall; - int vm_seq; -}; -#endif - -#ifdef CONFIG_MODE_SKAS -struct proc_skas_mode { - void *switch_buf; - void *fork_buf; -}; -#endif +#define cpu_relax() barrier() struct thread_struct { int forking; @@ -46,6 +27,7 @@ struct pt_regs regs; unsigned long cr2; int err; + unsigned long trap_no; void *fault_addr; void *fault_catcher; struct task_struct *prev_sched; @@ -54,10 +36,20 @@ struct arch_thread arch; union { #ifdef CONFIG_MODE_TT - struct proc_tt_mode tt; + struct { + int extern_pid; + int tracing; + int switch_pipe[2]; + int singlestep_syscall; + int vm_seq; + } tt; #endif #ifdef CONFIG_MODE_SKAS - struct proc_skas_mode skas; + struct { + void *switch_buf; + void *fork_buf; + int mm_count; + } skas; #endif } mode; struct { @@ -99,13 +91,18 @@ } mm_segment_t; extern struct task_struct *alloc_task_struct(void); -extern void free_task_struct(struct task_struct *task); extern void release_thread(struct task_struct *); extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern void dump_thread(struct pt_regs *regs, struct user *u); +extern void prepare_to_copy(struct task_struct *tsk); extern unsigned long thread_saved_pc(struct task_struct *t); + +static inline void mm_copy_segments(struct mm_struct *from_mm, + struct mm_struct *new_mm) +{ +} #define init_stack (init_thread_union.stack) diff -Nru a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h --- a/include/asm-um/processor-i386.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-um/processor-i386.h 2004-09-06 16:37:50 -07:00 @@ -6,8 +6,8 @@ #ifndef __UM_PROCESSOR_I386_H #define __UM_PROCESSOR_I386_H -extern int cpu_has_xmm; -extern int cpu_has_cmov; +extern int host_has_xmm; +extern int host_has_cmov; struct arch_thread { unsigned long debugregs[8]; diff -Nru a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h --- a/include/asm-um/ptrace-generic.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-um/ptrace-generic.h 2004-09-06 16:37:54 -07:00 @@ -45,6 +45,8 @@ #define PT_REGS_SC(r) UPT_SC(&(r)->regs) +#define instruction_pointer(regs) PT_REGS_IP(regs) + struct task_struct; extern unsigned long getreg(struct task_struct *child, int regno); diff -Nru a/include/asm-um/sections.h b/include/asm-um/sections.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-um/sections.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,7 @@ +#ifndef _UM_SECTIONS_H +#define _UM_SECTIONS_H + +/* nothing to see, move along */ +#include + +#endif diff -Nru a/include/asm-um/smp.h b/include/asm-um/smp.h --- a/include/asm-um/smp.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-um/smp.h 2004-09-06 16:37:50 -07:00 @@ -10,7 +10,7 @@ extern cpumask_t cpu_online_map; -#define smp_processor_id() (current->thread_info->cpu) +#define smp_processor_id() (current_thread->cpu) #define cpu_logical_map(n) (n) #define cpu_number_map(n) (n) #define PROC_CHANGE_PENALTY 15 /* Pick a number, any number */ diff -Nru a/include/asm-um/smplock.h b/include/asm-um/smplock.h --- a/include/asm-um/smplock.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,6 +0,0 @@ -#ifndef __UM_SMPLOCK_H -#define __UM_SMPLOCK_H - -#include "asm/arch/smplock.h" - -#endif diff -Nru a/include/asm-um/spinlock.h b/include/asm-um/spinlock.h --- a/include/asm-um/spinlock.h 2004-09-06 16:37:54 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,10 +0,0 @@ -#ifndef __UM_SPINLOCK_H -#define __UM_SPINLOCK_H - -#include "linux/config.h" - -#ifdef CONFIG_SMP -#include "asm/arch/spinlock.h" -#endif - -#endif diff -Nru a/include/asm-um/system-generic.h b/include/asm-um/system-generic.h --- a/include/asm-um/system-generic.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-um/system-generic.h 2004-09-06 16:37:55 -07:00 @@ -23,8 +23,10 @@ extern void block_signals(void); extern void unblock_signals(void); -#define local_save_flags(flags) do { (flags) = get_signals(); } while(0) -#define local_irq_restore(flags) do { set_signals(flags); } while(0) +#define local_save_flags(flags) do { typecheck(unsigned long, flags); \ + (flags) = get_signals(); } while(0) +#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \ + set_signals(flags); } while(0) #define local_irq_save(flags) do { local_save_flags(flags); \ local_irq_disable(); } while(0) @@ -38,5 +40,8 @@ local_save_flags(flags); \ (flags == 0); \ }) + +extern void *_switch_to(void *prev, void *next, void *last); +#define switch_to(prev, next, last) prev = _switch_to(prev, next, last) #endif diff -Nru a/include/asm-um/system-i386.h b/include/asm-um/system-i386.h --- a/include/asm-um/system-i386.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-um/system-i386.h 2004-09-06 16:37:52 -07:00 @@ -2,36 +2,5 @@ #define __UM_SYSTEM_I386_H #include "asm/system-generic.h" - -static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, - unsigned long new, int size) -{ - unsigned long prev; - switch (size) { - case 1: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 2: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - case 4: - __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" - : "=a"(prev) - : "q"(new), "m"(*__xg(ptr)), "0"(old) - : "memory"); - return prev; - } - return old; -} - -#define cmpxchg(ptr,o,n)\ - ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ - (unsigned long)(n),sizeof(*(ptr)))) #endif diff -Nru a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h --- a/include/asm-um/thread_info.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-um/thread_info.h 2004-09-06 16:37:51 -07:00 @@ -9,6 +9,7 @@ #ifndef __ASSEMBLY__ #include +#include struct thread_info { struct task_struct *task; /* main task structure */ @@ -43,15 +44,18 @@ static inline struct thread_info *current_thread_info(void) { struct thread_info *ti; - __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~16383UL)); + unsigned long mask = PAGE_SIZE * + (1 << CONFIG_KERNEL_STACK_ORDER) - 1; + __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~mask)); return ti; } /* thread information allocation */ -#define THREAD_SIZE (4*PAGE_SIZE) -#define alloc_thread_info(tsk) ((struct thread_info *) \ - __get_free_pages(GFP_KERNEL,2)) -#define free_thread_info(ti) free_pages((unsigned long) (ti), 2) +#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) +#define alloc_thread_info(tsk) \ + ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) +#define free_thread_info(ti) kfree(ti) + #define get_thread_info(ti) get_task_struct((ti)->task) #define put_thread_info(ti) put_task_struct((ti)->task) @@ -65,11 +69,13 @@ #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling * TIF_NEED_RESCHED */ +#define TIF_RESTART_BLOCK 4 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) +#define _TIF_RESTART_BLOCK (1 << TIF_RESTART_BLOCK) #endif diff -Nru a/include/asm-um/timex.h b/include/asm-um/timex.h --- a/include/asm-um/timex.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-um/timex.h 2004-09-06 16:37:53 -07:00 @@ -1,8 +1,6 @@ #ifndef __UM_TIMEX_H #define __UM_TIMEX_H -#include "linux/time.h" - typedef unsigned long cycles_t; #define cacheflush_time (0) diff -Nru a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h --- a/include/asm-um/uaccess.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-um/uaccess.h 2004-09-06 16:37:53 -07:00 @@ -6,6 +6,8 @@ #ifndef __UM_UACCESS_H #define __UM_UACCESS_H +#include "linux/sched.h" + #define VERIFY_READ 0 #define VERIFY_WRITE 1 @@ -33,6 +35,9 @@ #define __copy_from_user(to, from, n) copy_from_user(to, from, n) #define __copy_to_user(to, from, n) copy_to_user(to, from, n) + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #define __get_user(x, ptr) \ ({ \ diff -Nru a/include/asm-um/unistd.h b/include/asm-um/unistd.h --- a/include/asm-um/unistd.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-um/unistd.h 2004-09-06 16:37:54 -07:00 @@ -48,7 +48,10 @@ set_fs(KERNEL_DS); \ ret = sys(args); \ set_fs(fs); \ - return ret; + if (ret >= 0) \ + return ret; \ + errno = -(long)ret; \ + return -1; static inline long open(const char *pathname, int flags, int mode) { diff -Nru a/include/asm-v850/ptrace.h b/include/asm-v850/ptrace.h --- a/include/asm-v850/ptrace.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-v850/ptrace.h 2004-09-06 16:37:55 -07:00 @@ -76,6 +76,7 @@ #define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) #define user_mode(regs) (!(regs)->kernel_mode) /* When a struct pt_regs is used to save user state for a system call in diff -Nru a/include/asm-v850/uaccess.h b/include/asm-v850/uaccess.h --- a/include/asm-v850/uaccess.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-v850/uaccess.h 2004-09-06 16:37:54 -07:00 @@ -112,6 +112,9 @@ #define __copy_from_user(to, from, n) (memcpy (to, from, n), 0) #define __copy_to_user(to, from, n) (memcpy(to, from, n), 0) +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + #define copy_from_user(to, from, n) __copy_from_user (to, from, n) #define copy_to_user(to, from, n) __copy_to_user(to, from, n) diff -Nru a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h --- a/include/asm-x86_64/acpi.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-x86_64/acpi.h 2004-09-06 16:37:53 -07:00 @@ -99,6 +99,11 @@ :"=r"(n_hi), "=r"(n_lo) \ :"0"(n_hi), "1"(n_lo)) +/* + * Refer Intel ACPI _PDC support document for bit definitions + */ +#define ACPI_PDC_EST_CAPABILITY_SMP 0xa +#define ACPI_PDC_EST_CAPABILITY_MSR 0x1 #ifdef CONFIG_ACPI_BOOT extern int acpi_lapic; diff -Nru a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h --- a/include/asm-x86_64/apicdef.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-x86_64/apicdef.h 2004-09-06 16:37:51 -07:00 @@ -108,7 +108,7 @@ #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) -#define MAX_IO_APICS 16 +#define MAX_IO_APICS 32 /* * the local APIC register structure, memory mapped. Not terribly well diff -Nru a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h --- a/include/asm-x86_64/bitops.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-x86_64/bitops.h 2004-09-06 16:37:52 -07:00 @@ -25,10 +25,10 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -static __inline__ void set_bit(long nr, volatile void * addr) +static __inline__ void set_bit(int nr, volatile void * addr) { __asm__ __volatile__( LOCK_PREFIX - "btsq %1,%0" + "btsl %1,%0" :"=m" (ADDR) :"dIr" (nr) : "memory"); } @@ -254,128 +254,37 @@ #undef ADDR -/** - * find_first_zero_bit - find the first zero bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit-number of the first zero bit, not the number of the byte - * containing a bit. - */ -static __inline__ int find_first_zero_bit(const unsigned long * addr, unsigned size) -{ - int d0, d1, d2; - int res; - - if (!size) - return 0; - __asm__ __volatile__( - "movl $-1,%%eax\n\t" - "xorl %%edx,%%edx\n\t" - "repe; scasl\n\t" - "je 1f\n\t" - "xorl -4(%%rdi),%%eax\n\t" - "subq $4,%%rdi\n\t" - "bsfl %%eax,%%edx\n" - "1:\tsubq %%rbx,%%rdi\n\t" - "shlq $3,%%rdi\n\t" - "addq %%rdi,%%rdx" - :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) - :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); - return res; -} - -/** - * find_next_zero_bit - find the first zero bit in a memory region - * @addr: The address to base the search on - * @offset: The bitnumber to start searching at - * @size: The maximum size to search - */ -static __inline__ int find_next_zero_bit (const unsigned long * addr, int size, int offset) -{ - unsigned long * p = ((unsigned long *) addr) + (offset >> 6); - unsigned long set = 0; - unsigned long res, bit = offset&63; - - if (bit) { - /* - * Look for zero in first word - */ - __asm__("bsfq %1,%0\n\t" - "cmoveq %2,%0" - : "=r" (set) - : "r" (~(*p >> bit)), "r"(64L)); - if (set < (64 - bit)) - return set + offset; - set = 64 - bit; - p++; - } - /* - * No zero yet, search remaining full words for a zero - */ - res = find_first_zero_bit ((const unsigned long *)p, size - 64 * (p - (unsigned long *) addr)); - return (offset + set + res); -} - - -/** - * find_first_bit - find the first set bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit-number of the first set bit, not the number of the byte - * containing a bit. - */ -static __inline__ int find_first_bit(const unsigned long * addr, unsigned size) -{ - int d0, d1; - int res; - - /* This looks at memory. Mark it volatile to tell gcc not to move it around */ - __asm__ __volatile__( - "xorl %%eax,%%eax\n\t" - "repe; scasl\n\t" - "jz 1f\n\t" - "leaq -4(%%rdi),%%rdi\n\t" - "bsfl (%%rdi),%%eax\n" - "1:\tsubq %%rbx,%%rdi\n\t" - "shll $3,%%edi\n\t" - "addl %%edi,%%eax" - :"=a" (res), "=&c" (d0), "=&D" (d1) - :"1" ((size + 31) >> 5), "2" (addr), "b" (addr) : "memory"); - return res; -} - -/** - * find_next_bit - find the first set bit in a memory region - * @addr: The address to base the search on - * @offset: The bitnumber to start searching at - * @size: The maximum size to search - */ -static __inline__ int find_next_bit(const unsigned long * addr, int size, int offset) -{ - const unsigned long * p = addr + (offset >> 6); - unsigned long set = 0, bit = offset & 63, res; +extern long find_first_zero_bit(const unsigned long * addr, unsigned long size); +extern long find_next_zero_bit (const unsigned long * addr, long size, long offset); +extern long find_first_bit(const unsigned long * addr, unsigned long size); +extern long find_next_bit(const unsigned long * addr, long size, long offset); + +/* return index of first bet set in val or max when no bit is set */ +static inline unsigned long __scanbit(unsigned long val, unsigned long max) +{ + asm("bsfq %1,%0 ; cmovz %2,%0" : "=&r" (val) : "r" (val), "r" (max)); + return val; +} + +#define find_first_bit(addr,size) \ +((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ + (__scanbit(*(unsigned long *)addr,(size))) : \ + find_first_bit(addr,size))) + +#define find_next_bit(addr,size,off) \ +((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ + ((off) + (__scanbit((*(unsigned long *)addr) >> (off),(size)-(off)))) : \ + find_next_bit(addr,size,off))) + +#define find_first_zero_bit(addr,size) \ +((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ + (__scanbit(~*(unsigned long *)addr,(size))) : \ + find_first_zero_bit(addr,size))) - if (bit) { - /* - * Look for nonzero in the first 64 bits: - */ - __asm__("bsfq %1,%0\n\t" - "cmoveq %2,%0\n\t" - : "=r" (set) - : "r" (*p >> bit), "r" (64L)); - if (set < (64 - bit)) - return set + offset; - set = 64 - bit; - p++; - } - /* - * No set bit yet, search remaining full words for a bit - */ - res = find_first_bit (p, size - 64 * (p - addr)); - return (offset + set + res); -} +#define find_next_zero_bit(addr,size,off) \ +((__builtin_constant_p(size) && size <= BITS_PER_LONG ? \ + ((off)+(__scanbit(~(((*(unsigned long *)addr)) >> (off)),(size)-(off)))) : \ + find_next_zero_bit(addr,size,off))) /* * Find string of zero bits in a bitmap. -1 when not found. diff -Nru a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h --- a/include/asm-x86_64/cpufeature.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-x86_64/cpufeature.h 2004-09-06 16:37:53 -07:00 @@ -7,7 +7,7 @@ #ifndef __ASM_X8664_CPUFEATURE_H #define __ASM_X8664_CPUFEATURE_H -#define NCAPINTS 5 /* Currently we have 4 32-bit words worth of info */ +#define NCAPINTS 6 /* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ #define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ @@ -63,8 +63,17 @@ #define X86_FEATURE_K8_C (3*32+ 4) /* C stepping K8 */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ -#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ +#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ #define X86_FEATURE_MWAIT (4*32+ 3) /* Monitor/Mwait support */ +#define X86_FEATURE_DSCPL (4*32+ 4) /* CPL Qualified Debug Store */ +#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ +#define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */ +#define X86_FEATURE_CID (4*32+10) /* Context ID */ +#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */ +#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */ + +/* More extended AMD flags: CPUID level 0x80000001, ecx, word 5 */ +#define X86_FEATURE_HTVALID (5*32+ 0) /* HyperThreading valid, otherwise CMP */ #define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) #define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) @@ -81,6 +90,8 @@ #define cpu_has_mmx 1 #define cpu_has_fxsr 1 #define cpu_has_xmm 1 +#define cpu_has_xmm2 1 +#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) #define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) #define cpu_has_mp 1 /* XXX */ #define cpu_has_k6_mtrr 0 diff -Nru a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h --- a/include/asm-x86_64/dma-mapping.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-x86_64/dma-mapping.h 2004-09-06 16:37:53 -07:00 @@ -1,6 +1,139 @@ #ifndef _X8664_DMA_MAPPING_H #define _X8664_DMA_MAPPING_H 1 -#include +/* + * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for + * documentation. + */ + +#include +#include + +#include +#include +#include + +extern dma_addr_t bad_dma_address; +#define dma_mapping_error(x) \ + (swiotlb ? swiotlb_dma_mapping_error(x) : ((x) == bad_dma_address)) + +void *dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + unsigned gfp); +void dma_free_coherent(struct device *dev, size_t size, void *vaddr, + dma_addr_t dma_handle); + +#ifdef CONFIG_GART_IOMMU + +extern dma_addr_t dma_map_single(struct device *hwdev, void *ptr, size_t size, + int direction); +extern void dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size, + int direction); + +#else + +/* No IOMMU */ + +static inline dma_addr_t dma_map_single(struct device *hwdev, void *ptr, + size_t size, int direction) +{ + dma_addr_t addr; + + if (direction == DMA_NONE) + out_of_line_bug(); + addr = virt_to_bus(ptr); + + if ((addr+size) & ~*hwdev->dma_mask) + out_of_line_bug(); + return addr; +} + +static inline void dma_unmap_single(struct device *hwdev, dma_addr_t dma_addr, + size_t size, int direction) +{ + if (direction == DMA_NONE) + out_of_line_bug(); + /* Nothing to do */ +} + +#endif + +#define dma_map_page(dev,page,offset,size,dir) \ + dma_map_single((dev), page_address(page)+(offset), (size), (dir)) + +static inline void dma_sync_single_for_cpu(struct device *hwdev, + dma_addr_t dma_handle, + size_t size, int direction) +{ + if (direction == DMA_NONE) + out_of_line_bug(); + + if (swiotlb) + return swiotlb_sync_single_for_cpu(hwdev,dma_handle,size,direction); + + flush_write_buffers(); +} + +static inline void dma_sync_single_for_device(struct device *hwdev, + dma_addr_t dma_handle, + size_t size, int direction) +{ + if (direction == DMA_NONE) + out_of_line_bug(); + + if (swiotlb) + return swiotlb_sync_single_for_device(hwdev,dma_handle,size,direction); + + flush_write_buffers(); +} + +static inline void dma_sync_sg_for_cpu(struct device *hwdev, + struct scatterlist *sg, + int nelems, int direction) +{ + if (direction == DMA_NONE) + out_of_line_bug(); + + if (swiotlb) + return swiotlb_sync_sg_for_cpu(hwdev,sg,nelems,direction); + + flush_write_buffers(); +} + +static inline void dma_sync_sg_for_device(struct device *hwdev, + struct scatterlist *sg, + int nelems, int direction) +{ + if (direction == DMA_NONE) + out_of_line_bug(); + + if (swiotlb) + return swiotlb_sync_sg_for_device(hwdev,sg,nelems,direction); + + flush_write_buffers(); +} + +extern int dma_map_sg(struct device *hwdev, struct scatterlist *sg, + int nents, int direction); +extern void dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, + int nents, int direction); + +#define dma_unmap_page dma_unmap_single + +extern int dma_supported(struct device *hwdev, u64 mask); +extern int dma_get_cache_alignment(void); +#define dma_is_consistent(h) 1 + +static inline int dma_set_mask(struct device *dev, u64 mask) +{ + if (!dev->dma_mask || !dma_supported(dev, mask)) + return -EIO; + *dev->dma_mask = mask; + return 0; +} + +static inline void dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction dir) +{ + flush_write_buffers(); +} #endif diff -Nru a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h --- a/include/asm-x86_64/hw_irq.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-x86_64/hw_irq.h 2004-09-06 16:37:55 -07:00 @@ -129,40 +129,6 @@ "push $" #nr "-256 ; " \ "jmp common_interrupt"); -static inline void x86_do_profile (struct pt_regs *regs) -{ - unsigned long rip; - extern unsigned long prof_cpu_mask; - extern char _stext[]; - - profile_hook(regs); - - if (user_mode(regs)) - return; - if (!prof_buffer) - return; - - rip = regs->rip; - - /* - * Only measure the CPUs specified by /proc/irq/prof_cpu_mask. - * (default is all CPUs.) - */ - if (!((1<>= prof_shift; - /* - * Don't ignore out-of-bounds EIP values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (rip > prof_len-1) - rip = prof_len-1; - atomic_inc((atomic_t *)&prof_buffer[rip]); -} - #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { if (IO_APIC_IRQ(i)) diff -Nru a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h --- a/include/asm-x86_64/i387.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-x86_64/i387.h 2004-09-06 16:37:52 -07:00 @@ -39,16 +39,25 @@ * FPU lazy state save handling... */ -#define kernel_fpu_end() stts() - #define unlazy_fpu(tsk) do { \ if ((tsk)->thread_info->status & TS_USEDFPU) \ save_init_fpu(tsk); \ } while (0) +/* Ignore delayed exceptions from user space */ +static inline void tolerant_fwait(void) +{ + asm volatile("1: fwait\n" + "2:\n" + " .section __ex_table,\"a\"\n" + " .align 8\n" + " .quad 1b,2b\n" + " .previous\n"); +} + #define clear_fpu(tsk) do { \ if ((tsk)->thread_info->status & TS_USEDFPU) { \ - asm volatile("fnclex ; fwait"); \ + tolerant_fwait(); \ (tsk)->thread_info->status &= ~TS_USEDFPU; \ stts(); \ } \ @@ -116,6 +125,7 @@ static inline void kernel_fpu_begin(void) { struct thread_info *me = current_thread_info(); + preempt_disable(); if (me->status & TS_USEDFPU) { asm volatile("rex64 ; fxsave %0 ; fnclex" : "=m" (me->task->thread.i387.fxsave)); @@ -125,9 +135,15 @@ clts(); } +static inline void kernel_fpu_end(void) +{ + stts(); + preempt_enable(); +} + static inline void save_init_fpu( struct task_struct *tsk ) { - asm volatile( "fxsave %0 ; fnclex" + asm volatile( "rex64 ; fxsave %0 ; fnclex" : "=m" (tsk->thread.i387.fxsave)); tsk->thread_info->status &= ~TS_USEDFPU; stts(); diff -Nru a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h --- a/include/asm-x86_64/ia32.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-x86_64/ia32.h 2004-09-06 16:37:54 -07:00 @@ -78,12 +78,6 @@ unsigned long long st_ino; } __attribute__((packed)); - -typedef union sigval32 { - int sival_int; - unsigned int sival_ptr; -} sigval_t32; - typedef struct siginfo32 { int si_signo; int si_errno; @@ -102,7 +96,7 @@ struct { int _tid; /* timer id */ int _overrun; /* overrun count */ - sigval_t32 _sigval; /* same as below */ + compat_sigval_t _sigval; /* same as below */ int _sys_private; /* not to be passed to user */ int _overrun_incr; /* amount to add to overrun */ } _timer; @@ -111,7 +105,7 @@ struct { unsigned int _pid; /* sender's pid */ unsigned int _uid; /* sender's uid */ - sigval_t32 _sigval; + compat_sigval_t _sigval; } _rt; /* SIGCHLD */ @@ -121,6 +115,7 @@ int _status; /* exit code */ compat_clock_t _utime; compat_clock_t _stime; + struct compat_rusage _rusage; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ diff -Nru a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h --- a/include/asm-x86_64/ia32_unistd.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-x86_64/ia32_unistd.h 2004-09-06 16:37:53 -07:00 @@ -289,7 +289,8 @@ #define __NR_ia32_mq_notify (__NR_ia32_mq_open+4) #define __NR_ia32_mq_getsetattr (__NR_ia32_mq_open+5) #define __NR_ia32_kexec 283 +#define __NR_ia32_waitid 284 -#define IA32_NR_syscalls 287 /* must be > than biggest syscall! */ +#define IA32_NR_syscalls 285 /* must be > than biggest syscall! */ #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ diff -Nru a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h --- a/include/asm-x86_64/io.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-x86_64/io.h 2004-09-06 16:37:52 -07:00 @@ -186,10 +186,30 @@ #define __raw_readl readl #define __raw_readq readq -#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b)) -#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b)) +#ifdef CONFIG_UNORDERED_IO +static inline void __writel(u32 val, void *addr) +{ + volatile u32 *target = addr; + asm volatile("movnti %1,%0" + : "=m" (*target) + : "r" (val) : "memory"); +} + +static inline void __writeq(u64 val, void *addr) +{ + volatile u64 *target = addr; + asm volatile("movnti %1,%0" + : "=m" (*target) + : "r" (val) : "memory"); +} +#define writeq(val,addr) __writeq((val),(void *)(addr)) +#define writel(val,addr) __writel((val),(void *)(addr)) +#else #define writel(b,addr) (*(volatile unsigned int *) (addr) = (b)) #define writeq(b,addr) (*(volatile unsigned long *) (addr) = (b)) +#endif +#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b)) +#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b)) #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel @@ -299,11 +319,8 @@ #define flush_write_buffers() -/* Disable vmerge for now. Need to fix the block layer code - to check for non iommu addresses first. - When the IOMMU is force it is safe to enable. */ -extern int iommu_merge; -#define BIO_VMERGE_BOUNDARY (iommu_merge ? 4096 : 0) +extern int iommu_bio_merge; +#define BIO_VMERGE_BOUNDARY iommu_bio_merge #endif /* __KERNEL__ */ diff -Nru a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h --- a/include/asm-x86_64/mpspec.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-x86_64/mpspec.h 2004-09-06 16:37:52 -07:00 @@ -156,8 +156,8 @@ * 7 2 CPU MCA+PCI */ +#define MAX_MP_BUSSES 270 #define MAX_IRQ_SOURCES 256 -#define MAX_MP_BUSSES 32 enum mp_bustype { MP_BUS_ISA = 1, MP_BUS_EISA, @@ -166,7 +166,6 @@ }; extern unsigned char mp_bus_id_to_type [MAX_MP_BUSSES]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; -extern cpumask_t pci_bus_to_cpumask [256]; extern unsigned int boot_cpu_physical_apicid; extern int smp_found_config; diff -Nru a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h --- a/include/asm-x86_64/mtrr.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-x86_64/mtrr.h 2004-09-06 16:37:51 -07:00 @@ -71,8 +71,6 @@ #ifdef __KERNEL__ -extern char *mtrr_strings[MTRR_NUM_TYPES]; - /* The following functions are for use by other drivers */ # ifdef CONFIG_MTRR extern int mtrr_add (unsigned long base, unsigned long size, diff -Nru a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h --- a/include/asm-x86_64/pci.h 2004-09-06 16:37:52 -07:00 +++ b/include/asm-x86_64/pci.h 2004-09-06 16:37:52 -07:00 @@ -44,81 +44,25 @@ #include #include -struct pci_dev; - extern int iommu_setup(char *opt); -extern dma_addr_t bad_dma_address; -#define pci_dma_mapping_error(x) ((x) == bad_dma_address) - -/* Allocate and map kernel buffer using consistent mode DMA for a device. - * hwdev should be valid struct pci_dev pointer for PCI devices, - * NULL for PCI-like buses (ISA, EISA). - * Returns non-NULL cpu-view pointer to the buffer if successful and - * sets *dma_addrp to the pci side dma address as well, else *dma_addrp - * is undefined. - */ -extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle); - -/* Free and unmap a consistent DMA buffer. - * cpu_addr is what was returned from pci_alloc_consistent, - * size must be the same as what as passed into pci_alloc_consistent, - * and likewise dma_addr must be the same as what *dma_addrp was set to. - * - * References to the memory and mappings associated with cpu_addr/dma_addr - * past this call are illegal. - */ -extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, - void *vaddr, dma_addr_t dma_handle); - -#ifdef CONFIG_SWIOTLB -extern int swiotlb; -extern dma_addr_t swiotlb_map_single (struct device *hwdev, void *ptr, size_t size, - int dir); -extern void swiotlb_unmap_single (struct device *hwdev, dma_addr_t dev_addr, - size_t size, int dir); -extern void swiotlb_sync_single_for_cpu (struct device *hwdev, - dma_addr_t dev_addr, - size_t size, int dir); -extern void swiotlb_sync_single_for_device (struct device *hwdev, - dma_addr_t dev_addr, - size_t size, int dir); -extern void swiotlb_sync_sg_for_cpu (struct device *hwdev, - struct scatterlist *sg, int nelems, - int dir); -extern void swiotlb_sync_sg_for_device (struct device *hwdev, - struct scatterlist *sg, int nelems, - int dir); -extern int swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, - int nents, int direction); -extern void swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, - int nents, int direction); - -#endif - #ifdef CONFIG_GART_IOMMU - -/* Map a single buffer of the indicated size for DMA in streaming mode. - * The 32-bit bus address to use is returned. +/* The PCI address space does equal the physical memory + * address space. The networking and block device layers use + * this boolean for bounce buffer decisions * - * Once the device is given the dma address, the device owns this memory - * until either pci_unmap_single or pci_dma_sync_single_for_cpu is performed. + * On AMD64 it mostly equals, but we set it to zero to tell some subsystems + * that an IOMMU is available. */ -extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, - int direction); - - -void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t addr, - size_t size, int direction); +#define PCI_DMA_BUS_IS_PHYS (no_iommu ? 1 : 0) /* - * pci_{map,unmap}_single_page maps a kernel page to a dma_addr_t. identical - * to pci_map_single, but takes a struct page instead of a virtual address + * x86-64 always supports DAC, but sometimes it is useful to force + * devices through the IOMMU to get automatic sg list merging. + * Optional right now. */ - -#define pci_map_page(dev,page,offset,size,dir) \ - pci_map_single((dev), page_address(page)+(offset), (size), (dir)) +extern int iommu_sac_force; +#define pci_dac_dma_supported(pci_dev, mask) (!iommu_sac_force) #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ dma_addr_t ADDR_NAME; @@ -133,113 +77,12 @@ #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ (((PTR)->LEN_NAME) = (VAL)) -static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, - dma_addr_t dma_handle, - size_t size, int direction) -{ - BUG_ON(direction == PCI_DMA_NONE); - -#ifdef CONFIG_SWIOTLB - if (swiotlb) - return swiotlb_sync_single_for_cpu(&hwdev->dev,dma_handle,size,direction); -#endif - - flush_write_buffers(); -} - -static inline void pci_dma_sync_single_for_device(struct pci_dev *hwdev, - dma_addr_t dma_handle, - size_t size, int direction) -{ - BUG_ON(direction == PCI_DMA_NONE); - -#ifdef CONFIG_SWIOTLB - if (swiotlb) - return swiotlb_sync_single_for_device(&hwdev->dev,dma_handle,size,direction); -#endif - - flush_write_buffers(); -} - -static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, - struct scatterlist *sg, - int nelems, int direction) -{ - BUG_ON(direction == PCI_DMA_NONE); - -#ifdef CONFIG_SWIOTLB - if (swiotlb) - return swiotlb_sync_sg_for_cpu(&hwdev->dev,sg,nelems,direction); -#endif - flush_write_buffers(); -} - -static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, - struct scatterlist *sg, - int nelems, int direction) -{ - BUG_ON(direction == PCI_DMA_NONE); - -#ifdef CONFIG_SWIOTLB - if (swiotlb) - return swiotlb_sync_sg_for_device(&hwdev->dev,sg,nelems,direction); -#endif - flush_write_buffers(); -} - -/* The PCI address space does equal the physical memory - * address space. The networking and block device layers use - * this boolean for bounce buffer decisions - * - * On AMD64 it mostly equals, but we set it to zero to tell some subsystems - * that an IOMMU is available. - */ -#define PCI_DMA_BUS_IS_PHYS (no_iommu ? 1 : 0) - -/* We lie slightly when the IOMMU is forced to get the device to - use SAC instead of DAC. */ -#define pci_dac_dma_supported(pci_dev, mask) (force_iommu ? 0 : 1) - #else -static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, - size_t size, int direction) -{ - dma_addr_t addr; +/* No IOMMU */ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); - addr = virt_to_bus(ptr); - - /* - * This is gross, but what should I do. - * Unfortunately drivers do not test the return value of this. - */ - if ((addr+size) & ~hwdev->dma_mask) - out_of_line_bug(); - return addr; -} - -static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); - /* Nothing to do */ -} - -static inline dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, - unsigned long offset, size_t size, int direction) -{ - dma_addr_t addr; - if (direction == PCI_DMA_NONE) - out_of_line_bug(); - addr = page_to_pfn(page) * PAGE_SIZE + offset; - if ((addr+size) & ~hwdev->dma_mask) - out_of_line_bug(); - return addr; -} +#define PCI_DMA_BUS_IS_PHYS 1 +#define pci_dac_dma_supported(pci_dev, mask) 1 -/* pci_unmap_{page,single} is a nop so... */ #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) #define pci_unmap_addr(PTR, ADDR_NAME) (0) @@ -247,74 +90,9 @@ #define pci_unmap_len(PTR, LEN_NAME) (0) #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) -/* Make physical memory consistent for a single - * streaming mode DMA translation after a transfer. - * - * If you perform a pci_map_single() but wish to interrogate the - * buffer using the cpu, yet do not wish to teardown the PCI dma - * mapping, you must call this function before doing so. At the - * next point you give the PCI dma address back to the card, you - * must first perform a pci_dma_sync_for_device, and then the - * device again owns the buffer. - */ -static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, - dma_addr_t dma_handle, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); -} - -static inline void pci_dma_sync_single_for_device(struct pci_dev *hwdev, - dma_addr_t dma_handle, - size_t size, int direction) -{ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); - flush_write_buffers(); -} - -/* Make physical memory consistent for a set of streaming - * mode DMA translations after a transfer. - * - * The same as pci_dma_sync_single_* but for a scatter-gather list, - * same rules and usage. - */ -static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, - struct scatterlist *sg, - int nelems, int direction) -{ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); -} - -static inline void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, - struct scatterlist *sg, - int nelems, int direction) -{ - if (direction == PCI_DMA_NONE) - out_of_line_bug(); - flush_write_buffers(); -} - -#define PCI_DMA_BUS_IS_PHYS 1 - -#define pci_dac_dma_supported(pci_dev, mask) 1 #endif -extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents, int direction); -extern void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents, int direction); - -#define pci_unmap_page pci_unmap_single - -/* Return whether the given PCI device DMA address mask can - * be supported properly. For example, if your device can - * only drive the low 24-bits during PCI bus mastering, then - * you would pass 0x00ffffff as the mask to this function. - */ -extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); +#include static inline dma64_addr_t pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, unsigned long offset, int direction) @@ -359,7 +137,6 @@ /* generic pci stuff */ #ifdef CONFIG_PCI #include -#include #endif #endif /* __x8664_PCI_H */ diff -Nru a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h --- a/include/asm-x86_64/processor.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-x86_64/processor.h 2004-09-06 16:37:55 -07:00 @@ -60,6 +60,8 @@ int x86_cache_alignment; int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ __u8 x86_virt_bits, x86_phys_bits; + __u8 x86_num_cores; + __u8 x86_apicid; __u32 x86_power; unsigned long loops_per_jiffy; } ____cacheline_aligned; @@ -82,7 +84,7 @@ extern struct cpuinfo_x86 cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] #else -#define cpu_data &boot_cpu_data +#define cpu_data (&boot_cpu_data) #define current_cpu_data boot_cpu_data #endif @@ -455,10 +457,5 @@ }) #define cache_line_size() (boot_cpu_data.x86_cache_alignment) - -#ifdef CONFIG_SCHED_SMT -#define ARCH_HAS_SCHED_DOMAIN -#define ARCH_HAS_SCHED_WAKE_IDLE -#endif #endif /* __ASM_X86_64_PROCESSOR_H */ diff -Nru a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h --- a/include/asm-x86_64/proto.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-x86_64/proto.h 2004-09-06 16:37:54 -07:00 @@ -82,7 +82,6 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); extern void swiotlb_init(void); -extern int swiotlb; extern unsigned long max_mapnr; extern unsigned long end_pfn; @@ -103,6 +102,8 @@ extern int iommu_aperture; extern int iommu_aperture_disabled; extern int iommu_aperture_allowed; +extern int fix_aperture; +extern int force_iommu; extern void smp_local_timer_interrupt(struct pt_regs * regs); diff -Nru a/include/asm-x86_64/ptrace.h b/include/asm-x86_64/ptrace.h --- a/include/asm-x86_64/ptrace.h 2004-09-06 16:37:51 -07:00 +++ b/include/asm-x86_64/ptrace.h 2004-09-06 16:37:51 -07:00 @@ -83,6 +83,11 @@ #if defined(__KERNEL__) && !defined(__ASSEMBLY__) #define user_mode(regs) (!!((regs)->cs & 3)) #define instruction_pointer(regs) ((regs)->rip) +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif void signal_fault(struct pt_regs *regs, void __user *frame, char *where); enum { diff -Nru a/include/asm-x86_64/semaphore.h b/include/asm-x86_64/semaphore.h --- a/include/asm-x86_64/semaphore.h 2004-09-06 16:37:50 -07:00 +++ b/include/asm-x86_64/semaphore.h 2004-09-06 16:37:50 -07:00 @@ -47,21 +47,14 @@ atomic_t count; int sleepers; wait_queue_head_t wait; -#ifdef WAITQUEUE_DEBUG - long __magic; -#endif }; -#ifdef WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } +#define __SEMAPHORE_INITIALIZER(name, n) \ +{ \ + .count = ATOMIC_INIT(n), \ + .sleepers = 0, \ + .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ +} #define __MUTEX_INITIALIZER(name) \ __SEMAPHORE_INITIALIZER(name,1) @@ -83,9 +76,6 @@ atomic_set(&sem->count, val); sem->sleepers = 0; init_waitqueue_head(&sem->wait); -#ifdef WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif } static inline void init_MUTEX (struct semaphore *sem) @@ -115,9 +105,6 @@ */ static inline void down(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( @@ -142,9 +129,6 @@ { int result; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif might_sleep(); __asm__ __volatile__( @@ -171,10 +155,6 @@ { int result; -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( "# atomic interruptible down operation\n\t" LOCK "decl %1\n\t" /* --sem->count */ @@ -199,9 +179,6 @@ */ static inline void up(struct semaphore * sem) { -#ifdef WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif __asm__ __volatile__( "# atomic up operation\n\t" LOCK "incl %0\n\t" /* ++sem->count */ diff -Nru a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-x86_64/swiotlb.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,36 @@ +#ifndef _ASM_SWIOTLB_H +#define _ASM_SWTIOLB_H 1 + +#include + +/* SWIOTLB interface */ + +extern dma_addr_t swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, + int dir); +extern void swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, + size_t size, int dir); +extern void swiotlb_sync_single_for_cpu(struct device *hwdev, + dma_addr_t dev_addr, + size_t size, int dir); +extern void swiotlb_sync_single_for_device(struct device *hwdev, + dma_addr_t dev_addr, + size_t size, int dir); +extern void swiotlb_sync_sg_for_cpu(struct device *hwdev, + struct scatterlist *sg, int nelems, + int dir); +extern void swiotlb_sync_sg_for_device(struct device *hwdev, + struct scatterlist *sg, int nelems, + int dir); +extern int swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, + int nents, int direction); +extern void swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, + int nents, int direction); +extern int swiotlb_dma_mapping_error(dma_addr_t dma_addr); + +#ifdef CONFIG_SWIOTLB +extern int swiotlb; +#else +#define swiotlb 0 +#endif + +#endif diff -Nru a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h --- a/include/asm-x86_64/system.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-x86_64/system.h 2004-09-06 16:37:54 -07:00 @@ -297,11 +297,11 @@ #define mb() asm volatile("mfence":::"memory") #define rmb() asm volatile("lfence":::"memory") -/* could use SFENCE here, but it would be only needed for unordered SSE - store instructions and we always do an explicit sfence with them currently. - the ordering of normal stores is serialized enough. Just make it a compile - barrier. */ +#ifdef CONFIG_UNORDERED_IO +#define wmb() asm volatile("sfence" ::: "memory") +#else #define wmb() asm volatile("" ::: "memory") +#endif #define read_barrier_depends() do {} while(0) #define set_mb(var, value) do { xchg(&var, value); } while (0) #define set_wmb(var, value) do { var = value; wmb(); } while (0) diff -Nru a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h --- a/include/asm-x86_64/topology.h 2004-09-06 16:37:54 -07:00 +++ b/include/asm-x86_64/topology.h 2004-09-06 16:37:54 -07:00 @@ -14,18 +14,23 @@ extern unsigned char cpu_to_node[]; extern cpumask_t node_to_cpumask[]; +extern cpumask_t pci_bus_to_cpumask[]; #define cpu_to_node(cpu) (cpu_to_node[cpu]) #define parent_node(node) (node) #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) #define node_to_cpumask(node) (node_to_cpumask[node]) -static inline cpumask_t pcibus_to_cpumask(int bus) +static inline cpumask_t __pcibus_to_cpumask(int bus) { + cpumask_t busmask = pci_bus_to_cpumask[bus]; + cpumask_t online = cpu_online_map; cpumask_t res; - cpus_and(res, pci_bus_to_cpumask[bus], cpu_online_map); + cpus_and(res, busmask, online); return res; } +/* broken generic file uses #ifndef later on this */ +#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus) #define NODE_BALANCE_RATE 30 /* CHECKME */ diff -Nru a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h --- a/include/asm-x86_64/uaccess.h 2004-09-06 16:37:55 -07:00 +++ b/include/asm-x86_64/uaccess.h 2004-09-06 16:37:55 -07:00 @@ -137,6 +137,9 @@ #define __put_user(x,ptr) \ __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) +#define __get_user_unaligned __get_user +#define __put_user_unaligned __put_user + #define __put_user_nocheck(x,ptr,size) \ ({ \ int __pu_err; \ @@ -350,5 +353,8 @@ long strlen_user(const char __user *str); unsigned long clear_user(void __user *mem, unsigned long len); unsigned long __clear_user(void __user *mem, unsigned long len); + +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user #endif /* __X86_64_UACCESS_H */ diff -Nru a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h --- a/include/asm-x86_64/unistd.h 2004-09-06 16:37:53 -07:00 +++ b/include/asm-x86_64/unistd.h 2004-09-06 16:37:53 -07:00 @@ -554,8 +554,10 @@ __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) #define __NR_kexec_load 246 __SYSCALL(__NR_kexec_load, sys_ni_syscall) +#define __NR_waitid 247 +__SYSCALL(__NR_waitid, sys_waitid) -#define __NR_syscall_max __NR_kexec_load +#define __NR_syscall_max __NR_waitid #ifndef __NO_STUBS /* user-visible error numbers are in the range -1 - -4095 */ diff -Nru a/include/linux/adfs_fs_i.h b/include/linux/adfs_fs_i.h --- a/include/linux/adfs_fs_i.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/adfs_fs_i.h 2004-09-06 16:37:52 -07:00 @@ -17,7 +17,7 @@ __u32 execaddr; /* RISC OS exec address */ unsigned int filetype; /* RISC OS file type */ unsigned int attr; /* RISC OS permissions */ - int stamped:1; /* RISC OS file has date/time */ + unsigned int stamped:1; /* RISC OS file has date/time */ struct inode vfs_inode; }; diff -Nru a/include/linux/aio.h b/include/linux/aio.h --- a/include/linux/aio.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/aio.h 2004-09-06 16:37:55 -07:00 @@ -52,7 +52,7 @@ struct file *ki_filp; struct kioctx *ki_ctx; /* may be NULL for sync ops */ int (*ki_cancel)(struct kiocb *, struct io_event *); - long (*ki_retry)(struct kiocb *); + ssize_t (*ki_retry)(struct kiocb *); void (*ki_dtor)(struct kiocb *); struct list_head ki_list; /* the aio core uses this @@ -64,6 +64,16 @@ } ki_obj; __u64 ki_user_data; /* user's data for completion */ loff_t ki_pos; + /* State that we remember to be able to restart/retry */ + unsigned short ki_opcode; + size_t ki_nbytes; /* copy of iocb->aio_nbytes */ + char __user *ki_buf; /* remaining iocb->aio_buf */ + size_t ki_left; /* remaining bytes */ + wait_queue_t ki_wait; + long ki_retried; /* just for testing */ + long ki_kicked; /* just for testing */ + long ki_queued; /* just for testing */ + void *private; }; @@ -79,6 +89,8 @@ (x)->ki_cancel = NULL; \ (x)->ki_dtor = NULL; \ (x)->ki_obj.tsk = tsk; \ + (x)->ki_user_data = 0; \ + init_wait((&(x)->ki_wait)); \ } while (0) #define AIO_RING_MAGIC 0xa10a10a1 @@ -160,6 +172,20 @@ #define get_ioctx(kioctx) do { if (unlikely(atomic_read(&(kioctx)->users) <= 0)) BUG(); atomic_inc(&(kioctx)->users); } while (0) #define put_ioctx(kioctx) do { if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); else if (unlikely(atomic_read(&(kioctx)->users) < 0)) BUG(); } while (0) + +#define in_aio() !is_sync_wait(current->io_wait) +/* may be used for debugging */ +#define warn_if_async() \ +do { \ + if (in_aio()) { \ + printk(KERN_ERR "%s(%s:%d) called in async context!\n", \ + __FUNCTION__, __FILE__, __LINE__); \ + dump_stack(); \ + } \ +} while (0) + +#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) +#define is_retried_kiocb(iocb) ((iocb)->ki_retried > 1) #include diff -Nru a/include/linux/bitmap.h b/include/linux/bitmap.h --- a/include/linux/bitmap.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/bitmap.h 2004-09-06 16:37:55 -07:00 @@ -98,6 +98,9 @@ const unsigned long *src, int nbits); extern int bitmap_parse(const char __user *ubuf, unsigned int ulen, unsigned long *dst, int nbits); +extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); +extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); +extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); #define BITMAP_LAST_WORD_MASK(nbits) \ ( \ diff -Nru a/include/linux/bootmem.h b/include/linux/bootmem.h --- a/include/linux/bootmem.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/bootmem.h 2004-09-06 16:37:54 -07:00 @@ -67,6 +67,9 @@ __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ +extern unsigned long __initdata nr_kernel_pages; +extern unsigned long __initdata nr_all_pages; + extern void *__init alloc_large_system_hash(const char *tablename, unsigned long bucketsize, unsigned long numentries, diff -Nru a/include/linux/buffer_head.h b/include/linux/buffer_head.h --- a/include/linux/buffer_head.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/buffer_head.h 2004-09-06 16:37:50 -07:00 @@ -49,12 +49,12 @@ struct buffer_head { /* First cache line: */ unsigned long b_state; /* buffer state bitmap (see above) */ - atomic_t b_count; /* users using this block */ struct buffer_head *b_this_page;/* circular list of page's buffers */ struct page *b_page; /* the page this bh is mapped to */ + atomic_t b_count; /* users using this block */ + u32 b_size; /* block size */ sector_t b_blocknr; /* block number */ - u32 b_size; /* block size */ char *b_data; /* pointer to data block */ struct block_device *b_bdev; @@ -272,12 +272,14 @@ */ static inline void wait_on_buffer(struct buffer_head *bh) { + might_sleep(); if (buffer_locked(bh) || atomic_read(&bh->b_count) == 0) __wait_on_buffer(bh); } static inline void lock_buffer(struct buffer_head *bh) { + might_sleep(); if (test_set_buffer_locked(bh)) __lock_buffer(bh); } diff -Nru a/include/linux/coda.h b/include/linux/coda.h --- a/include/linux/coda.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/coda.h 2004-09-06 16:37:52 -07:00 @@ -200,7 +200,7 @@ typedef u_int32_t vgid_t; #endif /*_VUID_T_ */ -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API struct CodaFid { u_int32_t opaque[3]; }; @@ -220,7 +220,7 @@ vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */ }; -#else /* not defined(CODA_FS_OLD_API) */ +#else /* not defined(CONFIG_CODA_FS_OLD_API) */ struct CodaFid { u_int32_t opaque[4]; @@ -318,7 +318,7 @@ #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ #define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */ #endif -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API #define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */ #else #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ @@ -330,7 +330,7 @@ struct coda_in_hdr { u_int32_t opcode; u_int32_t unique; /* Keep multiple outstanding msgs distinct */ -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API u_int16_t pid; /* Common to all */ u_int16_t pgid; /* Common to all */ u_int16_t sid; /* Common to all */ @@ -614,7 +614,7 @@ /* CODA_PURGEUSER is a venus->kernel call */ struct coda_purgeuser_out { struct coda_out_hdr oh; -#ifdef CODA_FS_OLD_API +#ifdef CONFIG_CODA_FS_OLD_API struct coda_cred cred; #else vuid_t uid; diff -Nru a/include/linux/compat.h b/include/linux/compat.h --- a/include/linux/compat.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/compat.h 2004-09-06 16:37:52 -07:00 @@ -79,6 +79,8 @@ compat_long_t ru_nivcsw; }; +extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); + struct compat_dirent { u32 d_ino; compat_off_t d_off; diff -Nru a/include/linux/cpufreq.h b/include/linux/cpufreq.h --- a/include/linux/cpufreq.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/cpufreq.h 2004-09-06 16:37:53 -07:00 @@ -209,13 +209,6 @@ #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel * "constants" aren't affected by * frequency transitions */ -#define CPUFREQ_PANIC_OUTOFSYNC 0x04 /* panic if cpufreq's opinion of - * current frequency differs from - * actual frequency */ -#define CPUFREQ_PANIC_RESUME_OUTOFSYNC 0x08 /* panic if cpufreq's opinion of - * current frequency differs from - * actual frequency on resume - * from sleep. */ int cpufreq_register_driver(struct cpufreq_driver *driver_data); diff -Nru a/include/linux/cpumask.h b/include/linux/cpumask.h --- a/include/linux/cpumask.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/cpumask.h 2004-09-06 16:37:52 -07:00 @@ -73,6 +73,7 @@ * inside a macro, the way we do the other calls. */ +#include #include #include #include @@ -207,13 +208,13 @@ #define first_cpu(src) __first_cpu(&(src), NR_CPUS) static inline int __first_cpu(const cpumask_t *srcp, int nbits) { - return find_first_bit(srcp->bits, nbits); + return min_t(int, nbits, find_first_bit(srcp->bits, nbits)); } #define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS) static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits) { - return find_next_bit(srcp->bits, nbits, n+1); + return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1)); } #define cpumask_of_cpu(cpu) \ diff -Nru a/include/linux/dcache.h b/include/linux/dcache.h --- a/include/linux/dcache.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/dcache.h 2004-09-06 16:37:55 -07:00 @@ -33,8 +33,8 @@ */ struct qstr { unsigned int hash; - const unsigned char *name; unsigned int len; + const unsigned char *name; }; struct dentry_stat_t { @@ -101,11 +101,11 @@ unsigned long d_time; /* used by d_revalidate */ struct dentry_operations *d_op; struct super_block *d_sb; /* The root of the dentry tree */ - int d_mounted; void *d_fsdata; /* fs-specific data */ struct rcu_head d_rcu; struct dcookie_struct *d_cookie; /* cookie, if any */ struct hlist_node d_hash; /* lookup hash list */ + int d_mounted; unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ }; diff -Nru a/include/linux/delay.h b/include/linux/delay.h --- a/include/linux/delay.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/delay.h 2004-09-06 16:37:51 -07:00 @@ -39,5 +39,11 @@ #endif void msleep(unsigned int msecs); +unsigned long msleep_interruptible(unsigned int msecs); + +static inline void ssleep(unsigned int seconds) +{ + msleep(seconds * 1000); +} #endif /* defined(_LINUX_DELAY_H) */ diff -Nru a/include/linux/device.h b/include/linux/device.h --- a/include/linux/device.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/device.h 2004-09-06 16:37:54 -07:00 @@ -59,7 +59,6 @@ struct driver_attribute * drv_attrs; int (*match)(struct device * dev, struct device_driver * drv); - struct device * (*add) (struct device * parent, char * bus_id); int (*hotplug) (struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); int (*suspend)(struct device * dev, u32 state); @@ -284,6 +283,9 @@ allocations such descriptors. */ struct list_head dma_pools; /* dma pools (if dma'ble) */ + + struct dma_coherent_mem *dma_mem; /* internal for coherent mem + override */ void (*release)(struct device * dev); }; diff -Nru a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h --- a/include/linux/dma-mapping.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/dma-mapping.h 2004-09-06 16:37:54 -07:00 @@ -1,6 +1,8 @@ #ifndef _ASM_LINUX_DMA_MAPPING_H #define _ASM_LINUX_DMA_MAPPING_H +#include + /* These definitions mirror those in pci.h, so they can be used * interchangeably with their PCI_ counterparts */ enum dma_data_direction { @@ -20,6 +22,33 @@ #define dma_sync_sg dma_sync_sg_for_cpu extern u64 dma_get_required_mask(struct device *dev); + +/* flags for the coherent memory api */ +#define DMA_MEMORY_MAP 0x01 +#define DMA_MEMORY_IO 0x02 +#define DMA_MEMORY_INCLUDES_CHILDREN 0x04 +#define DMA_MEMORY_EXCLUSIVE 0x08 + +#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY +static inline int +dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int flags) +{ + return 0; +} + +static inline void +dma_release_declared_memory(struct device *dev) +{ +} + +static inline void * +dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size) +{ + return ERR_PTR(-EBUSY); +} +#endif #endif diff -Nru a/include/linux/errno.h b/include/linux/errno.h --- a/include/linux/errno.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/errno.h 2004-09-06 16:37:54 -07:00 @@ -22,6 +22,7 @@ #define EBADTYPE 527 /* Type not supported by server */ #define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */ #define EIOCBQUEUED 529 /* iocb queued, will get completion event */ +#define EIOCBRETRY 530 /* iocb queued, will trigger a retry */ #endif diff -Nru a/include/linux/fs.h b/include/linux/fs.h --- a/include/linux/fs.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/fs.h 2004-09-06 16:37:51 -07:00 @@ -335,14 +335,14 @@ struct inode *host; /* owner: inode, block_device */ struct radix_tree_root page_tree; /* radix tree of all pages */ spinlock_t tree_lock; /* and spinlock protecting it */ - unsigned long nrpages; /* number of total pages */ - pgoff_t writeback_index;/* writeback starts here */ - struct address_space_operations *a_ops; /* methods */ - struct prio_tree_root i_mmap; /* tree of private mappings */ unsigned int i_mmap_writable;/* count VM_SHARED mappings */ + struct prio_tree_root i_mmap; /* tree of private mappings */ struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ spinlock_t i_mmap_lock; /* protect tree, count, list */ atomic_t truncate_count; /* Cover race condition with truncate */ + unsigned long nrpages; /* number of total pages */ + pgoff_t writeback_index;/* writeback starts here */ + struct address_space_operations *a_ops; /* methods */ unsigned long flags; /* error bits/gfp mask */ struct backing_dev_info *backing_dev_info; /* device readahead, etc */ spinlock_t private_lock; /* for use by the address_space */ @@ -437,6 +437,7 @@ unsigned long i_version; unsigned long i_blocks; unsigned short i_bytes; + unsigned char i_sock; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ struct semaphore i_sem; struct rw_semaphore i_alloc_sem; @@ -456,6 +457,8 @@ struct cdev *i_cdev; int i_cindex; + __u32 i_generation; + unsigned long i_dnotify_mask; /* Directory notify events */ struct dnotify_struct *i_dnotify; /* for directory notifications */ @@ -463,11 +466,9 @@ unsigned long dirtied_when; /* jiffies of first dirtying */ unsigned int i_flags; - unsigned char i_sock; atomic_t i_writecount; void *i_security; - __u32 i_generation; union { void *generic_ip; } u; @@ -1570,6 +1571,39 @@ /* kernel/fork.c */ extern int unshare_files(void); + +/* Transaction based IO helpers */ + +/* + * An argresp is stored in an allocated page and holds the + * size of the argument or response, along with its content + */ +struct simple_transaction_argresp { + ssize_t size; + char data[0]; +}; + +#define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp)) + +char *simple_transaction_get(struct file *file, const char __user *buf, + size_t size); +ssize_t simple_transaction_read(struct file *file, char __user *buf, + size_t size, loff_t *pos); +int simple_transaction_release(struct inode *inode, struct file *file); + +static inline void simple_transaction_set(struct file *file, size_t n) +{ + struct simple_transaction_argresp *ar = file->private_data; + + BUG_ON(n > SIMPLE_TRANSACTION_LIMIT); + + /* + * The barrier ensures that ar->size will really remain zero until + * ar->data is ready for reading. + */ + smp_mb(); + ar->size = n; +} #ifdef CONFIG_SECURITY static inline char *alloc_secdata(void) diff -Nru a/include/linux/genhd.h b/include/linux/genhd.h --- a/include/linux/genhd.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/genhd.h 2004-09-06 16:37:51 -07:00 @@ -100,7 +100,7 @@ struct timer_rand_state *random; int policy; - unsigned sync_io; /* RAID */ + atomic_t sync_io; /* RAID */ unsigned long stamp, stamp_idle; int in_flight; #ifdef CONFIG_SMP diff -Nru a/include/linux/gfp.h b/include/linux/gfp.h --- a/include/linux/gfp.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/gfp.h 2004-09-06 16:37:51 -07:00 @@ -73,6 +73,11 @@ * For the normal case of non-DISCONTIGMEM systems the NODE_DATA() gets * optimized to &contig_page_data at compile-time. */ + +#ifndef HAVE_ARCH_FREE_PAGE +static inline void arch_free_page(struct page *page, int order) { } +#endif + extern struct page * FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *)); diff -Nru a/include/linux/ghash.h b/include/linux/ghash.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/ghash.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,236 @@ +/* + * include/linux/ghash.h -- generic hashing with fuzzy retrieval + * + * (C) 1997 Thomas Schoebel-Theuer + * + * The algorithms implemented here seem to be a completely new invention, + * and I'll publish the fundamentals in a paper. + */ + +#ifndef _GHASH_H +#define _GHASH_H +/* HASHSIZE _must_ be a power of two!!! */ + + +#define DEF_HASH_FUZZY_STRUCTS(NAME,HASHSIZE,TYPE) \ +\ +struct NAME##_table {\ + TYPE * hashtable[HASHSIZE];\ + TYPE * sorted_list;\ + int nr_entries;\ +};\ +\ +struct NAME##_ptrs {\ + TYPE * next_hash;\ + TYPE * prev_hash;\ + TYPE * next_sorted;\ + TYPE * prev_sorted;\ +}; + +#define DEF_HASH_FUZZY(LINKAGE,NAME,HASHSIZE,TYPE,PTRS,KEYTYPE,KEY,KEYCMP,KEYEQ,HASHFN)\ +\ +LINKAGE void insert_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\ +{\ + int ix = HASHFN(elem->KEY);\ + TYPE ** base = &tbl->hashtable[ix];\ + TYPE * ptr = *base;\ + TYPE * prev = NULL;\ +\ + tbl->nr_entries++;\ + while(ptr && KEYCMP(ptr->KEY, elem->KEY)) {\ + base = &ptr->PTRS.next_hash;\ + prev = ptr;\ + ptr = *base;\ + }\ + elem->PTRS.next_hash = ptr;\ + elem->PTRS.prev_hash = prev;\ + if(ptr) {\ + ptr->PTRS.prev_hash = elem;\ + }\ + *base = elem;\ +\ + ptr = prev;\ + if(!ptr) {\ + ptr = tbl->sorted_list;\ + prev = NULL;\ + } else {\ + prev = ptr->PTRS.prev_sorted;\ + }\ + while(ptr) {\ + TYPE * next = ptr->PTRS.next_hash;\ + if(next && KEYCMP(next->KEY, elem->KEY)) {\ + prev = ptr;\ + ptr = next;\ + } else if(KEYCMP(ptr->KEY, elem->KEY)) {\ + prev = ptr;\ + ptr = ptr->PTRS.next_sorted;\ + } else\ + break;\ + }\ + elem->PTRS.next_sorted = ptr;\ + elem->PTRS.prev_sorted = prev;\ + if(ptr) {\ + ptr->PTRS.prev_sorted = elem;\ + }\ + if(prev) {\ + prev->PTRS.next_sorted = elem;\ + } else {\ + tbl->sorted_list = elem;\ + }\ +}\ +\ +LINKAGE void remove_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\ +{\ + TYPE * next = elem->PTRS.next_hash;\ + TYPE * prev = elem->PTRS.prev_hash;\ +\ + tbl->nr_entries--;\ + if(next)\ + next->PTRS.prev_hash = prev;\ + if(prev)\ + prev->PTRS.next_hash = next;\ + else {\ + int ix = HASHFN(elem->KEY);\ + tbl->hashtable[ix] = next;\ + }\ +\ + next = elem->PTRS.next_sorted;\ + prev = elem->PTRS.prev_sorted;\ + if(next)\ + next->PTRS.prev_sorted = prev;\ + if(prev)\ + prev->PTRS.next_sorted = next;\ + else\ + tbl->sorted_list = next;\ +}\ +\ +LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ +{\ + int ix = hashfn(pos);\ + TYPE * ptr = tbl->hashtable[ix];\ + while(ptr && KEYCMP(ptr->KEY, pos))\ + ptr = ptr->PTRS.next_hash;\ + if(ptr && !KEYEQ(ptr->KEY, pos))\ + ptr = NULL;\ + return ptr;\ +}\ +\ +LINKAGE TYPE * find_##NAME##_hash_fuzzy(struct NAME##_table * tbl, KEYTYPE pos)\ +{\ + int ix;\ + int offset;\ + TYPE * ptr;\ + TYPE * next;\ +\ + ptr = tbl->sorted_list;\ + if(!ptr || KEYCMP(pos, ptr->KEY))\ + return NULL;\ + ix = HASHFN(pos);\ + offset = HASHSIZE;\ + do {\ + offset >>= 1;\ + next = tbl->hashtable[(ix+offset) & ((HASHSIZE)-1)];\ + if(next && (KEYCMP(next->KEY, pos) || KEYEQ(next->KEY, pos))\ + && KEYCMP(ptr->KEY, next->KEY))\ + ptr = next;\ + } while(offset);\ +\ + for(;;) {\ + next = ptr->PTRS.next_hash;\ + if(next) {\ + if(KEYCMP(next->KEY, pos)) {\ + ptr = next;\ + continue;\ + }\ + }\ + next = ptr->PTRS.next_sorted;\ + if(next && KEYCMP(next->KEY, pos)) {\ + ptr = next;\ + continue;\ + }\ + return ptr;\ + }\ + return NULL;\ +} + +/* LINKAGE - empty or "static", depending on whether you want the definitions to + * be public or not + * NAME - a string to stick in names to make this hash table type distinct from + * any others + * HASHSIZE - number of buckets + * TYPE - type of data contained in the buckets - must be a structure, one + * field is of type NAME_ptrs, another is the hash key + * PTRS - TYPE must contain a field of type NAME_ptrs, PTRS is the name of that + * field + * KEYTYPE - type of the key field within TYPE + * KEY - name of the key field within TYPE + * KEYCMP - pointer to function that compares KEYTYPEs to each other - the + * prototype is int KEYCMP(KEYTYPE, KEYTYPE), it returns zero for equal, + * non-zero for not equal + * HASHFN - the hash function - the prototype is int HASHFN(KEYTYPE), + * it returns a number in the range 0 ... HASHSIZE - 1 + * Call DEF_HASH_STRUCTS, define your hash table as a NAME_table, then call + * DEF_HASH. + */ + +#define DEF_HASH_STRUCTS(NAME,HASHSIZE,TYPE) \ +\ +struct NAME##_table {\ + TYPE * hashtable[HASHSIZE];\ + int nr_entries;\ +};\ +\ +struct NAME##_ptrs {\ + TYPE * next_hash;\ + TYPE * prev_hash;\ +}; + +#define DEF_HASH(LINKAGE,NAME,TYPE,PTRS,KEYTYPE,KEY,KEYCMP,HASHFN)\ +\ +LINKAGE void insert_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\ +{\ + int ix = HASHFN(elem->KEY);\ + TYPE ** base = &tbl->hashtable[ix];\ + TYPE * ptr = *base;\ + TYPE * prev = NULL;\ +\ + tbl->nr_entries++;\ + while(ptr && KEYCMP(ptr->KEY, elem->KEY)) {\ + base = &ptr->PTRS.next_hash;\ + prev = ptr;\ + ptr = *base;\ + }\ + elem->PTRS.next_hash = ptr;\ + elem->PTRS.prev_hash = prev;\ + if(ptr) {\ + ptr->PTRS.prev_hash = elem;\ + }\ + *base = elem;\ +}\ +\ +LINKAGE void remove_##NAME##_hash(struct NAME##_table * tbl, TYPE * elem)\ +{\ + TYPE * next = elem->PTRS.next_hash;\ + TYPE * prev = elem->PTRS.prev_hash;\ +\ + tbl->nr_entries--;\ + if(next)\ + next->PTRS.prev_hash = prev;\ + if(prev)\ + prev->PTRS.next_hash = next;\ + else {\ + int ix = HASHFN(elem->KEY);\ + tbl->hashtable[ix] = next;\ + }\ +}\ +\ +LINKAGE TYPE * find_##NAME##_hash(struct NAME##_table * tbl, KEYTYPE pos)\ +{\ + int ix = HASHFN(pos);\ + TYPE * ptr = tbl->hashtable[ix];\ + while(ptr && KEYCMP(ptr->KEY, pos))\ + ptr = ptr->PTRS.next_hash;\ + return ptr;\ +} + +#endif diff -Nru a/include/linux/hdreg.h b/include/linux/hdreg.h --- a/include/linux/hdreg.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/hdreg.h 2004-09-06 16:37:52 -07:00 @@ -449,9 +449,8 @@ /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ /* 0x330 is reserved - used to be HDIO_GETGEO_BIG */ /* 0x331 is reserved - used to be HDIO_GETGEO_BIG_RAW */ - -#define HDIO_SET_IDE_SCSI 0x0338 -#define HDIO_SET_SCSI_IDE 0x0339 +/* 0x338 is reserved - used to be HDIO_SET_IDE_SCSI */ +/* 0x339 is reserved - used to be HDIO_SET_SCSI_IDE */ #define __NEW_HD_DRIVE_ID diff -Nru a/include/linux/highuid.h b/include/linux/highuid.h --- a/include/linux/highuid.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/highuid.h 2004-09-06 16:37:53 -07:00 @@ -44,8 +44,8 @@ #ifdef CONFIG_UID16 /* prevent uid mod 65536 effect by returning a default value for high UIDs */ -#define high2lowuid(uid) ((uid) > 65535 ? (old_uid_t)overflowuid : (old_uid_t)(uid)) -#define high2lowgid(gid) ((gid) > 65535 ? (old_gid_t)overflowgid : (old_gid_t)(gid)) +#define high2lowuid(uid) ((uid) & ~0xFFFF ? (old_uid_t)overflowuid : (old_uid_t)(uid)) +#define high2lowgid(gid) ((gid) & ~0xFFFF ? (old_gid_t)overflowgid : (old_gid_t)(gid)) /* * -1 is different in 16 bits than it is in 32 bits * these macros are used by chown(), setreuid(), ..., @@ -89,8 +89,8 @@ * Since these macros are used in architectures that only need limited * 16-bit UID back compatibility, we won't use old_uid_t and old_gid_t */ -#define fs_high2lowuid(uid) ((uid) > 65535 ? (uid16_t)fs_overflowuid : (uid16_t)(uid)) -#define fs_high2lowgid(gid) ((gid) > 65535 ? (gid16_t)fs_overflowgid : (gid16_t)(gid)) +#define fs_high2lowuid(uid) ((uid) & ~0xFFFF ? (uid16_t)fs_overflowuid : (uid16_t)(uid)) +#define fs_high2lowgid(gid) ((gid) & ~0xFFFF ? (gid16_t)fs_overflowgid : (gid16_t)(gid)) #define low_16_bits(x) ((x) & 0xFFFF) #define high_16_bits(x) (((x) & 0xFFFF0000) >> 16) diff -Nru a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h --- a/include/linux/i2o-dev.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/i2o-dev.h 2004-09-06 16:37:51 -07:00 @@ -1,13 +1,13 @@ /* * I2O user space accessible structures/APIs - * + * * (c) Copyright 1999, 2000 Red Hat Software * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * ************************************************************************* * * This header file defines the I2O APIs that are available to both @@ -23,7 +23,7 @@ /* How many controllers are we allowing */ #define MAX_I2O_CONTROLLERS 32 -#include +//#include /* * I2O Control IOCTLs and structures @@ -42,22 +42,25 @@ #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) #define I2OPASSTHRU _IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru) +#define I2OPASSTHRU32 _IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru32) + +struct i2o_cmd_passthru32 { + unsigned int iop; /* IOP unit number */ + u32 msg; /* message */ +}; -struct i2o_cmd_passthru -{ +struct i2o_cmd_passthru { unsigned int iop; /* IOP unit number */ void __user *msg; /* message */ }; -struct i2o_cmd_hrtlct -{ +struct i2o_cmd_hrtlct { unsigned int iop; /* IOP unit number */ void __user *resbuf; /* Buffer for result */ unsigned int __user *reslen; /* Buffer length in bytes */ }; -struct i2o_cmd_psetget -{ +struct i2o_cmd_psetget { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device TID */ void __user *opbuf; /* Operation List buffer */ @@ -66,8 +69,7 @@ unsigned int __user *reslen; /* Result List buffer length in bytes */ }; -struct i2o_sw_xfer -{ +struct i2o_sw_xfer { unsigned int iop; /* IOP unit number */ unsigned char flags; /* Flags field */ unsigned char sw_type; /* Software type */ @@ -78,21 +80,19 @@ unsigned int __user *curfrag; /* Current fragment count */ }; -struct i2o_html -{ +struct i2o_html { unsigned int iop; /* IOP unit number */ unsigned int tid; /* Target device ID */ unsigned int page; /* HTML page */ - void __user *resbuf; /* Buffer for reply HTML page */ + void __user *resbuf; /* Buffer for reply HTML page */ unsigned int __user *reslen; /* Length in bytes of reply buffer */ - void __user *qbuf; /* Pointer to HTTP query string */ + void __user *qbuf; /* Pointer to HTTP query string */ unsigned int qlen; /* Length in bytes of query string buffer */ }; #define I2O_EVT_Q_LEN 32 -struct i2o_evt_id -{ +struct i2o_evt_id { unsigned int iop; unsigned int tid; unsigned int evt_mask; @@ -101,21 +101,18 @@ /* Event data size = frame size - message header + evt indicator */ #define I2O_EVT_DATA_SIZE 88 -struct i2o_evt_info -{ +struct i2o_evt_info { struct i2o_evt_id id; unsigned char evt_data[I2O_EVT_DATA_SIZE]; unsigned int data_size; }; -struct i2o_evt_get -{ +struct i2o_evt_get { struct i2o_evt_info info; int pending; int lost; }; - /************************************************************************** * HRT related constants and structures **************************************************************************/ @@ -135,139 +132,127 @@ typedef unsigned short u16; typedef unsigned int u32; -#endif /* __KERNEL__ */ +#endif /* __KERNEL__ */ -typedef struct _i2o_pci_bus -{ - u8 PciFunctionNumber; - u8 PciDeviceNumber; - u8 PciBusNumber; - u8 reserved; - u16 PciVendorID; - u16 PciDeviceID; +typedef struct _i2o_pci_bus { + u8 PciFunctionNumber; + u8 PciDeviceNumber; + u8 PciBusNumber; + u8 reserved; + u16 PciVendorID; + u16 PciDeviceID; } i2o_pci_bus; -typedef struct _i2o_local_bus -{ - u16 LbBaseIOPort; - u16 reserved; - u32 LbBaseMemoryAddress; +typedef struct _i2o_local_bus { + u16 LbBaseIOPort; + u16 reserved; + u32 LbBaseMemoryAddress; } i2o_local_bus; -typedef struct _i2o_isa_bus -{ - u16 IsaBaseIOPort; - u8 CSN; - u8 reserved; - u32 IsaBaseMemoryAddress; +typedef struct _i2o_isa_bus { + u16 IsaBaseIOPort; + u8 CSN; + u8 reserved; + u32 IsaBaseMemoryAddress; } i2o_isa_bus; -typedef struct _i2o_eisa_bus_info -{ - u16 EisaBaseIOPort; - u8 reserved; - u8 EisaSlotNumber; - u32 EisaBaseMemoryAddress; +typedef struct _i2o_eisa_bus_info { + u16 EisaBaseIOPort; + u8 reserved; + u8 EisaSlotNumber; + u32 EisaBaseMemoryAddress; } i2o_eisa_bus; -typedef struct _i2o_mca_bus -{ - u16 McaBaseIOPort; - u8 reserved; - u8 McaSlotNumber; - u32 McaBaseMemoryAddress; +typedef struct _i2o_mca_bus { + u16 McaBaseIOPort; + u8 reserved; + u8 McaSlotNumber; + u32 McaBaseMemoryAddress; } i2o_mca_bus; -typedef struct _i2o_other_bus -{ +typedef struct _i2o_other_bus { u16 BaseIOPort; u16 reserved; u32 BaseMemoryAddress; } i2o_other_bus; -typedef struct _i2o_hrt_entry -{ - u32 adapter_id; - u32 parent_tid:12; - u32 state:4; - u32 bus_num:8; - u32 bus_type:8; - union - { - i2o_pci_bus pci_bus; - i2o_local_bus local_bus; - i2o_isa_bus isa_bus; - i2o_eisa_bus eisa_bus; - i2o_mca_bus mca_bus; - i2o_other_bus other_bus; +typedef struct _i2o_hrt_entry { + u32 adapter_id; + u32 parent_tid:12; + u32 state:4; + u32 bus_num:8; + u32 bus_type:8; + union { + i2o_pci_bus pci_bus; + i2o_local_bus local_bus; + i2o_isa_bus isa_bus; + i2o_eisa_bus eisa_bus; + i2o_mca_bus mca_bus; + i2o_other_bus other_bus; } bus; } i2o_hrt_entry; -typedef struct _i2o_hrt -{ - u16 num_entries; - u8 entry_len; - u8 hrt_version; - u32 change_ind; +typedef struct _i2o_hrt { + u16 num_entries; + u8 entry_len; + u8 hrt_version; + u32 change_ind; i2o_hrt_entry hrt_entry[1]; } i2o_hrt; -typedef struct _i2o_lct_entry -{ - u32 entry_size:16; - u32 tid:12; - u32 reserved:4; - u32 change_ind; - u32 device_flags; - u32 class_id:12; - u32 version:4; - u32 vendor_id:16; - u32 sub_class; - u32 user_tid:12; - u32 parent_tid:12; - u32 bios_info:8; - u8 identity_tag[8]; - u32 event_capabilities; +typedef struct _i2o_lct_entry { + u32 entry_size:16; + u32 tid:12; + u32 reserved:4; + u32 change_ind; + u32 device_flags; + u32 class_id:12; + u32 version:4; + u32 vendor_id:16; + u32 sub_class; + u32 user_tid:12; + u32 parent_tid:12; + u32 bios_info:8; + u8 identity_tag[8]; + u32 event_capabilities; } i2o_lct_entry; -typedef struct _i2o_lct -{ - u32 table_size:16; - u32 boot_tid:12; - u32 lct_ver:4; - u32 iop_flags; - u32 change_ind; +typedef struct _i2o_lct { + u32 table_size:16; + u32 boot_tid:12; + u32 lct_ver:4; + u32 iop_flags; + u32 change_ind; i2o_lct_entry lct_entry[1]; } i2o_lct; -typedef struct _i2o_status_block -{ - u16 org_id; - u16 reserved; - u16 iop_id:12; - u16 reserved1:4; - u16 host_unit_id; - u16 segment_number:12; - u16 i2o_version:4; - u8 iop_state; - u8 msg_type; - u16 inbound_frame_size; - u8 init_code; - u8 reserved2; - u32 max_inbound_frames; - u32 cur_inbound_frames; - u32 max_outbound_frames; - char product_id[24]; - u32 expected_lct_size; - u32 iop_capabilities; - u32 desired_mem_size; - u32 current_mem_size; - u32 current_mem_base; - u32 desired_io_size; - u32 current_io_size; - u32 current_io_base; - u32 reserved3:24; - u32 cmd_status:8; +typedef struct _i2o_status_block { + u16 org_id; + u16 reserved; + u16 iop_id:12; + u16 reserved1:4; + u16 host_unit_id; + u16 segment_number:12; + u16 i2o_version:4; + u8 iop_state; + u8 msg_type; + u16 inbound_frame_size; + u8 init_code; + u8 reserved2; + u32 max_inbound_frames; + u32 cur_inbound_frames; + u32 max_outbound_frames; + char product_id[24]; + u32 expected_lct_size; + u32 iop_capabilities; + u32 desired_mem_size; + u32 current_mem_size; + u32 current_mem_base; + u32 desired_io_size; + u32 current_io_size; + u32 current_io_base; + u32 reserved3:24; + u32 cmd_status:8; } i2o_status_block; /* Event indicator mask flags */ @@ -351,14 +336,15 @@ #define I2O_CLASS_BUS_ADAPTER_PORT 0x080 #define I2O_CLASS_PEER_TRANSPORT_AGENT 0x090 #define I2O_CLASS_PEER_TRANSPORT 0x091 +#define I2O_CLASS_END 0xfff -/* +/* * Rest of 0x092 - 0x09f reserved for peer-to-peer classes */ #define I2O_CLASS_MATCH_ANYCLASS 0xffffffff -/* +/* * Subclasses */ @@ -380,7 +366,7 @@ #define I2O_PARAMS_TABLE_CLEAR 0x000A /* - * I2O serial number conventions / formats + * I2O serial number conventions / formats * (circa v1.5) */ @@ -391,7 +377,7 @@ #define I2O_SNFORMAT_LAN48_MAC 4 #define I2O_SNFORMAT_WAN 5 -/* +/* * Plus new in v2.0 (Yellowstone pdf doc) */ @@ -402,7 +388,7 @@ #define I2O_SNFORMAT_UNKNOWN2 0xff /* - * I2O Get Status State values + * I2O Get Status State values */ #define ADAPTER_STATE_INITIALIZING 0x01 @@ -413,4 +399,4 @@ #define ADAPTER_STATE_FAILED 0x10 #define ADAPTER_STATE_FAULTED 0x11 -#endif /* _I2O_DEV_H */ +#endif /* _I2O_DEV_H */ diff -Nru a/include/linux/i2o.h b/include/linux/i2o.h --- a/include/linux/i2o.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/i2o.h 2004-09-06 16:37:51 -07:00 @@ -1,16 +1,16 @@ /* * I2O kernel space accessible structures/APIs - * + * * (c) Copyright 1999, 2000 Red Hat Software * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * ************************************************************************* * - * This header file defined the I2O APIs/structures for use by + * This header file defined the I2O APIs/structures for use by * the I2O kernel modules. * */ @@ -18,309 +18,586 @@ #ifndef _I2O_H #define _I2O_H -#ifdef __KERNEL__ /* This file to be included by kernel only */ +#ifdef __KERNEL__ /* This file to be included by kernel only */ #include /* How many different OSM's are we allowing */ -#define MAX_I2O_MODULES 4 - -/* How many OSMs can register themselves for device status updates? */ -#define I2O_MAX_MANAGERS 4 +#define I2O_MAX_DRIVERS 4 +#include #include /* Needed for MUTEX init macros */ -#include -#include -#include +#include +#include + +/* message queue empty */ +#define I2O_QUEUE_EMPTY 0xffffffff /* * Message structures */ -struct i2o_message -{ - u8 version_offset; - u8 flags; - u16 size; - u32 target_tid:12; - u32 init_tid:12; - u32 function:8; - u32 initiator_context; +struct i2o_message { + union { + struct { + u8 version_offset; + u8 flags; + u16 size; + u32 target_tid:12; + u32 init_tid:12; + u32 function:8; + u32 icntxt; /* initiator context */ + u32 tcntxt; /* transaction context */ + } s; + u32 head[4]; + } u; /* List follows */ + u32 body[0]; }; /* - * Each I2O device entity has one or more of these. There is one - * per device. + * Each I2O device entity has one of these. There is one per device. */ -struct i2o_device -{ - i2o_lct_entry lct_data; /* Device LCT information */ - u32 flags; - int i2oversion; /* I2O version supported. Actually - * there should be high and low - * version */ +struct i2o_device { + i2o_lct_entry lct_data; /* Device LCT information */ - struct proc_dir_entry *proc_entry; /* /proc dir */ + struct i2o_controller *iop; /* Controlling IOP */ + struct list_head list; /* node in IOP devices list */ + + struct device device; - /* Primary user */ - struct i2o_handler *owner; + struct semaphore lock; /* device lock */ - /* Management users */ - struct i2o_handler *managers[I2O_MAX_MANAGERS]; - int num_managers; + struct class_device classdev; /* i2o device class */ +}; - struct i2o_controller *controller; /* Controlling IOP */ - struct i2o_device *next; /* Chain */ - struct i2o_device *prev; - char dev_name[8]; /* linux /dev name if available */ +/* + * Event structure provided to the event handling function + */ +struct i2o_event { + struct work_struct work; + struct i2o_device *i2o_dev; /* I2O device pointer from which the + event reply was initiated */ + u16 size; /* Size of data in 32-bit words */ + u32 tcntxt; /* Transaction context used at + registration */ + u32 event_indicator; /* Event indicator from reply */ + u32 data[0]; /* Event data from reply */ }; /* - * context queue entry, used for 32-bit context on 64-bit systems + * I2O classes which could be handled by the OSM + */ +struct i2o_class_id { + u16 class_id:12; +}; + +/* + * I2O driver structure for OSMs + */ +struct i2o_driver { + char *name; /* OSM name */ + int context; /* Low 8 bits of the transaction info */ + struct i2o_class_id *classes; /* I2O classes that this OSM handles */ + + /* Message reply handler */ + int (*reply) (struct i2o_controller *, u32, struct i2o_message *); + + /* Event handler */ + void (*event) (struct i2o_event *); + + struct workqueue_struct *event_queue; /* Event queue */ + + struct device_driver driver; + + /* notification of changes */ + void (*notify_controller_add) (struct i2o_controller *); + void (*notify_controller_remove) (struct i2o_controller *); + void (*notify_device_add) (struct i2o_device *); + void (*notify_device_remove) (struct i2o_device *); + + struct semaphore lock; +}; + +/* + * Contains all information which are necessary for DMA operations + */ +struct i2o_dma { + void *virt; + dma_addr_t phys; + u32 len; +}; + +/* + * Context queue entry, used for 32-bit context on 64-bit systems */ struct i2o_context_list_element { - struct i2o_context_list_element *next; + struct list_head list; u32 context; void *ptr; - unsigned int flags; + unsigned long timestamp; }; /* * Each I2O controller has one of these objects */ -struct i2o_controller -{ +struct i2o_controller { char name[16]; int unit; int type; - int enabled; - - struct pci_dev *pdev; /* PCI device */ - int irq; - int short_req:1; /* Use small block sizes */ - int dpt:1; /* Don't quiesce */ - int raptor:1; /* split bar */ - int promise:1; /* Promise controller */ + + struct pci_dev *pdev; /* PCI device */ + + int short_req:1; /* use small block sizes */ + int no_quiesce:1; /* dont quiesce before reset */ + int raptor:1; /* split bar */ + int promise:1; /* Promise controller */ + #ifdef CONFIG_MTRR - int mtrr_reg0; - int mtrr_reg1; + int mtrr_reg0; + int mtrr_reg1; #endif + struct list_head devices; /* list of I2O devices */ + struct notifier_block *event_notifer; /* Events */ atomic_t users; - struct i2o_device *devices; /* I2O device chain */ - struct i2o_controller *next; /* Controller chain */ - void *post_port; /* Inbout port address */ - void *reply_port; /* Outbound port address */ - void *irq_mask; /* Interrupt register address */ + struct list_head list; /* Controller list */ + void *post_port; /* Inbout port address */ + void *reply_port; /* Outbound port address */ + void *irq_mask; /* Interrupt register address */ /* Dynamic LCT related data */ - struct semaphore lct_sem; - int lct_pid; - int lct_running; - - i2o_status_block *status_block; /* IOP status block */ - dma_addr_t status_block_phys; - i2o_lct *lct; /* Logical Config Table */ - dma_addr_t lct_phys; - i2o_lct *dlct; /* Temp LCT */ - dma_addr_t dlct_phys; - i2o_hrt *hrt; /* HW Resource Table */ - dma_addr_t hrt_phys; - u32 hrt_len; - - void *base_virt; /* base virtual address */ - unsigned long base_phys; /* base physical address */ - - void *msg_virt; /* messages virtual address */ - unsigned long msg_phys; /* messages physical address */ - - int battery:1; /* Has a battery backup */ - int io_alloc:1; /* An I/O resource was allocated */ - int mem_alloc:1; /* A memory resource was allocated */ - struct resource io_resource; /* I/O resource allocated to the IOP */ - struct resource mem_resource; /* Mem resource allocated to the IOP */ + struct i2o_dma status; /* status of IOP */ - struct proc_dir_entry *proc_entry; /* /proc dir */ + struct i2o_dma hrt; /* HW Resource Table */ + i2o_lct *lct; /* Logical Config Table */ + struct i2o_dma dlct; /* Temp LCT */ + struct semaphore lct_lock; /* Lock for LCT updates */ + struct i2o_dma status_block; /* IOP status block */ + + struct i2o_dma base; /* controller messaging unit */ + struct i2o_dma in_queue; /* inbound message queue Host->IOP */ + struct i2o_dma out_queue; /* outbound message queue IOP->Host */ + + int battery:1; /* Has a battery backup */ + int io_alloc:1; /* An I/O resource was allocated */ + int mem_alloc:1; /* A memory resource was allocated */ + + struct resource io_resource; /* I/O resource allocated to the IOP */ + struct resource mem_resource; /* Mem resource allocated to the IOP */ + struct proc_dir_entry *proc_entry; /* /proc dir */ - void *page_frame; /* Message buffers */ - dma_addr_t page_frame_map; /* Cache map */ + struct list_head bus_list; /* list of busses on IOP */ + struct device device; + struct i2o_device *exec; /* Executive */ #if BITS_PER_LONG == 64 - spinlock_t context_list_lock; /* lock for context_list */ - struct i2o_context_list_element *context_list; /* list of context id's - and pointers */ + spinlock_t context_list_lock; /* lock for context_list */ + atomic_t context_list_counter; /* needed for unique contexts */ + struct list_head context_list; /* list of context id's + and pointers */ #endif + spinlock_t lock; /* lock for controller + configuration */ + + void *driver_data[I2O_MAX_DRIVERS]; /* storage for drivers */ }; /* - * OSM resgistration block + * I2O System table entry * - * Each OSM creates at least one of these and registers it with the - * I2O core through i2o_register_handler. An OSM may want to - * register more than one if it wants a fast path to a reply - * handler by having a separate initiator context for each - * class function. + * The system table contains information about all the IOPs in the + * system. It is sent to all IOPs so that they can create peer2peer + * connections between them. */ -struct i2o_handler +struct i2o_sys_tbl_entry { + u16 org_id; + u16 reserved1; + u32 iop_id:12; + u32 reserved2:20; + u16 seg_num:12; + u16 i2o_version:4; + u8 iop_state; + u8 msg_type; + u16 frame_size; + u16 reserved3; + u32 last_changed; + u32 iop_capabilities; + u32 inbound_low; + u32 inbound_high; +}; + +struct i2o_sys_tbl { + u8 num_entries; + u8 version; + u16 reserved1; + u32 change_ind; + u32 reserved2; + u32 reserved3; + struct i2o_sys_tbl_entry iops[0]; +}; + +extern struct list_head i2o_controllers; + +/* Message functions */ +static inline u32 i2o_msg_get(struct i2o_controller *, struct i2o_message **); +extern u32 i2o_msg_get_wait(struct i2o_controller *, struct i2o_message **, + int); +static inline void i2o_msg_post(struct i2o_controller *, u32); +static inline int i2o_msg_post_wait(struct i2o_controller *, u32, + unsigned long); +extern int i2o_msg_post_wait_mem(struct i2o_controller *, u32, unsigned long, + struct i2o_dma *); +extern void i2o_msg_nop(struct i2o_controller *, u32); +static inline void i2o_flush_reply(struct i2o_controller *, u32); + +/* DMA handling functions */ +static inline int i2o_dma_alloc(struct device *, struct i2o_dma *, size_t, + unsigned int); +static inline void i2o_dma_free(struct device *, struct i2o_dma *); +int i2o_dma_realloc(struct device *, struct i2o_dma *, size_t, unsigned int); + +static inline int i2o_dma_map(struct device *, struct i2o_dma *); +static inline void i2o_dma_unmap(struct device *, struct i2o_dma *); + +/* IOP functions */ +extern int i2o_status_get(struct i2o_controller *); +extern int i2o_hrt_get(struct i2o_controller *); + +extern int i2o_event_register(struct i2o_device *, struct i2o_driver *, int, + u32); +extern struct i2o_device *i2o_iop_find_device(struct i2o_controller *, u16); +extern struct i2o_controller *i2o_find_iop(int); + +/* Functions needed for handling 64-bit pointers in 32-bit context */ +#if BITS_PER_LONG == 64 +extern u32 i2o_cntxt_list_add(struct i2o_controller *, void *); +extern void *i2o_cntxt_list_get(struct i2o_controller *, u32); +extern u32 i2o_cntxt_list_remove(struct i2o_controller *, void *); +extern u32 i2o_cntxt_list_get_ptr(struct i2o_controller *, void *); + +static inline u32 i2o_ptr_low(void *ptr) { - /* Message reply handler */ - void (*reply)(struct i2o_handler *, struct i2o_controller *, - struct i2o_message *); + return (u32) (u64) ptr; +}; + +static inline u32 i2o_ptr_high(void *ptr) +{ + return (u32) ((u64) ptr >> 32); +}; +#else +static inline u32 i2o_cntxt_list_add(struct i2o_controller *c, void *ptr) +{ + return (u32) ptr; +}; - /* New device notification handler */ - void (*new_dev_notify)(struct i2o_controller *, struct i2o_device *); +static inline void *i2o_cntxt_list_get(struct i2o_controller *c, u32 context) +{ + return (void *)context; +}; - /* Device deltion handler */ - void (*dev_del_notify)(struct i2o_controller *, struct i2o_device *); +static inline u32 i2o_cntxt_list_remove(struct i2o_controller *c, void *ptr) +{ + return (u32) ptr; +}; - /* Reboot notification handler */ - void (*reboot_notify)(void); +static inline u32 i2o_cntxt_list_get_ptr(struct i2o_controller *c, void *ptr) +{ + return (u32) ptr; +}; - char *name; /* OSM name */ - int context; /* Low 8 bits of the transaction info */ - u32 class; /* I2O classes that this driver handles */ - /* User data follows */ +static inline u32 i2o_ptr_low(void *ptr) +{ + return (u32) ptr; }; -#ifdef MODULE -/* - * Used by bus specific modules to communicate with the core +static inline u32 i2o_ptr_high(void *ptr) +{ + return 0; +}; +#endif + +/* I2O driver (OSM) functions */ +extern int i2o_driver_register(struct i2o_driver *); +extern void i2o_driver_unregister(struct i2o_driver *); + +/** + * i2o_driver_notify_controller_add - Send notification of added controller + * to a single I2O driver * - * This is needed because the bus modules cannot make direct - * calls to the core as this results in the i2o_bus_specific_module - * being dependent on the core, not the otherway around. - * In that case, a 'modprobe i2o_lan' loads i2o_core & i2o_lan, - * but _not_ i2o_pci...which makes the whole thing pretty useless :) + * Send notification of added controller to a single registered driver. + */ +static inline void i2o_driver_notify_controller_add(struct i2o_driver *drv, + struct i2o_controller *c) +{ + if (drv->notify_controller_add) + drv->notify_controller_add(c); +}; + +/** + * i2o_driver_notify_controller_remove - Send notification of removed + * controller to a single I2O driver * + * Send notification of removed controller to a single registered driver. */ -struct i2o_core_func_table +static inline void i2o_driver_notify_controller_remove(struct i2o_driver *drv, + struct i2o_controller *c) { - int (*install)(struct i2o_controller *); - int (*activate)(struct i2o_controller *); - struct i2o_controller *(*find)(int); - void (*unlock)(struct i2o_controller *); - void (*run_queue)(struct i2o_controller * c); - int (*delete)(struct i2o_controller *); + if (drv->notify_controller_remove) + drv->notify_controller_remove(c); }; -#endif /* MODULE */ -/* - * I2O System table entry +/** + * i2o_driver_notify_device_add - Send notification of added device to a + * single I2O driver * - * The system table contains information about all the IOPs in the - * system. It is sent to all IOPs so that they can create peer2peer - * connections between them. + * Send notification of added device to a single registered driver. */ -struct i2o_sys_tbl_entry +static inline void i2o_driver_notify_device_add(struct i2o_driver *drv, + struct i2o_device *i2o_dev) { - u16 org_id; - u16 reserved1; - u32 iop_id:12; - u32 reserved2:20; - u16 seg_num:12; - u16 i2o_version:4; - u8 iop_state; - u8 msg_type; - u16 frame_size; - u16 reserved3; - u32 last_changed; - u32 iop_capabilities; - u32 inbound_low; - u32 inbound_high; -}; - -struct i2o_sys_tbl -{ - u8 num_entries; - u8 version; - u16 reserved1; - u32 change_ind; - u32 reserved2; - u32 reserved3; - struct i2o_sys_tbl_entry iops[0]; + if (drv->notify_device_add) + drv->notify_device_add(i2o_dev); +}; + +/** + * i2o_driver_notify_device_remove - Send notification of removed device + * to a single I2O driver + * + * Send notification of removed device to a single registered driver. + */ +static inline void i2o_driver_notify_device_remove(struct i2o_driver *drv, + struct i2o_device *i2o_dev) +{ + if (drv->notify_device_remove) + drv->notify_device_remove(i2o_dev); }; +extern void i2o_driver_notify_controller_add_all(struct i2o_controller *); +extern void i2o_driver_notify_controller_remove_all(struct i2o_controller *); +extern void i2o_driver_notify_device_add_all(struct i2o_device *); +extern void i2o_driver_notify_device_remove_all(struct i2o_device *); + +/* I2O device functions */ +extern int i2o_device_claim(struct i2o_device *); +extern int i2o_device_claim_release(struct i2o_device *); + +/* Exec OSM functions */ +extern int i2o_exec_lct_get(struct i2o_controller *); +extern int i2o_exec_lct_notify(struct i2o_controller *, u32); + +/* device to i2o_device and driver to i2o_driver convertion functions */ +#define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) +#define to_i2o_device(dev) container_of(dev, struct i2o_device, device) + /* * Messenger inlines */ static inline u32 I2O_POST_READ32(struct i2o_controller *c) { + rmb(); return readl(c->post_port); -} +}; static inline void I2O_POST_WRITE32(struct i2o_controller *c, u32 val) { + wmb(); writel(val, c->post_port); -} - +}; static inline u32 I2O_REPLY_READ32(struct i2o_controller *c) { + rmb(); return readl(c->reply_port); -} +}; static inline void I2O_REPLY_WRITE32(struct i2o_controller *c, u32 val) { + wmb(); writel(val, c->reply_port); -} - +}; static inline u32 I2O_IRQ_READ32(struct i2o_controller *c) { + rmb(); return readl(c->irq_mask); -} +}; static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 val) { + wmb(); writel(val, c->irq_mask); -} + wmb(); +}; +/** + * i2o_msg_get - obtain an I2O message from the IOP + * @c: I2O controller + * @msg: pointer to a I2O message pointer + * + * This function tries to get a message slot. If no message slot is + * available do not wait until one is availabe (see also i2o_msg_get_wait). + * + * On a success the message is returned and the pointer to the message is + * set in msg. The returned message is the physical page frame offset + * address from the read port (see the i2o spec). If no message is + * available returns I2O_QUEUE_EMPTY and msg is leaved untouched. + */ +static inline u32 i2o_msg_get(struct i2o_controller *c, + struct i2o_message **msg) +{ + u32 m; -static inline void i2o_post_message(struct i2o_controller *c, u32 m) + if ((m = I2O_POST_READ32(c)) != I2O_QUEUE_EMPTY) + *msg = c->in_queue.virt + m; + + return m; +}; + +/** + * i2o_msg_post - Post I2O message to I2O controller + * @c: I2O controller to which the message should be send + * @m: the message identifier + * + * Post the message to the I2O controller. + */ +static inline void i2o_msg_post(struct i2o_controller *c, u32 m) { - /* The second line isnt spurious - thats forcing PCI posting */ I2O_POST_WRITE32(c, m); - (void) I2O_IRQ_READ32(c); -} +}; +/** + * i2o_msg_post_wait - Post and wait a message and wait until return + * @c: controller + * @m: message to post + * @timeout: time in seconds to wait + * + * This API allows an OSM to post a message and then be told whether or + * not the system received a successful reply. If the message times out + * then the value '-ETIMEDOUT' is returned. + * + * Returns 0 on success or negative error code on failure. + */ +static inline int i2o_msg_post_wait(struct i2o_controller *c, u32 m, + unsigned long timeout) +{ + return i2o_msg_post_wait_mem(c, m, timeout, NULL); +}; + +/** + * i2o_flush_reply - Flush reply from I2O controller + * @c: I2O controller + * @m: the message identifier + * + * The I2O controller must be informed that the reply message is not needed + * anymore. If you forget to flush the reply, the message frame can't be + * used by the controller anymore and is therefore lost. + * + * FIXME: is there a timeout after which the controller reuse the message? + */ static inline void i2o_flush_reply(struct i2o_controller *c, u32 m) { I2O_REPLY_WRITE32(c, m); -} +}; + +/** + * i2o_dma_alloc - Allocate DMA memory + * @dev: struct device pointer to the PCI device of the I2O controller + * @addr: i2o_dma struct which should get the DMA buffer + * @len: length of the new DMA memory + * @gfp_mask: GFP mask + * + * Allocate a coherent DMA memory and write the pointers into addr. + * + * Returns 0 on success or -ENOMEM on failure. + */ +static inline int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, + size_t len, unsigned int gfp_mask) +{ + addr->virt = dma_alloc_coherent(dev, len, &addr->phys, gfp_mask); + if (!addr->virt) + return -ENOMEM; + + memset(addr->virt, 0, len); + addr->len = len; + + return 0; +}; + +/** + * i2o_dma_free - Free DMA memory + * @dev: struct device pointer to the PCI device of the I2O controller + * @addr: i2o_dma struct which contains the DMA buffer + * + * Free a coherent DMA memory and set virtual address of addr to NULL. + */ +static inline void i2o_dma_free(struct device *dev, struct i2o_dma *addr) +{ + if (addr->virt) { + if (addr->phys) + dma_free_coherent(dev, addr->len, addr->virt, + addr->phys); + else + kfree(addr->virt); + addr->virt = NULL; + } +}; + +/** + * i2o_dma_map - Map the memory to DMA + * @dev: struct device pointer to the PCI device of the I2O controller + * @addr: i2o_dma struct which should be mapped + * + * Map the memory in addr->virt to coherent DMA memory and write the + * physical address into addr->phys. + * + * Returns 0 on success or -ENOMEM on failure. + */ +static inline int i2o_dma_map(struct device *dev, struct i2o_dma *addr) +{ + if (!addr->virt) + return -EFAULT; + + if (!addr->phys) + addr->phys = dma_map_single(dev, addr->virt, addr->len, + DMA_BIDIRECTIONAL); + if (!addr->phys) + return -ENOMEM; + + return 0; +}; + +/** + * i2o_dma_unmap - Unmap the DMA memory + * @dev: struct device pointer to the PCI device of the I2O controller + * @addr: i2o_dma struct which should be unmapped + * + * Unmap the memory in addr->virt from DMA memory. + */ +static inline void i2o_dma_unmap(struct device *dev, struct i2o_dma *addr) +{ + if (!addr->virt) + return; + + if (addr->phys) { + dma_unmap_single(dev, addr->phys, addr->len, DMA_BIDIRECTIONAL); + addr->phys = 0; + } +}; /* * Endian handling wrapped into the macro - keeps the core code * cleaner. */ - -#define i2o_raw_writel(val, mem) __raw_writel(cpu_to_le32(val), mem) - -extern struct i2o_controller *i2o_find_controller(int); -extern void i2o_unlock_controller(struct i2o_controller *); -extern struct i2o_controller *i2o_controller_chain; -extern int i2o_num_controllers; -extern int i2o_status_get(struct i2o_controller *); -extern int i2o_install_handler(struct i2o_handler *); -extern int i2o_remove_handler(struct i2o_handler *); - -extern int i2o_claim_device(struct i2o_device *, struct i2o_handler *); -extern int i2o_release_device(struct i2o_device *, struct i2o_handler *); -extern int i2o_device_notify_on(struct i2o_device *, struct i2o_handler *); -extern int i2o_device_notify_off(struct i2o_device *, - struct i2o_handler *); - -extern int i2o_post_this(struct i2o_controller *, u32 *, int); -extern int i2o_post_wait(struct i2o_controller *, u32 *, int, int); -extern int i2o_post_wait_mem(struct i2o_controller *, u32 *, int, int, - void *, void *, dma_addr_t, dma_addr_t, int, int); +#define i2o_raw_writel(val, mem) __raw_writel(cpu_to_le32(val), mem) -extern int i2o_query_scalar(struct i2o_controller *, int, int, int, void *, - int); -extern int i2o_set_scalar(struct i2o_controller *, int, int, int, void *, - int); +extern int i2o_parm_field_get(struct i2o_device *, int, int, void *, int); +extern int i2o_parm_field_set(struct i2o_device *, int, int, void *, int); +extern int i2o_parm_table_get(struct i2o_device *, int, int, int, void *, int, + void *, int); +/* FIXME: remove extern int i2o_query_table(int, struct i2o_controller *, int, int, int, void *, int, void *, int); extern int i2o_clear_table(struct i2o_controller *, int, int); @@ -328,51 +605,24 @@ void *, int); extern int i2o_issue_params(int, struct i2o_controller *, int, void *, int, void *, int); +*/ -extern int i2o_event_register(struct i2o_controller *, u32, u32, u32, u32); -extern int i2o_event_ack(struct i2o_controller *, u32 *); - -extern void i2o_report_status(const char *, const char *, u32 *); -extern void i2o_dump_message(u32 *); -extern const char *i2o_get_class_name(int); - -extern int i2o_install_controller(struct i2o_controller *); -extern int i2o_activate_controller(struct i2o_controller *); -extern void i2o_run_queue(struct i2o_controller *); -extern int i2o_delete_controller(struct i2o_controller *); - -#if BITS_PER_LONG == 64 -extern u32 i2o_context_list_add(void *, struct i2o_controller *); -extern void *i2o_context_list_get(u32, struct i2o_controller *); -extern u32 i2o_context_list_remove(void *, struct i2o_controller *); -#else -static inline u32 i2o_context_list_add(void *ptr, struct i2o_controller *c) -{ - return (u32)ptr; -} - -static inline void *i2o_context_list_get(u32 context, struct i2o_controller *c) -{ - return (void *)context; -} - -static inline u32 i2o_context_list_remove(void *ptr, struct i2o_controller *c) -{ - return (u32)ptr; -} -#endif +/* debugging functions */ +extern void i2o_report_status(const char *, const char *, struct i2o_message *); +extern void i2o_dump_message(struct i2o_message *); +extern void i2o_dump_hrt(struct i2o_controller *c); +extern void i2o_debug_state(struct i2o_controller *c); /* * Cache strategies */ - - + /* The NULL strategy leaves everything up to the controller. This tends to be a * pessimal but functional choice. */ #define CACHE_NULL 0 /* Prefetch data when reading. We continually attempt to load the next 32 sectors - * into the controller cache. + * into the controller cache. */ #define CACHE_PREFETCH 1 /* Prefetch data when reading. We sometimes attempt to load the next 32 sectors @@ -406,15 +656,11 @@ /* * Ioctl structures */ - - -#define BLKI2OGRSTRAT _IOR('2', 1, int) -#define BLKI2OGWSTRAT _IOR('2', 2, int) -#define BLKI2OSRSTRAT _IOW('2', 3, int) -#define BLKI2OSWSTRAT _IOW('2', 4, int) - - +#define BLKI2OGRSTRAT _IOR('2', 1, int) +#define BLKI2OGWSTRAT _IOR('2', 2, int) +#define BLKI2OSRSTRAT _IOW('2', 3, int) +#define BLKI2OSWSTRAT _IOW('2', 4, int) /* * I2O Function codes @@ -652,7 +898,6 @@ #define TRL_SINGLE_VARIABLE_LENGTH 0x40 #define TRL_MULTIPLE_FIXED_LENGTH 0x80 - /* msg header defines for MsgFlags */ #define MSG_STATIC 0x0100 #define MSG_64BIT_CNTXT 0x0200 @@ -673,13 +918,12 @@ #define ELEVEN_WORD_MSG_SIZE 0x000B0000 #define I2O_MESSAGE_SIZE(x) ((x)<<16) - /* Special TID Assignments */ #define ADAPTER_TID 0 #define HOST_TID 1 -#define MSG_FRAME_SIZE 64 /* i2o_scsi assumes >= 32 */ +#define MSG_FRAME_SIZE 128 /* i2o_scsi assumes >= 32 */ #define REPLY_FRAME_SIZE 17 #define SG_TABLESIZE 30 #define NMBR_MSG_FRAMES 128 @@ -693,5 +937,23 @@ #define I2O_CONTEXT_LIST_USED 0x01 #define I2O_CONTEXT_LIST_DELETED 0x02 -#endif /* __KERNEL__ */ -#endif /* _I2O_H */ +/* timeouts */ +#define I2O_TIMEOUT_INIT_OUTBOUND_QUEUE 15 +#define I2O_TIMEOUT_MESSAGE_GET 5 +#define I2O_TIMEOUT_RESET 30 +#define I2O_TIMEOUT_STATUS_GET 5 +#define I2O_TIMEOUT_LCT_GET 20 +#define I2O_TIMEOUT_SCSI_SCB_ABORT 240 + +/* retries */ +#define I2O_HRT_GET_TRIES 3 +#define I2O_LCT_GET_TRIES 3 + +/* request queue sizes */ +#define I2O_MAX_SECTORS 1024 +#define I2O_MAX_SEGMENTS 128 + +#define I2O_REQ_MEMPOOL_SIZE 32 + +#endif /* __KERNEL__ */ +#endif /* _I2O_H */ diff -Nru a/include/linux/ide.h b/include/linux/ide.h --- a/include/linux/ide.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/ide.h 2004-09-06 16:37:52 -07:00 @@ -756,8 +756,8 @@ * 2=48-bit doing 28-bit * 3=64-bit */ + unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ - u8 scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */ u8 quirk_list; /* considered quirky, set for a specific host */ u8 suspend_reset; /* drive suspend mode flag, soft-reset recovers */ u8 init_speed; /* transfer rate set at boot */ diff -Nru a/include/linux/if_bridge.h b/include/linux/if_bridge.h --- a/include/linux/if_bridge.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/if_bridge.h 2004-09-06 16:37:52 -07:00 @@ -105,7 +105,7 @@ #include extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *)); -extern int (*br_handle_frame_hook)(struct sk_buff *skb); +extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); extern int (*br_should_route_hook)(struct sk_buff **pskb); #endif diff -Nru a/include/linux/ioctl32.h b/include/linux/ioctl32.h --- a/include/linux/ioctl32.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/ioctl32.h 2004-09-06 16:37:50 -07:00 @@ -3,6 +3,15 @@ struct file; +typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, + unsigned long, struct file *); + +struct ioctl_trans { + unsigned long cmd; + ioctl_trans_handler_t handler; + struct ioctl_trans *next; +}; + /* * Register an 32bit ioctl translation handler for ioctl cmd. * @@ -13,16 +22,16 @@ * struct file *file: file descriptor pointer. */ -extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *)); - +#ifdef CONFIG_COMPAT +extern int register_ioctl32_conversion(unsigned int cmd, + ioctl_trans_handler_t handler); extern int unregister_ioctl32_conversion(unsigned int cmd); -typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); +#else -struct ioctl_trans { - unsigned long cmd; - ioctl_trans_handler_t handler; - struct ioctl_trans *next; -}; +#define register_ioctl32_conversion(cmd, handler) ({ 0; }) +#define unregister_ioctl32_conversion(cmd) ({ 0; }) + +#endif #endif diff -Nru a/include/linux/isicom.h b/include/linux/isicom.h --- a/include/linux/isicom.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/isicom.h 2004-09-06 16:37:52 -07:00 @@ -102,7 +102,6 @@ #define ClearInterrupt(base) (inw((base)+0x0a)) #define BOARD(line) (((line) >> 4) & 0x3) -#define MIN(a, b) ( (a) < (b) ? (a) : (b) ) /* isi kill queue bitmap */ diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h --- a/include/linux/kobject.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/kobject.h 2004-09-06 16:37:50 -07:00 @@ -12,13 +12,16 @@ * destructors. */ -#if defined(__KERNEL__) && !defined(_KOBJECT_H_) +#ifndef _KOBJECT_H_ #define _KOBJECT_H_ +#ifdef __KERNEL__ + #include #include #include #include +#include #include #define KOBJ_NAME_LEN 20 @@ -26,7 +29,7 @@ struct kobject { char * k_name; char name[KOBJ_NAME_LEN]; - atomic_t refcount; + struct kref kref; struct list_head entry; struct kobject * parent; struct kset * kset; @@ -58,6 +61,8 @@ extern void kobject_hotplug(const char *action, struct kobject *); +extern char * kobject_get_path(struct kset *, struct kobject *, int); + struct kobj_type { void (*release)(struct kobject *); struct sysfs_ops * sysfs_ops; @@ -229,5 +234,5 @@ extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); - +#endif /* __KERNEL__ */ #endif /* _KOBJECT_H_ */ diff -Nru a/include/linux/kprobes.h b/include/linux/kprobes.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/kprobes.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,134 @@ +#ifndef _LINUX_KPROBES_H +#define _LINUX_KPROBES_H +/* + * Kernel Probes (KProbes) + * include/linux/kprobes.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (C) IBM Corporation, 2002, 2004 + * + * 2002-Oct Created by Vamsi Krishna S Kernel + * Probes initial implementation ( includes suggestions from + * Rusty Russell). + * 2004-July Suparna Bhattacharya added jumper probes + * interface to access function arguments. + */ +#include +#include +#include +#include +#include + +struct kprobe; +struct pt_regs; +typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *); +typedef int (*kprobe_break_handler_t) (struct kprobe *, struct pt_regs *); +typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *, + unsigned long flags); +typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *, + int trapnr); +struct kprobe { + struct hlist_node hlist; + + /* location of the probe point */ + kprobe_opcode_t *addr; + + /* Called before addr is executed. */ + kprobe_pre_handler_t pre_handler; + + /* Called after addr is executed, unless... */ + kprobe_post_handler_t post_handler; + + /* ... called if executing addr causes a fault (eg. page fault). + * Return 1 if it handled fault, otherwise kernel will see it. */ + kprobe_fault_handler_t fault_handler; + + /* ... called if breakpoint trap occurs in probe handler. + * Return 1 if it handled break, otherwise kernel will see it. */ + kprobe_break_handler_t break_handler; + + /* Saved opcode (which has been replaced with breakpoint) */ + kprobe_opcode_t opcode; + + /* copy of the original instruction */ + kprobe_opcode_t insn[MAX_INSN_SIZE]; +}; + +/* + * Special probe type that uses setjmp-longjmp type tricks to resume + * execution at a specified entry with a matching prototype corresponding + * to the probed function - a trick to enable arguments to become + * accessible seamlessly by probe handling logic. + * Note: + * Because of the way compilers allocate stack space for local variables + * etc upfront, regardless of sub-scopes within a function, this mirroring + * principle currently works only for probes placed on function entry points. + */ +struct jprobe { + struct kprobe kp; + kprobe_opcode_t *entry; /* probe handling code to jump to */ +}; + +#ifdef CONFIG_KPROBES +/* Locks kprobe: irq must be disabled */ +void lock_kprobes(void); +void unlock_kprobes(void); + +/* kprobe running now on this CPU? */ +static inline int kprobe_running(void) +{ + extern unsigned int kprobe_cpu; + return kprobe_cpu == smp_processor_id(); +} + +extern void arch_prepare_kprobe(struct kprobe *p); +extern void show_registers(struct pt_regs *regs); + +/* Get the kprobe at this addr (if any). Must have called lock_kprobes */ +struct kprobe *get_kprobe(void *addr); + +int register_kprobe(struct kprobe *p); +void unregister_kprobe(struct kprobe *p); +int setjmp_pre_handler(struct kprobe *, struct pt_regs *); +int longjmp_break_handler(struct kprobe *, struct pt_regs *); +int register_jprobe(struct jprobe *p); +void unregister_jprobe(struct jprobe *p); +void jprobe_return(void); + +#else +static inline int kprobe_running(void) +{ + return 0; +} +static inline int register_kprobe(struct kprobe *p) +{ + return -ENOSYS; +} +static inline void unregister_kprobe(struct kprobe *p) +{ +} +static inline int register_jprobe(struct jprobe *p) +{ + return -ENOSYS; +} +static inline void unregister_jprobe(struct jprobe *p) +{ +} +static inline void jprobe_return(void) +{ +} +#endif +#endif /* _LINUX_KPROBES_H */ diff -Nru a/include/linux/kref.h b/include/linux/kref.h --- a/include/linux/kref.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/kref.h 2004-09-06 16:37:51 -07:00 @@ -12,21 +12,21 @@ * */ -#if defined(__KERNEL__) && !defined(_KREF_H_) +#ifndef _KREF_H_ #define _KREF_H_ +#ifdef __KERNEL__ + #include #include - struct kref { atomic_t refcount; - void (*release)(struct kref *kref); }; -void kref_init(struct kref *kref, void (*release)(struct kref *)); -struct kref *kref_get(struct kref *kref); -void kref_put(struct kref *kref); - +void kref_init(struct kref *kref); +void kref_get(struct kref *kref); +void kref_put(struct kref *kref, void (*release) (struct kref *kref)); +#endif /* __KERNEL__ */ #endif /* _KREF_H_ */ diff -Nru a/include/linux/mm.h b/include/linux/mm.h --- a/include/linux/mm.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/mm.h 2004-09-06 16:37:50 -07:00 @@ -26,6 +26,12 @@ extern unsigned long vmalloc_earlyreserve; extern int page_cluster; +#ifdef CONFIG_SYSCTL +extern int sysctl_legacy_va_layout; +#else +#define sysctl_legacy_va_layout 0 +#endif + #include #include #include @@ -195,21 +201,21 @@ page_flags_t flags; /* Atomic flags, some possibly * updated asynchronously */ atomic_t _count; /* Usage count, see below. */ - unsigned int mapcount; /* Count of ptes mapped in mms, + atomic_t _mapcount; /* Count of ptes mapped in mms, * to show when page is mapped - * & limit reverse map searches, - * protected by PG_maplock. + * & limit reverse map searches. */ unsigned long private; /* Mapping-private opaque data: * usually used for buffer_heads * if PagePrivate set; used for * swp_entry_t if PageSwapCache */ - struct address_space *mapping; /* If PG_anon clear, points to + struct address_space *mapping; /* If low bit clear, points to * inode address_space, or NULL. * If page mapped as anonymous - * memory, PG_anon is set, and - * it points to anon_vma object. + * memory, low bit is set, and + * it points to anon_vma object: + * see PAGE_MAPPING_ANON below. */ pgoff_t index; /* Our offset within mapping. */ struct list_head lru; /* Pageout list, eg. active_list @@ -433,24 +439,32 @@ /* * On an anonymous page mapped into a user virtual memory area, - * page->mapping points to its anon_vma, not to a struct address_space. + * page->mapping points to its anon_vma, not to a struct address_space; + * with the PAGE_MAPPING_ANON bit set to distinguish it. * * Please note that, confusingly, "page_mapping" refers to the inode * address_space which maps the page from disk; whereas "page_mapped" * refers to user virtual address space into which the page is mapped. */ +#define PAGE_MAPPING_ANON 1 + extern struct address_space swapper_space; static inline struct address_space *page_mapping(struct page *page) { - struct address_space *mapping = NULL; + struct address_space *mapping = page->mapping; if (unlikely(PageSwapCache(page))) mapping = &swapper_space; - else if (likely(!PageAnon(page))) - mapping = page->mapping; + else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) + mapping = NULL; return mapping; } +static inline int PageAnon(struct page *page) +{ + return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0; +} + /* * Return the pagecache index of the passed page. Regular pagecache pages * use ->index whereas swapcache pages use ->private @@ -463,11 +477,26 @@ } /* + * The atomic page->_mapcount, like _count, starts from -1: + * so that transitions both from it and to it can be tracked, + * using atomic_inc_and_test and atomic_add_negative(-1). + */ +static inline void reset_page_mapcount(struct page *page) +{ + atomic_set(&(page)->_mapcount, -1); +} + +static inline int page_mapcount(struct page *page) +{ + return atomic_read(&(page)->_mapcount) + 1; +} + +/* * Return true if this page is mapped into pagetables. */ static inline int page_mapped(struct page *page) { - return page->mapcount != 0; + return atomic_read(&(page)->_mapcount) >= 0; } /* @@ -490,13 +519,21 @@ extern void show_free_areas(void); -struct page *shmem_nopage(struct vm_area_struct * vma, +#ifdef CONFIG_SHMEM +struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type); int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new); struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, unsigned long addr); -struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags); int shmem_lock(struct file *file, int lock, struct user_struct *user); +#else +#define shmem_nopage filemap_nopage +#define shmem_lock(a, b, c) ({0;}) /* always in memory, no need to lock */ +#define shmem_set_policy(a, b) (0) +#define shmem_get_policy(a, b) (NULL) +#endif +struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); + int shmem_zero_setup(struct vm_area_struct *); static inline int can_do_mlock(void) @@ -599,11 +636,10 @@ } extern void free_area_init(unsigned long * zones_size); -extern void free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap, +extern void free_area_init_node(int nid, pg_data_t *pgdat, unsigned long * zones_size, unsigned long zone_start_pfn, unsigned long *zholes_size); -extern void memmap_init_zone(struct page *, unsigned long, int, - unsigned long, unsigned long); +extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); extern void mem_init(void); extern void show_mem(void); extern void si_meminfo(struct sysinfo * val); @@ -724,6 +760,27 @@ int write); extern int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); + +#ifdef CONFIG_PROC_FS +void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); +#else +static inline void __vm_stat_account(struct mm_struct *mm, + unsigned long flags, struct file *file, long pages) +{ +} +#endif /* CONFIG_PROC_FS */ + +static inline void vm_stat_account(struct vm_area_struct *vma) +{ + __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, + vma_pages(vma)); +} + +static inline void vm_stat_unaccount(struct vm_area_struct *vma) +{ + __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, + -vma_pages(vma)); +} #ifndef CONFIG_DEBUG_PAGEALLOC static inline void diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h --- a/include/linux/mmzone.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/mmzone.h 2004-09-06 16:37:53 -07:00 @@ -272,6 +272,8 @@ extern int numnodes; extern struct pglist_data *pgdat_list; +void __get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free, struct pglist_data *pgdat); void get_zone_counts(unsigned long *active, unsigned long *inactive, unsigned long *free); void build_all_zonelists(void); diff -Nru a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h --- a/include/linux/msdos_fs.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/msdos_fs.h 2004-09-06 16:37:54 -07:00 @@ -233,8 +233,6 @@ extern int __fat_access(struct super_block *sb, int nr, int new_value); extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys); extern void fat_cache_init(struct super_block *sb); -extern void fat_cache_lookup(struct inode *inode, int cluster, int *f_clu, - int *d_clu); extern void fat_cache_add(struct inode *inode, int f_clu, int d_clu); extern void fat_cache_inval_inode(struct inode *inode); extern int fat_get_cluster(struct inode *inode, int cluster, diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/netdevice.h 2004-09-06 16:37:55 -07:00 @@ -462,7 +462,7 @@ unsigned char *haddr); int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); int (*accept_fastpath)(struct net_device *, struct dst_entry*); -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL int netpoll_rx; #endif #ifdef CONFIG_NET_POLL_CONTROLLER diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h --- a/include/linux/netfilter_ipv4/ip_conntrack.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/netfilter_ipv4/ip_conntrack.h 2004-09-06 16:37:55 -07:00 @@ -275,6 +275,7 @@ /* Fake conntrack entry for untracked connections */ extern struct ip_conntrack ip_conntrack_untracked; +extern int ip_ct_no_defrag; /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb); diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h --- a/include/linux/netfilter_ipv4/ip_conntrack_ftp.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/netfilter_ipv4/ip_conntrack_ftp.h 2004-09-06 16:37:55 -07:00 @@ -4,11 +4,6 @@ #ifdef __KERNEL__ -#include - -/* Protects ftp part of conntracks */ -DECLARE_LOCK_EXTERN(ip_ftp_lock); - #define FTP_PORT 21 #endif /* __KERNEL__ */ diff -Nru a/include/linux/netfilter_ipv4/ip_conntrack_irc.h b/include/linux/netfilter_ipv4/ip_conntrack_irc.h --- a/include/linux/netfilter_ipv4/ip_conntrack_irc.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/netfilter_ipv4/ip_conntrack_irc.h 2004-09-06 16:37:52 -07:00 @@ -33,12 +33,7 @@ #ifdef __KERNEL__ -#include - #define IRC_PORT 6667 - -/* Protects irc part of conntracks */ -DECLARE_LOCK_EXTERN(ip_irc_lock); #endif /* __KERNEL__ */ diff -Nru a/include/linux/netfilter_ipv4/ip_nat_helper.h b/include/linux/netfilter_ipv4/ip_nat_helper.h --- a/include/linux/netfilter_ipv4/ip_nat_helper.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/netfilter_ipv4/ip_nat_helper.h 2004-09-06 16:37:51 -07:00 @@ -44,6 +44,9 @@ extern struct ip_nat_helper * ip_nat_find_helper(const struct ip_conntrack_tuple *tuple); +extern struct ip_nat_helper * +__ip_nat_find_helper(const struct ip_conntrack_tuple *tuple); + /* These return true or false. */ extern int ip_nat_mangle_tcp_packet(struct sk_buff **skb, struct ip_conntrack *ct, diff -Nru a/include/linux/netfilter_ipv6/ip6t_REJECT.h b/include/linux/netfilter_ipv6/ip6t_REJECT.h --- a/include/linux/netfilter_ipv6/ip6t_REJECT.h 2004-09-06 16:37:50 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,16 +0,0 @@ -#ifndef _IP6T_REJECT_H -#define _IP6T_REJECT_H - -enum ip6t_reject_with { - IP6T_ICMP_NET_UNREACHABLE, - IP6T_ICMP_HOST_UNREACHABLE, - IP6T_ICMP_PROT_UNREACHABLE, - IP6T_ICMP_PORT_UNREACHABLE, - IP6T_ICMP_ECHOREPLY -}; - -struct ip6t_reject_info { - enum ip6t_reject_with with; /* reject type */ -}; - -#endif /*_IPT_REJECT_H*/ diff -Nru a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h --- a/include/linux/netfilter_ipv6.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/netfilter_ipv6.h 2004-09-06 16:37:54 -07:00 @@ -58,8 +58,10 @@ NF_IP6_PRI_FIRST = INT_MIN, NF_IP6_PRI_SELINUX_FIRST = -225, NF_IP6_PRI_CONNTRACK = -200, + NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175, NF_IP6_PRI_MANGLE = -150, NF_IP6_PRI_NAT_DST = -100, + NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50, NF_IP6_PRI_FILTER = 0, NF_IP6_PRI_NAT_SRC = 100, NF_IP6_PRI_SELINUX_LAST = 225, diff -Nru a/include/linux/netlink.h b/include/linux/netlink.h --- a/include/linux/netlink.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/netlink.h 2004-09-06 16:37:54 -07:00 @@ -134,13 +134,6 @@ void netlink_detachskb(struct sock *sk, struct sk_buff *skb); int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); -/* finegrained unicast helpers: */ -struct sock *netlink_getsockbypid(struct sock *ssk, u32 pid); -struct sock *netlink_getsockbyfilp(struct file *filp); -int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); -void netlink_detachskb(struct sock *sk, struct sk_buff *skb); -int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); - /* * skb should fit one page. This choice is good for headerless malloc. * diff -Nru a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h --- a/include/linux/nfs_xdr.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/nfs_xdr.h 2004-09-06 16:37:54 -07:00 @@ -361,7 +361,8 @@ struct nfs_readlinkargs { struct nfs_fh * fh; - unsigned int count; + unsigned int pgbase; + unsigned int pglen; struct page ** pages; }; @@ -455,7 +456,8 @@ struct nfs3_readlinkargs { struct nfs_fh * fh; - unsigned int count; + unsigned int pgbase; + unsigned int pglen; struct page ** pages; }; @@ -570,7 +572,8 @@ struct nfs4_readlink { const struct nfs_fh * fh; - u32 count; /* zero-copy data */ + unsigned int pgbase; + unsigned int pglen; /* zero-copy data */ struct page ** pages; /* zero-copy data */ }; @@ -673,7 +676,8 @@ int (*lookup) (struct inode *, struct qstr *, struct nfs_fh *, struct nfs_fattr *); int (*access) (struct inode *, struct nfs_access_entry *); - int (*readlink)(struct inode *, struct page *); + int (*readlink)(struct inode *, struct page *, unsigned int, + unsigned int); int (*read) (struct nfs_read_data *); int (*write) (struct nfs_write_data *); int (*commit) (struct nfs_write_data *); diff -Nru a/include/linux/node.h b/include/linux/node.h --- a/include/linux/node.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/node.h 2004-09-06 16:37:55 -07:00 @@ -23,7 +23,6 @@ #include struct node { - cpumask_t cpumap; /* Bitmap of CPUs on the Node */ struct sys_device sysdev; }; diff -Nru a/include/linux/page-flags.h b/include/linux/page-flags.h --- a/include/linux/page-flags.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/page-flags.h 2004-09-06 16:37:54 -07:00 @@ -69,14 +69,11 @@ #define PG_private 12 /* Has something at ->private */ #define PG_writeback 13 /* Page is under writeback */ #define PG_nosave 14 /* Used for system suspend/resume */ -#define PG_maplock 15 /* Lock bit for rmap to ptes */ +#define PG_compound 15 /* Part of a compound page */ #define PG_swapcache 16 /* Swap page: swp_entry_t in private */ #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ #define PG_reclaim 18 /* To be reclaimed asap */ -#define PG_compound 19 /* Part of a compound page */ - -#define PG_anon 20 /* Anonymous: anon_vma in mapping */ /* @@ -236,6 +233,7 @@ #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) +#define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) #define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) #define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) @@ -291,10 +289,6 @@ #define PageCompound(page) test_bit(PG_compound, &(page)->flags) #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) - -#define PageAnon(page) test_bit(PG_anon, &(page)->flags) -#define SetPageAnon(page) set_bit(PG_anon, &(page)->flags) -#define ClearPageAnon(page) clear_bit(PG_anon, &(page)->flags) #ifdef CONFIG_SWAP #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) diff -Nru a/include/linux/pagemap.h b/include/linux/pagemap.h --- a/include/linux/pagemap.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/pagemap.h 2004-09-06 16:37:50 -07:00 @@ -156,6 +156,7 @@ static inline void lock_page(struct page *page) { + might_sleep(); if (TestSetPageLocked(page)) __lock_page(page); } diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/pci.h 2004-09-06 16:37:52 -07:00 @@ -712,7 +712,7 @@ int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); extern struct pci_dev *pci_dev_get(struct pci_dev *dev); extern void pci_dev_put(struct pci_dev *dev); - +extern void pci_remove_bus(struct pci_bus *b); extern void pci_remove_bus_device(struct pci_dev *dev); /* Generic PCI functions exported to card drivers */ diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/pci_ids.h 2004-09-06 16:37:55 -07:00 @@ -438,6 +438,7 @@ #define PCI_DEVICE_ID_IBM_405GP 0x0156 #define PCI_DEVICE_ID_IBM_SNIPE 0x0180 #define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd +#define PCI_DEVICE_ID_IBM_CITRINE 0x028C #define PCI_DEVICE_ID_IBM_GEMSTONE 0xB166 #define PCI_DEVICE_ID_IBM_MPIC_2 0xffff #define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_1 0x0031 @@ -1077,6 +1078,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 +#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a @@ -2313,6 +2315,8 @@ #define PCI_DEVICE_ID_NETMOS_9815 0x9815 #define PCI_DEVICE_ID_NETMOS_9835 0x9835 #define PCI_DEVICE_ID_NETMOS_9855 0x9855 +#define PCI_DEVICE_ID_NETMOS_9755 0x9755 +#define PCI_DEVICE_ID_NETMOS_9715 0x9715 #define PCI_SUBVENDOR_ID_EXSYS 0xd84d #define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 diff -Nru a/include/linux/personality.h b/include/linux/personality.h --- a/include/linux/personality.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/personality.h 2004-09-06 16:37:53 -07:00 @@ -30,6 +30,7 @@ */ enum { MMAP_PAGE_ZERO = 0x0100000, + ADDR_COMPAT_LAYOUT = 0x0200000, READ_IMPLIES_EXEC = 0x0400000, ADDR_LIMIT_32BIT = 0x0800000, SHORT_INODE = 0x1000000, diff -Nru a/include/linux/pid.h b/include/linux/pid.h --- a/include/linux/pid.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/pid.h 2004-09-06 16:37:51 -07:00 @@ -12,34 +12,22 @@ struct pid { + /* Try to keep pid_chain in the same cacheline as nr for find_pid */ int nr; - atomic_t count; - struct task_struct *task; - struct list_head task_list; - struct list_head hash_chain; -}; - -struct pid_link -{ - struct list_head pid_chain; - struct pid *pidptr; - struct pid pid; + struct hlist_node pid_chain; + /* list of pids with the same nr, only one of them is in the hash */ + struct list_head pid_list; }; #define pid_task(elem, type) \ - list_entry(elem, struct task_struct, pids[type].pid_chain) + list_entry(elem, struct task_struct, pids[type].pid_list) /* - * attach_pid() and link_pid() must be called with the tasklist_lock + * attach_pid() and detach_pid() must be called with the tasklist_lock * write-held. */ extern int FASTCALL(attach_pid(struct task_struct *task, enum pid_type type, int nr)); -extern void FASTCALL(link_pid(struct task_struct *task, struct pid_link *link, struct pid *pid)); - -/* - * detach_pid() must be called with the tasklist_lock write-held. - */ extern void FASTCALL(detach_pid(struct task_struct *task, enum pid_type)); /* @@ -52,13 +40,16 @@ extern void FASTCALL(free_pidmap(int)); extern void switch_exec_pids(struct task_struct *leader, struct task_struct *thread); -#define for_each_task_pid(who, type, task, elem, pid) \ - if ((pid = find_pid(type, who))) \ - for (elem = pid->task_list.next, \ - prefetch(elem->next), \ - task = pid_task(elem, type); \ - elem != &pid->task_list; \ - elem = elem->next, prefetch(elem->next), \ - task = pid_task(elem, type)) +#define do_each_task_pid(who, type, task) \ + if ((task = find_task_by_pid_type(type, who))) { \ + prefetch((task)->pids[type].pid_list.next); \ + do { + +#define while_each_task_pid(who, type, task) \ + } while (task = pid_task((task)->pids[type].pid_list.next,\ + type), \ + prefetch((task)->pids[type].pid_list.next), \ + hlist_unhashed(&(task)->pids[type].pid_chain)); \ + } \ #endif /* _LINUX_PID_H */ diff -Nru a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h --- a/include/linux/pkt_sched.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/pkt_sched.h 2004-09-06 16:37:54 -07:00 @@ -402,6 +402,16 @@ #define TCA_ATM_MAX TCA_ATM_STATE /* Network emulator */ + +enum +{ + TCA_NETEM_UNSPEC, + TCA_NETEM_CORR, + TCA_NETEM_DELAY_DIST, +}; + +#define TCA_NETEM_MAX TCA_NETEM_DELAY_DIST + struct tc_netem_qopt { __u32 latency; /* added delay (us) */ @@ -411,4 +421,14 @@ __u32 duplicate; /* random packet dup (0=none ~0=100%) */ __u32 jitter; /* random jitter in latency (us) */ }; + +struct tc_netem_corr +{ + __u32 delay_corr; /* delay correlation */ + __u32 loss_corr; /* packet loss correlation */ + __u32 dup_corr; /* duplicate correlation */ +}; + +#define NETEM_DIST_SCALE 8192 + #endif diff -Nru a/include/linux/poll.h b/include/linux/poll.h --- a/include/linux/poll.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/poll.h 2004-09-06 16:37:55 -07:00 @@ -5,6 +5,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -81,11 +82,12 @@ return 0; } -static inline -void set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) +static inline unsigned long __must_check +set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) { if (ufdset) - __copy_to_user(ufdset, fdset, FDS_BYTES(nr)); + return __copy_to_user(ufdset, fdset, FDS_BYTES(nr)); + return 0; } static inline diff -Nru a/include/linux/proc_fs.h b/include/linux/proc_fs.h --- a/include/linux/proc_fs.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/proc_fs.h 2004-09-06 16:37:55 -07:00 @@ -86,10 +86,15 @@ extern void proc_root_init(void); extern void proc_misc_init(void); +struct mm_struct; + struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); struct dentry *proc_pid_unhash(struct task_struct *p); void proc_pid_flush(struct dentry *proc_dentry); int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); +unsigned long task_vsize(struct mm_struct *); +int task_statm(struct mm_struct *, int *, int *, int *, int *); +char *task_mem(struct mm_struct *, char *); extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent); @@ -201,14 +206,13 @@ #define remove_proc_entry(name, parent) do {} while (0) static inline struct proc_dir_entry *proc_symlink(const char *name, - struct proc_dir_entry *parent,char *dest) {return NULL;} + struct proc_dir_entry *parent,const char *dest) {return NULL;} static inline struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent) {return NULL;} static inline struct proc_dir_entry *create_proc_read_entry(const char *name, mode_t mode, struct proc_dir_entry *base, - int (*read_proc)(char *, char **, off_t, int, int *, void *), - void * data) { return NULL; } + read_proc_t *read_proc, void * data) { return NULL; } static inline struct proc_dir_entry *create_proc_info_entry(const char *name, mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) { return NULL; } diff -Nru a/include/linux/profile.h b/include/linux/profile.h --- a/include/linux/profile.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/profile.h 2004-09-06 16:37:52 -07:00 @@ -6,24 +6,28 @@ #include #include #include +#include #include -/* parse command line */ -int __init profile_setup(char * str); +#define CPU_PROFILING 1 +#define SCHED_PROFILING 2 + +struct proc_dir_entry; +struct pt_regs; /* init basic kernel profiler */ void __init profile_init(void); - -extern unsigned int * prof_buffer; -extern unsigned long prof_len; -extern unsigned long prof_shift; -extern int prof_on; - +void profile_tick(int, struct pt_regs *); +void profile_hit(int, void *); +#ifdef CONFIG_PROC_FS +void create_prof_cpu_mask(struct proc_dir_entry *); +#else +#define create_prof_cpu_mask(x) do { (void)(x); } while (0) +#endif enum profile_type { - EXIT_TASK, - EXIT_MMAP, - EXEC_UNMAP + PROFILE_TASK_EXIT, + PROFILE_MUNMAP }; #ifdef CONFIG_PROFILING @@ -33,16 +37,20 @@ struct mm_struct; /* task is in do_exit() */ -void profile_exit_task(struct task_struct * task); +void profile_task_exit(struct task_struct * task); -/* change of vma mappings */ -void profile_exec_unmap(struct mm_struct * mm); +/* task is dead, free task struct ? Returns 1 if + * the task was taken, 0 if the task should be freed. + */ +int profile_handoff_task(struct task_struct * task); -/* exit of all vmas for a task */ -void profile_exit_mmap(struct mm_struct * mm); +/* sys_munmap */ +void profile_munmap(unsigned long addr); -int profile_event_register(enum profile_type, struct notifier_block * n); +int task_handoff_register(struct notifier_block * n); +int task_handoff_unregister(struct notifier_block * n); +int profile_event_register(enum profile_type, struct notifier_block * n); int profile_event_unregister(enum profile_type, struct notifier_block * n); int register_profile_notifier(struct notifier_block * nb); @@ -55,6 +63,16 @@ #else +static inline int task_handoff_register(struct notifier_block * n) +{ + return -ENOSYS; +} + +static inline int task_handoff_unregister(struct notifier_block * n) +{ + return -ENOSYS; +} + static inline int profile_event_register(enum profile_type t, struct notifier_block * n) { return -ENOSYS; @@ -65,9 +83,9 @@ return -ENOSYS; } -#define profile_exit_task(a) do { } while (0) -#define profile_exec_unmap(a) do { } while (0) -#define profile_exit_mmap(a) do { } while (0) +#define profile_task_exit(a) do { } while (0) +#define profile_handoff_task(a) (0) +#define profile_munmap(a) do { } while (0) static inline int register_profile_notifier(struct notifier_block * nb) { diff -Nru a/include/linux/raid/md.h b/include/linux/raid/md.h --- a/include/linux/raid/md.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/raid/md.h 2004-09-06 16:37:50 -07:00 @@ -74,7 +74,6 @@ extern void md_write_end(mddev_t *mddev); extern void md_handle_safemode(mddev_t *mddev); extern void md_done_sync(mddev_t *mddev, int blocks, int ok); -extern void md_sync_acct(mdk_rdev_t *rdev, unsigned long nr_sectors); extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); extern void md_unplug_mddev(mddev_t *mddev); diff -Nru a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h --- a/include/linux/raid/md_k.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/raid/md_k.h 2004-09-06 16:37:50 -07:00 @@ -24,7 +24,8 @@ #define HSM 6UL #define MULTIPATH 7UL #define RAID6 8UL -#define MAX_PERSONALITY 9UL +#define RAID10 9UL +#define MAX_PERSONALITY 10UL #define LEVEL_MULTIPATH (-4) #define LEVEL_LINEAR (-1) @@ -43,6 +44,7 @@ case RAID1: return 1; case RAID5: return 5; case RAID6: return 6; + case RAID10: return 10; } BUG(); return MD_RESERVED; @@ -60,6 +62,7 @@ case 4: case 5: return RAID5; case 6: return RAID6; + case 10: return RAID10; } return MD_RESERVED; } @@ -216,6 +219,7 @@ unsigned long resync_mark; /* a recent timestamp */ sector_t resync_mark_cnt;/* blocks written at resync_mark */ + sector_t resync_max_sectors; /* may be set by personality */ /* recovery/resync flags * NEEDED: we might need to start a resync/recover * RUNNING: a thread is running, or about to be started @@ -261,6 +265,11 @@ int faulty = rdev->faulty; if (atomic_dec_and_test(&rdev->nr_pending) && faulty) set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); +} + +static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors) +{ + atomic_add(nr_sectors, &bdev->bd_contains->bd_disk->sync_io); } struct mdk_personality_s diff -Nru a/include/linux/raid/raid10.h b/include/linux/raid/raid10.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/raid/raid10.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,103 @@ +#ifndef _RAID10_H +#define _RAID10_H + +#include + +typedef struct mirror_info mirror_info_t; + +struct mirror_info { + mdk_rdev_t *rdev; + sector_t head_position; +}; + +typedef struct r10bio_s r10bio_t; + +struct r10_private_data_s { + mddev_t *mddev; + mirror_info_t *mirrors; + int raid_disks; + int working_disks; + spinlock_t device_lock; + + /* geometry */ + int near_copies; /* number of copies layed out raid0 style */ + int far_copies; /* number of copies layed out + * at large strides across drives + */ + int copies; /* near_copies * far_copies. + * must be <= raid_disks + */ + sector_t stride; /* distance between far copies. + * This is size / far_copies + */ + + int chunk_shift; /* shift from chunks to sectors */ + sector_t chunk_mask; + + struct list_head retry_list; + /* for use when syncing mirrors: */ + + spinlock_t resync_lock; + int nr_pending; + int barrier; + sector_t next_resync; + + wait_queue_head_t wait_idle; + wait_queue_head_t wait_resume; + + mempool_t *r10bio_pool; + mempool_t *r10buf_pool; +}; + +typedef struct r10_private_data_s conf_t; + +/* + * this is the only point in the RAID code where we violate + * C type safety. mddev->private is an 'opaque' pointer. + */ +#define mddev_to_conf(mddev) ((conf_t *) mddev->private) + +/* + * this is our 'private' RAID10 bio. + * + * it contains information about what kind of IO operations were started + * for this RAID10 operation, and about their status: + */ + +struct r10bio_s { + atomic_t remaining; /* 'have we finished' count, + * used from IRQ handlers + */ + sector_t sector; /* virtual sector number */ + int sectors; + unsigned long state; + mddev_t *mddev; + /* + * original bio going to /dev/mdx + */ + struct bio *master_bio; + /* + * if the IO is in READ direction, then this is where we read + */ + int read_slot; + + struct list_head retry_list; + /* + * if the IO is in WRITE direction, then multiple bios are used, + * one for each copy. + * When resyncing we also use one for each copy. + * When reconstructing, we use 2 bios, one for read, one for write. + * We choose the number when they are allocated. + */ + struct { + struct bio *bio; + sector_t addr; + int devnum; + } devs[0]; +}; + +/* bits for r10bio.state */ +#define R10BIO_Uptodate 0 +#define R10BIO_IsSync 1 +#define R10BIO_IsRecover 2 +#endif diff -Nru a/include/linux/ramfs.h b/include/linux/ramfs.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/ramfs.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,11 @@ +#ifndef _LINUX_RAMFS_H +#define _LINUX_RAMFS_H + +struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev); +struct super_block *ramfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data); + +extern struct file_operations ramfs_file_operations; +extern struct vm_operations_struct generic_file_vm_ops; + +#endif diff -Nru a/include/linux/resource.h b/include/linux/resource.h --- a/include/linux/resource.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/resource.h 2004-09-06 16:37:50 -07:00 @@ -17,6 +17,7 @@ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ +#define RUSAGE_GROUP (-3) /* thread group sum + dead threads */ struct rusage { struct timeval ru_utime; /* user time used */ @@ -59,7 +60,7 @@ * GPG wants 32kB of mlocked memory, to make sure pass phrases * and other sensitive information are never written to disk. */ -#define MLOCK_LIMIT (32*1024) +#define MLOCK_LIMIT (8 * PAGE_SIZE) /* * Due to binary compatibility, the actual resource numbers diff -Nru a/include/linux/rmap.h b/include/linux/rmap.h --- a/include/linux/rmap.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/rmap.h 2004-09-06 16:37:50 -07:00 @@ -9,11 +9,6 @@ #include #include -#define page_map_lock(page) \ - bit_spin_lock(PG_maplock, (unsigned long *)&(page)->flags) -#define page_map_unlock(page) \ - bit_spin_unlock(PG_maplock, (unsigned long *)&(page)->flags) - /* * The anon_vma heads a list of private "related" vmas, to scan if * an anonymous page pointing to this anon_vma needs to be unmapped: @@ -87,24 +82,27 @@ */ static inline void page_dup_rmap(struct page *page) { - page_map_lock(page); - page->mapcount++; - page_map_unlock(page); + atomic_inc(&page->_mapcount); } /* * Called from mm/vmscan.c to handle paging out */ -int page_referenced(struct page *); +int page_referenced(struct page *, int is_locked); int try_to_unmap(struct page *); +/* + * Used by swapoff to help locate where page is expected in vma. + */ +unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); + #else /* !CONFIG_MMU */ #define anon_vma_init() do {} while (0) #define anon_vma_prepare(vma) (0) #define anon_vma_link(vma) do {} while (0) -#define page_referenced(page) TestClearPageReferenced(page) +#define page_referenced(page,l) TestClearPageReferenced(page) #define try_to_unmap(page) SWAP_FAIL #endif /* CONFIG_MMU */ diff -Nru a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h --- a/include/linux/rtnetlink.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/rtnetlink.h 2004-09-06 16:37:54 -07:00 @@ -561,6 +561,12 @@ #define IFLA_WIRELESS IFLA_WIRELESS IFLA_PROTINFO, /* Protocol specific information for a link */ #define IFLA_PROTINFO IFLA_PROTINFO + IFLA_TXQLEN, +#define IFLA_TXQLEN IFLA_TXQLEN + IFLA_MAP, +#define IFLA_MAP IFLA_MAP + IFLA_WEIGHT, +#define IFLA_WEIGHT IFLA_WEIGHT __IFLA_MAX }; diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/sched.h 2004-09-06 16:37:50 -07:00 @@ -40,7 +40,6 @@ #define CLONE_FS 0x00000200 /* set if fs info shared between processes */ #define CLONE_FILES 0x00000400 /* set if open files shared between processes */ #define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ -#define CLONE_IDLETASK 0x00001000 /* set if new pid should be 0 (kernel only)*/ #define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ @@ -189,10 +188,26 @@ #include +extern unsigned long +arch_get_unmapped_area(struct file *, unsigned long, unsigned long, + unsigned long, unsigned long); +extern unsigned long +arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags); +extern void arch_unmap_area(struct vm_area_struct *area); +extern void arch_unmap_area_topdown(struct vm_area_struct *area); + + struct mm_struct { struct vm_area_struct * mmap; /* list of VMAs */ struct rb_root mm_rb; struct vm_area_struct * mmap_cache; /* last find_vma result */ + unsigned long (*get_unmapped_area) (struct file *filp, + unsigned long addr, unsigned long len, + unsigned long pgoff, unsigned long flags); + void (*unmap_area) (struct vm_area_struct *area); + unsigned long mmap_base; /* base of mmap area */ unsigned long free_area_cache; /* first hole */ pgd_t * pgd; atomic_t mm_users; /* How many users with user space? */ @@ -209,10 +224,10 @@ unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack; unsigned long arg_start, arg_end, env_start, env_end; - unsigned long rss, total_vm, locked_vm; - unsigned long def_flags; + unsigned long rss, total_vm, locked_vm, shared_vm; + unsigned long exec_vm, stack_vm, reserved_vm, def_flags; - unsigned long saved_auxv[40]; /* for /proc/PID/auxv */ + unsigned long saved_auxv[42]; /* for /proc/PID/auxv */ unsigned dumpable:1; cpumask_t cpu_vm_mask; @@ -272,6 +287,8 @@ /* thread group stop support, overloads group_exit_code too */ int group_stop_count; + /* 1 if group stopped since last SIGCONT, -1 if SIGCONT since report */ + int stop_state; /* POSIX.1b Interval Timers */ struct list_head posix_timers; @@ -284,6 +301,16 @@ int leader; struct tty_struct *tty; /* NULL if no tty */ + + /* + * Cumulative resource counters for dead threads in the group, + * and for reaped dead child processes forked by this group. + * Live threads maintain their own counters and add to these + * in __exit_signal, except for the group leader. + */ + unsigned long utime, stime, cutime, cstime; + unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; + unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; }; /* @@ -304,7 +331,7 @@ #define MAX_PRIO (MAX_RT_PRIO + 40) -#define rt_task(p) ((p)->prio < MAX_RT_PRIO) +#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) /* * Some day this will be a full-fledged user tracking system.. @@ -352,6 +379,20 @@ struct timespec wall_to_prev; /* wall_to_monotonic used when set */ }; +#ifdef CONFIG_SCHEDSTATS +struct sched_info { + /* cumulative counters */ + unsigned long cpu_time, /* time spent on the cpu */ + run_delay, /* time spent waiting on a runqueue */ + pcnt; /* # of timeslices run on this cpu */ + + /* timestamps */ + unsigned long last_arrival, /* when we last ran on a cpu */ + last_queued; /* when we were last queued to run */ +}; + +extern struct file_operations proc_schedstat_operations; +#endif struct io_context; /* See blkdev.h */ void exit_io_context(void); @@ -414,6 +455,10 @@ cpumask_t cpus_allowed; unsigned int time_slice, first_time_slice; +#ifdef CONFIG_SCHEDSTATS + struct sched_info sched_info; +#endif + struct list_head tasks; /* * ptrace_list/ptrace_children forms the list of my children @@ -449,7 +494,7 @@ struct task_struct *group_leader; /* threadgroup leader */ /* PID/PID hash table linkage. */ - struct pid_link pids[PIDTYPE_MAX]; + struct pid pids[PIDTYPE_MAX]; wait_queue_head_t wait_chldexit; /* for wait4() */ struct completion *vfork_done; /* for vfork() */ @@ -460,11 +505,11 @@ unsigned long it_real_value, it_prof_value, it_virt_value; unsigned long it_real_incr, it_prof_incr, it_virt_incr; struct timer_list real_timer; - unsigned long utime, stime, cutime, cstime; - unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */ + unsigned long utime, stime; + unsigned long nvcsw, nivcsw; /* context switch counts */ u64 start_time; /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ - unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; + unsigned long min_flt, maj_flt; /* process credentials */ uid_t uid,euid,suid,fsuid; gid_t gid,egid,sgid,fsgid; @@ -527,7 +572,13 @@ unsigned long ptrace_message; siginfo_t *last_siginfo; /* For ptrace use. */ - +/* + * current io wait handle: wait queue entry to use for io waits + * If this thread is processing aio, this points at the waitqueue + * inside the currently handled kiocb. It may be NULL (i.e. default + * to a stack based synchronous wait) if its doing sync IO. + */ + wait_queue_t *io_wait; #ifdef CONFIG_NUMA struct mempolicy *mempolicy; short il_next; /* could be shared with used_math */ @@ -539,6 +590,7 @@ return tsk->signal->pgrp; } +extern void free_task(struct task_struct *tsk); extern void __put_task_struct(struct task_struct *tsk); #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) #define put_task_struct(tsk) \ @@ -570,118 +622,6 @@ #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ #ifdef CONFIG_SMP -#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ - -#define SD_BALANCE_NEWIDLE 1 /* Balance when about to become idle */ -#define SD_BALANCE_EXEC 2 /* Balance on exec */ -#define SD_BALANCE_CLONE 4 /* Balance on clone */ -#define SD_WAKE_IDLE 8 /* Wake to idle CPU on task wakeup */ -#define SD_WAKE_AFFINE 16 /* Wake task to waking CPU */ -#define SD_WAKE_BALANCE 32 /* Perform balancing at task wakeup */ -#define SD_SHARE_CPUPOWER 64 /* Domain members share cpu power */ - -struct sched_group { - struct sched_group *next; /* Must be a circular list */ - cpumask_t cpumask; - - /* - * CPU power of this group, SCHED_LOAD_SCALE being max power for a - * single CPU. This should be read only (except for setup). Although - * it will need to be written to at cpu hot(un)plug time, perhaps the - * cpucontrol semaphore will provide enough exclusion? - */ - unsigned long cpu_power; -}; - -struct sched_domain { - /* These fields must be setup */ - struct sched_domain *parent; /* top domain must be null terminated */ - struct sched_group *groups; /* the balancing groups of the domain */ - cpumask_t span; /* span of all CPUs in this domain */ - unsigned long min_interval; /* Minimum balance interval ms */ - unsigned long max_interval; /* Maximum balance interval ms */ - unsigned int busy_factor; /* less balancing by factor if busy */ - unsigned int imbalance_pct; /* No balance until over watermark */ - unsigned long long cache_hot_time; /* Task considered cache hot (ns) */ - unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ - unsigned int per_cpu_gain; /* CPU % gained by adding domain cpus */ - int flags; /* See SD_* */ - - /* Runtime fields. */ - unsigned long last_balance; /* init to jiffies. units in jiffies */ - unsigned int balance_interval; /* initialise to 1. units in ms. */ - unsigned int nr_balance_failed; /* initialise to 0 */ -}; - -/* Common values for SMT siblings */ -#define SD_SIBLING_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ - .parent = NULL, \ - .groups = NULL, \ - .min_interval = 1, \ - .max_interval = 2, \ - .busy_factor = 8, \ - .imbalance_pct = 110, \ - .cache_hot_time = 0, \ - .cache_nice_tries = 0, \ - .per_cpu_gain = 15, \ - .flags = SD_BALANCE_NEWIDLE \ - | SD_BALANCE_EXEC \ - | SD_BALANCE_CLONE \ - | SD_WAKE_AFFINE \ - | SD_WAKE_IDLE \ - | SD_SHARE_CPUPOWER, \ - .last_balance = jiffies, \ - .balance_interval = 1, \ - .nr_balance_failed = 0, \ -} - -/* Common values for CPUs */ -#define SD_CPU_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ - .parent = NULL, \ - .groups = NULL, \ - .min_interval = 1, \ - .max_interval = 4, \ - .busy_factor = 64, \ - .imbalance_pct = 125, \ - .cache_hot_time = (5*1000000/2), \ - .cache_nice_tries = 1, \ - .per_cpu_gain = 100, \ - .flags = SD_BALANCE_NEWIDLE \ - | SD_BALANCE_EXEC \ - | SD_BALANCE_CLONE \ - | SD_WAKE_AFFINE \ - | SD_WAKE_BALANCE, \ - .last_balance = jiffies, \ - .balance_interval = 1, \ - .nr_balance_failed = 0, \ -} - -#ifdef CONFIG_NUMA -/* Common values for NUMA nodes */ -#define SD_NODE_INIT (struct sched_domain) { \ - .span = CPU_MASK_NONE, \ - .parent = NULL, \ - .groups = NULL, \ - .min_interval = 8, \ - .max_interval = 32, \ - .busy_factor = 32, \ - .imbalance_pct = 125, \ - .cache_hot_time = (10*1000000), \ - .cache_nice_tries = 1, \ - .per_cpu_gain = 100, \ - .flags = SD_BALANCE_EXEC \ - | SD_BALANCE_CLONE \ - | SD_WAKE_BALANCE, \ - .last_balance = jiffies, \ - .balance_interval = 1, \ - .nr_balance_failed = 0, \ -} -#endif - -extern void cpu_attach_domain(struct sched_domain *sd, int cpu); - extern int set_cpus_allowed(task_t *p, cpumask_t new_mask); #else static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) @@ -692,10 +632,11 @@ extern unsigned long long sched_clock(void); +/* sched_exec is called by processes performing an exec */ #ifdef CONFIG_SMP -extern void sched_balance_exec(void); +extern void sched_exec(void); #else -#define sched_balance_exec() {} +#define sched_exec() {} #endif extern void sched_idle_next(void); @@ -732,7 +673,8 @@ extern struct mm_struct init_mm; -extern struct task_struct *find_task_by_pid(int pid); +#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) +extern struct task_struct *find_task_by_pid_type(int type, int pid); extern void set_special_pids(pid_t session, pid_t pgrp); extern void __set_special_pids(pid_t session, pid_t pgrp); @@ -754,16 +696,12 @@ extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state)); extern int FASTCALL(wake_up_process(struct task_struct * tsk)); -extern void FASTCALL(wake_up_forked_process(struct task_struct * tsk)); +extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, + unsigned long clone_flags)); #ifdef CONFIG_SMP extern void kick_process(struct task_struct *tsk); - extern void FASTCALL(wake_up_forked_thread(struct task_struct * tsk)); #else static inline void kick_process(struct task_struct *tsk) { } - static inline void wake_up_forked_thread(struct task_struct * tsk) - { - wake_up_forked_process(tsk); - } #endif extern void FASTCALL(sched_fork(task_t * p)); extern void FASTCALL(sched_exit(task_t * p)); @@ -794,6 +732,7 @@ extern void release_task(struct task_struct * p); extern int send_sig_info(int, struct siginfo *, struct task_struct *); extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); +extern int force_sigsegv(int, struct task_struct *); extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); extern int kill_pg_info(int, struct siginfo *, pid_t); @@ -863,8 +802,8 @@ /* mmput gets rid of the mappings and all user-space */ extern void mmput(struct mm_struct *); -/* Grab a reference to the mm if its not already going away */ -extern struct mm_struct *mmgrab(struct mm_struct *); +/* Grab a reference to a task's mm, if it is not already going away */ +extern struct mm_struct *get_task_mm(struct task_struct *task); /* Remove the current tasks stale references to the old mm_struct */ extern void mm_release(struct task_struct *, struct mm_struct *); @@ -890,7 +829,7 @@ extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); -extern struct task_struct * copy_process(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); +task_t *fork_idle(int); extern void set_task_comm(struct task_struct *tsk, char *from); extern void get_task_comm(char *to, struct task_struct *tsk); @@ -938,9 +877,7 @@ static inline int thread_group_empty(task_t *p) { - struct pid *pid = p->pids[PIDTYPE_TGID].pidptr; - - return pid->task_list.next->next == &pid->task_list; + return list_empty(&p->pids[PIDTYPE_TGID].pid_list); } #define delay_group_leader(p) \ @@ -965,27 +902,7 @@ { spin_unlock(&p->alloc_lock); } - -/** - * get_task_mm - acquire a reference to the task's mm - * - * Returns %NULL if the task has no mm. User must release - * the mm via mmput() after use. - */ -static inline struct mm_struct * get_task_mm(struct task_struct * task) -{ - struct mm_struct * mm; - - task_lock(task); - mm = task->mm; - if (mm) - mm = mmgrab(mm); - task_unlock(task); - return mm; -} - - /* set thread flags in other task's structures * - see asm/thread_info.h for TIF_xxxx flags available */ @@ -1095,6 +1012,17 @@ } #endif /* CONFIG_SMP */ + +#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT +extern void arch_pick_mmap_layout(struct mm_struct *mm); +#else +static inline void arch_pick_mmap_layout(struct mm_struct *mm) +{ + mm->mmap_base = TASK_UNMAPPED_BASE; + mm->get_unmapped_area = arch_get_unmapped_area; + mm->unmap_area = arch_unmap_area; +} +#endif #endif /* __KERNEL__ */ diff -Nru a/include/linux/shm.h b/include/linux/shm.h --- a/include/linux/shm.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/shm.h 2004-09-06 16:37:54 -07:00 @@ -44,6 +44,7 @@ #define SHM_RDONLY 010000 /* read-only access */ #define SHM_RND 020000 /* round attach address to SHMLBA boundary */ #define SHM_REMAP 040000 /* take-over region on attach */ +#define SHM_EXEC 0100000 /* execution access */ /* super user shmctl commands */ #define SHM_LOCK 11 diff -Nru a/include/linux/signal.h b/include/linux/signal.h --- a/include/linux/signal.h 2004-09-06 16:37:51 -07:00 +++ b/include/linux/signal.h 2004-09-06 16:37:51 -07:00 @@ -217,7 +217,7 @@ #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER struct pt_regs; -extern int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie); +extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); #endif #endif /* __KERNEL__ */ diff -Nru a/include/linux/slab.h b/include/linux/slab.h --- a/include/linux/slab.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/slab.h 2004-09-06 16:37:55 -07:00 @@ -4,7 +4,7 @@ * (markhe@nextd.demon.co.uk) */ -#if !defined(_LINUX_SLAB_H) +#ifndef _LINUX_SLAB_H #define _LINUX_SLAB_H #if defined(__KERNEL__) @@ -45,6 +45,7 @@ #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* track pages allocated to indicate what is reclaimable later*/ #define SLAB_PANIC 0x00040000UL /* panic if kmem_cache_create() fails */ +#define SLAB_DESTROY_BY_RCU 0x00080000UL /* defer freeing pages to RCU */ /* flags passed to a constructor func */ #define SLAB_CTOR_CONSTRUCTOR 0x001UL /* if not set, then deconstructor */ @@ -97,6 +98,7 @@ return __kmalloc(size, flags); } +extern void *kcalloc(size_t, size_t, int); extern void kfree(const void *); extern unsigned int ksize(const void *); @@ -114,8 +116,6 @@ extern kmem_cache_t *signal_cachep; extern kmem_cache_t *sighand_cachep; extern kmem_cache_t *bio_cachep; - -void ptrinfo(unsigned long addr); extern atomic_t slab_reclaim_pages; diff -Nru a/include/linux/spinlock.h b/include/linux/spinlock.h --- a/include/linux/spinlock.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/spinlock.h 2004-09-06 16:37:52 -07:00 @@ -19,18 +19,18 @@ /* * Must define these before including other files, inline functions need them */ -#define LOCK_SECTION_NAME \ - ".text.lock." __stringify(KBUILD_BASENAME) +#define LOCK_SECTION_NAME \ + ".text.lock." __stringify(KBUILD_BASENAME) -#define LOCK_SECTION_START(extra) \ - ".subsection 1\n\t" \ - extra \ - ".ifndef " LOCK_SECTION_NAME "\n\t" \ - LOCK_SECTION_NAME ":\n\t" \ - ".endif\n\t" +#define LOCK_SECTION_START(extra) \ + ".subsection 1\n\t" \ + extra \ + ".ifndef " LOCK_SECTION_NAME "\n\t" \ + LOCK_SECTION_NAME ":\n\t" \ + ".endif\n\t" -#define LOCK_SECTION_END \ - ".previous\n\t" +#define LOCK_SECTION_END \ + ".previous\n\t" /* * If CONFIG_SMP is set, pull in the _raw_* definitions @@ -38,9 +38,40 @@ #ifdef CONFIG_SMP #include -#else +#define __lockfunc fastcall __attribute__((section(".spinlock.text"))) + +int __lockfunc _spin_trylock(spinlock_t *lock); +int __lockfunc _write_trylock(rwlock_t *lock); +void __lockfunc _spin_lock(spinlock_t *lock); +void __lockfunc _write_lock(rwlock_t *lock); +void __lockfunc _spin_lock(spinlock_t *lock); +void __lockfunc _read_lock(rwlock_t *lock); +void __lockfunc _spin_unlock(spinlock_t *lock); +void __lockfunc _write_unlock(rwlock_t *lock); +void __lockfunc _read_unlock(rwlock_t *lock); +unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock); +unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock); +unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock); +void __lockfunc _spin_lock_irq(spinlock_t *lock); +void __lockfunc _spin_lock_bh(spinlock_t *lock); +void __lockfunc _read_lock_irq(rwlock_t *lock); +void __lockfunc _read_lock_bh(rwlock_t *lock); +void __lockfunc _write_lock_irq(rwlock_t *lock); +void __lockfunc _write_lock_bh(rwlock_t *lock); +void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags); +void __lockfunc _spin_unlock_irq(spinlock_t *lock); +void __lockfunc _spin_unlock_bh(spinlock_t *lock); +void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags); +void __lockfunc _read_unlock_irq(rwlock_t *lock); +void __lockfunc _read_unlock_bh(rwlock_t *lock); +void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags); +void __lockfunc _write_unlock_irq(rwlock_t *lock); +void __lockfunc _write_unlock_bh(rwlock_t *lock); +int __lockfunc _spin_trylock_bh(spinlock_t *lock); -#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) +extern unsigned long __lock_text_start; +extern unsigned long __lock_text_end; +#else #if !defined(CONFIG_PREEMPT) && !defined(CONFIG_DEBUG_SPINLOCK) # define atomic_dec_and_lock(atomic,lock) atomic_dec_and_test(atomic) @@ -162,9 +193,9 @@ #define spin_lock_init(lock) do { (void)(lock); } while(0) #define _raw_spin_lock(lock) do { (void)(lock); } while(0) #define spin_is_locked(lock) ((void)(lock), 0) -#define _raw_spin_trylock(lock) ((void)(lock), 1) -#define spin_unlock_wait(lock) do { (void)(lock); } while(0) -#define _raw_spin_unlock(lock) do { (void)(lock); } while(0) +#define _raw_spin_trylock(lock) (((void)(lock), 1)) +#define spin_unlock_wait(lock) (void)(lock); +#define _raw_spin_unlock(lock) do { (void)(lock); } while(0) #endif /* CONFIG_DEBUG_SPINLOCK */ /* RW spinlocks: No debug version */ @@ -184,141 +215,116 @@ #define _raw_write_unlock(lock) do { (void)(lock); } while(0) #define _raw_write_trylock(lock) ({ (void)(lock); (1); }) -#endif /* !SMP */ - -/* - * Define the various spin_lock and rw_lock methods. Note we define these - * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various - * methods are defined as nops in the case they are not required. - */ -#define spin_trylock(lock) ({preempt_disable(); _raw_spin_trylock(lock) ? \ +#define _spin_trylock(lock) ({preempt_disable(); _raw_spin_trylock(lock) ? \ 1 : ({preempt_enable(); 0;});}) -#define write_trylock(lock) ({preempt_disable();_raw_write_trylock(lock) ? \ +#define _write_trylock(lock) ({preempt_disable(); _raw_write_trylock(lock) ? \ 1 : ({preempt_enable(); 0;});}) -/* Where's read_trylock? */ - -#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) -void __preempt_spin_lock(spinlock_t *lock); -void __preempt_write_lock(rwlock_t *lock); - -#define spin_lock(lock) \ -do { \ - preempt_disable(); \ - if (unlikely(!_raw_spin_trylock(lock))) \ - __preempt_spin_lock(lock); \ -} while (0) +#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \ + _raw_spin_trylock(lock) ? \ + 1 : ({preempt_enable(); local_bh_enable(); 0;});}) -#define write_lock(lock) \ -do { \ - preempt_disable(); \ - if (unlikely(!_raw_write_trylock(lock))) \ - __preempt_write_lock(lock); \ -} while (0) - -#else -#define spin_lock(lock) \ +#define _spin_lock(lock) \ do { \ preempt_disable(); \ _raw_spin_lock(lock); \ } while(0) -#define write_lock(lock) \ +#define _write_lock(lock) \ do { \ preempt_disable(); \ _raw_write_lock(lock); \ } while(0) -#endif - -#define read_lock(lock) \ + +#define _read_lock(lock) \ do { \ preempt_disable(); \ _raw_read_lock(lock); \ } while(0) -#define spin_unlock(lock) \ +#define _spin_unlock(lock) \ do { \ _raw_spin_unlock(lock); \ preempt_enable(); \ } while (0) -#define write_unlock(lock) \ +#define _write_unlock(lock) \ do { \ _raw_write_unlock(lock); \ preempt_enable(); \ } while(0) -#define read_unlock(lock) \ +#define _read_unlock(lock) \ do { \ _raw_read_unlock(lock); \ preempt_enable(); \ } while(0) -#define spin_lock_irqsave(lock, flags) \ -do { \ +#define _spin_lock_irqsave(lock, flags) \ +do { \ local_irq_save(flags); \ preempt_disable(); \ - _raw_spin_lock_flags(lock, flags); \ + _raw_spin_lock(lock); \ } while (0) -#define spin_lock_irq(lock) \ +#define _spin_lock_irq(lock) \ do { \ local_irq_disable(); \ preempt_disable(); \ _raw_spin_lock(lock); \ } while (0) -#define spin_lock_bh(lock) \ +#define _spin_lock_bh(lock) \ do { \ local_bh_disable(); \ preempt_disable(); \ _raw_spin_lock(lock); \ } while (0) -#define read_lock_irqsave(lock, flags) \ -do { \ +#define _read_lock_irqsave(lock, flags) \ +do { \ local_irq_save(flags); \ preempt_disable(); \ _raw_read_lock(lock); \ } while (0) -#define read_lock_irq(lock) \ +#define _read_lock_irq(lock) \ do { \ local_irq_disable(); \ preempt_disable(); \ _raw_read_lock(lock); \ } while (0) -#define read_lock_bh(lock) \ +#define _read_lock_bh(lock) \ do { \ local_bh_disable(); \ preempt_disable(); \ _raw_read_lock(lock); \ } while (0) -#define write_lock_irqsave(lock, flags) \ -do { \ +#define _write_lock_irqsave(lock, flags) \ +do { \ local_irq_save(flags); \ preempt_disable(); \ _raw_write_lock(lock); \ } while (0) -#define write_lock_irq(lock) \ +#define _write_lock_irq(lock) \ do { \ local_irq_disable(); \ preempt_disable(); \ _raw_write_lock(lock); \ } while (0) -#define write_lock_bh(lock) \ +#define _write_lock_bh(lock) \ do { \ local_bh_disable(); \ preempt_disable(); \ _raw_write_lock(lock); \ } while (0) -#define spin_unlock_irqrestore(lock, flags) \ +#define _spin_unlock_irqrestore(lock, flags) \ do { \ _raw_spin_unlock(lock); \ local_irq_restore(flags); \ @@ -331,65 +337,128 @@ local_irq_restore(flags); \ } while (0) -#define spin_unlock_irq(lock) \ +#define _spin_unlock_irq(lock) \ do { \ _raw_spin_unlock(lock); \ local_irq_enable(); \ preempt_enable(); \ } while (0) -#define spin_unlock_bh(lock) \ +#define _spin_unlock_bh(lock) \ do { \ _raw_spin_unlock(lock); \ preempt_enable(); \ local_bh_enable(); \ } while (0) -#define read_unlock_irqrestore(lock, flags) \ +#define _write_unlock_bh(lock) \ do { \ - _raw_read_unlock(lock); \ - local_irq_restore(flags); \ + _raw_write_unlock(lock); \ preempt_enable(); \ + local_bh_enable(); \ } while (0) -#define read_unlock_irq(lock) \ +#define _read_unlock_irqrestore(lock, flags) \ do { \ _raw_read_unlock(lock); \ - local_irq_enable(); \ + local_irq_restore(flags); \ preempt_enable(); \ } while (0) -#define read_unlock_bh(lock) \ +#define _write_unlock_irqrestore(lock, flags) \ do { \ - _raw_read_unlock(lock); \ + _raw_write_unlock(lock); \ + local_irq_restore(flags); \ preempt_enable(); \ - local_bh_enable(); \ } while (0) -#define write_unlock_irqrestore(lock, flags) \ +#define _read_unlock_irq(lock) \ do { \ - _raw_write_unlock(lock); \ - local_irq_restore(flags); \ - preempt_enable(); \ + _raw_read_unlock(lock); \ + local_irq_enable(); \ + preempt_enable(); \ } while (0) -#define write_unlock_irq(lock) \ +#define _read_unlock_bh(lock) \ do { \ - _raw_write_unlock(lock); \ - local_irq_enable(); \ - preempt_enable(); \ + _raw_read_unlock(lock); \ + local_bh_enable(); \ + preempt_enable(); \ } while (0) -#define write_unlock_bh(lock) \ +#define _write_unlock_irq(lock) \ do { \ - _raw_write_unlock(lock); \ - preempt_enable(); \ - local_bh_enable(); \ + _raw_write_unlock(lock); \ + local_irq_enable(); \ + preempt_enable(); \ } while (0) -#define spin_trylock_bh(lock) ({ local_bh_disable(); preempt_disable(); \ - _raw_spin_trylock(lock) ? 1 : \ - ({preempt_enable(); local_bh_enable(); 0;});}) +#endif /* !SMP */ + +/* + * Define the various spin_lock and rw_lock methods. Note we define these + * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various + * methods are defined as nops in the case they are not required. + */ +#define spin_trylock(lock) _spin_trylock(lock) +#define write_trylock(lock) _write_trylock(lock) + +/* Where's read_trylock? */ + +#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) +void __preempt_spin_lock(spinlock_t *lock); +void __preempt_write_lock(rwlock_t *lock); +#endif + +#define spin_lock(lock) _spin_lock(lock) +#define write_lock(lock) _write_lock(lock) +#define read_lock(lock) _read_lock(lock) +#define spin_unlock(lock) _spin_unlock(lock) +#define write_unlock(lock) _write_unlock(lock) +#define read_unlock(lock) _read_unlock(lock) + +#ifdef CONFIG_SMP +#define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) +#define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) +#define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) +#else +#define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) +#define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) +#define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) +#endif + +#define spin_lock_irq(lock) _spin_lock_irq(lock) +#define spin_lock_bh(lock) _spin_lock_bh(lock) + +#define read_lock_irq(lock) _read_lock_irq(lock) +#define read_lock_bh(lock) _read_lock_bh(lock) + +#define write_lock_irq(lock) _write_lock_irq(lock) +#define write_lock_bh(lock) _write_lock_bh(lock) +#define spin_unlock_irqrestore(lock, flags) _spin_unlock_irqrestore(lock, flags) +#define spin_unlock_irq(lock) _spin_unlock_irq(lock) +#define spin_unlock_bh(lock) _spin_unlock_bh(lock) + +#define read_unlock_irqrestore(lock, flags) _read_unlock_irqrestore(lock, flags) +#define read_unlock_irq(lock) _read_unlock_irq(lock) +#define read_unlock_bh(lock) _read_unlock_bh(lock) + +#define write_unlock_irqrestore(lock, flags) _write_unlock_irqrestore(lock, flags) +#define write_unlock_irq(lock) _write_unlock_irq(lock) +#define write_unlock_bh(lock) _write_unlock_bh(lock) + +#define spin_trylock_bh(lock) _spin_trylock_bh(lock) + +#ifdef CONFIG_LOCKMETER +extern void _metered_spin_lock (spinlock_t *lock); +extern void _metered_spin_unlock (spinlock_t *lock); +extern int _metered_spin_trylock(spinlock_t *lock); +extern void _metered_read_lock (rwlock_t *lock); +extern void _metered_read_unlock (rwlock_t *lock); +extern void _metered_write_lock (rwlock_t *lock); +extern void _metered_write_unlock (rwlock_t *lock); +extern int _metered_write_trylock(rwlock_t *lock); +#endif /* "lock on reference count zero" */ #ifndef ATOMIC_DEC_AND_LOCK diff -Nru a/include/linux/syscalls.h b/include/linux/syscalls.h --- a/include/linux/syscalls.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/syscalls.h 2004-09-06 16:37:55 -07:00 @@ -162,6 +162,8 @@ asmlinkage void sys_exit_group(int error_code); asmlinkage long sys_wait4(pid_t pid, unsigned int __user *stat_addr, int options, struct rusage __user *ru); +asmlinkage long sys_waitid(int which, pid_t pid, + struct siginfo __user *infop, int options); 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, diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/sysctl.h 2004-09-06 16:37:53 -07:00 @@ -166,6 +166,7 @@ VM_BLOCK_DUMP=24, /* block dump mode */ VM_HUGETLB_GROUP=25, /* permitted hugetlb group */ VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */ + VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */ }; diff -Nru a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/tc_act/tc_gact.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,34 @@ +#ifndef __LINUX_TC_GACT_H +#define __LINUX_TC_GACT_H + +#include + +#define TCA_ACT_GACT 5 +struct tc_gact +{ + tc_gen; + +}; + +struct tc_gact_p +{ +#define PGACT_NONE 0 +#define PGACT_NETRAND 1 +#define PGACT_DETERM 2 +#define MAX_RAND (PGACT_DETERM + 1 ) + __u16 ptype; + __u16 pval; + int paction; +}; + +enum +{ + TCA_GACT_UNSPEC, + TCA_GACT_TM, + TCA_GACT_PARMS, + TCA_GACT_PROB, + __TCA_GACT_MAX +}; +#define TCA_GACT_MAX (__TCA_GACT_MAX - 1) + +#endif diff -Nru a/include/linux/topology.h b/include/linux/topology.h --- a/include/linux/topology.h 2004-09-06 16:37:54 -07:00 +++ b/include/linux/topology.h 2004-09-06 16:37:54 -07:00 @@ -55,7 +55,7 @@ for (node = 0; node < numnodes; node = __next_node_with_cpus(node)) #ifndef node_distance -#define node_distance(from,to) (from != to) +#define node_distance(from,to) ((from) != (to)) #endif #ifndef PENALTY_FOR_NODE_WITH_CPUS #define PENALTY_FOR_NODE_WITH_CPUS (1) diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/usb.h 2004-09-06 16:37:52 -07:00 @@ -651,8 +651,6 @@ * it likes with the URB, including resubmitting or freeing it. * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to * collect the transfer status for each buffer. - * @timeout: If set to zero, the urb will never timeout. Otherwise this is - * the time in jiffies that this urb will timeout in. * * This structure identifies USB transfer requests. URBs must be allocated by * calling usb_alloc_urb() and freed with a call to usb_free_urb(). @@ -682,8 +680,8 @@ * * Initialization: * - * All URBs submitted must initialize dev, pipe, - * transfer_flags (may be zero), complete, timeout (may be zero). + * All URBs submitted must initialize the dev, pipe, transfer_flags (may be + * zero), and complete fields. * The URB_ASYNC_UNLINK transfer flag affects later invocations of * the usb_unlink_urb() routine. Note: Failure to set URB_ASYNC_UNLINK * with usb_unlink_urb() is deprecated. For synchronous unlinks use @@ -783,7 +781,6 @@ int number_of_packets; /* (in) number of ISO packets */ int interval; /* (modify) transfer interval (INT/ISO) */ int error_count; /* (return) number of ISO errors */ - int timeout; /* (in) timeout, in jiffies */ void *context; /* (in) context for completion */ usb_complete_t complete; /* (in) completion routine */ struct usb_iso_packet_descriptor iso_frame_desc[0]; /* (in) ISO ONLY */ diff -Nru a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h --- a/include/linux/usb_gadget.h 2004-09-06 16:37:52 -07:00 +++ b/include/linux/usb_gadget.h 2004-09-06 16:37:52 -07:00 @@ -767,12 +767,6 @@ * the (remote) host can't do that any longer; or an error state might * be cleared, to make the device behave identically whether or not * power is maintained. - * - * If the OTG b_hnp_enabled flag is set during a suspend() call, the - * device may use HNP to switch from "B-Peripheral" to "B-Host" mode - * (or back from "A-Peripheral" mode to the original "A-Host") if - * the gadget driver calls usb_gadget_disconnect() before the device - * is resumed. */ struct usb_gadget_driver { char *function; diff -Nru a/include/linux/usb_otg.h b/include/linux/usb_otg.h --- a/include/linux/usb_otg.h 2004-09-06 16:37:55 -07:00 +++ b/include/linux/usb_otg.h 2004-09-06 16:37:55 -07:00 @@ -114,3 +114,5 @@ } +/* for OTG controller drivers (and maybe other stuff) */ +extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); diff -Nru a/include/linux/wait.h b/include/linux/wait.h --- a/include/linux/wait.h 2004-09-06 16:37:53 -07:00 +++ b/include/linux/wait.h 2004-09-06 16:37:53 -07:00 @@ -3,11 +3,20 @@ #define WNOHANG 0x00000001 #define WUNTRACED 0x00000002 +#define WSTOPPED WUNTRACED +#define WEXITED 0x00000004 +#define WCONTINUED 0x00000008 +#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait on all children, regardless of type */ #define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ +/* First argument to waitid: */ +#define P_ALL 0 +#define P_PID 1 +#define P_PGID 2 + #ifdef __KERNEL__ #include @@ -79,6 +88,15 @@ { return !list_empty(&q->task_list); } + +/* + * Used to distinguish between sync and async io wait context: + * sync i/o typically specifies a NULL wait queue entry or a wait + * queue entry bound to a task (current task) to wake up. + * aio specifies a wait queue entry with an async notification + * callback routine, not associated with any task. + */ +#define is_sync_wait(wait) (!(wait) || ((wait)->task)) extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait)); diff -Nru a/include/linux/writeback.h b/include/linux/writeback.h --- a/include/linux/writeback.h 2004-09-06 16:37:50 -07:00 +++ b/include/linux/writeback.h 2004-09-06 16:37:50 -07:00 @@ -75,6 +75,7 @@ /* writeback.h requires fs.h; it, too, is not included from here. */ static inline void wait_on_inode(struct inode *inode) { + might_sleep(); if (inode->i_state & I_LOCK) __wait_on_inode(inode); } diff -Nru a/include/math-emu/op-common.h b/include/math-emu/op-common.h --- a/include/math-emu/op-common.h 2004-09-06 16:37:52 -07:00 +++ b/include/math-emu/op-common.h 2004-09-06 16:37:52 -07:00 @@ -769,9 +769,9 @@ X##_c = FP_CLS_NORMAL; \ \ if ((X##_s = (r < 0))) \ - r = -r; \ - \ - ur_ = (unsigned rtype) r; \ + ur_ = (unsigned rtype) -r; \ + else \ + ur_ = (unsigned rtype) r; \ if (rsize <= _FP_W_TYPE_SIZE) \ __FP_CLZ(X##_e, ur_); \ else \ diff -Nru a/include/media/id.h b/include/media/id.h --- a/include/media/id.h 2004-09-06 16:37:52 -07:00 +++ b/include/media/id.h 2004-09-06 16:37:52 -07:00 @@ -35,4 +35,3 @@ #ifndef I2C_ALGO_SAA7134 # define I2C_ALGO_SAA7134 0x090000 #endif - diff -Nru a/include/media/tuner.h b/include/media/tuner.h --- a/include/media/tuner.h 2004-09-06 16:37:54 -07:00 +++ b/include/media/tuner.h 2004-09-06 16:37:54 -07:00 @@ -70,6 +70,8 @@ #define TUNER_PHILIPS_FM1236_MK3 43 #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ #define TUNER_MICROTUNE_4049FM5 45 +#define TUNER_LG_NTSC_TAPE 47 +#define TUNER_TNF_8831BGFF 48 #define NOTUNER 0 #define PAL 1 /* PAL_BG */ @@ -88,6 +90,7 @@ #define Samsung 7 #define Microtune 8 #define HITACHI 9 +#define Panasonic 10 #define TUNER_SET_TYPE _IOW('t',1,int) /* set tuner type */ #define TUNER_SET_TVFREQ _IOW('t',2,int) /* set tv freq */ @@ -95,5 +98,19 @@ # define TUNER_SET_RADIOFREQ _IOW('t',3,int) /* set radio freq */ # define TUNER_SET_MODE _IOW('t',4,int) /* set tuner mode */ #endif + +#define TDA9887_SET_CONFIG _IOW('t',5,int) +/* tv card specific */ +# define TDA9887_PRESENT (1<<0) +# define TDA9887_PORT1 (1<<1) +# define TDA9887_PORT2 (1<<2) +# define TDA9887_QSS (1<<3) +# define TDA9887_INTERCARRIER (1<<4) +/* config options */ +# define TDA9887_DEEMPHASIS_MASK (3<<16) +# define TDA9887_DEEMPHASIS_NONE (1<<16) +# define TDA9887_DEEMPHASIS_50 (2<<16) +# define TDA9887_DEEMPHASIS_75 (3<<16) +# define TDA9887_AUTOMUTE (1<<18) #endif diff -Nru a/include/net/ip.h b/include/net/ip.h --- a/include/net/ip.h 2004-09-06 16:37:53 -07:00 +++ b/include/net/ip.h 2004-09-06 16:37:53 -07:00 @@ -255,6 +255,7 @@ */ struct sk_buff *ip_defrag(struct sk_buff *skb); +extern void ipfrag_flush(void); extern int ip_frag_nqueues; extern atomic_t ip_frag_mem; diff -Nru a/include/net/neighbour.h b/include/net/neighbour.h --- a/include/net/neighbour.h 2004-09-06 16:37:55 -07:00 +++ b/include/net/neighbour.h 2004-09-06 16:37:55 -07:00 @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,8 @@ void *priv; void *sysctl_table; + + struct rcu_head rcu_head; int base_reachable_time; int retrans_time; diff -Nru a/include/net/tc_act/tc_gact.h b/include/net/tc_act/tc_gact.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/net/tc_act/tc_gact.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,17 @@ +#ifndef __NET_TC_GACT_H +#define __NET_TC_GACT_H + +#include + +struct tcf_gact +{ + tca_gen(gact); +#ifdef CONFIG_GACT_PROB + u16 ptype; + u16 pval; + int paction; +#endif + +}; + +#endif diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-09-06 16:37:51 -07:00 +++ b/include/net/tcp.h 2004-09-06 16:37:51 -07:00 @@ -611,7 +611,6 @@ extern int sysctl_tcp_bic; extern int sysctl_tcp_bic_fast_convergence; extern int sysctl_tcp_bic_low_window; -extern int sysctl_tcp_default_win_scale; extern int sysctl_tcp_moderate_rcvbuf; extern atomic_t tcp_memory_allocated; @@ -1690,68 +1689,10 @@ *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_WINDOW << 16) | (TCPOLEN_WINDOW << 8) | (wscale)); } -/* Determine a window scaling and initial window to offer. - * Based on the assumption that the given amount of space - * will be offered. Store the results in the tp structure. - * NOTE: for smooth operation initial space offering should - * be a multiple of mss if possible. We assume here that mss >= 1. - * This MUST be enforced by all callers. - */ -static inline void tcp_select_initial_window(int __space, __u32 mss, - __u32 *rcv_wnd, - __u32 *window_clamp, - int wscale_ok, - __u8 *rcv_wscale) -{ - unsigned int space = (__space < 0 ? 0 : __space); - - /* If no clamp set the clamp to the max possible scaled window */ - if (*window_clamp == 0) - (*window_clamp) = (65535 << 14); - space = min(*window_clamp, space); - - /* Quantize space offering to a multiple of mss if possible. */ - if (space > mss) - space = (space / mss) * mss; - - /* NOTE: offering an initial window larger than 32767 - * will break some buggy TCP stacks. We try to be nice. - * If we are not window scaling, then this truncates - * our initial window offering to 32k. There should also - * be a sysctl option to stop being nice. - */ - (*rcv_wnd) = min(space, MAX_TCP_WINDOW); - (*rcv_wscale) = 0; - if (wscale_ok) { - /* See RFC1323 for an explanation of the limit to 14 */ - while (space > 65535 && (*rcv_wscale) < 14) { - space >>= 1; - (*rcv_wscale)++; - } - if (*rcv_wscale && sysctl_tcp_app_win && space>=mss && - space - max((space>>sysctl_tcp_app_win), mss>>*rcv_wscale) < 65536/2) - (*rcv_wscale)--; - - *rcv_wscale = max((__u8)sysctl_tcp_default_win_scale, - *rcv_wscale); - } - - /* Set initial window to value enough for senders, - * following RFC1414. Senders, not following this RFC, - * will be satisfied with 2. - */ - if (mss > (1<<*rcv_wscale)) { - int init_cwnd = 4; - if (mss > 1460*3) - init_cwnd = 2; - else if (mss > 1460) - init_cwnd = 3; - if (*rcv_wnd > init_cwnd*mss) - *rcv_wnd = init_cwnd*mss; - } - /* Set the clamp no higher than max representable value */ - (*window_clamp) = min(65535U << (*rcv_wscale), *window_clamp); -} +/* Determine a window scaling and initial window to offer. */ +extern void tcp_select_initial_window(int __space, __u32 mss, + __u32 *rcv_wnd, __u32 *window_clamp, + int wscale_ok, __u8 *rcv_wscale); static inline int tcp_win_from_space(int space) { @@ -1761,13 +1702,13 @@ } /* Note: caller must be prepared to deal with negative returns */ -static inline int tcp_space(struct sock *sk) +static inline int tcp_space(const struct sock *sk) { return tcp_win_from_space(sk->sk_rcvbuf - atomic_read(&sk->sk_rmem_alloc)); } -static inline int tcp_full_space( struct sock *sk) +static inline int tcp_full_space(const struct sock *sk) { return tcp_win_from_space(sk->sk_rcvbuf); } diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-09-06 16:37:54 -07:00 +++ b/include/net/xfrm.h 2004-09-06 16:37:54 -07:00 @@ -428,6 +428,7 @@ switch(fl->proto) { case IPPROTO_TCP: case IPPROTO_UDP: + case IPPROTO_SCTP: port = fl->fl_ip_sport; break; case IPPROTO_ICMP: @@ -447,6 +448,7 @@ switch(fl->proto) { case IPPROTO_TCP: case IPPROTO_UDP: + case IPPROTO_SCTP: port = fl->fl_ip_dport; break; case IPPROTO_ICMP: diff -Nru a/include/pcmcia/ss.h b/include/pcmcia/ss.h --- a/include/pcmcia/ss.h 2004-09-06 16:37:55 -07:00 +++ b/include/pcmcia/ss.h 2004-09-06 16:37:55 -07:00 @@ -103,7 +103,7 @@ u_char map; u_char flags; u_short speed; - u_long sys_start, sys_stop; + u_long static_start; u_int card_start; struct resource *res; } pccard_mem_map; diff -Nru a/include/scsi/scsi.h b/include/scsi/scsi.h --- a/include/scsi/scsi.h 2004-09-06 16:37:55 -07:00 +++ b/include/scsi/scsi.h 2004-09-06 16:37:55 -07:00 @@ -354,14 +354,19 @@ ((lun) & 0x07)) /* - * SCSI command sets + * struct scsi_device::scsi_level values. For SCSI devices other than those + * prior to SCSI-2 (i.e. over 12 years old) this value is (resp[2] + 1) + * where "resp" is a byte array of the response to an INQUIRY. The scsi_level + * variable is visible to the user via sysfs. */ #define SCSI_UNKNOWN 0 #define SCSI_1 1 #define SCSI_1_CCS 2 #define SCSI_2 3 -#define SCSI_3 4 +#define SCSI_3 4 /* SPC */ +#define SCSI_SPC_2 5 +#define SCSI_SPC_3 6 /* * INQ PERIPHERAL QUALIFIERS diff -Nru a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h --- a/include/scsi/scsi_device.h 2004-09-06 16:37:50 -07:00 +++ b/include/scsi/scsi_device.h 2004-09-06 16:37:50 -07:00 @@ -129,8 +129,10 @@ #define transport_class_to_sdev(class_dev) \ container_of(class_dev, struct scsi_device, transport_classdev) -extern struct scsi_device *scsi_add_device(struct Scsi_Host *, - uint, uint, uint); +extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, + uint, uint, uint, void *hostdata); +#define scsi_add_device(host, channel, target, lun) \ + __scsi_add_device(host, channel, target, lun, NULL) extern void scsi_remove_device(struct scsi_device *); extern int scsi_device_cancel(struct scsi_device *, int); @@ -183,13 +185,47 @@ extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, unsigned char *buffer, int len, int timeout, int retries, struct scsi_mode_data *data); +extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, + int retries); extern int scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state); extern int scsi_device_quiesce(struct scsi_device *sdev); extern void scsi_device_resume(struct scsi_device *sdev); extern const char *scsi_device_state_name(enum scsi_device_state); -static int inline scsi_device_online(struct scsi_device *sdev) +static inline int scsi_device_online(struct scsi_device *sdev) { return sdev->sdev_state != SDEV_OFFLINE; +} + +/* accessor functions for the SCSI parameters */ +static inline int scsi_device_sync(struct scsi_device *sdev) +{ + return sdev->sdtr; +} +static inline int scsi_device_wide(struct scsi_device *sdev) +{ + return sdev->wdtr; +} +static inline int scsi_device_dt(struct scsi_device *sdev) +{ + return sdev->ppr; +} +static inline int scsi_device_dt_only(struct scsi_device *sdev) +{ + if (sdev->inquiry_len < 57) + return 0; + return (sdev->inquiry[56] & 0x0c) == 0x04; +} +static inline int scsi_device_ius(struct scsi_device *sdev) +{ + if (sdev->inquiry_len < 57) + return 0; + return sdev->inquiry[56] & 0x01; +} +static inline int scsi_device_qas(struct scsi_device *sdev) +{ + if (sdev->inquiry_len < 57) + return 0; + return sdev->inquiry[56] & 0x02; } #endif /* _SCSI_SCSI_DEVICE_H */ diff -Nru a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h --- a/include/scsi/scsi_eh.h 2004-09-06 16:37:55 -07:00 +++ b/include/scsi/scsi_eh.h 2004-09-06 16:37:55 -07:00 @@ -11,7 +11,6 @@ extern void scsi_report_bus_reset(struct Scsi_Host *, int); extern void scsi_report_device_reset(struct Scsi_Host *, int, int); extern int scsi_block_when_processing_errors(struct scsi_device *); -extern void scsi_sleep(int); /* * Reset request from external source diff -Nru a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h --- a/include/sound/ac97_codec.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/ac97_codec.h 2004-09-06 16:37:53 -07:00 @@ -364,11 +364,21 @@ #define AC97_RATES_MIC_ADC 4 #define AC97_RATES_SPDIF 5 +/* shared controllers */ +enum { + AC97_SHARED_TYPE_NONE, + AC97_SHARED_TYPE_ICH, + AC97_SHARED_TYPE_ATIIXP, + AC97_SHARED_TYPES +}; + /* * */ typedef struct _snd_ac97_bus ac97_bus_t; +typedef struct _snd_ac97_bus_ops ac97_bus_ops_t; +typedef struct _snd_ac97_template ac97_template_t; typedef struct _snd_ac97 ac97_t; enum ac97_pcm_cfg { @@ -405,29 +415,45 @@ int (*build_post_spdif) (ac97_t *ac97); }; -struct _snd_ac97_bus { - /* -- lowlevel (hardware) driver specific -- */ +struct _snd_ac97_bus_ops { void (*reset) (ac97_t *ac97); void (*write) (ac97_t *ac97, unsigned short reg, unsigned short val); unsigned short (*read) (ac97_t *ac97, unsigned short reg); void (*wait) (ac97_t *ac97); void (*init) (ac97_t *ac97); +}; + +struct _snd_ac97_bus { + /* -- lowlevel (hardware) driver specific -- */ + ac97_bus_ops_t *ops; void *private_data; void (*private_free) (ac97_bus_t *bus); /* --- */ snd_card_t *card; unsigned short num; /* bus number */ - unsigned short vra: 1, /* bridge supports VRA */ + unsigned short no_vra: 1, /* bridge doesn't support VRA */ isdin: 1;/* independent SDIN */ unsigned int clock; /* AC'97 base clock (usually 48000Hz) */ spinlock_t bus_lock; /* used mainly for slot allocation */ unsigned short used_slots[2][4]; /* actually used PCM slots */ unsigned short pcms_count; /* count of PCMs */ struct ac97_pcm *pcms; + unsigned int shared_type; /* type of shared controller betwen audio and modem */ ac97_t *codec[4]; snd_info_entry_t *proc; }; +struct _snd_ac97_template { + void *private_data; + void (*private_free) (ac97_t *ac97); + struct pci_dev *pci; /* assigned PCI device - used for quirks */ + unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ + unsigned short addr; /* physical address of codec [0-3] */ + unsigned int scaps; /* driver capabilities */ + unsigned int limited_regs; /* allow limited registers only */ + DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ +}; + struct _snd_ac97 { /* -- lowlevel (hardware) driver specific -- */ struct snd_ac97_build_ops * build_ops; @@ -441,6 +467,7 @@ unsigned short subsystem_vendor; unsigned short subsystem_device; spinlock_t reg_lock; + struct semaphore mutex; /* mutex for AD18xx multi-codecs and paging (2.3) */ unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ unsigned short addr; /* physical address of codec [0-3] */ unsigned int id; /* identification of codec */ @@ -461,7 +488,6 @@ unsigned short id[3]; // codec IDs (lower 16-bit word) unsigned short pcmreg[3]; // PCM registers unsigned short codec_cfg[3]; // CODEC_CFG bits - struct semaphore mutex; } ad18xx; unsigned int dev_flags; /* device specific */ } spec; @@ -484,10 +510,14 @@ { return (ac97->ext_id & AC97_EI_AMAP) != 0; } +static inline int ac97_can_spdif(ac97_t * ac97) +{ + return (ac97->ext_id & AC97_EI_SPDIF) != 0; +} /* functions */ -int snd_ac97_bus(snd_card_t * card, ac97_bus_t * _bus, ac97_bus_t ** rbus); /* create new AC97 bus */ -int snd_ac97_mixer(ac97_bus_t * bus, ac97_t * _ac97, ac97_t ** rac97); /* create mixer controls */ +int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, void *private_data, ac97_bus_t **rbus); /* create new AC97 bus */ +int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97); /* create mixer controls */ void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value); unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg); diff -Nru a/include/sound/asequencer.h b/include/sound/asequencer.h --- a/include/sound/asequencer.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/asequencer.h 2004-09-06 16:37:53 -07:00 @@ -177,7 +177,7 @@ /* 150-151: kernel events with quote - DO NOT use in user clients */ #define SNDRV_SEQ_EVENT_KERNEL_ERROR 150 -#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 +#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */ /* 152-191: reserved */ diff -Nru a/include/sound/asound.h b/include/sound/asound.h --- a/include/sound/asound.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/asound.h 2004-09-06 16:37:53 -07:00 @@ -275,7 +275,6 @@ #define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ #define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ #define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ -#define SNDRV_PCM_INFO_NONATOMIC_OPS 0x00800000 /* non-atomic prepare callback */ enum sndrv_pcm_state { SNDRV_PCM_STATE_OPEN = 0, /* stream is open */ diff -Nru a/include/sound/control.h b/include/sound/control.h --- a/include/sound/control.h 2004-09-06 16:37:52 -07:00 +++ b/include/sound/control.h 2004-09-06 16:37:52 -07:00 @@ -35,8 +35,7 @@ typedef enum sndrv_ctl_event_type snd_ctl_event_type_t; typedef struct sndrv_ctl_event snd_ctl_event_t; -#define _snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) -#define snd_kcontrol_chip(kcontrol) snd_magic_cast1(chip_t, _snd_kcontrol_chip(kcontrol), return -ENXIO) +#define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) typedef int (snd_kcontrol_info_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo); typedef int (snd_kcontrol_get_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); diff -Nru a/include/sound/core.h b/include/sound/core.h --- a/include/sound/core.h 2004-09-06 16:37:55 -07:00 +++ b/include/sound/core.h 2004-09-06 16:37:55 -07:00 @@ -211,23 +211,27 @@ void *private_data); #define snd_card_set_isa_pm_callback(card,suspend,resume,data) \ snd_card_set_dev_pm_callback(card, PM_ISA_DEV, suspend, resume, data) +#ifdef CONFIG_PCI #ifndef SND_PCI_PM_CALLBACKS int snd_card_pci_suspend(struct pci_dev *dev, u32 state); int snd_card_pci_resume(struct pci_dev *dev); #define SND_PCI_PM_CALLBACKS \ .suspend = snd_card_pci_suspend, .resume = snd_card_pci_resume #endif +#endif #else #define snd_power_lock(card) do { (void)(card); } while (0) #define snd_power_unlock(card) do { (void)(card); } while (0) static inline int snd_power_wait(snd_card_t *card, unsigned int state, struct file *file) { return 0; } #define snd_power_get_state(card) SNDRV_CTL_POWER_D0 #define snd_power_change_state(card, state) do { (void)(card); } while (0) -#define snd_card_set_pm_callback(card,suspend,resume,data) -EINVAL -#define snd_card_set_dev_pm_callback(card,suspend,resume,data) -EINVAL -#define snd_card_set_isa_pm_callback(card,suspend,resume,data) -EINVAL +#define snd_card_set_pm_callback(card,suspend,resume,data) +#define snd_card_set_dev_pm_callback(card,suspend,resume,data) +#define snd_card_set_isa_pm_callback(card,suspend,resume,data) +#ifdef CONFIG_PCI #define SND_PCI_PM_CALLBACKS #endif +#endif /* device.c */ @@ -268,7 +272,7 @@ #else #define snd_minor_info_oss_init() /*NOP*/ #define snd_minor_info_oss_done() /*NOP*/ -#define snd_oss_init_module() /*NOP*/ +#define snd_oss_init_module() 0 #endif /* memory.c */ @@ -279,10 +283,12 @@ int snd_memory_info_init(void); int snd_memory_info_done(void); void *snd_hidden_kmalloc(size_t size, int flags); +void *snd_hidden_kcalloc(size_t n, size_t size, int flags); void snd_hidden_kfree(const void *obj); void *snd_hidden_vmalloc(unsigned long size); void snd_hidden_vfree(void *obj); #define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) +#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) #define kfree(obj) snd_hidden_kfree(obj) #define vmalloc(size) snd_hidden_vmalloc(size) #define vfree(obj) snd_hidden_vfree(obj) @@ -300,7 +306,6 @@ #define kfree_nocheck(obj) kfree(obj) #define vfree_nocheck(obj) vfree(obj) #endif -void *snd_kcalloc(size_t size, int flags); char *snd_kmalloc_strdup(const char *string, int flags); int copy_to_user_fromio(void __user *dst, unsigned long src, size_t count); int copy_from_user_toio(unsigned long dst, const void __user *src, size_t count); @@ -411,7 +416,7 @@ * not checked. */ #define snd_assert(expr, args...) do {\ - if (!(expr)) {\ + if (unlikely(!(expr))) { \ snd_printk("BUG? (%s) (called from %p)\n", __ASTRING__(expr), __builtin_return_address(0));\ args;\ }\ @@ -427,7 +432,7 @@ * CONFIG_SND_DEBUG is not set but without any error messages. */ #define snd_runtime_check(expr, args...) do {\ - if (!(expr)) {\ + if (unlikely(!(expr))) { \ snd_printk("ERROR (%s) (called from %p)\n", __ASTRING__(expr), __builtin_return_address(0));\ args;\ }\ diff -Nru a/include/sound/cs46xx.h b/include/sound/cs46xx.h --- a/include/sound/cs46xx.h 2004-09-06 16:37:51 -07:00 +++ b/include/sound/cs46xx.h 2004-09-06 16:37:51 -07:00 @@ -24,6 +24,7 @@ */ #include "pcm.h" +#include "pcm-indirect.h" #include "rawmidi.h" #include "ac97_codec.h" #include "cs46xx_dsp_spos.h" @@ -1650,14 +1651,7 @@ unsigned int ctl; unsigned int shift; /* Shift count to trasform frames in bytes */ - unsigned int sw_bufsize; - unsigned int sw_data; /* Offset to next dst (or src) in sw ring buffer */ - unsigned int sw_io; - int sw_ready; /* Bytes ready to be transferred to/from hw */ - unsigned int hw_data; /* Offset to next dst (or src) in hw ring buffer */ - unsigned int hw_io; /* Ring buffer hw pointer */ - int hw_ready; /* Bytes ready for play (or captured) in hw ring buffer */ - size_t appl_ptr; /* Last seen appl_ptr */ + snd_pcm_indirect_t pcm_rec; snd_pcm_substream_t *substream; pcm_channel_descriptor_t * pcm_channel; @@ -1695,14 +1689,7 @@ unsigned int ctl; unsigned int shift; /* Shift count to trasform frames in bytes */ - unsigned int sw_bufsize; - unsigned int sw_data; /* Offset to next dst (or src) in sw ring buffer */ - unsigned int sw_io; - int sw_ready; /* Bytes ready to be transferred to/from hw */ - unsigned int hw_data; /* Offset to next dst (or src) in hw ring buffer */ - unsigned int hw_io; /* Ring buffer hw pointer */ - int hw_ready; /* Bytes ready for play (or captured) in hw ring buffer */ - size_t appl_ptr; /* Last seen appl_ptr */ + snd_pcm_indirect_t pcm_rec; snd_pcm_substream_t *substream; } capt; @@ -1722,8 +1709,6 @@ spinlock_t reg_lock; unsigned int midcr; unsigned int uartm; - - struct snd_dma_device dma_dev; int amplifier; void (*amplifier_ctrl)(cs46xx_t *, int); diff -Nru a/include/sound/driver.h b/include/sound/driver.h --- a/include/sound/driver.h 2004-09-06 16:37:52 -07:00 +++ b/include/sound/driver.h 2004-09-06 16:37:52 -07:00 @@ -61,6 +61,4 @@ #undef vfree #endif -#include "sndmagic.h" - #endif /* __SOUND_DRIVER_H */ diff -Nru a/include/sound/emu10k1.h b/include/sound/emu10k1.h --- a/include/sound/emu10k1.h 2004-09-06 16:37:51 -07:00 +++ b/include/sound/emu10k1.h 2004-09-06 16:37:51 -07:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -887,10 +888,7 @@ unsigned char gpr_trigger; /* GPR containing trigger (activate) information (host) */ unsigned char gpr_running; /* GPR containing info if PCM is running (FX8010) */ unsigned char etram[32]; /* external TRAM address & data */ - unsigned int sw_data, hw_data; - unsigned int sw_io, hw_io; - unsigned int sw_ready, hw_ready; - unsigned int appl_ptr; + snd_pcm_indirect_t pcm_rec; unsigned int tram_pos; unsigned int tram_shift; snd_emu10k1_fx8010_irq_t *irq; @@ -935,11 +933,11 @@ int irq; unsigned long port; /* I/O port number */ - struct resource *res_port; int APS: 1, /* APS flag */ no_ac97: 1, /* no AC'97 */ tos_link: 1, /* tos link detected */ - rear_ac97: 1; /* rear channels are on AC'97 */ + rear_ac97: 1, /* rear channels are on AC'97 */ + spk71:1; /* 7.1 configuration (Audigy 2 ZS) */ unsigned int audigy; /* is Audigy? */ unsigned int revision; /* chip revision */ unsigned int serial; /* serial number */ @@ -947,7 +945,6 @@ unsigned int card_type; /* EMU10K1_CARD_* */ unsigned int ecard_ctrl; /* ecard control bits */ unsigned long dma_mask; /* PCI DMA mask */ - struct snd_dma_device dma_dev; /* DMA device description */ int max_cache_pages; /* max memory size / PAGE_SIZE */ struct snd_dma_buffer silent_page; /* silent page */ struct snd_dma_buffer ptb_pages; /* page table pages */ @@ -972,7 +969,6 @@ snd_pcm_t *pcm; snd_pcm_t *pcm_mic; snd_pcm_t *pcm_efx; - snd_pcm_t *pcm_fx8010; spinlock_t synth_lock; void *synth; @@ -1069,6 +1065,15 @@ /* proc interface */ int snd_emu10k1_proc_init(emu10k1_t * emu); +/* fx8010 irq handler */ +int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu, + snd_fx8010_irq_handler_t *handler, + unsigned char gpr_running, + void *private_data, + snd_emu10k1_fx8010_irq_t **r_irq); +int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu, + snd_emu10k1_fx8010_irq_t *irq); + #endif /* __KERNEL__ */ /* @@ -1162,6 +1167,8 @@ #define FXBUS_PCM_RIGHT_FRONT 0x09 #define FXBUS_MIDI_REVERB 0x0c #define FXBUS_MIDI_CHORUS 0x0d +#define FXBUS_PCM_LEFT_SIDE 0x0e +#define FXBUS_PCM_RIGHT_SIDE 0x0f #define FXBUS_PT_LEFT 0x14 #define FXBUS_PT_RIGHT 0x15 @@ -1227,8 +1234,8 @@ #define A_EXTOUT_AFRONT_R 0x09 /* right */ #define A_EXTOUT_ACENTER 0x0a /* analog center */ #define A_EXTOUT_ALFE 0x0b /* analog LFE */ -/* 0x0c ?? */ -/* 0x0d ?? */ +#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */ +#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */ #define A_EXTOUT_AREAR_L 0x0e /* analog rear left */ #define A_EXTOUT_AREAR_R 0x0f /* right */ #define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */ diff -Nru a/include/sound/es1688.h b/include/sound/es1688.h --- a/include/sound/es1688.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/es1688.h 2004-09-06 16:37:53 -07:00 @@ -55,8 +55,6 @@ typedef struct _snd_es1688 es1688_t; -#define chip_t es1688_t - /* I/O ports */ #define ES1688P(codec, x) ((codec)->port + e_s_s_ESS1688##x) diff -Nru a/include/sound/info.h b/include/sound/info.h --- a/include/sound/info.h 2004-09-06 16:37:54 -07:00 +++ b/include/sound/info.h 2004-09-06 16:37:54 -07:00 @@ -91,9 +91,12 @@ extern int snd_info_check_reserved_words(const char *str); -#ifdef CONFIG_SND_OSSEMUL +#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) extern int snd_info_minor_register(void); extern int snd_info_minor_unregister(void); +#else +#define snd_info_minor_register() /* NOP */ +#define snd_info_minor_unregister() /* NOP */ #endif diff -Nru a/include/sound/initval.h b/include/sound/initval.h --- a/include/sound/initval.h 2004-09-06 16:37:50 -07:00 +++ b/include/sound/initval.h 2004-09-06 16:37:50 -07:00 @@ -21,20 +21,6 @@ * */ -#ifndef MODULE_GENERIC_STRING -#ifdef MODULE -#define MODULE_GENERIC_STRING(name, string) \ -static const char __module_generic_string_##name [] \ - __attribute__ ((unused, __section__(".modstring"))) = #name "=" string; -#else -#define MODULE_GENERIC_STRING(name, string) -#endif -#endif - -#define MODULE_CLASSES(val) MODULE_GENERIC_STRING(info_classes, val) -#define MODULE_DEVICES(val) MODULE_GENERIC_STRING(info_devices, val) -#define MODULE_PARM_SYNTAX(id, val) MODULE_GENERIC_STRING(info_parm_##id, val) - #define SNDRV_AUTO_PORT 1 #define SNDRV_AUTO_IRQ 0xffff #define SNDRV_AUTO_DMA 0xffff @@ -63,25 +49,6 @@ #define SNDRV_DEFAULT_DMA { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA } #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } #define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR - -#define SNDRV_BOOLEAN_TRUE_DESC "allows:{{0,Disabled},{1,Enabled}},default:1,dialog:check" -#define SNDRV_BOOLEAN_FALSE_DESC "allows:{{0,Disabled},{1,Enabled}},default:0,dialog:check" - -#define SNDRV_ENABLED "enable:(enable)" - -#define SNDRV_INDEX_DESC SNDRV_ENABLED ",allows:{{0,7}},unique,skill:required,dialog:list" -#define SNDRV_ID_DESC SNDRV_ENABLED ",unique" -#define SNDRV_ENABLE_DESC SNDRV_BOOLEAN_FALSE_DESC -#define SNDRV_ISAPNP_DESC SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC -#define SNDRV_DMA8_DESC SNDRV_ENABLED ",allows:{{0,1},{3}},dialog:list" -#define SNDRV_DMA16_DESC SNDRV_ENABLED ",allows:{{5,7}},dialog:list" -#define SNDRV_DMA_DESC SNDRV_ENABLED ",allows:{{0,1},{3},{5,7}},dialog:list" -#define SNDRV_IRQ_DESC SNDRV_ENABLED ",allows:{{5},{7},{9},{10,12},{14,15}},dialog:list" -#define SNDRV_DMA_SIZE_DESC SNDRV_ENABLED ",allows:{{4,128}},default:64,skill:advanced" -#define SNDRV_DMA8_SIZE_DESC SNDRV_ENABLED ",allows:{{4, 64}},default:64,skill:advanced" -#define SNDRV_DMA16_SIZE_DESC SNDRV_ENABLED ",allows:{{4,128}},default:64,skill:advanced" -#define SNDRV_PORT12_DESC SNDRV_ENABLED ",allows:{{0,0x3fff}},base:16" -#define SNDRV_PORT_DESC SNDRV_ENABLED ",allows:{{0,0xffff}},base:16" #ifdef SNDRV_LEGACY_AUTO_PROBE static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned long port)) diff -Nru a/include/sound/memalloc.h b/include/sound/memalloc.h --- a/include/sound/memalloc.h 2004-09-06 16:37:50 -07:00 +++ b/include/sound/memalloc.h 2004-09-06 16:37:50 -07:00 @@ -30,9 +30,8 @@ * buffer device info */ struct snd_dma_device { - int type; /* SNDRV_MEM_TYPE_XXX */ + int type; /* SNDRV_DMA_TYPE_XXX */ struct device *dev; /* generic device */ - unsigned int id; /* a unique ID */ }; #ifndef snd_dma_pci_data @@ -56,6 +55,7 @@ * info for buffer allocation */ struct snd_dma_buffer { + struct snd_dma_device dev; /* device type */ unsigned char *area; /* virtual pointer */ dma_addr_t addr; /* physical address */ size_t bytes; /* buffer size in bytes */ @@ -76,7 +76,7 @@ int tblsize; /* allocated table size */ struct snd_sg_page *table; /* address table */ struct page **page_table; /* page table (for vmap/vunmap) */ - struct snd_dma_device dev; + struct device *dev; }; /* @@ -97,20 +97,21 @@ /* allocate/release a buffer */ -int snd_dma_alloc_pages(const struct snd_dma_device *dev, size_t size, +int snd_dma_alloc_pages(int type, struct device *dev, size_t size, struct snd_dma_buffer *dmab); -int snd_dma_alloc_pages_fallback(const struct snd_dma_device *dev, size_t size, +int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size, struct snd_dma_buffer *dmab); -void snd_dma_free_pages(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab); +void snd_dma_free_pages(struct snd_dma_buffer *dmab); /* buffer-preservation managements */ -size_t snd_dma_get_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab); -int snd_dma_free_reserved(const struct snd_dma_device *dev); -int snd_dma_set_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab); + +#define snd_dma_pci_buf_id(pci) (((unsigned int)(pci)->vendor << 16) | (pci)->device) + +size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id); +int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id); /* basic memory allocation functions */ void *snd_malloc_pages(size_t size, unsigned int gfp_flags); -void *snd_malloc_pages_fallback(size_t size, unsigned int gfp_flags, size_t *res_size); void snd_free_pages(void *ptr, size_t size); #endif /* __SOUND_MEMALLOC_H */ diff -Nru a/include/sound/pcm-indirect.h b/include/sound/pcm-indirect.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/sound/pcm-indirect.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,177 @@ +/* + * Helper functions for indirect PCM data transfer + * + * Copyright (c) by Takashi Iwai + * Jaroslav Kysela + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __SOUND_PCM_INDIRECT_H +#define __SOUND_PCM_INDIRECT_H + +#include + +typedef struct sndrv_pcm_indirect { + unsigned int hw_buffer_size; /* Byte size of hardware buffer */ + unsigned int hw_queue_size; /* Max queue size of hw buffer (0 = buffer size) */ + unsigned int hw_data; /* Offset to next dst (or src) in hw ring buffer */ + unsigned int hw_io; /* Ring buffer hw pointer */ + int hw_ready; /* Bytes ready for play (or captured) in hw ring buffer */ + unsigned int sw_buffer_size; /* Byte size of software buffer */ + unsigned int sw_data; /* Offset to next dst (or src) in sw ring buffer */ + unsigned int sw_io; /* Current software pointer in bytes */ + int sw_ready; /* Bytes ready to be transferred to/from hw */ + snd_pcm_uframes_t appl_ptr; /* Last seen appl_ptr */ +} snd_pcm_indirect_t; + +typedef void (*snd_pcm_indirect_copy_t)(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes); + +/* + * helper function for playback ack callback + */ +static inline void +snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, + snd_pcm_indirect_copy_t copy) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr; + snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr; + int qsize; + + if (diff) { + if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) + diff += runtime->boundary; + rec->sw_ready += (int)frames_to_bytes(runtime, diff); + rec->appl_ptr = appl_ptr; + } + qsize = rec->hw_queue_size ? rec->hw_queue_size : rec->hw_buffer_size; + while (rec->hw_ready < qsize && rec->sw_ready > 0) { + unsigned int hw_to_end = rec->hw_buffer_size - rec->hw_data; + unsigned int sw_to_end = rec->sw_buffer_size - rec->sw_data; + unsigned int bytes = qsize - rec->hw_ready; + if (rec->sw_ready < (int)bytes) + bytes = rec->sw_ready; + if (hw_to_end < bytes) + bytes = hw_to_end; + if (sw_to_end < bytes) + bytes = sw_to_end; + if (! bytes) + break; + copy(substream, rec, bytes); + rec->hw_data += bytes; + if (rec->hw_data == rec->hw_buffer_size) + rec->hw_data = 0; + rec->sw_data += bytes; + if (rec->sw_data == rec->sw_buffer_size) + rec->sw_data = 0; + rec->hw_ready += bytes; + rec->sw_ready -= bytes; + } +} + +/* + * helper function for playback pointer callback + * ptr = current byte pointer + */ +static inline snd_pcm_uframes_t +snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, unsigned int ptr) +{ + int bytes = ptr - rec->hw_io; + if (bytes < 0) + bytes += rec->hw_buffer_size; + rec->hw_io = ptr; + rec->hw_ready -= bytes; + rec->sw_io += bytes; + if (rec->sw_io >= rec->sw_buffer_size) + rec->sw_io -= rec->sw_buffer_size; + if (substream->ops->ack) + substream->ops->ack(substream); + return bytes_to_frames(substream->runtime, rec->sw_io); +} + + +/* + * helper function for capture ack callback + */ +static inline void +snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, + snd_pcm_indirect_copy_t copy) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr; + snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr; + + if (diff) { + if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) + diff += runtime->boundary; + rec->sw_ready -= frames_to_bytes(runtime, diff); + rec->appl_ptr = appl_ptr; + } + while (rec->hw_ready > 0 && + rec->sw_ready < (int)rec->sw_buffer_size) { + size_t hw_to_end = rec->hw_buffer_size - rec->hw_data; + size_t sw_to_end = rec->sw_buffer_size - rec->sw_data; + size_t bytes = rec->sw_buffer_size - rec->sw_ready; + if (rec->hw_ready < (int)bytes) + bytes = rec->hw_ready; + if (hw_to_end < bytes) + bytes = hw_to_end; + if (sw_to_end < bytes) + bytes = sw_to_end; + if (! bytes) + break; + copy(substream, rec, bytes); + rec->hw_data += bytes; + if ((int)rec->hw_data == rec->hw_buffer_size) + rec->hw_data = 0; + rec->sw_data += bytes; + if (rec->sw_data == rec->sw_buffer_size) + rec->sw_data = 0; + rec->hw_ready -= bytes; + rec->sw_ready += bytes; + } +} + +/* + * helper function for capture pointer callback, + * ptr = current byte pointer + */ +static inline snd_pcm_uframes_t +snd_pcm_indirect_capture_pointer(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, unsigned int ptr) +{ + int qsize; + int bytes = ptr - rec->hw_io; + if (bytes < 0) + bytes += rec->hw_buffer_size; + rec->hw_io = ptr; + rec->hw_ready += bytes; + qsize = rec->hw_queue_size ? rec->hw_queue_size : rec->hw_buffer_size; + if (rec->hw_ready > qsize) + return SNDRV_PCM_POS_XRUN; + rec->sw_io += bytes; + if (rec->sw_io >= rec->sw_buffer_size) + rec->sw_io -= rec->sw_buffer_size; + if (substream->ops->ack) + substream->ops->ack(substream); + return bytes_to_frames(substream->runtime, rec->sw_io); +} + +#endif /* __SOUND_PCM_INDIRECT_H */ diff -Nru a/include/sound/pcm.h b/include/sound/pcm.h --- a/include/sound/pcm.h 2004-09-06 16:37:52 -07:00 +++ b/include/sound/pcm.h 2004-09-06 16:37:52 -07:00 @@ -52,10 +52,8 @@ typedef struct sndrv_mask snd_mask_t; typedef struct snd_sg_buf snd_pcm_sgbuf_t; -#define _snd_pcm_substream_chip(substream) ((substream)->private_data) -#define snd_pcm_substream_chip(substream) snd_magic_cast1(chip_t, _snd_pcm_substream_chip(substream), return -ENXIO) -#define _snd_pcm_chip(pcm) ((pcm)->private_data) -#define snd_pcm_chip(pcm) snd_magic_cast1(chip_t, _snd_pcm_chip(pcm), return -ENXIO) +#define snd_pcm_substream_chip(substream) ((substream)->private_data) +#define snd_pcm_chip(pcm) ((pcm)->private_data) typedef struct _snd_pcm_file snd_pcm_file_t; typedef struct _snd_pcm_runtime snd_pcm_runtime_t; @@ -99,6 +97,7 @@ int (*silence)(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, snd_pcm_uframes_t count); struct page *(*page)(snd_pcm_substream_t *substream, unsigned long offset); + int (*mmap)(snd_pcm_substream_t *substream, struct vm_area_struct *vma); int (*ack)(snd_pcm_substream_t *substream); } snd_pcm_ops_t; @@ -123,6 +122,8 @@ #define SNDRV_PCM_TRIGGER_SUSPEND 5 #define SNDRV_PCM_TRIGGER_RESUME 6 +#define SNDRV_PCM_POS_XRUN ((snd_pcm_uframes_t)-1) + /* If you change this don't forget to change rates[] table in pcm_native.c */ #define SNDRV_PCM_RATE_5512 (1<<0) /* 5512Hz */ #define SNDRV_PCM_RATE_8000 (1<<1) /* 8000Hz */ @@ -351,7 +352,8 @@ unsigned char *dma_area; /* DMA area */ dma_addr_t dma_addr; /* physical bus address (not accessible from main CPU) */ size_t dma_bytes; /* size of DMA area */ - void *dma_private; /* private DMA data for the memory allocator */ + + struct snd_dma_buffer *dma_buffer_p; /* allocated buffer */ #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) /* -- OSS things -- */ @@ -372,8 +374,8 @@ char name[32]; /* substream name */ int stream; /* stream (direction) */ size_t buffer_bytes_max; /* limit ring buffer size */ - struct snd_dma_device dma_device; struct snd_dma_buffer dma_buffer; + unsigned int dma_buf_id; size_t dma_max; /* -- hardware operations -- */ unsigned int open_flag: 1; /* lowlevel device has been opened */ @@ -851,7 +853,7 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format); int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */ int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ -u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format); +const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian); ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); @@ -892,6 +894,22 @@ int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime); +static inline void snd_pcm_set_runtime_buffer(snd_pcm_substream_t *substream, + struct snd_dma_buffer *bufp) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + if (bufp) { + runtime->dma_buffer_p = bufp; + runtime->dma_area = bufp->area; + runtime->dma_addr = bufp->addr; + runtime->dma_bytes = bufp->bytes; + } else { + runtime->dma_buffer_p = NULL; + runtime->dma_area = NULL; + runtime->dma_addr = 0; + runtime->dma_bytes = 0; + } +} /* * Timer interface @@ -916,10 +934,32 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size); int snd_pcm_lib_free_pages(snd_pcm_substream_t *substream); -#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_private) +#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_buffer_p->private_data) #define snd_pcm_sgbuf_pages(size) snd_sgbuf_aligned_pages(size) #define snd_pcm_sgbuf_get_addr(sgbuf,ofs) snd_sgbuf_get_addr(sgbuf,ofs) struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset); + +/* handle mmap counter - PCM mmap callback should handle this counter properly */ +static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) +{ + snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; + atomic_inc(&substream->runtime->mmap_count); +} + +static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area) +{ + snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; + atomic_dec(&substream->runtime->mmap_count); +} + +/* mmap for io-memory area */ +#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA) +#define SNDRV_PCM_INFO_MMAP_IOMEM SNDRV_PCM_INFO_MMAP +int snd_pcm_lib_mmap_iomem(snd_pcm_substream_t *substream, struct vm_area_struct *area); +#else +#define SNDRV_PCM_INFO_MMAP_IOMEM 0 +#define snd_pcm_lib_mmap_iomem NULL +#endif static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) { diff -Nru a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h --- a/include/sound/seq_kernel.h 2004-09-06 16:37:55 -07:00 +++ b/include/sound/seq_kernel.h 2004-09-06 16:37:55 -07:00 @@ -168,6 +168,9 @@ int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned); int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data); +/* interface for OSS emulation */ +int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo); + /* port callback routines */ void snd_port_init_callback(snd_seq_port_callback_t *p); snd_seq_port_callback_t *snd_port_alloc_callback(void); diff -Nru a/include/sound/sndmagic.h b/include/sound/sndmagic.h --- a/include/sound/sndmagic.h 2004-09-06 16:37:51 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,218 +0,0 @@ -#ifndef __SOUND_SNDMAGIC_H -#define __SOUND_SNDMAGIC_H - -/* - * Magic allocation, deallocation, check - * Copyright (c) 2000 by Abramo Bagnara - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - - -#ifdef CONFIG_SND_DEBUG_MEMORY - -void *_snd_magic_kcalloc(unsigned long magic, size_t size, int flags); -void *_snd_magic_kmalloc(unsigned long magic, size_t size, int flags); - -/** - * snd_magic_kmalloc - allocate a record with a magic-prefix - * @type: the type to allocate a record (like xxx_t) - * @extra: the extra size to allocate in bytes - * @flags: the allocation condition (GFP_XXX) - * - * Allocates a record of the given type with the extra space and - * returns its pointer. The allocated record has a secret magic-key - * to be checked via snd_magic_cast() for safe casts. - * - * The allocated pointer must be released via snd_magic_kfree(). - * - * The "struct xxx" style cannot be used as the type argument - * because the magic-key constant is generated from the type-name - * string. - */ -#define snd_magic_kmalloc(type, extra, flags) \ - (type *) _snd_magic_kmalloc(type##_magic, sizeof(type) + extra, flags) -/** - * snd_magic_kcalloc - allocate a record with a magic-prefix and initialize - * @type: the type to allocate a record (like xxx_t) - * @extra: the extra size to allocate in bytes - * @flags: the allocation condition (GFP_XXX) - * - * Works like snd_magic_kmalloc() but this clears the area with zero - * automatically. - */ -#define snd_magic_kcalloc(type, extra, flags) \ - (type *) _snd_magic_kcalloc(type##_magic, sizeof(type) + extra, flags) - -/** - * snd_magic_kfree - release the allocated area - * @ptr: the pointer allocated via snd_magic_kmalloc() or snd_magic_kcalloc() - * - * Releases the memory area allocated via snd_magic_kmalloc() or - * snd_magic_kcalloc() function. - */ -void snd_magic_kfree(void *ptr); - -static inline unsigned long _snd_magic_value(void *obj) -{ - return obj == NULL ? (unsigned long)-1 : *(((unsigned long *)obj) - 1); -} - -static inline int _snd_magic_bad(void *obj, unsigned long magic) -{ - return _snd_magic_value(obj) != magic; -} - -#define snd_magic_cast1(t, expr, cmd) snd_magic_cast(t, expr, cmd) - -/** - * snd_magic_cast - check and cast the magic-allocated pointer - * @type: the type of record to cast - * @ptr: the magic-allocated pointer - * @action...: the action to do if failed - * - * This macro provides a safe cast for the given type, which was - * allocated via snd_magic_kmalloc() or snd_magic_kcallc(). - * If the pointer is invalid, i.e. the cast-type doesn't match, - * the action arguments are called with a debug message. - */ -#define snd_magic_cast(type, ptr, action...) \ - (type *) ({\ - void *__ptr = ptr;\ - unsigned long __magic = _snd_magic_value(__ptr);\ - if (__magic != type##_magic) {\ - snd_printk("bad MAGIC (0x%lx)\n", __magic);\ - action;\ - }\ - __ptr;\ -}) - -#define snd_device_t_magic 0xa15a00ff -#define snd_pcm_t_magic 0xa15a0101 -#define snd_pcm_file_t_magic 0xa15a0102 -#define snd_pcm_substream_t_magic 0xa15a0103 -#define snd_pcm_proc_private_t_magic 0xa15a0104 -#define snd_pcm_oss_file_t_magic 0xa15a0105 -#define snd_mixer_oss_t_magic 0xa15a0106 -// #define snd_pcm_sgbuf_t_magic 0xa15a0107 - -#define snd_info_private_data_t_magic 0xa15a0201 -#define snd_info_entry_t_magic 0xa15a0202 -#define snd_ctl_file_t_magic 0xa15a0301 -#define snd_kcontrol_t_magic 0xa15a0302 -#define snd_rawmidi_t_magic 0xa15a0401 -#define snd_rawmidi_file_t_magic 0xa15a0402 -#define snd_virmidi_t_magic 0xa15a0403 -#define snd_virmidi_dev_t_magic 0xa15a0404 -#define snd_timer_t_magic 0xa15a0501 -#define snd_timer_user_t_magic 0xa15a0502 -#define snd_hwdep_t_magic 0xa15a0601 -#define snd_seq_device_t_magic 0xa15a0701 - -#define es18xx_t_magic 0xa15a1101 -#define trident_t_magic 0xa15a1201 -#define es1938_t_magic 0xa15a1301 -#define cs46xx_t_magic 0xa15a1401 -#define cs46xx_pcm_t_magic 0xa15a1402 -#define ensoniq_t_magic 0xa15a1501 -#define sonicvibes_t_magic 0xa15a1601 -#define mpu401_t_magic 0xa15a1701 -#define fm801_t_magic 0xa15a1801 -#define ac97_t_magic 0xa15a1901 -#define ac97_bus_t_magic 0xa15a1902 -#define ak4531_t_magic 0xa15a1a01 -#define snd_uart16550_t_magic 0xa15a1b01 -#define emu10k1_t_magic 0xa15a1c01 -#define emu10k1_pcm_t_magic 0xa15a1c02 -#define emu10k1_midi_t_magic 0xa15a1c03 -#define snd_gus_card_t_magic 0xa15a1d01 -#define gus_pcm_private_t_magic 0xa15a1d02 -#define gus_proc_private_t_magic 0xa15a1d03 -#define tea6330t_t_magic 0xa15a1e01 -#define ad1848_t_magic 0xa15a1f01 -#define cs4231_t_magic 0xa15a2001 -#define es1688_t_magic 0xa15a2101 -#define opti93x_t_magic 0xa15a2201 -#define emu8000_t_magic 0xa15a2301 -#define emu8000_proc_private_t_magic 0xa15a2302 -#define snd_emux_t_magic 0xa15a2303 -#define snd_emux_port_t_magic 0xa15a2304 -#define sb_t_magic 0xa15a2401 -#define snd_sb_csp_t_magic 0xa15a2402 -#define snd_card_dummy_t_magic 0xa15a2501 -#define snd_card_dummy_pcm_t_magic 0xa15a2502 -#define opl3_t_magic 0xa15a2601 -#define opl4_t_magic 0xa15a2602 -#define snd_seq_dummy_port_t_magic 0xa15a2701 -#define ice1712_t_magic 0xa15a2801 -#define ad1816a_t_magic 0xa15a2901 -#define intel8x0_t_magic 0xa15a2a01 -#define es1968_t_magic 0xa15a2b01 -#define esschan_t_magic 0xa15a2b02 -#define via82xx_t_magic 0xa15a2c01 -#define pdplus_t_magic 0xa15a2d01 -#define cmipci_t_magic 0xa15a2e01 -#define ymfpci_t_magic 0xa15a2f01 -#define ymfpci_pcm_t_magic 0xa15a2f02 -#define cs4281_t_magic 0xa15a3001 -#define snd_i2c_bus_t_magic 0xa15a3101 -#define snd_i2c_device_t_magic 0xa15a3102 -#define cs8427_t_magic 0xa15a3111 -#define m3_t_magic 0xa15a3201 -#define m3_dma_t_magic 0xa15a3202 -#define nm256_t_magic 0xa15a3301 -#define nm256_dma_t_magic 0xa15a3302 -#define sam9407_t_magic 0xa15a3401 -#define pmac_t_magic 0xa15a3501 -#define ali_t_magic 0xa15a3601 -#define mtpav_t_magic 0xa15a3701 -#define mtpav_port_t_magic 0xa15a3702 -#define korg1212_t_magic 0xa15a3800 -#define opl3sa2_t_magic 0xa15a3900 -#define serialmidi_t_magic 0xa15a3a00 -#define sa11xx_uda1341_t_magic 0xa15a3b00 -#define uda1341_t_magic 0xa15a3c00 -#define l3_client_t_magic 0xa15a3d00 -#define snd_usb_audio_t_magic 0xa15a3e01 -#define usb_mixer_elem_info_t_magic 0xa15a3e02 -#define snd_usb_stream_t_magic 0xa15a3e03 -#define snd_usb_midi_t_magic 0xa15a3f01 -#define snd_usb_midi_out_endpoint_t_magic 0xa15a3f02 -#define snd_usb_midi_in_endpoint_t_magic 0xa15a3f03 -#define ak4117_t_magic 0xa15a4000 -#define psic_t_magic 0xa15a4100 -#define vx_core_t_magic 0xa15a4110 -#define vx_pipe_t_magic 0xa15a4112 -#define azf3328_t_magic 0xa15a4200 -#define snd_card_harmony_t_magic 0xa15a4300 -#define bt87x_t_magic 0xa15a4400 -#define pdacf_t_magic 0xa15a4500 -#define vortex_t_magic 0xa15a4601 -#define atiixp_t_magic 0xa15a4701 -#define amd7930_t_magic 0xa15a4801 - -#else - -#define snd_magic_kcalloc(type, extra, flags) (type *) snd_kcalloc(sizeof(type) + extra, flags) -#define snd_magic_kmalloc(type, extra, flags) (type *) kmalloc(sizeof(type) + extra, flags) -#define snd_magic_cast(type, ptr, retval) (type *) ptr -#define snd_magic_cast1(type, ptr, retval) snd_magic_cast(type, ptr, retval) -#define snd_magic_kfree kfree - -#endif - -#endif /* __SOUND_SNDMAGIC_H */ diff -Nru a/include/sound/soundfont.h b/include/sound/soundfont.h --- a/include/sound/soundfont.h 2004-09-06 16:37:55 -07:00 +++ b/include/sound/soundfont.h 2004-09-06 16:37:55 -07:00 @@ -95,6 +95,7 @@ int zone_locked; /* locked time for zone */ int sample_locked; /* locked time for sample */ snd_sf_callback_t callback; /* callback functions */ + int presets_locked; struct semaphore presets_mutex; spinlock_t lock; snd_util_memhdr_t *memhdr; diff -Nru a/include/sound/timer.h b/include/sound/timer.h --- a/include/sound/timer.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/timer.h 2004-09-06 16:37:53 -07:00 @@ -40,8 +40,7 @@ typedef struct sndrv_timer_read snd_timer_read_t; typedef struct sndrv_timer_tread snd_timer_tread_t; -#define _snd_timer_chip(timer) ((timer)->private_data) -#define snd_timer_chip(timer) snd_magic_cast1(chip_t, _snd_timer_chip(timer), return -ENXIO) +#define snd_timer_chip(timer) ((timer)->private_data) #define SNDRV_TIMER_DEVICES 16 diff -Nru a/include/sound/trident.h b/include/sound/trident.h --- a/include/sound/trident.h 2004-09-06 16:37:53 -07:00 +++ b/include/sound/trident.h 2004-09-06 16:37:53 -07:00 @@ -398,7 +398,6 @@ unsigned char bDMAStart; unsigned long port; - struct resource *res_port; unsigned long midi_port; unsigned int spurious_irq_count; diff -Nru a/include/sound/version.h b/include/sound/version.h --- a/include/sound/version.h 2004-09-06 16:37:52 -07:00 +++ b/include/sound/version.h 2004-09-06 16:37:52 -07:00 @@ -1,3 +1,3 @@ /* include/version.h. Generated by configure. */ -#define CONFIG_SND_VERSION "1.0.4" -#define CONFIG_SND_DATE " (Mon May 17 14:31:44 2004 UTC)" +#define CONFIG_SND_VERSION "1.0.6" +#define CONFIG_SND_DATE " (Sun Aug 15 07:17:53 2004 UTC)" diff -Nru a/include/sound/vx_core.h b/include/sound/vx_core.h --- a/include/sound/vx_core.h 2004-09-06 16:37:50 -07:00 +++ b/include/sound/vx_core.h 2004-09-06 16:37:50 -07:00 @@ -182,6 +182,7 @@ /* clock and audio sources */ unsigned int audio_source; /* current audio input source */ unsigned int audio_source_target; + unsigned int clock_mode; /* clock mode (VX_CLOCK_MODE_XXX) */ unsigned int clock_source; /* current clock source (INTERNAL_QUARTZ or UER_SYNC) */ unsigned int freq; /* current frequency */ unsigned int freq_detected; /* detected frequency from digital in */ @@ -362,6 +363,13 @@ enum { INTERNAL_QUARTZ, UER_SYNC +}; + +/* clock mode */ +enum { + VX_CLOCK_MODE_AUTO, /* depending on the current audio source */ + VX_CLOCK_MODE_INTERNAL, /* fixed to internal quartz */ + VX_CLOCK_MODE_EXTERNAL /* fixed to UER sync */ }; /* SPDIF/UER type */ diff -Nru a/include/sound/ymfpci.h b/include/sound/ymfpci.h --- a/include/sound/ymfpci.h 2004-09-06 16:37:52 -07:00 +++ b/include/sound/ymfpci.h 2004-09-06 16:37:52 -07:00 @@ -316,7 +316,6 @@ struct gameport gameport; #endif - struct snd_dma_device dma_dev; struct snd_dma_buffer work_ptr; unsigned int bank_size_playback; diff -Nru a/init/Kconfig b/init/Kconfig --- a/init/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/init/Kconfig 2004-09-06 16:37:54 -07:00 @@ -121,7 +121,7 @@ process and it's parent. Note that this file format is incompatible with previous v0/v1/v2 file formats, so you will need updated tools for processing it. A preliminary version of these tools is available - at . + at . config SYSCTL bool "Sysctl support" @@ -283,7 +283,21 @@ If unsure, say N. +config SHMEM + default y + bool "Use full shmem filesystem" if EMBEDDED && MMU + help + The shmem is an internal filesystem used to manage shared memory. + It is backed by swap and manages resource limits. It is also exported + to userspace as tmpfs if TMPFS is enabled. Disabling this + option replaces shmem and tmpfs with the much simpler ramfs code, + which may be appropriate on small systems without swap. + endmenu # General setup + +config TINY_SHMEM + default !SHMEM + bool menu "Loadable module support" diff -Nru a/init/do_mounts_rd.c b/init/do_mounts_rd.c --- a/init/do_mounts_rd.c 2004-09-06 16:37:54 -07:00 +++ b/init/do_mounts_rd.c 2004-09-06 16:37:54 -07:00 @@ -122,7 +122,8 @@ printk(KERN_NOTICE "RAMDISK: ext2 filesystem found at block %d\n", start_block); - nblocks = le32_to_cpu(ext2sb->s_blocks_count); + nblocks = le32_to_cpu(ext2sb->s_blocks_count) << + le32_to_cpu(ext2sb->s_log_block_size); goto done; } @@ -173,10 +174,15 @@ } /* - * NOTE NOTE: nblocks suppose that the blocksize is BLOCK_SIZE, so - * rd_load_image will work only with filesystem BLOCK_SIZE wide! - * So make sure to use 1k blocksize while generating ext2fs - * ramdisk-images. + * NOTE NOTE: nblocks is not actually blocks but + * the number of kibibytes of data to load into a ramdisk. + * So any ramdisk block size that is a multiple of 1KiB should + * work when the appropriate ramdisk_blocksize is specified + * on the command line. + * + * The default ramdisk_blocksize is 1KiB and it is generally + * silly to use anything else, so make sure to use 1KiB + * blocksize while generating ext2fs ramdisk-images. */ if (sys_ioctl(out_fd, BLKGETSIZE, (unsigned long)&rd_blocks) < 0) rd_blocks = 0; @@ -184,7 +190,7 @@ rd_blocks >>= 1; if (nblocks > rd_blocks) { - printk("RAMDISK: image too big! (%d/%ld blocks)\n", + printk("RAMDISK: image too big! (%dKiB/%ldKiB)\n", nblocks, rd_blocks); goto done; } @@ -211,7 +217,7 @@ goto done; } - printk(KERN_NOTICE "RAMDISK: Loading %d blocks [%ld disk%s] into ram disk... ", + printk(KERN_NOTICE "RAMDISK: Loading %dKiB [%ld disk%s] into ram disk... ", nblocks, ((nblocks-1)/devblocks)+1, nblocks>devblocks ? "s" : ""); for (i = 0, disk = 1; i < nblocks; i++) { if (i && (i % devblocks == 0)) { diff -Nru a/init/main.c b/init/main.c --- a/init/main.c 2004-09-06 16:37:51 -07:00 +++ b/init/main.c 2004-09-06 16:37:51 -07:00 @@ -110,8 +110,8 @@ /* * Boot command-line arguments */ -#define MAX_INIT_ARGS 8 -#define MAX_INIT_ENVS 8 +#define MAX_INIT_ARGS 32 +#define MAX_INIT_ENVS 32 extern void time_init(void); /* Default late time init is NULL. archs can override this later. */ @@ -156,8 +156,6 @@ char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; static const char *panic_later, *panic_param; -__setup("profile=", profile_setup); - static int __init obsolete_checksetup(char *line) { struct obs_kernel_param *p; @@ -184,15 +182,28 @@ return 0; } -/* this should be approx 2 Bo*oMips to start (note initial shift), and will - still work even if initially too large, it will just take slightly longer */ +static unsigned long preset_lpj; +static int __init lpj_setup(char *str) +{ + preset_lpj = simple_strtoul(str,NULL,0); + return 1; +} + +__setup("lpj=", lpj_setup); + +/* + * This should be approx 2 Bo*oMips to start (note initial shift), and will + * still work even if initially too large, it will just take slightly longer + */ unsigned long loops_per_jiffy = (1<<12); EXPORT_SYMBOL(loops_per_jiffy); -/* This is the number of bits of precision for the loops_per_jiffy. Each - bit takes on average 1.5/HZ seconds. This (like the original) is a little - better than 1% */ +/* + * This is the number of bits of precision for the loops_per_jiffy. Each + * bit takes on average 1.5/HZ seconds. This (like the original) is a little + * better than 1% + */ #define LPS_PREC 8 void __devinit calibrate_delay(void) @@ -200,40 +211,53 @@ unsigned long ticks, loopbit; int lps_precision = LPS_PREC; - loops_per_jiffy = (1<<12); + if (preset_lpj) { + loops_per_jiffy = preset_lpj; + printk("Calibrating delay loop (skipped)... " + "%lu.%02lu BogoMIPS preset\n", + loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100); + } else { + loops_per_jiffy = (1<<12); - printk("Calibrating delay loop... "); - while ((loops_per_jiffy <<= 1) != 0) { - /* wait for "start of" clock tick */ - ticks = jiffies; - while (ticks == jiffies) - /* nothing */; - /* Go .. */ - ticks = jiffies; - __delay(loops_per_jiffy); - ticks = jiffies - ticks; - if (ticks) - break; - } + printk(KERN_DEBUG "Calibrating delay loop... "); + while ((loops_per_jiffy <<= 1) != 0) { + /* wait for "start of" clock tick */ + ticks = jiffies; + while (ticks == jiffies) + /* nothing */; + /* Go .. */ + ticks = jiffies; + __delay(loops_per_jiffy); + ticks = jiffies - ticks; + if (ticks) + break; + } + + /* + * Do a binary approximation to get loops_per_jiffy set to + * equal one clock (up to lps_precision bits) + */ + loops_per_jiffy >>= 1; + loopbit = loops_per_jiffy; + while (lps_precision-- && (loopbit >>= 1)) { + loops_per_jiffy |= loopbit; + ticks = jiffies; + while (ticks == jiffies) + /* nothing */; + ticks = jiffies; + __delay(loops_per_jiffy); + if (jiffies != ticks) /* longer than 1 tick */ + loops_per_jiffy &= ~loopbit; + } -/* Do a binary approximation to get loops_per_jiffy set to equal one clock - (up to lps_precision bits) */ - loops_per_jiffy >>= 1; - loopbit = loops_per_jiffy; - while ( lps_precision-- && (loopbit >>= 1) ) { - loops_per_jiffy |= loopbit; - ticks = jiffies; - while (ticks == jiffies); - ticks = jiffies; - __delay(loops_per_jiffy); - if (jiffies != ticks) /* longer than 1 tick */ - loops_per_jiffy &= ~loopbit; + /* Round the value and print it */ + printk("%lu.%02lu BogoMIPS (lpj=%lu)\n", + loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100, + loops_per_jiffy); } -/* Round the value and print it */ - printk("%lu.%02lu BogoMIPS\n", - loops_per_jiffy/(500000/HZ), - (loops_per_jiffy/(5000/HZ)) % 100); } static int __init debug_kernel(char *str) @@ -255,8 +279,10 @@ __setup("debug", debug_kernel); __setup("quiet", quiet_kernel); -/* Unknown boot options get handed to init, unless they look like - failed parameters */ +/* + * Unknown boot options get handed to init, unless they look like + * failed parameters + */ static int __init unknown_bootoption(char *param, char *val) { /* Change NUL term back to "=", to make "param" the whole string. */ @@ -267,8 +293,10 @@ if (obsolete_checksetup(param)) return 0; - /* Preemptive maintenance for "why didn't my mispelled command - line work?" */ + /* + * Preemptive maintenance for "why didn't my mispelled command + * line work?" + */ if (strchr(param, '.') && (!val || strchr(param, '.') < val)) { printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param); return 0; @@ -308,7 +336,8 @@ unsigned int i; execute_command = str; - /* In case LILO is going to boot us with default command line, + /* + * In case LILO is going to boot us with default command line, * it prepends "auto" before the whole cmdline which makes * the shell think it should execute a script with such name. * So we ignore all arguments entered _before_ init=... [MJ] @@ -471,7 +500,6 @@ * time - but meanwhile we still have a functioning scheduler. */ sched_init(); - build_all_zonelists(); page_alloc_init(); printk("Kernel command line: %s\n", saved_command_line); @@ -537,13 +565,6 @@ check_bugs(); acpi_early_init(); /* before LAPIC and SMP init */ - - /* - * We count on the initial thread going ok - * Like idlers init is an unlocked kernel thread, which will - * make syscalls (and thus be locked). - */ - init_idle(current, smp_processor_id()); /* Do the rest non-__init'ed, we're now alive */ rest_init(); diff -Nru a/ipc/shm.c b/ipc/shm.c --- a/ipc/shm.c 2004-09-06 16:37:52 -07:00 +++ b/ipc/shm.c 2004-09-06 16:37:52 -07:00 @@ -78,7 +78,7 @@ static inline int shm_addid(struct shmid_kernel *shp) { - return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni+1); + return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni); } @@ -687,6 +687,10 @@ prot = PROT_READ | PROT_WRITE; o_flags = O_RDWR; acc_mode = S_IRUGO | S_IWUGO; + } + if (shmflg & SHM_EXEC) { + prot |= PROT_EXEC; + acc_mode |= S_IXUGO; } /* diff -Nru a/kernel/Makefile b/kernel/Makefile --- a/kernel/Makefile 2004-09-06 16:37:51 -07:00 +++ b/kernel/Makefile 2004-09-06 16:37:51 -07:00 @@ -11,7 +11,7 @@ obj-$(CONFIG_FUTEX) += futex.o obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o -obj-$(CONFIG_SMP) += cpu.o +obj-$(CONFIG_SMP) += cpu.o spinlock.o obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_KALLSYMS) += kallsyms.o @@ -23,6 +23,7 @@ obj-$(CONFIG_STOP_MACHINE) += stop_machine.o obj-$(CONFIG_AUDIT) += audit.o obj-$(CONFIG_AUDITSYSCALL) += auditsc.o +obj-$(CONFIG_KPROBES) += kprobes.o ifneq ($(CONFIG_IA64),y) # According to Alan Modra , the -fno-omit-frame-pointer is diff -Nru a/kernel/audit.c b/kernel/audit.c --- a/kernel/audit.c 2004-09-06 16:37:55 -07:00 +++ b/kernel/audit.c 2004-09-06 16:37:55 -07:00 @@ -708,7 +708,7 @@ audit_log_move(ab); avail = sizeof(ab->tmp) - ab->len; p = d_path(dentry, vfsmnt, ab->tmp + ab->len, avail); - if (p == ERR_PTR(-ENAMETOOLONG)) { + if (IS_ERR(p)) { /* FIXME: can we save some information here? */ audit_log_format(ab, ""); } else { diff -Nru a/kernel/capability.c b/kernel/capability.c --- a/kernel/capability.c 2004-09-06 16:37:53 -07:00 +++ b/kernel/capability.c 2004-09-06 16:37:53 -07:00 @@ -89,14 +89,12 @@ kernel_cap_t *permitted) { task_t *g, *target; - struct list_head *l; - struct pid *pid; - for_each_task_pid(pgrp, PIDTYPE_PGID, g, l, pid) { + do_each_task_pid(pgrp, PIDTYPE_PGID, g) { target = g; while_each_thread(g, target) security_capset_set(target, effective, inheritable, permitted); - } + } while_each_task_pid(pgrp, PIDTYPE_PGID, g); } /* diff -Nru a/kernel/compat.c b/kernel/compat.c --- a/kernel/compat.c 2004-09-06 16:37:52 -07:00 +++ b/kernel/compat.c 2004-09-06 16:37:52 -07:00 @@ -160,10 +160,39 @@ */ if (tbuf) { struct compat_tms tmp; - tmp.tms_utime = compat_jiffies_to_clock_t(current->utime); - tmp.tms_stime = compat_jiffies_to_clock_t(current->stime); - tmp.tms_cutime = compat_jiffies_to_clock_t(current->cutime); - tmp.tms_cstime = compat_jiffies_to_clock_t(current->cstime); + struct task_struct *tsk = current; + struct task_struct *t; + unsigned long utime, stime, cutime, cstime; + + read_lock(&tasklist_lock); + utime = tsk->signal->utime; + stime = tsk->signal->stime; + t = tsk; + do { + utime += t->utime; + stime += t->stime; + t = next_thread(t); + } while (t != tsk); + + /* + * While we have tasklist_lock read-locked, no dying thread + * can be updating current->signal->[us]time. Instead, + * we got their counts included in the live thread loop. + * However, another thread can come in right now and + * do a wait call that updates current->signal->c[us]time. + * To make sure we always see that pair updated atomically, + * we take the siglock around fetching them. + */ + spin_lock_irq(&tsk->sighand->siglock); + cutime = tsk->signal->cutime; + cstime = tsk->signal->cstime; + spin_unlock_irq(&tsk->sighand->siglock); + read_unlock(&tasklist_lock); + + tmp.tms_utime = compat_jiffies_to_clock_t(utime); + tmp.tms_stime = compat_jiffies_to_clock_t(stime); + tmp.tms_cutime = compat_jiffies_to_clock_t(cutime); + tmp.tms_cstime = compat_jiffies_to_clock_t(cstime); if (copy_to_user(tbuf, &tmp, sizeof(tmp))) return -EFAULT; } @@ -310,7 +339,7 @@ return ret; } -static long put_compat_rusage(struct compat_rusage __user *ru, struct rusage *r) +int put_compat_rusage(const struct rusage *r, struct compat_rusage __user *ru) { if (!access_ok(VERIFY_WRITE, ru, sizeof(*ru)) || __put_user(r->ru_utime.tv_sec, &ru->ru_utime.tv_sec) || @@ -348,7 +377,7 @@ if (ret) return ret; - if (put_compat_rusage(ru, &r)) + if (put_compat_rusage(&r, ru)) return -EFAULT; return 0; @@ -374,7 +403,7 @@ set_fs (old_fs); if (ret > 0) { - if (put_compat_rusage(ru, &r)) + if (put_compat_rusage(&r, ru)) return -EFAULT; if (stat_addr && put_user(status, stat_addr)) return -EFAULT; diff -Nru a/kernel/exit.c b/kernel/exit.c --- a/kernel/exit.c 2004-09-06 16:37:54 -07:00 +++ b/kernel/exit.c 2004-09-06 16:37:54 -07:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -56,8 +57,6 @@ struct dentry *proc_dentry; repeat: - BUG_ON(p->state < TASK_ZOMBIE); - atomic_dec(&p->user->processes); spin_lock(&p->proc_lock); proc_dentry = proc_pid_unhash(p); @@ -90,12 +89,6 @@ zap_leader = (leader->exit_signal == -1); } - p->parent->cutime += p->utime + p->cutime; - p->parent->cstime += p->stime + p->cstime; - p->parent->cmin_flt += p->min_flt + p->cmin_flt; - p->parent->cmaj_flt += p->maj_flt + p->cmaj_flt; - p->parent->cnvcsw += p->nvcsw + p->cnvcsw; - p->parent->cnivcsw += p->nivcsw + p->cnivcsw; sched_exit(p); write_unlock_irq(&tasklist_lock); spin_unlock(&p->proc_lock); @@ -131,16 +124,15 @@ int session_of_pgrp(int pgrp) { struct task_struct *p; - struct list_head *l; - struct pid *pid; int sid = -1; read_lock(&tasklist_lock); - for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) + do_each_task_pid(pgrp, PIDTYPE_PGID, p) { if (p->signal->session > 0) { sid = p->signal->session; goto out; } + } while_each_task_pid(pgrp, PIDTYPE_PGID, p); p = find_task_by_pid(pgrp); if (p) sid = p->signal->session; @@ -161,11 +153,9 @@ static int will_become_orphaned_pgrp(int pgrp, task_t *ignored_task) { struct task_struct *p; - struct list_head *l; - struct pid *pid; int ret = 1; - for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) { + do_each_task_pid(pgrp, PIDTYPE_PGID, p) { if (p == ignored_task || p->state >= TASK_ZOMBIE || p->real_parent->pid == 1) @@ -175,7 +165,7 @@ ret = 0; break; } - } + } while_each_task_pid(pgrp, PIDTYPE_PGID, p); return ret; /* (sighing) "Often!" */ } @@ -194,10 +184,8 @@ { int retval = 0; struct task_struct *p; - struct list_head *l; - struct pid *pid; - for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) { + do_each_task_pid(pgrp, PIDTYPE_PGID, p) { if (p->state != TASK_STOPPED) continue; @@ -213,7 +201,7 @@ retval = 1; break; - } + } while_each_task_pid(pgrp, PIDTYPE_PGID, p); return retval; } @@ -529,10 +517,8 @@ * Make sure we're not reparenting to ourselves and that * the parent is not a zombie. */ - if (p == reaper || reaper->state >= TASK_ZOMBIE) - p->real_parent = child_reaper; - else - p->real_parent = reaper; + BUG_ON(p == reaper || reaper->state >= TASK_ZOMBIE); + p->real_parent = reaper; if (p->parent == p->real_parent) BUG(); } @@ -600,9 +586,13 @@ struct task_struct *p, *reaper = father; struct list_head *_p, *_n; - reaper = father->group_leader; - if (reaper == father) - reaper = child_reaper; + do { + reaper = next_thread(reaper); + if (reaper == father) { + reaper = child_reaper; + break; + } + } while (reaper->state >= TASK_ZOMBIE); /* * There are only two places where our children can be: @@ -756,7 +746,6 @@ if (tsk->exit_signal == -1 && tsk->ptrace == 0) state = TASK_DEAD; tsk->state = state; - tsk->flags |= PF_DEAD; /* * Clear these here so that update_process_times() won't try to deliver @@ -766,20 +755,7 @@ tsk->it_prof_value = 0; tsk->rlim[RLIMIT_CPU].rlim_cur = RLIM_INFINITY; - /* - * In the preemption case it must be impossible for the task - * to get runnable again, so use "_raw_" unlock to keep - * preempt_count elevated until we schedule(). - * - * To avoid deadlock on SMP, interrupts must be unmasked. If we - * don't, subsequently called functions (e.g, wait_task_inactive() - * via release_task()) will spin, with interrupt flags - * unwittingly blocked, until the other task sleeps. That task - * may itself be waiting for smp_call_function() to answer and - * complete, and with interrupts blocked that will never happen. - */ - _raw_write_unlock(&tasklist_lock); - local_irq_enable(); + write_unlock_irq(&tasklist_lock); list_for_each_safe(_p, _n, &ptrace_dead) { list_del_init(_p); @@ -791,12 +767,17 @@ if (state == TASK_DEAD) release_task(tsk); + /* PF_DEAD causes final put_task_struct after we schedule. */ + preempt_disable(); + tsk->flags |= PF_DEAD; } asmlinkage NORET_TYPE void do_exit(long code) { struct task_struct *tsk = current; + profile_task_exit(tsk); + if (unlikely(in_interrupt())) panic("Aiee, killing interrupt handler!"); if (unlikely(!tsk->pid)) @@ -813,8 +794,6 @@ current->comm, current->pid, preempt_count()); - profile_exit_task(tsk); - if (unlikely(current->ptrace & PT_TRACE_EXIT)) { current->ptrace_message = code; ptrace_notify((PTRACE_EVENT_EXIT << 8) | SIGTRAP); @@ -865,9 +844,6 @@ task_t fastcall *next_thread(const task_t *p) { - const struct pid_link *link = p->pids + PIDTYPE_TGID; - const struct list_head *tmp, *head = &link->pidptr->task_list; - #ifdef CONFIG_SMP if (!p->sighand) BUG(); @@ -875,11 +851,7 @@ !rwlock_is_locked(&tasklist_lock)) BUG(); #endif - tmp = link->pid_chain.next; - if (tmp == head) - tmp = head->next; - - return pid_task(tmp, PIDTYPE_TGID); + return pid_task(p->pids[PIDTYPE_TGID].pid_list.next, PIDTYPE_TGID); } EXPORT_SYMBOL(next_thread); @@ -967,16 +939,64 @@ return 1; } +static int wait_noreap_copyout(task_t *p, pid_t pid, uid_t uid, + int why, int status, + struct siginfo __user *infop) +{ + int retval = getrusage(p, RUSAGE_BOTH, &infop->si_rusage); + put_task_struct(p); + if (!retval) + retval = put_user(SIGCHLD, &infop->si_signo); + if (!retval) + retval = put_user(0, &infop->si_errno); + if (!retval) + retval = put_user((short)why, &infop->si_code); + if (!retval) + retval = put_user(pid, &infop->si_pid); + if (!retval) + retval = put_user(uid, &infop->si_uid); + if (!retval) + retval = put_user(status, &infop->si_status); + if (!retval) + retval = pid; + return retval; +} + /* * Handle sys_wait4 work for one task in state TASK_ZOMBIE. We hold * read_lock(&tasklist_lock) on entry. If we return zero, we still hold * the lock and this task is uninteresting. If we return nonzero, we have * released the lock and the system call should return. */ -static int wait_task_zombie(task_t *p, unsigned int __user *stat_addr, struct rusage __user *ru) +static int wait_task_zombie(task_t *p, int noreap, + struct siginfo __user *infop, + int __user *stat_addr, struct rusage __user *ru) { unsigned long state; int retval; + int status; + + if (unlikely(noreap)) { + pid_t pid = p->pid; + uid_t uid = p->uid; + int exit_code = p->exit_code; + int why, status; + + if (unlikely(p->state != TASK_ZOMBIE)) + return 0; + if (unlikely(p->exit_signal == -1 && p->ptrace == 0)) + return 0; + get_task_struct(p); + read_unlock(&tasklist_lock); + if ((exit_code & 0x7f) == 0) { + why = CLD_EXITED; + status = exit_code >> 8; + } else { + why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED; + status = exit_code & 0x7f; + } + return wait_noreap_copyout(p, pid, uid, why, status, infop); + } /* * Try to move the task's state to DEAD @@ -987,12 +1007,45 @@ BUG_ON(state != TASK_DEAD); return 0; } - if (unlikely(p->exit_signal == -1 && p->ptrace == 0)) + if (unlikely(p->exit_signal == -1 && p->ptrace == 0)) { /* * This can only happen in a race with a ptraced thread * dying on another processor. */ return 0; + } + + if (likely(p->real_parent == p->parent) && likely(p->signal)) { + /* + * The resource counters for the group leader are in its + * own task_struct. Those for dead threads in the group + * are in its signal_struct, as are those for the child + * processes it has previously reaped. All these + * accumulate in the parent's signal_struct c* fields. + * + * We don't bother to take a lock here to protect these + * p->signal fields, because they are only touched by + * __exit_signal, which runs with tasklist_lock + * write-locked anyway, and so is excluded here. We do + * need to protect the access to p->parent->signal fields, + * as other threads in the parent group can be right + * here reaping other children at the same time. + */ + spin_lock_irq(&p->parent->sighand->siglock); + p->parent->signal->cutime += + p->utime + p->signal->utime + p->signal->cutime; + p->parent->signal->cstime += + p->stime + p->signal->stime + p->signal->cstime; + p->parent->signal->cmin_flt += + p->min_flt + p->signal->min_flt + p->signal->cmin_flt; + p->parent->signal->cmaj_flt += + p->maj_flt + p->signal->maj_flt + p->signal->cmaj_flt; + p->parent->signal->cnvcsw += + p->nvcsw + p->signal->nvcsw + p->signal->cnvcsw; + p->parent->signal->cnivcsw += + p->nivcsw + p->signal->nivcsw + p->signal->cnivcsw; + spin_unlock_irq(&p->parent->sighand->siglock); + } /* * Now we are sure this task is interesting, and no other @@ -1001,12 +1054,32 @@ read_unlock(&tasklist_lock); retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; - if (!retval && stat_addr) { - if (p->signal->group_exit) - retval = put_user(p->signal->group_exit_code, stat_addr); - else - retval = put_user(p->exit_code, stat_addr); - } + status = p->signal->group_exit + ? p->signal->group_exit_code : p->exit_code; + if (!retval && stat_addr) + retval = put_user(status, stat_addr); + if (!retval && infop) + retval = put_user(SIGCHLD, &infop->si_signo); + if (!retval && infop) + retval = put_user(0, &infop->si_errno); + if (!retval && infop) { + int why; + + if ((status & 0x7f) == 0) { + why = CLD_EXITED; + status >>= 8; + } else { + why = (status & 0x80) ? CLD_DUMPED : CLD_KILLED; + status &= 0x7f; + } + retval = put_user((short)why, &infop->si_code); + if (!retval) + retval = put_user(status, &infop->si_status); + } + if (!retval && infop) + retval = put_user(p->pid, &infop->si_pid); + if (!retval && infop) + retval = put_user(p->uid, &infop->si_uid); if (retval) { p->state = TASK_ZOMBIE; return retval; @@ -1019,8 +1092,9 @@ __ptrace_unlink(p); p->state = TASK_ZOMBIE; /* - * If this is not a detached task, notify the parent. If it's - * still not detached after that, don't release it now. + * If this is not a detached task, notify the parent. + * If it's still not detached after that, don't release + * it now. */ if (p->exit_signal != -1) { do_notify_parent(p, p->exit_signal); @@ -1042,9 +1116,9 @@ * the lock and this task is uninteresting. If we return nonzero, we have * released the lock and the system call should return. */ -static int wait_task_stopped(task_t *p, int delayed_group_leader, - unsigned int __user *stat_addr, - struct rusage __user *ru) +static int wait_task_stopped(task_t *p, int delayed_group_leader, int noreap, + struct siginfo __user *infop, + int __user *stat_addr, struct rusage __user *ru) { int retval, exit_code; @@ -1067,6 +1141,21 @@ */ get_task_struct(p); read_unlock(&tasklist_lock); + + if (unlikely(noreap)) { + pid_t pid = p->pid; + uid_t uid = p->uid; + int why = (p->ptrace & PT_PTRACED) ? CLD_TRAPPED : CLD_STOPPED; + + exit_code = p->exit_code; + if (unlikely(!exit_code) || + unlikely(p->state > TASK_STOPPED)) + goto bail_ref; + return wait_noreap_copyout(p, pid, uid, + why, (exit_code << 8) | 0x7f, + infop); + } + write_lock_irq(&tasklist_lock); /* @@ -1092,6 +1181,7 @@ * resumed, or it resumed and then died. */ write_unlock_irq(&tasklist_lock); +bail_ref: put_task_struct(p); read_lock(&tasklist_lock); return 0; @@ -1106,6 +1196,20 @@ retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; if (!retval && stat_addr) retval = put_user((exit_code << 8) | 0x7f, stat_addr); + if (!retval && infop) + retval = put_user(SIGCHLD, &infop->si_signo); + if (!retval && infop) + retval = put_user(0, &infop->si_errno); + if (!retval && infop) + retval = put_user((short)((p->ptrace & PT_PTRACED) + ? CLD_TRAPPED : CLD_STOPPED), + &infop->si_code); + if (!retval && infop) + retval = put_user(exit_code, &infop->si_status); + if (!retval && infop) + retval = put_user(p->pid, &infop->si_pid); + if (!retval && infop) + retval = put_user(p->uid, &infop->si_uid); if (!retval) retval = p->pid; put_task_struct(p); @@ -1114,15 +1218,13 @@ return retval; } -asmlinkage long sys_wait4(pid_t pid,unsigned int __user *stat_addr, int options, struct rusage __user *ru) +static long do_wait(pid_t pid, int options, struct siginfo __user *infop, + int __user *stat_addr, struct rusage __user *ru) { DECLARE_WAITQUEUE(wait, current); struct task_struct *tsk; int flag, retval; - if (options & ~(WNOHANG|WUNTRACED|__WNOTHREAD|__WCLONE|__WALL)) - return -EINVAL; - add_wait_queue(¤t->wait_chldexit,&wait); repeat: flag = 0; @@ -1148,25 +1250,60 @@ !(p->ptrace & PT_PTRACED)) continue; retval = wait_task_stopped(p, ret == 2, + (options & WNOWAIT), + infop, stat_addr, ru); if (retval != 0) /* He released the lock. */ - goto end_wait4; + goto end; break; case TASK_ZOMBIE: /* * Eligible but we cannot release it yet: */ if (ret == 2) + goto check_continued; + if (!likely(options & WEXITED)) continue; - retval = wait_task_zombie(p, stat_addr, ru); + retval = wait_task_zombie( + p, (options & WNOWAIT), + infop, stat_addr, ru); if (retval != 0) /* He released the lock. */ - goto end_wait4; + goto end; + break; + case TASK_DEAD: + continue; + default: +check_continued: + if (!unlikely(options & WCONTINUED)) + continue; + if (unlikely(!p->signal)) + continue; + spin_lock_irq(&p->sighand->siglock); + if (p->signal->stop_state < 0) { + pid_t pid; + uid_t uid; + + if (!(options & WNOWAIT)) + p->signal->stop_state = 0; + spin_unlock_irq(&p->sighand->siglock); + pid = p->pid; + uid = p->uid; + get_task_struct(p); + read_unlock(&tasklist_lock); + retval = wait_noreap_copyout(p, pid, + uid, CLD_CONTINUED, + SIGCONT, infop); + BUG_ON(retval == 0); + goto end; + } + spin_unlock_irq(&p->sighand->siglock); break; } } if (!flag) { - list_for_each (_p,&tsk->ptrace_children) { - p = list_entry(_p,struct task_struct,ptrace_list); + list_for_each(_p, &tsk->ptrace_children) { + p = list_entry(_p, struct task_struct, + ptrace_list); if (!eligible_child(pid, options, p)) continue; flag = 1; @@ -1179,22 +1316,82 @@ if (tsk->signal != current->signal) BUG(); } while (tsk != current); + read_unlock(&tasklist_lock); if (flag) { retval = 0; if (options & WNOHANG) - goto end_wait4; + goto end; retval = -ERESTARTSYS; if (signal_pending(current)) - goto end_wait4; + goto end; schedule(); goto repeat; } retval = -ECHILD; -end_wait4: +end: current->state = TASK_RUNNING; remove_wait_queue(¤t->wait_chldexit,&wait); + if (infop) { + if (retval > 0) + retval = 0; + else { + /* + * For a WNOHANG return, clear out all the fields + * we would set so the user can easily tell the + * difference. + */ + if (!retval) + retval = put_user(0, &infop->si_signo); + if (!retval) + retval = put_user(0, &infop->si_errno); + if (!retval) + retval = put_user(0, &infop->si_code); + if (!retval) + retval = put_user(0, &infop->si_pid); + if (!retval) + retval = put_user(0, &infop->si_uid); + if (!retval) + retval = put_user(0, &infop->si_status); + } + } return retval; +} + +asmlinkage long sys_waitid(int which, pid_t pid, + struct siginfo __user *infop, int options) +{ + if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED)) + return -EINVAL; + if (!(options & (WEXITED|WSTOPPED|WCONTINUED))) + return -EINVAL; + + switch (which) { + case P_ALL: + pid = -1; + break; + case P_PID: + if (pid <= 0) + return -EINVAL; + break; + case P_PGID: + if (pid <= 0) + return -EINVAL; + pid = -pid; + break; + default: + return -EINVAL; + } + + return do_wait(pid, options, infop, NULL, &infop->si_rusage); +} + +asmlinkage long sys_wait4(pid_t pid, unsigned int __user *stat_addr, + int options, struct rusage __user *ru) +{ + if (options & ~(WNOHANG|WUNTRACED|__WNOTHREAD|__WCLONE|__WALL)) + return -EINVAL; + return do_wait(pid, options | WEXITED, NULL, stat_addr, ru); } #ifdef __ARCH_WANT_SYS_WAITPID diff -Nru a/kernel/fork.c b/kernel/fork.c --- a/kernel/fork.c 2004-09-06 16:37:50 -07:00 +++ b/kernel/fork.c 2004-09-06 16:37:50 -07:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -76,11 +77,12 @@ static kmem_cache_t *task_struct_cachep; #endif -static void free_task(struct task_struct *tsk) +void free_task(struct task_struct *tsk) { free_thread_info(tsk->thread_info); free_task_struct(tsk); } +EXPORT_SYMBOL(free_task); void __put_task_struct(struct task_struct *tsk) { @@ -93,7 +95,9 @@ security_task_free(tsk); free_uid(tsk->user); put_group_info(tsk->group_info); - free_task(tsk); + + if (!profile_handoff_task(tsk)) + free_task(tsk); } void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait) @@ -152,7 +156,12 @@ spin_lock_irqsave(&q->lock, flags); if (list_empty(&wait->task_list)) __add_wait_queue(q, wait); - set_current_state(state); + /* + * don't alter the task state if this is just going to + * queue an async wait queue callback + */ + if (is_sync_wait(wait)) + set_current_state(state); spin_unlock_irqrestore(&q->lock, flags); } @@ -167,7 +176,12 @@ spin_lock_irqsave(&q->lock, flags); if (list_empty(&wait->task_list)) __add_wait_queue_tail(q, wait); - set_current_state(state); + /* + * don't alter the task state if this is just going to + * queue an async wait queue callback + */ + if (is_sync_wait(wait)) + set_current_state(state); spin_unlock_irqrestore(&q->lock, flags); } @@ -280,7 +294,7 @@ mm->locked_vm = 0; mm->mmap = NULL; mm->mmap_cache = NULL; - mm->free_area_cache = TASK_UNMAPPED_BASE; + mm->free_area_cache = oldmm->mmap_base; mm->map_count = 0; mm->rss = 0; cpus_clear(mm->cpu_vm_mask); @@ -303,8 +317,11 @@ for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { struct file *file; - if(mpnt->vm_flags & VM_DONTCOPY) + if (mpnt->vm_flags & VM_DONTCOPY) { + __vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file, + -vma_pages(mpnt)); continue; + } charge = 0; if (mpnt->vm_flags & VM_ACCOUNT) { unsigned int len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT; @@ -467,20 +484,34 @@ } } -/* - * Checks if the use count of an mm is non-zero and if so - * returns a reference to it after bumping up the use count. - * If the use count is zero, it means this mm is going away, - * so return NULL. +/** + * get_task_mm - acquire a reference to the task's mm + * + * Returns %NULL if the task has no mm. Checks if the use count + * of the mm is non-zero and if so returns a reference to it, after + * bumping up the use count. User must release the mm via mmput() + * after use. Typically used by /proc and ptrace. + * + * If the use count is zero, it means that this mm is going away, + * so return %NULL. This only happens in the case of an AIO daemon + * which has temporarily adopted an mm (see use_mm), in the course + * of its final mmput, before exit_aio has completed. */ -struct mm_struct *mmgrab(struct mm_struct *mm) +struct mm_struct *get_task_mm(struct task_struct *task) { - spin_lock(&mmlist_lock); - if (!atomic_read(&mm->mm_users)) - mm = NULL; - else - atomic_inc(&mm->mm_users); - spin_unlock(&mmlist_lock); + struct mm_struct *mm; + + task_lock(task); + mm = task->mm; + if (mm) { + spin_lock(&mmlist_lock); + if (!atomic_read(&mm->mm_users)) + mm = NULL; + else + atomic_inc(&mm->mm_users); + spin_unlock(&mmlist_lock); + } + task_unlock(task); return mm; } @@ -528,8 +559,7 @@ int retval; tsk->min_flt = tsk->maj_flt = 0; - tsk->cmin_flt = tsk->cmaj_flt = 0; - tsk->nvcsw = tsk->nivcsw = tsk->cnvcsw = tsk->cnivcsw = 0; + tsk->nvcsw = tsk->nivcsw = 0; tsk->mm = NULL; tsk->active_mm = NULL; @@ -836,6 +866,10 @@ sig->leader = 0; /* session leadership doesn't inherit */ sig->tty_old_pgrp = 0; + sig->utime = sig->stime = sig->cutime = sig->cstime = 0; + sig->nvcsw = sig->nivcsw = sig->cnvcsw = sig->cnivcsw = 0; + sig->min_flt = sig->maj_flt = sig->cmin_flt = sig->cmaj_flt = 0; + return 0; } @@ -865,12 +899,13 @@ * parts of the process environment (as per the clone * flags). The actual kick-off is left to the caller. */ -struct task_struct *copy_process(unsigned long clone_flags, +static task_t *copy_process(unsigned long clone_flags, unsigned long stack_start, struct pt_regs *regs, unsigned long stack_size, int __user *parent_tidptr, - int __user *child_tidptr) + int __user *child_tidptr, + int pid) { int retval; struct task_struct *p = NULL; @@ -930,13 +965,7 @@ p->did_exec = 0; copy_flags(clone_flags, p); - if (clone_flags & CLONE_IDLETASK) - p->pid = 0; - else { - p->pid = alloc_pidmap(); - if (p->pid == -1) - goto bad_fork_cleanup; - } + p->pid = pid; retval = -EFAULT; if (clone_flags & CLONE_PARENT_SETTID) if (put_user(p->pid, parent_tidptr)) @@ -960,11 +989,11 @@ p->real_timer.data = (unsigned long) p; p->utime = p->stime = 0; - p->cutime = p->cstime = 0; p->lock_depth = -1; /* -1 = no lock */ p->start_time = get_jiffies_64(); p->security = NULL; p->io_context = NULL; + p->io_wait = NULL; p->audit_context = NULL; #ifdef CONFIG_NUMA p->mempolicy = mpol_copy(p->mempolicy); @@ -1033,6 +1062,17 @@ /* Need tasklist lock for parent etc handling! */ write_lock_irq(&tasklist_lock); + + /* + * The task hasn't been attached yet, so cpus_allowed mask cannot + * have changed. The cpus_allowed mask of the parent may have + * changed after it was copied first time, and it may then move to + * another CPU - so we re-copy it here and set the child's CPU to + * the parent's CPU. This avoids alot of nasty races. + */ + p->cpus_allowed = current->cpus_allowed; + set_task_cpu(p, smp_processor_id()); + /* * Check for pending SIGKILL! The new thread should not be allowed * to slip out of an OOM kill. (or normal SIGKILL.) @@ -1044,7 +1084,7 @@ } /* CLONE_PARENT re-uses the old parent */ - if (clone_flags & CLONE_PARENT) + if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) p->real_parent = current->real_parent; else p->real_parent = current; @@ -1080,18 +1120,17 @@ } SET_LINKS(p); - if (p->ptrace & PT_PTRACED) + if (unlikely(p->ptrace & PT_PTRACED)) __ptrace_link(p, current->parent); attach_pid(p, PIDTYPE_PID, p->pid); + attach_pid(p, PIDTYPE_TGID, p->tgid); if (thread_group_leader(p)) { - attach_pid(p, PIDTYPE_TGID, p->tgid); attach_pid(p, PIDTYPE_PGID, process_group(p)); attach_pid(p, PIDTYPE_SID, p->signal->session); if (p->pid) __get_cpu_var(process_counts)++; - } else - link_pid(p, p->pids + PIDTYPE_TGID, &p->group_leader->pids[PIDTYPE_TGID].pid); + } nr_threads++; write_unlock_irq(&tasklist_lock); @@ -1127,8 +1166,6 @@ mpol_free(p->mempolicy); #endif bad_fork_cleanup: - if (p->pid > 0) - free_pidmap(p->pid); if (p->binfmt) module_put(p->binfmt->module); bad_fork_cleanup_put_domain: @@ -1142,9 +1179,28 @@ goto fork_out; } +struct pt_regs * __init __attribute__((weak)) idle_regs(struct pt_regs *regs) +{ + memset(regs, 0, sizeof(struct pt_regs)); + return regs; +} + +task_t * __init fork_idle(int cpu) +{ + task_t *task; + struct pt_regs regs; + + task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); + if (!task) + return ERR_PTR(-ENOMEM); + init_idle(task, cpu); + unhash_process(task); + return task; +} + static inline int fork_traceflag (unsigned clone_flags) { - if (clone_flags & (CLONE_UNTRACED | CLONE_IDLETASK)) + if (clone_flags & CLONE_UNTRACED) return 0; else if (clone_flags & CLONE_VFORK) { if (current->ptrace & PT_TRACE_VFORK) @@ -1173,21 +1229,21 @@ { struct task_struct *p; int trace = 0; - long pid; + long pid = alloc_pidmap(); + if (pid < 0) + return -EAGAIN; if (unlikely(current->ptrace)) { trace = fork_traceflag (clone_flags); if (trace) clone_flags |= CLONE_PTRACE; } - p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr); + p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, pid); /* * Do this prior waking up the new thread - the thread pointer * might get invalid after that point, if the thread exits quickly. */ - pid = IS_ERR(p) ? PTR_ERR(p) : p->pid; - if (!IS_ERR(p)) { struct completion vfork; @@ -1204,31 +1260,10 @@ set_tsk_thread_flag(p, TIF_SIGPENDING); } - if (!(clone_flags & CLONE_STOPPED)) { - /* - * Do the wakeup last. On SMP we treat fork() and - * CLONE_VM separately, because fork() has already - * created cache footprint on this CPU (due to - * copying the pagetables), hence migration would - * probably be costy. Threads on the other hand - * have less traction to the current CPU, and if - * there's an imbalance then the scheduler can - * migrate this fresh thread now, before it - * accumulates a larger cache footprint: - */ - if (clone_flags & CLONE_VM) - wake_up_forked_thread(p); - else - wake_up_forked_process(p); - } else { - int cpu = get_cpu(); - + if (!(clone_flags & CLONE_STOPPED)) + wake_up_new_task(p, clone_flags); + else p->state = TASK_STOPPED; - if (cpu_is_offline(task_cpu(p))) - set_task_cpu(p, cpu); - - put_cpu(); - } ++total_forks; if (unlikely (trace)) { @@ -1240,12 +1275,10 @@ wait_for_completion(&vfork); if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP); - } else - /* - * Let the child process run first, to avoid most of the - * COW overhead when the child exec()s afterwards. - */ - set_need_resched(); + } + } else { + free_pidmap(pid); + pid = PTR_ERR(p); } return pid; } diff -Nru a/kernel/kprobes.c b/kernel/kprobes.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/kernel/kprobes.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,146 @@ +/* + * Kernel Probes (KProbes) + * kernel/kprobes.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (C) IBM Corporation, 2002, 2004 + * + * 2002-Oct Created by Vamsi Krishna S Kernel + * Probes initial implementation (includes suggestions from + * Rusty Russell). + * 2004-Aug Updated by Prasanna S Panchamukhi with + * hlists and exceptions notifier as suggested by Andi Kleen. + * 2004-July Suparna Bhattacharya added jumper probes + * interface to access function arguments. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define KPROBE_HASH_BITS 6 +#define KPROBE_TABLE_SIZE (1 << KPROBE_HASH_BITS) + +static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE]; + +unsigned int kprobe_cpu = NR_CPUS; +static spinlock_t kprobe_lock = SPIN_LOCK_UNLOCKED; + +/* Locks kprobe: irqs must be disabled */ +void lock_kprobes(void) +{ + spin_lock(&kprobe_lock); + kprobe_cpu = smp_processor_id(); +} + +void unlock_kprobes(void) +{ + kprobe_cpu = NR_CPUS; + spin_unlock(&kprobe_lock); +} + +/* You have to be holding the kprobe_lock */ +struct kprobe *get_kprobe(void *addr) +{ + struct hlist_head *head; + struct hlist_node *node; + + head = &kprobe_table[hash_ptr(addr, KPROBE_HASH_BITS)]; + hlist_for_each(node, head) { + struct kprobe *p = hlist_entry(node, struct kprobe, hlist); + if (p->addr == addr) + return p; + } + return NULL; +} + +int register_kprobe(struct kprobe *p) +{ + int ret = 0; + unsigned long flags; + + spin_lock_irqsave(&kprobe_lock, flags); + INIT_HLIST_NODE(&p->hlist); + if (get_kprobe(p->addr)) { + ret = -EEXIST; + goto out; + } + hlist_add_head(&p->hlist, + &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]); + + arch_prepare_kprobe(p); + p->opcode = *p->addr; + *p->addr = BREAKPOINT_INSTRUCTION; + flush_icache_range((unsigned long) p->addr, + (unsigned long) p->addr + sizeof(kprobe_opcode_t)); + out: + spin_unlock_irqrestore(&kprobe_lock, flags); + return ret; +} + +void unregister_kprobe(struct kprobe *p) +{ + unsigned long flags; + spin_lock_irqsave(&kprobe_lock, flags); + *p->addr = p->opcode; + hlist_del(&p->hlist); + flush_icache_range((unsigned long) p->addr, + (unsigned long) p->addr + sizeof(kprobe_opcode_t)); + spin_unlock_irqrestore(&kprobe_lock, flags); +} + +static struct notifier_block kprobe_exceptions_nb = { + .notifier_call = kprobe_exceptions_notify, +}; + +int register_jprobe(struct jprobe *jp) +{ + /* Todo: Verify probepoint is a function entry point */ + jp->kp.pre_handler = setjmp_pre_handler; + jp->kp.break_handler = longjmp_break_handler; + + return register_kprobe(&jp->kp); +} + +void unregister_jprobe(struct jprobe *jp) +{ + unregister_kprobe(&jp->kp); +} + +static int __init init_kprobes(void) +{ + int i, err = 0; + + /* FIXME allocate the probe table, currently defined statically */ + /* initialize all list heads */ + for (i = 0; i < KPROBE_TABLE_SIZE; i++) + INIT_HLIST_HEAD(&kprobe_table[i]); + + err = register_die_notifier(&kprobe_exceptions_nb); + return err; +} + +__initcall(init_kprobes); + +EXPORT_SYMBOL_GPL(register_kprobe); +EXPORT_SYMBOL_GPL(unregister_kprobe); +EXPORT_SYMBOL_GPL(register_jprobe); +EXPORT_SYMBOL_GPL(unregister_jprobe); +EXPORT_SYMBOL_GPL(jprobe_return); diff -Nru a/kernel/module.c b/kernel/module.c --- a/kernel/module.c 2004-09-06 16:37:54 -07:00 +++ b/kernel/module.c 2004-09-06 16:37:54 -07:00 @@ -1538,9 +1538,6 @@ secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; sechdrs[0].sh_addr = 0; - /* And these should exist, but gcc whinges if we don't init them */ - symindex = strindex = 0; - for (i = 1; i < hdr->e_shnum; i++) { if (sechdrs[i].sh_type != SHT_NOBITS && len < sechdrs[i].sh_offset + sechdrs[i].sh_size) @@ -1571,6 +1568,13 @@ goto free_hdr; } mod = (void *)sechdrs[modindex].sh_addr; + + if (symindex == 0) { + printk(KERN_WARNING "%s: module has no symbols (stripped?)\n", + mod->name); + err = -ENOEXEC; + goto free_hdr; + } /* Optional sections */ exportindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab"); diff -Nru a/kernel/pid.c b/kernel/pid.c --- a/kernel/pid.c 2004-09-06 16:37:53 -07:00 +++ b/kernel/pid.c 2004-09-06 16:37:53 -07:00 @@ -27,7 +27,7 @@ #include #define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift) -static struct list_head *pid_hash[PIDTYPE_MAX]; +static struct hlist_head *pid_hash[PIDTYPE_MAX]; static int pidhash_shift; int pid_max = PID_MAX_DEFAULT; @@ -146,73 +146,66 @@ return -1; } -fastcall struct pid *find_pid(enum pid_type type, int nr) +struct pid * fastcall find_pid(enum pid_type type, int nr) { - struct list_head *elem, *bucket = &pid_hash[type][pid_hashfn(nr)]; + struct hlist_node *elem; struct pid *pid; - __list_for_each(elem, bucket) { - pid = list_entry(elem, struct pid, hash_chain); + hlist_for_each_entry(pid, elem, + &pid_hash[type][pid_hashfn(nr)], pid_chain) { if (pid->nr == nr) return pid; } return NULL; } -void fastcall link_pid(task_t *task, struct pid_link *link, struct pid *pid) -{ - atomic_inc(&pid->count); - list_add_tail(&link->pid_chain, &pid->task_list); - link->pidptr = pid; -} - int fastcall attach_pid(task_t *task, enum pid_type type, int nr) { - struct pid *pid = find_pid(type, nr); + struct pid *pid, *task_pid; - if (pid) - atomic_inc(&pid->count); - else { - pid = &task->pids[type].pid; - pid->nr = nr; - atomic_set(&pid->count, 1); - INIT_LIST_HEAD(&pid->task_list); - pid->task = task; - get_task_struct(task); - list_add(&pid->hash_chain, &pid_hash[type][pid_hashfn(nr)]); + task_pid = &task->pids[type]; + pid = find_pid(type, nr); + if (pid == NULL) { + hlist_add_head(&task_pid->pid_chain, + &pid_hash[type][pid_hashfn(nr)]); + INIT_LIST_HEAD(&task_pid->pid_list); + } else { + INIT_HLIST_NODE(&task_pid->pid_chain); + list_add_tail(&task_pid->pid_list, &pid->pid_list); } - list_add_tail(&task->pids[type].pid_chain, &pid->task_list); - task->pids[type].pidptr = pid; + task_pid->nr = nr; return 0; } static inline int __detach_pid(task_t *task, enum pid_type type) { - struct pid_link *link = task->pids + type; - struct pid *pid = link->pidptr; + struct pid *pid, *pid_next; int nr; - list_del(&link->pid_chain); - if (!atomic_dec_and_test(&pid->count)) - return 0; - + pid = &task->pids[type]; + if (!hlist_unhashed(&pid->pid_chain)) { + hlist_del(&pid->pid_chain); + if (!list_empty(&pid->pid_list)) { + pid_next = list_entry(pid->pid_list.next, + struct pid, pid_list); + /* insert next pid from pid_list to hash */ + hlist_add_head(&pid_next->pid_chain, + &pid_hash[type][pid_hashfn(pid_next->nr)]); + } + } + list_del(&pid->pid_list); nr = pid->nr; - list_del(&pid->hash_chain); - put_task_struct(pid->task); + pid->nr = 0; return nr; } -static void _detach_pid(task_t *task, enum pid_type type) -{ - __detach_pid(task, type); -} - void fastcall detach_pid(task_t *task, enum pid_type type) { - int nr = __detach_pid(task, type); + int nr; + nr = __detach_pid(task, type); if (!nr) return; @@ -222,16 +215,18 @@ free_pidmap(nr); } -task_t *find_task_by_pid(int nr) +task_t *find_task_by_pid_type(int type, int nr) { - struct pid *pid = find_pid(PIDTYPE_PID, nr); + struct pid *pid; + pid = find_pid(type, nr); if (!pid) return NULL; - return pid_task(pid->task_list.next, PIDTYPE_PID); + + return pid_task(&pid->pid_list, type); } -EXPORT_SYMBOL(find_task_by_pid); +EXPORT_SYMBOL(find_task_by_pid_type); /* * This function switches the PIDs if a non-leader thread calls @@ -240,13 +235,13 @@ */ void switch_exec_pids(task_t *leader, task_t *thread) { - _detach_pid(leader, PIDTYPE_PID); - _detach_pid(leader, PIDTYPE_TGID); - _detach_pid(leader, PIDTYPE_PGID); - _detach_pid(leader, PIDTYPE_SID); + __detach_pid(leader, PIDTYPE_PID); + __detach_pid(leader, PIDTYPE_TGID); + __detach_pid(leader, PIDTYPE_PGID); + __detach_pid(leader, PIDTYPE_SID); - _detach_pid(thread, PIDTYPE_PID); - _detach_pid(thread, PIDTYPE_TGID); + __detach_pid(thread, PIDTYPE_PID); + __detach_pid(thread, PIDTYPE_TGID); leader->pid = leader->tgid = thread->pid; thread->pid = thread->tgid; @@ -271,15 +266,15 @@ void __init pidhash_init(void) { int i, j, pidhash_size; - unsigned long megabytes = max_pfn >> (20 - PAGE_SHIFT); + unsigned long megabytes = nr_kernel_pages >> (20 - PAGE_SHIFT); pidhash_shift = max(4, fls(megabytes * 4)); pidhash_shift = min(12, pidhash_shift); pidhash_size = 1 << pidhash_shift; - printk("PID hash table entries: %d (order %d: %Zd bytes)\n", + printk("PID hash table entries: %d (order: %d, %Zd bytes)\n", pidhash_size, pidhash_shift, - pidhash_size * sizeof(struct list_head)); + PIDTYPE_MAX * pidhash_size * sizeof(struct hlist_head)); for (i = 0; i < PIDTYPE_MAX; i++) { pid_hash[i] = alloc_bootmem(pidhash_size * @@ -287,7 +282,7 @@ if (!pid_hash[i]) panic("Could not alloc pidhash!\n"); for (j = 0; j < pidhash_size; j++) - INIT_LIST_HEAD(&pid_hash[i][j]); + INIT_HLIST_HEAD(&pid_hash[i][j]); } } diff -Nru a/kernel/profile.c b/kernel/profile.c --- a/kernel/profile.c 2004-09-06 16:37:55 -07:00 +++ b/kernel/profile.c 2004-09-06 16:37:55 -07:00 @@ -8,38 +8,44 @@ #include #include #include +#include +#include #include -unsigned int * prof_buffer; -unsigned long prof_len; -unsigned long prof_shift; -int prof_on; +static atomic_t *prof_buffer; +static unsigned long prof_len, prof_shift; +static int prof_on; +static cpumask_t prof_cpu_mask = CPU_MASK_ALL; -int __init profile_setup(char * str) +static int __init profile_setup(char * str) { int par; + + if (!strncmp(str, "schedule", 8)) { + prof_on = 2; + printk(KERN_INFO "kernel schedule profiling enabled\n"); + if (str[7] == ',') + str += 8; + } if (get_option(&str,&par)) { prof_shift = par; prof_on = 1; - printk(KERN_INFO "kernel profiling enabled\n"); + printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n", + prof_shift); } return 1; } +__setup("profile=", profile_setup); void __init profile_init(void) { - unsigned int size; - if (!prof_on) return; /* only text is profiled */ - prof_len = _etext - _stext; - prof_len >>= prof_shift; - - size = prof_len * sizeof(unsigned int) + PAGE_SIZE - 1; - prof_buffer = (unsigned int *) alloc_bootmem(size); + prof_len = (_etext - _stext) >> prof_shift; + prof_buffer = alloc_bootmem(prof_len*sizeof(atomic_t)); } /* Profile event notifications */ @@ -47,31 +53,54 @@ #ifdef CONFIG_PROFILING static DECLARE_RWSEM(profile_rwsem); -static struct notifier_block * exit_task_notifier; -static struct notifier_block * exit_mmap_notifier; -static struct notifier_block * exec_unmap_notifier; +static rwlock_t handoff_lock = RW_LOCK_UNLOCKED; +static struct notifier_block * task_exit_notifier; +static struct notifier_block * task_free_notifier; +static struct notifier_block * munmap_notifier; -void profile_exit_task(struct task_struct * task) +void profile_task_exit(struct task_struct * task) { down_read(&profile_rwsem); - notifier_call_chain(&exit_task_notifier, 0, task); + notifier_call_chain(&task_exit_notifier, 0, task); up_read(&profile_rwsem); } -void profile_exit_mmap(struct mm_struct * mm) +int profile_handoff_task(struct task_struct * task) { - down_read(&profile_rwsem); - notifier_call_chain(&exit_mmap_notifier, 0, mm); - up_read(&profile_rwsem); + int ret; + read_lock(&handoff_lock); + ret = notifier_call_chain(&task_free_notifier, 0, task); + read_unlock(&handoff_lock); + return (ret == NOTIFY_OK) ? 1 : 0; } -void profile_exec_unmap(struct mm_struct * mm) +void profile_munmap(unsigned long addr) { down_read(&profile_rwsem); - notifier_call_chain(&exec_unmap_notifier, 0, mm); + notifier_call_chain(&munmap_notifier, 0, (void *)addr); up_read(&profile_rwsem); } +int task_handoff_register(struct notifier_block * n) +{ + int err = -EINVAL; + + write_lock(&handoff_lock); + err = notifier_chain_register(&task_free_notifier, n); + write_unlock(&handoff_lock); + return err; +} + +int task_handoff_unregister(struct notifier_block * n) +{ + int err = -EINVAL; + + write_lock(&handoff_lock); + err = notifier_chain_unregister(&task_free_notifier, n); + write_unlock(&handoff_lock); + return err; +} + int profile_event_register(enum profile_type type, struct notifier_block * n) { int err = -EINVAL; @@ -79,14 +108,11 @@ down_write(&profile_rwsem); switch (type) { - case EXIT_TASK: - err = notifier_chain_register(&exit_task_notifier, n); + case PROFILE_TASK_EXIT: + err = notifier_chain_register(&task_exit_notifier, n); break; - case EXIT_MMAP: - err = notifier_chain_register(&exit_mmap_notifier, n); - break; - case EXEC_UNMAP: - err = notifier_chain_register(&exec_unmap_notifier, n); + case PROFILE_MUNMAP: + err = notifier_chain_register(&munmap_notifier, n); break; } @@ -103,14 +129,11 @@ down_write(&profile_rwsem); switch (type) { - case EXIT_TASK: - err = notifier_chain_unregister(&exit_task_notifier, n); - break; - case EXIT_MMAP: - err = notifier_chain_unregister(&exit_mmap_notifier, n); + case PROFILE_TASK_EXIT: + err = notifier_chain_unregister(&task_exit_notifier, n); break; - case EXEC_UNMAP: - err = notifier_chain_unregister(&exec_unmap_notifier, n); + case PROFILE_MUNMAP: + err = notifier_chain_unregister(&munmap_notifier, n); break; } @@ -150,8 +173,150 @@ EXPORT_SYMBOL_GPL(register_profile_notifier); EXPORT_SYMBOL_GPL(unregister_profile_notifier); +EXPORT_SYMBOL_GPL(task_handoff_register); +EXPORT_SYMBOL_GPL(task_handoff_unregister); #endif /* CONFIG_PROFILING */ EXPORT_SYMBOL_GPL(profile_event_register); EXPORT_SYMBOL_GPL(profile_event_unregister); + +void profile_hit(int type, void *__pc) +{ + unsigned long pc; + + if (prof_on != type || !prof_buffer) + return; + pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift; + atomic_inc(&prof_buffer[min(pc, prof_len - 1)]); +} + +void profile_tick(int type, struct pt_regs *regs) +{ + if (type == CPU_PROFILING) + profile_hook(regs); + if (!user_mode(regs) && cpu_isset(smp_processor_id(), prof_cpu_mask)) + profile_hit(type, (void *)profile_pc(regs)); +} + +#ifdef CONFIG_PROC_FS +#include +#include +#include + +static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; +} + +static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, + unsigned long count, void *data) +{ + cpumask_t *mask = (cpumask_t *)data; + unsigned long full_count = count, err; + cpumask_t new_value; + + err = cpumask_parse(buffer, count, new_value); + if (err) + return err; + + *mask = new_value; + return full_count; +} + +void create_prof_cpu_mask(struct proc_dir_entry *root_irq_dir) +{ + struct proc_dir_entry *entry; + + /* create /proc/irq/prof_cpu_mask */ + if (!(entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir))) + return; + entry->nlink = 1; + entry->data = (void *)&prof_cpu_mask; + entry->read_proc = prof_cpu_mask_read_proc; + entry->write_proc = prof_cpu_mask_write_proc; +} + +/* + * This function accesses profiling information. The returned data is + * binary: the sampling step and the actual contents of the profile + * buffer. Use of the program readprofile is recommended in order to + * get meaningful info out of these data. + */ +static ssize_t +read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) +{ + unsigned long p = *ppos; + ssize_t read; + char * pnt; + unsigned int sample_step = 1 << prof_shift; + + if (p >= (prof_len+1)*sizeof(unsigned int)) + return 0; + if (count > (prof_len+1)*sizeof(unsigned int) - p) + count = (prof_len+1)*sizeof(unsigned int) - p; + read = 0; + + while (p < sizeof(unsigned int) && count > 0) { + put_user(*((char *)(&sample_step)+p),buf); + buf++; p++; count--; read++; + } + pnt = (char *)prof_buffer + p - sizeof(atomic_t); + if (copy_to_user(buf,(void *)pnt,count)) + return -EFAULT; + read += count; + *ppos += read; + return read; +} + +/* + * Writing to /proc/profile resets the counters + * + * Writing a 'profiling multiplier' value into it also re-sets the profiling + * interrupt frequency, on architectures that support this. + */ +static ssize_t write_profile(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) +{ +#ifdef CONFIG_SMP + extern int setup_profiling_timer (unsigned int multiplier); + + if (count == sizeof(int)) { + unsigned int multiplier; + + if (copy_from_user(&multiplier, buf, sizeof(int))) + return -EFAULT; + + if (setup_profiling_timer(multiplier)) + return -EINVAL; + } +#endif + + memset(prof_buffer, 0, prof_len * sizeof(atomic_t)); + return count; +} + +static struct file_operations proc_profile_operations = { + .read = read_profile, + .write = write_profile, +}; + +static int __init create_proc_profile(void) +{ + struct proc_dir_entry *entry; + + if (!prof_on) + return 0; + if (!(entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL))) + return 0; + entry->proc_fops = &proc_profile_operations; + entry->size = (1+prof_len) * sizeof(atomic_t); + return 0; +} +module_init(create_proc_profile); +#endif /* CONFIG_PROC_FS */ diff -Nru a/kernel/resource.c b/kernel/resource.c --- a/kernel/resource.c 2004-09-06 16:37:53 -07:00 +++ b/kernel/resource.c 2004-09-06 16:37:53 -07:00 @@ -315,11 +315,12 @@ */ int insert_resource(struct resource *parent, struct resource *new) { - int result = 0; + int result; struct resource *first, *next; write_lock(&resource_lock); begin: + result = 0; first = __request_resource(parent, new); if (!first) goto out; @@ -328,15 +329,20 @@ if (first == parent) goto out; - for (next = first; next->sibling; next = next->sibling) + /* Resource fully contained by the clashing resource? Recurse into it */ + if (first->start <= new->start && first->end >= new->end) { + parent = first; + goto begin; + } + + for (next = first; ; next = next->sibling) { + /* Partial overlap? Bad, and unfixable */ + if (next->start < new->start || next->end > new->end) + goto out; + if (!next->sibling) + break; if (next->sibling->start > new->end) break; - - /* existing resource includes new resource */ - if (next->end >= new->end) { - parent = next; - result = 0; - goto begin; } result = 0; diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c 2004-09-06 16:37:54 -07:00 +++ b/kernel/sched.c 2004-09-06 16:37:54 -07:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,8 @@ #include #include #include +#include +#include #include #include @@ -67,8 +70,6 @@ #define USER_PRIO(p) ((p)-MAX_RT_PRIO) #define TASK_USER_PRIO(p) USER_PRIO((p)->static_prio) #define MAX_USER_PRIO (USER_PRIO(MAX_PRIO)) -#define AVG_TIMESLICE (MIN_TIMESLICE + ((MAX_TIMESLICE - MIN_TIMESLICE) *\ - (MAX_PRIO-1-NICE_TO_PRIO(0))/(MAX_USER_PRIO - 1))) /* * Some helpers for converting nanosecond timing to jiffy resolution @@ -79,12 +80,12 @@ /* * These are the 'tuning knobs' of the scheduler: * - * Minimum timeslice is 10 msecs, default timeslice is 100 msecs, - * maximum timeslice is 200 msecs. Timeslices get refilled after - * they expire. + * Minimum timeslice is 5 msecs (or 1 jiffy, whichever is larger), + * default timeslice is 100 msecs, maximum timeslice is 800 msecs. + * Timeslices get refilled after they expire. */ -#define MIN_TIMESLICE ( 10 * HZ / 1000) -#define MAX_TIMESLICE (200 * HZ / 1000) +#define MIN_TIMESLICE max(5 * HZ / 1000, 1) +#define DEF_TIMESLICE (100 * HZ / 1000) #define ON_RUNQUEUE_WEIGHT 30 #define CHILD_PENALTY 95 #define PARENT_PENALTY 100 @@ -92,7 +93,7 @@ #define PRIO_BONUS_RATIO 25 #define MAX_BONUS (MAX_USER_PRIO * PRIO_BONUS_RATIO / 100) #define INTERACTIVE_DELTA 2 -#define MAX_SLEEP_AVG (AVG_TIMESLICE * MAX_BONUS) +#define MAX_SLEEP_AVG (DEF_TIMESLICE * MAX_BONUS) #define STARVATION_LIMIT (MAX_SLEEP_AVG) #define NS_MAX_SLEEP_AVG (JIFFIES_TO_NS(MAX_SLEEP_AVG)) #define CREDIT_LIMIT 100 @@ -161,27 +162,36 @@ ((p)->prio < (rq)->curr->prio) /* - * BASE_TIMESLICE scales user-nice values [ -20 ... 19 ] - * to time slice values. + * task_timeslice() scales user-nice values [ -20 ... 0 ... 19 ] + * to time slice values: [800ms ... 100ms ... 5ms] * * The higher a thread's priority, the bigger timeslices * it gets during one round of execution. But even the lowest * priority thread gets MIN_TIMESLICE worth of execution time. - * - * task_timeslice() is the interface that is used by the scheduler. */ -#define BASE_TIMESLICE(p) (MIN_TIMESLICE + \ - ((MAX_TIMESLICE - MIN_TIMESLICE) * \ - (MAX_PRIO-1 - (p)->static_prio) / (MAX_USER_PRIO-1))) +#define SCALE_PRIO(x, prio) \ + max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO/2), MIN_TIMESLICE) static unsigned int task_timeslice(task_t *p) { - return BASE_TIMESLICE(p); + if (p->static_prio < NICE_TO_PRIO(0)) + return SCALE_PRIO(DEF_TIMESLICE*4, p->static_prio); + else + return SCALE_PRIO(DEF_TIMESLICE, p->static_prio); } - #define task_hot(p, now, sd) ((now) - (p)->timestamp < (sd)->cache_hot_time) +enum idle_type +{ + IDLE, + NOT_IDLE, + NEWLY_IDLE, + MAX_IDLE_TYPES +}; + +struct sched_domain; + /* * These are the runqueue data structures: */ @@ -233,10 +243,186 @@ task_t *migration_thread; struct list_head migration_queue; #endif + +#ifdef CONFIG_SCHEDSTATS + /* latency stats */ + struct sched_info rq_sched_info; + + /* sys_sched_yield() stats */ + unsigned long yld_exp_empty; + unsigned long yld_act_empty; + unsigned long yld_both_empty; + unsigned long yld_cnt; + + /* schedule() stats */ + unsigned long sched_noswitch; + unsigned long sched_switch; + unsigned long sched_cnt; + unsigned long sched_goidle; + + /* pull_task() stats */ + unsigned long pt_gained[MAX_IDLE_TYPES]; + unsigned long pt_lost[MAX_IDLE_TYPES]; + + /* active_load_balance() stats */ + unsigned long alb_cnt; + unsigned long alb_lost; + unsigned long alb_gained; + unsigned long alb_failed; + + /* try_to_wake_up() stats */ + unsigned long ttwu_cnt; + unsigned long ttwu_attempts; + unsigned long ttwu_moved; + + /* wake_up_new_task() stats */ + unsigned long wunt_cnt; + unsigned long wunt_moved; + + /* sched_migrate_task() stats */ + unsigned long smt_cnt; + + /* sched_balance_exec() stats */ + unsigned long sbe_cnt; +#endif }; static DEFINE_PER_CPU(struct runqueue, runqueues); +/* + * sched-domains (multiprocessor balancing) declarations: + */ +#ifdef CONFIG_SMP +#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ + +#define SD_BALANCE_NEWIDLE 1 /* Balance when about to become idle */ +#define SD_BALANCE_EXEC 2 /* Balance on exec */ +#define SD_WAKE_IDLE 4 /* Wake to idle CPU on task wakeup */ +#define SD_WAKE_AFFINE 8 /* Wake task to waking CPU */ +#define SD_WAKE_BALANCE 16 /* Perform balancing at task wakeup */ +#define SD_SHARE_CPUPOWER 32 /* Domain members share cpu power */ + +struct sched_group { + struct sched_group *next; /* Must be a circular list */ + cpumask_t cpumask; + + /* + * CPU power of this group, SCHED_LOAD_SCALE being max power for a + * single CPU. This should be read only (except for setup). Although + * it will need to be written to at cpu hot(un)plug time, perhaps the + * cpucontrol semaphore will provide enough exclusion? + */ + unsigned long cpu_power; +}; + +struct sched_domain { + /* These fields must be setup */ + struct sched_domain *parent; /* top domain must be null terminated */ + struct sched_group *groups; /* the balancing groups of the domain */ + cpumask_t span; /* span of all CPUs in this domain */ + unsigned long min_interval; /* Minimum balance interval ms */ + unsigned long max_interval; /* Maximum balance interval ms */ + unsigned int busy_factor; /* less balancing by factor if busy */ + unsigned int imbalance_pct; /* No balance until over watermark */ + unsigned long long cache_hot_time; /* Task considered cache hot (ns) */ + unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */ + unsigned int per_cpu_gain; /* CPU % gained by adding domain cpus */ + int flags; /* See SD_* */ + + /* Runtime fields. */ + unsigned long last_balance; /* init to jiffies. units in jiffies */ + unsigned int balance_interval; /* initialise to 1. units in ms. */ + unsigned int nr_balance_failed; /* initialise to 0 */ + +#ifdef CONFIG_SCHEDSTATS + /* load_balance() stats */ + unsigned long lb_cnt[MAX_IDLE_TYPES]; + unsigned long lb_failed[MAX_IDLE_TYPES]; + unsigned long lb_imbalance[MAX_IDLE_TYPES]; + unsigned long lb_nobusyg[MAX_IDLE_TYPES]; + unsigned long lb_nobusyq[MAX_IDLE_TYPES]; + + /* sched_balance_exec() stats */ + unsigned long sbe_attempts; + unsigned long sbe_pushed; + + /* try_to_wake_up() stats */ + unsigned long ttwu_wake_affine; + unsigned long ttwu_wake_balance; +#endif +}; + +#ifndef ARCH_HAS_SCHED_TUNE +#ifdef CONFIG_SCHED_SMT +#define ARCH_HAS_SCHED_WAKE_IDLE +/* Common values for SMT siblings */ +#define SD_SIBLING_INIT (struct sched_domain) { \ + .span = CPU_MASK_NONE, \ + .parent = NULL, \ + .groups = NULL, \ + .min_interval = 1, \ + .max_interval = 2, \ + .busy_factor = 8, \ + .imbalance_pct = 110, \ + .cache_hot_time = 0, \ + .cache_nice_tries = 0, \ + .per_cpu_gain = 25, \ + .flags = SD_BALANCE_NEWIDLE \ + | SD_BALANCE_EXEC \ + | SD_WAKE_AFFINE \ + | SD_WAKE_IDLE \ + | SD_SHARE_CPUPOWER, \ + .last_balance = jiffies, \ + .balance_interval = 1, \ + .nr_balance_failed = 0, \ +} +#endif + +/* Common values for CPUs */ +#define SD_CPU_INIT (struct sched_domain) { \ + .span = CPU_MASK_NONE, \ + .parent = NULL, \ + .groups = NULL, \ + .min_interval = 1, \ + .max_interval = 4, \ + .busy_factor = 64, \ + .imbalance_pct = 125, \ + .cache_hot_time = (5*1000000/2), \ + .cache_nice_tries = 1, \ + .per_cpu_gain = 100, \ + .flags = SD_BALANCE_NEWIDLE \ + | SD_BALANCE_EXEC \ + | SD_WAKE_AFFINE \ + | SD_WAKE_BALANCE, \ + .last_balance = jiffies, \ + .balance_interval = 1, \ + .nr_balance_failed = 0, \ +} + +/* Arch can override this macro in processor.h */ +#if defined(CONFIG_NUMA) && !defined(SD_NODE_INIT) +#define SD_NODE_INIT (struct sched_domain) { \ + .span = CPU_MASK_NONE, \ + .parent = NULL, \ + .groups = NULL, \ + .min_interval = 8, \ + .max_interval = 32, \ + .busy_factor = 32, \ + .imbalance_pct = 125, \ + .cache_hot_time = (10*1000000), \ + .cache_nice_tries = 1, \ + .per_cpu_gain = 100, \ + .flags = SD_BALANCE_EXEC \ + | SD_WAKE_BALANCE, \ + .last_balance = jiffies, \ + .balance_interval = 1, \ + .nr_balance_failed = 0, \ +} +#endif +#endif /* ARCH_HAS_SCHED_TUNE */ +#endif + + #define for_each_domain(cpu, domain) \ for (domain = cpu_rq(cpu)->sd; domain; domain = domain->parent) @@ -279,6 +465,104 @@ spin_unlock_irqrestore(&rq->lock, *flags); } +#ifdef CONFIG_SCHEDSTATS +/* + * bump this up when changing the output format or the meaning of an existing + * format, so that tools can adapt (or abort) + */ +#define SCHEDSTAT_VERSION 10 + +static int show_schedstat(struct seq_file *seq, void *v) +{ + int cpu; + enum idle_type itype; + + seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION); + seq_printf(seq, "timestamp %lu\n", jiffies); + for_each_online_cpu(cpu) { + runqueue_t *rq = cpu_rq(cpu); +#ifdef CONFIG_SMP + struct sched_domain *sd; + int dcnt = 0; +#endif + + /* runqueue-specific stats */ + seq_printf(seq, + "cpu%d %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu " + "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu", + cpu, rq->yld_both_empty, + rq->yld_act_empty, rq->yld_exp_empty, + rq->yld_cnt, rq->sched_noswitch, + rq->sched_switch, rq->sched_cnt, rq->sched_goidle, + rq->alb_cnt, rq->alb_gained, rq->alb_lost, + rq->alb_failed, + rq->ttwu_cnt, rq->ttwu_moved, rq->ttwu_attempts, + rq->wunt_cnt, rq->wunt_moved, + rq->smt_cnt, rq->sbe_cnt, rq->rq_sched_info.cpu_time, + rq->rq_sched_info.run_delay, rq->rq_sched_info.pcnt); + + for (itype = IDLE; itype < MAX_IDLE_TYPES; itype++) + seq_printf(seq, " %lu %lu", rq->pt_gained[itype], + rq->pt_lost[itype]); + seq_printf(seq, "\n"); + +#ifdef CONFIG_SMP + /* domain-specific stats */ + for_each_domain(cpu, sd) { + char mask_str[NR_CPUS]; + + cpumask_scnprintf(mask_str, NR_CPUS, sd->span); + seq_printf(seq, "domain%d %s", dcnt++, mask_str); + for (itype = IDLE; itype < MAX_IDLE_TYPES; itype++) { + seq_printf(seq, " %lu %lu %lu %lu %lu", + sd->lb_cnt[itype], + sd->lb_failed[itype], + sd->lb_imbalance[itype], + sd->lb_nobusyq[itype], + sd->lb_nobusyg[itype]); + } + seq_printf(seq, " %lu %lu %lu %lu\n", + sd->sbe_pushed, sd->sbe_attempts, + sd->ttwu_wake_affine, sd->ttwu_wake_balance); + } +#endif + } + return 0; +} + +static int schedstat_open(struct inode *inode, struct file *file) +{ + unsigned int size = PAGE_SIZE * (1 + num_online_cpus() / 32); + char *buf = kmalloc(size, GFP_KERNEL); + struct seq_file *m; + int res; + + if (!buf) + return -ENOMEM; + res = single_open(file, show_schedstat, NULL); + if (!res) { + m = file->private_data; + m->buf = buf; + m->size = size; + } else + kfree(buf); + return res; +} + +struct file_operations proc_schedstat_operations = { + .open = schedstat_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +# define schedstat_inc(rq, field) rq->field++; +# define schedstat_add(rq, field, amt) rq->field += amt; +#else /* !CONFIG_SCHEDSTATS */ +# define schedstat_inc(rq, field) do { } while (0); +# define schedstat_add(rq, field, amt) do { } while (0); +#endif + /* * rq_lock - lock a given runqueue and disable interrupts. */ @@ -298,6 +582,112 @@ spin_unlock_irq(&rq->lock); } +#ifdef CONFIG_SCHEDSTATS +/* + * Called when a process is dequeued from the active array and given + * the cpu. We should note that with the exception of interactive + * tasks, the expired queue will become the active queue after the active + * queue is empty, without explicitly dequeuing and requeuing tasks in the + * expired queue. (Interactive tasks may be requeued directly to the + * active queue, thus delaying tasks in the expired queue from running; + * see scheduler_tick()). + * + * This function is only called from sched_info_arrive(), rather than + * dequeue_task(). Even though a task may be queued and dequeued multiple + * times as it is shuffled about, we're really interested in knowing how + * long it was from the *first* time it was queued to the time that it + * finally hit a cpu. + */ +static inline void sched_info_dequeued(task_t *t) +{ + t->sched_info.last_queued = 0; +} + +/* + * Called when a task finally hits the cpu. We can now calculate how + * long it was waiting to run. We also note when it began so that we + * can keep stats on how long its timeslice is. + */ +static inline void sched_info_arrive(task_t *t) +{ + unsigned long now = jiffies, diff = 0; + struct runqueue *rq = task_rq(t); + + if (t->sched_info.last_queued) + diff = now - t->sched_info.last_queued; + sched_info_dequeued(t); + t->sched_info.run_delay += diff; + t->sched_info.last_arrival = now; + t->sched_info.pcnt++; + + if (!rq) + return; + + rq->rq_sched_info.run_delay += diff; + rq->rq_sched_info.pcnt++; +} + +/* + * Called when a process is queued into either the active or expired + * array. The time is noted and later used to determine how long we + * had to wait for us to reach the cpu. Since the expired queue will + * become the active queue after active queue is empty, without dequeuing + * and requeuing any tasks, we are interested in queuing to either. It + * is unusual but not impossible for tasks to be dequeued and immediately + * requeued in the same or another array: this can happen in sched_yield(), + * set_user_nice(), and even load_balance() as it moves tasks from runqueue + * to runqueue. + * + * This function is only called from enqueue_task(), but also only updates + * the timestamp if it is already not set. It's assumed that + * sched_info_dequeued() will clear that stamp when appropriate. + */ +static inline void sched_info_queued(task_t *t) +{ + if (!t->sched_info.last_queued) + t->sched_info.last_queued = jiffies; +} + +/* + * Called when a process ceases being the active-running process, either + * voluntarily or involuntarily. Now we can calculate how long we ran. + */ +static inline void sched_info_depart(task_t *t) +{ + struct runqueue *rq = task_rq(t); + unsigned long diff = jiffies - t->sched_info.last_arrival; + + t->sched_info.cpu_time += diff; + + if (rq) + rq->rq_sched_info.cpu_time += diff; +} + +/* + * Called when tasks are switched involuntarily due, typically, to expiring + * their time slice. (This may also be called when switching to or from + * the idle task.) We are only called when prev != next. + */ +static inline void sched_info_switch(task_t *prev, task_t *next) +{ + struct runqueue *rq = task_rq(prev); + + /* + * prev now departs the cpu. It's not interesting to record + * stats about how efficient we were at scheduling the idle + * process, however. + */ + if (prev != rq->idle) + sched_info_depart(prev); + + if (next != rq->idle) + sched_info_arrive(next); +} +#else +#define sched_info_queued(t) do { } while (0) +#define sched_info_switch(t, next) do { } while (0) +#endif /* CONFIG_SCHEDSTATS */ + /* * Adding/removing a task to/from a priority array: */ @@ -311,6 +701,7 @@ static void enqueue_task(struct task_struct *p, prio_array_t *array) { + sched_info_queued(p); list_add_tail(&p->run_list, array->queue + p->prio); __set_bit(p->prio, array->bitmap); array->nr_active++; @@ -399,7 +790,7 @@ if (p->mm && p->activated != -1 && sleep_time > INTERACTIVE_SLEEP(p)) { p->sleep_avg = JIFFIES_TO_NS(MAX_SLEEP_AVG - - AVG_TIMESLICE); + DEF_TIMESLICE); if (!HIGH_CREDIT(p)) p->interactive_credit++; } else { @@ -526,7 +917,8 @@ { int need_resched, nrpolling; - preempt_disable(); + BUG_ON(!spin_is_locked(&task_rq(p)->lock)); + /* minimise the chance of sending an interrupt to poll_idle() */ nrpolling = test_tsk_thread_flag(p,TIF_POLLING_NRFLAG); need_resched = test_and_set_tsk_thread_flag(p,TIF_NEED_RESCHED); @@ -534,7 +926,6 @@ if (!need_resched && !nrpolling && (task_cpu(p) != smp_processor_id())) smp_send_reschedule(task_cpu(p)); - preempt_enable(); } #else static inline void resched_task(task_t *p) @@ -740,6 +1131,7 @@ #endif rq = task_rq_lock(p, &flags); + schedstat_inc(rq, ttwu_cnt); old_state = p->state; if (!(old_state & state)) goto out; @@ -787,23 +1179,35 @@ */ imbalance = sd->imbalance_pct + (sd->imbalance_pct - 100) / 2; - if ( ((sd->flags & SD_WAKE_AFFINE) && - !task_hot(p, rq->timestamp_last_tick, sd)) - || ((sd->flags & SD_WAKE_BALANCE) && - imbalance*this_load <= 100*load) ) { + if ((sd->flags & SD_WAKE_AFFINE) && + !task_hot(p, rq->timestamp_last_tick, sd)) { + /* + * This domain has SD_WAKE_AFFINE and p is cache cold + * in this domain. + */ + if (cpu_isset(cpu, sd->span)) { + schedstat_inc(sd, ttwu_wake_affine); + goto out_set_cpu; + } + } else if ((sd->flags & SD_WAKE_BALANCE) && + imbalance*this_load <= 100*load) { /* - * Now sd has SD_WAKE_AFFINE and p is cache cold in sd - * or sd has SD_WAKE_BALANCE and there is an imbalance + * This domain has SD_WAKE_BALANCE and there is + * an imbalance. */ - if (cpu_isset(cpu, sd->span)) + if (cpu_isset(cpu, sd->span)) { + schedstat_inc(sd, ttwu_wake_balance); goto out_set_cpu; + } } } new_cpu = cpu; /* Could not wake to this_cpu. Wake to cpu instead */ out_set_cpu: + schedstat_inc(rq, ttwu_attempts); new_cpu = wake_idle(new_cpu, p); if (new_cpu != cpu && cpu_isset(new_cpu, p->cpus_allowed)) { + schedstat_inc(rq, ttwu_moved); set_task_cpu(p, new_cpu); task_rq_unlock(rq, &flags); /* might preempt at this point */ @@ -865,6 +1269,11 @@ return try_to_wake_up(p, state, 0); } +#ifdef CONFIG_SMP +static int find_idlest_cpu(struct task_struct *p, int this_cpu, + struct sched_domain *sd); +#endif + /* * Perform scheduler related setup for a newly forked process p. * p is forked by current. @@ -881,6 +1290,9 @@ INIT_LIST_HEAD(&p->run_list); p->array = NULL; spin_lock_init(&p->switch_lock); +#ifdef CONFIG_SCHEDSTATS + memset(&p->sched_info, 0, sizeof(p->sched_info)); +#endif #ifdef CONFIG_PREEMPT /* * During context-switch we hold precisely one spinlock, which @@ -904,7 +1316,7 @@ p->first_time_slice = 1; current->time_slice >>= 1; p->timestamp = sched_clock(); - if (!current->time_slice) { + if (unlikely(!current->time_slice)) { /* * This case is rare, it happens when the parent has only * a single jiffy left from its timeslice. Taking the @@ -920,44 +1332,89 @@ } /* - * wake_up_forked_process - wake up a freshly forked process. + * wake_up_new_task - wake up a newly created task for the first time. * * This function will do some initial scheduler statistics housekeeping - * that must be done for every newly created process. + * that must be done for every newly created context, then puts the task + * on the runqueue and wakes it. */ -void fastcall wake_up_forked_process(task_t * p) +void fastcall wake_up_new_task(task_t * p, unsigned long clone_flags) { unsigned long flags; - runqueue_t *rq = task_rq_lock(current, &flags); + int this_cpu, cpu; + runqueue_t *rq, *this_rq; + + rq = task_rq_lock(p, &flags); + cpu = task_cpu(p); + this_cpu = smp_processor_id(); BUG_ON(p->state != TASK_RUNNING); + schedstat_inc(rq, wunt_cnt); /* * We decrease the sleep average of forking parents * and children as well, to keep max-interactive tasks - * from forking tasks that are max-interactive. + * from forking tasks that are max-interactive. The parent + * (current) is done further down, under its lock. */ - current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) * - PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS); - p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) * CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS); p->interactive_credit = 0; p->prio = effective_prio(p); - set_task_cpu(p, smp_processor_id()); - if (unlikely(!current->array)) + if (likely(cpu == this_cpu)) { + if (!(clone_flags & CLONE_VM)) { + /* + * The VM isn't cloned, so we're in a good position to + * do child-runs-first in anticipation of an exec. This + * usually avoids a lot of COW overhead. + */ + if (unlikely(!current->array)) + __activate_task(p, rq); + else { + p->prio = current->prio; + list_add_tail(&p->run_list, ¤t->run_list); + p->array = current->array; + p->array->nr_active++; + rq->nr_running++; + } + set_need_resched(); + } else + /* Run child last */ + __activate_task(p, rq); + /* + * We skip the following code due to cpu == this_cpu + * + * task_rq_unlock(rq, &flags); + * this_rq = task_rq_lock(current, &flags); + */ + this_rq = rq; + } else { + this_rq = cpu_rq(this_cpu); + + /* + * Not the local CPU - must adjust timestamp. This should + * get optimised away in the !CONFIG_SMP case. + */ + p->timestamp = (p->timestamp - this_rq->timestamp_last_tick) + + rq->timestamp_last_tick; __activate_task(p, rq); - else { - p->prio = current->prio; - list_add_tail(&p->run_list, ¤t->run_list); - p->array = current->array; - p->array->nr_active++; - rq->nr_running++; + if (TASK_PREEMPTS_CURR(p, rq)) + resched_task(rq->curr); + + schedstat_inc(rq, wunt_moved); + /* + * Parent and child are on different CPUs, now get the + * parent runqueue to update the parent's ->sleep_avg: + */ + task_rq_unlock(rq, &flags); + this_rq = task_rq_lock(current, &flags); } - task_rq_unlock(rq, &flags); + current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) * + PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS); + task_rq_unlock(this_rq, &flags); } /* @@ -974,18 +1431,16 @@ unsigned long flags; runqueue_t *rq; - local_irq_save(flags); - if (p->first_time_slice) { - p->parent->time_slice += p->time_slice; - if (unlikely(p->parent->time_slice > MAX_TIMESLICE)) - p->parent->time_slice = MAX_TIMESLICE; - } - local_irq_restore(flags); /* * If the child was a (relative-) CPU hog then decrease * the sleep_avg of the parent as well. */ rq = task_rq_lock(p->parent, &flags); + if (p->first_time_slice) { + p->parent->time_slice += p->time_slice; + if (unlikely(p->parent->time_slice > task_timeslice(p))) + p->parent->time_slice = task_timeslice(p); + } if (p->sleep_avg < p->parent->sleep_avg) p->parent->sleep_avg = p->parent->sleep_avg / (EXIT_WEIGHT + 1) * EXIT_WEIGHT + p->sleep_avg / @@ -1085,7 +1540,7 @@ { unsigned long i, sum = 0; - for_each_cpu(i) + for_each_online_cpu(i) sum += cpu_rq(i)->nr_running; return sum; @@ -1121,6 +1576,8 @@ return sum; } +#ifdef CONFIG_SMP + /* * double_rq_lock - safely lock two runqueues * @@ -1155,14 +1612,20 @@ spin_unlock(&rq2->lock); } -enum idle_type +/* + * double_lock_balance - lock the busiest runqueue, this_rq is locked already. + */ +static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest) { - IDLE, - NOT_IDLE, - NEWLY_IDLE, -}; - -#ifdef CONFIG_SMP + if (unlikely(!spin_trylock(&busiest->lock))) { + if (busiest < this_rq) { + spin_unlock(&this_rq->lock); + spin_lock(&busiest->lock); + spin_lock(&this_rq->lock); + } else + spin_lock(&busiest->lock); + } +} /* * find_idlest_cpu - find the least busy runqueue. @@ -1211,89 +1674,6 @@ } /* - * wake_up_forked_thread - wake up a freshly forked thread. - * - * This function will do some initial scheduler statistics housekeeping - * that must be done for every newly created context, and it also does - * runqueue balancing. - */ -void fastcall wake_up_forked_thread(task_t * p) -{ - unsigned long flags; - int this_cpu = get_cpu(), cpu; - struct sched_domain *tmp, *sd = NULL; - runqueue_t *this_rq = cpu_rq(this_cpu), *rq; - - /* - * Find the largest domain that this CPU is part of that - * is willing to balance on clone: - */ - for_each_domain(this_cpu, tmp) - if (tmp->flags & SD_BALANCE_CLONE) - sd = tmp; - if (sd) - cpu = find_idlest_cpu(p, this_cpu, sd); - else - cpu = this_cpu; - - local_irq_save(flags); -lock_again: - rq = cpu_rq(cpu); - double_rq_lock(this_rq, rq); - - BUG_ON(p->state != TASK_RUNNING); - - /* - * We did find_idlest_cpu() unlocked, so in theory - * the mask could have changed - just dont migrate - * in this case: - */ - if (unlikely(!cpu_isset(cpu, p->cpus_allowed))) { - cpu = this_cpu; - double_rq_unlock(this_rq, rq); - goto lock_again; - } - /* - * We decrease the sleep average of forking parents - * and children as well, to keep max-interactive tasks - * from forking tasks that are max-interactive. - */ - current->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(current) * - PARENT_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS); - - p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) * - CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS); - - p->interactive_credit = 0; - - p->prio = effective_prio(p); - set_task_cpu(p, cpu); - - if (cpu == this_cpu) { - if (unlikely(!current->array)) - __activate_task(p, rq); - else { - p->prio = current->prio; - list_add_tail(&p->run_list, ¤t->run_list); - p->array = current->array; - p->array->nr_active++; - rq->nr_running++; - } - } else { - /* Not the local CPU - must adjust timestamp */ - p->timestamp = (p->timestamp - this_rq->timestamp_last_tick) - + rq->timestamp_last_tick; - __activate_task(p, rq); - if (TASK_PREEMPTS_CURR(p, rq)) - resched_task(rq->curr); - } - - double_rq_unlock(this_rq, rq); - local_irq_restore(flags); - put_cpu(); -} - -/* * If dest_cpu is allowed for this process, migrate the task to it. * This is accomplished by forcing the cpu_allowed mask to only * allow dest_cpu, which will force the cpu onto dest_cpu. Then @@ -1310,6 +1690,7 @@ || unlikely(cpu_is_offline(dest_cpu))) goto out; + schedstat_inc(rq, smt_cnt); /* force the process onto the specified CPU */ if (migrate_task(p, dest_cpu, &req)) { /* Need to wait for migration thread (might exit: take ref). */ @@ -1326,17 +1707,18 @@ } /* - * sched_balance_exec(): find the highest-level, exec-balance-capable + * sched_exec(): find the highest-level, exec-balance-capable * domain and try to migrate the task to the least loaded CPU. * * execve() is a valuable balancing opportunity, because at this point * the task has the smallest effective memory and cache footprint. */ -void sched_balance_exec(void) +void sched_exec(void) { struct sched_domain *tmp, *sd = NULL; int new_cpu, this_cpu = get_cpu(); + schedstat_inc(this_rq(), sbe_cnt); /* Prefer the current CPU if there's only this task running */ if (this_rq()->nr_running <= 1) goto out; @@ -1345,9 +1727,11 @@ if (tmp->flags & SD_BALANCE_EXEC) sd = tmp; + schedstat_inc(sd, sbe_attempts); if (sd) { new_cpu = find_idlest_cpu(current, this_cpu, sd); if (new_cpu != this_cpu) { + schedstat_inc(sd, sbe_pushed); put_cpu(); sched_migrate_task(current, new_cpu); return; @@ -1358,21 +1742,6 @@ } /* - * double_lock_balance - lock the busiest runqueue, this_rq is locked already. - */ -static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest) -{ - if (unlikely(!spin_trylock(&busiest->lock))) { - if (busiest < this_rq) { - spin_unlock(&this_rq->lock); - spin_lock(&busiest->lock); - spin_lock(&this_rq->lock); - } else - spin_lock(&busiest->lock); - } -} - -/* * pull_task - move a task from a remote runqueue to the local runqueue. * Both runqueues must be locked. */ @@ -1486,6 +1855,15 @@ idx++; goto skip_bitmap; } + + /* + * Right now, this is the only place pull_task() is called, + * so we can safely collect pull_task() stats here rather than + * inside pull_task(). + */ + schedstat_inc(this_rq, pt_gained[idle]); + schedstat_inc(busiest, pt_lost[idle]); + pull_task(busiest, array, tmp, this_rq, dst_array, this_cpu); pulled++; @@ -1680,14 +2058,20 @@ int nr_moved; spin_lock(&this_rq->lock); + schedstat_inc(sd, lb_cnt[idle]); group = find_busiest_group(sd, this_cpu, &imbalance, idle); - if (!group) + if (!group) { + schedstat_inc(sd, lb_nobusyg[idle]); goto out_balanced; + } busiest = find_busiest_queue(group); - if (!busiest) + if (!busiest) { + schedstat_inc(sd, lb_nobusyq[idle]); goto out_balanced; + } + /* * This should be "impossible", but since load * balancing is inherently racy and statistical, @@ -1698,6 +2082,8 @@ goto out_balanced; } + schedstat_add(sd, lb_imbalance[idle], imbalance); + nr_moved = 0; if (busiest->nr_running > 1) { /* @@ -1714,6 +2100,7 @@ spin_unlock(&this_rq->lock); if (!nr_moved) { + schedstat_inc(sd, lb_failed[idle]); sd->nr_balance_failed++; if (unlikely(sd->nr_balance_failed > sd->cache_nice_tries+2)) { @@ -1768,19 +2155,27 @@ unsigned long imbalance; int nr_moved = 0; + schedstat_inc(sd, lb_cnt[NEWLY_IDLE]); group = find_busiest_group(sd, this_cpu, &imbalance, NEWLY_IDLE); - if (!group) + if (!group) { + schedstat_inc(sd, lb_nobusyg[NEWLY_IDLE]); goto out; + } busiest = find_busiest_queue(group); - if (!busiest || busiest == this_rq) + if (!busiest || busiest == this_rq) { + schedstat_inc(sd, lb_nobusyq[NEWLY_IDLE]); goto out; + } /* Attempt to move tasks */ double_lock_balance(this_rq, busiest); + schedstat_add(sd, lb_imbalance[NEWLY_IDLE], imbalance); nr_moved = move_tasks(this_rq, this_cpu, busiest, imbalance, sd, NEWLY_IDLE); + if (!nr_moved) + schedstat_inc(sd, lb_failed[NEWLY_IDLE]); spin_unlock(&busiest->lock); @@ -1820,40 +2215,39 @@ struct sched_group *group, *busy_group; int i; + schedstat_inc(busiest, alb_cnt); if (busiest->nr_running <= 1) return; for_each_domain(busiest_cpu, sd) if (cpu_isset(busiest->push_cpu, sd->span)) break; - if (!sd) { - WARN_ON(1); + if (!sd) return; - } - group = sd->groups; + group = sd->groups; while (!cpu_isset(busiest_cpu, group->cpumask)) - group = group->next; - busy_group = group; + group = group->next; + busy_group = group; - group = sd->groups; - do { + group = sd->groups; + do { cpumask_t tmp; runqueue_t *rq; int push_cpu = 0; - if (group == busy_group) - goto next_group; + if (group == busy_group) + goto next_group; cpus_and(tmp, group->cpumask, cpu_online_map); if (!cpus_weight(tmp)) goto next_group; - for_each_cpu_mask(i, tmp) { + for_each_cpu_mask(i, tmp) { if (!idle_cpu(i)) goto next_group; - push_cpu = i; - } + push_cpu = i; + } rq = cpu_rq(push_cpu); @@ -1866,7 +2260,12 @@ if (unlikely(busiest == rq)) goto next_group; double_lock_balance(busiest, rq); - move_tasks(rq, push_cpu, busiest, 1, sd, IDLE); + if (move_tasks(rq, push_cpu, busiest, 1, sd, IDLE)) { + schedstat_inc(busiest, alb_lost); + schedstat_inc(rq, alb_gained); + } else { + schedstat_inc(busiest, alb_failed); + } spin_unlock(&rq->lock); next_group: group = group->next; @@ -1938,17 +2337,20 @@ static inline int wake_priority_sleeper(runqueue_t *rq) { + int ret = 0; #ifdef CONFIG_SCHED_SMT + spin_lock(&rq->lock); /* * If an SMT sibling task has been put to sleep for priority * reasons reschedule the idle task to see if it can now run. */ if (rq->nr_running) { resched_task(rq->idle); - return 1; + ret = 1; } + spin_unlock(&rq->lock); #endif - return 0; + return ret; } DEFINE_PER_CPU(struct kernel_stat, kstat); @@ -2028,7 +2430,7 @@ * timeslice. This makes it possible for interactive tasks * to use up their timeslices at their highest priority levels. */ - if (unlikely(rt_task(p))) { + if (rt_task(p)) { /* * RR tasks need a special form of timeslice management. * FIFO tasks have no timeslices. @@ -2094,23 +2496,34 @@ } #ifdef CONFIG_SCHED_SMT -static inline void wake_sleeping_dependent(int cpu, runqueue_t *rq) +static inline void wake_sleeping_dependent(int this_cpu, runqueue_t *this_rq) { - int i; - struct sched_domain *sd = rq->sd; + struct sched_domain *sd = this_rq->sd; cpumask_t sibling_map; + int i; if (!(sd->flags & SD_SHARE_CPUPOWER)) return; + /* + * Unlock the current runqueue because we have to lock in + * CPU order to avoid deadlocks. Caller knows that we might + * unlock. We keep IRQs disabled. + */ + spin_unlock(&this_rq->lock); + cpus_and(sibling_map, sd->span, cpu_online_map); - for_each_cpu_mask(i, sibling_map) { - runqueue_t *smt_rq; - if (i == cpu) - continue; + for_each_cpu_mask(i, sibling_map) + spin_lock(&cpu_rq(i)->lock); + /* + * We clear this CPU from the mask. This both simplifies the + * inner loop and keps this_rq locked when we exit: + */ + cpu_clear(this_cpu, sibling_map); - smt_rq = cpu_rq(i); + for_each_cpu_mask(i, sibling_map) { + runqueue_t *smt_rq = cpu_rq(i); /* * If an SMT sibling task is sleeping due to priority @@ -2119,27 +2532,53 @@ if (smt_rq->curr == smt_rq->idle && smt_rq->nr_running) resched_task(smt_rq->idle); } + + for_each_cpu_mask(i, sibling_map) + spin_unlock(&cpu_rq(i)->lock); + /* + * We exit with this_cpu's rq still held and IRQs + * still disabled: + */ } -static inline int dependent_sleeper(int cpu, runqueue_t *rq, task_t *p) +static inline int dependent_sleeper(int this_cpu, runqueue_t *this_rq) { - struct sched_domain *sd = rq->sd; + struct sched_domain *sd = this_rq->sd; cpumask_t sibling_map; + prio_array_t *array; int ret = 0, i; + task_t *p; if (!(sd->flags & SD_SHARE_CPUPOWER)) return 0; + /* + * The same locking rules and details apply as for + * wake_sleeping_dependent(): + */ + spin_unlock(&this_rq->lock); cpus_and(sibling_map, sd->span, cpu_online_map); - for_each_cpu_mask(i, sibling_map) { - runqueue_t *smt_rq; - task_t *smt_curr; + for_each_cpu_mask(i, sibling_map) + spin_lock(&cpu_rq(i)->lock); + cpu_clear(this_cpu, sibling_map); - if (i == cpu) - continue; + /* + * Establish next task to be run - it might have gone away because + * we released the runqueue lock above: + */ + if (!this_rq->nr_running) + goto out_unlock; + array = this_rq->active; + if (!array->nr_active) + array = this_rq->expired; + BUG_ON(!array->nr_active); - smt_rq = cpu_rq(i); - smt_curr = smt_rq->curr; + p = list_entry(array->queue[sched_find_first_bit(array->bitmap)].next, + task_t, run_list); + + for_each_cpu_mask(i, sibling_map) { + runqueue_t *smt_rq = cpu_rq(i); + task_t *smt_curr = smt_rq->curr; /* * If a user task with lower static priority than the @@ -2165,14 +2604,17 @@ (smt_curr == smt_rq->idle && smt_rq->nr_running)) resched_task(smt_curr); } +out_unlock: + for_each_cpu_mask(i, sibling_map) + spin_unlock(&cpu_rq(i)->lock); return ret; } #else -static inline void wake_sleeping_dependent(int cpu, runqueue_t *rq) +static inline void wake_sleeping_dependent(int this_cpu, runqueue_t *this_rq) { } -static inline int dependent_sleeper(int cpu, runqueue_t *rq, task_t *p) +static inline int dependent_sleeper(int this_cpu, runqueue_t *this_rq) { return 0; } @@ -2209,7 +2651,17 @@ prev = current; rq = this_rq(); + /* + * The idle thread is not allowed to schedule! + * Remove this check after it has been exercised a bit. + */ + if (unlikely(current == rq->idle) && current->state != TASK_RUNNING) { + printk(KERN_ERR "bad: scheduling from the idle thread!\n"); + dump_stack(); + } + release_kernel_lock(prev); + schedstat_inc(rq, sched_cnt); now = sched_clock(); if (likely(now - prev->timestamp < NS_MAX_SLEEP_AVG)) run_time = now - prev->timestamp; @@ -2242,13 +2694,33 @@ cpu = smp_processor_id(); if (unlikely(!rq->nr_running)) { +go_idle: idle_balance(cpu, rq); if (!rq->nr_running) { next = rq->idle; rq->expired_timestamp = 0; wake_sleeping_dependent(cpu, rq); + /* + * wake_sleeping_dependent() might have released + * the runqueue, so break out if we got new + * tasks meanwhile: + */ + if (!rq->nr_running) + goto switch_tasks; + } + } else { + if (dependent_sleeper(cpu, rq)) { + schedstat_inc(rq, sched_goidle); + next = rq->idle; goto switch_tasks; } + /* + * dependent_sleeper() releases and reacquires the runqueue + * lock, hence go into the idle loop if the rq went + * empty meanwhile: + */ + if (unlikely(!rq->nr_running)) + goto go_idle; } array = rq->active; @@ -2256,22 +2728,19 @@ /* * Switch the active and expired arrays. */ + schedstat_inc(rq, sched_switch); rq->active = rq->expired; rq->expired = array; array = rq->active; rq->expired_timestamp = 0; rq->best_expired_prio = MAX_PRIO; - } + } else + schedstat_inc(rq, sched_noswitch); idx = sched_find_first_bit(array->bitmap); queue = array->queue + idx; next = list_entry(queue->next, task_t, run_list); - if (dependent_sleeper(cpu, rq, next)) { - next = rq->idle; - goto switch_tasks; - } - if (!rt_task(next) && next->activated > 0) { unsigned long long delta = now - next->timestamp; @@ -2297,6 +2766,7 @@ } prev->timestamp = now; + sched_info_switch(prev, next); if (likely(prev != next)) { next->timestamp = now; rq->nr_switches++; @@ -2313,7 +2783,7 @@ reacquire_kernel_lock(current); preempt_enable_no_resched(); - if (test_thread_flag(TIF_NEED_RESCHED)) + if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) goto need_resched; } @@ -2751,6 +3221,7 @@ policy != SCHED_NORMAL) goto out_unlock; } + profile_hit(SCHED_PROFILING, __builtin_return_address(0)); /* * Valid priorities for SCHED_FIFO and SCHED_RR are @@ -2891,6 +3362,17 @@ return retval; } +static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len, + cpumask_t *new_mask) +{ + if (len < sizeof(cpumask_t)) { + memset(new_mask, 0, sizeof(cpumask_t)); + } else if (len > sizeof(cpumask_t)) { + len = sizeof(cpumask_t); + } + return copy_from_user(new_mask, user_mask_ptr, len) ? -EFAULT : 0; +} + /** * sys_sched_setaffinity - set the cpu affinity of a process * @pid: pid of the process @@ -2904,11 +3386,9 @@ int retval; task_t *p; - if (len < sizeof(new_mask)) - return -EINVAL; - - if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask))) - return -EFAULT; + retval = get_user_cpu_mask(user_mask_ptr, len, &new_mask); + if (retval) + return retval; lock_cpu_hotplug(); read_lock(&tasklist_lock); @@ -3008,6 +3488,7 @@ prio_array_t *array = current->array; prio_array_t *target = rq->expired; + schedstat_inc(rq, yld_cnt); /* * We implement yielding by moving the task into the expired * queue. @@ -3015,9 +3496,16 @@ * (special rule: RT tasks will just roundrobin in the active * array.) */ - if (unlikely(rt_task(current))) + if (rt_task(current)) target = rq->active; + if (current->array->nr_active == 1) { + schedstat_inc(rq, yld_act_empty); + if (!rq->expired->nr_active) + schedstat_inc(rq, yld_both_empty); + } else if (!rq->expired->nr_active) + schedstat_inc(rq, yld_exp_empty); + dequeue_task(current, array); enqueue_task(current, target); @@ -3268,21 +3756,20 @@ void __devinit init_idle(task_t *idle, int cpu) { - runqueue_t *idle_rq = cpu_rq(cpu), *rq = cpu_rq(task_cpu(idle)); + runqueue_t *rq = cpu_rq(cpu); unsigned long flags; - local_irq_save(flags); - double_rq_lock(idle_rq, rq); - - idle_rq->curr = idle_rq->idle = idle; - deactivate_task(idle, rq); + idle->sleep_avg = 0; + idle->interactive_credit = 0; idle->array = NULL; idle->prio = MAX_PRIO; idle->state = TASK_RUNNING; set_task_cpu(idle, cpu); - double_rq_unlock(idle_rq, rq); + + spin_lock_irqsave(&rq->lock, flags); + rq->curr = rq->idle = idle; set_tsk_need_resched(idle); - local_irq_restore(flags); + spin_unlock_irqrestore(&rq->lock, flags); /* Set the preempt count _outside_ the spinlocks! */ #ifdef CONFIG_PREEMPT @@ -3364,7 +3851,7 @@ * Move (not current) task off this cpu, onto dest cpu. We're doing * this because either it can't run here any more (set_cpus_allowed() * away from this CPU, or CPU going down), or because we're - * attempting to rebalance this task on exec (sched_balance_exec). + * attempting to rebalance this task on exec (sched_exec). * * So we race with normal scheduler movements, but that's OK, as long * as the task is no longer on this CPU. @@ -3376,7 +3863,7 @@ if (unlikely(cpu_is_offline(dest_cpu))) return; - rq_src = cpu_rq(src_cpu); + rq_src = cpu_rq(src_cpu); rq_dest = cpu_rq(dest_cpu); double_rq_lock(rq_src, rq_dest); @@ -3481,49 +3968,52 @@ } #ifdef CONFIG_HOTPLUG_CPU -/* migrate_all_tasks - function to migrate all tasks from the dead cpu. */ -static void migrate_all_tasks(int src_cpu) +/* Figure out where task on dead CPU should go, use force if neccessary. */ +static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *tsk) { - struct task_struct *tsk, *t; int dest_cpu; - unsigned int node; + cpumask_t mask; - write_lock_irq(&tasklist_lock); + /* On same node? */ + mask = node_to_cpumask(cpu_to_node(dead_cpu)); + cpus_and(mask, mask, tsk->cpus_allowed); + dest_cpu = any_online_cpu(mask); + + /* On any allowed CPU? */ + if (dest_cpu == NR_CPUS) + dest_cpu = any_online_cpu(tsk->cpus_allowed); + + /* No more Mr. Nice Guy. */ + if (dest_cpu == NR_CPUS) { + cpus_setall(tsk->cpus_allowed); + dest_cpu = any_online_cpu(tsk->cpus_allowed); - /* watch out for per node tasks, let's stay on this node */ - node = cpu_to_node(src_cpu); + /* + * Don't tell them about moving exiting tasks or + * kernel threads (both mm NULL), since they never + * leave kernel. + */ + if (tsk->mm && printk_ratelimit()) + printk(KERN_INFO "process %d (%s) no " + "longer affine to cpu%d\n", + tsk->pid, tsk->comm, dead_cpu); + } + __migrate_task(tsk, dead_cpu, dest_cpu); +} + +/* Run through task list and migrate tasks from the dead cpu. */ +static void migrate_live_tasks(int src_cpu) +{ + struct task_struct *tsk, *t; + + write_lock_irq(&tasklist_lock); do_each_thread(t, tsk) { - cpumask_t mask; if (tsk == current) continue; - if (task_cpu(tsk) != src_cpu) - continue; - - /* Figure out where this task should go (attempting to - * keep it on-node), and check if it can be migrated - * as-is. NOTE that kernel threads bound to more than - * one online cpu will be migrated. */ - mask = node_to_cpumask(node); - cpus_and(mask, mask, tsk->cpus_allowed); - dest_cpu = any_online_cpu(mask); - if (dest_cpu == NR_CPUS) - dest_cpu = any_online_cpu(tsk->cpus_allowed); - if (dest_cpu == NR_CPUS) { - cpus_setall(tsk->cpus_allowed); - dest_cpu = any_online_cpu(tsk->cpus_allowed); - - /* Don't tell them about moving exiting tasks - or kernel threads (both mm NULL), since - they never leave kernel. */ - if (tsk->mm && printk_ratelimit()) - printk(KERN_INFO "process %d (%s) no " - "longer affine to cpu%d\n", - tsk->pid, tsk->comm, src_cpu); - } - - __migrate_task(tsk, src_cpu, dest_cpu); + if (task_cpu(tsk) == src_cpu) + move_task_off_dead_cpu(src_cpu, tsk); } while_each_thread(t, tsk); write_unlock_irq(&tasklist_lock); @@ -3554,6 +4044,47 @@ spin_unlock_irqrestore(&rq->lock, flags); } + +static void migrate_dead(unsigned int dead_cpu, task_t *tsk) +{ + struct runqueue *rq = cpu_rq(dead_cpu); + + /* Must be exiting, otherwise would be on tasklist. */ + BUG_ON(tsk->state != TASK_ZOMBIE && tsk->state != TASK_DEAD); + + /* Cannot have done final schedule yet: would have vanished. */ + BUG_ON(tsk->flags & PF_DEAD); + + get_task_struct(tsk); + + /* + * Drop lock around migration; if someone else moves it, + * that's OK. No task can be added to this CPU, so iteration is + * fine. + */ + spin_unlock_irq(&rq->lock); + move_task_off_dead_cpu(dead_cpu, tsk); + spin_lock_irq(&rq->lock); + + put_task_struct(tsk); +} + +/* release_task() removes task from tasklist, so we won't find dead tasks. */ +static void migrate_dead_tasks(unsigned int dead_cpu) +{ + unsigned arr, i; + struct runqueue *rq = cpu_rq(dead_cpu); + + for (arr = 0; arr < 2; arr++) { + for (i = 0; i < MAX_PRIO; i++) { + struct list_head *list = &rq->arrays[arr].queue[i]; + while (!list_empty(list)) + migrate_dead(dead_cpu, + list_entry(list->next, task_t, + run_list)); + } + } +} #endif /* CONFIG_HOTPLUG_CPU */ /* @@ -3593,7 +4124,7 @@ cpu_rq(cpu)->migration_thread = NULL; break; case CPU_DEAD: - migrate_all_tasks(cpu); + migrate_live_tasks(cpu); rq = cpu_rq(cpu); kthread_stop(rq->migration_thread); rq->migration_thread = NULL; @@ -3602,8 +4133,9 @@ deactivate_task(rq->idle, rq); rq->idle->static_prio = MAX_PRIO; __setscheduler(rq->idle, SCHED_NORMAL, 0); + migrate_dead_tasks(cpu); task_rq_unlock(rq, &flags); - BUG_ON(rq->nr_running != 0); + BUG_ON(rq->nr_running != 0); /* No need to migrate the tasks: it was best-effort if * they didn't do lock_cpu_hotplug(). Just wake up @@ -3618,7 +4150,7 @@ complete(&req->done); } spin_unlock_irq(&rq->lock); - break; + break; #endif } return NOTIFY_OK; @@ -3660,7 +4192,7 @@ #ifdef CONFIG_SMP /* Attach the domain 'sd' to 'cpu' as its base domain */ -void cpu_attach_domain(struct sched_domain *sd, int cpu) +static void cpu_attach_domain(struct sched_domain *sd, int cpu) { migration_req_t req; unsigned long flags; @@ -3691,123 +4223,335 @@ unlock_cpu_hotplug(); } -#ifdef ARCH_HAS_SCHED_DOMAIN -extern void __init arch_init_sched_domains(void); -#else -static struct sched_group sched_group_cpus[NR_CPUS]; -static DEFINE_PER_CPU(struct sched_domain, cpu_domains); #ifdef CONFIG_NUMA -static struct sched_group sched_group_nodes[MAX_NUMNODES]; -static DEFINE_PER_CPU(struct sched_domain, node_domains); -static void __init arch_init_sched_domains(void) +/** + * find_next_best_node - find the next node to include in a sched_domain + * @node: node whose sched_domain we're building + * @used_nodes: nodes already in the sched_domain + * + * Find the next node to include in a given scheduling domain. Simply + * finds the closest node not already in the @used_nodes map. + * + * Should use nodemask_t. + */ +static int __init find_next_best_node(int node, unsigned long *used_nodes) +{ + int i, n, val, min_val, best_node = 0; + + min_val = INT_MAX; + + for (i = 0; i < numnodes; i++) { + /* Start at @node */ + n = (node + i) % numnodes; + + /* Skip already used nodes */ + if (test_bit(n, used_nodes)) + continue; + + /* Simple min distance search */ + val = node_distance(node, i); + + if (val < min_val) { + min_val = val; + best_node = n; + } + } + + set_bit(best_node, used_nodes); + return best_node; +} + +/** + * sched_domain_node_span - get a cpumask for a node's sched_domain + * @node: node whose cpumask we're constructing + * @size: number of nodes to include in this span + * + * Given a node, construct a good cpumask for its sched_domain to span. It + * should be one that prevents unnecessary balancing, but also spreads tasks + * out optimally. + */ +cpumask_t __init sched_domain_node_span(int node, int size) { int i; - struct sched_group *first_node = NULL, *last_node = NULL; + cpumask_t span; + DECLARE_BITMAP(used_nodes, MAX_NUMNODES); - /* Set up domains */ - for_each_cpu(i) { - int node = cpu_to_node(i); - cpumask_t nodemask = node_to_cpumask(node); - struct sched_domain *node_sd = &per_cpu(node_domains, i); - struct sched_domain *cpu_sd = &per_cpu(cpu_domains, i); - - *node_sd = SD_NODE_INIT; - node_sd->span = cpu_possible_map; - node_sd->groups = &sched_group_nodes[cpu_to_node(i)]; - - *cpu_sd = SD_CPU_INIT; - cpus_and(cpu_sd->span, nodemask, cpu_possible_map); - cpu_sd->groups = &sched_group_cpus[i]; - cpu_sd->parent = node_sd; + cpus_clear(span); + bitmap_zero(used_nodes, MAX_NUMNODES); + + for (i = 0; i < size; i++) { + int next_node = find_next_best_node(node, used_nodes); + cpumask_t nodemask; + + nodemask = node_to_cpumask(next_node); + cpus_or(span, span, nodemask); } - /* Set up groups */ - for (i = 0; i < MAX_NUMNODES; i++) { - cpumask_t tmp = node_to_cpumask(i); - cpumask_t nodemask; - struct sched_group *first_cpu = NULL, *last_cpu = NULL; - struct sched_group *node = &sched_group_nodes[i]; - int j; + return span; +} +#endif /* CONFIG_NUMA */ - cpus_and(nodemask, tmp, cpu_possible_map); +#ifdef CONFIG_SCHED_SMT +static DEFINE_PER_CPU(struct sched_domain, cpu_domains); +static struct sched_group sched_group_cpus[NR_CPUS]; +__init static int cpu_to_cpu_group(int cpu) +{ + return cpu; +} +#endif - if (cpus_empty(nodemask)) - continue; +static DEFINE_PER_CPU(struct sched_domain, phys_domains); +static struct sched_group sched_group_phys[NR_CPUS]; +__init static int cpu_to_phys_group(int cpu) +{ +#ifdef CONFIG_SCHED_SMT + return first_cpu(cpu_sibling_map[cpu]); +#else + return cpu; +#endif +} + +#ifdef CONFIG_NUMA - node->cpumask = nodemask; - node->cpu_power = SCHED_LOAD_SCALE * cpus_weight(node->cpumask); +/* Number of nearby nodes in a node's scheduling domain */ +#define SD_NODES_PER_DOMAIN 4 - for_each_cpu_mask(j, node->cpumask) { - struct sched_group *cpu = &sched_group_cpus[j]; +static DEFINE_PER_CPU(struct sched_domain, node_domains); +static struct sched_group sched_group_nodes[MAX_NUMNODES]; +__init static int cpu_to_node_group(int cpu) +{ + return cpu_to_node(cpu); +} +#endif - cpus_clear(cpu->cpumask); - cpu_set(j, cpu->cpumask); - cpu->cpu_power = SCHED_LOAD_SCALE; +/* Groups for isolated scheduling domains */ +static struct sched_group sched_group_isolated[NR_CPUS]; - if (!first_cpu) - first_cpu = cpu; - if (last_cpu) - last_cpu->next = cpu; - last_cpu = cpu; - } - last_cpu->next = first_cpu; +/* cpus with isolated domains */ +cpumask_t __initdata cpu_isolated_map = CPU_MASK_NONE; - if (!first_node) - first_node = node; - if (last_node) - last_node->next = node; - last_node = node; - } - last_node->next = first_node; +__init static int cpu_to_isolated_group(int cpu) +{ + return cpu; +} - mb(); - for_each_cpu(i) { - struct sched_domain *cpu_sd = &per_cpu(cpu_domains, i); - cpu_attach_domain(cpu_sd, i); +/* Setup the mask of cpus configured for isolated domains */ +static int __init isolated_cpu_setup(char *str) +{ + int ints[NR_CPUS], i; + + str = get_options(str, ARRAY_SIZE(ints), ints); + cpus_clear(cpu_isolated_map); + for (i = 1; i <= ints[0]; i++) + cpu_set(ints[i], cpu_isolated_map); + return 1; +} + +__setup ("isolcpus=", isolated_cpu_setup); + +/* + * init_sched_build_groups takes an array of groups, the cpumask we wish + * to span, and a pointer to a function which identifies what group a CPU + * belongs to. The return value of group_fn must be a valid index into the + * groups[] array, and must be >= 0 and < NR_CPUS (due to the fact that we + * keep track of groups covered with a cpumask_t). + * + * init_sched_build_groups will build a circular linked list of the groups + * covered by the given span, and will set each group's ->cpumask correctly, + * and ->cpu_power to 0. + */ +__init static void init_sched_build_groups(struct sched_group groups[], + cpumask_t span, int (*group_fn)(int cpu)) +{ + struct sched_group *first = NULL, *last = NULL; + cpumask_t covered = CPU_MASK_NONE; + int i; + + for_each_cpu_mask(i, span) { + int group = group_fn(i); + struct sched_group *sg = &groups[group]; + int j; + + if (cpu_isset(i, covered)) + continue; + + sg->cpumask = CPU_MASK_NONE; + sg->cpu_power = 0; + + for_each_cpu_mask(j, span) { + if (group_fn(j) != group) + continue; + + cpu_set(j, covered); + cpu_set(j, sg->cpumask); + } + if (!first) + first = sg; + if (last) + last->next = sg; + last = sg; } + last->next = first; } -#else /* !CONFIG_NUMA */ -static void __init arch_init_sched_domains(void) +__init static void arch_init_sched_domains(void) { int i; - struct sched_group *first_cpu = NULL, *last_cpu = NULL; + cpumask_t cpu_default_map; + + /* + * Setup mask for cpus without special case scheduling requirements. + * For now this just excludes isolated cpus, but could be used to + * exclude other special cases in the future. + */ + cpus_complement(cpu_default_map, cpu_isolated_map); + cpus_and(cpu_default_map, cpu_default_map, cpu_possible_map); /* Set up domains */ for_each_cpu(i) { - struct sched_domain *cpu_sd = &per_cpu(cpu_domains, i); + int group; + struct sched_domain *sd = NULL, *p; + cpumask_t nodemask = node_to_cpumask(cpu_to_node(i)); + + cpus_and(nodemask, nodemask, cpu_default_map); + + /* + * Set up isolated domains. + * Unlike those of other cpus, the domains and groups are + * single level, and span a single cpu. + */ + if (cpu_isset(i, cpu_isolated_map)) { +#ifdef CONFIG_SCHED_SMT + sd = &per_cpu(cpu_domains, i); +#else + sd = &per_cpu(phys_domains, i); +#endif + group = cpu_to_isolated_group(i); + *sd = SD_CPU_INIT; + cpu_set(i, sd->span); + sd->balance_interval = INT_MAX; /* Don't balance */ + sd->flags = 0; /* Avoid WAKE_ */ + sd->groups = &sched_group_isolated[group]; + printk(KERN_INFO "Setting up cpu %d isolated.\n", i); + /* Single level, so continue with next cpu */ + continue; + } + +#ifdef CONFIG_NUMA + sd = &per_cpu(node_domains, i); + group = cpu_to_node_group(i); + *sd = SD_NODE_INIT; + /* FIXME: should be multilevel, in arch code */ + sd->span = sched_domain_node_span(i, SD_NODES_PER_DOMAIN); + cpus_and(sd->span, sd->span, cpu_default_map); + sd->groups = &sched_group_nodes[group]; +#endif - *cpu_sd = SD_CPU_INIT; - cpu_sd->span = cpu_possible_map; - cpu_sd->groups = &sched_group_cpus[i]; + p = sd; + sd = &per_cpu(phys_domains, i); + group = cpu_to_phys_group(i); + *sd = SD_CPU_INIT; +#ifdef CONFIG_NUMA + sd->span = nodemask; +#else + sd->span = cpu_possible_map; +#endif + sd->parent = p; + sd->groups = &sched_group_phys[group]; + +#ifdef CONFIG_SCHED_SMT + p = sd; + sd = &per_cpu(cpu_domains, i); + group = cpu_to_cpu_group(i); + *sd = SD_SIBLING_INIT; + sd->span = cpu_sibling_map[i]; + cpus_and(sd->span, sd->span, cpu_default_map); + sd->parent = p; + sd->groups = &sched_group_cpus[group]; +#endif } - /* Set up CPU groups */ - for_each_cpu_mask(i, cpu_possible_map) { - struct sched_group *cpu = &sched_group_cpus[i]; +#ifdef CONFIG_SCHED_SMT + /* Set up CPU (sibling) groups */ + for_each_cpu(i) { + cpumask_t this_sibling_map = cpu_sibling_map[i]; + cpus_and(this_sibling_map, this_sibling_map, cpu_default_map); + if (i != first_cpu(this_sibling_map)) + continue; - cpus_clear(cpu->cpumask); - cpu_set(i, cpu->cpumask); - cpu->cpu_power = SCHED_LOAD_SCALE; + init_sched_build_groups(sched_group_cpus, this_sibling_map, + &cpu_to_cpu_group); + } +#endif - if (!first_cpu) - first_cpu = cpu; - if (last_cpu) - last_cpu->next = cpu; - last_cpu = cpu; + /* Set up isolated groups */ + for_each_cpu_mask(i, cpu_isolated_map) { + cpumask_t mask; + cpus_clear(mask); + cpu_set(i, mask); + init_sched_build_groups(sched_group_isolated, mask, + &cpu_to_isolated_group); } - last_cpu->next = first_cpu; - mb(); /* domains were modified outside the lock */ +#ifdef CONFIG_NUMA + /* Set up physical groups */ + for (i = 0; i < MAX_NUMNODES; i++) { + cpumask_t nodemask = node_to_cpumask(i); + + cpus_and(nodemask, nodemask, cpu_default_map); + if (cpus_empty(nodemask)) + continue; + + init_sched_build_groups(sched_group_phys, nodemask, + &cpu_to_phys_group); + } +#else + init_sched_build_groups(sched_group_phys, cpu_possible_map, + &cpu_to_phys_group); +#endif + +#ifdef CONFIG_NUMA + /* Set up node groups */ + init_sched_build_groups(sched_group_nodes, cpu_default_map, + &cpu_to_node_group); +#endif + + /* Calculate CPU power for physical packages and nodes */ + for_each_cpu_mask(i, cpu_default_map) { + int power; + struct sched_domain *sd; +#ifdef CONFIG_SCHED_SMT + sd = &per_cpu(cpu_domains, i); + power = SCHED_LOAD_SCALE; + sd->groups->cpu_power = power; +#endif + + sd = &per_cpu(phys_domains, i); + power = SCHED_LOAD_SCALE + SCHED_LOAD_SCALE * + (cpus_weight(sd->groups->cpumask)-1) / 10; + sd->groups->cpu_power = power; + +#ifdef CONFIG_NUMA + if (i == first_cpu(sd->groups->cpumask)) { + /* Only add "power" once for each physical package. */ + sd = &per_cpu(node_domains, i); + sd->groups->cpu_power += power; + } +#endif + } + + /* Attach the domains */ for_each_cpu(i) { - struct sched_domain *cpu_sd = &per_cpu(cpu_domains, i); - cpu_attach_domain(cpu_sd, i); + struct sched_domain *sd; +#ifdef CONFIG_SCHED_SMT + sd = &per_cpu(cpu_domains, i); +#else + sd = &per_cpu(phys_domains, i); +#endif + cpu_attach_domain(sd, i); } } -#endif /* CONFIG_NUMA */ -#endif /* ARCH_HAS_SCHED_DOMAIN */ - #define SCHED_DOMAIN_DEBUG #ifdef SCHED_DOMAIN_DEBUG void sched_domain_debug(void) @@ -3959,21 +4703,20 @@ __set_bit(MAX_PRIO, array->bitmap); } } - /* - * We have to do a little magic to get the first - * thread right in SMP mode. - */ - rq = this_rq(); - rq->curr = current; - rq->idle = current; - set_task_cpu(current, smp_processor_id()); - wake_up_forked_process(current); /* * The boot idle thread does lazy MMU switching as well: */ atomic_inc(&init_mm.mm_count); enter_lazy_tlb(&init_mm, current); + + /* + * Make us the idle thread. Technically, schedule() should not be + * called from this thread, however somewhere below it might be, + * but because we are the idle thread, we just pick up running again + * when this runqueue becomes "idle". + */ + init_idle(current, smp_processor_id()); } #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP diff -Nru a/kernel/signal.c b/kernel/signal.c --- a/kernel/signal.c 2004-09-06 16:37:52 -07:00 +++ b/kernel/signal.c 2004-09-06 16:37:52 -07:00 @@ -26,6 +26,8 @@ #include #include +extern void k_getrusage(struct task_struct *, int, struct rusage *); + /* * SLAB caches for signal bits. */ @@ -367,6 +369,22 @@ if (tsk == sig->curr_target) sig->curr_target = next_thread(tsk); tsk->signal = NULL; + /* + * Accumulate here the counters for all threads but the + * group leader as they die, so they can be added into + * the process-wide totals when those are taken. + * The group leader stays around as a zombie as long + * as there are other threads. When it gets reaped, + * the exit.c code will add its counts into these totals. + * We won't ever get here for the group leader, since it + * will have been the last reference on the signal_struct. + */ + sig->utime += tsk->utime; + sig->stime += tsk->stime; + sig->min_flt += tsk->min_flt; + sig->maj_flt += tsk->maj_flt; + sig->nvcsw += tsk->nvcsw; + sig->nivcsw += tsk->nivcsw; spin_unlock(&sighand->siglock); sig = NULL; /* Marker for below. */ } @@ -660,12 +678,15 @@ * the SIGCHLD was pending on entry to this kill. */ p->signal->group_stop_count = 0; + p->signal->stop_state = 1; + spin_unlock(&p->sighand->siglock); if (p->ptrace & PT_PTRACED) do_notify_parent_cldstop(p, p->parent); else do_notify_parent_cldstop( p->group_leader, p->group_leader->real_parent); + spin_lock(&p->sighand->siglock); } rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending); t = p; @@ -696,6 +717,23 @@ t = next_thread(t); } while (t != p); + + if (p->signal->stop_state > 0) { + /* + * We were in fact stopped, and are now continued. + * Notify the parent with CLD_CONTINUED. + */ + p->signal->stop_state = -1; + p->signal->group_exit_code = 0; + spin_unlock(&p->sighand->siglock); + if (p->ptrace & PT_PTRACED) + do_notify_parent_cldstop(p, p->parent); + else + do_notify_parent_cldstop( + p->group_leader, + p->group_leader->real_parent); + spin_lock(&p->sighand->siglock); + } } } @@ -1072,8 +1110,6 @@ int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp) { struct task_struct *p; - struct list_head *l; - struct pid *pid; int retval, success; if (pgrp <= 0) @@ -1081,11 +1117,11 @@ success = 0; retval = -ESRCH; - for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) { + do_each_task_pid(pgrp, PIDTYPE_PGID, p) { int err = group_send_sig_info(sig, info, p); success |= !err; retval = err; - } + } while_each_task_pid(pgrp, PIDTYPE_PGID, p); return success ? 0 : retval; } @@ -1112,8 +1148,6 @@ kill_sl_info(int sig, struct siginfo *info, pid_t sid) { int err, retval = -EINVAL; - struct pid *pid; - struct list_head *l; struct task_struct *p; if (sid <= 0) @@ -1121,13 +1155,13 @@ retval = -ESRCH; read_lock(&tasklist_lock); - for_each_task_pid(sid, PIDTYPE_SID, p, l, pid) { + do_each_task_pid(sid, PIDTYPE_SID, p) { if (!p->signal->leader) continue; err = group_send_sig_info(sig, info, p); if (retval) retval = err; - } + } while_each_task_pid(sid, PIDTYPE_SID, p); read_unlock(&tasklist_lock); out: return retval; @@ -1243,6 +1277,25 @@ force_sig_info(sig, (void*)1L, p); } +/* + * When things go south during signal handling, we + * will force a SIGSEGV. And if the signal that caused + * the problem was already a SIGSEGV, we'll want to + * make sure we don't even try to deliver the signal.. + */ +int +force_sigsegv(int sig, struct task_struct *p) +{ + if (sig == SIGSEGV) { + unsigned long flags; + spin_lock_irqsave(&p->sighand->siglock, flags); + p->sighand->action[sig - 1].sa.sa_handler = SIG_DFL; + spin_unlock_irqrestore(&p->sighand->siglock, flags); + } + force_sig(SIGSEGV, p); + return 0; +} + int kill_pg(pid_t pgrp, int sig, int priv) { @@ -1436,8 +1489,8 @@ if (sig == -1) BUG(); - BUG_ON(tsk->group_leader != tsk && tsk->group_leader->state != TASK_ZOMBIE && !tsk->ptrace); - BUG_ON(tsk->group_leader == tsk && !thread_group_empty(tsk) && !tsk->ptrace); + BUG_ON(!tsk->ptrace && + (tsk->group_leader != tsk || !thread_group_empty(tsk))); info.si_signo = sig; info.si_errno = 0; @@ -1445,8 +1498,9 @@ info.si_uid = tsk->uid; /* FIXME: find out whether or not this is supposed to be c*time. */ - info.si_utime = tsk->utime; - info.si_stime = tsk->stime; + info.si_utime = tsk->utime + tsk->signal->utime; + info.si_stime = tsk->stime + tsk->signal->stime; + k_getrusage(tsk, RUSAGE_BOTH, &info.si_rusage); status = tsk->exit_code & 0x7f; why = SI_KERNEL; /* shouldn't happen */ @@ -1536,9 +1590,16 @@ /* FIXME: find out whether or not this is supposed to be c*time. */ info.si_utime = tsk->utime; info.si_stime = tsk->stime; + k_getrusage(tsk, RUSAGE_BOTH, &info.si_rusage); - info.si_status = tsk->exit_code & 0x7f; - info.si_code = CLD_STOPPED; + info.si_status = (tsk->signal ? tsk->signal->group_exit_code : + tsk->exit_code) & 0x7f; + if (info.si_status == 0) { + info.si_status = SIGCONT; + info.si_code = CLD_CONTINUED; + } else { + info.si_code = CLD_STOPPED; + } sighand = parent->sighand; spin_lock_irqsave(&sighand->siglock, flags); @@ -1604,14 +1665,17 @@ stop_count = --sig->group_stop_count; current->exit_code = signr; set_current_state(TASK_STOPPED); + if (stop_count == 0) + sig->stop_state = 1; spin_unlock_irq(&sighand->siglock); } else if (thread_group_empty(current)) { /* * Lock must be held through transition to stopped state. */ - current->exit_code = signr; + current->exit_code = current->signal->group_exit_code = signr; set_current_state(TASK_STOPPED); + sig->stop_state = 1; spin_unlock_irq(&sighand->siglock); } else { @@ -1677,6 +1741,8 @@ current->exit_code = signr; set_current_state(TASK_STOPPED); + if (stop_count == 0) + sig->stop_state = 1; spin_unlock_irq(&sighand->siglock); read_unlock(&tasklist_lock); @@ -1717,6 +1783,8 @@ * without any associated signal being in our queue. */ stop_count = --current->signal->group_stop_count; + if (stop_count == 0) + current->signal->stop_state = 1; current->exit_code = current->signal->group_exit_code; set_current_state(TASK_STOPPED); spin_unlock_irq(¤t->sighand->siglock); @@ -1724,7 +1792,8 @@ return 1; } -int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie) +int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, + struct pt_regs *regs, void *cookie) { sigset_t *mask = ¤t->blocked; int signr = 0; @@ -1793,8 +1862,15 @@ ka = ¤t->sighand->action[signr-1]; if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */ continue; - if (ka->sa.sa_handler != SIG_DFL) /* Run the handler. */ + if (ka->sa.sa_handler != SIG_DFL) { + /* Run the handler. */ + *return_ka = *ka; + + if (ka->sa.sa_flags & SA_ONESHOT) + ka->sa.sa_handler = SIG_DFL; + break; /* will return non-zero "signr" value */ + } /* * Now we are doing the default action for this signal. @@ -2071,6 +2147,8 @@ err |= __put_user(from->si_status, &to->si_status); err |= __put_user(from->si_utime, &to->si_utime); err |= __put_user(from->si_stime, &to->si_stime); + err |= __copy_to_user(&to->si_rusage, &from->si_rusage, + sizeof(to->si_rusage)); break; case __SI_RT: /* This is not generated by the kernel as of now. */ case __SI_MESGQ: /* But this is */ diff -Nru a/kernel/spinlock.c b/kernel/spinlock.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/kernel/spinlock.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,258 @@ +/* + * Copyright (2004) Linus Torvalds + * + * Author: Zwane Mwaikambo + */ + +#include +#include +#include +#include +#include +#include + +int __lockfunc _spin_trylock(spinlock_t *lock) +{ + preempt_disable(); + if (_raw_spin_trylock(lock)) + return 1; + + preempt_enable(); + return 0; +} +EXPORT_SYMBOL(_spin_trylock); + +int __lockfunc _write_trylock(rwlock_t *lock) +{ + preempt_disable(); + if (_raw_write_trylock(lock)) + return 1; + + preempt_enable(); + return 0; +} +EXPORT_SYMBOL(_write_trylock); + +#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) +void __lockfunc _spin_lock(spinlock_t *lock) +{ + preempt_disable(); + if (unlikely(!_raw_spin_trylock(lock))) + __preempt_spin_lock(lock); +} + +void __lockfunc _write_lock(rwlock_t *lock) +{ + preempt_disable(); + if (unlikely(!_raw_write_trylock(lock))) + __preempt_write_lock(lock); +} +#else +void __lockfunc _spin_lock(spinlock_t *lock) +{ + preempt_disable(); + _raw_spin_lock(lock); +} + +void __lockfunc _write_lock(rwlock_t *lock) +{ + preempt_disable(); + _raw_write_lock(lock); +} +#endif +EXPORT_SYMBOL(_spin_lock); +EXPORT_SYMBOL(_write_lock); + +void __lockfunc _read_lock(rwlock_t *lock) +{ + preempt_disable(); + _raw_read_lock(lock); +} +EXPORT_SYMBOL(_read_lock); + +void __lockfunc _spin_unlock(spinlock_t *lock) +{ + _raw_spin_unlock(lock); + preempt_enable(); +} +EXPORT_SYMBOL(_spin_unlock); + +void __lockfunc _write_unlock(rwlock_t *lock) +{ + _raw_write_unlock(lock); + preempt_enable(); +} +EXPORT_SYMBOL(_write_unlock); + +void __lockfunc _read_unlock(rwlock_t *lock) +{ + _raw_read_unlock(lock); + preempt_enable(); +} +EXPORT_SYMBOL(_read_unlock); + +unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) +{ + unsigned long flags; + + local_irq_save(flags); + preempt_disable(); + _raw_spin_lock_flags(lock, flags); + return flags; +} +EXPORT_SYMBOL(_spin_lock_irqsave); + +void __lockfunc _spin_lock_irq(spinlock_t *lock) +{ + local_irq_disable(); + preempt_disable(); + _raw_spin_lock(lock); +} +EXPORT_SYMBOL(_spin_lock_irq); + +void __lockfunc _spin_lock_bh(spinlock_t *lock) +{ + local_bh_disable(); + preempt_disable(); + _raw_spin_lock(lock); +} +EXPORT_SYMBOL(_spin_lock_bh); + +unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) +{ + unsigned long flags; + + local_irq_save(flags); + preempt_disable(); + _raw_read_lock(lock); + return flags; +} +EXPORT_SYMBOL(_read_lock_irqsave); + +void __lockfunc _read_lock_irq(rwlock_t *lock) +{ + local_irq_disable(); + preempt_disable(); + _raw_read_lock(lock); +} +EXPORT_SYMBOL(_read_lock_irq); + +void __lockfunc _read_lock_bh(rwlock_t *lock) +{ + local_bh_disable(); + preempt_disable(); + _raw_read_lock(lock); +} +EXPORT_SYMBOL(_read_lock_bh); + +unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) +{ + unsigned long flags; + + local_irq_save(flags); + preempt_disable(); + _raw_write_lock(lock); + return flags; +} +EXPORT_SYMBOL(_write_lock_irqsave); + +void __lockfunc _write_lock_irq(rwlock_t *lock) +{ + local_irq_disable(); + preempt_disable(); + _raw_write_lock(lock); +} +EXPORT_SYMBOL(_write_lock_irq); + +void __lockfunc _write_lock_bh(rwlock_t *lock) +{ + local_bh_disable(); + preempt_disable(); + _raw_write_lock(lock); +} +EXPORT_SYMBOL(_write_lock_bh); + +void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) +{ + _raw_spin_unlock(lock); + local_irq_restore(flags); + preempt_enable(); +} +EXPORT_SYMBOL(_spin_unlock_irqrestore); + +void __lockfunc _spin_unlock_irq(spinlock_t *lock) +{ + _raw_spin_unlock(lock); + local_irq_enable(); + preempt_enable(); +} +EXPORT_SYMBOL(_spin_unlock_irq); + +void __lockfunc _spin_unlock_bh(spinlock_t *lock) +{ + _raw_spin_unlock(lock); + preempt_enable(); + local_bh_enable(); +} +EXPORT_SYMBOL(_spin_unlock_bh); + +void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) +{ + _raw_read_unlock(lock); + local_irq_restore(flags); + preempt_enable(); +} +EXPORT_SYMBOL(_read_unlock_irqrestore); + +void __lockfunc _read_unlock_irq(rwlock_t *lock) +{ + _raw_read_unlock(lock); + local_irq_enable(); + preempt_enable(); +} +EXPORT_SYMBOL(_read_unlock_irq); + +void __lockfunc _read_unlock_bh(rwlock_t *lock) +{ + _raw_read_unlock(lock); + preempt_enable(); + local_bh_enable(); +} +EXPORT_SYMBOL(_read_unlock_bh); + +void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) +{ + _raw_write_unlock(lock); + local_irq_restore(flags); + preempt_enable(); +} +EXPORT_SYMBOL(_write_unlock_irqrestore); + +void __lockfunc _write_unlock_irq(rwlock_t *lock) +{ + _raw_write_unlock(lock); + local_irq_enable(); + preempt_enable(); +} +EXPORT_SYMBOL(_write_unlock_irq); + +void __lockfunc _write_unlock_bh(rwlock_t *lock) +{ + _raw_write_unlock(lock); + preempt_enable(); + local_bh_enable(); +} +EXPORT_SYMBOL(_write_unlock_bh); + +int __lockfunc _spin_trylock_bh(spinlock_t *lock) +{ + local_bh_disable(); + preempt_disable(); + if (_raw_spin_trylock(lock)) + return 1; + + preempt_enable(); + local_bh_enable(); + return 0; +} +EXPORT_SYMBOL(_spin_trylock_bh); diff -Nru a/kernel/sys.c b/kernel/sys.c --- a/kernel/sys.c 2004-09-06 16:37:50 -07:00 +++ b/kernel/sys.c 2004-09-06 16:37:50 -07:00 @@ -310,8 +310,6 @@ { struct task_struct *g, *p; struct user_struct *user; - struct pid *pid; - struct list_head *l; int error = -EINVAL; if (which > 2 || which < 0) @@ -336,8 +334,9 @@ case PRIO_PGRP: if (!who) who = process_group(current); - for_each_task_pid(who, PIDTYPE_PGID, p, l, pid) + do_each_task_pid(who, PIDTYPE_PGID, p) { error = set_one_prio(p, niceval, error); + } while_each_task_pid(who, PIDTYPE_PGID, p); break; case PRIO_USER: if (!who) @@ -371,8 +370,6 @@ asmlinkage long sys_getpriority(int which, int who) { struct task_struct *g, *p; - struct list_head *l; - struct pid *pid; struct user_struct *user; long niceval, retval = -ESRCH; @@ -394,11 +391,11 @@ case PRIO_PGRP: if (!who) who = process_group(current); - for_each_task_pid(who, PIDTYPE_PGID, p, l, pid) { + do_each_task_pid(who, PIDTYPE_PGID, p) { niceval = 20 - task_nice(p); if (niceval > retval) retval = niceval; - } + } while_each_task_pid(who, PIDTYPE_PGID, p); break; case PRIO_USER: if (!who) @@ -947,10 +944,39 @@ */ if (tbuf) { struct tms tmp; - tmp.tms_utime = jiffies_to_clock_t(current->utime); - tmp.tms_stime = jiffies_to_clock_t(current->stime); - tmp.tms_cutime = jiffies_to_clock_t(current->cutime); - tmp.tms_cstime = jiffies_to_clock_t(current->cstime); + struct task_struct *tsk = current; + struct task_struct *t; + unsigned long utime, stime, cutime, cstime; + + read_lock(&tasklist_lock); + utime = tsk->signal->utime; + stime = tsk->signal->stime; + t = tsk; + do { + utime += t->utime; + stime += t->stime; + t = next_thread(t); + } while (t != tsk); + + /* + * While we have tasklist_lock read-locked, no dying thread + * can be updating current->signal->[us]time. Instead, + * we got their counts included in the live thread loop. + * However, another thread can come in right now and + * do a wait call that updates current->signal->c[us]time. + * To make sure we always see that pair updated atomically, + * we take the siglock around fetching them. + */ + spin_lock_irq(&tsk->sighand->siglock); + cutime = tsk->signal->cutime; + cstime = tsk->signal->cstime; + spin_unlock_irq(&tsk->sighand->siglock); + read_unlock(&tasklist_lock); + + tmp.tms_utime = jiffies_to_clock_t(utime); + tmp.tms_stime = jiffies_to_clock_t(stime); + tmp.tms_cutime = jiffies_to_clock_t(cutime); + tmp.tms_cstime = jiffies_to_clock_t(cstime); if (copy_to_user(tbuf, &tmp, sizeof(struct tms))) return -EFAULT; } @@ -1015,12 +1041,11 @@ if (pgid != pid) { struct task_struct *p; - struct pid *pid; - struct list_head *l; - for_each_task_pid(pgid, PIDTYPE_PGID, p, l, pid) + do_each_task_pid(pgid, PIDTYPE_PGID, p) { if (p->signal->session == current->signal->session) goto ok_pgid; + } while_each_task_pid(pgid, PIDTYPE_PGID, p); goto out; } @@ -1533,50 +1558,101 @@ * a lot simpler! (Which we're not doing right now because we're not * measuring them yet). * - * This is SMP safe. Either we are called from sys_getrusage on ourselves - * below (we know we aren't going to exit/disappear and only we change our - * rusage counters), or we are called from wait4() on a process which is - * either stopped or zombied. In the zombied case the task won't get - * reaped till shortly after the call to getrusage(), in both cases the - * task being examined is in a frozen state so the counters won't change. + * This expects to be called with tasklist_lock read-locked or better, + * and the siglock not locked. It may momentarily take the siglock. + * + * When sampling multiple threads for RUSAGE_GROUP, under SMP we might have + * races with threads incrementing their own counters. But since word + * reads are atomic, we either get new values or old values and we don't + * care which for the sums. We always take the siglock to protect reading + * the c* fields from p->signal from races with exit.c updating those + * fields when reaping, so a sample either gets all the additions of a + * given child after it's reaped, or none so this sample is before reaping. */ -int getrusage(struct task_struct *p, int who, struct rusage __user *ru) + +void k_getrusage(struct task_struct *p, int who, struct rusage *r) { - struct rusage r; + struct task_struct *t; + unsigned long flags; + unsigned long utime, stime; + + memset((char *) r, 0, sizeof *r); + + if (unlikely(!p->signal)) + return; - memset((char *) &r, 0, sizeof(r)); switch (who) { case RUSAGE_SELF: - jiffies_to_timeval(p->utime, &r.ru_utime); - jiffies_to_timeval(p->stime, &r.ru_stime); - r.ru_nvcsw = p->nvcsw; - r.ru_nivcsw = p->nivcsw; - r.ru_minflt = p->min_flt; - r.ru_majflt = p->maj_flt; + jiffies_to_timeval(p->utime, &r->ru_utime); + jiffies_to_timeval(p->stime, &r->ru_stime); + r->ru_nvcsw = p->nvcsw; + r->ru_nivcsw = p->nivcsw; + r->ru_minflt = p->min_flt; + r->ru_majflt = p->maj_flt; break; case RUSAGE_CHILDREN: - jiffies_to_timeval(p->cutime, &r.ru_utime); - jiffies_to_timeval(p->cstime, &r.ru_stime); - r.ru_nvcsw = p->cnvcsw; - r.ru_nivcsw = p->cnivcsw; - r.ru_minflt = p->cmin_flt; - r.ru_majflt = p->cmaj_flt; + spin_lock_irqsave(&p->sighand->siglock, flags); + utime = p->signal->cutime; + stime = p->signal->cstime; + r->ru_nvcsw = p->signal->cnvcsw; + r->ru_nivcsw = p->signal->cnivcsw; + r->ru_minflt = p->signal->cmin_flt; + r->ru_majflt = p->signal->cmaj_flt; + spin_unlock_irqrestore(&p->sighand->siglock, flags); + jiffies_to_timeval(utime, &r->ru_utime); + jiffies_to_timeval(stime, &r->ru_stime); break; - default: - jiffies_to_timeval(p->utime + p->cutime, &r.ru_utime); - jiffies_to_timeval(p->stime + p->cstime, &r.ru_stime); - r.ru_nvcsw = p->nvcsw + p->cnvcsw; - r.ru_nivcsw = p->nivcsw + p->cnivcsw; - r.ru_minflt = p->min_flt + p->cmin_flt; - r.ru_majflt = p->maj_flt + p->cmaj_flt; + case RUSAGE_GROUP: + spin_lock_irqsave(&p->sighand->siglock, flags); + utime = stime = 0; + goto sum_group; + case RUSAGE_BOTH: + spin_lock_irqsave(&p->sighand->siglock, flags); + utime = p->signal->cutime; + stime = p->signal->cstime; + r->ru_nvcsw = p->signal->cnvcsw; + r->ru_nivcsw = p->signal->cnivcsw; + r->ru_minflt = p->signal->cmin_flt; + r->ru_majflt = p->signal->cmaj_flt; + sum_group: + utime += p->signal->utime; + stime += p->signal->stime; + r->ru_nvcsw += p->signal->nvcsw; + r->ru_nivcsw += p->signal->nivcsw; + r->ru_minflt += p->signal->min_flt; + r->ru_majflt += p->signal->maj_flt; + t = p; + do { + utime += t->utime; + stime += t->stime; + r->ru_nvcsw += t->nvcsw; + r->ru_nivcsw += t->nivcsw; + r->ru_minflt += t->min_flt; + r->ru_majflt += t->maj_flt; + t = next_thread(t); + } while (t != p); + spin_unlock_irqrestore(&p->sighand->siglock, flags); + jiffies_to_timeval(utime, &r->ru_utime); + jiffies_to_timeval(stime, &r->ru_stime); break; + default: + BUG(); } +} + +int getrusage(struct task_struct *p, int who, struct rusage __user *ru) +{ + struct rusage r; + read_lock(&tasklist_lock); + k_getrusage(p, who, &r); + read_unlock(&tasklist_lock); return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0; } asmlinkage long sys_getrusage(int who, struct rusage __user *ru) { - if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN) + if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN + && who != RUSAGE_GROUP) return -EINVAL; return getrusage(current, who, ru); } diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c --- a/kernel/sysctl.c 2004-09-06 16:37:50 -07:00 +++ b/kernel/sysctl.c 2004-09-06 16:37:50 -07:00 @@ -42,6 +42,7 @@ #include #include +#include #ifdef CONFIG_ROOT_NFS #include @@ -116,12 +117,6 @@ extern int sysctl_hz_timer; -#if defined(CONFIG_PPC32) && defined(CONFIG_6xx) -extern unsigned long powersave_nap; -int proc_dol2crvec(ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos); -#endif - #ifdef CONFIG_BSD_PROCESS_ACCT extern int acct_parm[]; #endif @@ -149,6 +144,10 @@ extern ctl_table pty_table[]; #endif +#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT +int sysctl_legacy_va_layout; +#endif + /* /proc declarations: */ #ifdef CONFIG_PROC_FS @@ -295,7 +294,7 @@ .procname = "tainted", .data = &tainted, .maxlen = sizeof(int), - .mode = 0644, + .mode = 0444, .proc_handler = &proc_dointvec, }, { @@ -361,22 +360,6 @@ .proc_handler = &proc_dointvec, }, #endif -#if defined(CONFIG_PPC32) && defined(CONFIG_6xx) - { - .ctl_name = KERN_PPC_POWERSAVE_NAP, - .procname = "powersave-nap", - .data = &powersave_nap, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .ctl_name = KERN_PPC_L2CR, - .procname = "l2cr", - .mode = 0644, - .proc_handler = &proc_dol2crvec, - }, -#endif { .ctl_name = KERN_CTLALTDEL, .procname = "ctrl-alt-del", @@ -805,6 +788,18 @@ .strategy = &sysctl_intvec, .extra1 = &zero, }, +#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT + { + .ctl_name = VM_LEGACY_VA_LAYOUT, + .procname = "legacy_va_layout", + .data = &sysctl_legacy_va_layout, + .maxlen = sizeof(sysctl_legacy_va_layout), + .mode = 0644, + .proc_handler = &proc_dointvec, + .strategy = &sysctl_intvec, + .extra1 = &zero, + }, +#endif { .ctl_name = 0 } }; diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c 2004-09-06 16:37:54 -07:00 +++ b/kernel/timer.c 2004-09-06 16:37:54 -07:00 @@ -233,6 +233,8 @@ spin_unlock_irqrestore(&base->lock, flags); } +EXPORT_SYMBOL(add_timer_on); + /*** * mod_timer - modify a timer's timeout * @timer: the timer to be modified @@ -1446,11 +1448,13 @@ void register_time_interpolator(struct time_interpolator *ti) { + unsigned long flags; + spin_lock(&time_interpolator_lock); - write_seqlock_irq(&xtime_lock); + write_seqlock_irqsave(&xtime_lock, flags); if (is_better_time_interpolator(ti)) time_interpolator = ti; - write_sequnlock_irq(&xtime_lock); + write_sequnlock_irqrestore(&xtime_lock, flags); ti->next = time_interpolator_list; time_interpolator_list = ti; @@ -1461,6 +1465,7 @@ unregister_time_interpolator(struct time_interpolator *ti) { struct time_interpolator *curr, **prev; + unsigned long flags; spin_lock(&time_interpolator_lock); prev = &time_interpolator_list; @@ -1472,7 +1477,7 @@ prev = &curr->next; } - write_seqlock_irq(&xtime_lock); + write_seqlock_irqsave(&xtime_lock, flags); if (ti == time_interpolator) { /* we lost the best time-interpolator: */ time_interpolator = NULL; @@ -1481,7 +1486,7 @@ if (is_better_time_interpolator(curr)) time_interpolator = curr; } - write_sequnlock_irq(&xtime_lock); + write_sequnlock_irqrestore(&xtime_lock, flags); spin_unlock(&time_interpolator_lock); } #endif /* CONFIG_TIME_INTERPOLATION */ @@ -1502,3 +1507,19 @@ EXPORT_SYMBOL(msleep); +/** + * msleep_interruptible - sleep waiting for waitqueue interruptions + * @msecs: Time in milliseconds to sleep for + */ +unsigned long msleep_interruptible(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs); + + while (timeout && !signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } + return jiffies_to_msecs(timeout); +} + +EXPORT_SYMBOL(msleep_interruptible); diff -Nru a/lib/Kconfig.debug b/lib/Kconfig.debug --- a/lib/Kconfig.debug 2004-09-06 16:37:54 -07:00 +++ b/lib/Kconfig.debug 2004-09-06 16:37:54 -07:00 @@ -47,7 +47,7 @@ config DEBUG_SPINLOCK_SLEEP bool "Sleep-inside-spinlock checking" - depends on DEBUG_KERNEL && (X86 || IA64 || MIPS || PPC32 || ARCH_S390 || SPARC32 || SPARC64) + depends on DEBUG_KERNEL && (X86 || IA64 || MIPS || PPC32 || PPC64 || ARCH_S390 || SPARC32 || SPARC64) help If you say Y here, various routines which may sleep will become very noisy if they are called with a spinlock held. diff -Nru a/lib/Makefile b/lib/Makefile --- a/lib/Makefile 2004-09-06 16:37:50 -07:00 +++ b/lib/Makefile 2004-09-06 16:37:50 -07:00 @@ -5,11 +5,8 @@ lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ - kobject.o idr.o div64.o parser.o int_sqrt.o \ + kobject.o kref.o idr.o div64.o parser.o int_sqrt.o \ bitmap.o extable.o - -# hack for now till some static code uses krefs, then it can move up above... -obj-y += kref.o lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o diff -Nru a/lib/bitmap.c b/lib/bitmap.c --- a/lib/bitmap.c 2004-09-06 16:37:54 -07:00 +++ b/lib/bitmap.c 2004-09-06 16:37:54 -07:00 @@ -408,3 +408,85 @@ return 0; } EXPORT_SYMBOL(bitmap_parse); + +/** + * bitmap_find_free_region - find a contiguous aligned mem region + * @bitmap: an array of unsigned longs corresponding to the bitmap + * @bits: number of bits in the bitmap + * @order: region size to find (size is actually 1< BITS_PER_LONG) + return -EINVAL; + + /* make a mask of the order */ + mask = (1ul << (pages - 1)); + mask += mask - 1; + + /* run up the bitmap pages bits at a time */ + for (i = 0; i < bits; i += pages) { + int index = i/BITS_PER_LONG; + int offset = i - (index * BITS_PER_LONG); + if((bitmap[index] & (mask << offset)) == 0) { + /* set region in bimap */ + bitmap[index] |= (mask << offset); + return i; + } + } + return -ENOMEM; +} +EXPORT_SYMBOL(bitmap_find_free_region); + +/** + * bitmap_release_region - release allocated bitmap region + * @bitmap: a pointer to the bitmap + * @pos: the beginning of the region + * @order: the order of the bits to release (number is 1< BITS_PER_LONG. The + * algorithm would be a simple look for multiple zeros in the + * array, but there's no driver today that needs this. If you + * trip this BUG(), you get to code it... */ + BUG_ON(pages > BITS_PER_LONG); + mask += mask - 1; + if (bitmap[index] & (mask << offset)) + return -EBUSY; + bitmap[index] |= (mask << offset); + return 0; +} +EXPORT_SYMBOL(bitmap_allocate_region); diff -Nru a/lib/kobject.c b/lib/kobject.c --- a/lib/kobject.c 2004-09-06 16:37:55 -07:00 +++ b/lib/kobject.c 2004-09-06 16:37:55 -07:00 @@ -58,14 +58,11 @@ return error; } - static inline struct kobject * to_kobj(struct list_head * entry) { return container_of(entry,struct kobject,entry); } - -#ifdef CONFIG_HOTPLUG static int get_kobj_path_length(struct kset *kset, struct kobject *kobj) { int length = 1; @@ -98,6 +95,31 @@ pr_debug("%s: path = '%s'\n",__FUNCTION__,path); } +/** + * kobject_get_path - generate and return the path associated with a given kobj + * and kset pair. The result must be freed by the caller with kfree(). + * + * @kset: kset in question, with which to build the path + * @kobj: kobject in question, with which to build the path + * @gfp_mask: the allocation type used to allocate the path + */ +char * kobject_get_path(struct kset *kset, struct kobject *kobj, int gfp_mask) +{ + char *path; + int len; + + len = get_kobj_path_length(kset, kobj); + path = kmalloc(len, gfp_mask); + if (!path) + return NULL; + memset(path, 0x00, len); + fill_kobj_path(kset, kobj, path, len); + + return path; +} + +#ifdef CONFIG_HOTPLUG + #define BUFFER_SIZE 1024 /* should be enough memory for the env */ #define NUM_ENVP 32 /* number of env pointers */ static unsigned long sequence_num; @@ -112,7 +134,6 @@ char *scratch; int i = 0; int retval; - int kobj_path_length; char *kobj_path = NULL; char *name = NULL; unsigned long seq; @@ -163,12 +184,9 @@ envp [i++] = scratch; scratch += sprintf(scratch, "SEQNUM=%ld", seq) + 1; - kobj_path_length = get_kobj_path_length (kset, kobj); - kobj_path = kmalloc (kobj_path_length, GFP_KERNEL); + kobj_path = kobject_get_path(kset, kobj, GFP_KERNEL); if (!kobj_path) goto exit; - memset (kobj_path, 0x00, kobj_path_length); - fill_kobj_path (kset, kobj, kobj_path, kobj_path_length); envp [i++] = scratch; scratch += sprintf (scratch, "DEVPATH=%s", kobj_path) + 1; @@ -225,10 +243,9 @@ * kobject_init - initialize object. * @kobj: object in question. */ - void kobject_init(struct kobject * kobj) { - atomic_set(&kobj->refcount,1); + kref_init(&kobj->kref); INIT_LIST_HEAD(&kobj->entry); kobj->kset = kset_get(kobj->kset); } @@ -325,7 +342,7 @@ * @kobj: object. * @name: name. * - * If strlen(name) < KOBJ_NAME_LEN, then use a dynamically allocated + * If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated * string that @kobj->k_name points to. Otherwise, use the static * @kobj->name array. */ @@ -429,10 +446,8 @@ struct kobject * kobject_get(struct kobject * kobj) { - if (kobj) { - WARN_ON(!atomic_read(&kobj->refcount)); - atomic_inc(&kobj->refcount); - } + if (kobj) + kref_get(&kobj->kref); return kobj; } @@ -459,17 +474,21 @@ kobject_put(parent); } +static void kobject_release(struct kref *kref) +{ + kobject_cleanup(container_of(kref, struct kobject, kref)); +} + /** * kobject_put - decrement refcount for object. * @kobj: object. * * Decrement the refcount, and if 0, call kobject_cleanup(). */ - void kobject_put(struct kobject * kobj) { - if (atomic_dec_and_test(&kobj->refcount)) - kobject_cleanup(kobj); + if (kobj) + kref_put(&kobj->kref, kobject_release); } @@ -626,7 +645,7 @@ } } - +EXPORT_SYMBOL(kobject_get_path); EXPORT_SYMBOL(kobject_init); EXPORT_SYMBOL(kobject_register); EXPORT_SYMBOL(kobject_unregister); diff -Nru a/lib/kref.c b/lib/kref.c --- a/lib/kref.c 2004-09-06 16:37:55 -07:00 +++ b/lib/kref.c 2004-09-06 16:37:55 -07:00 @@ -11,48 +11,45 @@ * */ -/* #define DEBUG */ - #include #include /** * kref_init - initialize object. * @kref: object in question. - * @release: pointer to a function that will clean up the object - * when the last reference to the object is released. - * This pointer is required. */ -void kref_init(struct kref *kref, void (*release)(struct kref *kref)) +void kref_init(struct kref *kref) { - WARN_ON(release == NULL); atomic_set(&kref->refcount,1); - kref->release = release; } /** * kref_get - increment refcount for object. * @kref: object. */ -struct kref *kref_get(struct kref *kref) +void kref_get(struct kref *kref) { WARN_ON(!atomic_read(&kref->refcount)); atomic_inc(&kref->refcount); - return kref; } /** * kref_put - decrement refcount for object. * @kref: object. + * @release: pointer to the function that will clean up the object when the + * last reference to the object is released. + * This pointer is required, and it is not acceptable to pass kfree + * in as this function. * - * Decrement the refcount, and if 0, call kref->release(). + * Decrement the refcount, and if 0, call release(). */ -void kref_put(struct kref *kref) +void kref_put(struct kref *kref, void (*release) (struct kref *kref)) { - if (atomic_dec_and_test(&kref->refcount)) { - pr_debug("kref cleaning up\n"); - kref->release(kref); - } + WARN_ON(release == NULL); + WARN_ON(release == (void (*)(struct kref *))kfree); + + if (atomic_dec_and_test(&kref->refcount)) + release(kref); } EXPORT_SYMBOL(kref_init); diff -Nru a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c --- a/lib/zlib_inflate/inflate.c 2004-09-06 16:37:53 -07:00 +++ b/lib/zlib_inflate/inflate.c 2004-09-06 16:37:53 -07:00 @@ -53,8 +53,6 @@ return Z_VERSION_ERROR; /* initialize state */ - if (z == NULL) - return Z_STREAM_ERROR; z->msg = NULL; z->state = &WS(z)->internal_state; z->state->blocks = NULL; diff -Nru a/mm/Makefile b/mm/Makefile --- a/mm/Makefile 2004-09-06 16:37:53 -07:00 +++ b/mm/Makefile 2004-09-06 16:37:53 -07:00 @@ -5,7 +5,7 @@ mmu-y := nommu.o mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \ mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \ - shmem.o vmalloc.o + vmalloc.o obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \ page_alloc.o page-writeback.o pdflush.o prio_tree.o \ @@ -15,3 +15,6 @@ obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o obj-$(CONFIG_HUGETLBFS) += hugetlb.o obj-$(CONFIG_NUMA) += mempolicy.o +obj-$(CONFIG_SHMEM) += shmem.o +obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o + diff -Nru a/mm/bootmem.c b/mm/bootmem.c --- a/mm/bootmem.c 2004-09-06 16:37:51 -07:00 +++ b/mm/bootmem.c 2004-09-06 16:37:51 -07:00 @@ -259,6 +259,7 @@ unsigned long i, count, total = 0; unsigned long idx; unsigned long *map; + int gofast = 0; BUG_ON(!bdata->node_bootmem_map); @@ -267,14 +268,32 @@ page = virt_to_page(phys_to_virt(bdata->node_boot_start)); idx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT); map = bdata->node_bootmem_map; + /* Check physaddr is O(LOG2(BITS_PER_LONG)) page aligned */ + if (bdata->node_boot_start == 0 || + ffs(bdata->node_boot_start) - PAGE_SHIFT > ffs(BITS_PER_LONG)) + gofast = 1; for (i = 0; i < idx; ) { unsigned long v = ~map[i / BITS_PER_LONG]; - if (v) { + if (gofast && v == ~0UL) { + int j; + + count += BITS_PER_LONG; + __ClearPageReserved(page); + set_page_count(page, 1); + for (j = 1; j < BITS_PER_LONG; j++) { + if (j + 16 < BITS_PER_LONG) + prefetchw(page + j + 16); + __ClearPageReserved(page + j); + } + __free_pages(page, ffs(BITS_PER_LONG)-1); + i += BITS_PER_LONG; + page += BITS_PER_LONG; + } else if (v) { unsigned long m; for (m = 1; m && i < idx; m<<=1, page++, i++) { if (v & m) { count++; - ClearPageReserved(page); + __ClearPageReserved(page); set_page_count(page, 1); __free_page(page); } @@ -294,7 +313,7 @@ count = 0; for (i = 0; i < ((bdata->node_low_pfn-(bdata->node_boot_start >> PAGE_SHIFT))/8 + PAGE_SIZE-1)/PAGE_SIZE; i++,page++) { count++; - ClearPageReserved(page); + __ClearPageReserved(page); set_page_count(page, 1); __free_page(page); } diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c 2004-09-06 16:37:55 -07:00 +++ b/mm/filemap.c 2004-09-06 16:37:55 -07:00 @@ -60,7 +60,6 @@ * ->swap_list_lock * ->swap_device_lock (exclusive_swap_page, others) * ->mapping->tree_lock - * ->page_map_lock() (try_to_unmap_file) * * ->i_sem * ->i_mmap_lock (truncate->unmap_mapping_range) @@ -83,16 +82,20 @@ * ->sb_lock (fs/fs-writeback.c) * ->mapping->tree_lock (__sync_single_inode) * + * ->i_mmap_lock + * ->anon_vma.lock (vma_adjust) + * + * ->anon_vma.lock + * ->page_table_lock (anon_vma_prepare and various) + * * ->page_table_lock * ->swap_device_lock (try_to_unmap_one) * ->private_lock (try_to_unmap_one) * ->tree_lock (try_to_unmap_one) * ->zone.lru_lock (follow_page->mark_page_accessed) - * ->page_map_lock() (page_add_anon_rmap) - * ->tree_lock (page_remove_rmap->set_page_dirty) - * ->private_lock (page_remove_rmap->set_page_dirty) - * ->inode_lock (page_remove_rmap->set_page_dirty) - * ->anon_vma.lock (anon_vma_prepare) + * ->private_lock (page_remove_rmap->set_page_dirty) + * ->tree_lock (page_remove_rmap->set_page_dirty) + * ->inode_lock (page_remove_rmap->set_page_dirty) * ->inode_lock (zap_pte_range->set_page_dirty) * ->private_lock (zap_pte_range->__set_page_dirty_buffers) * @@ -274,6 +277,7 @@ ret = wait_on_page_writeback_range(mapping, start, end); return ret; } +EXPORT_SYMBOL(sync_page_range); /** * filemap_fdatawait - walk the list of under-writeback pages of the given @@ -695,13 +699,15 @@ * * This is really ugly. But the goto's actually try to clarify some * of the logic when it comes to error handling etc. - * - note the struct file * is only passed for the use of readpage + * + * Note the struct file* is only passed for the use of readpage. It may be + * NULL. */ void do_generic_mapping_read(struct address_space *mapping, struct file_ra_state *_ra, - struct file * filp, + struct file *filp, loff_t *ppos, - read_descriptor_t * desc, + read_descriptor_t *desc, read_actor_t actor) { struct inode *inode = mapping->host; @@ -865,7 +871,8 @@ *ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset; if (cached_page) page_cache_release(cached_page); - file_accessed(filp); + if (filp) + file_accessed(filp); } EXPORT_SYMBOL(do_generic_mapping_read); @@ -885,7 +892,8 @@ */ if (!fault_in_pages_writeable(desc->arg.buf, size)) { kaddr = kmap_atomic(page, KM_USER0); - left = __copy_to_user(desc->arg.buf, kaddr + offset, size); + left = __copy_to_user_inatomic(desc->arg.buf, + kaddr + offset, size); kunmap_atomic(kaddr, KM_USER0); if (left == 0) goto success; @@ -1483,7 +1491,7 @@ return 0; } -static struct vm_operations_struct generic_file_vm_ops = { +struct vm_operations_struct generic_file_vm_ops = { .nopage = filemap_nopage, .populate = filemap_populate, }; @@ -1682,7 +1690,7 @@ int left; kaddr = kmap_atomic(page, KM_USER0); - left = __copy_from_user(kaddr + offset, buf, bytes); + left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); kunmap_atomic(kaddr, KM_USER0); if (left != 0) { @@ -1705,7 +1713,7 @@ int copy = min(bytes, iov->iov_len - base); base = 0; - left = __copy_from_user(vaddr, buf, copy); + left = __copy_from_user_inatomic(vaddr, buf, copy); copied += copy; bytes -= copy; vaddr += copy; diff -Nru a/mm/hugetlb.c b/mm/hugetlb.c --- a/mm/hugetlb.c 2004-09-06 16:37:53 -07:00 +++ b/mm/hugetlb.c 2004-09-06 16:37:53 -07:00 @@ -21,7 +21,7 @@ static void enqueue_huge_page(struct page *page) { - int nid = page_zone(page)->zone_pgdat->node_id; + int nid = page_to_nid(page); list_add(&page->lru, &hugepage_freelists[nid]); free_huge_pages++; free_huge_pages_node[nid]++; @@ -52,7 +52,7 @@ { static int nid = 0; struct page *page; - page = alloc_pages_node(nid, GFP_HIGHUSER|__GFP_COMP, + page = alloc_pages_node(nid, GFP_HIGHUSER|__GFP_COMP|__GFP_NOWARN, HUGETLB_PAGE_ORDER); nid = (nid + 1) % numnodes; if (page) { @@ -123,6 +123,7 @@ } __setup("hugepages=", hugetlb_setup); +#ifdef CONFIG_SYSCTL static void update_and_free_page(struct page *page) { int i; @@ -188,7 +189,6 @@ return nr_huge_pages; } -#ifdef CONFIG_SYSCTL int hugetlb_sysctl_handler(struct ctl_table *table, int write, struct file *file, void __user *buffer, size_t *length, loff_t *ppos) diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c 2004-09-06 16:37:52 -07:00 +++ b/mm/memory.c 2004-09-06 16:37:52 -07:00 @@ -1744,6 +1744,8 @@ struct vm_area_struct * vma; vma = find_vma(current->mm, addr); + if (!vma) + return -1; write = (vma->vm_flags & VM_WRITE) != 0; if (addr >= end) BUG(); diff -Nru a/mm/mempolicy.c b/mm/mempolicy.c --- a/mm/mempolicy.c 2004-09-06 16:37:55 -07:00 +++ b/mm/mempolicy.c 2004-09-06 16:37:55 -07:00 @@ -132,7 +132,6 @@ unsigned long nlongs; unsigned long endmask; - --maxnode; bitmap_zero(nodes, MAX_NUMNODES); if (maxnode == 0 || !nmask) return 0; @@ -438,7 +437,7 @@ err = get_user_pages(current, mm, addr & PAGE_MASK, 1, 0, 0, &p, NULL); if (err >= 0) { - err = page_zone(p)->zone_pgdat->node_id; + err = page_to_nid(p); put_page(p); } return err; diff -Nru a/mm/mempool.c b/mm/mempool.c --- a/mm/mempool.c 2004-09-06 16:37:53 -07:00 +++ b/mm/mempool.c 2004-09-06 16:37:53 -07:00 @@ -194,6 +194,7 @@ DEFINE_WAIT(wait); int gfp_nowait = gfp_mask & ~(__GFP_WAIT | __GFP_IO); + might_sleep_if(gfp_mask & __GFP_WAIT); repeat_alloc: element = pool->alloc(gfp_nowait|__GFP_NOWARN, pool->pool_data); if (likely(element != NULL)) diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c 2004-09-06 16:37:53 -07:00 +++ b/mm/mmap.c 2004-09-06 16:37:53 -07:00 @@ -90,6 +90,7 @@ { struct file *file = vma->vm_file; + might_sleep(); if (file) { struct address_space *mapping = file->f_mapping; spin_lock(&mapping->i_mmap_lock); @@ -728,6 +729,32 @@ return NULL; } +#ifdef CONFIG_PROC_FS +void __vm_stat_account(struct mm_struct *mm, unsigned long flags, + struct file *file, long pages) +{ + const unsigned long stack_flags + = VM_STACK_FLAGS & (VM_GROWSUP|VM_GROWSDOWN); + +#ifdef CONFIG_HUGETLB + if (flags & VM_HUGETLB) { + if (!(flags & VM_DONTCOPY)) + mm->shared_vm += pages; + return; + } +#endif /* CONFIG_HUGETLB */ + + if (file) + mm->shared_vm += pages; + else if (flags & stack_flags) + mm->stack_vm += pages; + if (flags & VM_EXEC) + mm->exec_vm += pages; + if (flags & (VM_RESERVED|VM_IO)) + mm->reserved_vm += pages; +} +#endif /* CONFIG_PROC_FS */ + /* * The caller must hold down_write(current->mm->mmap_sem). */ @@ -986,6 +1013,7 @@ pgoff, flags & MAP_NONBLOCK); down_write(&mm->mmap_sem); } + __vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); return addr; unmap_and_free_vma: @@ -1018,7 +1046,7 @@ * This function "knows" that -ENOMEM has the bits set. */ #ifndef HAVE_ARCH_UNMAPPED_AREA -static inline unsigned long +unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { @@ -1062,12 +1090,118 @@ addr = vma->vm_end; } } -#else -extern unsigned long -arch_get_unmapped_area(struct file *, unsigned long, unsigned long, - unsigned long, unsigned long); #endif +void arch_unmap_area(struct vm_area_struct *area) +{ + /* + * Is this a new hole at the lowest possible address? + */ + if (area->vm_start >= TASK_UNMAPPED_BASE && + area->vm_start < area->vm_mm->free_area_cache) + area->vm_mm->free_area_cache = area->vm_start; +} + +/* + * This mmap-allocator allocates new areas top-down from below the + * stack's low limit (the base): + */ +#ifndef HAVE_ARCH_UNMAPPED_AREA_TOPDOWN +unsigned long +arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, + const unsigned long len, const unsigned long pgoff, + const unsigned long flags) +{ + struct vm_area_struct *vma, *prev_vma; + struct mm_struct *mm = current->mm; + unsigned long base = mm->mmap_base, addr = addr0; + int first_time = 1; + + /* requested length too big for entire address space */ + if (len > TASK_SIZE) + return -ENOMEM; + + /* dont allow allocations above current base */ + if (mm->free_area_cache > base) + mm->free_area_cache = base; + + /* requesting a specific address */ + if (addr) { + addr = PAGE_ALIGN(addr); + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + return addr; + } + +try_again: + /* make sure it can fit in the remaining address space */ + if (mm->free_area_cache < len) + goto fail; + + /* either no address requested or cant fit in requested address hole */ + addr = (mm->free_area_cache - len) & PAGE_MASK; + do { + /* + * Lookup failure means no vma is above this address, + * i.e. return with success: + */ + if (!(vma = find_vma_prev(mm, addr, &prev_vma))) + return addr; + + /* + * new region fits between prev_vma->vm_end and + * vma->vm_start, use it: + */ + if (addr+len <= vma->vm_start && + (!prev_vma || (addr >= prev_vma->vm_end))) + /* remember the address as a hint for next time */ + return (mm->free_area_cache = addr); + else + /* pull free_area_cache down to the first hole */ + if (mm->free_area_cache == vma->vm_end) + mm->free_area_cache = vma->vm_start; + + /* try just below the current vma->vm_start */ + addr = vma->vm_start-len; + } while (len <= vma->vm_start); + +fail: + /* + * if hint left us with no space for the requested + * mapping then try again: + */ + if (first_time) { + mm->free_area_cache = base; + first_time = 0; + goto try_again; + } + /* + * A failed mmap() very likely causes application failure, + * so fall back to the bottom-up function here. This scenario + * can happen with large stack limits and large mmap() + * allocations. + */ + mm->free_area_cache = TASK_UNMAPPED_BASE; + addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags); + /* + * Restore the topdown base: + */ + mm->free_area_cache = base; + + return addr; +} +#endif + +void arch_unmap_area_topdown(struct vm_area_struct *area) +{ + /* + * Is this a new hole at the highest possible address? + */ + if (area->vm_end > area->vm_mm->free_area_cache) + area->vm_mm->free_area_cache = area->vm_end; +} + unsigned long get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) @@ -1102,7 +1236,7 @@ return file->f_op->get_unmapped_area(file, addr, len, pgoff, flags); - return arch_get_unmapped_area(file, addr, len, pgoff, flags); + return current->mm->get_unmapped_area(file, addr, len, pgoff, flags); } EXPORT_SYMBOL(get_unmapped_area); @@ -1225,6 +1359,7 @@ vma->vm_mm->total_vm += grow; if (vma->vm_flags & VM_LOCKED) vma->vm_mm->locked_vm += grow; + __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow); anon_vma_unlock(vma); return 0; } @@ -1287,6 +1422,7 @@ vma->vm_mm->total_vm += grow; if (vma->vm_flags & VM_LOCKED) vma->vm_mm->locked_vm += grow; + __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow); anon_vma_unlock(vma); return 0; } @@ -1392,13 +1528,8 @@ area->vm_mm->total_vm -= len >> PAGE_SHIFT; if (area->vm_flags & VM_LOCKED) area->vm_mm->locked_vm -= len >> PAGE_SHIFT; - /* - * Is this a new hole at the lowest possible address? - */ - if (area->vm_start >= TASK_UNMAPPED_BASE && - area->vm_start < area->vm_mm->free_area_cache) - area->vm_mm->free_area_cache = area->vm_start; - + vm_stat_unaccount(area); + area->vm_mm->unmap_area(area); remove_vm_struct(area); } @@ -1551,10 +1682,6 @@ if (mpnt->vm_start >= end) return 0; - /* Something will probably happen, so notify. */ - if (mpnt->vm_file && (mpnt->vm_flags & VM_EXEC)) - profile_exec_unmap(mm); - /* * If we need to split any vma, do it now to save pain later. * @@ -1597,6 +1724,8 @@ int ret; struct mm_struct *mm = current->mm; + profile_munmap(addr); + down_write(&mm->mmap_sem); ret = do_munmap(mm, addr, len); up_write(&mm->mmap_sem); @@ -1699,8 +1828,6 @@ struct vm_area_struct *vma; unsigned long nr_accounted = 0; - profile_exit_mmap(mm); - lru_add_drain(); spin_lock(&mm->page_table_lock); diff -Nru a/mm/mprotect.c b/mm/mprotect.c --- a/mm/mprotect.c 2004-09-06 16:37:55 -07:00 +++ b/mm/mprotect.c 2004-09-06 16:37:55 -07:00 @@ -175,9 +175,11 @@ * vm_flags and vm_page_prot are protected by the mmap_sem * held in write mode. */ + vm_stat_unaccount(vma); vma->vm_flags = newflags; vma->vm_page_prot = newprot; change_protection(vma, start, end, newprot); + vm_stat_account(vma); return 0; fail: diff -Nru a/mm/mremap.c b/mm/mremap.c --- a/mm/mremap.c 2004-09-06 16:37:53 -07:00 +++ b/mm/mremap.c 2004-09-06 16:37:53 -07:00 @@ -224,6 +224,7 @@ } mm->total_vm += new_len >> PAGE_SHIFT; + __vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); if (vm_flags & VM_LOCKED) { mm->locked_vm += new_len >> PAGE_SHIFT; if (new_len > old_len) @@ -360,6 +361,8 @@ addr + new_len, vma->vm_pgoff, NULL); current->mm->total_vm += pages; + __vm_stat_account(vma->vm_mm, vma->vm_flags, + vma->vm_file, pages); if (vma->vm_flags & VM_LOCKED) { current->mm->locked_vm += pages; make_pages_present(addr + old_len, diff -Nru a/mm/oom_kill.c b/mm/oom_kill.c --- a/mm/oom_kill.c 2004-09-06 16:37:53 -07:00 +++ b/mm/oom_kill.c 2004-09-06 16:37:53 -07:00 @@ -41,9 +41,9 @@ * of least surprise ... (be careful when you change it) */ -static int badness(struct task_struct *p) +static unsigned long badness(struct task_struct *p) { - int points, cpu_time, run_time, s; + unsigned long points, cpu_time, run_time, s; if (!p->mm) return 0; @@ -108,13 +108,13 @@ */ static struct task_struct * select_bad_process(void) { - int maxpoints = 0; + unsigned long maxpoints = 0; struct task_struct *g, *p; struct task_struct *chosen = NULL; do_each_thread(g, p) if (p->pid) { - int points = badness(p); + unsigned long points = badness(p); if (points > maxpoints) { chosen = p; maxpoints = points; diff -Nru a/mm/page-writeback.c b/mm/page-writeback.c --- a/mm/page-writeback.c 2004-09-06 16:37:53 -07:00 +++ b/mm/page-writeback.c 2004-09-06 16:37:53 -07:00 @@ -153,9 +153,11 @@ if (dirty_ratio < 5) dirty_ratio = 5; - background_ratio = dirty_background_ratio; - if (background_ratio >= dirty_ratio) - background_ratio = dirty_ratio / 2; + /* + * Keep the ratio between dirty_ratio and background_ratio roughly + * what the sysctls are after dirty_ratio has been scaled (above). + */ + background_ratio = dirty_background_ratio * dirty_ratio/vm_dirty_ratio; background = (background_ratio * total_pages) / 100; dirty = (dirty_ratio * total_pages) / 100; diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c 2004-09-06 16:37:50 -07:00 +++ b/mm/page_alloc.c 2004-09-06 16:37:50 -07:00 @@ -55,8 +55,8 @@ static char *zone_names[MAX_NR_ZONES] = { "DMA", "Normal", "HighMem" }; int min_free_kbytes = 1024; -static unsigned long __initdata nr_kernel_pages; -static unsigned long __initdata nr_all_pages; +unsigned long __initdata nr_kernel_pages; +unsigned long __initdata nr_all_pages; /* * Temporary debugging check for pages not lying within a given zone. @@ -76,9 +76,9 @@ { printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", function, current->comm, page); - printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n", - (unsigned long)page->flags, page->mapping, - (int)page->mapcount, page_count(page)); + printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", + (int)(2*sizeof(page_flags_t)), (unsigned long)page->flags, + page->mapping, page_mapcount(page), page_count(page)); printk(KERN_EMERG "Backtrace:\n"); dump_stack(); printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); @@ -87,13 +87,11 @@ 1 << PG_lru | 1 << PG_active | 1 << PG_dirty | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback); set_page_count(page, 0); + reset_page_mapcount(page); page->mapping = NULL; - page->mapcount = 0; } #ifndef CONFIG_HUGETLB_PAGE @@ -229,8 +227,6 @@ 1 << PG_active | 1 << PG_reclaim | 1 << PG_slab | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback ))) bad_page(function, page); @@ -279,6 +275,8 @@ LIST_HEAD(list); int i; + arch_free_page(page, order); + mod_page_state(pgfree, 1 << order); for (i = 0 ; i < (1 << order) ; ++i) free_pages_check(__FUNCTION__, page + i); @@ -350,8 +348,6 @@ 1 << PG_active | 1 << PG_dirty | 1 << PG_reclaim | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback ))) bad_page(__FUNCTION__, page); @@ -509,8 +505,12 @@ struct per_cpu_pages *pcp; unsigned long flags; + arch_free_page(page, 0); + kernel_map_pages(page, 1, 0); inc_page_state(pgfree); + if (PageAnon(page)) + page->mapping = NULL; free_pages_check(__FUNCTION__, page); pcp = &zone->pageset[get_cpu()].pcp[cold]; local_irq_save(flags); @@ -600,83 +600,75 @@ { const int wait = gfp_mask & __GFP_WAIT; unsigned long min; - struct zone **zones; + struct zone **zones, *z; struct page *page; struct reclaim_state reclaim_state; struct task_struct *p = current; int i; int alloc_type; int do_retry; + int can_try_harder; might_sleep_if(wait); + /* + * The caller may dip into page reserves a bit more if the caller + * cannot run direct reclaim, or is the caller has realtime scheduling + * policy + */ + can_try_harder = (unlikely(rt_task(p)) && !in_interrupt()) || !wait; + zones = zonelist->zones; /* the list of zones suitable for gfp_mask */ - if (zones[0] == NULL) /* no zones in the zonelist */ + + if (unlikely(zones[0] == NULL)) { + /* Should this ever happen?? */ return NULL; + } alloc_type = zone_idx(zones[0]); /* Go through the zonelist once, looking for a zone with enough free */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - - min = (1<protection[alloc_type]; + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_low + (1<protection[alloc_type]; - /* - * We let real-time tasks dip their real-time paws a little - * deeper into reserves. - */ - if (rt_task(p)) - min -= z->pages_low >> 1; + if (z->free_pages < min) + continue; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; } - /* we're somewhat low on memory, failed to find what we needed */ - for (i = 0; zones[i] != NULL; i++) - wakeup_kswapd(zones[i]); - - /* Go through the zonelist again, taking __GFP_HIGH into account */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - - min = (1<protection[alloc_type]; + for (i = 0; (z = zones[i]) != NULL; i++) + wakeup_kswapd(z); + /* + * Go through the zonelist again. Let __GFP_HIGH and allocations + * coming from realtime tasks to go deeper into reserves + */ + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_min; if (gfp_mask & __GFP_HIGH) - min -= z->pages_low >> 2; - if (rt_task(p)) - min -= z->pages_low >> 1; + min /= 2; + if (can_try_harder) + min -= min / 4; + min += (1<protection[alloc_type]; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } - } + if (z->free_pages < min) + continue; - /* here we're in the low on memory slow path */ + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; + } -rebalance: + /* This allocation should allow future memory freeing. */ if ((p->flags & (PF_MEMALLOC | PF_MEMDIE)) && !in_interrupt()) { /* go through the zonelist yet again, ignoring mins */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - + for (i = 0; (z = zones[i]) != NULL; i++) { page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); + if (page) goto got_pg; - } } goto nopage; } @@ -685,6 +677,8 @@ if (!wait) goto nopage; +rebalance: + /* We now go into synchronous reclaim */ p->flags |= PF_MEMALLOC; reclaim_state.reclaimed_slab = 0; p->reclaim_state = &reclaim_state; @@ -695,27 +689,28 @@ p->flags &= ~PF_MEMALLOC; /* go through the zonelist yet one more time */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_min; + if (gfp_mask & __GFP_HIGH) + min /= 2; + if (can_try_harder) + min -= min / 4; + min += (1<protection[alloc_type]; - min = (1UL << order) + z->protection[alloc_type]; + if (z->free_pages < min) + continue; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; } /* * Don't let big-order allocations loop unless the caller explicitly * requests that. Wait for some write requests to complete then retry. * - * In this implementation, __GFP_REPEAT means __GFP_NOFAIL, but that - * may not be true in other implementations. + * In this implementation, __GFP_REPEAT means __GFP_NOFAIL for order + * <= 3, but that may not be true in other implementations. */ do_retry = 0; if (!(gfp_mask & __GFP_NORETRY)) { @@ -738,6 +733,7 @@ } return NULL; got_pg: + zone_statistics(zonelist, z); kernel_map_pages(page, 1 << order, 1); return page; } @@ -802,8 +798,8 @@ fastcall void free_pages(unsigned long addr, unsigned int order) { if (addr != 0) { - BUG_ON(!virt_addr_valid(addr)); - __free_pages(virt_to_page(addr), order); + BUG_ON(!virt_addr_valid((void *)addr)); + __free_pages(virt_to_page((void *)addr), order); } } @@ -965,18 +961,36 @@ return ret; } +void __get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free, struct pglist_data *pgdat) +{ + struct zone *zones = pgdat->node_zones; + int i; + + *active = 0; + *inactive = 0; + *free = 0; + for (i = 0; i < MAX_NR_ZONES; i++) { + *active += zones[i].nr_active; + *inactive += zones[i].nr_inactive; + *free += zones[i].free_pages; + } +} + void get_zone_counts(unsigned long *active, unsigned long *inactive, unsigned long *free) { - struct zone *zone; + struct pglist_data *pgdat; *active = 0; *inactive = 0; *free = 0; - for_each_zone(zone) { - *active += zone->nr_active; - *inactive += zone->nr_inactive; - *free += zone->free_pages; + for_each_pgdat(pgdat) { + unsigned long l, m, n; + __get_zone_counts(&l, &m, &n, pgdat); + *active += l; + *inactive += m; + *free += n; } } @@ -1379,14 +1393,16 @@ * up by free_all_bootmem() once the early boot process is * done. Non-atomic initialization, single-pass. */ -void __init memmap_init_zone(struct page *start, unsigned long size, int nid, - unsigned long zone, unsigned long start_pfn) +void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone, + unsigned long start_pfn) { + struct page *start = pfn_to_page(start_pfn); struct page *page; for (page = start; page < (start + size); page++) { set_page_zone(page, NODEZONE(nid, zone)); set_page_count(page, 0); + reset_page_mapcount(page); SetPageReserved(page); INIT_LIST_HEAD(&page->lru); #ifdef WANT_PAGE_VIRTUAL @@ -1445,8 +1461,8 @@ } #ifndef __HAVE_ARCH_MEMMAP_INIT -#define memmap_init(start, size, nid, zone, start_pfn) \ - memmap_init_zone((start), (size), (nid), (zone), (start_pfn)) +#define memmap_init(size, nid, zone, start_pfn) \ + memmap_init_zone((size), (nid), (zone), (start_pfn)) #endif /* @@ -1461,7 +1477,6 @@ unsigned long i, j; const unsigned long zone_required_alignment = 1UL << (MAX_ORDER-1); int cpu, nid = pgdat->node_id; - struct page *lmem_map = pgdat->node_mem_map; unsigned long zone_start_pfn = pgdat->node_start_pfn; pgdat->nr_zones = 0; @@ -1549,35 +1564,41 @@ pgdat->nr_zones = j+1; - zone->zone_mem_map = lmem_map; + zone->zone_mem_map = pfn_to_page(zone_start_pfn); zone->zone_start_pfn = zone_start_pfn; if ((zone_start_pfn) & (zone_required_alignment-1)) printk("BUG: wrong zone alignment, it will crash\n"); - memmap_init(lmem_map, size, nid, j, zone_start_pfn); + memmap_init(size, nid, j, zone_start_pfn); zone_start_pfn += size; - lmem_map += size; zone_init_free_lists(pgdat, zone, zone->spanned_pages); } } -void __init free_area_init_node(int nid, struct pglist_data *pgdat, - struct page *node_mem_map, unsigned long *zones_size, - unsigned long node_start_pfn, unsigned long *zholes_size) +void __init node_alloc_mem_map(struct pglist_data *pgdat) { unsigned long size; + size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); + pgdat->node_mem_map = alloc_bootmem_node(pgdat, size); +#ifndef CONFIG_DISCONTIGMEM + mem_map = contig_page_data.node_mem_map; +#endif +} + +void __init free_area_init_node(int nid, struct pglist_data *pgdat, + unsigned long *zones_size, unsigned long node_start_pfn, + unsigned long *zholes_size) +{ pgdat->node_id = nid; pgdat->node_start_pfn = node_start_pfn; calculate_zone_totalpages(pgdat, zones_size, zholes_size); - if (!node_mem_map) { - size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); - node_mem_map = alloc_bootmem_node(pgdat, size); - } - pgdat->node_mem_map = node_mem_map; + + if (!pfn_to_page(node_start_pfn)) + node_alloc_mem_map(pgdat); free_area_init_core(pgdat, zones_size, zholes_size); } @@ -1590,9 +1611,8 @@ void __init free_area_init(unsigned long *zones_size) { - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL); - mem_map = contig_page_data.node_mem_map; } #endif @@ -1851,11 +1871,11 @@ * We never protect zones that don't have memory * in them (j>max_zone) or zones that aren't in * the zonelists for a certain type of - * allocation (j>i). We have to assign these to - * zero because the lower zones take + * allocation (j>=i). We have to assign these + * to zero because the lower zones take * contributions from the higher zones. */ - if (j > max_zone || j > i) { + if (j > max_zone || j >= i) { zone->protection[i] = 0; continue; } @@ -1864,7 +1884,6 @@ */ zone->protection[i] = higherzone_val(zone, max_zone, i); - zone->protection[i] += zone->pages_low; } } } diff -Nru a/mm/prio_tree.c b/mm/prio_tree.c --- a/mm/prio_tree.c 2004-09-06 16:37:55 -07:00 +++ b/mm/prio_tree.c 2004-09-06 16:37:55 -07:00 @@ -81,6 +81,8 @@ return index_bits_to_maxindex[bits - 1]; } +static void prio_tree_remove(struct prio_tree_root *, struct prio_tree_node *); + /* * Extend a priority search tree so that it can store a node with heap_index * max_heap_index. In the worst case, this algorithm takes O((log n)^2). @@ -90,8 +92,6 @@ static struct prio_tree_node *prio_tree_expand(struct prio_tree_root *root, struct prio_tree_node *node, unsigned long max_heap_index) { - static void prio_tree_remove(struct prio_tree_root *, - struct prio_tree_node *); struct prio_tree_node *first = NULL, *prev, *last = NULL; if (max_heap_index > prio_tree_maxindex(root->index_bits)) diff -Nru a/mm/readahead.c b/mm/readahead.c --- a/mm/readahead.c 2004-09-06 16:37:50 -07:00 +++ b/mm/readahead.c 2004-09-06 16:37:50 -07:00 @@ -28,16 +28,15 @@ EXPORT_SYMBOL_GPL(default_backing_dev_info); /* - * Initialise a struct file's readahead state + * Initialise a struct file's readahead state. Assumes that the caller has + * memset *ra to zero. */ void file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) { - memset(ra, 0, sizeof(*ra)); ra->ra_pages = mapping->backing_dev_info->ra_pages; ra->average = ra->ra_pages / 2; } -EXPORT_SYMBOL(file_ra_state_init); /* * Return max readahead size for this inode in number-of-pages. @@ -572,6 +571,6 @@ unsigned long inactive; unsigned long free; - get_zone_counts(&active, &inactive, &free); + __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id())); return min(nr, (inactive + free) / 2); } diff -Nru a/mm/rmap.c b/mm/rmap.c --- a/mm/rmap.c 2004-09-06 16:37:55 -07:00 +++ b/mm/rmap.c 2004-09-06 16:37:55 -07:00 @@ -18,9 +18,30 @@ */ /* - * Locking: see "Lock ordering" summary in filemap.c. - * In swapout, page_map_lock is held on entry to page_referenced and - * try_to_unmap, so they trylock for i_mmap_lock and page_table_lock. + * Lock ordering in mm: + * + * inode->i_sem (while writing or truncating, not reading or faulting) + * inode->i_alloc_sem + * + * When a page fault occurs in writing from user to file, down_read + * of mmap_sem nests within i_sem; in sys_msync, i_sem nests within + * down_read of mmap_sem; i_sem and down_write of mmap_sem are never + * taken together; in truncation, i_sem is taken outermost. + * + * mm->mmap_sem + * page->flags PG_locked (lock_page) + * mapping->i_mmap_lock + * anon_vma->lock + * mm->page_table_lock + * zone->lru_lock (in mark_page_accessed) + * swap_list_lock (in swap_free etc's swap_info_get) + * swap_device_lock (in swap_duplicate, swap_info_get) + * mapping->private_lock (in __set_page_dirty_buffers) + * inode_lock (in set_page_dirty's __mark_inode_dirty) + * sb_lock (within inode_lock in fs/fs-writeback.c) + * mapping->tree_lock (widely used, in set_page_dirty, + * in arch-dependent flush_dcache_mmap_lock, + * within inode_lock in __sync_single_inode) */ #include @@ -30,6 +51,7 @@ #include #include #include +#include #include @@ -63,28 +85,32 @@ might_sleep(); if (unlikely(!anon_vma)) { struct mm_struct *mm = vma->vm_mm; - struct anon_vma *allocated = NULL; + struct anon_vma *allocated, *locked; anon_vma = find_mergeable_anon_vma(vma); - if (!anon_vma) { + if (anon_vma) { + allocated = NULL; + locked = anon_vma; + spin_lock(&locked->lock); + } else { anon_vma = anon_vma_alloc(); if (unlikely(!anon_vma)) return -ENOMEM; allocated = anon_vma; + locked = NULL; } /* page_table_lock to protect against threads */ spin_lock(&mm->page_table_lock); if (likely(!vma->anon_vma)) { - if (!allocated) - spin_lock(&anon_vma->lock); vma->anon_vma = anon_vma; list_add(&vma->anon_vma_node, &anon_vma->head); - if (!allocated) - spin_unlock(&anon_vma->lock); allocated = NULL; } spin_unlock(&mm->page_table_lock); + + if (locked) + spin_unlock(&locked->lock); if (unlikely(allocated)) anon_vma_free(allocated); } @@ -159,16 +185,31 @@ void __init anon_vma_init(void) { - anon_vma_cachep = kmem_cache_create("anon_vma", - sizeof(struct anon_vma), 0, SLAB_PANIC, anon_vma_ctor, NULL); + anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma), + 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC, anon_vma_ctor, NULL); } -/* this needs the page->flags PG_maplock held */ -static inline void clear_page_anon(struct page *page) +/* + * Getting a lock on a stable anon_vma from a page off the LRU is + * tricky: page_lock_anon_vma rely on RCU to guard against the races. + */ +static struct anon_vma *page_lock_anon_vma(struct page *page) { - BUG_ON(!page->mapping); - page->mapping = NULL; - ClearPageAnon(page); + struct anon_vma *anon_vma = NULL; + unsigned long anon_mapping; + + rcu_read_lock(); + anon_mapping = (unsigned long) page->mapping; + if (!(anon_mapping & PAGE_MAPPING_ANON)) + goto out; + if (!page_mapped(page)) + goto out; + + anon_vma = (struct anon_vma *) (anon_mapping - PAGE_MAPPING_ANON); + spin_lock(&anon_vma->lock); +out: + rcu_read_unlock(); + return anon_vma; } /* @@ -190,6 +231,24 @@ } /* + * At what user virtual address is page expected in vma? checking that the + * page matches the vma: currently only used by unuse_process, on anon pages. + */ +unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) +{ + if (PageAnon(page)) { + if ((void *)vma->anon_vma != + (void *)page->mapping - PAGE_MAPPING_ANON) + return -EFAULT; + } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { + if (vma->vm_file->f_mapping != page->mapping) + return -EFAULT; + } else + return -EFAULT; + return vma_address(page, vma); +} + +/* * Subfunctions of page_referenced: page_referenced_one called * repeatedly from either page_referenced_anon or page_referenced_file. */ @@ -209,8 +268,7 @@ if (address == -EFAULT) goto out; - if (!spin_trylock(&mm->page_table_lock)) - goto out; + spin_lock(&mm->page_table_lock); pgd = pgd_offset(mm, address); if (!pgd_present(*pgd)) @@ -243,15 +301,18 @@ return referenced; } -static inline int page_referenced_anon(struct page *page) +static int page_referenced_anon(struct page *page) { - unsigned int mapcount = page->mapcount; - struct anon_vma *anon_vma = (struct anon_vma *) page->mapping; + unsigned int mapcount; + struct anon_vma *anon_vma; struct vm_area_struct *vma; int referenced = 0; - spin_lock(&anon_vma->lock); - BUG_ON(list_empty(&anon_vma->head)); + anon_vma = page_lock_anon_vma(page); + if (!anon_vma) + return referenced; + + mapcount = page_mapcount(page); list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { referenced += page_referenced_one(page, vma, &mapcount); if (!mapcount) @@ -271,21 +332,38 @@ * of references it found. * * This function is only called from page_referenced for object-based pages. - * - * The spinlock address_space->i_mmap_lock is tried. If it can't be gotten, - * assume a reference count of 0, so try_to_unmap will then have a go. */ -static inline int page_referenced_file(struct page *page) +static int page_referenced_file(struct page *page) { - unsigned int mapcount = page->mapcount; + unsigned int mapcount; struct address_space *mapping = page->mapping; pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); struct vm_area_struct *vma; struct prio_tree_iter iter; int referenced = 0; - if (!spin_trylock(&mapping->i_mmap_lock)) - return 0; + /* + * The caller's checks on page->mapping and !PageAnon have made + * sure that this is a file page: the check for page->mapping + * excludes the case just before it gets set on an anon page. + */ + BUG_ON(PageAnon(page)); + + /* + * The page lock not only makes sure that page->mapping cannot + * suddenly be NULLified by truncation, it makes sure that the + * structure at mapping cannot be freed and reused yet, + * so we can safely take mapping->i_mmap_lock. + */ + BUG_ON(!PageLocked(page)); + + spin_lock(&mapping->i_mmap_lock); + + /* + * i_mmap_lock does not stabilize mapcount at all, but mapcount + * is more likely to be accurate if we note it after spinning. + */ + mapcount = page_mapcount(page); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { if ((vma->vm_flags & (VM_LOCKED|VM_MAYSHARE)) @@ -305,12 +383,12 @@ /** * page_referenced - test if the page was referenced * @page: the page to test + * @is_locked: caller holds lock on the page * * Quick test_and_clear_referenced for all mappings to a page, * returns the number of ptes which referenced the page. - * Caller needs to hold the rmap lock. */ -int page_referenced(struct page *page) +int page_referenced(struct page *page, int is_locked) { int referenced = 0; @@ -320,11 +398,17 @@ if (TestClearPageReferenced(page)) referenced++; - if (page->mapcount && page->mapping) { + if (page_mapped(page) && page->mapping) { if (PageAnon(page)) referenced += page_referenced_anon(page); - else + else if (is_locked) + referenced += page_referenced_file(page); + else if (TestSetPageLocked(page)) + referenced++; + else if (page->mapping) { referenced += page_referenced_file(page); + unlock_page(page); + } } return referenced; } @@ -346,36 +430,17 @@ BUG_ON(PageReserved(page)); BUG_ON(!anon_vma); + anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; index = (address - vma->vm_start) >> PAGE_SHIFT; index += vma->vm_pgoff; index >>= PAGE_CACHE_SHIFT - PAGE_SHIFT; - /* - * Setting and clearing PG_anon must always happen inside - * page_map_lock to avoid races between mapping and - * unmapping on different processes of the same - * shared cow swapcache page. And while we take the - * page_map_lock PG_anon cannot change from under us. - * Actually PG_anon cannot change under fork either - * since fork holds a reference on the page so it cannot - * be unmapped under fork and in turn copy_page_range is - * allowed to read PG_anon outside the page_map_lock. - */ - page_map_lock(page); - if (!page->mapcount) { - BUG_ON(PageAnon(page)); - BUG_ON(page->mapping); - SetPageAnon(page); + if (atomic_inc_and_test(&page->_mapcount)) { page->index = index; page->mapping = (struct address_space *) anon_vma; inc_page_state(nr_mapped); - } else { - BUG_ON(!PageAnon(page)); - BUG_ON(page->index != index); - BUG_ON(page->mapping != (struct address_space *) anon_vma); } - page->mapcount++; - page_map_unlock(page); + /* else checking page index and mapping is racy */ } /** @@ -390,11 +455,8 @@ if (!pfn_valid(page_to_pfn(page)) || PageReserved(page)) return; - page_map_lock(page); - if (!page->mapcount) + if (atomic_inc_and_test(&page->_mapcount)) inc_page_state(nr_mapped); - page->mapcount++; - page_map_unlock(page); } /** @@ -406,18 +468,22 @@ void page_remove_rmap(struct page *page) { BUG_ON(PageReserved(page)); - BUG_ON(!page->mapcount); - page_map_lock(page); - page->mapcount--; - if (!page->mapcount) { + if (atomic_add_negative(-1, &page->_mapcount)) { + BUG_ON(page_mapcount(page) < 0); + /* + * It would be tidy to reset the PageAnon mapping here, + * but that might overwrite a racing page_add_anon_rmap + * which increments mapcount after us but sets mapping + * before us: so leave the reset to free_hot_cold_page, + * and remember that it's only reliable while mapped. + * Leaving it set also helps swapoff to reinstate ptes + * faster for those pages still in swapcache. + */ if (page_test_and_clear_dirty(page)) set_page_dirty(page); - if (PageAnon(page)) - clear_page_anon(page); dec_page_state(nr_mapped); } - page_map_unlock(page); } /* @@ -444,8 +510,7 @@ * We need the page_table_lock to protect us from page faults, * munmap, fork, etc... */ - if (!spin_trylock(&mm->page_table_lock)) - goto out; + spin_lock(&mm->page_table_lock); pgd = pgd_offset(mm, address); if (!pgd_present(*pgd)) @@ -489,7 +554,7 @@ * ptes from being unmapped, so swapoff can make progress. */ if (PageSwapCache(page) && - page_count(page) != page->mapcount + 2) { + page_count(page) != page_mapcount(page) + 2) { ret = SWAP_FAIL; goto out_unmap; } @@ -515,8 +580,7 @@ } mm->rss--; - BUG_ON(!page->mapcount); - page->mapcount--; + page_remove_rmap(page); page_cache_release(page); out_unmap: @@ -549,7 +613,7 @@ #define CLUSTER_SIZE min(32*PAGE_SIZE, PMD_SIZE) #define CLUSTER_MASK (~(CLUSTER_SIZE - 1)) -static int try_to_unmap_cluster(unsigned long cursor, +static void try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount, struct vm_area_struct *vma) { struct mm_struct *mm = vma->vm_mm; @@ -566,8 +630,7 @@ * We need the page_table_lock to protect us from page faults, * munmap, fork, etc... */ - if (!spin_trylock(&mm->page_table_lock)) - return SWAP_FAIL; + spin_lock(&mm->page_table_lock); address = (vma->vm_start + cursor) & CLUSTER_MASK; end = address + CLUSTER_SIZE; @@ -624,20 +687,21 @@ out_unlock: spin_unlock(&mm->page_table_lock); - return SWAP_AGAIN; } -static inline int try_to_unmap_anon(struct page *page) +static int try_to_unmap_anon(struct page *page) { - struct anon_vma *anon_vma = (struct anon_vma *) page->mapping; + struct anon_vma *anon_vma; struct vm_area_struct *vma; int ret = SWAP_AGAIN; - spin_lock(&anon_vma->lock); - BUG_ON(list_empty(&anon_vma->head)); + anon_vma = page_lock_anon_vma(page); + if (!anon_vma) + return ret; + list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { ret = try_to_unmap_one(page, vma); - if (ret == SWAP_FAIL || !page->mapcount) + if (ret == SWAP_FAIL || !page_mapped(page)) break; } spin_unlock(&anon_vma->lock); @@ -652,11 +716,8 @@ * contained in the address_space struct it points to. * * This function is only called from try_to_unmap for object-based pages. - * - * The spinlock address_space->i_mmap_lock is tried. If it can't be gotten, - * return a temporary error. */ -static inline int try_to_unmap_file(struct page *page) +static int try_to_unmap_file(struct page *page) { struct address_space *mapping = page->mapping; pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); @@ -668,12 +729,10 @@ unsigned long max_nl_size = 0; unsigned int mapcount; - if (!spin_trylock(&mapping->i_mmap_lock)) - return ret; - + spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { ret = try_to_unmap_one(page, vma); - if (ret == SWAP_FAIL || !page->mapcount) + if (ret == SWAP_FAIL || !page_mapped(page)) goto out; } @@ -692,8 +751,10 @@ max_nl_size = cursor; } - if (max_nl_size == 0) /* any nonlinears locked or reserved */ + if (max_nl_size == 0) { /* any nonlinears locked or reserved */ + ret = SWAP_FAIL; goto out; + } /* * We don't try to search for this page in the nonlinear vmas, @@ -702,8 +763,9 @@ * The mapcount of the page we came in with is irrelevant, * but even so use it as a guide to how hard we should try? */ - mapcount = page->mapcount; - page_map_unlock(page); + mapcount = page_mapcount(page); + if (!mapcount) + goto out; cond_resched_lock(&mapping->i_mmap_lock); max_nl_size = (max_nl_size + CLUSTER_SIZE - 1) & CLUSTER_MASK; @@ -719,19 +781,13 @@ while (vma->vm_mm->rss && cursor < max_nl_cursor && cursor < vma->vm_end - vma->vm_start) { - ret = try_to_unmap_cluster( - cursor, &mapcount, vma); - if (ret == SWAP_FAIL) - break; + try_to_unmap_cluster(cursor, &mapcount, vma); cursor += CLUSTER_SIZE; vma->vm_private_data = (void *) cursor; if ((int)mapcount <= 0) - goto relock; + goto out; } - if (ret != SWAP_FAIL) - vma->vm_private_data = - (void *) max_nl_cursor; - ret = SWAP_AGAIN; + vma->vm_private_data = (void *) max_nl_cursor; } cond_resched_lock(&mapping->i_mmap_lock); max_nl_cursor += CLUSTER_SIZE; @@ -747,8 +803,6 @@ if (!(vma->vm_flags & VM_RESERVED)) vma->vm_private_data = NULL; } -relock: - page_map_lock(page); out: spin_unlock(&mapping->i_mmap_lock); return ret; @@ -759,11 +813,11 @@ * @page: the page to get unmapped * * Tries to remove all the page table entries which are mapping this - * page, used in the pageout path. Caller must hold the page lock - * and its rmap lock. Return values are: + * page, used in the pageout path. Caller must hold the page lock. + * Return values are: * * SWAP_SUCCESS - we succeeded in removing all mappings - * SWAP_AGAIN - we missed a trylock, try again later + * SWAP_AGAIN - we missed a mapping, try again later * SWAP_FAIL - the page is unswappable */ int try_to_unmap(struct page *page) @@ -772,20 +826,13 @@ BUG_ON(PageReserved(page)); BUG_ON(!PageLocked(page)); - BUG_ON(!page->mapcount); if (PageAnon(page)) ret = try_to_unmap_anon(page); else ret = try_to_unmap_file(page); - if (!page->mapcount) { - if (page_test_and_clear_dirty(page)) - set_page_dirty(page); - if (PageAnon(page)) - clear_page_anon(page); - dec_page_state(nr_mapped); + if (!page_mapped(page)) ret = SWAP_SUCCESS; - } return ret; } diff -Nru a/mm/shmem.c b/mm/shmem.c --- a/mm/shmem.c 2004-09-06 16:37:52 -07:00 +++ b/mm/shmem.c 2004-09-06 16:37:52 -07:00 @@ -179,7 +179,7 @@ .unplug_io_fn = default_unplug_io_fn, }; -LIST_HEAD(shmem_inodes); +static LIST_HEAD(shmem_inodes); static spinlock_t shmem_ilock = SPIN_LOCK_UNLOCKED; static void shmem_free_block(struct inode *inode) @@ -1332,7 +1332,8 @@ __get_user(dummy, buf + bytes - 1); kaddr = kmap_atomic(page, KM_USER0); - left = __copy_from_user(kaddr + offset, buf, bytes); + left = __copy_from_user_inatomic(kaddr + offset, + buf, bytes); kunmap_atomic(kaddr, KM_USER0); } if (left) { diff -Nru a/mm/slab.c b/mm/slab.c --- a/mm/slab.c 2004-09-06 16:37:56 -07:00 +++ b/mm/slab.c 2004-09-06 16:37:56 -07:00 @@ -91,10 +91,12 @@ #include #include #include +#include #include #include #include +#include /* * DEBUG - 1 for kmem_cache_create() to honour; SLAB_DEBUG_INITIAL, @@ -139,11 +141,13 @@ SLAB_POISON | SLAB_HWCACHE_ALIGN | \ SLAB_NO_REAP | SLAB_CACHE_DMA | \ SLAB_MUST_HWCACHE_ALIGN | SLAB_STORE_USER | \ - SLAB_RECLAIM_ACCOUNT | SLAB_PANIC) + SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \ + SLAB_DESTROY_BY_RCU) #else # define CREATE_MASK (SLAB_HWCACHE_ALIGN | SLAB_NO_REAP | \ SLAB_CACHE_DMA | SLAB_MUST_HWCACHE_ALIGN | \ - SLAB_RECLAIM_ACCOUNT | SLAB_PANIC) + SLAB_RECLAIM_ACCOUNT | SLAB_PANIC | \ + SLAB_DESTROY_BY_RCU) #endif /* @@ -190,6 +194,28 @@ }; /* + * struct slab_rcu + * + * slab_destroy on a SLAB_DESTROY_BY_RCU cache uses this structure to + * arrange for kmem_freepages to be called via RCU. This is useful if + * we need to approach a kernel structure obliquely, from its address + * obtained without the usual locking. We can lock the structure to + * stabilize it and check it's still at the given address, only if we + * can be sure that the memory has not been meanwhile reused for some + * other kind of object (which our subsystem's lock might corrupt). + * + * rcu_read_lock before reading the address, then rcu_read_unlock after + * taking the spinlock within the structure expected at that address. + * + * We assume struct slab_rcu can overlay struct slab when destroying. + */ +struct slab_rcu { + struct rcu_head head; + kmem_cache_t *cachep; + void *addr; +}; + +/* * struct array_cache * * Per cpu structures @@ -478,8 +504,10 @@ #undef CACHE }; -struct arraycache_init initarray_cache __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; -struct arraycache_init initarray_generic __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; +static struct arraycache_init initarray_cache __initdata = + { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; +static struct arraycache_init initarray_generic __initdata = + { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; /* internal cache of cache description objs */ static kmem_cache_t cache_cache = { @@ -497,8 +525,7 @@ /* Guard access to the cache-chain. */ static struct semaphore cache_chain_sem; - -struct list_head cache_chain; +static struct list_head cache_chain; /* * vm_enough_memory() looks at this to determine how many @@ -513,7 +540,7 @@ * chicken and egg problem: delay the per-cpu array allocation * until the general caches are up. */ -enum { +static enum { NONE, PARTIAL, FULL @@ -796,7 +823,7 @@ */ } -int __init cpucache_init(void) +static int __init cpucache_init(void) { int cpu; @@ -873,6 +900,16 @@ atomic_sub(1<gfporder, &slab_reclaim_pages); } +static void kmem_rcu_free(struct rcu_head *head) +{ + struct slab_rcu *slab_rcu = (struct slab_rcu *) head; + kmem_cache_t *cachep = slab_rcu->cachep; + + kmem_freepages(cachep, slab_rcu->addr); + if (OFF_SLAB(cachep)) + kmem_cache_free(cachep->slabp_cache, slab_rcu); +} + #if DEBUG #ifdef CONFIG_DEBUG_PAGEALLOC @@ -928,9 +965,10 @@ } #endif +#if DEBUG + static void print_objinfo(kmem_cache_t *cachep, void *objp, int lines) { -#if DEBUG int i, size; char *realobj; @@ -941,8 +979,10 @@ } if (cachep->flags & SLAB_STORE_USER) { - printk(KERN_ERR "Last user: [<%p>]", *dbg_userword(cachep, objp)); - print_symbol("(%s)", (unsigned long)*dbg_userword(cachep, objp)); + printk(KERN_ERR "Last user: [<%p>]", + *dbg_userword(cachep, objp)); + print_symbol("(%s)", + (unsigned long)*dbg_userword(cachep, objp)); printk("\n"); } realobj = (char*)objp+obj_dbghead(cachep); @@ -954,11 +994,8 @@ limit = size-i; dump_line(realobj, i, limit); } -#endif } -#if DEBUG - static void check_poison_obj(kmem_cache_t *cachep, void *objp) { char *realobj; @@ -1026,6 +1063,8 @@ */ static void slab_destroy (kmem_cache_t *cachep, struct slab *slabp) { + void *addr = slabp->s_mem - slabp->colouroff; + #if DEBUG int i; for (i = 0; i < cachep->num; i++) { @@ -1061,10 +1100,19 @@ } } #endif - - kmem_freepages(cachep, slabp->s_mem-slabp->colouroff); - if (OFF_SLAB(cachep)) - kmem_cache_free(cachep->slabp_cache, slabp); + + if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) { + struct slab_rcu *slab_rcu; + + slab_rcu = (struct slab_rcu *) slabp; + slab_rcu->cachep = cachep; + slab_rcu->addr = addr; + call_rcu(&slab_rcu->head, kmem_rcu_free); + } else { + kmem_freepages(cachep, addr); + if (OFF_SLAB(cachep)) + kmem_cache_free(cachep->slabp_cache, slabp); + } } /** @@ -1139,9 +1187,15 @@ */ if ((size < 4096 || fls(size-1) == fls(size-1+3*BYTES_PER_WORD))) flags |= SLAB_RED_ZONE|SLAB_STORE_USER; - flags |= SLAB_POISON; + if (!(flags & SLAB_DESTROY_BY_RCU)) + flags |= SLAB_POISON; #endif + if (flags & SLAB_DESTROY_BY_RCU) + BUG_ON(flags & SLAB_POISON); #endif + if (flags & SLAB_DESTROY_BY_RCU) + BUG_ON(dtor); + /* * Always checks flags, a caller might be expecting debug * support which isn't available. @@ -1553,6 +1607,9 @@ return 1; } + if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) + synchronize_kernel(); + /* no cpu_online check required here since we clear the percpu * array on cpu offline and set this to NULL. */ @@ -2424,6 +2481,27 @@ EXPORT_SYMBOL(kmem_cache_free); /** + * kcalloc - allocate memory for an array. The memory is set to zero. + * @n: number of elements. + * @size: element size. + * @flags: the type of memory to allocate. + */ +void *kcalloc(size_t n, size_t size, int flags) +{ + void *ret = NULL; + + if (n != 0 && size > INT_MAX / n) + return ret; + + ret = kmalloc(n * size, flags); + if (ret) + memset(ret, 0, n * size); + return ret; +} + +EXPORT_SYMBOL(kcalloc); + +/** * kfree - free previously allocated memory * @objp: pointer returned by kmalloc. * @@ -2946,73 +3024,4 @@ } return size; -} - -void ptrinfo(unsigned long addr) -{ - struct page *page; - - printk("Dumping data about address %p.\n", (void*)addr); - if (!virt_addr_valid((void*)addr)) { - printk("virt addr invalid.\n"); - return; - } -#ifdef CONFIG_MMU - do { - pgd_t *pgd = pgd_offset_k(addr); - pmd_t *pmd; - if (pgd_none(*pgd)) { - printk("No pgd.\n"); - break; - } - pmd = pmd_offset(pgd, addr); - if (pmd_none(*pmd)) { - printk("No pmd.\n"); - break; - } -#ifdef CONFIG_X86 - if (pmd_large(*pmd)) { - printk("Large page.\n"); - break; - } -#endif - printk("normal page, pte_val 0x%llx\n", - (unsigned long long)pte_val(*pte_offset_kernel(pmd, addr))); - } while(0); -#endif - - page = virt_to_page((void*)addr); - printk("struct page at %p, flags %08lx\n", - page, (unsigned long)page->flags); - if (PageSlab(page)) { - kmem_cache_t *c; - struct slab *s; - unsigned long flags; - int objnr; - void *objp; - - c = GET_PAGE_CACHE(page); - printk("belongs to cache %s.\n",c->name); - - spin_lock_irqsave(&c->spinlock, flags); - s = GET_PAGE_SLAB(page); - printk("slabp %p with %d inuse objects (from %d).\n", - s, s->inuse, c->num); - check_slabp(c,s); - - objnr = (addr-(unsigned long)s->s_mem)/c->objsize; - objp = s->s_mem+c->objsize*objnr; - printk("points into object no %d, starting at %p, len %d.\n", - objnr, objp, c->objsize); - if (objnr >= c->num) { - printk("Bad obj number.\n"); - } else { - kernel_map_pages(virt_to_page(objp), - c->objsize/PAGE_SIZE, 1); - - print_objinfo(c, objp, 2); - } - spin_unlock_irqrestore(&c->spinlock, flags); - - } } diff -Nru a/mm/swap_state.c b/mm/swap_state.c --- a/mm/swap_state.c 2004-09-06 16:37:52 -07:00 +++ b/mm/swap_state.c 2004-09-06 16:37:52 -07:00 @@ -171,7 +171,7 @@ /* * Add it to the swap cache and mark it dirty */ - err = __add_to_swap_cache(page, entry, GFP_ATOMIC); + err = __add_to_swap_cache(page, entry, GFP_ATOMIC|__GFP_NOWARN); if (pf_flags & PF_MEMALLOC) current->flags |= PF_MEMALLOC; diff -Nru a/mm/swapfile.c b/mm/swapfile.c --- a/mm/swapfile.c 2004-09-06 16:37:51 -07:00 +++ b/mm/swapfile.c 2004-09-06 16:37:51 -07:00 @@ -520,14 +520,24 @@ } /* vma->vm_mm->page_table_lock is held */ -static unsigned long unuse_vma(struct vm_area_struct * vma, pgd_t *pgdir, +static unsigned long unuse_vma(struct vm_area_struct * vma, swp_entry_t entry, struct page *page) { - unsigned long start = vma->vm_start, end = vma->vm_end; + pgd_t *pgdir; + unsigned long start, end; unsigned long foundaddr; - if (start >= end) - BUG(); + if (page->mapping) { + start = page_address_in_vma(page, vma); + if (start == -EFAULT) + return 0; + else + end = start + PAGE_SIZE; + } else { + start = vma->vm_start; + end = vma->vm_end; + } + pgdir = pgd_offset(vma->vm_mm, start); do { foundaddr = unuse_pgd(vma, pgdir, start, end - start, entry, page); @@ -559,9 +569,8 @@ } spin_lock(&mm->page_table_lock); for (vma = mm->mmap; vma; vma = vma->vm_next) { - if (!is_vm_hugetlb_page(vma)) { - pgd_t * pgd = pgd_offset(mm, vma->vm_start); - foundaddr = unuse_vma(vma, pgd, entry, page); + if (vma->anon_vma) { + foundaddr = unuse_vma(vma, entry, page); if (foundaddr) break; } diff -Nru a/mm/tiny-shmem.c b/mm/tiny-shmem.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/mm/tiny-shmem.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,124 @@ +/* + * tiny-shmem.c: simple shmemfs and tmpfs using ramfs code + * + * Matt Mackall January, 2004 + * derived from mm/shmem.c and fs/ramfs/inode.c + * + * This is intended for small system where the benefits of the full + * shmem code (swap-backed and resource-limited) are outweighed by + * their complexity. On systems without swap this code should be + * effectively equivalent, but much lighter weight. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct file_system_type tmpfs_fs_type = { + .name = "tmpfs", + .get_sb = ramfs_get_sb, + .kill_sb = kill_litter_super, +}; + +static struct vfsmount *shm_mnt; + +static int __init init_tmpfs(void) +{ + register_filesystem(&tmpfs_fs_type); +#ifdef CONFIG_TMPFS + devfs_mk_dir("shm"); +#endif + shm_mnt = kern_mount(&tmpfs_fs_type); + return 0; +} +module_init(init_tmpfs) + +/* + * shmem_file_setup - get an unlinked file living in tmpfs + * + * @name: name for dentry (to be seen in /proc//maps + * @size: size to be set for the file + * + */ +struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) +{ + int error; + struct file *file; + struct inode *inode; + struct dentry *dentry, *root; + struct qstr this; + + if (IS_ERR(shm_mnt)) + return (void *)shm_mnt; + + error = -ENOMEM; + this.name = name; + this.len = strlen(name); + this.hash = 0; /* will go */ + root = shm_mnt->mnt_root; + dentry = d_alloc(root, &this); + if (!dentry) + goto put_memory; + + error = -ENFILE; + file = get_empty_filp(); + if (!file) + goto put_dentry; + + error = -ENOSPC; + inode = ramfs_get_inode(root->d_sb, S_IFREG | S_IRWXUGO, 0); + if (!inode) + goto close_file; + + d_instantiate(dentry, inode); + inode->i_size = size; + inode->i_nlink = 0; /* It is unlinked */ + file->f_vfsmnt = mntget(shm_mnt); + file->f_dentry = dentry; + file->f_mapping = inode->i_mapping; + file->f_op = &ramfs_file_operations; + file->f_mode = FMODE_WRITE | FMODE_READ; + return file; + +close_file: + put_filp(file); +put_dentry: + dput(dentry); +put_memory: + return ERR_PTR(error); +} + +/* + * shmem_zero_setup - setup a shared anonymous mapping + * + * @vma: the vma to be mmapped is prepared by do_mmap_pgoff + */ +int shmem_zero_setup(struct vm_area_struct *vma) +{ + struct file *file; + loff_t size = vma->vm_end - vma->vm_start; + + file = shmem_file_setup("dev/zero", size, vma->vm_flags); + if (IS_ERR(file)) + return PTR_ERR(file); + + if (vma->vm_file) + fput(vma->vm_file); + vma->vm_file = file; + vma->vm_ops = &generic_file_vm_ops; + return 0; +} + +int shmem_unuse(swp_entry_t entry, struct page *page) +{ + return 0; +} + +EXPORT_SYMBOL(shmem_file_setup); diff -Nru a/mm/truncate.c b/mm/truncate.c --- a/mm/truncate.c 2004-09-06 16:37:55 -07:00 +++ b/mm/truncate.c 2004-09-06 16:37:55 -07:00 @@ -155,6 +155,7 @@ next = start; for ( ; ; ) { + cond_resched(); if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { if (next == start) break; diff -Nru a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c 2004-09-06 16:37:53 -07:00 +++ b/mm/vmalloc.c 2004-09-06 16:37:53 -07:00 @@ -179,11 +179,26 @@ return err; } +#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ + struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end) { struct vm_struct **p, *tmp, *area; - unsigned long addr = start; + unsigned long align = 1; + unsigned long addr; + + if (flags & VM_IOREMAP) { + int bit = fls(size); + + if (bit > IOREMAP_MAX_ORDER) + bit = IOREMAP_MAX_ORDER; + else if (bit < PAGE_SHIFT) + bit = PAGE_SHIFT; + + align = 1ul << bit; + } + addr = ALIGN(start, align); area = kmalloc(sizeof(*area), GFP_KERNEL); if (unlikely(!area)) @@ -200,13 +215,17 @@ write_lock(&vmlist_lock); for (p = &vmlist; (tmp = *p) != NULL ;p = &tmp->next) { - if ((unsigned long)tmp->addr < addr) + if ((unsigned long)tmp->addr < addr) { + if((unsigned long)tmp->addr + tmp->size >= addr) + addr = ALIGN(tmp->size + + (unsigned long)tmp->addr, align); continue; + } if ((size + addr) < addr) goto out; if (size + addr <= (unsigned long)tmp->addr) goto found; - addr = tmp->size + (unsigned long)tmp->addr; + addr = ALIGN(tmp->size + (unsigned long)tmp->addr, align); if (addr > end - size) goto out; } diff -Nru a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c 2004-09-06 16:37:51 -07:00 +++ b/mm/vmscan.c 2004-09-06 16:37:51 -07:00 @@ -219,7 +219,7 @@ return 0; } -/* Must be called with page's rmap lock held. */ +/* Called without lock on whether page is mapped, so answer is unstable */ static inline int page_mapping_inuse(struct page *page) { struct address_space *mapping; @@ -377,26 +377,19 @@ if (page_mapped(page) || PageSwapCache(page)) sc->nr_scanned++; - page_map_lock(page); - referenced = page_referenced(page); - if (referenced && page_mapping_inuse(page)) { - /* In active use or really unfreeable. Activate it. */ - page_map_unlock(page); + referenced = page_referenced(page, 1); + /* In active use or really unfreeable? Activate it. */ + if (referenced && page_mapping_inuse(page)) goto activate_locked; - } #ifdef CONFIG_SWAP /* * Anonymous process memory has backing store? * Try to allocate it some swap space here. - * - * XXX: implement swap clustering ? */ if (PageAnon(page) && !PageSwapCache(page)) { - page_map_unlock(page); if (!add_to_swap(page)) goto activate_locked; - page_map_lock(page); } #endif /* CONFIG_SWAP */ @@ -411,16 +404,13 @@ if (page_mapped(page) && mapping) { switch (try_to_unmap(page)) { case SWAP_FAIL: - page_map_unlock(page); goto activate_locked; case SWAP_AGAIN: - page_map_unlock(page); goto keep_locked; case SWAP_SUCCESS: ; /* try to free the page below */ } } - page_map_unlock(page); if (PageDirty(page)) { if (referenced) @@ -723,25 +713,12 @@ page = lru_to_page(&l_hold); list_del(&page->lru); if (page_mapped(page)) { - if (!reclaim_mapped) { - list_add(&page->lru, &l_active); - continue; - } - page_map_lock(page); - if (page_referenced(page)) { - page_map_unlock(page); + if (!reclaim_mapped || + (total_swap_pages == 0 && PageAnon(page)) || + page_referenced(page, 0)) { list_add(&page->lru, &l_active); continue; } - page_map_unlock(page); - } - /* - * FIXME: need to consider page_count(page) here if/when we - * reap orphaned pages via the LRU (Daniel's locking stuff) - */ - if (total_swap_pages == 0 && PageAnon(page)) { - list_add(&page->lru, &l_active); - continue; } list_add(&page->lru, &l_inactive); } diff -Nru a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c --- a/net/atm/mpoa_proc.c 2004-09-06 16:37:56 -07:00 +++ b/net/atm/mpoa_proc.c 2004-09-06 16:37:56 -07:00 @@ -121,7 +121,7 @@ /* * READING function - called when the /proc/atm/mpoa file is read from. */ -static ssize_t mpc_show(struct seq_file *m, void *v) +static int mpc_show(struct seq_file *m, void *v) { struct mpoa_client *mpc = v; unsigned char *temp; diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c --- a/net/bridge/br_input.c 2004-09-06 16:37:51 -07:00 +++ b/net/bridge/br_input.c 2004-09-06 16:37:51 -07:00 @@ -45,26 +45,15 @@ br_pass_frame_up_finish); } +/* note: already called with rcu_read_lock (preempt_disabled) */ int br_handle_frame_finish(struct sk_buff *skb) { - struct net_bridge *br; - unsigned char *dest; + const unsigned char *dest = skb->mac.ethernet->h_dest; + struct net_bridge_port *p = skb->dev->br_port; + struct net_bridge *br = p->br; struct net_bridge_fdb_entry *dst; - struct net_bridge_port *p; - int passedup; + int passedup = 0; - dest = skb->mac.ethernet->h_dest; - - rcu_read_lock(); - p = rcu_dereference(skb->dev->br_port); - - if (p == NULL || p->state == BR_STATE_DISABLED) { - kfree_skb(skb); - goto out; - } - - br = p->br; - passedup = 0; if (br->dev->flags & IFF_PROMISC) { struct sk_buff *skb2; @@ -99,20 +88,21 @@ br_flood_forward(br, skb, 0); out: - rcu_read_unlock(); return 0; } -int br_handle_frame(struct sk_buff *skb) +/* + * Called via br_handle_frame_hook. + * Return 0 if *pskb should be processed furthur + * 1 if *pskb is handled + * note: already called with rcu_read_lock (preempt_disabled) + */ +int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) { - unsigned char *dest; - struct net_bridge_port *p; - - dest = skb->mac.ethernet->h_dest; + struct sk_buff *skb = *pskb; + const unsigned char *dest = skb->mac.ethernet->h_dest; - rcu_read_lock(); - p = skb->dev->br_port; - if (p == NULL || p->state == BR_STATE_DISABLED) + if (p->state == BR_STATE_DISABLED) goto err; if (skb->mac.ethernet->h_source[0] & 1) @@ -128,15 +118,16 @@ if (!dest[5]) { NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, NULL, br_stp_handle_bpdu); - rcu_read_unlock(); - return 0; + return 1; } } else if (p->state == BR_STATE_FORWARDING) { - if (br_should_route_hook && br_should_route_hook(&skb)) { - rcu_read_unlock(); - return -1; + if (br_should_route_hook) { + if (br_should_route_hook(pskb)) + return 0; + skb = *pskb; + dest = skb->mac.ethernet->h_dest; } if (!memcmp(p->br->dev->dev_addr, dest, ETH_ALEN)) @@ -144,12 +135,10 @@ NF_HOOK(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, br_handle_frame_finish); - rcu_read_unlock(); - return 0; + return 1; } err: - rcu_read_unlock(); kfree_skb(skb); - return 0; + return 1; } diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c --- a/net/bridge/br_netfilter.c 2004-09-06 16:37:55 -07:00 +++ b/net/bridge/br_netfilter.c 2004-09-06 16:37:55 -07:00 @@ -11,6 +11,7 @@ * Jun 19 2003: let arptables see bridged ARP traffic (bdschuym) * Oct 06 2003: filter encapsulated IP/ARP VLAN traffic on untagged bridge * (bdschuym) + * Sep 01 2004: add IPv6 filtering (bdschuym) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,9 +30,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include "br_private.h" @@ -39,7 +42,6 @@ #include #endif - #define skb_origaddr(skb) (((struct bridge_skb_cb *) \ (skb->nf_bridge->data))->daddr.ipv4) #define store_orig_dstaddr(skb) (skb_origaddr(skb) = (skb)->nh.iph->daddr) @@ -51,6 +53,7 @@ #ifdef CONFIG_SYSCTL static struct ctl_table_header *brnf_sysctl_header; static int brnf_call_iptables = 1; +static int brnf_call_ip6tables = 1; static int brnf_call_arptables = 1; static int brnf_filter_vlan_tagged = 1; #else @@ -60,6 +63,9 @@ #define IS_VLAN_IP (skb->protocol == __constant_htons(ETH_P_8021Q) && \ hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IP) && \ brnf_filter_vlan_tagged) +#define IS_VLAN_IPV6 (skb->protocol == __constant_htons(ETH_P_8021Q) && \ + hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IPV6) && \ + brnf_filter_vlan_tagged) #define IS_VLAN_ARP (skb->protocol == __constant_htons(ETH_P_8021Q) && \ hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_ARP) && \ brnf_filter_vlan_tagged) @@ -71,8 +77,7 @@ * Currently, we fill in the PMTU entry because netfilter * refragmentation needs it, and the rt_flags entry because * ipt_REJECT needs it. Future netfilter modules might - * require us to fill additional fields. - */ + * require us to fill additional fields. */ static struct net_device __fake_net_device = { .hard_header_len = ETH_HLEN }; @@ -91,6 +96,36 @@ /* PF_BRIDGE/PRE_ROUTING *********************************************/ +/* Undo the changes made for ip6tables PREROUTING and continue the + * bridge PRE_ROUTING hook. */ +static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb) +{ + struct nf_bridge_info *nf_bridge = skb->nf_bridge; + +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug ^= (1 << NF_BR_PRE_ROUTING); +#endif + + if (nf_bridge->mask & BRNF_PKT_TYPE) { + skb->pkt_type = PACKET_OTHERHOST; + nf_bridge->mask ^= BRNF_PKT_TYPE; + } + nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING; + + skb->dst = (struct dst_entry *)&__fake_rtable; + dst_hold(skb->dst); + + skb->dev = nf_bridge->physindev; + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_push(skb, VLAN_HLEN); + skb->nh.raw -= VLAN_HLEN; + } + NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, + br_handle_frame_finish, 1); + + return 0; +} + static void __br_dnat_complain(void) { static unsigned long last_complaint; @@ -102,7 +137,6 @@ } } - /* This requires some explaining. If DNAT has taken place, * we will need to fix up the destination Ethernet address, * and this is a tricky process. @@ -145,9 +179,7 @@ * * --Lennert, 20020411 * --Bart, 20020416 (updated) - * --Bart, 20021007 (updated) - */ - + * --Bart, 20021007 (updated) */ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) { #ifdef CONFIG_NETFILTER_DEBUG @@ -195,8 +227,7 @@ if (!ip_route_output_key(&rt, &fl)) { /* Bridged-and-DNAT'ed traffic doesn't - * require ip_forwarding. - */ + * require ip_forwarding. */ if (((struct dst_entry *)rt)->dev == dev) { skb->dst = (struct dst_entry *)rt; goto bridged_dnat; @@ -210,8 +241,7 @@ if (skb->dst->dev == dev) { bridged_dnat: /* Tell br_nf_local_out this is a - * bridged frame - */ + * bridged frame */ nf_bridge->mask |= BRNF_BRIDGED_DNAT; skb->dev = nf_bridge->physindev; if (skb->protocol == @@ -245,12 +275,81 @@ return 0; } -/* Replicate the checks that IPv4 does on packet reception. +/* Some common code for IPv4/IPv6 */ +static void setup_pre_routing(struct sk_buff *skb) +{ + struct nf_bridge_info *nf_bridge = skb->nf_bridge; + + if (skb->pkt_type == PACKET_OTHERHOST) { + skb->pkt_type = PACKET_HOST; + nf_bridge->mask |= BRNF_PKT_TYPE; + } + + nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING; + nf_bridge->physindev = skb->dev; + skb->dev = bridge_parent(skb->dev); +} + +/* Replicate the checks that IPv6 does on packet reception and pass the packet + * to ip6tables, which doesn't support NAT, so things are fairly simple. */ +static unsigned int br_nf_pre_routing_ipv6(unsigned int hook, + struct sk_buff *skb, const struct net_device *in, + const struct net_device *out, int (*okfn)(struct sk_buff *)) +{ + struct ipv6hdr *hdr; + u32 pkt_len; + struct nf_bridge_info *nf_bridge; + + if (skb->len < sizeof(struct ipv6hdr)) + goto inhdr_error; + + if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) + goto inhdr_error; + + hdr = skb->nh.ipv6h; + + if (hdr->version != 6) + goto inhdr_error; + + pkt_len = ntohs(hdr->payload_len); + + if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { + if (pkt_len + sizeof(struct ipv6hdr) > skb->len) + goto inhdr_error; + if (pkt_len + sizeof(struct ipv6hdr) < skb->len && + __pskb_trim(skb, pkt_len + sizeof(struct ipv6hdr))) + goto inhdr_error; + } + if (hdr->nexthdr == NEXTHDR_HOP) { + /* We only check the length. A bridge shouldn't do any + * hop-by-hop stuff anyway. */ + unsigned char *raw = (u8*)(skb->nh.ipv6h+1); + + if ((raw + ((int)(raw[1]+1)<<3)) - skb->data > skb_headlen(skb)) + goto inhdr_error; + } +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug ^= (1 << NF_IP6_PRE_ROUTING); +#endif + if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) + return NF_DROP; + setup_pre_routing(skb); + + NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, + br_nf_pre_routing_finish_ipv6); + + return NF_STOLEN; + +inhdr_error: + return NF_DROP; +} + +/* Direct IPv6 traffic to br_nf_pre_routing_ipv6. + * Replicate the checks that IPv4 does on packet reception. * Set skb->dev to the bridge device (i.e. parent of the * receiving device) to make netfilter happy, the REDIRECT * target in particular. Save the original destination IP - * address to be able to detect DNAT afterwards. - */ + * address to be able to detect DNAT afterwards. */ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -259,25 +358,39 @@ __u32 len; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; + struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) + ((*pskb)->mac.ethernet); + if (skb->protocol == __constant_htons(ETH_P_IPV6) || IS_VLAN_IPV6) { +#ifdef CONFIG_SYSCTL + if (!brnf_call_ip6tables) + return NF_ACCEPT; +#endif + if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) + goto out; + + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (skb)->nh.raw += VLAN_HLEN; + } + return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); + } #ifdef CONFIG_SYSCTL if (!brnf_call_iptables) return NF_ACCEPT; #endif - if (skb->protocol != __constant_htons(ETH_P_IP)) { - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) - ((*pskb)->mac.ethernet); + if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) + return NF_ACCEPT; - if (!IS_VLAN_IP) - return NF_ACCEPT; - if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) - goto out; - skb_pull(*pskb, VLAN_HLEN); - (*pskb)->nh.raw += VLAN_HLEN; - } else if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) + if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) goto out; + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (skb)->nh.raw += VLAN_HLEN; + } + if (!pskb_may_pull(skb, sizeof(struct iphdr))) goto inhdr_error; @@ -305,17 +418,9 @@ #ifdef CONFIG_NETFILTER_DEBUG skb->nf_debug ^= (1 << NF_IP_PRE_ROUTING); #endif - if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) + if ((nf_bridge = nf_bridge_alloc(skb)) == NULL) return NF_DROP; - - if (skb->pkt_type == PACKET_OTHERHOST) { - skb->pkt_type = PACKET_HOST; - nf_bridge->mask |= BRNF_PKT_TYPE; - } - - nf_bridge->mask |= BRNF_NF_BRIDGE_PREROUTING; - nf_bridge->physindev = skb->dev; - skb->dev = bridge_parent(skb->dev); + setup_pre_routing(skb); store_orig_dstaddr(skb); NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, @@ -336,8 +441,7 @@ * packet would pass through PRE_ROUTING again (which already * took place when the packet entered the bridge), but we * register an IPv4 PRE_ROUTING 'sabotage' hook that will - * prevent this from happening. - */ + * prevent this from happening. */ static unsigned int br_nf_local_in(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -364,7 +468,7 @@ skb->nf_debug ^= (1 << NF_BR_FORWARD); #endif - if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) { + if (skb->protocol != __constant_htons(ETH_P_ARP) && !IS_VLAN_ARP) { in = nf_bridge->physindev; if (nf_bridge->mask & BRNF_PKT_TYPE) { skb->pkt_type = PACKET_OTHERHOST; @@ -385,9 +489,8 @@ /* This is the 'purely bridged' case. For IP, we pass the packet to * netfilter with indev and outdev set to the bridge device, * but we are still able to filter on the 'real' indev/outdev - * because of the ipt_physdev.c module. For ARP, indev and outdev are the - * bridge ports. - */ + * because of the physdev module. For ARP, indev and outdev are the + * bridge ports. */ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) @@ -395,15 +498,17 @@ struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + int pf; -#ifdef CONFIG_SYSCTL if (!skb->nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP)) { - if (!IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; + + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { skb_pull(*pskb, VLAN_HLEN); (*pskb)->nh.raw += VLAN_HLEN; } @@ -421,7 +526,7 @@ nf_bridge->mask |= BRNF_BRIDGED; nf_bridge->physoutdev = skb->dev; - NF_HOOK(PF_INET, NF_IP_FORWARD, skb, bridge_parent(in), + NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), bridge_parent(out), br_nf_forward_finish); return NF_STOLEN; @@ -483,11 +588,10 @@ return 0; } - /* This function sees both locally originated IP packets and forwarded * IP packets (in both cases the destination device is a bridge * device). It also sees bridged-and-DNAT'ed packets. - * To be able to filter on the physical bridge devices (with the ipt_physdev.c + * To be able to filter on the physical bridge devices (with the physdev * module), we steal packets destined to a bridge device away from the * PF_INET/FORWARD and PF_INET/OUTPUT hook functions, and give them back later, * when we have determined the real output device. This is done in here. @@ -501,45 +605,44 @@ * this packet before, and so the packet was locally originated. We fake * the PF_INET/LOCAL_OUT hook. * Finally, if nf_bridge->physindev isn't NULL, then the packet was IP routed, - * so we fake the PF_INET/FORWARD hook. ipv4_sabotage_out() makes sure + * so we fake the PF_INET/FORWARD hook. ip_sabotage_out() makes sure * even routed packets that didn't arrive on a bridge interface have their - * nf_bridge->physindev set. - */ - + * nf_bridge->physindev set. */ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, - int (*_okfn)(struct sk_buff *)) + int (*okfn)(struct sk_buff *)) { - int (*okfn)(struct sk_buff *skb); - struct net_device *realindev; + struct net_device *realindev, *realoutdev; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + int pf; -#ifdef CONFIG_SYSCTL if (!skb->nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; +#ifdef CONFIG_NETFILTER_DEBUG /* Sometimes we get packets with NULL ->dst here (for example, - * running a dhcp client daemon triggers this). - */ - if (skb->dst == NULL) + * running a dhcp client daemon triggers this). This should now + * be fixed, but let's keep the check around. */ + if (skb->dst == NULL) { + printk(KERN_CRIT "br_netfilter: skb->dst == NULL."); return NF_ACCEPT; + } +#endif nf_bridge = skb->nf_bridge; nf_bridge->physoutdev = skb->dev; realindev = nf_bridge->physindev; /* Bridged, take PF_BRIDGE/FORWARD. - * (see big note in front of br_nf_pre_routing_finish) - */ + * (see big note in front of br_nf_pre_routing_finish) */ if (nf_bridge->mask & BRNF_BRIDGED_DNAT) { - okfn = br_forward_finish; - if (nf_bridge->mask & BRNF_PKT_TYPE) { skb->pkt_type = PACKET_OTHERHOST; nf_bridge->mask ^= BRNF_PKT_TYPE; @@ -550,41 +653,41 @@ } NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev, - skb->dev, okfn); - } else { - struct net_device *realoutdev = bridge_parent(skb->dev); + skb->dev, br_forward_finish); + goto out; + } + realoutdev = bridge_parent(skb->dev); #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) - /* iptables should match -o br0.x */ - if (nf_bridge->netoutdev) - realoutdev = nf_bridge->netoutdev; + /* iptables should match -o br0.x */ + if (nf_bridge->netoutdev) + realoutdev = nf_bridge->netoutdev; #endif - okfn = br_nf_local_out_finish; - if (skb->protocol == __constant_htons(ETH_P_8021Q)) { - skb_pull(skb, VLAN_HLEN); - (*pskb)->nh.raw += VLAN_HLEN; - } - /* IP forwarded traffic has a physindev, locally - * generated traffic hasn't. - */ - if (realindev != NULL) { - if (((nf_bridge->mask & BRNF_DONT_TAKE_PARENT) == 0) && - has_bridge_parent(realindev)) - realindev = bridge_parent(realindev); - NF_HOOK_THRESH(PF_INET, NF_IP_FORWARD, skb, realindev, - realoutdev, okfn, - NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD + 1); - } else { + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + (*pskb)->nh.raw += VLAN_HLEN; + } + /* IP forwarded traffic has a physindev, locally + * generated traffic hasn't. */ + if (realindev != NULL) { + if (!(nf_bridge->mask & BRNF_DONT_TAKE_PARENT) && + has_bridge_parent(realindev)) + realindev = bridge_parent(realindev); + + NF_HOOK_THRESH(pf, NF_IP_FORWARD, skb, realindev, + realoutdev, br_nf_local_out_finish, + NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD + 1); + } else { #ifdef CONFIG_NETFILTER_DEBUG - skb->nf_debug ^= (1 << NF_IP_LOCAL_OUT); + skb->nf_debug ^= (1 << NF_IP_LOCAL_OUT); #endif - NF_HOOK_THRESH(PF_INET, NF_IP_LOCAL_OUT, skb, realindev, - realoutdev, okfn, - NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT + 1); - } + NF_HOOK_THRESH(pf, NF_IP_LOCAL_OUT, skb, realindev, + realoutdev, br_nf_local_out_finish, + NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT + 1); } +out: return NF_STOLEN; } @@ -598,6 +701,7 @@ struct nf_bridge_info *nf_bridge = (*pskb)->nf_bridge; struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); struct net_device *realoutdev = bridge_parent(skb->dev); + int pf; #ifdef CONFIG_NETFILTER_DEBUG /* Be very paranoid. This probably won't happen anymore, but let's @@ -609,19 +713,15 @@ } #endif -#ifdef CONFIG_SYSCTL if (!nf_bridge) return NF_ACCEPT; -#endif - if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP) - return NF_ACCEPT; + if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) + pf = PF_INET; + else + pf = PF_INET6; #ifdef CONFIG_NETFILTER_DEBUG - /* Sometimes we get packets with NULL ->dst here (for example, - * running a dhcp client daemon triggers this). This should now - * be fixed, but let's keep the check around. - */ if (skb->dst == NULL) { printk(KERN_CRIT "br_netfilter: skb->dst == NULL."); goto print_error; @@ -631,8 +731,7 @@ #endif /* We assume any code from br_dev_queue_push_xmit onwards doesn't care - * about the value of skb->pkt_type. - */ + * about the value of skb->pkt_type. */ if (skb->pkt_type == PACKET_OTHERHOST) { skb->pkt_type = PACKET_HOST; nf_bridge->mask |= BRNF_PKT_TYPE; @@ -649,8 +748,8 @@ if (nf_bridge->netoutdev) realoutdev = nf_bridge->netoutdev; #endif - NF_HOOK(PF_INET, NF_IP_POST_ROUTING, skb, NULL, - realoutdev, br_dev_queue_push_xmit); + NF_HOOK(pf, NF_IP_POST_ROUTING, skb, NULL, realoutdev, + br_dev_queue_push_xmit); return NF_STOLEN; @@ -668,12 +767,10 @@ } -/* IPv4/SABOTAGE *****************************************************/ - -/* Don't hand locally destined packets to PF_INET/PRE_ROUTING - * for the second time. - */ -static unsigned int ipv4_sabotage_in(unsigned int hook, struct sk_buff **pskb, +/* IP/SABOTAGE *****************************************************/ +/* Don't hand locally destined packets to PF_INET(6)/PRE_ROUTING + * for the second time. */ +static unsigned int ip_sabotage_in(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { @@ -686,19 +783,27 @@ return NF_ACCEPT; } -/* Postpone execution of PF_INET/FORWARD, PF_INET/LOCAL_OUT - * and PF_INET/POST_ROUTING until we have done the forwarding - * decision in the bridge code and have determined skb->physoutdev. - */ -static unsigned int ipv4_sabotage_out(unsigned int hook, struct sk_buff **pskb, +/* Postpone execution of PF_INET(6)/FORWARD, PF_INET(6)/LOCAL_OUT + * and PF_INET(6)/POST_ROUTING until we have done the forwarding + * decision in the bridge code and have determined nf_bridge->physoutdev. */ +static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { struct sk_buff *skb = *pskb; #ifdef CONFIG_SYSCTL - if (!brnf_call_iptables && !skb->nf_bridge) - return NF_ACCEPT; + if (!skb->nf_bridge) { + struct vlan_ethhdr *hdr = + (struct vlan_ethhdr *)(skb->mac.ethernet); + + if (skb->protocol == __constant_htons(ETH_P_IP) || + IS_VLAN_IP) { + if (!brnf_call_iptables) + return NF_ACCEPT; + } else if (!brnf_call_ip6tables) + return NF_ACCEPT; + } #endif if ((out->hard_start_xmit == br_dev_xmit && @@ -721,8 +826,7 @@ * will need the indev then. For a brouter, the real indev * can be a bridge port, so we make sure br_nf_local_out() * doesn't use the bridge parent of the indev by using - * the BRNF_DONT_TAKE_PARENT mask. - */ + * the BRNF_DONT_TAKE_PARENT mask. */ if (hook == NF_IP_FORWARD && nf_bridge->physindev == NULL) { nf_bridge->mask &= BRNF_DONT_TAKE_PARENT; nf_bridge->physindev = (struct net_device *)in; @@ -742,8 +846,7 @@ /* For br_nf_local_out we need (prio = NF_BR_PRI_FIRST), to insure that innocent * PF_BRIDGE/NF_BR_LOCAL_OUT functions don't get bridged traffic as input. * For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because - * ip_refrag() can return NF_STOLEN. - */ + * ip_refrag() can return NF_STOLEN. */ static struct nf_hook_ops br_nf_ops[] = { { .hook = br_nf_pre_routing, .owner = THIS_MODULE, @@ -775,26 +878,46 @@ .pf = PF_BRIDGE, .hooknum = NF_BR_POST_ROUTING, .priority = NF_BR_PRI_LAST, }, - { .hook = ipv4_sabotage_in, + { .hook = ip_sabotage_in, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_PRE_ROUTING, .priority = NF_IP_PRI_FIRST, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_in, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_PRE_ROUTING, + .priority = NF_IP6_PRI_FIRST, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_FORWARD, .priority = NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_FORWARD, + .priority = NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_LOCAL_OUT, .priority = NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT, }, - { .hook = ipv4_sabotage_out, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_LOCAL_OUT, + .priority = NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT, }, + { .hook = ip_sabotage_out, .owner = THIS_MODULE, .pf = PF_INET, .hooknum = NF_IP_POST_ROUTING, .priority = NF_IP_PRI_FIRST, }, + { .hook = ip_sabotage_out, + .owner = THIS_MODULE, + .pf = PF_INET6, + .hooknum = NF_IP6_POST_ROUTING, + .priority = NF_IP6_PRI_FIRST, }, }; #ifdef CONFIG_SYSCTL @@ -824,6 +947,14 @@ .ctl_name = NET_BRIDGE_NF_CALL_IPTABLES, .procname = "bridge-nf-call-iptables", .data = &brnf_call_iptables, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &brnf_sysctl_call_tables, + }, + { + .ctl_name = NET_BRIDGE_NF_CALL_IP6TABLES, + .procname = "bridge-nf-call-ip6tables", + .data = &brnf_call_ip6tables, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &brnf_sysctl_call_tables, diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h --- a/net/bridge/br_private.h 2004-09-06 16:37:51 -07:00 +++ b/net/bridge/br_private.h 2004-09-06 16:37:51 -07:00 @@ -177,7 +177,7 @@ /* br_input.c */ extern int br_handle_frame_finish(struct sk_buff *skb); -extern int br_handle_frame(struct sk_buff *skb); +extern int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb); /* br_ioctl.c */ extern int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-09-06 16:37:52 -07:00 +++ b/net/core/dev.c 2004-09-06 16:37:52 -07:00 @@ -1144,16 +1144,10 @@ goto out; } - if (skb_shared(*pskb) || skb_cloned(*pskb)) { - struct sk_buff *newskb = skb_copy(*pskb, GFP_ATOMIC); - if (!newskb) { - ret = -ENOMEM; + if (skb_cloned(*pskb)) { + ret = pskb_expand_head(*pskb, 0, 0, GFP_ATOMIC); + if (ret) goto out; - } - if ((*pskb)->sk) - skb_set_owner_w(newskb, (*pskb)->sk); - kfree_skb(*pskb); - *pskb = newskb; } if (offset > (int)(*pskb)->len) @@ -1557,7 +1551,7 @@ struct softnet_data *queue; unsigned long flags; -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL if (skb->dev->netpoll_rx && netpoll_rx(skb)) { kfree_skb(skb); return NET_RX_DROP; @@ -1676,43 +1670,34 @@ } static __inline__ int deliver_skb(struct sk_buff *skb, - struct packet_type *pt_prev, int last) + struct packet_type *pt_prev) { atomic_inc(&skb->users); return pt_prev->func(skb, skb->dev, pt_prev); } - #if defined(CONFIG_BRIDGE) || defined (CONFIG_BRIDGE_MODULE) -int (*br_handle_frame_hook)(struct sk_buff *skb); +int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb); -static __inline__ int handle_bridge(struct sk_buff *skb, - struct packet_type *pt_prev) +static __inline__ int handle_bridge(struct sk_buff **pskb, + struct packet_type **pt_prev, int *ret) { - int ret = NET_RX_DROP; - if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); - - return ret; -} + struct net_bridge_port *port; -#endif - -static inline int __handle_bridge(struct sk_buff *skb, - struct packet_type **pt_prev, int *ret) -{ -#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) - if (skb->dev->br_port && skb->pkt_type != PACKET_LOOPBACK) { - *ret = handle_bridge(skb, *pt_prev); - if (br_handle_frame_hook(skb) == 0) - return 1; + if ((*pskb)->pkt_type == PACKET_LOOPBACK || + (port = rcu_dereference((*pskb)->dev->br_port)) == NULL) + return 0; + if (*pt_prev) { + *ret = deliver_skb(*pskb, *pt_prev); *pt_prev = NULL; - } -#endif - return 0; + } + + return br_handle_frame_hook(port, pskb); } - +#else +#define handle_bridge(skb, pt_prev, ret) (0) +#endif #ifdef CONFIG_NET_CLS_ACT /* TODO: Maybe we should just force sch_ingress to be compiled in @@ -1761,7 +1746,7 @@ int ret = NET_RX_DROP; unsigned short type; -#ifdef CONFIG_NETPOLL_RX +#ifdef CONFIG_NETPOLL if (skb->dev->netpoll_rx && skb->dev->poll && netpoll_rx(skb)) { kfree_skb(skb); return NET_RX_DROP; @@ -1779,27 +1764,27 @@ skb->mac_len = skb->nh.raw - skb->mac.raw; pt_prev = NULL; + + rcu_read_lock(); + #ifdef CONFIG_NET_CLS_ACT if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); - rcu_read_lock(); goto ncls; } - #endif +#endif - rcu_read_lock(); list_for_each_entry_rcu(ptype, &ptype_all, list) { if (!ptype->dev || ptype->dev == skb->dev) { if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); + ret = deliver_skb(skb, pt_prev); pt_prev = ptype; } } #ifdef CONFIG_NET_CLS_ACT if (pt_prev) { - atomic_inc(&skb->users); - ret = pt_prev->func(skb, skb->dev, pt_prev); + ret = deliver_skb(skb, pt_prev); pt_prev = NULL; /* noone else should process this after*/ } else { skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); @@ -1818,7 +1803,7 @@ handle_diverter(skb); - if (__handle_bridge(skb, &pt_prev, &ret)) + if (handle_bridge(&skb, &pt_prev, &ret)) goto out; type = skb->protocol; @@ -1826,7 +1811,7 @@ if (ptype->type == type && (!ptype->dev || ptype->dev == skb->dev)) { if (pt_prev) - ret = deliver_skb(skb, pt_prev, 0); + ret = deliver_skb(skb, pt_prev); pt_prev = ptype; } } diff -Nru a/net/core/neighbour.c b/net/core/neighbour.c --- a/net/core/neighbour.c 2004-09-06 16:37:50 -07:00 +++ b/net/core/neighbour.c 2004-09-06 16:37:50 -07:00 @@ -1120,6 +1120,7 @@ if (p) { memcpy(p, &tbl->parms, sizeof(*p)); p->tbl = tbl; + INIT_RCU_HEAD(&p->rcu_head); p->reachable_time = neigh_rand_reach_time(p->base_reachable_time); if (dev && dev->neigh_setup && dev->neigh_setup(dev, p)) { @@ -1135,6 +1136,14 @@ return p; } +static void neigh_rcu_free_parms(struct rcu_head *head) +{ + struct neigh_parms *parms = + container_of(head, struct neigh_parms, rcu_head); + + kfree(parms); +} + void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms) { struct neigh_parms **p; @@ -1146,7 +1155,7 @@ if (*p == parms) { *p = parms->next; write_unlock_bh(&tbl->lock); - kfree(parms); + call_rcu(&parms->rcu_head, neigh_rcu_free_parms); return; } } @@ -1159,6 +1168,7 @@ { unsigned long now = jiffies; + INIT_RCU_HEAD(&tbl->parms.rcu_head); tbl->parms.reachable_time = neigh_rand_reach_time(tbl->parms.base_reachable_time); diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c --- a/net/core/netpoll.c 2004-09-06 16:37:55 -07:00 +++ b/net/core/netpoll.c 2004-09-06 16:37:55 -07:00 @@ -21,6 +21,7 @@ #include #include #include +#include /* * We maintain a small pool of fully-sized skbs, to make sure the @@ -37,7 +38,11 @@ static spinlock_t rx_list_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(rx_list); -static int trapped; +static atomic_t trapped; +spinlock_t netpoll_poll_lock = SPIN_LOCK_UNLOCKED; + +#define NETPOLL_RX_ENABLED 1 +#define NETPOLL_RX_DROP 2 #define MAX_SKB_SIZE \ (MAX_UDP_CHUNK + sizeof(struct udphdr) + \ @@ -62,7 +67,14 @@ void netpoll_poll(struct netpoll *np) { - int budget = 1; + /* + * In cases where there is bi-directional communications, reading + * only one message at a time can lead to packets being dropped by + * the network adapter, forcing superfluous retries and possibly + * timeouts. Thus, we set our budget to a more reasonable value. + */ + int budget = 16; + unsigned long flags; if(!np->dev || !netif_running(np->dev) || !np->dev->poll_controller) return; @@ -71,9 +83,19 @@ np->dev->poll_controller(np->dev); /* If scheduling is stopped, tickle NAPI bits */ - if(trapped && np->dev->poll && - test_bit(__LINK_STATE_RX_SCHED, &np->dev->state)) + spin_lock_irqsave(&netpoll_poll_lock, flags); + if (np->dev->poll && + test_bit(__LINK_STATE_RX_SCHED, &np->dev->state)) { + np->dev->netpoll_rx |= NETPOLL_RX_DROP; + atomic_inc(&trapped); + np->dev->poll(np->dev, &budget); + + atomic_dec(&trapped); + np->dev->netpoll_rx &= ~NETPOLL_RX_DROP; + } + spin_unlock_irqrestore(&netpoll_poll_lock, flags); + zap_completion_queue(); } @@ -169,6 +191,18 @@ spin_lock(&np->dev->xmit_lock); np->dev->xmit_lock_owner = smp_processor_id(); + /* + * network drivers do not expect to be called if the queue is + * stopped. + */ + if (netif_queue_stopped(np->dev)) { + np->dev->xmit_lock_owner = -1; + spin_unlock(&np->dev->xmit_lock); + + netpoll_poll(np); + goto repeat; + } + status = np->dev->hard_start_xmit(skb, np->dev); np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); @@ -207,17 +241,17 @@ iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); - iph->version = 4; - iph->ihl = 5; + /* iph->version = 4; iph->ihl = 5; */ + put_unaligned(0x54, (unsigned char *)iph); iph->tos = 0; - iph->tot_len = htons(ip_len); + put_unaligned(htonl(ip_len), &(iph->tot_len)); iph->id = 0; iph->frag_off = 0; iph->ttl = 64; iph->protocol = IPPROTO_UDP; iph->check = 0; - iph->saddr = htonl(np->local_ip); - iph->daddr = htonl(np->remote_ip); + put_unaligned(htonl(np->local_ip), &(iph->saddr)); + put_unaligned(htonl(np->remote_ip), &(iph->daddr)); iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); @@ -338,7 +372,8 @@ goto out; /* check if netpoll clients need ARP */ - if (skb->protocol == __constant_htons(ETH_P_ARP) && trapped) { + if (skb->protocol == __constant_htons(ETH_P_ARP) && + atomic_read(&trapped)) { arp_reply(skb); return 1; } @@ -401,7 +436,7 @@ spin_unlock_irqrestore(&rx_list_lock, flags); out: - return trapped; + return atomic_read(&trapped); } int netpoll_parse_options(struct netpoll *np, char *opt) @@ -594,9 +629,7 @@ if(np->rx_hook) { unsigned long flags; -#ifdef CONFIG_NETPOLL_RX - np->dev->netpoll_rx = 1; -#endif + np->dev->netpoll_rx = NETPOLL_RX_ENABLED; spin_lock_irqsave(&rx_list_lock, flags); list_add(&np->rx_list, &rx_list); @@ -611,30 +644,31 @@ void netpoll_cleanup(struct netpoll *np) { - if(np->rx_hook) { + if (np->rx_hook) { unsigned long flags; spin_lock_irqsave(&rx_list_lock, flags); list_del(&np->rx_list); -#ifdef CONFIG_NETPOLL_RX - if (np->dev) - np->dev->netpoll_rx = 0; -#endif spin_unlock_irqrestore(&rx_list_lock, flags); } + if (np->dev) + np->dev->netpoll_rx = 0; dev_put(np->dev); np->dev = NULL; } int netpoll_trap(void) { - return trapped; + return atomic_read(&trapped); } void netpoll_set_trap(int trap) { - trapped = trap; + if (trap) + atomic_inc(&trapped); + else + atomic_dec(&trapped); } EXPORT_SYMBOL(netpoll_set_trap); diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c --- a/net/core/rtnetlink.c 2004-09-06 16:37:55 -07:00 +++ b/net/core/rtnetlink.c 2004-09-06 16:37:55 -07:00 @@ -166,31 +166,58 @@ r->ifi_family = AF_UNSPEC; r->ifi_type = dev->type; r->ifi_index = dev->ifindex; - r->ifi_flags = dev->flags; + r->ifi_flags = dev_get_flags(dev); r->ifi_change = change; - if (!netif_running(dev) || !netif_carrier_ok(dev)) - r->ifi_flags &= ~IFF_RUNNING; - else - r->ifi_flags |= IFF_RUNNING; - RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); + + if (1) { + u32 txqlen = dev->tx_queue_len; + RTA_PUT(skb, IFLA_TXQLEN, sizeof(txqlen), &txqlen); + } + + if (1) { + u32 weight = dev->weight; + RTA_PUT(skb, IFLA_WEIGHT, sizeof(weight), &weight); + } + + if (1) { + struct ifmap map = { + .mem_start = dev->mem_start, + .mem_end = dev->mem_end, + .base_addr = dev->base_addr, + .irq = dev->irq, + .dma = dev->dma, + .port = dev->if_port, + }; + RTA_PUT(skb, IFLA_MAP, sizeof(map), &map); + } + if (dev->addr_len) { RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); RTA_PUT(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast); } + if (1) { - unsigned mtu = dev->mtu; + u32 mtu = dev->mtu; RTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu); } - if (dev->ifindex != dev->iflink) - RTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink); + + if (dev->ifindex != dev->iflink) { + u32 iflink = dev->iflink; + RTA_PUT(skb, IFLA_LINK, sizeof(iflink), &iflink); + } + if (dev->qdisc_sleeping) RTA_PUT(skb, IFLA_QDISC, strlen(dev->qdisc_sleeping->ops->id) + 1, dev->qdisc_sleeping->ops->id); - if (dev->master) - RTA_PUT(skb, IFLA_MASTER, sizeof(int), &dev->master->ifindex); + + if (dev->master) { + u32 master = dev->master->ifindex; + RTA_PUT(skb, IFLA_MASTER, sizeof(master), &master); + } + if (dev->get_stats) { unsigned long *stats = (unsigned long*)dev->get_stats(dev); if (stats) { @@ -246,6 +273,30 @@ err = -EINVAL; + if (ifm->ifi_flags) + dev_change_flags(dev, ifm->ifi_flags); + + if (ida[IFLA_MAP - 1]) { + if (!dev->set_config) { + err = -EOPNOTSUPP; + goto out; + } + + if (!netif_device_present(dev)) { + err = -ENODEV; + goto out; + } + + if (ida[IFLA_MAP - 1]->rta_len != RTA_LENGTH(sizeof(struct ifmap))) + goto out; + + err = dev->set_config(dev, (struct ifmap *) + RTA_DATA(ida[IFLA_MAP - 1])); + + if (err) + goto out; + } + if (ida[IFLA_ADDRESS - 1]) { if (!dev->set_mac_address) { err = -EOPNOTSUPP; @@ -268,6 +319,30 @@ goto out; memcpy(dev->broadcast, RTA_DATA(ida[IFLA_BROADCAST - 1]), dev->addr_len); + } + + if (ida[IFLA_MTU - 1]) { + if (ida[IFLA_MTU - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + err = dev_set_mtu(dev, *((u32 *) RTA_DATA(ida[IFLA_MTU - 1]))); + + if (err) + goto out; + + } + + if (ida[IFLA_TXQLEN - 1]) { + if (ida[IFLA_TXQLEN - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + + dev->tx_queue_len = *((u32 *) RTA_DATA(ida[IFLA_TXQLEN - 1])); + } + + if (ida[IFLA_WEIGHT - 1]) { + if (ida[IFLA_WEIGHT - 1]->rta_len != RTA_LENGTH(sizeof(u32))) + goto out; + + dev->weight = *((u32 *) RTA_DATA(ida[IFLA_WEIGHT - 1])); } err = 0; diff -Nru a/net/core/utils.c b/net/core/utils.c --- a/net/core/utils.c 2004-09-06 16:37:50 -07:00 +++ b/net/core/utils.c 2004-09-06 16:37:50 -07:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -77,10 +78,8 @@ return (state->s1 ^ state->s2 ^ state->s3); } -static void __net_srandom(struct nrnd_state *state, unsigned long entropy) +static void __net_srandom(struct nrnd_state *state, unsigned long s) { - u32 s = state->s1 ^ entropy; - if (s == 0) s = 1; /* default seed is 1 */ @@ -112,24 +111,33 @@ void net_srandom(unsigned long entropy) { struct nrnd_state *state = &get_cpu_var(net_rand_state); - __net_srandom(state, entropy); + __net_srandom(state, state->s1^entropy); put_cpu_var(state); } void __init net_random_init(void) { int i; + + for (i = 0; i < NR_CPUS; i++) { + struct nrnd_state *state = &per_cpu(net_rand_state,i); + __net_srandom(state, i+jiffies); + } +} + +static int net_random_reseed(void) +{ + int i; unsigned long seed[NR_CPUS]; get_random_bytes(seed, sizeof(seed)); - for (i = 0; i < NR_CPUS; i++) { struct nrnd_state *state = &per_cpu(net_rand_state,i); - - memset(state, 0, sizeof(*state)); __net_srandom(state, seed[i]); } + return 0; } +late_initcall(net_random_reseed); int net_msg_cost = 5*HZ; int net_msg_burst = 10; diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c --- a/net/ethernet/eth.c 2004-09-06 16:37:53 -07:00 +++ b/net/ethernet/eth.c 2004-09-06 16:37:53 -07:00 @@ -164,9 +164,7 @@ skb->mac.raw=skb->data; skb_pull(skb,ETH_HLEN); eth= skb->mac.ethernet; -#ifdef CONFIG_NET_CLS_ACT skb->input_dev = dev; -#endif if(*eth->h_dest&1) { diff -Nru a/net/ipv4/arp.c b/net/ipv4/arp.c --- a/net/ipv4/arp.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/arp.c 2004-09-06 16:37:54 -07:00 @@ -695,6 +695,7 @@ static void parp_redo(struct sk_buff *skb) { + nf_reset(skb); arp_rcv(skb, skb->dev, NULL); } diff -Nru a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c --- a/net/ipv4/ip_fragment.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv4/ip_fragment.c 2004-09-06 16:37:51 -07:00 @@ -241,15 +241,15 @@ } /* Memory limiting on fragments. Evictor trashes the oldest - * fragment queue until we are back under the low threshold. + * fragment queue until we are back under the threshold. */ -static void ip_evictor(void) +static void __ip_evictor(int threshold) { struct ipq *qp; struct list_head *tmp; int work; - work = atomic_read(&ip_frag_mem) - sysctl_ipfrag_low_thresh; + work = atomic_read(&ip_frag_mem) - threshold; if (work <= 0) return; @@ -274,6 +274,11 @@ } } +static inline void ip_evictor(void) +{ + __ip_evictor(sysctl_ipfrag_low_thresh); +} + /* * Oops, a fragment queue timed out. Kill it and send an ICMP reply. */ @@ -684,4 +689,10 @@ add_timer(&ipfrag_secret_timer); } +void ipfrag_flush(void) +{ + __ip_evictor(0); +} + EXPORT_SYMBOL(ip_defrag); +EXPORT_SYMBOL(ipfrag_flush); diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c 2004-09-06 16:37:55 -07:00 +++ b/net/ipv4/ip_output.c 2004-09-06 16:37:55 -07:00 @@ -78,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -712,7 +713,7 @@ /* * ip_append_data() and ip_append_page() can make one large IP datagram * from many pieces of data. Each pieces will be holded on the socket - * until ip_push_pending_frames() is called. Eache pieces can be a page + * until ip_push_pending_frames() is called. Each piece can be a page * or non-page data. * * Not only UDP, other transport protocols - e.g. raw sockets - can use @@ -780,7 +781,7 @@ hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); - maxfraglen = ((mtu-fragheaderlen) & ~7) + fragheaderlen; + maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen; if (inet->cork.length + length > 0xFFFF - fragheaderlen) { ip_local_error(sk, EMSGSIZE, rt->rt_dst, inet->dport, mtu-exthdrlen); @@ -792,7 +793,7 @@ * it won't be fragmented in the future. */ if (transhdrlen && - length + fragheaderlen <= maxfraglen && + length + fragheaderlen <= mtu && rt->u.dst.dev->features&(NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) && !exthdrlen) csummode = CHECKSUM_HW; @@ -804,34 +805,35 @@ * We use calculated fragment length to generate chained skb, * each of segments is IP fragment ready for sending to network after * adding appropriate IP header. - * - * Mistake is: - * - * If mtu-fragheaderlen is not 0 modulo 8, we generate additional - * small fragment of length (mtu-fragheaderlen)%8, even though - * it is not necessary. Not a big bug, but needs a fix. */ if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) goto alloc_new_skb; while (length > 0) { - if ((copy = maxfraglen - skb->len) <= 0) { + if ((copy = mtu - skb->len) <= 0) { char *data; unsigned int datalen; unsigned int fraglen; + unsigned int fraggap; unsigned int alloclen; + struct sk_buff *skb_prev; BUG_TRAP(copy == 0); alloc_new_skb: - datalen = maxfraglen - fragheaderlen; - if (datalen > length) - datalen = length; + skb_prev = skb; + fraggap = 0; + if (skb_prev) + fraggap = mtu - maxfraglen; + + datalen = mtu - fragheaderlen; + if (datalen > length + fraggap) + datalen = length + fraggap; fraglen = datalen + fragheaderlen; if ((flags & MSG_MORE) && !(rt->u.dst.dev->features&NETIF_F_SG)) - alloclen = maxfraglen; + alloclen = mtu; else alloclen = datalen + fragheaderlen; @@ -875,15 +877,25 @@ data += fragheaderlen; skb->h.raw = data + exthdrlen; - copy = datalen - transhdrlen; - if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, 0, skb) < 0) { + if (fraggap) { + skb->csum = skb_copy_and_csum_bits( + skb_prev, maxfraglen, + data + transhdrlen, fraggap, 0); + skb_prev->csum = csum_sub(skb_prev->csum, + skb->csum); + data += fraggap; + skb_trim(skb_prev, maxfraglen); + } + + copy = datalen - transhdrlen - fraggap; + if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, fraggap, skb) < 0) { err = -EFAULT; kfree_skb(skb); goto error; } offset += copy; - length -= datalen; + length -= datalen - fraggap; transhdrlen = 0; exthdrlen = 0; csummode = CHECKSUM_NONE; @@ -978,7 +990,7 @@ int mtu; int len; int err; - unsigned int maxfraglen, fragheaderlen; + unsigned int maxfraglen, fragheaderlen, fraggap; if (inet->hdrincl) return -EPERM; @@ -1000,7 +1012,7 @@ mtu = inet->cork.fragsize; fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0); - maxfraglen = ((mtu-fragheaderlen) & ~7) + fragheaderlen; + maxfraglen = ((mtu - fragheaderlen) & ~7) + fragheaderlen; if (inet->cork.length + size > 0xFFFF - fragheaderlen) { ip_local_error(sk, EMSGSIZE, rt->rt_dst, inet->dport, mtu); @@ -1014,13 +1026,21 @@ while (size > 0) { int i; - if ((len = maxfraglen - skb->len) <= 0) { + if ((len = mtu - skb->len) <= 0) { + struct sk_buff *skb_prev; char *data; struct iphdr *iph; + int alloclen; + BUG_TRAP(len == 0); - skb = sock_wmalloc(sk, fragheaderlen + hh_len + 15, 1, - sk->sk_allocation); + skb_prev = skb; + fraggap = 0; + if (skb_prev) + fraggap = mtu - maxfraglen; + + alloclen = fragheaderlen + hh_len + fraggap + 15; + skb = sock_wmalloc(sk, alloclen, 1, sk->sk_allocation); if (unlikely(!skb)) { err = -ENOBUFS; goto error; @@ -1036,10 +1056,19 @@ /* * Find where to start putting bytes. */ - data = skb_put(skb, fragheaderlen); + data = skb_put(skb, fragheaderlen + fraggap); skb->nh.iph = iph = (struct iphdr *)data; data += fragheaderlen; skb->h.raw = data; + + if (fraggap) { + skb->csum = skb_copy_and_csum_bits( + skb_prev, maxfraglen, + data, fraggap, 0); + skb_prev->csum = csum_sub(skb_prev->csum, + skb->csum); + skb_trim(skb_prev, maxfraglen); + } /* * Put the packet on the pending queue. diff -Nru a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig --- a/net/ipv4/netfilter/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/netfilter/Kconfig 2004-09-06 16:37:54 -07:00 @@ -5,6 +5,7 @@ menu "IP: Netfilter Configuration" depends on INET && NETFILTER +# connection tracking, helpers and protocols config IP_NF_CONNTRACK tristate "Connection tracking (required for masq/NAT)" ---help--- @@ -19,6 +20,28 @@ To compile it as a module, choose M here. If unsure, say N. +config IP_NF_CT_ACCT + bool "Connection tracking flow accounting" + depends on IP_NF_CONNTRACK + help + If this option is enabled, the connection tracking code will + keep per-flow packet and byte counters. + + Those counters can be used for flow-based accounting or the + `connbytes' match. + + If unsure, say `N'. + +config IP_NF_CT_PROTO_SCTP + tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)' + depends on IP_NF_CONNTRACK && EXPERIMENTAL + help + With this option enabled, the connection tracking code will + be able to do state tracking on SCTP connections. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + config IP_NF_FTP tristate "FTP protocol support" depends on IP_NF_CONNTRACK @@ -86,7 +109,7 @@ To compile it as a module, choose M here. If unsure, say N. -# The simple matches. +# The matches. config IP_NF_MATCH_LIMIT tristate "limit match support" depends on IP_NF_IPTABLES @@ -274,7 +297,42 @@ To compile it as a module, choose M here. If unsure, say N. -# The targets +config IP_NF_MATCH_ADDRTYPE + tristate 'address type match support' + depends on IP_NF_IPTABLES + help + This option allows you to match what routing thinks of an address, + eg. UNICAST, LOCAL, BROADCAST, ... + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + +config IP_NF_MATCH_REALM + tristate 'realm match support' + depends on IP_NF_IPTABLES + select NET_CLS_ROUTE + help + This option adds a `realm' match, which allows you to use the realm + key from the routing subsytem inside iptables. + + This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option + in tc world. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + +config IP_NF_MATCH_SCTP + tristate 'SCTP protocol match support' + depends on IP_NF_IPTABLES + help + With this option enabled, you will be able to use the iptables + `sctp' match in order to match on SCTP source/destination ports + and SCTP chunk types. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + +# `filter', generic and specific targets config IP_NF_FILTER tristate "Packet filtering" depends on IP_NF_IPTABLES @@ -295,6 +353,56 @@ To compile it as a module, choose M here. If unsure, say N. +config IP_NF_TARGET_LOG + tristate "LOG target support" + depends on IP_NF_IPTABLES + help + This option adds a `LOG' target, which allows you to create rules in + any iptables table which records the packet header to the syslog. + + To compile it as a module, choose M here. If unsure, say N. + +config IP_NF_TARGET_ULOG + tristate "ULOG target support" + depends on IP_NF_IPTABLES + ---help--- + This option adds a `ULOG' target, which allows you to create rules in + any iptables table. The packet is passed to a userspace logging + daemon using netlink multicast sockets; unlike the LOG target + which can only be viewed through syslog. + + The apropriate userspace logging daemon (ulogd) may be obtained from + + + To compile it as a module, choose M here. If unsure, say N. + +config IP_NF_TARGET_TCPMSS + tristate "TCPMSS target support" + depends on IP_NF_IPTABLES + ---help--- + This option adds a `TCPMSS' target, which allows you to alter the + MSS value of TCP SYN packets, to control the maximum size for that + connection (usually limiting it to your outgoing interface's MTU + minus 40). + + This is used to overcome criminally braindead ISPs or servers which + block ICMP Fragmentation Needed packets. The symptoms of this + problem are that everything works fine from your Linux + firewall/router, but machines behind it can never exchange large + packets: + 1) Web browsers connect, then hang with no data received. + 2) Small mail works fine, but large emails hang. + 3) ssh works fine, but scp hangs after initial handshaking. + + Workaround: activate this option and add a rule to your firewall + configuration like: + + iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \ + -j TCPMSS --clamp-mss-to-pmtu + + To compile it as a module, choose M here. If unsure, say N. + +# NAT + specific targets config IP_NF_NAT tristate "Full NAT" depends on IP_NF_IPTABLES && IP_NF_CONNTRACK @@ -408,6 +516,7 @@ default IP_NF_NAT if IP_NF_AMANDA=y default m if IP_NF_AMANDA=m +# mangle + specific targets config IP_NF_MANGLE tristate "Packet mangling" depends on IP_NF_IPTABLES @@ -478,55 +587,34 @@ To compile it as a module, choose M here. If unsure, say N. -config IP_NF_TARGET_LOG - tristate "LOG target support" +# raw + specific targets +config IP_NF_RAW + tristate 'raw table support (required for NOTRACK/TRACE)' depends on IP_NF_IPTABLES help - This option adds a `LOG' target, which allows you to create rules in - any iptables table which records the packet header to the syslog. - - To compile it as a module, choose M here. If unsure, say N. - -config IP_NF_TARGET_ULOG - tristate "ULOG target support" - depends on IP_NF_IPTABLES - ---help--- - This option adds a `ULOG' target, which allows you to create rules in - any iptables table. The packet is passed to a userspace logging - daemon using netlink multicast sockets; unlike the LOG target - which can only be viewed through syslog. - - The apropriate userspace logging daemon (ulogd) may be obtained from - - - To compile it as a module, choose M here. If unsure, say N. - -config IP_NF_TARGET_TCPMSS - tristate "TCPMSS target support" - depends on IP_NF_IPTABLES - ---help--- - This option adds a `TCPMSS' target, which allows you to alter the - MSS value of TCP SYN packets, to control the maximum size for that - connection (usually limiting it to your outgoing interface's MTU - minus 40). - - This is used to overcome criminally braindead ISPs or servers which - block ICMP Fragmentation Needed packets. The symptoms of this - problem are that everything works fine from your Linux - firewall/router, but machines behind it can never exchange large - packets: - 1) Web browsers connect, then hang with no data received. - 2) Small mail works fine, but large emails hang. - 3) ssh works fine, but scp hangs after initial handshaking. - - Workaround: activate this option and add a rule to your firewall - configuration like: + This option adds a `raw' table to iptables. This table is the very + first in the netfilter framework and hooks in at the PREROUTING + and OUTPUT chains. + + If you want to compile it as a module, say M here and read + . If unsure, say `N'. + help - iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \ - -j TCPMSS --clamp-mss-to-pmtu +config IP_NF_TARGET_NOTRACK + tristate 'NOTRACK target support' + depends on IP_NF_RAW + depends on IP_NF_CONNTRACK + help + The NOTRACK target allows a select rule to specify + which packets *not* to enter the conntrack/NAT + subsystem with all the consequences (no ICMP error tracking, + no protocol helpers for the selected packets). + + If you want to compile it as a module, say M here and read + . If unsure, say `N'. - To compile it as a module, choose M here. If unsure, say N. +# ARP tables config IP_NF_ARPTABLES tristate "ARP tables support" help @@ -578,67 +666,6 @@ the ipfwadm tool exactly as in 2.0 kernels. To compile it as a module, choose M here. If unsure, say N. - -config IP_NF_TARGET_NOTRACK - tristate 'NOTRACK target support' - depends on IP_NF_RAW - depends on IP_NF_CONNTRACK - help - The NOTRACK target allows a select rule to specify - which packets *not* to enter the conntrack/NAT - subsystem with all the consequences (no ICMP error tracking, - no protocol helpers for the selected packets). - - If you want to compile it as a module, say M here and read - . If unsure, say `N'. - -config IP_NF_RAW - tristate 'raw table support (required for NOTRACK/TRACE)' - depends on IP_NF_IPTABLES - help - This option adds a `raw' table to iptables. This table is the very - first in the netfilter framework and hooks in at the PREROUTING - and OUTPUT chains. - - If you want to compile it as a module, say M here and read - . If unsure, say `N'. - help - -config IP_NF_MATCH_ADDRTYPE - tristate 'address type match support' - depends on IP_NF_IPTABLES - help - This option allows you to match what routing thinks of an address, - eg. UNICAST, LOCAL, BROADCAST, ... - - If you want to compile it as a module, say M here and read - Documentation/modules.txt. If unsure, say `N'. - -config IP_NF_MATCH_REALM - tristate 'realm match support' - depends on IP_NF_IPTABLES - select NET_CLS_ROUTE - help - This option adds a `realm' match, which allows you to use the realm - key from the routing subsytem inside iptables. - - This match pretty much resembles the CONFIG_NET_CLS_ROUTE4 option - in tc world. - - If you want to compile it as a module, say M here and read - Documentation/modules.txt. If unsure, say `N'. - -config IP_NF_CT_ACCT - bool "Connection tracking flow accounting" - depends on IP_NF_CONNTRACK - -config IP_NF_MATCH_SCTP - tristate 'SCTP protocol match support' - depends on IP_NF_IPTABLES - -config IP_NF_CT_PROTO_SCTP - tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)' - depends on IP_NF_CONNTRACK && EXPERIMENTAL endmenu diff -Nru a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c --- a/net/ipv4/netfilter/arp_tables.c 2004-09-06 16:37:56 -07:00 +++ b/net/ipv4/netfilter/arp_tables.c 2004-09-06 16:37:56 -07:00 @@ -106,7 +106,7 @@ { char *arpptr = (char *)(arphdr + 1); char *src_devaddr, *tgt_devaddr; - u32 *src_ipaddr, *tgt_ipaddr; + u32 src_ipaddr, tgt_ipaddr; int i, ret; #define FWINV(bool,invflg) ((bool) ^ !!(arpinfo->invflags & invflg)) @@ -145,11 +145,11 @@ src_devaddr = arpptr; arpptr += dev->addr_len; - src_ipaddr = (u32 *) arpptr; + memcpy(&src_ipaddr, arpptr, sizeof(u32)); arpptr += sizeof(u32); tgt_devaddr = arpptr; arpptr += dev->addr_len; - tgt_ipaddr = (u32 *) arpptr; + memcpy(&tgt_ipaddr, arpptr, sizeof(u32)); if (FWINV(arp_devaddr_compare(&arpinfo->src_devaddr, src_devaddr, dev->addr_len), ARPT_INV_SRCDEVADDR) || @@ -160,19 +160,19 @@ return 0; } - if (FWINV(((*src_ipaddr) & arpinfo->smsk.s_addr) != arpinfo->src.s_addr, + if (FWINV((src_ipaddr & arpinfo->smsk.s_addr) != arpinfo->src.s_addr, ARPT_INV_SRCIP) || - FWINV((((*tgt_ipaddr) & arpinfo->tmsk.s_addr) != arpinfo->tgt.s_addr), + FWINV(((tgt_ipaddr & arpinfo->tmsk.s_addr) != arpinfo->tgt.s_addr), ARPT_INV_TGTIP)) { dprintf("Source or target IP address mismatch.\n"); dprintf("SRC: %u.%u.%u.%u. Mask: %u.%u.%u.%u. Target: %u.%u.%u.%u.%s\n", - NIPQUAD(*src_ipaddr), + NIPQUAD(src_ipaddr), NIPQUAD(arpinfo->smsk.s_addr), NIPQUAD(arpinfo->src.s_addr), arpinfo->invflags & ARPT_INV_SRCIP ? " (INV)" : ""); dprintf("TGT: %u.%u.%u.%u Mask: %u.%u.%u.%u Target: %u.%u.%u.%u.%s\n", - NIPQUAD(*tgt_ipaddr), + NIPQUAD(tgt_ipaddr), NIPQUAD(arpinfo->tmsk.s_addr), NIPQUAD(arpinfo->tgt.s_addr), arpinfo->invflags & ARPT_INV_TGTIP ? " (INV)" : ""); @@ -193,7 +193,10 @@ } for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { - ret |= (((const unsigned long *)outdev)[i] + unsigned long odev; + memcpy(&odev, outdev + i*sizeof(unsigned long), + sizeof(unsigned long)); + ret |= (odev ^ ((const unsigned long *)arpinfo->outiface)[i]) & ((const unsigned long *)arpinfo->outiface_mask)[i]; } diff -Nru a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c --- a/net/ipv4/netfilter/ip_conntrack_core.c 2004-09-06 16:37:50 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_core.c 2004-09-06 16:37:50 -07:00 @@ -1173,6 +1173,8 @@ } } +int ip_ct_no_defrag; + /* Returns new sk_buff, or NULL */ struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb) @@ -1181,6 +1183,12 @@ #ifdef CONFIG_NETFILTER_DEBUG unsigned int olddebug = skb->nf_debug; #endif + + if (unlikely(ip_ct_no_defrag)) { + kfree_skb(skb); + return NULL; + } + if (sk) { sock_hold(sk); skb_orphan(skb); diff -Nru a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c --- a/net/ipv4/netfilter/ip_conntrack_ftp.c 2004-09-06 16:37:56 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c 2004-09-06 16:37:56 -07:00 @@ -28,7 +28,7 @@ /* This is slow, but it's simple. --RR */ static char ftp_buffer[65536]; -DECLARE_LOCK(ip_ftp_lock); +static DECLARE_LOCK(ip_ftp_lock); struct module *ip_conntrack_ftp = THIS_MODULE; #define MAX_PORTS 8 @@ -460,7 +460,6 @@ } PROVIDES_CONNTRACK(ftp); -EXPORT_SYMBOL(ip_ftp_lock); module_init(init); module_exit(fini); diff -Nru a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c --- a/net/ipv4/netfilter/ip_conntrack_irc.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_irc.c 2004-09-06 16:37:54 -07:00 @@ -41,6 +41,7 @@ static unsigned int dcc_timeout = 300; /* This is slow, but it's simple. --RR */ static char irc_buffer[65536]; +static DECLARE_LOCK(irc_buffer_lock); MODULE_AUTHOR("Harald Welte "); MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); @@ -55,7 +56,6 @@ static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " }; #define MINMATCHLEN 5 -DECLARE_LOCK(ip_irc_lock); struct module *ip_conntrack_irc = THIS_MODULE; #if 0 @@ -137,7 +137,7 @@ if (dataoff >= skb->len) return NF_ACCEPT; - LOCK_BH(&ip_irc_lock); + LOCK_BH(&irc_buffer_lock); ib_ptr = skb_header_pointer(skb, dataoff, skb->len - dataoff, irc_buffer); BUG_ON(ib_ptr == NULL); @@ -232,7 +232,7 @@ } /* while data < ... */ out: - UNLOCK_BH(&ip_irc_lock); + UNLOCK_BH(&irc_buffer_lock); return NF_ACCEPT; } @@ -306,7 +306,6 @@ } PROVIDES_CONNTRACK(irc); -EXPORT_SYMBOL(ip_irc_lock); module_init(init); module_exit(fini); diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-09-06 16:37:50 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2004-09-06 16:37:50 -07:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c 2004-09-06 16:37:54 -07:00 @@ -66,7 +66,7 @@ unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS; static unsigned long * sctp_timeouts[] -= { 0, /* SCTP_CONNTRACK_NONE */ += { NULL, /* SCTP_CONNTRACK_NONE */ &ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */ &ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */ &ip_ct_sctp_timeout_cookie_echoed, /* SCTP_CONNTRACK_COOKIE_ECHOED */ diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-09-06 16:37:55 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2004-09-06 16:37:55 -07:00 @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff -Nru a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-09-06 16:37:49 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2004-09-06 16:37:49 -07:00 @@ -14,6 +14,7 @@ #include #include #include +#include #include unsigned long ip_ct_udp_timeout = 30*HZ; diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c --- a/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-09-06 16:37:52 -07:00 +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-09-06 16:37:52 -07:00 @@ -73,7 +73,8 @@ seq_print_counters(struct seq_file *s, struct ip_conntrack_counter *counter) { return seq_printf(s, "packets=%llu bytes=%llu ", - counter->packets, counter->bytes); + (unsigned long long)counter->packets, + (unsigned long long)counter->bytes); } #else #define seq_print_counters(x, y) 0 @@ -805,6 +806,12 @@ cleanup_defraglocalops: nf_unregister_hook(&ip_conntrack_defrag_local_out_ops); cleanup_defragops: + /* Frag queues may hold fragments with skb->dst == NULL */ + ip_ct_no_defrag = 1; + synchronize_net(); + local_bh_disable(); + ipfrag_flush(); + local_bh_enable(); nf_unregister_hook(&ip_conntrack_defrag_ops); cleanup_proc_stat: proc_net_remove("ip_conntrack_stat"); diff -Nru a/net/ipv4/netfilter/ip_nat_core.c b/net/ipv4/netfilter/ip_nat_core.c --- a/net/ipv4/netfilter/ip_nat_core.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv4/netfilter/ip_nat_core.c 2004-09-06 16:37:51 -07:00 @@ -635,7 +635,7 @@ /* If there's a helper, assign it; based on new tuple. */ if (!conntrack->master) - info->helper = ip_nat_find_helper(&reply); + info->helper = __ip_nat_find_helper(&reply); /* It's done. */ info->initialized |= (1 << HOOK2MANIP(hooknum)); diff -Nru a/net/ipv4/netfilter/ip_nat_ftp.c b/net/ipv4/netfilter/ip_nat_ftp.c --- a/net/ipv4/netfilter/ip_nat_ftp.c 2004-09-06 16:37:53 -07:00 +++ b/net/ipv4/netfilter/ip_nat_ftp.c 2004-09-06 16:37:53 -07:00 @@ -36,8 +36,6 @@ module_param_array(ports, int, ports_c, 0400); -DECLARE_LOCK_EXTERN(ip_ftp_lock); - /* FIXME: Time out? --RR */ static unsigned int @@ -60,8 +58,6 @@ DEBUGP("nat_expected: We have a connection!\n"); exp_ftp_info = &ct->master->help.exp_ftp_info; - LOCK_BH(&ip_ftp_lock); - if (exp_ftp_info->ftptype == IP_CT_FTP_PORT || exp_ftp_info->ftptype == IP_CT_FTP_EPRT) { /* PORT command: make connection go to the client. */ @@ -76,7 +72,6 @@ DEBUGP("nat_expected: PASV cmd. %u.%u.%u.%u->%u.%u.%u.%u\n", NIPQUAD(newsrcip), NIPQUAD(newdstip)); } - UNLOCK_BH(&ip_ftp_lock); if (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC) newip = newsrcip; @@ -112,8 +107,6 @@ { char buffer[sizeof("nnn,nnn,nnn,nnn,nnn,nnn")]; - MUST_BE_LOCKED(&ip_ftp_lock); - sprintf(buffer, "%u,%u,%u,%u,%u,%u", NIPQUAD(newip), port>>8, port&0xFF); @@ -135,8 +128,6 @@ { char buffer[sizeof("|1|255.255.255.255|65535|")]; - MUST_BE_LOCKED(&ip_ftp_lock); - sprintf(buffer, "|1|%u.%u.%u.%u|%u|", NIPQUAD(newip), port); DEBUGP("calling ip_nat_mangle_tcp_packet\n"); @@ -157,8 +148,6 @@ { char buffer[sizeof("|||65535|")]; - MUST_BE_LOCKED(&ip_ftp_lock); - sprintf(buffer, "|||%u|", port); DEBUGP("calling ip_nat_mangle_tcp_packet\n"); @@ -178,7 +167,7 @@ [IP_CT_FTP_EPSV] = mangle_epsv_packet }; -static int ftp_data_fixup(const struct ip_ct_ftp_expect *ct_ftp_info, +static int ftp_data_fixup(const struct ip_ct_ftp_expect *exp_ftp_info, struct ip_conntrack *ct, struct sk_buff **pskb, enum ip_conntrack_info ctinfo, @@ -190,15 +179,14 @@ u_int16_t port; struct ip_conntrack_tuple newtuple; - MUST_BE_LOCKED(&ip_ftp_lock); DEBUGP("FTP_NAT: seq %u + %u in %u\n", - expect->seq, ct_ftp_info->len, + expect->seq, exp_ftp_info->len, ntohl(tcph->seq)); /* Change address inside packet to match way we're mapping this connection. */ - if (ct_ftp_info->ftptype == IP_CT_FTP_PASV - || ct_ftp_info->ftptype == IP_CT_FTP_EPSV) { + if (exp_ftp_info->ftptype == IP_CT_FTP_PASV + || exp_ftp_info->ftptype == IP_CT_FTP_EPSV) { /* PASV/EPSV response: must be where client thinks server is */ newip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip; @@ -220,7 +208,7 @@ newtuple.src.u.tcp.port = expect->tuple.src.u.tcp.port; /* Try to get same port: if not, try to change it. */ - for (port = ct_ftp_info->port; port != 0; port++) { + for (port = exp_ftp_info->port; port != 0; port++) { newtuple.dst.u.tcp.port = htons(port); if (ip_conntrack_change_expect(expect, &newtuple) == 0) @@ -229,9 +217,9 @@ if (port == 0) return 0; - if (!mangle[ct_ftp_info->ftptype](pskb, newip, port, + if (!mangle[exp_ftp_info->ftptype](pskb, newip, port, expect->seq - ntohl(tcph->seq), - ct_ftp_info->len, ct, ctinfo)) + exp_ftp_info->len, ct, ctinfo)) return 0; return 1; @@ -248,12 +236,12 @@ struct tcphdr *tcph = (void *)iph + iph->ihl*4; unsigned int datalen; int dir; - struct ip_ct_ftp_expect *ct_ftp_info; + struct ip_ct_ftp_expect *exp_ftp_info; if (!exp) DEBUGP("ip_nat_ftp: no exp!!"); - ct_ftp_info = &exp->help.exp_ftp_info; + exp_ftp_info = &exp->help.exp_ftp_info; /* Only mangle things once: original direction in POST_ROUTING and reply direction on PRE_ROUTING. */ @@ -269,29 +257,23 @@ } datalen = (*pskb)->len - iph->ihl * 4 - tcph->doff * 4; - LOCK_BH(&ip_ftp_lock); /* If it's in the right range... */ - if (between(exp->seq + ct_ftp_info->len, + if (between(exp->seq + exp_ftp_info->len, ntohl(tcph->seq), ntohl(tcph->seq) + datalen)) { - if (!ftp_data_fixup(ct_ftp_info, ct, pskb, ctinfo, exp)) { - UNLOCK_BH(&ip_ftp_lock); + if (!ftp_data_fixup(exp_ftp_info, ct, pskb, ctinfo, exp)) return NF_DROP; - } } else { /* Half a match? This means a partial retransmisison. It's a cracker being funky. */ if (net_ratelimit()) { printk("FTP_NAT: partial packet %u/%u in %u/%u\n", - exp->seq, ct_ftp_info->len, + exp->seq, exp_ftp_info->len, ntohl(tcph->seq), ntohl(tcph->seq) + datalen); } - UNLOCK_BH(&ip_ftp_lock); return NF_DROP; } - UNLOCK_BH(&ip_ftp_lock); - return NF_ACCEPT; } diff -Nru a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c --- a/net/ipv4/netfilter/ip_nat_helper.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv4/netfilter/ip_nat_helper.c 2004-09-06 16:37:51 -07:00 @@ -421,12 +421,18 @@ } struct ip_nat_helper * +__ip_nat_find_helper(const struct ip_conntrack_tuple *tuple) +{ + return LIST_FIND(&helpers, helper_cmp, struct ip_nat_helper *, tuple); +} + +struct ip_nat_helper * ip_nat_find_helper(const struct ip_conntrack_tuple *tuple) { struct ip_nat_helper *h; READ_LOCK(&ip_nat_lock); - h = LIST_FIND(&helpers, helper_cmp, struct ip_nat_helper *, tuple); + h = __ip_nat_find_helper(tuple); READ_UNLOCK(&ip_nat_lock); return h; diff -Nru a/net/ipv4/netfilter/ip_nat_irc.c b/net/ipv4/netfilter/ip_nat_irc.c --- a/net/ipv4/netfilter/ip_nat_irc.c 2004-09-06 16:37:55 -07:00 +++ b/net/ipv4/netfilter/ip_nat_irc.c 2004-09-06 16:37:55 -07:00 @@ -45,9 +45,6 @@ module_param_array(ports, int, ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of IRC servers"); -/* protects irc part of conntracks */ -DECLARE_LOCK_EXTERN(ip_irc_lock); - /* FIXME: Time out? --RR */ static unsigned int @@ -88,7 +85,7 @@ return ip_nat_setup_info(ct, &mr, hooknum); } -static int irc_data_fixup(const struct ip_ct_irc_expect *ct_irc_info, +static int irc_data_fixup(const struct ip_ct_irc_expect *exp_irc_info, struct ip_conntrack *ct, struct sk_buff **pskb, enum ip_conntrack_info ctinfo, @@ -103,23 +100,16 @@ /* "4294967296 65635 " */ char buffer[18]; - MUST_BE_LOCKED(&ip_irc_lock); - DEBUGP("IRC_NAT: info (seq %u + %u) in %u\n", - expect->seq, ct_irc_info->len, + expect->seq, exp_irc_info->len, ntohl(tcph->seq)); newip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip; /* Alter conntrack's expectations. */ - - /* We can read expect here without conntrack lock, since it's - only set in ip_conntrack_irc, with ip_irc_lock held - writable */ - t = expect->tuple; t.dst.ip = newip; - for (port = ct_irc_info->port; port != 0; port++) { + for (port = exp_irc_info->port; port != 0; port++) { t.dst.u.tcp.port = htons(port); if (ip_conntrack_change_expect(expect, &t) == 0) { DEBUGP("using port %d", port); @@ -149,7 +139,7 @@ return ip_nat_mangle_tcp_packet(pskb, ct, ctinfo, expect->seq - ntohl(tcph->seq), - ct_irc_info->len, buffer, + exp_irc_info->len, buffer, strlen(buffer)); } @@ -164,12 +154,12 @@ struct tcphdr *tcph = (void *) iph + iph->ihl * 4; unsigned int datalen; int dir; - struct ip_ct_irc_expect *ct_irc_info; + struct ip_ct_irc_expect *exp_irc_info; if (!exp) DEBUGP("ip_nat_irc: no exp!!"); - ct_irc_info = &exp->help.exp_irc_info; + exp_irc_info = &exp->help.exp_irc_info; /* Only mangle things once: original direction in POST_ROUTING and reply direction on PRE_ROUTING. */ @@ -186,30 +176,24 @@ DEBUGP("got beyond not touching\n"); datalen = (*pskb)->len - iph->ihl * 4 - tcph->doff * 4; - LOCK_BH(&ip_irc_lock); /* Check whether the whole IP/address pattern is carried in the payload */ - if (between(exp->seq + ct_irc_info->len, + if (between(exp->seq + exp_irc_info->len, ntohl(tcph->seq), ntohl(tcph->seq) + datalen)) { - if (!irc_data_fixup(ct_irc_info, ct, pskb, ctinfo, exp)) { - UNLOCK_BH(&ip_irc_lock); + if (!irc_data_fixup(exp_irc_info, ct, pskb, ctinfo, exp)) return NF_DROP; - } } else { /* Half a match? This means a partial retransmisison. It's a cracker being funky. */ if (net_ratelimit()) { printk ("IRC_NAT: partial packet %u/%u in %u/%u\n", - exp->seq, ct_irc_info->len, + exp->seq, exp_irc_info->len, ntohl(tcph->seq), ntohl(tcph->seq) + datalen); } - UNLOCK_BH(&ip_irc_lock); return NF_DROP; } - UNLOCK_BH(&ip_irc_lock); - return NF_ACCEPT; } 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 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/netfilter/ip_nat_standalone.c 2004-09-06 16:37:54 -07:00 @@ -394,4 +394,6 @@ EXPORT_SYMBOL(ip_nat_mangle_tcp_packet); EXPORT_SYMBOL(ip_nat_mangle_udp_packet); EXPORT_SYMBOL(ip_nat_used_tuple); +EXPORT_SYMBOL(ip_nat_find_helper); +EXPORT_SYMBOL(__ip_nat_find_helper); MODULE_LICENSE("GPL"); diff -Nru a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c --- a/net/ipv4/sysctl_net_ipv4.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv4/sysctl_net_ipv4.c 2004-09-06 16:37:54 -07:00 @@ -667,14 +667,6 @@ .proc_handler = &proc_dointvec, }, { - .ctl_name = NET_TCP_DEFAULT_WIN_SCALE, - .procname = "tcp_default_win_scale", - .data = &sysctl_tcp_default_win_scale, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { .ctl_name = NET_TCP_MODERATE_RCVBUF, .procname = "tcp_moderate_rcvbuf", .data = &sysctl_tcp_moderate_rcvbuf, diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv4/tcp.c 2004-09-06 16:37:51 -07:00 @@ -276,8 +276,6 @@ atomic_t tcp_orphan_count = ATOMIC_INIT(0); -int sysctl_tcp_default_win_scale = 7; - int sysctl_tcp_mem[3]; int sysctl_tcp_wmem[3] = { 4 * 1024, 16 * 1024, 128 * 1024 }; int sysctl_tcp_rmem[3] = { 4 * 1024, 87380, 87380 * 2 }; diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-09-06 16:37:53 -07:00 +++ b/net/ipv4/tcp_output.c 2004-09-06 16:37:53 -07:00 @@ -143,6 +143,65 @@ tcp_clear_xmit_timer(sk, TCP_TIME_DACK); } +/* Determine a window scaling and initial window to offer. + * Based on the assumption that the given amount of space + * will be offered. Store the results in the tp structure. + * NOTE: for smooth operation initial space offering should + * be a multiple of mss if possible. We assume here that mss >= 1. + * This MUST be enforced by all callers. + */ +void tcp_select_initial_window(int __space, __u32 mss, + __u32 *rcv_wnd, __u32 *window_clamp, + int wscale_ok, __u8 *rcv_wscale) +{ + unsigned int space = (__space < 0 ? 0 : __space); + + /* If no clamp set the clamp to the max possible scaled window */ + if (*window_clamp == 0) + (*window_clamp) = (65535 << 14); + space = min(*window_clamp, space); + + /* Quantize space offering to a multiple of mss if possible. */ + if (space > mss) + space = (space / mss) * mss; + + /* NOTE: offering an initial window larger than 32767 + * will break some buggy TCP stacks. We try to be nice. + * If we are not window scaling, then this truncates + * our initial window offering to 32k. There should also + * be a sysctl option to stop being nice. + */ + (*rcv_wnd) = min(space, MAX_TCP_WINDOW); + (*rcv_wscale) = 0; + if (wscale_ok) { + /* Set window scaling on max possible window + * See RFC1323 for an explanation of the limit to 14 + */ + space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max); + while (space > 65535 && (*rcv_wscale) < 14) { + space >>= 1; + (*rcv_wscale)++; + } + } + + /* Set initial window to value enough for senders, + * following RFC1414. Senders, not following this RFC, + * will be satisfied with 2. + */ + if (mss > (1<<*rcv_wscale)) { + int init_cwnd = 4; + if (mss > 1460*3) + init_cwnd = 2; + else if (mss > 1460) + init_cwnd = 3; + if (*rcv_wnd > init_cwnd*mss) + *rcv_wnd = init_cwnd*mss; + } + + /* Set the clamp no higher than max representable value */ + (*window_clamp) = min(65535U << (*rcv_wscale), *window_clamp); +} + /* Chose a new window to advertise, update state in tcp_opt for the * socket, and return result with RFC1323 scaling applied. The return * value can be stuffed directly into th->window for an outgoing diff -Nru a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c --- a/net/ipv4/xfrm4_output.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv4/xfrm4_output.c 2004-09-06 16:37:51 -07:00 @@ -58,8 +58,7 @@ if (!top_iph->frag_off) __ip_select_ident(top_iph, dst, 0); - /* TTL disclosed */ - top_iph->ttl = iph->ttl; + top_iph->ttl = dst_path_metric(dst, RTAX_HOPLIMIT); top_iph->saddr = x->props.saddr.a4; top_iph->daddr = x->id.daddr.a4; diff -Nru a/net/ipv6/datagram.c b/net/ipv6/datagram.c --- a/net/ipv6/datagram.c 2004-09-06 16:37:50 -07:00 +++ b/net/ipv6/datagram.c 2004-09-06 16:37:50 -07:00 @@ -38,7 +38,7 @@ struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr; struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct dst_entry *dst; struct flowi fl; struct ip6_flowlabel *flowlabel = NULL; @@ -157,16 +157,27 @@ if (flowlabel) { if (flowlabel->opt && flowlabel->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) flowlabel->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } } else if (np->opt && np->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *)np->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } /* source address lookup done in ip6_dst_lookup */ diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2004-09-06 16:37:50 -07:00 +++ b/net/ipv6/ip6_output.c 2004-09-06 16:37:50 -07:00 @@ -54,6 +54,7 @@ #include #include #include +#include static int ip6_fragment(struct sk_buff **pskb, int (*output)(struct sk_buff**)); @@ -796,10 +797,6 @@ goto out_err_release; } } - if ((err = xfrm_lookup(dst, fl, sk, 0)) < 0) { - err = -ENETUNREACH; - goto out_err_release; - } return 0; @@ -821,7 +818,7 @@ int exthdrlen; int hh_len; int mtu; - int copy = 0; + int copy; int err; int offset = 0; int csummode = CHECKSUM_NONE; @@ -879,29 +876,71 @@ } } + /* + * Let's try using as much space as possible. + * Use MTU if total length of the message fits into the MTU. + * Otherwise, we need to reserve fragment header and + * fragment alignment (= 8-15 octects, in total). + * + * Note that we may need to "move" the data from the tail of + * of the buffer to the new fragment when we split + * the message. + * + * FIXME: It may be fragmented into multiple chunks + * at once if non-fragmentable extension headers + * are too large. + * --yoshfuji + */ + inet->cork.length += length; if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) goto alloc_new_skb; while (length > 0) { - if ((copy = maxfraglen - skb->len) <= 0) { + if ((copy = mtu - skb->len) <= 0) { char *data; unsigned int datalen; unsigned int fraglen; + unsigned int fraggap; unsigned int alloclen; + struct sk_buff *skb_prev; BUG_TRAP(copy == 0); alloc_new_skb: - datalen = maxfraglen - fragheaderlen; - if (datalen > length) - datalen = length; + skb_prev = skb; + + /* There's no room in the current skb */ + fraggap = 0; + if (skb_prev) + fraggap = mtu - maxfraglen; + + datalen = mtu - fragheaderlen; + + if (datalen > length + fraggap) + datalen = length + fraggap; + fraglen = datalen + fragheaderlen; if ((flags & MSG_MORE) && !(rt->u.dst.dev->features&NETIF_F_SG)) - alloclen = maxfraglen; + alloclen = mtu; else - alloclen = fraglen; + alloclen = datalen + fragheaderlen; + + /* + * The last fragment gets additional space at tail. + * Note: we overallocate on fragments with MSG_MODE + * because we have no idea if we're the last one. + */ + if (datalen == length + fraggap) + alloclen += rt->u.dst.trailer_len; + + /* + * We just reserve space for fragment header. + * Note: this may be overallocation if the message + * (without MSG_MORE) fits into the MTU. + */ alloclen += sizeof(struct frag_hdr); + if (transhdrlen) { skb = sock_alloc_send_skb(sk, alloclen + hh_len, @@ -923,7 +962,7 @@ */ skb->ip_summed = csummode; skb->csum = 0; - /* reserve 8 byte for fragmentation */ + /* reserve for fragmentation */ skb_reserve(skb, hh_len+sizeof(struct frag_hdr)); /* @@ -933,15 +972,29 @@ skb->nh.raw = data + exthdrlen; data += fragheaderlen; skb->h.raw = data + exthdrlen; - copy = datalen - transhdrlen; - if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, 0, skb) < 0) { + + if (fraggap) { + skb->csum = skb_copy_and_csum_bits( + skb_prev, maxfraglen, + data + transhdrlen, fraggap, 0); + skb_prev->csum = csum_sub(skb_prev->csum, + skb->csum); + data += fraggap; + skb_trim(skb_prev, maxfraglen); + } + copy = datalen - transhdrlen - fraggap; + if (copy < 0) { + err = -EINVAL; + kfree_skb(skb); + goto error; + } else if (copy > 0 && getfrag(from, data + transhdrlen, offset, copy, fraggap, skb) < 0) { err = -EFAULT; kfree_skb(skb); goto error; } offset += copy; - length -= datalen; + length -= datalen - fraggap; transhdrlen = 0; exthdrlen = 0; csummode = CHECKSUM_NONE; diff -Nru a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c --- a/net/ipv6/netfilter/ip6t_LOG.c 2004-09-06 16:37:51 -07:00 +++ b/net/ipv6/netfilter/ip6t_LOG.c 2004-09-06 16:37:51 -07:00 @@ -61,7 +61,7 @@ repeatedly...with a large stick...no, an even LARGER stick...no, you're still not thinking big enough */ nexthdr = **hdrptr; - hdrlen = *hdrptr[1] * 4 + 8; + hdrlen = (*hdrptr)[1] * 4 + 8; *hdrptr = *hdrptr + hdrlen; break; /*stupid rfc2402 */ @@ -69,7 +69,7 @@ case IPPROTO_ROUTING: case IPPROTO_HOPOPTS: nexthdr = **hdrptr; - hdrlen = *hdrptr[1] * 8 + 8; + hdrlen = (*hdrptr)[1] * 8 + 8; *hdrptr = *hdrptr + hdrlen; break; case IPPROTO_FRAGMENT: diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c --- a/net/ipv6/raw.c 2004-09-06 16:37:52 -07:00 +++ b/net/ipv6/raw.c 2004-09-06 16:37:52 -07:00 @@ -606,7 +606,7 @@ { struct ipv6_txoptions opt_space; struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name; - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct raw6_opt *raw_opt = raw6_sk(sk); @@ -729,7 +729,9 @@ /* merge ip6_build_xmit from ip6_output */ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) @@ -738,6 +740,13 @@ err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } if (hlimit < 0) { if (ipv6_addr_is_multicast(&fl.fl6_dst)) diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv6/route.c 2004-09-06 16:37:54 -07:00 @@ -820,9 +820,12 @@ */ if ((rtmsg->rtmsg_flags&RTF_REJECT) || (dev && (dev->flags&IFF_LOOPBACK) && !(addr_type&IPV6_ADDR_LOOPBACK))) { - if (dev && dev != &loopback_dev) { - dev_put(dev); - in6_dev_put(idev); + /* hold loopback dev/idev if we haven't done so. */ + if (dev != &loopback_dev) { + if (dev) { + dev_put(dev); + in6_dev_put(idev); + } dev = &loopback_dev; dev_hold(dev); idev = in6_dev_get(dev); diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-09-06 16:37:53 -07:00 +++ b/net/ipv6/tcp_ipv6.c 2004-09-06 16:37:53 -07:00 @@ -549,7 +549,7 @@ struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct tcp_opt *tp = tcp_sk(sk); - struct in6_addr *saddr = NULL; + struct in6_addr *saddr = NULL, *final_p = NULL, final; struct flowi fl; struct dst_entry *dst; int addr_type; @@ -666,13 +666,21 @@ if (np->opt && np->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *)np->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } err = ip6_dst_lookup(sk, &dst, &fl); - if (err) goto failure; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + dst_release(dst); + goto failure; + } if (saddr == NULL) { saddr = &fl.fl6_src; @@ -793,6 +801,12 @@ sk->sk_err_soft = -err; goto out; } + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_err_soft = -err; + goto out; + } + } else dst_hold(dst); @@ -863,6 +877,7 @@ struct ipv6_pinfo *np = inet6_sk(sk); struct sk_buff * skb; struct ipv6_txoptions *opt = NULL; + struct in6_addr * final_p = NULL, final; struct flowi fl; int err = -1; @@ -888,12 +903,18 @@ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } err = ip6_dst_lookup(sk, &dst, &fl); if (err) goto done; + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) + goto done; } skb = tcp_make_synack(sk, dst, req); @@ -1021,6 +1042,12 @@ /* sk = NULL, but it is safe for now. RST socket required. */ if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { + + if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) { + dst_release(buff->dst); + return; + } + ip6_xmit(NULL, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); TCP_INC_STATS_BH(TCP_MIB_OUTRSTS); @@ -1082,6 +1109,10 @@ fl.fl_ip_sport = t1->source; if (!ip6_dst_lookup(NULL, &buff->dst, &fl)) { + if ((xfrm_lookup(&buff->dst, &fl, NULL, 0)) < 0) { + dst_release(buff->dst); + return; + } ip6_xmit(NULL, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); return; @@ -1313,6 +1344,7 @@ } if (dst == NULL) { + struct in6_addr *final_p = NULL, final; struct flowi fl; memset(&fl, 0, sizeof(fl)); @@ -1320,7 +1352,9 @@ ipv6_addr_copy(&fl.fl6_dst, &req->af.v6_req.rmt_addr); if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } ipv6_addr_copy(&fl.fl6_src, &req->af.v6_req.loc_addr); fl.oif = sk->sk_bound_dev_if; @@ -1329,6 +1363,12 @@ if (ip6_dst_lookup(sk, &dst, &fl)) goto out; + + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((xfrm_lookup(&dst, &fl, sk, 0)) < 0) + goto out; } newsk = tcp_create_openreq_child(sk, req, skb); @@ -1710,6 +1750,7 @@ if (dst == NULL) { struct inet_opt *inet = inet_sk(sk); + struct in6_addr *final_p = NULL, final; struct flowi fl; memset(&fl, 0, sizeof(fl)); @@ -1723,15 +1764,24 @@ if (np->opt && np->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } err = ip6_dst_lookup(sk, &dst, &fl); - if (err) { sk->sk_route_caps = 0; return err; } + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_err_soft = -err; + dst_release(dst); + return err; + } ip6_dst_store(sk, dst, NULL); sk->sk_route_caps = dst->dev->features & @@ -1772,6 +1822,12 @@ if (err) { sk->sk_err_soft = -err; + return err; + } + + if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { + sk->sk_route_caps = 0; + dst_release(dst); return err; } diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c --- a/net/ipv6/udp.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv6/udp.c 2004-09-06 16:37:54 -07:00 @@ -627,7 +627,7 @@ struct inet_opt *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name; - struct in6_addr *daddr; + struct in6_addr *daddr, *final_p = NULL, final; struct ipv6_txoptions *opt = NULL; struct ip6_flowlabel *flowlabel = NULL; struct flowi *fl = &inet->cork.fl; @@ -783,7 +783,9 @@ /* merge ip6_build_xmit from ip6_output */ if (opt && opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt; + ipv6_addr_copy(&final, &fl->fl6_dst); ipv6_addr_copy(&fl->fl6_dst, rt0->addr); + final_p = &final; } if (!fl->oif && ipv6_addr_is_multicast(&fl->fl6_dst)) @@ -792,6 +794,13 @@ err = ip6_dst_lookup(sk, &dst, fl); if (err) goto out; + if (final_p) + ipv6_addr_copy(&fl->fl6_dst, final_p); + + if ((err = xfrm_lookup(&dst, fl, sk, 0)) < 0) { + dst_release(dst); + goto out; + } if (hlimit < 0) { if (ipv6_addr_is_multicast(&fl->fl6_dst)) diff -Nru a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c --- a/net/ipv6/xfrm6_output.c 2004-09-06 16:37:54 -07:00 +++ b/net/ipv6/xfrm6_output.c 2004-09-06 16:37:54 -07:00 @@ -64,7 +64,7 @@ top_iph->flow_lbl[1] = iph->flow_lbl[1]; top_iph->flow_lbl[2] = iph->flow_lbl[2]; top_iph->nexthdr = IPPROTO_IPV6; - top_iph->hop_limit = iph->hop_limit; + top_iph->hop_limit = dst_path_metric(dst, RTAX_HOPLIMIT); ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); } diff -Nru a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c --- a/net/irda/irlan/irlan_common.c 2004-09-06 16:37:53 -07:00 +++ b/net/irda/irlan/irlan_common.c 2004-09-06 16:37:53 -07:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1181,9 +1182,9 @@ MODULE_DESCRIPTION("The Linux IrDA LAN protocol"); MODULE_LICENSE("GPL"); -MODULE_PARM(eth, "i"); +module_param(eth, bool, 0); MODULE_PARM_DESC(eth, "Name devices ethX (0) or irlanX (1)"); -MODULE_PARM(access, "i"); +module_param(access, int, 0); MODULE_PARM_DESC(access, "Access type DIRECT=1, PEER=2, HOSTED=3"); module_init(irlan_init); diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c 2004-09-06 16:37:52 -07:00 +++ b/net/netlink/af_netlink.c 2004-09-06 16:37:52 -07:00 @@ -46,6 +46,7 @@ #include #include #include +#include #define Nprintk(a...) @@ -69,6 +70,14 @@ #define nlk_sk(__sk) ((struct netlink_opt *)(__sk)->sk_protinfo) +struct netlink_work +{ + struct sock *sk; + int len; + struct work_struct work; +}; + +static struct workqueue_struct *netlink_wq; static struct hlist_head nl_table[MAX_LINKS]; static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait); static unsigned nl_nonroot[MAX_LINKS]; @@ -87,6 +96,16 @@ static struct notifier_block *netlink_chain; +/* netlink workqueue handler */ +static void netlink_wq_handler(void *data) +{ + struct netlink_work *work = data; + + work->sk->sk_data_ready(work->sk, work->len); + sock_put(work->sk); + kfree(work); +} + static void netlink_sock_destruct(struct sock *sk) { skb_queue_purge(&sk->sk_receive_queue); @@ -478,6 +497,8 @@ if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || test_bit(0, &nlk->state)) { DECLARE_WAITQUEUE(wait, current); + task_t *client; + if (!timeo) { if (!nlk->pid) netlink_overrun(sk); @@ -486,6 +507,19 @@ return -EAGAIN; } + if (nlk->pid) { + /* Kernel is sending information to user space + * and socket buffer is full: Wake up user + * process */ + client = find_task_by_pid(nlk->pid); + if (!client) { + sock_put(sk); + kfree_skb(skb); + return -EAGAIN; + } + wake_up_process(client); + } + __set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&nlk->wait, &wait); @@ -525,8 +559,24 @@ #endif skb_queue_tail(&sk->sk_receive_queue, skb); - sk->sk_data_ready(sk, len); - sock_put(sk); + if (!nlk->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) { + sock_put(sk); + return -EAGAIN; + } + + INIT_WORK(&nlwork->work, netlink_wq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = len; + queue_work(netlink_wq, &nlwork->work); + } else { + sk->sk_data_ready(sk, len); + sock_put(sk); + } + return len; } @@ -573,7 +623,21 @@ skb_orphan(skb); skb_set_owner_r(skb, sk); skb_queue_tail(&sk->sk_receive_queue, skb); - sk->sk_data_ready(sk, skb->len); + + if (!nlk->pid) { + struct netlink_work *nlwork = + kmalloc(sizeof(struct netlink_work), GFP_KERNEL); + + if (!nlwork) + return -1; + + INIT_WORK(&nlwork->work, netlink_wq_handler, nlwork); + nlwork->sk = sk; + nlwork->len = skb->len; + queue_work(netlink_wq, &nlwork->work); + } else + sk->sk_data_ready(sk, skb->len); + return 0; } return -1; @@ -619,13 +683,14 @@ netlink_overrun(sk); /* Clone failed. Notify ALL listeners. */ failure = 1; + sock_put(sk); } else if (netlink_broadcast_deliver(sk, skb2)) { netlink_overrun(sk); + sock_put(sk); } else { delivered = 1; skb2 = NULL; } - sock_put(sk); } netlink_unlock_table(); @@ -1202,6 +1267,9 @@ #endif /* The netlink device handler may be needed early. */ rtnetlink_init(); + + /* Create a work queue to handle callbacks to modules */ + netlink_wq = create_workqueue("netlink"); return 0; } @@ -1209,6 +1277,7 @@ { sock_unregister(PF_NETLINK); proc_net_remove("netlink"); + destroy_workqueue(netlink_wq); } core_initcall(netlink_proto_init); diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c --- a/net/packet/af_packet.c 2004-09-06 16:37:53 -07:00 +++ b/net/packet/af_packet.c 2004-09-06 16:37:53 -07:00 @@ -65,6 +65,8 @@ #include #include #include +#include +#include #include #include #include @@ -172,7 +174,7 @@ { struct tpacket_stats stats; #ifdef CONFIG_PACKET_MMAP - unsigned long *pg_vec; + char * *pg_vec; unsigned int head; unsigned int frames_per_block; unsigned int frame_size; @@ -197,15 +199,15 @@ #ifdef CONFIG_PACKET_MMAP -static inline unsigned long packet_lookup_frame(struct packet_opt *po, unsigned int position) +static inline char *packet_lookup_frame(struct packet_opt *po, unsigned int position) { unsigned int pg_vec_pos, frame_offset; - unsigned long frame; + char *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)); + frame = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size); return frame; } @@ -1548,7 +1550,12 @@ .close =packet_mm_close, }; -static void free_pg_vec(unsigned long *pg_vec, unsigned order, unsigned len) +static inline struct page *pg_vec_endpage(char *one_pg_vec, unsigned int order) +{ + return virt_to_page(one_pg_vec + (PAGE_SIZE << order) - 1); +} + +static void free_pg_vec(char **pg_vec, unsigned order, unsigned len) { int i; @@ -1556,10 +1563,10 @@ if (pg_vec[i]) { struct page *page, *pend; - pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1); + pend = pg_vec_endpage(pg_vec[i], order); for (page = virt_to_page(pg_vec[i]); page <= pend; page++) ClearPageReserved(page); - free_pages(pg_vec[i], order); + free_pages((unsigned long)pg_vec[i], order); } } kfree(pg_vec); @@ -1568,7 +1575,7 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing) { - unsigned long *pg_vec = NULL; + char **pg_vec = NULL; struct packet_opt *po = pkt_sk(sk); int was_running, num, order = 0; int err = 0; @@ -1603,18 +1610,18 @@ err = -ENOMEM; - pg_vec = kmalloc(req->tp_block_nr*sizeof(unsigned long*), GFP_KERNEL); + pg_vec = kmalloc(req->tp_block_nr*sizeof(char *), GFP_KERNEL); if (pg_vec == NULL) goto out; - memset(pg_vec, 0, req->tp_block_nr*sizeof(unsigned long*)); + memset(pg_vec, 0, req->tp_block_nr*sizeof(char **)); for (i=0; itp_block_nr; i++) { struct page *page, *pend; - pg_vec[i] = __get_free_pages(GFP_KERNEL, order); + pg_vec[i] = (char *)__get_free_pages(GFP_KERNEL, order); if (!pg_vec[i]) goto out_free_pgvec; - pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1); + pend = pg_vec_endpage(pg_vec[i], order); for (page = virt_to_page(pg_vec[i]); page <= pend; page++) SetPageReserved(page); } @@ -1622,7 +1629,7 @@ l = 0; for (i=0; itp_block_nr; i++) { - unsigned long ptr = pg_vec[i]; + char *ptr = pg_vec[i]; struct tpacket_hdr *header; int k; diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig --- a/net/sched/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/net/sched/Kconfig 2004-09-06 16:37:54 -07:00 @@ -317,7 +317,7 @@ module will be called cls_u32. config CLS_U32_PERF - bool " U32 classifier performance counters" + bool "U32 classifier performance counters" depends on NET_CLS_U32 help gathers stats that could be used to tune u32 classifier performance. @@ -364,7 +364,7 @@ module will be called cls_rsvp6. config NET_CLS_ACT - bool ' Packet ACTION ' + bool "Packet ACTION" depends on EXPERIMENTAL && NET_CLS && NET_QOS ---help--- This option requires you have a new iproute2. It enables @@ -373,7 +373,7 @@ You MUST NOT turn this on if you dont have an update iproute2. config NET_ACT_POLICE - tristate ' Policing Actions' + tristate "Policing Actions" depends on NET_CLS_ACT ---help--- If you are using a newer iproute2 select this one, otherwise use one @@ -387,3 +387,15 @@ Say Y to support traffic policing (bandwidth limits). Needed for ingress and egress rate limiting. +config NET_ACT_GACT + tristate "generic Actions" + depends on NET_CLS_ACT + ---help--- + You must have new iproute2 to use this feature + This adds simple filtering actions like drop,accepet etc + +config GACT_PROB + bool "generic Actions probability" + depends on NET_ACT_GACT + ---help--- + Allows generic actions to be randomly or deterministically used diff -Nru a/net/sched/Makefile b/net/sched/Makefile --- a/net/sched/Makefile 2004-09-06 16:37:52 -07:00 +++ b/net/sched/Makefile 2004-09-06 16:37:52 -07:00 @@ -8,8 +8,9 @@ obj-$(CONFIG_NET_ESTIMATOR) += estimator.o obj-$(CONFIG_NET_CLS) += cls_api.o obj-$(CONFIG_NET_CLS_ACT) += act_api.o -obj-$(CONFIG_NET_ACT_POLICE) += police.o -obj-$(CONFIG_NET_CLS_POLICE) += police.o +obj-$(CONFIG_NET_ACT_POLICE) += police.o +obj-$(CONFIG_NET_CLS_POLICE) += police.o +obj-$(CONFIG_NET_ACT_GACT) += gact.o obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o diff -Nru a/net/sched/gact.c b/net/sched/gact.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/gact.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,261 @@ +/* + * net/sched/gact.c Generic actions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * copyright Jamal Hadi Salim (2002-4) + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* use generic hash table */ +#define MY_TAB_SIZE 16 +#define MY_TAB_MASK 15 +static u32 idx_gen; +static struct tcf_gact *tcf_gact_ht[MY_TAB_SIZE]; +static rwlock_t gact_lock = RW_LOCK_UNLOCKED; + +/* ovewrride the defaults */ +#define tcf_st tcf_gact +#define tc_st tc_gact +#define tcf_t_lock gact_lock +#define tcf_ht tcf_gact_ht + +#define CONFIG_NET_ACT_INIT 1 +#include + +#ifdef CONFIG_GACT_PROB +typedef int (*g_rand)(struct tcf_gact *p); +int +gact_net_rand(struct tcf_gact *p) { + if (net_random()%p->pval) + return p->action; + return p->paction; +} + +int +gact_determ(struct tcf_gact *p) { + if (p->stats.packets%p->pval) + return p->action; + return p->paction; +} + + +g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ}; + +#endif +int +tcf_gact_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr,int bind) +{ + struct rtattr *tb[TCA_GACT_MAX]; + struct tc_gact *parm = NULL; + struct tc_gact_p *p_parm = NULL; + struct tcf_gact *p = NULL; + int ret = 0; + int size = sizeof (*p); + + if (rtattr_parse(tb, TCA_GACT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0) + return -1; + + if (NULL == a || NULL == tb[TCA_GACT_PARMS - 1]) { + printk("BUG: tcf_gact_init called with NULL params\n"); + return -1; + } + + parm = RTA_DATA(tb[TCA_GACT_PARMS - 1]); +#ifdef CONFIG_GACT_PROB + if (NULL != tb[TCA_GACT_PROB - 1]) { + p_parm = RTA_DATA(tb[TCA_GACT_PROB - 1]); + } +#endif + + p = tcf_hash_check(parm, a, ovr, bind); + + if (NULL == p) { + p = tcf_hash_create(parm,est,a,size,ovr, bind); + + if (NULL == p) { + return -1; + } else { + p->refcnt = 1; + ret = 1; + goto override; + } + } + + if (ovr) { +override: + p->action = parm->action; +#ifdef CONFIG_GACT_PROB + if (NULL != p_parm) { + p->paction = p_parm->paction; + p->pval = p_parm->pval; + p->ptype = p_parm->ptype; + } else { + p->paction = p->pval = p->ptype = 0; + } +#endif + } + + return ret; +} + +int +tcf_gact_cleanup(struct tc_action *a, int bind) +{ + struct tcf_gact *p; + p = PRIV(a,gact); + if (NULL != p) + return tcf_hash_release(p, bind); + return 0; +} + +int +tcf_gact(struct sk_buff **pskb, struct tc_action *a) +{ + struct tcf_gact *p; + struct sk_buff *skb = *pskb; + int action = TC_ACT_SHOT; + + p = PRIV(a,gact); + + if (NULL == p) { + if (net_ratelimit()) + printk("BUG: tcf_gact called with NULL params\n"); + return -1; + } + + spin_lock(&p->lock); +#ifdef CONFIG_GACT_PROB + if (p->ptype && NULL != gact_rand[p->ptype]) + action = gact_rand[p->ptype](p); + else + action = p->action; +#else + action = p->action; +#endif + p->stats.bytes += skb->len; + p->stats.packets++; + if (TC_ACT_SHOT == action) + p->stats.drops++; + p->tm.lastuse = jiffies; + spin_unlock(&p->lock); + + return action; +} + +int +tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) +{ + unsigned char *b = skb->tail; + struct tc_gact opt; + struct tc_gact_p p_opt; + struct tcf_gact *p; + struct tcf_t t; + + p = PRIV(a,gact); + if (NULL == p) { + printk("BUG: tcf_gact_dump called with NULL params\n"); + goto rtattr_failure; + } + + opt.index = p->index; + opt.refcnt = p->refcnt - ref; + opt.bindcnt = p->bindcnt - bind; + opt.action = p->action; + RTA_PUT(skb, TCA_GACT_PARMS, sizeof (opt), &opt); +#ifdef CONFIG_GACT_PROB + if (p->ptype) { + p_opt.paction = p->paction; + p_opt.pval = p->pval; + p_opt.ptype = p->ptype; + RTA_PUT(skb, TCA_GACT_PROB, sizeof (p_opt), &p_opt); + } +#endif + t.install = jiffies - p->tm.install; + t.lastuse = jiffies - p->tm.lastuse; + t.expires = p->tm.expires; + RTA_PUT(skb, TCA_GACT_TM, sizeof (t), &t); + return skb->len; + + rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +int +tcf_gact_stats(struct sk_buff *skb, struct tc_action *a) +{ + struct tcf_gact *p; + p = PRIV(a,gact); + if (NULL != p) + return qdisc_copy_stats(skb, &p->stats,p->stats_lock); + + return 1; +} + +struct tc_action_ops act_gact_ops = { + .next = NULL, + .kind = "gact", + .type = TCA_ACT_GACT, + .capab = TCA_CAP_NONE, + .owner = THIS_MODULE, + .act = tcf_gact, + .get_stats = tcf_gact_stats, + .dump = tcf_gact_dump, + .cleanup = tcf_gact_cleanup, + .lookup = tcf_hash_search, + .init = tcf_gact_init, + .walk = tcf_generic_walker +}; + +MODULE_AUTHOR("Jamal Hadi Salim(2002-4)"); +MODULE_DESCRIPTION("Generic Classifier actions"); +MODULE_LICENSE("GPL"); + +static int __init +gact_init_module(void) +{ +#ifdef CONFIG_GACT_PROB + printk("GACT probability on\n"); +#else + printk("GACT probability NOT on\n"); +#endif + return tcf_register_action(&act_gact_ops); +} + +static void __exit +gact_cleanup_module(void) +{ + tcf_unregister_action(&act_gact_ops); +} + +module_init(gact_init_module); +module_exit(gact_cleanup_module); diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c --- a/net/sched/sch_netem.c 2004-09-06 16:37:55 -07:00 +++ b/net/sched/sch_netem.c 2004-09-06 16:37:55 -07:00 @@ -6,6 +6,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * + * Many of the algorithms and ideas for this came from + * NIST Net which is not copyrighted. + * * Authors: Stephen Hemminger * Catalin(ux aka Dino) BOIE */ @@ -22,11 +25,31 @@ #include -/* Network emulator - * - * This scheduler can alters spacing and order - * Similar to NISTnet and BSD Dummynet. - */ +/* Network Emulation Queuing algorithm. + ==================================== + + Sources: [1] Mark Carson, Darrin Santay, "NIST Net - A Linux-based + Network Emulation Tool + [2] Luigi Rizzo, DummyNet for FreeBSD + + ---------------------------------------------------------------- + + This started out as a simple way to delay outgoing packets to + test TCP but has grown to include most of the functionality + of a full blown network emulator like NISTnet. It can delay + packets and add random jitter (and correlation). The random + distribution can be loaded from a table as well to provide + normal, Pareto, or experimental curves. Packet loss, + duplication, and reordering can also be emulated. + + This qdisc does not do classification that can be handled in + layering other disciplines. It does not need to do bandwidth + control either since that can be handled by using token + bucket or other rate control. + + The simulator is limited by the Linux timer resolution + and will create packet bursts on the HZ boundary (1ms). +*/ struct netem_sched_data { struct Qdisc *qdisc; @@ -39,6 +62,17 @@ u32 counter; u32 gap; u32 jitter; + u32 duplicate; + + struct crndstate { + unsigned long last; + unsigned long rho; + } delay_cor, loss_cor, dup_cor; + + struct disttable { + u32 size; + s16 table[0]; + } *delay_dist; }; /* Time stamp put into socket buffer control block */ @@ -46,576 +80,110 @@ psched_time_t time_to_send; }; -/* This is the distribution table for the normal distribution produced - * with NISTnet tools. - * The entries represent a scaled inverse of the cumulative distribution - * function. +/* init_crandom - initialize correlated random number generator + * Use entropy source for initial seed. */ -#define TABLESIZE 2048 -#define TABLEFACTOR 8192 +static void init_crandom(struct crndstate *state, unsigned long rho) +{ + state->rho = rho; + state->last = net_random(); +} -static const short disttable[TABLESIZE] = { - -31473, -26739, -25226, -24269, - -23560, -22993, -22518, -22109, - -21749, -21426, -21133, -20865, - -20618, -20389, -20174, -19972, - -19782, -19601, -19430, -19267, - -19112, -18962, -18819, -18681, - -18549, -18421, -18298, -18178, - -18062, -17950, -17841, -17735, - -17632, -17532, -17434, -17339, - -17245, -17155, -17066, -16979, - -16894, -16811, -16729, -16649, - -16571, -16494, -16419, -16345, - -16272, -16201, -16130, -16061, - -15993, -15926, -15861, -15796, - -15732, -15669, -15607, -15546, - -15486, -15426, -15368, -15310, - -15253, -15196, -15140, -15086, - -15031, -14977, -14925, -14872, - -14821, -14769, -14719, -14669, - -14619, -14570, -14522, -14473, - -14426, -14379, -14332, -14286, - -14241, -14196, -14150, -14106, - -14062, -14019, -13976, -13933, - -13890, -13848, -13807, -13765, - -13724, -13684, -13643, -13604, - -13564, -13525, -13486, -13447, - -13408, -13370, -13332, -13295, - -13258, -13221, -13184, -13147, - -13111, -13075, -13040, -13004, - -12969, -12934, -12899, -12865, - -12830, -12796, -12762, -12729, - -12695, -12662, -12629, -12596, - -12564, -12531, -12499, -12467, - -12435, -12404, -12372, -12341, - -12310, -12279, -12248, -12218, - -12187, -12157, -12127, -12097, - -12067, -12038, -12008, -11979, - -11950, -11921, -11892, -11863, - -11835, -11806, -11778, -11750, - -11722, -11694, -11666, -11639, - -11611, -11584, -11557, -11530, - -11503, -11476, -11450, -11423, - -11396, -11370, -11344, -11318, - -11292, -11266, -11240, -11214, - -11189, -11164, -11138, -11113, - -11088, -11063, -11038, -11013, - -10988, -10964, -10939, -10915, - -10891, -10866, -10843, -10818, - -10794, -10770, -10747, -10723, - -10700, -10676, -10652, -10630, - -10606, -10583, -10560, -10537, - -10514, -10491, -10469, -10446, - -10424, -10401, -10378, -10356, - -10334, -10312, -10290, -10267, - -10246, -10224, -10202, -10180, - -10158, -10137, -10115, -10094, - -10072, -10051, -10030, -10009, - -9988, -9967, -9945, -9925, - -9904, -9883, -9862, -9842, - -9821, -9800, -9780, -9760, - -9739, -9719, -9699, -9678, - -9658, -9638, -9618, -9599, - -9578, -9559, -9539, -9519, - -9499, -9480, -9461, -9441, - -9422, -9402, -9383, -9363, - -9344, -9325, -9306, -9287, - -9268, -9249, -9230, -9211, - -9192, -9173, -9155, -9136, - -9117, -9098, -9080, -9062, - -9043, -9025, -9006, -8988, - -8970, -8951, -8933, -8915, - -8897, -8879, -8861, -8843, - -8825, -8807, -8789, -8772, - -8754, -8736, -8718, -8701, - -8683, -8665, -8648, -8630, - -8613, -8595, -8578, -8561, - -8543, -8526, -8509, -8492, - -8475, -8458, -8441, -8423, - -8407, -8390, -8373, -8356, - -8339, -8322, -8305, -8289, - -8272, -8255, -8239, -8222, - -8206, -8189, -8172, -8156, - -8140, -8123, -8107, -8090, - -8074, -8058, -8042, -8025, - -8009, -7993, -7977, -7961, - -7945, -7929, -7913, -7897, - -7881, -7865, -7849, -7833, - -7817, -7802, -7786, -7770, - -7754, -7739, -7723, -7707, - -7692, -7676, -7661, -7645, - -7630, -7614, -7599, -7583, - -7568, -7553, -7537, -7522, - -7507, -7492, -7476, -7461, - -7446, -7431, -7416, -7401, - -7385, -7370, -7356, -7340, - -7325, -7311, -7296, -7281, - -7266, -7251, -7236, -7221, - -7207, -7192, -7177, -7162, - -7148, -7133, -7118, -7104, - -7089, -7075, -7060, -7046, - -7031, -7016, -7002, -6988, - -6973, -6959, -6944, -6930, - -6916, -6901, -6887, -6873, - -6859, -6844, -6830, -6816, - -6802, -6788, -6774, -6760, - -6746, -6731, -6717, -6704, - -6690, -6675, -6661, -6647, - -6633, -6620, -6606, -6592, - -6578, -6564, -6550, -6537, - -6523, -6509, -6495, -6482, - -6468, -6454, -6441, -6427, - -6413, -6400, -6386, -6373, - -6359, -6346, -6332, -6318, - -6305, -6291, -6278, -6264, - -6251, -6238, -6224, -6211, - -6198, -6184, -6171, -6158, - -6144, -6131, -6118, -6105, - -6091, -6078, -6065, -6052, - -6039, -6025, -6012, -5999, - -5986, -5973, -5960, -5947, - -5934, -5921, -5908, -5895, - -5882, -5869, -5856, -5843, - -5830, -5817, -5804, -5791, - -5779, -5766, -5753, -5740, - -5727, -5714, -5702, -5689, - -5676, -5663, -5650, -5638, - -5625, -5612, -5600, -5587, - -5575, -5562, -5549, -5537, - -5524, -5512, -5499, -5486, - -5474, -5461, -5449, -5436, - -5424, -5411, -5399, -5386, - -5374, -5362, -5349, -5337, - -5324, -5312, -5299, -5287, - -5275, -5263, -5250, -5238, - -5226, -5213, -5201, -5189, - -5177, -5164, -5152, -5140, - -5128, -5115, -5103, -5091, - -5079, -5067, -5055, -5043, - -5030, -5018, -5006, -4994, - -4982, -4970, -4958, -4946, - -4934, -4922, -4910, -4898, - -4886, -4874, -4862, -4850, - -4838, -4826, -4814, -4803, - -4791, -4778, -4767, -4755, - -4743, -4731, -4719, -4708, - -4696, -4684, -4672, -4660, - -4649, -4637, -4625, -4613, - -4601, -4590, -4578, -4566, - -4554, -4543, -4531, -4520, - -4508, -4496, -4484, -4473, - -4461, -4449, -4438, -4427, - -4415, -4403, -4392, -4380, - -4368, -4357, -4345, -4334, - -4322, -4311, -4299, -4288, - -4276, -4265, -4253, -4242, - -4230, -4219, -4207, -4196, - -4184, -4173, -4162, -4150, - -4139, -4128, -4116, -4105, - -4094, -4082, -4071, -4060, - -4048, -4037, -4026, -4014, - -4003, -3992, -3980, -3969, - -3958, -3946, -3935, -3924, - -3913, -3901, -3890, -3879, - -3868, -3857, -3845, -3834, - -3823, -3812, -3801, -3790, - -3779, -3767, -3756, -3745, - -3734, -3723, -3712, -3700, - -3689, -3678, -3667, -3656, - -3645, -3634, -3623, -3612, - -3601, -3590, -3579, -3568, - -3557, -3545, -3535, -3524, - -3513, -3502, -3491, -3480, - -3469, -3458, -3447, -3436, - -3425, -3414, -3403, -3392, - -3381, -3370, -3360, -3348, - -3337, -3327, -3316, -3305, - -3294, -3283, -3272, -3262, - -3251, -3240, -3229, -3218, - -3207, -3197, -3185, -3175, - -3164, -3153, -3142, -3132, - -3121, -3110, -3099, -3088, - -3078, -3067, -3056, -3045, - -3035, -3024, -3013, -3003, - -2992, -2981, -2970, -2960, - -2949, -2938, -2928, -2917, - -2906, -2895, -2885, -2874, - -2864, -2853, -2842, -2832, - -2821, -2810, -2800, -2789, - -2778, -2768, -2757, -2747, - -2736, -2725, -2715, -2704, - -2694, -2683, -2673, -2662, - -2651, -2641, -2630, -2620, - -2609, -2599, -2588, -2578, - -2567, -2556, -2546, -2535, - -2525, -2515, -2504, -2493, - -2483, -2472, -2462, -2451, - -2441, -2431, -2420, -2410, - -2399, -2389, -2378, -2367, - -2357, -2347, -2336, -2326, - -2315, -2305, -2295, -2284, - -2274, -2263, -2253, -2243, - -2232, -2222, -2211, -2201, - -2191, -2180, -2170, -2159, - -2149, -2139, -2128, -2118, - -2107, -2097, -2087, -2076, - -2066, -2056, -2046, -2035, - -2025, -2014, -2004, -1994, - -1983, -1973, -1963, -1953, - -1942, -1932, -1921, -1911, - -1901, -1891, -1880, -1870, - -1860, -1849, -1839, -1829, - -1819, -1808, -1798, -1788, - -1778, -1767, -1757, -1747, - -1736, -1726, -1716, -1706, - -1695, -1685, -1675, -1665, - -1654, -1644, -1634, -1624, - -1613, -1603, -1593, -1583, - -1573, -1563, -1552, -1542, - -1532, -1522, -1511, -1501, - -1491, -1481, -1471, -1461, - -1450, -1440, -1430, -1420, - -1409, -1400, -1389, -1379, - -1369, -1359, -1348, -1339, - -1328, -1318, -1308, -1298, - -1288, -1278, -1267, -1257, - -1247, -1237, -1227, -1217, - -1207, -1196, -1186, -1176, - -1166, -1156, -1146, -1135, - -1126, -1115, -1105, -1095, - -1085, -1075, -1065, -1055, - -1044, -1034, -1024, -1014, - -1004, -994, -984, -974, - -964, -954, -944, -933, - -923, -913, -903, -893, - -883, -873, -863, -853, - -843, -833, -822, -812, - -802, -792, -782, -772, - -762, -752, -742, -732, - -722, -712, -702, -691, - -682, -671, -662, -651, - -641, -631, -621, -611, - -601, -591, -581, -571, - -561, -551, -541, -531, - -521, -511, -501, -491, - -480, -471, -460, -451, - -440, -430, -420, -410, - -400, -390, -380, -370, - -360, -350, -340, -330, - -320, -310, -300, -290, - -280, -270, -260, -250, - -240, -230, -220, -210, - -199, -190, -179, -170, - -159, -150, -139, -129, - -119, -109, -99, -89, - -79, -69, -59, -49, - -39, -29, -19, -9, - 1, 11, 21, 31, - 41, 51, 61, 71, - 81, 91, 101, 111, - 121, 131, 141, 152, - 161, 172, 181, 192, - 202, 212, 222, 232, - 242, 252, 262, 272, - 282, 292, 302, 312, - 322, 332, 342, 352, - 362, 372, 382, 392, - 402, 412, 422, 433, - 442, 453, 462, 473, - 483, 493, 503, 513, - 523, 533, 543, 553, - 563, 573, 583, 593, - 603, 613, 623, 633, - 643, 653, 664, 673, - 684, 694, 704, 714, - 724, 734, 744, 754, - 764, 774, 784, 794, - 804, 815, 825, 835, - 845, 855, 865, 875, - 885, 895, 905, 915, - 925, 936, 946, 956, - 966, 976, 986, 996, - 1006, 1016, 1026, 1037, - 1047, 1057, 1067, 1077, - 1087, 1097, 1107, 1117, - 1128, 1138, 1148, 1158, - 1168, 1178, 1188, 1198, - 1209, 1219, 1229, 1239, - 1249, 1259, 1269, 1280, - 1290, 1300, 1310, 1320, - 1330, 1341, 1351, 1361, - 1371, 1381, 1391, 1402, - 1412, 1422, 1432, 1442, - 1452, 1463, 1473, 1483, - 1493, 1503, 1513, 1524, - 1534, 1544, 1554, 1565, - 1575, 1585, 1595, 1606, - 1616, 1626, 1636, 1647, - 1656, 1667, 1677, 1687, - 1697, 1708, 1718, 1729, - 1739, 1749, 1759, 1769, - 1780, 1790, 1800, 1810, - 1821, 1831, 1841, 1851, - 1862, 1872, 1883, 1893, - 1903, 1913, 1923, 1934, - 1944, 1955, 1965, 1975, - 1985, 1996, 2006, 2016, - 2027, 2037, 2048, 2058, - 2068, 2079, 2089, 2099, - 2110, 2120, 2130, 2141, - 2151, 2161, 2172, 2182, - 2193, 2203, 2213, 2224, - 2234, 2245, 2255, 2265, - 2276, 2286, 2297, 2307, - 2318, 2328, 2338, 2349, - 2359, 2370, 2380, 2391, - 2401, 2412, 2422, 2433, - 2443, 2454, 2464, 2475, - 2485, 2496, 2506, 2517, - 2527, 2537, 2548, 2559, - 2569, 2580, 2590, 2601, - 2612, 2622, 2632, 2643, - 2654, 2664, 2675, 2685, - 2696, 2707, 2717, 2728, - 2738, 2749, 2759, 2770, - 2781, 2791, 2802, 2813, - 2823, 2834, 2845, 2855, - 2866, 2877, 2887, 2898, - 2909, 2919, 2930, 2941, - 2951, 2962, 2973, 2984, - 2994, 3005, 3015, 3027, - 3037, 3048, 3058, 3069, - 3080, 3091, 3101, 3113, - 3123, 3134, 3145, 3156, - 3166, 3177, 3188, 3199, - 3210, 3220, 3231, 3242, - 3253, 3264, 3275, 3285, - 3296, 3307, 3318, 3329, - 3340, 3351, 3362, 3373, - 3384, 3394, 3405, 3416, - 3427, 3438, 3449, 3460, - 3471, 3482, 3493, 3504, - 3515, 3526, 3537, 3548, - 3559, 3570, 3581, 3592, - 3603, 3614, 3625, 3636, - 3647, 3659, 3670, 3681, - 3692, 3703, 3714, 3725, - 3736, 3747, 3758, 3770, - 3781, 3792, 3803, 3814, - 3825, 3837, 3848, 3859, - 3870, 3881, 3893, 3904, - 3915, 3926, 3937, 3949, - 3960, 3971, 3983, 3994, - 4005, 4017, 4028, 4039, - 4051, 4062, 4073, 4085, - 4096, 4107, 4119, 4130, - 4141, 4153, 4164, 4175, - 4187, 4198, 4210, 4221, - 4233, 4244, 4256, 4267, - 4279, 4290, 4302, 4313, - 4325, 4336, 4348, 4359, - 4371, 4382, 4394, 4406, - 4417, 4429, 4440, 4452, - 4464, 4475, 4487, 4499, - 4510, 4522, 4533, 4545, - 4557, 4569, 4581, 4592, - 4604, 4616, 4627, 4639, - 4651, 4663, 4674, 4686, - 4698, 4710, 4722, 4734, - 4746, 4758, 4769, 4781, - 4793, 4805, 4817, 4829, - 4841, 4853, 4865, 4877, - 4889, 4900, 4913, 4925, - 4936, 4949, 4961, 4973, - 4985, 4997, 5009, 5021, - 5033, 5045, 5057, 5070, - 5081, 5094, 5106, 5118, - 5130, 5143, 5155, 5167, - 5179, 5191, 5204, 5216, - 5228, 5240, 5253, 5265, - 5278, 5290, 5302, 5315, - 5327, 5340, 5352, 5364, - 5377, 5389, 5401, 5414, - 5426, 5439, 5451, 5464, - 5476, 5489, 5502, 5514, - 5527, 5539, 5552, 5564, - 5577, 5590, 5603, 5615, - 5628, 5641, 5653, 5666, - 5679, 5691, 5704, 5717, - 5730, 5743, 5756, 5768, - 5781, 5794, 5807, 5820, - 5833, 5846, 5859, 5872, - 5885, 5897, 5911, 5924, - 5937, 5950, 5963, 5976, - 5989, 6002, 6015, 6028, - 6042, 6055, 6068, 6081, - 6094, 6108, 6121, 6134, - 6147, 6160, 6174, 6187, - 6201, 6214, 6227, 6241, - 6254, 6267, 6281, 6294, - 6308, 6321, 6335, 6348, - 6362, 6375, 6389, 6403, - 6416, 6430, 6443, 6457, - 6471, 6485, 6498, 6512, - 6526, 6540, 6554, 6567, - 6581, 6595, 6609, 6623, - 6637, 6651, 6665, 6679, - 6692, 6706, 6721, 6735, - 6749, 6763, 6777, 6791, - 6805, 6819, 6833, 6848, - 6862, 6876, 6890, 6905, - 6919, 6933, 6948, 6962, - 6976, 6991, 7005, 7020, - 7034, 7049, 7064, 7078, - 7093, 7107, 7122, 7136, - 7151, 7166, 7180, 7195, - 7210, 7225, 7240, 7254, - 7269, 7284, 7299, 7314, - 7329, 7344, 7359, 7374, - 7389, 7404, 7419, 7434, - 7449, 7465, 7480, 7495, - 7510, 7526, 7541, 7556, - 7571, 7587, 7602, 7618, - 7633, 7648, 7664, 7680, - 7695, 7711, 7726, 7742, - 7758, 7773, 7789, 7805, - 7821, 7836, 7852, 7868, - 7884, 7900, 7916, 7932, - 7948, 7964, 7981, 7997, - 8013, 8029, 8045, 8061, - 8078, 8094, 8110, 8127, - 8143, 8160, 8176, 8193, - 8209, 8226, 8242, 8259, - 8276, 8292, 8309, 8326, - 8343, 8360, 8377, 8394, - 8410, 8428, 8444, 8462, - 8479, 8496, 8513, 8530, - 8548, 8565, 8582, 8600, - 8617, 8634, 8652, 8670, - 8687, 8704, 8722, 8740, - 8758, 8775, 8793, 8811, - 8829, 8847, 8865, 8883, - 8901, 8919, 8937, 8955, - 8974, 8992, 9010, 9029, - 9047, 9066, 9084, 9103, - 9121, 9140, 9159, 9177, - 9196, 9215, 9234, 9253, - 9272, 9291, 9310, 9329, - 9349, 9368, 9387, 9406, - 9426, 9445, 9465, 9484, - 9504, 9524, 9544, 9563, - 9583, 9603, 9623, 9643, - 9663, 9683, 9703, 9723, - 9744, 9764, 9785, 9805, - 9826, 9846, 9867, 9888, - 9909, 9930, 9950, 9971, - 9993, 10013, 10035, 10056, - 10077, 10099, 10120, 10142, - 10163, 10185, 10207, 10229, - 10251, 10273, 10294, 10317, - 10339, 10361, 10384, 10406, - 10428, 10451, 10474, 10496, - 10519, 10542, 10565, 10588, - 10612, 10635, 10658, 10682, - 10705, 10729, 10752, 10776, - 10800, 10824, 10848, 10872, - 10896, 10921, 10945, 10969, - 10994, 11019, 11044, 11069, - 11094, 11119, 11144, 11169, - 11195, 11221, 11246, 11272, - 11298, 11324, 11350, 11376, - 11402, 11429, 11456, 11482, - 11509, 11536, 11563, 11590, - 11618, 11645, 11673, 11701, - 11728, 11756, 11785, 11813, - 11842, 11870, 11899, 11928, - 11957, 11986, 12015, 12045, - 12074, 12104, 12134, 12164, - 12194, 12225, 12255, 12286, - 12317, 12348, 12380, 12411, - 12443, 12475, 12507, 12539, - 12571, 12604, 12637, 12670, - 12703, 12737, 12771, 12804, - 12839, 12873, 12907, 12942, - 12977, 13013, 13048, 13084, - 13120, 13156, 13192, 13229, - 13267, 13304, 13341, 13379, - 13418, 13456, 13495, 13534, - 13573, 13613, 13653, 13693, - 13734, 13775, 13817, 13858, - 13901, 13943, 13986, 14029, - 14073, 14117, 14162, 14206, - 14252, 14297, 14343, 14390, - 14437, 14485, 14533, 14582, - 14631, 14680, 14731, 14782, - 14833, 14885, 14937, 14991, - 15044, 15099, 15154, 15210, - 15266, 15324, 15382, 15441, - 15500, 15561, 15622, 15684, - 15747, 15811, 15877, 15943, - 16010, 16078, 16148, 16218, - 16290, 16363, 16437, 16513, - 16590, 16669, 16749, 16831, - 16915, 17000, 17088, 17177, - 17268, 17362, 17458, 17556, - 17657, 17761, 17868, 17977, - 18090, 18207, 18328, 18452, - 18581, 18715, 18854, 18998, - 19149, 19307, 19472, 19645, - 19828, 20021, 20226, 20444, - 20678, 20930, 21204, 21503, - 21835, 22206, 22630, 23124, - 23721, 24478, 25529, 27316, -}; +/* get_crandom - correlated random number generator + * Next number depends on last value. + * rho is scaled to avoid floating point. + */ +static unsigned long get_crandom(struct crndstate *state) +{ + u64 value, rho; + unsigned long answer; + + if (state->rho == 0) /* no correllation */ + return net_random(); + + value = net_random(); + rho = (u64)state->rho + 1; + answer = (value * ((1ull<<32) - rho) + state->last * rho) >> 32; + state->last = answer; + return answer; +} /* tabledist - return a pseudo-randomly distributed value with mean mu and * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static inline int tabledist(int mu, int sigma) +static long tabledist(unsigned long mu, long sigma, + struct crndstate *state, const struct disttable *dist) { - int x; - int index; - int sigmamod, sigmadiv; + long t, x; + unsigned long rnd; if (sigma == 0) return mu; - index = (net_random() & (TABLESIZE-1)); - sigmamod = sigma%TABLEFACTOR; - sigmadiv = sigma/TABLEFACTOR; - x = sigmamod*disttable[index]; + rnd = get_crandom(state); + + /* default uniform distribution */ + if (dist == NULL) + return (rnd % (2*sigma)) - sigma + mu; + t = dist->table[rnd % dist->size]; + x = (sigma % NETEM_DIST_SCALE) * t; if (x >= 0) - x += TABLEFACTOR/2; + x += NETEM_DIST_SCALE/2; else - x -= TABLEFACTOR/2; + x -= NETEM_DIST_SCALE/2; - x /= TABLEFACTOR; - x += sigmadiv*disttable[index]; - x += mu; - return x; + return x / NETEM_DIST_SCALE + (sigma / NETEM_DIST_SCALE) * t + mu; } -/* Enqueue packets with underlying discipline (fifo) - * but mark them with current time first. - */ -static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +/* Put skb in the private delayed queue. */ +static int delay_skb(struct Qdisc *sch, struct sk_buff *skb) { struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; psched_time_t now; - long delay; + + PSCHED_GET_TIME(now); + PSCHED_TADD2(now, tabledist(q->latency, q->jitter, + &q->delay_cor, q->delay_dist), + cb->time_to_send); + + /* Always queue at tail to keep packets in order */ + if (likely(q->delayed.qlen < q->limit)) { + __skb_queue_tail(&q->delayed, skb); + sch->q.qlen++; + sch->stats.bytes += skb->len; + sch->stats.packets++; + return NET_XMIT_SUCCESS; + } + + sch->stats.drops++; + kfree_skb(skb); + return NET_XMIT_DROP; +} + +static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) +{ + struct netem_sched_data *q = qdisc_priv(sch); pr_debug("netem_enqueue skb=%p @%lu\n", skb, jiffies); /* Random packet drop 0 => none, ~0 => all */ - if (q->loss && q->loss >= net_random()) { + if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { + pr_debug("netem_enqueue: random loss\n"); sch->stats.drops++; return 0; /* lie about loss so TCP doesn't know */ } + /* Random duplication */ + if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) { + struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); + + pr_debug("netem_enqueue: dup %p\n", skb2); + if (skb2) + delay_skb(sch, skb2); + } /* If doing simple delay then gap == 0 so all packets * go into the delayed holding queue @@ -633,27 +201,8 @@ } q->counter = 0; - - PSCHED_GET_TIME(now); - if (q->jitter) - delay = tabledist(q->latency, q->jitter); - else - delay = q->latency; - PSCHED_TADD2(now, delay, cb->time_to_send); - - /* Always queue at tail to keep packets in order */ - if (likely(q->delayed.qlen < q->limit)) { - __skb_queue_tail(&q->delayed, skb); - sch->q.qlen++; - sch->stats.bytes += skb->len; - sch->stats.packets++; - return 0; - } - - sch->stats.drops++; - kfree_skb(skb); - return NET_XMIT_DROP; + return delay_skb(sch, skb); } /* Requeue packets but don't change time stamp */ @@ -752,39 +301,97 @@ return ret; } -static int netem_change(struct Qdisc *sch, struct rtattr *opt) +/* + * Distribution data is a variable size payload containing + * signed 16 bit values. + */ +static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) { struct netem_sched_data *q = qdisc_priv(sch); - struct tc_netem_qopt *qopt = RTA_DATA(opt); - struct Qdisc *child; - int ret; + unsigned long n = RTA_PAYLOAD(attr)/sizeof(__s16); + const __s16 *data = RTA_DATA(attr); + struct disttable *d; + int i; - if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) + if (n > 65536) return -EINVAL; - child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); - if (!child) + d = kmalloc(sizeof(*d) + n*sizeof(d->table[0]), GFP_KERNEL); + if (!d) + return -ENOMEM; + + d->size = n; + for (i = 0; i < n; i++) + d->table[i] = data[i]; + + spin_lock_bh(&sch->dev->queue_lock); + d = xchg(&q->delay_dist, d); + spin_unlock_bh(&sch->dev->queue_lock); + + kfree(d); + return 0; +} + +static int get_correlation(struct Qdisc *sch, const struct rtattr *attr) +{ + struct netem_sched_data *q = qdisc_priv(sch); + const struct tc_netem_corr *c = RTA_DATA(attr); + + if (RTA_PAYLOAD(attr) != sizeof(*c)) return -EINVAL; - ret = set_fifo_limit(child, qopt->limit); + init_crandom(&q->delay_cor, c->delay_corr); + init_crandom(&q->loss_cor, c->loss_corr); + init_crandom(&q->dup_cor, c->dup_corr); + return 0; +} + +static int netem_change(struct Qdisc *sch, struct rtattr *opt) +{ + struct netem_sched_data *q = qdisc_priv(sch); + struct tc_netem_qopt *qopt; + int ret; + + if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) + return -EINVAL; + + qopt = RTA_DATA(opt); + ret = set_fifo_limit(q->qdisc, qopt->limit); if (ret) { - qdisc_destroy(child); + pr_debug("netem: can't set fifo limit\n"); return ret; } - - sch_tree_lock(sch); - if (child) { - child = xchg(&q->qdisc, child); - if (child != &noop_qdisc) - qdisc_destroy(child); - q->latency = qopt->latency; - q->jitter = qopt->jitter; - q->limit = qopt->limit; - q->gap = qopt->gap; - q->loss = qopt->loss; + q->latency = qopt->latency; + q->jitter = qopt->jitter; + q->limit = qopt->limit; + q->gap = qopt->gap; + q->loss = qopt->loss; + q->duplicate = qopt->duplicate; + + /* Handle nested options after initial queue options. + * Should have put all options in nested format but too late now. + */ + if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { + struct rtattr *tb[TCA_NETEM_MAX]; + if (rtattr_parse(tb, TCA_NETEM_MAX, + RTA_DATA(opt) + sizeof(*qopt), + RTA_PAYLOAD(opt) - sizeof(*qopt))) + return -EINVAL; + + if (tb[TCA_NETEM_CORR-1]) { + ret = get_correlation(sch, tb[TCA_NETEM_CORR-1]); + if (ret) + return ret; + } + + if (tb[TCA_NETEM_DELAY_DIST-1]) { + ret = get_dist_table(sch, tb[TCA_NETEM_DELAY_DIST-1]); + if (ret) + return ret; + } } - sch_tree_unlock(sch); + return 0; } @@ -792,19 +399,29 @@ static int netem_init(struct Qdisc *sch, struct rtattr *opt) { struct netem_sched_data *q = qdisc_priv(sch); + int ret; if (!opt) return -EINVAL; skb_queue_head_init(&q->delayed); - q->qdisc = &noop_qdisc; - init_timer(&q->timer); q->timer.function = netem_watchdog; q->timer.data = (unsigned long) sch; q->counter = 0; - return netem_change(sch, opt); + q->qdisc = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (!q->qdisc) { + pr_debug("netem: qdisc create failed\n"); + return -ENOMEM; + } + + ret = netem_change(sch, opt); + if (ret) { + pr_debug("netem: change failed\n"); + qdisc_destroy(q->qdisc); + } + return ret; } static void netem_destroy(struct Qdisc *sch) @@ -813,21 +430,30 @@ del_timer_sync(&q->timer); qdisc_destroy(q->qdisc); + kfree(q->delay_dist); } static int netem_dump(struct Qdisc *sch, struct sk_buff *skb) { - struct netem_sched_data *q = qdisc_priv(sch); + const struct netem_sched_data *q = qdisc_priv(sch); unsigned char *b = skb->tail; + struct rtattr *rta = (struct rtattr *) b; struct tc_netem_qopt qopt; + struct tc_netem_corr cor; qopt.latency = q->latency; qopt.jitter = q->jitter; qopt.limit = q->limit; qopt.loss = q->loss; qopt.gap = q->gap; - + qopt.duplicate = q->duplicate; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); + + cor.delay_corr = q->delay_cor.rho; + cor.loss_corr = q->loss_cor.rho; + cor.dup_corr = q->dup_cor.rho; + RTA_PUT(skb, TCA_NETEM_CORR, sizeof(cor), &cor); + rta->rta_len = skb->tail - b; return skb->len; diff -Nru a/net/sched/sch_teql.c b/net/sched/sch_teql.c --- a/net/sched/sch_teql.c 2004-09-06 16:37:51 -07:00 +++ b/net/sched/sch_teql.c 2004-09-06 16:37:51 -07:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -449,7 +450,7 @@ static LIST_HEAD(master_dev_list); static int max_equalizers = 1; -MODULE_PARM(max_equalizers, "i"); +module_param(max_equalizers, int, 0); MODULE_PARM_DESC(max_equalizers, "Max number of link equalizers"); static int __init teql_init(void) diff -Nru a/net/sunrpc/auth_gss/gss_spkm3_seal.c b/net/sunrpc/auth_gss/gss_spkm3_seal.c --- a/net/sunrpc/auth_gss/gss_spkm3_seal.c 2004-09-06 16:37:53 -07:00 +++ b/net/sunrpc/auth_gss/gss_spkm3_seal.c 2004-09-06 16:37:53 -07:00 @@ -126,7 +126,7 @@ out_err: if (md5cksum.data) kfree(md5cksum.data); - token->data = 0; + token->data = NULL; token->len = 0; return GSS_S_FAILURE; } diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c --- a/net/sunrpc/svcauth_unix.c 2004-09-06 16:37:53 -07:00 +++ b/net/sunrpc/svcauth_unix.c 2004-09-06 16:37:53 -07:00 @@ -90,7 +90,7 @@ struct ip_map { struct cache_head h; - char *m_class; /* e.g. "nfsd" */ + char m_class[8]; /* e.g. "nfsd" */ struct in_addr m_addr; struct unix_domain *m_client; int m_add_change; @@ -104,7 +104,6 @@ if (test_bit(CACHE_VALID, &item->flags) && !test_bit(CACHE_NEGATIVE, &item->flags)) auth_domain_put(&im->m_client->h); - kfree(im->m_class); kfree(im); } } @@ -121,8 +120,7 @@ } static inline void ip_map_init(struct ip_map *new, struct ip_map *item) { - new->m_class = item->m_class; - item->m_class = NULL; + strcpy(new->m_class, item->m_class); new->m_addr.s_addr = item->m_addr.s_addr; } static inline void ip_map_update(struct ip_map *new, struct ip_map *item) @@ -171,6 +169,8 @@ /* class */ len = qword_get(&mesg, class, 50); if (len <= 0) return -EINVAL; + if (len >= sizeof(ipm.m_class)) + return -EINVAL; /* ip address */ len = qword_get(&mesg, buf, 50); @@ -194,9 +194,7 @@ } else dom = NULL; - ipm.m_class = strdup(class); - if (ipm.m_class == NULL) - return -ENOMEM; + strcpy(ipm.m_class, class); ipm.m_addr.s_addr = htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4); ipm.h.flags = 0; @@ -212,7 +210,6 @@ ip_map_put(&ipmp->h, &ip_map_cache); if (dom) auth_domain_put(dom); - if (ipm.m_class) kfree(ipm.m_class); if (!ipmp) return -ENOMEM; cache_flush(); @@ -272,9 +269,7 @@ if (dom->flavour != RPC_AUTH_UNIX) return -EINVAL; udom = container_of(dom, struct unix_domain, h); - ip.m_class = strdup("nfsd"); - if (!ip.m_class) - return -ENOMEM; + strcpy(ip.m_class, "nfsd"); ip.m_addr = addr; ip.m_client = udom; ip.m_add_change = udom->addr_changes+1; @@ -282,7 +277,7 @@ ip.h.expiry_time = NEVER; ipmp = ip_map_lookup(&ip, 1); - if (ip.m_class) kfree(ip.m_class); + if (ipmp) { ip_map_put(&ipmp->h, &ip_map_cache); return 0; @@ -306,7 +301,7 @@ struct ip_map key, *ipm; struct auth_domain *rv; - key.m_class = "nfsd"; + strcpy(key.m_class, "nfsd"); key.m_addr = addr; ipm = ip_map_lookup(&key, 0); @@ -368,7 +363,7 @@ svc_putu32(resv, RPC_AUTH_NULL); svc_putu32(resv, 0); - key.m_class = rqstp->rq_server->sv_program->pg_class; + strcpy(key.m_class, rqstp->rq_server->sv_program->pg_class); key.m_addr = rqstp->rq_addr.sin_addr; ipm = ip_map_lookup(&key, 0); @@ -464,7 +459,7 @@ } - key.m_class = rqstp->rq_server->sv_program->pg_class; + strcpy(key.m_class, rqstp->rq_server->sv_program->pg_class); key.m_addr = rqstp->rq_addr.sin_addr; diff -Nru a/scripts/Makefile.host b/scripts/Makefile.host --- a/scripts/Makefile.host 2004-09-06 16:37:54 -07:00 +++ b/scripts/Makefile.host 2004-09-06 16:37:54 -07:00 @@ -73,6 +73,7 @@ host-cxxobjs := $(addprefix $(obj)/,$(host-cxxobjs)) host-cshlib := $(addprefix $(obj)/,$(host-cshlib)) host-cshobjs := $(addprefix $(obj)/,$(host-cshobjs)) +obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) ##### # Handle options to gcc. Support building with separate output directory diff -Nru a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c --- a/scripts/basic/fixdep.c 2004-09-06 16:37:52 -07:00 +++ b/scripts/basic/fixdep.c 2004-09-06 16:37:52 -07:00 @@ -93,6 +93,14 @@ * (Note: it'd be easy to port over the complete mkdep state machine, * but I don't think the added complexity is worth it) */ +/* + * Note 2: if somebody writes HELLO_CONFIG_BOOM in a file, it will depend onto + * CONFIG_BOOM. This could seem a bug (not too hard to fix), but please do not + * fix it! Some UserModeLinux files (look at arch/um/) call CONFIG_BOOM as + * UML_CONFIG_BOOM, to avoid conflicts with /usr/include/linux/autoconf.h, + * through arch/um/include/uml-config.h; this fixdep "bug" makes sure that + * those files will have correct dependencies. + */ #include #include @@ -310,6 +318,7 @@ } memcpy(s, m, p-m); s[p-m] = 0; if (strrcmp(s, "include/linux/autoconf.h") && + strrcmp(s, "arch/um/include/uml-config.h") && strrcmp(s, ".ver")) { printf(" %s \\\n", s); do_config_file(s); diff -Nru a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c --- a/scripts/mod/sumversion.c 2004-09-06 16:37:54 -07:00 +++ b/scripts/mod/sumversion.c 2004-09-06 16:37:54 -07:00 @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff -Nru a/security/Kconfig b/security/Kconfig --- a/security/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/security/Kconfig 2004-09-06 16:37:54 -07:00 @@ -26,14 +26,14 @@ config SECURITY_CAPABILITIES tristate "Default Linux Capabilities" - depends on SECURITY!=n + depends on SECURITY help This enables the "default" Linux capabilities functionality. If you are unsure how to answer this question, answer Y. config SECURITY_ROOTPLUG tristate "Root Plug Support" - depends on USB && SECURITY!=n + depends on USB && SECURITY help This is a sample LSM module that should only be used as such. It prevents any programs running with egid == 0 if a specific diff -Nru a/security/commoncap.c b/security/commoncap.c --- a/security/commoncap.c 2004-09-06 16:37:52 -07:00 +++ b/security/commoncap.c 2004-09-06 16:37:52 -07:00 @@ -357,6 +357,11 @@ allowed = (totalram_pages - hugetlb_total_pages()) * sysctl_overcommit_ratio / 100; + /* + * Leave the last 3% for root + */ + if (!capable(CAP_SYS_ADMIN)) + allowed -= allowed / 32; allowed += total_swap_pages; if (atomic_read(&vm_committed_space) < allowed) diff -Nru a/security/security.c b/security/security.c --- a/security/security.c 2004-09-06 16:37:50 -07:00 +++ b/security/security.c 2004-09-06 16:37:50 -07:00 @@ -49,7 +49,7 @@ } /** - * security_scaffolding_startup - initialzes the security scaffolding framework + * security_scaffolding_startup - initializes the security scaffolding framework * * This should be called early in the kernel initialization sequence. */ @@ -183,7 +183,7 @@ * capable - calls the currently loaded security module's capable() function with the specified capability * @cap: the requested capability level. * - * This function calls the currently loaded security module's cabable() + * This function calls the currently loaded security module's capable() * function with a pointer to the current task and the specified @cap value. * * This allows the security module to implement the capable function call diff -Nru a/security/selinux/Kconfig b/security/selinux/Kconfig --- a/security/selinux/Kconfig 2004-09-06 16:37:50 -07:00 +++ b/security/selinux/Kconfig 2004-09-06 16:37:50 -07:00 @@ -24,6 +24,21 @@ If you are unsure how to answer this question, answer N. +config SECURITY_SELINUX_BOOTPARAM_VALUE + int "NSA SELinux boot parameter default value" + depends on SECURITY_SELINUX_BOOTPARAM + range 0 1 + default 1 + help + This option sets the default value for the kernel parameter + 'selinux', which allows SELinux to be disabled at boot. If this + option is set to 0 (zero), the SELinux kernel parameter will + default to 0, disabling SELinux at bootup. If this option is + set to 1 (one), the SELinux kernel paramater will default to 1, + enabling SELinux at bootup. + + If you are unsure how to answer this question, answer 1. + config SECURITY_SELINUX_DISABLE bool "NSA SELinux runtime disable" depends on SECURITY_SELINUX diff -Nru a/security/selinux/hooks.c b/security/selinux/hooks.c --- a/security/selinux/hooks.c 2004-09-06 16:37:55 -07:00 +++ b/security/selinux/hooks.c 2004-09-06 16:37:55 -07:00 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include /* for sysctl_local_port_range[] */ #include /* struct or_callable used in sock_rcv_skb */ @@ -62,7 +63,6 @@ #include #include #include -#include #include #include "avc.h" @@ -87,7 +87,7 @@ #endif #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM -int selinux_enabled = 1; +int selinux_enabled = CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE; static int __init selinux_enabled_setup(char *str) { @@ -1266,6 +1266,12 @@ int inode_security_set_sid(struct inode *inode, u32 sid) { struct inode_security_struct *isec = inode->i_security; + struct superblock_security_struct *sbsec = inode->i_sb->s_security; + + if (!sbsec->initialized) { + /* Defer initialization to selinux_complete_init. */ + return 0; + } down(&isec->sem); isec->sclass = inode_mode_to_security_class(inode->i_mode); @@ -1726,72 +1732,40 @@ kfree(bsec); } -/* Create an open file that refers to the null device. - Derived from the OpenWall LSM. */ -struct file *open_devnull(void) -{ - struct inode *inode; - struct dentry *dentry; - struct file *file = NULL; - struct inode_security_struct *isec; - dev_t dev; - - inode = new_inode(current->fs->rootmnt->mnt_sb); - if (!inode) - goto out; - - dentry = dget(d_alloc_root(inode)); - if (!dentry) - goto out_iput; - - file = get_empty_filp(); - if (!file) - goto out_dput; - - dev = MKDEV(MEM_MAJOR, 3); /* null device */ - - inode->i_uid = current->fsuid; - inode->i_gid = current->fsgid; - inode->i_blksize = PAGE_SIZE; - inode->i_blocks = 0; - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_state = I_DIRTY; /* so that mark_inode_dirty won't touch us */ - - isec = inode->i_security; - isec->sid = SECINITSID_DEVNULL; - isec->sclass = SECCLASS_CHR_FILE; - isec->initialized = 1; - - file->f_flags = O_RDWR; - file->f_mode = FMODE_READ | FMODE_WRITE; - file->f_dentry = dentry; - file->f_vfsmnt = mntget(current->fs->rootmnt); - file->f_pos = 0; - - init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, dev); - if (inode->i_fop->open(inode, file)) - goto out_fput; - -out: - return file; -out_fput: - mntput(file->f_vfsmnt); - put_filp(file); -out_dput: - dput(dentry); -out_iput: - iput(inode); - file = NULL; - goto out; -} +extern struct vfsmount *selinuxfs_mount; +extern struct dentry *selinux_null; /* Derived from fs/exec.c:flush_old_files. */ static inline void flush_unauthorized_files(struct files_struct * files) { struct avc_audit_data ad; struct file *file, *devnull = NULL; + struct tty_struct *tty = current->signal->tty; long j = -1; + if (tty) { + file_list_lock(); + file = list_entry(tty->tty_files.next, typeof(*file), f_list); + if (file) { + /* Revalidate access to controlling tty. + Use inode_has_perm on the tty inode directly rather + than using file_has_perm, as this particular open + file may belong to another process and we are only + interested in the inode-based check here. */ + struct inode *inode = file->f_dentry->d_inode; + if (inode_has_perm(current, inode, + FILE__READ | FILE__WRITE, + NULL, NULL)) { + /* Reset controlling tty. */ + current->signal->tty = NULL; + current->signal->tty_old_pgrp = 0; + } + } + file_list_unlock(); + } + + /* Revalidate access to inherited open files. */ + AVC_AUDIT_DATA_INIT(&ad,FS); spin_lock(&files->file_lock); @@ -1826,7 +1800,7 @@ if (devnull) { atomic_inc(&devnull->f_count); } else { - devnull = open_devnull(); + devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR); if (!devnull) { put_unused_fd(fd); fput(file); @@ -2822,7 +2796,7 @@ /* Returns error only if unable to parse addresses */ static int selinux_parse_skb_ipv4(struct sk_buff *skb, struct avc_audit_data *ad) { - int offset, ihlen, ret; + int offset, ihlen, ret = -EINVAL; struct iphdr _iph, *ih; offset = skb->nh.raw - skb->data; @@ -2836,6 +2810,7 @@ ad->u.net.v4info.saddr = ih->saddr; ad->u.net.v4info.daddr = ih->daddr; + ret = 0; switch (ih->protocol) { case IPPROTO_TCP: { @@ -2883,7 +2858,7 @@ static int selinux_parse_skb_ipv6(struct sk_buff *skb, struct avc_audit_data *ad) { u8 nexthdr; - int ret, offset; + int ret = -EINVAL, offset; struct ipv6hdr _ipv6h, *ip6; offset = skb->nh.raw - skb->data; @@ -2893,6 +2868,7 @@ ipv6_addr_copy(&ad->u.net.v6info.saddr, &ip6->saddr); ipv6_addr_copy(&ad->u.net.v6info.daddr, &ip6->daddr); + ret = 0; nexthdr = ip6->nexthdr; offset += sizeof(_ipv6h); @@ -3082,6 +3058,7 @@ goto out; AVC_AUDIT_DATA_INIT(&ad,NET); ad.u.net.sport = htons(snum); + ad.u.net.family = family; err = avc_has_perm(isec->sid, sid, isec->sclass, SOCKET__NAME_BIND, NULL, &ad); diff -Nru a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c --- a/security/selinux/selinuxfs.c 2004-09-06 16:37:55 -07:00 +++ b/security/selinux/selinuxfs.c 2004-09-06 16:37:55 -07:00 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -68,40 +69,15 @@ SEL_DISABLE /* disable SELinux until next reboot */ }; +#define TMPBUFLEN 12 static ssize_t sel_read_enforce(struct file *filp, char __user *buf, size_t count, loff_t *ppos) { - char *page; + char tmpbuf[TMPBUFLEN]; ssize_t length; - ssize_t end; - - if (count < 0 || count > PAGE_SIZE) - return -EINVAL; - if (!(page = (char*)__get_free_page(GFP_KERNEL))) - return -ENOMEM; - memset(page, 0, PAGE_SIZE); - length = scnprintf(page, PAGE_SIZE, "%d", selinux_enforcing); - if (length < 0) { - free_page((unsigned long)page); - return length; - } - - if (*ppos >= length) { - free_page((unsigned long)page); - return 0; - } - if (count + *ppos > length) - count = length - *ppos; - end = count + *ppos; - if (copy_to_user(buf, (char *) page + *ppos, count)) { - count = -EFAULT; - goto out; - } - *ppos = end; -out: - free_page((unsigned long)page); - return count; + length = scnprintf(tmpbuf, TMPBUFLEN, "%d", selinux_enforcing); + return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); } #ifdef CONFIG_SECURITY_SELINUX_DEVELOP @@ -119,10 +95,9 @@ /* No partial writes. */ return -EINVAL; } - page = (char*)__get_free_page(GFP_KERNEL); + page = (char*)get_zeroed_page(GFP_KERNEL); if (!page) return -ENOMEM; - memset(page, 0, PAGE_SIZE); length = -EFAULT; if (copy_from_user(page, buf, count)) goto out; @@ -170,10 +145,9 @@ /* No partial writes. */ return -EINVAL; } - page = (char*)__get_free_page(GFP_KERNEL); + page = (char*)get_zeroed_page(GFP_KERNEL); if (!page) return -ENOMEM; - memset(page, 0, PAGE_SIZE); length = -EFAULT; if (copy_from_user(page, buf, count)) goto out; @@ -204,37 +178,11 @@ static ssize_t sel_read_policyvers(struct file *filp, char __user *buf, size_t count, loff_t *ppos) { - char *page; + char tmpbuf[TMPBUFLEN]; ssize_t length; - ssize_t end; - if (count < 0 || count > PAGE_SIZE) - return -EINVAL; - if (!(page = (char*)__get_free_page(GFP_KERNEL))) - return -ENOMEM; - memset(page, 0, PAGE_SIZE); - - length = scnprintf(page, PAGE_SIZE, "%u", POLICYDB_VERSION_MAX); - if (length < 0) { - free_page((unsigned long)page); - return length; - } - - if (*ppos >= length) { - free_page((unsigned long)page); - return 0; - } - if (count + *ppos > length) - count = length - *ppos; - end = count + *ppos; - if (copy_to_user(buf, (char *) page + *ppos, count)) { - count = -EFAULT; - goto out; - } - *ppos = end; -out: - free_page((unsigned long)page); - return count; + length = scnprintf(tmpbuf, TMPBUFLEN, "%u", POLICYDB_VERSION_MAX); + return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); } static struct file_operations sel_policyvers_ops = { @@ -247,37 +195,11 @@ static ssize_t sel_read_mls(struct file *filp, char __user *buf, size_t count, loff_t *ppos) { - char *page; + char tmpbuf[TMPBUFLEN]; ssize_t length; - ssize_t end; - - if (count < 0 || count > PAGE_SIZE) - return -EINVAL; - if (!(page = (char*)__get_free_page(GFP_KERNEL))) - return -ENOMEM; - memset(page, 0, PAGE_SIZE); - length = scnprintf(page, PAGE_SIZE, "%d", selinux_mls_enabled); - if (length < 0) { - free_page((unsigned long)page); - return length; - } - - if (*ppos >= length) { - free_page((unsigned long)page); - return 0; - } - if (count + *ppos > length) - count = length - *ppos; - end = count + *ppos; - if (copy_to_user(buf, (char *) page + *ppos, count)) { - count = -EFAULT; - goto out; - } - *ppos = end; -out: - free_page((unsigned long)page); - return count; + length = scnprintf(tmpbuf, TMPBUFLEN, "%d", selinux_mls_enabled); + return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); } static struct file_operations sel_mls_ops = { @@ -352,10 +274,9 @@ /* No partial writes. */ return -EINVAL; } - page = (char*)__get_free_page(GFP_KERNEL); + page = (char*)get_zeroed_page(GFP_KERNEL); if (!page) return -ENOMEM; - memset(page, 0, PAGE_SIZE); length = -EFAULT; if (copy_from_user(page, buf, count)) goto out; @@ -390,103 +311,31 @@ [SEL_USER] = sel_write_user, }; -/* an argresp is stored in an allocated page and holds the - * size of the argument or response, along with its content - */ -struct argresp { - ssize_t size; - char data[0]; -}; - -#define PAYLOAD_SIZE (PAGE_SIZE - sizeof(struct argresp)) - -/* - * transaction based IO methods. - * The file expects a single write which triggers the transaction, and then - * possibly a read which collects the result - which is stored in a - * file-local buffer. - */ -static ssize_t TA_write(struct file *file, const char __user *buf, size_t size, loff_t *pos) +static ssize_t selinux_transaction_write(struct file *file, const char __user *buf, size_t size, loff_t *pos) { ino_t ino = file->f_dentry->d_inode->i_ino; - struct argresp *ar; - ssize_t rv = 0; + char *data; + ssize_t rv; if (ino >= sizeof(write_op)/sizeof(write_op[0]) || !write_op[ino]) return -EINVAL; - if (file->private_data) - return -EINVAL; /* only one write allowed per open */ - if (size > PAYLOAD_SIZE - 1) /* allow one byte for null terminator */ - return -EFBIG; - ar = kmalloc(PAGE_SIZE, GFP_KERNEL); - if (!ar) - return -ENOMEM; - memset(ar, 0, PAGE_SIZE); /* clear buffer, particularly last byte */ - ar->size = 0; - down(&file->f_dentry->d_inode->i_sem); - if (file->private_data) - rv = -EINVAL; - else - file->private_data = ar; - up(&file->f_dentry->d_inode->i_sem); - if (rv) { - kfree(ar); - return rv; - } - if (copy_from_user(ar->data, buf, size)) - return -EFAULT; + data = simple_transaction_get(file, buf, size); + if (IS_ERR(data)) + return PTR_ERR(data); - rv = write_op[ino](file, ar->data, size); + rv = write_op[ino](file, data, size); if (rv>0) { - ar->size = rv; + simple_transaction_set(file, rv); rv = size; } return rv; } -static ssize_t TA_read(struct file *file, char __user *buf, size_t size, loff_t *pos) -{ - struct argresp *ar; - ssize_t rv = 0; - - if (file->private_data == NULL) - rv = TA_write(file, buf, 0, pos); - if (rv < 0) - return rv; - - ar = file->private_data; - if (!ar) - return 0; - if (*pos >= ar->size) - return 0; - if (*pos + size > ar->size) - size = ar->size - *pos; - if (copy_to_user(buf, ar->data + *pos, size)) - return -EFAULT; - *pos += size; - return size; -} - -static int TA_open(struct inode *inode, struct file *file) -{ - file->private_data = NULL; - return 0; -} - -static int TA_release(struct inode *inode, struct file *file) -{ - void *p = file->private_data; - file->private_data = NULL; - kfree(p); - return 0; -} - static struct file_operations transaction_ops = { - .write = TA_write, - .read = TA_read, - .open = TA_open, - .release = TA_release, + .write = selinux_transaction_write, + .read = simple_transaction_read, + .release = simple_transaction_release, }; /* @@ -534,7 +383,8 @@ if (length < 0) goto out2; - length = scnprintf(buf, PAYLOAD_SIZE, "%x %x %x %x %u", + length = scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, + "%x %x %x %x %u", avd.allowed, avd.decided, avd.auditallow, avd.auditdeny, avd.seqno); @@ -588,7 +438,7 @@ if (length < 0) goto out2; - if (len > PAYLOAD_SIZE) { + if (len > SIMPLE_TRANSACTION_LIMIT) { printk(KERN_ERR "%s: context size (%u) exceeds payload " "max\n", __FUNCTION__, len); length = -ERANGE; @@ -649,7 +499,7 @@ if (length < 0) goto out2; - if (len > PAYLOAD_SIZE) { + if (len > SIMPLE_TRANSACTION_LIMIT) { length = -ERANGE; goto out3; } @@ -709,7 +559,7 @@ length = rc; goto out3; } - if ((length + len) >= PAYLOAD_SIZE) { + if ((length + len) >= SIMPLE_TRANSACTION_LIMIT) { kfree(newcon); length = -ERANGE; goto out3; @@ -766,11 +616,10 @@ ret = -EINVAL; goto out; } - if (!(page = (char*)__get_free_page(GFP_KERNEL))) { + if (!(page = (char*)get_zeroed_page(GFP_KERNEL))) { ret = -ENOMEM; goto out; } - memset(page, 0, PAGE_SIZE); inode = filep->f_dentry->d_inode; cur_enforcing = security_get_bool_value(inode->i_ino - BOOL_INO_OFFSET); @@ -832,12 +681,11 @@ /* No partial writes. */ goto out; } - page = (char*)__get_free_page(GFP_KERNEL); + page = (char*)get_zeroed_page(GFP_KERNEL); if (!page) { length = -ENOMEM; goto out; } - memset(page, 0, PAGE_SIZE); if (copy_from_user(page, buf, count)) goto out; @@ -891,14 +739,12 @@ /* No partial writes. */ goto out; } - page = (char*)__get_free_page(GFP_KERNEL); + page = (char*)get_zeroed_page(GFP_KERNEL); if (!page) { length = -ENOMEM; goto out; } - memset(page, 0, PAGE_SIZE); - if (copy_from_user(page, buf, count)) goto out; @@ -984,9 +830,8 @@ sel_remove_bools(dir); - if (!(page = (char*)__get_free_page(GFP_KERNEL))) + if (!(page = (char*)get_zeroed_page(GFP_KERNEL))) return -ENOMEM; - memset(page, 0, PAGE_SIZE); ret = security_get_bools(&num, &names, &values); if (ret != 0) @@ -1042,12 +887,17 @@ goto out; } +#define NULL_FILE_NAME "null" + +struct dentry *selinux_null = NULL; + static int sel_fill_super(struct super_block * sb, void * data, int silent) { int ret; struct dentry *dentry; struct inode *inode; struct qstr qname; + struct inode_security_struct *isec; static struct tree_descr selinux_files[] = { [SEL_LOAD] = {"load", &sel_load_ops, S_IRUSR|S_IWUSR}, @@ -1085,10 +935,29 @@ if (ret) goto out; + qname.name = NULL_FILE_NAME; + qname.len = strlen(qname.name); + qname.hash = full_name_hash(qname.name, qname.len); + dentry = d_alloc(sb->s_root, &qname); + if (!dentry) + return -ENOMEM; + + inode = sel_make_inode(sb, S_IFCHR | S_IRUGO | S_IWUGO); + if (!inode) + goto out; + isec = (struct inode_security_struct*)inode->i_security; + isec->sid = SECINITSID_DEVNULL; + isec->sclass = SECCLASS_CHR_FILE; + isec->initialized = 1; + + init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3)); + d_add(dentry, inode); + selinux_null = dentry; + return 0; out: dput(dentry); - printk(KERN_ERR "security: error creating conditional out_dput\n"); + printk(KERN_ERR "%s: failed while creating inodes\n", __FUNCTION__); return -ENOMEM; } @@ -1104,9 +973,24 @@ .kill_sb = kill_litter_super, }; +struct vfsmount *selinuxfs_mount; + static int __init init_sel_fs(void) { - return selinux_enabled ? register_filesystem(&sel_fs_type) : 0; + int err; + + if (!selinux_enabled) + return 0; + err = register_filesystem(&sel_fs_type); + if (!err) { + selinuxfs_mount = kern_mount(&sel_fs_type); + if (IS_ERR(selinuxfs_mount)) { + printk(KERN_ERR "selinuxfs: could not mount!\n"); + err = PTR_ERR(selinuxfs_mount); + selinuxfs_mount = NULL; + } + } + return err; } __initcall(init_sel_fs); diff -Nru a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c --- a/security/selinux/ss/avtab.c 2004-09-06 16:37:54 -07:00 +++ b/security/selinux/ss/avtab.c 2004-09-06 16:37:54 -07:00 @@ -28,12 +28,14 @@ (keyp->source_type << 9)) & \ AVTAB_HASH_MASK) +static kmem_cache_t *avtab_node_cachep; + static struct avtab_node* avtab_insert_node(struct avtab *h, int hvalue, struct avtab_node * prev, struct avtab_node * cur, struct avtab_key *key, struct avtab_datum *datum) { struct avtab_node * newnode; - newnode = (struct avtab_node *) kmalloc(sizeof(struct avtab_node),GFP_KERNEL); + newnode = kmem_cache_alloc(avtab_node_cachep, SLAB_KERNEL); if (newnode == NULL) return NULL; memset(newnode, 0, sizeof(struct avtab_node)); @@ -226,7 +228,7 @@ while (cur != NULL) { temp = cur; cur = cur->next; - kfree(temp); + kmem_cache_free(avtab_node_cachep, temp); } h->htable[i] = NULL; } @@ -399,3 +401,9 @@ goto out; } +void avtab_cache_init(void) +{ + avtab_node_cachep = kmem_cache_create("avtab_node", + sizeof(struct avtab_node), + 0, SLAB_PANIC, NULL, NULL); +} diff -Nru a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h --- a/security/selinux/ss/avtab.h 2004-09-06 16:37:52 -07:00 +++ b/security/selinux/ss/avtab.h 2004-09-06 16:37:52 -07:00 @@ -78,6 +78,8 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified); +void avtab_cache_init(void); + #define AVTAB_HASH_BITS 15 #define AVTAB_HASH_BUCKETS (1 << AVTAB_HASH_BITS) #define AVTAB_HASH_MASK (AVTAB_HASH_BUCKETS-1) diff -Nru a/security/selinux/ss/services.c b/security/selinux/ss/services.c --- a/security/selinux/ss/services.c 2004-09-06 16:37:55 -07:00 +++ b/security/selinux/ss/services.c 2004-09-06 16:37:55 -07:00 @@ -1034,6 +1034,7 @@ LOAD_LOCK; if (!ss_initialized) { + avtab_cache_init(); if (policydb_read(&policydb, fp)) { LOAD_UNLOCK; return -EINVAL; diff -Nru a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c --- a/sound/arm/sa11xx-uda1341.c 2004-09-06 16:37:50 -07:00 +++ b/sound/arm/sa11xx-uda1341.c 2004-09-06 16:37:50 -07:00 @@ -21,7 +21,7 @@ * merged HAL layer (patches from Brian) */ -/* $Id: sa11xx-uda1341.c,v 1.15 2004/05/03 17:36:50 tiwai Exp $ */ +/* $Id: sa11xx-uda1341.c,v 1.18 2004/07/20 15:54:09 cladisch Exp $ */ /*************************************************************************************************** * @@ -108,16 +108,13 @@ MODULE_AUTHOR("Tomas Kasparek "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SA1100/SA1111 + UDA1341TS driver for ALSA"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{UDA1341,iPAQ H3600 UDA1341TS}}"); +MODULE_SUPPORTED_DEVICE("{{UDA1341,iPAQ H3600 UDA1341TS}}"); static char *id = NULL; /* ID for this card */ module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for SA1100/SA1111 + UDA1341TS soundcard."); -#define chip_t sa11xx_uda1341_t - typedef struct audio_stream { char *id; /* identification string */ int stream_id; /* numeric identification */ @@ -152,10 +149,8 @@ 29400, 32000, 44100, 48000, }; -#define RATES sizeof(rates) / sizeof(rates[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_rates = { - .count = RATES, + .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, }; @@ -869,7 +864,7 @@ static int snd_sa11xx_uda1341_suspend(snd_card_t *card, unsigned int state) { - sa11xx_uda1341_t *chip = snd_magic_cast(sa11x_uda1341_t, card->pm_private_data, return -EINVAL); + sa11xx_uda1341_t *chip = card->pm_private_data; snd_pcm_suspend_all(chip->pcm); #ifdef HH_VERSION @@ -886,7 +881,7 @@ static int snd_sa11xx_uda1341_resume(snd_card_t *card, unsigned int state) { - sa11xx_uda1341_t *chip = snd_magic_cast(sa11x_uda1341_t, card->pm_private_data, return -EINVAL); + sa11xx_uda1341_t *chip = card->pm_private_data; sa11xx_uda1341_audio_init(chip); l3_command(chip->uda1341, CMD_RESUME, NULL); @@ -903,7 +898,7 @@ void snd_sa11xx_uda1341_free(snd_card_t *card) { - sa11xx_uda1341_t *chip = snd_magic_cast(sa11xx_uda1341_t, card->private_data, return); + sa11xx_uda1341_t *chip = card->private_data; audio_dma_free(&chip->s[SNDRV_PCM_STREAM_PLAYBACK]); audio_dma_free(&chip->s[SNDRV_PCM_STREAM_CAPTURE]); @@ -925,7 +920,7 @@ if (card == NULL) return -ENOMEM; - sa11xx_uda1341 = snd_magic_kcalloc(sa11xx_uda1341_t, 0, GFP_KERNEL); + sa11xx_uda1341 = kcalloc(1, sizeof(*sa11xx_uda1341), GFP_KERNEL); if (sa11xx_uda1341 == NULL) return -ENOMEM; spin_lock_init(&chip->s[0].dma_lock); diff -Nru a/sound/core/control.c b/sound/core/control.c --- a/sound/core/control.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/control.c 2004-09-06 16:37:51 -07:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -62,7 +63,7 @@ err = -EFAULT; goto __error2; } - ctl = snd_magic_kcalloc(snd_ctl_file_t, 0, GFP_KERNEL); + ctl = kcalloc(1, sizeof(*ctl), GFP_KERNEL); if (ctl == NULL) { err = -ENOMEM; goto __error; @@ -108,7 +109,7 @@ snd_kcontrol_t *control; unsigned int idx; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO); + ctl = file->private_data; fasync_helper(-1, file, 0, &ctl->fasync); file->private_data = NULL; card = ctl->card; @@ -124,7 +125,7 @@ } up_write(&card->controls_rwsem); snd_ctl_empty_read_queue(ctl); - snd_magic_kfree(ctl); + kfree(ctl); module_put(card->module); snd_card_file_remove(card, file); return 0; @@ -155,7 +156,7 @@ goto _found; } } - ev = snd_kcalloc(sizeof(*ev), GFP_ATOMIC); + ev = kcalloc(1, sizeof(*ev), GFP_ATOMIC); if (ev) { ev->id = *id; ev->mask = mask; @@ -188,9 +189,7 @@ snd_runtime_check(control != NULL, return NULL); snd_runtime_check(control->count > 0, return NULL); - kctl = (snd_kcontrol_t *)snd_magic_kcalloc(snd_kcontrol_t, - sizeof(snd_kcontrol_volatile_t) * control->count, - GFP_KERNEL); + kctl = kcalloc(1, sizeof(*kctl) + sizeof(snd_kcontrol_volatile_t) * control->count, GFP_KERNEL); if (kctl == NULL) return NULL; *kctl = *control; @@ -249,7 +248,7 @@ if (kcontrol) { if (kcontrol->private_free) kcontrol->private_free(kcontrol); - snd_magic_kfree(kcontrol); + kfree(kcontrol); } } @@ -927,7 +926,7 @@ if (!(info.access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)) for (idx = 0; idx < 4 && info.dimen.d[idx]; idx++) dimen_size += sizeof(unsigned short); - ue = snd_kcalloc(sizeof(struct user_element) + dimen_size + private_size + extra_size, GFP_KERNEL); + ue = kcalloc(1, sizeof(struct user_element) + dimen_size + private_size + extra_size, GFP_KERNEL); if (ue == NULL) return -ENOMEM; ue->type = info.type; @@ -1022,8 +1021,8 @@ } #endif -static int snd_ctl_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static inline int _snd_ctl_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { snd_ctl_file_t *ctl; snd_card_t *card; @@ -1033,7 +1032,7 @@ int __user *ip = argp; int err; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO); + ctl = file->private_data; card = ctl->card; snd_assert(card != NULL, return -ENXIO); switch (cmd) { @@ -1096,13 +1095,24 @@ return -ENOTTY; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_ctl_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_ctl_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count, loff_t * offset) { snd_ctl_file_t *ctl; int err = 0; ssize_t result = 0; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO); + ctl = file->private_data; snd_assert(ctl != NULL && ctl->card != NULL, return -ENXIO); if (!ctl->subscribed) return -EBADFD; @@ -1116,7 +1126,7 @@ wait_queue_t wait; if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) { err = -EAGAIN; - goto __end; + goto __end_lock; } init_waitqueue_entry(&wait, current); add_wait_queue(&ctl->change_sleep, &wait); @@ -1137,16 +1147,16 @@ kfree(kev); if (copy_to_user(buffer, &ev, sizeof(snd_ctl_event_t))) { err = -EFAULT; - goto out; + goto __end; } spin_lock_irq(&ctl->read_lock); buffer += sizeof(snd_ctl_event_t); count -= sizeof(snd_ctl_event_t); result += sizeof(snd_ctl_event_t); } -__end: + __end_lock: spin_unlock_irq(&ctl->read_lock); -out: + __end: return result > 0 ? result : err; } @@ -1155,7 +1165,7 @@ unsigned int mask; snd_ctl_file_t *ctl; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return 0); + ctl = file->private_data; if (!ctl->subscribed) return 0; poll_wait(file, &ctl->change_sleep, wait); @@ -1175,8 +1185,7 @@ { snd_kctl_ioctl_t *pn; - pn = (snd_kctl_ioctl_t *) - snd_kcalloc(sizeof(snd_kctl_ioctl_t), GFP_KERNEL); + pn = kcalloc(1, sizeof(snd_kctl_ioctl_t), GFP_KERNEL); if (pn == NULL) return -ENOMEM; pn->fioctl = fcn; @@ -1214,7 +1223,7 @@ { snd_ctl_file_t *ctl; int err; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO); + ctl = file->private_data; err = fasync_helper(fd, file, on, &ctl->fasync); if (err < 0) return err; diff -Nru a/sound/core/device.c b/sound/core/device.c --- a/sound/core/device.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/device.c 2004-09-06 16:37:53 -07:00 @@ -47,7 +47,7 @@ snd_device_t *dev; snd_assert(card != NULL && device_data != NULL && ops != NULL, return -ENXIO); - dev = (snd_device_t *) snd_magic_kcalloc(snd_device_t, 0, GFP_KERNEL); + dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); if (dev == NULL) return -ENOMEM; dev->card = card; @@ -94,7 +94,7 @@ snd_printk(KERN_ERR "device free failure\n"); } } - snd_magic_kfree(dev); + kfree(dev); return 0; } snd_printd("device free %p (from %p), not found\n", device_data, __builtin_return_address(0)); diff -Nru a/sound/core/hwdep.c b/sound/core/hwdep.c --- a/sound/core/hwdep.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/hwdep.c 2004-09-06 16:37:50 -07:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,7 @@ static loff_t snd_hwdep_llseek(struct file * file, loff_t offset, int orig) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; if (hw->ops.llseek) return hw->ops.llseek(hw, file, offset, orig); return -ENXIO; @@ -57,7 +58,7 @@ static ssize_t snd_hwdep_read(struct file * file, char __user *buf, size_t count, loff_t *offset) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; if (hw->ops.read) return hw->ops.read(hw, buf, count, offset); return -ENXIO; @@ -65,7 +66,7 @@ static ssize_t snd_hwdep_write(struct file * file, const char __user *buf, size_t count, loff_t *offset) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; if (hw->ops.write) return hw->ops.write(hw, buf, count, offset); return -ENXIO; @@ -157,7 +158,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) { int err = -ENXIO; - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; down(&hw->open_mutex); if (hw->ops.release) { err = hw->ops.release(hw, file); @@ -173,7 +174,7 @@ static unsigned int snd_hwdep_poll(struct file * file, poll_table * wait) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return 0); + snd_hwdep_t *hw = file->private_data; if (hw->ops.poll) return hw->ops.poll(hw, file, wait); return 0; @@ -231,10 +232,10 @@ return 0; } -static int snd_hwdep_ioctl(struct inode *inode, struct file * file, - unsigned int cmd, unsigned long arg) +static inline int _snd_hwdep_ioctl(struct inode *inode, struct file * file, + unsigned int cmd, unsigned long arg) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; void __user *argp = (void __user *)arg; switch (cmd) { case SNDRV_HWDEP_IOCTL_PVERSION: @@ -251,9 +252,20 @@ return -ENOTTY; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_hwdep_ioctl(struct inode *inode, struct file * file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_hwdep_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + static int snd_hwdep_mmap(struct file * file, struct vm_area_struct * vma) { - snd_hwdep_t *hw = snd_magic_cast(snd_hwdep_t, file->private_data, return -ENXIO); + snd_hwdep_t *hw = file->private_data; if (hw->ops.mmap) return hw->ops.mmap(hw, file, vma); return -ENXIO; @@ -352,7 +364,7 @@ snd_assert(rhwdep != NULL, return -EINVAL); *rhwdep = NULL; snd_assert(card != NULL, return -ENXIO); - hwdep = snd_magic_kcalloc(snd_hwdep_t, 0, GFP_KERNEL); + hwdep = kcalloc(1, sizeof(*hwdep), GFP_KERNEL); if (hwdep == NULL) return -ENOMEM; hwdep->card = card; @@ -378,19 +390,19 @@ snd_assert(hwdep != NULL, return -ENXIO); if (hwdep->private_free) hwdep->private_free(hwdep); - snd_magic_kfree(hwdep); + kfree(hwdep); return 0; } static int snd_hwdep_dev_free(snd_device_t *device) { - snd_hwdep_t *hwdep = snd_magic_cast(snd_hwdep_t, device->device_data, return -ENXIO); + snd_hwdep_t *hwdep = device->device_data; return snd_hwdep_free(hwdep); } static int snd_hwdep_dev_register(snd_device_t *device) { - snd_hwdep_t *hwdep = snd_magic_cast(snd_hwdep_t, device->device_data, return -ENXIO); + snd_hwdep_t *hwdep = device->device_data; int idx, err; char name[32]; @@ -433,7 +445,7 @@ static int snd_hwdep_dev_unregister(snd_device_t *device) { - snd_hwdep_t *hwdep = snd_magic_cast(snd_hwdep_t, device->device_data, return -ENXIO); + snd_hwdep_t *hwdep = device->device_data; int idx; snd_assert(hwdep != NULL, return -ENXIO); diff -Nru a/sound/core/info.c b/sound/core/info.c --- a/sound/core/info.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/info.c 2004-09-06 16:37:55 -07:00 @@ -139,7 +139,7 @@ struct snd_info_entry *entry; loff_t ret; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; entry = data->entry; lock_kernel(); switch (entry->content) { @@ -183,7 +183,7 @@ size_t size = 0; loff_t pos; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; snd_assert(data != NULL, return -ENXIO); pos = *offset; if (pos < 0 || (long) pos != pos || (ssize_t) count < 0) @@ -224,7 +224,7 @@ size_t size = 0; loff_t pos; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; snd_assert(data != NULL, return -ENXIO); entry = data->entry; pos = *offset; @@ -296,7 +296,7 @@ goto __error; } } - data = snd_magic_kcalloc(snd_info_private_data_t, 0, GFP_KERNEL); + data = kcalloc(1, sizeof(*data), GFP_KERNEL); if (data == NULL) { err = -ENOMEM; goto __error; @@ -305,10 +305,9 @@ switch (entry->content) { case SNDRV_INFO_CONTENT_TEXT: if (mode == O_RDONLY || mode == O_RDWR) { - buffer = (snd_info_buffer_t *) - snd_kcalloc(sizeof(snd_info_buffer_t), GFP_KERNEL); + buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); if (buffer == NULL) { - snd_magic_kfree(data); + kfree(data); err = -ENOMEM; goto __error; } @@ -317,7 +316,7 @@ buffer->buffer = vmalloc(buffer->len); if (buffer->buffer == NULL) { kfree(buffer); - snd_magic_kfree(data); + kfree(data); err = -ENOMEM; goto __error; } @@ -325,14 +324,13 @@ data->rbuffer = buffer; } if (mode == O_WRONLY || mode == O_RDWR) { - buffer = (snd_info_buffer_t *) - snd_kcalloc(sizeof(snd_info_buffer_t), GFP_KERNEL); + buffer = kcalloc(1, sizeof(*buffer), GFP_KERNEL); if (buffer == NULL) { if (mode == O_RDWR) { vfree(data->rbuffer->buffer); kfree(data->rbuffer); } - snd_magic_kfree(data); + kfree(data); err = -ENOMEM; goto __error; } @@ -345,7 +343,7 @@ kfree(data->rbuffer); } kfree(buffer); - snd_magic_kfree(data); + kfree(data); err = -ENOMEM; goto __error; } @@ -357,7 +355,7 @@ if (entry->c.ops->open) { if ((err = entry->c.ops->open(entry, mode, &data->file_private_data)) < 0) { - snd_magic_kfree(data); + kfree(data); goto __error; } } @@ -389,7 +387,7 @@ int mode; mode = file->f_flags & O_ACCMODE; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; entry = data->entry; switch (entry->content) { case SNDRV_INFO_CONTENT_TEXT: @@ -417,7 +415,7 @@ break; } module_put(entry->module); - snd_magic_kfree(data); + kfree(data); return 0; } @@ -427,7 +425,7 @@ struct snd_info_entry *entry; unsigned int mask; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; if (data == NULL) return 0; entry = data->entry; @@ -447,13 +445,13 @@ return mask; } -static int snd_info_entry_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { snd_info_private_data_t *data; struct snd_info_entry *entry; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; if (data == NULL) return 0; entry = data->entry; @@ -468,13 +466,24 @@ return -ENOTTY; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_info_entry_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_info_entry_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) { struct inode *inode = file->f_dentry->d_inode; snd_info_private_data_t *data; struct snd_info_entry *entry; - data = snd_magic_cast(snd_info_private_data_t, file->private_data, return -ENXIO); + data = file->private_data; if (data == NULL) return 0; entry = data->entry; @@ -744,12 +753,12 @@ static snd_info_entry_t *snd_info_create_entry(const char *name) { snd_info_entry_t *entry; - entry = snd_magic_kcalloc(snd_info_entry_t, 0, GFP_KERNEL); + entry = kcalloc(1, sizeof(*entry), GFP_KERNEL); if (entry == NULL) return NULL; entry->name = snd_kmalloc_strdup(name, GFP_KERNEL); if (entry->name == NULL) { - snd_magic_kfree(entry); + kfree(entry); return NULL; } entry->mode = S_IFREG | S_IRUGO; @@ -805,27 +814,27 @@ static int snd_info_dev_free_entry(snd_device_t *device) { - snd_info_entry_t *entry = snd_magic_cast(snd_info_entry_t, device->device_data, return -ENXIO); + snd_info_entry_t *entry = device->device_data; snd_info_free_entry(entry); return 0; } static int snd_info_dev_register_entry(snd_device_t *device) { - snd_info_entry_t *entry = snd_magic_cast(snd_info_entry_t, device->device_data, return -ENXIO); + snd_info_entry_t *entry = device->device_data; return snd_info_register(entry); } static int snd_info_dev_disconnect_entry(snd_device_t *device) { - snd_info_entry_t *entry = snd_magic_cast(snd_info_entry_t, device->device_data, return -ENXIO); + snd_info_entry_t *entry = device->device_data; entry->disconnected = 1; return 0; } static int snd_info_dev_unregister_entry(snd_device_t *device) { - snd_info_entry_t *entry = snd_magic_cast(snd_info_entry_t, device->device_data, return -ENXIO); + snd_info_entry_t *entry = device->device_data; return snd_info_unregister(entry); } @@ -887,7 +896,7 @@ kfree((char *)entry->name); if (entry->private_free) entry->private_free(entry); - snd_magic_kfree(entry); + kfree(entry); } /** diff -Nru a/sound/core/info_oss.c b/sound/core/info_oss.c --- a/sound/core/info_oss.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/info_oss.c 2004-09-06 16:37:51 -07:00 @@ -134,16 +134,4 @@ return 0; } -#else - -int snd_info_minor_register(void) -{ - return 0; -} - -int snd_info_minor_unregister(void) -{ - return 0; -} - #endif /* CONFIG_SND_OSSEMUL */ diff -Nru a/sound/core/init.c b/sound/core/init.c --- a/sound/core/init.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/init.c 2004-09-06 16:37:51 -07:00 @@ -73,7 +73,7 @@ if (extra_size < 0) extra_size = 0; - card = (snd_card_t *) snd_kcalloc(sizeof(snd_card_t) + extra_size, GFP_KERNEL); + card = kcalloc(1, sizeof(*card) + extra_size, GFP_KERNEL); if (card == NULL) return NULL; if (xid) { @@ -800,6 +800,8 @@ return 0; if (card->power_state == SNDRV_CTL_POWER_D0) return 0; + /* restore the PCI config space */ + pci_restore_state(dev, dev->saved_config_space); /* FIXME: correct state value? */ return card->pm_resume(card, 0); } diff -Nru a/sound/core/ioctl32/ioctl32.c b/sound/core/ioctl32/ioctl32.c --- a/sound/core/ioctl32/ioctl32.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/ioctl32/ioctl32.c 2004-09-06 16:37:51 -07:00 @@ -257,7 +257,7 @@ snd_ctl_elem_info_t info; int err; - ctl = snd_magic_cast(snd_ctl_file_t, file->private_data, return -ENXIO); + ctl = file->private_data; down_read(&ctl->card->controls_rwsem); kctl = snd_ctl_find_id(ctl->card, id); diff -Nru a/sound/core/ioctl32/pcm32.c b/sound/core/ioctl32/pcm32.c --- a/sound/core/ioctl32/pcm32.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/ioctl32/pcm32.c 2004-09-06 16:37:53 -07:00 @@ -69,7 +69,7 @@ unsigned char reserved[64]; } __attribute__((packed)); -#define numberof(array) (sizeof(array)/sizeof(array[0])) +#define numberof(array) ARRAY_SIZE(array) #define CVT_sndrv_pcm_hw_params()\ {\ @@ -235,7 +235,7 @@ /* FIXME: need to check whether fop->ioctl is sane */ - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL && substream->runtime, return -ENXIO); @@ -313,7 +313,7 @@ memset(params, 0, sizeof(*params)); params->flags = oparams->flags; - for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++) + for (i = 0; i < ARRAY_SIZE(oparams->masks); i++) params->masks[i].bits[0] = oparams->masks[i]; memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals)); params->rmask = __OLD_TO_NEW_MASK(oparams->rmask); @@ -331,7 +331,7 @@ memset(oparams, 0, sizeof(*oparams)); oparams->flags = params->flags; - for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++) + for (i = 0; i < ARRAY_SIZE(oparams->masks); i++) oparams->masks[i] = params->masks[i].bits[0]; memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals)); oparams->rmask = __NEW_TO_OLD_MASK(params->rmask); @@ -350,8 +350,8 @@ mm_segment_t oldseg; int err; - data32 = snd_kcalloc(sizeof(*data32), GFP_KERNEL); - data = snd_kcalloc(sizeof(*data), GFP_KERNEL); + data32 = kcalloc(1, sizeof(*data32), GFP_KERNEL); + data = kcalloc(1, sizeof(*data), GFP_KERNEL); if (data32 == NULL || data == NULL) { err = -ENOMEM; goto __end; @@ -379,6 +379,45 @@ return err; } +struct sndrv_pcm_mmap_status32 { + s32 state; + s32 pad1; + u32 hw_ptr; + struct compat_timespec tstamp; + s32 suspended_state; +} __attribute__((packed)); + +struct sndrv_pcm_mmap_control32 { + u32 appl_ptr; + u32 avail_min; +} __attribute__((packed)); + +struct sndrv_pcm_sync_ptr32 { + u32 flags; + union { + struct sndrv_pcm_mmap_status32 status; + unsigned char reserved[64]; + } s; + union { + struct sndrv_pcm_mmap_control32 control; + unsigned char reserved[64]; + } c; +} __attribute__((packed)); + +#define CVT_sndrv_pcm_sync_ptr()\ +{\ + COPY(flags);\ + COPY(s.status.state);\ + COPY(s.status.pad1);\ + COPY(s.status.hw_ptr);\ + COPY(s.status.tstamp.tv_sec);\ + COPY(s.status.tstamp.tv_nsec);\ + COPY(s.status.suspended_state);\ + COPY(c.control.appl_ptr);\ + COPY(c.control.avail_min);\ +} + +DEFINE_ALSA_IOCTL_BIG(pcm_sync_ptr); /* */ @@ -396,6 +435,7 @@ DEFINE_ALSA_IOCTL_ENTRY(pcm_writei, xferi, SNDRV_PCM_IOCTL_WRITEI_FRAMES); DEFINE_ALSA_IOCTL_ENTRY(pcm_readn, xfern, SNDRV_PCM_IOCTL_READN_FRAMES); DEFINE_ALSA_IOCTL_ENTRY(pcm_writen, xfern, SNDRV_PCM_IOCTL_WRITEN_FRAMES); +DEFINE_ALSA_IOCTL_ENTRY(pcm_sync_ptr, pcm_sync_ptr, SNDRV_PCM_IOCTL_SYNC_PTR); /* @@ -416,6 +456,7 @@ SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32), SNDRV_PCM_IOCTL_HW_REFINE_OLD32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old32), SNDRV_PCM_IOCTL_HW_PARAMS_OLD32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old32), + SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr), }; @@ -431,6 +472,8 @@ { SNDRV_PCM_IOCTL_SW_PARAMS32, AP(pcm_sw_params) }, { SNDRV_PCM_IOCTL_STATUS32, AP(pcm_status) }, { SNDRV_PCM_IOCTL_DELAY32, AP(pcm_delay) }, + MAP_COMPAT(SNDRV_PCM_IOCTL_HWSYNC), + { SNDRV_PCM_IOCTL_SYNC_PTR32, AP(pcm_sync_ptr) }, { SNDRV_PCM_IOCTL_CHANNEL_INFO32, AP(pcm_channel_info) }, MAP_COMPAT(SNDRV_PCM_IOCTL_PREPARE), MAP_COMPAT(SNDRV_PCM_IOCTL_RESET), diff -Nru a/sound/core/memalloc.c b/sound/core/memalloc.c --- a/sound/core/memalloc.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/memalloc.c 2004-09-06 16:37:55 -07:00 @@ -45,15 +45,19 @@ #ifndef SNDRV_CARDS #define SNDRV_CARDS 8 #endif + +/* FIXME: so far only some PCI devices have the preallocation table */ +#ifdef CONFIG_PCI static int enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; static int boot_devs; module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable cards to allocate buffers."); +#endif /* */ -void *snd_malloc_sgbuf_pages(const struct snd_dma_device *dev, +void *snd_malloc_sgbuf_pages(struct device *device, size_t size, struct snd_dma_buffer *dmab, size_t *res_size); int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab); @@ -66,9 +70,8 @@ /* buffer preservation list */ struct snd_mem_list { - struct snd_dma_device dev; struct snd_dma_buffer buffer; - int used; + unsigned int id; struct list_head list; }; @@ -148,6 +151,10 @@ #endif /* arch */ +#if ! defined(__arm__) +#define NEED_RESERVE_PAGES +#endif + /* * * Generic memory allocators @@ -156,22 +163,28 @@ static long snd_allocated_pages; /* holding the number of allocated pages */ -static void mark_pages(void *res, int order) +static inline void inc_snd_pages(int order) +{ + snd_allocated_pages += 1 << order; +} + +static inline void dec_snd_pages(int order) +{ + snd_allocated_pages -= 1 << order; +} + +static void mark_pages(struct page *page, int order) { - struct page *page = virt_to_page(res); struct page *last_page = page + (1 << order); while (page < last_page) SetPageReserved(page++); - snd_allocated_pages += 1 << order; } -static void unmark_pages(void *res, int order) +static void unmark_pages(struct page *page, int order) { - struct page *page = virt_to_page(res); struct page *last_page = page + (1 << order); while (page < last_page) ClearPageReserved(page++); - snd_allocated_pages -= 1 << order; } /** @@ -190,43 +203,15 @@ snd_assert(size > 0, return NULL); snd_assert(gfp_flags != 0, return NULL); - for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++); + pg = get_order(size); if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) { - mark_pages(res, pg); + mark_pages(virt_to_page(res), pg); + inc_snd_pages(pg); } return res; } /** - * snd_malloc_pages_fallback - allocate pages with the given size with fallback - * @size: the requested size to allocate in bytes - * @gfp_flags: the allocation conditions, GFP_XXX - * @res_size: the pointer to store the size of buffer actually allocated - * - * Allocates the physically contiguous pages with the given request - * size. When no space is left, this function reduces the size and - * tries to allocate again. The size actually allocated is stored in - * res_size argument. - * - * Returns the pointer of the buffer, or NULL if no enoguh memory. - */ -void *snd_malloc_pages_fallback(size_t size, unsigned int gfp_flags, size_t *res_size) -{ - void *res; - - snd_assert(size > 0, return NULL); - snd_assert(res_size != NULL, return NULL); - do { - if ((res = snd_malloc_pages(size, gfp_flags)) != NULL) { - *res_size = size; - return res; - } - size >>= 1; - } while (size >= PAGE_SIZE); - return NULL; -} - -/** * snd_free_pages - release the pages * @ptr: the buffer pointer to release * @size: the allocated buffer size @@ -239,8 +224,9 @@ if (ptr == NULL) return; - for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++); - unmark_pages(ptr, pg); + pg = get_order(size); + dec_snd_pages(pg); + unmark_pages(virt_to_page(ptr), pg); free_pages((unsigned long) ptr, pg); } @@ -250,6 +236,7 @@ * */ +/* allocate the coherent DMA pages */ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *dma) { int pg; @@ -263,28 +250,17 @@ if (pg > 0) gfp_flags |= __GFP_NOWARN; res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags); - if (res != NULL) - mark_pages(res, pg); + if (res != NULL) { +#ifdef NEED_RESERVE_PAGES + mark_pages(virt_to_page(res), pg); /* should be dma_to_page() */ +#endif + inc_snd_pages(pg); + } return res; } -static void *snd_malloc_dev_pages_fallback(struct device *dev, size_t size, - dma_addr_t *dma, size_t *res_size) -{ - void *res; - - snd_assert(res_size != NULL, return NULL); - do { - if ((res = snd_malloc_dev_pages(dev, size, dma)) != NULL) { - *res_size = size; - return res; - } - size >>= 1; - } while (size >= PAGE_SIZE); - return NULL; -} - +/* free the coherent DMA pages */ static void snd_free_dev_pages(struct device *dev, size_t size, void *ptr, dma_addr_t dma) { @@ -293,7 +269,10 @@ if (ptr == NULL) return; pg = get_order(size); - unmark_pages(ptr, pg); + dec_snd_pages(pg); +#ifdef NEED_RESERVE_PAGES + unmark_pages(virt_to_page(ptr), pg); /* should be dma_to_page() */ +#endif dma_free_coherent(dev, PAGE_SIZE << pg, ptr, dma); } @@ -308,30 +287,13 @@ snd_assert(size > 0, return NULL); snd_assert(dma_addr != NULL, return NULL); - for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++); + pg = get_order(size); res = sbus_alloc_consistent(sdev, PAGE_SIZE * (1 << pg), dma_addr); - if (res != NULL) { - mark_pages(res, pg); - } + if (res != NULL) + inc_snd_pages(pg); return res; } -static void *snd_malloc_sbus_pages_fallback(struct device *dev, size_t size, - dma_addr_t *dma_addr, size_t *res_size) -{ - void *res; - - snd_assert(res_size != NULL, return NULL); - do { - if ((res = snd_malloc_sbus_pages(dev, size, dma_addr)) != NULL) { - *res_size = size; - return res; - } - size >>= 1; - } while (size >= PAGE_SIZE); - return NULL; -} - static void snd_free_sbus_pages(struct device *dev, size_t size, void *ptr, dma_addr_t dma_addr) { @@ -340,8 +302,8 @@ if (ptr == NULL) return; - for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++); - unmark_pages(ptr, pg); + pg = get_order(size); + dec_snd_pages(pg); sbus_free_consistent(sdev, PAGE_SIZE * (1 << pg), ptr, dma_addr); } @@ -354,24 +316,10 @@ */ -/* - * compare the two devices - * returns non-zero if matched. - */ -static int compare_device(const struct snd_dma_device *a, const struct snd_dma_device *b, int allow_unused) -{ - if (a->type != b->type) - return 0; - if (a->id != b->id) { - if (! allow_unused || (a->id != SNDRV_DMA_DEVICE_UNUSED && b->id != SNDRV_DMA_DEVICE_UNUSED)) - return 0; - } - return a->dev == b->dev; -} - /** * snd_dma_alloc_pages - allocate the buffer area according to the given type - * @dev: the buffer device info + * @type: the DMA buffer type + * @device: the device pointer * @size: the buffer size to allocate * @dmab: buffer allocation record to store the allocated data * @@ -381,32 +329,33 @@ * Returns zero if the buffer with the given size is allocated successfuly, * other a negative value at error. */ -int snd_dma_alloc_pages(const struct snd_dma_device *dev, size_t size, +int snd_dma_alloc_pages(int type, struct device *device, size_t size, struct snd_dma_buffer *dmab) { - snd_assert(dev != NULL, return -ENXIO); snd_assert(size > 0, return -ENXIO); snd_assert(dmab != NULL, return -ENXIO); + dmab->dev.type = type; + dmab->dev.dev = device; dmab->bytes = 0; - switch (dev->type) { + switch (type) { case SNDRV_DMA_TYPE_CONTINUOUS: - dmab->area = snd_malloc_pages(size, (unsigned long)dev->dev); + dmab->area = snd_malloc_pages(size, (unsigned long)device); dmab->addr = 0; break; #ifdef CONFIG_SBUS case SNDRV_DMA_TYPE_SBUS: - dmab->area = snd_malloc_sbus_pages(dev->dev, size, &dmab->addr); + dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr); break; #endif case SNDRV_DMA_TYPE_DEV: - dmab->area = snd_malloc_dev_pages(dev->dev, size, &dmab->addr); + dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr); break; case SNDRV_DMA_TYPE_DEV_SG: - snd_malloc_sgbuf_pages(dev, size, dmab, NULL); + snd_malloc_sgbuf_pages(device, size, dmab, NULL); break; default: - printk(KERN_ERR "snd-malloc: invalid device type %d\n", dev->type); + printk(KERN_ERR "snd-malloc: invalid device type %d\n", type); dmab->area = NULL; dmab->addr = 0; return -ENXIO; @@ -419,7 +368,8 @@ /** * snd_dma_alloc_pages_fallback - allocate the buffer area according to the given type with fallback - * @dev: the buffer device info + * @type: the DMA buffer type + * @device: the device pointer * @size: the buffer size to allocate * @dmab: buffer allocation record to store the allocated data * @@ -431,35 +381,20 @@ * Returns zero if the buffer with the given size is allocated successfuly, * other a negative value at error. */ -int snd_dma_alloc_pages_fallback(const struct snd_dma_device *dev, size_t size, +int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size, struct snd_dma_buffer *dmab) { - snd_assert(dev != NULL, return -ENXIO); + int err; + snd_assert(size > 0, return -ENXIO); snd_assert(dmab != NULL, return -ENXIO); - dmab->bytes = 0; - switch (dev->type) { - case SNDRV_DMA_TYPE_CONTINUOUS: - dmab->area = snd_malloc_pages_fallback(size, (unsigned long)dev->dev, &dmab->bytes); - dmab->addr = 0; - break; -#ifdef CONFIG_SBUS - case SNDRV_DMA_TYPE_SBUS: - dmab->area = snd_malloc_sbus_pages_fallback(dev->dev, size, &dmab->addr, &dmab->bytes); - break; -#endif - case SNDRV_DMA_TYPE_DEV: - dmab->area = snd_malloc_dev_pages_fallback(dev->dev, size, &dmab->addr, &dmab->bytes); - break; - case SNDRV_DMA_TYPE_DEV_SG: - snd_malloc_sgbuf_pages(dev, size, dmab, &dmab->bytes); - break; - default: - printk(KERN_ERR "snd-malloc: invalid device type %d\n", dev->type); - dmab->area = NULL; - dmab->addr = 0; - return -ENXIO; + while ((err = snd_dma_alloc_pages(type, device, size, dmab)) < 0) { + if (err != -ENOMEM) + return err; + size >>= 1; + if (size <= PAGE_SIZE) + return -ENOMEM; } if (! dmab->area) return -ENOMEM; @@ -469,152 +404,87 @@ /** * snd_dma_free_pages - release the allocated buffer - * @dev: the buffer device info - * @dmbab: the buffer allocation record to release + * @dmab: the buffer allocation record to release * * Releases the allocated buffer via snd_dma_alloc_pages(). */ -void snd_dma_free_pages(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab) +void snd_dma_free_pages(struct snd_dma_buffer *dmab) { - switch (dev->type) { + switch (dmab->dev.type) { case SNDRV_DMA_TYPE_CONTINUOUS: snd_free_pages(dmab->area, dmab->bytes); break; #ifdef CONFIG_SBUS case SNDRV_DMA_TYPE_SBUS: - snd_free_sbus_pages(dev->dev, dmab->bytes, dmab->area, dmab->addr); + snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); break; #endif case SNDRV_DMA_TYPE_DEV: - snd_free_dev_pages(dev->dev, dmab->bytes, dmab->area, dmab->addr); + snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); break; case SNDRV_DMA_TYPE_DEV_SG: snd_free_sgbuf_pages(dmab); break; default: - printk(KERN_ERR "snd-malloc: invalid device type %d\n", dev->type); + printk(KERN_ERR "snd-malloc: invalid device type %d\n", dmab->dev.type); } } -/* - * search for the device - */ -static struct snd_mem_list *mem_list_find(const struct snd_dma_device *dev, int search_empty) -{ - struct list_head *p; - struct snd_mem_list *mem; - - list_for_each(p, &mem_list_head) { - mem = list_entry(p, struct snd_mem_list, list); - if (mem->used && search_empty) - continue; - if (compare_device(&mem->dev, dev, search_empty)) - return mem; - } - return NULL; -} - /** * snd_dma_get_reserved - get the reserved buffer for the given device - * @dev: the buffer device info * @dmab: the buffer allocation record to store + * @id: the buffer id * * Looks for the reserved-buffer list and re-uses if the same buffer - * is found in the list. When the buffer is found, it's marked as used. - * For unmarking the buffer, call snd_dma_free_reserved(). + * is found in the list. When the buffer is found, it's removed from the free list. * * Returns the size of buffer if the buffer is found, or zero if not found. */ -size_t snd_dma_get_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab) +size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id) { + struct list_head *p; struct snd_mem_list *mem; - snd_assert(dev && dmab, return 0); + snd_assert(dmab, return 0); down(&list_mutex); - mem = mem_list_find(dev, 1); - if (mem) { - mem->used = 1; - mem->dev = *dev; - *dmab = mem->buffer; - up(&list_mutex); - return dmab->bytes; + list_for_each(p, &mem_list_head) { + mem = list_entry(p, struct snd_mem_list, list); + if (mem->id == id && + ! memcmp(&mem->buffer.dev, &dmab->dev, sizeof(dmab->dev))) { + list_del(p); + *dmab = mem->buffer; + kfree(mem); + up(&list_mutex); + return dmab->bytes; + } } up(&list_mutex); return 0; } /** - * snd_dma_free_reserved - unmark the reserved buffer - * @dev: the buffer device info - * - * Looks for the matching reserved buffer and erases the mark on it - * if found. - * - * Returns zero. - */ -int snd_dma_free_reserved(const struct snd_dma_device *dev) -{ - struct snd_mem_list *mem; - - snd_assert(dev, return -EINVAL); - down(&list_mutex); - mem = mem_list_find(dev, 0); - if (mem) - mem->used = 0; - up(&list_mutex); - return 0; -} - -/** - * snd_dma_set_reserved - reserve the buffer - * @dev: the buffer device info + * snd_dma_reserve_buf - reserve the buffer * @dmab: the buffer to reserve + * @id: the buffer id * * Reserves the given buffer as a reserved buffer. - * When an old reserved buffer already exists, the old one is released - * and replaced with the new one. - * - * When NULL buffer pointer or zero buffer size is given, the existing - * buffer is released and the entry is removed. * * Returns zero if successful, or a negative code at error. */ -int snd_dma_set_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab) +int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id) { struct snd_mem_list *mem; - snd_assert(dev, return -EINVAL); + snd_assert(dmab, return -EINVAL); + mem = kmalloc(sizeof(*mem), GFP_KERNEL); + if (! mem) + return -ENOMEM; down(&list_mutex); - mem = mem_list_find(dev, 0); - if (mem) { - if (mem->used) - printk(KERN_WARNING "snd-page-alloc: releasing the used block (type=%d, id=0x%x\n", mem->dev.type, mem->dev.id); - snd_dma_free_pages(dev, &mem->buffer); - if (! dmab || ! dmab->bytes) { - /* remove the entry */ - list_del(&mem->list); - kfree(mem); - up(&list_mutex); - return 0; - } - } else { - if (! dmab || ! dmab->bytes) { - up(&list_mutex); - return 0; - } - mem = kmalloc(sizeof(*mem), GFP_KERNEL); - if (! mem) { - up(&list_mutex); - return -ENOMEM; - } - mem->dev = *dev; - list_add_tail(&mem->list, &mem_list_head); - } - /* store the entry */ - mem->used = 1; mem->buffer = *dmab; + mem->id = id; + list_add_tail(&mem->list, &mem_list_head); up(&list_mutex); return 0; } @@ -632,7 +502,7 @@ p = mem_list_head.next; mem = list_entry(p, struct snd_mem_list, list); list_del(p); - snd_dma_free_pages(&mem->dev, &mem->buffer); + snd_dma_free_pages(&mem->buffer); kfree(mem); } up(&list_mutex); @@ -654,7 +524,7 @@ unsigned int buffers; }; -#define HAMMERFALL_BUFFER_SIZE (16*1024*4*(26+1)) +#define HAMMERFALL_BUFFER_SIZE (16*1024*4*(26+1)+0x10000) static struct prealloc_dev prealloc_devices[] __initdata = { { @@ -676,17 +546,6 @@ { }, /* terminator */ }; -/* - * compose a snd_dma_device struct for the PCI device - */ -static inline void snd_dma_device_pci(struct snd_dma_device *dev, struct pci_dev *pci, unsigned int id) -{ - memset(dev, 0, sizeof(*dev)); - dev->type = SNDRV_DMA_TYPE_DEV; - dev->dev = snd_dma_pci_data(pci); - dev->id = id; -} - static void __init preallocate_cards(void) { struct pci_dev *pci = NULL; @@ -716,22 +575,13 @@ continue; } for (i = 0; i < dev->buffers; i++) { - struct snd_mem_list *mem; - mem = kmalloc(sizeof(*mem), GFP_KERNEL); - if (! mem) { - printk(KERN_WARNING "snd-page-alloc: can't malloc memlist\n"); - break; - } - memset(mem, 0, sizeof(*mem)); - snd_dma_device_pci(&mem->dev, pci, SNDRV_DMA_DEVICE_UNUSED); - if (snd_dma_alloc_pages(&mem->dev, dev->size, &mem->buffer) < 0) { + struct snd_dma_buffer dmab; + memset(&dmab, 0, sizeof(dmab)); + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + dev->size, &dmab) < 0) printk(KERN_WARNING "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", dev->size); - kfree(mem); - } else { - down(&list_mutex); - list_add_tail(&mem->list, &mem_list_head); - up(&list_mutex); - } + else + snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci)); } } } @@ -752,48 +602,22 @@ struct list_head *p; struct snd_mem_list *mem; int devno; + static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" }; down(&list_mutex); - len += sprintf(page + len, "pages : %li bytes (%li pages per %likB)\n", - pages * PAGE_SIZE, pages, PAGE_SIZE / 1024); + len += snprintf(page + len, count - len, + "pages : %li bytes (%li pages per %likB)\n", + pages * PAGE_SIZE, pages, PAGE_SIZE / 1024); devno = 0; list_for_each(p, &mem_list_head) { mem = list_entry(p, struct snd_mem_list, list); devno++; - len += sprintf(page + len, "buffer %d : ", devno); - if (mem->dev.id == SNDRV_DMA_DEVICE_UNUSED) - len += sprintf(page + len, "UNUSED"); - else - len += sprintf(page + len, "ID %08x", mem->dev.id); - len += sprintf(page + len, " : type "); - switch (mem->dev.type) { - case SNDRV_DMA_TYPE_CONTINUOUS: - len += sprintf(page + len, "CONT [%p]", mem->dev.dev); - break; -#ifdef CONFIG_SBUS - case SNDRV_DMA_TYPE_SBUS: - { - struct sbus_dev *sdev = (struct sbus_dev *)(mem->dev.dev); - len += sprintf(page + len, "SBUS [%x]", sdev->slot); - } - break; -#endif - case SNDRV_DMA_TYPE_DEV: - case SNDRV_DMA_TYPE_DEV_SG: - if (mem->dev.dev) { - len += sprintf(page + len, "%s [%s]", - mem->dev.type == SNDRV_DMA_TYPE_DEV_SG ? "DEV-SG" : "DEV", - mem->dev.dev->bus_id); - } else - len += sprintf(page + len, "ISA"); - break; - default: - len += sprintf(page + len, "UNKNOWN"); - break; - } - len += sprintf(page + len, "\n addr = 0x%lx, size = %d bytes, used = %s\n", - (unsigned long)mem->buffer.addr, (int)mem->buffer.bytes, - mem->used ? "yes" : "no"); + len += snprintf(page + len, count - len, + "buffer %d : ID %08x : type %s\n", + devno, mem->id, types[mem->buffer.dev.type]); + len += snprintf(page + len, count - len, + " addr = 0x%lx, size = %d bytes\n", + (unsigned long)mem->buffer.addr, (int)mem->buffer.bytes); } up(&list_mutex); return len; @@ -833,10 +657,8 @@ EXPORT_SYMBOL(snd_dma_alloc_pages_fallback); EXPORT_SYMBOL(snd_dma_free_pages); -EXPORT_SYMBOL(snd_dma_get_reserved); -EXPORT_SYMBOL(snd_dma_free_reserved); -EXPORT_SYMBOL(snd_dma_set_reserved); +EXPORT_SYMBOL(snd_dma_get_reserved_buf); +EXPORT_SYMBOL(snd_dma_reserve_buf); EXPORT_SYMBOL(snd_malloc_pages); -EXPORT_SYMBOL(snd_malloc_pages_fallback); EXPORT_SYMBOL(snd_free_pages); diff -Nru a/sound/core/memory.c b/sound/core/memory.c --- a/sound/core/memory.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/memory.c 2004-09-06 16:37:50 -07:00 @@ -71,8 +71,7 @@ snd_printk(KERN_ERR "Not freed snd_alloc_kmalloc = %li\n", snd_alloc_kmalloc); if (snd_alloc_vmalloc > 0) snd_printk(KERN_ERR "Not freed snd_alloc_vmalloc = %li\n", snd_alloc_vmalloc); - for (head = snd_alloc_kmalloc_list.prev; - head != &snd_alloc_kmalloc_list; head = head->prev) { + list_for_each_prev(head, &snd_alloc_kmalloc_list) { t = list_entry(head, struct snd_alloc_track, list); if (t->magic != KMALLOC_MAGIC) { snd_printk(KERN_ERR "Corrupted kmalloc\n"); @@ -80,8 +79,7 @@ } snd_printk(KERN_ERR "kmalloc(%ld) from %p not freed\n", (long) t->size, t->caller); } - for (head = snd_alloc_vmalloc_list.prev; - head != &snd_alloc_vmalloc_list; head = head->prev) { + list_for_each_prev(head, &snd_alloc_vmalloc_list) { t = list_entry(head, struct snd_alloc_track, list); if (t->magic != VMALLOC_MAGIC) { snd_printk(KERN_ERR "Corrupted vmalloc\n"); @@ -118,6 +116,17 @@ return _snd_kmalloc(size, flags); } +void *snd_hidden_kcalloc(size_t n, size_t size, int flags) +{ + void *ret = NULL; + if (n != 0 && size > INT_MAX / n) + return ret; + ret = _snd_kmalloc(n * size, flags); + if (ret) + memset(ret, 0, n * size); + return ret; +} + void snd_hidden_kfree(const void *obj) { unsigned long flags; @@ -140,46 +149,6 @@ snd_wrapper_kfree(obj); } -void *_snd_magic_kcalloc(unsigned long magic, size_t size, int flags) -{ - unsigned long *ptr; - ptr = _snd_kmalloc(size + sizeof(unsigned long), flags); - if (ptr) { - *ptr++ = magic; - memset(ptr, 0, size); - } - return ptr; -} - -void *_snd_magic_kmalloc(unsigned long magic, size_t size, int flags) -{ - unsigned long *ptr; - ptr = _snd_kmalloc(size + sizeof(unsigned long), flags); - if (ptr) - *ptr++ = magic; - return ptr; -} - -void snd_magic_kfree(void *_ptr) -{ - unsigned long *ptr = _ptr; - if (ptr == NULL) { - snd_printk(KERN_WARNING "null snd_magic_kfree (called from %p)\n", __builtin_return_address(0)); - return; - } - *--ptr = 0; - { - struct snd_alloc_track *t; - t = snd_alloc_track_entry(ptr); - if (t->magic != KMALLOC_MAGIC) { - snd_printk(KERN_ERR "bad snd_magic_kfree (called from %p)\n", __builtin_return_address(0)); - return; - } - } - snd_hidden_kfree(ptr); - return; -} - void *snd_hidden_vmalloc(unsigned long size) { void *ptr; @@ -254,25 +223,6 @@ #define _snd_kmalloc kmalloc #endif /* CONFIG_SND_DEBUG_MEMORY */ - -/** - * snd_kcalloc - memory allocation and zero-clear - * @size: the size to allocate in bytes - * @flags: allocation conditions, GFP_XXX - * - * Allocates a memory chunk via kmalloc() and initializes it to zero. - * - * Returns the pointer, or NULL if no enoguh memory. - */ -void *snd_kcalloc(size_t size, int flags) -{ - void *ptr; - - ptr = _snd_kmalloc(size, flags); - if (ptr) - memset(ptr, 0, size); - return ptr; -} /** * snd_kmalloc_strdup - copy the string diff -Nru a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c --- a/sound/core/oss/mixer_oss.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/oss/mixer_oss.c 2004-09-06 16:37:53 -07:00 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -51,7 +52,7 @@ err = snd_card_file_add(card, file); if (err < 0) return err; - fmixer = (snd_mixer_oss_file_t *)snd_kcalloc(sizeof(*fmixer), GFP_KERNEL); + fmixer = kcalloc(1, sizeof(*fmixer), GFP_KERNEL); if (fmixer == NULL) { snd_card_file_remove(card, file); return -ENOMEM; @@ -358,10 +359,16 @@ return -ENXIO; } +/* FIXME: need to unlock BKL to allow preemption */ int snd_mixer_oss_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - return snd_mixer_oss_ioctl1((snd_mixer_oss_file_t *) file->private_data, cmd, arg); + int err; + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_mixer_oss_ioctl1((snd_mixer_oss_file_t *) file->private_data, cmd, arg); + lock_kernel(); + return err; } int snd_mixer_oss_ioctl_card(snd_card_t *card, unsigned int cmd, unsigned long arg) @@ -508,8 +515,8 @@ up_read(&card->controls_rwsem); return; } - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -544,8 +551,8 @@ up_read(&card->controls_rwsem); return; } - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -607,8 +614,8 @@ down_read(&card->controls_rwsem); if ((kctl = snd_ctl_find_numid(card, numid)) == NULL) return; - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -646,8 +653,8 @@ up_read(&fmixer->card->controls_rwsem); return; } - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) goto __unalloc; snd_runtime_check(!kctl->info(kctl, uinfo), goto __unalloc); @@ -767,8 +774,8 @@ snd_ctl_elem_value_t *uctl; int err, idx; - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) { err = -ENOMEM; goto __unlock; @@ -814,8 +821,8 @@ int err; unsigned int idx; - uinfo = snd_kcalloc(sizeof(*uinfo), GFP_KERNEL); - uctl = snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uinfo = kcalloc(1, sizeof(*uinfo), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (uinfo == NULL || uctl == NULL) { err = -ENOMEM; goto __unlock; @@ -968,8 +975,10 @@ snd_ctl_elem_info_t uinfo; memset(&uinfo, 0, sizeof(uinfo)); - if (kctl->info(kctl, &uinfo)) + if (kctl->info(kctl, &uinfo)) { + up_read(&mixer->card->controls_rwsem); return 0; + } strcpy(str, ptr->name); if (!strcmp(str, "Master")) strcpy(str, "Mix"); @@ -1060,7 +1069,7 @@ static void snd_mixer_oss_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_mixer_oss_t *mixer = snd_magic_cast(snd_mixer_oss_t, entry->private_data, return); + snd_mixer_oss_t *mixer = entry->private_data; int i; down(&mixer->reg_mutex); @@ -1084,7 +1093,7 @@ static void snd_mixer_oss_proc_write(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_mixer_oss_t *mixer = snd_magic_cast(snd_mixer_oss_t, entry->private_data, return); + snd_mixer_oss_t *mixer = entry->private_data; char line[128], str[32], idxstr[16], *cptr; int ch, idx; struct snd_mixer_oss_assign_table *tbl; @@ -1210,7 +1219,7 @@ }; unsigned int idx; - for (idx = 0; idx < sizeof(table) / sizeof(struct snd_mixer_oss_assign_table); idx++) + for (idx = 0; idx < ARRAY_SIZE(table); idx++) snd_mixer_oss_build_input(mixer, &table[idx], 0, 0); if (mixer->mask_recsrc) { mixer->get_recsrc = snd_mixer_oss_get_recsrc2; @@ -1224,7 +1233,7 @@ static int snd_mixer_oss_free1(void *private) { - snd_mixer_oss_t *mixer = snd_magic_cast(snd_mixer_oss_t, private, return -ENXIO); + snd_mixer_oss_t *mixer = private; snd_card_t * card; int idx; @@ -1237,7 +1246,7 @@ if (chn->private_free) chn->private_free(chn); } - snd_magic_kfree(mixer); + kfree(mixer); return 0; } @@ -1249,7 +1258,7 @@ char name[128]; int idx, err; - mixer = snd_magic_kcalloc(snd_mixer_oss_t, sizeof(snd_mixer_oss_t), GFP_KERNEL); + mixer = kcalloc(2, sizeof(*mixer), GFP_KERNEL); if (mixer == NULL) return -ENOMEM; init_MUTEX(&mixer->reg_mutex); @@ -1259,7 +1268,7 @@ &snd_mixer_oss_reg, name)) < 0) { snd_printk("unable to register OSS mixer device %i:%i\n", card->number, 0); - snd_magic_kfree(mixer); + kfree(mixer); return err; } mixer->oss_dev_alloc = 1; diff -Nru a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c --- a/sound/core/oss/pcm_oss.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/oss/pcm_oss.c 2004-09-06 16:37:54 -07:00 @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -53,13 +54,10 @@ MODULE_LICENSE("GPL"); module_param_array(dsp_map, int, boot_devs, 0444); MODULE_PARM_DESC(dsp_map, "PCM device number assigned to 1st OSS device."); -MODULE_PARM_SYNTAX(dsp_map, "default:0,skill:advanced"); module_param_array(adsp_map, int, boot_devs, 0444); MODULE_PARM_DESC(adsp_map, "PCM device number assigned to 2nd OSS device."); -MODULE_PARM_SYNTAX(adsp_map, "default:1,skill:advanced"); module_param(nonblock_open, bool, 0644); MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices."); -MODULE_PARM_SYNTAX(nonblock_open, "default:0,skill:advanced"); MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM); MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM1); @@ -1177,10 +1175,11 @@ snd_pcm_substream_t *substream; int err; int direct; - snd_pcm_hw_params_t params; + snd_pcm_hw_params_t *params; unsigned int formats = 0; snd_mask_t format_mask; int fmt; + if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0) return err; if (atomic_read(&substream->runtime->mmap_count)) { @@ -1194,10 +1193,14 @@ AFMT_S16_LE | AFMT_S16_BE | AFMT_S8 | AFMT_U16_LE | AFMT_U16_BE; - _snd_pcm_hw_params_any(¶ms); - err = snd_pcm_hw_refine(substream, ¶ms); + params = kmalloc(sizeof(*params), GFP_KERNEL); + if (!params) + return -ENOMEM; + _snd_pcm_hw_params_any(params); + err = snd_pcm_hw_refine(substream, params); + format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); + kfree(params); snd_assert(err >= 0, return err); - format_mask = *hw_param_mask(¶ms, SNDRV_PCM_HW_PARAM_FORMAT); for (fmt = 0; fmt < 32; ++fmt) { if (snd_mask_test(&format_mask, fmt)) { int f = snd_pcm_oss_format_to(fmt); @@ -1693,7 +1696,7 @@ snd_pcm_oss_release_substream(substream); snd_pcm_release_substream(substream); } - snd_magic_kfree(pcm_oss_file); + kfree(pcm_oss_file); return 0; } @@ -1712,7 +1715,7 @@ snd_assert(rpcm_oss_file != NULL, return -EINVAL); *rpcm_oss_file = NULL; - pcm_oss_file = snd_magic_kcalloc(snd_pcm_oss_file_t, 0, GFP_KERNEL); + pcm_oss_file = kcalloc(1, sizeof(*pcm_oss_file), GFP_KERNEL); if (pcm_oss_file == NULL) return -ENOMEM; @@ -1892,7 +1895,7 @@ snd_pcm_substream_t *substream; snd_pcm_oss_file_t *pcm_oss_file; - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO); + pcm_oss_file = file->private_data; substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream == NULL) substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; @@ -1908,14 +1911,14 @@ return 0; } -static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static inline int _snd_pcm_oss_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { snd_pcm_oss_file_t *pcm_oss_file; int __user *p = (int __user *)arg; int res; - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO); + pcm_oss_file = file->private_data; if (cmd == OSS_GETVERSION) return put_user(SNDRV_OSS_VERSION, p); if (cmd == OSS_ALSAEMULVER) @@ -2068,12 +2071,23 @@ return -EINVAL; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_pcm_oss_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_pcm_oss_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t count, loff_t *offset) { snd_pcm_oss_file_t *pcm_oss_file; snd_pcm_substream_t *substream; - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO); + pcm_oss_file = file->private_data; substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; if (substream == NULL) return -ENXIO; @@ -2094,7 +2108,7 @@ snd_pcm_substream_t *substream; long result; - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO); + pcm_oss_file = file->private_data; substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream == NULL) return -ENXIO; @@ -2131,7 +2145,7 @@ unsigned int mask; snd_pcm_substream_t *psubstream = NULL, *csubstream = NULL; - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return 0); + pcm_oss_file = file->private_data; psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; csubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; @@ -2178,7 +2192,7 @@ #ifdef OSS_DEBUG printk("pcm_oss: mmap begin\n"); #endif - pcm_oss_file = snd_magic_cast(snd_pcm_oss_file_t, file->private_data, return -ENXIO); + pcm_oss_file = file->private_data; switch ((area->vm_flags & (VM_READ | VM_WRITE))) { case VM_READ | VM_WRITE: substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; @@ -2280,7 +2294,7 @@ snd_info_buffer_t * buffer) { snd_pcm_str_t *pstr = (snd_pcm_str_t *)entry->private_data; - char line[512], str[32], task_name[32], *ptr; + char line[256], str[32], task_name[32], *ptr; int idx1; snd_pcm_oss_setup_t *setup, *setup1, template; diff -Nru a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c --- a/sound/core/oss/pcm_plugin.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/oss/pcm_plugin.c 2004-09-06 16:37:51 -07:00 @@ -172,7 +172,7 @@ snd_assert(plug != NULL, return -ENXIO); snd_assert(src_format != NULL && dst_format != NULL, return -ENXIO); - plugin = (snd_pcm_plugin_t *)snd_kcalloc(sizeof(*plugin) + extra, GFP_KERNEL); + plugin = kcalloc(1, sizeof(*plugin) + extra, GFP_KERNEL); if (plugin == NULL) return -ENOMEM; plugin->name = name; @@ -189,7 +189,7 @@ channels = src_format->channels; else channels = dst_format->channels; - plugin->buf_channels = snd_kcalloc(channels * sizeof(*plugin->buf_channels), GFP_KERNEL); + plugin->buf_channels = kcalloc(channels, sizeof(*plugin->buf_channels), GFP_KERNEL); if (plugin->buf_channels == NULL) { snd_pcm_plugin_free(plugin); return -ENOMEM; @@ -370,7 +370,7 @@ unsigned int i; switch (format) { case SNDRV_PCM_FORMAT_MU_LAW: - for (i = 0; i < sizeof(preferred_formats) / sizeof(preferred_formats[0]); ++i) { + for (i = 0; i < ARRAY_SIZE(preferred_formats); ++i) { int format1 = preferred_formats[i]; if (snd_mask_test(format_mask, format1)) return format1; @@ -468,7 +468,7 @@ if (srcformat.channels > dstformat.channels) { int sv = srcformat.channels; int dv = dstformat.channels; - route_ttable_entry_t *ttable = snd_kcalloc(dv*sv*sizeof(*ttable), GFP_KERNEL); + route_ttable_entry_t *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL); if (ttable == NULL) return -ENOMEM; #if 1 @@ -531,7 +531,7 @@ if (srcformat.channels < dstformat.channels) { int sv = srcformat.channels; int dv = dstformat.channels; - route_ttable_entry_t *ttable = snd_kcalloc(dv * sv * sizeof(*ttable), GFP_KERNEL); + route_ttable_entry_t *ttable = kcalloc(dv * sv, sizeof(*ttable), GFP_KERNEL); if (ttable == NULL) return -ENOMEM; #if 0 @@ -846,41 +846,31 @@ size_t samples, int format) { /* FIXME: sub byte resolution and odd dst_offset */ - char *dst; + unsigned char *dst; unsigned int dst_step; int width; - u_int64_t silence; + const unsigned char *silence; if (!dst_area->addr) return 0; dst = dst_area->addr + (dst_area->first + dst_area->step * dst_offset) / 8; width = snd_pcm_format_physical_width(format); + if (width <= 0) + return -EINVAL; + if (dst_area->step == (unsigned int) width && width >= 8) + return snd_pcm_format_set_silence(format, dst, samples); silence = snd_pcm_format_silence_64(format); - if (dst_area->step == (unsigned int) width) { - size_t dwords = samples * width / 64; - u_int64_t *dst64 = (u_int64_t *)dst; - - samples -= dwords * 64 / width; - while (dwords-- > 0) - *dst64++ = silence; - if (samples == 0) - return 0; - dst = (char *)dst64; - } + if (! silence) + return -EINVAL; dst_step = dst_area->step / 8; - switch (width) { - case 4: { - u_int8_t s0 = silence & 0xf0; - u_int8_t s1 = silence & 0x0f; + if (width == 4) { + /* Ima ADPCM */ int dstbit = dst_area->first % 8; int dstbit_step = dst_area->step % 8; while (samples-- > 0) { - if (dstbit) { + if (dstbit) *dst &= 0xf0; - *dst |= s1; - } else { + else *dst &= 0x0f; - *dst |= s0; - } dst += dst_step; dstbit += dstbit_step; if (dstbit == 8) { @@ -888,41 +878,12 @@ dstbit = 0; } } - break; - } - case 8: { - u_int8_t sil = silence; - while (samples-- > 0) { - *dst = sil; - dst += dst_step; - } - break; - } - case 16: { - u_int16_t sil = silence; - while (samples-- > 0) { - *(u_int16_t*)dst = sil; - dst += dst_step; - } - break; - } - case 32: { - u_int32_t sil = silence; - while (samples-- > 0) { - *(u_int32_t*)dst = sil; - dst += dst_step; - } - break; - } - case 64: { + } else { + width /= 8; while (samples-- > 0) { - *(u_int64_t*)dst = silence; + memcpy(dst, silence, width); dst += dst_step; } - break; - } - default: - snd_BUG(); } return 0; } @@ -942,18 +903,18 @@ if (!dst_area->addr) return 0; width = snd_pcm_format_physical_width(format); + if (width <= 0) + return -EINVAL; if (src_area->step == (unsigned int) width && - dst_area->step == (unsigned int) width) { + dst_area->step == (unsigned int) width && width >= 8) { size_t bytes = samples * width / 8; - samples -= bytes * 8 / width; memcpy(dst, src, bytes); - if (samples == 0) - return 0; + return 0; } src_step = src_area->step / 8; dst_step = dst_area->step / 8; - switch (width) { - case 4: { + if (width == 4) { + /* Ima ADPCM */ int srcbit = src_area->first % 8; int srcbit_step = src_area->step % 8; int dstbit = dst_area->first % 8; @@ -963,12 +924,11 @@ if (srcbit) srcval = *src & 0x0f; else - srcval = *src & 0xf0; + srcval = (*src & 0xf0) >> 4; if (dstbit) - *dst &= 0xf0; + *dst = (*dst & 0xf0) | srcval; else - *dst &= 0x0f; - *dst |= srcval; + *dst = (*dst & 0x0f) | (srcval << 4); src += src_step; srcbit += srcbit_step; if (srcbit == 8) { @@ -982,42 +942,13 @@ dstbit = 0; } } - break; - } - case 8: { - while (samples-- > 0) { - *dst = *src; - src += src_step; - dst += dst_step; - } - break; - } - case 16: { - while (samples-- > 0) { - *(u_int16_t*)dst = *(u_int16_t*)src; - src += src_step; - dst += dst_step; - } - break; - } - case 32: { - while (samples-- > 0) { - *(u_int32_t*)dst = *(u_int32_t*)src; - src += src_step; - dst += dst_step; - } - break; - } - case 64: { + } else { + width /= 8; while (samples-- > 0) { - *(u_int64_t*)dst = *(u_int64_t*)src; + memcpy(dst, src, width); src += src_step; dst += dst_step; } - break; - } - default: - snd_BUG(); } return 0; } diff -Nru a/sound/core/oss/pcm_plugin.h b/sound/core/oss/pcm_plugin.h --- a/sound/core/oss/pcm_plugin.h 2004-09-06 16:37:54 -07:00 +++ b/sound/core/oss/pcm_plugin.h 2004-09-06 16:37:54 -07:00 @@ -35,7 +35,7 @@ static inline bitset_t *bitset_alloc(int nbits) { - return snd_kcalloc(bitset_size(nbits) * sizeof(bitset_t), GFP_KERNEL); + return kcalloc(bitset_size(nbits), sizeof(bitset_t), GFP_KERNEL); } static inline void bitset_set(bitset_t *bitmap, unsigned int pos) diff -Nru a/sound/core/oss/route.c b/sound/core/oss/route.c --- a/sound/core/oss/route.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/oss/route.c 2004-09-06 16:37:55 -07:00 @@ -458,7 +458,7 @@ dptr->func = route_to_channel; if (nsrcs > 0) { int srcidx; - dptr->srcs = snd_kcalloc(nsrcs * sizeof(*srcs), GFP_KERNEL); + dptr->srcs = kcalloc(nsrcs, sizeof(*srcs), GFP_KERNEL); for(srcidx = 0; srcidx < nsrcs; srcidx++) dptr->srcs[srcidx] = srcs[srcidx]; } else diff -Nru a/sound/core/pcm.c b/sound/core/pcm.c --- a/sound/core/pcm.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/pcm.c 2004-09-06 16:37:55 -07:00 @@ -585,7 +585,7 @@ } prev = NULL; for (idx = 0, prev = NULL; idx < substream_count; idx++) { - substream = snd_magic_kcalloc(snd_pcm_substream_t, 0, GFP_KERNEL); + substream = kcalloc(1, sizeof(*substream), GFP_KERNEL); if (substream == NULL) return -ENOMEM; substream->pcm = pcm; @@ -600,7 +600,7 @@ prev->next = substream; err = snd_pcm_substream_proc_init(substream); if (err < 0) { - snd_magic_kfree(substream); + kfree(substream); return err; } substream->group = &substream->self_group; @@ -645,7 +645,7 @@ snd_assert(rpcm != NULL, return -EINVAL); *rpcm = NULL; snd_assert(card != NULL, return -ENXIO); - pcm = snd_magic_kcalloc(snd_pcm_t, 0, GFP_KERNEL); + pcm = kcalloc(1, sizeof(*pcm), GFP_KERNEL); if (pcm == NULL) return -ENOMEM; pcm->card = card; @@ -681,7 +681,7 @@ while (substream) { substream_next = substream->next; snd_pcm_substream_proc_done(substream); - snd_magic_kfree(substream); + kfree(substream); substream = substream_next; } snd_pcm_stream_proc_done(pstr); @@ -702,13 +702,13 @@ snd_pcm_lib_preallocate_free_for_all(pcm); snd_pcm_free_stream(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK]); snd_pcm_free_stream(&pcm->streams[SNDRV_PCM_STREAM_CAPTURE]); - snd_magic_kfree(pcm); + kfree(pcm); return 0; } static int snd_pcm_dev_free(snd_device_t *device) { - snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO); + snd_pcm_t *pcm = device->device_data; return snd_pcm_free(pcm); } @@ -783,7 +783,7 @@ if (substream == NULL) return -EAGAIN; - runtime = snd_kcalloc(sizeof(snd_pcm_runtime_t), GFP_KERNEL); + runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL); if (runtime == NULL) return -ENOMEM; @@ -843,7 +843,7 @@ snd_pcm_substream_t *substream; struct list_head *list; char str[16]; - snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO); + snd_pcm_t *pcm = device->device_data; snd_assert(pcm != NULL && device != NULL, return -ENXIO); down(®ister_mutex); @@ -888,7 +888,7 @@ static int snd_pcm_dev_disconnect(snd_device_t *device) { - snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO); + snd_pcm_t *pcm = device->device_data; struct list_head *list; snd_pcm_substream_t *substream; int idx, cidx; @@ -914,7 +914,7 @@ int idx, cidx, devtype; snd_pcm_substream_t *substream; struct list_head *list; - snd_pcm_t *pcm = snd_magic_cast(snd_pcm_t, device->device_data, return -ENXIO); + snd_pcm_t *pcm = device->device_data; snd_assert(pcm != NULL, return -ENXIO); down(®ister_mutex); @@ -1050,6 +1050,9 @@ EXPORT_SYMBOL(snd_pcm_playback_poll); EXPORT_SYMBOL(snd_pcm_capture_poll); EXPORT_SYMBOL(snd_pcm_mmap_data); +#if SNDRV_PCM_INFO_MMAP_IOMEM +EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); +#endif /* pcm_misc.c */ EXPORT_SYMBOL(snd_pcm_format_signed); EXPORT_SYMBOL(snd_pcm_format_unsigned); diff -Nru a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c --- a/sound/core/pcm_lib.c 2004-09-06 16:37:52 -07:00 +++ b/sound/core/pcm_lib.c 2004-09-06 16:37:52 -07:00 @@ -128,12 +128,29 @@ } } +static void xrun(snd_pcm_substream_t *substream) +{ + snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); +#ifdef CONFIG_SND_DEBUG + if (substream->pstr->xrun_debug) { + snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n", + substream->pcm->card->number, + substream->pcm->device, + substream->stream ? 'c' : 'p'); + if (substream->pstr->xrun_debug > 1) + dump_stack(); + } +#endif +} + static inline snd_pcm_uframes_t snd_pcm_update_hw_ptr_pos(snd_pcm_substream_t *substream, snd_pcm_runtime_t *runtime) { snd_pcm_uframes_t pos; pos = substream->ops->pointer(substream); + if (pos == SNDRV_PCM_POS_XRUN) + return pos; /* XRUN */ if (runtime->tstamp_mode & SNDRV_PCM_TSTAMP_MMAP) snd_timestamp_now((snd_timestamp_t*)&runtime->status->tstamp, runtime->tstamp_timespec); #ifdef CONFIG_SND_DEBUG @@ -158,19 +175,10 @@ if (avail > runtime->avail_max) runtime->avail_max = avail; if (avail >= runtime->stop_threshold) { - snd_pcm_stop(substream, - runtime->status->state == SNDRV_PCM_STATE_DRAINING ? - SNDRV_PCM_STATE_SETUP : SNDRV_PCM_STATE_XRUN); -#ifdef CONFIG_SND_DEBUG - if (substream->pstr->xrun_debug) { - snd_printd(KERN_DEBUG "XRUN: pcmC%dD%d%c\n", - substream->pcm->card->number, - substream->pcm->device, - substream->stream ? 'c' : 'p'); - if (substream->pstr->xrun_debug > 1) - dump_stack(); - } -#endif + if (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING) + snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP); + else + xrun(substream); return -EPIPE; } if (avail >= runtime->control->avail_min) @@ -186,6 +194,10 @@ snd_pcm_sframes_t delta; pos = snd_pcm_update_hw_ptr_pos(substream, runtime); + if (pos == SNDRV_PCM_POS_XRUN) { + xrun(substream); + return -EPIPE; + } if (runtime->period_size == runtime->buffer_size) goto __next_buf; new_hw_ptr = runtime->hw_ptr_base + pos; @@ -230,6 +242,10 @@ old_hw_ptr = runtime->status->hw_ptr; pos = snd_pcm_update_hw_ptr_pos(substream, runtime); + if (pos == SNDRV_PCM_POS_XRUN) { + xrun(substream); + return -EPIPE; + } new_hw_ptr = runtime->hw_ptr_base + pos; delta = old_hw_ptr - new_hw_ptr; @@ -887,22 +903,18 @@ va_list args; va_start(args, dep); if (constrs->rules_num >= constrs->rules_all) { - snd_pcm_hw_rule_t *old = constrs->rules; - if (constrs->rules_all == 0) - constrs->rules_all = 32; - else { - old = constrs->rules; - constrs->rules_all += 10; - } - constrs->rules = snd_kcalloc(constrs->rules_all * sizeof(*c), - GFP_KERNEL); - if (!constrs->rules) + snd_pcm_hw_rule_t *new; + unsigned int new_rules = constrs->rules_all + 16; + new = kcalloc(new_rules, sizeof(*c), GFP_KERNEL); + if (!new) return -ENOMEM; - if (old) { - memcpy(constrs->rules, old, + if (constrs->rules) { + memcpy(new, constrs->rules, constrs->rules_num * sizeof(*c)); - kfree(old); + kfree(constrs->rules); } + constrs->rules = new; + constrs->rules_all = new_rules; } c = &constrs->rules[constrs->rules_num]; c->cond = cond; @@ -911,7 +923,7 @@ c->private = private; k = 0; while (1) { - snd_assert(k < sizeof(c->deps) / sizeof(c->deps[0]), return -EINVAL); + snd_assert(k < ARRAY_SIZE(c->deps), return -EINVAL); c->deps[k++] = dep; if (dep < 0) break; @@ -1109,7 +1121,7 @@ 1<<24, 1<<25, 1<<26, 1<<27, 1<<28, 1<<29, 1<<30 }; return snd_interval_list(hw_param_interval(params, rule->var), - sizeof(pow2_sizes)/sizeof(int), pow2_sizes, 0); + ARRAY_SIZE(pow2_sizes), pow2_sizes, 0); } /** @@ -1769,12 +1781,14 @@ void *arg) { snd_pcm_runtime_t *runtime = substream->runtime; + unsigned long flags; + snd_pcm_stream_lock_irqsave(substream, flags); if (snd_pcm_running(substream) && - snd_pcm_update_hw_ptr(substream) >= 0) { + snd_pcm_update_hw_ptr(substream) >= 0) runtime->status->hw_ptr %= runtime->buffer_size; - return 0; - } - runtime->status->hw_ptr = 0; + else + runtime->status->hw_ptr = 0; + snd_pcm_stream_unlock_irqrestore(substream, flags); return 0; } diff -Nru a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c --- a/sound/core/pcm_memory.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/pcm_memory.c 2004-09-06 16:37:54 -07:00 @@ -32,12 +32,10 @@ static int preallocate_dma = 1; module_param(preallocate_dma, int, 0444); MODULE_PARM_DESC(preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized."); -MODULE_PARM_SYNTAX(preallocate_dma, SNDRV_BOOLEAN_TRUE_DESC); static int maximum_substreams = 4; module_param(maximum_substreams, int, 0444); MODULE_PARM_DESC(maximum_substreams, "Maximum substreams with preallocated DMA memory."); -MODULE_PARM_SYNTAX(maximum_substreams, SNDRV_BOOLEAN_TRUE_DESC); const static size_t snd_minimum_buffer = 16384; @@ -56,26 +54,21 @@ snd_assert(size > 0, return -EINVAL); /* already reserved? */ - if (snd_dma_get_reserved(&substream->dma_device, dmab) > 0) { + if (snd_dma_get_reserved_buf(dmab, substream->dma_buf_id) > 0) { if (dmab->bytes >= size) return 0; /* yes */ - /* no, reset the reserved block */ - /* if we can find bigger pages below, this block will be - * automatically removed in snd_dma_set_reserved(). - */ - snd_dma_free_reserved(&substream->dma_device); + /* no, free the reserved block */ + snd_dma_free_pages(dmab); dmab->bytes = 0; } do { - if ((err = snd_dma_alloc_pages(&substream->dma_device, size, dmab)) < 0) { + if ((err = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, + size, dmab)) < 0) { if (err != -ENOMEM) return err; /* fatal error */ - } else { - /* remember this one */ - snd_dma_set_reserved(&substream->dma_device, dmab); + } else return 0; - } size >>= 1; } while (size >= snd_minimum_buffer); dmab->bytes = 0; /* tell error */ @@ -89,7 +82,10 @@ { if (substream->dma_buffer.area == NULL) return; - snd_dma_free_reserved(&substream->dma_device); + if (substream->dma_buf_id) + snd_dma_reserve_buf(&substream->dma_buffer, substream->dma_buf_id); + else + snd_dma_free_pages(&substream->dma_buffer); substream->dma_buffer.area = NULL; } @@ -108,7 +104,6 @@ snd_info_unregister(substream->proc_prealloc_entry); substream->proc_prealloc_entry = NULL; } - substream->dma_device.type = SNDRV_DMA_TYPE_UNKNOWN; return 0; } @@ -170,18 +165,20 @@ if (substream->dma_buffer.bytes == size) return; memset(&new_dmab, 0, sizeof(new_dmab)); + new_dmab.dev = substream->dma_buffer.dev; if (size > 0) { - - if (snd_dma_alloc_pages(&substream->dma_device, size, &new_dmab) < 0) { + if (snd_dma_alloc_pages(substream->dma_buffer.dev.type, + substream->dma_buffer.dev.dev, + size, &new_dmab) < 0) { buffer->error = -ENOMEM; return; } substream->buffer_bytes_max = size; - snd_dma_free_reserved(&substream->dma_device); } else { substream->buffer_bytes_max = UINT_MAX; } - snd_dma_set_reserved(&substream->dma_device, &new_dmab); + if (substream->dma_buffer.area) + snd_dma_free_pages(&substream->dma_buffer); substream->dma_buffer = new_dmab; } else { buffer->error = -EINVAL; @@ -196,7 +193,6 @@ { snd_info_entry_t *entry; - memset(&substream->dma_buffer, 0, sizeof(substream->dma_buffer)); if (size > 0 && preallocate_dma && substream->number < maximum_substreams) preallocate_pcm_pages(substream, size); @@ -219,20 +215,6 @@ } -/* - * set up the unique pcm id - */ -static inline void setup_pcm_id(snd_pcm_substream_t *subs) -{ - if (! subs->dma_device.id) { - subs->dma_device.id = subs->pcm->device << 16 | - subs->stream << 8 | (subs->number + 1); - if (subs->dma_device.type == SNDRV_DMA_TYPE_CONTINUOUS || - subs->dma_device.dev == NULL) - subs->dma_device.id |= (subs->pcm->card->number + 1) << 24; - } -} - /** * snd_pcm_lib_preallocate_pages - pre-allocation for the given DMA type * @substream: the pcm substream instance @@ -241,7 +223,12 @@ * @size: the requested pre-allocation size in bytes * @max: the max. allowed pre-allocation size * - * Do pre-allocation for the given DMA type. + * Do pre-allocation for the given DMA buffer type. + * + * When substream->dma_buf_id is set, the function tries to look for + * the reserved buffer, and the buffer is not freed but reserved at + * destruction time. The dma_buf_id must be unique for all systems + * (in the same DMA buffer type) e.g. using snd_dma_pci_buf_id(). * * Returns zero if successful, or a negative error code on failure. */ @@ -249,9 +236,8 @@ int type, struct device *data, size_t size, size_t max) { - substream->dma_device.type = type; - substream->dma_device.dev = data; - setup_pcm_id(substream); + substream->dma_buffer.dev.type = type; + substream->dma_buffer.dev.dev = data; return snd_pcm_lib_preallocate_pages1(substream, size, max); } @@ -314,31 +300,38 @@ int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size) { snd_pcm_runtime_t *runtime; - struct snd_dma_buffer dmab; + struct snd_dma_buffer *dmab = NULL; - snd_assert(substream->dma_device.type != SNDRV_DMA_TYPE_UNKNOWN, return -EINVAL); + snd_assert(substream->dma_buffer.dev.type != SNDRV_DMA_TYPE_UNKNOWN, return -EINVAL); snd_assert(substream != NULL, return -EINVAL); runtime = substream->runtime; - snd_assert(runtime != NULL, return -EINVAL); + snd_assert(runtime != NULL, return -EINVAL); - if (runtime->dma_area != NULL) { + if (runtime->dma_buffer_p) { /* perphaps, we might free the large DMA memory region to save some space here, but the actual solution costs us less time */ - if (runtime->dma_bytes >= size) + if (runtime->dma_buffer_p->bytes >= size) { + runtime->dma_bytes = size; return 0; /* ok, do not change */ + } snd_pcm_lib_free_pages(substream); } if (substream->dma_buffer.area != NULL && substream->dma_buffer.bytes >= size) { - dmab = substream->dma_buffer; /* use the pre-allocated buffer */ + dmab = &substream->dma_buffer; /* use the pre-allocated buffer */ } else { - memset(&dmab, 0, sizeof(dmab)); /* allocate a new buffer */ - if (snd_dma_alloc_pages(&substream->dma_device, size, &dmab) < 0) + dmab = kcalloc(1, sizeof(*dmab), GFP_KERNEL); + if (! dmab) + return -ENOMEM; + dmab->dev = substream->dma_buffer.dev; + if (snd_dma_alloc_pages(substream->dma_buffer.dev.type, + substream->dma_buffer.dev.dev, + size, dmab) < 0) { + kfree(dmab); return -ENOMEM; + } } - runtime->dma_area = dmab.area; - runtime->dma_addr = dmab.addr; - runtime->dma_private = dmab.private_data; + snd_pcm_set_runtime_buffer(substream, dmab); runtime->dma_bytes = size; return 1; /* area was changed */ } @@ -360,34 +353,11 @@ snd_assert(runtime != NULL, return -EINVAL); if (runtime->dma_area == NULL) return 0; - if (runtime->dma_area != substream->dma_buffer.area) { + if (runtime->dma_buffer_p != &substream->dma_buffer) { /* it's a newly allocated buffer. release it now. */ - struct snd_dma_buffer dmab; - memset(&dmab, 0, sizeof(dmab)); - dmab.area = runtime->dma_area; - dmab.addr = runtime->dma_addr; - dmab.bytes = runtime->dma_bytes; - dmab.private_data = runtime->dma_private; - snd_dma_free_pages(&substream->dma_device, &dmab); + snd_dma_free_pages(runtime->dma_buffer_p); + kfree(runtime->dma_buffer_p); } - runtime->dma_area = NULL; - runtime->dma_addr = 0UL; - runtime->dma_bytes = 0; - runtime->dma_private = NULL; + snd_pcm_set_runtime_buffer(substream, NULL); return 0; } - -#ifndef MODULE - -/* format is: snd-pcm=preallocate_dma,maximum_substreams */ - -static int __init alsa_pcm_setup(char *str) -{ - (void)(get_option(&str,&preallocate_dma) == 2 && - get_option(&str,&maximum_substreams) == 2); - return 1; -} - -__setup("snd-pcm=", alsa_pcm_setup); - -#endif /* ifndef MODULE */ diff -Nru a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c --- a/sound/core/pcm_misc.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/pcm_misc.c 2004-09-06 16:37:54 -07:00 @@ -23,12 +23,169 @@ #include #include #include -#define bswap_16 swab16 -#define bswap_32 swab32 -#define bswap_64 swab64 #define SND_PCM_FORMAT_UNKNOWN (-1) -#define snd_enum_to_int(v) (v) -#define snd_int_to_enum(v) (v) + +struct pcm_format_data { + char width; /* bit width */ + char phys; /* physical bit width */ + char le; /* 0 = big-endian, 1 = little-endian, -1 = others */ + char signd; /* 0 = unsigned, 1 = signed, -1 = others */ + unsigned char silence[8]; /* silence data to fill */ +}; + +static struct pcm_format_data pcm_formats[SNDRV_PCM_FORMAT_LAST+1] = { + [SNDRV_PCM_FORMAT_S8] = { + .width = 8, .phys = 8, .le = -1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U8] = { + .width = 8, .phys = 8, .le = -1, .signd = 0, + .silence = { 0x80 }, + }, + [SNDRV_PCM_FORMAT_S16_LE] = { + .width = 16, .phys = 16, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S16_BE] = { + .width = 16, .phys = 16, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U16_LE] = { + .width = 16, .phys = 16, .le = 1, .signd = 0, + .silence = { 0x00, 0x80 }, + }, + [SNDRV_PCM_FORMAT_U16_BE] = { + .width = 16, .phys = 16, .le = 0, .signd = 0, + .silence = { 0x80, 0x00 }, + }, + [SNDRV_PCM_FORMAT_S24_LE] = { + .width = 24, .phys = 32, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S24_BE] = { + .width = 24, .phys = 32, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U24_LE] = { + .width = 24, .phys = 32, .le = 1, .signd = 0, + .silence = { 0x00, 0x00, 0x80 }, + }, + [SNDRV_PCM_FORMAT_U24_BE] = { + .width = 24, .phys = 32, .le = 0, .signd = 0, + .silence = { 0x80, 0x00, 0x00 }, + }, + [SNDRV_PCM_FORMAT_S32_LE] = { + .width = 32, .phys = 32, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S32_BE] = { + .width = 32, .phys = 32, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U32_LE] = { + .width = 32, .phys = 32, .le = 1, .signd = 0, + .silence = { 0x00, 0x00, 0x00, 0x80 }, + }, + [SNDRV_PCM_FORMAT_U32_BE] = { + .width = 32, .phys = 32, .le = 0, .signd = 0, + .silence = { 0x80, 0x00, 0x00, 0x00 }, + }, + [SNDRV_PCM_FORMAT_FLOAT_LE] = { + .width = 32, .phys = 32, .le = 1, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_FLOAT_BE] = { + .width = 32, .phys = 32, .le = 0, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_FLOAT64_LE] = { + .width = 64, .phys = 64, .le = 1, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_FLOAT64_BE] = { + .width = 64, .phys = 64, .le = 0, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE] = { + .width = 32, .phys = 32, .le = 1, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE] = { + .width = 32, .phys = 32, .le = 0, .signd = -1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_MU_LAW] = { + .width = 8, .phys = 8, .le = -1, .signd = -1, + .silence = { 0x7f }, + }, + [SNDRV_PCM_FORMAT_A_LAW] = { + .width = 8, .phys = 8, .le = -1, .signd = -1, + .silence = { 0x55 }, + }, + [SNDRV_PCM_FORMAT_IMA_ADPCM] = { + .width = 4, .phys = 4, .le = -1, .signd = -1, + .silence = {}, + }, + /* FIXME: the following three formats are not defined properly yet */ + [SNDRV_PCM_FORMAT_MPEG] = { + .le = -1, .signd = -1, + }, + [SNDRV_PCM_FORMAT_GSM] = { + .le = -1, .signd = -1, + }, + [SNDRV_PCM_FORMAT_SPECIAL] = { + .le = -1, .signd = -1, + }, + [SNDRV_PCM_FORMAT_S24_3LE] = { + .width = 24, .phys = 24, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S24_3BE] = { + .width = 24, .phys = 24, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U24_3LE] = { + .width = 24, .phys = 24, .le = 1, .signd = 0, + .silence = { 0x00, 0x00, 0x80 }, + }, + [SNDRV_PCM_FORMAT_U24_3BE] = { + .width = 24, .phys = 24, .le = 0, .signd = 0, + .silence = { 0x80, 0x00, 0x00 }, + }, + [SNDRV_PCM_FORMAT_S20_3LE] = { + .width = 20, .phys = 24, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S20_3BE] = { + .width = 20, .phys = 24, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U20_3LE] = { + .width = 20, .phys = 24, .le = 1, .signd = 0, + .silence = { 0x00, 0x00, 0x08 }, + }, + [SNDRV_PCM_FORMAT_U20_3BE] = { + .width = 20, .phys = 24, .le = 0, .signd = 0, + .silence = { 0x08, 0x00, 0x00 }, + }, + [SNDRV_PCM_FORMAT_S18_3LE] = { + .width = 18, .phys = 24, .le = 1, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_S18_3BE] = { + .width = 18, .phys = 24, .le = 0, .signd = 1, + .silence = {}, + }, + [SNDRV_PCM_FORMAT_U18_3LE] = { + .width = 18, .phys = 24, .le = 1, .signd = 0, + .silence = { 0x00, 0x00, 0x02 }, + }, + [SNDRV_PCM_FORMAT_U18_3BE] = { + .width = 18, .phys = 24, .le = 0, .signd = 0, + .silence = { 0x02, 0x00, 0x00 }, + }, +}; + /** * snd_pcm_format_signed - Check the PCM format is signed linear @@ -39,38 +196,12 @@ */ int snd_pcm_format_signed(snd_pcm_format_t format) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S8: - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_S18_3BE: - return 1; - case SNDRV_PCM_FORMAT_U8: - case SNDRV_PCM_FORMAT_U16_LE: - case SNDRV_PCM_FORMAT_U16_BE: - case SNDRV_PCM_FORMAT_U24_LE: - case SNDRV_PCM_FORMAT_U24_BE: - case SNDRV_PCM_FORMAT_U32_LE: - case SNDRV_PCM_FORMAT_U32_BE: - case SNDRV_PCM_FORMAT_U24_3LE: - case SNDRV_PCM_FORMAT_U24_3BE: - case SNDRV_PCM_FORMAT_U20_3LE: - case SNDRV_PCM_FORMAT_U20_3BE: - case SNDRV_PCM_FORMAT_U18_3LE: - case SNDRV_PCM_FORMAT_U18_3BE: - return 0; - default: + int val; + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) return -EINVAL; - } + if ((val = pcm_formats[format].signd) < 0) + return -EINVAL; + return val; } /** @@ -110,42 +241,12 @@ */ int snd_pcm_format_little_endian(snd_pcm_format_t format) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_U16_LE: - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_U24_LE: - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_U32_LE: - case SNDRV_PCM_FORMAT_FLOAT_LE: - case SNDRV_PCM_FORMAT_FLOAT64_LE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_U24_3LE: - case SNDRV_PCM_FORMAT_U20_3LE: - case SNDRV_PCM_FORMAT_U18_3LE: - return 1; - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_U16_BE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_U24_BE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_U32_BE: - case SNDRV_PCM_FORMAT_FLOAT_BE: - case SNDRV_PCM_FORMAT_FLOAT64_BE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_S18_3BE: - case SNDRV_PCM_FORMAT_U24_3BE: - case SNDRV_PCM_FORMAT_U20_3BE: - case SNDRV_PCM_FORMAT_U18_3BE: - return 0; - default: + int val; + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) return -EINVAL; - } + if ((val = pcm_formats[format].le) < 0) + return -EINVAL; + return val; } /** @@ -190,55 +291,12 @@ */ int snd_pcm_format_width(snd_pcm_format_t format) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S8: - case SNDRV_PCM_FORMAT_U8: - return 8; - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_U16_LE: - case SNDRV_PCM_FORMAT_U16_BE: - return 16; - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_S18_3BE: - case SNDRV_PCM_FORMAT_U18_3LE: - case SNDRV_PCM_FORMAT_U18_3BE: - return 18; - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_U20_3LE: - case SNDRV_PCM_FORMAT_U20_3BE: - return 20; - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_U24_LE: - case SNDRV_PCM_FORMAT_U24_BE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_U24_3LE: - case SNDRV_PCM_FORMAT_U24_3BE: - return 24; - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_U32_LE: - case SNDRV_PCM_FORMAT_U32_BE: - case SNDRV_PCM_FORMAT_FLOAT_LE: - case SNDRV_PCM_FORMAT_FLOAT_BE: - return 32; - case SNDRV_PCM_FORMAT_FLOAT64_LE: - case SNDRV_PCM_FORMAT_FLOAT64_BE: - return 64; - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE: - return 32; - case SNDRV_PCM_FORMAT_MU_LAW: - case SNDRV_PCM_FORMAT_A_LAW: - return 8; - case SNDRV_PCM_FORMAT_IMA_ADPCM: - return 4; - default: + int val; + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) return -EINVAL; - } + if ((val = pcm_formats[format].width) == 0) + return -EINVAL; + return val; } /** @@ -250,52 +308,12 @@ */ int snd_pcm_format_physical_width(snd_pcm_format_t format) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S8: - case SNDRV_PCM_FORMAT_U8: - return 8; - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_U16_LE: - case SNDRV_PCM_FORMAT_U16_BE: - return 16; - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_S18_3BE: - case SNDRV_PCM_FORMAT_U18_3LE: - case SNDRV_PCM_FORMAT_U18_3BE: - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_U20_3LE: - case SNDRV_PCM_FORMAT_U20_3BE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_U24_3LE: - case SNDRV_PCM_FORMAT_U24_3BE: - return 24; - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_U24_LE: - case SNDRV_PCM_FORMAT_U24_BE: - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_U32_LE: - case SNDRV_PCM_FORMAT_U32_BE: - case SNDRV_PCM_FORMAT_FLOAT_LE: - case SNDRV_PCM_FORMAT_FLOAT_BE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE: - return 32; - case SNDRV_PCM_FORMAT_FLOAT64_LE: - case SNDRV_PCM_FORMAT_FLOAT64_BE: - return 64; - case SNDRV_PCM_FORMAT_MU_LAW: - case SNDRV_PCM_FORMAT_A_LAW: - return 8; - case SNDRV_PCM_FORMAT_IMA_ADPCM: - return 4; - default: + int val; + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) return -EINVAL; - } + if ((val = pcm_formats[format].phys) == 0) + return -EINVAL; + return val; } /** @@ -307,216 +325,25 @@ */ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S8: - case SNDRV_PCM_FORMAT_U8: - return samples; - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_U16_LE: - case SNDRV_PCM_FORMAT_U16_BE: - return samples * 2; - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_S18_3BE: - case SNDRV_PCM_FORMAT_U18_3LE: - case SNDRV_PCM_FORMAT_U18_3BE: - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_U20_3LE: - case SNDRV_PCM_FORMAT_U20_3BE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_U24_3LE: - case SNDRV_PCM_FORMAT_U24_3BE: - return samples * 3; - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_U24_LE: - case SNDRV_PCM_FORMAT_U24_BE: - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_U32_LE: - case SNDRV_PCM_FORMAT_U32_BE: - case SNDRV_PCM_FORMAT_FLOAT_LE: - case SNDRV_PCM_FORMAT_FLOAT_BE: - return samples * 4; - case SNDRV_PCM_FORMAT_FLOAT64_LE: - case SNDRV_PCM_FORMAT_FLOAT64_BE: - return samples * 8; - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE: - return samples * 4; - case SNDRV_PCM_FORMAT_MU_LAW: - case SNDRV_PCM_FORMAT_A_LAW: - return samples; - case SNDRV_PCM_FORMAT_IMA_ADPCM: - if (samples & 1) - return -EINVAL; - return samples / 2; - default: + int phys_width = snd_pcm_format_physical_width(format); + if (phys_width < 0) return -EINVAL; - } + return samples * phys_width / 8; } /** - * snd_pcm_format_silence_64 - return the silent data in 64bit integer + * snd_pcm_format_silence_64 - return the silent data in 8 bytes array * @format: the format to check * - * Returns the silent data in 64bit integer for the given format. + * Returns the format pattern to fill or NULL if error. */ -u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format) +const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) { - switch (snd_enum_to_int(format)) { - case SNDRV_PCM_FORMAT_S8: - case SNDRV_PCM_FORMAT_S16_LE: - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_S24_LE: - case SNDRV_PCM_FORMAT_S24_BE: - case SNDRV_PCM_FORMAT_S32_LE: - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_S24_3LE: - case SNDRV_PCM_FORMAT_S24_3BE: - case SNDRV_PCM_FORMAT_S20_3LE: - case SNDRV_PCM_FORMAT_S20_3BE: - case SNDRV_PCM_FORMAT_S18_3LE: - case SNDRV_PCM_FORMAT_S18_3BE: - return 0; - case SNDRV_PCM_FORMAT_U8: - return 0x8080808080808080ULL; -#ifdef SNDRV_LITTLE_ENDIAN - case SNDRV_PCM_FORMAT_U16_LE: - return 0x8000800080008000ULL; - case SNDRV_PCM_FORMAT_U24_LE: - return 0x0080000000800000ULL; - case SNDRV_PCM_FORMAT_U32_LE: - return 0x8000000080000000ULL; - case SNDRV_PCM_FORMAT_U16_BE: - return 0x0080008000800080ULL; - case SNDRV_PCM_FORMAT_U24_BE: - return 0x0000800000008000ULL; - case SNDRV_PCM_FORMAT_U32_BE: - return 0x0000008000000080ULL; - case SNDRV_PCM_FORMAT_U24_3LE: - return 0x0000800000800000ULL; - case SNDRV_PCM_FORMAT_U24_3BE: - return 0x0080000080000080ULL; - case SNDRV_PCM_FORMAT_U20_3LE: - return 0x0000080000080000ULL; - case SNDRV_PCM_FORMAT_U20_3BE: - return 0x0008000008000008ULL; - case SNDRV_PCM_FORMAT_U18_3LE: - return 0x0000020000020000ULL; - case SNDRV_PCM_FORMAT_U18_3BE: - return 0x0002000002000002ULL; -#else - case SNDRV_PCM_FORMAT_U16_LE: - return 0x0080008000800080ULL; - case SNDRV_PCM_FORMAT_U24_LE: - return 0x0000800000008000ULL; - case SNDRV_PCM_FORMAT_U32_LE: - return 0x0000008000000080ULL; - case SNDRV_PCM_FORMAT_U16_BE: - return 0x8000800080008000ULL; - case SNDRV_PCM_FORMAT_U24_BE: - return 0x0080000000800000ULL; - case SNDRV_PCM_FORMAT_U32_BE: - return 0x8000000080000000ULL; - case SNDRV_PCM_FORMAT_U24_3LE: - return 0x0080000080000080ULL; - case SNDRV_PCM_FORMAT_U24_3BE: - return 0x0000800000800000ULL; - case SNDRV_PCM_FORMAT_U20_3LE: - return 0x0008000008000008ULL; - case SNDRV_PCM_FORMAT_U20_3BE: - return 0x0000080000080000ULL; - case SNDRV_PCM_FORMAT_U18_3LE: - return 0x0002000002000002ULL; - case SNDRV_PCM_FORMAT_U18_3BE: - return 0x0000020000020000ULL; -#endif - case SNDRV_PCM_FORMAT_FLOAT_LE: - { - union { - float f; - u_int32_t i; - } u; - u.f = 0.0; -#ifdef SNDRV_LITTLE_ENDIAN - return u.i; -#else - return bswap_32(u.i); -#endif - } - case SNDRV_PCM_FORMAT_FLOAT64_LE: - { - union { - double f; - u_int64_t i; - } u; - u.f = 0.0; -#ifdef SNDRV_LITTLE_ENDIAN - return u.i; -#else - return bswap_64(u.i); -#endif - } - case SNDRV_PCM_FORMAT_FLOAT_BE: - { - union { - float f; - u_int32_t i; - } u; - u.f = 0.0; -#ifdef SNDRV_LITTLE_ENDIAN - return bswap_32(u.i); -#else - return u.i; -#endif - } - case SNDRV_PCM_FORMAT_FLOAT64_BE: - { - union { - double f; - u_int64_t i; - } u; - u.f = 0.0; -#ifdef SNDRV_LITTLE_ENDIAN - return bswap_64(u.i); -#else - return u.i; -#endif - } - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE: - case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE: - return 0; - case SNDRV_PCM_FORMAT_MU_LAW: - return 0x7f7f7f7f7f7f7f7fULL; - case SNDRV_PCM_FORMAT_A_LAW: - return 0x5555555555555555ULL; - case SNDRV_PCM_FORMAT_IMA_ADPCM: /* special case */ - case SNDRV_PCM_FORMAT_MPEG: - case SNDRV_PCM_FORMAT_GSM: - case SNDRV_PCM_FORMAT_SPECIAL: - return 0; - default: - return -EINVAL; - } - return 0; -} - -u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format) -{ - return (u_int32_t)snd_pcm_format_silence_64(format); -} - -u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format) -{ - return (u_int16_t)snd_pcm_format_silence_64(format); -} - -u_int8_t snd_pcm_format_silence(snd_pcm_format_t format) -{ - return (u_int8_t)snd_pcm_format_silence_64(format); + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) + return NULL; + if (! pcm_formats[format].phys) + return NULL; + return pcm_formats[format].silence; } /** @@ -531,99 +358,73 @@ */ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) { + int width; + unsigned char *dst, *pat; + + if (format < 0 || format > SNDRV_PCM_FORMAT_LAST) + return -EINVAL; if (samples == 0) return 0; - switch (snd_pcm_format_width(format)) { - case 4: { - u_int8_t silence = snd_pcm_format_silence_64(format); - unsigned int samples1; - if (samples % 2 != 0) - return -EINVAL; - samples1 = samples / 2; - memset(data, silence, samples1); - break; + width = pcm_formats[format].phys; /* physical width */ + pat = pcm_formats[format].silence; + if (! width) + return -EINVAL; + /* signed or 1 byte data */ + if (pcm_formats[format].signd == 1 || width <= 8) { + unsigned int bytes = samples * width / 8; + memset(data, *pat, bytes); + return 0; } - case 8: { - u_int8_t silence = snd_pcm_format_silence_64(format); - memset(data, silence, samples); - break; + /* non-zero samples, fill using a loop */ + width /= 8; + dst = data; +#if 0 + while (samples--) { + memcpy(dst, pat, width); + dst += width; } - case 16: { - u_int16_t silence = snd_pcm_format_silence_64(format); - if (! silence) - memset(data, 0, samples * 2); - else { - u_int16_t *data16 = data; - while (samples-- > 0) - *data16++ = silence; +#else + /* a bit optimization for constant width */ + switch (width) { + case 2: + while (samples--) { + memcpy(dst, pat, 2); + dst += 2; } break; - } - case 24: { - u_int32_t silence = snd_pcm_format_silence_64(format); - if (! silence) - memset(data, 0, samples * 3); - else { - while (samples-- > 0) { - u_int8_t *data8 = data; -#ifdef SNDRV_LITTLE_ENDIAN - *data8++ = silence >> 0; - *data8++ = silence >> 8; - *data8++ = silence >> 16; -#else - *data8++ = silence >> 16; - *data8++ = silence >> 8; - *data8++ = silence >> 0; -#endif - } + case 3: + while (samples--) { + memcpy(dst, pat, 3); + dst += 3; } break; - } - case 32: { - u_int32_t silence = snd_pcm_format_silence_64(format); - if (! silence) - memset(data, 0, samples * 4); - else { - u_int32_t *data32 = data; - while (samples-- > 0) - *data32++ = silence; + case 4: + while (samples--) { + memcpy(dst, pat, 4); + dst += 4; } break; - } - case 64: { - u_int64_t silence = snd_pcm_format_silence_64(format); - if (! silence) - memset(data, 0, samples * 8); - else { - u_int64_t *data64 = data; - while (samples-- > 0) - *data64++ = silence; + case 8: + while (samples--) { + memcpy(dst, pat, 8); + dst += 8; } break; } - default: - return -EINVAL; - } +#endif return 0; } -static int linear_formats[4*2*2] = { - SNDRV_PCM_FORMAT_S8, - SNDRV_PCM_FORMAT_S8, - SNDRV_PCM_FORMAT_U8, - SNDRV_PCM_FORMAT_U8, - SNDRV_PCM_FORMAT_S16_LE, - SNDRV_PCM_FORMAT_S16_BE, - SNDRV_PCM_FORMAT_U16_LE, - SNDRV_PCM_FORMAT_U16_BE, - SNDRV_PCM_FORMAT_S24_LE, - SNDRV_PCM_FORMAT_S24_BE, - SNDRV_PCM_FORMAT_U24_LE, - SNDRV_PCM_FORMAT_U24_BE, - SNDRV_PCM_FORMAT_S32_LE, - SNDRV_PCM_FORMAT_S32_BE, - SNDRV_PCM_FORMAT_U32_LE, - SNDRV_PCM_FORMAT_U32_BE +/* [width][unsigned][bigendian] */ +static int linear_formats[4][2][2] = { + {{ SNDRV_PCM_FORMAT_S8, SNDRV_PCM_FORMAT_S8}, + { SNDRV_PCM_FORMAT_U8, SNDRV_PCM_FORMAT_U8}}, + {{SNDRV_PCM_FORMAT_S16_LE, SNDRV_PCM_FORMAT_S16_BE}, + {SNDRV_PCM_FORMAT_U16_LE, SNDRV_PCM_FORMAT_U16_BE}}, + {{SNDRV_PCM_FORMAT_S24_LE, SNDRV_PCM_FORMAT_S24_BE}, + {SNDRV_PCM_FORMAT_U24_LE, SNDRV_PCM_FORMAT_U24_BE}}, + {{SNDRV_PCM_FORMAT_S32_LE, SNDRV_PCM_FORMAT_S32_BE}, + {SNDRV_PCM_FORMAT_U32_LE, SNDRV_PCM_FORMAT_U32_BE}} }; /** @@ -636,23 +437,12 @@ */ snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian) { - switch (width) { - case 8: - width = 0; - break; - case 16: - width = 1; - break; - case 24: - width = 2; - break; - case 32: - width = 3; - break; - default: + if (width & 7) return SND_PCM_FORMAT_UNKNOWN; - } - return snd_int_to_enum(((int(*)[2][2])linear_formats)[width][!!unsignd][!!big_endian]); + width = (width / 8) - 1; + if (width < 0 || width >= 4) + return SND_PCM_FORMAT_UNKNOWN; + return linear_formats[width][!!unsignd][!!big_endian]; } /** diff -Nru a/sound/core/pcm_native.c b/sound/core/pcm_native.c --- a/sound/core/pcm_native.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/pcm_native.c 2004-09-06 16:37:51 -07:00 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -32,6 +33,7 @@ #include #include #include +#include /* * Compatibility @@ -64,6 +66,7 @@ */ rwlock_t snd_pcm_link_rwlock = RW_LOCK_UNLOCKED; +static DECLARE_RWSEM(snd_pcm_link_rwsem); static inline mm_segment_t snd_enter_user(void) @@ -304,13 +307,25 @@ static int snd_pcm_hw_refine_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params) { - snd_pcm_hw_params_t params; + snd_pcm_hw_params_t *params; int err; - if (copy_from_user(¶ms, _params, sizeof(params))) - return -EFAULT; - err = snd_pcm_hw_refine(substream, ¶ms); - if (copy_to_user(_params, ¶ms, sizeof(params))) - return -EFAULT; + + params = kmalloc(sizeof(*params), GFP_KERNEL); + if (!params) { + err = -ENOMEM; + goto out; + } + if (copy_from_user(params, _params, sizeof(*params))) { + err = -EFAULT; + goto out; + } + err = snd_pcm_hw_refine(substream, params); + if (copy_to_user(_params, params, sizeof(*params))) { + if (!err) + err = -EFAULT; + } +out: + kfree(params); return err; } @@ -325,14 +340,17 @@ snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; snd_assert(runtime != NULL, return -ENXIO); + snd_pcm_stream_lock_irq(substream); switch (runtime->status->state) { case SNDRV_PCM_STATE_OPEN: case SNDRV_PCM_STATE_SETUP: case SNDRV_PCM_STATE_PREPARED: break; default: + snd_pcm_stream_unlock_irq(substream); return -EBADFD; } + snd_pcm_stream_unlock_irq(substream); #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) if (!substream->oss.oss) #endif @@ -408,13 +426,25 @@ static int snd_pcm_hw_params_user(snd_pcm_substream_t * substream, snd_pcm_hw_params_t __user * _params) { - snd_pcm_hw_params_t params; + snd_pcm_hw_params_t *params; int err; - if (copy_from_user(¶ms, _params, sizeof(params))) - return -EFAULT; - err = snd_pcm_hw_params(substream, ¶ms); - if (copy_to_user(_params, ¶ms, sizeof(params))) - return -EFAULT; + + params = kmalloc(sizeof(*params), GFP_KERNEL); + if (!params) { + err = -ENOMEM; + goto out; + } + if (copy_from_user(params, _params, sizeof(*params))) { + err = -EFAULT; + goto out; + } + err = snd_pcm_hw_params(substream, params); + if (copy_to_user(_params, params, sizeof(*params))) { + if (!err) + err = -EFAULT; + } +out: + kfree(params); return err; } @@ -426,13 +456,16 @@ snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; snd_assert(runtime != NULL, return -ENXIO); + snd_pcm_stream_lock_irq(substream); switch (runtime->status->state) { case SNDRV_PCM_STATE_SETUP: case SNDRV_PCM_STATE_PREPARED: break; default: + snd_pcm_stream_unlock_irq(substream); return -EBADFD; } + snd_pcm_stream_unlock_irq(substream); if (atomic_read(&runtime->mmap_count)) return -EBADFD; if (substream->ops->hw_free == NULL) { @@ -447,11 +480,16 @@ static int snd_pcm_sw_params(snd_pcm_substream_t * substream, snd_pcm_sw_params_t *params) { snd_pcm_runtime_t *runtime; + snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; snd_assert(runtime != NULL, return -ENXIO); - if (runtime->status->state == SNDRV_PCM_STATE_OPEN) + snd_pcm_stream_lock_irq(substream); + if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { + snd_pcm_stream_unlock_irq(substream); return -EBADFD; + } + snd_pcm_stream_unlock_irq(substream); if (params->tstamp_mode > SNDRV_PCM_TSTAMP_LAST) return -EINVAL; @@ -579,8 +617,12 @@ return -EFAULT; channel = info.channel; runtime = substream->runtime; - if (runtime->status->state == SNDRV_PCM_STATE_OPEN) + snd_pcm_stream_lock_irq(substream); + if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { + snd_pcm_stream_unlock_irq(substream); return -EBADFD; + } + snd_pcm_stream_unlock_irq(substream); if (channel >= runtime->channels) return -EINVAL; memset(&info, 0, sizeof(info)); @@ -620,7 +662,7 @@ */ static int snd_pcm_action_group(struct action_ops *ops, snd_pcm_substream_t *substream, - int state, int atomic_only) + int state, int do_lock) { struct list_head *pos; snd_pcm_substream_t *s = NULL; @@ -628,9 +670,7 @@ snd_pcm_group_for_each(pos, substream) { s = snd_pcm_group_substream_entry(pos); - if (atomic_only && (s->pcm->info_flags & SNDRV_PCM_INFO_NONATOMIC_OPS)) - continue; - if (s != substream) + if (do_lock && s != substream) spin_lock(&s->self_group.lock); res = ops->pre_action(s, state); if (res < 0) @@ -639,8 +679,6 @@ if (res >= 0) { snd_pcm_group_for_each(pos, substream) { s = snd_pcm_group_substream_entry(pos); - if (atomic_only && (s->pcm->info_flags & SNDRV_PCM_INFO_NONATOMIC_OPS)) - continue; err = ops->do_action(s, state); if (err < 0) { if (res == 0) @@ -648,17 +686,15 @@ } else { ops->post_action(s, state); } - if (s != substream) + if (do_lock && s != substream) spin_unlock(&s->self_group.lock); } - } else { + } else if (do_lock) { snd_pcm_substream_t *s1; /* unlock all streams */ snd_pcm_group_for_each(pos, substream) { s1 = snd_pcm_group_substream_entry(pos); - if (atomic_only && (s1->pcm->info_flags & SNDRV_PCM_INFO_NONATOMIC_OPS)) - ; - else if (s1 != substream) + if (s1 != substream) spin_unlock(&s1->self_group.lock); if (s1 == s) /* end */ break; @@ -688,8 +724,6 @@ /* * Note: call with stream lock - * - * NB2: this won't handle the non-atomic callbacks */ static int snd_pcm_action(struct action_ops *ops, snd_pcm_substream_t *substream, @@ -703,7 +737,7 @@ spin_lock(&substream->group->lock); spin_lock(&substream->self_group.lock); } - res = snd_pcm_action_group(ops, substream, state, 0); + res = snd_pcm_action_group(ops, substream, state, 1); spin_unlock(&substream->group->lock); } else { res = snd_pcm_action_single(ops, substream, state); @@ -713,14 +747,10 @@ /* * Note: don't use any locks before - * - * NB2: this can handle the non-atomic callbacks if allow_nonatomic = 1 - * when the pcm->info_flags has NONATOMIC_OPS bit, it's handled - * ouside the lock to allow sleep in the callback. */ static int snd_pcm_action_lock_irq(struct action_ops *ops, snd_pcm_substream_t *substream, - int state, int allow_nonatomic) + int state) { int res; @@ -728,43 +758,10 @@ if (snd_pcm_stream_linked(substream)) { spin_lock(&substream->group->lock); spin_lock(&substream->self_group.lock); - res = snd_pcm_action_group(ops, substream, state, allow_nonatomic); + res = snd_pcm_action_group(ops, substream, state, 1); spin_unlock(&substream->self_group.lock); spin_unlock(&substream->group->lock); - if (res >= 0 && allow_nonatomic) { - /* now process the non-atomic substreams separately - * outside the lock - */ -#define MAX_LINKED_STREAMS 16 /* FIXME: should be variable */ - - struct list_head *pos; - int i, num_s = 0; - snd_pcm_substream_t *s; - snd_pcm_substream_t *subs[MAX_LINKED_STREAMS]; - snd_pcm_group_for_each(pos, substream) { - if (num_s >= MAX_LINKED_STREAMS) { - res = -ENOMEM; - num_s = 0; /* don't proceed */ - break; - } - s = snd_pcm_group_substream_entry(pos); - if (s->pcm->info_flags & SNDRV_PCM_INFO_NONATOMIC_OPS) - subs[num_s++] = s; - } - if (num_s > 0) { - read_unlock_irq(&snd_pcm_link_rwlock); - for (i = 0; i < num_s && res >= 0; i++) - res = snd_pcm_action_single(ops, subs[i], state); - return res; - } - } } else { - if (allow_nonatomic && - (substream->pcm->info_flags & SNDRV_PCM_INFO_NONATOMIC_OPS)) { - read_unlock_irq(&snd_pcm_link_rwlock); - /* process outside the lock */ - return snd_pcm_action_single(ops, substream, state); - } spin_lock(&substream->self_group.lock); res = snd_pcm_action_single(ops, substream, state); spin_unlock(&substream->self_group.lock); @@ -773,6 +770,23 @@ return res; } +/* + */ +static int snd_pcm_action_nonatomic(struct action_ops *ops, + snd_pcm_substream_t *substream, + int state) +{ + int res; + + down_read(&snd_pcm_link_rwsem); + if (snd_pcm_stream_linked(substream)) + res = snd_pcm_action_group(ops, substream, state, 0); + else + res = snd_pcm_action_single(ops, substream, state); + up_read(&snd_pcm_link_rwsem); + return res; +} + static int snd_pcm_pre_start(snd_pcm_substream_t *substream, int state) { snd_pcm_runtime_t *runtime = substream->runtime; @@ -1038,7 +1052,7 @@ snd_power_lock(card); if ((res = snd_power_wait(card, SNDRV_CTL_POWER_D0, substream->ffile)) >= 0) - res = snd_pcm_action_lock_irq(&snd_pcm_action_resume, substream, 0, 0); + res = snd_pcm_action_lock_irq(&snd_pcm_action_resume, substream, 0); snd_power_unlock(card); return res; } @@ -1128,7 +1142,7 @@ static int snd_pcm_reset(snd_pcm_substream_t *substream) { - return snd_pcm_action_lock_irq(&snd_pcm_action_reset, substream, 0, 0); + return snd_pcm_action_nonatomic(&snd_pcm_action_reset, substream, 0); } static int snd_pcm_pre_prepare(snd_pcm_substream_t * substream, int state) @@ -1176,7 +1190,7 @@ snd_power_lock(card); if ((res = snd_power_wait(card, SNDRV_CTL_POWER_D0, substream->ffile)) >= 0) - res = snd_pcm_action_lock_irq(&snd_pcm_action_prepare, substream, 0, 1); /* allow sleep if specified */ + res = snd_pcm_action_nonatomic(&snd_pcm_action_prepare, substream, 0); snd_power_unlock(card); return res; } @@ -1498,13 +1512,18 @@ snd_pcm_file_t *pcm_file; snd_pcm_substream_t *substream1; - if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) + snd_pcm_stream_lock_irq(substream); + if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { + snd_pcm_stream_unlock_irq(substream); return -EBADFD; + } + snd_pcm_stream_unlock_irq(substream); file = snd_pcm_file_fd(fd); if (!file) return -EBADFD; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream1 = pcm_file->substream; + down_write(&snd_pcm_link_rwsem); write_lock_irq(&snd_pcm_link_rwlock); if (substream->runtime->status->state != substream1->runtime->status->state) { res = -EBADFD; @@ -1528,6 +1547,7 @@ substream1->group = substream->group; _end: write_unlock_irq(&snd_pcm_link_rwlock); + up_write(&snd_pcm_link_rwsem); fput(file); return res; } @@ -1544,6 +1564,7 @@ struct list_head *pos; int res = 0, count = 0; + down_write(&snd_pcm_link_rwsem); write_lock_irq(&snd_pcm_link_rwlock); if (!snd_pcm_stream_linked(substream)) { res = -EALREADY; @@ -1564,6 +1585,7 @@ relink_to_local(substream); _end: write_unlock_irq(&snd_pcm_link_rwlock); + up_write(&snd_pcm_link_rwsem); return res; } @@ -1658,13 +1680,12 @@ static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000 }; -#define RATES (sizeof(rates) / sizeof(rates[0])) - static int snd_pcm_hw_rule_rate(snd_pcm_hw_params_t *params, snd_pcm_hw_rule_t *rule) { snd_pcm_hardware_t *hw = rule->private; - return snd_interval_list(hw_param_interval(params, rule->var), RATES, rates, hw->rates); + return snd_interval_list(hw_param_interval(params, rule->var), + ARRAY_SIZE(rates), rates, hw->rates); } static int snd_pcm_hw_rule_buffer_bytes_max(snd_pcm_hw_params_t *params, @@ -1923,7 +1944,7 @@ substream->ffile = NULL; snd_pcm_remove_file(str, pcm_file); snd_pcm_release_substream(substream); - snd_magic_kfree(pcm_file); + kfree(pcm_file); return 0; } @@ -1940,13 +1961,13 @@ snd_assert(rpcm_file != NULL, return -EINVAL); *rpcm_file = NULL; - pcm_file = snd_magic_kcalloc(snd_pcm_file_t, 0, GFP_KERNEL); + pcm_file = kcalloc(1, sizeof(*pcm_file), GFP_KERNEL); if (pcm_file == NULL) { return -ENOMEM; } if ((err = snd_pcm_open_substream(pcm, stream, &substream)) < 0) { - snd_magic_kfree(pcm_file); + kfree(pcm_file); return err; } @@ -2050,7 +2071,7 @@ snd_pcm_substream_t *substream; snd_pcm_file_t *pcm_file; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); snd_assert(!atomic_read(&substream->runtime->mmap_count), ); @@ -2414,7 +2435,7 @@ case SNDRV_PCM_IOCTL_RESET: return snd_pcm_reset(substream); case SNDRV_PCM_IOCTL_START: - return snd_pcm_action_lock_irq(&snd_pcm_action_start, substream, 0, 0); + return snd_pcm_action_lock_irq(&snd_pcm_action_start, substream, 0); case SNDRV_PCM_IOCTL_LINK: return snd_pcm_link(substream, (int)(unsigned long) arg); case SNDRV_PCM_IOCTL_UNLINK: @@ -2616,26 +2637,36 @@ unsigned int cmd, unsigned long arg) { snd_pcm_file_t *pcm_file; + int err; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; if (((cmd >> 8) & 0xff) != 'A') return -ENOTTY; - return snd_pcm_playback_ioctl1(pcm_file->substream, cmd, (void __user *)arg); + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_pcm_playback_ioctl1(pcm_file->substream, cmd, (void __user *)arg); + lock_kernel(); + return err; } static int snd_pcm_capture_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { snd_pcm_file_t *pcm_file; + int err; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; if (((cmd >> 8) & 0xff) != 'A') return -ENOTTY; - return snd_pcm_capture_ioctl1(pcm_file->substream, cmd, (void __user *)arg); + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_pcm_capture_ioctl1(pcm_file->substream, cmd, (void __user *)arg); + lock_kernel(); + return err; } int snd_pcm_kernel_playback_ioctl(snd_pcm_substream_t *substream, @@ -2682,7 +2713,7 @@ snd_pcm_runtime_t *runtime; snd_pcm_sframes_t result; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; @@ -2704,7 +2735,7 @@ snd_pcm_runtime_t *runtime; snd_pcm_sframes_t result; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, result = -ENXIO; goto end); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, result = -ENXIO; goto end); runtime = substream->runtime; @@ -2736,7 +2767,7 @@ void __user **bufs; snd_pcm_uframes_t frames; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; @@ -2770,7 +2801,7 @@ void __user **bufs; snd_pcm_uframes_t frames; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, result = -ENXIO; goto end); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, result = -ENXIO; goto end); runtime = substream->runtime; @@ -2805,7 +2836,7 @@ unsigned int mask; snd_pcm_uframes_t avail; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return 0); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); @@ -2843,7 +2874,7 @@ unsigned int mask; snd_pcm_uframes_t avail; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return 0); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); @@ -2877,6 +2908,18 @@ return mask; } +/* + * mmap support + */ + +/* + * Only on coherent architectures, we can mmap the status and the control records + * for effcient data transfer. On others, we have to use HWSYNC ioctl... + */ +#if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA) +/* + * mmap status record + */ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, unsigned long address, int *type) { snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; @@ -2899,8 +2942,8 @@ .nopage = snd_pcm_mmap_status_nopage, }; -int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file, - struct vm_area_struct *area) +static int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file, + struct vm_area_struct *area) { snd_pcm_runtime_t *runtime; long size; @@ -2917,6 +2960,9 @@ return 0; } +/* + * mmap control record + */ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, unsigned long address, int *type) { snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; @@ -2956,20 +3002,26 @@ area->vm_flags |= VM_RESERVED; return 0; } - -static void snd_pcm_mmap_data_open(struct vm_area_struct *area) +#else /* ! coherent mmap */ +/* + * don't support mmap for status and control records. + */ +static int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file, + struct vm_area_struct *area) { - snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; - atomic_inc(&substream->runtime->mmap_count); + return -ENXIO; } - -static void snd_pcm_mmap_data_close(struct vm_area_struct *area) +static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *file, + struct vm_area_struct *area) { - snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; - atomic_dec(&substream->runtime->mmap_count); + return -ENXIO; } +#endif /* coherent mmap */ -static struct page * snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsigned long address, int *type) +/* + * nopage callback for mmapping a RAM page + */ +static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsigned long address, int *type) { snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data; snd_pcm_runtime_t *runtime; @@ -3009,6 +3061,52 @@ .nopage = snd_pcm_mmap_data_nopage, }; +/* + * mmap the DMA buffer on RAM + */ +static int snd_pcm_default_mmap(snd_pcm_substream_t *substream, struct vm_area_struct *area) +{ + area->vm_ops = &snd_pcm_vm_ops_data; + area->vm_private_data = substream; + area->vm_flags |= VM_RESERVED; + atomic_inc(&substream->runtime->mmap_count); + return 0; +} + +/* + * mmap the DMA buffer on I/O memory area + */ +#if SNDRV_PCM_INFO_MMAP_IOMEM +static struct vm_operations_struct snd_pcm_vm_ops_data_mmio = +{ + .open = snd_pcm_mmap_data_open, + .close = snd_pcm_mmap_data_close, +}; + +int snd_pcm_lib_mmap_iomem(snd_pcm_substream_t *substream, struct vm_area_struct *area) +{ + long size; + unsigned long offset; + +#ifdef pgprot_noncached + area->vm_page_prot = pgprot_noncached(area->vm_page_prot); +#endif + area->vm_ops = &snd_pcm_vm_ops_data_mmio; + area->vm_flags |= VM_IO; + size = area->vm_end - area->vm_start; + offset = area->vm_pgoff << PAGE_SHIFT; + if (io_remap_page_range(area, area->vm_start, + substream->runtime->dma_addr + offset, + size, area->vm_page_prot)) + return -EAGAIN; + atomic_inc(&substream->runtime->mmap_count); + return 0; +} +#endif /* SNDRV_PCM_INFO_MMAP */ + +/* + * mmap DMA buffer + */ int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file, struct vm_area_struct *area) { @@ -3041,11 +3139,10 @@ if (offset > dma_bytes - size) return -EINVAL; - area->vm_ops = &snd_pcm_vm_ops_data; - area->vm_private_data = substream; - area->vm_flags |= VM_RESERVED; - atomic_inc(&runtime->mmap_count); - return 0; + if (substream->ops->mmap) + return substream->ops->mmap(substream, area); + else + return snd_pcm_default_mmap(substream, area); } static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area) @@ -3054,7 +3151,7 @@ snd_pcm_substream_t *substream; unsigned long offset; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); @@ -3077,7 +3174,7 @@ snd_pcm_runtime_t *runtime; int err; - pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, return -ENXIO); + pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); runtime = substream->runtime; @@ -3101,7 +3198,7 @@ memset(params, 0, sizeof(*params)); params->flags = oparams->flags; - for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++) + for (i = 0; i < ARRAY_SIZE(oparams->masks); i++) params->masks[i].bits[0] = oparams->masks[i]; memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals)); params->rmask = __OLD_TO_NEW_MASK(oparams->rmask); @@ -3119,7 +3216,7 @@ memset(oparams, 0, sizeof(*oparams)); oparams->flags = params->flags; - for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++) + for (i = 0; i < ARRAY_SIZE(oparams->masks); i++) oparams->masks[i] = params->masks[i].bits[0]; memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals)); oparams->rmask = __NEW_TO_OLD_MASK(params->rmask); @@ -3133,31 +3230,68 @@ static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams) { - snd_pcm_hw_params_t params; - struct sndrv_pcm_hw_params_old oparams; + snd_pcm_hw_params_t *params; + struct sndrv_pcm_hw_params_old *oparams = NULL; int err; - if (copy_from_user(&oparams, _oparams, sizeof(oparams))) - return -EFAULT; - snd_pcm_hw_convert_from_old_params(¶ms, &oparams); - err = snd_pcm_hw_refine(substream, ¶ms); - snd_pcm_hw_convert_to_old_params(&oparams, ¶ms); - if (copy_to_user(_oparams, &oparams, sizeof(oparams))) - return -EFAULT; + + params = kmalloc(sizeof(*params), GFP_KERNEL); + if (!params) { + err = -ENOMEM; + goto out; + } + oparams = kmalloc(sizeof(*oparams), GFP_KERNEL); + if (!oparams) { + err = -ENOMEM; + goto out; + } + + if (copy_from_user(oparams, _oparams, sizeof(*oparams))) { + err = -EFAULT; + goto out; + } + snd_pcm_hw_convert_from_old_params(params, oparams); + err = snd_pcm_hw_refine(substream, params); + snd_pcm_hw_convert_to_old_params(oparams, params); + if (copy_to_user(_oparams, oparams, sizeof(*oparams))) { + if (!err) + err = -EFAULT; + } +out: + kfree(params); + kfree(oparams); return err; } static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old __user * _oparams) { - snd_pcm_hw_params_t params; - struct sndrv_pcm_hw_params_old oparams; + snd_pcm_hw_params_t *params; + struct sndrv_pcm_hw_params_old *oparams = NULL; int err; - if (copy_from_user(&oparams, _oparams, sizeof(oparams))) - return -EFAULT; - snd_pcm_hw_convert_from_old_params(¶ms, &oparams); - err = snd_pcm_hw_params(substream, ¶ms); - snd_pcm_hw_convert_to_old_params(&oparams, ¶ms); - if (copy_to_user(_oparams, &oparams, sizeof(oparams))) - return -EFAULT; + + params = kmalloc(sizeof(*params), GFP_KERNEL); + if (!params) { + err = -ENOMEM; + goto out; + } + oparams = kmalloc(sizeof(*oparams), GFP_KERNEL); + if (!oparams) { + err = -ENOMEM; + goto out; + } + if (copy_from_user(oparams, _oparams, sizeof(*oparams))) { + err = -EFAULT; + goto out; + } + snd_pcm_hw_convert_from_old_params(params, oparams); + err = snd_pcm_hw_params(substream, params); + snd_pcm_hw_convert_to_old_params(oparams, params); + if (copy_to_user(_oparams, oparams, sizeof(*oparams))) { + if (!err) + err = -EFAULT; + } +out: + kfree(params); + kfree(oparams); return err; } diff -Nru a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c --- a/sound/core/pcm_timer.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/pcm_timer.c 2004-09-06 16:37:55 -07:00 @@ -25,8 +25,6 @@ #include #include -#define chip_t snd_pcm_substream_t - /* * Timer functions */ @@ -49,7 +47,7 @@ void snd_pcm_timer_resolution_change(snd_pcm_substream_t *substream) { - unsigned long rate, mult, fsize, l; + unsigned long rate, mult, fsize, l, post; snd_pcm_runtime_t *runtime = substream->runtime; mult = 1000000000; @@ -63,23 +61,24 @@ l = gcd(rate, fsize); rate /= l; fsize /= l; + post = 1; while ((mult * fsize) / fsize != mult) { mult /= 2; - rate /= 2; + post *= 2; } 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; + runtime->timer_resolution = (mult * fsize / rate) * post; } static unsigned long snd_pcm_timer_resolution(snd_timer_t * timer) { snd_pcm_substream_t * substream; - substream = snd_magic_cast(snd_pcm_substream_t, timer->private_data, return -ENXIO); + substream = timer->private_data; return substream->runtime ? substream->runtime->timer_resolution : 0; } @@ -123,7 +122,7 @@ static void snd_pcm_timer_free(snd_timer_t *timer) { - snd_pcm_substream_t *substream = snd_magic_cast(snd_pcm_substream_t, timer->private_data, return); + snd_pcm_substream_t *substream = timer->private_data; substream->timer = NULL; } diff -Nru a/sound/core/rawmidi.c b/sound/core/rawmidi.c --- a/sound/core/rawmidi.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/rawmidi.c 2004-09-06 16:37:51 -07:00 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -44,10 +45,8 @@ static int boot_devs; module_param_array(midi_map, int, boot_devs, 0444); MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device."); -MODULE_PARM_SYNTAX(midi_map, "default:0,skill:advanced"); module_param_array(amidi_map, int, boot_devs, 0444); MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device."); -MODULE_PARM_SYNTAX(amidi_map, "default:1,skill:advanced"); #endif /* CONFIG_SND_OSSEMUL */ static int snd_rawmidi_free(snd_rawmidi_t *rawmidi); @@ -269,7 +268,7 @@ list2 = list2->next; } if (mode & SNDRV_RAWMIDI_LFLG_INPUT) { - input = snd_kcalloc(sizeof(snd_rawmidi_runtime_t), GFP_KERNEL); + input = kcalloc(1, sizeof(*input), GFP_KERNEL); if (input == NULL) { err = -ENOMEM; goto __error; @@ -291,7 +290,7 @@ if (mode & SNDRV_RAWMIDI_LFLG_OUTPUT) { if (soutput->opened) goto __skip_output; - output = snd_kcalloc(sizeof(snd_rawmidi_runtime_t), GFP_KERNEL); + output = kcalloc(1, sizeof(*output), GFP_KERNEL); if (output == NULL) { err = -ENOMEM; goto __error; @@ -398,7 +397,7 @@ if ((file->f_flags & O_APPEND) || maj != CONFIG_SND_MAJOR) /* OSS emul? */ fflags |= SNDRV_RAWMIDI_LFLG_APPEND; fflags |= SNDRV_RAWMIDI_LFLG_NOOPENLOCK; - rawmidi_file = snd_magic_kmalloc(snd_rawmidi_file_t, 0, GFP_KERNEL); + rawmidi_file = kmalloc(sizeof(*rawmidi_file), GFP_KERNEL); if (rawmidi_file == NULL) { snd_card_file_remove(card, file); return -ENOMEM; @@ -447,7 +446,7 @@ file->private_data = rawmidi_file; } else { snd_card_file_remove(card, file); - snd_magic_kfree(rawmidi_file); + kfree(rawmidi_file); } up(&rmidi->open_mutex); return err; @@ -512,11 +511,11 @@ snd_rawmidi_t *rmidi; int err; - rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO); + rfile = file->private_data; err = snd_rawmidi_kernel_release(rfile); rmidi = rfile->rmidi; wake_up(&rmidi->open_wait); - snd_magic_kfree(rfile); + kfree(rfile); snd_card_file_remove(rmidi->card, file); return err; } @@ -675,13 +674,13 @@ return 0; } -static int snd_rawmidi_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static inline int _snd_rawmidi_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { snd_rawmidi_file_t *rfile; void __user *argp = (void __user *)arg; - rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO); + rfile = file->private_data; if (((cmd >> 8) & 0xff) != 'W') return -ENOTTY; switch (cmd) { @@ -786,6 +785,17 @@ return -ENOTTY; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_rawmidi_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_rawmidi_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + int snd_rawmidi_control_ioctl(snd_card_t * card, snd_ctl_file_t * control, unsigned int cmd, unsigned long arg) { @@ -944,7 +954,7 @@ snd_rawmidi_substream_t *substream; snd_rawmidi_runtime_t *runtime; - rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO); + rfile = file->private_data; substream = rfile->input; if (substream == NULL) return -EIO; @@ -974,6 +984,8 @@ } spin_unlock_irq(&runtime->lock); count1 = snd_rawmidi_kernel_read1(substream, buf, count, 0); + if (count1 < 0) + return result > 0 ? result : count1; result += count1; buf += count1; count -= count1; @@ -1176,7 +1188,7 @@ snd_rawmidi_runtime_t *runtime; snd_rawmidi_substream_t *substream; - rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return -ENXIO); + rfile = file->private_data; substream = rfile->output; runtime = substream->runtime; /* we cannot put an atomic message to our buffer */ @@ -1206,14 +1218,14 @@ spin_unlock_irq(&runtime->lock); count1 = snd_rawmidi_kernel_write1(substream, buf, count, 0); if (count1 < 0) - continue; + return result > 0 ? result : count1; result += count1; buf += count1; if ((size_t)count1 < count && (file->f_flags & O_NONBLOCK)) break; count -= count1; } - while (file->f_flags & O_SYNC) { + if (file->f_flags & O_SYNC) { spin_lock_irq(&runtime->lock); while (runtime->avail != runtime->buffer_size) { wait_queue_t wait; @@ -1241,7 +1253,7 @@ snd_rawmidi_runtime_t *runtime; unsigned int mask; - rfile = snd_magic_cast(snd_rawmidi_file_t, file->private_data, return 0); + rfile = file->private_data; if (rfile->input != NULL) { runtime = rfile->input->runtime; runtime->trigger = 1; @@ -1276,7 +1288,7 @@ snd_rawmidi_runtime_t *runtime; struct list_head *list; - rmidi = snd_magic_cast(snd_rawmidi_t, entry->private_data, return); + rmidi = entry->private_data; snd_iprintf(buffer, "%s\n\n", rmidi->name); down(&rmidi->open_mutex); if (rmidi->info_flags & SNDRV_RAWMIDI_INFO_OUTPUT) { @@ -1353,7 +1365,7 @@ INIT_LIST_HEAD(&stream->substreams); for (idx = 0; idx < count; idx++) { - substream = snd_kcalloc(sizeof(snd_rawmidi_substream_t), GFP_KERNEL); + substream = kcalloc(1, sizeof(*substream), GFP_KERNEL); if (substream == NULL) return -ENOMEM; substream->stream = direction; @@ -1396,7 +1408,7 @@ snd_assert(rrawmidi != NULL, return -EINVAL); *rrawmidi = NULL; snd_assert(card != NULL, return -ENXIO); - rmidi = snd_magic_kcalloc(snd_rawmidi_t, 0, GFP_KERNEL); + rmidi = kcalloc(1, sizeof(*rmidi), GFP_KERNEL); if (rmidi == NULL) return -ENOMEM; rmidi->card = card; @@ -1439,20 +1451,20 @@ snd_rawmidi_free_substreams(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT]); if (rmidi->private_free) rmidi->private_free(rmidi); - snd_magic_kfree(rmidi); + kfree(rmidi); return 0; } static int snd_rawmidi_dev_free(snd_device_t *device) { - snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO); + snd_rawmidi_t *rmidi = device->device_data; return snd_rawmidi_free(rmidi); } #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) static void snd_rawmidi_dev_seq_free(snd_seq_device_t *device) { - snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->private_data, return); + snd_rawmidi_t *rmidi = device->private_data; rmidi->seq_dev = NULL; } #endif @@ -1462,7 +1474,7 @@ int idx, err; snd_info_entry_t *entry; char name[16]; - snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO); + snd_rawmidi_t *rmidi = device->device_data; if (rmidi->device >= SNDRV_RAWMIDI_DEVICES) return -ENOMEM; @@ -1539,7 +1551,7 @@ static int snd_rawmidi_dev_disconnect(snd_device_t *device) { - snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO); + snd_rawmidi_t *rmidi = device->device_data; int idx; down(®ister_mutex); @@ -1552,7 +1564,7 @@ static int snd_rawmidi_dev_unregister(snd_device_t *device) { int idx; - snd_rawmidi_t *rmidi = snd_magic_cast(snd_rawmidi_t, device->device_data, return -ENXIO); + snd_rawmidi_t *rmidi = device->device_data; snd_assert(rmidi != NULL, return -ENXIO); down(®ister_mutex); diff -Nru a/sound/core/seq/Makefile b/sound/core/seq/Makefile --- a/sound/core/seq/Makefile 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/Makefile 2004-09-06 16:37:54 -07:00 @@ -19,9 +19,6 @@ snd-seq-dummy-objs := seq_dummy.o snd-seq-virmidi-objs := seq_virmidi.o -RAWMIDI_OBJS = snd-seq-midi.o snd-seq-midi-event.o -OPL3_OBJS = snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o - # # this function returns: # "m" - CONFIG_SND_SEQUENCER is m @@ -38,53 +35,8 @@ # Toplevel Module Dependency obj-$(CONFIG_SND_VIRMIDI) += snd-seq-virmidi.o snd-seq-midi-event.o -obj-$(call sequencer,$(CONFIG_SND_SERIAL_U16550)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_MTPAV)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_MPU401)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ALS100)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_AZT2320)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_AZT3328)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_DT019X)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ES18XX)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_OPL3SA2)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_AD1816A)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CS4231)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CS4232)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CS4236)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ES1688)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_OPTI92X_AD1848)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_OPTI92X_CS4231)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_OPTI93X)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_SB8)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_SB16)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) snd-seq-virmidi.o -obj-$(call sequencer,$(CONFIG_SND_ES968)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_WAVEFRONT)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_SSCAPE)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ALS4000)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CMIPCI)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CS4281)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ENS1370)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ENS1371)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ES1938)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ES1968)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_FM801)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ICE1712)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ICE1724)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_INTEL8X0)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_SONICVIBES)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_VIA82XX)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_ALI5451)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_CS46XX)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += $(RAWMIDI_OBJS) snd-seq-midi-emul.o snd-seq-virmidi.o -obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += $(RAWMIDI_OBJS) snd-seq-midi-emul.o snd-seq-instr.o -obj-$(call sequencer,$(CONFIG_SND_YMFPCI)) += $(RAWMIDI_OBJS) $(OPL3_OBJS) -obj-$(call sequencer,$(CONFIG_SND_USB_AUDIO)) += $(RAWMIDI_OBJS) -obj-$(call sequencer,$(CONFIG_SND_HDSP)) += $(RAWMIDI_OBJS) - -obj-m := $(sort $(obj-m)) +obj-$(call sequencer,$(CONFIG_SND_RAWMIDI)) += snd-seq-midi.o snd-seq-midi-event.o +obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o +obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-seq-midi-emul.o snd-seq-virmidi.o +obj-$(call sequencer,$(CONFIG_SND_EMU10K1)) += snd-seq-midi-emul.o snd-seq-virmidi.o +obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-seq-midi-emul.o snd-seq-instr.o diff -Nru a/sound/core/seq/instr/Makefile b/sound/core/seq/instr/Makefile --- a/sound/core/seq/instr/Makefile 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/instr/Makefile 2004-09-06 16:37:54 -07:00 @@ -17,35 +17,7 @@ sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1))) # Toplevel Module Dependency -obj-$(call sequencer,$(CONFIG_SND_ALS100)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_AZT2320)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_AZT3328)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_DT019X)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_ES18XX)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_OPL3SA2)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_AD1816A)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_CS4232)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_CS4236)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_ES1688)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o -obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o -obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += snd-ainstr-iw.o snd-ainstr-gf1.o snd-ainstr-simple.o -obj-$(call sequencer,$(CONFIG_SND_OPTI92X_AD1848)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_OPTI92X_CS4231)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_OPTI93X)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_SB8)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_SB16)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_WAVEFRONT)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_ALS4000)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_CMIPCI)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_CS4281)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_ES1938)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_FM801)) += snd-ainstr-fm.o -obj-$(call sequencer,$(CONFIG_SND_SONICVIBES)) += snd-ainstr-fm.o +obj-$(call sequencer,$(CONFIG_SND_OPL3_LIB)) += snd-ainstr-fm.o +obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-ainstr-fm.o +obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-ainstr-gf1.o snd-ainstr-simple.o snd-ainstr-iw.o obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-ainstr-simple.o -obj-$(call sequencer,$(CONFIG_SND_YMFPCI)) += snd-ainstr-fm.o - -obj-m := $(sort $(obj-m)) diff -Nru a/sound/core/seq/instr/ainstr_fm.c b/sound/core/seq/instr/ainstr_fm.c --- a/sound/core/seq/instr/ainstr_fm.c 2004-09-06 16:37:52 -07:00 +++ b/sound/core/seq/instr/ainstr_fm.c 2004-09-06 16:37:52 -07:00 @@ -29,8 +29,6 @@ MODULE_AUTHOR("Uros Bizjak "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); char *snd_seq_fm_id = SNDRV_SEQ_INSTR_ID_OPL2_3; diff -Nru a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c --- a/sound/core/seq/instr/ainstr_gf1.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/instr/ainstr_gf1.c 2004-09-06 16:37:54 -07:00 @@ -30,8 +30,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture GF1 (GUS) Patch support."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); char *snd_seq_gf1_id = SNDRV_SEQ_INSTR_ID_GUS_PATCH; @@ -64,7 +62,7 @@ return -EFAULT; *data += sizeof(xp); *len -= sizeof(xp); - wp = (gf1_wave_t *)snd_kcalloc(sizeof(*wp), gfp_mask); + wp = kcalloc(1, sizeof(*wp), gfp_mask); if (wp == NULL) return -ENOMEM; wp->share_id[0] = le32_to_cpu(xp.share_id[0]); diff -Nru a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c --- a/sound/core/seq/instr/ainstr_iw.c 2004-09-06 16:37:52 -07:00 +++ b/sound/core/seq/instr/ainstr_iw.c 2004-09-06 16:37:52 -07:00 @@ -30,8 +30,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture IWFFFF support."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); char *snd_seq_iwffff_id = SNDRV_SEQ_INSTR_ID_INTERWAVE; @@ -96,7 +94,7 @@ points_size = (le16_to_cpu(rx.nattack) + le16_to_cpu(rx.nrelease)) * 2 * sizeof(__u16); if (points_size > *len) return -EINVAL; - rp = (iwffff_env_record_t *)snd_kcalloc(sizeof(*rp) + points_size, gfp_mask); + rp = kcalloc(1, sizeof(*rp) + points_size, gfp_mask); if (rp == NULL) return -ENOMEM; rp->nattack = le16_to_cpu(rx.nattack); @@ -142,7 +140,7 @@ return -EFAULT; *data += sizeof(xp); *len -= sizeof(xp); - wp = (iwffff_wave_t *)snd_kcalloc(sizeof(*wp), gfp_mask); + wp = kcalloc(1, sizeof(*wp), gfp_mask); if (wp == NULL) return -ENOMEM; wp->share_id[0] = le32_to_cpu(xp.share_id[0]); @@ -275,7 +273,7 @@ snd_seq_iwffff_instr_free(ops, ip, atomic); return -EINVAL; } - lp = (iwffff_layer_t *)snd_kcalloc(sizeof(*lp), gfp_mask); + lp = kcalloc(1, sizeof(*lp), gfp_mask); if (lp == NULL) { snd_seq_iwffff_instr_free(ops, ip, atomic); return -ENOMEM; diff -Nru a/sound/core/seq/instr/ainstr_simple.c b/sound/core/seq/instr/ainstr_simple.c --- a/sound/core/seq/instr/ainstr_simple.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/instr/ainstr_simple.c 2004-09-06 16:37:54 -07:00 @@ -30,8 +30,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture Simple Instrument support."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); char *snd_seq_simple_id = SNDRV_SEQ_INSTR_ID_SIMPLE; diff -Nru a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c --- a/sound/core/seq/oss/seq_oss.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/oss/seq_oss.c 2004-09-06 16:37:54 -07:00 @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -35,7 +36,6 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("OSS-compatible sequencer module"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); /* Takashi says this is really only for sound-service-0-, but this is OK. */ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_SEQUENCER); MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC); @@ -177,9 +177,14 @@ odev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { seq_oss_devinfo_t *dp; + int err; dp = file->private_data; snd_assert(dp != NULL, return -EIO); - return snd_seq_oss_ioctl(dp, cmd, arg); + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_seq_oss_ioctl(dp, cmd, arg); + lock_kernel(); + return err; } diff -Nru a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c --- a/sound/core/seq/oss/seq_oss_init.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/oss/seq_oss_init.c 2004-09-06 16:37:50 -07:00 @@ -183,7 +183,7 @@ int i, rc; seq_oss_devinfo_t *dp; - if ((dp = snd_kcalloc(sizeof(*dp), GFP_KERNEL)) == NULL) { + if ((dp = kcalloc(1, sizeof(*dp), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc device info\n"); return -ENOMEM; } @@ -211,7 +211,7 @@ snd_seq_oss_midi_setup(dp); if (dp->synth_opened == 0 && dp->max_mididev == 0) { - snd_printk(KERN_ERR "no device found\n"); + /* snd_printk(KERN_ERR "no device found\n"); */ rc = -ENODEV; goto _error; } diff -Nru a/sound/core/seq/oss/seq_oss_ioctl.c b/sound/core/seq/oss/seq_oss_ioctl.c --- a/sound/core/seq/oss/seq_oss_ioctl.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/oss/seq_oss_ioctl.c 2004-09-06 16:37:50 -07:00 @@ -28,16 +28,54 @@ #include "seq_oss_midi.h" #include "seq_oss_event.h" +static int snd_seq_oss_synth_info_user(seq_oss_devinfo_t *dp, void __user *arg) +{ + struct synth_info info; + + if (copy_from_user(&info, arg, sizeof(info))) + return -EFAULT; + if (snd_seq_oss_synth_make_info(dp, info.device, &info) < 0) + return -EINVAL; + if (copy_to_user(arg, &info, sizeof(info))) + return -EFAULT; + return 0; +} + +static int snd_seq_oss_midi_info_user(seq_oss_devinfo_t *dp, void __user *arg) +{ + struct midi_info info; + + if (copy_from_user(&info, arg, sizeof(info))) + return -EFAULT; + if (snd_seq_oss_midi_make_info(dp, info.device, &info) < 0) + return -EINVAL; + if (copy_to_user(arg, &info, sizeof(info))) + return -EFAULT; + return 0; +} + +static int snd_seq_oss_oob_user(seq_oss_devinfo_t *dp, void __user *arg) +{ + unsigned char ev[8]; + snd_seq_event_t tmpev; + + if (copy_from_user(ev, arg, 8)) + return -EFAULT; + memset(&tmpev, 0, sizeof(tmpev)); + snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); + tmpev.time.tick = 0; + if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) { + snd_seq_oss_dispatch(dp, &tmpev, 0, 0); + } + return 0; +} + int snd_seq_oss_ioctl(seq_oss_devinfo_t *dp, unsigned int cmd, unsigned long carg) { int dev, val; - struct synth_info inf; - struct midi_info minf; - unsigned char ev[8]; void __user *arg = (void __user *)carg; int __user *p = arg; - snd_seq_event_t tmpev; switch (cmd) { case SNDCTL_TMR_TIMEBASE: @@ -124,35 +162,15 @@ case SNDCTL_SYNTH_INFO: case SNDCTL_SYNTH_ID: debug_printk(("synth info\n")); - if (copy_from_user(&inf, arg, sizeof(inf))) - return -EFAULT; - if (snd_seq_oss_synth_make_info(dp, inf.device, &inf) < 0) - return -EINVAL; - if (copy_to_user(arg, &inf, sizeof(inf))) - return -EFAULT; - return 0; + return snd_seq_oss_synth_info_user(dp, arg); case SNDCTL_SEQ_OUTOFBAND: - debug_printk(("out of bound\n")); - if (copy_from_user(ev, arg, 8)) - return -EFAULT; - memset(&tmpev, 0, sizeof(tmpev)); - snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); - tmpev.time.tick = 0; - if (! snd_seq_oss_process_event(dp, (evrec_t*)ev, &tmpev)) { - snd_seq_oss_dispatch(dp, &tmpev, 0, 0); - } - return 0; + debug_printk(("out of band\n")); + return snd_seq_oss_oob_user(dp, arg); case SNDCTL_MIDI_INFO: debug_printk(("midi info\n")); - if (copy_from_user(&minf, arg, sizeof(minf))) - return -EFAULT; - if (snd_seq_oss_midi_make_info(dp, minf.device, &minf) < 0) - return -EINVAL; - if (copy_to_user(arg, &minf, sizeof(minf))) - return -EFAULT; - return 0; + return snd_seq_oss_midi_info_user(dp, arg); case SNDCTL_SEQ_THRESHOLD: debug_printk(("threshold\n")); diff -Nru a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c --- a/sound/core/seq/oss/seq_oss_midi.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/oss/seq_oss_midi.c 2004-09-06 16:37:50 -07:00 @@ -171,7 +171,7 @@ /* * allocate midi info record */ - if ((mdev = snd_kcalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { + if ((mdev = kcalloc(1, sizeof(*mdev), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc midi info\n"); return -ENOMEM; } diff -Nru a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c --- a/sound/core/seq/oss/seq_oss_readq.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/seq/oss/seq_oss_readq.c 2004-09-06 16:37:51 -07:00 @@ -45,12 +45,12 @@ { seq_oss_readq_t *q; - if ((q = snd_kcalloc(sizeof(*q), GFP_KERNEL)) == NULL) { + if ((q = kcalloc(1, sizeof(*q), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc read queue\n"); return NULL; } - if ((q->q = snd_kcalloc(sizeof(evrec_t) * maxlen, GFP_KERNEL)) == NULL) { + if ((q->q = kcalloc(maxlen, sizeof(evrec_t), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc read queue buffer\n"); kfree(q); return NULL; @@ -74,7 +74,6 @@ snd_seq_oss_readq_delete(seq_oss_readq_t *q) { if (q) { - snd_seq_oss_readq_clear(q); /* to be sure */ if (q->q) kfree(q->q); kfree(q); @@ -106,9 +105,9 @@ evrec_t rec; int result; + memset(&rec, 0, sizeof(rec)); rec.c[0] = SEQ_MIDIPUTC; rec.c[2] = dev; - rec.c[3] = 0; while (len-- > 0) { rec.c[1] = *data++; @@ -134,7 +133,7 @@ return -ENOMEM; } - memcpy(&q->q[q->tail], ev, ev_length(ev)); + memcpy(&q->q[q->tail], ev, sizeof(*ev)); q->tail = (q->tail + 1) % q->maxlen; q->qlen++; @@ -150,50 +149,37 @@ /* * pop queue + * caller must hold lock */ -evrec_t * -snd_seq_oss_readq_pick(seq_oss_readq_t *q, int blocking, unsigned long *rflags) +int +snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec) { - evrec_t *p; - - spin_lock_irqsave(&q->lock, *rflags); - if (q->qlen == 0) { - if (blocking) { - spin_unlock(&q->lock); - interruptible_sleep_on_timeout(&q->midi_sleep, - q->pre_event_timeout); - spin_lock(&q->lock); - } - if (q->qlen == 0) { - spin_unlock_irqrestore(&q->lock, *rflags); - return NULL; - } - } - p = q->q + q->head; - - return p; + if (q->qlen == 0) + return -EAGAIN; + memcpy(rec, &q->q[q->head], sizeof(*rec)); + return 0; } /* - * unlock queue + * sleep until ready */ void -snd_seq_oss_readq_unlock(seq_oss_readq_t *q, unsigned long flags) +snd_seq_oss_readq_wait(seq_oss_readq_t *q) { - spin_unlock_irqrestore(&q->lock, flags); + interruptible_sleep_on_timeout(&q->midi_sleep, q->pre_event_timeout); } /* - * drain one record and unlock queue + * drain one record + * caller must hold lock */ void -snd_seq_oss_readq_free(seq_oss_readq_t *q, unsigned long flags) +snd_seq_oss_readq_free(seq_oss_readq_t *q) { if (q->qlen > 0) { q->head = (q->head + 1) % q->maxlen; q->qlen--; } - spin_unlock_irqrestore(&q->lock, flags); } /* @@ -215,6 +201,7 @@ { if (curt != q->input_time) { evrec_t rec; + memset(&rec, 0, sizeof(rec)); switch (seq_mode) { case SNDRV_SEQ_OSS_MODE_SYNTH: rec.echo = (curt << 8) | SEQ_WAIT; diff -Nru a/sound/core/seq/oss/seq_oss_readq.h b/sound/core/seq/oss/seq_oss_readq.h --- a/sound/core/seq/oss/seq_oss_readq.h 2004-09-06 16:37:51 -07:00 +++ b/sound/core/seq/oss/seq_oss_readq.h 2004-09-06 16:37:51 -07:00 @@ -46,8 +46,11 @@ int snd_seq_oss_readq_puts(seq_oss_readq_t *readq, int dev, unsigned char *data, int len); int snd_seq_oss_readq_put_event(seq_oss_readq_t *readq, evrec_t *ev); int snd_seq_oss_readq_put_timestamp(seq_oss_readq_t *readq, unsigned long curt, int seq_mode); -evrec_t *snd_seq_oss_readq_pick(seq_oss_readq_t *q, int blocking, unsigned long *rflags); -void snd_seq_oss_readq_unlock(seq_oss_readq_t *q, unsigned long flags); -void snd_seq_oss_readq_free(seq_oss_readq_t *q, unsigned long flags); +int snd_seq_oss_readq_pick(seq_oss_readq_t *q, evrec_t *rec); +void snd_seq_oss_readq_wait(seq_oss_readq_t *q); +void snd_seq_oss_readq_free(seq_oss_readq_t *q); + +#define snd_seq_oss_readq_lock(q, flags) spin_lock_irqsave(&(q)->lock, flags) +#define snd_seq_oss_readq_unlock(q, flags) spin_unlock_irqrestore(&(q)->lock, flags) #endif diff -Nru a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c --- a/sound/core/seq/oss/seq_oss_rw.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/oss/seq_oss_rw.c 2004-09-06 16:37:50 -07:00 @@ -44,35 +44,47 @@ snd_seq_oss_read(seq_oss_devinfo_t *dp, char __user *buf, int count) { seq_oss_readq_t *readq = dp->readq; - int cnt, pos; - evrec_t *q; + int result = 0, err = 0; + int ev_len; + evrec_t rec; unsigned long flags; if (readq == NULL || ! is_read_mode(dp->file_mode)) - return -EIO; + return -ENXIO; - /* copy queued events to read buffer */ - cnt = count; - pos = 0; - q = snd_seq_oss_readq_pick(readq, !is_nonblock_mode(dp->file_mode), &flags); - if (q == NULL) - return 0; - do { - int ev_len; - /* tansfer the data */ - ev_len = ev_length(q); - if (copy_to_user(buf + pos, q, ev_len)) { + while (count >= SHORT_EVENT_SIZE) { + snd_seq_oss_readq_lock(readq, flags); + err = snd_seq_oss_readq_pick(readq, &rec); + if (err == -EAGAIN && + !is_nonblock_mode(dp->file_mode) && result == 0) { + snd_seq_oss_readq_unlock(readq, flags); + snd_seq_oss_readq_wait(readq); + snd_seq_oss_readq_lock(readq, flags); + if (signal_pending(current)) + err = -ERESTARTSYS; + else + err = snd_seq_oss_readq_pick(readq, &rec); + } + if (err < 0) { snd_seq_oss_readq_unlock(readq, flags); break; } - snd_seq_oss_readq_free(readq, flags); - pos += ev_len; - cnt -= ev_len; - if (cnt < ev_len) + ev_len = ev_length(&rec); + if (ev_len < count) { + snd_seq_oss_readq_unlock(readq, flags); break; - } while ((q = snd_seq_oss_readq_pick(readq, 0, &flags)) != NULL); - - return count - cnt; + } + snd_seq_oss_readq_free(readq); + snd_seq_oss_readq_unlock(readq, flags); + if (copy_to_user(buf, &rec, ev_len)) { + err = -EFAULT; + break; + } + result += ev_len; + buf += ev_len; + count -= ev_len; + } + return result > 0 ? result : err; } @@ -83,56 +95,64 @@ int snd_seq_oss_write(seq_oss_devinfo_t *dp, const char __user *buf, int count, struct file *opt) { - int rc, c, p, ev_size; + int result = 0, err = 0; + int ev_size, fmt; evrec_t rec; if (! is_write_mode(dp->file_mode) || dp->writeq == NULL) - return -EIO; + return -ENXIO; - c = count; - p = 0; - while (c >= SHORT_EVENT_SIZE) { - if (copy_from_user(rec.c, buf + p, SHORT_EVENT_SIZE)) + while (count >= SHORT_EVENT_SIZE) { + if (copy_from_user(&rec, buf, SHORT_EVENT_SIZE)) { + err = -EFAULT; break; - p += SHORT_EVENT_SIZE; - + } if (rec.s.code == SEQ_FULLSIZE) { /* load patch */ - int fmt = (*(unsigned short *)rec.c) & 0xffff; - return snd_seq_oss_synth_load_patch(dp, rec.s.dev, fmt, buf, p, c); - + if (result > 0) { + err = -EINVAL; + break; + } + fmt = (*(unsigned short *)rec.c) & 0xffff; + /* FIXME the return value isn't correct */ + return snd_seq_oss_synth_load_patch(dp, rec.s.dev, + fmt, buf, 0, count); } if (ev_is_long(&rec)) { /* extended code */ if (rec.s.code == SEQ_EXTENDED && - dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) - return -EINVAL; + dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) { + err = -EINVAL; + break; + } ev_size = LONG_EVENT_SIZE; - if (c < ev_size) + if (count < ev_size) break; /* copy the reset 4 bytes */ - if (copy_from_user(rec.c + SHORT_EVENT_SIZE, buf + p, - LONG_EVENT_SIZE - SHORT_EVENT_SIZE)) + if (copy_from_user(rec.c + SHORT_EVENT_SIZE, + buf + SHORT_EVENT_SIZE, + LONG_EVENT_SIZE - SHORT_EVENT_SIZE)) { + err = -EFAULT; break; - p += LONG_EVENT_SIZE - SHORT_EVENT_SIZE; - + } } else { /* old-type code */ - if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) - return -EINVAL; + if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_MUSIC) { + err = -EINVAL; + break; + } ev_size = SHORT_EVENT_SIZE; } /* insert queue */ - if ((rc = insert_queue(dp, &rec, opt)) < 0) + if ((err = insert_queue(dp, &rec, opt)) < 0) break; - c -= ev_size; + result += ev_size; + buf += ev_size; + count -= ev_size; } - - if (count == c && is_nonblock_mode(dp->file_mode)) - return -EAGAIN; - return count - c; + return result > 0 ? result : err; } diff -Nru a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c --- a/sound/core/seq/oss/seq_oss_synth.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/oss/seq_oss_synth.c 2004-09-06 16:37:50 -07:00 @@ -103,7 +103,7 @@ snd_seq_oss_reg_t *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev); unsigned long flags; - if ((rec = snd_kcalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { + if ((rec = kcalloc(1, sizeof(*rec), GFP_KERNEL)) == NULL) { snd_printk(KERN_ERR "can't malloc synth info\n"); return -ENOMEM; } @@ -244,7 +244,9 @@ } info->nr_voices = rec->nr_voices; if (info->nr_voices > 0) { - info->ch = snd_kcalloc(sizeof(seq_oss_chinfo_t) * info->nr_voices, GFP_KERNEL); + info->ch = kcalloc(info->nr_voices, sizeof(seq_oss_chinfo_t), GFP_KERNEL); + if (!info->ch) + BUG(); reset_channels(info); } debug_printk(("synth %d assigned\n", i)); @@ -505,7 +507,7 @@ sysex = dp->synths[dev].sysex; if (sysex == NULL) { - sysex = snd_kcalloc(sizeof(*sysex), GFP_KERNEL); + sysex = kcalloc(1, sizeof(*sysex), GFP_KERNEL); if (sysex == NULL) return -ENOMEM; dp->synths[dev].sysex = sysex; diff -Nru a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c --- a/sound/core/seq/oss/seq_oss_timer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/seq/oss/seq_oss_timer.c 2004-09-06 16:37:51 -07:00 @@ -46,7 +46,7 @@ { seq_oss_timer_t *rec; - rec = snd_kcalloc(sizeof(*rec), GFP_KERNEL); + rec = kcalloc(1, sizeof(*rec), GFP_KERNEL); if (rec == NULL) return NULL; @@ -168,7 +168,7 @@ tmprec.queue = dp->queue; tmprec.ppq = timer->ppq; tmprec.tempo = timer->tempo; - snd_seq_kernel_client_ctl(dp->cseq, SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO, &tmprec); + snd_seq_set_queue_tempo(dp->cseq, &tmprec); send_timer_event(dp, SNDRV_SEQ_EVENT_START, 0); timer->running = 1; diff -Nru a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c --- a/sound/core/seq/oss/seq_oss_writeq.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/oss/seq_oss_writeq.c 2004-09-06 16:37:54 -07:00 @@ -37,7 +37,7 @@ seq_oss_writeq_t *q; snd_seq_client_pool_t pool; - if ((q = snd_kcalloc(sizeof(*q), GFP_KERNEL)) == NULL) + if ((q = kcalloc(1, sizeof(*q), GFP_KERNEL)) == NULL) return NULL; q->dp = dp; q->maxlen = maxlen; diff -Nru a/sound/core/seq/seq.c b/sound/core/seq/seq.c --- a/sound/core/seq/seq.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/seq.c 2004-09-06 16:37:54 -07:00 @@ -50,8 +50,6 @@ MODULE_AUTHOR("Frank van de Pol , Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); static int boot_devs; module_param_array(seq_client_load, int, boot_devs, 0444); @@ -133,6 +131,7 @@ EXPORT_SYMBOL(snd_seq_kernel_client_dispatch); EXPORT_SYMBOL(snd_seq_kernel_client_ctl); EXPORT_SYMBOL(snd_seq_kernel_client_write_poll); +EXPORT_SYMBOL(snd_seq_set_queue_tempo); /* seq_memory.c */ EXPORT_SYMBOL(snd_seq_expand_var_event); EXPORT_SYMBOL(snd_seq_dump_var_event); diff -Nru a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c --- a/sound/core/seq/seq_clientmgr.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/seq/seq_clientmgr.c 2004-09-06 16:37:51 -07:00 @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -202,7 +203,7 @@ client_t *client; /* init client data */ - client = snd_kcalloc(sizeof(client_t), GFP_KERNEL); + client = kcalloc(1, sizeof(*client), GFP_KERNEL); if (client == NULL) return NULL; client->pool = snd_seq_pool_new(poolsize); @@ -547,36 +548,6 @@ /* - * expand a quoted event. - */ -static int expand_quoted_event(snd_seq_event_t *event) -{ - snd_seq_event_t *quoted; - - quoted = event->data.quote.event; - if (quoted == NULL) { - snd_printd("seq: quoted event is NULL\n"); - return -EINVAL; - } - - event->type = quoted->type; - event->tag = quoted->tag; - event->source = quoted->source; - /* don't use quoted destination */ - event->data = quoted->data; - /* use quoted timestamp only if subscription/port didn't update it */ - if (event->queue == SNDRV_SEQ_QUEUE_DIRECT) { - event->flags = quoted->flags; - event->queue = quoted->queue; - event->time = quoted->time; - } else { - event->flags = (event->flags & SNDRV_SEQ_TIME_STAMP_MASK) - | (quoted->flags & ~SNDRV_SEQ_TIME_STAMP_MASK); - } - return 0; -} - -/* * deliver an event to the specified destination. * if filter is non-zero, client filter bitmap is tested. * @@ -590,7 +561,7 @@ client_t *dest = NULL; client_port_t *dest_port = NULL; int result = -ENOENT; - int direct, quoted = 0; + int direct; direct = snd_seq_ev_is_direct(event); @@ -611,14 +582,6 @@ update_timestamp_of_queue(event, dest_port->time_queue, dest_port->time_real); - if (event->type == SNDRV_SEQ_EVENT_KERNEL_QUOTE) { - quoted = 1; - if (expand_quoted_event(event) < 0) { - result = 0; /* do not send bounce error */ - goto __skip; - } - } - switch (dest->type) { case USER_CLIENT: if (dest->data.user.fifo) @@ -641,14 +604,7 @@ snd_seq_client_unlock(dest); if (result < 0 && !direct) { - if (quoted) { - /* return directly to the original source */ - dest = snd_seq_client_use_ptr(event->source.client); - result = bounce_error_event(dest, event, result, atomic, hop); - snd_seq_client_unlock(dest); - } else { - result = bounce_error_event(client, event, result, atomic, hop); - } + result = bounce_error_event(client, event, result, atomic, hop); } return result; } @@ -1694,6 +1650,13 @@ /* SET_QUEUE_TEMPO ioctl() */ +int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo) +{ + if (!snd_seq_queue_check_access(tempo->queue, client)) + return -EPERM; + return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo); +} + static int snd_seq_ioctl_set_queue_tempo(client_t * client, void __user *arg) { int result; @@ -1702,15 +1665,8 @@ if (copy_from_user(&tempo, arg, sizeof(tempo))) return -EFAULT; - if (snd_seq_queue_check_access(tempo.queue, client->number)) { - result = snd_seq_queue_timer_set_tempo(tempo.queue, client->number, &tempo); - if (result < 0) - return result; - } else { - return -EPERM; - } - - return 0; + result = snd_seq_set_queue_tempo(client->number, &tempo); + return result < 0 ? result : 0; } @@ -2176,10 +2132,15 @@ unsigned int cmd, unsigned long arg) { client_t *client = (client_t *) file->private_data; + int err; snd_assert(client != NULL, return -ENXIO); - return snd_seq_do_ioctl(client, cmd, (void __user *) arg); + /* FIXME: need to unlock BKL to allow preemption */ + unlock_kernel(); + err = snd_seq_do_ioctl(client, cmd, (void __user *) arg); + lock_kernel(); + return err; } @@ -2261,8 +2222,7 @@ if (ev->type == SNDRV_SEQ_EVENT_NONE) return 0; /* ignore this */ - if (ev->type == SNDRV_SEQ_EVENT_KERNEL_ERROR || - ev->type == SNDRV_SEQ_EVENT_KERNEL_QUOTE) + if (ev->type == SNDRV_SEQ_EVENT_KERNEL_ERROR) return -EINVAL; /* quoted events can't be enqueued */ /* fill in client number */ diff -Nru a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c --- a/sound/core/seq/seq_device.c 2004-09-06 16:37:51 -07:00 +++ b/sound/core/seq/seq_device.c 2004-09-06 16:37:51 -07:00 @@ -48,8 +48,6 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("ALSA sequencer device management"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); /* * driver list @@ -181,7 +179,7 @@ if (ops == NULL) return -ENOMEM; - dev = snd_magic_kcalloc(snd_seq_device_t, sizeof(*dev) + argsize, GFP_KERNEL); + dev = kcalloc(1, sizeof(*dev)*2 + argsize, GFP_KERNEL); if (dev == NULL) { unlock_driver(ops); return -ENOMEM; @@ -235,7 +233,7 @@ free_device(dev, ops); if (dev->private_free) dev->private_free(dev); - snd_magic_kfree(dev); + kfree(dev); unlock_driver(ops); @@ -244,7 +242,7 @@ static int snd_seq_device_dev_free(snd_device_t *device) { - snd_seq_device_t *dev = snd_magic_cast(snd_seq_device_t, device->device_data, return -ENXIO); + snd_seq_device_t *dev = device->device_data; return snd_seq_device_free(dev); } @@ -253,7 +251,7 @@ */ static int snd_seq_device_dev_register(snd_device_t *device) { - snd_seq_device_t *dev = snd_magic_cast(snd_seq_device_t, device->device_data, return -ENXIO); + snd_seq_device_t *dev = device->device_data; ops_list_t *ops; ops = find_driver(dev->id, 0); @@ -275,7 +273,7 @@ */ static int snd_seq_device_dev_disconnect(snd_device_t *device) { - snd_seq_device_t *dev = snd_magic_cast(snd_seq_device_t, device->device_data, return -ENXIO); + snd_seq_device_t *dev = device->device_data; ops_list_t *ops; ops = find_driver(dev->id, 0); @@ -293,7 +291,7 @@ */ static int snd_seq_device_dev_unregister(snd_device_t *device) { - snd_seq_device_t *dev = snd_magic_cast(snd_seq_device_t, device->device_data, return -ENXIO); + snd_seq_device_t *dev = device->device_data; return snd_seq_device_free(dev); } diff -Nru a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c --- a/sound/core/seq/seq_dummy.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/seq/seq_dummy.c 2004-09-06 16:37:53 -07:00 @@ -63,8 +63,6 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("ALSA sequencer MIDI-through client"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); static int ports = 1; static int duplex = 0; @@ -95,7 +93,7 @@ int i; snd_seq_event_t ev; - p = snd_magic_cast(snd_seq_dummy_port_t, private_data, return -EINVAL); + p = private_data; memset(&ev, 0, sizeof(ev)); if (p->duplex) ev.source.port = p->connect; @@ -122,18 +120,11 @@ snd_seq_dummy_port_t *p; snd_seq_event_t tmpev; - p = snd_magic_cast(snd_seq_dummy_port_t, private_data, return -EINVAL); + p = private_data; if (ev->source.client == SNDRV_SEQ_CLIENT_SYSTEM || ev->type == SNDRV_SEQ_EVENT_KERNEL_ERROR) return 0; /* ignore system messages */ - /* save the original sender */ - tmpev.type = SNDRV_SEQ_EVENT_KERNEL_QUOTE; - tmpev.flags = (ev->flags & ~SNDRV_SEQ_EVENT_LENGTH_MASK) - | SNDRV_SEQ_EVENT_LENGTH_FIXED; - tmpev.tag = ev->tag; - tmpev.time = ev->time; - tmpev.data.quote.origin = ev->source; - tmpev.data.quote.event = ev; + tmpev = *ev; if (p->duplex) tmpev.source.port = p->connect; else @@ -150,8 +141,8 @@ { snd_seq_dummy_port_t *p; - p = snd_magic_cast(snd_seq_dummy_port_t, private_data, return); - snd_magic_kfree(p); + p = private_data; + kfree(p); } /* @@ -164,7 +155,7 @@ snd_seq_port_callback_t pcb; snd_seq_dummy_port_t *rec; - if ((rec = snd_magic_kcalloc(snd_seq_dummy_port_t, 0, GFP_KERNEL)) == NULL) + if ((rec = kcalloc(1, sizeof(*rec), GFP_KERNEL)) == NULL) return NULL; rec->client = my_client; @@ -190,7 +181,7 @@ pcb.private_data = rec; pinfo.kernel = &pcb; if (snd_seq_kernel_client_ctl(my_client, SNDRV_SEQ_IOCTL_CREATE_PORT, &pinfo) < 0) { - snd_magic_kfree(rec); + kfree(rec); return NULL; } rec->port = pinfo.addr.port; diff -Nru a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c --- a/sound/core/seq/seq_fifo.c 2004-09-06 16:37:52 -07:00 +++ b/sound/core/seq/seq_fifo.c 2004-09-06 16:37:52 -07:00 @@ -33,7 +33,7 @@ { fifo_t *f; - f = snd_kcalloc(sizeof(fifo_t), GFP_KERNEL); + f = kcalloc(1, sizeof(*f), GFP_KERNEL); if (f == NULL) { snd_printd("malloc failed for snd_seq_fifo_new() \n"); return NULL; diff -Nru a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c --- a/sound/core/seq/seq_instr.c 2004-09-06 16:37:52 -07:00 +++ b/sound/core/seq/seq_instr.c 2004-09-06 16:37:52 -07:00 @@ -29,8 +29,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer instrument library."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); static void snd_instr_lock_ops(snd_seq_kinstr_list_t *list) @@ -53,10 +51,7 @@ snd_seq_kcluster_t *snd_seq_cluster_new(int atomic) { - snd_seq_kcluster_t *cluster; - - cluster = (snd_seq_kcluster_t *) snd_kcalloc(sizeof(snd_seq_kcluster_t), atomic ? GFP_ATOMIC : GFP_KERNEL); - return cluster; + return kcalloc(1, sizeof(snd_seq_kcluster_t), atomic ? GFP_ATOMIC : GFP_KERNEL); } void snd_seq_cluster_free(snd_seq_kcluster_t *cluster, int atomic) @@ -70,7 +65,7 @@ { snd_seq_kinstr_t *instr; - instr = (snd_seq_kinstr_t *) snd_kcalloc(sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL); + instr = kcalloc(1, sizeof(snd_seq_kinstr_t) + add_len, atomic ? GFP_ATOMIC : GFP_KERNEL); if (instr == NULL) return NULL; instr->add_len = add_len; @@ -94,7 +89,7 @@ { snd_seq_kinstr_list_t *list; - list = (snd_seq_kinstr_list_t *) snd_kcalloc(sizeof(snd_seq_kinstr_list_t), GFP_KERNEL); + list = kcalloc(1, sizeof(snd_seq_kinstr_list_t), GFP_KERNEL); if (list == NULL) return NULL; spin_lock_init(&list->lock); diff -Nru a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c --- a/sound/core/seq/seq_memory.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/seq_memory.c 2004-09-06 16:37:50 -07:00 @@ -95,7 +95,7 @@ int size = sizeof(buf); if (len < size) size = len; - if (copy_from_user(buf, curptr, size) < 0) + if (copy_from_user(buf, curptr, size)) return -EFAULT; err = func(private_data, buf, size); if (err < 0) @@ -158,7 +158,7 @@ if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) { if (! in_kernel) return -EINVAL; - if (copy_from_user(buf, event->data.ext.ptr, len) < 0) + if (copy_from_user(buf, event->data.ext.ptr, len)) return -EFAULT; return newlen; } @@ -453,7 +453,7 @@ pool_t *pool; /* create pool block */ - pool = snd_kcalloc(sizeof(pool_t), GFP_KERNEL); + pool = kcalloc(1, sizeof(*pool), GFP_KERNEL); if (pool == NULL) { snd_printd("seq: malloc failed for pool\n"); return NULL; diff -Nru a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c --- a/sound/core/seq/seq_midi.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/seq_midi.c 2004-09-06 16:37:54 -07:00 @@ -43,8 +43,6 @@ MODULE_AUTHOR("Frank van de Pol , Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI synth."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); int output_buffer_size = PAGE_SIZE; module_param(output_buffer_size, int, 0644); MODULE_PARM_DESC(output_buffer_size, "Output buffer size in bytes."); @@ -323,7 +321,7 @@ client = synths[card->number]; if (client == NULL) { newclient = 1; - client = snd_kcalloc(sizeof(seq_midisynth_client_t), GFP_KERNEL); + client = kcalloc(1, sizeof(*client), GFP_KERNEL); if (client == NULL) { up(®ister_mutex); return -ENOMEM; @@ -341,7 +339,7 @@ } else if (device == 0) set_client_name(client, card, &info); /* use the first device's name */ - msynth = snd_kcalloc(sizeof(seq_midisynth_t) * ports, GFP_KERNEL); + msynth = kcalloc(ports, sizeof(seq_midisynth_t), GFP_KERNEL); if (msynth == NULL) goto __nomem; diff -Nru a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c --- a/sound/core/seq/seq_midi_emul.c 2004-09-06 16:37:55 -07:00 +++ b/sound/core/seq/seq_midi_emul.c 2004-09-06 16:37:55 -07:00 @@ -42,8 +42,6 @@ MODULE_AUTHOR("Takashi Iwai / Steve Ratcliffe"); MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI emulation."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); /* Prototypes for static functions */ static void note_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, int note, int vel); diff -Nru a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c --- a/sound/core/seq/seq_midi_event.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/seq_midi_event.c 2004-09-06 16:37:50 -07:00 @@ -118,7 +118,7 @@ snd_midi_event_t *dev; *rdev = NULL; - dev = (snd_midi_event_t *)snd_kcalloc(sizeof(snd_midi_event_t), GFP_KERNEL); + dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); if (dev == NULL) return -ENOMEM; if (bufsize > 0) { diff -Nru a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c --- a/sound/core/seq/seq_ports.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/seq_ports.c 2004-09-06 16:37:54 -07:00 @@ -141,7 +141,7 @@ } /* create a new port */ - new_port = snd_kcalloc(sizeof(client_port_t), GFP_KERNEL); + new_port = kcalloc(1, sizeof(*new_port), GFP_KERNEL); if (! new_port) { snd_printd("malloc failed for registering client port\n"); return NULL; /* failure, out of memory */ @@ -488,7 +488,7 @@ unsigned long flags; int exclusive; - subs = snd_kcalloc(sizeof(*subs), GFP_KERNEL); + subs = kcalloc(1, sizeof(*subs), GFP_KERNEL); if (! subs) return -ENOMEM; diff -Nru a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c --- a/sound/core/seq/seq_prioq.c 2004-09-06 16:37:50 -07:00 +++ b/sound/core/seq/seq_prioq.c 2004-09-06 16:37:50 -07:00 @@ -59,7 +59,7 @@ { prioq_t *f; - f = snd_kcalloc(sizeof(prioq_t), GFP_KERNEL); + f = kcalloc(1, sizeof(*f), GFP_KERNEL); if (f == NULL) { snd_printd("oops: malloc failed for snd_seq_prioq_new()\n"); return NULL; diff -Nru a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c --- a/sound/core/seq/seq_queue.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/seq_queue.c 2004-09-06 16:37:54 -07:00 @@ -111,7 +111,7 @@ { queue_t *q; - q = snd_kcalloc(sizeof(queue_t), GFP_KERNEL); + q = kcalloc(1, sizeof(*q), GFP_KERNEL); if (q == NULL) { snd_printd("malloc failed for snd_seq_queue_new()\n"); return NULL; diff -Nru a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c --- a/sound/core/seq/seq_timer.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/seq/seq_timer.c 2004-09-06 16:37:54 -07:00 @@ -59,7 +59,7 @@ { seq_timer_t *tmr; - tmr = snd_kcalloc(sizeof(seq_timer_t), GFP_KERNEL); + tmr = kcalloc(1, sizeof(*tmr), GFP_KERNEL); if (tmr == NULL) { snd_printd("malloc failed for snd_seq_timer_new() \n"); return NULL; diff -Nru a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c --- a/sound/core/seq/seq_virmidi.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/seq/seq_virmidi.c 2004-09-06 16:37:53 -07:00 @@ -115,7 +115,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, return -EINVAL); + rdev = rmidi->private_data; return snd_virmidi_dev_receive_event(rdev, ev); } @@ -127,7 +127,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, private_data, return -EINVAL); + rdev = private_data; if (!(rdev->flags & SNDRV_VIRMIDI_USE)) return 0; /* ignored */ return snd_virmidi_dev_receive_event(rdev, ev); @@ -138,7 +138,7 @@ */ static void snd_virmidi_input_trigger(snd_rawmidi_substream_t * substream, int up) { - snd_virmidi_t *vmidi = snd_magic_cast(snd_virmidi_t, substream->runtime->private_data, return); + snd_virmidi_t *vmidi = substream->runtime->private_data; if (up) { vmidi->trigger = 1; @@ -152,7 +152,7 @@ */ static void snd_virmidi_output_trigger(snd_rawmidi_substream_t * substream, int up) { - snd_virmidi_t *vmidi = snd_magic_cast(snd_virmidi_t, substream->runtime->private_data, return); + snd_virmidi_t *vmidi = substream->runtime->private_data; int count, res; unsigned char buf[32], *pbuf; @@ -199,17 +199,17 @@ */ static int snd_virmidi_input_open(snd_rawmidi_substream_t * substream) { - snd_virmidi_dev_t *rdev = snd_magic_cast(snd_virmidi_dev_t, substream->rmidi->private_data, return -EINVAL); + snd_virmidi_dev_t *rdev = substream->rmidi->private_data; snd_rawmidi_runtime_t *runtime = substream->runtime; snd_virmidi_t *vmidi; unsigned long flags; - vmidi = snd_magic_kcalloc(snd_virmidi_t, 0, GFP_KERNEL); + vmidi = kcalloc(1, sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; if (snd_midi_event_new(0, &vmidi->parser) < 0) { - snd_magic_kfree(vmidi); + kfree(vmidi); return -ENOMEM; } vmidi->seq_mode = rdev->seq_mode; @@ -228,16 +228,16 @@ */ static int snd_virmidi_output_open(snd_rawmidi_substream_t * substream) { - snd_virmidi_dev_t *rdev = snd_magic_cast(snd_virmidi_dev_t, substream->rmidi->private_data, return -EINVAL); + snd_virmidi_dev_t *rdev = substream->rmidi->private_data; snd_rawmidi_runtime_t *runtime = substream->runtime; snd_virmidi_t *vmidi; - vmidi = snd_magic_kcalloc(snd_virmidi_t, 0, GFP_KERNEL); + vmidi = kcalloc(1, sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &vmidi->parser) < 0) { - snd_magic_kfree(vmidi); + kfree(vmidi); return -ENOMEM; } vmidi->seq_mode = rdev->seq_mode; @@ -254,11 +254,11 @@ */ static int snd_virmidi_input_close(snd_rawmidi_substream_t * substream) { - snd_virmidi_t *vmidi = snd_magic_cast(snd_virmidi_t, substream->runtime->private_data, return -EINVAL); + snd_virmidi_t *vmidi = substream->runtime->private_data; snd_midi_event_free(vmidi->parser); list_del(&vmidi->list); substream->runtime->private_data = NULL; - snd_magic_kfree(vmidi); + kfree(vmidi); return 0; } @@ -267,10 +267,10 @@ */ static int snd_virmidi_output_close(snd_rawmidi_substream_t * substream) { - snd_virmidi_t *vmidi = snd_magic_cast(snd_virmidi_t, substream->runtime->private_data, return -EINVAL); + snd_virmidi_t *vmidi = substream->runtime->private_data; snd_midi_event_free(vmidi->parser); substream->runtime->private_data = NULL; - snd_magic_kfree(vmidi); + kfree(vmidi); return 0; } @@ -281,7 +281,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, private_data, return -EINVAL); + rdev = private_data; if (!try_module_get(rdev->card->module)) return -EFAULT; rdev->flags |= SNDRV_VIRMIDI_SUBSCRIBE; @@ -295,7 +295,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, private_data, return -EINVAL); + rdev = private_data; rdev->flags &= ~SNDRV_VIRMIDI_SUBSCRIBE; module_put(rdev->card->module); return 0; @@ -309,7 +309,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, private_data, return -EINVAL); + rdev = private_data; if (!try_module_get(rdev->card->module)) return -EFAULT; rdev->flags |= SNDRV_VIRMIDI_USE; @@ -323,7 +323,7 @@ { snd_virmidi_dev_t *rdev; - rdev = snd_magic_cast(snd_virmidi_dev_t, private_data, return -EINVAL); + rdev = private_data; rdev->flags &= ~SNDRV_VIRMIDI_USE; module_put(rdev->card->module); return 0; @@ -424,7 +424,7 @@ */ static int snd_virmidi_dev_register(snd_rawmidi_t *rmidi) { - snd_virmidi_dev_t *rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, return -ENXIO); + snd_virmidi_dev_t *rdev = rmidi->private_data; int err; switch (rdev->seq_mode) { @@ -451,7 +451,7 @@ */ static int snd_virmidi_dev_unregister(snd_rawmidi_t *rmidi) { - snd_virmidi_dev_t *rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, return -ENXIO); + snd_virmidi_dev_t *rdev = rmidi->private_data; if (rdev->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH) snd_virmidi_dev_detach_seq(rdev); @@ -471,8 +471,8 @@ */ static void snd_virmidi_free(snd_rawmidi_t *rmidi) { - snd_virmidi_dev_t *rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, return); - snd_magic_kfree(rdev); + snd_virmidi_dev_t *rdev = rmidi->private_data; + kfree(rdev); } /* @@ -493,7 +493,7 @@ &rmidi)) < 0) return err; strcpy(rmidi->name, rmidi->id); - rdev = snd_magic_kcalloc(snd_virmidi_dev_t, 0, GFP_KERNEL); + rdev = kcalloc(1, sizeof(*rdev), GFP_KERNEL); if (rdev == NULL) { snd_device_free(card, rmidi); return -ENOMEM; diff -Nru a/sound/core/sgbuf.c b/sound/core/sgbuf.c --- a/sound/core/sgbuf.c 2004-09-06 16:37:54 -07:00 +++ b/sound/core/sgbuf.c 2004-09-06 16:37:54 -07:00 @@ -39,11 +39,13 @@ if (! sgbuf) return -EINVAL; + tmpb.dev.type = SNDRV_DMA_TYPE_DEV; + tmpb.dev.dev = sgbuf->dev; for (i = 0; i < sgbuf->pages; i++) { tmpb.area = sgbuf->table[i].buf; tmpb.addr = sgbuf->table[i].addr; tmpb.bytes = PAGE_SIZE; - snd_dma_free_pages(&sgbuf->dev, &tmpb); + snd_dma_free_pages(&tmpb); } if (dmab->area) vunmap(dmab->area); @@ -59,7 +61,7 @@ return 0; } -void *snd_malloc_sgbuf_pages(const struct snd_dma_device *dev, +void *snd_malloc_sgbuf_pages(struct device *device, size_t size, struct snd_dma_buffer *dmab, size_t *res_size) { @@ -73,8 +75,7 @@ if (! sgbuf) return NULL; memset(sgbuf, 0, sizeof(*sgbuf)); - sgbuf->dev = *dev; - sgbuf->dev.type = SNDRV_DMA_TYPE_DEV; + sgbuf->dev = device; pages = snd_sgbuf_aligned_pages(size); sgbuf->tblsize = sgbuf_align_table(pages); sgbuf->table = kmalloc(sizeof(*sgbuf->table) * sgbuf->tblsize, GFP_KERNEL); @@ -88,7 +89,7 @@ /* allocate each page */ for (i = 0; i < pages; i++) { - if (snd_dma_alloc_pages(&sgbuf->dev, PAGE_SIZE, &tmpb) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, device, PAGE_SIZE, &tmpb) < 0) { if (res_size == NULL) goto _failed; *res_size = size = sgbuf->pages * PAGE_SIZE; diff -Nru a/sound/core/sound.c b/sound/core/sound.c --- a/sound/core/sound.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/sound.c 2004-09-06 16:37:53 -07:00 @@ -44,19 +44,14 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards."); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_SUPPORTED_DEVICE("sound"); module_param(major, int, 0444); MODULE_PARM_DESC(major, "Major # for sound driver."); -MODULE_PARM_SYNTAX(major, "default:116,skill:devel"); module_param(cards_limit, int, 0444); MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); -MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced"); MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); #ifdef CONFIG_DEVFS_FS module_param(device_mode, int, 0444); MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs."); -MODULE_PARM_SYNTAX(device_mode, "default:0666,base:8"); #endif MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); @@ -339,39 +334,29 @@ static int __init alsa_sound_init(void) { short controlnum; -#ifdef CONFIG_SND_OSSEMUL int err; -#endif int card; snd_major = major; snd_ecards_limit = cards_limit; for (card = 0; card < SNDRV_CARDS; card++) INIT_LIST_HEAD(&snd_minors_hash[card]); -#ifdef CONFIG_SND_OSSEMUL if ((err = snd_oss_init_module()) < 0) return err; -#endif devfs_mk_dir("snd"); if (register_chrdev(major, "alsa", &snd_fops)) { snd_printk(KERN_ERR "unable to register native major device number %d\n", major); devfs_remove("snd"); return -EIO; } -#ifdef CONFIG_SND_DEBUG_MEMORY snd_memory_init(); -#endif if (snd_info_init() < 0) { -#ifdef CONFIG_SND_DEBUG_MEMORY snd_memory_done(); -#endif unregister_chrdev(major, "alsa"); devfs_remove("snd"); return -ENOMEM; } -#ifdef CONFIG_SND_OSSEMUL snd_info_minor_register(); -#endif for (controlnum = 0; controlnum < cards_limit; controlnum++) { devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); class_simple_device_add(sound_class, MKDEV(major, controlnum<<5), NULL, "controlC%d", controlnum); @@ -391,13 +376,9 @@ class_simple_device_remove(MKDEV(major, controlnum<<5)); } -#ifdef CONFIG_SND_OSSEMUL snd_info_minor_unregister(); -#endif snd_info_done(); -#ifdef CONFIG_SND_DEBUG_MEMORY snd_memory_done(); -#endif if (unregister_chrdev(major, "alsa") != 0) snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); devfs_remove("snd"); @@ -406,24 +387,6 @@ module_init(alsa_sound_init) module_exit(alsa_sound_exit) -#ifndef MODULE - -/* format is: snd=major,cards_limit[,device_mode] */ - -static int __init alsa_sound_setup(char *str) -{ - (void)(get_option(&str,&major) == 2 && - get_option(&str,&cards_limit) == 2); -#ifdef CONFIG_DEVFS_FS - (void)(get_option(&str,&device_mode) == 2); -#endif - return 1; -} - -__setup("snd=", alsa_sound_setup); - -#endif /* ifndef MODULE */ - /* sound.c */ EXPORT_SYMBOL(snd_major); EXPORT_SYMBOL(snd_ecards_limit); @@ -439,14 +402,11 @@ /* memory.c */ #ifdef CONFIG_SND_DEBUG_MEMORY EXPORT_SYMBOL(snd_hidden_kmalloc); +EXPORT_SYMBOL(snd_hidden_kcalloc); EXPORT_SYMBOL(snd_hidden_kfree); EXPORT_SYMBOL(snd_hidden_vmalloc); EXPORT_SYMBOL(snd_hidden_vfree); -EXPORT_SYMBOL(_snd_magic_kmalloc); -EXPORT_SYMBOL(_snd_magic_kcalloc); -EXPORT_SYMBOL(snd_magic_kfree); #endif -EXPORT_SYMBOL(snd_kcalloc); EXPORT_SYMBOL(snd_kmalloc_strdup); EXPORT_SYMBOL(copy_to_user_fromio); EXPORT_SYMBOL(copy_from_user_toio); diff -Nru a/sound/core/timer.c b/sound/core/timer.c --- a/sound/core/timer.c 2004-09-06 16:37:53 -07:00 +++ b/sound/core/timer.c 2004-09-06 16:37:53 -07:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,6 @@ MODULE_AUTHOR("Jaroslav Kysela , Takashi Iwai "); MODULE_DESCRIPTION("ALSA timer interface"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); module_param(timer_limit, int, 0444); MODULE_PARM_DESC(timer_limit, "Maximum global timers in system."); @@ -94,7 +94,7 @@ static snd_timer_instance_t *snd_timer_instance_new(char *owner, snd_timer_t *timer) { snd_timer_instance_t *timeri; - timeri = snd_kcalloc(sizeof(snd_timer_instance_t), GFP_KERNEL); + timeri = kcalloc(1, sizeof(*timeri), GFP_KERNEL); if (timeri == NULL) return NULL; timeri->owner = snd_kmalloc_strdup(owner, GFP_KERNEL); @@ -761,7 +761,7 @@ snd_assert(tid != NULL, return -EINVAL); snd_assert(rtimer != NULL, return -EINVAL); *rtimer = NULL; - timer = snd_magic_kcalloc(snd_timer_t, 0, GFP_KERNEL); + timer = kcalloc(1, sizeof(*timer), GFP_KERNEL); if (timer == NULL) return -ENOMEM; timer->tmr_class = tid->dev_class; @@ -792,19 +792,19 @@ snd_assert(timer != NULL, return -ENXIO); if (timer->private_free) timer->private_free(timer); - snd_magic_kfree(timer); + kfree(timer); return 0; } int snd_timer_dev_free(snd_device_t *device) { - snd_timer_t *timer = snd_magic_cast(snd_timer_t, device->device_data, return -ENXIO); + snd_timer_t *timer = device->device_data; return snd_timer_free(timer); } int snd_timer_dev_register(snd_device_t *dev) { - snd_timer_t *timer = snd_magic_cast(snd_timer_t, dev->device_data, return -ENXIO); + snd_timer_t *timer = dev->device_data; snd_timer_t *timer1; struct list_head *p; @@ -865,7 +865,7 @@ static int snd_timer_dev_unregister(snd_device_t *device) { - snd_timer_t *timer = snd_magic_cast(snd_timer_t, device->device_data, return -ENXIO); + snd_timer_t *timer = device->device_data; return snd_timer_unregister(timer); } @@ -1018,7 +1018,7 @@ return err; strcpy(timer->name, "system timer"); timer->hw = snd_timer_system; - priv = (struct snd_timer_system_private *) snd_kcalloc(sizeof(struct snd_timer_system_private), GFP_KERNEL); + priv = kcalloc(1, sizeof(*priv), GFP_KERNEL); if (priv == NULL) { snd_timer_free(timer); return -ENOMEM; @@ -1086,7 +1086,7 @@ unsigned long resolution, unsigned long ticks) { - snd_timer_user_t *tu = snd_magic_cast(snd_timer_user_t, timeri->callback_data, return); + snd_timer_user_t *tu = timeri->callback_data; snd_timer_read_t *r; int prev; @@ -1129,7 +1129,7 @@ struct timespec *tstamp, unsigned long resolution) { - snd_timer_user_t *tu = snd_magic_cast(snd_timer_user_t, timeri->callback_data, return); + snd_timer_user_t *tu = timeri->callback_data; snd_timer_tread_t r1; if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PAUSE) @@ -1148,7 +1148,7 @@ unsigned long resolution, unsigned long ticks) { - snd_timer_user_t *tu = snd_magic_cast(snd_timer_user_t, timeri->callback_data, return); + snd_timer_user_t *tu = timeri->callback_data; snd_timer_tread_t *r, r1; struct timespec tstamp; int prev, append = 0; @@ -1200,7 +1200,7 @@ { snd_timer_user_t *tu; - tu = snd_magic_kcalloc(snd_timer_user_t, 0, GFP_KERNEL); + tu = kcalloc(1, sizeof(*tu), GFP_KERNEL); if (tu == NULL) return -ENOMEM; spin_lock_init(&tu->qlock); @@ -1209,7 +1209,7 @@ tu->queue_size = 128; tu->queue = (snd_timer_read_t *)kmalloc(tu->queue_size * sizeof(snd_timer_read_t), GFP_KERNEL); if (tu->queue == NULL) { - snd_magic_kfree(tu); + kfree(tu); return -ENOMEM; } file->private_data = tu; @@ -1221,7 +1221,7 @@ snd_timer_user_t *tu; if (file->private_data) { - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; file->private_data = NULL; fasync_helper(-1, file, 0, &tu->fasync); if (tu->timeri) @@ -1230,7 +1230,7 @@ kfree(tu->queue); if (tu->tqueue) kfree(tu->tqueue); - snd_magic_kfree(tu); + kfree(tu); } return 0; } @@ -1449,7 +1449,7 @@ char str[32]; int err; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; if (tu->timeri) snd_timer_close(tu->timeri); if (copy_from_user(&tselect, _tselect, sizeof(tselect))) @@ -1495,7 +1495,7 @@ snd_timer_info_t info; snd_timer_t *t; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); t = tu->timeri->timer; snd_assert(t != NULL, return -ENXIO); @@ -1520,7 +1520,7 @@ snd_timer_tread_t *ttr; int err; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); t = tu->timeri->timer; snd_assert(t != NULL, return -ENXIO); @@ -1608,7 +1608,7 @@ snd_timer_user_t *tu; snd_timer_status_t status; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); memset(&status, 0, sizeof(status)); status.tstamp = tu->tstamp; @@ -1628,7 +1628,7 @@ int err; snd_timer_user_t *tu; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); snd_timer_stop(tu->timeri); tu->timeri->lost = 0; @@ -1641,7 +1641,7 @@ int err; snd_timer_user_t *tu; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); return (err = snd_timer_stop(tu->timeri)) < 0 ? err : 0; } @@ -1651,20 +1651,20 @@ int err; snd_timer_user_t *tu; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; snd_assert(tu->timeri != NULL, return -ENXIO); tu->timeri->lost = 0; return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; } -static int snd_timer_user_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +static inline int _snd_timer_user_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { snd_timer_user_t *tu; void __user *argp = (void __user *)arg; int __user *p = argp; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; switch (cmd) { case SNDRV_TIMER_IOCTL_PVERSION: return put_user(SNDRV_TIMER_VERSION, p) ? -EFAULT : 0; @@ -1705,12 +1705,23 @@ return -ENOTTY; } +/* FIXME: need to unlock BKL to allow preemption */ +static int snd_timer_user_ioctl(struct inode *inode, struct file * file, + unsigned int cmd, unsigned long arg) +{ + int err; + unlock_kernel(); + err = _snd_timer_user_ioctl(inode, file, cmd, arg); + lock_kernel(); + return err; +} + static int snd_timer_user_fasync(int fd, struct file * file, int on) { snd_timer_user_t *tu; int err; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; err = fasync_helper(fd, file, on, &tu->fasync); if (err < 0) return err; @@ -1723,7 +1734,7 @@ long result = 0, unit; int err = 0; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return -ENXIO); + tu = file->private_data; unit = tu->tread ? sizeof(snd_timer_tread_t) : sizeof(snd_timer_read_t); spin_lock_irq(&tu->qlock); while ((long)count - result >= unit) { @@ -1785,7 +1796,7 @@ unsigned int mask; snd_timer_user_t *tu; - tu = snd_magic_cast(snd_timer_user_t, file->private_data, return 0); + tu = file->private_data; poll_wait(file, &tu->qchange_sleep, wait); diff -Nru a/sound/drivers/dummy.c b/sound/drivers/dummy.c --- a/sound/drivers/dummy.c 2004-09-06 16:37:54 -07:00 +++ b/sound/drivers/dummy.c 2004-09-06 16:37:54 -07:00 @@ -34,8 +34,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Dummy soundcard (/dev/null)"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ALSA,Dummy soundcard}}"); +MODULE_SUPPORTED_DEVICE("{{ALSA,Dummy soundcard}}"); #define MAX_PCM_DEVICES 4 #define MAX_PCM_SUBSTREAMS 16 @@ -133,22 +132,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for dummy soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for dummy soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable this dummy soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(pcm_devs, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for dummy driver."); -MODULE_PARM_SYNTAX(pcm_devs, SNDRV_ENABLED ",allows:{{0,4}},default:1,dialog:list"); module_param_array(pcm_substreams, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-16) for dummy driver."); -MODULE_PARM_SYNTAX(pcm_substreams, SNDRV_ENABLED ",allows:{{1,16}},default:8,dialog:list"); //module_param_array(midi_devs, int, boot_devs, 0444); //MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver."); -//MODULE_PARM_SYNTAX(midi_devs, SNDRV_ENABLED ",allows:{{0,2}},default:8,dialog:list"); #define MIXER_ADDR_MASTER 0 #define MIXER_ADDR_LINE 1 @@ -180,24 +173,10 @@ static snd_card_t *snd_dummy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; -static int snd_card_dummy_playback_ioctl(snd_pcm_substream_t * substream, - unsigned int cmd, - void *arg) -{ - return snd_pcm_lib_ioctl(substream, cmd, arg); -} - -static int snd_card_dummy_capture_ioctl(snd_pcm_substream_t * substream, - unsigned int cmd, - void *arg) -{ - return snd_pcm_lib_ioctl(substream, cmd, arg); -} - static void snd_card_dummy_pcm_timer_start(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; dpcm->timer.expires = 1 + jiffies; add_timer(&dpcm->timer); @@ -206,7 +185,7 @@ static void snd_card_dummy_pcm_timer_stop(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; del_timer(&dpcm->timer); } @@ -240,7 +219,7 @@ static int snd_card_dummy_pcm_prepare(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return -ENXIO); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; unsigned int bps; bps = runtime->rate * runtime->channels; @@ -269,7 +248,7 @@ static void snd_card_dummy_pcm_timer_function(unsigned long data) { - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, (void *)data, return); + snd_card_dummy_pcm_t *dpcm = (snd_card_dummy_pcm_t *)data; dpcm->timer.expires = 1 + jiffies; add_timer(&dpcm->timer); @@ -287,7 +266,7 @@ static snd_pcm_uframes_t snd_card_dummy_playback_pointer(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return -ENXIO); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; return bytes_to_frames(runtime, dpcm->pcm_buf_pos); } @@ -295,7 +274,7 @@ static snd_pcm_uframes_t snd_card_dummy_capture_pointer(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return -ENXIO); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; return bytes_to_frames(runtime, dpcm->pcm_buf_pos); } @@ -338,8 +317,19 @@ static void snd_card_dummy_runtime_free(snd_pcm_runtime_t *runtime) { - snd_card_dummy_pcm_t *dpcm = snd_magic_cast(snd_card_dummy_pcm_t, runtime->private_data, return); - snd_magic_kfree(dpcm); + snd_card_dummy_pcm_t *dpcm = runtime->private_data; + kfree(dpcm); +} + +static int snd_card_dummy_hw_params(snd_pcm_substream_t * substream, + snd_pcm_hw_params_t * hw_params) +{ + return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); +} + +static int snd_card_dummy_hw_free(snd_pcm_substream_t * substream) +{ + return snd_pcm_lib_free_pages(substream); } static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream) @@ -348,13 +338,9 @@ snd_card_dummy_pcm_t *dpcm; int err; - dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL); + dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL); if (dpcm == NULL) return -ENOMEM; - if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) { - snd_magic_kfree(dpcm); - return -ENOMEM; - } init_timer(&dpcm->timer); dpcm->timer.data = (unsigned long) dpcm; dpcm->timer.function = snd_card_dummy_pcm_timer_function; @@ -370,7 +356,7 @@ if (substream->pcm->device & 2) runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID); if ((err = add_playback_constraints(runtime)) < 0) { - snd_magic_kfree(dpcm); + kfree(dpcm); return err; } @@ -383,14 +369,9 @@ snd_card_dummy_pcm_t *dpcm; int err; - dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL); + dpcm = kcalloc(1, sizeof(*dpcm), GFP_KERNEL); if (dpcm == NULL) return -ENOMEM; - if ((runtime->dma_area = snd_malloc_pages_fallback(MAX_BUFFER_SIZE, GFP_KERNEL, &runtime->dma_bytes)) == NULL) { - snd_magic_kfree(dpcm); - return -ENOMEM; - } - memset(runtime->dma_area, 0, runtime->dma_bytes); init_timer(&dpcm->timer); dpcm->timer.data = (unsigned long) dpcm; dpcm->timer.function = snd_card_dummy_pcm_timer_function; @@ -406,7 +387,7 @@ if (substream->pcm->device & 2) runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID); if ((err = add_capture_constraints(runtime)) < 0) { - snd_magic_kfree(dpcm); + kfree(dpcm); return err; } @@ -415,24 +396,20 @@ static int snd_card_dummy_playback_close(snd_pcm_substream_t * substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - - snd_free_pages(runtime->dma_area, runtime->dma_bytes); return 0; } static int snd_card_dummy_capture_close(snd_pcm_substream_t * substream) { - snd_pcm_runtime_t *runtime = substream->runtime; - - snd_free_pages(runtime->dma_area, runtime->dma_bytes); return 0; } static snd_pcm_ops_t snd_card_dummy_playback_ops = { .open = snd_card_dummy_playback_open, .close = snd_card_dummy_playback_close, - .ioctl = snd_card_dummy_playback_ioctl, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_card_dummy_hw_params, + .hw_free = snd_card_dummy_hw_free, .prepare = snd_card_dummy_playback_prepare, .trigger = snd_card_dummy_playback_trigger, .pointer = snd_card_dummy_playback_pointer, @@ -441,7 +418,9 @@ static snd_pcm_ops_t snd_card_dummy_capture_ops = { .open = snd_card_dummy_capture_open, .close = snd_card_dummy_capture_close, - .ioctl = snd_card_dummy_capture_ioctl, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_card_dummy_hw_params, + .hw_free = snd_card_dummy_hw_free, .prepare = snd_card_dummy_capture_prepare, .trigger = snd_card_dummy_capture_trigger, .pointer = snd_card_dummy_capture_pointer, @@ -459,6 +438,9 @@ pcm->private_data = dummy; pcm->info_flags = 0; strcpy(pcm->name, "Dummy PCM"); + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), + 0, 64*1024); return 0; } @@ -479,7 +461,7 @@ static int snd_dummy_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_dummy_t *dummy = _snd_kcontrol_chip(kcontrol); + snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); unsigned long flags; int addr = kcontrol->private_value; @@ -488,11 +470,11 @@ ucontrol->value.integer.value[1] = dummy->mixer_volume[addr][1]; spin_unlock_irqrestore(&dummy->mixer_lock, flags); return 0; -} +} static int snd_dummy_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_dummy_t *dummy = _snd_kcontrol_chip(kcontrol); + snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); unsigned long flags; int change, addr = kcontrol->private_value; int left, right; @@ -514,7 +496,7 @@ dummy->mixer_volume[addr][1] = right; spin_unlock_irqrestore(&dummy->mixer_lock, flags); return change; -} +} #define DUMMY_CAPSRC(xname, xindex, addr) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ @@ -533,7 +515,7 @@ static int snd_dummy_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_dummy_t *dummy = _snd_kcontrol_chip(kcontrol); + snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); unsigned long flags; int addr = kcontrol->private_value; @@ -546,7 +528,7 @@ static int snd_dummy_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_dummy_t *dummy = _snd_kcontrol_chip(kcontrol); + snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); unsigned long flags; int change, addr = kcontrol->private_value; int left, right; @@ -560,9 +542,7 @@ dummy->capture_source[addr][1] = right; spin_unlock_irqrestore(&dummy->mixer_lock, flags); return change; -} - -#define DUMMY_CONTROLS (sizeof(snd_dummy_controls)/sizeof(snd_kcontrol_new_t)) +} static snd_kcontrol_new_t snd_dummy_controls[] = { DUMMY_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER), @@ -587,7 +567,7 @@ spin_lock_init(&dummy->mixer_lock); strcpy(card->mixername, "Dummy Mixer"); - for (idx = 0; idx < DUMMY_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_dummy_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_dummy_controls[idx], dummy))) < 0) return err; } diff -Nru a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c --- a/sound/drivers/mpu401/mpu401.c 2004-09-06 16:37:54 -07:00 +++ b/sound/drivers/mpu401/mpu401.c 2004-09-06 16:37:54 -07:00 @@ -28,7 +28,7 @@ #include #include #ifdef CONFIG_ACPI_BUS -#include +#include #endif #include #include @@ -42,7 +42,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("MPU-401 UART"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -56,24 +55,18 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for MPU-401 device."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for MPU-401 device."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable MPU-401 device."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef USE_ACPI_PNP module_param_array(acpipnp, bool, boot_devs, 0444); MODULE_PARM_DESC(acpipnp, "ACPI PnP detection for MPU-401 device."); -MODULE_PARM_SYNTAX(acpipnp, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); #endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for MPU-401 device."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); #ifndef CONFIG_ACPI_BUS struct acpi_device; @@ -98,13 +91,9 @@ if (res->id == ACPI_RSTYPE_IRQ) { if (res->data.irq.number_of_interrupts > 0) { -#ifdef CONFIG_IA64 - resources->irq = acpi_register_irq(res->data.irq.interrupts[0], - res->data.irq.active_high_low, - res->data.irq.edge_level); -#else - resources->irq = res->data.irq.interrupts[0]; -#endif + resources->irq = acpi_register_gsi(res->data.irq.interrupts[0], + res->data.irq.edge_level, + res->data.irq.active_high_low); } } else if (res->id == ACPI_RSTYPE_IO) { if (res->data.io.range_length >= 2) { @@ -175,7 +164,7 @@ } #ifdef USE_ACPI_PNP if (device) { - strcat(card->longname, ", bus id "); + strcat(card->longname, ", ACPI id "); strlcat(card->longname, acpi_device_bid(device), sizeof(card->longname)); } #endif diff -Nru a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c --- a/sound/drivers/mpu401/mpu401_uart.c 2004-09-06 16:37:52 -07:00 +++ b/sound/drivers/mpu401/mpu401_uart.c 2004-09-06 16:37:52 -07:00 @@ -123,7 +123,7 @@ */ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - mpu401_t *mpu = snd_magic_cast(mpu401_t, dev_id, return IRQ_NONE); + mpu401_t *mpu = dev_id; if (mpu == NULL) return IRQ_NONE; @@ -137,7 +137,7 @@ */ static void snd_mpu401_uart_timer(unsigned long data) { - mpu401_t *mpu = snd_magic_cast(mpu401_t, (void *)data, return); + mpu401_t *mpu = (mpu401_t *)data; spin_lock(&mpu->timer_lock); /*mpu->mode |= MPU401_MODE_TIMER;*/ @@ -235,7 +235,7 @@ mpu401_t *mpu; int err; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return -ENXIO); + mpu = substream->rmidi->private_data; if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) return err; if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { @@ -253,7 +253,7 @@ mpu401_t *mpu; int err; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return -ENXIO); + mpu = substream->rmidi->private_data; if (mpu->open_output && (err = mpu->open_output(mpu)) < 0) return err; if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { @@ -270,7 +270,7 @@ { mpu401_t *mpu; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return -ENXIO); + mpu = substream->rmidi->private_data; clear_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); mpu->substream_input = NULL; if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) @@ -284,7 +284,7 @@ { mpu401_t *mpu; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return -ENXIO); + mpu = substream->rmidi->private_data; clear_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); mpu->substream_output = NULL; if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) @@ -303,7 +303,7 @@ mpu401_t *mpu; int max = 64; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return); + mpu = substream->rmidi->private_data; if (up) { if (! test_and_set_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode)) { /* first time - flush FIFO */ @@ -394,7 +394,7 @@ unsigned long flags; mpu401_t *mpu; - mpu = snd_magic_cast(mpu401_t, substream->rmidi->private_data, return); + mpu = substream->rmidi->private_data; if (up) { set_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode); @@ -441,14 +441,14 @@ static void snd_mpu401_uart_free(snd_rawmidi_t *rmidi) { - mpu401_t *mpu = snd_magic_cast(mpu401_t, rmidi->private_data, return); + mpu401_t *mpu = rmidi->private_data; if (mpu->irq_flags && mpu->irq >= 0) free_irq(mpu->irq, (void *) mpu); if (mpu->res) { release_resource(mpu->res); kfree_nocheck(mpu->res); } - snd_magic_kfree(mpu); + kfree(mpu); } /** @@ -484,7 +484,7 @@ *rrawmidi = NULL; if ((err = snd_rawmidi_new(card, "MPU-401U", device, 1, 1, &rmidi)) < 0) return err; - mpu = snd_magic_kcalloc(mpu401_t, 0, GFP_KERNEL); + mpu = kcalloc(1, sizeof(*mpu), GFP_KERNEL); if (mpu == NULL) { snd_device_free(card, rmidi); return -ENOMEM; diff -Nru a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c --- a/sound/drivers/mtpav.c 2004-09-06 16:37:54 -07:00 +++ b/sound/drivers/mtpav.c 2004-09-06 16:37:54 -07:00 @@ -69,8 +69,7 @@ MODULE_AUTHOR("Michael T. Mayers"); MODULE_DESCRIPTION("MOTU MidiTimePiece AV multiport MIDI"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{MOTU,MidiTimePiece AV multiport MIDI}}"); +MODULE_SUPPORTED_DEVICE("{{MOTU,MidiTimePiece AV multiport MIDI}}"); // io resources #define MTPAV_IOBASE 0x378 @@ -85,19 +84,14 @@ module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for MotuMTPAV MIDI."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for MotuMTPAV MIDI."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param(port, long, 0444); MODULE_PARM_DESC(port, "Parallel port # for MotuMTPAV MIDI."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x378},{0x278}},dialog:list"); module_param(irq, int, 0444); MODULE_PARM_DESC(irq, "Parallel IRQ # for MotuMTPAV MIDI."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{7},{5}},dialog:list"); module_param(hwports, int, 0444); MODULE_PARM_DESC(hwports, "Hardware ports # for MotuMTPAV MIDI."); -MODULE_PARM_SYNTAX(hwports, SNDRV_ENABLED ",allows:{{1,8}},dialog:list"); /* * defines @@ -419,7 +413,7 @@ static void snd_mtpav_output_timer(unsigned long data) { - mtpav_t *chip = snd_magic_cast(mtpav_t, (void *)data, return); + mtpav_t *chip = (mtpav_t *)data; int p; spin_lock(&chip->spinlock); @@ -587,7 +581,7 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id, struct pt_regs *regs) { - mtpav_t *mcard = snd_magic_cast(mtpav_t, dev_id, return IRQ_NONE); + mtpav_t *mcard = dev_id; //printk("irqh()\n"); spin_lock(&mcard->spinlock); @@ -695,7 +689,7 @@ static mtpav_t *new_mtpav(void) { - mtpav_t *ncrd = (mtpav_t *) snd_magic_kcalloc(mtpav_t, 0, GFP_KERNEL); + mtpav_t *ncrd = kcalloc(1, sizeof(*ncrd), GFP_KERNEL); if (ncrd != NULL) { spin_lock_init(&ncrd->spinlock); @@ -728,7 +722,7 @@ release_resource(crd->res_port); kfree_nocheck(crd->res_port); } - snd_magic_kfree(crd); + kfree(crd); } /* diff -Nru a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c --- a/sound/drivers/opl3/opl3_lib.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/opl3/opl3_lib.c 2004-09-06 16:37:51 -07:00 @@ -35,8 +35,6 @@ MODULE_DESCRIPTION("Routines for control of AdLib FM cards (OPL2/OPL3/OPL4 chips)"); MODULE_LICENSE("GPL"); -#define chip_t opl3_t - extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val) @@ -322,7 +320,7 @@ if (hw == NULL) return; - opl3 = snd_magic_cast(opl3_t, hw->private_data, return); + opl3 = hw->private_data; status = inb(opl3->l_port); #if 0 snd_printk("AdLib IRQ status = 0x%x\n", status); @@ -354,13 +352,13 @@ release_resource(opl3->res_r_port); kfree_nocheck(opl3->res_r_port); } - snd_magic_kfree(opl3); + kfree(opl3); return 0; } static int snd_opl3_dev_free(snd_device_t *device) { - opl3_t *opl3 = snd_magic_cast(opl3_t, device->device_data, return -ENXIO); + opl3_t *opl3 = device->device_data; return snd_opl3_free(opl3); } @@ -379,7 +377,7 @@ *ropl3 = NULL; - opl3 = snd_magic_kcalloc(opl3_t, 0, GFP_KERNEL); + opl3 = kcalloc(1, sizeof(*opl3), GFP_KERNEL); if (opl3 == NULL) return -ENOMEM; diff -Nru a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c --- a/sound/drivers/opl3/opl3_midi.c 2004-09-06 16:37:53 -07:00 +++ b/sound/drivers/opl3/opl3_midi.c 2004-09-06 16:37:53 -07:00 @@ -313,7 +313,7 @@ fm_instrument_t *fm; unsigned long flags; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("Note on, ch %i, inst %i, note %i, vel %i\n", @@ -672,7 +672,7 @@ unsigned long flags; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("Note off, ch %i, inst %i, note %i\n", @@ -712,7 +712,7 @@ { opl3_t *opl3; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("Key pressure, ch#: %i, inst#: %i\n", chan->number, chan->midi_program); @@ -726,7 +726,7 @@ { opl3_t *opl3; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("Terminate note, ch#: %i, inst#: %i\n", chan->number, chan->midi_program); @@ -814,7 +814,7 @@ { opl3_t *opl3; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("Controller, TYPE = %i, ch#: %i, inst#: %i\n", type, chan->number, chan->midi_program); @@ -851,7 +851,7 @@ { opl3_t *opl3; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("NRPN, ch#: %i, inst#: %i\n", chan->number, chan->midi_program); @@ -866,7 +866,7 @@ { opl3_t *opl3; - opl3 = snd_magic_cast(opl3_t, p, return); + opl3 = p; #ifdef DEBUG_MIDI snd_printk("SYSEX\n"); #endif diff -Nru a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c --- a/sound/drivers/opl3/opl3_oss.c 2004-09-06 16:37:50 -07:00 +++ b/sound/drivers/opl3/opl3_oss.c 2004-09-06 16:37:50 -07:00 @@ -57,7 +57,7 @@ static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return -EINVAL); + opl3_t *opl3 = private_data; if (ev->type != SNDRV_SEQ_EVENT_OSS) snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset); @@ -68,7 +68,7 @@ static void snd_opl3_oss_free_port(void *private_data) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return); + opl3_t *opl3 = private_data; snd_midi_channel_free_set(opl3->oss_chset); } @@ -156,7 +156,7 @@ /* open OSS sequencer */ static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure) { - opl3_t *opl3 = snd_magic_cast(opl3_t, closure, return -EINVAL); + opl3_t *opl3 = closure; int err; snd_assert(arg != NULL, return -ENXIO); @@ -182,7 +182,7 @@ opl3_t *opl3; snd_assert(arg != NULL, return -ENXIO); - opl3 = snd_magic_cast(opl3_t, arg->private_data, return -EINVAL); + opl3 = arg->private_data; snd_opl3_synth_cleanup(opl3); @@ -213,7 +213,7 @@ int err = -EINVAL; snd_assert(arg != NULL, return -ENXIO); - opl3 = snd_magic_cast(opl3_t, arg->private_data, return -EINVAL); + opl3 = arg->private_data; if ((format == FM_PATCH) || (format == OPL3_PATCH)) { struct sbi_instrument sbi; @@ -241,7 +241,7 @@ } size = sizeof(*put) + sizeof(fm_xinstrument_t); - put = (snd_seq_instr_header_t *)snd_kcalloc(size, GFP_KERNEL); + put = kcalloc(1, size, GFP_KERNEL); if (put == NULL) return -ENOMEM; /* build header */ @@ -325,7 +325,7 @@ opl3_t *opl3; snd_assert(arg != NULL, return -ENXIO); - opl3 = snd_magic_cast(opl3_t, arg->private_data, return -EINVAL); + opl3 = arg->private_data; switch (cmd) { case SNDCTL_FM_LOAD_INSTR: snd_printk("OPL3: Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. Fix the program.\n"); @@ -350,7 +350,7 @@ opl3_t *opl3; snd_assert(arg != NULL, return -ENXIO); - opl3 = snd_magic_cast(opl3_t, arg->private_data, return -EINVAL); + opl3 = arg->private_data; return 0; } diff -Nru a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c --- a/sound/drivers/opl3/opl3_seq.c 2004-09-06 16:37:53 -07:00 +++ b/sound/drivers/opl3/opl3_seq.c 2004-09-06 16:37:53 -07:00 @@ -30,7 +30,6 @@ MODULE_AUTHOR("Uros Bizjak "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ALSA driver for OPL3 FM synth"); -MODULE_CLASSES("{sound}"); int use_internal_drums = 0; module_param(use_internal_drums, bool, 0444); @@ -99,7 +98,7 @@ int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return -ENXIO); + opl3_t *opl3 = private_data; int err; if ((err = snd_opl3_synth_setup(opl3)) < 0) @@ -126,7 +125,7 @@ int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return -ENXIO); + opl3_t *opl3 = private_data; snd_opl3_synth_cleanup(opl3); @@ -151,7 +150,7 @@ static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return -EINVAL); + opl3_t *opl3 = private_data; if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN && ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) { @@ -169,7 +168,7 @@ static void snd_opl3_synth_free_port(void *private_data) { - opl3_t *opl3 = snd_magic_cast(opl3_t, private_data, return); + opl3_t *opl3 = private_data; snd_midi_channel_free_set(opl3->chset); } diff -Nru a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c --- a/sound/drivers/opl3/opl3_synth.c 2004-09-06 16:37:55 -07:00 +++ b/sound/drivers/opl3/opl3_synth.c 2004-09-06 16:37:55 -07:00 @@ -74,7 +74,7 @@ */ int snd_opl3_open(snd_hwdep_t * hw, struct file *file) { - opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO); + opl3_t *opl3 = hw->private_data; down(&opl3->access_mutex); if (opl3->used) { @@ -93,7 +93,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) { - opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO); + opl3_t *opl3 = hw->private_data; void __user *argp = (void __user *)arg; snd_assert(opl3 != NULL, return -EINVAL); @@ -176,7 +176,7 @@ */ int snd_opl3_release(snd_hwdep_t * hw, struct file *file) { - opl3_t *opl3 = snd_magic_cast(opl3_t, hw->private_data, return -ENXIO); + opl3_t *opl3 = hw->private_data; snd_opl3_reset(opl3); down(&opl3->access_mutex); diff -Nru a/sound/drivers/opl4/Makefile b/sound/drivers/opl4/Makefile --- a/sound/drivers/opl4/Makefile 2004-09-06 16:37:54 -07:00 +++ b/sound/drivers/opl4/Makefile 2004-09-06 16:37:54 -07:00 @@ -15,4 +15,4 @@ sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1))) obj-$(CONFIG_SND_OPL4_LIB) += snd-opl4-lib.o -obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-opl4-synth.o \ No newline at end of file +obj-$(call sequencer,$(CONFIG_SND_OPL4_LIB)) += snd-opl4-synth.o diff -Nru a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c --- a/sound/drivers/opl4/opl4_lib.c 2004-09-06 16:37:55 -07:00 +++ b/sound/drivers/opl4/opl4_lib.c 2004-09-06 16:37:55 -07:00 @@ -26,7 +26,6 @@ MODULE_AUTHOR("Clemens Ladisch "); MODULE_DESCRIPTION("OPL4 driver"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); static void inline snd_opl4_wait(opl4_t *opl4) { @@ -37,62 +36,68 @@ void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value) { - unsigned long flags; - - spin_lock_irqsave(&opl4->reg_lock, flags); - snd_opl4_wait(opl4); outb(reg, opl4->pcm_port); snd_opl4_wait(opl4); outb(value, opl4->pcm_port + 1); - - spin_unlock_irqrestore(&opl4->reg_lock, flags); } u8 snd_opl4_read(opl4_t *opl4, u8 reg) { - unsigned long flags; - u8 value; - - spin_lock_irqsave(&opl4->reg_lock, flags); - snd_opl4_wait(opl4); outb(reg, opl4->pcm_port); snd_opl4_wait(opl4); - value = inb(opl4->pcm_port + 1); - - spin_unlock_irqrestore(&opl4->reg_lock, flags); - return value; + return inb(opl4->pcm_port + 1); } void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size) { - u8 memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION); + unsigned long flags; + u8 memcfg; + + spin_lock_irqsave(&opl4->reg_lock, flags); + + memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION); snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg | OPL4_MODE_BIT); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_HIGH, offset >> 16); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_MID, offset >> 8); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_LOW, offset); - for (; size > 0; size--) - *buf++ = snd_opl4_read(opl4, OPL4_REG_MEMORY_DATA); + + snd_opl4_wait(opl4); + outb(OPL4_REG_MEMORY_DATA, opl4->pcm_port); + snd_opl4_wait(opl4); + insb(opl4->pcm_port + 1, buf, size); snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg); + + spin_unlock_irqrestore(&opl4->reg_lock, flags); } void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size) { - u8 memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION); + unsigned long flags; + u8 memcfg; + + spin_lock_irqsave(&opl4->reg_lock, flags); + + memcfg = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION); snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg | OPL4_MODE_BIT); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_HIGH, offset >> 16); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_MID, offset >> 8); snd_opl4_write(opl4, OPL4_REG_MEMORY_ADDRESS_LOW, offset); - for (; size > 0; size--) - snd_opl4_write(opl4, OPL4_REG_MEMORY_DATA, *buf++); + + snd_opl4_wait(opl4); + outb(OPL4_REG_MEMORY_DATA, opl4->pcm_port); + snd_opl4_wait(opl4); + outsb(opl4->pcm_port + 1, buf, size); snd_opl4_write(opl4, OPL4_REG_MEMORY_CONFIGURATION, memcfg); + + spin_unlock_irqrestore(&opl4->reg_lock, flags); } static void snd_opl4_enable_opl4(opl4_t *opl4) @@ -141,7 +146,7 @@ #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) static void snd_opl4_seq_dev_free(snd_seq_device_t *seq_dev) { - opl4_t *opl4 = snd_magic_cast(opl4_t, seq_dev->private_data, return); + opl4_t *opl4 = seq_dev->private_data; opl4->seq_dev = NULL; } @@ -172,12 +177,12 @@ release_resource(opl4->res_pcm_port); kfree_nocheck(opl4->res_pcm_port); } - snd_magic_kfree(opl4); + kfree(opl4); } static int snd_opl4_dev_free(snd_device_t *device) { - opl4_t *opl4 = snd_magic_cast(opl4_t, device->device_data, return -ENXIO); + opl4_t *opl4 = device->device_data; snd_opl4_free(opl4); return 0; } @@ -199,7 +204,7 @@ if (ropl4) *ropl4 = NULL; - opl4 = snd_magic_kcalloc(opl4_t, 0, GFP_KERNEL); + opl4 = kcalloc(1, sizeof(*opl4), GFP_KERNEL); if (!opl4) return -ENOMEM; @@ -231,7 +236,7 @@ } /* opl3 initialization disabled opl4, so reenable */ - snd_opl4_enable_opl4(opl4); + snd_opl4_enable_opl4(opl4); err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl4, &ops); if (err < 0) { diff -Nru a/sound/drivers/opl4/opl4_local.h b/sound/drivers/opl4/opl4_local.h --- a/sound/drivers/opl4/opl4_local.h 2004-09-06 16:37:52 -07:00 +++ b/sound/drivers/opl4/opl4_local.h 2004-09-06 16:37:52 -07:00 @@ -195,7 +195,6 @@ opl4_voice_t voices[OPL4_MAX_VOICES]; struct list_head off_voices; struct list_head on_voices; - spinlock_t voices_lock; #endif }; diff -Nru a/sound/drivers/opl4/opl4_mixer.c b/sound/drivers/opl4/opl4_mixer.c --- a/sound/drivers/opl4/opl4_mixer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/opl4/opl4_mixer.c 2004-09-06 16:37:51 -07:00 @@ -20,8 +20,6 @@ #include "opl4_local.h" #include -#define chip_t opl4_t - static int snd_opl4_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; @@ -34,10 +32,13 @@ static int snd_opl4_ctl_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { opl4_t *opl4 = snd_kcontrol_chip(kcontrol); + unsigned long flags; u8 reg = kcontrol->private_value; u8 value; + spin_lock_irqsave(&opl4->reg_lock, flags); value = snd_opl4_read(opl4, reg); + spin_unlock_irqrestore(&opl4->reg_lock, flags); ucontrol->value.integer.value[0] = 7 - (value & 7); ucontrol->value.integer.value[1] = 7 - ((value >> 3) & 7); return 0; @@ -46,13 +47,16 @@ static int snd_opl4_ctl_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { opl4_t *opl4 = snd_kcontrol_chip(kcontrol); + unsigned long flags; u8 reg = kcontrol->private_value; u8 value, old_value; value = (7 - (ucontrol->value.integer.value[0] & 7)) | ((7 - (ucontrol->value.integer.value[1] & 7)) << 3); + spin_lock_irqsave(&opl4->reg_lock, flags); old_value = snd_opl4_read(opl4, reg); snd_opl4_write(opl4, reg, value); + spin_unlock_irqrestore(&opl4->reg_lock, flags); return value != old_value; } @@ -80,9 +84,7 @@ snd_card_t *card = opl4->card; int i, err; -#if 0 /* already set by the codec driver */ - strcpy(card->mixername, "OPL4 Mixer"); -#endif + strcat(card->mixername, ",OPL4"); for (i = 0; i < 2; ++i) { err = snd_ctl_add(card, snd_ctl_new1(&snd_opl4_controls[i], opl4)); diff -Nru a/sound/drivers/opl4/opl4_proc.c b/sound/drivers/opl4/opl4_proc.c --- a/sound/drivers/opl4/opl4_proc.c 2004-09-06 16:37:55 -07:00 +++ b/sound/drivers/opl4/opl4_proc.c 2004-09-06 16:37:55 -07:00 @@ -26,7 +26,7 @@ static int snd_opl4_mem_proc_open(snd_info_entry_t *entry, unsigned short mode, void **file_private_data) { - opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO); + opl4_t *opl4 = entry->private_data; down(&opl4->access_mutex); if (opl4->memory_access) { @@ -41,7 +41,7 @@ static int snd_opl4_mem_proc_release(snd_info_entry_t *entry, unsigned short mode, void *file_private_data) { - opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO); + opl4_t *opl4 = entry->private_data; down(&opl4->access_mutex); opl4->memory_access--; @@ -53,7 +53,7 @@ struct file *file, char __user *_buf, unsigned long count, unsigned long pos) { - opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO); + opl4_t *opl4 = entry->private_data; long size; char* buf; @@ -79,7 +79,7 @@ struct file *file, const char __user *_buf, unsigned long count, unsigned long pos) { - opl4_t *opl4 = snd_magic_cast(opl4_t, entry->private_data, return -ENXIO); + opl4_t *opl4 = entry->private_data; long size; char *buf; diff -Nru a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c --- a/sound/drivers/opl4/opl4_seq.c 2004-09-06 16:37:52 -07:00 +++ b/sound/drivers/opl4/opl4_seq.c 2004-09-06 16:37:52 -07:00 @@ -39,13 +39,11 @@ MODULE_AUTHOR("Clemens Ladisch "); MODULE_DESCRIPTION("OPL4 wavetable synth driver"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_CLASSES("{sound}"); int volume_boost = 8; module_param(volume_boost, int, 0644); MODULE_PARM_DESC(volume_boost, "Additional volume for OPL4 wavetable sounds."); -MODULE_PARM_SYNTAX(volume_boost, "default:8"); static int snd_opl4_seq_use_inc(opl4_t *opl4) { @@ -61,7 +59,7 @@ static int snd_opl4_seq_use(void *private_data, snd_seq_port_subscribe_t *info) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return -ENXIO); + opl4_t *opl4 = private_data; int err; down(&opl4->access_mutex); @@ -88,7 +86,7 @@ static int snd_opl4_seq_unuse(void *private_data, snd_seq_port_subscribe_t *info) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return -ENXIO); + opl4_t *opl4 = private_data; snd_opl4_synth_shutdown(opl4); @@ -112,7 +110,7 @@ static int snd_opl4_seq_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return -ENXIO); + opl4_t *opl4 = private_data; snd_midi_process_event(&opl4_ops, ev, opl4->chset); return 0; @@ -120,7 +118,7 @@ static void snd_opl4_seq_free_port(void *private_data) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; snd_midi_channel_free_set(opl4->chset); } diff -Nru a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c --- a/sound/drivers/opl4/opl4_synth.c 2004-09-06 16:37:52 -07:00 +++ b/sound/drivers/opl4/opl4_synth.c 2004-09-06 16:37:52 -07:00 @@ -272,12 +272,14 @@ */ void snd_opl4_synth_reset(opl4_t *opl4) { + unsigned long flags; int i; + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < OPL4_MAX_VOICES; i++) snd_opl4_write(opl4, OPL4_REG_MISC + i, OPL4_DAMP_BIT); + spin_unlock_irqrestore(&opl4->reg_lock, flags); - spin_lock_init(&opl4->voices_lock); INIT_LIST_HEAD(&opl4->off_voices); INIT_LIST_HEAD(&opl4->on_voices); memset(opl4->voices, 0, sizeof(opl4->voices)); @@ -294,11 +296,14 @@ */ void snd_opl4_synth_shutdown(opl4_t *opl4) { + unsigned long flags; int i; + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < OPL4_MAX_VOICES; i++) snd_opl4_write(opl4, OPL4_REG_MISC + i, opl4->voices[i].reg_misc & ~OPL4_KEY_ON_BIT); + spin_unlock_irqrestore(&opl4->reg_lock, flags); } /* @@ -311,14 +316,14 @@ unsigned long flags; opl4_voice_t *voice; - spin_lock_irqsave(&opl4->voices_lock, flags); + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < OPL4_MAX_VOICES; i++) { voice = &opl4->voices[i]; if (voice->chan == chan && voice->note == note) { func(opl4, voice); } } - spin_unlock_irqrestore(&opl4->voices_lock, flags); + spin_unlock_irqrestore(&opl4->reg_lock, flags); } /* @@ -331,14 +336,14 @@ unsigned long flags; opl4_voice_t *voice; - spin_lock_irqsave(&opl4->voices_lock, flags); + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < OPL4_MAX_VOICES; i++) { voice = &opl4->voices[i]; if (voice->chan == chan) { func(opl4, voice); } } - spin_unlock_irqrestore(&opl4->voices_lock, flags); + spin_unlock_irqrestore(&opl4->reg_lock, flags); } /* @@ -351,13 +356,13 @@ unsigned long flags; opl4_voice_t *voice; - spin_lock_irqsave(&opl4->voices_lock, flags); + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < OPL4_MAX_VOICES; i++) { voice = &opl4->voices[i]; if (voice->chan) func(opl4, voice); } - spin_unlock_irqrestore(&opl4->voices_lock, flags); + spin_unlock_irqrestore(&opl4->reg_lock, flags); } static void snd_opl4_update_volume(opl4_t *opl4, opl4_voice_t *voice) @@ -472,7 +477,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, snd_midi_channel_t *chan) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; const opl4_region_ptr_t *regions; opl4_voice_t *voice[2]; const opl4_sound_t *sound[2]; @@ -492,7 +497,7 @@ } /* allocate and initialize the needed voices */ - spin_lock_irqsave(&opl4->voices_lock, flags); + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < voices; i++) { voice[i] = snd_opl4_get_voice(opl4); list_del(&voice[i]->list); @@ -502,7 +507,6 @@ voice[i]->velocity = vel & 0x7f; voice[i]->sound = sound[i]; } - spin_unlock_irqrestore(&opl4->voices_lock, flags); /* set tone number (triggers header loading) */ for (i = 0; i < voices; i++) { @@ -522,11 +526,13 @@ voice[i]->level_direct = OPL4_LEVEL_DIRECT_BIT; snd_opl4_update_volume(opl4, voice[i]); } + spin_unlock_irqrestore(&opl4->reg_lock, flags); /* wait for completion of loading */ snd_opl4_wait_for_wave_headers(opl4); /* set remaining parameters */ + spin_lock_irqsave(&opl4->reg_lock, flags); for (i = 0; i < voices; i++) { snd_opl4_update_tone_parameters(opl4, voice[i]); voice[i]->reg_lfo_vibrato = voice[i]->sound->reg_lfo_vibrato; @@ -540,6 +546,7 @@ snd_opl4_write(opl4, OPL4_REG_MISC + voice[i]->number, voice[i]->reg_misc); } + spin_unlock_irqrestore(&opl4->reg_lock, flags); } static void snd_opl4_voice_off(opl4_t *opl4, opl4_voice_t *voice) @@ -553,7 +560,7 @@ void snd_opl4_note_off(void *private_data, int note, int vel, snd_midi_channel_t *chan) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; snd_opl4_do_for_note(opl4, note, chan, snd_opl4_voice_off); } @@ -569,14 +576,14 @@ void snd_opl4_terminate_note(void *private_data, int note, snd_midi_channel_t *chan) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; snd_opl4_do_for_note(opl4, note, chan, snd_opl4_terminate_voice); } void snd_opl4_control(void *private_data, int type, snd_midi_channel_t *chan) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; switch (type) { case MIDI_CTL_MSB_MODWHEEL: @@ -616,7 +623,7 @@ void snd_opl4_sysex(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset) { - opl4_t *opl4 = snd_magic_cast(opl4_t, private_data, return); + opl4_t *opl4 = private_data; if (parsed == SNDRV_MIDI_SYSEX_GS_MASTER_VOLUME) snd_opl4_do_for_all(opl4, snd_opl4_update_volume); diff -Nru a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c --- a/sound/drivers/serial-u16550.c 2004-09-06 16:37:50 -07:00 +++ b/sound/drivers/serial-u16550.c 2004-09-06 16:37:50 -07:00 @@ -46,8 +46,7 @@ MODULE_DESCRIPTION("MIDI serial u16550"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ALSA, MIDI serial u16550}}"); +MODULE_SUPPORTED_DEVICE("{{ALSA, MIDI serial u16550}}"); #define SNDRV_SERIAL_SOUNDCANVAS 0 /* Roland Soundcanvas; F5 NN selects part */ #define SNDRV_SERIAL_MS124T 1 /* Midiator MS-124T */ @@ -81,38 +80,27 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Serial MIDI."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Serial MIDI."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable UART16550A chip."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for UART16550A chip."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for UART16550A chip."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(speed, int, boot_devs, 0444); MODULE_PARM_DESC(speed, "Speed in bauds."); -MODULE_PARM_SYNTAX(speed, SNDRV_ENABLED ",allows:{9600,19200,38400,57600,115200},dialog:list"); module_param_array(base, int, boot_devs, 0444); MODULE_PARM_DESC(base, "Base for divisor in bauds."); -MODULE_PARM_SYNTAX(base, SNDRV_ENABLED ",allows:{57600,115200,230400,460800},dialog:list"); module_param_array(outs, int, boot_devs, 0444); MODULE_PARM_DESC(outs, "Number of MIDI outputs."); module_param_array(ins, int, boot_devs, 0444); MODULE_PARM_DESC(ins, "Number of MIDI inputs."); module_param_array(droponfull, bool, boot_devs, 0444); MODULE_PARM_DESC(droponfull, "Flag to enable drop-on-full buffer mode"); -MODULE_PARM_SYNTAX(droponfull, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); -MODULE_PARM_SYNTAX(outs, SNDRV_ENABLED ",allows:{{1,16}},dialog:list"); -MODULE_PARM_SYNTAX(ins, SNDRV_ENABLED ",allows:{{1,16}},dialog:list"); module_param_array(adaptor, int, boot_devs, 0444); MODULE_PARM_DESC(adaptor, "Type of adaptor."); -MODULE_PARM_SYNTAX(adaptor, SNDRV_ENABLED ",allows:{{0=Soundcanvas,1=MS-124T,2=MS-124W S/A,3=MS-124W M/B,4=Generic}},dialog:list"); /*#define SNDRV_SERIAL_MS124W_MB_NOCOMBO 1*/ /* Address outs as 0-3 instead of bitmap */ @@ -524,7 +512,7 @@ static int snd_uart16550_input_open(snd_rawmidi_substream_t * substream) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return -ENXIO); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); if (uart->filemode == SERIAL_MODE_NOT_OPENED) @@ -538,7 +526,7 @@ static int snd_uart16550_input_close(snd_rawmidi_substream_t * substream) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return -ENXIO); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); uart->filemode &= ~SERIAL_MODE_INPUT_OPEN; @@ -552,7 +540,7 @@ static void snd_uart16550_input_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); if (up) { @@ -566,7 +554,7 @@ static int snd_uart16550_output_open(snd_rawmidi_substream_t * substream) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return -ENXIO); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); if (uart->filemode == SERIAL_MODE_NOT_OPENED) @@ -580,7 +568,7 @@ static int snd_uart16550_output_close(snd_rawmidi_substream_t * substream) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return -ENXIO); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); uart->filemode &= ~SERIAL_MODE_OUTPUT_OPEN; @@ -652,7 +640,7 @@ { unsigned long flags; unsigned char midi_byte, addr_byte; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return); + snd_uart16550_t *uart = substream->rmidi->private_data; char first; static unsigned long lasttime=0; @@ -730,7 +718,7 @@ static void snd_uart16550_output_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, substream->rmidi->private_data, return); + snd_uart16550_t *uart = substream->rmidi->private_data; spin_lock_irqsave(&uart->open_lock, flags); if (up) { @@ -765,13 +753,13 @@ release_resource(uart->res_base); kfree_nocheck(uart->res_base); } - snd_magic_kfree(uart); + kfree(uart); return 0; }; static int snd_uart16550_dev_free(snd_device_t *device) { - snd_uart16550_t *uart = snd_magic_cast(snd_uart16550_t, device->device_data, return -ENXIO); + snd_uart16550_t *uart = device->device_data; return snd_uart16550_free(uart); } @@ -791,7 +779,7 @@ int err; - if ((uart = snd_magic_kcalloc(snd_uart16550_t, 0, GFP_KERNEL)) == NULL) + if ((uart = kcalloc(1, sizeof(*uart), GFP_KERNEL)) == NULL) return -ENOMEM; uart->adaptor = adaptor; uart->card = card; diff -Nru a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c --- a/sound/drivers/virmidi.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/virmidi.c 2004-09-06 16:37:51 -07:00 @@ -57,8 +57,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("Dummy soundcard for virtual rawmidi devices"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ALSA,Virtual rawmidi device}}"); +MODULE_SUPPORTED_DEVICE("{{ALSA,Virtual rawmidi device}}"); #define MAX_MIDI_DEVICES 8 @@ -70,16 +69,12 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for virmidi soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for virmidi soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable this soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(midi_devs, int, boot_devs, 0444); MODULE_PARM_DESC(midi_devs, "MIDI devices # (1-8)"); -MODULE_PARM_SYNTAX(midi_devs, SNDRV_ENABLED ",allows:{{1,8}}"); typedef struct snd_card_virmidi { snd_card_t *card; @@ -113,7 +108,7 @@ snd_virmidi_dev_t *rdev; if ((err = snd_virmidi_new(card, idx, &rmidi)) < 0) goto __nodev; - rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, continue); + rdev = rmidi->private_data; vmidi->midi[idx] = rmidi; strcpy(rmidi->name, "Virtual Raw MIDI"); rdev->seq_mode = SNDRV_VIRMIDI_SEQ_DISPATCH; diff -Nru a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c --- a/sound/drivers/vx/vx_core.c 2004-09-06 16:37:54 -07:00 +++ b/sound/drivers/vx/vx_core.c 2004-09-06 16:37:54 -07:00 @@ -506,7 +506,7 @@ */ static void vx_interrupt(unsigned long private_data) { - vx_core_t *chip = snd_magic_cast(vx_core_t, (void*)private_data, return); + vx_core_t *chip = (vx_core_t *) private_data; unsigned int events; if (chip->chip_status & VX_STAT_IS_STALE) @@ -550,7 +550,7 @@ */ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) { - vx_core_t *chip = snd_magic_cast(vx_core_t, dev, return IRQ_NONE); + vx_core_t *chip = dev; if (! (chip->chip_status & VX_STAT_CHIP_INIT) || (chip->chip_status & VX_STAT_IS_STALE)) @@ -572,6 +572,7 @@ if (cold_reset) { chip->audio_source_target = chip->audio_source; chip->clock_source = INTERNAL_QUARTZ; + chip->clock_mode = VX_CLOCK_MODE_AUTO; chip->freq = 48000; chip->uer_detected = VX_UER_MODE_NOT_PRESENT; chip->uer_bits = SNDRV_PCM_DEFAULT_CON_SPDIF; @@ -603,9 +604,10 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - vx_core_t *chip = snd_magic_cast(vx_core_t, entry->private_data, return); + vx_core_t *chip = entry->private_data; static char *audio_src_vxp[] = { "Line", "Mic", "Digital" }; static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" }; + static char *clock_mode[] = { "Auto", "Internal", "External" }; static char *clock_src[] = { "Internal", "External" }; static char *uer_type[] = { "Consumer", "Professional", "Not Present" }; @@ -629,6 +631,7 @@ snd_iprintf(buffer, "Input Source: %s\n", vx_is_pcmcia(chip) ? audio_src_vxp[chip->audio_source] : audio_src_vx2[chip->audio_source]); + snd_iprintf(buffer, "Clock Mode: %s\n", clock_mode[chip->clock_mode]); snd_iprintf(buffer, "Clock Source: %s\n", clock_src[chip->clock_source]); snd_iprintf(buffer, "Frequency: %d\n", chip->freq); snd_iprintf(buffer, "Detected Frequency: %d\n", chip->freq_detected); @@ -731,7 +734,7 @@ snd_assert(card && hw && ops, return NULL); - chip = snd_magic_kcalloc(vx_core_t, extra_size, GFP_KERNEL); + chip = kcalloc(1, sizeof(chip) + extra_size, GFP_KERNEL); if (! chip) { snd_printk(KERN_ERR "vx_core: no memory\n"); return NULL; diff -Nru a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c --- a/sound/drivers/vx/vx_hwdep.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/vx/vx_hwdep.c 2004-09-06 16:37:51 -07:00 @@ -44,7 +44,7 @@ [VX_TYPE_VXPOCKET] = "vxpocket", [VX_TYPE_VXP440] = "vxp440", }; - vx_core_t *vx = snd_magic_cast(vx_core_t, hw->private_data, return -ENXIO); + vx_core_t *vx = hw->private_data; snd_assert(type_ids[vx->type], return -EINVAL); strcpy(info->id, type_ids[vx->type]); @@ -60,7 +60,7 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) { - vx_core_t *vx = snd_magic_cast(vx_core_t, hw->private_data, return -ENXIO); + vx_core_t *vx = hw->private_data; int index, err; snd_assert(vx->ops->load_dsp, return -ENXIO); diff -Nru a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c --- a/sound/drivers/vx/vx_mixer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/vx/vx_mixer.c 2004-09-06 16:37:51 -07:00 @@ -26,8 +26,6 @@ #include #include "vx_cmd.h" -#define chip_t vx_core_t - /* * write a codec data (24bit) @@ -524,6 +522,54 @@ }; /* + * clock mode selection + */ +static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + static char *texts[3] = { + "Auto", "Internal", "External" + }; + + uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; + uinfo->count = 1; + uinfo->value.enumerated.items = 3; + if (uinfo->value.enumerated.item > 2) + uinfo->value.enumerated.item = 2; + strcpy(uinfo->value.enumerated.name, + texts[uinfo->value.enumerated.item]); + return 0; +} + +static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + vx_core_t *chip = snd_kcontrol_chip(kcontrol); + ucontrol->value.enumerated.item[0] = chip->clock_mode; + return 0; +} + +static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + vx_core_t *chip = snd_kcontrol_chip(kcontrol); + down(&chip->mixer_mutex); + if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { + chip->clock_mode = ucontrol->value.enumerated.item[0]; + vx_set_clock(chip, chip->freq); + up(&chip->mixer_mutex); + return 1; + } + up(&chip->mixer_mutex); + return 0; +} + +static snd_kcontrol_new_t vx_control_clock_mode = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Clock Mode", + .info = vx_clock_mode_info, + .get = vx_clock_mode_get, + .put = vx_clock_mode_put, +}; + +/* * Audio Gain */ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) @@ -912,6 +958,9 @@ /* Audio source */ if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_audio_src, chip))) < 0) + return err; + /* clock mode */ + if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_clock_mode, chip))) < 0) return err; /* IEC958 controls */ if ((err = snd_ctl_add(card, snd_ctl_new1(&vx_control_iec958_mask, chip))) < 0) diff -Nru a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c --- a/sound/drivers/vx/vx_pcm.c 2004-09-06 16:37:50 -07:00 +++ b/sound/drivers/vx/vx_pcm.c 2004-09-06 16:37:50 -07:00 @@ -48,14 +48,13 @@ #include #include #include +#include #include #include #include #include #include "vx_cmd.h" -#define chip_t vx_core_t - /* * we use a vmalloc'ed (sg-)buffer @@ -381,7 +380,7 @@ */ static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) { - int err, i, cur_state, delay; + int err, i, cur_state; /* Check the pipe is not already in the requested state */ if (vx_get_pipe_state(chip, pipe, &cur_state) < 0) @@ -394,17 +393,14 @@ * enough sound buffer for this pipe) */ if (state) { - int delay = CAN_START_DELAY; for (i = 0 ; i < MAX_WAIT_FOR_DSP; i++) { - snd_vx_delay(chip, delay); err = vx_pipe_can_start(chip, pipe); if (err > 0) break; /* Wait for a few, before asking again * to avoid flooding the DSP with our requests */ - if ((i % 4 ) == 0) - delay <<= 1; + mdelay(1); } } @@ -418,15 +414,12 @@ * reaching the expected state before returning * Check one pipe only (since they are synchronous) */ - delay = WAIT_STATE_DELAY; for (i = 0; i < MAX_WAIT_FOR_DSP; i++) { - snd_vx_delay(chip, delay); err = vx_get_pipe_state(chip, pipe, &cur_state); if (err < 0 || cur_state == state) break; err = -EIO; - if ((i % 4 ) == 0) - delay <<= 1; + mdelay(1); } return err < 0 ? -EIO : 0; } @@ -480,7 +473,7 @@ return err; /* initialize the pipe record */ - pipe = snd_magic_kcalloc(vx_pipe_t, 0, GFP_KERNEL); + pipe = kcalloc(1, sizeof(*pipe), GFP_KERNEL); if (! pipe) { /* release the pipe */ vx_init_rmh(&rmh, CMD_FREE_PIPE); @@ -514,7 +507,7 @@ vx_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->number, 0); vx_send_msg(chip, &rmh); - snd_magic_kfree(pipe); + kfree(pipe); return 0; } @@ -629,7 +622,7 @@ if (! subs->runtime->private_data) return -EINVAL; - pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return -EINVAL); + pipe = subs->runtime->private_data; if (--pipe->references == 0) { chip->playback_pipes[pipe->number] = NULL; @@ -778,8 +771,8 @@ static void vx_pcm_delayed_start(unsigned long arg) { snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg; - vx_core_t *chip = snd_magic_cast(vx_core_t, subs->pcm->private_data, return); - vx_pipe_t *pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return); + vx_core_t *chip = subs->pcm->private_data; + vx_pipe_t *pipe = subs->runtime->private_data; int err; /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ @@ -801,7 +794,7 @@ static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) { vx_core_t *chip = snd_pcm_substream_chip(subs); - vx_pipe_t *pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return -EINVAL); + vx_pipe_t *pipe = subs->runtime->private_data; int err; if (chip->chip_status & VX_STAT_IS_STALE) @@ -846,7 +839,7 @@ static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs) { snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = snd_magic_cast(vx_pipe_t, runtime->private_data, return -EINVAL); + vx_pipe_t *pipe = runtime->private_data; return pipe->position; } @@ -874,7 +867,7 @@ { vx_core_t *chip = snd_pcm_substream_chip(subs); snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = snd_magic_cast(vx_pipe_t, runtime->private_data, return -EINVAL); + vx_pipe_t *pipe = runtime->private_data; int err, data_mode; // int max_size, nchunks; @@ -1037,7 +1030,7 @@ if (! subs->runtime->private_data) return -EINVAL; - pipe = snd_magic_cast(vx_pipe_t, subs->runtime->private_data, return -EINVAL); + pipe = subs->runtime->private_data; chip->capture_pipes[pipe->number] = NULL; pipe_out_monitoring = pipe->monitoring_pipe; @@ -1141,7 +1134,7 @@ static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs) { snd_pcm_runtime_t *runtime = subs->runtime; - vx_pipe_t *pipe = snd_magic_cast(vx_pipe_t, runtime->private_data, return -EINVAL); + vx_pipe_t *pipe = runtime->private_data; return bytes_to_frames(runtime, pipe->hw_ptr); } @@ -1265,7 +1258,7 @@ */ static void snd_vx_pcm_free(snd_pcm_t *pcm) { - vx_core_t *chip = snd_magic_cast(vx_core_t, pcm->private_data, return); + vx_core_t *chip = pcm->private_data; chip->pcm[pcm->device] = NULL; if (chip->playback_pipes) { kfree(chip->playback_pipes); diff -Nru a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c --- a/sound/drivers/vx/vx_uer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/drivers/vx/vx_uer.c 2004-09-06 16:37:51 -07:00 @@ -263,17 +263,17 @@ /* change the audio source if possible */ vx_sync_audio_source(chip); - switch (chip->audio_source) { - case VX_AUDIO_SRC_DIGITAL: + if (chip->clock_mode == VX_CLOCK_MODE_EXTERNAL || + (chip->clock_mode == VX_CLOCK_MODE_AUTO && + chip->audio_source == VX_AUDIO_SRC_DIGITAL)) { if (chip->clock_source != UER_SYNC) { vx_change_clock_source(chip, UER_SYNC); mdelay(6); src_changed = 1; } - if (chip->freq == freq) - return 0; - break; - default: + } else if (chip->clock_mode == VX_CLOCK_MODE_INTERNAL || + (chip->clock_mode == VX_CLOCK_MODE_AUTO && + chip->audio_source != VX_AUDIO_SRC_DIGITAL)) { if (chip->clock_source != INTERNAL_QUARTZ) { vx_change_clock_source(chip, INTERNAL_QUARTZ); src_changed = 1; @@ -283,8 +283,9 @@ vx_set_internal_clock(chip, freq); if (src_changed) vx_modify_board_inputs(chip); - break; } + if (chip->freq == freq) + return 0; chip->freq = freq; vx_modify_board_clock(chip, 1); return 0; diff -Nru a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c --- a/sound/i2c/cs8427.c 2004-09-06 16:37:50 -07:00 +++ b/sound/i2c/cs8427.c 2004-09-06 16:37:50 -07:00 @@ -34,8 +34,6 @@ MODULE_DESCRIPTION("IEC958 (S/PDIF) receiver & transmitter by Cirrus Logic"); MODULE_LICENSE("GPL"); -#define chip_t snd_i2c_device_t - #define CS8427_ADDR (0x20>>1) /* fixed address */ typedef struct { @@ -109,7 +107,7 @@ static int snd_cs8427_select_corudata(snd_i2c_device_t *device, int udata) { - cs8427_t *chip = snd_magic_cast(cs8427_t, device->private_data, return -ENXIO); + cs8427_t *chip = device->private_data; int err; udata = udata ? CS8427_BSEL : 0; @@ -128,7 +126,7 @@ unsigned char *ndata, int count) { - cs8427_t *chip = snd_magic_cast(cs8427_t, device->private_data, return -ENXIO); + cs8427_t *chip = device->private_data; char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status; char data[32]; int err, idx; @@ -159,7 +157,7 @@ static void snd_cs8427_free(snd_i2c_device_t *device) { if (device->private_data) - snd_magic_kfree(device->private_data); + kfree(device->private_data); } int snd_cs8427_create(snd_i2c_bus_t *bus, @@ -211,7 +209,7 @@ if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), &device)) < 0) return err; - chip = device->private_data = snd_magic_kcalloc(cs8427_t, 0, GFP_KERNEL); + chip = device->private_data = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) { snd_i2c_device_free(device); return -ENOMEM; @@ -297,7 +295,7 @@ int data; snd_assert(cs8427, return); - chip = snd_magic_cast(cs8427_t, cs8427->private_data, return); + chip = cs8427->private_data; snd_i2c_lock(cs8427->bus); chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, chip->regmap[CS8427_REG_CLOCKSOURCE]); @@ -389,7 +387,7 @@ snd_ctl_elem_value_t * ucontrol) { snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol); - cs8427_t *chip = snd_magic_cast(cs8427_t, device->private_data, return -ENXIO); + cs8427_t *chip = device->private_data; snd_i2c_lock(device->bus); memcpy(ucontrol->value.iec958.status, chip->playback.def_status, 24); @@ -401,7 +399,7 @@ snd_ctl_elem_value_t * ucontrol) { snd_i2c_device_t *device = snd_kcontrol_chip(kcontrol); - cs8427_t *chip = snd_magic_cast(cs8427_t, device->private_data, return -ENXIO); + cs8427_t *chip = device->private_data; unsigned char *status = kcontrol->private_value ? chip->playback.pcm_status : chip->playback.def_status; snd_pcm_runtime_t *runtime = chip->playback.substream ? chip->playback.substream->runtime : NULL; int err, change; @@ -432,8 +430,6 @@ return 0; } -#define CONTROLS (sizeof(snd_cs8427_iec958_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs8427_iec958_controls[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -487,13 +483,13 @@ snd_pcm_substream_t *play_substream, snd_pcm_substream_t *cap_substream) { - cs8427_t *chip = snd_magic_cast(cs8427_t, cs8427->private_data, return -ENXIO); + cs8427_t *chip = cs8427->private_data; snd_kcontrol_t *kctl; unsigned int idx; int err; snd_assert(play_substream && cap_substream, return -EINVAL); - for (idx = 0; idx < CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs8427_iec958_controls); idx++) { kctl = snd_ctl_new1(&snd_cs8427_iec958_controls[idx], cs8427); if (kctl == NULL) return -ENOMEM; @@ -517,7 +513,7 @@ cs8427_t *chip; snd_assert(cs8427, return -ENXIO); - chip = snd_magic_cast(cs8427_t, cs8427->private_data, return -ENXIO); + chip = cs8427->private_data; if (active) memcpy(chip->playback.pcm_status, chip->playback.def_status, 24); chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; @@ -533,7 +529,7 @@ int err, reset; snd_assert(cs8427, return -ENXIO); - chip = snd_magic_cast(cs8427_t, cs8427->private_data, return -ENXIO); + chip = cs8427->private_data; status = chip->playback.pcm_status; snd_i2c_lock(cs8427->bus); if (status[0] & IEC958_AES0_PROFESSIONAL) { diff -Nru a/sound/i2c/i2c.c b/sound/i2c/i2c.c --- a/sound/i2c/i2c.c 2004-09-06 16:37:52 -07:00 +++ b/sound/i2c/i2c.c 2004-09-06 16:37:52 -07:00 @@ -62,13 +62,13 @@ } if (bus->private_free) bus->private_free(bus); - snd_magic_kfree(bus); + kfree(bus); return 0; } static int snd_i2c_bus_dev_free(snd_device_t *device) { - snd_i2c_bus_t *bus = snd_magic_cast(snd_i2c_bus_t, device->device_data, return -ENXIO); + snd_i2c_bus_t *bus = device->device_data; return snd_i2c_bus_free(bus); } @@ -81,7 +81,7 @@ }; *ri2c = NULL; - bus = (snd_i2c_bus_t *)snd_magic_kcalloc(snd_i2c_bus_t, 0, GFP_KERNEL); + bus = kcalloc(1, sizeof(*bus), GFP_KERNEL); if (bus == NULL) return -ENOMEM; init_MUTEX(&bus->lock_mutex); @@ -108,7 +108,7 @@ *rdevice = NULL; snd_assert(bus != NULL, return -EINVAL); - device = (snd_i2c_device_t *)snd_magic_kcalloc(snd_i2c_device_t, 0, GFP_KERNEL); + device = kcalloc(1, sizeof(*device), GFP_KERNEL); if (device == NULL) return -ENOMEM; device->addr = addr; @@ -125,7 +125,7 @@ list_del(&device->list); if (device->private_free) device->private_free(device); - snd_magic_kfree(device); + kfree(device); return 0; } diff -Nru a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c --- a/sound/i2c/l3/uda1341.c 2004-09-06 16:37:52 -07:00 +++ b/sound/i2c/l3/uda1341.c 2004-09-06 16:37:52 -07:00 @@ -17,7 +17,7 @@ * 2002-05-12 Tomas Kasparek another code cleanup */ -/* $Id: uda1341.c,v 1.10 2003/10/23 14:34:52 perex Exp $ */ +/* $Id: uda1341.c,v 1.13 2004/07/20 15:54:13 cladisch Exp $ */ #include #include @@ -131,7 +131,6 @@ //hack for ALSA magic casting typedef struct l3_client l3_client_t; -#define chip_t l3_client_t /* transfer 8bit integer into string with binary representation */ void int2str_bin8(uint8_t val, char *buf){ @@ -332,7 +331,7 @@ static void snd_uda1341_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - struct l3_client *clnt = snd_magic_cast(l3_client_t, entry->private_data, return); + struct l3_client *clnt = entry->private_data; struct uda1341 *uda = clnt->driver_data; int peak; @@ -397,7 +396,7 @@ static void snd_uda1341_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - struct l3_client *clnt = snd_magic_cast(l3_client_t, entry->private_data, return); + struct l3_client *clnt = entry->private_data; struct uda1341 *uda = clnt->driver_data; int reg; char buf[12]; @@ -618,8 +617,6 @@ /* }}} */ -#define UDA1341_CONTROLS (sizeof(snd_uda1341_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_uda1341_controls[] = { UDA1341_SINGLE("Master Playback Switch", CMD_MUTE, data0_2, 2, 1, 1), UDA1341_SINGLE("Master Playback Volume", CMD_VOLUME, data0_0, 0, 63, 1), @@ -653,12 +650,12 @@ static void uda1341_free(struct l3_client *uda1341) { l3_detach_client(uda1341); // calls kfree for driver_data (uda1341_t) - snd_magic_kfree(uda1341); + kfree(uda1341); } static int uda1341_dev_free(snd_device_t *device) { - struct l3_client *clnt = snd_magic_cast(l3_client_t, device->device_data, return); + struct l3_client *clnt = device->device_data; uda1341_free(clnt); return 0; } @@ -673,7 +670,7 @@ snd_assert(card != NULL, return -EINVAL); - uda1341 = snd_magic_kcalloc(l3_client_t, 0, GFP_KERNEL); + uda1341 = kcalloc(1, sizeof(*uda1341), GFP_KERNEL); if (uda1341 == NULL) return -ENOMEM; @@ -688,7 +685,7 @@ return err; } - for (idx = 0; idx < UDA1341_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_uda1341_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_uda1341_controls[idx], uda1341))) < 0) return err; } @@ -710,7 +707,7 @@ { struct uda1341 *uda; - uda = snd_magic_kcalloc(uda1341_t, 0, GFP_KERNEL); + uda = kcalloc(1, sizeof(*uda), 0, GFP_KERNEL); if (!uda) return -ENOMEM; @@ -734,7 +731,7 @@ static void uda1341_detach(struct l3_client *clnt) { if (clnt->driver_data) - snd_magic_kfree(clnt->driver_data); + kfree(clnt->driver_data); } static int @@ -821,8 +818,7 @@ MODULE_AUTHOR("Tomas Kasparek "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Philips UDA1341 CODEC driver for ALSA"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{UDA1341,UDA1341TS}}"); +MODULE_SUPPORTED_DEVICE("{{UDA1341,UDA1341TS}}"); EXPORT_SYMBOL(snd_chip_uda1341_mixer_new); diff -Nru a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c --- a/sound/i2c/other/ak4117.c 2004-09-06 16:37:53 -07:00 +++ b/sound/i2c/other/ak4117.c 2004-09-06 16:37:53 -07:00 @@ -33,8 +33,6 @@ MODULE_DESCRIPTION("AK4117 IEC958 (S/PDIF) receiver by Asahi Kasei"); MODULE_LICENSE("GPL"); -#define chip_t ak4117_t - #define AK4117_ADDR 0x00 /* fixed address */ static void snd_ak4117_timer(unsigned long data); @@ -65,12 +63,12 @@ static void snd_ak4117_free(ak4117_t *chip) { del_timer(&chip->timer); - snd_magic_kfree(chip); + kfree(chip); } static int snd_ak4117_dev_free(snd_device_t *device) { - ak4117_t *chip = snd_magic_cast(ak4117_t, device->device_data, return -ENXIO); + ak4117_t *chip = device->device_data; snd_ak4117_free(chip); return 0; } @@ -85,7 +83,7 @@ .dev_free = snd_ak4117_dev_free, }; - chip = (ak4117_t *)snd_magic_kcalloc(ak4117_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->lock); @@ -544,7 +542,7 @@ static void snd_ak4117_timer(unsigned long data) { - ak4117_t *chip = snd_magic_cast(ak4117_t, (void *)data, return); + ak4117_t *chip = (ak4117_t *)data; if (chip->init) return; diff -Nru a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c --- a/sound/i2c/other/ak4xxx-adda.c 2004-09-06 16:37:55 -07:00 +++ b/sound/i2c/other/ak4xxx-adda.c 2004-09-06 16:37:55 -07:00 @@ -237,7 +237,7 @@ static int snd_akm4xxx_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int invert = AK_GET_INVERT(kcontrol->private_value); @@ -250,7 +250,7 @@ static int snd_akm4xxx_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int invert = AK_GET_INVERT(kcontrol->private_value); @@ -277,7 +277,7 @@ static int snd_akm4xxx_ipga_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f; @@ -286,7 +286,7 @@ static int snd_akm4xxx_ipga_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); unsigned char nval = (ucontrol->value.integer.value[0] % 37) | 0x80; @@ -312,7 +312,7 @@ static int snd_akm4xxx_deemphasis_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontrol->private_value); @@ -322,7 +322,7 @@ static int snd_akm4xxx_deemphasis_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - akm4xxx_t *ak = _snd_kcontrol_chip(kcontrol); + akm4xxx_t *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontrol->private_value); diff -Nru a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c --- a/sound/i2c/tea6330t.c 2004-09-06 16:37:52 -07:00 +++ b/sound/i2c/tea6330t.c 2004-09-06 16:37:52 -07:00 @@ -30,8 +30,6 @@ MODULE_DESCRIPTION("Routines for control of the TEA6330T circuit via i2c bus"); MODULE_LICENSE("GPL"); -#define chip_t tea6330t_t - #define TEA6330T_ADDR (0x80>>1) /* fixed address */ #define TEA6330T_SADDR_VOLUME_LEFT 0x00 /* volume left */ @@ -259,8 +257,6 @@ return change; } -#define TEA6330T_CONTROLS (sizeof(snd_tea6330t_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_tea6330t_controls[] = { TEA6330T_MASTER_SWITCH("Master Playback Switch", 0), TEA6330T_MASTER_VOLUME("Master Playback Volume", 0), @@ -270,8 +266,8 @@ static void snd_tea6330_free(snd_i2c_device_t *device) { - tea6330t_t *tea = snd_magic_cast(tea6330t_t, device->private_data, return); - snd_magic_kfree(tea); + tea6330t_t *tea = device->private_data; + kfree(tea); } int snd_tea6330t_update_mixer(snd_card_t * card, @@ -286,11 +282,11 @@ u8 default_treble, default_bass; unsigned char bytes[7]; - tea = snd_magic_kcalloc(tea6330t_t, 0, GFP_KERNEL); + tea = kcalloc(1, sizeof(*tea), GFP_KERNEL); if (tea == NULL) return -ENOMEM; if ((err = snd_i2c_device_create(bus, "TEA6330T", TEA6330T_ADDR, &device)) < 0) { - snd_magic_kfree(tea); + kfree(tea); return err; } tea->device = device; @@ -336,7 +332,7 @@ if ((err = snd_component_add(card, "TEA6330T")) < 0) goto __error; - for (idx = 0; idx < TEA6330T_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_tea6330t_controls); idx++) { knew = &snd_tea6330t_controls[idx]; if (tea->treble == 0 && !strcmp(knew->name, "Tone Control - Treble")) continue; diff -Nru a/sound/isa/Kconfig b/sound/isa/Kconfig --- a/sound/isa/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/sound/isa/Kconfig 2004-09-06 16:37:54 -07:00 @@ -77,11 +77,15 @@ help Say 'Y' or 'M' to include support for ESS AudioDrive ES18xx chips. +config SND_GUS_SYNTH + tristate + config SND_GUSCLASSIC tristate "Gravis UltraSound Classic" depends on SND select SND_RAWMIDI select SND_PCM + select SND_GUS_SYNTH help Say 'Y' or 'M' to include support for Gravis UltraSound Classic soundcard. @@ -91,6 +95,7 @@ select SND_HWDEP select SND_MPU401_UART select SND_PCM + select SND_GUS_SYNTH help Say 'Y' or 'M' to include support for Gravis UltraSound Extreme soundcard. @@ -99,6 +104,7 @@ depends on SND select SND_RAWMIDI select SND_PCM + select SND_GUS_SYNTH help Say 'Y' or 'M' to include support for Gravis UltraSound MAX soundcard. @@ -107,6 +113,7 @@ depends on SND select SND_RAWMIDI select SND_PCM + select SND_GUS_SYNTH help Say 'Y' or 'M' to include support for AMD InterWave based soundcards (Gravis UltraSound Plug & Play, STB SoundRage32, MED3210, Dynasonic Pro, @@ -117,6 +124,7 @@ depends on SND select SND_RAWMIDI select SND_PCM + select SND_GUS_SYNTH help Say 'Y' or 'M' to include support for AMD InterWave based soundcards with TEA6330T bass and treble regulator (UltraSound 32-Pro). diff -Nru a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c --- a/sound/isa/ad1816a/ad1816a.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/ad1816a/ad1816a.c 2004-09-06 16:37:51 -07:00 @@ -30,15 +30,12 @@ #include #include -#define chip_t ad1816a_t - #define PFX "ad1816a: " MODULE_AUTHOR("Massimo Piccioni "); MODULE_DESCRIPTION("AD1816A, AD1815"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Highscreen,Sound-Boostar 16 3D}," +MODULE_SUPPORTED_DEVICE("{{Highscreen,Sound-Boostar 16 3D}," "{Analog Devices,AD1815}," "{Analog Devices,AD1816A}," "{TerraTec,Base 64}," @@ -60,34 +57,24 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ad1816a based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ad1816a based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ad1816a based soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for ad1816a driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ad1816a driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for ad1816a driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for ad1816a driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ad1816a driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "1st DMA # for ad1816a driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "2nd DMA # for ad1816a driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); struct snd_card_ad1816a { struct pnp_dev *dev; diff -Nru a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c --- a/sound/isa/ad1816a/ad1816a_lib.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/ad1816a/ad1816a_lib.c 2004-09-06 16:37:53 -07:00 @@ -34,8 +34,6 @@ MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip"); MODULE_LICENSE("GPL"); -#define chip_t ad1816a_t - static inline int snd_ad1816a_busy_wait(ad1816a_t *chip) { int timeout; @@ -313,7 +311,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ad1816a_t *chip = snd_magic_cast(ad1816a_t, dev_id, return IRQ_NONE); + ad1816a_t *chip = dev_id; unsigned char status; spin_lock(&chip->lock); @@ -550,13 +548,13 @@ snd_dma_disable(chip->dma2); free_dma(chip->dma2); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_ad1816a_dev_free(snd_device_t *device) { - ad1816a_t *chip = snd_magic_cast(ad1816a_t, device->device_data, return -ENXIO); + ad1816a_t *chip = device->device_data; return snd_ad1816a_free(chip); } @@ -585,7 +583,7 @@ *rchip = NULL; - chip = snd_magic_kcalloc(ad1816a_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->irq = -1; @@ -661,7 +659,7 @@ static void snd_ad1816a_pcm_free(snd_pcm_t *pcm) { - ad1816a_t *chip = snd_magic_cast(ad1816a_t, pcm->private_data, return); + ad1816a_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -696,7 +694,7 @@ static void snd_ad1816a_timer_free(snd_timer_t *timer) { - ad1816a_t *chip = snd_magic_cast(ad1816a_t, timer->private_data, return); + ad1816a_t *chip = timer->private_data; chip->timer = NULL; } @@ -901,8 +899,6 @@ return change; } -#define AD1816A_CONTROLS (sizeof(snd_ad1816a_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_ad1816a_controls[] = { AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1), AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1), @@ -950,7 +946,7 @@ strcpy(card->mixername, snd_ad1816a_chip_id(chip)); - for (idx = 0; idx < AD1816A_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_ad1816a_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ad1816a_controls[idx], chip))) < 0) return err; } diff -Nru a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c --- a/sound/isa/ad1848/ad1848.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/ad1848/ad1848.c 2004-09-06 16:37:53 -07:00 @@ -30,13 +30,10 @@ #include #include -#define chip_t ad1848_t - MODULE_AUTHOR("Tugrul Galatali , Jaroslav Kysela "); MODULE_DESCRIPTION("AD1848/AD1847/CS4248"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Analog Devices,AD1848}," +MODULE_SUPPORTED_DEVICE("{{Analog Devices,AD1848}," "{Analog Devices,AD1847}," "{Crystal Semiconductors,CS4248}}"); @@ -51,25 +48,18 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for AD1848 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for AD1848 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable AD1848 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for AD1848 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for AD1848 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for AD1848 driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(thinkpad, bool, boot_devs, 0444); MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 360/750/755 series."); -MODULE_PARM_SYNTAX(thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); static snd_card_t *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c --- a/sound/isa/ad1848/ad1848_lib.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/ad1848/ad1848_lib.c 2004-09-06 16:37:55 -07:00 @@ -39,8 +39,6 @@ MODULE_DESCRIPTION("Routines for control of AD1848/AD1847/CS4248"); MODULE_LICENSE("GPL"); -#define chip_t ad1848_t - #if 0 #define SNDRV_DEBUG_MCE #endif @@ -588,7 +586,7 @@ irqreturn_t snd_ad1848_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ad1848_t *chip = snd_magic_cast(ad1848_t, dev_id, return IRQ_NONE); + ad1848_t *chip = dev_id; if ((chip->mode & AD1848_MODE_PLAY) && chip->playback_substream && (chip->mode & AD1848_MODE_RUNNING)) @@ -649,7 +647,7 @@ #ifdef CONFIG_PM static int snd_ad1848_suspend(snd_card_t *card, unsigned int state) { - ad1848_t *chip = snd_magic_cast(ad1848_t, card->pm_private_data, return -EINVAL); + ad1848_t *chip = card->pm_private_data; if (card->power_state == SNDRV_CTL_POWER_D3hot) return 0; @@ -666,7 +664,7 @@ static int snd_ad1848_resume(snd_card_t *card, unsigned int state) { - ad1848_t *chip = snd_magic_cast(ad1848_t, card->pm_private_data, return -EINVAL); + ad1848_t *chip = card->pm_private_data; if (card->power_state == SNDRV_CTL_POWER_D0) return 0; @@ -867,13 +865,13 @@ snd_dma_disable(chip->dma); free_dma(chip->dma); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_ad1848_dev_free(snd_device_t *device) { - ad1848_t *chip = snd_magic_cast(ad1848_t, device->device_data, return -ENXIO); + ad1848_t *chip = device->device_data; return snd_ad1848_free(chip); } @@ -901,7 +899,7 @@ int err; *rchip = NULL; - chip = snd_magic_kcalloc(ad1848_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -977,7 +975,7 @@ static void snd_ad1848_pcm_free(snd_pcm_t *pcm) { - ad1848_t *chip = snd_magic_cast(ad1848_t, pcm->private_data, return); + ad1848_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } diff -Nru a/sound/isa/als100.c b/sound/isa/als100.c --- a/sound/isa/als100.c 2004-09-06 16:37:50 -07:00 +++ b/sound/isa/als100.c 2004-09-06 16:37:50 -07:00 @@ -32,15 +32,12 @@ #include #include -#define chip_t sb_t - #define PFX "als100: " MODULE_AUTHOR("Massimo Piccioni "); MODULE_DESCRIPTION("Avance Logic ALS1X0"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Avance Logic,ALS100 - PRO16PNP}," +MODULE_SUPPORTED_DEVICE("{{Avance Logic,ALS100 - PRO16PNP}," "{Avance Logic,ALS110}," "{Avance Logic,ALS120}," "{Avance Logic,ALS200}," @@ -63,34 +60,24 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for als100 based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for als100 based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable als100 based soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for als100 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for als100 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for als100 driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for als100 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for als100 driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for als100 driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); module_param_array(dma16, int, boot_devs, 0444); MODULE_PARM_DESC(dma16, "16-bit DMA # for als100 driver."); -MODULE_PARM_SYNTAX(dma16, SNDRV_DMA16_DESC); struct snd_card_als100 { int dev_no; diff -Nru a/sound/isa/azt2320.c b/sound/isa/azt2320.c --- a/sound/isa/azt2320.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/azt2320.c 2004-09-06 16:37:55 -07:00 @@ -43,15 +43,12 @@ #include #include -#define chip_t cs4231_t - #define PFX "azt2320: " MODULE_AUTHOR("Massimo Piccioni "); MODULE_DESCRIPTION("Aztech Systems AZT2320"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Aztech Systems,PRO16V}," +MODULE_SUPPORTED_DEVICE("{{Aztech Systems,PRO16V}," "{Aztech Systems,AZT2320}," "{Aztech Systems,AZT3300}," "{Aztech Systems,AZT2320}," @@ -72,37 +69,26 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for azt2320 based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for azt2320 based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable azt2320 based soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for azt2320 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(wss_port, long, boot_devs, 0444); MODULE_PARM_DESC(wss_port, "WSS Port # for azt2320 driver."); -MODULE_PARM_SYNTAX(wss_port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for azt2320 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for azt2320 driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for azt2320 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for azt2320 driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "1st DMA # for azt2320 driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "2nd DMA # for azt2320 driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); struct snd_card_azt2320 { int dev_no; diff -Nru a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c --- a/sound/isa/cmi8330.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/cmi8330.c 2004-09-06 16:37:55 -07:00 @@ -63,8 +63,7 @@ MODULE_AUTHOR("George Talusan "); MODULE_DESCRIPTION("C-Media CMI8330"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{C-Media,CMI8330,isapnp:{CMI0001,@@@0001,@X@0001}}}"); +MODULE_SUPPORTED_DEVICE("{{C-Media,CMI8330,isapnp:{CMI0001,@@@0001,@X@0001}}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; @@ -83,41 +82,30 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for CMI8330 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for CMI8330 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable CMI8330 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(sbport, long, boot_devs, 0444); MODULE_PARM_DESC(sbport, "Port # for CMI8330 SB driver."); -MODULE_PARM_SYNTAX(sbport, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list"); module_param_array(sbirq, int, boot_devs, 0444); MODULE_PARM_DESC(sbirq, "IRQ # for CMI8330 SB driver."); -MODULE_PARM_SYNTAX(sbirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{5},dialog:list"); module_param_array(sbdma8, int, boot_devs, 0444); MODULE_PARM_DESC(sbdma8, "DMA8 for CMI8330 SB driver."); -MODULE_PARM_SYNTAX(sbdma8, SNDRV_DMA8_DESC ",prefers:{1}"); module_param_array(sbdma16, int, boot_devs, 0444); MODULE_PARM_DESC(sbdma16, "DMA16 for CMI8330 SB driver."); -MODULE_PARM_SYNTAX(sbdma16, SNDRV_ENABLED ",allows:{{5},{7}},prefers:{5},dialog:list"); module_param_array(wssport, long, boot_devs, 0444); MODULE_PARM_DESC(wssport, "Port # for CMI8330 WSS driver."); -MODULE_PARM_SYNTAX(wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80,0xf40,0xc0}},prefers:{0x530},base:16,dialog:list"); module_param_array(wssirq, int, boot_devs, 0444); MODULE_PARM_DESC(wssirq, "IRQ # for CMI8330 WSS driver."); -MODULE_PARM_SYNTAX(wssirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{11},dialog:list"); module_param_array(wssdma, int, boot_devs, 0444); MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); -MODULE_PARM_SYNTAX(wssdma, SNDRV_DMA8_DESC ",prefers:{0}"); #define CMI8330_RMUX3D 16 #define CMI8330_MUTEMUX 17 @@ -385,7 +373,7 @@ static int snd_cmi8330_playback_open(snd_pcm_substream_t * substream) { - struct snd_cmi8330 *chip = (struct snd_cmi8330 *)_snd_pcm_substream_chip(substream); + struct snd_cmi8330 *chip = snd_pcm_substream_chip(substream); /* replace the private_data and call the original open callback */ substream->private_data = chip->streams[SNDRV_PCM_STREAM_PLAYBACK].private_data; @@ -394,7 +382,7 @@ static int snd_cmi8330_capture_open(snd_pcm_substream_t * substream) { - struct snd_cmi8330 *chip = (struct snd_cmi8330 *)_snd_pcm_substream_chip(substream); + struct snd_cmi8330 *chip = snd_pcm_substream_chip(substream); /* replace the private_data and call the original open callback */ substream->private_data = chip->streams[SNDRV_PCM_STREAM_CAPTURE].private_data; diff -Nru a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c --- a/sound/isa/cs423x/cs4231.c 2004-09-06 16:37:50 -07:00 +++ b/sound/isa/cs423x/cs4231.c 2004-09-06 16:37:50 -07:00 @@ -30,13 +30,10 @@ #include #include -#define chip_t cs4231_t - MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Generic CS4231"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Crystal Semiconductors,CS4231}}"); +MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4231}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -51,31 +48,22 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for CS4231 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for CS4231 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable CS4231 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for CS4231 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for CS4231 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for CS4231 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for CS4231 driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c --- a/sound/isa/cs423x/cs4231_lib.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/cs423x/cs4231_lib.c 2004-09-06 16:37:51 -07:00 @@ -43,8 +43,6 @@ MODULE_DESCRIPTION("Routines for control of CS4231(A)/CS4232/InterWave & compatible chips"); MODULE_LICENSE("GPL"); -#define chip_t cs4231_t - #if 0 #define SNDRV_DEBUG_MCE #endif @@ -969,7 +967,7 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return IRQ_NONE); + cs4231_t *chip = dev_id; unsigned char status; status = snd_cs4231_in(chip, CS4231_IRQ_STATUS); @@ -1407,7 +1405,7 @@ static int snd_cs4231_pm_suspend(snd_card_t *card, unsigned int state) { - cs4231_t *chip = snd_magic_cast(cs4231_t, card->pm_private_data, return -EINVAL); + cs4231_t *chip = card->pm_private_data; if (chip->suspend) { chip->suspend(chip); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1417,7 +1415,7 @@ static int snd_cs4231_pm_resume(snd_card_t *card, unsigned int state) { - cs4231_t *chip = snd_magic_cast(cs4231_t, card->pm_private_data, return -EINVAL); + cs4231_t *chip = card->pm_private_data; if (chip->resume) { chip->resume(chip); snd_power_change_state(card, SNDRV_CTL_POWER_D0); @@ -1453,13 +1451,13 @@ } if (chip->timer) snd_device_free(chip->card, chip->timer); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_cs4231_dev_free(snd_device_t *device) { - cs4231_t *chip = snd_magic_cast(cs4231_t, device->device_data, return -ENXIO); + cs4231_t *chip = device->device_data; return snd_cs4231_free(chip); } @@ -1493,7 +1491,7 @@ cs4231_t *chip; *rchip = NULL; - chip = snd_magic_kcalloc(cs4231_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->hardware = hardware; @@ -1626,7 +1624,7 @@ static void snd_cs4231_pcm_free(snd_pcm_t *pcm) { - cs4231_t *chip = snd_magic_cast(cs4231_t, pcm->private_data, return); + cs4231_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1686,7 +1684,7 @@ static void snd_cs4231_timer_free(snd_timer_t *timer) { - cs4231_t *chip = snd_magic_cast(cs4231_t, timer->private_data, return); + cs4231_t *chip = timer->private_data; chip->timer = NULL; } @@ -1898,8 +1896,6 @@ return change; } -#define CS4231_CONTROLS (sizeof(snd_cs4231_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4231_controls[] = { CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1), @@ -1938,7 +1934,7 @@ strcpy(card->mixername, chip->pcm->name); - for (idx = 0; idx < CS4231_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4231_controls[idx], chip))) < 0) return err; } diff -Nru a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c --- a/sound/isa/cs423x/cs4236.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/cs423x/cs4236.c 2004-09-06 16:37:51 -07:00 @@ -30,14 +30,11 @@ #include #include -#define chip_t cs4231_t - MODULE_AUTHOR("Jaroslav Kysela "); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); #ifdef CS4232 MODULE_DESCRIPTION("Cirrus Logic CS4232"); -MODULE_DEVICES("{{Turtle Beach,TBS-2000}," +MODULE_SUPPORTED_DEVICE("{{Turtle Beach,TBS-2000}," "{Turtle Beach,Tropez Plus}," "{SIC CrystalWave 32}," "{Hewlett Packard,Omnibook 5500}," @@ -45,7 +42,7 @@ "{Philips,PCA70PS}}"); #else MODULE_DESCRIPTION("Cirrus Logic CS4235-9"); -MODULE_DEVICES("{{Crystal Semiconductors,CS4235}," +MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235}," "{Crystal Semiconductors,CS4236}," "{Crystal Semiconductors,CS4237}," "{Crystal Semiconductors,CS4238}," @@ -99,45 +96,32 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " IDENT " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " IDENT " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable " IDENT " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for " IDENT " driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(cport, long, boot_devs, 0444); MODULE_PARM_DESC(cport, "Control port # for " IDENT " driver."); -MODULE_PARM_SYNTAX(cport, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " IDENT " driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for " IDENT " driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(sb_port, long, boot_devs, 0444); MODULE_PARM_DESC(sb_port, "SB port # for " IDENT " driver (optional)."); -MODULE_PARM_SYNTAX(sb_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for " IDENT " driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " IDENT " driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for " IDENT " driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); struct snd_card_cs4236 { struct resource *res_sb_port; diff -Nru a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c --- a/sound/isa/cs423x/cs4236_lib.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/cs423x/cs4236_lib.c 2004-09-06 16:37:51 -07:00 @@ -93,8 +93,6 @@ MODULE_DESCRIPTION("Routines for control of CS4235/4236B/4237B/4238B/4239 chips"); MODULE_LICENSE("GPL"); -#define chip_t cs4231_t - /* * */ @@ -707,8 +705,6 @@ return change; } -#define CS4236_CONTROLS (sizeof(snd_cs4236_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4236_controls[] = { CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1), @@ -760,8 +756,6 @@ CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1) }; -#define CS4235_CONTROLS (sizeof(snd_cs4235_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4235_controls[] = { CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1), @@ -871,8 +865,6 @@ return change; } -#define CS4236_IEC958_CONTROLS (sizeof(snd_cs4236_iec958_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4236_iec958_controls[] = { CS4236_IEC958_ENABLE("IEC958 Output Enable", 0), CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0), @@ -882,15 +874,11 @@ CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0) }; -#define CS4236_3D_CONTROLS_CS4235 (sizeof(snd_cs4236_3d_controls_cs4235)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4235[] = { CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1) }; -#define CS4236_3D_CONTROLS_CS4237 (sizeof(snd_cs4236_3d_controls_cs4237)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4237[] = { CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0), CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), @@ -899,8 +887,6 @@ CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0) }; -#define CS4236_3D_CONTROLS_CS4238 (sizeof(snd_cs4236_3d_controls_cs4238)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4238[] = { CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), @@ -921,12 +907,12 @@ if (chip->hardware == CS4231_HW_CS4235 || chip->hardware == CS4231_HW_CS4239) { - for (idx = 0; idx < CS4235_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs4235_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4235_controls[idx], chip))) < 0) return err; } } else { - for (idx = 0; idx < CS4236_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs4236_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4236_controls[idx], chip))) < 0) return err; } @@ -934,15 +920,15 @@ switch (chip->hardware) { case CS4231_HW_CS4235: case CS4231_HW_CS4239: - count = CS4236_3D_CONTROLS_CS4235; + count = ARRAY_SIZE(snd_cs4236_3d_controls_cs4235); kcontrol = snd_cs4236_3d_controls_cs4235; break; case CS4231_HW_CS4237B: - count = CS4236_3D_CONTROLS_CS4237; + count = ARRAY_SIZE(snd_cs4236_3d_controls_cs4237); kcontrol = snd_cs4236_3d_controls_cs4237; break; case CS4231_HW_CS4238B: - count = CS4236_3D_CONTROLS_CS4238; + count = ARRAY_SIZE(snd_cs4236_3d_controls_cs4238); kcontrol = snd_cs4236_3d_controls_cs4238; break; default: @@ -955,7 +941,7 @@ } if (chip->hardware == CS4231_HW_CS4237B || chip->hardware == CS4231_HW_CS4238B) { - for (idx = 0; idx < CS4236_IEC958_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs4236_iec958_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4236_iec958_controls[idx], chip))) < 0) return err; } diff -Nru a/sound/isa/dt019x.c b/sound/isa/dt019x.c --- a/sound/isa/dt019x.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/dt019x.c 2004-09-06 16:37:52 -07:00 @@ -33,15 +33,12 @@ #include #include -#define chip_t sb_t - #define PFX "dt019x: " MODULE_AUTHOR("Massimo Piccioni "); MODULE_DESCRIPTION("Diamond Technologies DT-019X / Avance Logic ALS-007"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Diamond Technologies DT-019X}," +MODULE_SUPPORTED_DEVICE("{{Diamond Technologies DT-019X}," "{Avance Logic ALS-007}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ @@ -57,31 +54,22 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for DT-019X based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for DT-019X based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable DT-019X based soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for dt019x driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for dt019x driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for dt019x driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for dt019x driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for dt019x driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for dt019x driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); struct snd_card_dt019x { struct pnp_dev *dev; diff -Nru a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c --- a/sound/isa/es1688/es1688.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/es1688/es1688.c 2004-09-06 16:37:51 -07:00 @@ -37,8 +37,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ESS ESx688 AudioDrive"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ESS,ES688 PnP AudioDrive,pnp:ESS0100}," +MODULE_SUPPORTED_DEVICE("{{ESS,ES688 PnP AudioDrive,pnp:ESS0100}," "{ESS,ES1688 PnP AudioDrive,pnp:ESS0102}," "{ESS,ES688 AudioDrive,pnp:ESS6881}," "{ESS,ES1688 AudioDrive,pnp:ESS1681}}"); @@ -55,28 +54,20 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ESx688 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ESx688 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ESx688 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for ESx688 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ESx688 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for ESx688 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ESx688 driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for ESx688 driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); static snd_card_t *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c --- a/sound/isa/es1688/es1688_lib.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/es1688/es1688_lib.c 2004-09-06 16:37:53 -07:00 @@ -34,7 +34,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ESS ESx688 lowlevel module"); -MODULE_CLASSES("{sound}"); MODULE_LICENSE("GPL"); static int snd_es1688_dsp_command(es1688_t *chip, unsigned char val) @@ -482,7 +481,7 @@ irqreturn_t snd_es1688_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - es1688_t *chip = snd_magic_cast(es1688_t, dev_id, return IRQ_NONE); + es1688_t *chip = dev_id; if (chip->trigger_value == 0x05) /* ok.. playback is active */ snd_pcm_period_elapsed(chip->playback_substream); @@ -616,13 +615,13 @@ disable_dma(chip->dma8); free_dma(chip->dma8); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_es1688_dev_free(snd_device_t *device) { - es1688_t *chip = snd_magic_cast(es1688_t, device->device_data, return -ENXIO); + es1688_t *chip = device->device_data; return snd_es1688_free(chip); } @@ -650,7 +649,7 @@ int err; *rchip = NULL; - chip = snd_magic_kcalloc(es1688_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->irq = -1; @@ -728,7 +727,7 @@ static void snd_es1688_pcm_free(snd_pcm_t *pcm) { - es1688_t *chip = snd_magic_cast(es1688_t, pcm->private_data, return); + es1688_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -978,8 +977,6 @@ return change; } -#define ES1688_CONTROLS (sizeof(snd_es1688_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_es1688_controls[] = { ES1688_DOUBLE("Master Playback Volume", 0, ES1688_MASTER_DEV, ES1688_MASTER_DEV, 4, 0, 15, 0), ES1688_DOUBLE("PCM Playback Volume", 0, ES1688_PCM_DEV, ES1688_PCM_DEV, 4, 0, 15, 0), @@ -1028,7 +1025,7 @@ strcpy(card->mixername, snd_es1688_chip_id(chip)); - for (idx = 0; idx < ES1688_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_es1688_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_es1688_controls[idx], chip))) < 0) return err; } diff -Nru a/sound/isa/es18xx.c b/sound/isa/es18xx.c --- a/sound/isa/es18xx.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/es18xx.c 2004-09-06 16:37:52 -07:00 @@ -157,8 +157,6 @@ typedef struct _snd_es18xx es18xx_t; -#define chip_t es18xx_t - /* Lowlevel */ #define DAC1 0x01 @@ -728,7 +726,7 @@ static irqreturn_t snd_es18xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - es18xx_t *chip = snd_magic_cast(es18xx_t, dev_id, return IRQ_NONE); + es18xx_t *chip = dev_id; unsigned char status; if (chip->caps & ES18XX_CONTROL) { @@ -1027,7 +1025,7 @@ static void snd_es18xx_hwv_free(snd_kcontrol_t *kcontrol) { - es18xx_t *chip = snd_magic_cast(es18xx_t, _snd_kcontrol_chip(kcontrol), return); + es18xx_t *chip = snd_kcontrol_chip(kcontrol); chip->master_volume = NULL; chip->master_switch = NULL; chip->hw_volume = NULL; @@ -1561,7 +1559,7 @@ static void snd_es18xx_pcm_free(snd_pcm_t *pcm) { - es18xx_t *codec = snd_magic_cast(es18xx_t, pcm->private_data, return); + es18xx_t *codec = pcm->private_data; codec->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1611,7 +1609,7 @@ #ifdef CONFIG_PM static int snd_es18xx_suspend(snd_card_t *card, unsigned int state) { - es18xx_t *chip = snd_magic_cast(es18xx_t, card->pm_private_data, return -EINVAL); + es18xx_t *chip = card->pm_private_data; snd_pcm_suspend_all(chip->pcm); @@ -1627,7 +1625,7 @@ static int snd_es18xx_resume(snd_card_t *card, unsigned int state) { - es18xx_t *chip = snd_magic_cast(es18xx_t, card->pm_private_data, return -EINVAL); + es18xx_t *chip = card->pm_private_data; /* restore PM register, we won't wake till (not 0x07) i/o activity though */ snd_es18xx_write(chip, ES18XX_PM, chip->pm_reg ^= ES18XX_PM_FM); @@ -1661,13 +1659,13 @@ disable_dma(chip->dma2); free_dma(chip->dma2); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_es18xx_dev_free(snd_device_t *device) { - es18xx_t *chip = snd_magic_cast(es18xx_t, device->device_data, return -ENXIO); + es18xx_t *chip = device->device_data; return snd_es18xx_free(chip); } @@ -1685,7 +1683,7 @@ int err; *rchip = NULL; - chip = snd_magic_kcalloc(es18xx_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -1830,8 +1828,7 @@ MODULE_AUTHOR("Christian Fischbach , Abramo Bagnara "); MODULE_DESCRIPTION("ESS ES18xx AudioDrive"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ESS,ES1868 PnP AudioDrive}," +MODULE_SUPPORTED_DEVICE("{{ESS,ES1868 PnP AudioDrive}," "{ESS,ES1869 PnP AudioDrive}," "{ESS,ES1878 PnP AudioDrive}," "{ESS,ES1879 PnP AudioDrive}," @@ -1860,36 +1857,26 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ES18xx soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ES18xx soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ES18xx soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for ES18xx driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list"); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ES18xx driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x330,0x30},{0x800,0xffe,0x2}},prefers:{0x330,0x300},base:16,dialog:combo"); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for ES18xx driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x800,0xffc,0x4}},prefers:{0x388},base:16,dialog:combo"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for ES18xx driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC ",prefers:{5}"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA 1 # for ES18xx driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA8_DESC ",prefers:{1}"); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{0},{1},{3},{5}},dialog:list,prefers:{0}"); struct snd_audiodrive { #ifdef CONFIG_PNP diff -Nru a/sound/isa/gus/Makefile b/sound/isa/gus/Makefile --- a/sound/isa/gus/Makefile 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/gus/Makefile 2004-09-06 16:37:55 -07:00 @@ -27,14 +27,10 @@ # Toplevel Module Dependency obj-$(CONFIG_SND_GUSCLASSIC) += snd-gusclassic.o snd-gus-lib.o -obj-$(call sequencer,$(CONFIG_SND_GUSCLASSIC)) += snd-gus-synth.o obj-$(CONFIG_SND_GUSMAX) += snd-gusmax.o snd-gus-lib.o -obj-$(call sequencer,$(CONFIG_SND_GUSMAX)) += snd-gus-synth.o obj-$(CONFIG_SND_GUSEXTREME) += snd-gusextreme.o snd-gus-lib.o -obj-$(call sequencer,$(CONFIG_SND_GUSEXTREME)) += snd-gus-synth.o obj-$(CONFIG_SND_INTERWAVE) += snd-interwave.o snd-gus-lib.o -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE)) += snd-gus-synth.o obj-$(CONFIG_SND_INTERWAVE_STB) += snd-interwave-stb.o snd-gus-lib.o -obj-$(call sequencer,$(CONFIG_SND_INTERWAVE_STB)) += snd-gus-synth.o +obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-gus-synth.o obj-m := $(sort $(obj-m)) diff -Nru a/sound/isa/gus/gus_dram.c b/sound/isa/gus/gus_dram.c --- a/sound/isa/gus/gus_dram.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/gus/gus_dram.c 2004-09-06 16:37:55 -07:00 @@ -31,12 +31,12 @@ { unsigned long flags; unsigned int size1, size2; - char buffer[512], *pbuffer; + char buffer[256], *pbuffer; while (size > 0) { - if (copy_from_user(buffer, _buffer, 512)) + size1 = size > sizeof(buffer) ? sizeof(buffer) : size; + if (copy_from_user(buffer, _buffer, size1)) return -EFAULT; - size1 = size > 512 ? 512 : size; if (gus->interwave) { spin_lock_irqsave(&gus->reg_lock, flags); snd_gf1_write8(gus, SNDRV_GF1_GB_MEMORY_CONTROL, 0x01); @@ -69,10 +69,10 @@ { unsigned long flags; unsigned int size1, size2; - char buffer[512], *pbuffer; + char buffer[256], *pbuffer; while (size > 0) { - size1 = size > 512 ? 512 : size; + size1 = size > sizeof(buffer) ? sizeof(buffer) : size; if (gus->interwave) { spin_lock_irqsave(&gus->reg_lock, flags); snd_gf1_write8(gus, SNDRV_GF1_GB_MEMORY_CONTROL, rom ? 0x03 : 0x01); diff -Nru a/sound/isa/gus/gus_instr.c b/sound/isa/gus/gus_instr.c --- a/sound/isa/gus/gus_instr.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/gus/gus_instr.c 2004-09-06 16:37:55 -07:00 @@ -31,7 +31,7 @@ int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; snd_gf1_mem_block_t *block; int err; @@ -61,7 +61,7 @@ int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, wave->format & IWFFFF_WAVE_ROM ? 1 : 0); @@ -70,7 +70,7 @@ int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; if (wave->format & IWFFFF_WAVE_ROM) return 0; /* it's probably ok - verify the address? */ @@ -84,7 +84,7 @@ int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; snd_gf1_mem_block_t *block; int err; @@ -112,7 +112,7 @@ int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, 0); } @@ -120,7 +120,7 @@ int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory); } @@ -132,7 +132,7 @@ int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; snd_gf1_mem_block_t *block; int err; @@ -159,7 +159,7 @@ int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr, char __user *data, long len, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; return snd_gus_dram_read(gus, data, instr->address.memory, instr->size, 0); } @@ -167,7 +167,7 @@ int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr, int atomic) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return -ENXIO); + snd_gus_card_t *gus = private_data; return snd_gf1_mem_free(&gus->gf1.mem_alloc, instr->address.memory); } diff -Nru a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c --- a/sound/isa/gus/gus_irq.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/gus/gus_irq.c 2004-09-06 16:37:55 -07:00 @@ -32,7 +32,7 @@ irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - snd_gus_card_t * gus = snd_magic_cast(snd_gus_card_t, dev_id, return IRQ_NONE); + snd_gus_card_t * gus = dev_id; unsigned char status; int loop = 100; int handled = 0; @@ -114,7 +114,7 @@ snd_gus_voice_t *pvoice; int idx; - gus = snd_magic_cast(snd_gus_card_t, entry->private_data, return); + gus = entry->private_data; snd_iprintf(buffer, "midi out = %u\n", gus->gf1.interrupt_stat_midi_out); snd_iprintf(buffer, "midi in = %u\n", gus->gf1.interrupt_stat_midi_in); snd_iprintf(buffer, "timer1 = %u\n", gus->gf1.interrupt_stat_timer1); diff -Nru a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c --- a/sound/isa/gus/gus_main.c 2004-09-06 16:37:50 -07:00 +++ b/sound/isa/gus/gus_main.c 2004-09-06 16:37:50 -07:00 @@ -35,8 +35,6 @@ MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards"); MODULE_LICENSE("GPL"); -#define chip_t snd_gus_card_t - static int snd_gus_init_dma_irq(snd_gus_card_t * gus, int latches); int snd_gus_use_inc(snd_gus_card_t * gus) @@ -133,13 +131,13 @@ disable_dma(gus->gf1.dma2); free_dma(gus->gf1.dma2); } - snd_magic_kfree(gus); + kfree(gus); return 0; } static int snd_gus_dev_free(snd_device_t *device) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, device->device_data, return -ENXIO); + snd_gus_card_t *gus = device->device_data; return snd_gus_free(gus); } @@ -159,7 +157,7 @@ }; *rgus = NULL; - gus = snd_magic_kcalloc(snd_gus_card_t, 0, GFP_KERNEL); + gus = kcalloc(1, sizeof(*gus), GFP_KERNEL); if (gus == NULL) return -ENOMEM; gus->gf1.irq = -1; @@ -421,7 +419,7 @@ static void snd_gus_seq_dev_free(snd_seq_device_t *seq_dev) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, seq_dev->private_data, return); + snd_gus_card_t *gus = seq_dev->private_data; gus->seq_dev = NULL; } diff -Nru a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c --- a/sound/isa/gus/gus_mem.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/gus/gus_mem.c 2004-09-06 16:37:52 -07:00 @@ -297,7 +297,7 @@ unsigned int total, used; int i; - gus = snd_magic_cast(snd_gus_card_t, entry->private_data, return); + gus = entry->private_data; alloc = &gus->gf1.mem_alloc; down(&alloc->memory_mutex); snd_iprintf(buffer, "8-bit banks : \n "); diff -Nru a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c --- a/sound/isa/gus/gus_mem_proc.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/gus/gus_mem_proc.c 2004-09-06 16:37:53 -07:00 @@ -37,7 +37,7 @@ unsigned long count, unsigned long pos) { long size; - gus_proc_private_t *priv = snd_magic_cast(gus_proc_private_t, entry->private_data, return -ENXIO); + gus_proc_private_t *priv = entry->private_data; snd_gus_card_t *gus = priv->gus; int err; @@ -58,7 +58,7 @@ long long offset, int orig) { - gus_proc_private_t *priv = snd_magic_cast(gus_proc_private_t, entry->private_data, return -ENXIO); + gus_proc_private_t *priv = entry->private_data; switch (orig) { case 0: /* SEEK_SET */ @@ -80,8 +80,8 @@ static void snd_gf1_mem_proc_free(snd_info_entry_t *entry) { - gus_proc_private_t *priv = snd_magic_cast(gus_proc_private_t, entry->private_data, return); - snd_magic_kfree(priv); + gus_proc_private_t *priv = entry->private_data; + kfree(priv); } static struct snd_info_entry_ops snd_gf1_mem_proc_ops = { @@ -98,7 +98,7 @@ for (idx = 0; idx < 4; idx++) { if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { - priv = snd_magic_kcalloc(gus_proc_private_t, 0, GFP_KERNEL); + priv = kcalloc(1, sizeof(*priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; priv->gus = gus; @@ -115,7 +115,7 @@ } for (idx = 0; idx < 4; idx++) { if (gus->gf1.rom_present & (1 << idx)) { - priv = snd_magic_kcalloc(gus_proc_private_t, 0, GFP_KERNEL); + priv = kcalloc(1, sizeof(*priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; priv->rom = 1; diff -Nru a/sound/isa/gus/gus_mixer.c b/sound/isa/gus/gus_mixer.c --- a/sound/isa/gus/gus_mixer.c 2004-09-06 16:37:50 -07:00 +++ b/sound/isa/gus/gus_mixer.c 2004-09-06 16:37:50 -07:00 @@ -26,8 +26,6 @@ #include #include -#define chip_t snd_gus_card_t - /* * */ @@ -148,16 +146,12 @@ return change; } -#define GF1_CONTROLS (sizeof(snd_gf1_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_gf1_controls[] = { GF1_SINGLE("Master Playback Switch", 0, 1, 1), GF1_SINGLE("Line Switch", 0, 0, 1), GF1_SINGLE("Mic Switch", 0, 2, 0) }; -#define ICS_CONTROLS (sizeof(snd_ics_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_ics_controls[] = { GF1_SINGLE("Master Playback Switch", 0, 1, 1), ICS_DOUBLE("Master Playback Volume", 0, SNDRV_ICS_MASTER_DEV), @@ -190,13 +184,13 @@ } if (!gus->ics_flag) { - max = gus->ess_flag ? 1 : GF1_CONTROLS; + max = gus->ess_flag ? 1 : ARRAY_SIZE(snd_gf1_controls); for (idx = 0; idx < max; idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_gf1_controls[idx], gus))) < 0) return err; } } else { - for (idx = 0; idx < ICS_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_ics_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ics_controls[idx], gus))) < 0) return err; } diff -Nru a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c --- a/sound/isa/gus/gus_pcm.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/gus/gus_pcm.c 2004-09-06 16:37:52 -07:00 @@ -34,8 +34,6 @@ #include #include "gus_tables.h" -#define chip_t snd_gus_card_t - /* maximum rate */ #define SNDRV_GF1_PCM_RATE 48000 @@ -66,7 +64,7 @@ static void snd_gf1_pcm_block_change_ack(snd_gus_card_t * gus, void *private_data) { - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, private_data, return); + gus_pcm_private_t *pcmp = private_data; if (pcmp) { atomic_dec(&pcmp->dma_count); @@ -81,7 +79,7 @@ { snd_gf1_dma_block_t block; snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; count += offset & 31; offset &= ~31; @@ -106,7 +104,7 @@ static void snd_gf1_pcm_trigger_up(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return); + gus_pcm_private_t *pcmp = runtime->private_data; snd_gus_card_t * gus = pcmp->gus; unsigned long flags; unsigned char voice_ctrl, ramp_ctrl; @@ -194,7 +192,7 @@ snd_gf1_smart_stop_voice(gus, pvoice->number); return; } - pcmp = snd_magic_cast(gus_pcm_private_t, pvoice->private_data, return); + pcmp = pvoice->private_data; if (pcmp == NULL) { snd_printd("snd_gf1_pcm: unknown wave irq?\n"); snd_gf1_smart_stop_voice(gus, pvoice->number); @@ -267,7 +265,7 @@ { unsigned short vol; int cvoice; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, pvoice->private_data, return); + gus_pcm_private_t *pcmp = pvoice->private_data; /* stop ramp, but leave rollover bit untouched */ spin_lock(&gus->reg_lock); @@ -350,7 +348,7 @@ snd_pcm_uframes_t count) { snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; unsigned int bpos, len; bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); @@ -379,7 +377,7 @@ snd_pcm_uframes_t count) { snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; unsigned int bpos, len; bpos = samples_to_bytes(runtime, pos) + (voice * (pcmp->dma_size / 2)); @@ -406,7 +404,7 @@ { snd_gus_card_t *gus = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; int err; if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) @@ -453,7 +451,7 @@ static int snd_gf1_pcm_playback_hw_free(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; snd_pcm_lib_free_pages(substream); if (pcmp->pvoices[0]) { @@ -474,7 +472,7 @@ static int snd_gf1_pcm_playback_prepare(snd_pcm_substream_t * substream) { snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; pcmp->bpos = 0; pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream); @@ -488,7 +486,7 @@ { snd_gus_card_t *gus = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; int voice; if (cmd == SNDRV_PCM_TRIGGER_START) { @@ -513,7 +511,7 @@ { snd_gus_card_t *gus = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; unsigned int pos; unsigned char voice_ctrl; @@ -657,8 +655,8 @@ static void snd_gf1_pcm_playback_free(snd_pcm_runtime_t *runtime) { - gus_pcm_private_t * pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return); - snd_magic_kfree(pcmp); + gus_pcm_private_t * pcmp = runtime->private_data; + kfree(pcmp); } static int snd_gf1_pcm_playback_open(snd_pcm_substream_t *substream) @@ -668,7 +666,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; int err; - pcmp = snd_magic_kcalloc(gus_pcm_private_t, 0, GFP_KERNEL); + pcmp = kcalloc(1, sizeof(*pcmp), GFP_KERNEL); if (pcmp == NULL) return -ENOMEM; pcmp->gus = gus; @@ -697,7 +695,7 @@ { snd_gus_card_t *gus = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - gus_pcm_private_t *pcmp = snd_magic_cast(gus_pcm_private_t, runtime->private_data, return -ENXIO); + gus_pcm_private_t *pcmp = runtime->private_data; unsigned long jiffies_old; jiffies_old = jiffies; @@ -738,7 +736,7 @@ static void snd_gf1_pcm_free(snd_pcm_t *pcm) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, pcm->private_data, return); + snd_gus_card_t *gus = pcm->private_data; gus->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -790,7 +788,7 @@ pvoice = &gus->gf1.voices[idx]; if (!pvoice->pcm) continue; - pcmp = snd_magic_cast(gus_pcm_private_t, pvoice->private_data, return -ENXIO); + pcmp = pvoice->private_data; if (!(pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE)) continue; /* load real volume - better precision */ diff -Nru a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c --- a/sound/isa/gus/gus_synth.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/gus/gus_synth.c 2004-09-06 16:37:53 -07:00 @@ -134,7 +134,7 @@ int what) { unsigned int idx; - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, private_data, return); + snd_gus_card_t *gus = private_data; snd_gus_voice_t *pvoice; unsigned long flags; diff -Nru a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c --- a/sound/isa/gus/gus_timer.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/gus/gus_timer.c 2004-09-06 16:37:52 -07:00 @@ -26,8 +26,6 @@ #include #include -#define chip_t snd_gus_card_t - /* * Timer 1 - 80us */ @@ -146,13 +144,13 @@ static void snd_gf1_timer1_free(snd_timer_t *timer) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, timer->private_data, return); + snd_gus_card_t *gus = timer->private_data; gus->gf1.timer1 = NULL; } static void snd_gf1_timer2_free(snd_timer_t *timer) { - snd_gus_card_t *gus = snd_magic_cast(snd_gus_card_t, timer->private_data, return); + snd_gus_card_t *gus = timer->private_data; gus->gf1.timer2 = NULL; } diff -Nru a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c --- a/sound/isa/gus/gus_uart.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/gus/gus_uart.c 2004-09-06 16:37:51 -07:00 @@ -95,7 +95,7 @@ unsigned long flags; snd_gus_card_t *gus; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return -ENXIO); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (!(gus->gf1.uart_cmd & 0x80)) { /* input active? */ snd_gf1_uart_reset(gus, 0); @@ -115,7 +115,7 @@ snd_gus_card_t *gus; int i; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return -ENXIO); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (gus->gf1.interrupt_handler_midi_out != snd_gf1_interrupt_midi_out) { snd_gf1_uart_reset(gus, 0); @@ -141,7 +141,7 @@ unsigned long flags; snd_gus_card_t *gus; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return -ENXIO); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (gus->gf1.interrupt_handler_midi_in != snd_gf1_interrupt_midi_in) snd_gf1_uart_reset(gus, 1); @@ -156,7 +156,7 @@ unsigned long flags; snd_gus_card_t *gus; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return -ENXIO); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (gus->gf1.interrupt_handler_midi_out != snd_gf1_interrupt_midi_out) snd_gf1_uart_reset(gus, 1); @@ -171,7 +171,7 @@ snd_gus_card_t *gus; unsigned long flags; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (up) { @@ -191,7 +191,7 @@ char byte; int timeout; - gus = snd_magic_cast(snd_gus_card_t, substream->rmidi->private_data, return); + gus = substream->rmidi->private_data; spin_lock_irqsave(&gus->uart_cmd_lock, flags); if (up) { diff -Nru a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c --- a/sound/isa/gus/gusclassic.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/gus/gusclassic.c 2004-09-06 16:37:55 -07:00 @@ -35,8 +35,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Gravis UltraSound Classic"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Gravis,UltraSound Classic}}"); +MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound Classic}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -53,34 +52,24 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for GUS Classic soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for GUS Classic soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable GUS Classic soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for GUS Classic driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x10}},dialog:list"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for GUS Classic driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for GUS Classic driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list"); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for GUS Classic driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list"); module_param_array(joystick_dac, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Classic driver."); -MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}"); module_param_array(channels, int, boot_devs, 0444); MODULE_PARM_DESC(channels, "GF1 channels for GUS Classic driver."); -MODULE_PARM_SYNTAX(channels, SNDRV_ENABLED ",allows:{{14,32}}"); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver."); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}"); static snd_card_t *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c --- a/sound/isa/gus/gusextreme.c 2004-09-06 16:37:54 -07:00 +++ b/sound/isa/gus/gusextreme.c 2004-09-06 16:37:54 -07:00 @@ -38,8 +38,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Gravis UltraSound Extreme"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Gravis,UltraSound Extreme}}"); +MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound Extreme}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -60,46 +59,32 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for GUS Extreme soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for GUS Extreme soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable GUS Extreme soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x20}},dialog:list"); module_param_array(gf1_port, long, boot_devs, 0444); MODULE_PARM_DESC(gf1_port, "GF1 port # for GUS Extreme driver (optional)."); -MODULE_PARM_SYNTAX(gf1_port, SNDRV_ENABLED ",allows:{{0x210,0x270,0x10}},dialog:list"); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x320,0x10}},dialog:list"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list"); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list"); module_param_array(gf1_irq, int, boot_devs, 0444); MODULE_PARM_DESC(gf1_irq, "GF1 IRQ # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(gf1_irq, SNDRV_ENABLED ",allows:{{2},{3},{5},{9},{11},{12},{15}},dialog:list"); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "GF1 DMA # for GUS Extreme driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(joystick_dac, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Extreme driver."); -MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}"); module_param_array(channels, int, boot_devs, 0444); MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver."); -MODULE_PARM_SYNTAX(channels, SNDRV_ENABLED ",allows:{{14,32}}"); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}"); static snd_card_t *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c --- a/sound/isa/gus/gusmax.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/gus/gusmax.c 2004-09-06 16:37:53 -07:00 @@ -36,8 +36,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Gravis UltraSound MAX"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Gravis,UltraSound MAX}}"); +MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound MAX}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -54,34 +53,24 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for GUS MAX soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for GUS MAX soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable GUS MAX soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for GUS MAX driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220},{0x230},{0x240},{0x250},{0x260}},dialog:list"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for GUS MAX driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for GUS MAX driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for GUS MAX driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); module_param_array(joystick_dac, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS MAX driver."); -MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}"); module_param_array(channels, int, boot_devs, 0444); MODULE_PARM_DESC(channels, "Used GF1 channels for GUS MAX driver."); -MODULE_PARM_SYNTAX(channels, SNDRV_ENABLED ",allows:{{14,32}}"); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS MAX driver."); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}"); struct snd_gusmax { int irq; diff -Nru a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c --- a/sound/isa/gus/interwave.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/gus/interwave.c 2004-09-06 16:37:53 -07:00 @@ -41,18 +41,17 @@ #include MODULE_AUTHOR("Jaroslav Kysela "); -MODULE_CLASSES("{sound}"); MODULE_LICENSE("GPL"); #ifndef SNDRV_STB MODULE_DESCRIPTION("AMD InterWave"); -MODULE_DEVICES("{{Gravis,UltraSound Plug & Play}," +MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound Plug & Play}," "{STB,SoundRage32}," "{MED,MED3210}," "{Dynasonix,Dynasonix Pro}," "{Panasonic,PCA761AW}}"); #else MODULE_DESCRIPTION("AMD InterWave STB with TEA6330T"); -MODULE_DEVICES("{{AMD,InterWave STB with TEA6330T}}"); +MODULE_SUPPORTED_DEVICE("{{AMD,InterWave STB with TEA6330T}}"); #endif static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ @@ -77,47 +76,32 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for InterWave soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for InterWave soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable InterWave soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); -#ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); -#endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for InterWave driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x210,0x260,0x10}},dialog:list"); #ifdef SNDRV_STB module_param_array(port_tc, long, boot_devs, 0444); MODULE_PARM_DESC(port_tc, "Tone control (TEA6330T - i2c bus) port # for InterWave driver."); -MODULE_PARM_SYNTAX(port_tc, SNDRV_ENABLED ",allows:{{0x350,0x380,0x10}},dialog:list"); #endif module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for InterWave driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for InterWave driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for InterWave driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); module_param_array(joystick_dac, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for InterWave driver."); -MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}"); module_param_array(midi, int, boot_devs, 0444); MODULE_PARM_DESC(midi, "MIDI UART enable for InterWave driver."); -MODULE_PARM_SYNTAX(midi, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for InterWave driver."); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}"); module_param_array(effect, int, boot_devs, 0444); MODULE_PARM_DESC(effect, "Effects enable for InterWave driver."); -MODULE_PARM_SYNTAX(effect, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); struct snd_interwave { int irq; @@ -411,8 +395,8 @@ int bank_pos, pages; unsigned int i, lmct; int psizes[4]; + unsigned char iwave[8]; unsigned char csum; - struct rom_hdr romh; snd_interwave_reset(gus); snd_gf1_write8(gus, SNDRV_GF1_GB_GLOBAL_MODE, snd_gf1_read8(gus, SNDRV_GF1_GB_GLOBAL_MODE) | 0x01); /* enhanced mode */ @@ -434,7 +418,7 @@ #if 0 printk("lmct = 0x%08x\n", lmct); #endif - for (i = 0; i < sizeof(lmc) / sizeof(unsigned int); i++) + for (i = 0; i < ARRAY_SIZE(lmc); i++) if (lmct == lmc[i]) { #if 0 printk("found !!! %i\n", i); @@ -443,7 +427,7 @@ snd_interwave_bank_sizes(gus, psizes); break; } - if (i >= sizeof(lmc) / sizeof(unsigned int) && !gus->gf1.enh_mode) + if (i >= ARRAY_SIZE(lmc) && !gus->gf1.enh_mode) snd_gf1_write16(gus, SNDRV_GF1_GW_MEMORY_CONFIG, (snd_gf1_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG) & 0xfff0) | 2); for (i = 0; i < 4; i++) { gus->gf1.mem_alloc.banks_8[i].address = @@ -461,33 +445,29 @@ gus->gf1.rom_banks = 0; gus->gf1.rom_memory = 0; for (bank_pos = 0; bank_pos < 16L * 1024L * 1024L; bank_pos += 4L * 1024L * 1024L) { - for (i = 0; i < sizeof(struct rom_hdr); i++) - *(((unsigned char *) &romh) + i) = snd_gf1_peek(gus, i + bank_pos); + for (i = 0; i < 8; ++i) + iwave[i] = snd_gf1_peek(gus, bank_pos + i); #ifdef CONFIG_SND_DEBUG_ROM printk("ROM at 0x%06x = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", bank_pos, - romh.iwave[0], romh.iwave[1], romh.iwave[2], romh.iwave[3], - romh.iwave[4], romh.iwave[5], romh.iwave[6], romh.iwave[7]); + iwave[0], iwave[1], iwave[2], iwave[3], + iwave[4], iwave[5], iwave[6], iwave[7]); #endif - if (strncmp(romh.iwave, "INTRWAVE", 8)) + if (strncmp(iwave, "INTRWAVE", 8)) continue; /* first check */ csum = 0; - for (i = 0; i < sizeof(struct rom_hdr) - 1; i++) - csum += *(((unsigned char *) &romh) + i); + for (i = 0; i < sizeof(struct rom_hdr); i++) + csum += snd_gf1_peek(gus, bank_pos + i); #ifdef CONFIG_SND_DEBUG_ROM - printk("ROM checksum = 0x%x == 0x%x (computed)\n", romh.csum, (unsigned char) (256 - csum)); + printk("ROM checksum = 0x%x (computed)\n", csum); #endif - if (256 - csum != romh.csum) + if (csum != 0) continue; /* not valid rom */ gus->gf1.rom_banks++; gus->gf1.rom_present |= 1 << (bank_pos >> 22); -#ifdef SNDRV_LITTLE_ENDIAN - gus->gf1.rom_memory = romh.rom_size; -#else - gus->gf1.rom_memory = ((romh.rom_size >> 24) & 0x000000ff) | - ((romh.rom_size >> 8) & 0x0000ff00) | - ((romh.rom_size << 8) & 0x00ff0000) | - ((romh.rom_size << 24) & 0xff000000); -#endif + gus->gf1.rom_memory = snd_gf1_peek(gus, bank_pos + 40) | + (snd_gf1_peek(gus, bank_pos + 41) << 8) | + (snd_gf1_peek(gus, bank_pos + 42) << 16) | + (snd_gf1_peek(gus, bank_pos + 43) << 24); } #if 0 if (gus->gf1.rom_memory > 0) { @@ -523,8 +503,6 @@ } -#define INTERWAVE_CONTROLS (sizeof(snd_interwave_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_interwave_controls[] = { CS4231_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1), CS4231_DOUBLE("Master Playback Volume", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 0, 0, 31, 1), @@ -552,7 +530,7 @@ return err; #endif /* add new master and mic controls */ - for (idx = 0; idx < INTERWAVE_CONTROLS; idx++) + for (idx = 0; idx < ARRAY_SIZE(snd_interwave_controls); idx++) if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_interwave_controls[idx], chip))) < 0) return err; snd_cs4231_out(chip, CS4231_LINE_LEFT_OUTPUT, 0x9f); diff -Nru a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c --- a/sound/isa/opl3sa2.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/opl3sa2.c 2004-09-06 16:37:55 -07:00 @@ -37,8 +37,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Yamaha OPL3SA2+"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Yamaha,YMF719E-S}," +MODULE_SUPPORTED_DEVICE("{{Yamaha,YMF719E-S}," "{Genius,Sound Maker 3DX}," "{Yamaha,OPL3SA3}," "{Intel,AL440LX sound}," @@ -63,45 +62,32 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for OPL3-SA soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for OPL3-SA soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable OPL3-SA soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0xf86},{0x370},{0x100}},dialog:list"); module_param_array(sb_port, long, boot_devs, 0444); MODULE_PARM_DESC(sb_port, "SB port # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(sb_port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260}},dialog:list"); module_param_array(wss_port, long, boot_devs, 0444); MODULE_PARM_DESC(wss_port, "WSS port # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(wss_port, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list"); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388}},dialog:list"); module_param_array(midi_port, long, boot_devs, 0444); MODULE_PARM_DESC(midi_port, "MIDI port # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(midi_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{0},{1},{3},{5},{9},{11},{12},{15}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list"); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for OPL3-SA driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list"); module_param_array(opl3sa3_ymode, int, boot_devs, 0444); MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); -MODULE_PARM_SYNTAX(opl3sa3_ymode, SNDRV_ENABLED ",allows:{{0,3}},dialog:list"); /* SL Added */ /* control ports */ #define OPL3SA2_PM_CTRL 0x01 @@ -131,7 +117,6 @@ #define OPL3SA2_PM_D3 (OPL3SA2_PM_ADOWN|OPL3SA2_PM_PSV|OPL3SA2_PM_PDN|OPL3SA2_PM_PDX) typedef struct snd_opl3sa2 opl3sa2_t; -#define chip_t opl3sa2_t struct snd_opl3sa2 { snd_card_t *card; @@ -304,7 +289,7 @@ static irqreturn_t snd_opl3sa2_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned short status; - opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, dev_id, return IRQ_NONE); + opl3sa2_t *chip = dev_id; int handled = 0; if (chip == NULL || chip->card == NULL) @@ -477,8 +462,6 @@ return change; } -#define OPL3SA2_CONTROLS (sizeof(snd_opl3sa2_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_opl3sa2_controls[] = { OPL3SA2_DOUBLE("Master Playback Switch", 0, 0x07, 0x08, 7, 7, 1, 1), OPL3SA2_DOUBLE("Master Playback Volume", 0, 0x07, 0x08, 0, 0, 15, 1), @@ -486,8 +469,6 @@ OPL3SA2_SINGLE("Mic Playback Volume", 0, 0x09, 0, 31, 1) }; -#define OPL3SA2_TONE_CONTROLS (sizeof(snd_opl3sa2_tone_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_opl3sa2_tone_controls[] = { OPL3SA2_DOUBLE("3D Control - Wide", 0, 0x14, 0x14, 4, 0, 7, 0), OPL3SA2_DOUBLE("Tone Control - Bass", 0, 0x15, 0x15, 4, 0, 7, 0), @@ -496,7 +477,7 @@ static void snd_opl3sa2_master_free(snd_kcontrol_t *kcontrol) { - opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, _snd_kcontrol_chip(kcontrol), return); + opl3sa2_t *chip = snd_kcontrol_chip(kcontrol); chip->master_switch = NULL; chip->master_volume = NULL; } @@ -531,7 +512,7 @@ if ((err = snd_ctl_rename_id(card, &id1, &id2)) < 0) return err; /* add OPL3SA2 controls */ - for (idx = 0; idx < OPL3SA2_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_opl3sa2_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_opl3sa2_controls[idx], chip))) < 0) return err; switch (idx) { @@ -540,7 +521,7 @@ } } if (chip->version > 2) { - for (idx = 0; idx < OPL3SA2_TONE_CONTROLS; idx++) + for (idx = 0; idx < ARRAY_SIZE(snd_opl3sa2_tone_controls); idx++) if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_opl3sa2_tone_controls[idx], chip))) < 0) return err; } @@ -551,7 +532,7 @@ #ifdef CONFIG_PM static int snd_opl3sa2_suspend(snd_card_t *card, unsigned int state) { - opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, card->pm_private_data, return -EINVAL); + opl3sa2_t *chip = card->pm_private_data; snd_pcm_suspend_all(chip->cs4231->pcm); /* stop before saving regs */ chip->cs4231_suspend(chip->cs4231); @@ -565,7 +546,7 @@ static int snd_opl3sa2_resume(snd_card_t *card, unsigned int state) { - opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, card->pm_private_data, return -EINVAL); + opl3sa2_t *chip = card->pm_private_data; int i; /* power up */ @@ -656,13 +637,13 @@ release_resource(chip->res_port); kfree_nocheck(chip->res_port); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_opl3sa2_dev_free(snd_device_t *device) { - opl3sa2_t *chip = snd_magic_cast(opl3sa2_t, device->device_data, return -ENXIO); + opl3sa2_t *chip = device->device_data; return snd_opl3sa2_free(chip); } @@ -707,7 +688,7 @@ return -ENOMEM; strcpy(card->driver, "OPL3SA2"); strcpy(card->shortname, "Yamaha OPL3-SA2"); - chip = snd_magic_kcalloc(opl3sa2_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) { err = -ENOMEM; goto __error; diff -Nru a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c --- a/sound/isa/opti9xx/opti92x-ad1848.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/opti9xx/opti92x-ad1848.c 2004-09-06 16:37:51 -07:00 @@ -52,19 +52,18 @@ #include MODULE_AUTHOR("Massimo Piccioni "); -MODULE_CLASSES("{sound}"); MODULE_LICENSE("GPL"); #ifdef OPTi93X MODULE_DESCRIPTION("OPTi93X"); -MODULE_DEVICES("{{OPTi,82C931/3}}"); +MODULE_SUPPORTED_DEVICE("{{OPTi,82C931/3}}"); #else /* OPTi93X */ #ifdef CS4231 MODULE_DESCRIPTION("OPTi92X - CS4231"); -MODULE_DEVICES("{{OPTi,82C924 (CS4231)}," +MODULE_SUPPORTED_DEVICE("{{OPTi,82C924 (CS4231)}," "{OPTi,82C925 (CS4231)}}"); #else /* CS4231 */ MODULE_DESCRIPTION("OPTi92X - AD1848"); -MODULE_DEVICES("{{OPTi,82C924 (AD1848)}," +MODULE_SUPPORTED_DEVICE("{{OPTi,82C924 (AD1848)}," "{OPTi,82C925 (AD1848)}," "{OAK,Mozart}}"); #endif /* CS4231 */ @@ -86,38 +85,27 @@ module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for opti9xx based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for opti9xx based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); //module_param(enable, bool, 0444); //MODULE_PARM_DESC(enable, "Enable opti9xx soundcard."); -//MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param(isapnp, bool, 0444); MODULE_PARM_DESC(isapnp, "Enable ISA PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); module_param(port, long, 0444); MODULE_PARM_DESC(port, "WSS port # for opti9xx driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT_DESC); module_param(mpu_port, long, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for opti9xx driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC); module_param(fm_port, long, 0444); MODULE_PARM_DESC(fm_port, "FM port # for opti9xx driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT_DESC); module_param(irq, int, 0444); MODULE_PARM_DESC(irq, "WSS irq # for opti9xx driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param(mpu_irq, int, 0444); MODULE_PARM_DESC(mpu_irq, "MPU-401 irq # for opti9xx driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param(dma1, int, 0444); MODULE_PARM_DESC(dma1, "1st dma # for opti9xx driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); #if defined(CS4231) || defined(OPTi93X) module_param(dma2, int, 0444); MODULE_PARM_DESC(dma2, "2nd dma # for opti9xx driver."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); #endif /* CS4231 || OPTi93X */ #define OPTi9XX_HW_DETECT 0 @@ -474,7 +462,6 @@ unsigned char dma_bits; unsigned char mpu_port_bits = 0; unsigned char mpu_irq_bits; - unsigned long flags; switch (chip->hardware) { #ifndef OPTi93X @@ -601,13 +588,11 @@ dma_bits |= 0x04; #endif /* CS4231 || OPTi93X */ - spin_lock_irqsave(&chip->lock, flags); #ifndef OPTi93X outb(irq_bits << 3 | dma_bits, chip->wss_base); #else /* OPTi93X */ snd_opti9xx_write(chip, OPTi9XX_MC_REG(3), (irq_bits << 3 | dma_bits)); #endif /* OPTi93X */ - spin_unlock_irqrestore(&chip->lock, flags); __skip_resources: if (chip->hardware > OPTi9XX_HW_82C928) { @@ -664,8 +649,6 @@ #ifdef OPTi93X -#define chip_t opti93x_t - static unsigned char snd_opti93x_default_image[32] = { 0x00, /* 00/00 - l_mixout_outctrl */ @@ -767,15 +750,10 @@ static void snd_opti93x_mute(opti93x_t *chip, int mute) { - unsigned long flags; - - spin_lock_irqsave(&chip->lock, flags); - mute = mute ? 1 : 0; - if (chip->mute == mute) { - spin_unlock_irqrestore(&chip->lock, flags); + if (chip->mute == mute) return; - } + chip->mute = mute; snd_opti93x_mute_reg(chip, OPTi93X_CD_LEFT_INPUT, mute); @@ -800,8 +778,6 @@ snd_opti93x_mute_reg(chip, OPTi93X_MIC_RIGHT_INPUT, mute); snd_opti93x_mute_reg(chip, OPTi93X_OUT_LEFT, mute); snd_opti93x_mute_reg(chip, OPTi93X_OUT_RIGHT, mute); - - spin_unlock_irqrestore(&chip->lock, flags); } @@ -822,7 +798,7 @@ static unsigned int rates[] = { 5512, 6615, 8000, 9600, 11025, 16000, 18900, 22050, 27428, 32000, 33075, 37800, 44100, 48000 }; -#define RATES sizeof(rates) / sizeof(rates[0]) +#define RATES ARRAY_SIZE(rates) static snd_pcm_hw_constraint_list_t hw_constraints_rates = { .count = RATES, @@ -873,10 +849,8 @@ static void snd_opti93x_playback_format(opti93x_t *chip, unsigned char fmt) { - unsigned long flags; unsigned char mask; - spin_lock_irqsave(&chip->lock, flags); snd_opti93x_mute(chip, 1); snd_opti93x_mce_up(chip); @@ -885,14 +859,10 @@ snd_opti93x_mce_down(chip); snd_opti93x_mute(chip, 0); - spin_unlock_irqrestore(&chip->lock, flags); } static void snd_opti93x_capture_format(opti93x_t *chip, unsigned char fmt) { - unsigned long flags; - - spin_lock_irqsave(&chip->lock, flags); snd_opti93x_mute(chip, 1); snd_opti93x_mce_up(chip); @@ -904,7 +874,6 @@ snd_opti93x_mce_down(chip); snd_opti93x_mute(chip, 0); - spin_unlock_irqrestore(&chip->lock, flags); } @@ -1128,7 +1097,7 @@ irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - opti93x_t *codec = snd_magic_cast(opti93x_t, dev_id, return IRQ_NONE); + opti93x_t *codec = dev_id; unsigned char status; status = snd_opti9xx_read(codec->chip, OPTi9XX_MC_REG(11)); @@ -1274,13 +1243,13 @@ if (chip->irq >= 0) { free_irq(chip->irq, chip); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_opti93x_dev_free(snd_device_t *device) { - opti93x_t *chip = snd_magic_cast(opti93x_t, device->device_data, return -ENXIO); + opti93x_t *chip = device->device_data; return snd_opti93x_free(chip); } @@ -1305,7 +1274,7 @@ opti93x_t *codec; *rcodec = NULL; - codec = snd_magic_kcalloc(opti93x_t, 0, GFP_KERNEL); + codec = kcalloc(1, sizeof(*codec), GFP_KERNEL); if (codec == NULL) return -ENOMEM; codec->irq = -1; @@ -1385,7 +1354,7 @@ static void snd_opti93x_pcm_free(snd_pcm_t *pcm) { - opti93x_t *codec = snd_magic_cast(opti93x_t, pcm->private_data, return); + opti93x_t *codec = pcm->private_data; codec->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1608,8 +1577,6 @@ return change; } -#define OPTi93X_CONTROLS (sizeof(snd_opti93x_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_opti93x_controls[] = { OPTi93X_DOUBLE("Master Playback Switch", 0, OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 7, 7, 1, 1), OPTi93X_DOUBLE("Master Playback Volume", 0, OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 1, 1, 31, 1), @@ -1649,7 +1616,7 @@ strcpy(card->mixername, snd_opti93x_chip_id(chip)); - for (idx = 0; idx < OPTi93X_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_opti93x_controls); idx++) { knew = snd_opti93x_controls[idx]; if (chip->hardware == OPTi9XX_HW_82C930) { if (strstr(knew.name, "FM")) /* skip FM controls */ diff -Nru a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c --- a/sound/isa/sb/emu8000.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/emu8000.c 2004-09-06 16:37:52 -07:00 @@ -345,8 +345,6 @@ EMU8000_INIT4_WRITE(emu, i, *p); } -#define NELEM(arr) (sizeof(arr)/sizeof((arr)[0])) - /* * Send initialization arrays to start up, this just follows the @@ -355,18 +353,18 @@ static void __init init_arrays(emu8000_t *emu) { - send_array(emu, init1, NELEM(init1)/4); + send_array(emu, init1, ARRAY_SIZE(init1)/4); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout((HZ * (44099 + 1024)) / 44100); /* wait for 1024 clocks */ - send_array(emu, init2, NELEM(init2)/4); - send_array(emu, init3, NELEM(init3)/4); + send_array(emu, init2, ARRAY_SIZE(init2)/4); + send_array(emu, init3, ARRAY_SIZE(init3)/4); EMU8000_HWCF4_WRITE(emu, 0); EMU8000_HWCF5_WRITE(emu, 0x83); EMU8000_HWCF6_WRITE(emu, 0x8000); - send_array(emu, init4, NELEM(init4)/4); + send_array(emu, init4, ARRAY_SIZE(init4)/4); } @@ -821,8 +819,6 @@ * mixer interface *----------------------------------------------------------------*/ -#define chip_t emu8000_t - /* * bass/treble */ @@ -1070,7 +1066,7 @@ release_resource(hw->res_port3); kfree_nocheck(hw->res_port3); } - snd_magic_kfree(hw); + kfree(hw); return 0; } @@ -1078,7 +1074,7 @@ */ static int snd_emu8000_dev_free(snd_device_t *device) { - emu8000_t *hw = snd_magic_cast(emu8000_t, device->device_data, return -ENXIO); + emu8000_t *hw = device->device_data; return snd_emu8000_free(hw); } @@ -1101,7 +1097,7 @@ if (seq_ports <= 0) return 0; - hw = snd_magic_kcalloc(emu8000_t, 0, GFP_KERNEL); + hw = kcalloc(1, sizeof(*hw), GFP_KERNEL); if (hw == NULL) return -ENOMEM; spin_lock_init(&hw->reg_lock); diff -Nru a/sound/isa/sb/emu8000_callback.c b/sound/isa/sb/emu8000_callback.c --- a/sound/isa/sb/emu8000_callback.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/emu8000_callback.c 2004-09-06 16:37:52 -07:00 @@ -94,7 +94,7 @@ int dcysusv; emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, vp->hw, return); + hw = vp->hw; dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; EMU8000_DCYSUS_WRITE(hw, vp->ch, dcysusv); dcysusv = 0x8000 | (unsigned char)vp->reg.parm.volrelease; @@ -109,7 +109,7 @@ { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, vp->hw, return); + hw = vp->hw; EMU8000_DCYSUSV_WRITE(hw, vp->ch, 0x807F); } @@ -121,7 +121,7 @@ { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, vp->hw, return); + hw = vp->hw; if (update & SNDRV_EMUX_UPDATE_VOLUME) set_volume(hw, vp); if (update & SNDRV_EMUX_UPDATE_PITCH) @@ -168,7 +168,7 @@ } best[END]; struct best *bp; - hw = snd_magic_cast(emu8000_t, emu->hw, return NULL); + hw = emu->hw; for (i = 0; i < END; i++) { best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */; @@ -235,7 +235,7 @@ snd_midi_channel_t *chan; emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, vp->hw, return -EINVAL); + hw = vp->hw; ch = vp->ch; chan = vp->chan; @@ -313,7 +313,7 @@ unsigned int temp; emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, vp->hw, return); + hw = vp->hw; /* set reverb and pitch target */ temp = vp->reg.parm.reverb; @@ -333,7 +333,7 @@ { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, emu->hw, return); + hw = emu->hw; EMU8000_DCYSUSV_WRITE(hw, ch, 0x807F); snd_emu8000_tweak_voice(hw, ch); } @@ -457,7 +457,7 @@ { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, emu->hw, return); + hw = emu->hw; switch (parsed) { case SNDRV_MIDI_SYSEX_GS_CHORUS_MODE: @@ -482,7 +482,7 @@ { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, emu->hw, return -EINVAL); + hw = emu->hw; switch (cmd) { case _EMUX_OSS_REVERB_MODE: @@ -526,7 +526,7 @@ load_fx(snd_emux_t *emu, int type, int mode, const void __user *buf, long len) { emu8000_t *hw; - hw = snd_magic_cast(emu8000_t, emu->hw, return -EINVAL); + hw = emu->hw; switch (type) { case SNDRV_EMU8000_LOAD_CHORUS_FX: diff -Nru a/sound/isa/sb/emu8000_local.h b/sound/isa/sb/emu8000_local.h --- a/sound/isa/sb/emu8000_local.h 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/sb/emu8000_local.h 2004-09-06 16:37:53 -07:00 @@ -29,8 +29,6 @@ #include #include -#define NELEM(arr) (sizeof(arr)/sizeof((arr)[0])) - /* emu8000_patch.c */ int snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr, const void __user *data, long count); int snd_emu8000_sample_free(snd_emux_t *rec, snd_sf_sample_t *sp, snd_util_memhdr_t *hdr); diff -Nru a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c --- a/sound/isa/sb/emu8000_patch.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/sb/emu8000_patch.c 2004-09-06 16:37:51 -07:00 @@ -155,7 +155,7 @@ int dram_offset, dram_start; emu8000_t *emu; - emu = snd_magic_cast(emu8000_t, rec->hw, return -EINVAL); + emu = rec->hw; snd_assert(sp != NULL, return -EINVAL); if (sp->v.size == 0) diff -Nru a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c --- a/sound/isa/sb/emu8000_pcm.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/sb/emu8000_pcm.c 2004-09-06 16:37:55 -07:00 @@ -23,8 +23,6 @@ #include #include -#define chip_t emu8000_t - /* * define the following if you want to use this pcm with non-interleaved mode */ @@ -235,7 +233,7 @@ emu8k_pcm_t *rec; snd_pcm_runtime_t *runtime = subs->runtime; - rec = snd_kcalloc(sizeof(*rec), GFP_KERNEL); + rec = kcalloc(1, sizeof(*rec), GFP_KERNEL); if (! rec) return -ENOMEM; diff -Nru a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c --- a/sound/isa/sb/emu8000_synth.c 2004-09-06 16:37:56 -07:00 +++ b/sound/isa/sb/emu8000_synth.c 2004-09-06 16:37:56 -07:00 @@ -27,7 +27,6 @@ MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe"); MODULE_DESCRIPTION("Emu8000 synth plug-in routine"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); /*----------------------------------------------------------------*/ diff -Nru a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c --- a/sound/isa/sb/es968.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/es968.c 2004-09-06 16:37:52 -07:00 @@ -29,15 +29,12 @@ #include #include -#define chip_t sb_t - #define PFX "es968: " MODULE_AUTHOR("Massimo Piccioni "); MODULE_DESCRIPTION("ESS AudioDrive ES968"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ESS,AudioDrive ES968}}"); +MODULE_SUPPORTED_DEVICE("{{ESS,AudioDrive ES968}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -49,22 +46,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for es968 based soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for es968 based soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable es968 based soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for es968 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for es968 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for es968 driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); struct snd_card_es968 { struct pnp_dev *dev; @@ -82,7 +73,7 @@ static irqreturn_t snd_card_es968_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - sb_t *chip = snd_magic_cast(sb_t, dev_id, return IRQ_NONE); + sb_t *chip = dev_id; if (chip->open & SB_OPEN_PCM) { return snd_sb8dsp_interrupt(chip); diff -Nru a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c --- a/sound/isa/sb/sb16.c 2004-09-06 16:37:54 -07:00 +++ b/sound/isa/sb/sb16.c 2004-09-06 16:37:54 -07:00 @@ -37,8 +37,6 @@ #define SNDRV_LEGACY_FIND_FREE_DMA #include -#define chip_t sb_t - #ifdef SNDRV_SBAWE #define PFX "sbawe: " #else @@ -47,17 +45,16 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); #ifndef SNDRV_SBAWE MODULE_DESCRIPTION("Sound Blaster 16"); -MODULE_DEVICES("{{Creative Labs,SB 16}," +MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB 16}," "{Creative Labs,SB Vibra16S}," "{Creative Labs,SB Vibra16C}," "{Creative Labs,SB Vibra16CL}," "{Creative Labs,SB Vibra16X}}"); #else MODULE_DESCRIPTION("Sound Blaster AWE"); -MODULE_DEVICES("{{Creative Labs,SB AWE 32}," +MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB AWE 32}," "{Creative Labs,SB AWE 64}," "{Creative Labs,SB AWE 64 Gold}}"); #endif @@ -96,53 +93,39 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for SoundBlaster 16 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for SoundBlaster 16 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable SoundBlaster 16 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "PnP detection for specified soundcard."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for SB16 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260},{0x280}},dialog:list"); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port # for SB16 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list"); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port # for SB16 PnP driver."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x38c},{0x390},{0x394}},dialog:list"); #ifdef SNDRV_SBAWE_EMU8000 module_param_array(awe_port, long, boot_devs, 0444); MODULE_PARM_DESC(awe_port, "AWE port # for SB16 PnP driver."); -MODULE_PARM_SYNTAX(awe_port, SNDRV_ENABLED ",allows:{{0x620},{0x640},{0x660},{0x680}},dialog:list"); #endif module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for SB16 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for SB16 driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); module_param_array(dma16, int, boot_devs, 0444); MODULE_PARM_DESC(dma16, "16-bit DMA # for SB16 driver."); -MODULE_PARM_SYNTAX(dma16, SNDRV_DMA16_DESC); module_param_array(mic_agc, int, boot_devs, 0444); MODULE_PARM_DESC(mic_agc, "Mic Auto-Gain-Control switch."); -MODULE_PARM_SYNTAX(mic_agc, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); #ifdef CONFIG_SND_SB16_CSP module_param_array(csp, int, boot_devs, 0444); MODULE_PARM_DESC(csp, "ASP/CSP chip support."); -MODULE_PARM_SYNTAX(csp, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); #endif #ifdef SNDRV_SBAWE_EMU8000 module_param_array(seq_ports, int, boot_devs, 0444); MODULE_PARM_DESC(seq_ports, "Number of sequencer ports for WaveTable synth."); -MODULE_PARM_SYNTAX(seq_ports, SNDRV_ENABLED ",allows:{{0,8}},skill:advanced"); #endif struct snd_card_sb16 { diff -Nru a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c --- a/sound/isa/sb/sb16_csp.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/sb/sb16_csp.c 2004-09-06 16:37:55 -07:00 @@ -33,12 +33,9 @@ #include #include -#define chip_t snd_sb_csp_t - MODULE_AUTHOR("Uros Bizjak "); MODULE_DESCRIPTION("ALSA driver for SB16 Creative Signal Processor"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); #ifdef SNDRV_LITTLE_ENDIAN #define CSP_HDR_VALUE(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) @@ -127,7 +124,7 @@ if ((err = snd_hwdep_new(chip->card, "SB16-CSP", device, &hw)) < 0) return err; - if ((p = snd_magic_kcalloc(snd_sb_csp_t, 0, GFP_KERNEL)) == NULL) { + if ((p = kcalloc(1, sizeof(*p), GFP_KERNEL)) == NULL) { snd_device_free(chip->card, hw); return -ENOMEM; } @@ -165,11 +162,11 @@ */ static void snd_sb_csp_free(snd_hwdep_t *hwdep) { - snd_sb_csp_t *p = snd_magic_cast(snd_sb_csp_t, hwdep->private_data, return); + snd_sb_csp_t *p = hwdep->private_data; if (p) { if (p->running & SNDRV_SB_CSP_ST_RUNNING) snd_sb_csp_stop(p); - snd_magic_kfree(p); + kfree(p); } } @@ -180,7 +177,7 @@ */ static int snd_sb_csp_open(snd_hwdep_t * hw, struct file *file) { - snd_sb_csp_t *p = snd_magic_cast(snd_sb_csp_t, hw->private_data, return -ENXIO); + snd_sb_csp_t *p = hw->private_data; return (snd_sb_csp_use(p)); } @@ -189,7 +186,7 @@ */ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) { - snd_sb_csp_t *p = snd_magic_cast(snd_sb_csp_t, hw->private_data, return -ENXIO); + snd_sb_csp_t *p = hw->private_data; snd_sb_csp_info_t info; snd_sb_csp_start_t start_info; int err; @@ -258,7 +255,7 @@ */ static int snd_sb_csp_release(snd_hwdep_t * hw, struct file *file) { - snd_sb_csp_t *p = snd_magic_cast(snd_sb_csp_t, hw->private_data, return -ENXIO); + snd_sb_csp_t *p = hw->private_data; return (snd_sb_csp_unuse(p)); } @@ -1110,7 +1107,7 @@ static void info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - snd_sb_csp_t *p = snd_magic_cast(snd_sb_csp_t, entry->private_data, return); + snd_sb_csp_t *p = entry->private_data; snd_iprintf(buffer, "Creative Signal Processor [v%d.%d]\n", (p->version >> 4), (p->version & 0x0f)); snd_iprintf(buffer, "State: %cx%c%c%c\n", ((p->running & SNDRV_SB_CSP_ST_QSOUND) ? 'Q' : '-'), diff -Nru a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c --- a/sound/isa/sb/sb16_main.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/sb16_main.c 2004-09-06 16:37:52 -07:00 @@ -49,13 +49,11 @@ MODULE_DESCRIPTION("Routines for control of 16-bit SoundBlaster cards and clones"); MODULE_LICENSE("GPL"); -#define chip_t sb_t - #ifdef CONFIG_SND_SB16_CSP static void snd_sb16_csp_playback_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) { if (chip->hardware == SB_HW_16CSP) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->running & SNDRV_SB_CSP_ST_LOADED) { /* manually loaded codec */ @@ -103,7 +101,7 @@ static void snd_sb16_csp_capture_prepare(sb_t *chip, snd_pcm_runtime_t *runtime) { if (chip->hardware == SB_HW_16CSP) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->running & SNDRV_SB_CSP_ST_LOADED) { /* manually loaded codec */ @@ -141,7 +139,7 @@ static void snd_sb16_csp_update(sb_t *chip) { if (chip->hardware == SB_HW_16CSP) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->qpos_changed) { spin_lock(&chip->reg_lock); @@ -155,7 +153,7 @@ { /* CSP decoders (QSound excluded) support only 16bit transfers */ if (chip->hardware == SB_HW_16CSP) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->running & SNDRV_SB_CSP_ST_LOADED) { /* manually loaded codec */ @@ -173,7 +171,7 @@ static void snd_sb16_csp_playback_close(sb_t *chip) { if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_WRITE)) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->ops.csp_stop(csp) == 0) { csp->ops.csp_unuse(csp); @@ -186,7 +184,7 @@ { /* CSP coders support only 16bit transfers */ if (chip->hardware == SB_HW_16CSP) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->running & SNDRV_SB_CSP_ST_LOADED) { /* manually loaded codec */ @@ -204,7 +202,7 @@ static void snd_sb16_csp_capture_close(sb_t *chip) { if ((chip->hardware == SB_HW_16CSP) && (chip->open == SNDRV_SB_CSP_MODE_DSP_READ)) { - snd_sb_csp_t *csp = snd_magic_cast(snd_sb_csp_t, chip->csp, return); + snd_sb_csp_t *csp = chip->csp; if (csp->ops.csp_stop(csp) == 0) { csp->ops.csp_unuse(csp); @@ -395,7 +393,7 @@ irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - sb_t *chip = snd_magic_cast(sb_t, dev_id, return IRQ_NONE); + sb_t *chip = dev_id; unsigned char status; int ok; diff -Nru a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c --- a/sound/isa/sb/sb8.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/sb/sb8.c 2004-09-06 16:37:53 -07:00 @@ -30,13 +30,10 @@ #define SNDRV_LEGACY_AUTO_PROBE #include -#define chip_t sb_t - MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Sound Blaster 1.0/2.0/Pro"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Creative Labs,SB 1.0/SB 2.0/SB Pro}}"); +MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB 1.0/SB 2.0/SB Pro}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -48,22 +45,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Sound Blaster soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Sound Blaster soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Sound Blaster soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for SB8 driver."); -MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for SB8 driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(dma8, int, boot_devs, 0444); MODULE_PARM_DESC(dma8, "8-bit DMA # for SB8 driver."); -MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC); struct snd_sb8 { struct resource *fm_res; /* used to block FM i/o region for legacy cards */ @@ -73,7 +64,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - sb_t *chip = snd_magic_cast(sb_t, dev_id, return IRQ_NONE); + sb_t *chip = dev_id; if (chip->open & SB_OPEN_PCM) { return snd_sb8dsp_interrupt(chip); diff -Nru a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c --- a/sound/isa/sb/sb8_main.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/sb8_main.c 2004-09-06 16:37:52 -07:00 @@ -42,8 +42,6 @@ MODULE_DESCRIPTION("Routines for control of 8-bit SoundBlaster cards and clones"); MODULE_LICENSE("GPL"); -#define chip_t sb_t - #define SB8_CLOCK 1000000 #define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v)) #define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v)) diff -Nru a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c --- a/sound/isa/sb/sb8_midi.c 2004-09-06 16:37:50 -07:00 +++ b/sound/isa/sb/sb8_midi.c 2004-09-06 16:37:50 -07:00 @@ -73,7 +73,7 @@ sb_t *chip; unsigned int valid_open_flags; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; valid_open_flags = chip->hardware >= SB_HW_20 ? SB_OPEN_MIDI_OUTPUT | SB_OPEN_MIDI_OUTPUT_TRIGGER : 0; spin_lock_irqsave(&chip->open_lock, flags); @@ -100,7 +100,7 @@ sb_t *chip; unsigned int valid_open_flags; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; valid_open_flags = chip->hardware >= SB_HW_20 ? SB_OPEN_MIDI_INPUT | SB_OPEN_MIDI_INPUT_TRIGGER : 0; spin_lock_irqsave(&chip->open_lock, flags); @@ -126,7 +126,7 @@ unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); chip->open &= ~(SB_OPEN_MIDI_INPUT | SB_OPEN_MIDI_INPUT_TRIGGER); chip->midi_substream_input = NULL; @@ -144,7 +144,7 @@ unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); chip->open &= ~(SB_OPEN_MIDI_OUTPUT | SB_OPEN_MIDI_OUTPUT_TRIGGER); chip->midi_substream_output = NULL; @@ -162,7 +162,7 @@ unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); if (up) { if (!(chip->open & SB_OPEN_MIDI_INPUT_TRIGGER)) { @@ -188,7 +188,7 @@ int max = 32; /* how big is Tx FIFO? */ - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; while (max-- > 0) { spin_lock_irqsave(&chip->open_lock, flags); if (snd_rawmidi_transmit_peek(substream, &byte, 1) != 1) { @@ -219,7 +219,7 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data) { snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data; - sb_t * chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + sb_t * chip = substream->rmidi->private_data; unsigned long flags; spin_lock_irqsave(&chip->open_lock, flags); @@ -234,7 +234,7 @@ unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); if (up) { if (!(chip->open & SB_OPEN_MIDI_OUTPUT_TRIGGER)) { diff -Nru a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c --- a/sound/isa/sb/sb_common.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/sb/sb_common.c 2004-09-06 16:37:55 -07:00 @@ -33,12 +33,9 @@ #include #include -#define chip_t sb_t - MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ALSA lowlevel driver for Sound Blaster cards"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); #define BUSY_LOOPS 100000 @@ -197,13 +194,13 @@ free_dma(chip->dma16); } #endif - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_sbdsp_dev_free(snd_device_t *device) { - sb_t *chip = snd_magic_cast(sb_t, device->device_data, return -ENXIO); + sb_t *chip = device->device_data; return snd_sbdsp_free(chip); } @@ -224,7 +221,7 @@ snd_assert(r_chip != NULL, return -EINVAL); *r_chip = NULL; - chip = snd_magic_kcalloc(sb_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); diff -Nru a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c --- a/sound/isa/sb/sb_mixer.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/sb/sb_mixer.c 2004-09-06 16:37:52 -07:00 @@ -27,8 +27,6 @@ #include #include -#define chip_t sb_t - #undef IO_DEBUG void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data) diff -Nru a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c --- a/sound/isa/sgalaxy.c 2004-09-06 16:37:55 -07:00 +++ b/sound/isa/sgalaxy.c 2004-09-06 16:37:55 -07:00 @@ -39,8 +39,7 @@ MODULE_AUTHOR("Christopher Butler "); MODULE_DESCRIPTION("Aztech Sound Galaxy"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Aztech Systems,Sound Galaxy}}"); +MODULE_SUPPORTED_DEVICE("{{Aztech Systems,Sound Galaxy}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -53,22 +52,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Sound Galaxy soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Sound Galaxy soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(sbport, long, boot_devs, 0444); MODULE_PARM_DESC(sbport, "Port # for Sound Galaxy SB driver."); -MODULE_PARM_SYNTAX(sbport, SNDRV_ENABLED ",allows:{{0x220},{0x240}},dialog:list"); module_param_array(wssport, long, boot_devs, 0444); MODULE_PARM_DESC(wssport, "Port # for Sound Galaxy WSS driver."); -MODULE_PARM_SYNTAX(wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list"); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for Sound Galaxy driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{7},{9},{10},{11}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for Sound Galaxy driver."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA8_DESC); #define SGALAXY_AUXC_LEFT 18 #define SGALAXY_AUXC_RIGHT 19 diff -Nru a/sound/isa/sscape.c b/sound/isa/sscape.c --- a/sound/isa/sscape.c 2004-09-06 16:37:51 -07:00 +++ b/sound/isa/sscape.c 2004-09-06 16:37:51 -07:00 @@ -36,8 +36,6 @@ #include -#define chip_t cs4231_t - MODULE_AUTHOR("Chris Rankin"); MODULE_DESCRIPTION("ENSONIQ SoundScape PnP driver"); @@ -53,27 +51,21 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index number for SoundScape soundcard"); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "Description for SoundScape card"); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(port, long, boot_devs, 0444); MODULE_PARM_DESC(port, "Port # for SoundScape driver."); -MODULE_PARM_SYNTAX(port, SNDRV_ENABLED); module_param_array(irq, int, boot_devs, 0444); MODULE_PARM_DESC(irq, "IRQ # for SoundScape driver."); -MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC); module_param_array(mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_irq, "MPU401 IRQ # for SoundScape driver."); -MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC); module_param_array(dma, int, boot_devs, 0444); MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); -MODULE_PARM_SYNTAX(dma, SNDRV_DMA8_DESC); #ifdef CONFIG_PNP static struct pnp_card_device_id sscape_pnpids[] = { @@ -177,11 +169,8 @@ static struct snd_dma_buffer *get_dmabuf(struct snd_dma_buffer *buf, unsigned long size) { if (buf) { - struct snd_dma_device dev; - memset(&dev, 0, sizeof(dev)); - dev.type = SNDRV_DMA_TYPE_DEV; - dev.dev = snd_dma_isa_data(); - if (snd_dma_alloc_pages_fallback(&dev, size, buf) < 0) { + if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, snd_dma_isa_data(), + size, buf) < 0) { snd_printk(KERN_ERR "sscape: Failed to allocate %lu bytes for DMA\n", size); return NULL; } @@ -195,13 +184,8 @@ */ static void free_dmabuf(struct snd_dma_buffer *buf) { - if (buf && buf->area) { - struct snd_dma_device dev; - memset(&dev, 0, sizeof(dev)); - dev.type = SNDRV_DMA_TYPE_DEV; - dev.dev = snd_dma_isa_data(); - snd_dma_free_pages(&dev, buf); - } + if (buf && buf->area) + snd_dma_free_pages(buf); } diff -Nru a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c --- a/sound/isa/wavefront/wavefront.c 2004-09-06 16:37:54 -07:00 +++ b/sound/isa/wavefront/wavefront.c 2004-09-06 16:37:54 -07:00 @@ -30,13 +30,10 @@ #include #include -#define chip_t cs4231_t - MODULE_AUTHOR("Paul Barton-Davis "); MODULE_DESCRIPTION("Turtle Beach Wavefront"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Turtle Beach,Maui/Tropez/Tropez+}}"); +MODULE_SUPPORTED_DEVICE("{{Turtle Beach,Maui/Tropez/Tropez+}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -56,48 +53,34 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for WaveFront soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for WaveFront soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable WaveFront soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef CONFIG_PNP module_param_array(isapnp, bool, boot_devs, 0444); MODULE_PARM_DESC(isapnp, "ISA PnP detection for WaveFront soundcards."); -MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC); #endif module_param_array(cs4232_pcm_port, long, boot_devs, 0444); MODULE_PARM_DESC(cs4232_pcm_port, "Port # for CS4232 PCM interface."); -MODULE_PARM_SYNTAX(cs4232_pcm_port, SNDRV_PORT12_DESC); module_param_array(cs4232_pcm_irq, int, boot_devs, 0444); MODULE_PARM_DESC(cs4232_pcm_irq, "IRQ # for CS4232 PCM interface."); -MODULE_PARM_SYNTAX(cs4232_pcm_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{11},{12},{15}},dialog:list"); module_param_array(dma1, int, boot_devs, 0444); MODULE_PARM_DESC(dma1, "DMA1 # for CS4232 PCM interface."); -MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC); module_param_array(dma2, int, boot_devs, 0444); MODULE_PARM_DESC(dma2, "DMA2 # for CS4232 PCM interface."); -MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC); module_param_array(cs4232_mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(cs4232_mpu_port, "port # for CS4232 MPU-401 interface."); -MODULE_PARM_SYNTAX(cs4232_mpu_port, SNDRV_PORT12_DESC); module_param_array(cs4232_mpu_irq, int, boot_devs, 0444); MODULE_PARM_DESC(cs4232_mpu_irq, "IRQ # for CS4232 MPU-401 interface."); -MODULE_PARM_SYNTAX(cs4232_mpu_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list"); module_param_array(ics2115_irq, int, boot_devs, 0444); MODULE_PARM_DESC(ics2115_irq, "IRQ # for ICS2115."); -MODULE_PARM_SYNTAX(ics2115_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list"); module_param_array(ics2115_port, long, boot_devs, 0444); MODULE_PARM_DESC(ics2115_port, "Port # for ICS2115."); -MODULE_PARM_SYNTAX(ics2115_port, SNDRV_PORT12_DESC); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port #."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC); module_param_array(use_cs4232_midi, bool, boot_devs, 0444); MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); -MODULE_PARM_SYNTAX(use_cs4232_midi, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); static snd_card_t *snd_wavefront_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; diff -Nru a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c --- a/sound/isa/wavefront/wavefront_fx.c 2004-09-06 16:37:53 -07:00 +++ b/sound/isa/wavefront/wavefront_fx.c 2004-09-06 16:37:53 -07:00 @@ -486,8 +486,9 @@ snd_wavefront_card_t *acard; snd_wavefront_t *dev; wavefront_fx_info r; - unsigned short page_data[256]; + unsigned short *page_data = NULL; unsigned short *pd; + int err = 0; snd_assert(sdev->card != NULL, return -ENODEV); @@ -514,23 +515,30 @@ } else if (r.data[2] == 1) { pd = (unsigned short *) &r.data[3]; } else { - if (r.data[2] > (long)sizeof (page_data)) { + if (r.data[2] > 256) { snd_printk ("cannot write " - "> 255 bytes to FX\n"); + "> 512 bytes to FX\n"); return -EIO; } + page_data = kmalloc(r.data[2] * sizeof(short), GFP_KERNEL); + if (!page_data) + return -ENOMEM; if (copy_from_user (page_data, (unsigned char __user *) r.data[3], - r.data[2])) + r.data[2] * sizeof(short))) { + kfree(page_data); return -EFAULT; + } pd = page_data; } - wavefront_fx_memset (dev, + err = wavefront_fx_memset (dev, r.data[0], /* page */ r.data[1], /* addr */ r.data[2], /* cnt */ pd); + if (page_data) + kfree(page_data); break; default: @@ -538,7 +546,7 @@ r.request); return -ENOTTY; } - return 0; + return err; } /* YSS225 initialization. diff -Nru a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c --- a/sound/isa/wavefront/wavefront_synth.c 2004-09-06 16:37:52 -07:00 +++ b/sound/isa/wavefront/wavefront_synth.c 2004-09-06 16:37:52 -07:00 @@ -1961,6 +1961,12 @@ break; } + if (section_length < 0 || section_length > WF_SECTION_MAX) { + snd_printk ("invalid firmware section length %d\n", + section_length); + goto failure; + } + if (sys_read (fd, section, section_length) != section_length) { snd_printk ("firmware section " "read error.\n"); diff -Nru a/sound/oss/Kconfig b/sound/oss/Kconfig --- a/sound/oss/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/Kconfig 2004-09-06 16:37:54 -07:00 @@ -127,8 +127,8 @@ . config SOUND_ESSSOLO1 - tristate "ESS Technology Solo1" - depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT + tristate "ESS Technology Solo1" + depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT && PCI help Say Y or M if you have a PCI sound card utilizing the ESS Technology Solo1 chip. To find out if your sound card uses a @@ -139,7 +139,7 @@ config SOUND_MAESTRO tristate "ESS Maestro, Maestro2, Maestro2E driver" - depends on SOUND_PRIME!=n && SOUND + depends on SOUND_PRIME!=n && SOUND && PCI help Say Y or M if you have a sound system driven by ESS's Maestro line of PCI sound chips. These include the Maestro 1, Maestro 2, and diff -Nru a/sound/oss/ad1848.c b/sound/oss/ad1848.c --- a/sound/oss/ad1848.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/ad1848.c 2004-09-06 16:37:53 -07:00 @@ -1538,7 +1538,7 @@ ad1848_mixer_reset(devc); } -int ad1848_detect(int io_base, int *ad_flags, int *osp) +int ad1848_detect(struct resource *ports, int *ad_flags, int *osp) { unsigned char tmp; ad1848_info *devc = &adev_info[nr_ad1848_devs]; @@ -1548,6 +1548,7 @@ int ad1847_flag = 0; int cs4248_flag = 0; int sscape_flag = 0; + int io_base = ports->start; int i; @@ -1578,11 +1579,6 @@ printk(KERN_ERR "ad1848 - Too many audio devices\n"); return 0; } - if (check_region(io_base, 4)) - { - printk(KERN_ERR "ad1848.c: Port %x not free.\n", io_base); - return 0; - } spin_lock_init(&devc->lock); devc->base = io_base; devc->irq_ok = 0; @@ -1951,7 +1947,7 @@ return 1; } -int ad1848_init (char *name, int io_base, int irq, int dma_playback, +int ad1848_init (char *name, struct resource *ports, int irq, int dma_playback, int dma_capture, int share_dma, int *osp, struct module *owner) { /* @@ -1986,8 +1982,7 @@ sprintf(dev_name, "Generic audio codec (%s)", devc->chip_name); - if (!request_region(devc->base, 4, devc->name)) - return -1; + rename_region(ports, devc->name); conf_printf2(dev_name, devc->base, devc->irq, dma_playback, dma_capture); @@ -2522,21 +2517,16 @@ return 1; } -int probe_ms_sound(struct address_info *hw_config) +int probe_ms_sound(struct address_info *hw_config, struct resource *ports) { unsigned char tmp; DDB(printk("Entered probe_ms_sound(%x, %d)\n", hw_config->io_base, hw_config->card_subtype)); - if (check_region(hw_config->io_base, 8)) - { - printk(KERN_ERR "MSS: I/O port conflict\n"); - return 0; - } if (hw_config->card_subtype == 1) /* Has no IRQ/DMA registers */ { /* check_opl3(0x388, hw_config); */ - return ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp); + return ad1848_detect(ports, NULL, hw_config->osp); } if (deskpro_xl && hw_config->card_subtype == 2) /* Compaq Deskpro XL */ @@ -2562,7 +2552,7 @@ int ret; DDB(printk("I/O address is inactive (%x)\n", tmp)); - if (!(ret = ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp))) + if (!(ret = ad1848_detect(ports, NULL, hw_config->osp))) return 0; return 1; } @@ -2575,7 +2565,7 @@ MDB(printk(KERN_ERR "No MSS signature detected on port 0x%x (0x%x)\n", hw_config->io_base, (int) inb(hw_config->io_base + 3))); DDB(printk("Trying to detect codec anyway but IRQ/DMA may not work\n")); - if (!(ret = ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp))) + if (!(ret = ad1848_detect(ports, NULL, hw_config->osp))) return 0; hw_config->card_subtype = 1; @@ -2610,10 +2600,10 @@ printk(KERN_ERR "MSS: Can't use IRQ%d with a 8 bit card/slot\n", hw_config->irq); return 0; } - return ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp); + return ad1848_detect(ports, NULL, hw_config->osp); } -void attach_ms_sound(struct address_info *hw_config, struct module *owner) +void attach_ms_sound(struct address_info *hw_config, struct resource *ports, struct module *owner) { static signed char interrupt_bits[12] = { @@ -2634,13 +2624,12 @@ if (hw_config->card_subtype == 1) /* Has no IRQ/DMA registers */ { - hw_config->slots[0] = ad1848_init("MS Sound System", hw_config->io_base + 4, + hw_config->slots[0] = ad1848_init("MS Sound System", ports, hw_config->irq, hw_config->dma, hw_config->dma2, 0, hw_config->osp, owner); - request_region(hw_config->io_base, 4, "WSS config"); return; } /* @@ -2651,6 +2640,8 @@ if (bits == -1) { printk(KERN_ERR "MSS: Bad IRQ %d\n", hw_config->irq); + release_region(ports->start, 4); + release_region(ports->start - 4, 4); return; } outb((bits | 0x40), config_port); @@ -2694,12 +2685,11 @@ outb((bits | dma_bits[dma] | dma2_bit), config_port); /* Write IRQ+DMA setup */ - hw_config->slots[0] = ad1848_init("MS Sound System", hw_config->io_base + 4, + hw_config->slots[0] = ad1848_init("MS Sound System", ports, hw_config->irq, dma, dma2, 0, hw_config->osp, THIS_MODULE); - request_region(hw_config->io_base, 4, "WSS config"); } void unload_ms_sound(struct address_info *hw_config) @@ -3095,6 +3085,7 @@ #endif if(io != -1) { + struct resource *ports; if( isapnp == 0 ) { if(irq == -1 || dma == -1) { @@ -3109,9 +3100,22 @@ cfg.card_subtype = type; } - if(!probe_ms_sound(&cfg)) + ports = request_region(io + 4, 4, "ad1848"); + + if (!ports) + return -EBUSY; + + if (!request_region(io, 4, "WSS config")) { + release_region(io + 4, 4); + return -EBUSY; + } + + if (!probe_ms_sound(&cfg, ports)) { + release_region(io + 4, 4); + release_region(io, 4); return -ENODEV; - attach_ms_sound(&cfg, THIS_MODULE); + } + attach_ms_sound(&cfg, ports, THIS_MODULE); loaded = 1; } return 0; diff -Nru a/sound/oss/ad1848.h b/sound/oss/ad1848.h --- a/sound/oss/ad1848.h 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/ad1848.h 2004-09-06 16:37:50 -07:00 @@ -11,15 +11,15 @@ ad1848_control(AD1848_MIXER_REROUTE, ((oldctl)<<8)|(newctl)) -int ad1848_init(char *name, int io_base, int irq, int dma_playback, +int ad1848_init(char *name, struct resource *ports, int irq, int dma_playback, int dma_capture, int share_dma, int *osp, struct module *owner); void ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int share_dma); -int ad1848_detect (int io_base, int *flags, int *osp); +int ad1848_detect (struct resource *ports, int *flags, int *osp); int ad1848_control(int cmd, int arg); irqreturn_t adintr(int irq, void *dev_id, struct pt_regs * dummy); -void attach_ms_sound(struct address_info * hw_config, struct module * owner); +void attach_ms_sound(struct address_info * hw_config, struct resource *ports, struct module * owner); -int probe_ms_sound(struct address_info *hw_config); +int probe_ms_sound(struct address_info *hw_config, struct resource *ports); void unload_ms_sound(struct address_info *hw_info); diff -Nru a/sound/oss/btaudio.c b/sound/oss/btaudio.c --- a/sound/oss/btaudio.c 2004-09-06 16:37:51 -07:00 +++ b/sound/oss/btaudio.c 2004-09-06 16:37:51 -07:00 @@ -961,7 +961,7 @@ /* init hw */ btwrite(0, REG_GPIO_DMA_CTL); btwrite(0, REG_INT_MASK); - btwrite(~0x0UL, REG_INT_STAT); + btwrite(~0U, REG_INT_STAT); pci_set_master(pci_dev); if ((rc = request_irq(bta->irq, btaudio_irq, SA_SHIRQ|SA_INTERRUPT, @@ -1033,7 +1033,7 @@ /* turn off all DMA / IRQs */ btand(~15, REG_GPIO_DMA_CTL); btwrite(0, REG_INT_MASK); - btwrite(~0x0UL, REG_INT_STAT); + btwrite(~0U, REG_INT_STAT); /* unregister devices */ if (digital) { diff -Nru a/sound/oss/cmpci.c b/sound/oss/cmpci.c --- a/sound/oss/cmpci.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/cmpci.c 2004-09-06 16:37:53 -07:00 @@ -3000,6 +3000,8 @@ mm_segment_t fs; int i, val, ret; unsigned char reg_mask; + int timeout; + struct resource *ports; struct { unsigned short deviceid; char *devicename; @@ -3184,54 +3186,55 @@ } #endif #ifdef CONFIG_SOUND_CMPCI_MIDI + switch (s->iomidi) { + case 0x330: + reg_mask = 0; + break; + case 0x320: + reg_mask = 0x20; + break; + case 0x310: + reg_mask = 0x40; + break; + case 0x300: + reg_mask = 0x60; + break; + default: + s->iomidi = 0; + goto skip_mpu; + } + ports = request_region(s->iomidi, 2, "mpu401"); + if (!ports) + goto skip_mpu; /* disable MPU-401 */ maskb(s->iobase + CODEC_CMI_FUNCTRL1, ~0x04, 0); s->mpu_data.name = "cmpci mpu"; s->mpu_data.io_base = s->iomidi; s->mpu_data.irq = -s->irq; // tell mpu401 to share irq - if (probe_mpu401(&s->mpu_data)) + if (probe_mpu401(&s->mpu_data, ports)) { + release_region(s->iomidi, 2); s->iomidi = 0; - if (s->iomidi) { - /* set IO based at 0x330 */ - switch (s->iomidi) { - case 0x330: - reg_mask = 0; - break; - case 0x320: - reg_mask = 0x20; - break; - case 0x310: - reg_mask = 0x40; - break; - case 0x300: - reg_mask = 0x60; - break; - default: - s->iomidi = 0; + goto skip_mpu; + } + maskb(s->iobase + CODEC_CMI_LEGACY_CTRL + 3, ~0x60, reg_mask); + /* enable MPU-401 */ + maskb(s->iobase + CODEC_CMI_FUNCTRL1, ~0, 0x04); + /* clear all previously received interrupt */ + for (timeout = 900000; timeout > 0; timeout--) { + if ((inb(s->iomidi + 1) && 0x80) == 0) + inb(s->iomidi); + else break; - } - maskb(s->iobase + CODEC_CMI_LEGACY_CTRL + 3, ~0x60, reg_mask); - /* enable MPU-401 */ - if (s->iomidi) { - int timeout; - - maskb(s->iobase + CODEC_CMI_FUNCTRL1, ~0, 0x04); - /* clear all previously received interrupt */ - for (timeout = 900000; timeout > 0; timeout--) { - if ((inb(s->iomidi + 1) && 0x80) == 0) - inb(s->iomidi); - else - break; - } - if (!probe_mpu401(&s->mpu_data)) { - s->iomidi = 0; - maskb(s->iobase + CODEC_CMI_FUNCTRL1, ~0, 0x04); - } else { - attach_mpu401(&s->mpu_data, THIS_MODULE); - s->midi_devc = s->mpu_data.slots[1]; - } - } } + if (!probe_mpu401(&s->mpu_data, ports)) { + release_region(s->iomidi, 2); + s->iomidi = 0; + maskb(s->iobase + CODEC_CMI_FUNCTRL1, ~0, 0x04); + } else { + attach_mpu401(&s->mpu_data, THIS_MODULE); + s->midi_devc = s->mpu_data.slots[1]; + } +skip_mpu: #endif #ifdef CONFIG_SOUND_CMPCI_JOYSTICK /* enable joystick */ diff -Nru a/sound/oss/cs4232.c b/sound/oss/cs4232.c --- a/sound/oss/cs4232.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/cs4232.c 2004-09-06 16:37:53 -07:00 @@ -128,27 +128,33 @@ outb(((unsigned char) (ENABLE_PINS | regd)), baseio + INDEX_DATA ); } -int __init probe_cs4232(struct address_info *hw_config, int isapnp_configured) +static int __init probe_cs4232(struct address_info *hw_config, int isapnp_configured) { int i, n; int base = hw_config->io_base, irq = hw_config->irq; int dma1 = hw_config->dma, dma2 = hw_config->dma2; + struct resource *ports; + + if (base == -1 || irq == -1 || dma1 == -1) { + printk(KERN_ERR "cs4232: dma, irq and io must be set.\n"); + return 0; + } /* * Verify that the I/O port range is free. */ - if (check_region(base, 4)) - { + ports = request_region(base, 4, "ad1848"); + if (!ports) { printk(KERN_ERR "cs4232.c: I/O port 0x%03x not free\n", base); return 0; } - if (ad1848_detect(hw_config->io_base, NULL, hw_config->osp)) { - return 1; /* The card is already active */ + if (ad1848_detect(ports, NULL, hw_config->osp)) { + goto got_it; /* The card is already active */ } if (isapnp_configured) { printk(KERN_ERR "cs4232.c: ISA PnP configured, but not detected?\n"); - return 0; + goto fail; } /* @@ -241,30 +247,20 @@ * Then try to detect the codec part of the chip */ - if (ad1848_detect(hw_config->io_base, NULL, hw_config->osp)) - return 1; + if (ad1848_detect(ports, NULL, hw_config->osp)) + goto got_it; sleep(HZ); } +fail: + release_region(base, 4); return 0; -} - -void __init attach_cs4232(struct address_info *hw_config) -{ - int base = hw_config->io_base, - irq = hw_config->irq, - dma1 = hw_config->dma, - dma2 = hw_config->dma2; - - if (base == -1 || irq == -1 || dma1 == -1) { - printk(KERN_ERR "cs4232: dma, irq and io must be set.\n"); - return; - } +got_it: if (dma2 == -1) dma2 = dma1; - hw_config->slots[0] = ad1848_init("Crystal audio controller", base, + hw_config->slots[0] = ad1848_init("Crystal audio controller", ports, irq, dma1, /* Playback DMA */ dma2, /* Capture DMA */ @@ -308,9 +304,9 @@ } if (bss) - { enable_xctrl(base); - } + + return 1; } static void __devexit unload_cs4232(struct address_info *hw_config) @@ -423,7 +419,6 @@ kfree(isapnpcfg); return -ENODEV; } - attach_cs4232(isapnpcfg); pnp_set_drvdata(dev,isapnpcfg); return 0; } @@ -486,7 +481,6 @@ if (probe_cs4232(&cfg,FALSE) == 0) return -ENODEV; - attach_cs4232(&cfg); return 0; } diff -Nru a/sound/oss/cs4232.h b/sound/oss/cs4232.h --- a/sound/oss/cs4232.h 2004-09-06 16:37:51 -07:00 +++ b/sound/oss/cs4232.h 2004-09-06 16:37:51 -07:00 @@ -1,5 +1,3 @@ -int probe_cs4232 (struct address_info *hw_config,int useisapnp); -void attach_cs4232 (struct address_info *hw_config); int probe_cs4232_mpu (struct address_info *hw_config); void attach_cs4232_mpu (struct address_info *hw_config); diff -Nru a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c --- a/sound/oss/cs46xx.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/cs46xx.c 2004-09-06 16:37:50 -07:00 @@ -2096,7 +2096,7 @@ unsigned copied=0; CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, - printk("cs46xx: cs_read()+ %d\n",count) ); + printk("cs46xx: cs_read()+ %zd\n",count) ); state = (struct cs_state *)card->states[0]; if(!state) return -ENODEV; @@ -2157,9 +2157,9 @@ } CS_DBGOUT(CS_WAVE_READ, 2, printk(KERN_INFO - "_read() copy_to cnt=%d count=%d ", cnt,count) ); + "_read() copy_to cnt=%d count=%zd ", cnt,count) ); CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO - " .dmasize=%d .count=%d buffer=%p ret=%d\n", + " .dmasize=%d .count=%d buffer=%p ret=%zd\n", dmabuf->dmasize,dmabuf->count,buffer,ret) ); if (cs_copy_to_user(state, buffer, @@ -2184,7 +2184,7 @@ up(&state->sem); set_current_state(TASK_RUNNING); CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, - printk("cs46xx: cs_read()- %d\n",ret) ); + printk("cs46xx: cs_read()- %zd\n",ret) ); return ret; } @@ -2202,7 +2202,7 @@ int cnt; CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 4, - printk("cs46xx: cs_write called, count = %d\n", count) ); + printk("cs46xx: cs_write called, count = %zd\n", count) ); state = (struct cs_state *)card->states[1]; if(!state) return -ENODEV; @@ -2309,7 +2309,7 @@ set_current_state(TASK_RUNNING); CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 2, - printk("cs46xx: cs_write()- ret=0x%x\n", ret) ); + printk("cs46xx: cs_write()- ret=%zd\n", ret) ); return ret; } diff -Nru a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c --- a/sound/oss/emu10k1/midi.c 2004-09-06 16:37:55 -07:00 +++ b/sound/oss/emu10k1/midi.c 2004-09-06 16:37:55 -07:00 @@ -320,7 +320,6 @@ { struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) file->private_data; struct midi_hdr *midihdr; - ssize_t ret = 0; unsigned long flags; DPD(4, "emu10k1_midi_write(), count=%#x\n", (u32) count); @@ -344,7 +343,7 @@ if (copy_from_user(midihdr->data, buffer, count)) { kfree(midihdr->data); kfree(midihdr); - return ret ? ret : -EFAULT; + return -EFAULT; } spin_lock_irqsave(&midi_spinlock, flags); diff -Nru a/sound/oss/gus_card.c b/sound/oss/gus_card.c --- a/sound/oss/gus_card.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/gus_card.c 2004-09-06 16:37:50 -07:00 @@ -160,22 +160,29 @@ #ifdef CONFIG_SOUND_GUS16 -static int __init probe_gus_db16(struct address_info *hw_config) +static int __init init_gus_db16(struct address_info *hw_config) { - return ad1848_detect(hw_config->io_base, NULL, hw_config->osp); -} + struct resource *ports; + + ports = request_region(hw_config->io_base, 4, "ad1848"); + if (!ports) + return 0; + + if (!ad1848_detect(ports, NULL, hw_config->osp)) { + release_region(hw_config->io_base, 4); + return 0; + } -static void __init attach_gus_db16(struct address_info *hw_config) -{ gus_pcm_volume = 100; gus_wave_volume = 90; - hw_config->slots[3] = ad1848_init("GUS 16 bit sampling", hw_config->io_base, + hw_config->slots[3] = ad1848_init("GUS 16 bit sampling", ports, hw_config->irq, hw_config->dma, hw_config->dma, 0, hw_config->osp, THIS_MODULE); + return 1; } static void __exit unload_gus_db16(struct address_info *hw_config) @@ -244,11 +251,8 @@ } #ifdef CONFIG_SOUND_GUS16 - if (probe_gus_db16(&cfg) && gus16) { - /* FIXME: This can't work, can it ? -- Christoph */ - attach_gus_db16(&cfg); + if (gus16 && init_gus_db16(&cfg)) db16 = 1; - } #endif if (!probe_gus(&cfg)) return -ENODEV; diff -Nru a/sound/oss/gus_wave.c b/sound/oss/gus_wave.c --- a/sound/oss/gus_wave.c 2004-09-06 16:37:55 -07:00 +++ b/sound/oss/gus_wave.c 2004-09-06 16:37:55 -07:00 @@ -2942,6 +2942,8 @@ } else { + struct resource *ports; + ports = request_region(gus_base + 0x10c, 4, "ad1848"); model_num = "MAX"; gus_type = 0x40; mixer_type = CS4231; @@ -2963,7 +2965,10 @@ outb((max_config), gus_base + 0x106); /* UltraMax control */ } - if (ad1848_detect(gus_base + 0x10c, &ad_flags, hw_config->osp)) + if (!ports) + goto no_cs4231; + + if (ad1848_detect(ports, &ad_flags, hw_config->osp)) { char *name = "GUS MAX"; int old_num_mixers = num_mixers; @@ -2977,7 +2982,7 @@ if (hw_config->name) name = hw_config->name; - hw_config->slots[1] = ad1848_init(name, gus_base + 0x10c, + hw_config->slots[1] = ad1848_init(name, ports, -irq, gus_dma2, /* Playback DMA */ gus_dma, /* Capture DMA */ 1, /* Share DMA channels with GF1 */ @@ -2992,8 +2997,11 @@ AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE); } } - else + else { + release_region(gus_base + 0x10c, 4); + no_cs4231: printk(KERN_WARNING "GUS: No CS4231 ??"); + } #else printk(KERN_ERR "GUS MAX found, but not compiled in\n"); #endif diff -Nru a/sound/oss/harmony.c b/sound/oss/harmony.c --- a/sound/oss/harmony.c 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/harmony.c 2004-09-06 16:37:54 -07:00 @@ -8,7 +8,7 @@ On older 715 machines you'll find the technically identical chip called 'Vivace'. Both Harmony and Vicace are supported by this driver. - Copyright 2000 (c) Linuxcare Canada, Alex deVries + Copyright 2000 (c) Linuxcare Canada, Alex deVries Copyright 2000-2003 (c) Helge Deller Copyright 2001 (c) Matthieu Delahaye Copyright 2001 (c) Jean-Christophe Vaugeois @@ -1321,7 +1321,7 @@ } -MODULE_AUTHOR("Alex DeVries "); +MODULE_AUTHOR("Alex DeVries "); MODULE_DESCRIPTION("Harmony sound driver"); MODULE_LICENSE("GPL"); diff -Nru a/sound/oss/kahlua.c b/sound/oss/kahlua.c --- a/sound/oss/kahlua.c 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/kahlua.c 2004-09-06 16:37:54 -07:00 @@ -156,10 +156,14 @@ hw_config->dma2 = dma16; hw_config->name = "Cyrix XpressAudio"; hw_config->driver_use_1 = SB_NO_MIDI | SB_PCI_IRQ; + + if (!request_region(io, 16, "soundblaster")) + goto err_out_free; if(sb_dsp_detect(hw_config, 0, 0, NULL)==0) { printk(KERN_ERR "kahlua: audio not responding.\n"); + release_region(io, 16); goto err_out_free; } diff -Nru a/sound/oss/mad16.c b/sound/oss/mad16.c --- a/sound/oss/mad16.c 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/mad16.c 2004-09-06 16:37:54 -07:00 @@ -54,7 +54,6 @@ static int mad16_cdsel; static struct gameport gameport; static spinlock_t lock=SPIN_LOCK_UNLOCKED; -static int already_initialized; #define C928 1 #define MOZART 2 @@ -313,19 +312,6 @@ static int __init wss_init(struct address_info *hw_config) { - int ad_flags = 0; - - /* - * Verify the WSS parameters - */ - - if (check_region(hw_config->io_base, 8)) - { - printk(KERN_ERR "MSS: I/O port conflict\n"); - return 0; - } - if (!ad1848_detect(hw_config->io_base + 4, &ad_flags, mad16_osp)) - return 0; /* * Check if the IO port returns valid signature. The original MS Sound * system returns 0x04 while some cards (AudioTrix Pro for example) @@ -338,31 +324,20 @@ DDB(printk("No MSS signature detected on port 0x%x (0x%x)\n", hw_config->io_base, inb(hw_config->io_base + 3))); return 0; } - if (hw_config->irq > 11) - { - printk(KERN_ERR "MSS: Bad IRQ %d\n", hw_config->irq); - return 0; - } - if (hw_config->dma != 0 && hw_config->dma != 1 && hw_config->dma != 3) - { - printk(KERN_ERR "MSS: Bad DMA %d\n", hw_config->dma); - return 0; - } /* * Check that DMA0 is not in use with a 8 bit board. */ - if (hw_config->dma == 0 && inb(hw_config->io_base + 3) & 0x80) { printk("MSS: Can't use DMA0 with a 8 bit card/slot\n"); return 0; } - if (hw_config->irq > 7 && hw_config->irq != 9 && inb(hw_config->io_base + 3) & 0x80) + if (hw_config->irq > 9 && inb(hw_config->io_base + 3) & 0x80) printk(KERN_ERR "MSS: Can't use IRQ%d with a 8 bit card/slot\n", hw_config->irq); return 1; } -static int __init init_c930(struct address_info *hw_config) +static void __init init_c930(struct address_info *hw_config, int base) { unsigned char cfg = 0; @@ -376,25 +351,7 @@ somewhere else. */ cfg = (cfg & 0x09) ^ 0x07; } - - switch (hw_config->io_base) - { - case 0x530: - cfg |= 0x00; - break; - case 0xe80: - cfg |= 0x10; - break; - case 0xf40: - cfg |= 0x20; - break; - case 0x604: - cfg |= 0x30; - break; - default: - printk(KERN_ERR "MAD16: Invalid codec port %x\n", hw_config->io_base); - return 0; - } + cfg |= base << 4; mad_write(MC1_PORT, cfg); /* MC2 is CD configuration. Don't touch it. */ @@ -414,8 +371,6 @@ mad_write(MC6_PORT, 0x02); /* Enable WSS, Disable MPU and SB */ mad_write(MC7_PORT, 0xCB); mad_write(MC10_PORT, 0x11); - - return wss_init(hw_config); } static int __init chip_detect(void) @@ -508,20 +463,48 @@ static int __init probe_mad16(struct address_info *hw_config) { int i; - static int valid_ports[] = - { - 0x530, 0xe80, 0xf40, 0x604 - }; unsigned char tmp; unsigned char cs4231_mode = 0; int ad_flags = 0; - if (already_initialized) - return 0; + signed char bits; + + static char dma_bits[4] = { + 1, 2, 0, 3 + }; + + int config_port = hw_config->io_base + 0, version_port = hw_config->io_base + 3; + int dma = hw_config->dma, dma2 = hw_config->dma2; + unsigned char dma2_bit = 0; + int base; + struct resource *ports; mad16_osp = hw_config->osp; + switch (hw_config->io_base) { + case 0x530: + base = 0; + break; + case 0xe80: + base = 1; + break; + case 0xf40: + base = 2; + break; + case 0x604: + base = 3; + break; + default: + printk(KERN_ERR "MAD16/Mozart: Bad WSS base address 0x%x\n", hw_config->io_base); + return 0; + } + + if (dma != 0 && dma != 1 && dma != 3) { + printk(KERN_ERR "MSS: Bad DMA %d\n", dma); + return 0; + } + /* * Check that all ports return 0xff (bus float) when no password * is written to the password register. @@ -531,9 +514,44 @@ if (!chip_detect()) return 0; - if (board_type == C930) - return init_c930(hw_config); + switch (hw_config->irq) { + case 7: + bits = 8; + break; + case 9: + bits = 0x10; + break; + case 10: + bits = 0x18; + break; + case 12: + bits = 0x20; + break; + case 5: /* Also IRQ5 is possible on C930 */ + if (board_type == C930 || c924pnp) { + bits = 0x28; + break; + } + default: + printk(KERN_ERR "MAD16/Mozart: Bad IRQ %d\n", hw_config->irq); + return 0; + } + + ports = request_region(hw_config->io_base + 4, 4, "ad1848"); + if (!ports) { + printk(KERN_ERR "MSS: I/O port conflict\n"); + return 0; + } + if (!request_region(hw_config->io_base, 4, "mad16 WSS config")) { + release_region(hw_config->io_base + 4, 4); + printk(KERN_ERR "MSS: I/O port conflict\n"); + return 0; + } + if (board_type == C930) { + init_c930(hw_config, base); + goto got_it; + } for (i = 0xf8d; i <= 0xf93; i++) { if (!c924pnp) @@ -547,20 +565,7 @@ */ tmp = (mad_read(MC1_PORT) & 0x0f) | 0x80; /* Enable WSS, Disable SB */ - - for (i = 0; i < 5; i++) - { - if (i > 3) /* Not a valid port */ - { - printk(KERN_ERR "MAD16/Mozart: Bad WSS base address 0x%x\n", hw_config->io_base); - return 0; - } - if (valid_ports[i] == hw_config->io_base) - { - tmp |= i << 4; /* WSS port select bits */ - break; - } - } + tmp |= base << 4; /* WSS port select bits */ /* * Set optional CD-ROM and joystick settings. @@ -580,8 +585,8 @@ mad_write(MC5_PORT, 0x05); mad_write(MC6_PORT, 0x03); } - if (!ad1848_detect(hw_config->io_base + 4, &ad_flags, mad16_osp)) - return 0; + if (!ad1848_detect(ports, &ad_flags, mad16_osp)) + goto fail; if (ad_flags & (AD_F_CS4231 | AD_F_CS4248)) cs4231_mode = 0x02; /* CS4248/CS4231 sync delay switch */ @@ -604,43 +609,19 @@ else DDB(printk("port %03x after init = %02x\n", i-0x80, mad_read(i))); } - wss_init(hw_config); - return 1; -} +got_it: + ad_flags = 0; + if (!ad1848_detect(ports, &ad_flags, mad16_osp)) + goto fail; -static void __init attach_mad16(struct address_info *hw_config) -{ - - static signed char interrupt_bits[12] = { - -1, -1, -1, -1, -1, -1, -1, 0x08, -1, 0x10, 0x18, 0x20 - }; - signed char bits; - - static char dma_bits[4] = { - 1, 2, 0, 3 - }; - - int config_port = hw_config->io_base + 0, version_port = hw_config->io_base + 3; - int ad_flags = 0, dma = hw_config->dma, dma2 = hw_config->dma2; - unsigned char dma2_bit = 0; - - already_initialized = 1; - - if (!ad1848_detect(hw_config->io_base + 4, &ad_flags, mad16_osp)) - return; + if (!wss_init(hw_config)) + goto fail; /* * Set the IRQ and DMA addresses. */ - if (board_type == C930 || c924pnp) - interrupt_bits[5] = 0x28; /* Also IRQ5 is possible on C930 */ - - bits = interrupt_bits[hw_config->irq]; - if (bits == -1) - return; - outb((bits | 0x40), config_port); if ((inb(version_port) & 0x40) == 0) printk(KERN_ERR "[IRQ Conflict?]\n"); @@ -675,27 +656,24 @@ outb((bits | dma_bits[dma] | dma2_bit), config_port); /* Write IRQ+DMA setup */ - hw_config->slots[0] = ad1848_init("mad16 WSS", hw_config->io_base + 4, + hw_config->slots[0] = ad1848_init("mad16 WSS", ports, hw_config->irq, dma, dma2, 0, hw_config->osp, THIS_MODULE); - request_region(hw_config->io_base, 4, "mad16 WSS config"); + return 1; + +fail: + release_region(hw_config->io_base + 4, 4); + release_region(hw_config->io_base, 4); + return 0; } static int __init probe_mad16_mpu(struct address_info *hw_config) { - static int mpu_attached; unsigned char tmp; - if (!already_initialized) /* The MSS port must be initialized first */ - return 0; - - if (mpu_attached) /* Don't let them call this twice */ - return 0; - mpu_attached = 1; - if (board_type < C929) /* Early chip. No MPU support. Just SB MIDI */ { @@ -732,8 +710,12 @@ mad_write(MC3_PORT, tmp | 0x04); hw_config->driver_use_1 = SB_MIDI_ONLY; - if (!sb_dsp_detect(hw_config, 0, 0, NULL)) + if (!request_region(hw_config->io_base, 16, "soundblaster")) + return 0; + if (!sb_dsp_detect(hw_config, 0, 0, NULL)) { + release_region(hw_config->io_base, 16); return 0; + } if (mad_read(MC1_PORT) & 0x20) hw_config->io_base = 0x240; @@ -1031,15 +1013,18 @@ printk(KERN_ERR "I/O, DMA and irq are mandatory\n"); return -EINVAL; } - - if (!probe_mad16(&cfg)) + + if (!request_region(MC0_PORT, 12, "mad16")) + return -EBUSY; + + if (!probe_mad16(&cfg)) { + release_region(MC0_PORT, 12); return -ENODEV; + } cfg_mpu.io_base = mpu_io; cfg_mpu.irq = mpu_irq; - attach_mad16(&cfg); - found_mpu = probe_mad16_mpu(&cfg_mpu); if (joystick == 1) { @@ -1067,6 +1052,7 @@ release_region(0x201, 1); } unload_mad16(&cfg); + release_region(MC0_PORT, 12); } module_init(init_mad16); diff -Nru a/sound/oss/maui.c b/sound/oss/maui.c --- a/sound/oss/maui.c 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/maui.c 2004-09-06 16:37:54 -07:00 @@ -301,17 +301,23 @@ static int __init probe_maui(struct address_info *hw_config) { + struct resource *ports; + int this_dev; int i; int tmp1, tmp2, ret; - if (check_region(hw_config->io_base, 8)) + ports = request_region(hw_config->io_base, 2, "mpu401"); + if (!ports) return 0; + if (!request_region(hw_config->io_base + 2, 6, "Maui")) + goto out; + maui_base = hw_config->io_base; maui_osp = hw_config->osp; if (request_irq(hw_config->irq, mauiintr, 0, "Maui", NULL) < 0) - return 0; + goto out2; /* * Initialize the processor if necessary @@ -322,36 +328,30 @@ !maui_write(0x9F) || /* Report firmware version */ !maui_short_wait(STAT_RX_AVAIL) || maui_read() == -1 || maui_read() == -1) - if (!maui_init(hw_config->irq)) { - free_irq(hw_config->irq, NULL); - return 0; - } + if (!maui_init(hw_config->irq)) + goto out3; } if (!maui_write(0xCF)) /* Report hardware version */ { printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n"); - free_irq(hw_config->irq, NULL); - return 0; + goto out3; } if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1) { printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n"); - free_irq(hw_config->irq, NULL); - return 0; - } - if (tmp1 == 0xff || tmp2 == 0xff) { - free_irq(hw_config->irq, NULL); - return 0; + goto out3; } + if (tmp1 == 0xff || tmp2 == 0xff) + goto out3; printk(KERN_DEBUG "WaveFront hardware version %d.%d\n", tmp1, tmp2); if (!maui_write(0x9F)) /* Report firmware version */ - return 0; + goto out3; if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1) - return 0; + goto out3; printk(KERN_DEBUG "WaveFront firmware version %d.%d\n", tmp1, tmp2); if (!maui_write(0x85)) /* Report free DRAM */ - return 0; + goto out3; tmp1 = 0; for (i = 0; i < 4; i++) { tmp1 |= maui_read() << (7 * i); @@ -359,20 +359,12 @@ printk(KERN_DEBUG "Available DRAM %dk\n", tmp1 / 1024); for (i = 0; i < 1000; i++) - if (probe_mpu401(hw_config)) + if (probe_mpu401(hw_config, ports)) break; - ret = probe_mpu401(hw_config); - - if (ret) - request_region(hw_config->io_base + 2, 6, "Maui"); - - return ret; -} - -static void __init attach_maui(struct address_info *hw_config) -{ - int this_dev; + ret = probe_mpu401(hw_config, ports); + if (!ret) + goto out3; conf_printf("Maui", hw_config); @@ -391,14 +383,22 @@ */ synth = midi_devs[this_dev]->converter; - synth->id = "MAUI"; - if (synth != NULL) { + synth->id = "MAUI"; orig_load_patch = synth->load_patch; synth->load_patch = &maui_load_patch; } else printk(KERN_ERR "Maui: Can't install patch loader\n"); } + return 1; + +out3: + free_irq(hw_config->irq, NULL); +out2: + release_region(hw_config->io_base + 2, 6); +out: + release_region(hw_config->io_base, 2); + return 0; } static void __exit unload_maui(struct address_info *hw_config) @@ -445,7 +445,6 @@ } if (probe_maui(&cfg) == 0) return -ENODEV; - attach_maui(&cfg); return 0; } diff -Nru a/sound/oss/mpu401.c b/sound/oss/mpu401.c --- a/sound/oss/mpu401.c 2004-09-06 16:37:55 -07:00 +++ b/sound/oss/mpu401.c 2004-09-06 16:37:55 -07:00 @@ -1026,12 +1026,6 @@ spin_unlock_irqrestore(&devc->lock,flags); } - if (!request_region(hw_config->io_base, 2, "mpu401")) - { - ret = -ENOMEM; - goto out_irq; - } - if (devc->version != 0) if (mpu_cmd(m, 0xC5, 0) >= 0) /* Set timebase OK */ if (mpu_cmd(m, 0xE0, 120) >= 0) /* Set tempo OK */ @@ -1044,7 +1038,7 @@ { printk(KERN_ERR "mpu401: Can't allocate memory\n"); ret = -ENOMEM; - goto out_resource; + goto out_irq; } if (!(devc->capabilities & MPU_CAP_INTLG)) /* No intelligent mode */ { @@ -1126,13 +1120,12 @@ return 0; -out_resource: - release_region(hw_config->io_base, 2); out_irq: free_irq(devc->irq, (void *)m); out_mididev: sound_unload_mididev(m); out_err: + release_region(hw_config->io_base, 2); return ret; } @@ -1207,16 +1200,11 @@ } -int probe_mpu401(struct address_info *hw_config) +int probe_mpu401(struct address_info *hw_config, struct resource *ports) { int ok = 0; struct mpu_config tmp_devc; - if (check_region(hw_config->io_base, 2)) - { - printk(KERN_ERR "mpu401: I/O port %x already in use\n\n", hw_config->io_base); - return 0; - } tmp_devc.base = hw_config->io_base; tmp_devc.irq = hw_config->irq; tmp_devc.initialized = 0; @@ -1791,10 +1779,16 @@ /* Can be loaded either for module use or to provide functions to others */ if (io != -1 && irq != -1) { + struct resource *ports; cfg.irq = irq; cfg.io_base = io; - if (probe_mpu401(&cfg) == 0) + ports = request_region(io, 2, "mpu401"); + if (!ports) + return -EBUSY; + if (probe_mpu401(&cfg, ports) == 0) { + release_region(io, 2); return -ENODEV; + } if ((ret = attach_mpu401(&cfg, THIS_MODULE))) return ret; } diff -Nru a/sound/oss/mpu401.h b/sound/oss/mpu401.h --- a/sound/oss/mpu401.h 2004-09-06 16:37:52 -07:00 +++ b/sound/oss/mpu401.h 2004-09-06 16:37:52 -07:00 @@ -6,7 +6,7 @@ irqreturn_t uart401intr (int irq, void *dev_id, struct pt_regs * dummy); /* From mpu401.c */ -int probe_mpu401(struct address_info *hw_config); +int probe_mpu401(struct address_info *hw_config, struct resource *ports); int attach_mpu401(struct address_info * hw_config, struct module *owner); void unload_mpu401(struct address_info *hw_info); diff -Nru a/sound/oss/msnd.c b/sound/oss/msnd.c --- a/sound/oss/msnd.c 2004-09-06 16:37:51 -07:00 +++ b/sound/oss/msnd.c 2004-09-06 16:37:51 -07:00 @@ -207,7 +207,7 @@ register int timeout = 1000; while(timeout-- > 0) - if (inb(io + HP_ISR) & HPISR_TXDE) + if (msnd_inb(io + HP_ISR) & HPISR_TXDE) return 0; return -EIO; @@ -219,7 +219,7 @@ register int timeout = 1000; while(timeout-- > 0) - if (!(inb(io + HP_CVR) & HPCVR_HC)) + if (!(msnd_inb(io + HP_CVR) & HPCVR_HC)) return 0; return -EIO; @@ -231,7 +231,7 @@ spin_lock_irqsave(&dev->lock, flags); if (msnd_wait_HC0(dev) == 0) { - outb(cmd, dev->io + HP_CVR); + msnd_outb(cmd, dev->io + HP_CVR); spin_unlock_irqrestore(&dev->lock, flags); return 0; } @@ -248,9 +248,9 @@ register unsigned int io = dev->io; if (msnd_wait_TXDE(dev) == 0) { - outb(high, io + HP_TXH); - outb(mid, io + HP_TXM); - outb(low, io + HP_TXL); + msnd_outb(high, io + HP_TXH); + msnd_outb(mid, io + HP_TXM); + msnd_outb(low, io + HP_TXL); return 0; } @@ -272,8 +272,8 @@ if (msnd_send_word(dev, bin[i], bin[i + 1], bin[i + 2]) != 0) return -EIO; - inb(dev->io + HP_RXL); - inb(dev->io + HP_CVR); + msnd_inb(dev->io + HP_RXL); + msnd_inb(dev->io + HP_CVR); return 0; } @@ -289,11 +289,11 @@ spin_lock_irqsave(&dev->lock, flags); if (msnd_wait_TXDE(dev) == 0) { - outb(inb(dev->io + HP_ICR) | HPICR_TREQ, dev->io + HP_ICR); + msnd_outb(msnd_inb(dev->io + HP_ICR) | HPICR_TREQ, dev->io + HP_ICR); if (dev->type == msndClassic) - outb(dev->irqid, dev->io + HP_IRQM); - outb(inb(dev->io + HP_ICR) & ~HPICR_TREQ, dev->io + HP_ICR); - outb(inb(dev->io + HP_ICR) | HPICR_RREQ, dev->io + HP_ICR); + msnd_outb(dev->irqid, dev->io + HP_IRQM); + msnd_outb(msnd_inb(dev->io + HP_ICR) & ~HPICR_TREQ, dev->io + HP_ICR); + msnd_outb(msnd_inb(dev->io + HP_ICR) | HPICR_RREQ, dev->io + HP_ICR); enable_irq(dev->irq); msnd_init_queue(dev->DSPQ, dev->dspq_data_buff, dev->dspq_buff_size); spin_unlock_irqrestore(&dev->lock, flags); @@ -320,9 +320,9 @@ spin_lock_irqsave(&dev->lock, flags); if (msnd_wait_TXDE(dev) == 0) { - outb(inb(dev->io + HP_ICR) & ~HPICR_RREQ, dev->io + HP_ICR); + msnd_outb(msnd_inb(dev->io + HP_ICR) & ~HPICR_RREQ, dev->io + HP_ICR); if (dev->type == msndClassic) - outb(HPIRQ_NONE, dev->io + HP_IRQM); + msnd_outb(HPIRQ_NONE, dev->io + HP_IRQM); disable_irq(dev->irq); spin_unlock_irqrestore(&dev->lock, flags); return 0; diff -Nru a/sound/oss/msnd.h b/sound/oss/msnd.h --- a/sound/oss/msnd.h 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/msnd.h 2004-09-06 16:37:53 -07:00 @@ -154,10 +154,11 @@ #define DSPTOPC_BASED(w) (((w) - DSP_BASE_ADDR) * 2) #ifdef SLOWIO -# undef outb -# undef inb -# define outb outb_p -# define inb inb_p +#define msnd_outb outb_p +#define msnd_inb inb_p +#else +#define msnd_outb outb +#define msnd_inb inb #endif /* JobQueueStruct */ diff -Nru a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c --- a/sound/oss/msnd_pinnacle.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/msnd_pinnacle.c 2004-09-06 16:37:53 -07:00 @@ -136,9 +136,9 @@ /* Critical section: bank 1 access */ spin_lock_irqsave(&dev.lock, flags); - outb(HPBLKSEL_1, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); isa_memset_io(dev.base, 0, DAR_BUFF_SIZE * 3); - outb(HPBLKSEL_0, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); spin_unlock_irqrestore(&dev.lock, flags); for (n = 0, lpDAQ = dev.base + DARQ_DATA_BUFF; n < 3; ++n, lpDAQ += DAQDS__size) { @@ -830,12 +830,12 @@ /* Read data from the head (unprotected bank 1 access okay since this is only called inside an interrupt) */ - outb(HPBLKSEL_1, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); msnd_fifo_write( &dev.DARF, (char *)(dev.base + bank * DAR_BUFF_SIZE), size); - outb(HPBLKSEL_0, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); return 1; } @@ -1091,7 +1091,7 @@ static irqreturn_t intr(int irq, void *dev_id, struct pt_regs *regs) { /* Send ack to DSP */ - inb(dev.io + HP_RXL); + msnd_inb(dev.io + HP_RXL); /* Evaluate queued DSP messages */ while (isa_readw(dev.DSPQ + JQS_wTail) != isa_readw(dev.DSPQ + JQS_wHead)) { @@ -1120,15 +1120,15 @@ { int timeout = 100; - outb(HPDSPRESET_ON, dev.io + HP_DSPR); + msnd_outb(HPDSPRESET_ON, dev.io + HP_DSPR); mdelay(1); #ifndef MSND_CLASSIC - dev.info = inb(dev.io + HP_INFO); + dev.info = msnd_inb(dev.io + HP_INFO); #endif - outb(HPDSPRESET_OFF, dev.io + HP_DSPR); + msnd_outb(HPDSPRESET_OFF, dev.io + HP_DSPR); mdelay(1); while (timeout-- > 0) { - if (inb(dev.io + HP_CVR) == HP_CVR_DEF) + if (msnd_inb(dev.io + HP_CVR) == HP_CVR_DEF) return 0; mdelay(1); } @@ -1202,9 +1202,9 @@ unsigned long flags; #ifdef MSND_CLASSIC - outb(dev.memid, dev.io + HP_MEMM); + msnd_outb(dev.memid, dev.io + HP_MEMM); #endif - outb(HPBLKSEL_0, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); if (initted) { mastVolLeft = isa_readw(dev.SMA + SMA_wCurrMastVolLeft); mastVolRight = isa_readw(dev.SMA + SMA_wCurrMastVolRight); @@ -1214,9 +1214,9 @@ /* Critical section: bank 1 access */ spin_lock_irqsave(&dev.lock, flags); - outb(HPBLKSEL_1, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_1, dev.io + HP_BLKS); isa_memset_io(dev.base, 0, 0x8000); - outb(HPBLKSEL_0, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); spin_unlock_irqrestore(&dev.lock, flags); dev.pwDSPQData = (dev.base + DSPQ_DATA_BUFF); @@ -1289,7 +1289,7 @@ static int upload_dsp_code(void) { - outb(HPBLKSEL_0, dev.io + HP_BLKS); + msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS); #ifndef HAVE_DSPCODEH INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE); if (!INITCODE) { @@ -1326,9 +1326,9 @@ #ifdef MSND_CLASSIC static void reset_proteus(void) { - outb(HPPRORESET_ON, dev.io + HP_PROR); + msnd_outb(HPPRORESET_ON, dev.io + HP_PROR); mdelay(TIME_PRO_RESET); - outb(HPPRORESET_OFF, dev.io + HP_PROR); + msnd_outb(HPPRORESET_OFF, dev.io + HP_PROR); mdelay(TIME_PRO_RESET_DONE); } #endif @@ -1338,8 +1338,8 @@ int err, timeout; #ifdef MSND_CLASSIC - outb(HPWAITSTATE_0, dev.io + HP_WAIT); - outb(HPBITMODE_16, dev.io + HP_BITM); + msnd_outb(HPWAITSTATE_0, dev.io + HP_WAIT); + msnd_outb(HPBITMODE_16, dev.io + HP_BITM); reset_proteus(); #endif @@ -1455,9 +1455,9 @@ static int __init msnd_write_cfg(int cfg, int reg, int value) { - outb(reg, cfg); - outb(value, cfg + 1); - if (value != inb(cfg + 1)) { + msnd_outb(reg, cfg); + msnd_outb(value, cfg + 1); + if (value != msnd_inb(cfg + 1)) { printk(KERN_ERR LOGNAME ": msnd_write_cfg: I/O error\n"); return -EIO; } diff -Nru a/sound/oss/opl3sa.c b/sound/oss/opl3sa.c --- a/sound/oss/opl3sa.c 2004-09-06 16:37:54 -07:00 +++ b/sound/oss/opl3sa.c 2004-09-06 16:37:54 -07:00 @@ -36,10 +36,7 @@ static int sb_initialized; #endif -static int kilroy_was_here; /* Don't detect twice */ -static int mpu_initialized; static spinlock_t lock=SPIN_LOCK_UNLOCKED; -static int *opl3sa_osp; static unsigned char opl3sa_read(int addr) { @@ -106,26 +103,16 @@ * OPL3-SA */ -static int __init probe_opl3sa_wss(struct address_info *hw_config) +static int __init probe_opl3sa_wss(struct address_info *hw_config, struct resource *ports) { - int ret; unsigned char tmp = 0x24; /* WSS enable */ - if (check_region(0xf86, 2)) /* Control port is busy */ - return 0; /* * Check if the IO port returns valid signature. The original MS Sound * system returns 0x04 while some cards (OPL3-SA for example) * return 0x00. */ - if (check_region(hw_config->io_base, 8)) - { - printk(KERN_ERR "OPL3-SA: MSS I/O port conflict (%x)\n", hw_config->io_base); - return 0; - } - opl3sa_osp = hw_config->osp; - if (!opl3sa_detect()) { printk(KERN_ERR "OSS: OPL3-SA chip not found\n"); @@ -152,21 +139,16 @@ } opl3sa_write(0x01, tmp); /* WSS setup register */ - kilroy_was_here = 1; - ret = probe_ms_sound(hw_config); - if (ret) - request_region(0xf86, 2, "OPL3-SA"); - - return ret; + return probe_ms_sound(hw_config, ports); } -static void __init attach_opl3sa_wss(struct address_info *hw_config) +static void __init attach_opl3sa_wss(struct address_info *hw_config, struct resource *ports) { int nm = num_mixers; /* FIXME */ - attach_ms_sound(hw_config, THIS_MODULE); + attach_ms_sound(hw_config, ports, THIS_MODULE); if (num_mixers > nm) /* A mixer was installed */ { AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD); @@ -183,14 +165,6 @@ -1, -1, -1, -1, -1, 1, -1, 2, -1, 3, 4 }; - if (!kilroy_was_here) - return 0; /* OPL3-SA has not been detected earlier */ - - if (mpu_initialized) - { - DDB(printk("OPL3-SA: MPU mode already initialized\n")); - return 0; - } if (hw_config->irq > 10) { printk(KERN_ERR "OPL3-SA: Bad MPU IRQ %d\n", hw_config->irq); @@ -224,7 +198,6 @@ opl3sa_write(0x03, conf); - mpu_initialized = 1; hw_config->name = "OPL3-SA (MPU401)"; return probe_uart401(hw_config, THIS_MODULE); @@ -281,6 +254,7 @@ static int __init init_opl3sa(void) { + struct resource *ports; if (io == -1 || irq == -1 || dma == -1) { printk(KERN_ERR "opl3sa: dma, irq and io must be set.\n"); return -EINVAL; @@ -294,12 +268,31 @@ cfg_mpu.io_base = mpu_io; cfg_mpu.irq = mpu_irq; - if (probe_opl3sa_wss(&cfg) == 0) + ports = request_region(io + 4, 4, "ad1848"); + if (!ports) + return -EBUSY; + + if (!request_region(0xf86, 2, "OPL3-SA"))/* Control port is busy */ { + release_region(io + 4, 4); + return 0; + } + + if (!request_region(io, 4, "WSS config")) { + release_region(0x86, 2); + release_region(io + 4, 4); + return 0; + } + + if (probe_opl3sa_wss(&cfg, ports) == 0) { + release_region(0xf86, 2); + release_region(io, 4); + release_region(io + 4, 4); return -ENODEV; + } found_mpu=probe_opl3sa_mpu(&cfg_mpu); - attach_opl3sa_wss(&cfg); + attach_opl3sa_wss(&cfg, ports); return 0; } diff -Nru a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c --- a/sound/oss/opl3sa2.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/opl3sa2.c 2004-09-06 16:37:50 -07:00 @@ -539,36 +539,18 @@ * Component probe, attach, unload functions */ -static inline int __init probe_opl3sa2_mpu(struct address_info* hw_config) -{ - return probe_mpu401(hw_config); -} - - -static inline int __init attach_opl3sa2_mpu(struct address_info* hw_config) -{ - return attach_mpu401(hw_config, THIS_MODULE); -} - - static inline void __exit unload_opl3sa2_mpu(struct address_info *hw_config) { unload_mpu401(hw_config); } -static inline int __init probe_opl3sa2_mss(struct address_info* hw_config) -{ - return probe_ms_sound(hw_config); -} - - -static void __init attach_opl3sa2_mss(struct address_info* hw_config) +static void __init attach_opl3sa2_mss(struct address_info* hw_config, struct resource *ports) { int initial_mixers; initial_mixers = num_mixers; - attach_ms_sound(hw_config, THIS_MODULE); /* Slot 0 */ + attach_ms_sound(hw_config, ports, THIS_MODULE); /* Slot 0 */ if (hw_config->slots[0] != -1) { /* Did the MSS driver install? */ if(num_mixers == (initial_mixers + 1)) { @@ -957,6 +939,8 @@ for (card = 0; card < max; card++) { /* If a user wants an I/O then assume they meant it */ + struct resource *ports; + int base; if (!isapnp) { if (io == -1 || irq == -1 || dma == -1 || @@ -995,17 +979,30 @@ opl3sa2_clear_slots(&opl3sa2_state[card].cfg_mpu); } + /* FIXME: leak */ if (probe_opl3sa2(&opl3sa2_state[card].cfg, card)) return -ENODEV; + base = opl3sa2_state[card].cfg_mss.io_base; - if (!probe_opl3sa2_mss(&opl3sa2_state[card].cfg_mss)) { + if (!request_region(base, 4, "WSS config")) + goto failed; + + ports = request_region(base + 4, 4, "ad1848"); + if (!ports) + goto failed2; + + if (!probe_ms_sound(&opl3sa2_state[card].cfg_mss, ports)) { /* * If one or more cards are already registered, don't * return an error but print a warning. Note, this * should never really happen unless the hardware or * ISA PnP screwed up. */ + release_region(base + 4, 4); + failed2: + release_region(base, 4); + failed: release_region(opl3sa2_state[card].cfg.io_base, 2); if (opl3sa2_cards_num) { @@ -1021,7 +1018,7 @@ attach_opl3sa2(&opl3sa2_state[card].cfg, card); conf_printf(opl3sa2_state[card].chipset_name, &opl3sa2_state[card].cfg); attach_opl3sa2_mixer(&opl3sa2_state[card].cfg, card); - attach_opl3sa2_mss(&opl3sa2_state[card].cfg_mss); + attach_opl3sa2_mss(&opl3sa2_state[card].cfg_mss, ports); /* ewww =) */ opl3sa2_state[card].card = card; @@ -1054,15 +1051,23 @@ /* Attach MPU if we've been asked to do so, failure isn't fatal */ if (opl3sa2_state[card].cfg_mpu.io_base != -1) { - if (probe_opl3sa2_mpu(&opl3sa2_state[card].cfg_mpu)) { - if (attach_opl3sa2_mpu(&opl3sa2_state[card].cfg_mpu)) { - printk(KERN_ERR PFX "failed to attach MPU401\n"); - opl3sa2_state[card].cfg_mpu.slots[1] = -1; - } + int base = opl3sa2_state[card].cfg_mpu.io_base; + struct resource *ports; + ports = request_region(base, 2, "mpu401"); + if (!ports) + goto out; + if (!probe_mpu401(&opl3sa2_state[card].cfg_mpu, ports)) { + release_region(base, 2); + goto out; + } + if (attach_mpu401(&opl3sa2_state[card].cfg_mpu, THIS_MODULE)) { + printk(KERN_ERR PFX "failed to attach MPU401\n"); + opl3sa2_state[card].cfg_mpu.slots[1] = -1; } } } +out: if (isapnp) { printk(KERN_NOTICE PFX "%d PnP card(s) found.\n", opl3sa2_cards_num); } diff -Nru a/sound/oss/pss.c b/sound/oss/pss.c --- a/sound/oss/pss.c 2004-09-06 16:37:55 -07:00 +++ b/sound/oss/pss.c 2004-09-06 16:37:55 -07:00 @@ -149,6 +149,7 @@ static int nonstandard_microcode; static int pss_cdrom_port = -1; /* Parameter for the PSS cdrom port */ static int pss_enable_joystick; /* Parameter for enabling the joystick */ +static coproc_operations pss_coproc_operations; static void pss_write(pss_confdata *devc, int data) { @@ -174,7 +175,7 @@ printk(KERN_WARNING "PSS: DSP Command (%04x) Timeout.\n", data); } -int __init probe_pss(struct address_info *hw_config) +static int __init probe_pss(struct address_info *hw_config) { unsigned short id; int irq, dma; @@ -188,13 +189,19 @@ if (devc->base != 0x230 && devc->base != 0x250) /* Some cards use these */ return 0; - if (check_region(devc->base, 0x19 /*16*/)) { + if (!request_region(devc->base, 0x10, "PSS mixer, SB emulation")) { printk(KERN_ERR "PSS: I/O port conflict\n"); return 0; } id = inw(REG(PSS_ID)); if ((id >> 8) != 'E') { printk(KERN_ERR "No PSS signature detected at 0x%x (0x%x)\n", devc->base, id); + release_region(devc->base, 0x10); + return 0; + } + if (!request_region(devc->base + 0x10, 0x9, "PSS config")) { + printk(KERN_ERR "PSS: I/O port conflict\n"); + release_region(devc->base, 0x10); return 0; } return 1; @@ -685,7 +692,7 @@ } } -void __init attach_pss(struct address_info *hw_config) +static int __init attach_pss(struct address_info *hw_config) { unsigned short id; char tmp[100]; @@ -697,10 +704,7 @@ devc->ad_mixer_dev = NO_WSS_MIXER; if (!probe_pss(hw_config)) - return; - - request_region(hw_config->io_base, 0x10, "PSS mixer, SB emulation"); - request_region(hw_config->io_base + 0x10, 0x9, "PSS config"); + return 0; id = inw(REG(PSS_ID)) & 0x00ff; @@ -714,17 +718,23 @@ if (sound_alloc_dma(hw_config->dma, "PSS")) { printk("pss.c: Can't allocate DMA channel.\n"); - return; + release_region(hw_config->io_base, 0x10); + release_region(hw_config->io_base+0x10, 0x9); + return 0; } if (!set_irq(devc, CONF_PSS, devc->irq)) { printk("PSS: IRQ allocation error.\n"); - return; + release_region(hw_config->io_base, 0x10); + release_region(hw_config->io_base+0x10, 0x9); + return 0; } if (!set_dma(devc, CONF_PSS, devc->dma)) { printk(KERN_ERR "PSS: DMA allocation error\n"); - return; + release_region(hw_config->io_base, 0x10); + release_region(hw_config->io_base+0x10, 0x9); + return 0; } #endif @@ -732,39 +742,38 @@ pss_initialized = 1; sprintf(tmp, "ECHO-PSS Rev. %d", id); conf_printf(tmp, hw_config); + return 1; } -int __init probe_pss_mpu(struct address_info *hw_config) +static int __init probe_pss_mpu(struct address_info *hw_config) { + struct resource *ports; int timeout; if (!pss_initialized) return 0; - if (check_region(hw_config->io_base, 2)) - { + ports = request_region(hw_config->io_base, 2, "mpu401"); + + if (!ports) { printk(KERN_ERR "PSS: MPU I/O port conflict\n"); return 0; } - if (!set_io_base(devc, CONF_MIDI, hw_config->io_base)) - { - printk(KERN_ERR "PSS: MIDI base could not be set.\n"); - return 0; + if (!set_io_base(devc, CONF_MIDI, hw_config->io_base)) { + printk(KERN_ERR "PSS: MIDI base could not be set.\n"); + goto fail; + } + if (!set_irq(devc, CONF_MIDI, hw_config->irq)) { + printk(KERN_ERR "PSS: MIDI IRQ allocation error.\n"); + goto fail; } - if (!set_irq(devc, CONF_MIDI, hw_config->irq)) - { - printk(KERN_ERR "PSS: MIDI IRQ allocation error.\n"); - return 0; - } - if (!pss_synthLen) - { + if (!pss_synthLen) { printk(KERN_ERR "PSS: Can't enable MPU. MIDI synth microcode not available.\n"); - return 0; + goto fail; } - if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) - { + if (!pss_download_boot(devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) { printk(KERN_ERR "PSS: Unable to load MIDI synth microcode to DSP.\n"); - return 0; + goto fail; } /* @@ -780,7 +789,16 @@ break; /* No more input */ } - return probe_mpu401(hw_config); + if (!probe_mpu401(hw_config, ports)) + goto fail; + + attach_mpu401(hw_config, THIS_MODULE); /* Slot 1 */ + if (hw_config->slots[1] != -1) /* The MPU driver installed itself */ + midi_devs[hw_config->slots[1]]->coproc = &pss_coproc_operations; + return 1; +fail: + release_region(hw_config->io_base, 2); + return 0; } static int pss_coproc_open(void *dev_info, int sub_device) @@ -1021,39 +1039,36 @@ &pss_data }; -static void __init attach_pss_mpu(struct address_info *hw_config) -{ - attach_mpu401(hw_config, THIS_MODULE); /* Slot 1 */ - if (hw_config->slots[1] != -1) /* The MPU driver installed itself */ - midi_devs[hw_config->slots[1]]->coproc = &pss_coproc_operations; -} - static int __init probe_pss_mss(struct address_info *hw_config) { volatile int timeout; + struct resource *ports; + int my_mix = -999; /* gcc shut up */ if (!pss_initialized) return 0; - if (check_region(hw_config->io_base, 8)) - { - printk(KERN_ERR "PSS: WSS I/O port conflicts.\n"); - return 0; + if (!request_region(hw_config->io_base, 4, "WSS config")) { + printk(KERN_ERR "PSS: WSS I/O port conflicts.\n"); + return 0; } - if (!set_io_base(devc, CONF_WSS, hw_config->io_base)) - { - printk("PSS: WSS base not settable.\n"); + ports = request_region(hw_config->io_base + 4, 4, "ad1848"); + if (!ports) { + printk(KERN_ERR "PSS: WSS I/O port conflicts.\n"); + release_region(hw_config->io_base, 4); return 0; } - if (!set_irq(devc, CONF_WSS, hw_config->irq)) - { + if (!set_io_base(devc, CONF_WSS, hw_config->io_base)) { + printk("PSS: WSS base not settable.\n"); + goto fail; + } + if (!set_irq(devc, CONF_WSS, hw_config->irq)) { printk("PSS: WSS IRQ allocation error.\n"); - return 0; + goto fail; } - if (!set_dma(devc, CONF_WSS, hw_config->dma)) - { + if (!set_dma(devc, CONF_WSS, hw_config->dma)) { printk(KERN_ERR "PSS: WSS DMA allocation error\n"); - return 0; + goto fail; } /* * For some reason the card returns 0xff in the WSS status register @@ -1071,13 +1086,9 @@ (timeout < 100000); timeout++) ; - return probe_ms_sound(hw_config); -} + if (!probe_ms_sound(hw_config, ports)) + goto fail; -static void __init attach_pss_mss(struct address_info *hw_config) -{ - int my_mix = -999; /* gcc shut up */ - devc->ad_mixer_dev = NO_WSS_MIXER; if (pss_mixer) { @@ -1088,11 +1099,11 @@ devc)) < 0) { printk(KERN_ERR "Could not install PSS mixer\n"); - return; + goto fail; } } pss_mixer_reset(devc); - attach_ms_sound(hw_config, THIS_MODULE); /* Slot 0 */ + attach_ms_sound(hw_config, ports, THIS_MODULE); /* Slot 0 */ if (hw_config->slots[0] != -1) { @@ -1104,6 +1115,11 @@ devc->ad_mixer_dev = audio_devs[hw_config->slots[0]]->mixer_dev; } } + return 1; +fail: + release_region(hw_config->io_base + 4, 4); + release_region(hw_config->io_base, 4); + return 0; } static inline void __exit unload_pss(struct address_info *hw_config) @@ -1185,6 +1201,8 @@ printk(KERN_INFO "PSS: loading in no sound mode.\n"); disable_all_emulations(); configure_nonsound_components(); + release_region(pss_io, 0x10); + release_region(pss_io + 0x10, 0x9); return 0; } @@ -1206,20 +1224,16 @@ fw_load = 1; pss_synthLen = mod_firmware_load(pss_firmware, (void *) &pss_synth); } - if (!probe_pss(&cfg)) + if (!attach_pss(&cfg)) return -ENODEV; - attach_pss(&cfg); /* * Attach stuff */ - if (probe_pss_mpu(&cfg_mpu)) { + if (probe_pss_mpu(&cfg_mpu)) pssmpu = 1; - attach_pss_mpu(&cfg_mpu); - } - if (probe_pss_mss(&cfg2)) { + + if (probe_pss_mss(&cfg2)) pssmss = 1; - attach_pss_mss(&cfg2); - } return 0; } diff -Nru a/sound/oss/sb_card.c b/sound/oss/sb_card.c --- a/sound/oss/sb_card.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/sb_card.c 2004-09-06 16:37:53 -07:00 @@ -100,7 +100,14 @@ /* OSS subsystem card registration shared by PnP and legacy routines */ static int sb_register_oss(struct sb_card_config *scc, struct sb_module_options *sbmo) { - if(!sb_dsp_detect(&scc->conf, 0, 0, sbmo)) { + if (!request_region(scc->conf.io_base, 16, "soundblaster")) { + printk(KERN_ERR "sb: ports busy.\n"); + kfree(scc); + return -EBUSY; + } + + if (!sb_dsp_detect(&scc->conf, 0, 0, sbmo)) { + release_region(scc->conf.io_base, 16); printk(KERN_ERR "sb: Failed DSP Detect.\n"); kfree(scc); return -ENODEV; diff -Nru a/sound/oss/sb_common.c b/sound/oss/sb_common.c --- a/sound/oss/sb_common.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/sb_common.c 2004-09-06 16:37:50 -07:00 @@ -520,13 +520,6 @@ */ DDB(printk("sb_dsp_detect(%x) entered\n", hw_config->io_base)); - if (check_region(hw_config->io_base, 16)) - { -#ifdef MODULE - printk(KERN_INFO "sb: I/O region in use.\n"); -#endif - return 0; - } devc->lock = SPIN_LOCK_UNLOCKED; devc->type = hw_config->card_subtype; @@ -668,6 +661,7 @@ if (devc->base != hw_config->io_base) { DDB(printk("I/O port mismatch\n")); + release_region(devc->base, 16); return 0; } /* @@ -689,6 +683,7 @@ if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0) { printk(KERN_ERR "SB: Can't allocate IRQ%d\n", hw_config->irq); + release_region(devc->base, 16); return 0; } devc->irq_ok = 0; @@ -697,6 +692,7 @@ if (!sb16_set_irq_hw(devc, devc->irq)) /* Unsupported IRQ */ { free_irq(devc->irq, devc); + release_region(devc->base, 16); return 0; } if ((devc->type == 0 || devc->type == MDL_ESS) && @@ -735,7 +731,6 @@ } } } /* IRQ setup */ - request_region(hw_config->io_base, 16, "soundblaster"); last_sb = devc; @@ -1224,17 +1219,22 @@ #if defined(CONFIG_SOUND_MPU401) if (devc->model == MDL_ESS) { - if (check_region(hw_config->io_base, 2)) - { + struct resource *ports; + ports = request_region(hw_config->io_base, 2, "mpu401"); + if (!ports) { printk(KERN_ERR "sbmpu: I/O port conflict (%x)\n", hw_config->io_base); return 0; } - if (!ess_midi_init(devc, hw_config)) + if (!ess_midi_init(devc, hw_config)) { + release_region(hw_config->io_base, 2); return 0; + } hw_config->name = "ESS1xxx MPU"; devc->midi_irq_cookie = NULL; - if (!probe_mpu401(hw_config)) + if (!probe_mpu401(hw_config, ports)) { + release_region(hw_config->io_base, 2); return 0; + } attach_mpu401(hw_config, owner); if (last_sb->irq == -hw_config->irq) last_sb->midi_irq_cookie=(void *)hw_config->slots[1]; diff -Nru a/sound/oss/sgalaxy.c b/sound/oss/sgalaxy.c --- a/sound/oss/sgalaxy.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/sgalaxy.c 2004-09-06 16:37:53 -07:00 @@ -86,19 +86,31 @@ static int __init probe_sgalaxy( struct address_info *ai ) { - if ( check_region( ai->io_base, 8 ) ) { + struct resource *ports; + int n; + + if (!request_region(ai->io_base, 4, "WSS config")) { printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base); return 0; } - - if ( ad1848_detect( ai->io_base+4, NULL, ai->osp ) ) - return probe_ms_sound(ai); /* The card is already active, check irq etc... */ - if ( check_region( ai->ai_sgbase, 0x10 ) ) { + ports = request_region(ai->io_base + 4, 4, "ad1848"); + if (!ports) { + printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base); + release_region(ai->io_base, 4); + return 0; + } + + if (!request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB")) { printk(KERN_ERR "sgalaxy: SB IO port 0x%03x not available\n", ai->ai_sgbase); + release_region(ai->io_base + 4, 4); + release_region(ai->io_base, 4); return 0; } + if (ad1848_detect(ports, NULL, ai->osp)) + goto out; /* The card is already active, check irq etc... */ + /* switch to MSS/WSS mode */ sb_rst( ai->ai_sgbase ); @@ -108,16 +120,15 @@ sleep( HZ/10 ); - return probe_ms_sound(ai); -} +out: + if (!probe_ms_sound(ai, ports)) { + release_region(ai->io_base + 4, 4); + release_region(ai->io_base, 4); + release_region(ai->ai_sgbase, 0x10); + return 0; + } -static void __init attach_sgalaxy( struct address_info *ai ) -{ - int n; - - request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB" ); - - attach_ms_sound(ai, THIS_MODULE); + attach_ms_sound(ai, ports, THIS_MODULE); n=ai->slots[0]; if (n!=-1 && audio_devs[n]->mixer_dev != -1 ) { @@ -125,6 +136,7 @@ AD1848_REROUTE( SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH ); /* FM+Wavetable*/ AD1848_REROUTE( SOUND_MIXER_LINE3, SOUND_MIXER_CD ); /* CD */ } + return 1; } static void __exit unload_sgalaxy( struct address_info *ai ) @@ -162,8 +174,6 @@ if ( probe_sgalaxy(&cfg) == 0 ) return -ENODEV; - - attach_sgalaxy(&cfg); return 0; } diff -Nru a/sound/oss/sscape.c b/sound/oss/sscape.c --- a/sound/oss/sscape.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/sscape.c 2004-09-06 16:37:53 -07:00 @@ -600,10 +600,10 @@ &adev_info }; -static int sscape_detected; +static struct resource *sscape_ports; static int sscape_is_pnp; -void __init attach_sscape(struct address_info *hw_config) +static void __init attach_sscape(struct address_info *hw_config) { #ifndef SSCAPE_REGS /* @@ -638,10 +638,6 @@ int i, irq_bits = 0xff; - if (sscape_detected != hw_config->io_base) - return; - - request_region(devc->base + 2, 6, "SoundScape"); if (old_hardware) { valid_interrupts = valid_interrupts_old; @@ -650,7 +646,7 @@ else conf_printf("Ensoniq SoundScape", hw_config); - for (i = 0; i < sizeof(valid_interrupts); i++) + for (i = 0; i < 4; i++) { if (hw_config->irq == valid_interrupts[i]) { @@ -661,45 +657,32 @@ if (hw_config->irq > 15 || (regs[4] = irq_bits == 0xff)) { printk(KERN_ERR "Invalid IRQ%d\n", hw_config->irq); + release_region(devc->base, 2); + release_region(devc->base + 2, 6); + if (sscape_is_pnp) + release_region(devc->codec, 2); return; } if (!sscape_is_pnp) { spin_lock_irqsave(&devc->lock,flags); - for (i = 1; i < 10; i++) - { - switch (i) - { - case 1: /* Host interrupt enable */ - sscape_write(devc, i, 0xf0); /* All interrupts enabled */ - break; - - case 2: /* DMA A status/trigger register */ - case 3: /* DMA B status/trigger register */ - sscape_write(devc, i, 0x20); /* DMA channel disabled */ - break; - - case 4: /* Host interrupt config reg */ - sscape_write(devc, i, 0xf0 | (irq_bits << 2) | irq_bits); - break; - - case 5: /* Don't destroy CD-ROM DMA config bits (0xc0) */ - sscape_write(devc, i, (regs[i] & 0x3f) | (sscape_read(devc, i) & 0xc0)); - break; - - case 6: /* CD-ROM config (WSS codec actually) */ - sscape_write(devc, i, regs[i]); - break; - - case 9: /* Master control reg. Don't modify CR-ROM bits. Disable SB emul */ - sscape_write(devc, i, (sscape_read(devc, i) & 0xf0) | 0x08); - break; - - default: - sscape_write(devc, i, regs[i]); - } - } + /* Host interrupt enable */ + sscape_write(devc, 1, 0xf0); /* All interrupts enabled */ + /* DMA A status/trigger register */ + sscape_write(devc, 2, 0x20); /* DMA channel disabled */ + /* DMA B status/trigger register */ + sscape_write(devc, 3, 0x20); /* DMA channel disabled */ + /* Host interrupt config reg */ + sscape_write(devc, 4, 0xf0 | (irq_bits << 2) | irq_bits); + /* Don't destroy CD-ROM DMA config bits (0xc0) */ + sscape_write(devc, 5, (regs[5] & 0x3f) | (sscape_read(devc, 5) & 0xc0)); + /* CD-ROM config (WSS codec actually) */ + sscape_write(devc, 6, regs[6]); + sscape_write(devc, 7, regs[7]); + sscape_write(devc, 8, regs[8]); + /* Master control reg. Don't modify CR-ROM bits. Disable SB emul */ + sscape_write(devc, 9, (sscape_read(devc, 9) & 0xf0) | 0x08); spin_unlock_irqrestore(&devc->lock,flags); } #ifdef SSCAPE_DEBUG2 @@ -715,7 +698,7 @@ } #endif - if (probe_mpu401(hw_config)) + if (probe_mpu401(hw_config, sscape_ports)) hw_config->always_detect = 1; hw_config->name = "SoundScape"; @@ -739,9 +722,6 @@ DDB(printk("Entered Soundscape detect_ga(%x)\n", devc->base)); - if (check_region(devc->base, 8)) - return 0; - /* * First check that the address register of "ODIE" is * there and that it has exactly 4 writable bits. @@ -1115,9 +1095,9 @@ sscape_write( devc, 9, i | 3 ); sscape_write( devc, 3, 0x40); - if (check_region(0x228, 1)) { - outb(0, 0x228); - release_region(0x228,1); + if (request_region(0x228, 1, "sscape setup junk")) { + outb(0, 0x228); + release_region(0x228,1); } sscape_write( devc, 3, (devc -> dma << 4) | 0x80); sscape_write( devc, 9, i ); @@ -1134,50 +1114,46 @@ DDB(printk("Entered detect_sscape_pnp(%x)\n", devc->base)); - if (check_region(devc->base, 8)) { - printk(KERN_ERR "detect_sscape_pnp: port %x is not free\n", devc->base); - return 0; - } - - if (check_region(devc->codec, 2)) { + if (!request_region(devc->codec, 2, "sscape codec")) { printk(KERN_ERR "detect_sscape_pnp: port %x is not free\n", devc->codec); return 0; } - if ( (inb( devc -> base + 2) & 0x78) != 0) return 0; + if ((inb(devc->base + 2) & 0x78) != 0) + goto fail; d = inb ( devc -> base + 4) & 0xF0; - if ( (d & 0x80) != 0) return 0; + if (d & 0x80) + goto fail; if (d == 0) { - devc->codec_type = 1; - devc->ic_type = IC_ODIE; - } - else if ( (d & 0x60) != 0) { - devc->codec_type = 2; - devc->ic_type = IC_OPUS; - } - else if ( (d & 0x40) != 0) { - devc->codec_type = 2; - devc->ic_type = IC_ODIE; - } - else return 0; + devc->codec_type = 1; + devc->ic_type = IC_ODIE; + } else if ( (d & 0x60) != 0) { + devc->codec_type = 2; + devc->ic_type = IC_OPUS; + } else if ( (d & 0x40) != 0) { /* WTF? */ + devc->codec_type = 2; + devc->ic_type = IC_ODIE; + } else + goto fail; sscape_is_pnp = 1; outb(0xFA, devc -> base+4); if ((inb( devc -> base+4) & 0x9F) != 0x0A) - return 0; + goto fail; outb(0xFE, devc -> base+4); if ( (inb(devc -> base+4) & 0x9F) != 0x0E) - return 0; + goto fail; if ( (inb(devc -> base+5) & 0x9F) != 0x0E) - return 0; + goto fail; if (devc->codec_type == 2) { - if (devc -> codec != devc -> base + 8) + if (devc->codec != devc->base + 8) { printk("soundscape warning: incorrect codec port specified\n"); - devc -> codec = devc -> base + 8; + goto fail; + } d = 0x10 | (sscape_read(devc, 9) & 0xCF); sscape_write(devc, 9, d); sscape_write(devc, 6, 0x80); @@ -1193,9 +1169,9 @@ d = inb(devc -> codec); if (d & 0x80) - return 0; + goto fail; if ( inb(devc -> codec + 2) == 0xFF) - return 0; + goto fail; sscape_write(devc, 9, sscape_read(devc, 9) & 0x3F ); @@ -1217,7 +1193,7 @@ sscape_pnp_init_hw(devc); - for (i = 0; i < sizeof(valid_interrupts); i++) + for (i = 0; i < 4; i++) { if (devc->codec_irq == valid_interrupts[i]) { irq_bits = i; @@ -1234,15 +1210,14 @@ sscape_pnp_write_codec( devc, 0, sscape_pnp_read_codec( devc, 0) | 0x20); sscape_pnp_write_codec( devc, 0, sscape_pnp_read_codec( devc, 1) | 0x20); - return 1; + return 1; +fail: + release_region(devc->codec, 2); + return 0; } static int __init probe_sscape(struct address_info *hw_config) { - - if (sscape_detected != 0 && sscape_detected != hw_config->io_base) - return 0; - devc->base = hw_config->io_base; devc->irq = hw_config->irq; devc->dma = hw_config->dma; @@ -1262,12 +1237,21 @@ #endif devc->failed = 1; + sscape_ports = request_region(devc->base, 2, "mpu401"); + if (!sscape_ports) + return 0; + + if (!request_region(devc->base + 2, 6, "SoundScape")) { + release_region(devc->base, 2); + return 0; + } + if (!detect_ga(devc)) { - if (detect_sscape_pnp(devc)) { - sscape_detected = hw_config->io_base; + if (detect_sscape_pnp(devc)) return 1; - } - else return 0; + release_region(devc->base, 2); + release_region(devc->base + 2, 6); + return 0; } if (old_hardware) /* Check that it's really an old Spea/Reveal card. */ @@ -1282,14 +1266,14 @@ inb(devc->base + ODIE_ADDR); } } - sscape_detected = hw_config->io_base; return 1; } -static int __init probe_ss_ms_sound(struct address_info *hw_config) +static int __init init_ss_ms_sound(struct address_info *hw_config) { int i, irq_bits = 0xff; int ad_flags = 0; + struct resource *ports; if (devc->failed) { @@ -1301,7 +1285,7 @@ printk(KERN_ERR "soundscape: Invalid initialization order.\n"); return 0; } - for (i = 0; i < sizeof(valid_interrupts); i++) + for (i = 0; i < 4; i++) { if (hw_config->irq == valid_interrupts[i]) { @@ -1309,37 +1293,27 @@ break; } } - if (hw_config->irq > 15 || irq_bits == 0xff) - { + if (irq_bits == 0xff) { printk(KERN_ERR "soundscape: Invalid MSS IRQ%d\n", hw_config->irq); return 0; } - if (!sscape_is_pnp) { - if (old_hardware) - ad_flags = 0x12345677; /* Tell that we may have a CS4248 chip (Spea-V7 Media FX) */ - return ad1848_detect(hw_config->io_base, &ad_flags, hw_config->osp); - } - else { - if (old_hardware) - ad_flags = 0x12345677; /* Tell that we may have a CS4248 chip (Spea-V7 Media FX) */ - else - ad_flags = 0x87654321; /* Tell that we have a soundscape pnp with 1845 chip */ - return ad1848_detect(hw_config->io_base, &ad_flags, hw_config->osp); - } -} + if (old_hardware) + ad_flags = 0x12345677; /* Tell that we may have a CS4248 chip (Spea-V7 Media FX) */ + else if (sscape_is_pnp) + ad_flags = 0x87654321; /* Tell that we have a soundscape pnp with 1845 chip */ -static void __init attach_ss_ms_sound(struct address_info *hw_config) -{ - /* - * This routine configures the SoundScape card for use with the - * Win Sound System driver. The AD1848 codec interface uses the CD-ROM - * config registers of the "ODIE". - */ + ports = request_region(hw_config->io_base, 4, "ad1848"); + if (!ports) { + printk(KERN_ERR "soundscape: ports busy\n"); + return 0; + } - int i, irq_bits = 0xff; + if (!ad1848_detect(ports, &ad_flags, hw_config->osp)) { + release_region(hw_config->io_base, 4); + return 0; + } - if (!sscape_is_pnp) /*pnp is already setup*/ { /* @@ -1355,14 +1329,6 @@ /* * Init the AD1848 (CD-ROM) config reg. */ - for (i = 0; i < sizeof(valid_interrupts); i++) - { - if (hw_config->irq == valid_interrupts[i]) - { - irq_bits = i; - break; - } - } sscape_write(devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) | (irq_bits << 1)); } @@ -1371,7 +1337,7 @@ hw_config->slots[0] = ad1848_init( sscape_is_pnp ? "SoundScape" : "SoundScape PNP", - hw_config->io_base, + ports, hw_config->irq, hw_config->dma, hw_config->dma, @@ -1402,13 +1368,15 @@ printk("I%d = %02x\n", i, sscape_read(devc, i)); } #endif - + return 1; } static void __exit unload_sscape(struct address_info *hw_config) { release_region(devc->base + 2, 6); unload_mpu401(hw_config); + if (sscape_is_pnp) + release_region(devc->codec, 2); } static void __exit unload_ss_ms_sound(struct address_info *hw_config) @@ -1480,10 +1448,7 @@ attach_sscape(&cfg_mpu); - mss = probe_ss_ms_sound(&cfg); - - if (mss) - attach_ss_ms_sound(&cfg); + mss = init_ss_ms_sound(&cfg); return 0; } diff -Nru a/sound/oss/trix.c b/sound/oss/trix.c --- a/sound/oss/trix.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/trix.c 2004-09-06 16:37:50 -07:00 @@ -29,12 +29,6 @@ #include "trix_boot.h" -static int kilroy_was_here; /* Don't detect twice */ -static int sb_initialized; -static int mpu_initialized; - -static int *trix_osp; - static int mpu; static int joystick; @@ -82,20 +76,11 @@ { unsigned char addr_bits; - if (check_region(0x390, 2)) - { - printk(KERN_ERR "AudioTrix: Config port I/O conflict\n"); - return 0; - } - if (kilroy_was_here) /* Already initialized */ - return 0; - if (trix_read(0x15) != 0x71) /* No ASIC signature */ { MDB(printk(KERN_ERR "No AudioTrix ASIC signature found\n")); return 0; } - kilroy_was_here = 1; /* * Reset some registers. @@ -135,107 +120,114 @@ * AudioTrix Pro */ -static int __init probe_trix_wss(struct address_info *hw_config) +static int __init init_trix_wss(struct address_info *hw_config) { + static unsigned char dma_bits[4] = { + 1, 2, 0, 3 + }; + struct resource *ports; + int config_port = hw_config->io_base + 0; + int dma1 = hw_config->dma, dma2 = hw_config->dma2; + int old_num_mixers = num_mixers; + u8 config, bits; int ret; + + switch(hw_config->irq) { + case 7: + bits = 8; + break; + case 9: + bits = 0x10; + break; + case 10: + bits = 0x18; + break; + case 11: + bits = 0x20; + break; + default: + printk(KERN_ERR "AudioTrix: Bad WSS IRQ %d\n", hw_config->irq); + return 0; + } + + switch (dma1) { + case 0: + case 1: + case 3: + break; + default: + printk(KERN_ERR "AudioTrix: Bad WSS DMA %d\n", dma1); + return 0; + } + + switch (dma2) { + case -1: + case 0: + case 1: + case 3: + break; + default: + printk(KERN_ERR "AudioTrix: Bad capture DMA %d\n", dma2); + return 0; + } /* * Check if the IO port returns valid signature. The original MS Sound * system returns 0x04 while some cards (AudioTrix Pro for example) * return 0x00. */ - if (check_region(hw_config->io_base, 8)) - { + ports = request_region(hw_config->io_base + 4, 4, "ad1848"); + if (!ports) { printk(KERN_ERR "AudioTrix: MSS I/O port conflict (%x)\n", hw_config->io_base); return 0; } - trix_osp = hw_config->osp; - if (!trix_set_wss_port(hw_config)) + if (!request_region(hw_config->io_base, 4, "MSS config")) { + printk(KERN_ERR "AudioTrix: MSS I/O port conflict (%x)\n", hw_config->io_base); + release_region(hw_config->io_base + 4, 4); return 0; + } + + if (!trix_set_wss_port(hw_config)) + goto fail; - if ((inb(hw_config->io_base + 3) & 0x3f) != 0x00) + config = inb(hw_config->io_base + 3); + + if ((config & 0x3f) != 0x00) { MDB(printk(KERN_ERR "No MSS signature detected on port 0x%x\n", hw_config->io_base)); - return 0; - } - if (hw_config->irq > 11) - { - printk(KERN_ERR "AudioTrix: Bad WSS IRQ %d\n", hw_config->irq); - return 0; - } - if (hw_config->dma != 0 && hw_config->dma != 1 && hw_config->dma != 3) - { - printk(KERN_ERR "AudioTrix: Bad WSS DMA %d\n", hw_config->dma); - return 0; + goto fail; } - if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma) - if (hw_config->dma2 != 0 && hw_config->dma2 != 1 && hw_config->dma2 != 3) - { - printk(KERN_ERR "AudioTrix: Bad capture DMA %d\n", hw_config->dma2); - return 0; - } + /* * Check that DMA0 is not in use with a 8 bit board. */ - if (hw_config->dma == 0 && inb(hw_config->io_base + 3) & 0x80) + if (dma1 == 0 && config & 0x80) { printk(KERN_ERR "AudioTrix: Can't use DMA0 with a 8 bit card slot\n"); - return 0; + goto fail; } - if (hw_config->irq > 7 && hw_config->irq != 9 && inb(hw_config->io_base + 3) & 0x80) + if (hw_config->irq > 9 && config & 0x80) { printk(KERN_ERR "AudioTrix: Can't use IRQ%d with a 8 bit card slot\n", hw_config->irq); - return 0; - } - ret = ad1848_detect(hw_config->io_base + 4, NULL, hw_config->osp); - - if (ret) - { - if(joystick==1) - trix_write(0x15, 0x80); - request_region(0x390, 2, "AudioTrix"); + goto fail; } - return ret; -} -static void __init attach_trix_wss(struct address_info *hw_config) -{ - static unsigned char interrupt_bits[12] = { - 0, 0, 0, 0, 0, 0, 0, 0x08, 0, 0x10, 0x18, 0x20 - }; - char bits; + ret = ad1848_detect(ports, NULL, hw_config->osp); + if (!ret) + goto fail; - static unsigned char dma_bits[4] = { - 1, 2, 0, 3 - }; + if (joystick==1) + trix_write(0x15, 0x80); - int config_port = hw_config->io_base + 0; - int dma1 = hw_config->dma, dma2 = hw_config->dma2; - int old_num_mixers = num_mixers; - - trix_osp = hw_config->osp; - - if (!kilroy_was_here) - { - DDB(printk("AudioTrix: Attach called but not probed yet???\n")); - return; - } - /* * Set the IRQ and DMA addresses. */ - bits = interrupt_bits[hw_config->irq]; - if (bits == 0) - { - printk("AudioTrix: Bad IRQ (%d)\n", hw_config->irq); - return; - } outb((bits | 0x40), config_port); - if (hw_config->dma2 == -1 || hw_config->dma2 == hw_config->dma) + if (dma2 == -1 || dma2 == dma1) { bits |= dma_bits[dma1]; dma2 = dma1; @@ -253,14 +245,13 @@ outb((bits), config_port); /* Write IRQ+DMA setup */ - hw_config->slots[0] = ad1848_init("AudioTrix Pro", hw_config->io_base + 4, + hw_config->slots[0] = ad1848_init("AudioTrix Pro", ports, hw_config->irq, dma1, dma2, 0, hw_config->osp, THIS_MODULE); - request_region(hw_config->io_base, 4, "MSS config"); if (num_mixers > old_num_mixers) /* Mixer got installed */ { @@ -269,6 +260,12 @@ AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_SYNTH); /* OPL4 */ AD1848_REROUTE(SOUND_MIXER_SPEAKER, SOUND_MIXER_ALTPCM); /* SB */ } + return 1; + +fail: + release_region(hw_config->io_base, 4); + release_region(hw_config->io_base + 4, 4); + return 0; } static int __init probe_trix_sb(struct address_info *hw_config) @@ -276,6 +273,8 @@ int tmp; unsigned char conf; + extern int sb_be_quiet; + int old_quiet; static signed char irq_translate[] = { -1, -1, -1, 0, 1, 2, -1, 3 }; @@ -283,17 +282,6 @@ if (trix_boot_len == 0) return 0; /* No boot code -> no fun */ - if (!kilroy_was_here) - return 0; /* AudioTrix Pro has not been detected earlier */ - - if (sb_initialized) - return 0; - - if (check_region(hw_config->io_base, 16)) - { - printk(KERN_ERR "AudioTrix: SB I/O port conflict (%x)\n", hw_config->io_base); - return 0; - } if ((hw_config->io_base & 0xffffff8f) != 0x200) return 0; @@ -307,6 +295,11 @@ if (tmp != 1 && tmp != 3) return 0; + if (!request_region(hw_config->io_base, 16, "soundblaster")) { + printk(KERN_ERR "AudioTrix: SB I/O port conflict (%x)\n", hw_config->io_base); + return 0; + } + conf = 0x84; /* DMA and IRQ enable */ conf |= hw_config->io_base & 0x70; /* I/O address bits */ conf |= irq_translate[hw_config->irq]; @@ -315,16 +308,12 @@ trix_write(0x1b, conf); download_boot(hw_config->io_base); - sb_initialized = 1; hw_config->name = "AudioTrix SB"; - return sb_dsp_detect(hw_config, 0, 0, NULL); -} - -static void __init attach_trix_sb(struct address_info *hw_config) -{ - extern int sb_be_quiet; - int old_quiet; + if (!sb_dsp_detect(hw_config, 0, 0, NULL)) { + release_region(hw_config->io_base, 16); + return 0; + } hw_config->driver_use_1 = SB_NO_MIDI | SB_NO_MIXER | SB_NO_RECORDING; @@ -335,6 +324,7 @@ sb_dsp_init(hw_config, THIS_MODULE); sb_be_quiet = old_quiet; + return 1; } static int __init probe_trix_mpu(struct address_info *hw_config) @@ -344,21 +334,6 @@ -1, -1, -1, 1, 2, 3, -1, 4, -1, 5 }; - if (!kilroy_was_here) - { - DDB(printk("Trix: WSS and SB modes must be initialized before MPU\n")); - return 0; /* AudioTrix Pro has not been detected earlier */ - } - if (!sb_initialized) - { - DDB(printk("Trix: SB mode must be initialized before MPU\n")); - return 0; - } - if (mpu_initialized) - { - DDB(printk("Trix: MPU mode already initialized\n")); - return 0; - } if (hw_config->irq > 9) { printk(KERN_ERR "AudioTrix: Bad MPU IRQ %d\n", hw_config->irq); @@ -389,7 +364,6 @@ conf |= irq_bits[hw_config->irq] << 4; trix_write(0x19, (trix_read(0x19) & 0x83) | conf); - mpu_initialized = 1; hw_config->name = "AudioTrix Pro"; return probe_uart401(hw_config, THIS_MODULE); } @@ -485,9 +459,16 @@ trix_boot_len = mod_firmware_load("/etc/sound/trxpro.bin", (char **) &trix_boot); } - if (!probe_trix_wss(&cfg)) + + if (!request_region(0x390, 2, "AudioTrix")) { + printk(KERN_ERR "AudioTrix: Config port I/O conflict\n"); + return -ENODEV; + } + + if (!init_trix_wss(&cfg)) { + release_region(0x390, 2); return -ENODEV; - attach_trix_wss(&cfg); + } /* * We must attach in the right order to get the firmware @@ -496,8 +477,6 @@ if (cfg2.io_base != -1) { sb = probe_trix_sb(&cfg2); - if (sb) - attach_trix_sb(&cfg2); } if (cfg_mpu.io_base != -1) diff -Nru a/sound/oss/v_midi.c b/sound/oss/v_midi.c --- a/sound/oss/v_midi.c 2004-09-06 16:37:51 -07:00 +++ b/sound/oss/v_midi.c 2004-09-06 16:37:51 -07:00 @@ -90,11 +90,12 @@ static int v_midi_out (int dev, unsigned char midi_byte) { vmidi_devc *devc = midi_devs[dev]->devc; - vmidi_devc *pdevc = midi_devs[devc->pair_mididev]->devc; + vmidi_devc *pdevc; if (devc == NULL) - return -(ENXIO); + return -ENXIO; + pdevc = midi_devs[devc->pair_mididev]->devc; if (pdevc->input_opened > 0){ if (MIDIbuf_avail(pdevc->my_mididev) > 500) return 0; diff -Nru a/sound/oss/waveartist.c b/sound/oss/waveartist.c --- a/sound/oss/waveartist.c 2004-09-06 16:37:55 -07:00 +++ b/sound/oss/waveartist.c 2004-09-06 16:37:55 -07:00 @@ -1346,18 +1346,20 @@ return 0; } - if (check_region(hw_config->io_base, 15)) { + if (!request_region(hw_config->io_base, 15, hw_config->name)) { printk(KERN_WARNING "WaveArtist: I/O port conflict\n"); return 0; } if (hw_config->irq > 15 || hw_config->irq < 0) { + release_region(hw_config->io_base, 15); printk(KERN_WARNING "WaveArtist: Bad IRQ %d\n", hw_config->irq); return 0; } if (hw_config->dma != 3) { + release_region(hw_config->io_base, 15); printk(KERN_WARNING "WaveArtist: Bad DMA %d\n", hw_config->dma); return 0; @@ -1391,8 +1393,6 @@ if (hw->dma != hw->dma2 && hw->dma2 != NO_DMA) devc->audio_flags |= DMA_DUPLEX; - - request_region(hw->io_base, 15, devc->hw.name); devc->mix = mix; devc->dev_no = waveartist_init(devc); diff -Nru a/sound/oss/wavfront.c b/sound/oss/wavfront.c --- a/sound/oss/wavfront.c 2004-09-06 16:37:53 -07:00 +++ b/sound/oss/wavfront.c 2004-09-06 16:37:53 -07:00 @@ -1402,7 +1402,7 @@ num_samples = (1 << log_ns[0]); for (i = 0; i < num_samples; i++) { - char d[2]; + s8 d[2]; if ((d[0] = wavefront_read ()) == -1) { printk (KERN_ERR LOGNAME "upload multisample failed " @@ -2961,8 +2961,8 @@ if (i != cnt) { printk (KERN_WARNING LOGNAME "FX memset " - "(0x%x, 0x%x, 0x%x, %d) incomplete\n", - page, addr, (int) data, cnt); + "(0x%x, 0x%x, %p, %d) incomplete\n", + page, addr, data, cnt); return -(EIO); } } diff -Nru a/sound/oss/wf_midi.c b/sound/oss/wf_midi.c --- a/sound/oss/wf_midi.c 2004-09-06 16:37:50 -07:00 +++ b/sound/oss/wf_midi.c 2004-09-06 16:37:50 -07:00 @@ -784,7 +784,7 @@ int __init detect_wf_mpu (int irq, int io_base) { - if (check_region (io_base, 2)) { + if (!request_region(io_base, 2, "wavefront midi")) { printk (KERN_WARNING "WF-MPU: I/O port %x already in use.\n", io_base); return -1; @@ -803,11 +803,10 @@ if ((phys_dev->devno = sound_alloc_mididev()) < 0){ printk (KERN_ERR "WF-MPU: Too many MIDI devices detected.\n"); + release_region(phys_dev->base, 2); return -1; - } - request_region (phys_dev->base, 2, "wavefront midi"); phys_dev->isvirtual = 0; if (config_wf_mpu (phys_dev)) { diff -Nru a/sound/parisc/harmony.c b/sound/parisc/harmony.c --- a/sound/parisc/harmony.c 2004-09-06 16:37:52 -07:00 +++ b/sound/parisc/harmony.c 2004-09-06 16:37:52 -07:00 @@ -80,8 +80,7 @@ MODULE_AUTHOR("Laurent Canet "); MODULE_DESCRIPTION("ALSA Harmony sound driver"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ALSA,Harmony soundcard}}"); +MODULE_SUPPORTED_DEVICE("{{ALSA,Harmony soundcard}}"); #undef DEBUG #ifdef DEBUG @@ -138,13 +137,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); /* Register offset (from base hpa) */ #define REG_ID 0x00 @@ -216,7 +212,6 @@ snd_pcm_substream_t *capture_substream; snd_info_entry_t *proc_entry; } snd_card_harmony_t; -#define chip_t snd_card_harmony_t static snd_card_t *snd_harmony_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; @@ -243,10 +238,8 @@ 44100, 48000 }; -#define RATES sizeof(snd_card_harmony_rates) / sizeof(snd_card_harmony_rates[0]) - static snd_pcm_hw_constraint_list_t hw_constraint_rates = { - .count = RATES, + .count = ARRAY_SIZE(snd_card_harmony_rates), .list = snd_card_harmony_rates, .mask = 0, }; @@ -283,7 +276,7 @@ { unsigned int idx; - for (idx = 0; idx <= RATES; idx++) + for (idx = 0; idx <= ARRAY_SIZE(snd_card_harmony_rates); idx++) if (snd_card_harmony_rates[idx] == rate) return rate_bits[idx]; return HARMONY_SR_44KHZ; /* fallback */ @@ -751,6 +744,8 @@ int err; err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + if (err > 0 && substream->dma_device.type == SNDRV_DMA_TYPE_CONTINUOUS) + substream->runtime->dma_addr = __pa(substream->runtime->dma_area); DPRINTK(KERN_INFO PFX "HW Params returned %d, dma_addr %lx\n", err, (unsigned long)substream->runtime->dma_addr); return err; @@ -784,7 +779,7 @@ .pointer = snd_card_harmony_capture_pointer, }; -static int snd_card_harmony_pcm_init(snd_card_harmony_t *harmony, int device) +static int snd_card_harmony_pcm_init(snd_card_harmony_t *harmony) { snd_pcm_t *pcm; int err; @@ -797,7 +792,7 @@ snd_harmony_disable_interrupts(harmony); - if ((err = snd_pcm_new(harmony->card, "Harmony", device, 1, 1, &pcm)) < 0) + if ((err = snd_pcm_new(harmony->card, "Harmony", 0, 1, 1, &pcm)) < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_harmony_playback_ops); @@ -811,28 +806,54 @@ /* initialize graveyard buffer */ harmony->dma_dev.type = SNDRV_DMA_TYPE_DEV; harmony->dma_dev.dev = &harmony->pa_dev->dev; - err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*GRAVEYARD_BUFS, + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*GRAVEYARD_BUFS, &harmony->graveyard_dma); - if (err < 0) + if (err == -ENOMEM) { + /* use continuous buffers */ + harmony->dma_dev.type = SNDRV_DMA_TYPE_CONTINUOUS; + harmony->dma_dev.dev = snd_dma_continuous_data(GFP_KERNEL); + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*GRAVEYARD_BUFS, + &harmony->graveyard_dma); + } + if (err < 0) { + printk(KERN_ERR PFX "can't allocate graveyard buffer\n"); return err; + } harmony->graveyard_count = 0; /* initialize silence buffers */ - err = snd_dma_alloc_pages(&harmony->dma_dev, HARMONY_BUF_SIZE*SILENCE_BUFS, + err = snd_dma_alloc_pages(harmony->dma_dev.type, + harmony->dma_dev.dev, + HARMONY_BUF_SIZE*SILENCE_BUFS, &harmony->silence_dma); - if (err < 0) + if (err < 0) { + printk(KERN_ERR PFX "can't allocate silence buffer\n"); return err; + } harmony->silence_count = 0; + if (harmony->dma_dev.type == SNDRV_DMA_TYPE_CONTINUOUS) { + harmony->graveyard_dma.addr = __pa(harmony->graveyard_dma.area); + harmony->silence_dma.addr = __pa(harmony->silence_dma.area); + } + harmony->ply_stopped = harmony->cap_stopped = 1; harmony->playback_substream = NULL; harmony->capture_substream = NULL; harmony->graveyard_count = 0; - - snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - &harmony->pa_dev->dev, - MAX_BUFFER_SIZE, MAX_BUFFER_SIZE); + + err = snd_pcm_lib_preallocate_pages_for_all(pcm, harmony->dma_dev.type, + harmony->dma_dev.dev, + MAX_BUFFER_SIZE, MAX_BUFFER_SIZE); + if (err < 0) { + printk(KERN_ERR PFX "buffer allocation error %d\n", err); + // return err; + } return 0; } @@ -871,7 +892,7 @@ static int snd_harmony_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_harmony_t *harmony = _snd_kcontrol_chip(kcontrol); + snd_card_harmony_t *harmony = snd_kcontrol_chip(kcontrol); int shift_left = (kcontrol->private_value) & 0xff; int shift_right = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; @@ -896,7 +917,7 @@ static int snd_harmony_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - snd_card_harmony_t *harmony = _snd_kcontrol_chip(kcontrol); + snd_card_harmony_t *harmony = snd_kcontrol_chip(kcontrol); int shift_left = (kcontrol->private_value) & 0xff; int shift_right = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; @@ -1037,7 +1058,7 @@ snd_card_free(card); return err; } - if ((err = snd_card_harmony_pcm_init(chip, dev)) < 0) { + if ((err = snd_card_harmony_pcm_init(chip)) < 0) { printk(KERN_ERR PFX "PCM Init failed\n"); snd_card_free(card); return err; diff -Nru a/sound/pci/Kconfig b/sound/pci/Kconfig --- a/sound/pci/Kconfig 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/Kconfig 2004-09-06 16:37:52 -07:00 @@ -22,6 +22,14 @@ help Say 'Y' or 'M' to include support for ATI IXP 150/200/250/300 AC97 controller. +config SND_ATIIXP_MODEM + tristate "ATI IXP 150/200/250 Modem" + depends on SND + select SND_AC97_CODEC + help + Say 'Y' or 'M' to include support for ATI IXP 150/200/250 AC97 modem + controller. + config SND_AU8810 tristate "Aureal Advantage" depends on SND @@ -290,12 +298,12 @@ SiS 7012, AMD768/8111, NVidia NForce and ALi 5455 chips. config SND_INTEL8X0M - tristate "Intel i8x0/MX440; AMD768/8111 modems (EXPERIMENTAL)" + tristate "Intel i8x0/MX440; SiS 7013; NForce; AMD768/8111 modems (EXPERIMENTAL)" depends on SND && EXPERIMENTAL select SND_AC97_CODEC help - Say 'Y' or 'M' to include support for Intel8x0 and AMD768/8111 based - modems. + Say 'Y' or 'M' to include support for Intel8x0, SiS 7013, NVidia NForce + and AMD768/8111 based modems. config SND_SONICVIBES tristate "S3 SonicVibes" diff -Nru a/sound/pci/Makefile b/sound/pci/Makefile --- a/sound/pci/Makefile 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/Makefile 2004-09-06 16:37:50 -07:00 @@ -5,6 +5,7 @@ snd-als4000-objs := als4000.o snd-atiixp-objs := atiixp.o +snd-atiixp-modem-objs := atiixp_modem.o snd-azt3328-objs := azt3328.o snd-bt87x-objs := bt87x.o snd-cmipci-objs := cmipci.o @@ -25,6 +26,7 @@ # Toplevel Module Dependency obj-$(CONFIG_SND_ALS4000) += snd-als4000.o obj-$(CONFIG_SND_ATIIXP) += snd-atiixp.o +obj-$(CONFIG_SND_ATIIXP_MODEM) += snd-atiixp-modem.o obj-$(CONFIG_SND_AZT3328) += snd-azt3328.o obj-$(CONFIG_SND_BT87X) += snd-bt87x.o obj-$(CONFIG_SND_CMIPCI) += snd-cmipci.o diff -Nru a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c --- a/sound/pci/ac97/ac97_codec.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/ac97/ac97_codec.c 2004-09-06 16:37:52 -07:00 @@ -45,9 +45,6 @@ module_param(enable_loopback, bool, 0444); MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control"); -MODULE_PARM_SYNTAX(enable_loopback, SNDRV_BOOLEAN_FALSE_DESC); - -#define chip_t ac97_t /* @@ -108,12 +105,13 @@ { 0x41445375, 0xffffffff, "AD1985", patch_ad1985, NULL }, { 0x414c4300, 0xffffff00, "ALC100/100P", NULL, NULL }, { 0x414c4710, 0xfffffff0, "ALC200/200P", NULL, NULL }, +{ 0x414c4721, 0xffffffff, "ALC650D", NULL, NULL }, /* already patched */ +{ 0x414c4722, 0xffffffff, "ALC650E", NULL, NULL }, /* already patched */ +{ 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */ { 0x414c4720, 0xfffffff0, "ALC650", patch_alc650, NULL }, -{ 0x414c4721, 0xfffffff0, "ALC650D", patch_alc650, NULL }, -{ 0x414c4722, 0xfffffff0, "ALC650E", patch_alc650, NULL }, -{ 0x414c4723, 0xfffffff0, "ALC650F", patch_alc650, NULL }, { 0x414c4760, 0xfffffff0, "ALC655", patch_alc655, NULL }, { 0x414c4780, 0xfffffff0, "ALC658", patch_alc655, NULL }, +{ 0x414c4790, 0xfffffff0, "ALC850", patch_alc850, NULL }, { 0x414c4730, 0xffffffff, "ALC101", NULL, NULL }, { 0x414c4740, 0xfffffff0, "ALC202", NULL, NULL }, { 0x414c4750, 0xfffffff0, "ALC250", NULL, NULL }, @@ -214,6 +212,13 @@ }; /* + * Shared AC97 controllers (ICH, ATIIXP...) + */ +static DECLARE_MUTEX(shared_codec_mutex); +static ac97_t *shared_codec[AC97_SHARED_TYPES][4]; + + +/* * I/O routines */ @@ -274,12 +279,12 @@ { if (!snd_ac97_valid_reg(ac97, reg)) return; - if ((ac97->id & 0xffffff00) == 0x414c4300) { + if ((ac97->id & 0xffffff00) == AC97_ID_ALC100) { /* Fix H/W bug of ALC100/100P */ if (reg == AC97_MASTER || reg == AC97_HEADPHONE) - ac97->bus->write(ac97, AC97_RESET, 0); /* reset audio codec */ + ac97->bus->ops->write(ac97, AC97_RESET, 0); /* reset audio codec */ } - ac97->bus->write(ac97, reg, value); + ac97->bus->ops->write(ac97, reg, value); } /** @@ -297,14 +302,14 @@ { if (!snd_ac97_valid_reg(ac97, reg)) return 0; - return ac97->bus->read(ac97, reg); + return ac97->bus->ops->read(ac97, reg); } /* read a register - return the cached value if already read */ static inline unsigned short snd_ac97_read_cache(ac97_t *ac97, unsigned short reg) { if (! test_bit(reg, ac97->reg_accessed)) { - ac97->regs[reg] = ac97->bus->read(ac97, reg); + ac97->regs[reg] = ac97->bus->ops->read(ac97, reg); // set_bit(reg, ac97->reg_accessed); } return ac97->regs[reg]; @@ -327,7 +332,7 @@ spin_lock(&ac97->reg_lock); ac97->regs[reg] = value; spin_unlock(&ac97->reg_lock); - ac97->bus->write(ac97, reg, value); + ac97->bus->ops->write(ac97, reg, value); set_bit(reg, ac97->reg_accessed); } @@ -354,7 +359,7 @@ if (change) { ac97->regs[reg] = value; spin_unlock(&ac97->reg_lock); - ac97->bus->write(ac97, reg, value); + ac97->bus->ops->write(ac97, reg, value); } else spin_unlock(&ac97->reg_lock); return change; @@ -387,7 +392,7 @@ if (change) { ac97->regs[reg] = new; spin_unlock(&ac97->reg_lock); - ac97->bus->write(ac97, reg, new); + ac97->bus->ops->write(ac97, reg, new); } else spin_unlock(&ac97->reg_lock); return change; @@ -398,7 +403,7 @@ int change; unsigned short old, new, cfg; - down(&ac97->spec.ad18xx.mutex); + down(&ac97->mutex); spin_lock(&ac97->reg_lock); old = ac97->spec.ad18xx.pcmreg[codec]; new = (old & ~mask) | value; @@ -408,17 +413,17 @@ ac97->spec.ad18xx.pcmreg[codec] = new; spin_unlock(&ac97->reg_lock); /* select single codec */ - ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, + ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG, (cfg & ~0x7000) | ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]); /* update PCM bits */ - ac97->bus->write(ac97, AC97_PCM, new); + ac97->bus->ops->write(ac97, AC97_PCM, new); /* select all codecs */ - ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, + ac97->bus->ops->write(ac97, AC97_AD_SERIAL_CFG, cfg | 0x7000); } else spin_unlock(&ac97->reg_lock); - up(&ac97->spec.ad18xx.mutex); + up(&ac97->mutex); return change; } @@ -545,7 +550,7 @@ int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0xff; + int invert = (kcontrol->private_value >> 24) & 0x01; ucontrol->value.integer.value[0] = (snd_ac97_read_cache(ac97, reg) >> shift) & mask; if (invert) @@ -559,7 +564,7 @@ int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0xff; + int invert = (kcontrol->private_value >> 24) & 0x01; unsigned short val; val = (ucontrol->value.integer.value[0] & mask); @@ -625,6 +630,40 @@ (val1 << shift_left) | (val2 << shift_right)); } +int snd_ac97_getput_page(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol, + int (*func)(snd_kcontrol_t *, snd_ctl_elem_value_t *)) +{ + ac97_t *ac97 = snd_kcontrol_chip(kcontrol); + int reg = kcontrol->private_value & 0xff; + int err; + + if ((ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_23 && + (reg >= 0x60 && reg < 0x70)) { + unsigned short page_save; + unsigned short page = (kcontrol->private_value >> 25) & 0x0f; + down(&ac97->mutex); /* lock paging */ + page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK; + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page); + err = func(kcontrol, ucontrol); + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save); + up(&ac97->mutex); /* unlock paging */ + } else + err = func(kcontrol, ucontrol); + return err; +} + +/* for rev2.3 paging */ +int snd_ac97_page_get_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_get_single); +} + +/* for rev2.3 paging */ +int snd_ac97_page_put_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + return snd_ac97_getput_page(kcontrol, ucontrol, snd_ac97_put_single); +} + static const snd_kcontrol_new_t snd_ac97_controls_master_mono[2] = { AC97_SINGLE("Master Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1), AC97_SINGLE("Master Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1) @@ -1009,14 +1048,14 @@ kfree(bus->pcms); if (bus->private_free) bus->private_free(bus); - snd_magic_kfree(bus); + kfree(bus); } return 0; } static int snd_ac97_bus_dev_free(snd_device_t *device) { - ac97_bus_t *bus = snd_magic_cast(ac97_bus_t, device->device_data, return -ENXIO); + ac97_bus_t *bus = device->device_data; return snd_ac97_bus_free(bus); } @@ -1024,18 +1063,24 @@ { if (ac97) { snd_ac97_proc_done(ac97); - if (ac97->bus) + if (ac97->bus) { ac97->bus->codec[ac97->num] = NULL; + if (ac97->bus->shared_type) { + down(&shared_codec_mutex); + shared_codec[ac97->bus->shared_type-1][ac97->num] = NULL; + up(&shared_codec_mutex); + } + } if (ac97->private_free) ac97->private_free(ac97); - snd_magic_kfree(ac97); + kfree(ac97); } return 0; } static int snd_ac97_dev_free(snd_device_t *device) { - ac97_t *ac97 = snd_magic_cast(ac97_t, device->device_data, return -ENXIO); + ac97_t *ac97 = device->device_data; snd_ac97_powerdown(ac97); /* for avoiding click noises during shut down */ return snd_ac97_free(ac97); } @@ -1120,6 +1165,7 @@ snd_ac97_write_cache(ac97, reg, 0x8000); } +/* check the volume resolution of center/lfe */ static void snd_ac97_change_volume_params2(ac97_t * ac97, int reg, int shift, unsigned char *max) { unsigned short val, val1; @@ -1135,6 +1181,7 @@ snd_ac97_write_cache(ac97, reg, 0x8080); } +/* check whether the volume resolution is 4 or 5 bits */ static void snd_ac97_change_volume_params3(ac97_t * ac97, int reg, unsigned char *max) { unsigned short val, val1; @@ -1150,6 +1197,18 @@ snd_ac97_write_cache(ac97, reg, 0x8000); } +/* check whether the volume is mono or stereo */ +static int snd_ac97_is_stereo_vol(ac97_t *ac97, int reg) +{ + unsigned short val, val1, val2; + val = snd_ac97_read(ac97, reg); + val1 = val | 0x8000 | (0x01 << 8); + snd_ac97_write(ac97, reg, val1); + val2 = snd_ac97_read(ac97, reg); + snd_ac97_write(ac97, reg, val); /* restore */ + return val1 == val2; +} + static inline int printable(unsigned int x) { x &= 0xff; @@ -1178,6 +1237,9 @@ snd_kcontrol_t *kctl; int stereo = 0; + if (! snd_ac97_valid_reg(ac97, reg)) + return 0; + if (ac97->flags & AC97_STEREO_MUTES) { /* check whether both mute bits work */ unsigned short val, val1; @@ -1208,6 +1270,9 @@ int err; snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 8, 0, (unsigned int)max, 1); tmp.index = ac97->num; + + if (! snd_ac97_valid_reg(ac97, reg)) + return 0; if ((err = snd_ctl_add(card, snd_ctl_new1(&tmp, ac97))) < 0) return err; snd_ac97_write_cache(ac97, reg, @@ -1225,6 +1290,9 @@ char name[44]; unsigned char max; + if (! snd_ac97_valid_reg(ac97, reg)) + return 0; + sprintf(name, "%s Switch", pfx); if ((err = snd_ac97_cmute_new(card, name, reg, ac97)) < 0) return err; @@ -1239,6 +1307,8 @@ } +static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97); + static int snd_ac97_mixer_build(ac97_t * ac97) { snd_card_t *card = ac97->bus->card; @@ -1293,11 +1363,8 @@ } /* build headphone controls */ - if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE) || ac97->id == AC97_ID_STAC9708) { - const char *name = ac97->id == AC97_ID_STAC9708 ? - "Sigmatel Surround Playback" : - "Headphone Playback"; - if ((err = snd_ac97_cmix_new(card, name, AC97_HEADPHONE, 1, ac97)) < 0) + if (snd_ac97_try_volume_mix(ac97, AC97_HEADPHONE)) { + if ((err = snd_ac97_cmix_new(card, "Headphone Playback", AC97_HEADPHONE, 1, ac97)) < 0) return err; } @@ -1332,7 +1399,8 @@ for (idx = 0; idx < 2; idx++) if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_pc_beep[idx], ac97))) < 0) return err; - snd_ac97_write_cache(ac97, AC97_PC_BEEP, 0x801e); + snd_ac97_write_cache(ac97, AC97_PC_BEEP, + snd_ac97_read(ac97, AC97_PC_BEEP) | 0x801e); } /* build Phone controls */ @@ -1349,15 +1417,26 @@ /* build MIC controls */ snd_ac97_change_volume_params3(ac97, AC97_MIC, &max); - for (idx = 0; idx < 3; idx++) { - if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0) + if (snd_ac97_is_stereo_vol(ac97, AC97_MIC)) { + /* build stereo mic */ + if ((err = snd_ac97_cmute_new(card, "Mic Playback Switch", AC97_MIC, ac97)) < 0) return err; - if (idx == 1) { // volume - kctl->private_value &= ~(0xff << 16); - kctl->private_value |= (int)max << 16; + if ((err = snd_ac97_cvol_new(card, "Mic Playback Volume", AC97_MIC, max, ac97)) < 0) + return err; + if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_mic[2], ac97))) < 0) + return err; + } else { + /* build mono mic */ + for (idx = 0; idx < 3; idx++) { + if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_mic[idx], ac97))) < 0) + return err; + if (idx == 1) { // volume + kctl->private_value &= ~(0xff << 16); + kctl->private_value |= (int)max << 16; + } } + snd_ac97_write_cache(ac97, AC97_MIC, 0x8000 | max); } - snd_ac97_write_cache(ac97, AC97_MIC, 0x8000 | max); /* build Line controls */ if ((err = snd_ac97_cmix_new(card, "Line Playback", AC97_LINE, 0, ac97)) < 0) @@ -1410,9 +1489,7 @@ if ((err = snd_ac97_cmute_new(card, "PCM Playback Switch", AC97_PCM, ac97)) < 0) return err; /* FIXME: C-Media chips have no PCM volume!! */ - if (/*ac97->id == 0x434d4941 ||*/ - ac97->id == 0x434d4942 || - ac97->id == 0x434d4961) + if (ac97->id == AC97_ID_CM9739) snd_ac97_write_cache(ac97, AC97_PCM, 0x9f1f); else { if ((err = snd_ac97_cvol_new(card, "PCM Playback Volume", AC97_PCM, 31, ac97)) < 0) @@ -1423,8 +1500,10 @@ /* build Capture controls */ if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_control_capture_src, ac97))) < 0) return err; - if ((err = snd_ac97_cmute_new(card, "Capture Switch", AC97_REC_GAIN, ac97)) < 0) - return err; + if (snd_ac97_try_bit(ac97, AC97_REC_GAIN, 15)) { + if ((err = snd_ac97_cmute_new(card, "Capture Switch", AC97_REC_GAIN, ac97)) < 0) + return err; + } if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_control_capture_vol, ac97))) < 0) return err; snd_ac97_write_cache(ac97, AC97_REC_SEL, 0x0000); @@ -1520,6 +1599,7 @@ /* set default PCM S/PDIF params */ /* consumer,PCM audio,no copyright,no preemphasis,PCM coder,original,48000Hz */ snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20); + ac97->rates[AC97_RATES_SPDIF] = snd_ac97_determine_spdif_rates(ac97); } ac97->spdif_status = SNDRV_PCM_DEFAULT_CON_SPDIF; } @@ -1672,10 +1752,10 @@ */ /* test if we can write to the record gain volume register */ snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a05); - if (snd_ac97_read(ac97, AC97_REC_GAIN) == 0x8a05) + if ((snd_ac97_read(ac97, AC97_REC_GAIN) & 0x7fff) == 0x0a05) return 0; set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/100); + schedule_timeout(1); } while (time_after_eq(end_time, jiffies)); return -ENODEV; } @@ -1683,45 +1763,47 @@ /** * snd_ac97_bus - create an AC97 bus component * @card: the card instance - * @_bus: the template of AC97 bus, callbacks and - * the private data. + * @num: the bus number + * @ops: the bus callbacks table + * @private_data: private data pointer for the new instance * @rbus: the pointer to store the new AC97 bus instance. * * Creates an AC97 bus component. An ac97_bus_t instance is newly - * allocated and initialized from the template (_bus). + * allocated and initialized. * - * The template must include the valid callbacks (at least read and - * write), the bus number (num), and the private data (private_data). - * The other callbacks, wait and reset, are not mandatory. + * The ops table must include valid callbacks (at least read and + * write). The other callbacks, wait and reset, are not mandatory. * * The clock is set to 48000. If another clock is needed, set - * bus->clock manually. + * (*rbus)->clock manually. * * The AC97 bus instance is registered as a low-level device, so you don't * have to release it manually. * * Returns zero if successful, or a negative error code on failure. */ -int snd_ac97_bus(snd_card_t * card, ac97_bus_t * _bus, ac97_bus_t ** rbus) +int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, + void *private_data, ac97_bus_t **rbus) { int err; ac97_bus_t *bus; - static snd_device_ops_t ops = { + static snd_device_ops_t dev_ops = { .dev_free = snd_ac97_bus_dev_free, }; snd_assert(card != NULL, return -EINVAL); - snd_assert(_bus != NULL && rbus != NULL, return -EINVAL); - bus = snd_magic_kmalloc(ac97_bus_t, 0, GFP_KERNEL); + snd_assert(rbus != NULL, return -EINVAL); + bus = kcalloc(1, sizeof(*bus), GFP_KERNEL); if (bus == NULL) return -ENOMEM; - *bus = *_bus; bus->card = card; - if (bus->clock == 0) - bus->clock = 48000; + bus->num = num; + bus->ops = ops; + bus->private_data = private_data; + bus->clock = 48000; spin_lock_init(&bus->bus_lock); snd_ac97_bus_proc_init(bus); - if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &ops)) < 0) { + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &dev_ops)) < 0) { snd_ac97_bus_free(bus); return err; } @@ -1732,25 +1814,23 @@ /** * snd_ac97_mixer - create an Codec97 component * @bus: the AC97 bus which codec is attached to - * @_ac97: the template of ac97, including index, callbacks and + * @template: the template of ac97, including index, callbacks and * the private data. * @rac97: the pointer to store the new ac97 instance. * * Creates an Codec97 component. An ac97_t instance is newly - * allocated and initialized from the template (_ac97). The codec + * allocated and initialized from the template. The codec * is then initialized by the standard procedure. * - * The template must include the valid callbacks (at least read and - * write), the codec number (num) and address (addr), and the private - * data (private_data). The other callbacks, wait and reset, are not - * mandatory. + * The template must include the codec number (num) and address (addr), + * and the private data (private_data). * * The ac97 instance is registered as a low-level device, so you don't * have to release it manually. * * Returns zero if successful, or a negative error code on failure. */ -int snd_ac97_mixer(ac97_bus_t * bus, ac97_t * _ac97, ac97_t ** rac97) +int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97) { int err; ac97_t *ac97; @@ -1764,33 +1844,63 @@ snd_assert(rac97 != NULL, return -EINVAL); *rac97 = NULL; - snd_assert(bus != NULL && _ac97 != NULL, return -EINVAL); - snd_assert(_ac97->num < 4 && bus->codec[_ac97->num] == NULL, return -EINVAL); + snd_assert(bus != NULL && template != NULL, return -EINVAL); + snd_assert(template->num < 4 && bus->codec[template->num] == NULL, return -EINVAL); + + snd_assert(bus->shared_type <= AC97_SHARED_TYPES, return -EINVAL); + if (bus->shared_type) { + /* already shared? */ + down(&shared_codec_mutex); + ac97 = shared_codec[bus->shared_type-1][template->num]; + if (ac97) { + if ((ac97_is_audio(ac97) && (template->scaps & AC97_SCAP_SKIP_AUDIO)) || + (ac97_is_modem(ac97) && (template->scaps & AC97_SCAP_SKIP_MODEM))) { + up(&shared_codec_mutex); + return -EACCES; /* skip this */ + } + } + up(&shared_codec_mutex); + } + card = bus->card; - ac97 = snd_magic_kmalloc(ac97_t, 0, GFP_KERNEL); + ac97 = kcalloc(1, sizeof(*ac97), GFP_KERNEL); if (ac97 == NULL) return -ENOMEM; - *ac97 = *_ac97; + ac97->private_data = template->private_data; + ac97->private_free = template->private_free; ac97->bus = bus; + ac97->pci = template->pci; + ac97->num = template->num; + ac97->addr = template->addr; + ac97->scaps = template->scaps; + ac97->limited_regs = template->limited_regs; + memcpy(ac97->reg_accessed, template->reg_accessed, sizeof(ac97->reg_accessed)); bus->codec[ac97->num] = ac97; spin_lock_init(&ac97->reg_lock); + init_MUTEX(&ac97->mutex); if (ac97->pci) { pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor); pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device); } - if (bus->reset) { - bus->reset(ac97); + if (bus->ops->reset) { + bus->ops->reset(ac97); goto __access_ok; } snd_ac97_write(ac97, AC97_RESET, 0); /* reset to defaults */ - if (bus->wait) - bus->wait(ac97); + if (bus->ops->wait) + bus->ops->wait(ac97); else { udelay(50); - if (ac97_reset_wait(ac97, HZ/2, 0) < 0 && - ac97_reset_wait(ac97, HZ/2, 1) < 0) { + if (ac97->scaps & AC97_SCAP_SKIP_AUDIO) + err = ac97_reset_wait(ac97, HZ/2, 1); + else { + err = ac97_reset_wait(ac97, HZ/2, 0); + if (err < 0) + err = ac97_reset_wait(ac97, HZ/2, 1); + } + if (err < 0) { snd_printk(KERN_WARNING "AC'97 %d does not respond - RESET\n", ac97->num); /* proceed anyway - it's often non-critical */ } @@ -1803,26 +1913,12 @@ snd_ac97_free(ac97); return -EIO; } - /* AC97 audio codec chip revision detection. */ - /* Currently only Realtek ALC650 detection implemented. */ - switch(ac97->id & 0xfffffff0) { - case 0x414c4720: /* ALC650 */ - reg = snd_ac97_read(ac97, AC97_ALC650_REVISION); - if (((reg & 0x3f) >= 0) && ((reg & 0x3f) < 3)) - ac97->id = 0x414c4720; /* Old version */ - else if (((reg & 0x3f) >= 3) && ((reg & 0x3f) < 0x10)) - ac97->id = 0x414c4721; /* D version */ - else if ((reg&0x30) == 0x10) - ac97->id = 0x414c4722; /* E version */ - else if ((reg&0x30) == 0x20) - ac97->id = 0x414c4723; /* F version */ - } /* test for AC'97 */ if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_AUDIO)) { /* test if we can write to the record gain volume register */ snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06); - if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a06) + if (((err = snd_ac97_read(ac97, AC97_REC_GAIN)) & 0x7fff) == 0x0a06) ac97->scaps |= AC97_SCAP_AUDIO; } if (ac97->scaps & AC97_SCAP_AUDIO) { @@ -1848,7 +1944,7 @@ return -EACCES; } - if (bus->reset) // FIXME: always skipping? + if (bus->ops->reset) // FIXME: always skipping? goto __ready_ok; /* FIXME: add powerdown control */ @@ -1865,9 +1961,9 @@ if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f) goto __ready_ok; set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/10); + schedule_timeout(1); } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_ERR "AC'97 %d analog subsections not ready\n", ac97->num); + snd_printk(KERN_WARNING "AC'97 %d analog subsections not ready\n", ac97->num); } /* FIXME: add powerdown control */ @@ -1898,9 +1994,9 @@ if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp) goto __ready_ok; set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/10); + schedule_timeout(1); } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_ERR "MC'97 %d converters and GPIO not ready (0x%x)\n", ac97->num, snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS)); + snd_printk(KERN_WARNING "MC'97 %d converters and GPIO not ready (0x%x)\n", ac97->num, snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS)); } __ready_ok: @@ -1919,12 +2015,7 @@ } if (ac97->ext_id & AC97_EI_SPDIF) { /* codec specific code (patch) should override these values */ - if (ac97->flags & AC97_CS_SPDIF) - ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100; - else if (ac97->id == AC97_ID_CM9739) - ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; - else - ac97->rates[AC97_RATES_SPDIF] = snd_ac97_determine_spdif_rates(ac97); + ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_32000; } if (ac97->ext_id & AC97_EI_VRM) { /* MIC VRA support */ snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, 0, &ac97->rates[AC97_RATES_MIC_ADC]); @@ -1940,10 +2031,10 @@ ac97->scaps |= AC97_SCAP_CENTER_LFE_DAC; } /* additional initializations */ - if (bus->init) - bus->init(ac97); - snd_ac97_get_name(ac97, ac97->id, name, 0); - snd_ac97_get_name(NULL, ac97->id, name, 0); // ac97->id might be changed in the special setup code + if (bus->ops->init) + bus->ops->init(ac97); + snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97)); + snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97)); // ac97->id might be changed in the special setup code if (ac97_is_audio(ac97)) { if (card->mixername[0] == '\0') { strcpy(card->mixername, name); @@ -1995,6 +2086,13 @@ return err; } *rac97 = ac97; + + if (bus->shared_type) { + down(&shared_codec_mutex); + shared_codec[bus->shared_type-1][ac97->num] = ac97; + up(&shared_codec_mutex); + } + return 0; } @@ -2054,8 +2152,8 @@ { int i, is_ad18xx, codec; - if (ac97->bus->reset) { - ac97->bus->reset(ac97); + if (ac97->bus->ops->reset) { + ac97->bus->ops->reset(ac97); goto __reset_ready; } @@ -2066,23 +2164,33 @@ snd_ac97_write(ac97, AC97_GENERAL_PURPOSE, 0); snd_ac97_write(ac97, AC97_POWERDOWN, ac97->regs[AC97_POWERDOWN]); - ac97->bus->write(ac97, AC97_MASTER, 0x8101); - for (i = 0; i < 10; i++) { - if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101) - break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(1); - } - /* FIXME: extra delay */ - ac97->bus->write(ac97, AC97_MASTER, 0x8000); - if (snd_ac97_read(ac97, AC97_MASTER) != 0x8000) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/4); + if (ac97_is_audio(ac97)) { + ac97->bus->ops->write(ac97, AC97_MASTER, 0x8101); + for (i = HZ/10; i >= 0; i--) { + if (snd_ac97_read(ac97, AC97_MASTER) == 0x8101) + break; + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + } + /* FIXME: extra delay */ + ac97->bus->ops->write(ac97, AC97_MASTER, 0x8000); + if (snd_ac97_read(ac97, AC97_MASTER) != 0x8000) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ/4); + } + } else { + for (i = HZ/10; i >= 0; i--) { + unsigned short val = snd_ac97_read(ac97, AC97_EXTENDED_MID); + if (val != 0xffff && (val & 1) != 0) + break; + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + } } __reset_ready: - if (ac97->bus->init) - ac97->bus->init(ac97); + if (ac97->bus->ops->init) + ac97->bus->ops->init(ac97); is_ad18xx = (ac97->flags & AC97_AD_MULTI); if (is_ad18xx) { @@ -2093,7 +2201,7 @@ /* select single 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]); + ac97->bus->ops->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]); } /* select all codecs */ snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000); @@ -2118,7 +2226,7 @@ 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]); + ac97->bus->ops->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]); } /* select all codecs */ snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000); @@ -2151,42 +2259,57 @@ /* */ -int snd_ac97_remove_ctl(ac97_t *ac97, const char *name) +static void set_ctl_name(char *dst, const char *src, const char *suffix) +{ + if (suffix) + sprintf(dst, "%s %s", src, suffix); + else + strcpy(dst, src); +} + +int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix) { snd_ctl_elem_id_t id; memset(&id, 0, sizeof(id)); - strcpy(id.name, name); + set_ctl_name(id.name, name, suffix); id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; return snd_ctl_remove_id(ac97->bus->card, &id); } -static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name) +static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name, const char *suffix) { snd_ctl_elem_id_t sid; memset(&sid, 0, sizeof(sid)); - strcpy(sid.name, name); + set_ctl_name(sid.name, name, suffix); sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; return snd_ctl_find_id(ac97->bus->card, &sid); } -int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst) +int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix) { - snd_kcontrol_t *kctl = ctl_find(ac97, src); + snd_kcontrol_t *kctl = ctl_find(ac97, src, suffix); if (kctl) { - strcpy(kctl->id.name, dst); + set_ctl_name(kctl->id.name, dst, suffix); return 0; } return -ENOENT; } -int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2) +/* rename both Volume and Switch controls - don't check the return value */ +void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst) +{ + snd_ac97_rename_ctl(ac97, src, dst, "Switch"); + snd_ac97_rename_ctl(ac97, src, dst, "Volume"); +} + +int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix) { snd_kcontrol_t *kctl1, *kctl2; - kctl1 = ctl_find(ac97, s1); - kctl2 = ctl_find(ac97, s2); + kctl1 = ctl_find(ac97, s1, suffix); + kctl2 = ctl_find(ac97, s2, suffix); if (kctl1 && kctl2) { - strcpy(kctl1->id.name, s2); - strcpy(kctl2->id.name, s1); + set_ctl_name(kctl1->id.name, s2, suffix); + set_ctl_name(kctl2->id.name, s1, suffix); return 0; } return -ENOENT; @@ -2194,26 +2317,22 @@ static int swap_headphone(ac97_t *ac97, int remove_master) { - /* FIXME: error checks.. */ if (remove_master) { - if (ctl_find(ac97, "Headphone Playback Switch") == NULL) + if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL) return 0; - snd_ac97_remove_ctl(ac97, "Master Playback Switch"); - snd_ac97_remove_ctl(ac97, "Master Playback Volume"); - } else { - snd_ac97_rename_ctl(ac97, "Master Playback Switch", "Line-Out Playback Switch"); - snd_ac97_rename_ctl(ac97, "Master Playback Volume", "Line-Out Playback Volume"); - } - snd_ac97_rename_ctl(ac97, "Headphone Playback Switch", "Master Playback Switch"); - snd_ac97_rename_ctl(ac97, "Headphone Playback Volume", "Master Playback Volume"); + snd_ac97_remove_ctl(ac97, "Master Playback", "Switch"); + snd_ac97_remove_ctl(ac97, "Master Playback", "Volume"); + } else + snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Line-Out Playback"); + snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback"); return 0; } static int swap_surround(ac97_t *ac97) { /* FIXME: error checks.. */ - snd_ac97_swap_ctl(ac97, "Master Playback Switch", "Surround Playback Switch"); - snd_ac97_swap_ctl(ac97, "Master Playback Volume", "Surround Playback Volume"); + snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch"); + snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume"); return 0; } diff -Nru a/sound/pci/ac97/ac97_id.h b/sound/pci/ac97/ac97_id.h --- a/sound/pci/ac97/ac97_id.h 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/ac97/ac97_id.h 2004-09-06 16:37:55 -07:00 @@ -45,7 +45,14 @@ #define AC97_ID_CS4201 0x43525948 #define AC97_ID_CS4205 0x43525958 #define AC97_ID_CS_MASK 0xfffffff8 /* bit 0-2: rev */ +#define AC97_ID_ALC100 0x414c4300 #define AC97_ID_ALC650 0x414c4720 +#define AC97_ID_ALC650D 0x414c4721 +#define AC97_ID_ALC650E 0x414c4722 +#define AC97_ID_ALC650F 0x414c4723 +#define AC97_ID_ALC655 0x414c4760 +#define AC97_ID_ALC658 0x414c4780 +#define AC97_ID_ALC850 0x414c4790 #define AC97_ID_YMF753 0x594d4803 #define AC97_ID_VT1616 0x49434551 #define AC97_ID_CM9738 0x434d4941 diff -Nru a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h --- a/sound/pci/ac97/ac97_local.h 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/ac97/ac97_local.h 2004-09-06 16:37:51 -07:00 @@ -23,10 +23,15 @@ */ #define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24)) +#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) ((reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) | ((page) << 25)) #define AC97_SINGLE(xname, reg, shift, mask, invert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \ .get = snd_ac97_get_single, .put = snd_ac97_put_single, \ .private_value = AC97_SINGLE_VALUE(reg, shift, mask, invert) } +#define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \ + .get = snd_ac97_page_get_single, .put = snd_ac97_page_put_single, \ + .private_value = AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) } /* ac97_codec.c */ extern const char *snd_ac97_stereo_enhancements[]; @@ -37,10 +42,13 @@ int snd_ac97_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); int snd_ac97_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_ac97_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); +int snd_ac97_page_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); +int snd_ac97_page_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit); -int snd_ac97_remove_ctl(ac97_t *ac97, const char *name); -int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst); -int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2); +int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix); +int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix); +int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix); +void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst); /* ac97_proc.c */ void snd_ac97_bus_proc_init(ac97_bus_t * ac97); diff -Nru a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c --- a/sound/pci/ac97/ac97_patch.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/ac97/ac97_patch.c 2004-09-06 16:37:55 -07:00 @@ -35,8 +35,6 @@ #include "ac97_id.h" #include "ac97_local.h" -#define chip_t ac97_t - /* * Chip specific initialization */ @@ -51,6 +49,21 @@ return 0; } +/* set to the page, update bits and restore the page */ +static int ac97_update_bits_page(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page) +{ + unsigned short page_save; + int ret; + + down(&ac97->mutex); + page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK; + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page); + ret = snd_ac97_update_bits(ac97, reg, mask, value); + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save); + up(&ac97->mutex); /* unlock paging */ + return ret; +} + /* The following snd_ac97_ymf753_... items added by David Shust (dshust@shustring.com) */ /* It is possible to indicate to the Yamaha YMF753 the type of speakers being used. */ @@ -204,7 +217,7 @@ if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) return err; strcpy(kctl->id.name, "3D Control - Wide"); - kctl->private_value = AC97_3D_CONTROL | (9 << 8) | (7 << 16); + kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 9, 7, 0); snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000); if ((err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&snd_ac97_ymf753_controls_speaker, ac97))) < 0) return err; @@ -315,7 +328,7 @@ if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) return err; strcpy(kctl->id.name, "3D Control Sigmatel - Depth"); - kctl->private_value = AC97_3D_CONTROL | (3 << 16); + kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 2, 3, 0); snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000); return 0; } @@ -328,11 +341,11 @@ if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) return err; strcpy(kctl->id.name, "3D Control Sigmatel - Depth"); - kctl->private_value = AC97_3D_CONTROL | (3 << 16); + kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 0, 3, 0); if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) return err; strcpy(kctl->id.name, "3D Control Sigmatel - Rear Depth"); - kctl->private_value = AC97_3D_CONTROL | (2 << 8) | (3 << 16); + kctl->private_value = AC97_SINGLE_VALUE(AC97_3D_CONTROL, 2, 3, 0); snd_ac97_write_cache(ac97, AC97_3D_CONTROL, 0x0000); return 0; } @@ -373,22 +386,29 @@ .build_specific = patch_sigmatel_stac97xx_specific }; -static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = { - .build_3d = patch_sigmatel_stac9708_3d, - .build_specific = patch_sigmatel_stac97xx_specific -}; - int patch_sigmatel_stac9700(ac97_t * ac97) { ac97->build_ops = &patch_sigmatel_stac9700_ops; return 0; } +static int patch_sigmatel_stac9708_specific(ac97_t *ac97) +{ + snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Sigmatel Surround Playback"); + return patch_sigmatel_stac97xx_specific(ac97); +} + +static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = { + .build_3d = patch_sigmatel_stac9708_3d, + .build_specific = patch_sigmatel_stac9708_specific +}; + int patch_sigmatel_stac9708(ac97_t * ac97) { unsigned int codec72, codec6c; ac97->build_ops = &patch_sigmatel_stac9708_ops; + ac97->caps |= 0x10; /* HP (sigmatel surround) support */ codec72 = snd_ac97_read(ac97, AC97_SIGMATEL_BIAS2) & 0x8000; codec6c = snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG); @@ -467,11 +487,11 @@ int shift = kcontrol->private_value; unsigned short val; - val = ac97->regs[AC97_SIGMATEL_OUTSEL]; - if (!((val >> shift) & 4)) + val = ac97->regs[AC97_SIGMATEL_OUTSEL] >> shift; + if (!(val & 4)) ucontrol->value.enumerated.item[0] = 0; else - ucontrol->value.enumerated.item[0] = 1 + ((val >> shift) & 3); + ucontrol->value.enumerated.item[0] = 1 + (val & 3); return 0; } @@ -487,8 +507,8 @@ val = 0; else val = 4 | (ucontrol->value.enumerated.item[0] - 1); - return snd_ac97_update_bits(ac97, AC97_SIGMATEL_OUTSEL, - 7 << shift, val << shift); + return ac97_update_bits_page(ac97, AC97_SIGMATEL_OUTSEL, + 7 << shift, val << shift, 0); } static int snd_ac97_stac9758_input_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) @@ -521,8 +541,8 @@ ac97_t *ac97 = snd_kcontrol_chip(kcontrol); int shift = kcontrol->private_value; - return snd_ac97_update_bits(ac97, AC97_SIGMATEL_INSEL, 7 << shift, - ucontrol->value.enumerated.item[0] << shift); + return ac97_update_bits_page(ac97, AC97_SIGMATEL_INSEL, 7 << shift, + ucontrol->value.enumerated.item[0] << shift, 0); } static int snd_ac97_stac9758_phonesel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) @@ -550,8 +570,8 @@ { ac97_t *ac97 = snd_kcontrol_chip(kcontrol); - return snd_ac97_update_bits(ac97, AC97_SIGMATEL_IOMISC, 3, - ucontrol->value.enumerated.item[0]); + return ac97_update_bits_page(ac97, AC97_SIGMATEL_IOMISC, 3, + ucontrol->value.enumerated.item[0], 0); } #define STAC9758_OUTPUT_JACK(xname, shift) \ @@ -596,6 +616,14 @@ ARRAY_SIZE(snd_ac97_sigmatel_stac9758_controls)); if (err < 0) return err; + /* DAC-A direct */ + snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Front Playback"); + /* DAC-A to Mix = PCM */ + /* DAC-B direct = Surround */ + /* DAC-B to Mix */ + snd_ac97_rename_vol_ctl(ac97, "Video Playback", "Surround Mix Playback"); + /* DAC-C direct = Center/LFE */ + return 0; } @@ -613,16 +641,16 @@ AC97_SIGMATEL_VARIOUS }; static unsigned short def_regs[4] = { - /* OUTSEL */ 0xd794, + /* OUTSEL */ 0xd794, /* CL:CL, SR:SR, LO:MX, LI:DS, MI:DS */ /* IOMISC */ 0x2001, - /* INSEL */ 0x0201, + /* INSEL */ 0x0201, /* LI:LI, MI:M1 */ /* VARIOUS */ 0x0040 }; static unsigned short m675_regs[4] = { - /* OUTSEL */ 0x9040, - /* IOMISC */ 0x2102, - /* INSEL */ 0x0203, - /* VARIOUS */ 0x0041 + /* OUTSEL */ 0xfc70, /* CL:MX, SR:MX, LO:DS, LI:MX, MI:DS */ + /* IOMISC */ 0x2102, /* HP amp on */ + /* INSEL */ 0x0203, /* LI:LI, MI:FR */ + /* VARIOUS */ 0x0041 /* stereo mic */ }; unsigned short *pregs = def_regs; int i; @@ -635,6 +663,8 @@ // patch for SigmaTel ac97->build_ops = &patch_sigmatel_stac9758_ops; + /* FIXME: assume only page 0 for writing cache */ + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR); for (i = 0; i < 4; i++) snd_ac97_write_cache(ac97, regs[i], pregs[i]); @@ -654,8 +684,10 @@ { int err; + /* con mask, pro mask, default */ if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0) return err; + /* switch, spsa */ if ((err = patch_build_controls(ac97, &snd_ac97_cirrus_controls_spdif[0], 1)) < 0) return err; switch (ac97->id & AC97_ID_CS_MASK) { @@ -714,8 +746,10 @@ { int err; + /* con mask, pro mask, default */ if ((err = patch_build_controls(ac97, &snd_ac97_controls_spdif[0], 3)) < 0) return err; + /* switch */ if ((err = patch_build_controls(ac97, &snd_ac97_conexant_controls_spdif[0], 1)) < 0) return err; /* set default PCM S/PDIF params */ @@ -734,6 +768,7 @@ ac97->build_ops = &patch_conexant_ops; ac97->flags |= AC97_CX_SPDIF; ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */ + ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */ return 0; } @@ -821,8 +856,6 @@ 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)); @@ -872,6 +905,8 @@ /* AC97_SINGLE("Digital Audio Mode", AC97_AD_MISC, 12, 1, 0), */ /* seems problematic */ AC97_SINGLE("Low Power Mixer", AC97_AD_MISC, 14, 1, 0), AC97_SINGLE("Zero Fill DAC", AC97_AD_MISC, 15, 1, 0), + AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 9, 1, 1), /* inverted */ + AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */ }; static int patch_ad1885_specific(ac97_t * ac97) @@ -889,16 +924,10 @@ int patch_ad1885(ac97_t * ac97) { - unsigned short jack; - patch_ad1881(ac97); /* This is required to deal with the Intel D815EEAL2 */ /* i.e. Line out is actually headphone out from codec */ - /* turn off jack sense bits D8 & D9 */ - jack = snd_ac97_read(ac97, AC97_AD_JACK_SPDIF); - snd_ac97_write_cache(ac97, AC97_AD_JACK_SPDIF, jack | 0x0300); - /* set default */ snd_ac97_write_cache(ac97, AC97_AD_MISC, 0x0404); @@ -1114,10 +1143,8 @@ static int patch_ad1888_specific(ac97_t *ac97) { /* rename 0x04 as "Master" and 0x02 as "Master Surround" */ - snd_ac97_rename_ctl(ac97, "Master Playback Switch", "Master Surround Playback Switch"); - snd_ac97_rename_ctl(ac97, "Master Playback Volume", "Master Surround Playback Volume"); - snd_ac97_rename_ctl(ac97, "Headphone Playback Switch", "Master Playback Switch"); - snd_ac97_rename_ctl(ac97, "Headphone Playback Volume", "Master Playback Volume"); + snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback"); + snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback"); return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); } @@ -1213,7 +1240,7 @@ } /* - * realtek ALC65x codecs + * realtek ALC65x/850 codecs */ static int snd_ac97_alc650_mic_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) { @@ -1303,6 +1330,17 @@ ac97->build_ops = &patch_alc650_ops; + /* determine the revision */ + val = snd_ac97_read(ac97, AC97_ALC650_REVISION) & 0x3f; + if (val < 3) + ac97->id = 0x414c4720; /* Old version */ + else if (val < 0x10) + ac97->id = 0x414c4721; /* D version */ + else if (val < 0x20) + ac97->id = 0x414c4722; /* E version */ + else if (val < 0x30) + ac97->id = 0x414c4723; /* F version */ + /* revision E or F */ /* FIXME: what about revision D ? */ ac97->spec.dev_flags = (ac97->id == 0x414c4722 || @@ -1351,20 +1389,19 @@ static int snd_ac97_alc655_mic_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) { ac97_t *ac97 = snd_kcontrol_chip(kcontrol); - int change; /* misc control; vrefout disable */ snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12, ucontrol->value.integer.value[0] ? (1 << 12) : 0); - change = snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 10, - ucontrol->value.integer.value[0] ? (1 << 10) : 0); - return change; + return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 10, + ucontrol->value.integer.value[0] ? (1 << 10) : 0, + 0); } static const snd_kcontrol_new_t snd_ac97_controls_alc655[] = { - AC97_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0), - AC97_SINGLE("Line-In As Surround", AC97_ALC650_MULTICH, 9, 1, 0), + AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0), + AC97_PAGE_SINGLE("Line-In As Surround", AC97_ALC650_MULTICH, 9, 1, 0, 0), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Mic As Center/LFE", @@ -1391,7 +1428,6 @@ texts_658[uinfo->value.enumerated.item] : texts_655[uinfo->value.enumerated.item]); return 0; - } static int alc655_iec958_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) @@ -1410,13 +1446,15 @@ static int alc655_iec958_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ac97_t *ac97 = snd_kcontrol_chip(kcontrol); - return snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 3 << 12, - (unsigned short)ucontrol->value.enumerated.item[0]); + + return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12, + (unsigned short)ucontrol->value.enumerated.item[0], + 0); } static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = { - AC97_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0), - AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0), + AC97_PAGE_SINGLE("IEC958 Capture Switch", AC97_ALC650_MULTICH, 11, 1, 0, 0), + AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "IEC958 Playback Route", @@ -1451,6 +1489,9 @@ ac97->build_ops = &patch_alc655_ops; + /* assume only page 0 for writing cache */ + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR); + /* adjust default values */ val = snd_ac97_read(ac97, 0x7a); /* misc control */ val |= (1 << 1); /* spdif input pin */ @@ -1469,6 +1510,120 @@ return 0; } + +#define AC97_ALC850_JACK_SELECT 0x76 +#define AC97_ALC850_MISC1 0x7a + +static int ac97_alc850_surround_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) +{ + ac97_t *ac97 = snd_kcontrol_chip(kcontrol); + ucontrol->value.integer.value[0] = ((ac97->regs[AC97_ALC850_JACK_SELECT] >> 12) & 7) == 2; + return 0; +} + +static int ac97_alc850_surround_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) +{ + ac97_t *ac97 = snd_kcontrol_chip(kcontrol); + + /* SURR 1kOhm (bit4), Amp (bit5) */ + snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<4)|(1<<5), + ucontrol->value.integer.value[0] ? (1<<5) : (1<<4)); + /* LINE-IN = 0, SURROUND = 2 */ + return snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 12, + ucontrol->value.integer.value[0] ? (2<<12) : (0<<12)); +} + +static int ac97_alc850_mic_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) +{ + ac97_t *ac97 = snd_kcontrol_chip(kcontrol); + ucontrol->value.integer.value[0] = ((ac97->regs[AC97_ALC850_JACK_SELECT] >> 4) & 7) == 2; + return 0; +} + +static int ac97_alc850_mic_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) +{ + ac97_t *ac97 = snd_kcontrol_chip(kcontrol); + + /* Vref disable (bit12), 1kOhm (bit13) */ + snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13), + ucontrol->value.integer.value[0] ? (1<<12) : (1<<13)); + /* MIC-IN = 1, CENTER-LFE = 2 */ + return snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4, + ucontrol->value.integer.value[0] ? (2<<4) : (1<<4)); +} + +static const snd_kcontrol_new_t snd_ac97_controls_alc850[] = { + AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Line-In As Surround", + .info = snd_ac97_info_single, + .get = ac97_alc850_surround_get, + .put = ac97_alc850_surround_put, + .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */ + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Mic As Center/LFE", + .info = snd_ac97_info_single, + .get = ac97_alc850_mic_get, + .put = ac97_alc850_mic_put, + .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */ + }, + +}; + +static int patch_alc850_specific(ac97_t *ac97) +{ + int err; + + if ((err = patch_build_controls(ac97, snd_ac97_controls_alc850, ARRAY_SIZE(snd_ac97_controls_alc850))) < 0) + return err; + if (ac97->ext_id & AC97_EI_SPDIF) { + if ((err = patch_build_controls(ac97, snd_ac97_spdif_controls_alc655, ARRAY_SIZE(snd_ac97_spdif_controls_alc655))) < 0) + return err; + } + return 0; +} + +static struct snd_ac97_build_ops patch_alc850_ops = { + .build_specific = patch_alc850_specific +}; + +int patch_alc850(ac97_t *ac97) +{ + ac97->build_ops = &patch_alc850_ops; + + ac97->spec.dev_flags = 0; /* for IEC958 playback route - ALC655 compatible */ + + /* assume only page 0 for writing cache */ + snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, AC97_PAGE_VENDOR); + + /* adjust default values */ + /* set default: spdif-in enabled, + spdif-in monitor off, spdif-in PCM off + center on mic off, surround on line-in off + duplicate front off + */ + snd_ac97_write_cache(ac97, AC97_ALC650_MULTICH, 1<<15); + /* SURR_OUT: on, Surr 1kOhm: on, Surr Amp: off, Front 1kOhm: off + * Front Amp: on, Vref: enable, Center 1kOhm: on, Mix: on + */ + snd_ac97_write_cache(ac97, 0x7a, (1<<1)|(1<<4)|(0<<5)|(1<<6)| + (1<<7)|(0<<12)|(1<<13)|(0<<14)); + /* detection UIO2,3: all path floating, UIO3: MIC, Vref2: disable, + * UIO1: FRONT, Vref3: disable, UIO3: LINE, Front-Mic: mute + */ + snd_ac97_write_cache(ac97, 0x76, (0<<0)|(0<<2)|(1<<4)|(1<<7)|(2<<8)| + (1<<11)|(0<<12)|(1<<15)); + + /* full DAC volume */ + snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808); + snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808); + return 0; +} + + /* * C-Media CM97xx codecs */ @@ -1599,8 +1754,10 @@ /* enable spdif in */ snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL, snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) | 0x01); + ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */ } else { ac97->ext_id &= ~AC97_EI_SPDIF; /* disable extended-id */ + ac97->rates[AC97_RATES_SPDIF] = 0; } /* set-up multi channel */ diff -Nru a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h --- a/sound/pci/ac97/ac97_patch.h 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/ac97/ac97_patch.h 2004-09-06 16:37:50 -07:00 @@ -49,6 +49,7 @@ int patch_ad1985(ac97_t * ac97); int patch_alc650(ac97_t * ac97); int patch_alc655(ac97_t * ac97); +int patch_alc850(ac97_t * ac97); int patch_cm9738(ac97_t * ac97); int patch_cm9739(ac97_t * ac97); int patch_vt1616(ac97_t * ac97); diff -Nru a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c --- a/sound/pci/ac97/ac97_pcm.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/ac97/ac97_pcm.c 2004-09-06 16:37:51 -07:00 @@ -36,8 +36,6 @@ #include "ac97_id.h" #include "ac97_local.h" -#define chip_t ac97_t - /* * PCM support */ @@ -430,7 +428,7 @@ unsigned int rates; ac97_t *codec; - rpcms = snd_kcalloc(sizeof(struct ac97_pcm) * pcms_count, GFP_KERNEL); + rpcms = kcalloc(pcms_count, sizeof(struct ac97_pcm), GFP_KERNEL); if (rpcms == NULL) return -ENOMEM; memset(avail_slots, 0, sizeof(avail_slots)); @@ -489,7 +487,10 @@ rpcm->r[0].rslots[j] = tmp; rpcm->r[0].codec[j] = bus->codec[j]; rpcm->r[0].rate_table[j] = rate_table[pcm->stream][j]; - rates = get_rates(rpcm, j, tmp, 0); + if (bus->no_vra) + rates = SNDRV_PCM_RATE_48000; + else + rates = get_rates(rpcm, j, tmp, 0); if (pcm->exclusive) avail_slots[pcm->stream][j] &= ~tmp; } diff -Nru a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c --- a/sound/pci/ac97/ac97_proc.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/ac97/ac97_proc.c 2004-09-06 16:37:55 -07:00 @@ -290,11 +290,11 @@ static void snd_ac97_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return); + ac97_t *ac97 = entry->private_data; + down(&ac97->mutex); if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 int idx; - down(&ac97->spec.ad18xx.mutex); for (idx = 0; idx < 3; idx++) if (ac97->spec.ad18xx.id[idx]) { /* select single codec */ @@ -305,7 +305,6 @@ } /* select all codecs */ snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x7000, 0x7000); - up(&ac97->spec.ad18xx.mutex); snd_iprintf(buffer, "\nAD18XX configuration\n"); snd_iprintf(buffer, "Unchained : 0x%04x,0x%04x,0x%04x\n", @@ -319,22 +318,25 @@ } else { snd_ac97_proc_read_main(ac97, buffer, 0); } + up(&ac97->mutex); } #ifdef CONFIG_SND_DEBUG /* direct register write for debugging */ static void snd_ac97_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return); + ac97_t *ac97 = entry->private_data; char line[64]; unsigned int reg, val; + down(&ac97->mutex); while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%x %x", ®, &val) != 2) continue; - /* register must be odd */ + /* register must be even */ if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff) snd_ac97_write_cache(ac97, reg, val); } + up(&ac97->mutex); } #endif @@ -351,12 +353,12 @@ static void snd_ac97_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ac97_t *ac97 = snd_magic_cast(ac97_t, entry->private_data, return); + ac97_t *ac97 = entry->private_data; + down(&ac97->mutex); if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 int idx; - down(&ac97->spec.ad18xx.mutex); for (idx = 0; idx < 3; idx++) if (ac97->spec.ad18xx.id[idx]) { /* select single codec */ @@ -366,10 +368,10 @@ } /* select all codecs */ 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); } + up(&ac97->mutex); } void snd_ac97_proc_init(ac97_t * ac97) diff -Nru a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c --- a/sound/pci/ac97/ak4531_codec.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/ac97/ak4531_codec.c 2004-09-06 16:37:51 -07:00 @@ -30,8 +30,6 @@ MODULE_DESCRIPTION("Universal routines for AK4531 codec"); MODULE_LICENSE("GPL"); -#define chip_t ak4531_t - static void snd_ak4531_proc_init(snd_card_t * card, ak4531_t * ak4531); /* @@ -89,7 +87,7 @@ } ucontrol->value.integer.value[0] = val; return 0; -} +} static int snd_ak4531_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { @@ -113,7 +111,7 @@ ak4531->write(ak4531, reg, ak4531->regs[reg] = val); spin_unlock_irqrestore(&ak4531->reg_lock, flags); return change; -} +} #define AK4531_DOUBLE(xname, xindex, left_reg, right_reg, left_shift, right_shift, mask, invert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ @@ -155,7 +153,7 @@ ucontrol->value.integer.value[0] = left; ucontrol->value.integer.value[1] = right; return 0; -} +} static int snd_ak4531_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { @@ -192,7 +190,7 @@ } spin_unlock_irqrestore(&ak4531->reg_lock, flags); return change; -} +} #define AK4531_INPUT_SW(xname, xindex, reg1, reg2, left_shift, right_shift) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ @@ -225,7 +223,7 @@ ucontrol->value.integer.value[3] = (ak4531->regs[reg2] >> right_shift) & 1; spin_unlock_irqrestore(&ak4531->reg_lock, flags); return 0; -} +} static int snd_ak4531_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { @@ -250,9 +248,7 @@ ak4531->write(ak4531, reg2, ak4531->regs[reg2] = val2); spin_unlock_irqrestore(&ak4531->reg_lock, flags); return change; -} - -#define AK4531_CONTROLS (sizeof(snd_ak4531_controls)/sizeof(snd_kcontrol_new_t)) +} static snd_kcontrol_new_t snd_ak4531_controls[] = { @@ -315,14 +311,14 @@ if (ak4531) { if (ak4531->private_free) ak4531->private_free(ak4531); - snd_magic_kfree(ak4531); + kfree(ak4531); } return 0; } static int snd_ak4531_dev_free(snd_device_t *device) { - ak4531_t *ak4531 = snd_magic_cast(ak4531_t, device->device_data, return -ENXIO); + ak4531_t *ak4531 = device->device_data; return snd_ak4531_free(ak4531); } @@ -367,7 +363,7 @@ snd_assert(rak4531 != NULL, return -EINVAL); *rak4531 = NULL; snd_assert(card != NULL && _ak4531 != NULL, return -EINVAL); - ak4531 = snd_magic_kcalloc(ak4531_t, 0, GFP_KERNEL); + ak4531 = kcalloc(1, sizeof(*ak4531), GFP_KERNEL); if (ak4531 == NULL) return -ENOMEM; *ak4531 = *_ak4531; @@ -385,7 +381,7 @@ continue; ak4531->write(ak4531, idx, ak4531->regs[idx] = snd_ak4531_initial_map[idx]); /* recording source is mixer */ } - for (idx = 0; idx < AK4531_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_ak4531_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ak4531_controls[idx], ak4531))) < 0) { snd_ak4531_free(ak4531); return err; @@ -411,7 +407,7 @@ static void snd_ak4531_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ak4531_t *ak4531 = snd_magic_cast(ak4531_t, entry->private_data, return); + ak4531_t *ak4531 = entry->private_data; snd_iprintf(buffer, "Asahi Kasei AK4531\n\n"); snd_iprintf(buffer, "Recording source : %s\n" diff -Nru a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c --- a/sound/pci/ali5451/ali5451.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/ali5451/ali5451.c 2004-09-06 16:37:55 -07:00 @@ -43,8 +43,7 @@ MODULE_AUTHOR("Matt Wu "); MODULE_DESCRIPTION("ALI M5451"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ALI,M5451,pci},{ALI,M5451}}"); +MODULE_SUPPORTED_DEVICE("{{ALI,M5451,pci},{ALI,M5451}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -55,19 +54,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ALI M5451 PCI Audio."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ALI M5451 PCI Audio."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ALI 5451 PCI Audio."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "PCM Channels"); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}"); module_param_array(spdif, bool, boot_devs, 0444); MODULE_PARM_DESC(spdif, "Support SPDIF I/O"); -MODULE_PARM_SYNTAX(spdif, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); /* * Debug part definitions @@ -171,7 +165,6 @@ typedef struct snd_stru_ali ali_t; typedef struct snd_ali_stru_voice snd_ali_voice_t; -#define chip_t ali_t typedef struct snd_ali_channel_control { // register data @@ -247,7 +240,6 @@ unsigned int hw_initialized: 1; unsigned int spdif_support: 1; - struct resource *res_port; struct pci_dev *pci; struct pci_dev *pci_m1533; @@ -495,7 +487,7 @@ unsigned short reg, unsigned short val ) { - ali_t *codec = snd_magic_cast(ali_t, ac97->private_data, return); + ali_t *codec = ac97->private_data; snd_ali_printk("codec_write: reg=%xh data=%xh.\n", reg, val); snd_ali_codec_poke(codec, 0, reg, val); @@ -505,7 +497,7 @@ static unsigned short snd_ali_codec_read(ac97_t *ac97, unsigned short reg) { - ali_t *codec = snd_magic_cast(ali_t, ac97->private_data, return -ENXIO); + ali_t *codec = ac97->private_data; snd_ali_printk("codec_read reg=%xh.\n", reg); return (snd_ali_codec_peek(codec, 0, reg)); @@ -1051,7 +1043,7 @@ void *dev_id, struct pt_regs *regs) { - ali_t *codec = snd_magic_cast(ali_t, dev_id, return IRQ_NONE); + ali_t *codec = dev_id; if (codec == NULL) return IRQ_NONE; @@ -1247,7 +1239,7 @@ what = whati = capture_flag = 0; snd_pcm_group_for_each(pos, substream) { s = snd_pcm_group_substream_entry(pos); - if ((ali_t *) _snd_pcm_chip(s->pcm) == codec) { + if ((ali_t *) snd_pcm_substream_chip(s) == codec) { pvoice = (snd_ali_voice_t *) s->runtime->private_data; evoice = pvoice->extra; what |= 1 << (pvoice->number & 0x1f); @@ -1528,16 +1520,15 @@ snd_pcm_runtime_t *runtime = substream->runtime; snd_ali_voice_t *pvoice = (snd_ali_voice_t *) runtime->private_data; unsigned int cso; - unsigned long flags; - spin_lock_irqsave(&codec->reg_lock, flags); + spin_lock(&codec->reg_lock); if (!pvoice->running) { - spin_unlock_irqrestore(&codec->reg_lock, flags); + spin_unlock(&codec->reg_lock); return 0; } outb(pvoice->number, ALI_REG(codec, ALI_GC_CIR)); cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2)); - spin_unlock_irqrestore(&codec->reg_lock, flags); + spin_unlock(&codec->reg_lock); snd_ali_printk("playback pointer returned cso=%xh.\n", cso); return cso; @@ -1720,7 +1711,7 @@ static void snd_ali_pcm_free(snd_pcm_t *pcm) { - ali_t *codec = snd_magic_cast(ali_t, pcm->private_data, return); + ali_t *codec = pcm->private_data; codec->pcm = NULL; } @@ -1769,7 +1760,7 @@ static int snd_ali5451_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { unsigned long flags; - ali_t *codec = snd_magic_cast(ali_t, kcontrol->private_data, -ENXIO); + ali_t *codec = kcontrol->private_data; unsigned int enable; enable = ucontrol->value.integer.value[0] ? 1 : 0; @@ -1796,7 +1787,7 @@ static int snd_ali5451_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { unsigned long flags; - ali_t *codec = snd_magic_cast(ali_t, kcontrol->private_data, -ENXIO); + ali_t *codec = kcontrol->private_data; unsigned int change = 0, enable = 0; enable = ucontrol->value.integer.value[0] ? 1 : 0; @@ -1863,30 +1854,29 @@ static void snd_ali_mixer_free_ac97_bus(ac97_bus_t *bus) { - ali_t *codec = snd_magic_cast(ali_t, bus->private_data, return); + ali_t *codec = bus->private_data; codec->ac97_bus = NULL; } static void snd_ali_mixer_free_ac97(ac97_t *ac97) { - ali_t *codec = snd_magic_cast(ali_t, ac97->private_data, return); + ali_t *codec = ac97->private_data; codec->ac97 = NULL; } static int __devinit snd_ali_mixer(ali_t * codec) { - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; unsigned int idx; int err; + static ac97_bus_ops_t ops = { + .write = snd_ali_codec_write, + .read = snd_ali_codec_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_ali_codec_write; - bus.read = snd_ali_codec_read; - bus.private_data = codec; - bus.private_free = snd_ali_mixer_free_ac97_bus; - if ((err = snd_ac97_bus(codec->card, &bus, &codec->ac97_bus)) < 0) + if ((err = snd_ac97_bus(codec->card, 0, &ops, codec, &codec->ac97_bus)) < 0) return err; + codec->ac97_bus->private_free = snd_ali_mixer_free_ac97_bus; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = codec; @@ -1907,7 +1897,7 @@ #ifdef CONFIG_PM static int ali_suspend(snd_card_t *card, unsigned int state) { - ali_t *chip = snd_magic_cast(ali_t, card->pm_private_data, return -EINVAL); + ali_t *chip = card->pm_private_data; ali_image_t *im; int i, j; @@ -1943,12 +1933,13 @@ outl(0xffffffff, ALI_REG(chip, ALI_STOP)); spin_unlock_irq(&chip->reg_lock); + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); return 0; } static int ali_resume(snd_card_t *card, unsigned int state) { - ali_t *chip = snd_magic_cast(ali_t, card->pm_private_data, return -EINVAL); + ali_t *chip = card->pm_private_data; ali_image_t *im; int i, j; @@ -1980,6 +1971,7 @@ spin_unlock_irq(&chip->reg_lock); snd_ac97_resume(chip->ac97); + snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } @@ -1993,15 +1985,13 @@ synchronize_irq(codec->irq); free_irq(codec->irq, (void *)codec); } - if (codec->res_port) { - release_resource(codec->res_port); - kfree_nocheck(codec->res_port); - } + if (codec->port) + pci_release_regions(codec->pci); #ifdef CONFIG_PM if (codec->image) kfree(codec->image); #endif - snd_magic_kfree(codec); + kfree(codec); return 0; } @@ -2055,11 +2045,12 @@ static int __devinit snd_ali_resources(ali_t *codec) { + int err; + snd_ali_printk("resouces allocation ...\n"); - if ((codec->res_port = request_region(codec->port, 0x100, "ALI 5451")) == NULL) { - snd_printk("Unalbe to request io ports.\n"); - return -EBUSY; - } + if ((err = pci_request_regions(codec->pci, "ALI 5451")) < 0) + return err; + codec->port = pci_resource_start(codec->pci, 0); if (request_irq(codec->pci->irq, snd_ali_card_interrupt, SA_INTERRUPT|SA_SHIRQ, "ALI 5451", (void *)codec)) { snd_printk("Unable to request irq.\n"); @@ -2071,7 +2062,7 @@ } static int snd_ali_dev_free(snd_device_t *device) { - ali_t *codec=snd_magic_cast(ali_t, device->device_data, return -ENXIO); + ali_t *codec=device->device_data; snd_ali_free(codec); return 0; } @@ -2106,7 +2097,7 @@ return -ENXIO; } - if ((codec = snd_magic_kcalloc(ali_t, 0, GFP_KERNEL)) == NULL) + if ((codec = kcalloc(1, sizeof(*codec), GFP_KERNEL)) == NULL) return -ENOMEM; spin_lock_init(&codec->reg_lock); @@ -2115,7 +2106,6 @@ codec->card = card; codec->pci = pci; codec->irq = -1; - codec->port = pci_resource_start(pci, 0); pci_read_config_byte(pci, PCI_REVISION_ID, &codec->revision); codec->spdif_support = spdif_support; diff -Nru a/sound/pci/als4000.c b/sound/pci/als4000.c --- a/sound/pci/als4000.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/als4000.c 2004-09-06 16:37:55 -07:00 @@ -76,8 +76,7 @@ MODULE_AUTHOR("Bart Hartgers "); MODULE_DESCRIPTION("Avance Logic ALS4000"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Avance Logic,ALS4000}}"); +MODULE_SUPPORTED_DEVICE("{{Avance Logic,ALS4000}}"); #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) #define SUPPORT_JOYSTICK 1 @@ -93,24 +92,18 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ALS4000 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ALS4000 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ALS4000 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_INDEX_DESC); #ifdef SUPPORT_JOYSTICK module_param_array(joystick_port, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_port, "Joystick port address for ALS4000 soundcard. (0 = disabled)"); -MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED); #endif -#define chip_t sb_t - typedef struct { + struct pci_dev *pci; unsigned long gcr; - struct resource *res_gcr; #ifdef SUPPORT_JOYSTICK struct gameport gameport; struct resource *res_joystick; @@ -304,11 +297,10 @@ static int snd_als4000_capture_trigger(snd_pcm_substream_t * substream, int cmd) { - unsigned long flags; sb_t *chip = snd_pcm_substream_chip(substream); int result = 0; - spin_lock_irqsave(&chip->mixer_lock, flags); + spin_lock(&chip->mixer_lock); if (cmd == SNDRV_PCM_TRIGGER_START) { chip->mode |= SB_RATE_LOCK_CAPTURE; snd_sbmixer_write(chip, 0xde, capture_cmd(chip)); @@ -318,17 +310,16 @@ } else { result = -EINVAL; } - spin_unlock_irqrestore(&chip->mixer_lock, flags); + spin_unlock(&chip->mixer_lock); return result; } static int snd_als4000_playback_trigger(snd_pcm_substream_t * substream, int cmd) { - unsigned long flags; sb_t *chip = snd_pcm_substream_chip(substream); int result = 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); if (cmd == SNDRV_PCM_TRIGGER_START) { chip->mode |= SB_RATE_LOCK_PLAYBACK; snd_sbdsp_command(chip, playback_cmd(chip).dma_on); @@ -338,38 +329,35 @@ } else { result = -EINVAL; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return result; } static snd_pcm_uframes_t snd_als4000_capture_pointer(snd_pcm_substream_t * substream) { - unsigned long flags; sb_t *chip = snd_pcm_substream_chip(substream); unsigned int result; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); result = snd_als4000_gcr_read(chip, 0xa4) & 0xffff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return bytes_to_frames( substream->runtime, result ); } static snd_pcm_uframes_t snd_als4000_playback_pointer(snd_pcm_substream_t * substream) { - unsigned long flags; sb_t *chip = snd_pcm_substream_chip(substream); unsigned result; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); result = snd_als4000_gcr_read(chip, 0xa0) & 0xffff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return bytes_to_frames( substream->runtime, result ); } static irqreturn_t snd_als4000_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - sb_t *chip = snd_magic_cast(sb_t, dev_id, return IRQ_NONE); - unsigned long flags; + sb_t *chip = dev_id; unsigned gcr_status; unsigned sb_status; @@ -385,9 +373,9 @@ /* release the gcr */ outb(gcr_status, chip->alt_port + 0xe); - spin_lock_irqsave(&chip->mixer_lock, flags); + spin_lock(&chip->mixer_lock); sb_status = snd_sbmixer_read(chip, SB_DSP4_IRQSTATUS); - spin_unlock_irqrestore(&chip->mixer_lock, flags); + spin_unlock(&chip->mixer_lock); if (sb_status & SB_IRQTYPE_8BIT) snd_sb_ack_8bit(chip); @@ -506,7 +494,7 @@ static void snd_als4000_pcm_free(snd_pcm_t *pcm) { - sb_t *chip = snd_magic_cast(sb_t, pcm->private_data, return); + sb_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -557,27 +545,26 @@ static void __devinit snd_als4000_configure(sb_t *chip) { - unsigned long flags; unsigned tmp; int i; /* do some more configuration */ - spin_lock_irqsave(&chip->mixer_lock, flags); + spin_lock_irq(&chip->mixer_lock); tmp = snd_sbmixer_read(chip, 0xc0); snd_sbmixer_write(chip, 0xc0, tmp|0x80); /* always select DMA channel 0, since we do not actually use DMA */ snd_sbmixer_write(chip, SB_DSP4_DMASETUP, SB_DMASETUP_DMA0); snd_sbmixer_write(chip, 0xc0, tmp&0x7f); - spin_unlock_irqrestore(&chip->mixer_lock, flags); + spin_unlock_irq(&chip->mixer_lock); - spin_lock_irqsave(&chip->reg_lock,flags); + spin_lock_irq(&chip->reg_lock); /* magic number. Enables interrupts(?) */ snd_als4000_gcr_write(chip, 0x8c, 0x28000); for(i = 0x91; i <= 0x96; ++i) snd_als4000_gcr_write(chip, i, 0); snd_als4000_gcr_write(chip, 0x99, snd_als4000_gcr_read(chip, 0x99)); - spin_unlock_irqrestore(&chip->reg_lock,flags); + spin_unlock_irq(&chip->reg_lock); } static void snd_card_als4000_free( snd_card_t *card ) @@ -595,8 +582,7 @@ kfree_nocheck(acard->res_joystick); } #endif - release_resource(acard->res_gcr); - kfree_nocheck(acard->res_gcr); + pci_release_regions(acard->pci); } static int __devinit snd_card_als4000_probe(struct pci_dev *pci, @@ -606,7 +592,6 @@ snd_card_t *card; snd_card_als4000_t *acard; unsigned long gcr; - struct resource *res_gcr_port; sb_t *chip; opl3_t *opl3; unsigned short word; @@ -631,11 +616,9 @@ return -ENXIO; } + if ((err = pci_request_regions(pci, "ALS4000")) < 0) + return err; gcr = pci_resource_start(pci, 0); - if ((res_gcr_port = request_region(gcr, 0x40, "ALS4000")) == NULL) { - snd_printk("unable to grab region 0x%lx-0x%lx\n", gcr, gcr + 0x40 - 1); - return -EBUSY; - } pci_read_config_word(pci, PCI_COMMAND, &word); pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO); @@ -644,14 +627,13 @@ card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof( snd_card_als4000_t ) ); if (card == NULL) { - release_resource(res_gcr_port); - kfree_nocheck(res_gcr_port); + pci_release_regions(pci); return -ENOMEM; } acard = (snd_card_als4000_t *)card->private_data; + acard->pci = pci; acard->gcr = gcr; - acard->res_gcr = res_gcr_port; card->private_free = snd_card_als4000_free; /* disable all legacy ISA stuff except for joystick */ diff -Nru a/sound/pci/atiixp.c b/sound/pci/atiixp.c --- a/sound/pci/atiixp.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/atiixp.c 2004-09-06 16:37:53 -07:00 @@ -1,5 +1,5 @@ /* - * ALSA driver for ATI IXP 150/200/250 AC97 controllers + * ALSA driver for ATI IXP 150/200/250/300 AC97 controllers * * Copyright (c) 2004 Takashi Iwai * @@ -37,8 +37,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("ATI IXP AC97 controller"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ATI,IXP150/200/250/300}}"); +MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -49,19 +48,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ATI IXP controller."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ATI IXP controller."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(ac97_clock, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); -MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:48000"); module_param_array(spdif_aclink, bool, boot_devs, 0444); MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link."); -MODULE_PARM_SYNTAX(spdif_aclink, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); /* @@ -197,7 +191,6 @@ #define ATI_REG_DMA_STATE (7U<<26) -#define ATI_MEM_REGION 256 /* i/o memory size */ #define ATI_MAX_DESCRIPTORS 256 /* max number of descriptor packets */ @@ -207,7 +200,6 @@ typedef struct snd_atiixp atiixp_t; typedef struct snd_atiixp_dma atiixp_dma_t; typedef struct snd_atiixp_dma_ops atiixp_dma_ops_t; -#define chip_t atiixp_t /* @@ -248,7 +240,6 @@ */ struct snd_atiixp_dma { const atiixp_dma_ops_t *ops; - struct snd_dma_device desc_dev; struct snd_dma_buffer desc_buf; snd_pcm_substream_t *substream; /* assigned PCM substream */ unsigned int buf_addr, buf_bytes; /* DMA buffer address, bytes */ @@ -266,7 +257,6 @@ snd_card_t *card; struct pci_dev *pci; - struct resource *res; /* memory i/o */ unsigned long addr; unsigned long remap_addr; int irq; @@ -287,10 +277,6 @@ int spdif_over_aclink; /* passed from the module option */ struct semaphore open_mutex; /* playback open mutex */ - -#ifdef CONFIG_PM - u32 pci_state[16]; -#endif }; @@ -299,6 +285,7 @@ static struct pci_device_id snd_atiixp_ids[] = { { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ + { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ { 0, } }; @@ -376,15 +363,13 @@ return -ENOMEM; if (dma->desc_buf.area == NULL) { - memset(&dma->desc_dev, 0, sizeof(dma->desc_dev)); - dma->desc_dev.type = SNDRV_DMA_TYPE_DEV; - dma->desc_dev.dev = snd_dma_pci_data(chip->pci); - if (snd_dma_alloc_pages(&dma->desc_dev, ATI_DESC_LIST_SIZE, &dma->desc_buf) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + ATI_DESC_LIST_SIZE, &dma->desc_buf) < 0) return -ENOMEM; dma->period_bytes = dma->periods = 0; /* clear */ } - if (dma->periods == dma->periods && dma->period_bytes == period_bytes) + if (dma->periods == periods && dma->period_bytes == period_bytes) return 0; /* reset DMA before changing the descriptor table */ @@ -426,7 +411,7 @@ { if (dma->desc_buf.area) { writel(0, chip->remap_addr + dma->ops->llp_offset); - snd_dma_free_pages(&dma->desc_dev, &dma->desc_buf); + snd_dma_free_pages(&dma->desc_buf); dma->desc_buf.area = NULL; } } @@ -491,7 +476,7 @@ static unsigned short snd_atiixp_ac97_read(ac97_t *ac97, unsigned short reg) { - atiixp_t *chip = snd_magic_cast(atiixp_t, ac97->private_data, return 0xffff); + atiixp_t *chip = ac97->private_data; unsigned short data; spin_lock(&chip->ac97_lock); data = snd_atiixp_codec_read(chip, ac97->num, reg); @@ -502,7 +487,7 @@ static void snd_atiixp_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - atiixp_t *chip = snd_magic_cast(atiixp_t, ac97->private_data, return); + atiixp_t *chip = ac97->private_data; spin_lock(&chip->ac97_lock); snd_atiixp_codec_write(chip, ac97->num, reg, val); spin_unlock(&chip->ac97_lock); @@ -653,9 +638,8 @@ snd_pcm_runtime_t *runtime = substream->runtime; atiixp_dma_t *dma = (atiixp_dma_t *)runtime->private_data; unsigned int curptr; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); curptr = readl(chip->remap_addr + dma->ops->dt_cur); if (curptr < dma->buf_addr) { snd_printdd("curptr = %x, base = %x\n", curptr, dma->buf_addr); @@ -667,7 +651,7 @@ curptr = 0; } } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return bytes_to_frames(runtime, curptr); } @@ -852,7 +836,7 @@ { atiixp_t *chip = snd_pcm_substream_chip(substream); - spin_lock(&chip->reg_lock); + spin_lock_irq(&chip->reg_lock); if (chip->spdif_over_aclink) { unsigned int data; /* enable slots 10/11 */ @@ -870,7 +854,7 @@ atiixp_update(chip, CMD, ATI_REG_CMD_SPDF_CONFIG_MASK, 0); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_SPDF, 0); } - spin_unlock(&chip->reg_lock); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -880,7 +864,7 @@ atiixp_t *chip = snd_pcm_substream_chip(substream); unsigned int data; - spin_lock(&chip->reg_lock); + spin_lock_irq(&chip->reg_lock); data = atiixp_read(chip, OUT_DMA_SLOT) & ~ATI_REG_OUT_DMA_SLOT_MASK; switch (substream->runtime->channels) { case 8: @@ -915,7 +899,7 @@ atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN, substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0); - spin_unlock(&chip->reg_lock); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -924,11 +908,11 @@ { atiixp_t *chip = snd_pcm_substream_chip(substream); - spin_lock(&chip->reg_lock); + spin_lock_irq(&chip->reg_lock); atiixp_update(chip, CMD, ATI_REG_CMD_INTERLEAVE_IN, substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? ATI_REG_CMD_INTERLEAVE_IN : 0); - spin_unlock(&chip->reg_lock); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -996,6 +980,7 @@ { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID), .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .rates = SNDRV_PCM_RATE_48000, @@ -1014,7 +999,6 @@ { atiixp_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - unsigned long flags; int err; snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); @@ -1036,9 +1020,9 @@ runtime->private_data = dma; /* enable DMA bits */ - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); dma->ops->enable_dma(chip, 1); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); dma->opened = 1; return 0; @@ -1308,7 +1292,7 @@ */ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - atiixp_t *chip = snd_magic_cast(atiixp_t, dev_id, return IRQ_NONE); + atiixp_t *chip = dev_id; unsigned int status; status = atiixp_read(chip, ISR); @@ -1355,10 +1339,14 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; int i, err; int codec_count; + static ac97_bus_ops_t ops = { + .write = snd_atiixp_ac97_write, + .read = snd_atiixp_ac97_read, + }; static unsigned int codec_skip[NUM_ATI_CODECS] = { ATI_REG_ISR_CODEC0_NOT_READY, ATI_REG_ISR_CODEC1_NOT_READY, @@ -1368,13 +1356,10 @@ if (snd_atiixp_codec_detect(chip) < 0) return -ENXIO; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_atiixp_ac97_write; - bus.read = snd_atiixp_ac97_read; - bus.private_data = chip; - bus.clock = clock; - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) return err; + pbus->clock = clock; + pbus->shared_type = AC97_SHARED_TYPE_ATIIXP; /* shared with modem driver */ chip->ac97_bus = pbus; codec_count = 0; @@ -1387,17 +1372,9 @@ ac97.num = i; ac97.scaps = AC97_SCAP_SKIP_MODEM; if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { - if (chip->codec_not_ready_bits) - /* codec(s) was detected but not available. - * return the error - */ - return err; - else { - /* codec(s) was NOT detected, so just ignore here */ - chip->ac97[i] = NULL; /* to be sure */ - snd_printd("atiixp: codec %d not found\n", i); - continue; - } + chip->ac97[i] = NULL; /* to be sure */ + snd_printdd("atiixp: codec %d not available for audio\n", i); + continue; } codec_count++; } @@ -1419,7 +1396,7 @@ */ static int snd_atiixp_suspend(snd_card_t *card, unsigned int state) { - atiixp_t *chip = snd_magic_cast(atiixp_t, card->pm_private_data, return -EINVAL); + atiixp_t *chip = card->pm_private_data; int i; for (i = 0; i < NUM_ATI_PCMDEVS; i++) @@ -1431,7 +1408,6 @@ snd_atiixp_aclink_down(chip); snd_atiixp_chip_stop(chip); - pci_save_state(chip->pci, chip->pci_state); pci_set_power_state(chip->pci, 3); pci_disable_device(chip->pci); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1440,11 +1416,10 @@ static int snd_atiixp_resume(snd_card_t *card, unsigned int state) { - atiixp_t *chip = snd_magic_cast(atiixp_t, card->pm_private_data, return -EINVAL); + atiixp_t *chip = card->pm_private_data; int i; pci_enable_device(chip->pci); - pci_restore_state(chip->pci, chip->pci_state); pci_set_power_state(chip->pci, 0); snd_atiixp_aclink_reset(chip); @@ -1466,7 +1441,7 @@ static void snd_atiixp_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - atiixp_t *chip = snd_magic_cast(atiixp_t, entry->private_data, return); + atiixp_t *chip = entry->private_data; int i; for (i = 0; i < 256; i += 4) @@ -1494,21 +1469,18 @@ snd_atiixp_chip_stop(chip); synchronize_irq(chip->irq); __hw_end: - if (chip->remap_addr) - iounmap((void *) chip->remap_addr); - if (chip->res) { - release_resource(chip->res); - kfree_nocheck(chip->res); - } if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); - snd_magic_kfree(chip); + if (chip->remap_addr) + iounmap((void *) chip->remap_addr); + pci_release_regions(chip->pci); + kfree(chip); return 0; } static int snd_atiixp_dev_free(snd_device_t *device) { - atiixp_t *chip = snd_magic_cast(atiixp_t, device->device_data, return -ENXIO); + atiixp_t *chip = device->device_data; return snd_atiixp_free(chip); } @@ -1528,7 +1500,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(atiixp_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; @@ -1538,13 +1510,12 @@ chip->card = card; chip->pci = pci; chip->irq = -1; - chip->addr = pci_resource_start(pci, 0); - if ((chip->res = request_mem_region(chip->addr, ATI_MEM_REGION, "ATI IXP AC97")) == NULL) { - snd_printk(KERN_ERR "unable to grab I/O memory 0x%lx\n", chip->addr); - snd_atiixp_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, "ATI IXP AC97")) < 0) { + kfree(chip); + return err; } - chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, ATI_MEM_REGION); + chip->addr = pci_resource_start(pci, 0); + chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); if (chip->remap_addr == 0) { snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); snd_atiixp_free(chip); diff -Nru a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/atiixp_modem.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1351 @@ +/* + * ALSA driver for ATI IXP 150/200/250 AC97 modem controllers + * + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MODULE_AUTHOR("Takashi Iwai "); +MODULE_DESCRIPTION("ATI IXP MC97 controller"); +MODULE_LICENSE("GPL"); +MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250}}"); + +static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ +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 ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000}; +static int boot_devs; + +module_param_array(index, int, boot_devs, 0444); +MODULE_PARM_DESC(index, "Index value for ATI IXP controller."); +module_param_array(id, charp, boot_devs, 0444); +MODULE_PARM_DESC(id, "ID string for ATI IXP controller."); +module_param_array(enable, bool, boot_devs, 0444); +MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller."); +module_param_array(ac97_clock, int, boot_devs, 0444); +MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); + + +/* + */ + +#define ATI_REG_ISR 0x00 /* interrupt source */ +#define ATI_REG_ISR_MODEM_IN_XRUN (1U<<0) +#define ATI_REG_ISR_MODEM_IN_STATUS (1U<<1) +#define ATI_REG_ISR_MODEM_OUT1_XRUN (1U<<2) +#define ATI_REG_ISR_MODEM_OUT1_STATUS (1U<<3) +#define ATI_REG_ISR_MODEM_OUT2_XRUN (1U<<4) +#define ATI_REG_ISR_MODEM_OUT2_STATUS (1U<<5) +#define ATI_REG_ISR_MODEM_OUT3_XRUN (1U<<6) +#define ATI_REG_ISR_MODEM_OUT3_STATUS (1U<<7) +#define ATI_REG_ISR_PHYS_INTR (1U<<8) +#define ATI_REG_ISR_PHYS_MISMATCH (1U<<9) +#define ATI_REG_ISR_CODEC0_NOT_READY (1U<<10) +#define ATI_REG_ISR_CODEC1_NOT_READY (1U<<11) +#define ATI_REG_ISR_CODEC2_NOT_READY (1U<<12) +#define ATI_REG_ISR_NEW_FRAME (1U<<13) +#define ATI_REG_ISR_MODEM_GPIO_DATA (1U<<14) + +#define ATI_REG_IER 0x04 /* interrupt enable */ +#define ATI_REG_IER_MODEM_IN_XRUN_EN (1U<<0) +#define ATI_REG_IER_MODEM_STATUS_EN (1U<<1) +#define ATI_REG_IER_MODEM_OUT1_XRUN_EN (1U<<2) +#define ATI_REG_IER_MODEM_OUT2_XRUN_EN (1U<<4) +#define ATI_REG_IER_MODEM_OUT3_XRUN_EN (1U<<6) +#define ATI_REG_IER_PHYS_INTR_EN (1U<<8) +#define ATI_REG_IER_PHYS_MISMATCH_EN (1U<<9) +#define ATI_REG_IER_CODEC0_INTR_EN (1U<<10) +#define ATI_REG_IER_CODEC1_INTR_EN (1U<<11) +#define ATI_REG_IER_CODEC2_INTR_EN (1U<<12) +#define ATI_REG_IER_NEW_FRAME_EN (1U<<13) /* (RO */ +#define ATI_REG_IER_MODEM_GPIO_DATA_EN (1U<<14) /* (WO) modem is running */ +#define ATI_REG_IER_MODEM_SET_BUS_BUSY (1U<<15) + +#define ATI_REG_CMD 0x08 /* command */ +#define ATI_REG_CMD_POWERDOWN (1U<<0) +#define ATI_REG_CMD_MODEM_RECEIVE_EN (1U<<1) /* modem only */ +#define ATI_REG_CMD_MODEM_SEND1_EN (1U<<2) /* modem only */ +#define ATI_REG_CMD_MODEM_SEND2_EN (1U<<3) /* modem only */ +#define ATI_REG_CMD_MODEM_SEND3_EN (1U<<4) /* modem only */ +#define ATI_REG_CMD_MODEM_STATUS_MEM (1U<<5) /* modem only */ +#define ATI_REG_CMD_MODEM_IN_DMA_EN (1U<<8) /* modem only */ +#define ATI_REG_CMD_MODEM_OUT_DMA1_EN (1U<<9) /* modem only */ +#define ATI_REG_CMD_MODEM_OUT_DMA2_EN (1U<<10) /* modem only */ +#define ATI_REG_CMD_MODEM_OUT_DMA3_EN (1U<<11) /* modem only */ +#define ATI_REG_CMD_AUDIO_PRESENT (1U<<20) +#define ATI_REG_CMD_MODEM_GPIO_THRU_DMA (1U<<22) /* modem only */ +#define ATI_REG_CMD_LOOPBACK_EN (1U<<23) +#define ATI_REG_CMD_PACKED_DIS (1U<<24) +#define ATI_REG_CMD_BURST_EN (1U<<25) +#define ATI_REG_CMD_PANIC_EN (1U<<26) +#define ATI_REG_CMD_MODEM_PRESENT (1U<<27) +#define ATI_REG_CMD_ACLINK_ACTIVE (1U<<28) +#define ATI_REG_CMD_AC_SOFT_RESET (1U<<29) +#define ATI_REG_CMD_AC_SYNC (1U<<30) +#define ATI_REG_CMD_AC_RESET (1U<<31) + +#define ATI_REG_PHYS_OUT_ADDR 0x0c +#define ATI_REG_PHYS_OUT_CODEC_MASK (3U<<0) +#define ATI_REG_PHYS_OUT_RW (1U<<2) +#define ATI_REG_PHYS_OUT_ADDR_EN (1U<<8) +#define ATI_REG_PHYS_OUT_ADDR_SHIFT 9 +#define ATI_REG_PHYS_OUT_DATA_SHIFT 16 + +#define ATI_REG_PHYS_IN_ADDR 0x10 +#define ATI_REG_PHYS_IN_READ_FLAG (1U<<8) +#define ATI_REG_PHYS_IN_ADDR_SHIFT 9 +#define ATI_REG_PHYS_IN_DATA_SHIFT 16 + +#define ATI_REG_SLOTREQ 0x14 + +#define ATI_REG_COUNTER 0x18 +#define ATI_REG_COUNTER_SLOT (3U<<0) /* slot # */ +#define ATI_REG_COUNTER_BITCLOCK (31U<<8) + +#define ATI_REG_IN_FIFO_THRESHOLD 0x1c + +#define ATI_REG_MODEM_IN_DMA_LINKPTR 0x20 +#define ATI_REG_MODEM_IN_DMA_DT_START 0x24 /* RO */ +#define ATI_REG_MODEM_IN_DMA_DT_NEXT 0x28 /* RO */ +#define ATI_REG_MODEM_IN_DMA_DT_CUR 0x2c /* RO */ +#define ATI_REG_MODEM_IN_DMA_DT_SIZE 0x30 +#define ATI_REG_MODEM_OUT_FIFO 0x34 /* output threshold */ +#define ATI_REG_MODEM_OUT1_DMA_THRESHOLD_MASK (0xf<<16) +#define ATI_REG_MODEM_OUT1_DMA_THRESHOLD_SHIFT 16 +#define ATI_REG_MODEM_OUT_DMA1_LINKPTR 0x38 +#define ATI_REG_MODEM_OUT_DMA2_LINKPTR 0x3c +#define ATI_REG_MODEM_OUT_DMA3_LINKPTR 0x40 +#define ATI_REG_MODEM_OUT_DMA1_DT_START 0x44 +#define ATI_REG_MODEM_OUT_DMA1_DT_NEXT 0x48 +#define ATI_REG_MODEM_OUT_DMA1_DT_CUR 0x4c +#define ATI_REG_MODEM_OUT_DMA2_DT_START 0x50 +#define ATI_REG_MODEM_OUT_DMA2_DT_NEXT 0x54 +#define ATI_REG_MODEM_OUT_DMA2_DT_CUR 0x58 +#define ATI_REG_MODEM_OUT_DMA3_DT_START 0x5c +#define ATI_REG_MODEM_OUT_DMA3_DT_NEXT 0x60 +#define ATI_REG_MODEM_OUT_DMA3_DT_CUR 0x64 +#define ATI_REG_MODEM_OUT_DMA12_DT_SIZE 0x68 +#define ATI_REG_MODEM_OUT_DMA3_DT_SIZE 0x6c +#define ATI_REG_MODEM_OUT_FIFO_USED 0x70 +#define ATI_REG_MODEM_OUT_GPIO 0x74 +#define ATI_REG_MODEM_OUT_GPIO_EN 1 +#define ATI_REG_MODEM_OUT_GPIO_DATA_SHIFT 5 +#define ATI_REG_MODEM_IN_GPIO 0x78 + +#define ATI_REG_MODEM_MIRROR 0x7c +#define ATI_REG_AUDIO_MIRROR 0x80 + +#define ATI_REG_MODEM_FIFO_FLUSH 0x88 +#define ATI_REG_MODEM_FIFO_OUT1_FLUSH (1U<<0) +#define ATI_REG_MODEM_FIFO_OUT2_FLUSH (1U<<1) +#define ATI_REG_MODEM_FIFO_OUT3_FLUSH (1U<<2) +#define ATI_REG_MODEM_FIFO_IN_FLUSH (1U<<3) + +/* LINKPTR */ +#define ATI_REG_LINKPTR_EN (1U<<0) + +#define ATI_MAX_DESCRIPTORS 256 /* max number of descriptor packets */ + + +/* + */ + +typedef struct snd_atiixp atiixp_t; +typedef struct snd_atiixp_dma atiixp_dma_t; +typedef struct snd_atiixp_dma_ops atiixp_dma_ops_t; + + +/* + * DMA packate descriptor + */ + +typedef struct atiixp_dma_desc { + u32 addr; /* DMA buffer address */ + u16 status; /* status bits */ + u16 size; /* size of the packet in dwords */ + u32 next; /* address of the next packet descriptor */ +} atiixp_dma_desc_t; + +/* + * stream enum + */ +enum { ATI_DMA_PLAYBACK, ATI_DMA_CAPTURE, NUM_ATI_DMAS }; /* DMAs */ +enum { ATI_PCM_OUT, ATI_PCM_IN, NUM_ATI_PCMS }; /* AC97 pcm slots */ +enum { ATI_PCMDEV_ANALOG, NUM_ATI_PCMDEVS }; /* pcm devices */ + +#define NUM_ATI_CODECS 3 + + +/* + * constants and callbacks for each DMA type + */ +struct snd_atiixp_dma_ops { + int type; /* ATI_DMA_XXX */ + unsigned int llp_offset; /* LINKPTR offset */ + unsigned int dt_cur; /* DT_CUR offset */ + void (*enable_dma)(atiixp_t *chip, int on); /* called from open callback */ + void (*enable_transfer)(atiixp_t *chip, int on); /* called from trigger (START/STOP) */ + void (*flush_dma)(atiixp_t *chip); /* called from trigger (STOP only) */ +}; + +/* + * DMA stream + */ +struct snd_atiixp_dma { + const atiixp_dma_ops_t *ops; + struct snd_dma_buffer desc_buf; + snd_pcm_substream_t *substream; /* assigned PCM substream */ + unsigned int buf_addr, buf_bytes; /* DMA buffer address, bytes */ + unsigned int period_bytes, periods; + int opened; + int running; + int pcm_open_flag; + int ac97_pcm_type; /* index # of ac97_pcm to access, -1 = not used */ +}; + +/* + * ATI IXP chip + */ +struct snd_atiixp { + snd_card_t *card; + struct pci_dev *pci; + + struct resource *res; /* memory i/o */ + unsigned long addr; + unsigned long remap_addr; + int irq; + + ac97_bus_t *ac97_bus; + ac97_t *ac97[NUM_ATI_CODECS]; + + spinlock_t reg_lock; + spinlock_t ac97_lock; + + atiixp_dma_t dmas[NUM_ATI_DMAS]; + struct ac97_pcm *pcms[NUM_ATI_PCMS]; + snd_pcm_t *pcmdevs[NUM_ATI_PCMDEVS]; + + int max_channels; /* max. channels for PCM out */ + + unsigned int codec_not_ready_bits; /* for codec detection */ + + int spdif_over_aclink; /* passed from the module option */ + struct semaphore open_mutex; /* playback open mutex */ +}; + + +/* + */ +static struct pci_device_id snd_atiixp_ids[] = { + { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ + { 0, } +}; + +MODULE_DEVICE_TABLE(pci, snd_atiixp_ids); + + +/* + * lowlevel functions + */ + +/* + * update the bits of the given register. + * return 1 if the bits changed. + */ +static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg, + unsigned int mask, unsigned int value) +{ + unsigned long addr = chip->remap_addr + reg; + unsigned int data, old_data; + old_data = data = readl(addr); + data &= ~mask; + data |= value; + if (old_data == data) + return 0; + writel(data, addr); + return 1; +} + +/* + * macros for easy use + */ +#define atiixp_write(chip,reg,value) \ + writel(value, chip->remap_addr + ATI_REG_##reg) +#define atiixp_read(chip,reg) \ + readl(chip->remap_addr + ATI_REG_##reg) +#define atiixp_update(chip,reg,mask,val) \ + snd_atiixp_update_bits(chip, ATI_REG_##reg, mask, val) + +/* delay for one tick */ +#define do_delay() do { \ + set_current_state(TASK_UNINTERRUPTIBLE); \ + schedule_timeout(1); \ +} while (0) + + +/* + * handling DMA packets + * + * we allocate a linear buffer for the DMA, and split it to each packet. + * in a future version, a scatter-gather buffer should be implemented. + */ + +#define ATI_DESC_LIST_SIZE \ + PAGE_ALIGN(ATI_MAX_DESCRIPTORS * sizeof(atiixp_dma_desc_t)) + +/* + * build packets ring for the given buffer size. + * + * IXP handles the buffer descriptors, which are connected as a linked + * list. although we can change the list dynamically, in this version, + * a static RING of buffer descriptors is used. + * + * the ring is built in this function, and is set up to the hardware. + */ +static int atiixp_build_dma_packets(atiixp_t *chip, atiixp_dma_t *dma, + snd_pcm_substream_t *substream, + unsigned int periods, + unsigned int period_bytes) +{ + unsigned int i; + u32 addr, desc_addr; + unsigned long flags; + + if (periods > ATI_MAX_DESCRIPTORS) + return -ENOMEM; + + if (dma->desc_buf.area == NULL) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + ATI_DESC_LIST_SIZE, &dma->desc_buf) < 0) + return -ENOMEM; + dma->period_bytes = dma->periods = 0; /* clear */ + } + + if (dma->periods == periods && dma->period_bytes == period_bytes) + return 0; + + /* reset DMA before changing the descriptor table */ + spin_lock_irqsave(&chip->reg_lock, flags); + writel(0, chip->remap_addr + dma->ops->llp_offset); + dma->ops->enable_dma(chip, 0); + dma->ops->enable_dma(chip, 1); + spin_unlock_irqrestore(&chip->reg_lock, flags); + + /* fill the entries */ + addr = (u32)substream->runtime->dma_addr; + desc_addr = (u32)dma->desc_buf.addr; + for (i = 0; i < periods; i++) { + atiixp_dma_desc_t *desc = &((atiixp_dma_desc_t *)dma->desc_buf.area)[i]; + desc->addr = cpu_to_le32(addr); + desc->status = 0; + desc->size = period_bytes >> 2; /* in dwords */ + desc_addr += sizeof(atiixp_dma_desc_t); + if (i == periods - 1) + desc->next = cpu_to_le32((u32)dma->desc_buf.addr); + else + desc->next = cpu_to_le32(desc_addr); + addr += period_bytes; + } + + writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, + chip->remap_addr + dma->ops->llp_offset); + + dma->period_bytes = period_bytes; + dma->periods = periods; + + return 0; +} + +/* + * remove the ring buffer and release it if assigned + */ +static void atiixp_clear_dma_packets(atiixp_t *chip, atiixp_dma_t *dma, snd_pcm_substream_t *substream) +{ + if (dma->desc_buf.area) { + writel(0, chip->remap_addr + dma->ops->llp_offset); + snd_dma_free_pages(&dma->desc_buf); + dma->desc_buf.area = NULL; + } +} + +/* + * AC97 interface + */ +static int snd_atiixp_acquire_codec(atiixp_t *chip) +{ + int timeout = 1000; + + while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { + if (! timeout--) { + snd_printk(KERN_WARNING "atiixp: codec acquire timeout\n"); + return -EBUSY; + } + udelay(1); + } + return 0; +} + +static unsigned short snd_atiixp_codec_read(atiixp_t *chip, unsigned short codec, unsigned short reg) +{ + unsigned int data; + int timeout; + + if (snd_atiixp_acquire_codec(chip) < 0) + return 0xffff; + data = (reg << ATI_REG_PHYS_OUT_ADDR_SHIFT) | + ATI_REG_PHYS_OUT_ADDR_EN | + ATI_REG_PHYS_OUT_RW | + codec; + atiixp_write(chip, PHYS_OUT_ADDR, data); + if (snd_atiixp_acquire_codec(chip) < 0) + return 0xffff; + timeout = 1000; + do { + data = atiixp_read(chip, PHYS_IN_ADDR); + if (data & ATI_REG_PHYS_IN_READ_FLAG) + return data >> ATI_REG_PHYS_IN_DATA_SHIFT; + udelay(1); + } while (--timeout); + /* time out may happen during reset */ + if (reg < 0x7c) + snd_printk(KERN_WARNING "atiixp: codec read timeout (reg %x)\n", reg); + return 0xffff; +} + + +static void snd_atiixp_codec_write(atiixp_t *chip, unsigned short codec, unsigned short reg, unsigned short val) +{ + unsigned int data; + + if (snd_atiixp_acquire_codec(chip) < 0) + return; + data = ((unsigned int)val << ATI_REG_PHYS_OUT_DATA_SHIFT) | + ((unsigned int)reg << ATI_REG_PHYS_OUT_ADDR_SHIFT) | + ATI_REG_PHYS_OUT_ADDR_EN | codec; + atiixp_write(chip, PHYS_OUT_ADDR, data); +} + + +static unsigned short snd_atiixp_ac97_read(ac97_t *ac97, unsigned short reg) +{ + atiixp_t *chip = ac97->private_data; + unsigned short data; + spin_lock(&chip->ac97_lock); + data = snd_atiixp_codec_read(chip, ac97->num, reg); + spin_unlock(&chip->ac97_lock); + return data; + +} + +static void snd_atiixp_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) +{ + atiixp_t *chip = ac97->private_data; + spin_lock(&chip->ac97_lock); + snd_atiixp_codec_write(chip, ac97->num, reg, val); + spin_unlock(&chip->ac97_lock); +} + +/* + * reset AC link + */ +static int snd_atiixp_aclink_reset(atiixp_t *chip) +{ + int timeout; + + /* reset powerdoewn */ + if (atiixp_update(chip, CMD, ATI_REG_CMD_POWERDOWN, 0)) + udelay(10); + + /* perform a software reset */ + atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, ATI_REG_CMD_AC_SOFT_RESET); + atiixp_read(chip, CMD); + udelay(10); + atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0); + + timeout = 10; + while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) { + /* do a hard reset */ + atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, + ATI_REG_CMD_AC_SYNC); + atiixp_read(chip, CMD); + do_delay(); + atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); + if (--timeout) { + snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); + break; + } + } + + /* deassert RESET and assert SYNC to make sure */ + atiixp_update(chip, CMD, ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET, + ATI_REG_CMD_AC_SYNC|ATI_REG_CMD_AC_RESET); + + return 0; +} + +#ifdef CONFIG_PM +static int snd_atiixp_aclink_down(atiixp_t *chip) +{ + // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ + // return -EBUSY; + atiixp_update(chip, CMD, + ATI_REG_CMD_POWERDOWN | ATI_REG_CMD_AC_RESET, + ATI_REG_CMD_POWERDOWN); + return 0; +} +#endif + +/* + * auto-detection of codecs + * + * the IXP chip can generate interrupts for the non-existing codecs. + * NEW_FRAME interrupt is used to make sure that the interrupt is generated + * even if all three codecs are connected. + */ + +#define ALL_CODEC_NOT_READY \ + (ATI_REG_ISR_CODEC0_NOT_READY |\ + ATI_REG_ISR_CODEC1_NOT_READY |\ + ATI_REG_ISR_CODEC2_NOT_READY) +#define CODEC_CHECK_BITS (ALL_CODEC_NOT_READY|ATI_REG_ISR_NEW_FRAME) + +static int snd_atiixp_codec_detect(atiixp_t *chip) +{ + int timeout; + + chip->codec_not_ready_bits = 0; + atiixp_write(chip, IER, CODEC_CHECK_BITS); + /* wait for the interrupts */ + timeout = HZ / 10; + while (timeout-- > 0) { + do_delay(); + if (chip->codec_not_ready_bits) + break; + } + atiixp_write(chip, IER, 0); /* disable irqs */ + + if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { + snd_printk(KERN_ERR "atiixp: no codec detected!\n"); + return -ENXIO; + } + return 0; +} + + +/* + * enable DMA and irqs + */ +static int snd_atiixp_chip_start(atiixp_t *chip) +{ + unsigned int reg; + + /* set up spdif, enable burst mode */ + reg = atiixp_read(chip, CMD); + reg |= ATI_REG_CMD_BURST_EN; + if(!(reg & ATI_REG_CMD_MODEM_PRESENT)) + reg |= ATI_REG_CMD_MODEM_PRESENT; + atiixp_write(chip, CMD, reg); + + /* clear all interrupt source */ + atiixp_write(chip, ISR, 0xffffffff); + /* enable irqs */ + atiixp_write(chip, IER, + ATI_REG_IER_MODEM_STATUS_EN | + ATI_REG_IER_MODEM_IN_XRUN_EN | + ATI_REG_IER_MODEM_OUT1_XRUN_EN); + return 0; +} + + +/* + * disable DMA and IRQs + */ +static int snd_atiixp_chip_stop(atiixp_t *chip) +{ + /* clear interrupt source */ + atiixp_write(chip, ISR, atiixp_read(chip, ISR)); + /* disable irqs */ + atiixp_write(chip, IER, 0); + return 0; +} + + +/* + * PCM section + */ + +/* + * pointer callback simplly reads XXX_DMA_DT_CUR register as the current + * position. when SG-buffer is implemented, the offset must be calculated + * correctly... + */ +static snd_pcm_uframes_t snd_atiixp_pcm_pointer(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + atiixp_dma_t *dma = (atiixp_dma_t *)runtime->private_data; + unsigned int curptr; + + spin_lock(&chip->reg_lock); + curptr = readl(chip->remap_addr + dma->ops->dt_cur); + if (curptr < dma->buf_addr) { + snd_printdd("curptr = %x, base = %x\n", curptr, dma->buf_addr); + curptr = 0; + } else { + curptr -= dma->buf_addr; + if (curptr >= dma->buf_bytes) { + snd_printdd("curptr = %x, size = %x\n", curptr, dma->buf_bytes); + curptr = 0; + } + } + spin_unlock(&chip->reg_lock); + return bytes_to_frames(runtime, curptr); +} + +/* + * XRUN detected, and stop the PCM substream + */ +static void snd_atiixp_xrun_dma(atiixp_t *chip, atiixp_dma_t *dma) +{ + if (! dma->substream || ! dma->running) + return; + snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type); + snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); +} + +/* + * the period ack. update the substream. + */ +static void snd_atiixp_update_dma(atiixp_t *chip, atiixp_dma_t *dma) +{ + if (! dma->substream || ! dma->running) + return; + snd_pcm_period_elapsed(dma->substream); +} + +/* set BUS_BUSY interrupt bit if any DMA is running */ +/* call with spinlock held */ +static void snd_atiixp_check_bus_busy(atiixp_t *chip) +{ + unsigned int bus_busy; + if (atiixp_read(chip, CMD) & (ATI_REG_CMD_MODEM_SEND1_EN | + ATI_REG_CMD_MODEM_RECEIVE_EN)) + bus_busy = ATI_REG_IER_MODEM_SET_BUS_BUSY; + else + bus_busy = 0; + atiixp_update(chip, IER, ATI_REG_IER_MODEM_SET_BUS_BUSY, bus_busy); +} + +/* common trigger callback + * calling the lowlevel callbacks in it + */ +static int snd_atiixp_pcm_trigger(snd_pcm_substream_t *substream, int cmd) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + atiixp_dma_t *dma = (atiixp_dma_t *)substream->runtime->private_data; + unsigned int reg = 0; + int i; + + snd_assert(dma->ops->enable_transfer && dma->ops->flush_dma, return -EINVAL); + + if (cmd != SNDRV_PCM_TRIGGER_START && cmd != SNDRV_PCM_TRIGGER_STOP) + return -EINVAL; + + spin_lock(&chip->reg_lock); + + /* hook off/on: via GPIO_OUT */ + for (i = 0; i < NUM_ATI_CODECS; i++) { + if (chip->ac97[i]) { + reg = snd_ac97_read(chip->ac97[i], AC97_GPIO_STATUS); + break; + } + } + if(cmd == SNDRV_PCM_TRIGGER_START) + reg |= AC97_GPIO_LINE1_OH; + else + reg &= ~AC97_GPIO_LINE1_OH; + reg = (reg << ATI_REG_MODEM_OUT_GPIO_DATA_SHIFT) | ATI_REG_MODEM_OUT_GPIO_EN ; + atiixp_write(chip, MODEM_OUT_GPIO, reg); + + if (cmd == SNDRV_PCM_TRIGGER_START) { + dma->ops->enable_transfer(chip, 1); + dma->running = 1; + } else { + dma->ops->enable_transfer(chip, 0); + dma->running = 0; + } + snd_atiixp_check_bus_busy(chip); + if (cmd == SNDRV_PCM_TRIGGER_STOP) { + dma->ops->flush_dma(chip); + snd_atiixp_check_bus_busy(chip); + } + spin_unlock(&chip->reg_lock); + return 0; +} + + +/* + * lowlevel callbacks for each DMA type + * + * every callback is supposed to be called in chip->reg_lock spinlock + */ + +/* flush FIFO of analog OUT DMA */ +static void atiixp_out_flush_dma(atiixp_t *chip) +{ + atiixp_write(chip, MODEM_FIFO_FLUSH, ATI_REG_MODEM_FIFO_OUT1_FLUSH); +} + +/* enable/disable analog OUT DMA */ +static void atiixp_out_enable_dma(atiixp_t *chip, int on) +{ + unsigned int data; + data = atiixp_read(chip, CMD); + if (on) { + if (data & ATI_REG_CMD_MODEM_OUT_DMA1_EN) + return; + atiixp_out_flush_dma(chip); + data |= ATI_REG_CMD_MODEM_OUT_DMA1_EN; + } else + data &= ~ATI_REG_CMD_MODEM_OUT_DMA1_EN; + atiixp_write(chip, CMD, data); +} + +/* start/stop transfer over OUT DMA */ +static void atiixp_out_enable_transfer(atiixp_t *chip, int on) +{ + atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_SEND1_EN, + on ? ATI_REG_CMD_MODEM_SEND1_EN : 0); +} + +/* enable/disable analog IN DMA */ +static void atiixp_in_enable_dma(atiixp_t *chip, int on) +{ + atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_IN_DMA_EN, + on ? ATI_REG_CMD_MODEM_IN_DMA_EN : 0); +} + +/* start/stop analog IN DMA */ +static void atiixp_in_enable_transfer(atiixp_t *chip, int on) +{ + if (on) { + unsigned int data = atiixp_read(chip, CMD); + if (! (data & ATI_REG_CMD_MODEM_RECEIVE_EN)) { + data |= ATI_REG_CMD_MODEM_RECEIVE_EN; + atiixp_write(chip, CMD, data); + } + } else + atiixp_update(chip, CMD, ATI_REG_CMD_MODEM_RECEIVE_EN, 0); +} + +/* flush FIFO of analog IN DMA */ +static void atiixp_in_flush_dma(atiixp_t *chip) +{ + atiixp_write(chip, MODEM_FIFO_FLUSH, ATI_REG_MODEM_FIFO_IN_FLUSH); +} + +/* set up slots and formats for analog OUT */ +static int snd_atiixp_playback_prepare(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + unsigned int data; + + spin_lock_irq(&chip->reg_lock); + /* set output threshold */ + data = atiixp_read(chip, MODEM_OUT_FIFO); + data &= ~ATI_REG_MODEM_OUT1_DMA_THRESHOLD_MASK; + data |= 0x04 << ATI_REG_MODEM_OUT1_DMA_THRESHOLD_SHIFT; + atiixp_write(chip, MODEM_OUT_FIFO, data); + spin_unlock_irq(&chip->reg_lock); + return 0; +} + +/* set up slots and formats for analog IN */ +static int snd_atiixp_capture_prepare(snd_pcm_substream_t *substream) +{ + return 0; +} + +/* + * hw_params - allocate the buffer and set up buffer descriptors + */ +static int snd_atiixp_pcm_hw_params(snd_pcm_substream_t *substream, + snd_pcm_hw_params_t *hw_params) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + atiixp_dma_t *dma = (atiixp_dma_t *)substream->runtime->private_data; + int err; + int i; + + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + if (err < 0) + return err; + dma->buf_addr = substream->runtime->dma_addr; + dma->buf_bytes = params_buffer_bytes(hw_params); + + err = atiixp_build_dma_packets(chip, dma, substream, + params_periods(hw_params), + params_period_bytes(hw_params)); + if (err < 0) + return err; + + /* set up modem rate */ + for (i = 0; i < NUM_ATI_CODECS; i++) { + if (! chip->ac97[i]) + continue; + snd_ac97_write(chip->ac97[i], AC97_LINE1_RATE, params_rate(hw_params)); + snd_ac97_write(chip->ac97[i], AC97_LINE1_LEVEL, 0); + } + + return err; +} + +static int snd_atiixp_pcm_hw_free(snd_pcm_substream_t * substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + atiixp_dma_t *dma = (atiixp_dma_t *)substream->runtime->private_data; + + atiixp_clear_dma_packets(chip, dma, substream); + snd_pcm_lib_free_pages(substream); + return 0; +} + + +/* + * pcm hardware definition, identical for all DMA types + */ +static snd_pcm_hardware_t snd_atiixp_pcm_hw = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_KNOT, + .rate_min = 8000, + .rate_max = 16000, + .channels_min = 2, + .channels_max = 2, + .buffer_bytes_max = 256 * 1024, + .period_bytes_min = 32, + .period_bytes_max = 128 * 1024, + .periods_min = 2, + .periods_max = ATI_MAX_DESCRIPTORS, +}; + +static int snd_atiixp_pcm_open(snd_pcm_substream_t *substream, atiixp_dma_t *dma, int pcm_type) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + int err; + static unsigned int rates[] = { 8000, 9600, 12000, 16000 }; + static snd_pcm_hw_constraint_list_t hw_constraints_rates = { + .count = ARRAY_SIZE(rates), + .list = rates, + .mask = 0, + }; + + snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); + + if (dma->opened) + return -EBUSY; + dma->substream = substream; + runtime->hw = snd_atiixp_pcm_hw; + dma->ac97_pcm_type = pcm_type; + if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates)) < 0) + return err; + if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) + return err; + runtime->private_data = dma; + + /* enable DMA bits */ + spin_lock_irq(&chip->reg_lock); + dma->ops->enable_dma(chip, 1); + spin_unlock_irq(&chip->reg_lock); + dma->opened = 1; + + return 0; +} + +static int snd_atiixp_pcm_close(snd_pcm_substream_t *substream, atiixp_dma_t *dma) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + /* disable DMA bits */ + snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); + spin_lock_irq(&chip->reg_lock); + dma->ops->enable_dma(chip, 0); + spin_unlock_irq(&chip->reg_lock); + dma->substream = NULL; + dma->opened = 0; + return 0; +} + +/* + */ +static int snd_atiixp_playback_open(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + int err; + + down(&chip->open_mutex); + err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0); + up(&chip->open_mutex); + if (err < 0) + return err; + return 0; +} + +static int snd_atiixp_playback_close(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + int err; + down(&chip->open_mutex); + err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); + up(&chip->open_mutex); + return err; +} + +static int snd_atiixp_capture_open(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + return snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_CAPTURE], 1); +} + +static int snd_atiixp_capture_close(snd_pcm_substream_t *substream) +{ + atiixp_t *chip = snd_pcm_substream_chip(substream); + return snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_CAPTURE]); +} + + +/* AC97 playback */ +static snd_pcm_ops_t snd_atiixp_playback_ops = { + .open = snd_atiixp_playback_open, + .close = snd_atiixp_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_atiixp_pcm_hw_params, + .hw_free = snd_atiixp_pcm_hw_free, + .prepare = snd_atiixp_playback_prepare, + .trigger = snd_atiixp_pcm_trigger, + .pointer = snd_atiixp_pcm_pointer, +}; + +/* AC97 capture */ +static snd_pcm_ops_t snd_atiixp_capture_ops = { + .open = snd_atiixp_capture_open, + .close = snd_atiixp_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_atiixp_pcm_hw_params, + .hw_free = snd_atiixp_pcm_hw_free, + .prepare = snd_atiixp_capture_prepare, + .trigger = snd_atiixp_pcm_trigger, + .pointer = snd_atiixp_pcm_pointer, +}; + +static atiixp_dma_ops_t snd_atiixp_playback_dma_ops = { + .type = ATI_DMA_PLAYBACK, + .llp_offset = ATI_REG_MODEM_OUT_DMA1_LINKPTR, + .dt_cur = ATI_REG_MODEM_OUT_DMA1_DT_CUR, + .enable_dma = atiixp_out_enable_dma, + .enable_transfer = atiixp_out_enable_transfer, + .flush_dma = atiixp_out_flush_dma, +}; + +static atiixp_dma_ops_t snd_atiixp_capture_dma_ops = { + .type = ATI_DMA_CAPTURE, + .llp_offset = ATI_REG_MODEM_IN_DMA_LINKPTR, + .dt_cur = ATI_REG_MODEM_IN_DMA_DT_CUR, + .enable_dma = atiixp_in_enable_dma, + .enable_transfer = atiixp_in_enable_transfer, + .flush_dma = atiixp_in_flush_dma, +}; + +static int __devinit snd_atiixp_pcm_new(atiixp_t *chip) +{ + snd_pcm_t *pcm; + int err; + + /* initialize constants */ + chip->dmas[ATI_DMA_PLAYBACK].ops = &snd_atiixp_playback_dma_ops; + chip->dmas[ATI_DMA_CAPTURE].ops = &snd_atiixp_capture_dma_ops; + + /* PCM #0: analog I/O */ + err = snd_pcm_new(chip->card, "ATI IXP MC97", ATI_PCMDEV_ANALOG, 1, 1, &pcm); + if (err < 0) + return err; + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_atiixp_capture_ops); + pcm->private_data = chip; + strcpy(pcm->name, "ATI IXP MC97"); + chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), 64*1024, 128*1024); + + return 0; +} + + + +/* + * interrupt handler + */ +static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + atiixp_t *chip = dev_id; + unsigned int status; + + status = atiixp_read(chip, ISR); + + if (! status) + return IRQ_NONE; + + /* process audio DMA */ + if (status & ATI_REG_ISR_MODEM_OUT1_XRUN) + snd_atiixp_xrun_dma(chip, &chip->dmas[ATI_DMA_PLAYBACK]); + else if (status & ATI_REG_ISR_MODEM_OUT1_STATUS) + snd_atiixp_update_dma(chip, &chip->dmas[ATI_DMA_PLAYBACK]); + if (status & ATI_REG_ISR_MODEM_IN_XRUN) + snd_atiixp_xrun_dma(chip, &chip->dmas[ATI_DMA_CAPTURE]); + else if (status & ATI_REG_ISR_MODEM_IN_STATUS) + snd_atiixp_update_dma(chip, &chip->dmas[ATI_DMA_CAPTURE]); + + /* for codec detection */ + if (status & CODEC_CHECK_BITS) { + unsigned int detected; + detected = status & CODEC_CHECK_BITS; + spin_lock(&chip->reg_lock); + chip->codec_not_ready_bits |= detected; + atiixp_update(chip, IER, detected, 0); /* disable the detected irqs */ + spin_unlock(&chip->reg_lock); + } + + /* ack */ + atiixp_write(chip, ISR, status); + + return IRQ_HANDLED; +} + + +/* + * ac97 mixer section + */ + +static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock) +{ + ac97_bus_t *pbus; + ac97_template_t ac97; + int i, err; + int codec_count; + static ac97_bus_ops_t ops = { + .write = snd_atiixp_ac97_write, + .read = snd_atiixp_ac97_read, + }; + static unsigned int codec_skip[NUM_ATI_CODECS] = { + ATI_REG_ISR_CODEC0_NOT_READY, + ATI_REG_ISR_CODEC1_NOT_READY, + ATI_REG_ISR_CODEC2_NOT_READY, + }; + + if (snd_atiixp_codec_detect(chip) < 0) + return -ENXIO; + + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) + return err; + pbus->clock = clock; + pbus->shared_type = AC97_SHARED_TYPE_ATIIXP; /* shared with audio driver */ + chip->ac97_bus = pbus; + + codec_count = 0; + for (i = 0; i < NUM_ATI_CODECS; i++) { + if (chip->codec_not_ready_bits & codec_skip[i]) + continue; + memset(&ac97, 0, sizeof(ac97)); + ac97.private_data = chip; + ac97.pci = chip->pci; + ac97.num = i; + ac97.scaps = AC97_SCAP_SKIP_AUDIO; + if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { + chip->ac97[i] = NULL; /* to be sure */ + snd_printdd("atiixp: codec %d not available for modem\n", i); + continue; + } + codec_count++; + } + + if (! codec_count) { + snd_printk(KERN_ERR "atiixp: no codec available\n"); + return -ENODEV; + } + + /* snd_ac97_tune_hardware(chip->ac97, ac97_quirks); */ + + return 0; +} + + +#ifdef CONFIG_PM +/* + * power management + */ +static int snd_atiixp_suspend(snd_card_t *card, unsigned int state) +{ + atiixp_t *chip = card->pm_private_data; + int i; + + for (i = 0; i < NUM_ATI_PCMDEVS; i++) + if (chip->pcmdevs[i]) + snd_pcm_suspend_all(chip->pcmdevs[i]); + for (i = 0; i < NUM_ATI_CODECS; i++) + if (chip->ac97[i]) + snd_ac97_suspend(chip->ac97[i]); + snd_atiixp_aclink_down(chip); + snd_atiixp_chip_stop(chip); + + pci_set_power_state(chip->pci, 3); + pci_disable_device(chip->pci); + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); + return 0; +} + +static int snd_atiixp_resume(snd_card_t *card, unsigned int state) +{ + atiixp_t *chip = card->pm_private_data; + int i; + + pci_enable_device(chip->pci); + pci_set_power_state(chip->pci, 0); + + snd_atiixp_aclink_reset(chip); + snd_atiixp_chip_start(chip); + + for (i = 0; i < NUM_ATI_CODECS; i++) + if (chip->ac97[i]) + snd_ac97_resume(chip->ac97[i]); + + snd_power_change_state(card, SNDRV_CTL_POWER_D0); + return 0; +} +#endif /* CONFIG_PM */ + + +/* + * proc interface for register dump + */ + +static void snd_atiixp_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) +{ + atiixp_t *chip = entry->private_data; + int i; + + for (i = 0; i < 256; i += 4) + snd_iprintf(buffer, "%02x: %08x\n", i, readl(chip->remap_addr + i)); +} + +static void __devinit snd_atiixp_proc_init(atiixp_t *chip) +{ + snd_info_entry_t *entry; + + if (! snd_card_proc_new(chip->card, "atiixp", &entry)) + snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read); +} + + + +/* + * destructor + */ + +static int snd_atiixp_free(atiixp_t *chip) +{ + if (chip->irq < 0) + goto __hw_end; + snd_atiixp_chip_stop(chip); + synchronize_irq(chip->irq); + __hw_end: + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); + if (chip->remap_addr) + iounmap((void *) chip->remap_addr); + pci_release_regions(chip->pci); + kfree(chip); + return 0; +} + +static int snd_atiixp_dev_free(snd_device_t *device) +{ + atiixp_t *chip = device->device_data; + return snd_atiixp_free(chip); +} + +/* + * constructor for chip instance + */ +static int __devinit snd_atiixp_create(snd_card_t *card, + struct pci_dev *pci, + atiixp_t **r_chip) +{ + static snd_device_ops_t ops = { + .dev_free = snd_atiixp_dev_free, + }; + atiixp_t *chip; + int err; + + if ((err = pci_enable_device(pci)) < 0) + return err; + + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); + if (chip == NULL) + return -ENOMEM; + + spin_lock_init(&chip->reg_lock); + spin_lock_init(&chip->ac97_lock); + init_MUTEX(&chip->open_mutex); + chip->card = card; + chip->pci = pci; + chip->irq = -1; + if ((err = pci_request_regions(pci, "ATI IXP MC97")) < 0) { + kfree(chip); + return err; + } + chip->addr = pci_resource_start(pci, 0); + chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, pci_resource_len(pci, 0)); + if (chip->remap_addr == 0) { + snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); + snd_atiixp_free(chip); + return -EIO; + } + + if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { + snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); + snd_atiixp_free(chip); + return -EBUSY; + } + chip->irq = pci->irq; + pci_set_master(pci); + synchronize_irq(chip->irq); + + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { + snd_atiixp_free(chip); + return err; + } + + snd_card_set_dev(card, &pci->dev); + + *r_chip = chip; + return 0; +} + + +static int __devinit snd_atiixp_probe(struct pci_dev *pci, + const struct pci_device_id *pci_id) +{ + static int dev; + snd_card_t *card; + atiixp_t *chip; + unsigned char revision; + int err; + + if (dev >= SNDRV_CARDS) + return -ENODEV; + if (!enable[dev]) { + dev++; + return -ENOENT; + } + + card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); + if (card == NULL) + return -ENOMEM; + + pci_read_config_byte(pci, PCI_REVISION_ID, &revision); + + strcpy(card->driver, "ATIIXP-MODEM"); + strcpy(card->shortname, "ATI IXP Modem"); + if ((err = snd_atiixp_create(card, pci, &chip)) < 0) + goto __error; + + if ((err = snd_atiixp_aclink_reset(chip)) < 0) + goto __error; + + if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev])) < 0) + goto __error; + + if ((err = snd_atiixp_pcm_new(chip)) < 0) + goto __error; + + snd_atiixp_proc_init(chip); + + snd_atiixp_chip_start(chip); + + sprintf(card->longname, "%s rev %x at 0x%lx, irq %i", + card->shortname, revision, chip->addr, chip->irq); + + snd_card_set_pm_callback(card, snd_atiixp_suspend, snd_atiixp_resume, chip); + + if ((err = snd_card_register(card)) < 0) + goto __error; + + pci_set_drvdata(pci, card); + dev++; + return 0; + + __error: + snd_card_free(card); + return err; +} + +static void __devexit snd_atiixp_remove(struct pci_dev *pci) +{ + snd_card_free(pci_get_drvdata(pci)); + pci_set_drvdata(pci, NULL); +} + +static struct pci_driver driver = { + .name = "ATI IXP MC97 controller", + .id_table = snd_atiixp_ids, + .probe = snd_atiixp_probe, + .remove = __devexit_p(snd_atiixp_remove), + SND_PCI_PM_CALLBACKS +}; + + +static int __init alsa_card_atiixp_init(void) +{ + return pci_module_init(&driver); +} + +static void __exit alsa_card_atiixp_exit(void) +{ + pci_unregister_driver(&driver); +} + +module_init(alsa_card_atiixp_init) +module_exit(alsa_card_atiixp_exit) diff -Nru a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c --- a/sound/pci/au88x0/au88x0.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/au88x0/au88x0.c 2004-09-06 16:37:53 -07:00 @@ -31,23 +31,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(pcifix, int, boot_devs, 0444); MODULE_PARM_DESC(pcifix, "Enable VIA-workaround for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(pcifix, - SNDRV_ENABLED - ",allows:{{0,Disabled},{1,Latency},{2,Bridge},{3,Both},{255,Auto}},default:4,dialog:check"); MODULE_DESCRIPTION("Aureal vortex"); -MODULE_CLASSES("{sound}"); MODULE_LICENSE("GPL"); -MODULE_DEVICES("{{Aureal Semiconductor Inc., Aureal Vortex Sound Processor}}"); +MODULE_SUPPORTED_DEVICE("{{Aureal Semiconductor Inc., Aureal Vortex Sound Processor}}"); MODULE_DEVICE_TABLE(pci, snd_vortex_ids); @@ -122,8 +115,7 @@ // (see "Management of Cards and Components") static int snd_vortex_dev_free(snd_device_t * device) { - vortex_t *vortex = snd_magic_cast(vortex_t, device->device_data, - return -ENXIO); + vortex_t *vortex = device->device_data; vortex_gameport_unregister(vortex); vortex_core_shutdown(vortex); @@ -132,7 +124,7 @@ free_irq(vortex->irq, vortex); pci_release_regions(vortex->pci_dev); pci_disable_device(vortex->pci_dev); - snd_magic_kfree(vortex); + kfree(vortex); return 0; } @@ -159,7 +151,7 @@ } pci_set_dma_mask(pci, VORTEX_DMA_MASK); - chip = snd_magic_kcalloc(vortex_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; diff -Nru a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h --- a/sound/pci/au88x0/au88x0.h 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/au88x0/au88x0.h 2004-09-06 16:37:53 -07:00 @@ -180,8 +180,6 @@ u8 rev; }; -#define chip_t vortex_t - /* Functions. */ /* SRC */ diff -Nru a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c --- a/sound/pci/au88x0/au88x0_a3d.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/au88x0/au88x0_a3d.c 2004-09-06 16:37:53 -07:00 @@ -567,7 +567,7 @@ v->xt_mode = mode; /* this_14 */ vortex_XtalkHw_init(v); - vortex_XtalkHw_SetGains(v, asXtalkGainsAllChan); + vortex_XtalkHw_SetGainsAllChan(v); switch (v->xt_mode) { case XT_SPEAKER0: vortex_XtalkHw_ProgramXtalkNarrow(v); @@ -862,9 +862,8 @@ /* HRTF controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_data = &vortex->a3d[i]; kcontrol->id.numid = CTRLID_HRTF; kcontrol->info = snd_vortex_a3d_hrtf_info; kcontrol->put = snd_vortex_a3d_hrtf_put; @@ -874,9 +873,8 @@ /* ITD controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_data = &vortex->a3d[i]; kcontrol->id.numid = CTRLID_ITD; kcontrol->info = snd_vortex_a3d_itd_info; kcontrol->put = snd_vortex_a3d_itd_put; @@ -886,9 +884,8 @@ /* ILD (gains) controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_data = &vortex->a3d[i]; kcontrol->id.numid = CTRLID_GAINS; kcontrol->info = snd_vortex_a3d_ild_info; kcontrol->put = snd_vortex_a3d_ild_put; @@ -898,9 +895,8 @@ /* Filter controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_data = &vortex->a3d[i]; kcontrol->id.numid = CTRLID_FILTER; kcontrol->info = snd_vortex_a3d_filter_info; kcontrol->put = snd_vortex_a3d_filter_put; diff -Nru a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c --- a/sound/pci/au88x0/au88x0_core.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/au88x0/au88x0_core.c 2004-09-06 16:37:55 -07:00 @@ -2362,7 +2362,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - vortex_t *vortex = snd_magic_cast(vortex_t, dev_id, return IRQ_NONE); + vortex_t *vortex = dev_id; int i, handled; u32 source; diff -Nru a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c --- a/sound/pci/au88x0/au88x0_eq.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/au88x0/au88x0_eq.c 2004-09-06 16:37:54 -07:00 @@ -40,135 +40,120 @@ #include "au88x0_eq.h" #include "au88x0_eqdata.c" +#define VORTEX_EQ_BASE 0x2b000 +#define VORTEX_EQ_DEST (VORTEX_EQ_BASE + 0x410) +#define VORTEX_EQ_SOURCE (VORTEX_EQ_BASE + 0x430) +#define VORTEX_EQ_CTRL (VORTEX_EQ_BASE + 0x440) + /* CEqHw.s */ -static void vortex_EqHw_SetTimeConsts(vortex_t * vortex, u16 a, u16 b) +static void vortex_EqHw_SetTimeConsts(vortex_t * vortex, u16 gain, u16 level) { - hwwrite(vortex->mmio, 0x2b3c4, a); - hwwrite(vortex->mmio, 0x2b3c8, b); + hwwrite(vortex->mmio, 0x2b3c4, gain); + hwwrite(vortex->mmio, 0x2b3c8, level); } -static void vortex_EqHw_SetLeftCoefs(vortex_t * vortex, u16 a[]) +static void vortex_EqHw_SetLeftCoefs(vortex_t * vortex, u16 coefs[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int eax, i = 0, n /*esp2c */ = 0; - - if (eqhw->this04 <= n) - return; + int eax, i = 0, n /*esp2c */; - do { - hwwrite(vortex->mmio, 0x2b000 + n * 0x30, a[i + 0]); - hwwrite(vortex->mmio, 0x2b004 + n * 0x30, a[i + 1]); + for (n = 0; n < eqhw->this04; n++) { + hwwrite(vortex->mmio, 0x2b000 + n * 0x30, coefs[i + 0]); + hwwrite(vortex->mmio, 0x2b004 + n * 0x30, coefs[i + 1]); if (eqhw->this08 == 0) { - hwwrite(vortex->mmio, 0x2b008 + n * 0x30, a[i + 2]); - hwwrite(vortex->mmio, 0x2b00c + n * 0x30, a[i + 3]); - eax = a[i + 4]; //esp24; + hwwrite(vortex->mmio, 0x2b008 + n * 0x30, coefs[i + 2]); + hwwrite(vortex->mmio, 0x2b00c + n * 0x30, coefs[i + 3]); + eax = coefs[i + 4]; //esp24; } else { - if (a[2 + i] == 0x8000) + if (coefs[2 + i] == 0x8000) eax = 0x7fff; else - eax = ~a[2 + i]; + eax = ~coefs[2 + i]; hwwrite(vortex->mmio, 0x2b008 + n * 0x30, eax & 0xffff); - if (a[3 + i] == 0x8000) + if (coefs[3 + i] == 0x8000) eax = 0x7fff; else - eax = ~a[3 + i]; + eax = ~coefs[3 + i]; hwwrite(vortex->mmio, 0x2b00c + n * 0x30, eax & 0xffff); - if (a[4 + i] == 0x8000) + if (coefs[4 + i] == 0x8000) eax = 0x7fff; else - eax = ~a[4 + i]; + eax = ~coefs[4 + i]; } hwwrite(vortex->mmio, 0x2b010 + n * 0x30, eax); - n++; i += 5; } - while (n < eqhw->this04); } -static void vortex_EqHw_SetRightCoefs(vortex_t * vortex, u16 a[]) +static void vortex_EqHw_SetRightCoefs(vortex_t * vortex, u16 coefs[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int i = 0, n /*esp2c */ = 0, eax; + int i = 0, n /*esp2c */, eax; - if (eqhw->this04 <= n) - return; - - do { - hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, a[0 + i]); - hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, a[1 + i]); + for (n = 0; n < eqhw->this04; n++) { + hwwrite(vortex->mmio, 0x2b1e0 + n * 0x30, coefs[0 + i]); + hwwrite(vortex->mmio, 0x2b1e4 + n * 0x30, coefs[1 + i]); if (eqhw->this08 == 0) { - hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, a[2 + i]); - hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, a[3 + i]); - eax = a[4 + i]; //*esp24; + hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, coefs[2 + i]); + hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, coefs[3 + i]); + eax = coefs[4 + i]; //*esp24; } else { - if (a[2 + i] == 0x8000) + if (coefs[2 + i] == 0x8000) eax = 0x7fff; else - eax = ~(a[2 + i]); + eax = ~(coefs[2 + i]); hwwrite(vortex->mmio, 0x2b1e8 + n * 0x30, eax & 0xffff); - if (a[3 + i] == 0x8000) + if (coefs[3 + i] == 0x8000) eax = 0x7fff; else - eax = ~a[3 + i]; + eax = ~coefs[3 + i]; hwwrite(vortex->mmio, 0x2b1ec + n * 0x30, eax & 0xffff); - if (a[4 + i] == 0x8000) + if (coefs[4 + i] == 0x8000) eax = 0x7fff; else - eax = ~a[4 + i]; + eax = ~coefs[4 + i]; } hwwrite(vortex->mmio, 0x2b1f0 + n * 0x30, eax); i += 5; - n++; } - while (n < eqhw->this04); } static void vortex_EqHw_SetLeftStates(vortex_t * vortex, u16 a[], u16 b[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int i = 0, ebx = 0; + int i = 0, ebx; hwwrite(vortex->mmio, 0x2b3fc, a[0]); hwwrite(vortex->mmio, 0x2b400, a[1]); - if (eqhw->this04 < 0) - return; - - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b014 + (i * 0xc), b[i]); hwwrite(vortex->mmio, 0x2b018 + (i * 0xc), b[1 + i]); hwwrite(vortex->mmio, 0x2b01c + (i * 0xc), b[2 + i]); hwwrite(vortex->mmio, 0x2b020 + (i * 0xc), b[3 + i]); i += 4; - ebx++; } - while (eqhw->this04 > ebx); } static void vortex_EqHw_SetRightStates(vortex_t * vortex, u16 a[], u16 b[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int i = 0, ebx = 0; + int i = 0, ebx; hwwrite(vortex->mmio, 0x2b404, a[0]); hwwrite(vortex->mmio, 0x2b408, a[1]); - if (eqhw->this04 < 0) - return; - - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b1f4 + (i * 0xc), b[i]); hwwrite(vortex->mmio, 0x2b1f8 + (i * 0xc), b[1 + i]); hwwrite(vortex->mmio, 0x2b1fc + (i * 0xc), b[2 + i]); hwwrite(vortex->mmio, 0x2b200 + (i * 0xc), b[3 + i]); i += 4; - ebx++; } - while (ebx < eqhw->this04); } #if 0 @@ -260,60 +245,41 @@ static void vortex_EqHw_SetLeftGainsTarget(vortex_t * vortex, u16 a[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int ebx = 0; + int ebx; - if (eqhw->this04 < 0) - return; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b02c + ebx * 0x30, a[ebx]); - ebx++; } - while (ebx < eqhw->this04); } static void vortex_EqHw_SetRightGainsTarget(vortex_t * vortex, u16 a[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int ebx = 0; - - if (eqhw->this04 < 0) - return; + int ebx; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b20c + ebx * 0x30, a[ebx]); - ebx++; } - while (ebx < eqhw->this04); } static void vortex_EqHw_SetLeftGainsCurrent(vortex_t * vortex, u16 a[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int ebx = 0; - - if (eqhw->this04 < 0) - return; + int ebx; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b028 + ebx * 0x30, a[ebx]); - ebx++; } - while (ebx < eqhw->this04); } static void vortex_EqHw_SetRightGainsCurrent(vortex_t * vortex, u16 a[]) { eqhw_t *eqhw = &(vortex->eq.this04); - int ebx = 0; - - if (eqhw->this04 < 0) - return; + int ebx; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b208 + ebx * 0x30, a[ebx]); - ebx++; } - while (ebx < eqhw->this04); } #if 0 @@ -384,26 +350,17 @@ eqhw_t *eqhw = &(vortex->eq.this04); int ebx; - if (eqhw->this04 < 0) - return; - - ebx = 0; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b024 + ebx * 0x30, a[ebx]); - ebx++; } - while (ebx < eqhw->this04); hwwrite(vortex->mmio, 0x2b3cc, a[eqhw->this04]); hwwrite(vortex->mmio, 0x2b3d8, a[eqhw->this04 + 1]); - ebx = 0; - do { + for (ebx = 0; ebx < eqhw->this04; ebx++) { hwwrite(vortex->mmio, 0x2b204 + ebx * 0x30, a[ebx + (eqhw->this04 + 2)]); - ebx++; } - while (ebx < eqhw->this04); hwwrite(vortex->mmio, 0x2b3e4, a[2 + (eqhw->this04 * 2)]); hwwrite(vortex->mmio, 0x2b3f0, a[3 + (eqhw->this04 * 2)]); @@ -466,12 +423,12 @@ #endif static void vortex_EqHw_Enable(vortex_t * vortex) { - hwwrite(vortex->mmio, 0x2b440, 0xf001); + hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf001); } static void vortex_EqHw_Disable(vortex_t * vortex) { - hwwrite(vortex->mmio, 0x2b440, 0xf000); + hwwrite(vortex->mmio, VORTEX_EQ_CTRL, 0xf000); } /* Reset (zero) buffers */ @@ -479,16 +436,16 @@ { int i; for (i = 0; i < 0x8; i++) - hwwrite(vortex->mmio, 0x2b410 + (i << 2), 0x0); + hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); for (i = 0; i < 0x4; i++) - hwwrite(vortex->mmio, 0x2b430 + (i << 2), 0x0); + hwwrite(vortex->mmio, VORTEX_EQ_SOURCE + (i << 2), 0x0); } static void vortex_EqHw_ZeroA3DIO(vortex_t * vortex) { int i; for (i = 0; i < 0x4; i++) - hwwrite(vortex->mmio, 0x2b410 + (i << 2), 0x0); + hwwrite(vortex->mmio, VORTEX_EQ_DEST + (i << 2), 0x0); } static void vortex_EqHw_ZeroState(vortex_t * vortex) @@ -659,11 +616,10 @@ if (((eq->this10) * 2 != count) || (eq->this28 == 0)) return 1; - if (0 < count) { - for (i = 0; i < count; i++) { - eq->this130[i] = gains[i]; - } + for (i = 0; i < count; i++) { + eq->this130[i] = gains[i]; } + if (eq->this54) return 0; return vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex); diff -Nru a/sound/pci/au88x0/au88x0_game.c b/sound/pci/au88x0/au88x0_game.c --- a/sound/pci/au88x0/au88x0_game.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/au88x0/au88x0_game.c 2004-09-06 16:37:51 -07:00 @@ -96,7 +96,7 @@ static int vortex_gameport_register(vortex_t * vortex) { - if ((vortex->gameport = snd_kcalloc(sizeof(struct gameport), GFP_KERNEL)) == NULL) { + if ((vortex->gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL)) == NULL) { return -1; }; diff -Nru a/sound/pci/au88x0/au88x0_mixer.c b/sound/pci/au88x0/au88x0_mixer.c --- a/sound/pci/au88x0/au88x0_mixer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/au88x0/au88x0_mixer.c 2004-09-06 16:37:51 -07:00 @@ -13,14 +13,15 @@ static int __devinit snd_vortex_mixer(vortex_t * vortex) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; int err; + static ac97_bus_ops_t ops = { + .write = vortex_codec_write, + .read = vortex_codec_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = vortex_codec_write; - bus.read = vortex_codec_read; - if ((err = snd_ac97_bus(vortex->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(vortex->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); // Intialize AC97 codec stuff. diff -Nru a/sound/pci/au88x0/au88x0_mpu401.c b/sound/pci/au88x0/au88x0_mpu401.c --- a/sound/pci/au88x0/au88x0_mpu401.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/au88x0/au88x0_mpu401.c 2004-09-06 16:37:54 -07:00 @@ -104,7 +104,7 @@ ~CTRL_MIDI_PORT) & ~CTRL_MIDI_EN); return temp; } - mpu = snd_magic_cast(mpu401_t, rmidi->private_data, return -ENOMEM); + mpu = rmidi->private_data; mpu->cport = (unsigned long)(vortex->mmio + (VORTEX_MIDI_CMD >> 2)); #endif vortex->rmidi = rmidi; diff -Nru a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c --- a/sound/pci/au88x0/au88x0_pcm.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/au88x0/au88x0_pcm.c 2004-09-06 16:37:52 -07:00 @@ -28,7 +28,6 @@ #include #include "au88x0.h" -#define chip_t vortex_t #define VORTEX_PCM_TYPE(x) (x->name[40]) /* hardware definition */ @@ -189,7 +188,7 @@ snd_vortex_pcm_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) { - chip_t *chip = snd_pcm_substream_chip(substream); + vortex_t *chip = snd_pcm_substream_chip(substream); stream_t *stream = (stream_t *) (substream->runtime->private_data); snd_pcm_sgbuf_t *sgbuf; int err; @@ -250,7 +249,7 @@ /* hw_free callback */ static int snd_vortex_pcm_hw_free(snd_pcm_substream_t * substream) { - chip_t *chip = snd_pcm_substream_chip(substream); + vortex_t *chip = snd_pcm_substream_chip(substream); stream_t *stream = (stream_t *) (substream->runtime->private_data); // Delete audio routes. @@ -305,7 +304,7 @@ /* trigger callback */ static int snd_vortex_pcm_trigger(snd_pcm_substream_t * substream, int cmd) { - chip_t *chip = snd_pcm_substream_chip(substream); + vortex_t *chip = snd_pcm_substream_chip(substream); stream_t *stream = (stream_t *) substream->runtime->private_data; int dma = stream->dma; diff -Nru a/sound/pci/au88x0/au88x0_xtalk.c b/sound/pci/au88x0/au88x0_xtalk.c --- a/sound/pci/au88x0/au88x0_xtalk.c 2004-09-06 16:37:56 -07:00 +++ b/sound/pci/au88x0/au88x0_xtalk.c 2004-09-06 16:37:56 -07:00 @@ -540,6 +540,12 @@ } } +static void +vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex) +{ + vortex_XtalkHw_SetGains(vortex, asXtalkGainsAllChan); +} + #if 0 static void vortex_XtalkHw_GetGains(vortex_t * vortex, xtalk_gains_t gains) { diff -Nru a/sound/pci/au88x0/au88x0_xtalk.h b/sound/pci/au88x0/au88x0_xtalk.h --- a/sound/pci/au88x0/au88x0_xtalk.h 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/au88x0/au88x0_xtalk.h 2004-09-06 16:37:52 -07:00 @@ -45,10 +45,9 @@ typedef short xtalk_coefs_t[5][5]; typedef short xtalk_state_t[5][4]; -extern xtalk_gains_t const asXtalkGainsAllChan; - static void vortex_XtalkHw_SetGains(vortex_t * vortex, xtalk_gains_t const gains); +static void vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex); static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, int sr); static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); diff -Nru a/sound/pci/azt3328.c b/sound/pci/azt3328.c --- a/sound/pci/azt3328.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/azt3328.c 2004-09-06 16:37:53 -07:00 @@ -111,8 +111,7 @@ MODULE_AUTHOR("Andreas Mohr "); MODULE_DESCRIPTION("Aztech AZF3328 (PCI168)"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Aztech,AZF3328}}"); +MODULE_SUPPORTED_DEVICE("{{Aztech,AZF3328}}"); #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) #define SUPPORT_JOYSTICK 1 @@ -170,35 +169,25 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for AZF3328 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for AZF3328 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable AZF3328 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_INDEX_DESC); #ifdef SUPPORT_JOYSTICK module_param_array(joystick, bool, boot_devs, 0444); MODULE_PARM_DESC(joystick, "Enable joystick for AZF3328 soundcard."); -MODULE_PARM_SYNTAX(joystick, SNDRV_BOOLEAN_FALSE_DESC); #endif typedef struct _snd_azf3328 azf3328_t; -#define chip_t azf3328_t struct _snd_azf3328 { int irq; unsigned long codec_port; - struct resource *res_codec_port; unsigned long io2_port; - struct resource *res_io2_port; unsigned long mpu_port; - struct resource *res_mpu_port; unsigned long synth_port; - struct resource *res_synth_port; unsigned long mixer_port; - struct resource *res_mixer_port; #ifdef SUPPORT_JOYSTICK struct gameport gameport; @@ -553,8 +542,6 @@ return (nreg != oreg); } -#define NUM_CONTROLS(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_azf3328_mixer_controls[] __devinitdata = { AZF3328_MIXER_SWITCH("Master Playback Switch", IDX_MIXER_PLAY_MASTER, 15, 1), AZF3328_MIXER_VOL_STEREO("Master Playback Volume", IDX_MIXER_PLAY_MASTER, 0x1f, 1), @@ -650,7 +637,7 @@ /* add mixer controls */ sw = snd_azf3328_mixer_controls; - for (idx = 0; idx < NUM_CONTROLS(snd_azf3328_mixer_controls); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_azf3328_mixer_controls); idx++, sw++) { if ((err = snd_ctl_add(chip->card, snd_ctl_new1(sw, chip))) < 0) return err; } @@ -813,7 +800,6 @@ static int snd_azf3328_playback_trigger(snd_pcm_substream_t * substream, int cmd) { - unsigned long flags; azf3328_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; int result = 0; @@ -830,7 +816,7 @@ snd_azf3328_setfmt(chip, IDX_IO_PLAY_SOUNDFORMAT, runtime->rate, snd_pcm_format_width(runtime->format), runtime->channels); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* stop playback */ status1 = inw(chip->codec_port+IDX_IO_PLAY_FLAGS); status1 &= ~DMA_RESUME; @@ -838,11 +824,11 @@ /* FIXME: clear interrupts or what??? */ outw(0xffff, chip->codec_port+IDX_IO_PLAY_IRQMASK); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); snd_azf3328_setdmaa(chip, runtime->dma_addr, snd_pcm_lib_period_bytes(substream), snd_pcm_lib_buffer_bytes(substream), 0); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); #ifdef WIN9X /* FIXME: enable playback/recording??? */ status1 |= DMA_PLAY_SOMETHING1 | DMA_PLAY_SOMETHING2; @@ -858,7 +844,7 @@ outw(DMA_PLAY_SOMETHING1|DMA_PLAY_SOMETHING2, chip->codec_port+IDX_IO_PLAY_FLAGS); outw(DMA_RESUME|SOMETHING_ALMOST_ALWAYS_SET|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE, chip->codec_port+IDX_IO_PLAY_FLAGS); #endif - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); /* now unmute WaveOut */ snd_azf3328_mixer_set_mute(chip, IDX_MIXER_WAVEOUT, 0); @@ -870,7 +856,7 @@ /* mute WaveOut */ snd_azf3328_mixer_set_mute(chip, IDX_MIXER_WAVEOUT, 1); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* stop playback */ status1 = inw(chip->codec_port+IDX_IO_PLAY_FLAGS); @@ -882,7 +868,7 @@ status1 &= ~DMA_PLAY_SOMETHING1; outw(status1, chip->codec_port+IDX_IO_PLAY_FLAGS); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); /* now unmute WaveOut */ snd_azf3328_mixer_set_mute(chip, IDX_MIXER_WAVEOUT, 0); @@ -906,7 +892,6 @@ * should actually be triggered like that */ static int snd_azf3328_capture_trigger(snd_pcm_substream_t * substream, int cmd) { - unsigned long flags; azf3328_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; int result = 0; @@ -920,7 +905,7 @@ snd_azf3328_setfmt(chip, IDX_IO_REC_SOUNDFORMAT, runtime->rate, snd_pcm_format_width(runtime->format), runtime->channels); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* stop recording */ status1 = inw(chip->codec_port+IDX_IO_REC_FLAGS); status1 &= ~DMA_RESUME; @@ -928,11 +913,11 @@ /* FIXME: clear interrupts or what??? */ outw(0xffff, chip->codec_port+IDX_IO_REC_IRQMASK); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); snd_azf3328_setdmaa(chip, runtime->dma_addr, snd_pcm_lib_period_bytes(substream), snd_pcm_lib_buffer_bytes(substream), 1); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); #ifdef WIN9X /* FIXME: enable playback/recording??? */ status1 |= DMA_PLAY_SOMETHING1 | DMA_PLAY_SOMETHING2; @@ -948,13 +933,13 @@ outw(DMA_PLAY_SOMETHING1|DMA_PLAY_SOMETHING2, chip->codec_port+IDX_IO_REC_FLAGS); outw(DMA_RESUME|SOMETHING_ALMOST_ALWAYS_SET|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE, chip->codec_port+IDX_IO_REC_FLAGS); #endif - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); snd_azf3328_dbgio(chip, "trigger2"); chip->is_playing = 1; break; case SNDRV_PCM_TRIGGER_STOP: - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* stop recording */ status1 = inw(chip->codec_port+IDX_IO_REC_FLAGS); @@ -966,7 +951,7 @@ status1 &= ~DMA_PLAY_SOMETHING1; outw(status1, chip->codec_port+IDX_IO_REC_FLAGS); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); chip->is_playing = 0; break; @@ -990,16 +975,13 @@ unsigned long bufptr, playptr; unsigned long result; snd_pcm_uframes_t frmres; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); #ifdef QUERY_HARDWARE bufptr = inl(chip->codec_port+IDX_IO_PLAY_DMA_START_1); #else bufptr = substream->runtime->dma_addr; #endif playptr = inl(chip->codec_port+IDX_IO_PLAY_DMA_CURRPOS); - spin_unlock_irqrestore(&chip->reg_lock, flags); result = playptr - bufptr; frmres = bytes_to_frames( substream->runtime, result ); @@ -1013,16 +995,13 @@ unsigned long bufptr, recptr; unsigned long result; snd_pcm_uframes_t frmres; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); #ifdef QUERY_HARDWARE bufptr = inl(chip->codec_port+IDX_IO_REC_DMA_START_1); #else bufptr = substream->runtime->dma_addr; #endif recptr = inl(chip->codec_port+IDX_IO_REC_DMA_CURRPOS); - spin_unlock_irqrestore(&chip->reg_lock, flags); result = recptr - bufptr; frmres = bytes_to_frames( substream->runtime, result ); @@ -1032,7 +1011,7 @@ static irqreturn_t snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - azf3328_t *chip = snd_magic_cast(azf3328_t, dev_id, return IRQ_NONE); + azf3328_t *chip = dev_id; unsigned int status, which; static unsigned long count; @@ -1232,7 +1211,7 @@ static void snd_azf3328_pcm_free(snd_pcm_t *pcm) { - azf3328_t *chip = snd_magic_cast(azf3328_t, pcm->private_data, return); + azf3328_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1287,36 +1266,17 @@ kfree_nocheck(chip->res_joystick); } #endif - if (chip->res_codec_port) { - release_resource(chip->res_codec_port); - kfree_nocheck(chip->res_codec_port); - } - if (chip->res_io2_port) { - release_resource(chip->res_io2_port); - kfree_nocheck(chip->res_io2_port); - } - if (chip->res_mpu_port) { - release_resource(chip->res_mpu_port); - kfree_nocheck(chip->res_mpu_port); - } - if (chip->res_synth_port) { - release_resource(chip->res_synth_port); - kfree_nocheck(chip->res_synth_port); - } - if (chip->res_mixer_port) { - release_resource(chip->res_mixer_port); - kfree_nocheck(chip->res_mixer_port); - } if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); + pci_release_regions(chip->pci); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_azf3328_dev_free(snd_device_t *device) { - azf3328_t *chip = snd_magic_cast(azf3328_t, device->device_data, return -ENXIO); + azf3328_t *chip = device->device_data; return snd_azf3328_free(chip); } @@ -1345,7 +1305,6 @@ unsigned long device_type, azf3328_t ** rchip) { - unsigned long flags; azf3328_t *chip; int err; static snd_device_ops_t ops = { @@ -1358,7 +1317,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(azf3328_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -1373,36 +1332,16 @@ return -ENXIO; } - chip->codec_port = pci_resource_start(pci, 0); - if ((chip->res_codec_port = request_region(chip->codec_port, 0x80, "Aztech AZF3328 I/O")) == NULL) { - snd_printk("unable to grab I/O port at 0x%lx-0x%lx\n", chip->codec_port, chip->codec_port + 0x80 - 1); - snd_azf3328_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, "Aztech AZF3328")) < 0) { + kfree(chip); + return err; } + + chip->codec_port = pci_resource_start(pci, 0); chip->io2_port = pci_resource_start(pci, 1); - if ((chip->res_io2_port = request_region(chip->io2_port, 0x08, "Aztech AZF3328 I/O 2")) == NULL) { - snd_printk("unable to grab I/O 2 port at 0x%lx-0x%lx\n", chip->io2_port, chip->io2_port + 0x08 - 1); - snd_azf3328_free(chip); - return -EBUSY; - } chip->mpu_port = pci_resource_start(pci, 2); - if ((chip->res_mpu_port = request_region(chip->mpu_port, 0x04, "Aztech AZF3328 MPU401")) == NULL) { - snd_printk("unable to grab MPU401 port at 0x%lx-0x%lx\n", chip->mpu_port, chip->mpu_port + 0x04 - 1); - snd_azf3328_free(chip); - return -EBUSY; - } chip->synth_port = pci_resource_start(pci, 3); - if ((chip->res_synth_port = request_region(chip->synth_port, 0x08, "Aztech AZF3328 OPL3")) == NULL) { - snd_printk("unable to grab OPL3 port at 0x%lx-0x%lx\n", chip->synth_port, chip->synth_port + 0x08 - 1); - snd_azf3328_free(chip); - return -EBUSY; - } chip->mixer_port = pci_resource_start(pci, 4); - if ((chip->res_mixer_port = request_region(chip->mixer_port, 0x40, "Aztech AZF3328 Mixer")) == NULL) { - snd_printk("unable to grab mixer port at 0x%lx-0x%lx\n", chip->mixer_port, chip->mixer_port + 0x40 - 1); - snd_azf3328_free(chip); - return -EBUSY; - } if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { snd_printk("unable to grab IRQ %d\n", pci->irq); @@ -1435,13 +1374,13 @@ #endif /* standard chip init stuff */ - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); outb(DMA_PLAY_SOMETHING2|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE, chip->codec_port + IDX_IO_PLAY_FLAGS); outb(DMA_PLAY_SOMETHING2|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE, chip->codec_port + IDX_IO_SOMETHING_FLAGS); outb(DMA_PLAY_SOMETHING2|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE, chip->codec_port + IDX_IO_REC_FLAGS); outb(0x0, chip->codec_port + IDX_IO_IRQ63H); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); snd_card_set_dev(card, &pci->dev); diff -Nru a/sound/pci/bt87x.c b/sound/pci/bt87x.c --- a/sound/pci/bt87x.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/bt87x.c 2004-09-06 16:37:53 -07:00 @@ -38,8 +38,7 @@ MODULE_AUTHOR("Clemens Ladisch "); MODULE_DESCRIPTION("Brooktree Bt87x audio driver"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Brooktree,Bt878}," +MODULE_SUPPORTED_DEVICE("{{Brooktree,Bt878}," "{Brooktree,Bt879}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ @@ -50,16 +49,12 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Bt87x soundcard"); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Bt87x soundcard"); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Bt87x soundcard"); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(digital_rate, int, boot_devs, 0444); MODULE_PARM_DESC(digital_rate, "Digital input rate for Bt87x soundcard"); -MODULE_PARM_SYNTAX(digital_rate, SNDRV_ENABLED); #ifndef PCI_VENDOR_ID_BROOKTREE @@ -152,14 +147,12 @@ /* SYNC, one WRITE per line, one extra WRITE per page boundary, SYNC, JUMP */ #define MAX_RISC_SIZE ((1 + 255 + (PAGE_ALIGN(255 * 4092) / PAGE_SIZE - 1) + 1 + 1) * 8) -#define chip_t bt87x_t typedef struct snd_bt87x bt87x_t; struct snd_bt87x { snd_card_t *card; struct pci_dev *pci; void *mmio; - struct resource *res_mmio; int irq; int dig_rate; @@ -168,7 +161,6 @@ long opened; snd_pcm_substream_t *substream; - struct snd_dma_device dma_dev; struct snd_dma_buffer dma_risc; unsigned int line_bytes; unsigned int lines; @@ -197,10 +189,8 @@ u32 *risc; if (chip->dma_risc.area == NULL) { - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(chip->pci); - if (snd_dma_alloc_pages(&chip->dma_dev, PAGE_ALIGN(MAX_RISC_SIZE), &chip->dma_risc) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_ALIGN(MAX_RISC_SIZE), &chip->dma_risc) < 0) return -ENOMEM; } risc = (u32 *)chip->dma_risc.area; @@ -244,14 +234,14 @@ static void snd_bt87x_free_risc(bt87x_t *chip) { if (chip->dma_risc.area) { - snd_dma_free_pages(&chip->dma_dev, &chip->dma_risc); + snd_dma_free_pages(&chip->dma_risc); chip->dma_risc.area = NULL; } } static irqreturn_t snd_bt87x_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - bt87x_t *chip = snd_magic_cast(bt87x_t, dev_id, return IRQ_NONE); + bt87x_t *chip = dev_id; unsigned int status; status = snd_bt87x_readl(chip, REG_INT_STAT); @@ -314,7 +304,7 @@ SNDRV_PCM_INFO_MMAP_VALID, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8, .rates = SNDRV_PCM_RATE_KNOT, - .rate_min = 119467, + .rate_min = 119466, .rate_max = 448000, .channels_min = 1, .channels_max = 1, @@ -356,20 +346,21 @@ static int snd_bt87x_set_analog_hw(bt87x_t *chip, snd_pcm_runtime_t *runtime) { - static unsigned int rates[] = { - 119467, 128000, 137846, 149333, 162909, 179200, - 199111, 224000, 256000, 298667, 358400, 448000 + static ratnum_t analog_clock = { + .num = 1792000, + .den_min = 4, + .den_max = 15, + .den_step = 1 }; - static snd_pcm_hw_constraint_list_t constraint_rates = { - .count = ARRAY_SIZE(rates), - .list = rates, - .mask = 0, + static snd_pcm_hw_constraint_ratnums_t constraint_rates = { + .nrats = 1, + .rats = &analog_clock }; chip->reg_control &= ~CTL_DA_IOM_DA; runtime->hw = snd_bt87x_analog_hw; - return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, - &constraint_rates); + return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, + &constraint_rates); } static int snd_bt87x_pcm_open(snd_pcm_substream_t *substream) @@ -439,25 +430,22 @@ { bt87x_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - unsigned long flags; int decimation; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->reg_control &= ~(CTL_DA_SDR_MASK | CTL_DA_SBR); - decimation = (1792000 + 5) / runtime->rate; + decimation = (1792000 + runtime->rate / 4) / runtime->rate; chip->reg_control |= decimation << CTL_DA_SDR_SHIFT; if (runtime->format == SNDRV_PCM_FORMAT_S8) chip->reg_control |= CTL_DA_SBR; snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_bt87x_start(bt87x_t *chip) { - unsigned long flags; - - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); chip->current_line = 0; chip->reg_control |= CTL_FIFO_ENABLE | CTL_RISC_ENABLE | CTL_ACAP_EN; snd_bt87x_writel(chip, REG_RISC_STRT_ADD, chip->dma_risc.addr); @@ -465,20 +453,18 @@ chip->line_bytes | (chip->lines << 16)); snd_bt87x_writel(chip, REG_INT_MASK, MY_INTERRUPTS); snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return 0; } static int snd_bt87x_stop(bt87x_t *chip) { - unsigned long flags; - - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); chip->reg_control &= ~(CTL_FIFO_ENABLE | CTL_RISC_ENABLE | CTL_ACAP_EN); snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); snd_bt87x_writel(chip, REG_INT_MASK, 0); snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return 0; } @@ -536,17 +522,16 @@ static int snd_bt87x_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) { bt87x_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; u32 old_control; int changed; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); old_control = chip->reg_control; chip->reg_control = (chip->reg_control & ~CTL_A_GAIN_MASK) | (value->value.integer.value[0] << CTL_A_GAIN_SHIFT); snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); changed = old_control != chip->reg_control; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return changed; } @@ -578,17 +563,16 @@ static int snd_bt87x_capture_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) { bt87x_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; u32 old_control; int changed; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); old_control = chip->reg_control; chip->reg_control = (chip->reg_control & ~CTL_A_G2X) | (value->value.integer.value[0] ? CTL_A_G2X : 0); snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); changed = chip->reg_control != old_control; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return changed; } @@ -624,17 +608,16 @@ static int snd_bt87x_capture_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) { bt87x_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; u32 old_control; int changed; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); old_control = chip->reg_control; chip->reg_control = (chip->reg_control & ~CTL_A_SEL_MASK) | (value->value.enumerated.item[0] << CTL_A_SEL_SHIFT); snd_bt87x_writel(chip, REG_GPIO_DMA_CTL, chip->reg_control); changed = chip->reg_control != old_control; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return changed; } @@ -655,19 +638,16 @@ iounmap(chip->mmio); } - if (chip->res_mmio) { - release_resource(chip->res_mmio); - kfree_nocheck(chip->res_mmio); - } if (chip->irq >= 0) free_irq(chip->irq, chip); - snd_magic_kfree(chip); + pci_release_regions(chip->pci); + kfree(chip); return 0; } static int snd_bt87x_dev_free(snd_device_t *device) { - bt87x_t *chip = snd_magic_cast(bt87x_t, device->device_data, return -ENXIO); + bt87x_t *chip = device->device_data; return snd_bt87x_free(chip); } @@ -705,7 +685,7 @@ if (err < 0) return err; - chip = snd_magic_kcalloc(bt87x_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (!chip) return -ENOMEM; chip->card = card; @@ -713,13 +693,9 @@ chip->irq = -1; spin_lock_init(&chip->reg_lock); - chip->res_mmio = request_mem_region(pci_resource_start(pci, 0), - pci_resource_len(pci, 0), - "Bt87x audio"); - if (!chip->res_mmio) { - snd_bt87x_free(chip); - snd_printk(KERN_ERR "cannot allocate io memory\n"); - return -EBUSY; + if ((err = pci_request_regions(pci, "Bt87x audio")) < 0) { + kfree(chip); + return err; } chip->mmio = ioremap_nocache(pci_resource_start(pci, 0), pci_resource_len(pci, 0)); diff -Nru a/sound/pci/cmipci.c b/sound/pci/cmipci.c --- a/sound/pci/cmipci.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/cmipci.c 2004-09-06 16:37:53 -07:00 @@ -43,8 +43,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("C-Media CMI8x38 PCI"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{C-Media,CMI8738}," +MODULE_SUPPORTED_DEVICE("{{C-Media,CMI8738}," "{C-Media,CMI8738B}," "{C-Media,CMI8338A}," "{C-Media,CMI8338B}}"); @@ -66,25 +65,19 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for C-Media PCI soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for C-Media PCI soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable C-Media PCI soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x320},{0x310},{0x300}},dialog:list"); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM port."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0},{0x388},{0x3c8},{0x3e0},{0x3e8}},dialog:list"); module_param_array(soft_ac3, bool, boot_devs, 0444); MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only)."); #ifdef SUPPORT_JOYSTICK module_param_array(joystick_port, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_port, "Joystick port address."); -MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED ",allows:{{0},{1},{0x200},{0x201}},dialog:list"); #endif #ifndef PCI_DEVICE_ID_CMEDIA_CM8738 @@ -405,8 +398,6 @@ typedef struct snd_stru_cmipci cmipci_t; typedef struct snd_stru_cmipci_pcm cmipci_pcm_t; -#define chip_t cmipci_t - struct snd_stru_cmipci_pcm { snd_pcm_substream_t *substream; int running; /* dac/adc running? */ @@ -442,7 +433,6 @@ int irq; unsigned long iobase; - struct resource *res_iobase; unsigned int ctrl; /* FUNCTRL0 current value */ snd_pcm_t *pcm; /* DAC/ADC PCM */ @@ -699,15 +689,13 @@ static int set_dac_channels(cmipci_t *cm, cmipci_pcm_t *rec, int channels) { - unsigned long flags; - if (channels > 2) { if (! cm->can_multi_ch) return -EINVAL; if (rec->fmt != 0x03) /* stereo 16bit only */ return -EINVAL; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_NXCHG); snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC); if (channels > 4) { @@ -724,18 +712,18 @@ snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C); snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER); } - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); } else { if (cm->can_multi_ch) { - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_NXCHG); snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D); snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C); snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C); snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER); snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); } } return 0; @@ -749,7 +737,6 @@ static int snd_cmipci_pcm_prepare(cmipci_t *cm, cmipci_pcm_t *rec, snd_pcm_substream_t *substream) { - unsigned long flags; unsigned int reg, freq, val; snd_pcm_runtime_t *runtime = substream->runtime; @@ -777,7 +764,7 @@ rec->period_size = (rec->period_size * runtime->channels) / 2; } - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); /* set buffer address */ reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; @@ -822,7 +809,7 @@ //snd_printd("cmipci: chformat = %08x\n", val); rec->running = 0; - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } @@ -954,13 +941,12 @@ snd_ctl_elem_value_t *ucontrol) { cmipci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; int i; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) ucontrol->value.iec958.status[i] = (chip->dig_status >> (i * 8)) & 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -968,17 +954,16 @@ snd_ctl_elem_value_t * ucontrol) { cmipci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; int i, change; unsigned int val; val = 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8); change = val != chip->dig_status; chip->dig_status = val; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1030,13 +1015,12 @@ snd_ctl_elem_value_t *ucontrol) { cmipci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; int i; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) ucontrol->value.iec958.status[i] = (chip->dig_pcm_status >> (i * 8)) & 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1044,17 +1028,16 @@ snd_ctl_elem_value_t *ucontrol) { cmipci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; int i, change; unsigned int val; val = 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8); change = val != chip->dig_pcm_status; chip->dig_pcm_status = val; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1072,30 +1055,36 @@ */ /* save mixer setting and mute for AC3 playback */ -static void save_mixer_state(cmipci_t *cm) +static int save_mixer_state(cmipci_t *cm) { if (! cm->mixer_insensitive) { + snd_ctl_elem_value_t *val; unsigned int i; + + val = kmalloc(sizeof(*val), GFP_ATOMIC); + if (!val) + return -ENOMEM; for (i = 0; i < CM_SAVED_MIXERS; i++) { snd_kcontrol_t *ctl = cm->mixer_res_ctl[i]; if (ctl) { - snd_ctl_elem_value_t val; int event; - memset(&val, 0, sizeof(val)); - ctl->get(ctl, &val); - cm->mixer_res_status[i] = val.value.integer.value[0]; - val.value.integer.value[0] = cm_saved_mixer[i].toggle_on; + memset(val, 0, sizeof(*val)); + ctl->get(ctl, val); + cm->mixer_res_status[i] = val->value.integer.value[0]; + val->value.integer.value[0] = cm_saved_mixer[i].toggle_on; event = SNDRV_CTL_EVENT_MASK_INFO; - if (cm->mixer_res_status[i] != val.value.integer.value[0]) { - ctl->put(ctl, &val); /* toggle */ + if (cm->mixer_res_status[i] != val->value.integer.value[0]) { + ctl->put(ctl, val); /* toggle */ event |= SNDRV_CTL_EVENT_MASK_VALUE; } ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(cm->card, event, &ctl->id); } } + kfree(val); cm->mixer_insensitive = 1; } + return 0; } @@ -1103,27 +1092,32 @@ static void restore_mixer_state(cmipci_t *cm) { if (cm->mixer_insensitive) { + snd_ctl_elem_value_t *val; unsigned int i; + + val = kmalloc(sizeof(*val), GFP_KERNEL); + if (!val) + return; cm->mixer_insensitive = 0; /* at first clear this; otherwise the changes will be ignored */ for (i = 0; i < CM_SAVED_MIXERS; i++) { snd_kcontrol_t *ctl = cm->mixer_res_ctl[i]; if (ctl) { - snd_ctl_elem_value_t val; int event; - memset(&val, 0, sizeof(val)); + memset(val, 0, sizeof(*val)); ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; - ctl->get(ctl, &val); + ctl->get(ctl, val); event = SNDRV_CTL_EVENT_MASK_INFO; - if (val.value.integer.value[0] != cm->mixer_res_status[i]) { - val.value.integer.value[0] = cm->mixer_res_status[i]; - ctl->put(ctl, &val); + if (val->value.integer.value[0] != cm->mixer_res_status[i]) { + val->value.integer.value[0] = cm->mixer_res_status[i]; + ctl->put(ctl, val); event |= SNDRV_CTL_EVENT_MASK_VALUE; } snd_ctl_notify(cm->card, event, &ctl->id); } } + kfree(val); } } @@ -1175,17 +1169,17 @@ } } -static void setup_spdif_playback(cmipci_t *cm, snd_pcm_substream_t *subs, int up, int do_ac3) +static int setup_spdif_playback(cmipci_t *cm, snd_pcm_substream_t *subs, int up, int do_ac3) { - int rate; - unsigned long flags; + int rate, err; rate = subs->runtime->rate; if (up && do_ac3) - save_mixer_state(cm); + if ((err = save_mixer_state(cm)) < 0) + return err; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); cm->spdif_playback_avail = up; if (up) { /* they are controlled via "IEC958 Output Switch" */ @@ -1207,7 +1201,8 @@ snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_PLAYBACK_SPDF); setup_ac3(cm, subs, 0, 0); } - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); + return 0; } @@ -1220,13 +1215,15 @@ { cmipci_t *cm = snd_pcm_substream_chip(substream); int rate = substream->runtime->rate; - int do_spdif, do_ac3 = 0; + int err, do_spdif, do_ac3 = 0; + do_spdif = ((rate == 44100 || rate == 48000) && substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE && substream->runtime->channels == 2); if (do_spdif && cm->can_ac3_hw) do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO; - setup_spdif_playback(cm, substream, do_spdif, do_ac3); + if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0) + return err; return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream); } @@ -1234,12 +1231,14 @@ static int snd_cmipci_playback_spdif_prepare(snd_pcm_substream_t *substream) { cmipci_t *cm = snd_pcm_substream_chip(substream); - int do_ac3; + int err, do_ac3; + if (cm->can_ac3_hw) do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO; else do_ac3 = 1; /* doesn't matter */ - setup_spdif_playback(cm, substream, 1, do_ac3); + if ((err = setup_spdif_playback(cm, substream, 1, do_ac3)) < 0) + return err; return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream); } @@ -1262,11 +1261,10 @@ static int snd_cmipci_capture_spdif_prepare(snd_pcm_substream_t *substream) { cmipci_t *cm = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_CAPTURE_SPDF); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream); } @@ -1274,11 +1272,10 @@ static int snd_cmipci_capture_spdif_hw_free(snd_pcm_substream_t *subs) { cmipci_t *cm = snd_pcm_substream_chip(subs); - unsigned long flags; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_CAPTURE_SPDF); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return snd_cmipci_hw_free(subs); } @@ -1289,7 +1286,7 @@ */ static irqreturn_t snd_cmipci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - cmipci_t *cm = snd_magic_cast(cmipci_t, dev_id, return IRQ_NONE); + cmipci_t *cm = dev_id; unsigned int status, mask = 0; /* fastpath out, to ease interrupt sharing */ @@ -1448,7 +1445,6 @@ */ static int open_device_check(cmipci_t *cm, int mode, snd_pcm_substream_t *subs) { - unsigned long flags; int ch = mode & CM_OPEN_CH_MASK; /* FIXME: a file should wait until the device becomes free @@ -1466,9 +1462,9 @@ if (! (mode & CM_OPEN_DAC)) { /* disable dual DAC mode */ cm->channel[ch].is_dac = 0; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENDBDAC); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); } up(&cm->open_mutex); return 0; @@ -1476,7 +1472,6 @@ static void close_device_check(cmipci_t *cm, int mode) { - unsigned long flags; int ch = mode & CM_OPEN_CH_MASK; down(&cm->open_mutex); @@ -1490,9 +1485,9 @@ if (! cm->channel[ch].is_dac) { /* enable dual DAC mode again */ cm->channel[ch].is_dac = 1; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_ENDBDAC); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); } } up(&cm->open_mutex); @@ -1840,12 +1835,11 @@ static int snd_cmipci_get_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { cmipci_t *cm = snd_kcontrol_chip(kcontrol); - unsigned long flags; cmipci_sb_reg_t reg; int val; cmipci_sb_reg_decode(®, kcontrol->private_value); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); val = (snd_cmipci_mixer_read(cm, reg.left_reg) >> reg.left_shift) & reg.mask; if (reg.invert) val = reg.mask - val; @@ -1856,14 +1850,13 @@ val = reg.mask - val; ucontrol->value.integer.value[1] = val; } - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } static int snd_cmipci_put_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { cmipci_t *cm = snd_kcontrol_chip(kcontrol); - unsigned long flags; cmipci_sb_reg_t reg; int change; int left, right, oleft, oright; @@ -1880,7 +1873,7 @@ right <<= reg.right_shift; } else right = 0; - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); oleft = snd_cmipci_mixer_read(cm, reg.left_reg); left |= oleft & ~(reg.mask << reg.left_shift); change = left != oleft; @@ -1895,7 +1888,7 @@ snd_cmipci_mixer_write(cm, reg.right_reg, right); } else snd_cmipci_mixer_write(cm, reg.left_reg, left); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return change; } @@ -1921,15 +1914,14 @@ static int snd_cmipci_get_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { cmipci_t *cm = snd_kcontrol_chip(kcontrol); - unsigned long flags; cmipci_sb_reg_t reg; int val1, val2; cmipci_sb_reg_decode(®, kcontrol->private_value); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); val1 = snd_cmipci_mixer_read(cm, reg.left_reg); val2 = snd_cmipci_mixer_read(cm, reg.right_reg); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); ucontrol->value.integer.value[0] = (val1 >> reg.left_shift) & 1; ucontrol->value.integer.value[1] = (val2 >> reg.left_shift) & 1; ucontrol->value.integer.value[2] = (val1 >> reg.right_shift) & 1; @@ -1940,13 +1932,12 @@ static int snd_cmipci_put_input_sw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { cmipci_t *cm = snd_kcontrol_chip(kcontrol); - unsigned long flags; cmipci_sb_reg_t reg; int change; int val1, val2, oval1, oval2; cmipci_sb_reg_decode(®, kcontrol->private_value); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); oval1 = snd_cmipci_mixer_read(cm, reg.left_reg); oval2 = snd_cmipci_mixer_read(cm, reg.right_reg); val1 = oval1 & ~((1 << reg.left_shift) | (1 << reg.right_shift)); @@ -1958,7 +1949,7 @@ change = val1 != oval1 || val2 != oval2; snd_cmipci_mixer_write(cm, reg.left_reg, val1); snd_cmipci_mixer_write(cm, reg.right_reg, val2); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return change; } @@ -2011,11 +2002,10 @@ { cmipci_t *cm = snd_kcontrol_chip(kcontrol); cmipci_sb_reg_t reg; - unsigned long flags; unsigned char oreg, val; cmipci_sb_reg_decode(®, kcontrol->private_value); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); oreg = inb(cm->iobase + reg.left_reg); val = (oreg >> reg.left_shift) & reg.mask; if (reg.invert) @@ -2027,7 +2017,7 @@ val = reg.mask - val; ucontrol->value.integer.value[1] = val; } - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } @@ -2035,11 +2025,10 @@ { cmipci_t *cm = snd_kcontrol_chip(kcontrol); cmipci_sb_reg_t reg; - unsigned long flags; unsigned char oreg, nreg, val; cmipci_sb_reg_decode(®, kcontrol->private_value); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); oreg = inb(cm->iobase + reg.left_reg); val = ucontrol->value.integer.value[0] & reg.mask; if (reg.invert) @@ -2054,7 +2043,7 @@ nreg |= (val << reg.right_shift); } outb(nreg, cm->iobase + reg.left_reg); - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return (nreg != oreg); } @@ -2078,8 +2067,6 @@ } -#define num_controls(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_cmipci_mixers[] __devinitdata = { CMIPCI_SB_VOL_STEREO("Master Playback Volume", SB_DSP4_MASTER_DEV, 3, 31), CMIPCI_MIXER_SW_MONO("3D Control - Switch", CM_REG_MIXER1, CM_X3DEN_SHIFT, 0), @@ -2137,14 +2124,13 @@ static int _snd_cmipci_uswitch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol, snd_cmipci_switch_args_t *args) { - unsigned long flags; unsigned int val; cmipci_t *cm = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); if (args->ac3_sensitive && cm->mixer_insensitive) { ucontrol->value.integer.value[0] = 0; - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } if (args->is_byte) @@ -2152,7 +2138,7 @@ else val = snd_cmipci_read(cm, args->reg); ucontrol->value.integer.value[0] = ((val & args->mask) == args->mask_on) ? 1 : 0; - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } @@ -2165,15 +2151,14 @@ static int _snd_cmipci_uswitch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol, snd_cmipci_switch_args_t *args) { - unsigned long flags; unsigned int val; int change; cmipci_t *cm = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); if (args->ac3_sensitive && cm->mixer_insensitive) { /* ignored */ - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return 0; } if (args->is_byte) @@ -2192,7 +2177,7 @@ else snd_cmipci_write(cm, args->reg, val); } - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); return change; } @@ -2345,7 +2330,6 @@ static int __devinit snd_cmipci_mixer_new(cmipci_t *cm, int pcm_spdif_device) { - unsigned long flags; snd_card_t *card; snd_kcontrol_new_t *sw; snd_kcontrol_t *kctl; @@ -2358,18 +2342,18 @@ strcpy(card->mixername, "CMedia PCI"); - spin_lock_irqsave(&cm->reg_lock, flags); + spin_lock_irq(&cm->reg_lock); snd_cmipci_mixer_write(cm, 0x00, 0x00); /* mixer reset */ - spin_unlock_irqrestore(&cm->reg_lock, flags); + spin_unlock_irq(&cm->reg_lock); - for (idx = 0; idx < num_controls(snd_cmipci_mixers); idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_mixers); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cmipci_mixers[idx], cm))) < 0) return err; } /* mixer switches */ sw = snd_cmipci_mixer_switches; - for (idx = 0; idx < num_controls(snd_cmipci_mixer_switches); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_mixer_switches); idx++, sw++) { err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); if (err < 0) return err; @@ -2382,7 +2366,7 @@ if (cm->device == PCI_DEVICE_ID_CMEDIA_CM8738 || cm->device == PCI_DEVICE_ID_CMEDIA_CM8738B) { sw = snd_cmipci_8738_mixer_switches; - for (idx = 0; idx < num_controls(snd_cmipci_8738_mixer_switches); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_8738_mixer_switches); idx++, sw++) { err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); if (err < 0) return err; @@ -2400,7 +2384,7 @@ } if (cm->chip_version <= 37) { sw = snd_cmipci_old_mixer_switches; - for (idx = 0; idx < num_controls(snd_cmipci_old_mixer_switches); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_old_mixer_switches); idx++, sw++) { err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); if (err < 0) return err; @@ -2409,7 +2393,7 @@ } if (cm->chip_version >= 39) { sw = snd_cmipci_extra_mixer_switches; - for (idx = 0; idx < num_controls(snd_cmipci_extra_mixer_switches); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_extra_mixer_switches); idx++, sw++) { err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); if (err < 0) return err; @@ -2418,7 +2402,7 @@ /* card switches */ sw = snd_cmipci_control_switches; - for (idx = 0; idx < num_controls(snd_cmipci_control_switches); idx++, sw++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_control_switches); idx++, sw++) { err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm)); if (err < 0) return err; @@ -2446,7 +2430,7 @@ static void snd_cmipci_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - cmipci_t *cm = snd_magic_cast(cmipci_t, entry->private_data, return); + cmipci_t *cm = entry->private_data; int i; snd_iprintf(buffer, "%s\n\n", cm->card->longname); @@ -2566,17 +2550,14 @@ kfree_nocheck(cm->res_joystick); } #endif - if (cm->res_iobase) { - release_resource(cm->res_iobase); - kfree_nocheck(cm->res_iobase); - } - snd_magic_kfree(cm); + pci_release_regions(cm->pci); + kfree(cm); return 0; } static int snd_cmipci_dev_free(snd_device_t *device) { - cmipci_t *cm = snd_magic_cast(cmipci_t, device->device_data, return -ENXIO); + cmipci_t *cm = device->device_data; return snd_cmipci_free(cm); } @@ -2598,7 +2579,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - cm = snd_magic_kcalloc(cmipci_t, 0, GFP_KERNEL); + cm = kcalloc(1, sizeof(*cm), GFP_KERNEL); if (cm == NULL) return -ENOMEM; @@ -2608,16 +2589,16 @@ cm->card = card; cm->pci = pci; cm->irq = -1; - cm->iobase = pci_resource_start(pci, 0); cm->channel[0].ch = 0; cm->channel[1].ch = 1; cm->channel[0].is_dac = cm->channel[1].is_dac = 1; /* dual DAC mode */ - if ((cm->res_iobase = request_region(cm->iobase, CM_EXTENT_CODEC, card->driver)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", cm->iobase, cm->iobase + CM_EXTENT_CODEC - 1); - err = -EBUSY; - goto __error; + if ((err = pci_request_regions(pci, card->driver)) < 0) { + kfree(cm); + return err; } + cm->iobase = pci_resource_start(pci, 0); + if (request_irq(pci->irq, snd_cmipci_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, (void *)cm)) { snd_printk("unable to grab IRQ %d\n", pci->irq); err = -EBUSY; @@ -2776,12 +2757,12 @@ int i; for (i = 0; ports[i]; i++) { joystick_port[dev] = ports[i]; - cm->res_joystick = request_region(ports[i], 8, "CMIPCI gameport"); + cm->res_joystick = request_region(ports[i], 1, "CMIPCI gameport"); if (cm->res_joystick) break; } } else { - cm->res_joystick = request_region(joystick_port[dev], 8, "CMIPCI gameport"); + cm->res_joystick = request_region(joystick_port[dev], 1, "CMIPCI gameport"); } } if (cm->res_joystick) { diff -Nru a/sound/pci/cs4281.c b/sound/pci/cs4281.c --- a/sound/pci/cs4281.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/cs4281.c 2004-09-06 16:37:55 -07:00 @@ -40,8 +40,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Cirrus Logic CS4281"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Cirrus Logic,CS4281}}"); +MODULE_SUPPORTED_DEVICE("{{Cirrus Logic,CS4281}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -51,16 +50,12 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for CS4281 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for CS4281 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable CS4281 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(dual_codec, bool, boot_devs, 0444); MODULE_PARM_DESC(dual_codec, "Secondary Codec ID (0 = disabled)."); -MODULE_PARM_SYNTAX(dual_codec, SNDRV_ENABLED ",allows:{{0,3}}"); /* * @@ -441,8 +436,6 @@ * */ -#define chip_t cs4281_t - typedef struct snd_cs4281 cs4281_t; typedef struct snd_cs4281_dma cs4281_dma_t; @@ -475,8 +468,6 @@ unsigned long ba1; /* virtual (accessible) address */ unsigned long ba0_addr; unsigned long ba1_addr; - struct resource *ba0_res; - struct resource *ba1_res; int dual_codec; @@ -575,7 +566,7 @@ * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 07h * 5. if DCV not cleared, break and return error */ - cs4281_t *chip = snd_magic_cast(cs4281_t, ac97->private_data, return); + cs4281_t *chip = ac97->private_data; int count; /* @@ -613,7 +604,7 @@ static unsigned short snd_cs4281_ac97_read(ac97_t *ac97, unsigned short reg) { - cs4281_t *chip = snd_magic_cast(cs4281_t, ac97->private_data, return -ENXIO); + cs4281_t *chip = ac97->private_data; int count; unsigned short result; // FIXME: volatile is necessary in the following due to a bug of @@ -709,9 +700,8 @@ { cs4281_dma_t *dma = (cs4281_dma_t *)substream->runtime->private_data; cs4281_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_PAUSE_PUSH: dma->valDCR |= BA0_DCR_MSK; @@ -738,13 +728,13 @@ dma->valFCR &= ~BA0_FCR_FEN; break; default: - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return -EINVAL; } snd_cs4281_pokeBA0(chip, dma->regDMR, dma->valDMR); snd_cs4281_pokeBA0(chip, dma->regFCR, dma->valFCR); snd_cs4281_pokeBA0(chip, dma->regDCR, dma->valDCR); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return 0; } @@ -851,11 +841,10 @@ snd_pcm_runtime_t *runtime = substream->runtime; cs4281_dma_t *dma = (cs4281_dma_t *)runtime->private_data; cs4281_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_cs4281_mode(chip, dma, runtime, 0, 1); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -864,11 +853,10 @@ snd_pcm_runtime_t *runtime = substream->runtime; cs4281_dma_t *dma = (cs4281_dma_t *)runtime->private_data; cs4281_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_cs4281_mode(chip, dma, runtime, 1, 1); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1015,7 +1003,7 @@ static void snd_cs4281_pcm_free(snd_pcm_t *pcm) { - cs4281_t *chip = snd_magic_cast(cs4281_t, pcm->private_data, return); + cs4281_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1124,13 +1112,13 @@ static void snd_cs4281_mixer_free_ac97_bus(ac97_bus_t *bus) { - cs4281_t *chip = snd_magic_cast(cs4281_t, bus->private_data, return); + cs4281_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_cs4281_mixer_free_ac97(ac97_t *ac97) { - cs4281_t *chip = snd_magic_cast(cs4281_t, ac97->private_data, return); + cs4281_t *chip = ac97->private_data; if (ac97->num) chip->ac97_secondary = NULL; else @@ -1140,17 +1128,16 @@ static int __devinit snd_cs4281_mixer(cs4281_t * chip) { snd_card_t *card = chip->card; - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; int err; + static ac97_bus_ops_t ops = { + .write = snd_cs4281_ac97_write, + .read = snd_cs4281_ac97_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_cs4281_ac97_write; - bus.read = snd_cs4281_ac97_read; - bus.private_data = chip; - bus.private_free = snd_cs4281_mixer_free_ac97_bus; - if ((err = snd_ac97_bus(card, &bus, &chip->ac97_bus)) < 0) + if ((err = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus)) < 0) return err; + chip->ac97_bus->private_free = snd_cs4281_mixer_free_ac97_bus; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -1177,7 +1164,7 @@ static void snd_cs4281_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return); + cs4281_t *chip = entry->private_data; snd_iprintf(buffer, "Cirrus Logic CS4281\n\n"); snd_iprintf(buffer, "Spurious half IRQs : %u\n", chip->spurious_dhtc_irq); @@ -1189,7 +1176,7 @@ unsigned long count, unsigned long pos) { long size; - cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO); + cs4281_t *chip = entry->private_data; size = count; if (pos + size > CS4281_BA0_SIZE) @@ -1206,7 +1193,7 @@ unsigned long count, unsigned long pos) { long size; - cs4281_t *chip = snd_magic_cast(cs4281_t, entry->private_data, return -ENXIO); + cs4281_t *chip = entry->private_data; size = count; if (pos + size > CS4281_BA1_SIZE) @@ -1262,7 +1249,7 @@ cs4281_gameport_t *gp = (cs4281_gameport_t *)gameport; cs4281_t *chip; snd_assert(gp, return); - chip = snd_magic_cast(cs4281_t, gp->chip, return); + chip = gp->chip; snd_cs4281_pokeBA0(chip, BA0_JSPT, 0xff); } @@ -1271,7 +1258,7 @@ cs4281_gameport_t *gp = (cs4281_gameport_t *)gameport; cs4281_t *chip; snd_assert(gp, return 0); - chip = snd_magic_cast(cs4281_t, gp->chip, return 0); + chip = gp->chip; return snd_cs4281_peekBA0(chip, BA0_JSPT); } @@ -1283,7 +1270,7 @@ unsigned js1, js2, jst; snd_assert(gp, return 0); - chip = snd_magic_cast(cs4281_t, gp->chip, return 0); + chip = gp->chip; js1 = snd_cs4281_peekBA0(chip, BA0_JSC1); js2 = snd_cs4281_peekBA0(chip, BA0_JSC2); @@ -1369,28 +1356,21 @@ /* PCI interface - D3 state */ pci_set_power_state(chip->pci, 3); + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); if (chip->ba0) iounmap((void *) chip->ba0); if (chip->ba1) iounmap((void *) chip->ba1); - if (chip->ba0_res) { - release_resource(chip->ba0_res); - kfree_nocheck(chip->ba0_res); - } - if (chip->ba1_res) { - release_resource(chip->ba1_res); - kfree_nocheck(chip->ba1_res); - } - if (chip->irq >= 0) - free_irq(chip->irq, (void *)chip); + pci_release_regions(chip->pci); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_cs4281_dev_free(snd_device_t *device) { - cs4281_t *chip = snd_magic_cast(cs4281_t, device->device_data, return -ENXIO); + cs4281_t *chip = device->device_data; return snd_cs4281_free(chip); } @@ -1415,15 +1395,13 @@ *rchip = NULL; if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(cs4281_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); chip->card = card; chip->pci = pci; chip->irq = -1; - chip->ba0_addr = pci_resource_start(pci, 0); - chip->ba1_addr = pci_resource_start(pci, 1); pci_set_master(pci); if (dual_codec < 0 || dual_codec > 3) { snd_printk(KERN_ERR "invalid dual_codec option %d\n", dual_codec); @@ -1431,16 +1409,13 @@ } chip->dual_codec = dual_codec; - if ((chip->ba0_res = request_mem_region(chip->ba0_addr, CS4281_BA0_SIZE, "CS4281 BA0")) == NULL) { - snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n", chip->ba0_addr, chip->ba0_addr + CS4281_BA0_SIZE - 1); - snd_cs4281_free(chip); - return -ENOMEM; - } - if ((chip->ba1_res = request_mem_region(chip->ba1_addr, CS4281_BA1_SIZE, "CS4281 BA1")) == NULL) { - snd_printk(KERN_ERR "unable to grab memory region 0x%lx-0x%lx\n", chip->ba1_addr, chip->ba1_addr + CS4281_BA1_SIZE - 1); - snd_cs4281_free(chip); - return -ENOMEM; + if ((err = pci_request_regions(pci, "CS4281")) < 0) { + kfree(chip); + return err; } + chip->ba0_addr = pci_resource_start(pci, 0); + chip->ba1_addr = pci_resource_start(pci, 1); + if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS4281", (void *)chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_cs4281_free(chip); @@ -1448,8 +1423,8 @@ } chip->irq = pci->irq; - chip->ba0 = (unsigned long) ioremap_nocache(chip->ba0_addr, CS4281_BA0_SIZE); - chip->ba1 = (unsigned long) ioremap_nocache(chip->ba1_addr, CS4281_BA1_SIZE); + chip->ba0 = (unsigned long) ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); + chip->ba1 = (unsigned long) ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); if (!chip->ba0 || !chip->ba1) { snd_cs4281_free(chip); return -ENOMEM; @@ -1713,10 +1688,9 @@ static int snd_cs4281_midi_input_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return -ENXIO); + cs4281_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->midcr |= BA0_MIDCR_RXE; chip->midi_input = substream; if (!(chip->uartm & CS4281_MODE_OUTPUT)) { @@ -1724,16 +1698,15 @@ } else { snd_cs4281_pokeBA0(chip, BA0_MIDCR, chip->midcr); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_cs4281_midi_input_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return -ENXIO); + cs4281_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->midcr &= ~(BA0_MIDCR_RXE | BA0_MIDCR_RIE); chip->midi_input = NULL; if (!(chip->uartm & CS4281_MODE_OUTPUT)) { @@ -1742,16 +1715,15 @@ snd_cs4281_pokeBA0(chip, BA0_MIDCR, chip->midcr); } chip->uartm &= ~CS4281_MODE_INPUT; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_cs4281_midi_output_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return -ENXIO); + cs4281_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->uartm |= CS4281_MODE_OUTPUT; chip->midcr |= BA0_MIDCR_TXE; chip->midi_output = substream; @@ -1760,16 +1732,15 @@ } else { snd_cs4281_pokeBA0(chip, BA0_MIDCR, chip->midcr); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_cs4281_midi_output_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return -ENXIO); + cs4281_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->midcr &= ~(BA0_MIDCR_TXE | BA0_MIDCR_TIE); chip->midi_output = NULL; if (!(chip->uartm & CS4281_MODE_INPUT)) { @@ -1778,14 +1749,14 @@ snd_cs4281_pokeBA0(chip, BA0_MIDCR, chip->midcr); } chip->uartm &= ~CS4281_MODE_OUTPUT; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static void snd_cs4281_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return); + cs4281_t *chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->reg_lock, flags); if (up) { @@ -1805,7 +1776,7 @@ static void snd_cs4281_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - cs4281_t *chip = snd_magic_cast(cs4281_t, substream->rmidi->private_data, return); + cs4281_t *chip = substream->rmidi->private_data; unsigned char byte; spin_lock_irqsave(&chip->reg_lock, flags); @@ -1872,7 +1843,7 @@ static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - cs4281_t *chip = snd_magic_cast(cs4281_t, dev_id, return IRQ_NONE); + cs4281_t *chip = dev_id; unsigned int status, dma, val; cs4281_dma_t *cdma; @@ -1919,7 +1890,9 @@ c = snd_cs4281_peekBA0(chip, BA0_MIDRP); if ((chip->midcr & BA0_MIDCR_RIE) == 0) continue; + spin_unlock(&chip->reg_lock); snd_rawmidi_receive(chip->midi_input, &c, 1); + spin_lock(&chip->reg_lock); } while ((snd_cs4281_peekBA0(chip, BA0_MIDSR) & BA0_MIDSR_TBF) == 0) { if ((chip->midcr & BA0_MIDCR_TIE) == 0) @@ -2034,13 +2007,11 @@ BA0_PPRVC, }; -#define number_of(array) (sizeof(array) / sizeof(array[0])) - #define CLKCR1_CKRA 0x00010000L static int cs4281_suspend(snd_card_t *card, unsigned int state) { - cs4281_t *chip = snd_magic_cast(cs4281_t, card->pm_private_data, return -EINVAL); + cs4281_t *chip = card->pm_private_data; u32 ulCLK; unsigned int i; @@ -2059,7 +2030,7 @@ snd_cs4281_pokeBA0(chip, BA0_HICR, BA0_HICR_CHGM); /* remember the status registers */ - for (i = 0; i < number_of(saved_regs); i++) + for (i = 0; i < ARRAY_SIZE(saved_regs); i++) if (saved_regs[i]) chip->suspend_regs[i] = snd_cs4281_peekBA0(chip, saved_regs[i]); @@ -2085,7 +2056,7 @@ static int cs4281_resume(snd_card_t *card, unsigned int state) { - cs4281_t *chip = snd_magic_cast(cs4281_t, card->pm_private_data, return -EINVAL); + cs4281_t *chip = card->pm_private_data; unsigned int i; u32 ulCLK; @@ -2098,7 +2069,7 @@ snd_cs4281_chip_init(chip); /* restore the status registers */ - for (i = 0; i < number_of(saved_regs); i++) + for (i = 0; i < ARRAY_SIZE(saved_regs); i++) if (saved_regs[i]) snd_cs4281_pokeBA0(chip, saved_regs[i], chip->suspend_regs[i]); diff -Nru a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c --- a/sound/pci/cs46xx/cs46xx.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/cs46xx/cs46xx.c 2004-09-06 16:37:55 -07:00 @@ -37,8 +37,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Cirrus Logic Sound Fusion CS46XX"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Cirrus Logic,Sound Fusion (CS4280)}," +MODULE_SUPPORTED_DEVICE("{{Cirrus Logic,Sound Fusion (CS4280)}," "{Cirrus Logic,Sound Fusion (CS4610)}," "{Cirrus Logic,Sound Fusion (CS4612)}," "{Cirrus Logic,Sound Fusion (CS4615)}," @@ -56,22 +55,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the CS46xx soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the CS46xx soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable CS46xx soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(external_amp, bool, boot_devs, 0444); MODULE_PARM_DESC(external_amp, "Force to enable external amplifer."); -MODULE_PARM_SYNTAX(external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(thinkpad, bool, boot_devs, 0444); MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); -MODULE_PARM_SYNTAX(thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(mmap_valid, bool, boot_devs, 0444); MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); -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 */ diff -Nru a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c --- a/sound/pci/cs46xx/cs46xx_lib.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/cs46xx/cs46xx_lib.c 2004-09-06 16:37:50 -07:00 @@ -79,6 +79,8 @@ (codec_index == CS46XX_SECONDARY_CODEC_INDEX), return -EINVAL); + chip->active_ctrl(chip, 1); + if (codec_index == CS46XX_SECONDARY_CODEC_INDEX) offset = CS46XX_SECONDARY_CODEC_OFFSET; @@ -184,27 +186,22 @@ //snd_cs46xx_peekBA0(chip, BA0_ACCAD); result = snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); end: + chip->active_ctrl(chip, -1); return result; } static unsigned short snd_cs46xx_ac97_read(ac97_t * ac97, unsigned short reg) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return -ENXIO); + cs46xx_t *chip = ac97->private_data; unsigned short val; - int codec_index = -1; + int codec_index = ac97->num; + + snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX || + codec_index == CS46XX_SECONDARY_CODEC_INDEX, + return 0xffff); - /* UGGLY: nr_ac97_codecs == 0 primery codec detection is in progress */ - if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] || chip->nr_ac97_codecs == 0) - codec_index = CS46XX_PRIMARY_CODEC_INDEX; - /* UGGLY: nr_ac97_codecs == 1 secondary codec detection is in progress */ - else if (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] || chip->nr_ac97_codecs == 1) - codec_index = CS46XX_SECONDARY_CODEC_INDEX; - else - snd_assert(0, return 0xffff); - chip->active_ctrl(chip, 1); val = snd_cs46xx_codec_read(chip, reg, codec_index); - chip->active_ctrl(chip, -1); /* HACK: voyetra uses EAPD bit in the reverse way. * we flip the bit to show the mixer status correctly @@ -227,6 +224,8 @@ (codec_index == CS46XX_SECONDARY_CODEC_INDEX), return); + chip->active_ctrl(chip, 1); + /* * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 @@ -271,27 +270,24 @@ * ACCTL = 460h, DCV should be reset by now and 460h = 07h */ if (!(snd_cs46xx_peekBA0(chip, BA0_ACCTL) & ACCTL_DCV)) { - return; + goto end; } } snd_printk("AC'97 write problem, codec_index = %d, reg = 0x%x, val = 0x%x\n", codec_index, reg, val); + end: + chip->active_ctrl(chip, -1); } static void snd_cs46xx_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return); - int codec_index = -1; + cs46xx_t *chip = ac97->private_data; + int codec_index = ac97->num; - /* UGGLY: nr_ac97_codecs == 0 primery codec detection is in progress */ - if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] || chip->nr_ac97_codecs == 0) - codec_index = CS46XX_PRIMARY_CODEC_INDEX; - /* UGGLY: nr_ac97_codecs == 1 secondary codec detection is in progress */ - else if (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] || chip->nr_ac97_codecs == 1) - codec_index = CS46XX_SECONDARY_CODEC_INDEX; - else - snd_assert(0,return); + snd_assert(codec_index == CS46XX_PRIMARY_CODEC_INDEX || + codec_index == CS46XX_SECONDARY_CODEC_INDEX, + return); /* HACK: voyetra uses EAPD bit in the reverse way. * we flip the bit to show the mixer status correctly @@ -299,9 +295,7 @@ if (reg == AC97_POWERDOWN && chip->amplifier_ctrl == amp_voyetra) val ^= 0x8000; - chip->active_ctrl(chip, 1); snd_cs46xx_codec_write(chip, reg, val, codec_index); - chip->active_ctrl(chip, -1); } @@ -688,84 +682,35 @@ * PCM part */ +static void snd_cs46xx_pb_trans_copy(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + cs46xx_pcm_t * cpcm = runtime->private_data; + memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes); +} + static int snd_cs46xx_playback_transfer(snd_pcm_substream_t *substream) { - /* cs46xx_t *chip = snd_pcm_substream_chip(substream); */ snd_pcm_runtime_t *runtime = substream->runtime; - cs46xx_pcm_t * cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); - snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr; - snd_pcm_sframes_t diff = appl_ptr - cpcm->appl_ptr; - int buffer_size = runtime->period_size * CS46XX_FRAGS << cpcm->shift; - - if (diff) { - if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) - diff += runtime->boundary; - cpcm->sw_ready += diff * (1 << cpcm->shift); - cpcm->appl_ptr = appl_ptr; - } - while (cpcm->hw_ready < buffer_size && - cpcm->sw_ready > 0) { - size_t hw_to_end = buffer_size - cpcm->hw_data; - size_t sw_to_end = cpcm->sw_bufsize - cpcm->sw_data; - size_t bytes = buffer_size - cpcm->hw_ready; - if (cpcm->sw_ready < (int)bytes) - bytes = cpcm->sw_ready; - if (hw_to_end < bytes) - bytes = hw_to_end; - if (sw_to_end < bytes) - bytes = sw_to_end; - memcpy(cpcm->hw_buf.area + cpcm->hw_data, - runtime->dma_area + cpcm->sw_data, - bytes); - cpcm->hw_data += bytes; - if ((int)cpcm->hw_data == buffer_size) - cpcm->hw_data = 0; - cpcm->sw_data += bytes; - if (cpcm->sw_data == cpcm->sw_bufsize) - cpcm->sw_data = 0; - cpcm->hw_ready += bytes; - cpcm->sw_ready -= bytes; - } + cs46xx_pcm_t * cpcm = runtime->private_data; + snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy); return 0; } -static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream) +static void snd_cs46xx_cp_trans_copy(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes) { cs46xx_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr; - snd_pcm_sframes_t diff = appl_ptr - chip->capt.appl_ptr; - int buffer_size = runtime->period_size * CS46XX_FRAGS << chip->capt.shift; - - if (diff) { - if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) - diff += runtime->boundary; - chip->capt.sw_ready -= diff * (1 << chip->capt.shift); - chip->capt.appl_ptr = appl_ptr; - } - while (chip->capt.hw_ready > 0 && - chip->capt.sw_ready < (int)chip->capt.sw_bufsize) { - size_t hw_to_end = buffer_size - chip->capt.hw_data; - size_t sw_to_end = chip->capt.sw_bufsize - chip->capt.sw_data; - size_t bytes = chip->capt.sw_bufsize - chip->capt.sw_ready; - if (chip->capt.hw_ready < (int)bytes) - bytes = chip->capt.hw_ready; - if (hw_to_end < bytes) - bytes = hw_to_end; - if (sw_to_end < bytes) - bytes = sw_to_end; - memcpy(runtime->dma_area + chip->capt.sw_data, - chip->capt.hw_buf.area + chip->capt.hw_data, - bytes); - chip->capt.hw_data += bytes; - if ((int)chip->capt.hw_data == buffer_size) - chip->capt.hw_data = 0; - chip->capt.sw_data += bytes; - if (chip->capt.sw_data == chip->capt.sw_bufsize) - chip->capt.sw_data = 0; - chip->capt.hw_ready -= bytes; - chip->capt.sw_ready += bytes; - } + memcpy(runtime->dma_area + rec->sw_data, + chip->capt.hw_buf.area + rec->hw_data, bytes); +} + +static int snd_cs46xx_capture_transfer(snd_pcm_substream_t *substream) +{ + cs46xx_t *chip = snd_pcm_substream_chip(substream); + snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, snd_cs46xx_cp_trans_copy); return 0; } @@ -773,7 +718,7 @@ { cs46xx_t *chip = snd_pcm_substream_chip(substream); size_t ptr; - cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); + cs46xx_pcm_t *cpcm = substream->runtime->private_data; snd_assert (cpcm->pcm_channel,return -ENXIO); #ifdef CONFIG_SND_CS46XX_NEW_DSP @@ -789,9 +734,7 @@ { cs46xx_t *chip = snd_pcm_substream_chip(substream); size_t ptr; - cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); - ssize_t bytes; - int buffer_size = substream->runtime->period_size * CS46XX_FRAGS << cpcm->shift; + cs46xx_pcm_t *cpcm = substream->runtime->private_data; #ifdef CONFIG_SND_CS46XX_NEW_DSP snd_assert (cpcm->pcm_channel,return -ENXIO); @@ -800,18 +743,7 @@ ptr = snd_cs46xx_peek(chip, BA1_PBA); #endif ptr -= cpcm->hw_buf.addr; - - bytes = ptr - cpcm->hw_io; - - if (bytes < 0) - bytes += buffer_size; - cpcm->hw_io = ptr; - cpcm->hw_ready -= bytes; - cpcm->sw_io += bytes; - if (cpcm->sw_io >= cpcm->sw_bufsize) - cpcm->sw_io -= cpcm->sw_bufsize; - snd_cs46xx_playback_transfer(substream); - return cpcm->sw_io >> cpcm->shift; + return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr); } static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(snd_pcm_substream_t * substream) @@ -825,18 +757,7 @@ { cs46xx_t *chip = snd_pcm_substream_chip(substream); size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; - ssize_t bytes = ptr - chip->capt.hw_io; - int buffer_size = substream->runtime->period_size * CS46XX_FRAGS << chip->capt.shift; - - if (bytes < 0) - bytes += buffer_size; - chip->capt.hw_io = ptr; - chip->capt.hw_ready += bytes; - chip->capt.sw_io += bytes; - if (chip->capt.sw_io >= chip->capt.sw_bufsize) - chip->capt.sw_io -= chip->capt.sw_bufsize; - snd_cs46xx_capture_transfer(substream); - return chip->capt.sw_io >> chip->capt.shift; + return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr); } static int snd_cs46xx_playback_trigger(snd_pcm_substream_t * substream, @@ -847,13 +768,7 @@ int result = 0; #ifdef CONFIG_SND_CS46XX_NEW_DSP - cs46xx_pcm_t *cpcm = snd_magic_cast(cs46xx_pcm_t, substream->runtime->private_data, return -ENXIO); -#else - spin_lock(&chip->reg_lock); -#endif - -#ifdef CONFIG_SND_CS46XX_NEW_DSP - + cs46xx_pcm_t *cpcm = substream->runtime->private_data; if (! cpcm->pcm_channel) { return -ENXIO; } @@ -872,6 +787,7 @@ if (substream->runtime->periods != CS46XX_FRAGS) snd_cs46xx_playback_transfer(substream); #else + spin_lock(&chip->reg_lock); if (substream->runtime->periods != CS46XX_FRAGS) snd_cs46xx_playback_transfer(substream); { unsigned int tmp; @@ -879,6 +795,7 @@ tmp &= 0x0000ffff; snd_cs46xx_poke(chip, BA1_PCTL, chip->play_ctl | tmp); } + spin_unlock(&chip->reg_lock); #endif break; case SNDRV_PCM_TRIGGER_STOP: @@ -891,11 +808,13 @@ if (!cpcm->pcm_channel->unlinked) cs46xx_dsp_pcm_unlink(chip,cpcm->pcm_channel); #else + spin_lock(&chip->reg_lock); { unsigned int tmp; tmp = snd_cs46xx_peek(chip, BA1_PCTL); tmp &= 0x0000ffff; snd_cs46xx_poke(chip, BA1_PCTL, tmp); } + spin_unlock(&chip->reg_lock); #endif break; default: @@ -903,10 +822,6 @@ break; } -#ifndef CONFIG_SND_CS46XX_NEW_DSP - spin_unlock(&chip->reg_lock); -#endif - return result; } @@ -987,7 +902,7 @@ int sample_rate = params_rate(hw_params); int period_size = params_period_bytes(hw_params); #endif - cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + cpcm = runtime->private_data; #ifdef CONFIG_SND_CS46XX_NEW_DSP snd_assert (sample_rate != 0, return -ENXIO); @@ -1084,7 +999,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; cs46xx_pcm_t *cpcm; - cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + cpcm = runtime->private_data; /* if play_back open fails, then this function is called and cpcm can actually be NULL here */ @@ -1108,7 +1023,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; cs46xx_pcm_t *cpcm; - cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + cpcm = runtime->private_data; #ifdef CONFIG_SND_CS46XX_NEW_DSP snd_assert (cpcm->pcm_channel != NULL, return -ENXIO); @@ -1143,10 +1058,9 @@ pfie |= 0x00004000; } - cpcm->sw_bufsize = snd_pcm_lib_buffer_bytes(substream); - cpcm->sw_data = cpcm->sw_io = cpcm->sw_ready = 0; - cpcm->hw_data = cpcm->hw_io = cpcm->hw_ready = 0; - cpcm->appl_ptr = 0; + memset(&cpcm->pcm_rec, 0, sizeof(cpcm->pcm_rec)); + cpcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + cpcm->pcm_rec.hw_buffer_size = runtime->period_size * CS46XX_FRAGS << cpcm->shift; #ifdef CONFIG_SND_CS46XX_NEW_DSP @@ -1223,10 +1137,9 @@ snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr); chip->capt.shift = 2; - chip->capt.sw_bufsize = snd_pcm_lib_buffer_bytes(substream); - chip->capt.sw_data = chip->capt.sw_io = chip->capt.sw_ready = 0; - chip->capt.hw_data = chip->capt.hw_io = chip->capt.hw_ready = 0; - chip->capt.appl_ptr = 0; + memset(&chip->capt.pcm_rec, 0, sizeof(chip->capt.pcm_rec)); + chip->capt.pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + chip->capt.pcm_rec.hw_buffer_size = runtime->period_size * CS46XX_FRAGS << 2; snd_cs46xx_set_capture_sample_rate(chip, runtime->rate); return 0; @@ -1234,7 +1147,7 @@ static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, dev_id, return IRQ_NONE); + cs46xx_t *chip = dev_id; u32 status1; #ifdef CONFIG_SND_CS46XX_NEW_DSP dsp_spos_instance_t * ins = chip->dsp_spos_instance; @@ -1265,7 +1178,7 @@ if (ins->pcm_channels[i].active && ins->pcm_channels[i].private_data && !ins->pcm_channels[i].unlinked) { - cpcm = snd_magic_cast(cs46xx_pcm_t, ins->pcm_channels[i].private_data, continue); + cpcm = ins->pcm_channels[i].private_data; snd_pcm_period_elapsed(cpcm->substream); } } @@ -1275,7 +1188,7 @@ if (ins->pcm_channels[i].active && ins->pcm_channels[i].private_data && !ins->pcm_channels[i].unlinked) { - cpcm = snd_magic_cast(cs46xx_pcm_t, ins->pcm_channels[i].private_data, continue); + cpcm = ins->pcm_channels[i].private_data; snd_pcm_period_elapsed(cpcm->substream); } } @@ -1302,7 +1215,9 @@ c = snd_cs46xx_peekBA0(chip, BA0_MIDRP); if ((chip->midcr & MIDCR_RIE) == 0) continue; + spin_unlock(&chip->reg_lock); snd_rawmidi_receive(chip->midi_input, &c, 1); + spin_lock(&chip->reg_lock); } while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_TBF) == 0) { if ((chip->midcr & MIDCR_TIE) == 0) @@ -1370,10 +1285,8 @@ static unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 }; -#define PERIOD_SIZES sizeof(period_sizes) / sizeof(period_sizes[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { - .count = PERIOD_SIZES, + .count = ARRAY_SIZE(period_sizes), .list = period_sizes, .mask = 0 }; @@ -1382,10 +1295,8 @@ static void snd_cs46xx_pcm_free_substream(snd_pcm_runtime_t *runtime) { - cs46xx_pcm_t * cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return); - - if (cpcm) - snd_magic_kfree(cpcm); + cs46xx_pcm_t * cpcm = runtime->private_data; + kfree(cpcm); } static int _cs46xx_playback_open_channel (snd_pcm_substream_t * substream,int pcm_channel_id) @@ -1394,11 +1305,12 @@ cs46xx_pcm_t * cpcm; snd_pcm_runtime_t *runtime = substream->runtime; - cpcm = snd_magic_kcalloc(cs46xx_pcm_t, 0, GFP_KERNEL); + cpcm = kcalloc(1, sizeof(*cpcm), GFP_KERNEL); if (cpcm == NULL) return -ENOMEM; - if (snd_dma_alloc_pages(&chip->dma_dev, PAGE_SIZE, &cpcm->hw_buf) < 0) { - snd_magic_kfree(cpcm); + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_SIZE, &cpcm->hw_buf) < 0) { + kfree(cpcm); return -ENOMEM; } @@ -1486,7 +1398,8 @@ { cs46xx_t *chip = snd_pcm_substream_chip(substream); - if (snd_dma_alloc_pages(&chip->dma_dev, PAGE_SIZE, &chip->capt.hw_buf) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_SIZE, &chip->capt.hw_buf) < 0) return -ENOMEM; chip->capt.substream = substream; substream->runtime->hw = snd_cs46xx_capture; @@ -1510,7 +1423,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; cs46xx_pcm_t * cpcm; - cpcm = snd_magic_cast(cs46xx_pcm_t, runtime->private_data, return -ENXIO); + cpcm = runtime->private_data; /* when playback_open fails, then cpcm can be NULL */ if (!cpcm) return -ENXIO; @@ -1527,7 +1440,7 @@ #endif cpcm->substream = NULL; - snd_dma_free_pages(&chip->dma_dev, &cpcm->hw_buf); + snd_dma_free_pages(&cpcm->hw_buf); chip->active_ctrl(chip, -1); return 0; @@ -1538,7 +1451,7 @@ cs46xx_t *chip = snd_pcm_substream_chip(substream); chip->capt.substream = NULL; - snd_dma_free_pages(&chip->dma_dev, &chip->capt.hw_buf); + snd_dma_free_pages(&chip->capt.hw_buf); chip->active_ctrl(chip, -1); return 0; @@ -1664,7 +1577,7 @@ static void snd_cs46xx_pcm_free(snd_pcm_t *pcm) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, pcm->private_data, return); + cs46xx_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1672,21 +1585,21 @@ #ifdef CONFIG_SND_CS46XX_NEW_DSP static void snd_cs46xx_pcm_rear_free(snd_pcm_t *pcm) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, pcm->private_data, return); + cs46xx_t *chip = pcm->private_data; chip->pcm_rear = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } static void snd_cs46xx_pcm_center_lfe_free(snd_pcm_t *pcm) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, pcm->private_data, return); + cs46xx_t *chip = pcm->private_data; chip->pcm_center_lfe = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } static void snd_cs46xx_pcm_iec958_free(snd_pcm_t *pcm) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, pcm->private_data, return); + cs46xx_t *chip = pcm->private_data; chip->pcm_iec958 = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1824,14 +1737,14 @@ */ static void snd_cs46xx_mixer_free_ac97_bus(ac97_bus_t *bus) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, bus->private_data, return); + cs46xx_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_cs46xx_mixer_free_ac97(ac97_t *ac97) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, ac97->private_data, return); + cs46xx_t *chip = ac97->private_data; snd_assert ((ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) || (ac97 == chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]), @@ -2420,7 +2333,7 @@ { unsigned long end_time; int err; - cs46xx_t * chip = snd_magic_cast(cs46xx_t,ac97->private_data,return /* -ENXIO */); + cs46xx_t * chip = ac97->private_data; /* reset to defaults */ snd_ac97_write(ac97, AC97_RESET, 0); @@ -2470,39 +2383,38 @@ int __devinit snd_cs46xx_mixer(cs46xx_t *chip) { snd_card_t *card = chip->card; - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; snd_ctl_elem_id_t id; int err; unsigned int idx; + static ac97_bus_ops_t ops = { +#ifdef CONFIG_SND_CS46XX_NEW_DSP + .reset = snd_cs46xx_codec_reset, +#endif + .write = snd_cs46xx_ac97_write, + .read = snd_cs46xx_ac97_read, + }; /* detect primary codec */ chip->nr_ac97_codecs = 0; snd_printdd("snd_cs46xx: detecting primary codec\n"); - memset(&bus, 0, sizeof(bus)); - bus.write = snd_cs46xx_ac97_write; - bus.read = snd_cs46xx_ac97_read; -#ifdef CONFIG_SND_CS46XX_NEW_DSP - bus.reset = snd_cs46xx_codec_reset; -#endif - bus.private_data = chip; - bus.private_free = snd_cs46xx_mixer_free_ac97_bus; - if ((err = snd_ac97_bus(card, &bus, &chip->ac97_bus)) < 0) + if ((err = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus)) < 0) return err; + chip->ac97_bus->private_free = snd_cs46xx_mixer_free_ac97_bus; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; ac97.private_free = snd_cs46xx_mixer_free_ac97; - chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = &ac97; - snd_cs46xx_ac97_write(&ac97, AC97_MASTER, 0x8000); + snd_cs46xx_codec_write(chip, AC97_MASTER, 0x8000, + CS46XX_PRIMARY_CODEC_INDEX); for (idx = 0; idx < 100; ++idx) { - if (snd_cs46xx_ac97_read(&ac97, AC97_MASTER) == 0x8000) + if (snd_cs46xx_codec_read(chip, AC97_MASTER, + CS46XX_PRIMARY_CODEC_INDEX) == 0x8000) goto _ok; set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ/100); } - chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL; return -ENXIO; _ok: @@ -2519,18 +2431,21 @@ ac97.private_free = snd_cs46xx_mixer_free_ac97; ac97.num = CS46XX_SECONDARY_CODEC_INDEX; - snd_cs46xx_ac97_write(&ac97, AC97_RESET, 0); + snd_cs46xx_codec_write(chip, AC97_RESET, 0, + CS46XX_SECONDARY_CODEC_INDEX); udelay(10); - if (snd_cs46xx_ac97_read(&ac97, AC97_RESET) & 0x8000) { + if (snd_cs46xx_codec_read(chip, AC97_RESET, + CS46XX_SECONDARY_CODEC_INDEX) & 0x8000) { snd_printdd("snd_cs46xx: seconadry codec not present\n"); goto _no_sec_codec; } - chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = &ac97; - snd_cs46xx_ac97_write(&ac97, AC97_MASTER, 0x8000); + snd_cs46xx_codec_write(chip, AC97_MASTER, 0x8000, + CS46XX_SECONDARY_CODEC_INDEX); for (idx = 0; idx < 100; ++idx) { - if (snd_cs46xx_ac97_read(&ac97, AC97_MASTER) == 0x8000) { + if (snd_cs46xx_codec_read(chip, AC97_MASTER, + CS46XX_SECONDARY_CODEC_INDEX) == 0x8000) { goto _ok2; } set_current_state(TASK_INTERRUPTIBLE); @@ -2540,7 +2455,6 @@ _no_sec_codec: snd_printdd("snd_cs46xx: secondary codec did not respond ...\n"); - chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; chip->nr_ac97_codecs = 1; /* well, one codec only ... */ @@ -2605,11 +2519,10 @@ static int snd_cs46xx_midi_input_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return -ENXIO); + cs46xx_t *chip = substream->rmidi->private_data; chip->active_ctrl(chip, 1); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->uartm |= CS46XX_MODE_INPUT; chip->midcr |= MIDCR_RXE; chip->midi_input = substream; @@ -2618,16 +2531,15 @@ } else { snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_cs46xx_midi_input_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return -ENXIO); + cs46xx_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE); chip->midi_input = NULL; if (!(chip->uartm & CS46XX_MODE_OUTPUT)) { @@ -2636,19 +2548,18 @@ snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); } chip->uartm &= ~CS46XX_MODE_INPUT; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); chip->active_ctrl(chip, -1); return 0; } static int snd_cs46xx_midi_output_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return -ENXIO); + cs46xx_t *chip = substream->rmidi->private_data; chip->active_ctrl(chip, 1); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->uartm |= CS46XX_MODE_OUTPUT; chip->midcr |= MIDCR_TXE; chip->midi_output = substream; @@ -2657,16 +2568,15 @@ } else { snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } static int snd_cs46xx_midi_output_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return -ENXIO); + cs46xx_t *chip = substream->rmidi->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE); chip->midi_output = NULL; if (!(chip->uartm & CS46XX_MODE_INPUT)) { @@ -2675,7 +2585,7 @@ snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); } chip->uartm &= ~CS46XX_MODE_OUTPUT; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); chip->active_ctrl(chip, -1); return 0; } @@ -2683,7 +2593,7 @@ static void snd_cs46xx_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return); + cs46xx_t *chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->reg_lock, flags); if (up) { @@ -2703,7 +2613,7 @@ static void snd_cs46xx_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, substream->rmidi->private_data, return); + cs46xx_t *chip = substream->rmidi->private_data; unsigned char byte; spin_lock_irqsave(&chip->reg_lock, flags); @@ -2781,7 +2691,7 @@ cs46xx_gameport_t *gp = (cs46xx_gameport_t *)gameport; cs46xx_t *chip; snd_assert(gp, return); - chip = snd_magic_cast(cs46xx_t, gp->chip, return); + chip = gp->chip; snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); } @@ -2790,7 +2700,7 @@ cs46xx_gameport_t *gp = (cs46xx_gameport_t *)gameport; cs46xx_t *chip; snd_assert(gp, return 0); - chip = snd_magic_cast(cs46xx_t, gp->chip, return 0); + chip = gp->chip; return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); } @@ -2801,7 +2711,7 @@ unsigned js1, js2, jst; snd_assert(gp, return 0); - chip = snd_magic_cast(cs46xx_t, gp->chip, return 0); + chip = gp->chip; js1 = snd_cs46xx_peekBA0(chip, BA0_JSC1); js2 = snd_cs46xx_peekBA0(chip, BA0_JSC2); @@ -3011,13 +2921,13 @@ } #endif - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_cs46xx_dev_free(snd_device_t *device) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, device->device_data, return -ENXIO); + cs46xx_t *chip = device->device_data; return snd_cs46xx_free(chip); } @@ -3786,7 +3696,7 @@ #ifdef CONFIG_PM static int snd_cs46xx_suspend(snd_card_t *card, unsigned int state) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, card->pm_private_data, return -EINVAL); + cs46xx_t *chip = card->pm_private_data; int amp_saved; snd_pcm_suspend_all(chip->pcm); @@ -3810,7 +3720,7 @@ static int snd_cs46xx_resume(snd_card_t *card, unsigned int state) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, card->pm_private_data, return -EINVAL); + cs46xx_t *chip = card->pm_private_data; int amp_saved; pci_enable_device(chip->pci); @@ -3869,7 +3779,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(cs46xx_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -3912,10 +3822,6 @@ strcpy(region->name, "CS46xx_BA1_reg"); region->base = chip->ba1_addr + BA1_SP_REG; region->size = CS46XX_BA1_REG_SIZE; - - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(pci); /* set up amp and clkrun hack */ pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &ss_vendor); diff -Nru a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h --- a/sound/pci/cs46xx/cs46xx_lib.h 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/cs46xx/cs46xx_lib.h 2004-09-06 16:37:51 -07:00 @@ -22,8 +22,6 @@ #ifndef __CS46XX_LIB_H__ #define __CS46XX_LIB_H__ -#define chip_t cs46xx_t - /* * constants */ diff -Nru a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c --- a/sound/pci/cs46xx/dsp_spos.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/cs46xx/dsp_spos.c 2004-09-06 16:37:54 -07:00 @@ -74,7 +74,7 @@ (mop_operands & WIDE_LADD_INSTR_MASK) == 0 && (mop_operands & WIDE_INSTR_MASK) != 0) { wide_op = loval & 0x7f; - for (j = 0;j < sizeof(wide_opcodes) / sizeof(wide_opcode_t); ++j) { + for (j = 0;j < ARRAY_SIZE(wide_opcodes); ++j) { if (wide_opcodes[j] == wide_op) { /* need to reallocate instruction */ address = (hival & 0x00FFF) << 5; @@ -462,7 +462,7 @@ static void cs46xx_dsp_proc_symbol_table_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; dsp_spos_instance_t * ins = chip->dsp_spos_instance; int i; @@ -489,7 +489,7 @@ static void cs46xx_dsp_proc_modules_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; dsp_spos_instance_t * ins = chip->dsp_spos_instance; int i,j; @@ -511,7 +511,7 @@ static void cs46xx_dsp_proc_task_tree_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; dsp_spos_instance_t * ins = chip->dsp_spos_instance; int i,j,col; unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; @@ -538,7 +538,7 @@ static void cs46xx_dsp_proc_scb_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; dsp_spos_instance_t * ins = chip->dsp_spos_instance; int i; @@ -570,7 +570,7 @@ static void cs46xx_dsp_proc_parameter_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; /*dsp_spos_instance_t * ins = chip->dsp_spos_instance; */ unsigned int i,col = 0; unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; @@ -597,7 +597,7 @@ static void cs46xx_dsp_proc_sample_dump_read (snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - cs46xx_t *chip = snd_magic_cast(cs46xx_t, entry->private_data, return); + cs46xx_t *chip = entry->private_data; int i,col = 0; unsigned long dst = chip->region.idx[2].remap_addr; @@ -1057,7 +1057,7 @@ int fifo_addr,fifo_span,valid_slots; - spos_control_block_t sposcb = { + static spos_control_block_t sposcb = { /* 0 */ HFG_TREE_SCB,HFG_STACK, /* 1 */ SPOSCB_ADDR,BG_TREE_SCB_ADDR, /* 2 */ DSP_SPOS_DC,0, @@ -1110,18 +1110,18 @@ { /* create the null SCB */ - generic_scb_t null_scb = { + static generic_scb_t null_scb = { { 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, NULL_SCB_ADDR, NULL_SCB_ADDR, - null_algorithm->address, 0, - 0,0,0, + 0, 0, 0, 0, 0, { 0,0, 0,0, } }; + null_scb.entry_point = null_algorithm->address; ins->the_null_scb = cs46xx_dsp_create_scb(chip, "nullSCB", (u32 *)&null_scb, NULL_SCB_ADDR); ins->the_null_scb->task_entry = null_algorithm; ins->the_null_scb->sub_list_ptr = ins->the_null_scb; @@ -1132,7 +1132,7 @@ { /* setup foreground task tree */ - task_tree_control_block_t fg_task_tree_hdr = { + static task_tree_control_block_t fg_task_tree_hdr = { { FG_TASK_HEADER_ADDR | (DSP_SPOS_DC << 0x10), DSP_SPOS_DC_DC, DSP_SPOS_DC_DC, @@ -1145,7 +1145,7 @@ { BG_TREE_SCB_ADDR,TIMINGMASTER_SCB_ADDR, - fg_task_tree_header_code->address, + 0, FG_TASK_HEADER_ADDR + TCBData, }, @@ -1158,7 +1158,7 @@ }, { - DSP_SPOS_DC,task_tree_thread->address, + DSP_SPOS_DC,0, DSP_SPOS_DC,DSP_SPOS_DC, DSP_SPOS_DC,DSP_SPOS_DC, DSP_SPOS_DC,DSP_SPOS_DC, @@ -1200,13 +1200,15 @@ } }; + fg_task_tree_hdr.links.entry_point = fg_task_tree_header_code->address; + fg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address; cs46xx_dsp_create_task_tree(chip,"FGtaskTreeHdr",(u32 *)&fg_task_tree_hdr,FG_TASK_HEADER_ADDR,0x35); } { /* setup foreground task tree */ - task_tree_control_block_t bg_task_tree_hdr = { + static task_tree_control_block_t bg_task_tree_hdr = { { DSP_SPOS_DC_DC, DSP_SPOS_DC_DC, DSP_SPOS_DC_DC, @@ -1219,7 +1221,7 @@ { NULL_SCB_ADDR,NULL_SCB_ADDR, /* Set up the background to do nothing */ - task_tree_header_code->address, + 0, BG_TREE_SCB_ADDR + TCBData, }, @@ -1232,7 +1234,7 @@ }, { - DSP_SPOS_DC,task_tree_thread->address, + DSP_SPOS_DC,0, DSP_SPOS_DC,DSP_SPOS_DC, DSP_SPOS_DC,DSP_SPOS_DC, DSP_SPOS_DC,DSP_SPOS_DC, @@ -1273,6 +1275,9 @@ 0,0 } }; + + bg_task_tree_hdr.links.entry_point = task_tree_header_code->address; + bg_task_tree_hdr.context_blk.stack0 = task_tree_thread->address; cs46xx_dsp_create_task_tree(chip,"BGtaskTreeHdr",(u32 *)&bg_task_tree_hdr,BG_TREE_SCB_ADDR,0x35); } @@ -1312,7 +1317,7 @@ if (!write_back_scb) goto _fail_end; { - mix2_ostream_spb_t mix2_ostream_spb = { + static mix2_ostream_spb_t mix2_ostream_spb = { 0x00020000, 0x0000ffff }; diff -Nru a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c 2004-09-06 16:37:55 -07:00 @@ -69,7 +69,7 @@ proc_scb_info_t * scb_info = (proc_scb_info_t *)entry->private_data; dsp_scb_descriptor_t * scb = scb_info->scb_desc; dsp_spos_instance_t * ins; - cs46xx_t *chip = snd_magic_cast(cs46xx_t, scb_info->chip, return); + cs46xx_t *chip = scb_info->chip; int j,col; unsigned long dst = chip->region.idx[1].remap_addr + DSP_PARAMETER_BYTE_OFFSET; diff -Nru a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c --- a/sound/pci/emu10k1/emu10k1.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/emu10k1/emu10k1.c 2004-09-06 16:37:50 -07:00 @@ -31,8 +31,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("EMU10K1"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Creative Labs,SB Live!/PCI512/E-mu APS}," +MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB Live!/PCI512/E-mu APS}," "{Creative Labs,SB Audigy}}"); #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) @@ -53,37 +52,25 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the EMU10K1 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable the EMU10K1 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(extin, int, boot_devs, 0444); MODULE_PARM_DESC(extin, "Available external inputs for FX8010. Zero=default."); -MODULE_PARM_SYNTAX(extin, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16"); module_param_array(extout, int, boot_devs, 0444); MODULE_PARM_DESC(extout, "Available external outputs for FX8010. Zero=default."); -MODULE_PARM_SYNTAX(extout, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16"); module_param_array(seq_ports, int, boot_devs, 0444); MODULE_PARM_DESC(seq_ports, "Allocated sequencer ports for internal synthesizer."); -MODULE_PARM_SYNTAX(seq_ports, SNDRV_ENABLED "allows:{{0,32}}"); module_param_array(max_synth_voices, int, boot_devs, 0444); MODULE_PARM_DESC(max_synth_voices, "Maximum number of voices for WaveTable."); -MODULE_PARM_SYNTAX(max_synth_voices, SNDRV_ENABLED); module_param_array(max_buffer_size, int, boot_devs, 0444); MODULE_PARM_DESC(max_buffer_size, "Maximum sample buffer size in MB."); -MODULE_PARM_SYNTAX(max_buffer_size, SNDRV_ENABLED); module_param_array(enable_ir, bool, boot_devs, 0444); MODULE_PARM_DESC(enable_ir, "Enable IR."); -MODULE_PARM_SYNTAX(enable_ir, SNDRV_ENABLE_DESC); static struct pci_device_id snd_emu10k1_ids[] = { { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ -#if 0 /* FIXME: not working! */ - { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ -#endif { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ { 0, } }; @@ -131,10 +118,6 @@ return err; } if ((err = snd_emu10k1_pcm_efx(emu, 2, NULL)) < 0) { - snd_card_free(card); - return err; - } - if ((err = snd_emu10k1_fx8010_pcm(emu, 3, NULL)) < 0) { snd_card_free(card); return err; } diff -Nru a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c --- a/sound/pci/emu10k1/emu10k1_callback.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/emu10k1/emu10k1_callback.c 2004-09-06 16:37:51 -07:00 @@ -93,7 +93,7 @@ unsigned long flags; int i; - emu = snd_magic_cast(snd_emux_t, hw->synth, return -EINVAL); + emu = hw->synth; spin_lock_irqsave(&emu->voice_lock, flags); lookup_voices(emu, hw, best, 1); /* no OFF voices */ @@ -128,7 +128,7 @@ int dcysusv; emu10k1_t *hw; - hw = snd_magic_cast(emu10k1_t, vp->hw, return); + hw = vp->hw; dcysusv = 0x8000 | (unsigned char)vp->reg.parm.modrelease; snd_emu10k1_ptr_write(hw, DCYSUSM, vp->ch, dcysusv); dcysusv = 0x8000 | (unsigned char)vp->reg.parm.volrelease | DCYSUSV_CHANNELENABLE_MASK; @@ -145,7 +145,7 @@ emu10k1_t *hw; snd_assert(vp, return); - hw = snd_magic_cast(emu10k1_t, vp->hw, return); + hw = vp->hw; snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); if (vp->block) { emu10k1_memblk_t *emem; @@ -163,7 +163,7 @@ { emu10k1_t *hw; - hw = snd_magic_cast(emu10k1_t, vp->hw, return); + hw = vp->hw; if (vp->ch >= 0) { snd_emu10k1_ptr_write(hw, IFATN, vp->ch, 0xff00); snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); @@ -185,7 +185,7 @@ { emu10k1_t *hw; - hw = snd_magic_cast(emu10k1_t, vp->hw, return); + hw = vp->hw; if (update & SNDRV_EMUX_UPDATE_VOLUME) snd_emu10k1_ptr_write(hw, IFATN_ATTENUATION, vp->ch, vp->avol); if (update & SNDRV_EMUX_UPDATE_PITCH) @@ -282,7 +282,7 @@ best_voice_t best[V_END]; int i; - hw = snd_magic_cast(emu10k1_t, emu->hw, return NULL); + hw = emu->hw; lookup_voices(emu, hw, best, 0); for (i = 0; i < V_END; i++) { @@ -317,7 +317,7 @@ emu10k1_t *hw; emu10k1_memblk_t *emem; - hw = snd_magic_cast(emu10k1_t, vp->hw, return -EINVAL); + hw = vp->hw; ch = vp->ch; snd_assert(ch >= 0, return -EINVAL); chan = vp->chan; @@ -469,7 +469,7 @@ emu10k1_t *hw; emu10k1_memblk_t *emem; - hw = snd_magic_cast(emu10k1_t, vp->hw, return); + hw = vp->hw; emem = (emu10k1_memblk_t *)vp->block; if (! emem || emem->mapped_page < 0) diff -Nru a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c --- a/sound/pci/emu10k1/emu10k1_main.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/emu10k1/emu10k1_main.c 2004-09-06 16:37:55 -07:00 @@ -119,8 +119,10 @@ snd_emu10k1_ptr_write(emu, SOLEH, 0, 0); if (emu->audigy){ - snd_emu10k1_ptr_write(emu, 0x5e, 0, 0xf00); /* ?? */ - snd_emu10k1_ptr_write(emu, 0x5f, 0, 0x3); /* ?? */ + /* set SPDIF bypass mode */ + snd_emu10k1_ptr_write(emu, SPBYPASS, 0, SPBYPASS_FORMAT); + /* enable rear left + rear right AC97 slots */ + snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT | AC97SLOT_REAR_LEFT); } /* init envelope engine */ @@ -329,7 +331,7 @@ if (emu->audigy) snd_emu10k1_ptr_write(emu, A_DBG, 0, A_DBG_SINGLE_STEP); else - snd_emu10k1_ptr_write(emu, DBG, 0, 0x8000); + snd_emu10k1_ptr_write(emu, DBG, 0, EMU10K1_DBG_SINGLE_STEP); /* disable channel interrupt */ snd_emu10k1_ptr_write(emu, CLIEL, 0, 0); @@ -541,33 +543,31 @@ static int snd_emu10k1_free(emu10k1_t *emu) { - if (emu->res_port != NULL) { /* avoid access to already used hardware */ + if (emu->port) { /* avoid access to already used hardware */ snd_emu10k1_fx8010_tram_setup(emu, 0); snd_emu10k1_done(emu); } if (emu->memhdr) snd_util_memhdr_free(emu->memhdr); if (emu->silent_page.area) - snd_dma_free_pages(&emu->dma_dev, &emu->silent_page); + snd_dma_free_pages(&emu->silent_page); if (emu->ptb_pages.area) - snd_dma_free_pages(&emu->dma_dev, &emu->ptb_pages); + snd_dma_free_pages(&emu->ptb_pages); if (emu->page_ptr_table) vfree(emu->page_ptr_table); if (emu->page_addr_table) vfree(emu->page_addr_table); - if (emu->res_port) { - release_resource(emu->res_port); - kfree_nocheck(emu->res_port); - } if (emu->irq >= 0) free_irq(emu->irq, (void *)emu); - snd_magic_kfree(emu); + if (emu->port) + pci_release_regions(emu->pci); + kfree(emu); return 0; } static int snd_emu10k1_dev_free(snd_device_t *device) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, device->device_data, return -ENXIO); + emu10k1_t *emu = device->device_data; return snd_emu10k1_free(emu); } @@ -595,7 +595,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - emu = snd_magic_kcalloc(emu10k1_t, 0, GFP_KERNEL); + emu = kcalloc(1, sizeof(*emu), GFP_KERNEL); if (emu == NULL) return -ENOMEM; /* set the DMA transfer mask */ @@ -603,7 +603,7 @@ if (pci_set_dma_mask(pci, emu->dma_mask) < 0 || pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) { snd_printk(KERN_ERR "architecture does not support PCI busmaster DMA with mask 0x%lx\n", emu->dma_mask); - snd_magic_kfree(emu); + kfree(emu); return -ENXIO; } emu->card = card; @@ -620,7 +620,6 @@ emu->irq = -1; emu->synth = NULL; emu->get_synth_voice = NULL; - emu->port = pci_resource_start(pci, 0); emu->audigy = is_audigy; if (is_audigy) @@ -628,10 +627,11 @@ else emu->gpr_base = FXGPREGBASE; - if ((emu->res_port = request_region(emu->port, 0x20, "EMU10K1")) == NULL) { - snd_emu10k1_free(emu); - return -EBUSY; + if ((err = pci_request_regions(pci, "EMU10K1")) < 0) { + kfree(emu); + return err; } + emu->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) { snd_emu10k1_free(emu); @@ -639,12 +639,9 @@ } emu->irq = pci->irq; - memset(&emu->dma_dev, 0, sizeof(emu->dma_dev)); - emu->dma_dev.type = SNDRV_DMA_TYPE_DEV; - emu->dma_dev.dev = snd_dma_pci_data(pci); - emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT; - if (snd_dma_alloc_pages(&emu->dma_dev, 32 * 1024, &emu->ptb_pages) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + 32 * 1024, &emu->ptb_pages) < 0) { snd_emu10k1_free(emu); return -ENOMEM; } @@ -656,7 +653,8 @@ return -ENOMEM; } - if (snd_dma_alloc_pages(&emu->dma_dev, EMUPAGESIZE, &emu->silent_page) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + EMUPAGESIZE, &emu->silent_page) < 0) { snd_emu10k1_free(emu); return -ENOMEM; } @@ -682,9 +680,16 @@ /* Audigy 2 EX has apparently no effective AC97 controls * (for both input and output), so we skip the AC97 detections */ - snd_printdd(KERN_INFO "Audigy2 EX is detected. skpping ac97.\n"); - emu->no_ac97 = 1; + snd_printdd(KERN_INFO "Audigy2 EX is detected. skipping ac97.\n"); + emu->no_ac97 = 1; } + + if (emu->revision == 4 && emu->model == 0x2002) { + /* Audigy 2 ZS */ + snd_printdd(KERN_INFO "Audigy2 ZS is detected. setting 7.1 mode.\n"); + emu->spk71 = 1; + } + emu->fx8010.fxbus_mask = 0x303f; if (extin_mask == 0) diff -Nru a/sound/pci/emu10k1/emu10k1_patch.c b/sound/pci/emu10k1/emu10k1_patch.c --- a/sound/pci/emu10k1/emu10k1_patch.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/emu10k1/emu10k1_patch.c 2004-09-06 16:37:52 -07:00 @@ -44,7 +44,7 @@ unsigned int start_addr; emu10k1_t *emu; - emu = snd_magic_cast(emu10k1_t, rec->hw, return -ENXIO); + emu = rec->hw; snd_assert(sp != NULL, return -EINVAL); snd_assert(hdr != NULL, return -EINVAL); @@ -210,7 +210,7 @@ { emu10k1_t *emu; - emu = snd_magic_cast(emu10k1_t, rec->hw, return -ENXIO); + emu = rec->hw; snd_assert(sp != NULL, return -EINVAL); snd_assert(hdr != NULL, return -EINVAL); diff -Nru a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c --- a/sound/pci/emu10k1/emu10k1_synth.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/emu10k1/emu10k1_synth.c 2004-09-06 16:37:51 -07:00 @@ -85,9 +85,9 @@ if (dev->driver_data == NULL) return 0; /* not registered actually */ - emu = snd_magic_cast(snd_emux_t, dev->driver_data, return -EINVAL); + emu = dev->driver_data; - hw = snd_magic_cast(emu10k1_t, emu->hw, return -EINVAL); + hw = emu->hw; spin_lock_irqsave(&hw->voice_lock, flags); hw->synth = NULL; hw->get_synth_voice = NULL; diff -Nru a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c --- a/sound/pci/emu10k1/emufx.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/emu10k1/emufx.c 2004-09-06 16:37:53 -07:00 @@ -33,8 +33,6 @@ #include #include -#define chip_t emu10k1_t - #if 0 /* for testing purposes - digital out -> capture */ #define EMU10K1_CAPTURE_DIGITAL_OUT #endif @@ -405,7 +403,7 @@ } } -static int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu, +int snd_emu10k1_fx8010_register_irq_handler(emu10k1_t *emu, snd_fx8010_irq_handler_t *handler, unsigned char gpr_running, void *private_data, @@ -438,7 +436,7 @@ return 0; } -static int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu, +int snd_emu10k1_fx8010_unregister_irq_handler(emu10k1_t *emu, snd_emu10k1_fx8010_irq_t *irq) { snd_emu10k1_fx8010_irq_t *tmp; @@ -463,312 +461,6 @@ return 0; } -/* - * PCM streams - */ - -#define INITIAL_TRAM_SHIFT 14 -#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) - -static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data) -{ - snd_pcm_substream_t *substream = snd_magic_cast(snd_pcm_substream_t, private_data, return); - snd_pcm_period_elapsed(substream); -} - -static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left, - unsigned short *dst_right, - unsigned short *src, - unsigned int count, - unsigned int tram_shift) -{ - // printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count); - if ((tram_shift & 1) == 0) { - while (count--) { - *dst_left-- = *src++; - *dst_right-- = *src++; - } - } else { - while (count--) { - *dst_right-- = *src++; - *dst_left-- = *src++; - } - } -} - -static void snd_emu10k1_fx8010_playback_tram_poke(emu10k1_t *emu, - unsigned int *tram_pos, - unsigned int *tram_shift, - unsigned int tram_size, - unsigned short *src, - unsigned int frames) -{ - unsigned int count; - - while (frames > *tram_pos) { - count = *tram_pos + 1; - snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos, - (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2, - src, count, *tram_shift); - src += count * 2; - frames -= count; - *tram_pos = (tram_size / 2) - 1; - (*tram_shift)++; - } - snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + *tram_pos, - (unsigned short *)emu->fx8010.etram_pages.area + *tram_pos + tram_size / 2, - src, frames, *tram_shift++); - *tram_pos -= frames; -} - -static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr; - snd_pcm_sframes_t diff = appl_ptr - pcm->appl_ptr; - snd_pcm_uframes_t buffer_size = pcm->buffer_size / 2; - - if (diff) { - if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2)) - diff += runtime->boundary; - pcm->sw_ready += diff; - pcm->appl_ptr = appl_ptr; - } - while (pcm->hw_ready < buffer_size && - pcm->sw_ready > 0) { - size_t hw_to_end = buffer_size - pcm->hw_data; - size_t sw_to_end = (runtime->buffer_size << 2) - pcm->sw_data; - size_t tframes = buffer_size - pcm->hw_ready; - if (pcm->sw_ready < tframes) - tframes = pcm->sw_ready; - if (hw_to_end < tframes) - tframes = hw_to_end; - if (sw_to_end < tframes) - tframes = sw_to_end; - snd_emu10k1_fx8010_playback_tram_poke(emu, &pcm->tram_pos, &pcm->tram_shift, - pcm->buffer_size, - (unsigned short *)(runtime->dma_area + (pcm->sw_data << 2)), - tframes); - pcm->hw_data += tframes; - if (pcm->hw_data == buffer_size) - pcm->hw_data = 0; - pcm->sw_data += tframes; - if (pcm->sw_data == runtime->buffer_size) - pcm->sw_data = 0; - pcm->hw_ready += tframes; - pcm->sw_ready -= tframes; - } - return 0; -} - -static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) -{ - return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); -} - -static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - unsigned int i; - - for (i = 0; i < pcm->channels; i++) - snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0); - snd_pcm_lib_free_pages(substream); - return 0; -} - -static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - unsigned int i; - - // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); - pcm->sw_data = pcm->sw_io = pcm->sw_ready = 0; - pcm->hw_data = pcm->hw_io = pcm->hw_ready = 0; - pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); - pcm->tram_shift = 0; - pcm->appl_ptr = 0; - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0); /* reset */ - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); /* reset */ - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0); /* reset ptr number */ - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); - for (i = 0; i < pcm->channels; i++) - snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels)); - return 0; -} - -static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - unsigned long flags; - int result = 0; - - spin_lock_irqsave(&emu->reg_lock, flags); - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - /* follow thru */ - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: -#ifdef EMU10K1_SET_AC3_IEC958 - { - int i; - for (i = 0; i < 3; i++) { - unsigned int bits; - bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | - SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | - 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT | SPCS_NOTAUDIODATA; - snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits); - } - } -#endif - result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); - if (result < 0) - goto __err; - snd_emu10k1_fx8010_playback_transfer(substream); /* roll the ball */ - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1); - break; - case SNDRV_PCM_TRIGGER_STOP: - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL; - snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); - pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); - pcm->tram_shift = 0; - break; - default: - result = -EINVAL; - break; - } - __err: - spin_unlock_irqrestore(&emu->reg_lock, flags); - return result; -} - -static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - size_t ptr; - snd_pcm_sframes_t frames; - - if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) - return 0; - ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0); - frames = ptr - pcm->hw_io; - if (frames < 0) - frames += runtime->buffer_size; - pcm->hw_io = ptr; - pcm->hw_ready -= frames; - pcm->sw_io += frames; - if (pcm->sw_io >= runtime->buffer_size) - pcm->sw_io -= runtime->buffer_size; - snd_emu10k1_fx8010_playback_transfer(substream); - return pcm->sw_io; -} - -static snd_pcm_hardware_t snd_emu10k1_fx8010_playback = -{ - .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | - /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), - .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, - .rates = SNDRV_PCM_RATE_48000, - .rate_min = 48000, - .rate_max = 48000, - .channels_min = 1, - .channels_max = 1, - .buffer_bytes_max = (128*1024), - .period_bytes_min = 1024, - .period_bytes_max = (128*1024), - .periods_min = 1, - .periods_max = 1024, - .fifo_size = 0, -}; - -static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - - runtime->hw = snd_emu10k1_fx8010_playback; - runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; - runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; - spin_lock(&emu->reg_lock); - if (pcm->valid == 0) { - spin_unlock(&emu->reg_lock); - return -ENODEV; - } - pcm->opened = 1; - spin_unlock(&emu->reg_lock); - return 0; -} - -static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream) -{ - emu10k1_t *emu = snd_pcm_substream_chip(substream); - snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; - - spin_lock(&emu->reg_lock); - pcm->opened = 0; - spin_unlock(&emu->reg_lock); - return 0; -} - -static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = { - .open = snd_emu10k1_fx8010_playback_open, - .close = snd_emu10k1_fx8010_playback_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = snd_emu10k1_fx8010_playback_hw_params, - .hw_free = snd_emu10k1_fx8010_playback_hw_free, - .prepare = snd_emu10k1_fx8010_playback_prepare, - .trigger = snd_emu10k1_fx8010_playback_trigger, - .pointer = snd_emu10k1_fx8010_playback_pointer, - .ack = snd_emu10k1_fx8010_playback_transfer, -}; - -static void snd_emu10k1_fx8010_pcm_free(snd_pcm_t *pcm) -{ - emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return); - emu->pcm_fx8010 = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); -} - -int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm) -{ - snd_pcm_t *pcm; - int err; - - if (rpcm) - *rpcm = NULL; - - if ((err = snd_pcm_new(emu->card, "emu10k1", device, 8, 0, &pcm)) < 0) - return err; - - pcm->private_data = emu; - pcm->private_free = snd_emu10k1_fx8010_pcm_free; - - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops); - - pcm->info_flags = 0; - strcpy(pcm->name, "EMU10K1 FX8010"); - emu->pcm_fx8010 = pcm; - - snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 0); - - if (rpcm) - *rpcm = pcm; - - return 0; -} - /************************************************************************* * EMU10K1 effect manager *************************************************************************/ @@ -1193,7 +885,7 @@ #define SND_EMU10K1_GPR_CONTROLS 41 #define SND_EMU10K1_INPUTS 10 -#define SND_EMU10K1_PLAYBACK_CHANNELS 6 +#define SND_EMU10K1_PLAYBACK_CHANNELS 8 #define SND_EMU10K1_CAPTURE_CHANNELS 4 static void __devinit snd_emu10k1_init_mono_control(emu10k1_fx8010_control_gpr_t *ctl, const char *name, int gpr, int defval) @@ -1262,9 +954,9 @@ spin_lock_init(&emu->fx8010.irq_lock); INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); - if ((icode = snd_kcalloc(sizeof(emu10k1_fx8010_code_t), GFP_KERNEL)) == NULL) + if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL) return -ENOMEM; - if ((controls = snd_kcalloc(sizeof(emu10k1_fx8010_control_gpr_t) * SND_EMU10K1_GPR_CONTROLS, GFP_KERNEL)) == NULL) { + if ((controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(*controls), GFP_KERNEL)) == NULL) { kfree(icode); return -ENOMEM; } @@ -1292,6 +984,14 @@ A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_REAR)); snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Surround Playback Volume", gpr, 100); gpr += 2; + + /* PCM Side Playback (independent from stereo mix) */ + if (emu->spk71) { + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_SIDE)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_SIDE)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Side Playback Volume", gpr, 100); + gpr += 2; + } /* PCM Center Playback (independent from stereo mix) */ A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_CENTER)); @@ -1440,6 +1140,14 @@ A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_GPR(playback+5), A_GPR(gpr), A_GPR(tmp)); snd_emu10k1_init_mono_control(&controls[nctl++], "LFE Playback Volume", gpr, 0); gpr++; + + if (emu->spk71) { + /* Stereo Mix Side Playback */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_GPR(playback+6), A_GPR(gpr), A_GPR(stereo_mix)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_GPR(playback+7), A_GPR(gpr+1), A_GPR(stereo_mix+1)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Side Playback Volume", gpr, 0); + gpr += 2; + } /* * outputs @@ -1467,6 +1175,11 @@ A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), A_GPR(playback + 3), A_C_00000000, A_C_00000000); /* rear right */ A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), A_GPR(playback + 4), A_C_00000000, A_C_00000000); /* center */ A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), A_GPR(playback + 5), A_C_00000000, A_C_00000000); /* LFE */ + if (emu->spk71) { + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 6), A_GPR(playback + 6), A_C_00000000, A_C_00000000); /* side left */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 7), A_GPR(playback + 7), A_C_00000000, A_C_00000000); /* side right */ + } + ctl = &controls[nctl + 0]; ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; @@ -1497,7 +1210,7 @@ controls[nctl + 1].gpr[z * 2 + j] = TREBLE_GPR + z * 2 + j; } } - for (z = 0; z < 3; z++) { /* front/rear/center-lfe */ + for (z = 0; z < 4; z++) { /* front/rear/center-lfe/side */ int j, k, l, d; for (j = 0; j < 2; j++) { /* left/right */ k = 0xb0 + (z * 8) + (j * 4); @@ -1529,7 +1242,7 @@ #undef BASS_GPR #undef TREBLE_GPR - for (z = 0; z < 6; z++) { + for (z = 0; z < 8; z++) { A_SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); A_SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); @@ -1540,12 +1253,14 @@ /* Master volume (will be renamed later) */ A_OP(icode, &ptr, iMAC0, A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS)); - A_OP(icode, &ptr, iMAC0, A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr+1), A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS)); - A_OP(icode, &ptr, iMAC0, A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr+1), A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS)); - A_OP(icode, &ptr, iMAC0, A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr+1), A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS)); - A_OP(icode, &ptr, iMAC0, A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr+1), A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS)); - A_OP(icode, &ptr, iMAC0, A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr+1), A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS)); - snd_emu10k1_init_stereo_control(&controls[nctl++], "Wave Master Playback Volume", gpr, 0); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS)); + snd_emu10k1_init_mono_control(&controls[nctl++], "Wave Master Playback Volume", gpr, 0); gpr += 2; /* analog speakers */ @@ -1553,6 +1268,8 @@ A_PUT_STEREO_OUTPUT(A_EXTOUT_AREAR_L, A_EXTOUT_AREAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS); A_PUT_OUTPUT(A_EXTOUT_ACENTER, playback+4 + SND_EMU10K1_PLAYBACK_CHANNELS); A_PUT_OUTPUT(A_EXTOUT_ALFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS); + if (emu->spk71) + A_PUT_STEREO_OUTPUT(A_EXTOUT_ASIDE_L, A_EXTOUT_ASIDE_R, playback+6 + SND_EMU10K1_PLAYBACK_CHANNELS); /* headphone */ A_PUT_STEREO_OUTPUT(A_EXTOUT_HEADPHONE_L, A_EXTOUT_HEADPHONE_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); @@ -1674,13 +1391,13 @@ spin_lock_init(&emu->fx8010.irq_lock); INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); - if ((icode = snd_kcalloc(sizeof(emu10k1_fx8010_code_t), GFP_KERNEL)) == NULL) + if ((icode = kcalloc(1, sizeof(*icode), GFP_KERNEL)) == NULL) return -ENOMEM; - if ((controls = snd_kcalloc(sizeof(emu10k1_fx8010_control_gpr_t) * SND_EMU10K1_GPR_CONTROLS, GFP_KERNEL)) == NULL) { + if ((controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, sizeof(emu10k1_fx8010_control_gpr_t), GFP_KERNEL)) == NULL) { kfree(icode); return -ENOMEM; } - if ((ipcm = snd_kcalloc(sizeof(emu10k1_fx8010_pcm_t), GFP_KERNEL)) == NULL) { + if ((ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL)) == NULL) { kfree(controls); kfree(icode); return -ENOMEM; @@ -2236,13 +1953,14 @@ snd_emu10k1_ptr_write(emu, TCB, 0, 0); snd_emu10k1_ptr_write(emu, TCBS, 0, 0); if (emu->fx8010.etram_pages.area != NULL) { - snd_dma_free_pages(&emu->dma_dev, &emu->fx8010.etram_pages); + snd_dma_free_pages(&emu->fx8010.etram_pages); emu->fx8010.etram_pages.area = NULL; emu->fx8010.etram_pages.bytes = 0; } if (size > 0) { - if (snd_dma_alloc_pages(&emu->dma_dev, size * 2, &emu->fx8010.etram_pages) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), + size * 2, &emu->fx8010.etram_pages) < 0) return -ENOMEM; memset(emu->fx8010.etram_pages.area, 0, size * 2); snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr); @@ -2297,7 +2015,7 @@ static int snd_emu10k1_fx8010_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, hw->private_data, return -ENXIO); + emu10k1_t *emu = hw->private_data; emu10k1_fx8010_info_t *info; emu10k1_fx8010_code_t *icode; emu10k1_fx8010_pcm_t *ipcm; @@ -2364,7 +2082,7 @@ case SNDRV_EMU10K1_IOCTL_PCM_PEEK: if (emu->audigy) return -EINVAL; - ipcm = (emu10k1_fx8010_pcm_t *)snd_kcalloc(sizeof(*ipcm), GFP_KERNEL); + ipcm = kcalloc(1, sizeof(*ipcm), GFP_KERNEL); if (ipcm == NULL) return -ENOMEM; if (copy_from_user(ipcm, argp, sizeof(*ipcm))) { diff -Nru a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c --- a/sound/pci/emu10k1/emumixer.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/emu10k1/emumixer.c 2004-09-06 16:37:54 -07:00 @@ -32,8 +32,6 @@ #include #include -#define chip_t emu10k1_t - #define AC97_ID_STAC9758 0x83847658 static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) @@ -421,7 +419,7 @@ */ static void snd_emu10k1_mixer_free_ac97(ac97_t *ac97) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, ac97->private_data, return); + emu10k1_t *emu = ac97->private_data; emu->ac97 = NULL; } @@ -512,13 +510,14 @@ }; if (!emu->no_ac97) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; + static ac97_bus_ops_t ops = { + .write = snd_emu10k1_ac97_write, + .read = snd_emu10k1_ac97_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_emu10k1_ac97_write; - bus.read = snd_emu10k1_ac97_read; - if ((err = snd_ac97_bus(emu->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); @@ -528,7 +527,7 @@ return err; if (emu->audigy) { /* set master volume to 0 dB */ - snd_ac97_write(emu->ac97, AC97_MASTER, 0x0202); + snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); /* set capture source to mic */ snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000); c = audigy_remove_ctls; diff -Nru a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c --- a/sound/pci/emu10k1/emupcm.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/emu10k1/emupcm.c 2004-09-06 16:37:50 -07:00 @@ -34,8 +34,6 @@ #include #include -#define chip_t emu10k1_t - static void snd_emu10k1_pcm_interrupt(emu10k1_t *emu, emu10k1_voice_t *voice) { emu10k1_pcm_t *epcm; @@ -354,7 +352,7 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + emu10k1_pcm_t *epcm = runtime->private_data; int err; if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0) @@ -383,7 +381,7 @@ if (runtime->private_data == NULL) return 0; - epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + epcm = runtime->private_data; if (epcm->extra) { snd_emu10k1_voice_free(epcm->emu, epcm->extra); epcm->extra = NULL; @@ -409,7 +407,7 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + emu10k1_pcm_t *epcm = runtime->private_data; unsigned int start_addr, end_addr; start_addr = epcm->start_addr; @@ -443,7 +441,7 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + emu10k1_pcm_t *epcm = runtime->private_data; int idx; snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, 0); @@ -452,7 +450,11 @@ snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); break; case CAPTURE_EFX: - snd_emu10k1_ptr_write(emu, FXWC, 0, 0); + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, 0); break; default: break; @@ -565,12 +567,11 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); - unsigned long flags; + emu10k1_pcm_t *epcm = runtime->private_data; int result = 0; // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); - spin_lock_irqsave(&emu->reg_lock, flags); + spin_lock(&emu->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: snd_emu10k1_playback_invalidate_cache(emu, epcm->extra); /* do we need this? */ @@ -593,7 +594,7 @@ result = -EINVAL; break; } - spin_unlock_irqrestore(&emu->reg_lock, flags); + spin_unlock(&emu->reg_lock); return result; } @@ -602,12 +603,11 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); - unsigned long flags; + emu10k1_pcm_t *epcm = runtime->private_data; int result = 0; // printk("trigger - emu10k1 = %p, cmd = %i, pointer = %i\n", emu, cmd, substream->ops->pointer(substream)); - spin_lock_irqsave(&emu->reg_lock, flags); + spin_lock(&emu->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: outl(epcm->capture_ipr, emu->port + IPR); @@ -618,7 +618,11 @@ snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val); break; case CAPTURE_EFX: - snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val); + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, epcm->capture_cr_val); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, epcm->capture_cr_val2); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val); break; default: break; @@ -637,7 +641,11 @@ snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); break; case CAPTURE_EFX: - snd_emu10k1_ptr_write(emu, FXWC, 0, 0); + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, 0); break; default: break; @@ -646,7 +654,7 @@ default: result = -EINVAL; } - spin_unlock_irqrestore(&emu->reg_lock, flags); + spin_unlock(&emu->reg_lock); return result; } @@ -654,7 +662,7 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + emu10k1_pcm_t *epcm = runtime->private_data; unsigned int ptr; if (!epcm->running) @@ -681,7 +689,7 @@ { emu10k1_t *emu = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return -ENXIO); + emu10k1_pcm_t *epcm = runtime->private_data; unsigned int ptr; if (!epcm->running) @@ -767,10 +775,10 @@ static void snd_emu10k1_pcm_free_substream(snd_pcm_runtime_t *runtime) { - emu10k1_pcm_t *epcm = snd_magic_cast(emu10k1_pcm_t, runtime->private_data, return); + emu10k1_pcm_t *epcm = runtime->private_data; if (epcm) - snd_magic_kfree(epcm); + kfree(epcm); } static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) @@ -781,7 +789,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; int i, err; - epcm = snd_magic_kcalloc(emu10k1_pcm_t, 0, GFP_KERNEL); + epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -791,11 +799,11 @@ runtime->private_free = snd_emu10k1_pcm_free_substream; runtime->hw = snd_emu10k1_playback; if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) { - snd_magic_kfree(epcm); + kfree(epcm); return err; } if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) < 0) { - snd_magic_kfree(epcm); + kfree(epcm); return err; } mix = &emu->pcm_mixer[substream->number]; @@ -826,7 +834,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; emu10k1_pcm_t *epcm; - epcm = snd_magic_kcalloc(emu10k1_pcm_t, 0, GFP_KERNEL); + epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -842,7 +850,7 @@ runtime->hw = snd_emu10k1_capture; emu->capture_interrupt = snd_emu10k1_pcm_ac97adc_interrupt; emu->pcm_capture_substream = substream; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates); return 0; } @@ -862,7 +870,7 @@ emu10k1_pcm_t *epcm; snd_pcm_runtime_t *runtime = substream->runtime; - epcm = snd_magic_kcalloc(emu10k1_pcm_t, 0, GFP_KERNEL); + epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -881,7 +889,7 @@ runtime->hw.channels_min = 1; emu->capture_mic_interrupt = snd_emu10k1_pcm_ac97mic_interrupt; emu->pcm_capture_mic_substream = substream; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); return 0; } @@ -899,11 +907,10 @@ emu10k1_t *emu = snd_pcm_substream_chip(substream); emu10k1_pcm_t *epcm; snd_pcm_runtime_t *runtime = substream->runtime; - unsigned long flags; int nefx = emu->audigy ? 64 : 32; int idx; - epcm = snd_magic_kcalloc(emu10k1_pcm_t, 0, GFP_KERNEL); + epcm = kcalloc(1, sizeof(*epcm), GFP_KERNEL); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -919,7 +926,7 @@ runtime->hw = snd_emu10k1_capture; runtime->hw.rates = SNDRV_PCM_RATE_48000; runtime->hw.rate_min = runtime->hw.rate_max = 48000; - spin_lock_irqsave(&emu->reg_lock, flags); + spin_lock_irq(&emu->reg_lock); runtime->hw.channels_min = runtime->hw.channels_max = 0; for (idx = 0; idx < nefx; idx++) { if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) { @@ -929,10 +936,10 @@ } epcm->capture_cr_val = emu->efx_voices_mask[0]; epcm->capture_cr_val2 = emu->efx_voices_mask[1]; - spin_unlock_irqrestore(&emu->reg_lock, flags); + spin_unlock_irq(&emu->reg_lock); emu->capture_efx_interrupt = snd_emu10k1_pcm_efx_interrupt; emu->pcm_capture_efx_substream = substream; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_capture_period_sizes); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); return 0; } @@ -970,7 +977,7 @@ static void snd_emu10k1_pcm_free(snd_pcm_t *pcm) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return); + emu10k1_t *emu = pcm->private_data; emu->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1024,7 +1031,7 @@ static void snd_emu10k1_pcm_mic_free(snd_pcm_t *pcm) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return); + emu10k1_t *emu = pcm->private_data; emu->pcm_mic = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1070,21 +1077,19 @@ static int snd_emu10k1_pcm_efx_voices_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - unsigned long flags; int nefx = emu->audigy ? 64 : 32; int idx; - spin_lock_irqsave(&emu->reg_lock, flags); + spin_lock_irq(&emu->reg_lock); for (idx = 0; idx < nefx; idx++) ucontrol->value.integer.value[idx] = (emu->efx_voices_mask[idx / 32] & (1 << (idx % 32))) ? 1 : 0; - spin_unlock_irqrestore(&emu->reg_lock, flags); + spin_unlock_irq(&emu->reg_lock); return 0; } static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { emu10k1_t *emu = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int nval[2], bits; int nefx = emu->audigy ? 64 : 32; int change, idx; @@ -1097,12 +1102,12 @@ } if (bits != 1 && bits != 2 && bits != 4 && bits != 8) return -EINVAL; - spin_lock_irqsave(&emu->reg_lock, flags); + spin_lock_irq(&emu->reg_lock); change = (nval[0] != emu->efx_voices_mask[0]) || (nval[1] != emu->efx_voices_mask[1]); emu->efx_voices_mask[0] = nval[0]; emu->efx_voices_mask[1] = nval[1]; - spin_unlock_irqrestore(&emu->reg_lock, flags); + spin_unlock_irq(&emu->reg_lock); return change; } @@ -1125,9 +1130,238 @@ .pointer = snd_emu10k1_capture_pointer, }; + +/* EFX playback */ + +#define INITIAL_TRAM_SHIFT 14 +#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) + +static void snd_emu10k1_fx8010_playback_irq(emu10k1_t *emu, void *private_data) +{ + snd_pcm_substream_t *substream = private_data; + snd_pcm_period_elapsed(substream); +} + +static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left, + unsigned short *dst_right, + unsigned short *src, + unsigned int count, + unsigned int tram_shift) +{ + // printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count); + if ((tram_shift & 1) == 0) { + while (count--) { + *dst_left-- = *src++; + *dst_right-- = *src++; + } + } else { + while (count--) { + *dst_right-- = *src++; + *dst_left-- = *src++; + } + } +} + +static void fx8010_pb_trans_copy(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int tram_size = pcm->buffer_size; + unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); + unsigned int frames = bytes >> 2, count; + unsigned int tram_pos = pcm->tram_pos; + unsigned int tram_shift = pcm->tram_shift; + + while (frames > tram_pos) { + count = tram_pos + 1; + snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos, + (unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2, + src, count, tram_shift); + src += count * 2; + frames -= count; + tram_pos = (tram_size / 2) - 1; + tram_shift++; + } + snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos, + (unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2, + src, frames, tram_shift++); + tram_pos -= frames; + pcm->tram_pos = tram_pos; + pcm->tram_shift = tram_shift; +} + +static int snd_emu10k1_fx8010_playback_transfer(snd_pcm_substream_t *substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + + snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); + return 0; +} + +static int snd_emu10k1_fx8010_playback_hw_params(snd_pcm_substream_t * substream, + snd_pcm_hw_params_t * hw_params) +{ + return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); +} + +static int snd_emu10k1_fx8010_playback_hw_free(snd_pcm_substream_t * substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int i; + + for (i = 0; i < pcm->channels; i++) + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0); + snd_pcm_lib_free_pages(substream); + return 0; +} + +static int snd_emu10k1_fx8010_playback_prepare(snd_pcm_substream_t * substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int i; + + // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); + memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); + pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ + pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); + pcm->tram_shift = 0; + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0); /* reset */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); /* reset */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0); /* reset ptr number */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); + for (i = 0; i < pcm->channels; i++) + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels)); + return 0; +} + +static int snd_emu10k1_fx8010_playback_trigger(snd_pcm_substream_t * substream, int cmd) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + int result = 0; + + spin_lock(&emu->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + /* follow thru */ + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: +#ifdef EMU10K1_SET_AC3_IEC958 + { + int i; + for (i = 0; i < 3; i++) { + unsigned int bits; + bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | + SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | + 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT | SPCS_NOTAUDIODATA; + snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits); + } + } +#endif + result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); + if (result < 0) + goto __err; + snd_emu10k1_fx8010_playback_transfer(substream); /* roll the ball */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1); + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL; + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); + pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); + pcm->tram_shift = 0; + break; + default: + result = -EINVAL; + break; + } + __err: + spin_unlock(&emu->reg_lock); + return result; +} + +static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(snd_pcm_substream_t * substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + size_t ptr; /* byte pointer */ + + if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) + return 0; + ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2; + return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); +} + +static snd_pcm_hardware_t snd_emu10k1_fx8010_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_48000, + .rate_min = 48000, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 1, + .buffer_bytes_max = (128*1024), + .period_bytes_min = 1024, + .period_bytes_max = (128*1024), + .periods_min = 1, + .periods_max = 1024, + .fifo_size = 0, +}; + +static int snd_emu10k1_fx8010_playback_open(snd_pcm_substream_t * substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + + runtime->hw = snd_emu10k1_fx8010_playback; + runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; + runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; + spin_lock_irq(&emu->reg_lock); + if (pcm->valid == 0) { + spin_unlock_irq(&emu->reg_lock); + return -ENODEV; + } + pcm->opened = 1; + spin_unlock_irq(&emu->reg_lock); + return 0; +} + +static int snd_emu10k1_fx8010_playback_close(snd_pcm_substream_t * substream) +{ + emu10k1_t *emu = snd_pcm_substream_chip(substream); + snd_emu10k1_fx8010_pcm_t *pcm = &emu->fx8010.pcm[substream->number]; + + spin_lock_irq(&emu->reg_lock); + pcm->opened = 0; + spin_unlock_irq(&emu->reg_lock); + return 0; +} + +static snd_pcm_ops_t snd_emu10k1_fx8010_playback_ops = { + .open = snd_emu10k1_fx8010_playback_open, + .close = snd_emu10k1_fx8010_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_fx8010_playback_hw_params, + .hw_free = snd_emu10k1_fx8010_playback_hw_free, + .prepare = snd_emu10k1_fx8010_playback_prepare, + .trigger = snd_emu10k1_fx8010_playback_trigger, + .pointer = snd_emu10k1_fx8010_playback_pointer, + .ack = snd_emu10k1_fx8010_playback_transfer, +}; + static void snd_emu10k1_pcm_efx_free(snd_pcm_t *pcm) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, pcm->private_data, return); + emu10k1_t *emu = pcm->private_data; emu->pcm_efx = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1140,12 +1374,13 @@ if (rpcm) *rpcm = NULL; - if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 0, 1, &pcm)) < 0) + if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm)) < 0) return err; pcm->private_data = emu; pcm->private_free = snd_emu10k1_pcm_efx_free; + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops); pcm->info_flags = 0; diff -Nru a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c --- a/sound/pci/emu10k1/emuproc.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/emu10k1/emuproc.c 2004-09-06 16:37:52 -07:00 @@ -71,31 +71,32 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - static char *outputs[32] = { - /* 00 */ "PCM Left", - /* 01 */ "PCM Right", - /* 02 */ "PCM Surround Left", - /* 03 */ "PCM Surround Right", - /* 04 */ "MIDI Left", - /* 05 */ "MIDI Right", - /* 06 */ "PCM Center", - /* 07 */ "PCM LFE", - /* 08 */ "???", - /* 09 */ "???", - /* 10 */ "???", - /* 11 */ "???", - /* 12 */ "MIDI Reverb", - /* 13 */ "MIDI Chorus", - /* 14 */ "???", + /* FIXME - output names are in emufx.c too */ + static char *creative_outs[32] = { + /* 00 */ "AC97 Left", + /* 01 */ "AC97 Right", + /* 02 */ "Optical IEC958 Left", + /* 03 */ "Optical IEC958 Right", + /* 04 */ "Center", + /* 05 */ "LFE", + /* 06 */ "Headphone Left", + /* 07 */ "Headphone Right", + /* 08 */ "Surround Left", + /* 09 */ "Surround Right", + /* 10 */ "PCM Capture Left", + /* 11 */ "PCM Capture Right", + /* 12 */ "MIC Capture", + /* 13 */ "AC97 Surround Left", + /* 14 */ "AC97 Surround Right", /* 15 */ "???", /* 16 */ "???", - /* 17 */ "???", - /* 18 */ "ADC Left / CDROM S/PDIF Left", - /* 19 */ "ADC Right / CDROM S/PDIF Right", - /* 20 */ "MIC / Zoom Video Left", - /* 21 */ "Zoom Video Right", - /* 22 */ "S/PDIF Left", - /* 23 */ "S/PDIF Right", + /* 17 */ "Analog Center", + /* 18 */ "Analog LFE", + /* 19 */ "???", + /* 20 */ "???", + /* 21 */ "???", + /* 22 */ "???", + /* 23 */ "???", /* 24 */ "???", /* 25 */ "???", /* 26 */ "???", @@ -105,9 +106,78 @@ /* 30 */ "???", /* 31 */ "???" }; - emu10k1_t *emu = snd_magic_cast(emu10k1_t, entry->private_data, return); + + static char *audigy_outs[64] = { + /* 00 */ "Digital Front Left", + /* 01 */ "Digital Front Right", + /* 02 */ "Digital Center", + /* 03 */ "Digital LEF", + /* 04 */ "Headphone Left", + /* 05 */ "Headphone Right", + /* 06 */ "Digital Rear Left", + /* 07 */ "Digital Rear Right", + /* 08 */ "Front Left", + /* 09 */ "Front Right", + /* 10 */ "Center", + /* 11 */ "LFE", + /* 12 */ "???", + /* 13 */ "???", + /* 14 */ "Rear Left", + /* 15 */ "Rear Right", + /* 16 */ "AC97 Front Left", + /* 17 */ "AC97 Front Right", + /* 18 */ "ADC Caputre Left", + /* 19 */ "ADC Capture Right", + /* 20 */ "???", + /* 21 */ "???", + /* 22 */ "???", + /* 23 */ "???", + /* 24 */ "???", + /* 25 */ "???", + /* 26 */ "???", + /* 27 */ "???", + /* 28 */ "???", + /* 29 */ "???", + /* 30 */ "???", + /* 31 */ "???", + /* 32 */ "???", + /* 33 */ "???", + /* 34 */ "???", + /* 35 */ "???", + /* 36 */ "???", + /* 37 */ "???", + /* 38 */ "???", + /* 39 */ "???", + /* 40 */ "???", + /* 41 */ "???", + /* 42 */ "???", + /* 43 */ "???", + /* 44 */ "???", + /* 45 */ "???", + /* 46 */ "???", + /* 47 */ "???", + /* 48 */ "???", + /* 49 */ "???", + /* 50 */ "???", + /* 51 */ "???", + /* 52 */ "???", + /* 53 */ "???", + /* 54 */ "???", + /* 55 */ "???", + /* 56 */ "???", + /* 57 */ "???", + /* 58 */ "???", + /* 59 */ "???", + /* 60 */ "???", + /* 61 */ "???", + /* 62 */ "???", + /* 33 */ "???" + }; + + emu10k1_t *emu = entry->private_data; unsigned int val; int nefx = emu->audigy ? 64 : 32; + char **outputs = emu->audigy ? audigy_outs : creative_outs; int idx; snd_iprintf(buffer, "EMU10K1\n\n"); @@ -117,7 +187,7 @@ snd_iprintf(buffer, "Card : %s\n", emu->audigy ? "Audigy" : (emu->APS ? "EMU APS" : "Creative")); snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); - snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", emu->fx8010.etram_pages.bytes); + snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes); snd_iprintf(buffer, "\n"); if (emu->audigy) { snd_iprintf(buffer, "Effect Send Routing : A=%i, B=%i, C=%i, D=%i\n", @@ -135,7 +205,7 @@ snd_iprintf(buffer, "\nCaptured FX Outputs :\n"); for (idx = 0; idx < nefx; idx++) { if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) - snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx%32]); + snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); } snd_iprintf(buffer, "\nAll FX Outputs :\n"); for (idx = 0; idx < 32; idx++) @@ -155,7 +225,7 @@ snd_info_buffer_t * buffer) { u32 pc; - emu10k1_t *emu = snd_magic_cast(emu10k1_t, entry->private_data, return); + emu10k1_t *emu = entry->private_data; snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); snd_iprintf(buffer, " Code dump :\n"); @@ -195,7 +265,7 @@ unsigned long count, unsigned long pos) { long size; - emu10k1_t *emu = snd_magic_cast(emu10k1_t, entry->private_data, return -ENXIO); + emu10k1_t *emu = entry->private_data; unsigned int offset; if (!strcmp(entry->name, "fx8010_tram_addr")) { diff -Nru a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c --- a/sound/pci/emu10k1/io.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/emu10k1/io.c 2004-09-06 16:37:51 -07:00 @@ -231,7 +231,7 @@ unsigned short snd_emu10k1_ac97_read(ac97_t *ac97, unsigned short reg) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, ac97->private_data, return -ENXIO); + emu10k1_t *emu = ac97->private_data; unsigned long flags; unsigned short val; @@ -244,7 +244,7 @@ void snd_emu10k1_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short data) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, ac97->private_data, return); + emu10k1_t *emu = ac97->private_data; unsigned long flags; spin_lock_irqsave(&emu->emu_lock, flags); diff -Nru a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c --- a/sound/pci/emu10k1/irq.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/emu10k1/irq.c 2004-09-06 16:37:54 -07:00 @@ -32,7 +32,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - emu10k1_t *emu = snd_magic_cast(emu10k1_t, dev_id, return IRQ_NONE); + emu10k1_t *emu = dev_id; unsigned int status, orig_status; int handled = 0; diff -Nru a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c --- a/sound/pci/emu10k1/memory.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/emu10k1/memory.c 2004-09-06 16:37:54 -07:00 @@ -22,6 +22,7 @@ */ #include +#include #include #include #include @@ -291,7 +292,7 @@ snd_emu10k1_alloc_pages(emu10k1_t *emu, snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - struct snd_sg_buf *sgbuf = runtime->dma_private; + struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream); snd_util_memhdr_t *hdr; emu10k1_memblk_t *blk; int page, err, idx; @@ -441,10 +442,11 @@ get_single_page_range(emu->memhdr, blk, &first_page, &last_page); /* allocate kernel pages */ for (page = first_page; page <= last_page; page++) { - if (snd_dma_alloc_pages(&emu->dma_dev, PAGE_SIZE, &dmab) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), + PAGE_SIZE, &dmab) < 0) goto __fail; if (! is_valid_page(emu, dmab.addr)) { - snd_dma_free_pages(&emu->dma_dev, &dmab); + snd_dma_free_pages(&dmab); goto __fail; } emu->page_addr_table[page] = dmab.addr; @@ -459,7 +461,7 @@ dmab.area = emu->page_ptr_table[page]; dmab.addr = emu->page_addr_table[page]; dmab.bytes = PAGE_SIZE; - snd_dma_free_pages(&emu->dma_dev, &dmab); + snd_dma_free_pages(&dmab); emu->page_addr_table[page] = 0; emu->page_ptr_table[page] = NULL; } @@ -476,13 +478,15 @@ struct snd_dma_buffer dmab; get_single_page_range(emu->memhdr, blk, &first_page, &last_page); + dmab.dev.type = SNDRV_DMA_TYPE_DEV; + dmab.dev.dev = snd_dma_pci_data(emu->pci); for (page = first_page; page <= last_page; page++) { if (emu->page_ptr_table[page] == NULL) continue; dmab.area = emu->page_ptr_table[page]; dmab.addr = emu->page_addr_table[page]; dmab.bytes = PAGE_SIZE; - snd_dma_free_pages(&emu->dma_dev, &dmab); + snd_dma_free_pages(&dmab); emu->page_addr_table[page] = 0; emu->page_ptr_table[page] = NULL; } diff -Nru a/sound/pci/ens1370.c b/sound/pci/ens1370.c --- a/sound/pci/ens1370.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/ens1370.c 2004-09-06 16:37:54 -07:00 @@ -40,8 +40,6 @@ #include #include -#define chip_t ensoniq_t - #ifndef CHIP1371 #undef CHIP1370 #define CHIP1370 @@ -56,15 +54,14 @@ MODULE_AUTHOR("Jaroslav Kysela , Thomas Sailer "); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); #ifdef CHIP1370 MODULE_DESCRIPTION("Ensoniq AudioPCI ES1370"); -MODULE_DEVICES("{{Ensoniq,AudioPCI-97 ES1370}," +MODULE_SUPPORTED_DEVICE("{{Ensoniq,AudioPCI-97 ES1370}," "{Creative Labs,SB PCI64/128 (ES1370)}}"); #endif #ifdef CHIP1371 MODULE_DESCRIPTION("Ensoniq/Creative AudioPCI ES1371+"); -MODULE_DEVICES("{{Ensoniq,AudioPCI ES1371/73}," +MODULE_SUPPORTED_DEVICE("{{Ensoniq,AudioPCI ES1371/73}," "{Ensoniq,AudioPCI ES1373}," "{Creative Labs,Ectiva EV1938}," "{Creative Labs,SB PCI64/128 (ES1371/73)}," @@ -90,22 +87,17 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Ensoniq AudioPCI soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Ensoniq AudioPCI soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Ensoniq AudioPCI soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #ifdef SUPPORT_JOYSTICK #ifdef CHIP1371 module_param_array(joystick_port, int, boot_devs, 0444); MODULE_PARM_DESC(joystick_port, "Joystick port address."); -MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED ",allows:{{0},{1},{0x200},{0x208},{0x210},{0x218}},dialog:list"); #else module_param_array(joystick, bool, boot_devs, 0444); MODULE_PARM_DESC(joystick, "Enable joystick."); -MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); #endif #endif /* SUPPORT_JOYSTICK */ @@ -388,7 +380,6 @@ unsigned long capture3size; unsigned long port; - struct resource *res_port; unsigned int mode; unsigned int uartm; /* UART mode */ @@ -435,7 +426,6 @@ unsigned int spdif_stream; #ifdef CHIP1370 - struct snd_dma_device dma_dev; struct snd_dma_buffer dma_bug; #endif @@ -581,7 +571,7 @@ static void snd_es1370_codec_write(ak4531_t *ak4531, unsigned short reg, unsigned short val) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ak4531->private_data, return); + ensoniq_t *ensoniq = ak4531->private_data; unsigned long flags; unsigned long end_time = jiffies + HZ / 10; @@ -611,7 +601,7 @@ static void snd_es1371_codec_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ac97->private_data, return); + ensoniq_t *ensoniq = ac97->private_data; unsigned long flags; unsigned int t, x; @@ -649,7 +639,7 @@ static unsigned short snd_es1371_codec_read(ac97_t *ac97, unsigned short reg) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ac97->private_data, return -ENXIO); + ensoniq_t *ensoniq = ac97->private_data; unsigned long flags; unsigned int t, x, fail = 0; @@ -844,7 +834,6 @@ static int snd_ensoniq_playback1_prepare(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; unsigned int mode = 0; @@ -855,7 +844,7 @@ mode |= 0x02; if (runtime->channels > 1) mode |= 0x01; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ensoniq->ctrl &= ~ES_DAC1_EN; outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); outl(ES_MEM_PAGEO(ES_PAGE_DAC), ES_REG(ensoniq, MEM_PAGE)); @@ -878,13 +867,12 @@ snd_es1371_dac1_rate(ensoniq, runtime->rate); #endif outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_playback2_prepare(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; unsigned int mode = 0; @@ -895,7 +883,7 @@ mode |= 0x02; if (runtime->channels > 1) mode |= 0x01; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ensoniq->ctrl &= ~ES_DAC2_EN; outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); outl(ES_MEM_PAGEO(ES_PAGE_DAC), ES_REG(ensoniq, MEM_PAGE)); @@ -917,13 +905,12 @@ snd_es1371_dac2_rate(ensoniq, runtime->rate); #endif outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_capture_prepare(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; unsigned int mode = 0; @@ -934,7 +921,7 @@ mode |= 0x02; if (runtime->channels > 1) mode |= 0x01; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ensoniq->ctrl &= ~ES_ADC_EN; outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); outl(ES_MEM_PAGEO(ES_PAGE_ADC), ES_REG(ensoniq, MEM_PAGE)); @@ -954,7 +941,7 @@ snd_es1371_adc_rate(ensoniq, runtime->rate); #endif outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } @@ -1151,31 +1138,29 @@ static int snd_ensoniq_playback2_close(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); ensoniq->playback2_substream = NULL; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); #ifdef CHIP1370 ensoniq->u.es1370.pclkdiv_lock &= ~ES_MODE_PLAY2; #endif ensoniq->mode &= ~ES_MODE_PLAY2; - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_capture_close(snd_pcm_substream_t * substream) { - unsigned long flags; ensoniq_t *ensoniq = snd_pcm_substream_chip(substream); ensoniq->capture_substream = NULL; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); #ifdef CHIP1370 ensoniq->u.es1370.pclkdiv_lock &= ~ES_MODE_CAPTURE; #endif ensoniq->mode &= ~ES_MODE_CAPTURE; - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } @@ -1214,7 +1199,7 @@ static void snd_ensoniq_pcm_free(snd_pcm_t *pcm) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, pcm->private_data, return); + ensoniq_t *ensoniq = pcm->private_data; ensoniq->pcm1 = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1261,7 +1246,7 @@ static void snd_ensoniq_pcm_free2(snd_pcm_t *pcm) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, pcm->private_data, return); + ensoniq_t *ensoniq = pcm->private_data; ensoniq->pcm2 = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1565,7 +1550,7 @@ static void snd_ensoniq_mixer_free_ac97(ac97_t *ac97) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ac97->private_data, return); + ensoniq_t *ensoniq = ac97->private_data; ensoniq->u.es1371.ac97 = NULL; } @@ -1585,14 +1570,15 @@ static int snd_ensoniq_1371_mixer(ensoniq_t * ensoniq) { snd_card_t *card = ensoniq->card; - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; int err, idx; + static ac97_bus_ops_t ops = { + .write = snd_es1371_codec_write, + .read = snd_es1371_codec_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_es1371_codec_write; - bus.read = snd_es1371_codec_read; - if ((err = snd_ac97_bus(card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); @@ -1663,30 +1649,28 @@ static int snd_ensoniq_control_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { ensoniq_t *ensoniq = snd_kcontrol_chip(kcontrol); - unsigned long flags; int mask = kcontrol->private_value; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ucontrol->value.integer.value[0] = ensoniq->ctrl & mask ? 1 : 0; - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { ensoniq_t *ensoniq = snd_kcontrol_chip(kcontrol); - unsigned long flags; int mask = kcontrol->private_value; unsigned int nval; int change; nval = ucontrol->value.integer.value[0] ? mask : 0; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); change = (ensoniq->ctrl & mask) != nval; ensoniq->ctrl &= ~mask; ensoniq->ctrl |= nval; outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL)); - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return change; } @@ -1703,7 +1687,7 @@ static void snd_ensoniq_mixer_free_ak4531(ak4531_t *ak4531) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ak4531->private_data, return); + ensoniq_t *ensoniq = ak4531->private_data; ensoniq->u.es1370.ak4531 = NULL; } @@ -1785,7 +1769,7 @@ static void snd_ensoniq_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, entry->private_data, return); + ensoniq_t *ensoniq = entry->private_data; #ifdef CHIP1370 snd_iprintf(buffer, "Ensoniq AudioPCI ES1370\n\n"); @@ -1833,21 +1817,18 @@ __hw_end: #ifdef CHIP1370 if (ensoniq->dma_bug.area) - snd_dma_free_pages(&ensoniq->dma_dev, &ensoniq->dma_bug); + snd_dma_free_pages(&ensoniq->dma_bug); #endif - if (ensoniq->res_port) { - release_resource(ensoniq->res_port); - kfree_nocheck(ensoniq->res_port); - } if (ensoniq->irq >= 0) free_irq(ensoniq->irq, (void *)ensoniq); - snd_magic_kfree(ensoniq); + pci_release_regions(ensoniq->pci); + kfree(ensoniq); return 0; } static int snd_ensoniq_dev_free(snd_device_t *device) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, device->device_data, return -ENXIO); + ensoniq_t *ensoniq = device->device_data; return snd_ensoniq_free(ensoniq); } @@ -1894,19 +1875,18 @@ *rensoniq = NULL; if ((err = pci_enable_device(pci)) < 0) return err; - ensoniq = snd_magic_kcalloc(ensoniq_t, 0, GFP_KERNEL); + ensoniq = kcalloc(1, sizeof(*ensoniq), GFP_KERNEL); if (ensoniq == NULL) return -ENOMEM; spin_lock_init(&ensoniq->reg_lock); ensoniq->card = card; ensoniq->pci = pci; ensoniq->irq = -1; - ensoniq->port = pci_resource_start(pci, 0); - if ((ensoniq->res_port = request_region(ensoniq->port, 0x40, "Ensoniq AudioPCI")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ensoniq->port, ensoniq->port + 0x40 - 1); - snd_ensoniq_free(ensoniq); - return -EBUSY; + if ((err = pci_request_regions(pci, "Ensoniq AudioPCI")) < 0) { + kfree(ensoniq); + return err; } + ensoniq->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, "Ensoniq AudioPCI", (void *)ensoniq)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_ensoniq_free(ensoniq); @@ -1914,10 +1894,8 @@ } ensoniq->irq = pci->irq; #ifdef CHIP1370 - memset(&ensoniq->dma_dev, 0, sizeof(ensoniq->dma_dev)); - ensoniq->dma_dev.type = SNDRV_DMA_TYPE_DEV; - ensoniq->dma_dev.dev = snd_dma_pci_data(pci); - if (snd_dma_alloc_pages(&ensoniq->dma_dev, 16, &ensoniq->dma_bug) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + 16, &ensoniq->dma_bug) < 0) { snd_printk("unable to allocate space for phantom area - dma_bug\n"); snd_ensoniq_free(ensoniq); return -EBUSY; @@ -2074,10 +2052,9 @@ static int snd_ensoniq_midi_input_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return -ENXIO); + ensoniq_t *ensoniq = substream->rmidi->private_data; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ensoniq->uartm |= ES_MODE_INPUT; ensoniq->midi_input = substream; if (!(ensoniq->uartm & ES_MODE_OUTPUT)) { @@ -2085,16 +2062,15 @@ outb(ensoniq->uartc = 0, ES_REG(ensoniq, UART_CONTROL)); outl(ensoniq->ctrl |= ES_UART_EN, ES_REG(ensoniq, CONTROL)); } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_midi_input_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return -ENXIO); + ensoniq_t *ensoniq = substream->rmidi->private_data; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); if (!(ensoniq->uartm & ES_MODE_OUTPUT)) { outb(ensoniq->uartc = 0, ES_REG(ensoniq, UART_CONTROL)); outl(ensoniq->ctrl &= ~ES_UART_EN, ES_REG(ensoniq, CONTROL)); @@ -2103,16 +2079,15 @@ } ensoniq->midi_input = NULL; ensoniq->uartm &= ~ES_MODE_INPUT; - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_midi_output_open(snd_rawmidi_substream_t * substream) { - unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return -ENXIO); + ensoniq_t *ensoniq = substream->rmidi->private_data; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); ensoniq->uartm |= ES_MODE_OUTPUT; ensoniq->midi_output = substream; if (!(ensoniq->uartm & ES_MODE_INPUT)) { @@ -2120,16 +2095,15 @@ outb(ensoniq->uartc = 0, ES_REG(ensoniq, UART_CONTROL)); outl(ensoniq->ctrl |= ES_UART_EN, ES_REG(ensoniq, CONTROL)); } - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static int snd_ensoniq_midi_output_close(snd_rawmidi_substream_t * substream) { - unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return -ENXIO); + ensoniq_t *ensoniq = substream->rmidi->private_data; - spin_lock_irqsave(&ensoniq->reg_lock, flags); + spin_lock_irq(&ensoniq->reg_lock); if (!(ensoniq->uartm & ES_MODE_INPUT)) { outb(ensoniq->uartc = 0, ES_REG(ensoniq, UART_CONTROL)); outl(ensoniq->ctrl &= ~ES_UART_EN, ES_REG(ensoniq, CONTROL)); @@ -2138,14 +2112,14 @@ } ensoniq->midi_output = NULL; ensoniq->uartm &= ~ES_MODE_OUTPUT; - spin_unlock_irqrestore(&ensoniq->reg_lock, flags); + spin_unlock_irq(&ensoniq->reg_lock); return 0; } static void snd_ensoniq_midi_input_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return); + ensoniq_t *ensoniq = substream->rmidi->private_data; int idx; spin_lock_irqsave(&ensoniq->reg_lock, flags); @@ -2169,7 +2143,7 @@ static void snd_ensoniq_midi_output_trigger(snd_rawmidi_substream_t * substream, int up) { unsigned long flags; - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, substream->rmidi->private_data, return); + ensoniq_t *ensoniq = substream->rmidi->private_data; unsigned char byte; spin_lock_irqsave(&ensoniq->reg_lock, flags); @@ -2240,7 +2214,7 @@ static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, dev_id, return IRQ_NONE); + ensoniq_t *ensoniq = dev_id; unsigned int status, sctrl; if (ensoniq == NULL) diff -Nru a/sound/pci/es1938.c b/sound/pci/es1938.c --- a/sound/pci/es1938.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/es1938.c 2004-09-06 16:37:54 -07:00 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -63,13 +64,10 @@ #include -#define chip_t es1938_t - MODULE_AUTHOR("Jaromir Koutek "); MODULE_DESCRIPTION("ESS Solo-1"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ESS,ES1938}," +MODULE_SUPPORTED_DEVICE("{{ESS,ES1938}," "{ESS,ES1946}," "{ESS,ES1969}," "{TerraTec,128i PCI}}"); @@ -88,13 +86,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ESS Solo-1 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ESS Solo-1 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ESS Solo-1 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); #define SLIO_REG(chip, x) ((chip)->io_port + ESSIO_REG_##x) @@ -202,19 +197,16 @@ typedef struct _snd_es1938 es1938_t; +#define SAVED_REG_SIZE 32 /* max. number of registers to save */ + struct _snd_es1938 { int irq; unsigned long io_port; - struct resource *res_io_port; unsigned long sb_port; - struct resource *res_sb_port; unsigned long vc_port; - struct resource *res_vc_port; unsigned long mpu_port; - struct resource *res_mpu_port; unsigned long game_port; - struct resource *res_game_port; unsigned long ddma_port; unsigned char irqmask; @@ -227,6 +219,7 @@ struct pci_dev *pci; snd_card_t *card; + snd_pcm_t *pcm; snd_pcm_substream_t *capture_substream; snd_pcm_substream_t *playback1_substream; snd_pcm_substream_t *playback2_substream; @@ -248,6 +241,9 @@ #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) struct gameport gameport; #endif +#ifdef CONFIG_PM + unsigned char saved_regs[SAVED_REG_SIZE]; +#endif }; static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); @@ -573,7 +569,12 @@ case SNDRV_PCM_TRIGGER_START: /* According to the documentation this should be: 0x13 but that value may randomly swap stereo channels */ + snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0x92); + udelay(10); snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0x93); + /* This two stage init gives the FIFO -> DAC connection time to + * settle before first data from DMA flows in. This should ensure + * no swapping of stereo channels. Report a bug if otherwise :-) */ outb(0x0a, SLIO_REG(chip, AUDIO2MODE)); chip->active |= DAC2; break; @@ -690,6 +691,8 @@ chip->dma2_shift = 2 - mono - is8; + snd_es1938_reset_fifo(chip); + /* set clock and counters */ snd_es1938_rate_set(chip, substream, DAC2); @@ -874,9 +877,9 @@ .rate_max = 48000, .channels_min = 1, .channels_max = 2, - .buffer_bytes_max = 65536, + .buffer_bytes_max = 0x8000, /* DMA controller screws on higher values */ .period_bytes_min = 64, - .period_bytes_max = 65536, + .period_bytes_max = 0x8000, .periods_min = 1, .periods_max = 1024, .fifo_size = 256, @@ -896,9 +899,9 @@ .rate_max = 48000, .channels_min = 1, .channels_max = 2, - .buffer_bytes_max = 65536, + .buffer_bytes_max = 0x8000, /* DMA controller screws on higher values */ .period_bytes_min = 64, - .period_bytes_max = 65536, + .period_bytes_max = 0x8000, .periods_min = 1, .periods_max = 1024, .fifo_size = 256, @@ -998,13 +1001,11 @@ snd_pcm_lib_preallocate_free_for_all(pcm); } -static int __devinit snd_es1938_new_pcm(es1938_t *chip, int device, snd_pcm_t ** rpcm) +static int __devinit snd_es1938_new_pcm(es1938_t *chip, int device) { snd_pcm_t *pcm; int err; - if (rpcm) - *rpcm = NULL; if ((err = snd_pcm_new(chip->card, "es-1938-1946", device, 2, 1, &pcm)) < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_es1938_playback_ops); @@ -1018,8 +1019,7 @@ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 64*1024, 64*1024); - if (rpcm) - *rpcm = pcm; + chip->pcm = pcm; return 0; } @@ -1129,7 +1129,7 @@ static void snd_es1938_hwv_free(snd_kcontrol_t *kcontrol) { - es1938_t *chip = snd_magic_cast(es1938_t, _snd_kcontrol_chip(kcontrol), return); + es1938_t *chip = snd_kcontrol_chip(kcontrol); chip->master_volume = NULL; chip->master_switch = NULL; chip->hw_volume = NULL; @@ -1340,43 +1340,106 @@ /* ---------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- */ +/* + * initialize the chip - used by resume callback, too + */ +static void snd_es1938_chip_init(es1938_t *chip) +{ + /* reset chip */ + snd_es1938_reset(chip); + + /* configure native mode */ + + /* enable bus master */ + pci_set_master(chip->pci); + + /* disable legacy audio */ + pci_write_config_word(chip->pci, SL_PCI_LEGACYCONTROL, 0x805f); + + /* set DDMA base */ + pci_write_config_word(chip->pci, SL_PCI_DDMACONTROL, chip->ddma_port | 1); + + /* set DMA/IRQ policy */ + pci_write_config_dword(chip->pci, SL_PCI_CONFIG, 0); + + /* enable Audio 1, Audio 2, MPU401 IRQ and HW volume IRQ*/ + outb(0xf0, SLIO_REG(chip, IRQCONTROL)); + + /* reset DMA */ + outb(0, SLDM_REG(chip, DMACLEAR)); +} + +#ifdef CONFIG_PM +/* + * PM support + */ + +static unsigned char saved_regs[SAVED_REG_SIZE+1] = { + 0x14, 0x1a, 0x1c, 0x3a, 0x3c, 0x3e, 0x36, 0x38, + 0x50, 0x52, 0x60, 0x61, 0x62, 0x63, 0x64, 0x68, + 0x69, 0x6a, 0x6b, 0x6d, 0x6e, 0x6f, 0x7c, 0x7d, + 0xa8, 0xb4, +}; + + +static int es1938_suspend(snd_card_t *card, unsigned int state) +{ + es1938_t *chip = card->pm_private_data; + unsigned char *s, *d; + + snd_pcm_suspend_all(chip->pcm); + + /* save mixer-related registers */ + for (s = saved_regs, d = chip->saved_regs; *s; s++, d++) + *d = snd_es1938_reg_read(chip, *s); + + outb(0x00, SLIO_REG(chip, IRQCONTROL)); /* disable irqs */ + + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); + return 0; +} + +static int es1938_resume(snd_card_t *card, unsigned int state) +{ + es1938_t *chip = card->pm_private_data; + unsigned char *s, *d; + + pci_enable_device(chip->pci); + snd_es1938_chip_init(chip); + + /* restore mixer-related registers */ + for (s = saved_regs, d = chip->saved_regs; *s; s++, d++) { + if (*s < 0xa0) + snd_es1938_mixer_write(chip, *s, *d); + else + snd_es1938_write(chip, *s, *d); + } + + snd_power_change_state(card, SNDRV_CTL_POWER_D0); + return 0; +} +#endif /* CONFIG_PM */ + static int snd_es1938_free(es1938_t *chip) { + /* disable irqs */ + outb(0x00, SLIO_REG(chip, IRQCONTROL)); /*if (chip->rmidi) snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0);*/ #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) if (chip->gameport.io) gameport_unregister_port(&chip->gameport); #endif - if (chip->res_io_port) { - release_resource(chip->res_io_port); - kfree_nocheck(chip->res_io_port); - } - if (chip->res_sb_port) { - release_resource(chip->res_sb_port); - kfree_nocheck(chip->res_sb_port); - } - if (chip->res_vc_port) { - release_resource(chip->res_vc_port); - kfree_nocheck(chip->res_vc_port); - } - if (chip->res_mpu_port) { - release_resource(chip->res_mpu_port); - kfree_nocheck(chip->res_mpu_port); - } - if (chip->res_game_port) { - release_resource(chip->res_game_port); - kfree_nocheck(chip->res_game_port); - } if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); - snd_magic_kfree(chip); + pci_release_regions(chip->pci); + kfree(chip); return 0; } static int snd_es1938_dev_free(snd_device_t *device) { - es1938_t *chip = snd_magic_cast(es1938_t, device->device_data, return -ENXIO); + es1938_t *chip = device->device_data; return snd_es1938_free(chip); } @@ -1402,43 +1465,22 @@ return -ENXIO; } - chip = snd_magic_kcalloc(es1938_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); spin_lock_init(&chip->mixer_lock); chip->card = card; chip->pci = pci; - chip->io_port = pci_resource_start(pci, 0); - if ((chip->res_io_port = request_region(chip->io_port, 8, "ESS Solo-1")) == NULL) { - snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port, chip->io_port + 8 - 1); - snd_es1938_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, "ESS Solo-1")) < 0) { + kfree(chip); + return err; } + chip->io_port = pci_resource_start(pci, 0); chip->sb_port = pci_resource_start(pci, 1); - if ((chip->res_sb_port = request_region(chip->sb_port, 0x10, "ESS Solo-1 SB")) == NULL) { - snd_printk("unable to grab SB region 0x%lx-0x%lx\n", chip->sb_port, chip->sb_port + 0x10 - 1); - snd_es1938_free(chip); - return -EBUSY; - } chip->vc_port = pci_resource_start(pci, 2); - if ((chip->res_vc_port = request_region(chip->vc_port, 0x10, "ESS Solo-1 VC (DMA)")) == NULL) { - snd_printk("unable to grab VC (DMA) region 0x%lx-0x%lx\n", chip->vc_port, chip->vc_port + 0x10 - 1); - snd_es1938_free(chip); - return -EBUSY; - } chip->mpu_port = pci_resource_start(pci, 3); - if ((chip->res_mpu_port = request_region(chip->mpu_port, 4, "ESS Solo-1 MIDI")) == NULL) { - snd_printk("unable to grab MIDI region 0x%lx-0x%lx\n", chip->mpu_port, chip->mpu_port + 4 - 1); - snd_es1938_free(chip); - return -EBUSY; - } chip->game_port = pci_resource_start(pci, 4); - if ((chip->res_game_port = request_region(chip->game_port, 4, "ESS Solo-1 GAME")) == NULL) { - snd_printk("unable to grab GAME region 0x%lx-0x%lx\n", chip->game_port, chip->game_port + 4 - 1); - snd_es1938_free(chip); - return -EBUSY; - } if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ, "ES1938", (void *)chip)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_es1938_free(chip); @@ -1449,32 +1491,12 @@ snd_printk("create: io: 0x%lx, sb: 0x%lx, vc: 0x%lx, mpu: 0x%lx, game: 0x%lx\n", chip->io_port, chip->sb_port, chip->vc_port, chip->mpu_port, chip->game_port); #endif - /* reset chip */ - snd_es1938_reset(chip); - - /* configure native mode */ - - /* enable bus master */ - pci_set_master(pci); - - /* disable legacy audio */ - pci_write_config_word(pci, SL_PCI_LEGACYCONTROL, 0x805f); - /* set DDMA base */ chip->ddma_port = chip->vc_port + 0x00; /* fix from Thomas Sailer */ - pci_write_config_word(pci, SL_PCI_DDMACONTROL, chip->ddma_port | 1); - /* set DMA/IRQ policy */ - pci_write_config_dword(pci, SL_PCI_CONFIG, 0); + snd_es1938_chip_init(chip); - /* enable Audio 1, Audio 2, MPU401 IRQ and HW volume IRQ*/ - outb(0xf0, SLIO_REG(chip, IRQCONTROL)); - - /* reset DMA */ - outb(0, SLDM_REG(chip, DMACLEAR)); - - /* enable bus mastering */ - pci_set_master(pci); + snd_card_set_pm_callback(card, es1938_suspend, es1938_resume, chip); if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_es1938_free(chip); @@ -1492,7 +1514,7 @@ * -------------------------------------------------------------------- */ static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - es1938_t *chip = snd_magic_cast(es1938_t, dev_id, return IRQ_NONE); + es1938_t *chip = dev_id; unsigned char status, audiostatus; int handled = 0; @@ -1560,19 +1582,15 @@ #define ES1938_DMA_SIZE 64 -static int __devinit snd_es1938_mixer(snd_pcm_t *pcm) +static int __devinit snd_es1938_mixer(es1938_t *chip) { snd_card_t *card; - es1938_t *chip; unsigned int idx; int err; - snd_assert(pcm != NULL && pcm->card != NULL, return -EINVAL); + card = chip->card; - card = pcm->card; - chip = snd_pcm_chip(pcm); - - strcpy(card->mixername, pcm->name); + strcpy(card->mixername, "ESS Solo-1"); for (idx = 0; idx < ARRAY_SIZE(snd_es1938_controls); idx++) { snd_kcontrol_t *kctl; @@ -1608,7 +1626,6 @@ static int dev; snd_card_t *card; es1938_t *chip; - snd_pcm_t *pcm; opl3_t *opl3; int idx, err; @@ -1641,11 +1658,11 @@ chip->revision, chip->irq); - if ((err = snd_es1938_new_pcm(chip, 0, &pcm)) < 0) { + if ((err = snd_es1938_new_pcm(chip, 0)) < 0) { snd_card_free(card); return err; } - if ((err = snd_es1938_mixer(pcm)) < 0) { + if ((err = snd_es1938_mixer(chip)) < 0) { snd_card_free(card); return err; } @@ -1697,6 +1714,7 @@ .id_table = snd_es1938_ids, .probe = snd_es1938_probe, .remove = __devexit_p(snd_es1938_remove), + SND_PCI_PM_CALLBACKS }; static int __init alsa_card_es1938_init(void) diff -Nru a/sound/pci/es1968.c b/sound/pci/es1968.c --- a/sound/pci/es1968.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/es1968.c 2004-09-06 16:37:54 -07:00 @@ -109,15 +109,12 @@ #include #include -#define chip_t es1968_t - #define CARD_NAME "ESS Maestro1/2" #define DRIVER_NAME "ES1968" MODULE_DESCRIPTION("ESS Maestro"); -MODULE_CLASSES("{sound}"); MODULE_LICENSE("GPL"); -MODULE_DEVICES("{{ESS,Maestro 2e}," +MODULE_SUPPORTED_DEVICE("{{ESS,Maestro 2e}," "{ESS,Maestro 2}," "{ESS,Maestro 1}," "{TerraTec,DMX}}"); @@ -142,35 +139,25 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(total_bufsize, int, boot_devs, 0444); MODULE_PARM_DESC(total_bufsize, "Total buffer size in kB."); -MODULE_PARM_SYNTAX(total_bufsize, SNDRV_ENABLED ",allows:{{1,4096}},skill:advanced"); module_param_array(pcm_substreams_p, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_substreams_p, "PCM Playback substreams for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(pcm_substreams_p, SNDRV_ENABLED ",allows:{{1,8}}"); module_param_array(pcm_substreams_c, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_substreams_c, "PCM Capture substreams for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(pcm_substreams_c, SNDRV_ENABLED ",allows:{{0,8}}"); module_param_array(clock, int, boot_devs, 0444); MODULE_PARM_DESC(clock, "Clock on " CARD_NAME " soundcard. (0 = auto-detect)"); -MODULE_PARM_SYNTAX(clock, SNDRV_ENABLED); module_param_array(use_pm, int, boot_devs, 0444); MODULE_PARM_DESC(use_pm, "Toggle power-management. (0 = off, 1 = on, 2 = auto)"); -MODULE_PARM_SYNTAX(use_pm, SNDRV_ENABLED ",allows:{{0,1,2}},default:2,skill:advanced"); module_param_array(enable_mpu, int, boot_devs, 0444); MODULE_PARM_DESC(enable_mpu, "Enable MPU401. (0 = off, 1 = on, 2 = auto)"); -MODULE_PARM_SYNTAX(enable_mpu, SNDRV_ENABLED ",allows:{{0,2}},default:2"); #ifdef SUPPORT_JOYSTICK module_param_array(joystick, bool, boot_devs, 0444); MODULE_PARM_DESC(joystick, "Enable joystick."); -MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); #endif @@ -522,9 +509,7 @@ /* DMA Hack! */ struct snd_esm_memory { - char *buf; - unsigned long addr; - int size; + struct snd_dma_buffer buf; int empty; /* status */ struct list_head list; }; @@ -573,13 +558,11 @@ unsigned int clock; /* clock */ /* buffer */ - struct snd_dma_device dma_dev; struct snd_dma_buffer dma; /* Resources... */ int irq; unsigned long io_port; - struct resource *res_io_port; int type; struct pci_dev *pci; snd_card_t *card; @@ -696,7 +679,7 @@ static void snd_es1968_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - es1968_t *chip = snd_magic_cast(es1968_t, ac97->private_data, return); + es1968_t *chip = ac97->private_data; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); @@ -715,7 +698,7 @@ static unsigned short snd_es1968_ac97_read(ac97_t *ac97, unsigned short reg) { u16 data = 0; - es1968_t *chip = snd_magic_cast(es1968_t, ac97->private_data, return 0); + es1968_t *chip = ac97->private_data; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); @@ -1078,10 +1061,10 @@ for (channel = 0; channel <= high_apu; channel++) { apu = es->apu[channel]; - snd_es1968_program_wavecache(chip, es, channel, es->memory->addr, 0); + snd_es1968_program_wavecache(chip, es, channel, es->memory->buf.addr, 0); /* Offset to PCMBAR */ - pa = es->memory->addr; + pa = es->memory->buf.addr; pa -= chip->dma.addr; pa >>= 1; /* words */ @@ -1230,20 +1213,20 @@ /* input mixer (left/mono) */ /* parallel in crap, see maestro reg 0xC [8-11] */ init_capture_apu(chip, es, 2, - es->mixbuf->addr, ESM_MIXBUF_SIZE/4, /* in words */ + es->mixbuf->buf.addr, ESM_MIXBUF_SIZE/4, /* in words */ ESM_APU_INPUTMIXER, 0x14); /* SRC (left/mono); get input from inputing apu */ - init_capture_apu(chip, es, 0, es->memory->addr, size, + init_capture_apu(chip, es, 0, es->memory->buf.addr, size, ESM_APU_SRCONVERTOR, es->apu[2]); if (es->fmt & ESS_FMT_STEREO) { /* input mixer (right) */ init_capture_apu(chip, es, 3, - es->mixbuf->addr + ESM_MIXBUF_SIZE/2, + es->mixbuf->buf.addr + ESM_MIXBUF_SIZE/2, ESM_MIXBUF_SIZE/4, /* in words */ ESM_APU_INPUTMIXER, 0x15); /* SRC (right) */ init_capture_apu(chip, es, 1, - es->memory->addr + size*2, size, + es->memory->buf.addr + size*2, size, ESM_APU_SRCONVERTOR, es->apu[3]); } @@ -1281,7 +1264,7 @@ { es1968_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - esschan_t *es = snd_magic_cast(esschan_t, runtime->private_data, return -ENXIO); + esschan_t *es = runtime->private_data; es->dma_size = snd_pcm_lib_buffer_bytes(substream); es->frag_size = snd_pcm_lib_period_bytes(substream); @@ -1312,10 +1295,9 @@ static int snd_es1968_pcm_trigger(snd_pcm_substream_t *substream, int cmd) { es1968_t *chip = snd_pcm_substream_chip(substream); - esschan_t *es = snd_magic_cast(esschan_t, substream->runtime->private_data, return -ENXIO); - unsigned long flags; + esschan_t *es = substream->runtime->private_data; - spin_lock_irqsave(&chip->substream_lock, flags); + spin_lock(&chip->substream_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -1336,14 +1318,14 @@ snd_es1968_bob_dec(chip); break; } - spin_unlock_irqrestore(&chip->substream_lock, flags); + spin_unlock(&chip->substream_lock); return 0; } static snd_pcm_uframes_t snd_es1968_pcm_pointer(snd_pcm_substream_t *substream) { es1968_t *chip = snd_pcm_substream_chip(substream); - esschan_t *es = snd_magic_cast(esschan_t, substream->runtime->private_data, return -ENXIO); + esschan_t *es = substream->runtime->private_data; unsigned int ptr; ptr = snd_es1968_get_dma_ptr(chip, es) << es->wav_shift; @@ -1408,8 +1390,8 @@ down(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { esm_memory_t *buf = list_entry(p, esm_memory_t, list); - if (buf->empty && buf->size > max_size) - max_size = buf->size; + if (buf->empty && buf->buf.bytes > max_size) + max_size = buf->buf.bytes; } up(&chip->memory_mutex); if (max_size >= 128*1024) @@ -1427,24 +1409,25 @@ down(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { buf = list_entry(p, esm_memory_t, list); - if (buf->empty && buf->size >= size) + if (buf->empty && buf->buf.bytes >= size) goto __found; } up(&chip->memory_mutex); return NULL; __found: - if (buf->size > size) { + if (buf->buf.bytes > size) { esm_memory_t *chunk = kmalloc(sizeof(*chunk), GFP_KERNEL); if (chunk == NULL) { up(&chip->memory_mutex); return NULL; } - chunk->size = buf->size - size; - chunk->buf = buf->buf + size; - chunk->addr = buf->addr + size; + chunk->buf = buf->buf; + chunk->buf.bytes -= size; + chunk->buf.area += size; + chunk->buf.addr += size; chunk->empty = 1; - buf->size = size; + buf->buf.bytes = size; list_add(&chunk->list, &buf->list); } buf->empty = 0; @@ -1462,7 +1445,7 @@ if (buf->list.prev != &chip->buf_list) { chunk = list_entry(buf->list.prev, esm_memory_t, list); if (chunk->empty) { - chunk->size += buf->size; + chunk->buf.bytes += buf->buf.bytes; list_del(&buf->list); kfree(buf); buf = chunk; @@ -1471,7 +1454,7 @@ if (buf->list.next != &chip->buf_list) { chunk = list_entry(buf->list.next, esm_memory_t, list); if (chunk->empty) { - buf->size += chunk->size; + buf->buf.bytes += chunk->buf.bytes; list_del(&chunk->list); kfree(chunk); } @@ -1485,7 +1468,7 @@ if (! chip->dma.area) return; - snd_dma_free_reserved(&chip->dma_dev); + snd_dma_reserve_buf(&chip->dma, snd_dma_pci_buf_id(chip->pci)); while ((p = chip->buf_list.next) != &chip->buf_list) { esm_memory_t *chunk = list_entry(p, esm_memory_t, list); list_del(p); @@ -1499,22 +1482,22 @@ int err; esm_memory_t *chunk; - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(chip->pci); - chip->dma_dev.id = 0; - if (! snd_dma_get_reserved(&chip->dma_dev, &chip->dma)) { - err = snd_dma_alloc_pages_fallback(&chip->dma_dev, chip->total_bufsize, &chip->dma); + chip->dma.dev.type = SNDRV_DMA_TYPE_DEV; + chip->dma.dev.dev = snd_dma_pci_data(chip->pci); + if (! snd_dma_get_reserved_buf(&chip->dma, snd_dma_pci_buf_id(chip->pci))) { + err = snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), + chip->total_bufsize, &chip->dma); if (err < 0 || ! chip->dma.area) { snd_printk("es1968: can't allocate dma pages for size %d\n", chip->total_bufsize); return -ENOMEM; } if ((chip->dma.addr + chip->dma.bytes - 1) & ~((1 << 28) - 1)) { - snd_dma_free_pages(&chip->dma_dev, &chip->dma); + snd_dma_free_pages(&chip->dma); snd_printk("es1968: DMA buffer beyond 256MB.\n"); return -ENOMEM; } - snd_dma_set_reserved(&chip->dma_dev, &chip->dma); } INIT_LIST_HEAD(&chip->buf_list); @@ -1525,9 +1508,10 @@ return -ENOMEM; } memset(chip->dma.area, 0, ESM_MEM_ALIGN); - chunk->buf = chip->dma.area + ESM_MEM_ALIGN; - chunk->addr = chip->dma.addr + ESM_MEM_ALIGN; - chunk->size = chip->dma.bytes - ESM_MEM_ALIGN; + chunk->buf = chip->dma; + chunk->buf.area += ESM_MEM_ALIGN; + chunk->buf.addr += ESM_MEM_ALIGN; + chunk->buf.bytes -= ESM_MEM_ALIGN; chunk->empty = 1; list_add(&chunk->list, &chip->buf_list); @@ -1541,11 +1525,11 @@ { es1968_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - esschan_t *chan = snd_magic_cast(esschan_t, runtime->private_data, return -ENXIO); + esschan_t *chan = runtime->private_data; int size = params_buffer_bytes(hw_params); if (chan->memory) { - if (chan->memory->size >= size) { + if (chan->memory->buf.bytes >= size) { runtime->dma_bytes = size; return 0; } @@ -1556,9 +1540,7 @@ // snd_printd("cannot allocate dma buffer: size = %d\n", size); return -ENOMEM; } - runtime->dma_bytes = size; - runtime->dma_area = chan->memory->buf; - runtime->dma_addr = chan->memory->addr; + snd_pcm_set_runtime_buffer(substream, &chan->memory->buf); return 1; /* area was changed */ } @@ -1571,7 +1553,7 @@ if (runtime->private_data == NULL) return 0; - chan = snd_magic_cast(esschan_t, runtime->private_data, return -ENXIO); + chan = runtime->private_data; if (chan->memory) { snd_es1968_free_memory(chip, chan->memory); chan->memory = NULL; @@ -1616,14 +1598,13 @@ snd_pcm_runtime_t *runtime = substream->runtime; esschan_t *es; int apu1; - unsigned long flags; /* search 2 APUs */ apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_PLAY); if (apu1 < 0) return apu1; - es = snd_magic_kcalloc(esschan_t, 0, GFP_KERNEL); + es = kcalloc(1, sizeof(*es), GFP_KERNEL); if (!es) { snd_es1968_free_apu_pair(chip, apu1); return -ENOMEM; @@ -1645,9 +1626,9 @@ snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 1024); #endif - spin_lock_irqsave(&chip->substream_lock, flags); + spin_lock_irq(&chip->substream_lock); list_add(&es->list, &chip->substream_list); - spin_unlock_irqrestore(&chip->substream_lock, flags); + spin_unlock_irq(&chip->substream_lock); return 0; } @@ -1658,7 +1639,6 @@ es1968_t *chip = snd_pcm_substream_chip(substream); esschan_t *es; int apu1, apu2; - unsigned long flags; apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE); if (apu1 < 0) @@ -1669,7 +1649,7 @@ return apu2; } - es = snd_magic_kcalloc(esschan_t, 0, GFP_KERNEL); + es = kcalloc(1, sizeof(*es), GFP_KERNEL); if (!es) { snd_es1968_free_apu_pair(chip, apu1); snd_es1968_free_apu_pair(chip, apu2); @@ -1692,10 +1672,10 @@ if ((es->mixbuf = snd_es1968_new_memory(chip, ESM_MIXBUF_SIZE)) == NULL) { snd_es1968_free_apu_pair(chip, apu1); snd_es1968_free_apu_pair(chip, apu2); - snd_magic_kfree(es); + kfree(es); return -ENOMEM; } - memset(es->mixbuf->buf, 0, ESM_MIXBUF_SIZE); + memset(es->mixbuf->buf.area, 0, ESM_MIXBUF_SIZE); runtime->private_data = es; runtime->hw = snd_es1968_capture; @@ -1705,9 +1685,9 @@ snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 1024); #endif - spin_lock_irqsave(&chip->substream_lock, flags); + spin_lock_irq(&chip->substream_lock); list_add(&es->list, &chip->substream_list); - spin_unlock_irqrestore(&chip->substream_lock, flags); + spin_unlock_irq(&chip->substream_lock); return 0; } @@ -1716,16 +1696,15 @@ { es1968_t *chip = snd_pcm_substream_chip(substream); esschan_t *es; - unsigned long flags; if (substream->runtime->private_data == NULL) return 0; - es = snd_magic_cast(esschan_t, substream->runtime->private_data, return -ENXIO); - spin_lock_irqsave(&chip->substream_lock, flags); + es = substream->runtime->private_data; + spin_lock_irq(&chip->substream_lock); list_del(&es->list); - spin_unlock_irqrestore(&chip->substream_lock, flags); + spin_unlock_irq(&chip->substream_lock); snd_es1968_free_apu_pair(chip, es->apu[0]); - snd_magic_kfree(es); + kfree(es); return 0; } @@ -1734,18 +1713,17 @@ { es1968_t *chip = snd_pcm_substream_chip(substream); esschan_t *es; - unsigned long flags; if (substream->runtime->private_data == NULL) return 0; - es = snd_magic_cast(esschan_t, substream->runtime->private_data, return -ENXIO); - spin_lock_irqsave(&chip->substream_lock, flags); + es = substream->runtime->private_data; + spin_lock_irq(&chip->substream_lock); list_del(&es->list); - spin_unlock_irqrestore(&chip->substream_lock, flags); + spin_unlock_irq(&chip->substream_lock); snd_es1968_free_memory(chip, es->mixbuf); snd_es1968_free_apu_pair(chip, es->apu[0]); snd_es1968_free_apu_pair(chip, es->apu[2]); - snd_magic_kfree(es); + kfree(es); return 0; } @@ -1783,7 +1761,6 @@ int i, apu; unsigned int pa, offset, t; esm_memory_t *memory; - unsigned long flags; struct timeval start_time, stop_time; if (chip->clock == 0) @@ -1800,11 +1777,11 @@ return; } - memset(memory->buf, 0, CLOCK_MEASURE_BUFSIZE); + memset(memory->buf.area, 0, CLOCK_MEASURE_BUFSIZE); - wave_set_register(chip, apu << 3, (memory->addr - 0x10) & 0xfff8); + wave_set_register(chip, apu << 3, (memory->buf.addr - 0x10) & 0xfff8); - pa = (unsigned int)((memory->addr - chip->dma.addr) >> 1); + pa = (unsigned int)((memory->buf.addr - chip->dma.addr) >> 1); pa |= 0x00400000; /* System RAM (Bit 22) */ /* initialize apu */ @@ -1820,18 +1797,18 @@ apu_set_register(chip, apu, 9, 0xD000); apu_set_register(chip, apu, 10, 0x8F08); apu_set_register(chip, apu, 11, 0x0000); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); outw(1, chip->io_port + 0x04); /* clear WP interrupts */ outw(inw(chip->io_port + ESM_PORT_HOST_IRQ) | ESM_HIRQ_DSIE, chip->io_port + ESM_PORT_HOST_IRQ); /* enable WP ints */ - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); snd_es1968_apu_set_freq(chip, apu, ((unsigned int)48000 << 16) / chip->clock); /* 48000 Hz */ - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); __apu_set_register(chip, apu, 5, pa & 0xffff); snd_es1968_trigger_apu(chip, apu, ESM_APU_16BITLINEAR); do_gettimeofday(&start_time); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); #if 0 set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 20); /* 50 msec */ @@ -1842,11 +1819,11 @@ */ mdelay(50); #endif - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); offset = __apu_get_register(chip, apu, 5); do_gettimeofday(&stop_time); snd_es1968_trigger_apu(chip, apu, 0); /* stop */ - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); /* check the current position */ offset -= (pa & 0xffff); @@ -1879,7 +1856,7 @@ static void snd_es1968_pcm_free(snd_pcm_t *pcm) { - es1968_t *esm = snd_magic_cast(es1968_t, pcm->private_data, return); + es1968_t *esm = pcm->private_data; snd_es1968_free_dmabuf(esm); esm->pcm = NULL; } @@ -1952,7 +1929,7 @@ */ static void es1968_update_hw_volume(unsigned long private_data) { - es1968_t *chip = snd_magic_cast(es1968_t, (void*)private_data, return); + es1968_t *chip = (es1968_t *) private_data; int x, val; /* Figure out which volume control button was pushed, @@ -1990,8 +1967,6 @@ if ((val & 0xff00) < 0x1f00) val += 0x0100; } - if (val == 0x1f1f) - val |= 0x8000; snd_ac97_write_cache(chip->ac97, AC97_MASTER, val); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_volume->id); @@ -2003,7 +1978,7 @@ */ static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - es1968_t *chip = snd_magic_cast(es1968_t, dev_id, return IRQ_NONE); + es1968_t *chip = dev_id; u32 event; if (!(event = inb(chip->io_port + 0x1A))) @@ -2042,15 +2017,16 @@ static int __devinit snd_es1968_mixer(es1968_t *chip) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; snd_ctl_elem_id_t id; int err; + static ac97_bus_ops_t ops = { + .write = snd_es1968_ac97_write, + .read = snd_es1968_ac97_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_es1968_ac97_write; - bus.read = snd_es1968_ac97_read; - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); @@ -2420,7 +2396,7 @@ */ static int es1968_suspend(snd_card_t *card, unsigned int state) { - es1968_t *chip = snd_magic_cast(es1968_t, card->pm_private_data, return -EINVAL); + es1968_t *chip = card->pm_private_data; if (! chip->do_pm) return 0; @@ -2435,7 +2411,7 @@ static int es1968_resume(snd_card_t *card, unsigned int state) { - es1968_t *chip = snd_magic_cast(es1968_t, card->pm_private_data, return -EINVAL); + es1968_t *chip = card->pm_private_data; if (! chip->do_pm) return 0; @@ -2466,12 +2442,14 @@ static int snd_es1968_free(es1968_t *chip) { - if (chip->res_io_port) { + if (chip->io_port) { synchronize_irq(chip->irq); outw(1, chip->io_port + 0x04); /* clear WP interrupts */ outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */ } + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); #ifdef SUPPORT_JOYSTICK if (chip->res_joystick) { gameport_unregister_port(&chip->gameport); @@ -2482,19 +2460,14 @@ snd_es1968_set_acpi(chip, ACPI_D3); chip->master_switch = NULL; chip->master_volume = NULL; - if (chip->res_io_port) { - release_resource(chip->res_io_port); - kfree_nocheck(chip->res_io_port); - } - if (chip->irq >= 0) - free_irq(chip->irq, (void *)chip); - snd_magic_kfree(chip); + pci_release_regions(chip->pci); + kfree(chip); return 0; } static int snd_es1968_dev_free(snd_device_t *device) { - es1968_t *chip = snd_magic_cast(es1968_t, device->device_data, return -ENXIO); + es1968_t *chip = device->device_data; return snd_es1968_free(chip); } @@ -2542,7 +2515,7 @@ return -ENXIO; } - chip = (es1968_t *) snd_magic_kcalloc(es1968_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (! chip) return -ENOMEM; @@ -2561,12 +2534,11 @@ chip->playback_streams = play_streams; chip->capture_streams = capt_streams; - chip->io_port = pci_resource_start(pci, 0); - if ((chip->res_io_port = request_region(chip->io_port, 0x100, "ESS Maestro")) == NULL) { - snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->io_port, chip->io_port + 0x100 - 1); - snd_es1968_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, "ESS Maestro")) < 0) { + kfree(chip); + return err; } + chip->io_port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, "ESS Maestro", (void*)chip)) { snd_printk("unable to grab IRQ %d\n", pci->irq); diff -Nru a/sound/pci/fm801.c b/sound/pci/fm801.c --- a/sound/pci/fm801.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/fm801.c 2004-09-06 16:37:54 -07:00 @@ -40,13 +40,10 @@ #define TEA575X_RADIO 1 #endif -#define chip_t fm801_t - MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ForteMedia FM801"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ForteMedia,FM801}," +MODULE_SUPPORTED_DEVICE("{{ForteMedia,FM801}," "{Genius,SoundMaker Live 5.1}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ @@ -64,16 +61,12 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the FM801 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the FM801 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable FM801 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(tea575x_tuner, bool, boot_devs, 0444); MODULE_PARM_DESC(tea575x_tuner, "Enable TEA575x tuner."); -MODULE_PARM_SYNTAX(tea575x_tuner, SNDRV_ENABLE_DESC); /* * Direct registers @@ -161,7 +154,6 @@ int irq; unsigned long port; /* I/O port number */ - struct resource *res_port; unsigned int multichannel: 1, /* multichannel support */ secondary: 1; /* secondary codec */ unsigned char secondary_addr; /* address of the secondary codec */ @@ -233,7 +225,7 @@ unsigned short reg, unsigned short val) { - fm801_t *chip = snd_magic_cast(fm801_t, ac97->private_data, return); + fm801_t *chip = ac97->private_data; int idx; /* @@ -264,7 +256,7 @@ static unsigned short snd_fm801_codec_read(ac97_t *ac97, unsigned short reg) { - fm801_t *chip = snd_magic_cast(fm801_t, ac97->private_data, return -ENXIO); + fm801_t *chip = ac97->private_data; int idx; /* @@ -308,10 +300,8 @@ 38400, 44100, 48000 }; -#define RATES sizeof(rates) / sizeof(rates[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_rates = { - .count = RATES, + .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, }; @@ -336,11 +326,11 @@ { unsigned int idx; - for (idx = 0; idx < 11; idx++) + for (idx = 0; idx < ARRAY_SIZE(rates); idx++) if (rates[idx] == rate) return idx; snd_BUG(); - return RATES - 1; + return ARRAY_SIZE(rates) - 1; } /* @@ -487,42 +477,40 @@ static snd_pcm_uframes_t snd_fm801_playback_pointer(snd_pcm_substream_t * substream) { fm801_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; size_t ptr; if (!(chip->ply_ctrl & FM801_START)) return 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); ptr = chip->ply_pos + (chip->ply_count - 1) - inw(FM801_REG(chip, PLY_COUNT)); if (inw(FM801_REG(chip, IRQ_STATUS)) & FM801_IRQ_PLAYBACK) { ptr += chip->ply_count; ptr %= chip->ply_size; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return bytes_to_frames(substream->runtime, ptr); } static snd_pcm_uframes_t snd_fm801_capture_pointer(snd_pcm_substream_t * substream) { fm801_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; size_t ptr; if (!(chip->cap_ctrl & FM801_START)) return 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); ptr = chip->cap_pos + (chip->cap_count - 1) - inw(FM801_REG(chip, CAP_COUNT)); if (inw(FM801_REG(chip, IRQ_STATUS)) & FM801_IRQ_CAPTURE) { ptr += chip->cap_count; ptr %= chip->cap_size; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return bytes_to_frames(substream->runtime, ptr); } static irqreturn_t snd_fm801_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - fm801_t *chip = snd_magic_cast(fm801_t, dev_id, return IRQ_NONE); + fm801_t *chip = dev_id; unsigned short status; unsigned int tmp; @@ -680,7 +668,7 @@ static void snd_fm801_pcm_free(snd_pcm_t *pcm) { - fm801_t *chip = snd_magic_cast(fm801_t, pcm->private_data, return); + fm801_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1076,10 +1064,10 @@ int mask = (kcontrol->private_value >> 16) & 0xff; int invert = (kcontrol->private_value >> 24) & 0xff; - spin_lock(&chip->reg_lock); + spin_lock_irq(&chip->reg_lock); ucontrol->value.integer.value[0] = (inw(chip->port + reg) >> shift_left) & mask; ucontrol->value.integer.value[1] = (inw(chip->port + reg) >> shift_right) & mask; - spin_unlock(&chip->reg_lock); + spin_unlock_irq(&chip->reg_lock); if (invert) { ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0]; ucontrol->value.integer.value[1] = mask - ucontrol->value.integer.value[1]; @@ -1176,13 +1164,13 @@ static void snd_fm801_mixer_free_ac97_bus(ac97_bus_t *bus) { - fm801_t *chip = snd_magic_cast(fm801_t, bus->private_data, return); + fm801_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_fm801_mixer_free_ac97(ac97_t *ac97) { - fm801_t *chip = snd_magic_cast(fm801_t, ac97->private_data, return); + fm801_t *chip = ac97->private_data; if (ac97->num == 0) { chip->ac97 = NULL; } else { @@ -1192,18 +1180,17 @@ static int __devinit snd_fm801_mixer(fm801_t *chip) { - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; unsigned int i; int err; + static ac97_bus_ops_t ops = { + .write = snd_fm801_codec_write, + .read = snd_fm801_codec_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_fm801_codec_write; - bus.read = snd_fm801_codec_read; - bus.private_data = chip; - bus.private_free = snd_fm801_mixer_free_ac97_bus; - if ((err = snd_ac97_bus(chip->card, &bus, &chip->ac97_bus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0) return err; + chip->ac97_bus->private_free = snd_fm801_mixer_free_ac97_bus; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -1245,20 +1232,17 @@ #ifdef TEA575X_RADIO snd_tea575x_exit(&chip->tea); #endif - if (chip->res_port) { - release_resource(chip->res_port); - kfree_nocheck(chip->res_port); - } if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); + pci_release_regions(chip->pci); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_fm801_dev_free(snd_device_t *device) { - fm801_t *chip = snd_magic_cast(fm801_t, device->device_data, return -ENXIO); + fm801_t *chip = device->device_data; return snd_fm801_free(chip); } @@ -1279,19 +1263,18 @@ *rchip = NULL; if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(fm801_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); chip->card = card; chip->pci = pci; chip->irq = -1; - chip->port = pci_resource_start(pci, 0); - if ((chip->res_port = request_region(chip->port, 0x80, "FM801")) == NULL) { - snd_printk("unable to grab region 0x%lx-0x%lx\n", chip->port, chip->port + 0x80 - 1); - snd_fm801_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, "FM801")) < 0) { + kfree(chip); + return err; } + chip->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_fm801_interrupt, SA_INTERRUPT|SA_SHIRQ, "FM801", (void *)chip)) { snd_printk("unable to grab IRQ %d\n", chip->irq); snd_fm801_free(chip); diff -Nru a/sound/pci/ice1712/Makefile b/sound/pci/ice1712/Makefile --- a/sound/pci/ice1712/Makefile 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/ice1712/Makefile 2004-09-06 16:37:52 -07:00 @@ -5,7 +5,7 @@ snd-ice17xx-ak4xxx-objs := ak4xxx.o snd-ice1712-objs := ice1712.o delta.o hoontech.o ews.o -snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o +snd-ice1724-objs := ice1724.o amp.o revo.o aureon.o vt1720_mobo.o pontis.o # Toplevel Module Dependency obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o snd-ice17xx-ak4xxx.o diff -Nru a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c --- a/sound/pci/ice1712/ak4xxx.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/ice1712/ak4xxx.c 2004-09-06 16:37:50 -07:00 @@ -33,7 +33,6 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ICEnsemble ICE17xx <-> AK4xxx AD/DA chip interface"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); static void snd_ice1712_akm4xxx_lock(akm4xxx_t *ak, int chip) { diff -Nru a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c --- a/sound/pci/ice1712/aureon.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/ice1712/aureon.c 2004-09-06 16:37:55 -07:00 @@ -75,7 +75,7 @@ #define WM_DAC_ATTEN 0x00 /* DAC1-8 analog attenuation */ #define WM_DAC_MASTER_ATTEN 0x08 /* DAC master analog attenuation */ #define WM_DAC_DIG_ATTEN 0x09 /* DAC1-8 digital attenuation */ -#define WM_DAC_DIG_MATER_ATTEN 0x11 /* DAC master digital attenuation */ +#define WM_DAC_DIG_MASTER_ATTEN 0x11 /* DAC master digital attenuation */ #define WM_PHASE_SWAP 0x12 /* DAC phase */ #define WM_DAC_CTRL1 0x13 /* DAC control bits */ #define WM_MUTE 0x14 /* mute controls */ @@ -149,20 +149,27 @@ } /* + * set the register value of WM codec + */ +static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val) +{ + aureon_spi_write(ice, AUREON_WM_CS, (reg << 9) | (val & 0x1ff), 16); +} + +/* * set the register value of WM codec and remember it */ static void wm_put(ice1712_t *ice, int reg, unsigned short val) { - aureon_spi_write(ice, AUREON_WM_CS, (reg << 9) | (val & 0x1ff), 16); + wm_put_nocache(ice, reg, val); reg <<= 1; ice->akm[0].images[reg] = val >> 8; ice->akm[0].images[reg + 1] = val; } /* - * DAC mute control */ -static int wm_dac_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int aureon_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -171,6 +178,11 @@ return 0; } +/* + * DAC mute control + */ +#define wm_dac_mute_info aureon_mono_bool_info + static int wm_dac_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); @@ -205,9 +217,10 @@ */ static int wm_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { + int voices = kcontrol->private_value >> 8; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = 0; /* mute */ + uinfo->count = voices; + uinfo->value.integer.min = 0; /* mute (-101dB) */ uinfo->value.integer.max = 101; /* 0dB */ return 0; } @@ -215,19 +228,20 @@ static int wm_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); - int idx; + int i, idx, ofs, voices; unsigned short vol; + voices = kcontrol->private_value >> 8; + ofs = kcontrol->private_value & 0xff; down(&ice->gpio_mutex); - if (kcontrol->private_value) - idx = WM_DAC_MASTER_ATTEN; - else - idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + WM_DAC_ATTEN; - vol = wm_get(ice, idx) & 0x7f; - if (vol <= 0x1a) - ucontrol->value.integer.value[0] = 0; - else - ucontrol->value.integer.value[0] = vol - 0x1a; + for (i = 0; i < voices; i++) { + idx = WM_DAC_ATTEN + ofs + i; + vol = wm_get(ice, idx) & 0x7f; + if (vol <= 0x1a) + ucontrol->value.integer.value[i] = 0; + else + ucontrol->value.integer.value[i] = vol - 0x1a; + } up(&ice->gpio_mutex); return 0; } @@ -235,23 +249,69 @@ static int wm_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); - int idx; + int i, idx, ofs, voices; unsigned short ovol, nvol; - int change; + int change = 0; + voices = kcontrol->private_value >> 8; + ofs = kcontrol->private_value & 0xff; snd_ice1712_save_gpio_status(ice); - if (kcontrol->private_value) - idx = WM_DAC_MASTER_ATTEN; - else - idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + WM_DAC_ATTEN; - nvol = ucontrol->value.integer.value[0] + 0x1a; - ovol = wm_get(ice, idx) & 0x7f; - change = (ovol != nvol); - if (change) { - if (nvol <= 0x1a && ovol <= 0x1a) - change = 0; - else - wm_put(ice, idx, nvol | 0x180); /* update on zero detect */ + for (i = 0; i < voices; i++) { + idx = WM_DAC_ATTEN + ofs + i; + nvol = ucontrol->value.integer.value[i] + 0x1a; + ovol = wm_get(ice, idx) & 0x7f; + if (ovol != nvol) { + if (nvol <= 0x1a && ovol <= 0x1a) + continue; + wm_put(ice, idx, nvol | 0x80); /* zero-detect, prelatch */ + wm_put_nocache(ice, idx, nvol | 0x180); /* update */ + change = 1; + } + } + snd_ice1712_restore_gpio_status(ice); + return change; +} + +/* digital master volume */ +#define MASTER_0dB 0xff +#define MASTER_RES 128 /* -64dB */ +#define MASTER_MIN (MASTER_0dB - MASTER_RES) +static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 1; + uinfo->value.integer.min = 0; /* mute (-64dB) */ + uinfo->value.integer.max = MASTER_RES; /* 0dB */ + return 0; +} + +static int wm_master_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short val; + + down(&ice->gpio_mutex); + val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff; + val = val > MASTER_MIN ? (val - MASTER_MIN) : 0; + ucontrol->value.integer.value[0] = val; + up(&ice->gpio_mutex); + return 0; +} + +static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short ovol, nvol; + int change = 0; + + snd_ice1712_save_gpio_status(ice); + nvol = ucontrol->value.integer.value[0]; + nvol = (nvol ? (nvol + MASTER_MIN) : 0) & 0xff; + ovol = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff; + if (ovol != nvol) { + wm_put(ice, WM_DAC_DIG_MASTER_ATTEN, nvol); /* prelatch */ + wm_put_nocache(ice, WM_DAC_DIG_MASTER_ATTEN, nvol | 0x100); /* update */ + change = 1; } snd_ice1712_restore_gpio_status(ice); return change; @@ -260,10 +320,10 @@ /* * ADC mute control */ -static int wm_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) +static int wm_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; + uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; return 0; @@ -273,10 +333,13 @@ { ice1712_t *ice = snd_kcontrol_chip(kcontrol); unsigned short val; + int i; down(&ice->gpio_mutex); - val = wm_get(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_ADC_GAIN); - ucontrol->value.integer.value[0] = ~val>>5 & 0x1; + for (i = 0; i < 2; i++) { + val = wm_get(ice, WM_ADC_GAIN + i); + ucontrol->value.integer.value[i] = ~val>>5 & 0x1; + } up(&ice->gpio_mutex); return 0; } @@ -285,14 +348,17 @@ { ice1712_t *ice = snd_kcontrol_chip(kcontrol); unsigned short new, old; - int change; + int i, change = 0; snd_ice1712_save_gpio_status(ice); - old = wm_get(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_ADC_GAIN); - new = (~ucontrol->value.integer.value[0]<<5&0x20) | (old&~0x20); - change = (new != old); - if (change) - wm_put(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_ADC_GAIN, new); + for (i = 0; i < 2; i++) { + old = wm_get(ice, WM_ADC_GAIN + i); + new = (~ucontrol->value.integer.value[i]<<5&0x20) | (old&~0x20); + if (new != old) { + wm_put(ice, snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)+WM_ADC_GAIN, new); + change = 1; + } + } snd_ice1712_restore_gpio_status(ice); return change; @@ -304,7 +370,7 @@ static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; + uinfo->count = 2; uinfo->value.integer.min = 0; /* -12dB */ uinfo->value.integer.max = 0x1f; /* 19dB */ return 0; @@ -313,13 +379,15 @@ static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); - int idx; + int i, idx; unsigned short vol; down(&ice->gpio_mutex); - idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + WM_ADC_GAIN; - vol = wm_get(ice, idx) & 0x1f; - ucontrol->value.integer.value[0] = vol; + for (i = 0; i < 2; i++) { + idx = WM_ADC_GAIN + i; + vol = wm_get(ice, idx) & 0x1f; + ucontrol->value.integer.value[i] = vol; + } up(&ice->gpio_mutex); return 0; } @@ -327,17 +395,20 @@ static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); - int idx; + int i, idx; unsigned short ovol, nvol; - int change; + int change = 0; snd_ice1712_save_gpio_status(ice); - idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + WM_ADC_GAIN; - nvol = ucontrol->value.integer.value[0]; - ovol = wm_get(ice, idx); - change = ((ovol & 0x1f) != nvol); - if (change) - wm_put(ice, idx, nvol | (ovol & ~0x1f)); + for (i = 0; i < 2; i++) { + idx = WM_ADC_GAIN + i; + nvol = ucontrol->value.integer.value[i]; + ovol = wm_get(ice, idx); + if ((ovol & 0x1f) != nvol) { + wm_put(ice, idx, nvol | (ovol & ~0x1f)); + change = 1; + } + } snd_ice1712_restore_gpio_status(ice); return change; } @@ -355,7 +426,7 @@ "AC97" //AIN5 }; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; + uinfo->count = 2; uinfo->value.enumerated.items = 5; if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; @@ -420,14 +491,7 @@ return ( tmp & AUREON_HP_SEL )!= 0; } -static int aureon_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} +#define aureon_hpamp_info aureon_mono_bool_info static int aureon_hpamp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { @@ -448,6 +512,9 @@ /* * Deemphasis */ + +#define aureon_deemp_info aureon_mono_bool_info + static int aureon_deemp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { ice1712_t *ice = snd_kcontrol_chip(kcontrol); @@ -519,44 +586,67 @@ * mixers */ -static snd_kcontrol_new_t aureon51_dac_control __devinitdata = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DAC Volume", - .count = 6, - .info = wm_dac_vol_info, - .get = wm_dac_vol_get, - .put = wm_dac_vol_put, -}; - -static snd_kcontrol_new_t aureon71_dac_control __devinitdata = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DAC Volume", - .count = 8, - .info = wm_dac_vol_info, - .get = wm_dac_vol_get, - .put = wm_dac_vol_put, -}; - -static snd_kcontrol_new_t wm_controls[] __devinitdata = { +static snd_kcontrol_new_t aureon_dac_controls[] __devinitdata = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Switch", - .info = wm_dac_mute_info, - .get = wm_dac_mute_get, - .put = wm_dac_mute_put, + .name = "Front Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + .private_value = (2 << 8) | 0 }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Volume", + .name = "Rear Playback Volume", .info = wm_dac_vol_info, .get = wm_dac_vol_get, .put = wm_dac_vol_put, - .private_value = 1, + .private_value = (2 << 8) | 2 }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "ADC Switch", - .count = 2, + .name = "Center Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + .private_value = (1 << 8) | 4 + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "LFE Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + .private_value = (1 << 8) | 5 + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Side Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + .private_value = (2 << 8) | 6 + } +}; + +static snd_kcontrol_new_t wm_controls[] __devinitdata = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Switch", + .info = wm_dac_mute_info, + .get = wm_dac_mute_get, + .put = wm_dac_mute_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Master Playback Volume", + .info = wm_master_vol_info, + .get = wm_master_vol_get, + .put = wm_master_vol_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Switch", .info = wm_adc_mute_info, .get = wm_adc_mute_get, .put = wm_adc_mute_put, @@ -564,15 +654,14 @@ }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "ADC Volume", - .count = 2, + .name = "Capture Volume", .info = wm_adc_vol_info, .get = wm_adc_vol_get, .put = wm_adc_vol_put, }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Capture Route", + .name = "Capture Source", .info = wm_adc_mux_info, .get = wm_adc_mux_get, .put = wm_adc_mux_put, @@ -580,14 +669,14 @@ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Headphone Amplifier Switch", - .info = aureon_bool_info, + .info = aureon_hpamp_info, .get = aureon_hpamp_get, .put = aureon_hpamp_put }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "DAC Deemphasis Switch", - .info = aureon_bool_info, + .info = aureon_deemp_info, .get = aureon_deemp_get, .put = aureon_deemp_put }, @@ -603,15 +692,17 @@ static int __devinit aureon_add_controls(ice1712_t *ice) { - unsigned int i; + unsigned int i, counts; int err; + counts = ARRAY_SIZE(aureon_dac_controls); if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) - err = snd_ctl_add(ice->card, snd_ctl_new1(&aureon51_dac_control, ice)); - else - err = snd_ctl_add(ice->card, snd_ctl_new1(&aureon71_dac_control, ice)); - if (err < 0) - return err; + counts--; /* no side */ + for (i = 0; i < counts; i++) { + err = snd_ctl_add(ice->card, snd_ctl_new1(&aureon_dac_controls[i], ice)); + if (err < 0) + return err; + } for (i = 0; i < ARRAY_SIZE(wm_controls); i++) { err = snd_ctl_add(ice->card, snd_ctl_new1(&wm_controls[i], ice)); @@ -718,15 +809,15 @@ if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) { ice->num_total_dacs = 6; - ice->num_total_adcs = 6; + ice->num_total_adcs = 2; } else { /* aureon 7.1 and prodigy 7.1 */ ice->num_total_dacs = 8; - ice->num_total_adcs = 8; + ice->num_total_adcs = 2; } /* to remeber the register values */ - ice->akm = snd_kcalloc(sizeof(akm4xxx_t), GFP_KERNEL); + ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); if (! ice->akm) return -ENOMEM; ice->akm_codecs = 1; @@ -780,7 +871,7 @@ */ static unsigned char aureon51_eeprom[] __devinitdata = { - 0x2a, /* SYSCONF: clock 512, mpu401, spdif-in/ADC, 3DACs */ + 0x0a, /* SYSCONF: clock 512, spdif-in/ADC, 3DACs */ 0x80, /* ACLINK: I2S */ 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 0xc3, /* SPDIF: out-en, out-int, spdif-in */ @@ -796,7 +887,7 @@ }; static unsigned char aureon71_eeprom[] __devinitdata = { - 0x2b, /* SYSCONF: clock 512, mpu401, spdif-in/ADC, 4DACs */ + 0x0b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ 0x80, /* ACLINK: I2S */ 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 0xc3, /* SPDIF: out-en, out-int, spdif-in */ @@ -812,7 +903,7 @@ }; static unsigned char prodigy71_eeprom[] __devinitdata = { - 0x2b, /* SYSCONF: clock 512, mpu401, spdif-in/ADC, 4DACs */ + 0x0b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ 0x80, /* ACLINK: I2S */ 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 0xc3, /* SPDIF: out-en, out-int, spdif-in */ @@ -837,6 +928,7 @@ .build_controls = aureon_add_controls, .eeprom_size = sizeof(aureon51_eeprom), .eeprom_data = aureon51_eeprom, + .driver = "Aureon51", }, { .subvendor = VT1724_SUBDEVICE_AUREON71_SPACE, @@ -846,6 +938,7 @@ .build_controls = aureon_add_controls, .eeprom_size = sizeof(aureon71_eeprom), .eeprom_data = aureon71_eeprom, + .driver = "Aureon71", }, { .subvendor = VT1724_SUBDEVICE_AUREON71_UNIVERSE, @@ -855,6 +948,7 @@ .build_controls = aureon_add_controls, .eeprom_size = sizeof(aureon71_eeprom), .eeprom_data = aureon71_eeprom, + .driver = "Aureon71", }, { .subvendor = VT1724_SUBDEVICE_PRODIGY71, @@ -864,6 +958,7 @@ .build_controls = aureon_add_controls, .eeprom_size = sizeof(prodigy71_eeprom), .eeprom_data = prodigy71_eeprom, + .driver = "Prodigy71", /* should be identical with Aureon71 */ }, { } /* terminator */ }; diff -Nru a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c --- a/sound/pci/ice1712/delta.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/ice1712/delta.c 2004-09-06 16:37:50 -07:00 @@ -126,7 +126,7 @@ /* sequential write */ static int ap_cs8427_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->bus->private_data, return -EIO); + ice1712_t *ice = device->bus->private_data; int res = count; unsigned char tmp; @@ -143,7 +143,7 @@ /* sequential read */ static int ap_cs8427_readbytes(snd_i2c_device_t *device, unsigned char *bytes, int count) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->bus->private_data, return -EIO); + ice1712_t *ice = device->bus->private_data; int res = count; unsigned char tmp; diff -Nru a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c --- a/sound/pci/ice1712/ews.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/ice1712/ews.c 2004-09-06 16:37:51 -07:00 @@ -45,7 +45,7 @@ /* send SDA and SCL */ static void ewx_i2c_setlines(snd_i2c_bus_t *bus, int clk, int data) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return); + ice1712_t *ice = bus->private_data; unsigned char tmp = 0; if (clk) tmp |= ICE1712_EWX2496_SERIAL_CLOCK; @@ -57,13 +57,13 @@ static int ewx_i2c_getclock(snd_i2c_bus_t *bus) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return -EIO); + ice1712_t *ice = bus->private_data; return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA) & ICE1712_EWX2496_SERIAL_CLOCK ? 1 : 0; } static int ewx_i2c_getdata(snd_i2c_bus_t *bus, int ack) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return -EIO); + ice1712_t *ice = bus->private_data; int bit; /* set RW pin to low */ snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ~ICE1712_EWX2496_RW); @@ -80,7 +80,7 @@ static void ewx_i2c_start(snd_i2c_bus_t *bus) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return); + ice1712_t *ice = bus->private_data; unsigned char mask; snd_ice1712_save_gpio_status(ice); @@ -99,13 +99,13 @@ static void ewx_i2c_stop(snd_i2c_bus_t *bus) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return); + ice1712_t *ice = bus->private_data; snd_ice1712_restore_gpio_status(ice); } static void ewx_i2c_direction(snd_i2c_bus_t *bus, int clock, int data) { - ice1712_t *ice = snd_magic_cast(ice1712_t, bus->private_data, return); + ice1712_t *ice = bus->private_data; unsigned char mask = 0; if (clock) @@ -223,6 +223,7 @@ switch (ice->eeprom.subvendor) { case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: snd_runtime_check(snd_i2c_sendbytes(ice->cs8404, &bits, 1) == 1, goto _error); break; case ICE1712_SUBDEVICE_EWS88D: @@ -410,6 +411,7 @@ break; case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: ice->num_total_dacs = 8; ice->num_total_adcs = 8; break; @@ -440,6 +442,7 @@ break; case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: if ((err = snd_i2c_device_create(ice->i2c, "CS8404", ICE1712_EWS88MT_CS8404_ADDR, &ice->cs8404)) < 0) return err; if ((err = snd_i2c_device_create(ice->i2c, "PCF8574 (1st)", ICE1712_EWS88MT_INPUT_ADDR, &ice->i2cdevs[0])) < 0) @@ -470,6 +473,7 @@ break; case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: case ICE1712_SUBDEVICE_EWS88D: /* set up CS8404 */ ice->spdif.ops.open = ews88_open_spdif; @@ -498,6 +502,7 @@ switch (ice->eeprom.subvendor) { case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: err = snd_ice1712_akm4xxx_init(ak, &akm_ews88mt, &akm_ews88mt_priv, ice); break; case ICE1712_SUBDEVICE_EWX2496: @@ -924,6 +929,7 @@ case ICE1712_SUBDEVICE_EWX2496: case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: case ICE1712_SUBDEVICE_DMX6FIRE: err = snd_ice1712_akm4xxx_build_controls(ice); if (err < 0) @@ -942,6 +948,7 @@ break; case ICE1712_SUBDEVICE_EWS88MT: case ICE1712_SUBDEVICE_EWS88MT_NEW: + case ICE1712_SUBDEVICE_PHASE88: err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_ews88mt_input_sense, ice)); if (err < 0) return err; @@ -988,6 +995,13 @@ .subvendor = ICE1712_SUBDEVICE_EWS88MT_NEW, .name = "TerraTec EWS88MT", .model = "ews88mt_new", + .chip_init = snd_ice1712_ews_init, + .build_controls = snd_ice1712_ews_add_controls, + }, + { + .subvendor = ICE1712_SUBDEVICE_PHASE88, + .name = "TerraTec Phase88", + .model = "phase88", .chip_init = snd_ice1712_ews_init, .build_controls = snd_ice1712_ews_add_controls, }, diff -Nru a/sound/pci/ice1712/ews.h b/sound/pci/ice1712/ews.h --- a/sound/pci/ice1712/ews.h 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/ice1712/ews.h 2004-09-06 16:37:54 -07:00 @@ -29,13 +29,15 @@ "{TerraTec,EWX 24/96},"\ "{TerraTec,EWS 88MT},"\ "{TerraTec,EWS 88D},"\ - "{TerraTec,DMX 6Fire}," + "{TerraTec,DMX 6Fire},"\ + "{TerraTec,Phase 88}," #define ICE1712_SUBDEVICE_EWX2496 0x3b153011 #define ICE1712_SUBDEVICE_EWS88MT 0x3b151511 #define ICE1712_SUBDEVICE_EWS88MT_NEW 0x3b152511 #define ICE1712_SUBDEVICE_EWS88D 0x3b152b11 #define ICE1712_SUBDEVICE_DMX6FIRE 0x3b153811 +#define ICE1712_SUBDEVICE_PHASE88 0x3b155111 /* entry point */ extern struct snd_ice1712_card_info snd_ice1712_ews_cards[]; diff -Nru a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c --- a/sound/pci/ice1712/ice1712.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/ice1712/ice1712.c 2004-09-06 16:37:51 -07:00 @@ -73,8 +73,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ICEnsemble ICE1712 (Envy24)"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{" +MODULE_SUPPORTED_DEVICE("{" HOONTECH_DEVICE_DESC DELTA_DEVICE_DESC EWS_DEVICE_DESC @@ -91,19 +90,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ICE1712 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ICE1712 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(omni, bool, boot_devs, 0444); MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support."); -MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); module_param_array(cs8427_timeout, int, boot_devs, 0444); 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"); module_param_array(model, charp, boot_devs, 0444); MODULE_PARM_DESC(model, "Use the given board model."); @@ -416,7 +410,7 @@ static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ice1712_t *ice = snd_magic_cast(ice1712_t, dev_id, return IRQ_NONE); + ice1712_t *ice = dev_id; unsigned char status; int handled = 0; @@ -590,7 +584,7 @@ rate = (runtime->rate * 8192) / 375; if (rate > 0x000fffff) rate = 0x000fffff; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); outb(0, ice->ddma_port + 15); outb(ICE1712_DMA_MODE_WRITE | ICE1712_DMA_AUTOINIT, ice->ddma_port + 0x0b); outl(runtime->dma_addr, ice->ddma_port + 0); @@ -603,7 +597,7 @@ snd_ice1712_write(ice, ICE1712_IREG_PBK_COUNT_HI, period_size >> 8); snd_ice1712_write(ice, ICE1712_IREG_PBK_LEFT, 0); snd_ice1712_write(ice, ICE1712_IREG_PBK_RIGHT, 0); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); return 0; } @@ -626,7 +620,7 @@ ice->playback_con_active_buf[substream->number] = 0; ice->playback_con_virt_addr[substream->number] = runtime->dma_addr; chn = substream->number * 2; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); snd_ice1712_ds_write(ice, chn, ICE1712_DSC_ADDR0, runtime->dma_addr); snd_ice1712_ds_write(ice, chn, ICE1712_DSC_COUNT0, period_size); snd_ice1712_ds_write(ice, chn, ICE1712_DSC_ADDR1, runtime->dma_addr + (runtime->periods > 1 ? period_size + 1 : 0)); @@ -638,7 +632,7 @@ snd_ice1712_ds_write(ice, chn + 1, ICE1712_DSC_RATE, rate); snd_ice1712_ds_write(ice, chn + 1, ICE1712_DSC_VOLUME, 0); } - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); return 0; } @@ -656,13 +650,13 @@ tmp &= ~0x04; if (runtime->channels == 2) tmp &= ~0x02; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); outl(ice->capture_con_virt_addr = runtime->dma_addr, ICEREG(ice, CONCAP_ADDR)); outw(buf_size, ICEREG(ice, CONCAP_COUNT)); snd_ice1712_write(ice, ICE1712_IREG_CAP_COUNT_HI, period_size >> 8); snd_ice1712_write(ice, ICE1712_IREG_CAP_COUNT_LO, period_size & 0xff); snd_ice1712_write(ice, ICE1712_IREG_CAP_CTRL, tmp); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); snd_ac97_set_rate(ice->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate); return 0; } @@ -874,7 +868,7 @@ static void snd_ice1712_pcm_free(snd_pcm_t *pcm) { - ice1712_t *ice = snd_magic_cast(ice1712_t, pcm->private_data, return); + ice1712_t *ice = pcm->private_data; ice->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -912,7 +906,7 @@ static void snd_ice1712_pcm_free_ds(snd_pcm_t *pcm) { - ice1712_t *ice = snd_magic_cast(ice1712_t, pcm->private_data, return); + ice1712_t *ice = pcm->private_data; ice->pcm_ds = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -952,10 +946,8 @@ static unsigned int rates[] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000 }; -#define RATES sizeof(rates) / sizeof(rates[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_rates = { - .count = RATES, + .count = ARRAY_SIZE(rates), .list = rates, .mask = 0, }; @@ -1077,11 +1069,11 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); ice->playback_pro_size = snd_pcm_lib_buffer_bytes(substream); - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); outl(substream->runtime->dma_addr, ICEMT(ice, PLAYBACK_ADDR)); outw((ice->playback_pro_size >> 2) - 1, ICEMT(ice, PLAYBACK_SIZE)); outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, PLAYBACK_COUNT)); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); return 0; } @@ -1100,11 +1092,11 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); ice->capture_pro_size = snd_pcm_lib_buffer_bytes(substream); - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); outl(substream->runtime->dma_addr, ICEMT(ice, CAPTURE_ADDR)); outw((ice->capture_pro_size >> 2) - 1, ICEMT(ice, CAPTURE_SIZE)); outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ICEMT(ice, CAPTURE_COUNT)); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); return 0; } @@ -1238,7 +1230,7 @@ static void snd_ice1712_pcm_profi_free(snd_pcm_t *pcm) { - ice1712_t *ice = snd_magic_cast(ice1712_t, pcm->private_data, return); + ice1712_t *ice = pcm->private_data; ice->pcm_pro = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1511,21 +1503,26 @@ static void snd_ice1712_mixer_free_ac97(ac97_t *ac97) { - ice1712_t *ice = snd_magic_cast(ice1712_t, ac97->private_data, return); + ice1712_t *ice = ac97->private_data; ice->ac97 = NULL; } static int __devinit snd_ice1712_ac97_mixer(ice1712_t * ice) { - int err; - ac97_t ac97; - ac97_bus_t bus, *pbus; + int err, bus_num = 0; + ac97_template_t ac97; + ac97_bus_t *pbus; + static ac97_bus_ops_t con_ops = { + .write = snd_ice1712_ac97_write, + .read = snd_ice1712_ac97_read, + }; + static ac97_bus_ops_t pro_ops = { + .write = snd_ice1712_pro_ac97_write, + .read = snd_ice1712_pro_ac97_read, + }; if (ice_has_con_ac97(ice)) { - memset(&bus, 0, sizeof(bus)); - bus.write = snd_ice1712_ac97_write; - bus.read = snd_ice1712_ac97_read; - if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(ice->card, bus_num++, &con_ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = ice; @@ -1540,10 +1537,7 @@ } if (! (ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) { - memset(&bus, 0, sizeof(bus)); - bus.write = snd_ice1712_pro_ac97_write; - bus.read = snd_ice1712_pro_ac97_read; - if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(ice->card, bus_num, &pro_ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = ice; @@ -1570,7 +1564,7 @@ static void snd_ice1712_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ice1712_t *ice = snd_magic_cast(ice1712_t, entry->private_data, return); + ice1712_t *ice = entry->private_data; unsigned int idx; snd_iprintf(buffer, "%s\n\n", ice->card->longname); @@ -2468,7 +2462,7 @@ static int snd_ice1712_free(ice1712_t *ice) { - if (ice->res_port == NULL) + if (! ice->port) goto __hw_end; /* mask all interrupts */ outb(0xc0, ICEMT(ice, IRQ)); @@ -2479,30 +2473,16 @@ synchronize_irq(ice->irq); free_irq(ice->irq, (void *) ice); } - if (ice->res_port) { - release_resource(ice->res_port); - kfree_nocheck(ice->res_port); - } - if (ice->res_ddma_port) { - release_resource(ice->res_ddma_port); - kfree_nocheck(ice->res_ddma_port); - } - if (ice->res_dmapath_port) { - release_resource(ice->res_dmapath_port); - kfree_nocheck(ice->res_dmapath_port); - } - if (ice->res_profi_port) { - release_resource(ice->res_profi_port); - kfree_nocheck(ice->res_profi_port); - } + if (ice->port) + pci_release_regions(ice->pci); snd_ice1712_akm4xxx_free(ice); - snd_magic_kfree(ice); + kfree(ice); return 0; } static int snd_ice1712_dev_free(snd_device_t *device) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->device_data, return -ENXIO); + ice1712_t *ice = device->device_data; return snd_ice1712_free(ice); } @@ -2531,7 +2511,7 @@ return -ENXIO; } - ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL); + ice = kcalloc(1, sizeof(*ice), GFP_KERNEL); if (ice == NULL) return -ENOMEM; ice->omni = omni ? 1 : 0; @@ -2555,36 +2535,21 @@ ice->card = card; ice->pci = pci; ice->irq = -1; - ice->port = pci_resource_start(pci, 0); - ice->ddma_port = pci_resource_start(pci, 1); - ice->dmapath_port = pci_resource_start(pci, 2); - ice->profi_port = pci_resource_start(pci, 3); pci_set_master(pci); pci_write_config_word(ice->pci, 0x40, 0x807f); pci_write_config_word(ice->pci, 0x42, 0x0006); snd_ice1712_proc_init(ice); synchronize_irq(pci->irq); - if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1); - snd_ice1712_free(ice); - return -EIO; - } - if ((ice->res_ddma_port = request_region(ice->ddma_port, 16, "ICE1712 - DDMA")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1); - snd_ice1712_free(ice); - return -EIO; - } - if ((ice->res_dmapath_port = request_region(ice->dmapath_port, 16, "ICE1712 - DMA path")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1); - snd_ice1712_free(ice); - return -EIO; - } - if ((ice->res_profi_port = request_region(ice->profi_port, 64, "ICE1712 - Professional")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1); - snd_ice1712_free(ice); - return -EIO; + if ((err = pci_request_regions(pci, "ICE1712")) < 0) { + kfree(ice); + return err; } + ice->port = pci_resource_start(pci, 0); + ice->ddma_port = pci_resource_start(pci, 1); + ice->dmapath_port = pci_resource_start(pci, 2); + ice->profi_port = pci_resource_start(pci, 3); + if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_ice1712_free(ice); diff -Nru a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h --- a/sound/pci/ice1712/ice1712.h 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/ice1712/ice1712.h 2004-09-06 16:37:50 -07:00 @@ -294,13 +294,9 @@ int irq; unsigned long port; - struct resource *res_port; unsigned long ddma_port; - struct resource *res_ddma_port; unsigned long dmapath_port; - struct resource *res_dmapath_port; unsigned long profi_port; - struct resource *res_profi_port; struct pci_dev *pci; snd_card_t *card; @@ -367,8 +363,6 @@ } gpio; struct semaphore gpio_mutex; }; - -#define chip_t ice1712_t /* diff -Nru a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c --- a/sound/pci/ice1712/ice1724.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/ice1712/ice1724.c 2004-09-06 16:37:52 -07:00 @@ -44,16 +44,19 @@ #include "amp.h" #include "revo.h" #include "aureon.h" +#include "vt1720_mobo.h" +#include "pontis.h" MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("VIA ICEnsemble ICE1724/1720 (Envy24HT/PT)"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{" +MODULE_SUPPORTED_DEVICE("{" REVO_DEVICE_DESC AMP_AUDIO2000_DEVICE_DESC AUREON_DEVICE_DESC + VT1720_MOBO_DEVICE_DESC + PONTIS_DEVICE_DESC "{VIA,VT1720}," "{VIA,VT1724}," "{ICEnsemble,Generic ICE1724}," @@ -68,13 +71,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for ICE1724 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for ICE1724 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable ICE1724 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(model, charp, boot_devs, 0444); MODULE_PARM_DESC(model, "Use the given board model."); @@ -190,21 +190,26 @@ static void snd_vt1724_set_gpio_mask(ice1712_t *ice, unsigned int data) { outw(data, ICEREG1724(ice, GPIO_WRITE_MASK)); - outb((data >> 16) & 0xff, ICEREG1724(ice, GPIO_WRITE_MASK_22)); + if (! ice->vt1720) /* VT1720 supports only 16 GPIO bits */ + outb((data >> 16) & 0xff, ICEREG1724(ice, GPIO_WRITE_MASK_22)); inw(ICEREG1724(ice, GPIO_WRITE_MASK)); /* dummy read for pci-posting */ } static void snd_vt1724_set_gpio_data(ice1712_t *ice, unsigned int data) { outw(data, ICEREG1724(ice, GPIO_DATA)); - outb(data >> 16, ICEREG1724(ice, GPIO_DATA_22)); + if (! ice->vt1720) + outb(data >> 16, ICEREG1724(ice, GPIO_DATA_22)); inw(ICEREG1724(ice, GPIO_DATA)); /* dummy read for pci-posting */ } static unsigned int snd_vt1724_get_gpio_data(ice1712_t *ice) { unsigned int data; - data = (unsigned int)inb(ICEREG1724(ice, GPIO_DATA_22)); + if (! ice->vt1720) + data = (unsigned int)inb(ICEREG1724(ice, GPIO_DATA_22)); + else + data = 0; data = (data << 16) | inw(ICEREG1724(ice, GPIO_DATA)); return data; } @@ -215,7 +220,7 @@ static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ice1712_t *ice = snd_magic_cast(ice1712_t, dev_id, return IRQ_NONE); + ice1712_t *ice = dev_id; unsigned char status; int handled = 0; @@ -230,7 +235,7 @@ if ((status & VT1724_IRQ_MPU_RX)||(status & VT1724_IRQ_MPU_TX)) { if (ice->rmidi[0]) snd_mpu401_uart_interrupt(irq, ice->rmidi[0]->private_data, regs); - outb(VT1724_IRQ_MPU_RX|VT1724_IRQ_MPU_TX, ICEREG1724(ice, IRQSTAT)); + outb(status & (VT1724_IRQ_MPU_RX|VT1724_IRQ_MPU_TX), ICEREG1724(ice, IRQSTAT)); status &= ~(VT1724_IRQ_MPU_RX|VT1724_IRQ_MPU_TX); } if (status & VT1724_IRQ_MTPCM) { @@ -317,6 +322,13 @@ .mask = 0, }; +struct vt1724_pcm_reg { + unsigned int addr; /* ADDR register offset */ + unsigned int size; /* SIZE register offset */ + unsigned int count; /* COUNT register offset */ + unsigned int start; /* start & pause bit */ +}; + static int snd_vt1724_pcm_trigger(snd_pcm_substream_t *substream, int cmd) { ice1712_t *ice = snd_pcm_substream_chip(substream); @@ -327,8 +339,10 @@ what = 0; snd_pcm_group_for_each(pos, substream) { + struct vt1724_pcm_reg *reg; s = snd_pcm_group_substream_entry(pos); - what |= (unsigned long)(s->runtime->private_data); + reg = s->runtime->private_data; + what |= reg->start; snd_pcm_trigger_done(s, substream); } @@ -371,12 +385,26 @@ #define DMA_PAUSES (VT1724_RDMA0_PAUSE|VT1724_PDMA0_PAUSE|VT1724_RDMA1_PAUSE|\ VT1724_PDMA1_PAUSE|VT1724_PDMA2_PAUSE|VT1724_PDMA3_PAUSE|VT1724_PDMA4_PAUSE) +static int get_max_rate(ice1712_t *ice) +{ + if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { + if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720) + return 192000; + else + return 96000; + } else + return 48000; +} + static void snd_vt1724_set_pro_rate(ice1712_t *ice, unsigned int rate, int force) { unsigned long flags; unsigned char val, old; unsigned int i; + if (rate > get_max_rate(ice)) + return; + spin_lock_irqsave(&ice->reg_lock, flags); if ((inb(ICEMT1724(ice, DMA_CONTROL)) & DMA_STARTS) || (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) { @@ -410,8 +438,10 @@ val = 0; break; } - outb(val, ICEMT1724(ice, RATE)); - if (rate == ice->cur_rate) { + old = inb(ICEMT1724(ice, RATE)); + if (old != val) + outb(val, ICEMT1724(ice, RATE)); + else if (rate == ice->cur_rate) { spin_unlock_irqrestore(&ice->reg_lock, flags); return; } @@ -419,7 +449,7 @@ ice->cur_rate = rate; /* check MT02 */ - if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) { + if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { val = old = inb(ICEMT1724(ice, I2S_FORMAT)); if (rate > 96000) val |= VT1724_MT_I2S_MCLK_128X; /* 128x MCLK */ @@ -446,15 +476,6 @@ if (ice->akm[i].ops.set_rate_val) ice->akm[i].ops.set_rate_val(&ice->akm[i], rate); } - - /* set up AC97 registers if needed */ - if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) && ice->ac97) { - snd_ac97_set_rate(ice->ac97, AC97_PCM_FRONT_DAC_RATE, rate); - snd_ac97_set_rate(ice->ac97, AC97_PCM_SURR_DAC_RATE, rate); - snd_ac97_set_rate(ice->ac97, AC97_PCM_LFE_DAC_RATE, rate); - snd_ac97_set_rate(ice->ac97, AC97_SPDIF, rate); - snd_ac97_set_rate(ice->ac97, AC97_PCM_LR_ADC_RATE, rate); - } } static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream, @@ -518,7 +539,7 @@ unsigned char val; unsigned int size; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); val = (8 - substream->runtime->channels) >> 1; outb(val, ICEMT1724(ice, BURST)); @@ -533,7 +554,7 @@ outw(size, ICEMT1724(ice, PLAYBACK_COUNT)); outb(size >> 16, ICEMT1724(ice, PLAYBACK_COUNT) + 2); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); // printk("pro prepare: ch = %d, addr = 0x%x, buffer = 0x%x, period = 0x%x\n", substream->runtime->channels, (unsigned int)substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), snd_pcm_lib_period_bytes(substream)); return 0; @@ -562,7 +583,9 @@ ptr = inl(ICEMT1724(ice, PLAYBACK_SIZE)) & 0xffffff; ptr = (ptr + 1) << 2; ptr = bytes_to_frames(substream->runtime, ptr); - if (ptr <= substream->runtime->buffer_size) + if (! ptr) + ; + else if (ptr <= substream->runtime->buffer_size) ptr = substream->runtime->buffer_size - ptr; else { snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); @@ -572,29 +595,23 @@ return ptr; } -struct vt1724_pcm_reg { - unsigned int addr; /* ADDR register offset */ - unsigned int size; /* SIZE register offset */ - unsigned int count; /* COUNT register offset */ - unsigned int start; /* start bit */ - unsigned int pause; /* pause bit */ -}; - -static int snd_vt1724_pcm_prepare(snd_pcm_substream_t *substream, const struct vt1724_pcm_reg *reg) +static int snd_vt1724_pcm_prepare(snd_pcm_substream_t *substream) { ice1712_t *ice = snd_pcm_substream_chip(substream); + struct vt1724_pcm_reg *reg = substream->runtime->private_data; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); outl(substream->runtime->dma_addr, ice->profi_port + reg->addr); outw((snd_pcm_lib_buffer_bytes(substream) >> 2) - 1, ice->profi_port + reg->size); outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ice->profi_port + reg->count); - spin_unlock(&ice->reg_lock); + spin_unlock_irq(&ice->reg_lock); return 0; } -static snd_pcm_uframes_t snd_vt1724_pcm_pointer(snd_pcm_substream_t *substream, const struct vt1724_pcm_reg *reg) +static snd_pcm_uframes_t snd_vt1724_pcm_pointer(snd_pcm_substream_t *substream) { ice1712_t *ice = snd_pcm_substream_chip(substream); + struct vt1724_pcm_reg *reg = substream->runtime->private_data; size_t ptr; if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & reg->start)) @@ -607,7 +624,9 @@ ptr = inw(ice->profi_port + reg->size); ptr = (ptr + 1) << 2; ptr = bytes_to_frames(substream->runtime, ptr); - if (ptr <= substream->runtime->buffer_size) + if (! ptr) + ; + else if (ptr <= substream->runtime->buffer_size) ptr = substream->runtime->buffer_size - ptr; else { snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); @@ -617,24 +636,20 @@ #endif } -const static struct vt1724_pcm_reg vt1724_capture_pro_reg = { +static struct vt1724_pcm_reg vt1724_playback_pro_reg = { + .addr = VT1724_MT_PLAYBACK_ADDR, + .size = VT1724_MT_PLAYBACK_SIZE, + .count = VT1724_MT_PLAYBACK_COUNT, + .start = VT1724_PDMA0_START, +}; + +static struct vt1724_pcm_reg vt1724_capture_pro_reg = { .addr = VT1724_MT_CAPTURE_ADDR, .size = VT1724_MT_CAPTURE_SIZE, .count = VT1724_MT_CAPTURE_COUNT, .start = VT1724_RDMA0_START, - .pause = VT1724_RDMA0_PAUSE, }; -static int snd_vt1724_capture_pro_prepare(snd_pcm_substream_t * substream) -{ - return snd_vt1724_pcm_prepare(substream, &vt1724_capture_pro_reg); -} - -static snd_pcm_uframes_t snd_vt1724_capture_pro_pointer(snd_pcm_substream_t * substream) -{ - return snd_vt1724_pcm_pointer(substream, &vt1724_capture_pro_reg); -} - static snd_pcm_hardware_t snd_vt1724_playback_pro = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | @@ -698,9 +713,10 @@ static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - if (ice->eeprom.data[ICE_EEP2_ACLINK] & 0x80) { + if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { /* I2S */ - if (ice->eeprom.data[ICE_EEP2_I2S] & 0x08) + /* VT1720 doesn't support more than 96kHz */ + if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720) return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192); else { runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000; @@ -709,25 +725,14 @@ } } else if (ice->ac97) { /* ACLINK */ - int ratec; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - ratec = AC97_RATES_FRONT_DAC; - else - ratec = AC97_RATES_ADC; - runtime->hw.rates = ice->ac97->rates[ratec]; runtime->hw.rate_max = 48000; - if (runtime->hw.rates == SNDRV_PCM_RATE_48000) { - runtime->hw.rate_min = 48000; - return 0; - } else { - runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000; - return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_48); - } + runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000; + return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_48); } return 0; } -/* multi-channel playback needs alignment 8x32bit regarless of the channels +/* multi-channel playback needs alignment 8x32bit regardless of the channels * actually used */ #define VT1724_BUFFER_ALIGN 0x20 @@ -738,7 +743,7 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); int chs; - runtime->private_data = (void*)VT1724_PDMA0_START; /* irq/status/trigger bit */ + runtime->private_data = &vt1724_playback_pro_reg; ice->playback_pro_substream = substream; runtime->hw = snd_vt1724_playback_pro; snd_pcm_set_sync(substream); @@ -767,12 +772,16 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - runtime->private_data = (void*)VT1724_RDMA0_START; /* irq/status/trigger bit */ + runtime->private_data = &vt1724_capture_pro_reg; ice->capture_pro_substream = substream; runtime->hw = snd_vt1724_2ch_stereo; snd_pcm_set_sync(substream); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); set_rate_constraints(ice, substream); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + VT1724_BUFFER_ALIGN); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + VT1724_BUFFER_ALIGN); return 0; } @@ -814,9 +823,9 @@ .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_vt1724_pcm_hw_params, .hw_free = snd_vt1724_pcm_hw_free, - .prepare = snd_vt1724_capture_pro_prepare, + .prepare = snd_vt1724_pcm_prepare, .trigger = snd_vt1724_pcm_trigger, - .pointer = snd_vt1724_capture_pro_pointer, + .pointer = snd_vt1724_pcm_pointer, }; static int __devinit snd_vt1724_pcm_profi(ice1712_t * ice, int device) @@ -848,40 +857,60 @@ * SPDIF PCM */ -const static struct vt1724_pcm_reg vt1724_playback_spdif_reg = { +static struct vt1724_pcm_reg vt1724_playback_spdif_reg = { .addr = VT1724_MT_PDMA4_ADDR, .size = VT1724_MT_PDMA4_SIZE, .count = VT1724_MT_PDMA4_COUNT, .start = VT1724_PDMA4_START, - .pause = VT1724_PDMA4_PAUSE, }; -const static struct vt1724_pcm_reg vt1724_capture_spdif_reg = { +static struct vt1724_pcm_reg vt1724_capture_spdif_reg = { .addr = VT1724_MT_RDMA1_ADDR, .size = VT1724_MT_RDMA1_SIZE, .count = VT1724_MT_RDMA1_COUNT, .start = VT1724_RDMA1_START, - .pause = VT1724_RDMA1_PAUSE, }; -static int snd_vt1724_playback_spdif_prepare(snd_pcm_substream_t * substream) +/* update spdif control bits; call with reg_lock */ +static void update_spdif_bits(ice1712_t *ice, unsigned int val) { - return snd_vt1724_pcm_prepare(substream, &vt1724_playback_spdif_reg); -} + unsigned char cbit, disabled; -static snd_pcm_uframes_t snd_vt1724_playback_spdif_pointer(snd_pcm_substream_t * substream) -{ - return snd_vt1724_pcm_pointer(substream, &vt1724_playback_spdif_reg); + cbit = inb(ICEREG1724(ice, SPDIF_CFG)); + disabled = cbit & ~VT1724_CFG_SPDIF_OUT_EN; + if (cbit != disabled) + outb(disabled, ICEREG1724(ice, SPDIF_CFG)); + outw(val, ICEMT1724(ice, SPDIF_CTRL)); + if (cbit != disabled) + outb(cbit, ICEREG1724(ice, SPDIF_CFG)); + outw(val, ICEMT1724(ice, SPDIF_CTRL)); } -static int snd_vt1724_capture_spdif_prepare(snd_pcm_substream_t * substream) +/* update SPDIF control bits according to the given rate */ +static void update_spdif_rate(ice1712_t *ice, unsigned int rate) { - return snd_vt1724_pcm_prepare(substream, &vt1724_capture_spdif_reg); + unsigned int val, nval; + unsigned long flags; + + spin_lock_irqsave(&ice->reg_lock, flags); + nval = val = inw(ICEMT1724(ice, SPDIF_CTRL)); + nval &= ~(7 << 12); + switch (rate) { + case 44100: break; + case 48000: nval |= 2 << 12; break; + case 32000: nval |= 3 << 12; break; + } + if (val != nval) + update_spdif_bits(ice, nval); + spin_unlock_irqrestore(&ice->reg_lock, flags); } -static snd_pcm_uframes_t snd_vt1724_capture_spdif_pointer(snd_pcm_substream_t * substream) +static int snd_vt1724_playback_spdif_prepare(snd_pcm_substream_t * substream) { - return snd_vt1724_pcm_pointer(substream, &vt1724_capture_spdif_reg); + ice1712_t *ice = snd_pcm_substream_chip(substream); + if (! ice->force_pdma4) + update_spdif_rate(ice, substream->runtime->rate); + return snd_vt1724_pcm_prepare(substream); } static int snd_vt1724_playback_spdif_open(snd_pcm_substream_t *substream) @@ -889,7 +918,7 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - runtime->private_data = (void*)VT1724_PDMA4_START; /* irq/status/trigger bit */ + runtime->private_data = &vt1724_playback_spdif_reg; ice->playback_con_substream = substream; if (ice->force_pdma4) { runtime->hw = snd_vt1724_2ch_stereo; @@ -898,6 +927,10 @@ runtime->hw = snd_vt1724_spdif; snd_pcm_set_sync(substream); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + VT1724_BUFFER_ALIGN); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + VT1724_BUFFER_ALIGN); return 0; } @@ -917,7 +950,7 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - runtime->private_data = (void*)VT1724_RDMA1_START; /* irq/status/trigger bit */ + runtime->private_data = &vt1724_capture_spdif_reg; ice->capture_con_substream = substream; if (ice->force_rdma1) { runtime->hw = snd_vt1724_2ch_stereo; @@ -926,6 +959,10 @@ runtime->hw = snd_vt1724_spdif; snd_pcm_set_sync(substream); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + VT1724_BUFFER_ALIGN); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + VT1724_BUFFER_ALIGN); return 0; } @@ -948,7 +985,7 @@ .hw_free = snd_vt1724_pcm_hw_free, .prepare = snd_vt1724_playback_spdif_prepare, .trigger = snd_vt1724_pcm_trigger, - .pointer = snd_vt1724_playback_spdif_pointer, + .pointer = snd_vt1724_pcm_pointer, }; static snd_pcm_ops_t snd_vt1724_capture_spdif_ops = { @@ -957,9 +994,9 @@ .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_vt1724_pcm_hw_params, .hw_free = snd_vt1724_pcm_hw_free, - .prepare = snd_vt1724_capture_spdif_prepare, + .prepare = snd_vt1724_pcm_prepare, .trigger = snd_vt1724_pcm_trigger, - .pointer = snd_vt1724_capture_spdif_pointer, + .pointer = snd_vt1724_pcm_pointer, }; @@ -1017,27 +1054,24 @@ * independent surround PCMs */ -const static struct vt1724_pcm_reg vt1724_playback_dma_regs[3] = { +static struct vt1724_pcm_reg vt1724_playback_dma_regs[3] = { { .addr = VT1724_MT_PDMA1_ADDR, .size = VT1724_MT_PDMA1_SIZE, .count = VT1724_MT_PDMA1_COUNT, .start = VT1724_PDMA1_START, - .pause = VT1724_PDMA1_PAUSE, }, { .addr = VT1724_MT_PDMA2_ADDR, .size = VT1724_MT_PDMA2_SIZE, .count = VT1724_MT_PDMA2_COUNT, .start = VT1724_PDMA2_START, - .pause = VT1724_PDMA2_PAUSE, }, { .addr = VT1724_MT_PDMA3_ADDR, .size = VT1724_MT_PDMA3_SIZE, .count = VT1724_MT_PDMA3_COUNT, .start = VT1724_PDMA3_START, - .pause = VT1724_PDMA3_PAUSE, }, }; @@ -1046,17 +1080,12 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); unsigned char val; - spin_lock(&ice->reg_lock); + spin_lock_irq(&ice->reg_lock); val = 3 - substream->number; if (inb(ICEMT1724(ice, BURST)) < val) outb(val, ICEMT1724(ice, BURST)); - spin_unlock(&ice->reg_lock); - return snd_vt1724_pcm_prepare(substream, &vt1724_playback_dma_regs[substream->number]); -} - -static snd_pcm_uframes_t snd_vt1724_playback_indep_pointer(snd_pcm_substream_t * substream) -{ - return snd_vt1724_pcm_pointer(substream, &vt1724_playback_dma_regs[substream->number]); + spin_unlock_irq(&ice->reg_lock); + return snd_vt1724_pcm_prepare(substream); } static int snd_vt1724_playback_indep_open(snd_pcm_substream_t *substream) @@ -1071,7 +1100,7 @@ return -EBUSY; /* FIXME: should handle blocking mode properly */ } up(&ice->open_mutex); - runtime->private_data = (void*)(1UL << (substream->number + 4)); + runtime->private_data = &vt1724_playback_dma_regs[substream->number]; ice->playback_con_substream_ds[substream->number] = substream; runtime->hw = snd_vt1724_2ch_stereo; snd_pcm_set_sync(substream); @@ -1100,7 +1129,7 @@ .hw_free = snd_vt1724_pcm_hw_free, .prepare = snd_vt1724_playback_indep_prepare, .trigger = snd_vt1724_pcm_trigger, - .pointer = snd_vt1724_playback_indep_pointer, + .pointer = snd_vt1724_pcm_pointer, }; @@ -1143,17 +1172,19 @@ int err; if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; + static ac97_bus_ops_t ops = { + .write = snd_vt1724_ac97_write, + .read = snd_vt1724_ac97_read, + }; + /* cold reset */ outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD)); mdelay(5); /* FIXME */ outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD)); - memset(&bus, 0, sizeof(bus)); - bus.write = snd_vt1724_ac97_write; - bus.read = snd_vt1724_ac97_read; - if ((err = snd_ac97_bus(ice->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(ice->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = ice; @@ -1181,7 +1212,7 @@ static void snd_vt1724_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ice1712_t *ice = snd_magic_cast(ice1712_t, entry->private_data, return); + ice1712_t *ice = entry->private_data; unsigned int idx; snd_iprintf(buffer, "%s\n\n", ice->card->longname); @@ -1274,7 +1305,7 @@ } } else { /* consumer */ - val |= diga->status[0] & 0x04; /* copyright */ + val |= diga->status[1] & 0x04; /* copyright */ if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS)== IEC958_AES0_CON_EMPHASIS_5015) val |= 1U << 3; val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */ @@ -1326,22 +1357,13 @@ { ice1712_t *ice = snd_kcontrol_chip(kcontrol); unsigned int val, old; - unsigned long flags; val = encode_spdif_bits(&ucontrol->value.iec958); - spin_lock_irqsave(&ice->reg_lock, flags); + spin_lock_irq(&ice->reg_lock); old = inw(ICEMT1724(ice, SPDIF_CTRL)); - if (val != old) { - unsigned char cbit, disabled; - cbit = inb(ICEREG1724(ice, SPDIF_CFG)); - disabled = cbit & ~VT1724_CFG_SPDIF_OUT_EN; - if (cbit != disabled) - outb(disabled, ICEREG1724(ice, SPDIF_CFG)); - outw(val, ICEMT1724(ice, SPDIF_CTRL)); - if (cbit != disabled) - outb(cbit, ICEREG1724(ice, SPDIF_CFG)); - } - spin_unlock_irqrestore(&ice->reg_lock, flags); + if (val != old) + update_spdif_bits(ice, val); + spin_unlock_irq(&ice->reg_lock); return (val != old); } @@ -1415,15 +1437,15 @@ { ice1712_t *ice = snd_kcontrol_chip(kcontrol); unsigned char old, val; - unsigned long flags; - spin_lock_irqsave(&ice->reg_lock, flags); + + spin_lock_irq(&ice->reg_lock); old = val = inb(ICEREG1724(ice, SPDIF_CFG)); val &= ~VT1724_CFG_SPDIF_OUT_EN; if (ucontrol->value.integer.value[0]) val |= VT1724_CFG_SPDIF_OUT_EN; if (old != val) outb(val, ICEREG1724(ice, SPDIF_CFG)); - spin_unlock_irqrestore(&ice->reg_lock, flags); + spin_unlock_irq(&ice->reg_lock); return old != val; } @@ -1490,7 +1512,7 @@ */ static int snd_vt1724_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { - static char *texts[] = { + static char *texts_1724[] = { "8000", /* 0: 6 */ "9600", /* 1: 3 */ "11025", /* 2: 10 */ @@ -1508,12 +1530,32 @@ "192000", /* 14: 14 */ "IEC958 Input", /* 15: -- */ }; + static char *texts_1720[] = { + "8000", /* 0: 6 */ + "9600", /* 1: 3 */ + "11025", /* 2: 10 */ + "12000", /* 3: 2 */ + "16000", /* 4: 5 */ + "22050", /* 5: 9 */ + "24000", /* 6: 1 */ + "32000", /* 7: 4 */ + "44100", /* 8: 8 */ + "48000", /* 9: 0 */ + "64000", /* 10: 15 */ + "88200", /* 11: 11 */ + "96000", /* 12: 7 */ + "IEC958 Input", /* 13: -- */ + }; + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; - uinfo->value.enumerated.items = 16; + uinfo->value.enumerated.items = ice->vt1720 ? 14 : 16; if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); + strcpy(uinfo->value.enumerated.name, + ice->vt1720 ? texts_1720[uinfo->value.enumerated.item] : + texts_1724[uinfo->value.enumerated.item]); return 0; } @@ -1527,7 +1569,7 @@ spin_lock_irq(&ice->reg_lock); if (is_spdif_master(ice)) { - ucontrol->value.enumerated.item[0] = 15; + ucontrol->value.enumerated.item[0] = ice->vt1720 ? 13 : 15; } else { val = xlate[inb(ICEMT1724(ice, RATE)) & 15]; if (val == 255) { @@ -1544,17 +1586,22 @@ { ice1712_t *ice = snd_kcontrol_chip(kcontrol); unsigned char oval; + int rate; int change = 0; + int spdif = ice->vt1720 ? 13 : 15; spin_lock_irq(&ice->reg_lock); oval = inb(ICEMT1724(ice, RATE)); - if (ucontrol->value.enumerated.item[0] == 15) { + if (ucontrol->value.enumerated.item[0] == spdif) { outb(oval | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE)); } else { - PRO_RATE_DEFAULT = rates[ucontrol->value.integer.value[0] % 15]; - spin_unlock_irq(&ice->reg_lock); - snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 1); - spin_lock_irq(&ice->reg_lock); + rate = rates[ucontrol->value.integer.value[0] % 15]; + if (rate <= get_max_rate(ice)) { + PRO_RATE_DEFAULT = rate; + spin_unlock_irq(&ice->reg_lock); + snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 1); + spin_lock_irq(&ice->reg_lock); + } } change = inb(ICEMT1724(ice, RATE)) != oval; spin_unlock_irq(&ice->reg_lock); @@ -1815,6 +1862,8 @@ snd_vt1724_revo_cards, snd_vt1724_amp_cards, snd_vt1724_aureon_cards, + snd_vt1720_mobo_cards, + snd_vt1720_pontis_cards, NULL, }; @@ -1822,24 +1871,28 @@ /* */ -unsigned char snd_vt1724_read_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr) +static void wait_i2c_busy(ice1712_t *ice) { - long t = 0x10000; + int t = 0x10000; + while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--) + ; +} +unsigned char snd_vt1724_read_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr) +{ outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR)); outb(dev & ~VT1724_I2C_WRITE, ICEREG1724(ice, I2C_DEV_ADDR)); - while (t-- > 0 && (inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY)) ; + wait_i2c_busy(ice); return inb(ICEREG1724(ice, I2C_DATA)); } void snd_vt1724_write_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr, unsigned char data) { - long t = 0x10000; - + wait_i2c_busy(ice); outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR)); outb(data, ICEREG1724(ice, I2C_DATA)); outb(dev | VT1724_I2C_WRITE, ICEREG1724(ice, I2C_DEV_ADDR)); - while (t-- > 0 && (inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY)) ; + wait_i2c_busy(ice); } static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelname) @@ -1930,9 +1983,6 @@ outb(0, ICEREG1724(ice, POWERDOWN)); - /* read back to check the availability of SPDIF out */ - ice->eeprom.data[ICE_EEP2_SPDIF] = inb(ICEREG1724(ice, SPDIF_CFG)); - return 0; } @@ -1994,10 +2044,9 @@ if (ice->num_total_dacs > 0) { snd_kcontrol_new_t tmp = snd_vt1724_mixer_pro_analog_route; - if (ice->vt1720) + tmp.count = ice->num_total_dacs; + if (ice->vt1720 && tmp.count > 2) tmp.count = 2; - else - tmp.count = ice->num_total_dacs; err = snd_ctl_add(ice->card, snd_ctl_new1(&tmp, ice)); if (err < 0) return err; @@ -2012,7 +2061,7 @@ static int snd_vt1724_free(ice1712_t *ice) { - if (ice->res_port == NULL) + if (! ice->port) goto __hw_end; /* mask all interrupts */ outb(0xff, ICEMT1724(ice, DMA_INT_MASK)); @@ -2023,22 +2072,15 @@ synchronize_irq(ice->irq); free_irq(ice->irq, (void *) ice); } - if (ice->res_port) { - release_resource(ice->res_port); - kfree_nocheck(ice->res_port); - } - if (ice->res_profi_port) { - release_resource(ice->res_profi_port); - kfree_nocheck(ice->res_profi_port); - } + pci_release_regions(ice->pci); snd_ice1712_akm4xxx_free(ice); - snd_magic_kfree(ice); + kfree(ice); return 0; } static int snd_vt1724_dev_free(snd_device_t *device) { - ice1712_t *ice = snd_magic_cast(ice1712_t, device->device_data, return -ENXIO); + ice1712_t *ice = device->device_data; return snd_vt1724_free(ice); } @@ -2060,7 +2102,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - ice = snd_magic_kcalloc(ice1712_t, 0, GFP_KERNEL); + ice = kcalloc(1, sizeof(*ice), GFP_KERNEL); if (ice == NULL) return -ENOMEM; ice->vt1724 = 1; @@ -2074,24 +2116,17 @@ ice->card = card; ice->pci = pci; ice->irq = -1; - ice->port = pci_resource_start(pci, 0); - ice->profi_port = pci_resource_start(pci, 1); pci_set_master(pci); snd_vt1724_proc_init(ice); synchronize_irq(pci->irq); - if ((ice->res_port = request_region(ice->port, 32, "ICE1724 - Controller")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1); - snd_vt1724_free(ice); - return -EIO; + if ((err = pci_request_regions(pci, "ICE1724")) < 0) { + kfree(ice); + return err; } + ice->port = pci_resource_start(pci, 0); + ice->profi_port = pci_resource_start(pci, 1); - if ((ice->res_profi_port = request_region(ice->profi_port, 128, "ICE1724 - Professional")) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1); - snd_vt1724_free(ice); - return -EIO; - } - if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_vt1724_free(ice); diff -Nru a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/ice1712/pontis.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,849 @@ +/* + * ALSA driver for ICEnsemble VT1724 (Envy24HT) + * + * Lowlevel functions for Pontis MS300 + * + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ice1712.h" +#include "envy24ht.h" +#include "pontis.h" + +/* I2C addresses */ +#define WM_DEV 0x34 +#define CS_DEV 0x20 + +/* WM8776 registers */ +#define WM_HP_ATTEN_L 0x00 /* headphone left attenuation */ +#define WM_HP_ATTEN_R 0x01 /* headphone left attenuation */ +#define WM_HP_MASTER 0x02 /* headphone master (both channels), override LLR */ +#define WM_DAC_ATTEN_L 0x03 /* digital left attenuation */ +#define WM_DAC_ATTEN_R 0x04 +#define WM_DAC_MASTER 0x05 +#define WM_PHASE_SWAP 0x06 /* DAC phase swap */ +#define WM_DAC_CTRL1 0x07 +#define WM_DAC_MUTE 0x08 +#define WM_DAC_CTRL2 0x09 +#define WM_DAC_INT 0x0a +#define WM_ADC_INT 0x0b +#define WM_MASTER_CTRL 0x0c +#define WM_POWERDOWN 0x0d +#define WM_ADC_ATTEN_L 0x0e +#define WM_ADC_ATTEN_R 0x0f +#define WM_ALC_CTRL1 0x10 +#define WM_ALC_CTRL2 0x11 +#define WM_ALC_CTRL3 0x12 +#define WM_NOISE_GATE 0x13 +#define WM_LIMITER 0x14 +#define WM_ADC_MUX 0x15 +#define WM_OUT_MUX 0x16 +#define WM_RESET 0x17 + +/* + * GPIO + */ +#define PONTIS_CS_CS (1<<4) /* CS */ +#define PONTIS_CS_CLK (1<<5) /* CLK */ +#define PONTIS_CS_RDATA (1<<6) /* CS8416 -> VT1720 */ +#define PONTIS_CS_WDATA (1<<7) /* VT1720 -> CS8416 */ + + +/* + * get the current register value of WM codec + */ +static unsigned short wm_get(ice1712_t *ice, int reg) +{ + reg <<= 1; + return ((unsigned short)ice->akm[0].images[reg] << 8) | + ice->akm[0].images[reg + 1]; +} + +/* + * set the register value of WM codec and remember it + */ +static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val) +{ + unsigned short cval; + cval = (reg << 9) | val; + snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); +} + +static void wm_put(ice1712_t *ice, int reg, unsigned short val) +{ + wm_put_nocache(ice, reg, val); + reg <<= 1; + ice->akm[0].images[reg] = val >> 8; + ice->akm[0].images[reg + 1] = val; +} + +/* + * DAC volume attenuation mixer control (-64dB to 0dB) + */ + +#define DAC_0dB 0xff +#define DAC_RES 128 +#define DAC_MIN (DAC_0dB - DAC_RES) + +static int wm_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; /* mute */ + uinfo->value.integer.max = DAC_RES; /* 0dB, 0.5dB step */ + return 0; +} + +static int wm_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short val; + int i; + + down(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + val = wm_get(ice, WM_DAC_ATTEN_L + i) & 0xff; + val = val > DAC_MIN ? (val - DAC_MIN) : 0; + ucontrol->value.integer.value[i] = val; + } + up(&ice->gpio_mutex); + return 0; +} + +static int wm_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short oval, nval; + int i, idx, change = 0; + + down(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + nval = ucontrol->value.integer.value[i]; + nval = (nval ? (nval + DAC_MIN) : 0) & 0xff; + idx = WM_DAC_ATTEN_L + i; + oval = wm_get(ice, idx) & 0xff; + if (oval != nval) { + wm_put(ice, idx, nval); + wm_put_nocache(ice, idx, nval | 0x100); + change = 1; + } + } + up(&ice->gpio_mutex); + return change; +} + +/* + * ADC gain mixer control (-64dB to 0dB) + */ + +#define ADC_0dB 0xcf +#define ADC_RES 128 +#define ADC_MIN (ADC_0dB - ADC_RES) + +static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; /* mute (-64dB) */ + uinfo->value.integer.max = ADC_RES; /* 0dB, 0.5dB step */ + return 0; +} + +static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short val; + int i; + + down(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + val = wm_get(ice, WM_ADC_ATTEN_L + i) & 0xff; + val = val > ADC_MIN ? (val - ADC_MIN) : 0; + ucontrol->value.integer.value[i] = val; + } + up(&ice->gpio_mutex); + return 0; +} + +static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short ovol, nvol; + int i, idx, change = 0; + + down(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + nvol = ucontrol->value.integer.value[i]; + nvol = nvol ? (nvol + ADC_MIN) : 0; + idx = WM_ADC_ATTEN_L + i; + ovol = wm_get(ice, idx) & 0xff; + if (ovol != nvol) { + wm_put(ice, idx, nvol); + change = 1; + } + } + up(&ice->gpio_mutex); + return change; +} + +/* + * ADC input mux mixer control + */ +static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} + +static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + int bit = kcontrol->private_value; + + down(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = (wm_get(ice, WM_ADC_MUX) & (1 << bit)) ? 1 : 0; + up(&ice->gpio_mutex); + return 0; +} + +static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + int bit = kcontrol->private_value; + unsigned short oval, nval; + int change; + + down(&ice->gpio_mutex); + nval = oval = wm_get(ice, WM_ADC_MUX); + if (ucontrol->value.integer.value[0]) + nval |= (1 << bit); + else + nval &= ~(1 << bit); + change = nval != oval; + if (change) { + wm_put(ice, WM_ADC_MUX, nval); + } + up(&ice->gpio_mutex); + return 0; +} + +/* + * Analog bypass (In -> Out) + */ +static int wm_bypass_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} + +static int wm_bypass_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + + down(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0; + up(&ice->gpio_mutex); + return 0; +} + +static int wm_bypass_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short val, oval; + int change = 0; + + down(&ice->gpio_mutex); + val = oval = wm_get(ice, WM_OUT_MUX); + if (ucontrol->value.integer.value[0]) + val |= 0x04; + else + val &= ~0x04; + if (val != oval) { + wm_put(ice, WM_OUT_MUX, val); + change = 1; + } + up(&ice->gpio_mutex); + return change; +} + +/* + * Left/Right swap + */ +static int wm_chswap_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} + +static int wm_chswap_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + + down(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90; + up(&ice->gpio_mutex); + return 0; +} + +static int wm_chswap_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned short val, oval; + int change = 0; + + down(&ice->gpio_mutex); + oval = wm_get(ice, WM_DAC_CTRL1); + val = oval & 0x0f; + if (ucontrol->value.integer.value[0]) + val |= 0x60; + else + val |= 0x90; + if (val != oval) { + wm_put(ice, WM_DAC_CTRL1, val); + wm_put_nocache(ice, WM_DAC_CTRL1, val); + change = 1; + } + up(&ice->gpio_mutex); + return change; +} + +/* + * write data in the SPI mode + */ +static void set_gpio_bit(ice1712_t *ice, unsigned int bit, int val) +{ + unsigned int tmp = snd_ice1712_gpio_read(ice); + if (val) + tmp |= bit; + else + tmp &= ~bit; + snd_ice1712_gpio_write(ice, tmp); +} + +static void spi_send_byte(ice1712_t *ice, unsigned char data) +{ + int i; + for (i = 0; i < 8; i++) { + set_gpio_bit(ice, PONTIS_CS_CLK, 0); + udelay(1); + set_gpio_bit(ice, PONTIS_CS_WDATA, data & 0x80); + udelay(1); + set_gpio_bit(ice, PONTIS_CS_CLK, 1); + udelay(1); + data <<= 1; + } +} + +static unsigned int spi_read_byte(ice1712_t *ice) +{ + int i; + unsigned int val = 0; + + for (i = 0; i < 8; i++) { + val <<= 1; + set_gpio_bit(ice, PONTIS_CS_CLK, 0); + udelay(1); + if (snd_ice1712_gpio_read(ice) & PONTIS_CS_RDATA) + val |= 1; + udelay(1); + set_gpio_bit(ice, PONTIS_CS_CLK, 1); + udelay(1); + } + return val; +} + + +static void spi_write(ice1712_t *ice, unsigned int dev, unsigned int reg, unsigned int data) +{ + snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK); + snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK)); + set_gpio_bit(ice, PONTIS_CS_CS, 0); + spi_send_byte(ice, dev & ~1); /* WRITE */ + spi_send_byte(ice, reg); /* MAP */ + spi_send_byte(ice, data); /* DATA */ + /* trigger */ + set_gpio_bit(ice, PONTIS_CS_CS, 1); + udelay(1); + /* restore */ + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); +} + +static unsigned int spi_read(ice1712_t *ice, unsigned int dev, unsigned int reg) +{ + unsigned int val; + snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK); + snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK)); + set_gpio_bit(ice, PONTIS_CS_CS, 0); + spi_send_byte(ice, dev & ~1); /* WRITE */ + spi_send_byte(ice, reg); /* MAP */ + /* trigger */ + set_gpio_bit(ice, PONTIS_CS_CS, 1); + udelay(1); + set_gpio_bit(ice, PONTIS_CS_CS, 0); + spi_send_byte(ice, dev | 1); /* READ */ + val = spi_read_byte(ice); + /* trigger */ + set_gpio_bit(ice, PONTIS_CS_CS, 1); + udelay(1); + /* restore */ + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); + return val; +} + + +/* + * SPDIF input source + */ +static int cs_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + static char *texts[] = { + "Coax", /* RXP0 */ + "Optical", /* RXP1 */ + "CD", /* RXP2 */ + }; + uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; + uinfo->count = 1; + uinfo->value.enumerated.items = 3; + if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) + uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; + strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); + return 0; +} + +static int cs_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + + down(&ice->gpio_mutex); + ucontrol->value.enumerated.item[0] = ice->gpio.saved[0]; + up(&ice->gpio_mutex); + return 0; +} + +static int cs_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned char val; + int change = 0; + + down(&ice->gpio_mutex); + if (ucontrol->value.enumerated.item[0] != ice->gpio.saved[0]) { + ice->gpio.saved[0] = ucontrol->value.enumerated.item[0] & 3; + val = 0x80 | (ice->gpio.saved[0] << 3); + spi_write(ice, CS_DEV, 0x04, val); + change = 1; + } + up(&ice->gpio_mutex); + return 0; +} + + +/* + * GPIO controls + */ +static int pontis_gpio_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 0xffff; /* 16bit */ + return 0; +} + +static int pontis_gpio_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + down(&ice->gpio_mutex); + /* 4-7 reserved */ + ucontrol->value.integer.value[0] = (~ice->gpio.write_mask & 0xffff) | 0x00f0; + up(&ice->gpio_mutex); + return 0; +} + +static int pontis_gpio_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned int val; + int changed; + down(&ice->gpio_mutex); + /* 4-7 reserved */ + val = (~ucontrol->value.integer.value[0] & 0xffff) | 0x00f0; + changed = val != ice->gpio.write_mask; + ice->gpio.write_mask = val; + up(&ice->gpio_mutex); + return changed; +} + +static int pontis_gpio_dir_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + down(&ice->gpio_mutex); + /* 4-7 reserved */ + ucontrol->value.integer.value[0] = ice->gpio.direction & 0xff0f; + up(&ice->gpio_mutex); + return 0; +} + +static int pontis_gpio_dir_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned int val; + int changed; + down(&ice->gpio_mutex); + /* 4-7 reserved */ + val = ucontrol->value.integer.value[0] & 0xff0f; + changed = (val != ice->gpio.direction); + ice->gpio.direction = val; + up(&ice->gpio_mutex); + return changed; +} + +static int pontis_gpio_data_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + down(&ice->gpio_mutex); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + ucontrol->value.integer.value[0] = snd_ice1712_gpio_read(ice) & 0xffff; + up(&ice->gpio_mutex); + return 0; +} + +static int pontis_gpio_data_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + ice1712_t *ice = snd_kcontrol_chip(kcontrol); + unsigned int val, nval; + int changed = 0; + down(&ice->gpio_mutex); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + val = snd_ice1712_gpio_read(ice) & 0xffff; + nval = ucontrol->value.integer.value[0] & 0xffff; + if (val != nval) { + snd_ice1712_gpio_write(ice, nval); + changed = 1; + } + up(&ice->gpio_mutex); + return changed; +} + +/* + * mixers + */ + +static snd_kcontrol_new_t pontis_controls[] __devinitdata = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "PCM Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Volume", + .info = wm_adc_vol_info, + .get = wm_adc_vol_get, + .put = wm_adc_vol_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "CD Capture Switch", + .info = wm_adc_mux_info, + .get = wm_adc_mux_get, + .put = wm_adc_mux_put, + .private_value = 0, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Line Capture Switch", + .info = wm_adc_mux_info, + .get = wm_adc_mux_get, + .put = wm_adc_mux_put, + .private_value = 1, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Analog Bypass Switch", + .info = wm_bypass_info, + .get = wm_bypass_get, + .put = wm_bypass_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Swap Output Channels", + .info = wm_chswap_info, + .get = wm_chswap_get, + .put = wm_chswap_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "IEC958 Input Source", + .info = cs_source_info, + .get = cs_source_get, + .put = cs_source_put, + }, + /* FIXME: which interface? */ + { + .iface = SNDRV_CTL_ELEM_IFACE_CARD, + .name = "GPIO Mask", + .info = pontis_gpio_mask_info, + .get = pontis_gpio_mask_get, + .put = pontis_gpio_mask_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_CARD, + .name = "GPIO Direction", + .info = pontis_gpio_mask_info, + .get = pontis_gpio_dir_get, + .put = pontis_gpio_dir_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_CARD, + .name = "GPIO Data", + .info = pontis_gpio_mask_info, + .get = pontis_gpio_data_get, + .put = pontis_gpio_data_put, + }, +}; + + +/* + * WM codec registers + */ +static void wm_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer) +{ + ice1712_t *ice = (ice1712_t *)entry->private_data; + char line[64]; + unsigned int reg, val; + down(&ice->gpio_mutex); + while (!snd_info_get_line(buffer, line, sizeof(line))) { + if (sscanf(line, "%x %x", ®, &val) != 2) + continue; + if (reg <= 0x17 && val <= 0xffff) + wm_put(ice, reg, val); + } + up(&ice->gpio_mutex); +} + +static void wm_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) +{ + ice1712_t *ice = (ice1712_t *)entry->private_data; + int reg, val; + + down(&ice->gpio_mutex); + for (reg = 0; reg <= 0x17; reg++) { + val = wm_get(ice, reg); + snd_iprintf(buffer, "%02x = %04x\n", reg, val); + } + up(&ice->gpio_mutex); +} + +static void wm_proc_init(ice1712_t *ice) +{ + snd_info_entry_t *entry; + if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { + snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read); + entry->mode |= S_IWUSR; + entry->c.text.write_size = 1024; + entry->c.text.write = wm_proc_regs_write; + } +} + +static void cs_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) +{ + ice1712_t *ice = (ice1712_t *)entry->private_data; + int reg, val; + + down(&ice->gpio_mutex); + for (reg = 0; reg <= 0x26; reg++) { + val = spi_read(ice, CS_DEV, reg); + snd_iprintf(buffer, "%02x = %02x\n", reg, val); + } + val = spi_read(ice, CS_DEV, 0x7f); + snd_iprintf(buffer, "%02x = %02x\n", 0x7f, val); + up(&ice->gpio_mutex); +} + +static void cs_proc_init(ice1712_t *ice) +{ + snd_info_entry_t *entry; + if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) { + snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read); + } +} + + +static int __devinit pontis_add_controls(ice1712_t *ice) +{ + unsigned int i; + int err; + + for (i = 0; i < ARRAY_SIZE(pontis_controls); i++) { + err = snd_ctl_add(ice->card, snd_ctl_new1(&pontis_controls[i], ice)); + if (err < 0) + return err; + } + + wm_proc_init(ice); + cs_proc_init(ice); + + return 0; +} + + +/* + * initialize the chip + */ +static int __devinit pontis_init(ice1712_t *ice) +{ + static unsigned short wm_inits[] = { + /* These come first to reduce init pop noise */ + WM_ADC_MUX, 0x00c0, /* ADC mute */ + WM_DAC_MUTE, 0x0001, /* DAC softmute */ + WM_DAC_CTRL1, 0x0000, /* DAC mute */ + + WM_POWERDOWN, 0x0008, /* All power-up except HP */ + WM_RESET, 0x0000, /* reset */ + }; + static unsigned short wm_inits2[] = { + WM_MASTER_CTRL, 0x0022, /* 256fs, slave mode */ + WM_DAC_INT, 0x0022, /* I2S, normal polarity, 24bit */ + WM_ADC_INT, 0x0022, /* I2S, normal polarity, 24bit */ + WM_DAC_CTRL1, 0x0090, /* DAC L/R */ + WM_OUT_MUX, 0x0001, /* OUT DAC */ + WM_HP_ATTEN_L, 0x0179, /* HP 0dB */ + WM_HP_ATTEN_R, 0x0179, /* HP 0dB */ + WM_DAC_ATTEN_L, 0x0000, /* DAC 0dB */ + WM_DAC_ATTEN_L, 0x0100, /* DAC 0dB */ + WM_DAC_ATTEN_R, 0x0000, /* DAC 0dB */ + WM_DAC_ATTEN_R, 0x0100, /* DAC 0dB */ + // WM_DAC_MASTER, 0x0100, /* DAC master muted */ + WM_PHASE_SWAP, 0x0000, /* phase normal */ + WM_DAC_CTRL2, 0x0000, /* no deemphasis, no ZFLG */ + WM_ADC_ATTEN_L, 0x0000, /* ADC muted */ + WM_ADC_ATTEN_R, 0x0000, /* ADC muted */ +#if 0 + WM_ALC_CTRL1, 0x007b, /* */ + WM_ALC_CTRL2, 0x0000, /* */ + WM_ALC_CTRL3, 0x0000, /* */ + WM_NOISE_GATE, 0x0000, /* */ +#endif + WM_DAC_MUTE, 0x0000, /* DAC unmute */ + WM_ADC_MUX, 0x0003, /* ADC unmute, both CD/Line On */ + }; + static unsigned char cs_inits[] = { + 0x04, 0x80, /* RUN, RXP0 */ + 0x05, 0x05, /* slave, 24bit */ + 0x01, 0x00, + 0x02, 0x00, + 0x03, 0x00, + }; + unsigned int i; + + ice->vt1720 = 1; + ice->num_total_dacs = 2; + ice->num_total_adcs = 2; + + /* to remeber the register values */ + ice->akm = kcalloc(1, sizeof(akm4xxx_t), GFP_KERNEL); + if (! ice->akm) + return -ENOMEM; + ice->akm_codecs = 1; + + /* HACK - use this as the SPDIF source. + * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten + */ + ice->gpio.saved[0] = 0; + + /* initialize WM8776 codec */ + for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) + wm_put(ice, wm_inits[i], wm_inits[i+1]); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(1); + for (i = 0; i < ARRAY_SIZE(wm_inits2); i += 2) + wm_put(ice, wm_inits2[i], wm_inits2[i+1]); + + /* initialize CS8416 codec */ + /* assert PRST#; MT05 bit 7 */ + outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD)); + mdelay(5); + /* deassert PRST# */ + outb(inb(ICEMT1724(ice, AC97_CMD)) & ~0x80, ICEMT1724(ice, AC97_CMD)); + + for (i = 0; i < ARRAY_SIZE(cs_inits); i += 2) + spi_write(ice, CS_DEV, cs_inits[i], cs_inits[i+1]); + + return 0; +} + + +/* + * Pontis boards don't provide the EEPROM data at all. + * hence the driver needs to sets up it properly. + */ + +static unsigned char pontis_eeprom[] __devinitdata = { + 0x08, /* SYSCONF: clock 256, mpu401, spdif-in/ADC, 1DAC */ + 0x80, /* ACLINK: I2S */ + 0xf8, /* I2S: vol, 96k, 24bit, 192k */ + 0xc3, /* SPDIF: out-en, out-int, spdif-in */ + 0x07, /* GPIO_DIR */ + 0x00, /* GPIO_DIR1 */ + 0x00, /* GPIO_DIR2 (ignored) */ + 0x0f, /* GPIO_MASK (4-7 reserved for CS8416) */ + 0xff, /* GPIO_MASK1 */ + 0x00, /* GPIO_MASK2 (ignored) */ + 0x06, /* GPIO_STATE (0-low, 1-high, 2-high) */ + 0x00, /* GPIO_STATE1 */ + 0x00, /* GPIO_STATE2 (ignored) */ +}; + +/* entry point */ +struct snd_ice1712_card_info snd_vt1720_pontis_cards[] __devinitdata = { + { + .subvendor = VT1720_SUBDEVICE_PONTIS_MS300, + .name = "Pontis MS300", + .model = "ms300", + .chip_init = pontis_init, + .build_controls = pontis_add_controls, + .eeprom_size = sizeof(pontis_eeprom), + .eeprom_data = pontis_eeprom, + }, + { } /* terminator */ +}; diff -Nru a/sound/pci/ice1712/pontis.h b/sound/pci/ice1712/pontis.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/ice1712/pontis.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,33 @@ +#ifndef __SOUND_PONTIS_H +#define __SOUND_PONTIS_H + +/* + * ALSA driver for VIA VT1724 (Envy24HT) + * + * Lowlevel functions for Pontis MS300 boards + * + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#define PONTIS_DEVICE_DESC "{Pontis,MS300}," + +#define VT1720_SUBDEVICE_PONTIS_MS300 0x00020002 /* a dummy id for MS300 */ + +extern struct snd_ice1712_card_info snd_vt1720_pontis_cards[]; + +#endif /* __SOUND_PONTIS_H */ diff -Nru a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c --- a/sound/pci/ice1712/revo.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/ice1712/revo.c 2004-09-06 16:37:53 -07:00 @@ -128,7 +128,7 @@ switch (ice->eeprom.subvendor) { case VT1724_SUBDEVICE_REVOLUTION71: ice->num_total_dacs = 8; - ice->num_total_adcs = 4; + ice->num_total_adcs = 2; break; default: snd_BUG(); @@ -136,7 +136,7 @@ } /* second stage of initialization, analog parts and others */ - ak = ice->akm = snd_kcalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL); + ak = ice->akm = kcalloc(2, sizeof(akm4xxx_t), GFP_KERNEL); if (! ak) return -ENOMEM; ice->akm_codecs = 2; diff -Nru a/sound/pci/ice1712/vt1720_mobo.c b/sound/pci/ice1712/vt1720_mobo.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/ice1712/vt1720_mobo.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,106 @@ +/* + * ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT) + * + * Lowlevel functions for VT1720-based motherboards + * + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "ice1712.h" +#include "vt1720_mobo.h" + + +static int __devinit k8x800_init(ice1712_t *ice) +{ + ice->vt1720 = 1; + + /* VT1616 codec */ + ice->num_total_dacs = 6; + ice->num_total_adcs = 2; + + /* WM8728 codec */ + /* FIXME: TODO */ + + return 0; +} + +static int __devinit k8x800_add_controls(ice1712_t *ice) +{ + /* FIXME: needs some quirks for VT1616? */ + return 0; +} + +/* EEPROM image */ + +static unsigned char k8x800_eeprom[] __devinitdata = { + 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ + 0x02, /* ACLINK: ACLINK, packed */ + 0x00, /* I2S: - */ + 0x00, /* SPDIF: - */ + 0xff, /* GPIO_DIR */ + 0xff, /* GPIO_DIR1 */ + 0x00, /* - */ + 0xff, /* GPIO_MASK */ + 0xff, /* GPIO_MASK1 */ + 0x00, /* - */ + 0x00, /* GPIO_STATE */ + 0x00, /* GPIO_STATE1 */ + 0x00, /* - */ +}; + + +/* entry point */ +struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { + { + .subvendor = VT1720_SUBDEVICE_K8X800, + .name = "Albatron K8X800 Pro II", + .model = "k8x800", + .chip_init = k8x800_init, + .build_controls = k8x800_add_controls, + .eeprom_size = sizeof(k8x800_eeprom), + .eeprom_data = k8x800_eeprom, + }, + { + .subvendor = VT1720_SUBDEVICE_ZNF3_150, + .name = "Chaintech ZNF3-150", + /* identical with k8x800 */ + .chip_init = k8x800_init, + .build_controls = k8x800_add_controls, + .eeprom_size = sizeof(k8x800_eeprom), + .eeprom_data = k8x800_eeprom, + }, + { + .subvendor = VT1720_SUBDEVICE_ZNF3_250, + .name = "Chaintech ZNF3-250", + /* identical with k8x800 */ + .chip_init = k8x800_init, + .build_controls = k8x800_add_controls, + .eeprom_size = sizeof(k8x800_eeprom), + .eeprom_data = k8x800_eeprom, + }, + { } /* terminator */ +}; + diff -Nru a/sound/pci/ice1712/vt1720_mobo.h b/sound/pci/ice1712/vt1720_mobo.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/pci/ice1712/vt1720_mobo.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,37 @@ +#ifndef __SOUND_VT1720_MOBO_H +#define __SOUND_VT1720_MOBO_H + +/* + * ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT) + * + * Lowlevel functions for VT1720-based motherboards + * + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#define VT1720_MOBO_DEVICE_DESC "{Albatron,K8X800 Pro II},"\ + "{Chaintech,ZNF3-150},"\ + "{Chaintech,ZNF3-250}," + +#define VT1720_SUBDEVICE_K8X800 0xf217052c +#define VT1720_SUBDEVICE_ZNF3_150 0x0f2741f6 +#define VT1720_SUBDEVICE_ZNF3_250 0x0f2745f6 + +extern struct snd_ice1712_card_info snd_vt1720_mobo_cards[]; + +#endif /* __SOUND_VT1720_MOBO_H */ diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c --- a/sound/pci/intel8x0.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/intel8x0.c 2004-09-06 16:37:53 -07:00 @@ -48,8 +48,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7012; Ali 5455"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Intel,82801AA-ICH}," +MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH}," "{Intel,82901AB-ICH0}," "{Intel,82801BA-ICH2}," "{Intel,82801CA-ICH3}," @@ -75,6 +74,7 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT}; +static int buggy_irq[SNDRV_CARDS]; #ifdef SUPPORT_JOYSTICK static int joystick[SNDRV_CARDS]; #endif @@ -85,28 +85,23 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Intel i8x0 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Intel i8x0 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(ac97_clock, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); -MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:0"); module_param_array(ac97_quirk, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); -MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,4}},dialog:list,default:-1"); +module_param_array(buggy_irq, bool, boot_devs, 0444); +MODULE_PARM_DESC(buggy_irq, "Enable workaround for buggy interrupts on some motherboards."); #ifdef SUPPORT_JOYSTICK module_param_array(joystick, bool, boot_devs, 0444); MODULE_PARM_DESC(joystick, "Enable joystick for Intel i8x0 soundcard."); -MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); #endif #ifdef SUPPORT_MIDI module_param_array(mpu_port, int, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU401 port # for Intel i8x0 driver."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog:list"); #endif /* @@ -146,9 +141,15 @@ #ifndef PCI_DEVICE_ID_NVIDIA_MCP_AUDIO #define PCI_DEVICE_ID_NVIDIA_MCP_AUDIO 0x01b1 #endif +#ifndef PCI_DEVICE_ID_NVIDIA_CK804_AUDIO +#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 +#endif #ifndef PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a #endif +#ifndef PCI_DEVICE_ID_NVIDIA_CK8_AUDIO +#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a +#endif #ifndef PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da #endif @@ -397,25 +398,18 @@ } ichdev_t; typedef struct _snd_intel8x0 intel8x0_t; -#define chip_t intel8x0_t struct _snd_intel8x0 { unsigned int device_type; - char ac97_name[32]; - char ctrl_name[32]; int irq; unsigned int mmio; unsigned long addr; unsigned long remap_addr; - struct resource *res; unsigned int bm_mmio; unsigned long bmaddr; unsigned long remap_bmaddr; - struct resource *res_bm; - - struct snd_dma_device dma_dev; struct pci_dev *pci; snd_card_t *card; @@ -430,6 +424,7 @@ int in_ac97_init: 1, in_sdin_init: 1; int fix_nocache: 1; /* workaround for 440MX */ + int buggy_irq: 1; /* workaround for buggy mobos */ ac97_bus_t *ac97_bus; ac97_t *ac97[3]; @@ -444,10 +439,6 @@ struct snd_dma_buffer bdbars; u32 int_sta_reg; /* interrupt status register */ u32 int_sta_mask; /* interrupt status mask */ - -#ifdef CONFIG_PM - u32 pci_state[64 / sizeof(u32)]; -#endif }; static struct pci_device_id snd_intel8x0_ids[] = { @@ -462,7 +453,10 @@ { 0x8086, 0x7195, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 440MX */ { 0x1039, 0x7012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS }, /* SI7012 */ { 0x10de, 0x01b1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE */ + { 0x10de, 0x003a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP04 */ { 0x10de, 0x006a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2 */ + { 0x10de, 0x0059, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK804 */ + { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */ { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ @@ -605,7 +599,7 @@ unsigned short reg, unsigned short val) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return); + intel8x0_t *chip = ac97->private_data; spin_lock(&chip->ac97_lock); if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) { @@ -619,7 +613,7 @@ static unsigned short snd_intel8x0_codec_read(ac97_t *ac97, unsigned short reg) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return ~0); + intel8x0_t *chip = ac97->private_data; unsigned short res; unsigned int tmp; @@ -642,6 +636,21 @@ return res; } +static void snd_intel8x0_codec_read_test(intel8x0_t *chip, unsigned int codec) +{ + unsigned int tmp; + + spin_lock(&chip->ac97_lock); + if (snd_intel8x0_codec_semaphore(chip, codec) >= 0) { + iagetword(chip, codec * 0x80); + if ((tmp = igetdword(chip, ICHREG(GLOB_STA))) & ICH_RCS) { + /* reset RCS and preserve other R/WC bits */ + iputdword(chip, ICHREG(GLOB_STA), tmp & ~(ICH_SRI|ICH_PRI|ICH_TRI|ICH_GSCI)); + } + } + spin_unlock(&chip->ac97_lock); +} + /* * access to AC97 for Ali5455 */ @@ -669,7 +678,7 @@ static unsigned short snd_intel8x0_ali_codec_read(ac97_t *ac97, unsigned short reg) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return ~0); + intel8x0_t *chip = ac97->private_data; unsigned short data = 0xffff; spin_lock(&chip->ac97_lock); @@ -689,7 +698,7 @@ static void snd_intel8x0_ali_codec_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return); + intel8x0_t *chip = ac97->private_data; spin_lock(&chip->ac97_lock); if (snd_intel8x0_ali_codec_semaphore(chip)) { @@ -778,6 +787,7 @@ int status, civ, i, step; int ack = 0; + spin_lock(&chip->reg_lock); status = igetbyte(chip, port + ichdev->roff_sr); civ = igetbyte(chip, port + ICH_REG_OFF_CIV); if (!(status & ICH_BCIS)) { @@ -811,10 +821,9 @@ ack = 1; } } + spin_unlock(&chip->reg_lock); if (ack && ichdev->substream) { - spin_unlock(&chip->reg_lock); snd_pcm_period_elapsed(ichdev->substream); - spin_lock(&chip->reg_lock); } iputbyte(chip, port + ichdev->roff_sr, status & (ICH_FIFOE | ICH_BCIS | ICH_LVBCI)); @@ -822,24 +831,22 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, dev_id, return IRQ_NONE); + intel8x0_t *chip = dev_id; ichdev_t *ichdev; unsigned int status; unsigned int i; - spin_lock(&chip->reg_lock); status = igetdword(chip, chip->int_sta_reg); + if (status == 0xffffffff) /* we are not yet resumed */ + return IRQ_NONE; + if ((status & chip->int_sta_mask) == 0) { 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) + if (! chip->buggy_irq) status = 0; } - spin_unlock(&chip->reg_lock); return IRQ_RETVAL(status); } @@ -851,7 +858,6 @@ /* ack them */ iputdword(chip, chip->int_sta_reg, status & chip->int_sta_mask); - spin_unlock(&chip->reg_lock); return IRQ_HANDLED; } @@ -1021,8 +1027,10 @@ /* reset to 2ch once to keep the 6 channel data in alignment, * to start from Front Left always */ - iputdword(chip, ICHREG(GLOB_CNT), (cnt & 0xcfffff)); - mdelay(50); /* grrr... */ + if (cnt & ICH_PCM_246_MASK) { + iputdword(chip, ICHREG(GLOB_CNT), cnt & ~ICH_PCM_246_MASK); + msleep(50); /* grrr... */ + } } else if (chip->device_type == DEVICE_INTEL_ICH4) { if (sample_bits > 16) cnt |= ICH_PCM_20BIT; @@ -1041,16 +1049,16 @@ ichdev->physbuf = runtime->dma_addr; ichdev->size = snd_pcm_lib_buffer_bytes(substream); ichdev->fragsize = snd_pcm_lib_period_bytes(substream); + spin_lock_irq(&chip->reg_lock); if (ichdev->ichd == ICHD_PCMOUT) { - spin_lock(&chip->reg_lock); snd_intel8x0_setup_pcm_out(chip, runtime->channels, runtime->sample_bits); - spin_unlock(&chip->reg_lock); if (chip->device_type == DEVICE_INTEL_ICH4) { ichdev->pos_shift = (runtime->sample_bits > 16) ? 2 : 1; } } snd_intel8x0_setup_periods(chip, ichdev); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1058,17 +1066,25 @@ { intel8x0_t *chip = snd_pcm_substream_chip(substream); ichdev_t *ichdev = get_ichdev(substream); - unsigned long flags; size_t ptr1, ptr; + int civ, timeout = 10; + unsigned int position; - ptr1 = igetword(chip, ichdev->reg_offset + ichdev->roff_picb) << ichdev->pos_shift; - if (ptr1 != 0) - ptr = ichdev->fragsize1 - ptr1; - else - ptr = 0; - spin_lock_irqsave(&chip->reg_lock, flags); - ptr += ichdev->position; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); + do { + civ = igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV); + ptr1 = igetword(chip, ichdev->reg_offset + ichdev->roff_picb); + position = ichdev->position; + if (ptr1 == 0) + udelay(1); + if (civ == igetbyte(chip, ichdev->reg_offset + ICH_REG_OFF_CIV) && + ptr1 == igetword(chip, ichdev->reg_offset + ichdev->roff_picb)) + break; + } while (timeout--); + ptr1 <<= ichdev->pos_shift; + ptr = ichdev->fragsize1 - ptr1; + ptr += position; + spin_unlock(&chip->reg_lock); if (ptr >= ichdev->size) return 0; return bytes_to_frames(substream->runtime, ptr); @@ -1099,10 +1115,8 @@ 2, 4, }; -#define CHANNELS4 sizeof(channels4) / sizeof(channels4[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_channels4 = { - .count = CHANNELS4, + .count = ARRAY_SIZE(channels4), .list = channels4, .mask = 0, }; @@ -1111,10 +1125,8 @@ 2, 4, 6, }; -#define CHANNELS6 sizeof(channels6) / sizeof(channels6[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_channels6 = { - .count = CHANNELS6, + .count = ARRAY_SIZE(channels6), .list = channels6, .mask = 0, }; @@ -1156,8 +1168,10 @@ runtime->hw.channels_max = 4; snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels4); } - if (chip->smp20bit) + if (chip->smp20bit) { runtime->hw.formats |= SNDRV_PCM_FMTBIT_S32_LE; + snd_pcm_hw_constraint_msbits(runtime, 0, 32, 20); + } return 0; } @@ -1249,14 +1263,14 @@ static int snd_intel8x0_ali_ac97spdifout_open(snd_pcm_substream_t * substream) { intel8x0_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; unsigned int val; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); val = igetdword(chip, ICHREG(ALI_INTERFACECR)); val |= ICH_ALI_IF_AC97SP; + iputdword(chip, ICHREG(ALI_INTERFACECR), val); /* also needs to set ALI_SC_CODEC_SPDF correctly */ - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return snd_intel8x0_pcm_open(substream, &chip->ichd[ALID_AC97SPDIFOUT]); } @@ -1264,14 +1278,14 @@ static int snd_intel8x0_ali_ac97spdifout_close(snd_pcm_substream_t * substream) { intel8x0_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; unsigned int val; chip->ichd[ALID_AC97SPDIFOUT].substream = NULL; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); val = igetdword(chip, ICHREG(ALI_INTERFACECR)); val &= ~ICH_ALI_IF_AC97SP; - spin_unlock_irqrestore(&chip->reg_lock, flags); + iputdword(chip, ICHREG(ALI_INTERFACECR), val); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1627,13 +1641,13 @@ static void snd_intel8x0_mixer_free_ac97_bus(ac97_bus_t *bus) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, bus->private_data, return); + intel8x0_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_intel8x0_mixer_free_ac97(ac97_t *ac97) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return); + intel8x0_t *chip = ac97->private_data; chip->ac97[ac97->num] = NULL; } @@ -1726,12 +1740,30 @@ .name = "Dell Optiplex GX260", /* AD1981A */ .type = AC97_TUNE_HP_ONLY }, + { + .vendor = 0x1028, + .device = 0x012d, + .name = "Dell Precision 450", /* AD1981B*/ + .type = AC97_TUNE_HP_ONLY + }, { /* FIXME: which codec? */ .vendor = 0x103c, .device = 0x00c3, .name = "Hewlett-Packard onboard", .type = AC97_TUNE_HP_ONLY }, + { + .vendor = 0x103c, + .device = 0x12f1, + .name = "HP xw8200", /* AD1981B*/ + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x103c, + .device = 0x3008, + .name = "HP xw4200", /* AD1981B*/ + .type = AC97_TUNE_HP_ONLY + }, { .vendor = 0x1043, .device = 0x80f3, @@ -1802,6 +1834,12 @@ }, { .vendor = 0x8086, + .device = 0x4d56, + .name = "Intel ICH/AD1885", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x8086, .device = 0x6000, .mask = 0xfff0, .name = "Intel ICH5/AD1985", @@ -1828,12 +1866,21 @@ static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock, int ac97_quirk) { - ac97_bus_t bus, *pbus; - ac97_t ac97, *x97; + ac97_bus_t *pbus; + ac97_template_t ac97; int err; unsigned int i, codecs; unsigned int glob_sta = 0; int spdif_idx = -1; /* disabled */ + ac97_bus_ops_t *ops; + static ac97_bus_ops_t standard_bus_ops = { + .write = snd_intel8x0_codec_write, + .read = snd_intel8x0_codec_read, + }; + static ac97_bus_ops_t ali_bus_ops = { + .write = snd_intel8x0_ali_codec_write, + .read = snd_intel8x0_ali_codec_read, + }; switch (chip->device_type) { case DEVICE_NFORCE: @@ -1849,13 +1896,6 @@ }; chip->in_ac97_init = 1; - memset(&bus, 0, sizeof(bus)); - bus.private_data = chip; - bus.private_free = snd_intel8x0_mixer_free_ac97_bus; - if (ac97_clock >= 8000 && ac97_clock <= 48000) - bus.clock = ac97_clock; - else - bus.clock = 48000; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -1863,8 +1903,7 @@ ac97.scaps = AC97_SCAP_SKIP_MODEM; if (chip->device_type != DEVICE_ALI) { glob_sta = igetdword(chip, ICHREG(GLOB_STA)); - bus.write = snd_intel8x0_codec_write; - bus.read = snd_intel8x0_codec_read; + ops = &standard_bus_ops; if (chip->device_type == DEVICE_INTEL_ICH4) { codecs = 0; if (glob_sta & ICH_PCR) @@ -1875,19 +1914,15 @@ codecs++; chip->in_sdin_init = 1; for (i = 0; i < codecs; i++) { - ac97.num = i; - snd_intel8x0_codec_read(&ac97, 0); + snd_intel8x0_codec_read_test(chip, i); chip->ac97_sdin[i] = igetbyte(chip, ICHREG(SDM)) & ICH_LDI_MASK; } - ac97.num = 0; chip->in_sdin_init = 0; } else { codecs = glob_sta & ICH_SCR ? 2 : 1; } - bus.vra = 1; } else { - bus.write = snd_intel8x0_ali_codec_write; - bus.read = snd_intel8x0_ali_codec_read; + ops = &ali_bus_ops; codecs = 1; /* detect the secondary codec */ for (i = 0; i < 100; i++) { @@ -1899,23 +1934,28 @@ iputdword(chip, ICHREG(ALI_RTSR), reg | 0x40); udelay(1); } - /* FIXME: my test board doens't work well with VRA... */ - bus.vra = 0; } - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, ops, chip, &pbus)) < 0) goto __err; + pbus->private_free = snd_intel8x0_mixer_free_ac97_bus; + pbus->shared_type = AC97_SHARED_TYPE_ICH; /* shared with modem driver */ + if (ac97_clock >= 8000 && ac97_clock <= 48000) + pbus->clock = ac97_clock; + /* FIXME: my test board doesn't work well with VRA... */ + if (chip->device_type == DEVICE_ALI) + pbus->no_vra = 1; chip->ac97_bus = pbus; + ac97.pci = chip->pci; for (i = 0; i < codecs; i++) { ac97.num = i; - if ((err = snd_ac97_mixer(pbus, &ac97, &x97)) < 0) { + if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { if (err != -EACCES) snd_printk(KERN_ERR "Unable to initialize codec #%d\n", i); if (i == 0) goto __err; continue; } - chip->ac97[i] = x97; } /* tune up the primary codec */ snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, ac97_quirk); @@ -2179,26 +2219,19 @@ /* --- */ synchronize_irq(chip->irq); __hw_end: + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); if (chip->bdbars.area) { if (chip->fix_nocache) fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 0); - snd_dma_free_pages(&chip->dma_dev, &chip->bdbars); + snd_dma_free_pages(&chip->bdbars); } if (chip->remap_addr) iounmap((void *) chip->remap_addr); if (chip->remap_bmaddr) iounmap((void *) chip->remap_bmaddr); - if (chip->res) { - release_resource(chip->res); - kfree_nocheck(chip->res); - } - if (chip->res_bm) { - release_resource(chip->res_bm); - kfree_nocheck(chip->res_bm); - } - if (chip->irq >= 0) - free_irq(chip->irq, (void *)chip); - snd_magic_kfree(chip); + pci_release_regions(chip->pci); + kfree(chip); return 0; } @@ -2208,7 +2241,7 @@ */ static int intel8x0_suspend(snd_card_t *card, unsigned int state) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return -EINVAL); + intel8x0_t *chip = card->pm_private_data; int i; for (i = 0; i < chip->pcm_devs; i++) @@ -2216,17 +2249,15 @@ for (i = 0; i < 3; i++) if (chip->ac97[i]) snd_ac97_suspend(chip->ac97[i]); - pci_save_state(chip->pci, chip->pci_state); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); return 0; } static int intel8x0_resume(snd_card_t *card, unsigned int state) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return -EINVAL); + intel8x0_t *chip = card->pm_private_data; int i; - pci_restore_state(chip->pci, chip->pci_state); pci_enable_device(chip->pci); pci_set_master(chip->pci); snd_intel8x0_chip_init(chip, 0); @@ -2264,7 +2295,6 @@ ichdev_t *ichdev; unsigned long port; unsigned long pos, t; - unsigned long flags; struct timeval start_time, stop_time; if (chip->ac97_bus->clock != 48000) @@ -2287,7 +2317,7 @@ } snd_intel8x0_setup_periods(chip, ichdev); port = ichdev->reg_offset; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); /* trigger */ if (chip->device_type != DEVICE_ALI) iputbyte(chip, port + ICH_REG_OFF_CR, ICH_IOCE | ICH_STARTBM); @@ -2296,7 +2326,7 @@ iputdword(chip, ICHREG(ALI_DMACR), 1 << ichdev->ali_slot); } do_gettimeofday(&start_time); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); #if 0 set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 20); @@ -2304,7 +2334,7 @@ /* FIXME: schedule() can take too long time and overlap the boundary.. */ mdelay(50); #endif - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); /* check the position */ pos = ichdev->fragsize1; pos -= igetword(chip, ichdev->reg_offset + ichdev->roff_picb) << ichdev->pos_shift; @@ -2322,7 +2352,7 @@ ; } iputbyte(chip, port + ICH_REG_OFF_CR, ICH_RESETREGS); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); t = stop_time.tv_sec - start_time.tv_sec; t *= 1000000; @@ -2346,7 +2376,7 @@ static void snd_intel8x0_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, entry->private_data, return); + intel8x0_t *chip = entry->private_data; unsigned int tmp; snd_iprintf(buffer, "Intel8x0\n\n"); @@ -2379,7 +2409,7 @@ static int snd_intel8x0_dev_free(snd_device_t *device) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, device->device_data, return -ENXIO); + intel8x0_t *chip = device->device_data; return snd_intel8x0_free(chip); } @@ -2438,7 +2468,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(intel8x0_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -2447,32 +2477,33 @@ chip->card = card; chip->pci = pci; chip->irq = -1; - snd_intel8x0_proc_init(chip); - sprintf(chip->ac97_name, "%s - AC'97", card->shortname); - sprintf(chip->ctrl_name, "%s - Controller", card->shortname); + if (pci->vendor == PCI_VENDOR_ID_INTEL && pci->device == PCI_DEVICE_ID_INTEL_440MX) chip->fix_nocache = 1; /* enable workaround */ + + /* some Nforce[2] and ICH boards have problems with IRQ handling. + * Needs to return IRQ_HANDLED for unknown irqs. + */ + if (device_type == DEVICE_NFORCE) + chip->buggy_irq = 1; + + if ((err = pci_request_regions(pci, card->shortname)) < 0) { + kfree(chip); + return err; + } + if (device_type == DEVICE_ALI) { /* ALI5455 has no ac97 region */ chip->bmaddr = pci_resource_start(pci, 0); - if ((chip->res_bm = request_region(chip->bmaddr, 256, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 64 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } goto port_inited; } if (pci_resource_flags(pci, 2) & IORESOURCE_MEM) { /* ICH4 and Nforce */ chip->mmio = 1; chip->addr = pci_resource_start(pci, 2); - if ((chip->res = request_mem_region(chip->addr, 512, chip->ac97_name)) == NULL) { - snd_printk("unable to grab I/O memory 0x%lx-0x%lx\n", chip->addr, chip->addr + 512 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } - chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, 512); + chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, + pci_resource_len(pci, 2)); if (chip->remap_addr == 0) { snd_printk("AC'97 space ioremap problem\n"); snd_intel8x0_free(chip); @@ -2480,21 +2511,12 @@ } } else { chip->addr = pci_resource_start(pci, 0); - if ((chip->res = request_region(chip->addr, 256, chip->ac97_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->addr, chip->addr + 256 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } } if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) { /* ICH4 */ chip->bm_mmio = 1; chip->bmaddr = pci_resource_start(pci, 3); - if ((chip->res_bm = request_mem_region(chip->bmaddr, 256, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab I/O memory 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 512 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } - chip->remap_bmaddr = (unsigned long) ioremap_nocache(chip->bmaddr, 256); + chip->remap_bmaddr = (unsigned long) ioremap_nocache(chip->bmaddr, + pci_resource_len(pci, 3)); if (chip->remap_bmaddr == 0) { snd_printk("Controller space ioremap problem\n"); snd_intel8x0_free(chip); @@ -2502,11 +2524,6 @@ } } else { chip->bmaddr = pci_resource_start(pci, 1); - if ((chip->res_bm = request_region(chip->bmaddr, 64, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 64 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } } port_inited: @@ -2552,13 +2569,11 @@ ichdev->pos_shift = (device_type == DEVICE_SIS) ? 0 : 1; } - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(pci); - /* allocate buffer descriptor lists */ /* the start of each lists must be aligned to 8 bytes */ - if (snd_dma_alloc_pages(&chip->dma_dev, chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, &chip->bdbars) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, + &chip->bdbars) < 0) { snd_intel8x0_free(chip); snd_printk(KERN_ERR "intel8x0: cannot allocate buffer descriptors\n"); return -ENOMEM; @@ -2614,6 +2629,9 @@ { PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO, "NVidia nForce2" }, { PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO, "NVidia nForce3" }, { PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO, "NVidia CK8S" }, + { PCI_DEVICE_ID_NVIDIA_CK804_AUDIO, "NVidia CK804" }, + { PCI_DEVICE_ID_NVIDIA_CK8_AUDIO, "NVidia CK8" }, + { 0x003a, "NVidia MCP04" }, { 0x746d, "AMD AMD8111" }, { 0x7445, "AMD AMD768" }, { 0x5455, "ALi M5455" }, @@ -2661,6 +2679,8 @@ snd_card_free(card); return err; } + if (buggy_irq[dev]) + chip->buggy_irq = 1; if ((err = snd_intel8x0_mixer(chip, ac97_clock[dev], ac97_quirk[dev])) < 0) { snd_card_free(card); @@ -2680,6 +2700,8 @@ } } else mpu_port[dev] = 0; + + snd_intel8x0_proc_init(chip); sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->addr, chip->irq); diff -Nru a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c --- a/sound/pci/intel8x0m.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/intel8x0m.c 2004-09-06 16:37:53 -07:00 @@ -40,10 +40,9 @@ #include MODULE_AUTHOR("Jaroslav Kysela "); -MODULE_DESCRIPTION("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440 modem"); +MODULE_DESCRIPTION("Intel 82801AA,82901AB,i810,i820,i830,i840,i845,MX440; SiS 7013; NVidia MCP/2/2S/3 modems"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Intel,82801AA-ICH}," +MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH}," "{Intel,82901AB-ICH0}," "{Intel,82801BA-ICH2}," "{Intel,82801CA-ICH3}," @@ -60,16 +59,12 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Intel i8x0 modemcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Intel i8x0 modemcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Intel i8x0 modemcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(ac97_clock, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); -MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:0"); /* * Direct registers @@ -99,18 +94,20 @@ #ifndef PCI_DEVICE_ID_SI_7013 #define PCI_DEVICE_ID_SI_7013 0x7013 #endif -#if 0 -#ifndef PCI_DEVICE_ID_NVIDIA_MCP_AUDIO -#define PCI_DEVICE_ID_NVIDIA_MCP_AUDIO 0x01b1 +#ifndef PCI_DEVICE_ID_NVIDIA_MCP_MODEM +#define PCI_DEVICE_ID_NVIDIA_MCP_MODEM 0x01c1 #endif -#ifndef PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO -#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a +#ifndef PCI_DEVICE_ID_NVIDIA_MCP2_MODEM +#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069 #endif -#ifndef PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO -#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da +#ifndef PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM +#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089 #endif +#ifndef PCI_DEVICE_ID_NVIDIA_MCP3_MODEM +#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9 #endif + enum { DEVICE_INTEL, DEVICE_SIS, DEVICE_ALI, DEVICE_NFORCE }; #define ICHREG(x) ICH_REG_##x @@ -228,23 +225,18 @@ } ichdev_t; typedef struct _snd_intel8x0m intel8x0_t; -#define chip_t intel8x0_t struct _snd_intel8x0m { unsigned int device_type; - char ac97_name[64]; - char ctrl_name[64]; int irq; unsigned int mmio; unsigned long addr; unsigned long remap_addr; - struct resource *res; unsigned int bm_mmio; unsigned long bmaddr; unsigned long remap_bmaddr; - struct resource *res_bm; struct pci_dev *pci; snd_card_t *card; @@ -261,7 +253,6 @@ spinlock_t reg_lock; spinlock_t ac97_lock; - struct snd_dma_device dma_dev; struct snd_dma_buffer bdbars; u32 bdbars_count; u32 int_sta_reg; /* interrupt status register */ @@ -278,12 +269,12 @@ { 0x8086, 0x24d6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH5 */ { 0x8086, 0x7196, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 440MX */ { 0x1022, 0x7446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ -#if 0 - /* TODO: support needed */ { 0x1039, 0x7013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS }, /* SI7013 */ - { 0x10de, 0x01b1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE */ - { 0x10de, 0x006a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2 */ - { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ + { 0x10de, 0x01c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE */ + { 0x10de, 0x0069, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2 */ + { 0x10de, 0x0089, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2s */ + { 0x10de, 0x00d9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ +#if 0 { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ #endif @@ -328,6 +319,14 @@ outb(val, chip->bmaddr + offset); } +static void iputword(intel8x0_t *chip, u32 offset, u16 val) +{ + if (chip->bm_mmio) + writew(val, chip->remap_bmaddr + offset); + else + outw(val, chip->bmaddr + offset); +} + static void iputdword(intel8x0_t *chip, u32 offset, u32 val) { if (chip->bm_mmio) @@ -408,7 +407,7 @@ unsigned short reg, unsigned short val) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return); + intel8x0_t *chip = ac97->private_data; spin_lock(&chip->ac97_lock); if (snd_intel8x0m_codec_semaphore(chip, ac97->num) < 0) { @@ -422,7 +421,7 @@ static unsigned short snd_intel8x0_codec_read(ac97_t *ac97, unsigned short reg) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return ~0); + intel8x0_t *chip = ac97->private_data; unsigned short res; unsigned int tmp; @@ -542,13 +541,17 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, dev_id, return IRQ_NONE); + intel8x0_t *chip = dev_id; ichdev_t *ichdev; unsigned int status; unsigned int i; spin_lock(&chip->reg_lock); status = igetdword(chip, chip->int_sta_reg); + if (status == 0xffffffff) { /* we are not yet resumed */ + spin_unlock(&chip->reg_lock); + return IRQ_NONE; + } if ((status & chip->int_sta_mask) == 0) { if (status) iputdword(chip, chip->int_sta_reg, status); @@ -684,9 +687,9 @@ .rate_max = 16000, .channels_min = 1, .channels_max = 1, - .buffer_bytes_max = 32 * 1024, + .buffer_bytes_max = 64 * 1024, .period_bytes_min = 32, - .period_bytes_max = 32 * 1024, + .period_bytes_max = 64 * 1024, .periods_min = 1, .periods_max = 1024, .fifo_size = 0, @@ -818,8 +821,8 @@ .suffix = "Modem", .playback_ops = &snd_intel8x0m_playback_ops, .capture_ops = &snd_intel8x0m_capture_ops, - .prealloc_size = 4 * 1024, - .prealloc_max_size = 16 * 1024, + .prealloc_size = 32 * 1024, + .prealloc_max_size = 64 * 1024, }, }; @@ -872,32 +875,30 @@ static void snd_intel8x0_mixer_free_ac97_bus(ac97_bus_t *bus) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, bus->private_data, return); + intel8x0_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_intel8x0_mixer_free_ac97(ac97_t *ac97) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, ac97->private_data, return); + intel8x0_t *chip = ac97->private_data; chip->ac97 = NULL; } static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock) { - ac97_bus_t bus, *pbus; - ac97_t ac97, *x97; + ac97_bus_t *pbus; + ac97_template_t ac97; + ac97_t *x97; int err; unsigned int glob_sta = 0; + static ac97_bus_ops_t ops = { + .write = snd_intel8x0_codec_write, + .read = snd_intel8x0_codec_read, + }; chip->in_ac97_init = 1; - memset(&bus, 0, sizeof(bus)); - bus.private_data = chip; - bus.private_free = snd_intel8x0_mixer_free_ac97_bus; - if (ac97_clock >= 8000 && ac97_clock <= 48000) - bus.clock = ac97_clock; - else - bus.clock = 48000; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -905,13 +906,15 @@ ac97.scaps = AC97_SCAP_SKIP_AUDIO; glob_sta = igetdword(chip, ICHREG(GLOB_STA)); - bus.write = snd_intel8x0_codec_write; - bus.read = snd_intel8x0_codec_read; - bus.vra = 1; - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) goto __err; + pbus->private_free = snd_intel8x0_mixer_free_ac97_bus; + pbus->shared_type = AC97_SHARED_TYPE_ICH; /* shared with audio driver */ + if (ac97_clock >= 8000 && ac97_clock <= 48000) + pbus->clock = ac97_clock; chip->ac97_bus = pbus; + ac97.pci = chip->pci; ac97.num = glob_sta & ICH_SCR ? 1 : 0; if ((err = snd_ac97_mixer(pbus, &ac97, &x97)) < 0) { @@ -1016,6 +1019,11 @@ } while (time_after_eq(end_time, jiffies)); } + if (chip->device_type == DEVICE_SIS) { + /* unmute the output on SIS7012 */ + iputword(chip, 0x4c, igetword(chip, 0x4c) | 1); + } + return 0; } @@ -1056,22 +1064,15 @@ synchronize_irq(chip->irq); __hw_end: if (chip->bdbars.area) - snd_dma_free_pages(&chip->dma_dev, &chip->bdbars); + snd_dma_free_pages(&chip->bdbars); if (chip->remap_addr) iounmap((void *) chip->remap_addr); if (chip->remap_bmaddr) iounmap((void *) chip->remap_bmaddr); - if (chip->res) { - release_resource(chip->res); - kfree_nocheck(chip->res); - } - if (chip->res_bm) { - release_resource(chip->res_bm); - kfree_nocheck(chip->res_bm); - } if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); - snd_magic_kfree(chip); + pci_release_regions(chip->pci); + kfree(chip); return 0; } @@ -1081,7 +1082,7 @@ */ static int intel8x0m_suspend(snd_card_t *card, unsigned int state) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return -EINVAL); + intel8x0_t *chip = card->pm_private_data; int i; for (i = 0; i < chip->pcm_devs; i++) @@ -1094,7 +1095,7 @@ static int intel8x0m_resume(snd_card_t *card, unsigned int state) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, card->pm_private_data, return -EINVAL); + intel8x0_t *chip = card->pm_private_data; pci_enable_device(chip->pci); pci_set_master(chip->pci); snd_intel8x0_chip_init(chip, 0); @@ -1109,7 +1110,7 @@ static void snd_intel8x0m_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, entry->private_data, return); + intel8x0_t *chip = entry->private_data; unsigned int tmp; snd_iprintf(buffer, "Intel8x0m\n\n"); @@ -1135,7 +1136,7 @@ static int snd_intel8x0_dev_free(snd_device_t *device) { - intel8x0_t *chip = snd_magic_cast(intel8x0_t, device->device_data, return -ENXIO); + intel8x0_t *chip = device->device_data; return snd_intel8x0_free(chip); } @@ -1168,7 +1169,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(intel8x0_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); @@ -1177,29 +1178,23 @@ chip->card = card; chip->pci = pci; chip->irq = -1; - snd_intel8x0m_proc_init(chip); - sprintf(chip->ac97_name, "%s - AC'97", card->shortname); - sprintf(chip->ctrl_name, "%s - Controller", card->shortname); + + if ((err = pci_request_regions(pci, card->shortname)) < 0) { + kfree(chip); + return err; + } + if (device_type == DEVICE_ALI) { /* ALI5455 has no ac97 region */ chip->bmaddr = pci_resource_start(pci, 0); - if ((chip->res_bm = request_region(chip->bmaddr, 256, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 256 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } goto port_inited; } if (pci_resource_flags(pci, 2) & IORESOURCE_MEM) { /* ICH4 and Nforce */ chip->mmio = 1; chip->addr = pci_resource_start(pci, 2); - if ((chip->res = request_mem_region(chip->addr, 512, chip->ac97_name)) == NULL) { - snd_printk("unable to grab I/O memory 0x%lx-0x%lx\n", chip->addr, chip->addr + 512 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } - chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, 512); + chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, + pci_resource_len(pci, 2)); if (chip->remap_addr == 0) { snd_printk("AC'97 space ioremap problem\n"); snd_intel8x0_free(chip); @@ -1207,21 +1202,12 @@ } } else { chip->addr = pci_resource_start(pci, 0); - if ((chip->res = request_region(chip->addr, 256, chip->ac97_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->addr, chip->addr + 256 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } } if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) { /* ICH4 */ chip->bm_mmio = 1; chip->bmaddr = pci_resource_start(pci, 3); - if ((chip->res_bm = request_mem_region(chip->bmaddr, 256, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab I/O memory 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 512 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } - chip->remap_bmaddr = (unsigned long) ioremap_nocache(chip->bmaddr, 256); + chip->remap_bmaddr = (unsigned long) ioremap_nocache(chip->bmaddr, + pci_resource_len(pci, 3)); if (chip->remap_bmaddr == 0) { snd_printk("Controller space ioremap problem\n"); snd_intel8x0_free(chip); @@ -1229,11 +1215,6 @@ } } else { chip->bmaddr = pci_resource_start(pci, 1); - if ((chip->res_bm = request_region(chip->bmaddr, 128, chip->ctrl_name)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->bmaddr, chip->bmaddr + 128 - 1); - snd_intel8x0_free(chip); - return -EBUSY; - } } port_inited: @@ -1271,10 +1252,9 @@ /* allocate buffer descriptor lists */ /* the start of each lists must be aligned to 8 bytes */ - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(pci); - if (snd_dma_alloc_pages(&chip->dma_dev, chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, &chip->bdbars) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, + &chip->bdbars) < 0) { snd_intel8x0_free(chip); return -ENOMEM; } @@ -1320,11 +1300,12 @@ { PCI_DEVICE_ID_INTEL_ICH4_6, "Intel 82801DB-ICH4" }, { PCI_DEVICE_ID_INTEL_ICH5_6, "Intel ICH5" }, { 0x7446, "AMD AMD768" }, -#if 0 { PCI_DEVICE_ID_SI_7013, "SiS SI7013" }, - { PCI_DEVICE_ID_NVIDIA_MCP_AUDIO, "NVidia nForce" }, - { PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO, "NVidia nForce2" }, - { PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO, "NVidia nForce3" }, + { PCI_DEVICE_ID_NVIDIA_MCP_MODEM, "NVidia nForce" }, + { PCI_DEVICE_ID_NVIDIA_MCP2_MODEM, "NVidia nForce2" }, + { PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM, "NVidia nForce2s" }, + { PCI_DEVICE_ID_NVIDIA_MCP3_MODEM, "NVidia nForce3" }, +#if 0 { 0x5455, "ALi M5455" }, { 0x746d, "AMD AMD8111" }, #endif @@ -1353,10 +1334,10 @@ switch (pci_id->driver_data) { case DEVICE_NFORCE: - strcpy(card->driver, "NFORCE"); + strcpy(card->driver, "NFORCE-MODEM"); break; default: - strcpy(card->driver, "ICH"); + strcpy(card->driver, "ICH-MODEM"); break; } @@ -1383,6 +1364,8 @@ return err; } + snd_intel8x0m_proc_init(chip); + sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->addr, chip->irq); diff -Nru a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c --- a/sound/pci/korg1212/korg1212.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/korg1212/korg1212.c 2004-09-06 16:37:50 -07:00 @@ -343,12 +343,6 @@ unsigned long inIRQ; unsigned long iobase; - struct resource *res_iomem; - struct resource *res_ioport; - struct resource *res_iomem2; - - struct snd_dma_device dma_dev; - struct snd_dma_buffer dma_dsp; struct snd_dma_buffer dma_play; struct snd_dma_buffer dma_rec; @@ -411,8 +405,7 @@ MODULE_DESCRIPTION("korg1212"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{KORG,korg1212}}"); +MODULE_SUPPORTED_DEVICE("{{KORG,korg1212}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -421,13 +414,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Korg 1212 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Korg 1212 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); MODULE_AUTHOR("Haroldo Gamal "); static struct pci_device_id snd_korg1212_ids[] = { @@ -637,7 +627,7 @@ /* timer callback for checking the ack of stop request */ static void snd_korg1212_timer_func(unsigned long data) { - korg1212_t *korg1212 = snd_magic_cast(korg1212_t, (void*)data, return); + korg1212_t *korg1212 = (korg1212_t *) data; spin_lock(&korg1212->lock); if (readl(&korg1212->sharedBufferPtr->cardCommand) == 0) { @@ -1143,7 +1133,7 @@ static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id, struct pt_regs *regs) { u32 doorbellValue; - korg1212_t *korg1212 = snd_magic_cast(korg1212_t, dev_id, return IRQ_NONE); + korg1212_t *korg1212 = dev_id; if(irq != korg1212->irq) return IRQ_NONE; @@ -1407,7 +1397,7 @@ static int snd_korg1212_playback_open(snd_pcm_substream_t *substream) { unsigned long flags; - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; #if K1212_DEBUG_LEVEL > 0 @@ -1419,8 +1409,7 @@ snd_korg1212_OpenCard(korg1212); runtime->hw = snd_korg1212_playback_info; - runtime->dma_area = (char *) korg1212->playDataBufsPtr; - runtime->dma_bytes = K1212_BUF_SIZE; + snd_pcm_set_runtime_buffer(substream, &korg1212->dma_play); spin_lock_irqsave(&korg1212->lock, flags); @@ -1438,7 +1427,7 @@ static int snd_korg1212_capture_open(snd_pcm_substream_t *substream) { unsigned long flags; - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; #if K1212_DEBUG_LEVEL > 0 @@ -1450,8 +1439,7 @@ snd_korg1212_OpenCard(korg1212); runtime->hw = snd_korg1212_capture_info; - runtime->dma_area = (char *) korg1212->recordDataBufsPtr; - runtime->dma_bytes = K1212_BUF_SIZE; + snd_pcm_set_runtime_buffer(substream, &korg1212->dma_rec); spin_lock_irqsave(&korg1212->lock, flags); @@ -1468,7 +1456,7 @@ static int snd_korg1212_playback_close(snd_pcm_substream_t *substream) { unsigned long flags; - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_close [%s]\n", stateName[korg1212->cardState]); @@ -1490,7 +1478,7 @@ static int snd_korg1212_capture_close(snd_pcm_substream_t *substream) { unsigned long flags; - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_close [%s]\n", stateName[korg1212->cardState]); @@ -1532,7 +1520,7 @@ snd_pcm_hw_params_t *params) { unsigned long flags; - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); int err; #if K1212_DEBUG_LEVEL > 0 @@ -1560,21 +1548,21 @@ static int snd_korg1212_prepare(snd_pcm_substream_t *substream) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); int rc; #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_prepare [%s]\n", stateName[korg1212->cardState]); #endif - spin_lock(&korg1212->lock); + spin_lock_irq(&korg1212->lock); /* FIXME: we should wait for ack! */ if (korg1212->stop_pending_cnt > 0) { #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_prepare - Stop is pending... [%s]\n", stateName[korg1212->cardState]); #endif - spin_unlock(&korg1212->lock); + spin_unlock_irq(&korg1212->lock); return -EAGAIN; /* writel(0, &korg1212->sharedBufferPtr->cardCommand); @@ -1587,7 +1575,7 @@ korg1212->currentBuffer = 0; - spin_unlock(&korg1212->lock); + spin_unlock_irq(&korg1212->lock); return rc ? -EINVAL : 0; } @@ -1595,7 +1583,7 @@ static int snd_korg1212_trigger(snd_pcm_substream_t *substream, int cmd) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); int rc; #if K1212_DEBUG_LEVEL > 0 @@ -1640,7 +1628,7 @@ static snd_pcm_uframes_t snd_korg1212_playback_pointer(snd_pcm_substream_t *substream) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); snd_pcm_uframes_t pos; pos = korg1212->currentBuffer * kPlayBufferFrames; @@ -1655,7 +1643,7 @@ static snd_pcm_uframes_t snd_korg1212_capture_pointer(snd_pcm_substream_t *substream) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); snd_pcm_uframes_t pos; pos = korg1212->currentBuffer * kPlayBufferFrames; @@ -1674,7 +1662,7 @@ void __user *src, snd_pcm_uframes_t count) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); #if K1212_DEBUG_LEVEL > 2 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count); @@ -1689,7 +1677,7 @@ snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_silence [%s]\n", stateName[korg1212->cardState]); @@ -1704,7 +1692,7 @@ void __user *dst, snd_pcm_uframes_t count) { - korg1212_t *korg1212 = _snd_pcm_substream_chip(substream); + korg1212_t *korg1212 = snd_pcm_substream_chip(substream); #if K1212_DEBUG_LEVEL > 2 K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count); @@ -1749,30 +1737,28 @@ static int snd_korg1212_control_phase_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int i = kcontrol->private_value; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); u->value.integer.value[0] = korg1212->volumePhase[i]; if (i >= 8) u->value.integer.value[1] = korg1212->volumePhase[i+1]; - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return 0; } static int snd_korg1212_control_phase_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int change = 0; int i, val; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); i = kcontrol->private_value; @@ -1798,7 +1784,7 @@ } } - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return change; } @@ -1814,11 +1800,10 @@ static int snd_korg1212_control_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int i; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); i = kcontrol->private_value; u->value.integer.value[0] = abs(korg1212->sharedBufferPtr->volumeData[i]); @@ -1826,20 +1811,19 @@ if (i >= 8) u->value.integer.value[1] = abs(korg1212->sharedBufferPtr->volumeData[i+1]); - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return 0; } static int snd_korg1212_control_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int change = 0; int i; int val; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); i = kcontrol->private_value; @@ -1859,7 +1843,7 @@ } } - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return change; } @@ -1878,11 +1862,10 @@ static int snd_korg1212_control_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int i; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); i = kcontrol->private_value; u->value.enumerated.item[0] = korg1212->sharedBufferPtr->routeData[i]; @@ -1890,18 +1873,17 @@ if (i >= 8) u->value.enumerated.item[1] = korg1212->sharedBufferPtr->routeData[i+1]; - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return 0; } static int snd_korg1212_control_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int change = 0, i; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); i = kcontrol->private_value; @@ -1917,7 +1899,7 @@ } } - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return change; } @@ -1933,26 +1915,24 @@ static int snd_korg1212_control_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); u->value.integer.value[0] = korg1212->leftADCInSens; u->value.integer.value[1] = korg1212->rightADCInSens; - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return 0; } static int snd_korg1212_control_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); int change = 0; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); if (u->value.integer.value[0] != korg1212->leftADCInSens) { korg1212->leftADCInSens = u->value.integer.value[0]; @@ -1963,7 +1943,7 @@ change = 1; } - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); if (change) snd_korg1212_WriteADCSensitivity(korg1212); @@ -1985,29 +1965,27 @@ static int snd_korg1212_control_sync_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); ucontrol->value.enumerated.item[0] = korg1212->clkSource; - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return 0; } static int snd_korg1212_control_sync_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - korg1212_t *korg1212 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + korg1212_t *korg1212 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.enumerated.item[0] % 3; - spin_lock_irqsave(&korg1212->lock, flags); + spin_lock_irq(&korg1212->lock); change = val != korg1212->clkSource; snd_korg1212_SetClockSource(korg1212, val); - spin_unlock_irqrestore(&korg1212->lock, flags); + spin_unlock_irq(&korg1212->lock); return change; } @@ -2063,8 +2041,6 @@ } }; -#define K1212_CONTROL_ELEMENTS (sizeof(snd_korg1212_controls) / sizeof(snd_korg1212_controls[0])) - /* * proc interface */ @@ -2120,29 +2096,13 @@ korg1212->iobase = 0; } - if (korg1212->res_iomem != NULL) { - release_resource(korg1212->res_iomem); - kfree_nocheck(korg1212->res_iomem); - korg1212->res_iomem = NULL; - } - - if (korg1212->res_ioport != NULL) { - release_resource(korg1212->res_ioport); - kfree_nocheck(korg1212->res_ioport); - korg1212->res_ioport = NULL; - } - - if (korg1212->res_iomem2 != NULL) { - release_resource(korg1212->res_iomem2); - kfree_nocheck(korg1212->res_iomem2); - korg1212->res_iomem2 = NULL; - } + pci_release_regions(korg1212->pci); // ---------------------------------------------------- // free up memory resources used for the DSP download. // ---------------------------------------------------- if (korg1212->dma_dsp.area) { - snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_dsp); + snd_dma_free_pages(&korg1212->dma_dsp); korg1212->dma_dsp.area = NULL; } @@ -2152,12 +2112,12 @@ // free up memory resources used for the Play/Rec Buffers // ------------------------------------------------------ if (korg1212->dma_play.area) { - snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_play); + snd_dma_free_pages(&korg1212->dma_play); korg1212->dma_play.area = NULL; } if (korg1212->dma_rec.area) { - snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_rec); + snd_dma_free_pages(&korg1212->dma_rec); korg1212->dma_rec.area = NULL; } @@ -2167,17 +2127,17 @@ // free up memory resources used for the Shared Buffers // ---------------------------------------------------- if (korg1212->dma_shared.area) { - snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_shared); + snd_dma_free_pages(&korg1212->dma_shared); korg1212->dma_shared.area = NULL; } - snd_magic_kfree(korg1212); + kfree(korg1212); return 0; } static int snd_korg1212_dev_free(snd_device_t *device) { - korg1212_t *korg1212 = snd_magic_cast(korg1212_t, device->device_data, return -ENXIO); + korg1212_t *korg1212 = device->device_data; #if K1212_DEBUG_LEVEL > 0 K1212_DEBUG_PRINTK("K1212_DEBUG: Freeing device\n"); #endif @@ -2201,7 +2161,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - korg1212 = snd_magic_kcalloc(korg1212_t, 0, GFP_KERNEL); + korg1212 = kcalloc(1, sizeof(*korg1212), GFP_KERNEL); if (korg1212 == NULL) return -ENOMEM; @@ -2232,6 +2192,11 @@ for (i=0; ivolumePhase[i] = 0; + if ((err = pci_request_regions(pci, "korg1212")) < 0) { + kfree(korg1212); + return err; + } + korg1212->iomem = pci_resource_start(korg1212->pci, 0); korg1212->ioport = pci_resource_start(korg1212->pci, 1); korg1212->iomem2 = pci_resource_start(korg1212->pci, 2); @@ -2252,27 +2217,6 @@ stateName[korg1212->cardState]); #endif - korg1212->res_iomem = request_mem_region(korg1212->iomem, iomem_size, "korg1212"); - if (korg1212->res_iomem == NULL) { - snd_printk(KERN_ERR "unable to grab region 0x%lx-0x%lx\n", - korg1212->iomem, korg1212->iomem + iomem_size - 1); - return -EBUSY; - } - - korg1212->res_ioport = request_region(korg1212->ioport, ioport_size, "korg1212"); - if (korg1212->res_ioport == NULL) { - snd_printk(KERN_ERR "unable to grab region 0x%lx-0x%lx\n", - korg1212->ioport, korg1212->ioport + ioport_size - 1); - return -EBUSY; - } - - korg1212->res_iomem2 = request_mem_region(korg1212->iomem2, iomem2_size, "korg1212"); - if (korg1212->res_iomem2 == NULL) { - snd_printk(KERN_ERR "unable to grab region 0x%lx-0x%lx\n", - korg1212->iomem2, korg1212->iomem2 + iomem2_size - 1); - return -EBUSY; - } - if ((korg1212->iobase = (unsigned long) ioremap(korg1212->iomem, iomem_size)) == 0) { snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", korg1212->iobase, korg1212->iobase + iomem_size - 1); @@ -2329,11 +2273,8 @@ stateName[korg1212->cardState]); #endif - memset(&korg1212->dma_dev, 0, sizeof(korg1212->dma_dev)); - korg1212->dma_dev.type = SNDRV_DMA_TYPE_DEV; - korg1212->dma_dev.dev = snd_dma_pci_data(korg1212->pci); - - if (snd_dma_alloc_pages(&korg1212->dma_dev, sizeof(KorgSharedBuffer), &korg1212->dma_shared) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + sizeof(KorgSharedBuffer), &korg1212->dma_shared) < 0) { snd_printk(KERN_ERR "can not allocate shared buffer memory (%Zd bytes)\n", sizeof(KorgSharedBuffer)); return -ENOMEM; } @@ -2348,7 +2289,8 @@ korg1212->DataBufsSize = sizeof(KorgAudioBuffer) * kNumBuffers; - if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->DataBufsSize, &korg1212->dma_play) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + korg1212->DataBufsSize, &korg1212->dma_play) < 0) { snd_printk(KERN_ERR "can not allocate play data buffer memory (%d bytes)\n", korg1212->DataBufsSize); return -ENOMEM; } @@ -2360,7 +2302,8 @@ korg1212->playDataBufsPtr, korg1212->PlayDataPhy, korg1212->DataBufsSize); #endif - if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->DataBufsSize, &korg1212->dma_rec) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + korg1212->DataBufsSize, &korg1212->dma_rec) < 0) { snd_printk(KERN_ERR "can not allocate record data buffer memory (%d bytes)\n", korg1212->DataBufsSize); return -ENOMEM; } @@ -2390,7 +2333,8 @@ korg1212->AdatTimeCodePhy = korg1212->sharedBufferPhy + offsetof(KorgSharedBuffer, AdatTimeCode); - if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->dspCodeSize, &korg1212->dma_dsp) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + korg1212->dspCodeSize, &korg1212->dma_dsp) < 0) { snd_printk(KERN_ERR "can not allocate dsp code memory (%d bytes)\n", korg1212->dspCodeSize); return -ENOMEM; } @@ -2420,7 +2364,7 @@ "VolumeTablePhy = %08x L[%08x]\n" "RoutingTablePhy = %08x L[%08x]\n" "AdatTimeCodePhy = %08x L[%08x]\n", - korg1212->dma_dsp.addr, UpperWordSwap(korg1212->dma_dsp.addr), + (int)korg1212->dma_dsp.addr, UpperWordSwap(korg1212->dma_dsp.addr), korg1212->PlayDataPhy, LowerWordSwap(korg1212->PlayDataPhy), korg1212->RecDataPhy, LowerWordSwap(korg1212->RecDataPhy), korg1212->VolumeTablePhy, LowerWordSwap(korg1212->VolumeTablePhy), @@ -2443,7 +2387,7 @@ //snd_pcm_lib_preallocate_pages_for_all(korg1212->pcm, // K1212_MAX_BUF_SIZE, K1212_MAX_BUF_SIZE, GFP_KERNEL); - for (i = 0; i < K1212_CONTROL_ELEMENTS; i++) { + for (i = 0; i < ARRAY_SIZE(snd_korg1212_controls); i++) { err = snd_ctl_add(korg1212->card, snd_ctl_new1(&snd_korg1212_controls[i], korg1212)); if (err < 0) return err; diff -Nru a/sound/pci/maestro3.c b/sound/pci/maestro3.c --- a/sound/pci/maestro3.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/maestro3.c 2004-09-06 16:37:53 -07:00 @@ -51,8 +51,7 @@ MODULE_AUTHOR("Zach Brown , Takashi Iwai "); MODULE_DESCRIPTION("ESS Maestro3 PCI"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{ESS,Maestro3 PCI}," +MODULE_SUPPORTED_DEVICE("{{ESS,Maestro3 PCI}," "{ESS,ES1988}," "{ESS,Allegro PCI}," "{ESS,Allegro-1 PCI}," @@ -67,19 +66,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable this soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(external_amp, bool, boot_devs, 0444); MODULE_PARM_DESC(external_amp, "Enable external amp for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); module_param_array(amp_gpio, int, boot_devs, 0444); MODULE_PARM_DESC(amp_gpio, "GPIO pin number for external amp. (default = -1)"); -MODULE_PARM_SYNTAX(amp_gpio, SNDRV_ENABLED); #define MAX_PLAYBACKS 2 #define MAX_CAPTURES 1 @@ -776,8 +770,6 @@ typedef struct snd_m3_dma m3_dma_t; typedef struct snd_m3 m3_t; -#define chip_t m3_t - /* quirk lists */ struct m3_quirk { @@ -827,7 +819,6 @@ snd_card_t *card; unsigned long iobase; - struct resource *iobase_res; int irq; int allegro_flag : 1; @@ -1165,12 +1156,11 @@ { m3_t *chip = snd_pcm_substream_chip(subs); m3_dma_t *s = (m3_dma_t*)subs->runtime->private_data; - unsigned long flags; int err = -EINVAL; snd_assert(s != NULL, return -ENXIO); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -1191,7 +1181,7 @@ } break; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return err; } @@ -1477,7 +1467,6 @@ m3_t *chip = snd_pcm_substream_chip(subs); snd_pcm_runtime_t *runtime = subs->runtime; m3_dma_t *s = (m3_dma_t*)runtime->private_data; - unsigned long flags; snd_assert(s != NULL, return -ENXIO); @@ -1488,7 +1477,7 @@ runtime->rate < 8000) return -EINVAL; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_m3_pcm_setup1(chip, s, subs); @@ -1499,7 +1488,7 @@ snd_m3_pcm_setup2(chip, s, runtime); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1573,7 +1562,7 @@ static irqreturn_t snd_m3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - m3_t *chip = snd_magic_cast(m3_t, dev_id, ); + m3_t *chip = dev_id; u8 status; int i; @@ -1670,20 +1659,19 @@ { int i; m3_dma_t *s; - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < chip->num_substreams; i++) { s = &chip->substreams[i]; if (! s->opened) goto __found; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return -ENOMEM; __found: s->opened = 1; s->running = 0; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); subs->runtime->private_data = s; s->substream = subs; @@ -1703,12 +1691,11 @@ snd_m3_substream_close(m3_t *chip, snd_pcm_substream_t *subs) { m3_dma_t *s = (m3_dma_t*) subs->runtime->private_data; - unsigned long flags; if (s == NULL) return; /* not opened properly */ - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); if (s->substream && s->running) snd_m3_pcm_stop(chip, s, s->substream); /* does this happen? */ if (s->in_lists) { @@ -1719,7 +1706,7 @@ } s->running = 0; s->opened = 0; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); } static int @@ -1848,7 +1835,7 @@ static unsigned short snd_m3_ac97_read(ac97_t *ac97, unsigned short reg) { - m3_t *chip = snd_magic_cast(m3_t, ac97->private_data, return -ENXIO); + m3_t *chip = ac97->private_data; unsigned short ret = 0; unsigned long flags; @@ -1867,7 +1854,7 @@ static void snd_m3_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - m3_t *chip = snd_magic_cast(m3_t, ac97->private_data, return); + m3_t *chip = ac97->private_data; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); @@ -1983,14 +1970,15 @@ static int __devinit snd_m3_mixer(m3_t *chip) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; int err; + static ac97_bus_ops_t ops = { + .write = snd_m3_ac97_write, + .read = snd_m3_ac97_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_m3_ac97_write; - bus.read = snd_m3_ac97_read; - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); @@ -2167,7 +2155,7 @@ KDATA_DMA_XFER0); /* write kernel into code memory.. */ - for (i = 0 ; i < sizeof(assp_kernel_image) / 2; i++) { + for (i = 0 ; i < ARRAY_SIZE(assp_kernel_image); i++) { snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, REV_B_CODE_MEMORY_BEGIN + i, assp_kernel_image[i]); @@ -2179,7 +2167,7 @@ * drop it there. It seems that the minisrc doesn't * need vectors, so we won't bother with them.. */ - for (i = 0; i < sizeof(assp_minisrc_image) / 2; i++) { + for (i = 0; i < ARRAY_SIZE(assp_minisrc_image); i++) { snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE, 0x400 + i, assp_minisrc_image[i]); @@ -2368,22 +2356,21 @@ static int snd_m3_free(m3_t *chip) { - unsigned long flags; m3_dma_t *s; int i; if (chip->substreams) { - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); for (i = 0; i < chip->num_substreams; i++) { s = &chip->substreams[i]; /* check surviving pcms; this should not happen though.. */ if (s->substream && s->running) snd_m3_pcm_stop(chip, s, s->substream); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); kfree(chip->substreams); } - if (chip->iobase_res) { + if (chip->iobase) { snd_m3_outw(chip, HOST_INT_CTRL, 0); /* disable ints */ } @@ -2392,17 +2379,15 @@ vfree(chip->suspend_mem); #endif - if (chip->irq >= 0) + if (chip->irq >= 0) { synchronize_irq(chip->irq); - - if (chip->iobase_res) { - release_resource(chip->iobase_res); - kfree_nocheck(chip->iobase_res); - } - if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); + } + + if (chip->iobase) + pci_release_regions(chip->pci); - snd_magic_kfree(chip); + kfree(chip); return 0; } @@ -2413,7 +2398,7 @@ #ifdef CONFIG_PM static int m3_suspend(snd_card_t *card, unsigned int state) { - m3_t *chip = snd_magic_cast(m3_t, card->pm_private_data, return -EINVAL); + m3_t *chip = card->pm_private_data; int i, index; if (chip->suspend_mem == NULL) @@ -2444,12 +2429,14 @@ static int m3_resume(snd_card_t *card, unsigned int state) { - m3_t *chip = snd_magic_cast(m3_t, card->pm_private_data, return -EINVAL); + m3_t *chip = card->pm_private_data; int i, index; if (chip->suspend_mem == NULL) return 0; + pci_set_master(chip->pci); + /* first lets just bring everything back. .*/ snd_m3_outw(chip, 0, 0x54); snd_m3_outw(chip, 0, 0x56); @@ -2489,7 +2476,7 @@ static int snd_m3_dev_free(snd_device_t *device) { - m3_t *chip = snd_magic_cast(m3_t, device->device_data, return -ENXIO); + m3_t *chip = device->device_data; return snd_m3_free(chip); } @@ -2519,7 +2506,7 @@ return -ENXIO; } - chip = snd_magic_kcalloc(m3_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; @@ -2562,18 +2549,16 @@ chip->num_substreams = NR_DSPS; chip->substreams = kmalloc(sizeof(m3_dma_t) * chip->num_substreams, GFP_KERNEL); if (chip->substreams == NULL) { - snd_magic_kfree(chip); + kfree(chip); return -ENOMEM; } memset(chip->substreams, 0, sizeof(m3_dma_t) * chip->num_substreams); - chip->iobase = pci_resource_start(pci, 0); - if ((chip->iobase_res = request_region(chip->iobase, 256, - card->driver)) == NULL) { - snd_printk("unable to grab i/o ports %ld\n", chip->iobase); + if ((err = pci_request_regions(pci, card->driver)) < 0) { snd_m3_free(chip); - return -EBUSY; + return err; } + chip->iobase = pci_resource_start(pci, 0); /* just to be sure */ pci_set_master(pci); diff -Nru a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c --- a/sound/pci/mixart/mixart.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/mixart/mixart.c 2004-09-06 16:37:53 -07:00 @@ -42,25 +42,19 @@ MODULE_AUTHOR("Digigram "); MODULE_DESCRIPTION("Digigram " CARD_NAME); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Digigram," CARD_NAME "}}"); +MODULE_SUPPORTED_DEVICE("{{Digigram," CARD_NAME "}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 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 boot_devs; -#define chip_t mixart_t - module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); /* */ @@ -247,21 +241,27 @@ /* pipe is not yet defined */ if( pipe->status == PIPE_UNDEFINED ) { int err, i; - mixart_streaming_group_t streaming_group_resp; - mixart_streaming_group_req_t streaming_group_req; + struct { + mixart_streaming_group_req_t sgroup_req; + mixart_streaming_group_t sgroup_resp; + } *buf; snd_printdd("add_ref_pipe audio chip(%d) pcm(%d)\n", chip->chip_idx, pcm_number); + buf = kmalloc(sizeof(*buf), GFP_KERNEL); + if (!buf) + return NULL; + request.uid = (mixart_uid_t){0,0}; /* should be StreamManagerUID, but zero is OK if there is only one ! */ - request.data = &streaming_group_req; - request.size = sizeof(streaming_group_req); + request.data = &buf->sgroup_req; + request.size = sizeof(buf->sgroup_req); - memset(&streaming_group_req, 0, sizeof(streaming_group_req)); + memset(&buf->sgroup_req, 0, sizeof(buf->sgroup_req)); - streaming_group_req.stream_count = stream_count; - streaming_group_req.channel_count = 2; - streaming_group_req.latency = 256; - streaming_group_req.connector = pipe->uid_left_connector; /* the left connector */ + buf->sgroup_req.stream_count = stream_count; + buf->sgroup_req.channel_count = 2; + buf->sgroup_req.latency = 256; + buf->sgroup_req.connector = pipe->uid_left_connector; /* the left connector */ for (i=0; isgroup_req.stream_info[i].size_max_byte_frame = 1024; + buf->sgroup_req.stream_info[i].size_max_sample_frame = 256; + buf->sgroup_req.stream_info[i].nb_bytes_max_per_sample = MIXART_FLOAT_P__4_0_TO_HEX; /* is 4.0f */ /* find the right bufferinfo_array */ j = (chip->chip_idx * MIXART_MAX_STREAM_PER_CARD) + (pcm_number * (MIXART_PLAYBACK_STREAMS + MIXART_CAPTURE_STREAMS)) + i; if(capture) j += MIXART_PLAYBACK_STREAMS; /* in the array capture is behind playback */ - streaming_group_req.flow_entry[i] = j; + buf->sgroup_req.flow_entry[i] = j; flowinfo = (struct mixart_flowinfo *)chip->mgr->flowinfo.area; flowinfo[j].bufferinfo_array_phy_address = (u32)chip->mgr->bufferinfo.addr + (j * sizeof(mixart_bufferinfo_t)); @@ -294,17 +294,19 @@ } } - err = snd_mixart_send_msg(chip->mgr, &request, sizeof(streaming_group_resp), &streaming_group_resp); - if((err < 0) || (streaming_group_resp.status != 0)) { - snd_printk(KERN_ERR "error MSG_STREAM_ADD_**PUT_GROUP err=%x stat=%x !\n", err, streaming_group_resp.status); + err = snd_mixart_send_msg(chip->mgr, &request, sizeof(buf->sgroup_resp), &buf->sgroup_resp); + if((err < 0) || (buf->sgroup_resp.status != 0)) { + snd_printk(KERN_ERR "error MSG_STREAM_ADD_**PUT_GROUP err=%x stat=%x !\n", err, buf->sgroup_resp.status); + kfree(buf); return NULL; } - pipe->group_uid = streaming_group_resp.group; /* id of the pipe, as returned by embedded */ - pipe->stream_count = streaming_group_resp.stream_count; - /* pipe->stream_uid[i] = streaming_group_resp.stream[i].stream_uid; */ + pipe->group_uid = buf->sgroup_resp.group; /* id of the pipe, as returned by embedded */ + pipe->stream_count = buf->sgroup_resp.stream_count; + /* pipe->stream_uid[i] = buf->sgroup_resp.stream[i].stream_uid; */ pipe->status = PIPE_STOPPED; + kfree(buf); } if(monitoring) pipe->monitoring = 1; @@ -458,8 +460,6 @@ /* * prepare callback for all pcms - * - * NOTE: this callback is non-atomic (pcm->info_flags |= SNDRV_PCM_INFO_NONATOMIC_OPS) */ static int snd_mixart_prepare(snd_pcm_substream_t *subs) { @@ -620,7 +620,10 @@ bufferinfo[i].available_length = subs->runtime->dma_bytes; /* bufferinfo[i].buffer_id is already defined */ - snd_printdd("snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n", i, subs->runtime->dma_addr, subs->runtime->dma_bytes, subs->number); + snd_printdd("snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n", i, + bufferinfo[i].buffer_address, + bufferinfo[i].available_length, + subs->number); } up(&mgr->setup_mutex); @@ -901,6 +904,7 @@ static void preallocate_buffers(mixart_t *chip, snd_pcm_t *pcm) { +#if 0 snd_pcm_substream_t *subs; int stream; @@ -912,6 +916,7 @@ subs->stream << 8 | (subs->number + 1) | (chip->chip_idx + 1) << 24; } +#endif snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->mgr->pci), 32*1024, 32*1024); } @@ -937,7 +942,7 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_mixart_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_mixart_capture_ops); - pcm->info_flags = SNDRV_PCM_INFO_NONATOMIC_OPS; + pcm->info_flags = 0; strcpy(pcm->name, name); preallocate_buffers(chip, pcm); @@ -968,7 +973,7 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_mixart_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_mixart_capture_ops); - pcm->info_flags = SNDRV_PCM_INFO_NONATOMIC_OPS; + pcm->info_flags = 0; strcpy(pcm->name, name); preallocate_buffers(chip, pcm); @@ -979,13 +984,13 @@ static int snd_mixart_chip_free(mixart_t *chip) { - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_mixart_chip_dev_free(snd_device_t *device) { - mixart_t *chip = snd_magic_cast(mixart_t, device->device_data, return -ENXIO); + mixart_t *chip = device->device_data; return snd_mixart_chip_free(chip); } @@ -1000,7 +1005,7 @@ .dev_free = snd_mixart_chip_dev_free, }; - mgr->chip[idx] = chip = snd_magic_kcalloc(mixart_t, 0, GFP_KERNEL); + mgr->chip[idx] = chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (! chip) { snd_printk(KERN_ERR "cannot allocate chip\n"); return -ENOMEM; @@ -1074,24 +1079,21 @@ for (i = 0; i < 2; i++) { if (mgr->mem[i].virt) iounmap((void *)mgr->mem[i].virt); - if (mgr->mem[i].res) { - release_resource(mgr->mem[i].res); - kfree_nocheck(mgr->mem[i].res); - } } + pci_release_regions(mgr->pci); /* free flowarray */ if(mgr->flowinfo.area) { - snd_dma_free_pages(&mgr->dma_dev, &mgr->flowinfo); + snd_dma_free_pages(&mgr->flowinfo); mgr->flowinfo.area = NULL; } /* free bufferarray */ if(mgr->bufferinfo.area) { - snd_dma_free_pages(&mgr->dma_dev, &mgr->bufferinfo); + snd_dma_free_pages(&mgr->bufferinfo); mgr->bufferinfo.area = NULL; } - snd_magic_kfree(mgr); + kfree(mgr); return 0; } @@ -1157,7 +1159,7 @@ struct file *file, char __user *buf, unsigned long count, unsigned long pos) { - mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO); + mixart_mgr_t *mgr = entry->private_data; count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ if(count <= 0) @@ -1176,7 +1178,7 @@ struct file *file, char __user *buf, unsigned long count, unsigned long pos) { - mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, entry->private_data, return -ENXIO); + mixart_mgr_t *mgr = entry->private_data; count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ if(count <= 0) @@ -1202,7 +1204,7 @@ static void snd_mixart_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - mixart_t *chip = snd_magic_cast(mixart_t, entry->private_data, return); + mixart_t *chip = entry->private_data; u32 ref; snd_iprintf(buffer, "Digigram miXart (alsa card %d)\n\n", chip->chip_idx); @@ -1289,15 +1291,14 @@ pci_set_master(pci); /* check if we can restrict PCI DMA transfers to 32 bits */ - if (!pci_dma_supported(pci, 0xffffffff)) { + if (pci_set_dma_mask(pci, 0xffffffff) < 0) { snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n"); return -ENXIO; } - pci_set_dma_mask(pci, 0xffffffff); /* */ - mgr = snd_magic_kcalloc(mixart_mgr_t, 0, GFP_KERNEL); + mgr = kcalloc(1, sizeof(*mgr), GFP_KERNEL); if (! mgr) return -ENOMEM; @@ -1305,19 +1306,14 @@ mgr->irq = -1; /* resource assignment */ + if ((err = pci_request_regions(pci, CARD_NAME)) < 0) { + kfree(mgr); + return err; + } for (i = 0; i < 2; i++) { - static int memory_sizes[2] = { - MIXART_BA0_SIZE, /* 16M */ - MIXART_BA1_SIZE /* 4 k */ - }; mgr->mem[i].phys = pci_resource_start(pci, i); - mgr->mem[i].res = request_mem_region(mgr->mem[i].phys, memory_sizes[i], CARD_NAME); - if (! mgr->mem[i].res) { - snd_printk(KERN_ERR "unable to grab memory 0x%lx\n", mgr->mem[i].phys); - snd_mixart_free(mgr); - return -EBUSY; - } - mgr->mem[i].virt = (unsigned long)ioremap_nocache(mgr->mem[i].phys, memory_sizes[i]); + mgr->mem[i].virt = (unsigned long)ioremap_nocache(mgr->mem[i].phys, + pci_resource_len(pci, i)); } if (request_irq(pci->irq, snd_mixart_interrupt, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *)mgr)) { @@ -1331,13 +1327,13 @@ sprintf(mgr->longname, "%s at 0x%lx & 0x%lx, irq %i", mgr->shortname, mgr->mem[0].phys, mgr->mem[1].phys, mgr->irq); /* ISR spinlock */ - mgr->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&mgr->lock); /* init mailbox */ mgr->msg_fifo_readptr = 0; mgr->msg_fifo_writeptr = 0; - mgr->msg_lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(&mgr->msg_lock); init_MUTEX(&mgr->msg_mutex); init_waitqueue_head(&mgr->msg_sleep); atomic_set(&mgr->msg_processed, 0); @@ -1391,13 +1387,10 @@ /* init firmware status (mgr->hwdep->dsp_loaded reset in hwdep_new) */ mgr->board_type = MIXART_DAUGHTER_TYPE_NONE; - memset(&mgr->dma_dev, 0, sizeof(mgr->dma_dev)); - mgr->dma_dev.type = SNDRV_DMA_TYPE_DEV; - mgr->dma_dev.dev = snd_dma_pci_data(mgr->pci); - /* create array of streaminfo */ size = PAGE_ALIGN( (MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS * sizeof(mixart_flowinfo_t)) ); - if (snd_dma_alloc_pages(&mgr->dma_dev, size, &mgr->flowinfo) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + size, &mgr->flowinfo) < 0) { snd_mixart_free(mgr); return -ENOMEM; } @@ -1406,7 +1399,8 @@ /* create array of bufferinfo */ size = PAGE_ALIGN( (MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS * sizeof(mixart_bufferinfo_t)) ); - if (snd_dma_alloc_pages(&mgr->dma_dev, size, &mgr->bufferinfo) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + size, &mgr->bufferinfo) < 0) { snd_mixart_free(mgr); return -ENOMEM; } diff -Nru a/sound/pci/mixart/mixart.h b/sound/pci/mixart/mixart.h --- a/sound/pci/mixart/mixart.h 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/mixart/mixart.h 2004-09-06 16:37:50 -07:00 @@ -115,7 +115,6 @@ snd_hwdep_t *hwdep; unsigned int board_type; /* read from embedded once elf file is loaded, 250 = miXart8, 251 = with AES, 252 = with Cobranet */ - struct snd_dma_device dma_dev; struct snd_dma_buffer flowinfo; struct snd_dma_buffer bufferinfo; diff -Nru a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c --- a/sound/pci/mixart/mixart_core.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/mixart/mixart_core.c 2004-09-06 16:37:55 -07:00 @@ -379,7 +379,7 @@ snd_printk(KERN_ERR "tasklet : error MSG_STREAM_ST***_***PUT_STAGE_PACKET status=%x\n", mixart_msg_data[0]); break; default: - snd_printdd("tasklet received mf(%x) : msg_id(%x) uid(%x, %x) size(%d)\n", + snd_printdd("tasklet received mf(%x) : msg_id(%x) uid(%x, %x) size(%zd)\n", msg, resp.message_id, resp.uid.object_id, resp.uid.desc, resp.size); break; } @@ -403,7 +403,7 @@ irqreturn_t snd_mixart_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, dev_id, return IRQ_NONE); + mixart_mgr_t *mgr = dev_id; int err; mixart_msg_t resp; diff -Nru a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c --- a/sound/pci/mixart/mixart_hwdep.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/mixart/mixart_hwdep.c 2004-09-06 16:37:55 -07:00 @@ -146,7 +146,7 @@ static int mixart_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) { - mixart_mgr_t *mgr = snd_magic_cast(mixart_mgr_t, hw->private_data, return -ENXIO); + mixart_mgr_t *mgr = hw->private_data; strcpy(info->id, "miXart"); info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX; @@ -346,7 +346,7 @@ static int mixart_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) { - mixart_mgr_t* mgr = snd_magic_cast(mixart_mgr_t, hw->private_data, return -ENXIO); + mixart_mgr_t* mgr = hw->private_data; int err, card_index; u32 status_xilinx, status_elf, status_daught; u32 val; diff -Nru a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c --- a/sound/pci/mixart/mixart_mixer.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/mixart/mixart_mixer.c 2004-09-06 16:37:52 -07:00 @@ -31,8 +31,6 @@ #include #include "mixart_mixer.h" -#define chip_t mixart_t - static u32 mixart_analog_level[256] = { 0xc2c00000, /* [000] -96.0 dB */ 0xc2bf0000, /* [001] -95.5 dB */ diff -Nru a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c --- a/sound/pci/nm256/nm256.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/nm256/nm256.c 2004-09-06 16:37:54 -07:00 @@ -45,8 +45,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("NeoMagic NM256AV/ZX"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{NeoMagic,NM256AV}," +MODULE_SUPPORTED_DEVICE("{{NeoMagic,NM256AV}," "{NeoMagic,NM256ZX}}"); /* @@ -66,31 +65,22 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable this soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(playback_bufsize, int, boot_devs, 0444); MODULE_PARM_DESC(playback_bufsize, "DAC frame size in kB for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(playback_bufsize, SNDRV_ENABLED); module_param_array(capture_bufsize, int, boot_devs, 0444); MODULE_PARM_DESC(capture_bufsize, "ADC frame size in kB for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(capture_bufsize, SNDRV_ENABLED); module_param_array(force_ac97, bool, boot_devs, 0444); MODULE_PARM_DESC(force_ac97, "Force to use AC97 codec for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(force_ac97, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(buffer_top, int, boot_devs, 0444); MODULE_PARM_DESC(buffer_top, "Set the top address of audio buffer for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(buffer_top, SNDRV_ENABLED); module_param_array(use_cache, bool, boot_devs, 0444); MODULE_PARM_DESC(use_cache, "Enable the cache for coefficient table access."); -MODULE_PARM_SYNTAX(use_cache, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(vaio_hack, bool, boot_devs, 0444); MODULE_PARM_DESC(vaio_hack, "Enable workaround for Sony VAIO notebooks."); -MODULE_PARM_SYNTAX(vaio_hack, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); /* * hw definitions @@ -191,7 +181,6 @@ typedef struct snd_nm256 nm256_t; typedef struct snd_nm256_stream nm256_stream_t; -#define chip_t nm256_t struct snd_nm256_stream { @@ -414,9 +403,8 @@ static unsigned int samplerates[8] = { 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, }; -#define NUM_SAMPLERATES (sizeof(samplerates) / sizeof(samplerates[0])) static snd_pcm_hw_constraint_list_t constraints_rates = { - .count = NUM_SAMPLERATES, + .count = ARRAY_SIZE(samplerates), .list = samplerates, .mask = 0, }; @@ -428,7 +416,7 @@ snd_nm256_fixed_rate(unsigned int rate) { unsigned int i; - for (i = 0; i < NUM_SAMPLERATES; i++) { + for (i = 0; i < ARRAY_SIZE(samplerates); i++) { if (rate == samplerates[i]) return i; } @@ -542,12 +530,11 @@ { nm256_t *chip = snd_pcm_substream_chip(substream); nm256_stream_t *s = (nm256_stream_t*)substream->runtime->private_data; - unsigned long flags; int err = 0; snd_assert(s != NULL, return -ENXIO); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -567,7 +554,7 @@ err = -EINVAL; break; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return err; } @@ -576,12 +563,11 @@ { nm256_t *chip = snd_pcm_substream_chip(substream); nm256_stream_t *s = (nm256_stream_t*)substream->runtime->private_data; - unsigned long flags; int err = 0; snd_assert(s != NULL, return -ENXIO); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: @@ -601,7 +587,7 @@ err = -EINVAL; break; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); return err; } @@ -614,7 +600,6 @@ nm256_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; nm256_stream_t *s = (nm256_stream_t*)runtime->private_data; - unsigned long flags; snd_assert(s, return -ENXIO); s->dma_size = frames_to_bytes(runtime, substream->runtime->buffer_size); @@ -622,10 +607,10 @@ s->periods = substream->runtime->periods; s->cur_period = 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); s->running = 0; snd_nm256_set_format(chip, s, substream); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -660,9 +645,9 @@ return bytes_to_frames(substream->runtime, curp); } +/* Remapped I/O space can be accessible as pointer on i386 */ +/* This might be changed in the future */ #ifndef __i386__ -/* FIXME: I/O space is not accessible via pointers on all architectures */ - /* * silence / copy for playback */ @@ -757,10 +742,7 @@ */ static snd_pcm_hardware_t snd_nm256_playback = { - .info = -#ifdef __i386__ - SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID| -#endif + .info = SNDRV_PCM_INFO_MMAP_IOMEM |SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | /*SNDRV_PCM_INFO_PAUSE |*/ SNDRV_PCM_INFO_RESUME, @@ -779,10 +761,7 @@ static snd_pcm_hardware_t snd_nm256_capture = { - .info = -#ifdef __i386__ - SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID| -#endif + .info = SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | /*SNDRV_PCM_INFO_PAUSE |*/ SNDRV_PCM_INFO_RESUME, @@ -883,6 +862,7 @@ .copy = snd_nm256_playback_copy, .silence = snd_nm256_playback_silence, #endif + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_nm256_capture_ops = { @@ -896,6 +876,7 @@ #ifndef __i386__ .copy = snd_nm256_capture_copy, #endif + .mmap = snd_pcm_lib_mmap_iomem, }; static int __devinit @@ -932,16 +913,14 @@ static void snd_nm256_init_chip(nm256_t *chip) { - unsigned long flags; - - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); /* Reset everything. */ snd_nm256_writeb(chip, 0x0, 0x11); snd_nm256_writew(chip, 0x214, 0); /* stop sounds.. */ //snd_nm256_playback_stop(chip); //snd_nm256_capture_stop(chip); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); } @@ -981,7 +960,7 @@ static irqreturn_t snd_nm256_interrupt(int irq, void *dev_id, struct pt_regs *dummy) { - nm256_t *chip = snd_magic_cast(nm256_t, dev_id, return IRQ_NONE); + nm256_t *chip = dev_id; u16 status; u8 cbyte; @@ -1048,7 +1027,7 @@ static irqreturn_t snd_nm256_interrupt_zx(int irq, void *dev_id, struct pt_regs *dummy) { - nm256_t *chip = snd_magic_cast(nm256_t, dev_id, return IRQ_NONE); + nm256_t *chip = dev_id; u32 status; u8 cbyte; @@ -1139,7 +1118,7 @@ static unsigned short snd_nm256_ac97_read(ac97_t *ac97, unsigned short reg) { - nm256_t *chip = snd_magic_cast(nm256_t, ac97->private_data, return -ENXIO); + nm256_t *chip = ac97->private_data; int res; if (reg >= 128) @@ -1159,7 +1138,7 @@ snd_nm256_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { - nm256_t *chip = snd_magic_cast(nm256_t, ac97->private_data, return); + nm256_t *chip = ac97->private_data; int tries = 2; u32 base; @@ -1181,10 +1160,9 @@ static void snd_nm256_ac97_reset(ac97_t *ac97) { - nm256_t *chip = snd_magic_cast(nm256_t, ac97->private_data, return); - unsigned long flags; + nm256_t *chip = ac97->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); /* Reset the mixer. 'Tis magic! */ snd_nm256_writeb(chip, 0x6c0, 1); if (chip->latitude_workaround) { @@ -1193,20 +1171,25 @@ } snd_nm256_writeb(chip, 0x6cc, 0x80); snd_nm256_writeb(chip, 0x6cc, 0x0); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); } /* create an ac97 mixer interface */ static int __devinit snd_nm256_mixer(nm256_t *chip) { - ac97_bus_t bus, *pbus; - ac97_t ac97; + ac97_bus_t *pbus; + ac97_template_t ac97; int i, err; + static ac97_bus_ops_t ops = { + .reset = snd_nm256_ac97_reset, + .write = snd_nm256_ac97_write, + .read = snd_nm256_ac97_read, + }; /* looks like nm256 hangs up when unexpected registers are touched... */ static int mixer_regs[] = { AC97_MASTER, AC97_HEADPHONE, AC97_MASTER_MONO, - AC97_PC_BEEP, AC97_PHONE, AC97_MIC, AC97_LINE, + AC97_PC_BEEP, AC97_PHONE, AC97_MIC, AC97_LINE, AC97_CD, AC97_VIDEO, AC97_AUX, AC97_PCM, AC97_REC_SEL, AC97_REC_GAIN, AC97_GENERAL_PURPOSE, AC97_3D_CONTROL, AC97_EXTENDED_ID, @@ -1214,11 +1197,7 @@ -1 }; - memset(&bus, 0, sizeof(bus)); - bus.reset = snd_nm256_ac97_reset; - bus.write = snd_nm256_ac97_write; - bus.read = snd_nm256_ac97_read; - if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0) return err; memset(&ac97, 0, sizeof(ac97)); @@ -1290,7 +1269,7 @@ */ static int nm256_suspend(snd_card_t *card, unsigned int state) { - nm256_t *chip = snd_magic_cast(nm256_t, card->pm_private_data, return -EINVAL); + nm256_t *chip = card->pm_private_data; snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); @@ -1301,7 +1280,7 @@ static int nm256_resume(snd_card_t *card, unsigned int state) { - nm256_t *chip = snd_magic_cast(nm256_t, card->pm_private_data, return -EINVAL); + nm256_t *chip = card->pm_private_data; /* Perform a full reset on the hardware */ pci_enable_device(chip->pci); @@ -1340,13 +1319,13 @@ if (chip->irq >= 0) free_irq(chip->irq, (void*)chip); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_nm256_dev_free(snd_device_t *device) { - nm256_t *chip = snd_magic_cast(nm256_t, device->device_data, return -ENXIO); + nm256_t *chip = device->device_data; return snd_nm256_free(chip); } @@ -1368,7 +1347,7 @@ *chip_ret = NULL; - chip = snd_magic_kcalloc(nm256_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; diff -Nru a/sound/pci/rme32.c b/sound/pci/rme32.c --- a/sound/pci/rme32.c 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/rme32.c 2004-09-06 16:37:55 -07:00 @@ -1,7 +1,8 @@ /* * ALSA driver for RME Digi32, Digi32/8 and Digi32 PRO audio interfaces * - * Copyright (c) 2002, 2003 Martin Langer + * Copyright (c) 2002-2004 Martin Langer , + * Pilo Chambert * * Thanks to : Anders Torger , * Henk Hesselink @@ -52,6 +53,19 @@ * patch would be welcome! * * **************************************************************************** + * + * "The story after the long seeking" -- tiwai + * + * Ok, the situation regarding the full duplex is now improved a bit. + * In the fullduplex mode (given by the module parameter), the hardware buffer + * is split to halves for read and write directions at the DMA pointer. + * That is, the half above the current DMA pointer is used for write, and + * the half below is used for read. To mangle this strange behavior, an + * software intermediate buffer is introduced. This is, of course, not good + * from the viewpoint of the data transfer efficiency. However, this allows + * you to use arbitrary buffer sizes, instead of the fixed I/O buffer size. + * + * **************************************************************************** */ @@ -68,6 +82,7 @@ #include #include #include +#include #include #include @@ -76,22 +91,21 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 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 fullduplex[SNDRV_CARDS]; // = {[0 ... (SNDRV_CARDS - 1)] = 1}; static int boot_devs; module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi32 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for RME Digi32 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable RME Digi32 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); -MODULE_AUTHOR("Martin Langer "); +module_param_array(fullduplex, bool, boot_devs, 0444); +MODULE_PARM_DESC(fullduplex, "Support full-duplex mode."); +MODULE_AUTHOR("Martin Langer , Pilo Chambert "); MODULE_DESCRIPTION("RME Digi32, Digi32/8, Digi32 PRO"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{RME,Digi32}," "{RME,Digi32/8}," "{RME,Digi32 PRO}}"); +MODULE_SUPPORTED_DEVICE("{{RME,Digi32}," "{RME,Digi32/8}," "{RME,Digi32 PRO}}"); /* Defines for RME Digi32 series */ #define RME32_SPDIF_NCHANNELS 2 @@ -140,7 +154,7 @@ #define RME32_WCR_BITPOS_INP_1 7 /* Read control register bits */ -#define RME32_RCR_AUDIO_ADDR_MASK 0x10001 +#define RME32_RCR_AUDIO_ADDR_MASK 0x1ffff #define RME32_RCR_LOCK (1 << 23) /* 1=locked, 0=not locked */ #define RME32_RCR_ERF (1 << 26) /* 1=Error, 0=no Error */ #define RME32_RCR_FREQ_0 (1 << 27) /* CS841x frequency (record) */ @@ -168,6 +182,9 @@ /* Block sizes in bytes */ #define RME32_BLOCK_SIZE 8192 +/* Software intermediate buffer (max) size */ +#define RME32_MID_BUFFER_SIZE (1024*1024) + /* Hardware revisions */ #define RME32_32_REVISION 192 #define RME32_328_REVISION_OLD 100 @@ -194,7 +211,6 @@ spinlock_t lock; int irq; unsigned long port; - struct resource *res_port; unsigned long iobase; u32 wcreg; /* cached write control register value */ @@ -213,9 +229,11 @@ size_t playback_periodsize; /* in bytes, zero if not used */ size_t capture_periodsize; /* in bytes, zero if not used */ - snd_pcm_uframes_t playback_last_appl_ptr; - size_t playback_ptr; - size_t capture_ptr; + unsigned int fullduplex_mode; + int running; + + snd_pcm_indirect_t playback_pcm; + snd_pcm_indirect_t capture_pcm; snd_card_t *card; snd_pcm_t *spdif_pcm; @@ -243,33 +261,16 @@ static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream); -static int -snd_rme32_playback_trigger(snd_pcm_substream_t * substream, int cmd); - -static int -snd_rme32_capture_trigger(snd_pcm_substream_t * substream, int cmd); - -static snd_pcm_uframes_t -snd_rme32_playback_pointer(snd_pcm_substream_t * substream); - -static snd_pcm_uframes_t -snd_rme32_capture_pointer(snd_pcm_substream_t * substream); +static int snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd); static void snd_rme32_proc_init(rme32_t * rme32); static int snd_rme32_create_switches(snd_card_t * card, rme32_t * rme32); -static inline unsigned int snd_rme32_playback_ptr(rme32_t * rme32) -{ - - return (readl(rme32->iobase + RME32_IO_GET_POS) - & RME32_RCR_AUDIO_ADDR_MASK) >> rme32->playback_frlog; -} - -static inline unsigned int snd_rme32_capture_ptr(rme32_t * rme32) +static inline unsigned int snd_rme32_pcm_byteptr(rme32_t * rme32) { return (readl(rme32->iobase + RME32_IO_GET_POS) - & RME32_RCR_AUDIO_ADDR_MASK) >> rme32->capture_frlog; + & RME32_RCR_AUDIO_ADDR_MASK); } static int snd_rme32_ratecode(int rate) @@ -285,22 +286,24 @@ return 0; } +/* silence callback for halfduplex mode */ static int snd_rme32_playback_silence(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); count <<= rme32->playback_frlog; pos <<= rme32->playback_frlog; memset_io(rme32->iobase + RME32_IO_DATA_BUFFER + pos, 0, count); return 0; } +/* copy callback for halfduplex mode */ static int snd_rme32_playback_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); count <<= rme32->playback_frlog; pos <<= rme32->playback_frlog; if (copy_from_user_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos, @@ -309,11 +312,12 @@ return 0; } +/* copy callback for halfduplex mode */ static int snd_rme32_capture_copy(snd_pcm_substream_t * substream, int channel, /* not used (interleaved data) */ snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); count <<= rme32->capture_frlog; pos <<= rme32->capture_frlog; if (copy_to_user_fromio(dst, @@ -324,13 +328,14 @@ } /* - * Digital output capabilites (S/PDIF) + * SPDIF I/O capabilites (half-duplex mode) */ -static snd_pcm_hardware_t snd_rme32_playback_spdif_info = { - .info = (SNDRV_PCM_INFO_MMAP | +static snd_pcm_hardware_t snd_rme32_spdif_info = { + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_PAUSE), + SNDRV_PCM_INFO_PAUSE | + SNDRV_PCM_INFO_SYNC_START), .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE), .rates = (SNDRV_PCM_RATE_32000 | @@ -349,13 +354,39 @@ }; /* - * Digital input capabilites (S/PDIF) + * ADAT I/O capabilites (half-duplex mode) + */ +static snd_pcm_hardware_t snd_rme32_adat_info = +{ + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | + SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_PAUSE | + SNDRV_PCM_INFO_SYNC_START), + .formats= SNDRV_PCM_FMTBIT_S16_LE, + .rates = (SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000), + .rate_min = 44100, + .rate_max = 48000, + .channels_min = 8, + .channels_max = 8, + .buffer_bytes_max = RME32_BUFFER_SIZE, + .period_bytes_min = RME32_BLOCK_SIZE, + .period_bytes_max = RME32_BLOCK_SIZE, + .periods_min = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, + .periods_max = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, + .fifo_size = 0, +}; + +/* + * SPDIF I/O capabilites (full-duplex mode) */ -static snd_pcm_hardware_t snd_rme32_capture_spdif_info = { +static snd_pcm_hardware_t snd_rme32_spdif_fd_info = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_PAUSE), + SNDRV_PCM_INFO_PAUSE | + SNDRV_PCM_INFO_SYNC_START), .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE), .rates = (SNDRV_PCM_RATE_32000 | @@ -365,23 +396,24 @@ .rate_max = 48000, .channels_min = 2, .channels_max = 2, - .buffer_bytes_max = RME32_BUFFER_SIZE, + .buffer_bytes_max = RME32_MID_BUFFER_SIZE, .period_bytes_min = RME32_BLOCK_SIZE, .period_bytes_max = RME32_BLOCK_SIZE, - .periods_min = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, - .periods_max = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, + .periods_min = 2, + .periods_max = RME32_MID_BUFFER_SIZE / RME32_BLOCK_SIZE, .fifo_size = 0, }; /* - * Digital output capabilites (ADAT) + * ADAT I/O capabilites (full-duplex mode) */ -static snd_pcm_hardware_t snd_rme32_playback_adat_info = +static snd_pcm_hardware_t snd_rme32_adat_fd_info = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_PAUSE), + SNDRV_PCM_INFO_PAUSE | + SNDRV_PCM_INFO_SYNC_START), .formats= SNDRV_PCM_FMTBIT_S16_LE, .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000), @@ -389,38 +421,14 @@ .rate_max = 48000, .channels_min = 8, .channels_max = 8, - .buffer_bytes_max = RME32_BUFFER_SIZE, + .buffer_bytes_max = RME32_MID_BUFFER_SIZE, .period_bytes_min = RME32_BLOCK_SIZE, .period_bytes_max = RME32_BLOCK_SIZE, - .periods_min = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, - .periods_max = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, + .periods_min = 2, + .periods_max = RME32_MID_BUFFER_SIZE / RME32_BLOCK_SIZE, .fifo_size = 0, }; -/* - * Digital input capabilites (ADAT) - */ -static snd_pcm_hardware_t snd_rme32_capture_adat_info = -{ - .info = (SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_PAUSE), - .formats = SNDRV_PCM_FMTBIT_S16_LE, - .rates = (SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000), - .rate_min = 44100, - .rate_max = 48000, - .channels_min = 8, - .channels_max = 8, - .buffer_bytes_max = RME32_BUFFER_SIZE, - .period_bytes_min = RME32_BLOCK_SIZE, - .period_bytes_max = RME32_BLOCK_SIZE, - .periods_min = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, - .periods_max = RME32_BUFFER_SIZE / RME32_BLOCK_SIZE, - .fifo_size = 0, -}; - static void snd_rme32_reset_dac(rme32_t *rme32) { writel(rme32->wcreg | RME32_WCR_PD, @@ -677,11 +685,19 @@ snd_pcm_hw_params_t * params) { int err, rate, dummy; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; + + if (rme32->fullduplex_mode) { + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); + if (err < 0) + return err; + } else { + runtime->dma_area = (void *)(rme32->iobase + RME32_IO_DATA_BUFFER); + runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; + runtime->dma_bytes = RME32_BUFFER_SIZE; + } - if ((err = snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(params))) < 0) - return err; spin_lock_irq(&rme32->lock); if ((rme32->rcreg & RME32_RCR_KMODE) && (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) { @@ -719,45 +735,45 @@ return 0; } -static int snd_rme32_playback_hw_free(snd_pcm_substream_t * substream) -{ - snd_pcm_lib_free_pages(substream); - return 0; -} - static int snd_rme32_capture_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * params) { - unsigned long flags; int err, isadat, rate; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - if ((err = snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(params))) < 0) - return err; - spin_lock_irqsave(&rme32->lock, flags); + if (rme32->fullduplex_mode) { + err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); + if (err < 0) + return err; + } else { + runtime->dma_area = (void *)rme32->iobase + RME32_IO_DATA_BUFFER; + runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; + runtime->dma_bytes = RME32_BUFFER_SIZE; + } + + spin_lock_irq(&rme32->lock); /* enable AutoSync for record-preparing */ rme32->wcreg |= RME32_WCR_AUTOSYNC; writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); if ((err = snd_rme32_setformat(rme32, params_format(params))) < 0) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return err; } if ((err = snd_rme32_playback_setrate(rme32, params_rate(params))) < 0) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return err; } if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) { if ((int)params_rate(params) != rate) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EIO; } if ((isadat && runtime->hw.channels_min == 2) || (!isadat && runtime->hw.channels_min == 8)) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EIO; } } @@ -769,36 +785,26 @@ if (rme32->playback_periodsize != 0) { if (params_period_size(params) << rme32->capture_frlog != rme32->playback_periodsize) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EBUSY; } } rme32->capture_periodsize = params_period_size(params) << rme32->capture_frlog; - spin_unlock_irqrestore(&rme32->lock, flags); - - return 0; -} + spin_unlock_irq(&rme32->lock); -static int snd_rme32_capture_hw_free(snd_pcm_substream_t * substream) -{ - snd_pcm_lib_free_pages(substream); return 0; } -static void snd_rme32_playback_start(rme32_t * rme32, int from_pause) +static int snd_rme32_pcm_hw_free(snd_pcm_substream_t * substream) { - if (!from_pause) { - writel(0, rme32->iobase + RME32_IO_RESET_POS); - rme32->playback_last_appl_ptr = 0; - rme32->playback_ptr = 0; - } - - rme32->wcreg |= RME32_WCR_START; - writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); + rme32_t *rme32 = snd_pcm_substream_chip(substream); + if (! rme32->fullduplex_mode) + return 0; + return snd_pcm_lib_free_pages(substream); } -static void snd_rme32_capture_start(rme32_t * rme32, int from_pause) +static void snd_rme32_pcm_start(rme32_t * rme32, int from_pause) { if (!from_pause) { writel(0, rme32->iobase + RME32_IO_RESET_POS); @@ -808,7 +814,7 @@ writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); } -static void snd_rme32_playback_stop(rme32_t * rme32) +static void snd_rme32_pcm_stop(rme32_t * rme32, int to_pause) { /* * Check if there is an unconfirmed IRQ, if so confirm it, or else @@ -822,16 +828,8 @@ if (rme32->wcreg & RME32_WCR_SEL) rme32->wcreg |= RME32_WCR_MUTE; writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); -} - -static void snd_rme32_capture_stop(rme32_t * rme32) -{ - rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); - if (rme32->rcreg & RME32_RCR_IRQ) { - writel(0, rme32->iobase + RME32_IO_CONFIRM_ACTION_IRQ); - } - rme32->wcreg &= ~RME32_WCR_START; - writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); + if (! to_pause) + writel(0, rme32->iobase + RME32_IO_RESET_POS); } static irqreturn_t @@ -857,36 +855,46 @@ static unsigned int period_bytes[] = { RME32_BLOCK_SIZE }; -#define PERIOD_BYTES sizeof(period_bytes) / sizeof(period_bytes[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = { - .count = PERIOD_BYTES, + .count = ARRAY_SIZE(period_bytes), .list = period_bytes, .mask = 0 }; +static void snd_rme32_set_buffer_constraint(rme32_t *rme32, snd_pcm_runtime_t *runtime) +{ + if (! rme32->fullduplex_mode) { + snd_pcm_hw_constraint_minmax(runtime, + SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + RME32_BUFFER_SIZE, RME32_BUFFER_SIZE); + snd_pcm_hw_constraint_list(runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + &hw_constraints_period_bytes); + } +} + static int snd_rme32_playback_spdif_open(snd_pcm_substream_t * substream) { - unsigned long flags; int rate, dummy; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); if (rme32->playback_substream != NULL) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EBUSY; } rme32->wcreg &= ~RME32_WCR_ADAT; writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32->playback_substream = substream; - rme32->playback_last_appl_ptr = 0; - rme32->playback_ptr = 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); - runtime->hw = snd_rme32_playback_spdif_info; + if (rme32->fullduplex_mode) + runtime->hw = snd_rme32_spdif_fd_info; + else + runtime->hw = snd_rme32_spdif_info; if (rme32->pci->device == PCI_DEVICE_ID_DIGI32_PRO) { runtime->hw.rates |= SNDRV_PCM_RATE_64000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000; runtime->hw.rate_max = 96000; @@ -898,12 +906,8 @@ runtime->hw.rate_min = rate; runtime->hw.rate_max = rate; } - snd_pcm_hw_constraint_minmax(runtime, - SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - RME32_BUFFER_SIZE, RME32_BUFFER_SIZE); - snd_pcm_hw_constraint_list(runtime, 0, - SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - &hw_constraints_period_bytes); + + snd_rme32_set_buffer_constraint(rme32, runtime); rme32->wcreg_spdif_stream = rme32->wcreg_spdif; rme32->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; @@ -914,23 +918,24 @@ static int snd_rme32_capture_spdif_open(snd_pcm_substream_t * substream) { - unsigned long flags; int isadat, rate; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); if (rme32->capture_substream != NULL) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EBUSY; } rme32->capture_substream = substream; - rme32->capture_ptr = 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); - runtime->hw = snd_rme32_capture_spdif_info; + if (rme32->fullduplex_mode) + runtime->hw = snd_rme32_spdif_fd_info; + else + runtime->hw = snd_rme32_spdif_info; if (RME32_PRO_WITH_8414(rme32)) { runtime->hw.rates |= SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000; runtime->hw.rate_max = 96000; @@ -944,12 +949,7 @@ runtime->hw.rate_max = rate; } - snd_pcm_hw_constraint_minmax(runtime, - SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - RME32_BUFFER_SIZE, RME32_BUFFER_SIZE); - snd_pcm_hw_constraint_list(runtime, 0, - SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - &hw_constraints_period_bytes); + snd_rme32_set_buffer_constraint(rme32, runtime); return 0; } @@ -957,26 +957,26 @@ static int snd_rme32_playback_adat_open(snd_pcm_substream_t *substream) { - unsigned long flags; int rate, dummy; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); if (rme32->playback_substream != NULL) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EBUSY; } rme32->wcreg |= RME32_WCR_ADAT; writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32->playback_substream = substream; - rme32->playback_last_appl_ptr = 0; - rme32->playback_ptr = 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); - runtime->hw = snd_rme32_playback_adat_info; + if (rme32->fullduplex_mode) + runtime->hw = snd_rme32_adat_fd_info; + else + runtime->hw = snd_rme32_adat_info; if ((rme32->rcreg & RME32_RCR_KMODE) && (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) { /* AutoSync */ @@ -984,22 +984,22 @@ runtime->hw.rate_min = rate; runtime->hw.rate_max = rate; } - snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - RME32_BUFFER_SIZE, RME32_BUFFER_SIZE); - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - &hw_constraints_period_bytes); + + snd_rme32_set_buffer_constraint(rme32, runtime); return 0; } static int snd_rme32_capture_adat_open(snd_pcm_substream_t *substream) { - unsigned long flags; int isadat, rate; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - runtime->hw = snd_rme32_capture_adat_info; + if (rme32->fullduplex_mode) + runtime->hw = snd_rme32_adat_fd_info; + else + runtime->hw = snd_rme32_adat_info; if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) { if (!isadat) { return -EIO; @@ -1011,33 +1011,28 @@ snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); if (rme32->capture_substream != NULL) { - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return -EBUSY; } rme32->capture_substream = substream; - rme32->capture_ptr = 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); - snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - RME32_BUFFER_SIZE, RME32_BUFFER_SIZE); - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - &hw_constraints_period_bytes); + snd_rme32_set_buffer_constraint(rme32, runtime); return 0; } static int snd_rme32_playback_close(snd_pcm_substream_t * substream) { - unsigned long flags; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); int spdif = 0; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); rme32->playback_substream = NULL; rme32->playback_periodsize = 0; spdif = (rme32->wcreg & RME32_WCR_ADAT) == 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); if (spdif) { rme32->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(rme32->card, SNDRV_CTL_EVENT_MASK_VALUE | @@ -1049,210 +1044,207 @@ static int snd_rme32_capture_close(snd_pcm_substream_t * substream) { - unsigned long flags; - rme32_t *rme32 = _snd_pcm_substream_chip(substream); + rme32_t *rme32 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); rme32->capture_substream = NULL; rme32->capture_periodsize = 0; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock(&rme32->lock); return 0; } static int snd_rme32_playback_prepare(snd_pcm_substream_t * substream) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme32_t *rme32 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme32->lock, flags); - if (RME32_ISWORKING(rme32)) { - snd_rme32_playback_stop(rme32); + spin_lock_irq(&rme32->lock); + if (rme32->fullduplex_mode) { + memset(&rme32->playback_pcm, 0, sizeof(rme32->playback_pcm)); + rme32->playback_pcm.hw_buffer_size = RME32_BUFFER_SIZE; + rme32->playback_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + } else { + writel(0, rme32->iobase + RME32_IO_RESET_POS); } - writel(0, rme32->iobase + RME32_IO_RESET_POS); if (rme32->wcreg & RME32_WCR_SEL) rme32->wcreg &= ~RME32_WCR_MUTE; writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return 0; } static int snd_rme32_capture_prepare(snd_pcm_substream_t * substream) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme32_t *rme32 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme32->lock, flags); - if (RME32_ISWORKING(rme32)) { - snd_rme32_capture_stop(rme32); + spin_lock_irq(&rme32->lock); + if (rme32->fullduplex_mode) { + memset(&rme32->capture_pcm, 0, sizeof(rme32->capture_pcm)); + rme32->capture_pcm.hw_buffer_size = RME32_BUFFER_SIZE; + rme32->capture_pcm.hw_queue_size = RME32_BUFFER_SIZE / 2; + rme32->capture_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + } else { + writel(0, rme32->iobase + RME32_IO_RESET_POS); } - writel(0, rme32->iobase + RME32_IO_RESET_POS); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return 0; } static int -snd_rme32_playback_trigger(snd_pcm_substream_t * substream, int cmd) +snd_rme32_pcm_trigger(snd_pcm_substream_t * substream, int cmd) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - if (!RME32_ISWORKING(rme32)) { - if (substream != rme32->playback_substream) { - return -EBUSY; + rme32_t *rme32 = snd_pcm_substream_chip(substream); + struct list_head *pos; + snd_pcm_substream_t *s; + + spin_lock(&rme32->lock); + snd_pcm_group_for_each(pos, substream) { + s = snd_pcm_group_substream_entry(pos); + if (s != rme32->playback_substream && + s != rme32->capture_substream) + continue; + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + rme32->running |= (1 << s->stream); + if (rme32->fullduplex_mode) { + /* remember the current DMA position */ + if (s == rme32->playback_substream) { + rme32->playback_pcm.hw_io = + rme32->playback_pcm.hw_data = snd_rme32_pcm_byteptr(rme32); + } else { + rme32->capture_pcm.hw_io = + rme32->capture_pcm.hw_data = snd_rme32_pcm_byteptr(rme32); + } } - snd_rme32_playback_start(rme32, 0); + break; + case SNDRV_PCM_TRIGGER_STOP: + rme32->running &= ~(1 << s->stream); + break; } - break; - - case SNDRV_PCM_TRIGGER_STOP: - if (RME32_ISWORKING(rme32)) { - if (substream != rme32->playback_substream) { - return -EBUSY; + snd_pcm_trigger_done(s, substream); + } + + /* prefill playback buffer */ + if (cmd == SNDRV_PCM_TRIGGER_START) { + snd_pcm_group_for_each(pos, substream) { + s = snd_pcm_group_substream_entry(pos); + if (s == rme32->playback_substream) { + s->ops->ack(s); + break; } - snd_rme32_playback_stop(rme32); - } - break; - - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - if (RME32_ISWORKING(rme32)) { - snd_rme32_playback_stop(rme32); - } - break; - - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - if (!RME32_ISWORKING(rme32)) { - snd_rme32_playback_start(rme32, 1); } - break; - - default: - return -EINVAL; } - return 0; -} - -static int -snd_rme32_capture_trigger(snd_pcm_substream_t * substream, int cmd) -{ - rme32_t *rme32 = _snd_pcm_substream_chip(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_START: - if (!RME32_ISWORKING(rme32)) { - if (substream != rme32->capture_substream) { - return -EBUSY; - } - snd_rme32_capture_start(rme32, 0); - } + if (rme32->running && ! RME32_ISWORKING(rme32)) + snd_rme32_pcm_start(rme32, 0); break; - case SNDRV_PCM_TRIGGER_STOP: - if (RME32_ISWORKING(rme32)) { - if (substream != rme32->capture_substream) { - return -EBUSY; - } - snd_rme32_capture_stop(rme32); - } + if (! rme32->running && RME32_ISWORKING(rme32)) + snd_rme32_pcm_stop(rme32, 0); break; - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - if (RME32_ISWORKING(rme32)) { - snd_rme32_capture_stop(rme32); - } + if (rme32->running && RME32_ISWORKING(rme32)) + snd_rme32_pcm_stop(rme32, 1); break; - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - if (!RME32_ISWORKING(rme32)) { - snd_rme32_capture_start(rme32, 1); - } + if (rme32->running && ! RME32_ISWORKING(rme32)) + snd_rme32_pcm_start(rme32, 1); break; - - default: - return -EINVAL; } - + spin_unlock(&rme32->lock); return 0; } +/* pointer callback for halfduplex mode */ static snd_pcm_uframes_t snd_rme32_playback_pointer(snd_pcm_substream_t * substream) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_sframes_t diff; - size_t bytes; + rme32_t *rme32 = snd_pcm_substream_chip(substream); + return snd_rme32_pcm_byteptr(rme32) >> rme32->playback_frlog; +} +static snd_pcm_uframes_t +snd_rme32_capture_pointer(snd_pcm_substream_t * substream) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + return snd_rme32_pcm_byteptr(rme32) >> rme32->capture_frlog; +} - if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { - diff = runtime->control->appl_ptr - - rme32->playback_last_appl_ptr; - rme32->playback_last_appl_ptr = runtime->control->appl_ptr; - if (diff != 0 && diff < -(snd_pcm_sframes_t) (runtime->boundary >> 1)) { - diff += runtime->boundary; - } - bytes = diff << rme32->playback_frlog; - if (bytes > RME32_BUFFER_SIZE - rme32->playback_ptr) { - memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER + rme32->playback_ptr), - runtime->dma_area + rme32->playback_ptr, - RME32_BUFFER_SIZE - rme32->playback_ptr); - bytes -= RME32_BUFFER_SIZE - rme32->playback_ptr; - if (bytes > RME32_BUFFER_SIZE) { - bytes = RME32_BUFFER_SIZE; - } - memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER), - runtime->dma_area, bytes); - rme32->playback_ptr = bytes; - } else if (bytes != 0) { - memcpy_toio((void *)(rme32->iobase + RME32_IO_DATA_BUFFER + rme32->playback_ptr), - runtime->dma_area + rme32->playback_ptr, bytes); - rme32->playback_ptr += bytes; - } - } - return snd_rme32_playback_ptr(rme32); + +/* ack and pointer callbacks for fullduplex mode */ +static void snd_rme32_pb_trans_copy(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, + substream->runtime->dma_area + rec->sw_data, bytes); +} + +static int snd_rme32_playback_fd_ack(snd_pcm_substream_t *substream) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + snd_pcm_indirect_t *rec, *cprec; + unsigned long flags; + + rec = &rme32->playback_pcm; + cprec = &rme32->capture_pcm; + spin_lock_irqsave(&rme32->lock, flags); + rec->hw_queue_size = RME32_BUFFER_SIZE; + if (rme32->running & (1 << SNDRV_PCM_STREAM_CAPTURE)) + rec->hw_queue_size -= cprec->hw_ready; + spin_unlock_irqrestore(&rme32->lock, flags); + snd_pcm_indirect_playback_transfer(substream, rec, + snd_rme32_pb_trans_copy); + return 0; +} + +static void snd_rme32_cp_trans_copy(snd_pcm_substream_t *substream, + snd_pcm_indirect_t *rec, size_t bytes) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + memcpy_fromio(substream->runtime->dma_area + rec->sw_data, + rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, + bytes); +} + +static int snd_rme32_capture_fd_ack(snd_pcm_substream_t *substream) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + snd_pcm_indirect_capture_transfer(substream, &rme32->capture_pcm, + snd_rme32_cp_trans_copy); + return 0; } static snd_pcm_uframes_t -snd_rme32_capture_pointer(snd_pcm_substream_t * substream) +snd_rme32_playback_fd_pointer(snd_pcm_substream_t * substream) { - rme32_t *rme32 = _snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_uframes_t frameptr; - size_t ptr; + rme32_t *rme32 = snd_pcm_substream_chip(substream); + return snd_pcm_indirect_playback_pointer(substream, &rme32->playback_pcm, + snd_rme32_pcm_byteptr(rme32)); +} - frameptr = snd_rme32_capture_ptr(rme32); - if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { - ptr = frameptr << rme32->capture_frlog; - if (ptr > rme32->capture_ptr) { - memcpy_fromio(runtime->dma_area + rme32->capture_ptr, - (void *)(rme32->iobase + RME32_IO_DATA_BUFFER + - rme32->capture_ptr), - ptr - rme32->capture_ptr); - rme32->capture_ptr += ptr - rme32->capture_ptr; - } else if (ptr < rme32->capture_ptr) { - memcpy_fromio(runtime->dma_area + rme32->capture_ptr, - (void *)(rme32->iobase + RME32_IO_DATA_BUFFER + - rme32->capture_ptr), - RME32_BUFFER_SIZE - rme32->capture_ptr); - memcpy_fromio(runtime->dma_area, - (void *)(rme32->iobase + RME32_IO_DATA_BUFFER), - ptr); - rme32->capture_ptr = ptr; - } - } - return frameptr; +static snd_pcm_uframes_t +snd_rme32_capture_fd_pointer(snd_pcm_substream_t * substream) +{ + rme32_t *rme32 = snd_pcm_substream_chip(substream); + return snd_pcm_indirect_capture_pointer(substream, &rme32->capture_pcm, + snd_rme32_pcm_byteptr(rme32)); } +/* for halfduplex mode */ static snd_pcm_ops_t snd_rme32_playback_spdif_ops = { .open = snd_rme32_playback_spdif_open, .close = snd_rme32_playback_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme32_playback_hw_params, - .hw_free = snd_rme32_playback_hw_free, + .hw_free = snd_rme32_pcm_hw_free, .prepare = snd_rme32_playback_prepare, - .trigger = snd_rme32_playback_trigger, + .trigger = snd_rme32_pcm_trigger, .pointer = snd_rme32_playback_pointer, .copy = snd_rme32_playback_copy, .silence = snd_rme32_playback_silence, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme32_capture_spdif_ops = { @@ -1260,11 +1252,12 @@ .close = snd_rme32_capture_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme32_capture_hw_params, - .hw_free = snd_rme32_capture_hw_free, + .hw_free = snd_rme32_pcm_hw_free, .prepare = snd_rme32_capture_prepare, - .trigger = snd_rme32_capture_trigger, + .trigger = snd_rme32_pcm_trigger, .pointer = snd_rme32_capture_pointer, .copy = snd_rme32_capture_copy, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme32_playback_adat_ops = { @@ -1272,12 +1265,12 @@ .close = snd_rme32_playback_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme32_playback_hw_params, - .hw_free = snd_rme32_playback_hw_free, .prepare = snd_rme32_playback_prepare, - .trigger = snd_rme32_playback_trigger, + .trigger = snd_rme32_pcm_trigger, .pointer = snd_rme32_playback_pointer, .copy = snd_rme32_playback_copy, .silence = snd_rme32_playback_silence, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme32_capture_adat_ops = { @@ -1285,11 +1278,58 @@ .close = snd_rme32_capture_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme32_capture_hw_params, - .hw_free = snd_rme32_capture_hw_free, .prepare = snd_rme32_capture_prepare, - .trigger = snd_rme32_capture_trigger, + .trigger = snd_rme32_pcm_trigger, .pointer = snd_rme32_capture_pointer, .copy = snd_rme32_capture_copy, + .mmap = snd_pcm_lib_mmap_iomem, +}; + +/* for fullduplex mode */ +static snd_pcm_ops_t snd_rme32_playback_spdif_fd_ops = { + .open = snd_rme32_playback_spdif_open, + .close = snd_rme32_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_rme32_playback_hw_params, + .hw_free = snd_rme32_pcm_hw_free, + .prepare = snd_rme32_playback_prepare, + .trigger = snd_rme32_pcm_trigger, + .pointer = snd_rme32_playback_fd_pointer, + .ack = snd_rme32_playback_fd_ack, +}; + +static snd_pcm_ops_t snd_rme32_capture_spdif_fd_ops = { + .open = snd_rme32_capture_spdif_open, + .close = snd_rme32_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_rme32_capture_hw_params, + .hw_free = snd_rme32_pcm_hw_free, + .prepare = snd_rme32_capture_prepare, + .trigger = snd_rme32_pcm_trigger, + .pointer = snd_rme32_capture_fd_pointer, + .ack = snd_rme32_capture_fd_ack, +}; + +static snd_pcm_ops_t snd_rme32_playback_adat_fd_ops = { + .open = snd_rme32_playback_adat_open, + .close = snd_rme32_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_rme32_playback_hw_params, + .prepare = snd_rme32_playback_prepare, + .trigger = snd_rme32_pcm_trigger, + .pointer = snd_rme32_playback_fd_pointer, + .ack = snd_rme32_playback_fd_ack, +}; + +static snd_pcm_ops_t snd_rme32_capture_adat_fd_ops = { + .open = snd_rme32_capture_adat_open, + .close = snd_rme32_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_rme32_capture_hw_params, + .prepare = snd_rme32_capture_prepare, + .trigger = snd_rme32_pcm_trigger, + .pointer = snd_rme32_capture_fd_pointer, + .ack = snd_rme32_capture_fd_ack, }; static void snd_rme32_free(void *private_data) @@ -1300,8 +1340,7 @@ return; } if (rme32->irq >= 0) { - snd_rme32_playback_stop(rme32); - snd_rme32_capture_stop(rme32); + snd_rme32_pcm_stop(rme32, 0); free_irq(rme32->irq, (void *) rme32); rme32->irq = -1; } @@ -1309,9 +1348,9 @@ iounmap((void *) rme32->iobase); rme32->iobase = 0; } - if (rme32->res_port != NULL) { - release_resource(rme32->res_port); - rme32->res_port = NULL; + if (rme32->port) { + pci_release_regions(rme32->pci); + rme32->port = 0; } } @@ -1319,7 +1358,6 @@ { rme32_t *rme32 = (rme32_t *) pcm->private_data; rme32->spdif_pcm = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); } static void @@ -1327,7 +1365,6 @@ { rme32_t *rme32 = (rme32_t *) pcm->private_data; rme32->adat_pcm = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); } static int __devinit snd_rme32_create(rme32_t * rme32) @@ -1336,25 +1373,21 @@ int err; rme32->irq = -1; + spin_lock_init(&rme32->lock); if ((err = pci_enable_device(pci)) < 0) return err; + if ((err = pci_request_regions(pci, "RME32")) < 0) + return err; rme32->port = pci_resource_start(rme32->pci, 0); - if ((rme32->res_port = request_mem_region(rme32->port, RME32_IO_SIZE, "RME32")) == NULL) { - snd_printk("unable to grab memory region 0x%lx-0x%lx\n", - rme32->port, rme32->port + RME32_IO_SIZE - 1); - return -EBUSY; - } - if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) { snd_printk("unable to grab IRQ %d\n", pci->irq); return -EBUSY; } rme32->irq = pci->irq; - spin_lock_init(&rme32->lock); if ((rme32->iobase = (unsigned long) ioremap_nocache(rme32->port, RME32_IO_SIZE)) == 0) { snd_printk("unable to remap memory region 0x%lx-0x%lx\n", rme32->port, rme32->port + RME32_IO_SIZE - 1); @@ -1371,18 +1404,22 @@ rme32->spdif_pcm->private_data = rme32; rme32->spdif_pcm->private_free = snd_rme32_free_spdif_pcm; strcpy(rme32->spdif_pcm->name, "Digi32 IEC958"); - snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, - &snd_rme32_playback_spdif_ops); - snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, - &snd_rme32_capture_spdif_ops); - - rme32->spdif_pcm->info_flags = 0; - - snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm, - SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), - RME32_BUFFER_SIZE, - RME32_BUFFER_SIZE); + if (rme32->fullduplex_mode) { + snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_rme32_playback_spdif_fd_ops); + snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_rme32_capture_spdif_fd_ops); + snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), + 0, RME32_MID_BUFFER_SIZE); + rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; + } else { + snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_rme32_playback_spdif_ops); + snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_rme32_capture_spdif_ops); + rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; + } /* set up ALSA pcm device for ADAT */ if ((pci->device == PCI_DEVICE_ID_DIGI32) || @@ -1399,18 +1436,22 @@ rme32->adat_pcm->private_data = rme32; rme32->adat_pcm->private_free = snd_rme32_free_adat_pcm; strcpy(rme32->adat_pcm->name, "Digi32 ADAT"); - snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, - &snd_rme32_playback_adat_ops); - snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, - &snd_rme32_capture_adat_ops); - - rme32->adat_pcm->info_flags = 0; - - snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm, - SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), - RME32_BUFFER_SIZE, - RME32_BUFFER_SIZE); + if (rme32->fullduplex_mode) { + snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_rme32_playback_adat_fd_ops); + snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_rme32_capture_adat_fd_ops); + snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), + 0, RME32_MID_BUFFER_SIZE); + rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; + } else { + snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_rme32_playback_adat_ops); + snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_rme32_capture_adat_ops); + rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; + } } @@ -1418,8 +1459,7 @@ rme32->capture_periodsize = 0; /* make sure playback/capture is stopped, if by some reason active */ - snd_rme32_playback_stop(rme32); - snd_rme32_capture_stop(rme32); + snd_rme32_pcm_stop(rme32, 0); /* reset DAC */ snd_rme32_reset_dac(rme32); @@ -1464,6 +1504,10 @@ snd_iprintf(buffer, " (index #%d)\n", rme32->card->number + 1); snd_iprintf(buffer, "\nGeneral settings\n"); + if (rme32->fullduplex_mode) + snd_iprintf(buffer, " Full-duplex mode\n"); + else + snd_iprintf(buffer, " Half-duplex mode\n"); if (RME32_PRO_WITH_8414(rme32)) { snd_iprintf(buffer, " receiver: CS8414\n"); } else { @@ -1569,26 +1613,24 @@ snd_rme32_get_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); ucontrol->value.integer.value[0] = rme32->wcreg & RME32_WCR_SEL ? 0 : 1; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return 0; } static int snd_rme32_put_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.integer.value[0] ? 0 : RME32_WCR_SEL; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); val = (rme32->wcreg & ~RME32_WCR_SEL) | val; change = val != rme32->wcreg; if (ucontrol->value.integer.value[0]) @@ -1597,7 +1639,7 @@ val |= RME32_WCR_MUTE; writel(rme32->wcreg = val, rme32->iobase + RME32_IO_CONTROL_REGISTER); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return change; } @@ -1605,7 +1647,7 @@ snd_rme32_info_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); static char *texts[4] = { "Optical", "Coaxial", "Internal", "XLR" }; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; @@ -1635,11 +1677,10 @@ snd_rme32_get_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); unsigned int items = 3; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); ucontrol->value.enumerated.item[0] = snd_rme32_getinputtype(rme32); switch (rme32->pci->device) { @@ -1658,15 +1699,14 @@ ucontrol->value.enumerated.item[0] = items - 1; } - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return 0; } static int snd_rme32_put_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); unsigned int val; int change, items = 3; @@ -1684,10 +1724,10 @@ } val = ucontrol->value.enumerated.item[0] % items; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); change = val != (unsigned int)snd_rme32_getinputtype(rme32); snd_rme32_setinputtype(rme32, val); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return change; } @@ -1714,28 +1754,26 @@ snd_rme32_get_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); ucontrol->value.enumerated.item[0] = snd_rme32_getclockmode(rme32); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return 0; } static int snd_rme32_put_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.enumerated.item[0] % 3; - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); change = val != (unsigned int)snd_rme32_getclockmode(rme32); snd_rme32_setclockmode(rme32, val); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return change; } @@ -1770,7 +1808,7 @@ static int snd_rme32_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); snd_rme32_convert_to_aes(&ucontrol->value.iec958, rme32->wcreg_spdif); @@ -1780,16 +1818,15 @@ static int snd_rme32_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme32_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); change = val != rme32->wcreg_spdif; rme32->wcreg_spdif = val; - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return change; } @@ -1805,7 +1842,7 @@ snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); snd_rme32_convert_to_aes(&ucontrol->value.iec958, rme32->wcreg_spdif_stream); @@ -1816,18 +1853,17 @@ snd_ctl_elem_value_t * ucontrol) { - rme32_t *rme32 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme32_t *rme32 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme32_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme32->lock, flags); + spin_lock_irq(&rme32->lock); change = val != rme32->wcreg_spdif_stream; rme32->wcreg_spdif_stream = val; rme32->wcreg &= ~(RME32_WCR_PRO | RME32_WCR_EMP); writel(rme32->wcreg |= val, rme32->iobase + RME32_IO_CONTROL_REGISTER); - spin_unlock_irqrestore(&rme32->lock, flags); + spin_unlock_irq(&rme32->lock); return change; } @@ -1907,7 +1943,7 @@ int idx, err; snd_kcontrol_t *kctl; - for (idx = 0; idx < 7; idx++) { + for (idx = 0; idx < (int)ARRAY_SIZE(snd_rme32_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme32_controls[idx], rme32))) < 0) return err; if (idx == 1) /* IEC958 (S/PDIF) Stream */ @@ -1952,6 +1988,8 @@ rme32->card = card; rme32->pci = pci; snd_card_set_dev(card, &pci->dev); + if (fullduplex[dev]) + rme32->fullduplex_mode = 1; if ((err = snd_rme32_create(rme32)) < 0) { snd_card_free(card); return err; diff -Nru a/sound/pci/rme96.c b/sound/pci/rme96.c --- a/sound/pci/rme96.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/rme96.c 2004-09-06 16:37:52 -07:00 @@ -47,8 +47,7 @@ MODULE_DESCRIPTION("RME Digi96, Digi96/8, Digi96/8 PRO, Digi96/8 PST, " "Digi96/8 PAD"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{RME,Digi96}," +MODULE_SUPPORTED_DEVICE("{{RME,Digi96}," "{RME,Digi96/8}," "{RME,Digi96/8 PRO}," "{RME,Digi96/8 PST}," @@ -61,13 +60,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi96 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for RME Digi96 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable RME Digi96 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); /* * Defines for RME Digi96 series, from internal RME reference documents @@ -229,7 +225,6 @@ spinlock_t lock; int irq; unsigned long port; - struct resource *res_port; unsigned long iobase; u32 wcreg; /* cached write control register value */ @@ -250,10 +245,6 @@ size_t playback_periodsize; /* in bytes, zero if not used */ size_t capture_periodsize; /* in bytes, zero if not used */ - snd_pcm_uframes_t playback_last_appl_ptr; - size_t playback_ptr; - size_t capture_ptr; - snd_card_t *card; snd_pcm_t *spdif_pcm; snd_pcm_t *adat_pcm; @@ -349,7 +340,7 @@ snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); count <<= rme96->playback_frlog; pos <<= rme96->playback_frlog; memset_io(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, @@ -364,7 +355,7 @@ void __user *src, snd_pcm_uframes_t count) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); count <<= rme96->playback_frlog; pos <<= rme96->playback_frlog; copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src, @@ -379,7 +370,7 @@ void __user *dst, snd_pcm_uframes_t count) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); count <<= rme96->capture_frlog; pos <<= rme96->capture_frlog; copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos, @@ -392,7 +383,7 @@ */ static snd_pcm_hardware_t snd_rme96_playback_spdif_info = { - .info = (SNDRV_PCM_INFO_MMAP | + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE), @@ -421,7 +412,7 @@ */ static snd_pcm_hardware_t snd_rme96_capture_spdif_info = { - .info = (SNDRV_PCM_INFO_MMAP | + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE), @@ -450,7 +441,7 @@ */ static snd_pcm_hardware_t snd_rme96_playback_adat_info = { - .info = (SNDRV_PCM_INFO_MMAP | + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE), @@ -475,7 +466,7 @@ */ static snd_pcm_hardware_t snd_rme96_capture_adat_info = { - .info = (SNDRV_PCM_INFO_MMAP | + .info = (SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE), @@ -991,28 +982,30 @@ snd_rme96_playback_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params) { - unsigned long flags; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); + snd_pcm_runtime_t *runtime = substream->runtime; int err, rate, dummy; - if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params))) < 0) - return err; - spin_lock_irqsave(&rme96->lock, flags); + runtime->dma_area = (void *)(rme96->iobase + RME96_IO_PLAY_BUFFER); + runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER; + runtime->dma_bytes = RME96_BUFFER_SIZE; + + spin_lock_irq(&rme96->lock); if (!(rme96->wcreg & RME96_WCR_MASTER) && snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && (rate = snd_rme96_capture_getrate(rme96, &dummy)) > 0) { /* slave clock */ if ((int)params_rate(params) != rate) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EIO; } } else if ((err = snd_rme96_playback_setrate(rme96, params_rate(params))) < 0) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return err; } if ((err = snd_rme96_playback_setformat(rme96, params_format(params))) < 0) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return err; } snd_rme96_setframelog(rme96, params_channels(params), 1); @@ -1020,7 +1013,7 @@ if (params_period_size(params) << rme96->playback_frlog != rme96->capture_periodsize) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } } @@ -1032,50 +1025,44 @@ rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP); writel(rme96->wcreg |= rme96->wcreg_spdif_stream, rme96->iobase + RME96_IO_CONTROL_REGISTER); } - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int -snd_rme96_playback_hw_free(snd_pcm_substream_t *substream) -{ - snd_pcm_lib_free_pages(substream); - return 0; -} - -static int snd_rme96_capture_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params) { - unsigned long flags; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; int err, isadat, rate; - if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params))) < 0) - return err; - spin_lock_irqsave(&rme96->lock, flags); + runtime->dma_area = (void *)(rme96->iobase + RME96_IO_REC_BUFFER); + runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER; + runtime->dma_bytes = RME96_BUFFER_SIZE; + + spin_lock_irq(&rme96->lock); if ((err = snd_rme96_capture_setformat(rme96, params_format(params))) < 0) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return err; } if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) { if ((err = snd_rme96_capture_analog_setrate(rme96, params_rate(params))) < 0) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return err; } } else if ((rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0) { if ((int)params_rate(params) != rate) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EIO; } if ((isadat && runtime->hw.channels_min == 2) || (!isadat && runtime->hw.channels_min == 8)) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EIO; } } @@ -1084,33 +1071,24 @@ if (params_period_size(params) << rme96->capture_frlog != rme96->playback_periodsize) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } } rme96->capture_periodsize = params_period_size(params) << rme96->capture_frlog; snd_rme96_set_period_properties(rme96, rme96->capture_periodsize); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } -static int -snd_rme96_capture_hw_free(snd_pcm_substream_t *substream) -{ - snd_pcm_lib_free_pages(substream); - return 0; -} - static void snd_rme96_playback_start(rme96_t *rme96, int from_pause) { if (!from_pause) { writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS); - rme96->playback_last_appl_ptr = 0; - rme96->playback_ptr = 0; } rme96->wcreg |= RME96_WCR_START; @@ -1123,7 +1101,6 @@ { if (!from_pause) { writel(0, rme96->iobase + RME96_IO_RESET_REC_POS); - rme96->capture_ptr = 0; } rme96->wcreg |= RME96_WCR_START_2; @@ -1186,10 +1163,8 @@ static unsigned int period_bytes[] = { RME96_SMALL_BLOCK_SIZE, RME96_LARGE_BLOCK_SIZE }; -#define PERIOD_BYTES sizeof(period_bytes) / sizeof(period_bytes[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_period_bytes = { - .count = PERIOD_BYTES, + .count = ARRAY_SIZE(period_bytes), .list = period_bytes, .mask = 0 }; @@ -1197,24 +1172,21 @@ static int snd_rme96_playback_spdif_open(snd_pcm_substream_t *substream) { - unsigned long flags; int rate, dummy; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (rme96->playback_substream != NULL) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } rme96->wcreg &= ~RME96_WCR_ADAT; writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96->playback_substream = substream; - rme96->playback_last_appl_ptr = 0; - rme96->playback_ptr = 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); runtime->hw = snd_rme96_playback_spdif_info; if (!(rme96->wcreg & RME96_WCR_MASTER) && @@ -1239,9 +1211,8 @@ static int snd_rme96_capture_spdif_open(snd_pcm_substream_t *substream) { - unsigned long flags; int isadat, rate; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); @@ -1258,14 +1229,13 @@ runtime->hw.rate_max = rate; } - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (rme96->capture_substream != NULL) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } rme96->capture_substream = substream; - rme96->capture_ptr = 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); @@ -1276,24 +1246,21 @@ static int snd_rme96_playback_adat_open(snd_pcm_substream_t *substream) { - unsigned long flags; int rate, dummy; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (rme96->playback_substream != NULL) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } rme96->wcreg |= RME96_WCR_ADAT; writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96->playback_substream = substream; - rme96->playback_last_appl_ptr = 0; - rme96->playback_ptr = 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); runtime->hw = snd_rme96_playback_adat_info; if (!(rme96->wcreg & RME96_WCR_MASTER) && @@ -1313,9 +1280,8 @@ static int snd_rme96_capture_adat_open(snd_pcm_substream_t *substream) { - unsigned long flags; int isadat, rate; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; snd_pcm_set_sync(substream); @@ -1335,14 +1301,13 @@ runtime->hw.rate_max = rate; } - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (rme96->capture_substream != NULL) { - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return -EBUSY; } rme96->capture_substream = substream; - rme96->capture_ptr = 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); @@ -1352,18 +1317,17 @@ static int snd_rme96_playback_close(snd_pcm_substream_t *substream) { - unsigned long flags; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); int spdif = 0; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (RME96_ISPLAYING(rme96)) { snd_rme96_playback_stop(rme96); } rme96->playback_substream = NULL; rme96->playback_periodsize = 0; spdif = (rme96->wcreg & RME96_WCR_ADAT) == 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); if (spdif) { rme96->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(rme96->card, SNDRV_CTL_EVENT_MASK_VALUE | @@ -1375,46 +1339,43 @@ static int snd_rme96_capture_close(snd_pcm_substream_t *substream) { - unsigned long flags; - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (RME96_ISRECORDING(rme96)) { snd_rme96_capture_stop(rme96); } rme96->capture_substream = NULL; rme96->capture_periodsize = 0; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_playback_prepare(snd_pcm_substream_t *substream) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme96_t *rme96 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (RME96_ISPLAYING(rme96)) { snd_rme96_playback_stop(rme96); } writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_capture_prepare(snd_pcm_substream_t *substream) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme96_t *rme96 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (RME96_ISRECORDING(rme96)) { snd_rme96_capture_stop(rme96); } writel(0, rme96->iobase + RME96_IO_RESET_REC_POS); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } @@ -1422,7 +1383,7 @@ snd_rme96_playback_trigger(snd_pcm_substream_t *substream, int cmd) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -1465,7 +1426,7 @@ snd_rme96_capture_trigger(snd_pcm_substream_t *substream, int cmd) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); + rme96_t *rme96 = snd_pcm_substream_chip(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -1508,75 +1469,15 @@ static snd_pcm_uframes_t snd_rme96_playback_pointer(snd_pcm_substream_t *substream) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_sframes_t diff; - size_t bytes; - - if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { - diff = runtime->control->appl_ptr - - rme96->playback_last_appl_ptr; - rme96->playback_last_appl_ptr = runtime->control->appl_ptr; - if (diff != 0 && - diff < -(snd_pcm_sframes_t)(runtime->boundary >> 1)) - { - diff += runtime->boundary; - } - bytes = diff << rme96->playback_frlog; - - if (bytes > RME96_BUFFER_SIZE - rme96->playback_ptr) { - memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER + - rme96->playback_ptr), - runtime->dma_area + rme96->playback_ptr, - RME96_BUFFER_SIZE - rme96->playback_ptr); - bytes -= RME96_BUFFER_SIZE - rme96->playback_ptr; - if (bytes > RME96_BUFFER_SIZE) { - bytes = RME96_BUFFER_SIZE; - } - memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER), - runtime->dma_area, - bytes); - rme96->playback_ptr = bytes; - } else if (bytes != 0) { - memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER + - rme96->playback_ptr), - runtime->dma_area + rme96->playback_ptr, - bytes); - rme96->playback_ptr += bytes; - } - } + rme96_t *rme96 = snd_pcm_substream_chip(substream); return snd_rme96_playback_ptr(rme96); } static snd_pcm_uframes_t snd_rme96_capture_pointer(snd_pcm_substream_t *substream) { - rme96_t *rme96 = _snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - snd_pcm_uframes_t frameptr; - size_t ptr; - - frameptr = snd_rme96_capture_ptr(rme96); - if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { - ptr = frameptr << rme96->capture_frlog; - if (ptr > rme96->capture_ptr) { - memcpy_fromio(runtime->dma_area + rme96->capture_ptr, - (void *)(rme96->iobase + RME96_IO_REC_BUFFER + - rme96->capture_ptr), - ptr - rme96->capture_ptr); - rme96->capture_ptr += ptr - rme96->capture_ptr; - } else if (ptr < rme96->capture_ptr) { - memcpy_fromio(runtime->dma_area + rme96->capture_ptr, - (void *)(rme96->iobase + RME96_IO_REC_BUFFER + - rme96->capture_ptr), - RME96_BUFFER_SIZE - rme96->capture_ptr); - memcpy_fromio(runtime->dma_area, - (void *)(rme96->iobase + RME96_IO_REC_BUFFER), - ptr); - rme96->capture_ptr = ptr; - } - } - return frameptr; + rme96_t *rme96 = snd_pcm_substream_chip(substream); + return snd_rme96_capture_ptr(rme96); } static snd_pcm_ops_t snd_rme96_playback_spdif_ops = { @@ -1584,12 +1485,12 @@ .close = snd_rme96_playback_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme96_playback_hw_params, - .hw_free = snd_rme96_playback_hw_free, .prepare = snd_rme96_playback_prepare, .trigger = snd_rme96_playback_trigger, .pointer = snd_rme96_playback_pointer, .copy = snd_rme96_playback_copy, .silence = snd_rme96_playback_silence, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme96_capture_spdif_ops = { @@ -1597,11 +1498,11 @@ .close = snd_rme96_capture_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme96_capture_hw_params, - .hw_free = snd_rme96_capture_hw_free, .prepare = snd_rme96_capture_prepare, .trigger = snd_rme96_capture_trigger, .pointer = snd_rme96_capture_pointer, .copy = snd_rme96_capture_copy, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme96_playback_adat_ops = { @@ -1609,12 +1510,12 @@ .close = snd_rme96_playback_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme96_playback_hw_params, - .hw_free = snd_rme96_playback_hw_free, .prepare = snd_rme96_playback_prepare, .trigger = snd_rme96_playback_trigger, .pointer = snd_rme96_playback_pointer, .copy = snd_rme96_playback_copy, .silence = snd_rme96_playback_silence, + .mmap = snd_pcm_lib_mmap_iomem, }; static snd_pcm_ops_t snd_rme96_capture_adat_ops = { @@ -1622,11 +1523,11 @@ .close = snd_rme96_capture_close, .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_rme96_capture_hw_params, - .hw_free = snd_rme96_capture_hw_free, .prepare = snd_rme96_capture_prepare, .trigger = snd_rme96_capture_trigger, .pointer = snd_rme96_capture_pointer, .copy = snd_rme96_capture_copy, + .mmap = snd_pcm_lib_mmap_iomem, }; static void @@ -1649,10 +1550,9 @@ iounmap((void *)rme96->iobase); rme96->iobase = 0; } - if (rme96->res_port != NULL) { - release_resource(rme96->res_port); - kfree_nocheck(rme96->res_port); - rme96->res_port = NULL; + if (rme96->port) { + pci_release_regions(rme96->pci); + rme96->port = 0; } } @@ -1661,7 +1561,6 @@ { rme96_t *rme96 = (rme96_t *) pcm->private_data; rme96->spdif_pcm = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); } static void @@ -1669,7 +1568,6 @@ { rme96_t *rme96 = (rme96_t *) pcm->private_data; rme96->adat_pcm = NULL; - snd_pcm_lib_preallocate_free_for_all(pcm); } static int __devinit @@ -1679,24 +1577,21 @@ int err; rme96->irq = -1; + spin_lock_init(&rme96->lock); if ((err = pci_enable_device(pci)) < 0) return err; + if ((err = pci_request_regions(pci, "RME96")) < 0) + return err; rme96->port = pci_resource_start(rme96->pci, 0); - if ((rme96->res_port = request_mem_region(rme96->port, RME96_IO_SIZE, "RME96")) == NULL) { - snd_printk("unable to grab memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); - return -EBUSY; - } - if (request_irq(pci->irq, snd_rme96_interrupt, SA_INTERRUPT|SA_SHIRQ, "RME96", (void *)rme96)) { snd_printk("unable to grab IRQ %d\n", pci->irq); return -EBUSY; } rme96->irq = pci->irq; - spin_lock_init(&rme96->lock); if ((rme96->iobase = (unsigned long) ioremap_nocache(rme96->port, RME96_IO_SIZE)) == 0) { snd_printk("unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); return -ENOMEM; @@ -1719,12 +1614,6 @@ rme96->spdif_pcm->info_flags = 0; - snd_pcm_lib_preallocate_pages_for_all(rme96->spdif_pcm, - SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), - RME96_BUFFER_SIZE, - RME96_BUFFER_SIZE); - /* set up ALSA pcm device for ADAT */ if (pci->device == PCI_DEVICE_ID_DIGI96) { /* ADAT is not available on the base model */ @@ -1742,12 +1631,6 @@ snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_adat_ops); rme96->adat_pcm->info_flags = 0; - - snd_pcm_lib_preallocate_pages_for_all(rme96->adat_pcm, - SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), - RME96_BUFFER_SIZE, - RME96_BUFFER_SIZE); } rme96->playback_periodsize = 0; @@ -1958,28 +1841,26 @@ static int snd_rme96_get_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); ucontrol->value.integer.value[0] = rme96->wcreg & RME96_WCR_SEL ? 0 : 1; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_put_loopback_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.integer.value[0] ? 0 : RME96_WCR_SEL; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); val = (rme96->wcreg & ~RME96_WCR_SEL) | val; change = val != rme96->wcreg; writel(rme96->wcreg = val, rme96->iobase + RME96_IO_CONTROL_REGISTER); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -1987,7 +1868,7 @@ snd_rme96_info_inputtype_control(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *_texts[5] = { "Optical", "Coaxial", "Internal", "XLR", "Analog" }; - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); char *texts[5] = { _texts[0], _texts[1], _texts[2], _texts[3], _texts[4] }; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; @@ -2023,11 +1904,10 @@ static int snd_rme96_get_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int items = 3; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); ucontrol->value.enumerated.item[0] = snd_rme96_getinputtype(rme96); switch (rme96->pci->device) { @@ -2057,14 +1937,13 @@ ucontrol->value.enumerated.item[0] = items - 1; } - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_put_inputtype_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int val; int change, items = 3; @@ -2096,10 +1975,10 @@ } } - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = (int)val != snd_rme96_getinputtype(rme96); snd_rme96_setinputtype(rme96, val); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2120,27 +1999,25 @@ static int snd_rme96_get_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); ucontrol->value.enumerated.item[0] = snd_rme96_getclockmode(rme96); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_put_clockmode_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.enumerated.item[0] % 3; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = (int)val != snd_rme96_getclockmode(rme96); snd_rme96_setclockmode(rme96, val); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2161,28 +2038,26 @@ static int snd_rme96_get_attenuation_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); ucontrol->value.enumerated.item[0] = snd_rme96_getattenuation(rme96); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_put_attenuation_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.enumerated.item[0] % 4; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = (int)val != snd_rme96_getattenuation(rme96); snd_rme96_setattenuation(rme96, val); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2203,27 +2078,25 @@ static int snd_rme96_get_montracks_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); ucontrol->value.enumerated.item[0] = snd_rme96_getmontracks(rme96); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } static int snd_rme96_put_montracks_control(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ucontrol->value.enumerated.item[0] % 4; - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = (int)val != snd_rme96_getmontracks(rme96); snd_rme96_setmontracks(rme96, val); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2258,7 +2131,7 @@ static int snd_rme96_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif); return 0; @@ -2266,16 +2139,15 @@ static int snd_rme96_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme96_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = val != rme96->wcreg_spdif; rme96->wcreg_spdif = val; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2288,7 +2160,7 @@ static int snd_rme96_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif_stream); return 0; @@ -2296,18 +2168,17 @@ static int snd_rme96_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme96_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); change = val != rme96->wcreg_spdif_stream; rme96->wcreg_spdif_stream = val; rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP); writel(rme96->wcreg |= val, rme96->iobase + RME96_IO_CONTROL_REGISTER); - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } @@ -2327,7 +2198,7 @@ static int snd_rme96_dac_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -2339,13 +2210,12 @@ static int snd_rme96_dac_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); u->value.integer.value[0] = rme96->vol[0]; u->value.integer.value[1] = rme96->vol[1]; - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return 0; } @@ -2353,14 +2223,13 @@ static int snd_rme96_dac_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u) { - rme96_t *rme96 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme96_t *rme96 = snd_kcontrol_chip(kcontrol); int change = 0; if (!RME96_HAS_ANALOG_OUT(rme96)) { return -EINVAL; } - spin_lock_irqsave(&rme96->lock, flags); + spin_lock_irq(&rme96->lock); if (u->value.integer.value[0] != rme96->vol[0]) { rme96->vol[0] = u->value.integer.value[0]; change = 1; @@ -2372,7 +2241,7 @@ if (change) { snd_rme96_apply_dac_volume(rme96); } - spin_unlock_irqrestore(&rme96->lock, flags); + spin_unlock_irq(&rme96->lock); return change; } diff -Nru a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c --- a/sound/pci/rme9652/hdsp.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pci/rme9652/hdsp.c 2004-09-06 16:37:51 -07:00 @@ -52,24 +52,18 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for RME Hammerfall DSP interface."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for RME Hammerfall DSP interface."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable/disable specific Hammerfall DSP soundcards."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(precise_ptr, bool, boot_devs, 0444); MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably)."); -MODULE_PARM_SYNTAX(precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(line_outs_monitor, bool, boot_devs, 0444); MODULE_PARM_DESC(line_outs_monitor, "Send all input and playback streams to line outs by default."); -MODULE_PARM_SYNTAX(line_outs_monitor, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); MODULE_AUTHOR("Paul Davis , Marcus Andersson, Thomas Charbonnel "); MODULE_DESCRIPTION("RME Hammerfall DSP"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{RME Hammerfall-DSP}," +MODULE_SUPPORTED_DEVICE("{{RME Hammerfall-DSP}," "{RME HDSP-9652}," "{RME HDSP-9632}}"); @@ -462,12 +456,12 @@ unsigned char qs_out_channels; unsigned char ds_out_channels; unsigned char ss_out_channels; - void *capture_buffer_unaligned; /* original buffer addresses */ - void *playback_buffer_unaligned; /* original buffer addresses */ + + struct snd_dma_buffer capture_dma_buf; + struct snd_dma_buffer playback_dma_buf; unsigned char *capture_buffer; /* suitably aligned address */ unsigned char *playback_buffer; /* suitably aligned address */ - dma_addr_t capture_buffer_addr; - dma_addr_t playback_buffer_addr; + pid_t capture_pid; pid_t playback_pid; int running; @@ -477,7 +471,6 @@ int dev; int irq; unsigned long port; - struct resource *res_port; unsigned long iobase; snd_card_t *card; snd_pcm_t *pcm; @@ -561,50 +554,24 @@ -1, -1 }; -#define HDSP_PREALLOCATE_MEMORY /* via module snd-hdsp_mem */ - -#ifdef HDSP_PREALLOCATE_MEMORY -static void *snd_hammerfall_get_buffer(struct pci_dev *pci, size_t size, dma_addr_t *addrp, int capture) +static int snd_hammerfall_get_buffer(struct pci_dev *pci, struct snd_dma_buffer *dmab, size_t size) { - struct snd_dma_device pdev; - struct snd_dma_buffer dmbuf; - - memset(&pdev, 0, sizeof(pdev)); - pdev.type = SNDRV_DMA_TYPE_DEV; - pdev.dev = snd_dma_pci_data(pci); - pdev.id = capture; - dmbuf.bytes = 0; - if (! snd_dma_get_reserved(&pdev, &dmbuf)) { - if (snd_dma_alloc_pages(&pdev, size, &dmbuf) < 0) - return NULL; - snd_dma_set_reserved(&pdev, &dmbuf); + dmab->dev.type = SNDRV_DMA_TYPE_DEV; + dmab->dev.dev = snd_dma_pci_data(pci); + if (! snd_dma_get_reserved_buf(dmab, snd_dma_pci_buf_id(pci))) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + size, dmab) < 0) + return -ENOMEM; } - *addrp = dmbuf.addr; - return dmbuf.area; + return 0; } -static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) +static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci) { - struct snd_dma_device pdev; - - memset(&pdev, 0, sizeof(pdev)); - pdev.type = SNDRV_DMA_TYPE_DEV; - pdev.dev = snd_dma_pci_data(pci); - pdev.id = capture; - snd_dma_free_reserved(&pdev); + if (dmab->area) + snd_dma_reserve_buf(dmab, snd_dma_pci_buf_id(pci)); } -#else -static void *snd_hammerfall_get_buffer(struct pci_dev *pci, size_t size, dma_addr_t *addrp, int capture) -{ - return snd_malloc_pci_pages(pci, size, addrp); -} - -static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) -{ - snd_free_pci_pages(pci, size, ptr, addr); -} -#endif static struct pci_device_id snd_hdsp_ids[] = { { @@ -621,15 +588,15 @@ /* prototypes */ static int __devinit snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp); static int __devinit snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp); -static inline int snd_hdsp_enable_io (hdsp_t *hdsp); -static inline void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp); -static inline void snd_hdsp_initialize_channels (hdsp_t *hdsp); -static inline int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout); +static int snd_hdsp_enable_io (hdsp_t *hdsp); +static void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp); +static void snd_hdsp_initialize_channels (hdsp_t *hdsp); +static int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout); static int hdsp_autosync_ref(hdsp_t *hdsp); static int snd_hdsp_set_defaults(hdsp_t *hdsp); -static inline void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp); +static void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp); -static inline int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out) +static int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out) { switch (hdsp->firmware_rev) { case 0xa: @@ -642,7 +609,7 @@ } } -static inline int hdsp_input_to_output_key (hdsp_t *hdsp, int in, int out) +static int hdsp_input_to_output_key (hdsp_t *hdsp, int in, int out) { switch (hdsp->firmware_rev) { case 0xa: @@ -655,17 +622,17 @@ } } -static inline void hdsp_write(hdsp_t *hdsp, int reg, int val) +static void hdsp_write(hdsp_t *hdsp, int reg, int val) { writel(val, hdsp->iobase + reg); } -static inline unsigned int hdsp_read(hdsp_t *hdsp, int reg) +static unsigned int hdsp_read(hdsp_t *hdsp, int reg) { return readl (hdsp->iobase + reg); } -static inline int hdsp_check_for_iobox (hdsp_t *hdsp) +static int hdsp_check_for_iobox (hdsp_t *hdsp) { if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return 0; @@ -738,7 +705,7 @@ return 0; } -static inline int hdsp_get_iobox_version (hdsp_t *hdsp) +static int hdsp_get_iobox_version (hdsp_t *hdsp) { int err; @@ -781,7 +748,7 @@ } -static inline int hdsp_check_for_firmware (hdsp_t *hdsp) +static int hdsp_check_for_firmware (hdsp_t *hdsp) { if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return 0; if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { @@ -793,7 +760,7 @@ } -static inline int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout) +static int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout) { int i; @@ -818,7 +785,7 @@ return -1; } -static inline int hdsp_read_gain (hdsp_t *hdsp, unsigned int addr) +static int hdsp_read_gain (hdsp_t *hdsp, unsigned int addr) { if (addr >= HDSP_MATRIX_MIXER_SIZE) { return 0; @@ -826,7 +793,7 @@ return hdsp->mixer_matrix[addr]; } -static inline int hdsp_write_gain(hdsp_t *hdsp, unsigned int addr, unsigned short data) +static int hdsp_write_gain(hdsp_t *hdsp, unsigned int addr, unsigned short data) { unsigned int ad; @@ -835,7 +802,7 @@ if (hdsp->io_type == H9652 || hdsp->io_type == H9632) { - /* from martin björnsen: + /* from martin björnsen: "You can only write dwords to the mixer memory which contain two @@ -889,7 +856,7 @@ return 0; } -static inline int snd_hdsp_use_is_exclusive(hdsp_t *hdsp) +static int snd_hdsp_use_is_exclusive(hdsp_t *hdsp) { unsigned long flags; int ret = 1; @@ -903,7 +870,7 @@ return ret; } -static inline int hdsp_external_sample_rate (hdsp_t *hdsp) +static int hdsp_external_sample_rate (hdsp_t *hdsp) { unsigned int status2 = hdsp_read(hdsp, HDSP_status2Register); unsigned int rate_bits = status2 & HDSP_systemFrequencyMask; @@ -920,7 +887,7 @@ } } -static inline int hdsp_spdif_sample_rate(hdsp_t *hdsp) +static int hdsp_spdif_sample_rate(hdsp_t *hdsp) { unsigned int status = hdsp_read(hdsp, HDSP_statusRegister); unsigned int rate_bits = (status & HDSP_spdifFrequencyMask); @@ -952,7 +919,7 @@ return 0; } -static inline void hdsp_compute_period_size(hdsp_t *hdsp) +static void hdsp_compute_period_size(hdsp_t *hdsp) { hdsp->period_bytes = 1 << ((hdsp_decode_latency(hdsp->control_register) + 8)); } @@ -974,24 +941,24 @@ return position; } -static inline void hdsp_reset_hw_pointer(hdsp_t *hdsp) +static void hdsp_reset_hw_pointer(hdsp_t *hdsp) { hdsp_write (hdsp, HDSP_resetPointer, 0); } -static inline void hdsp_start_audio(hdsp_t *s) +static void hdsp_start_audio(hdsp_t *s) { s->control_register |= (HDSP_AudioInterruptEnable | HDSP_Start); hdsp_write(s, HDSP_controlRegister, s->control_register); } -static inline void hdsp_stop_audio(hdsp_t *s) +static void hdsp_stop_audio(hdsp_t *s) { s->control_register &= ~(HDSP_Start | HDSP_AudioInterruptEnable); hdsp_write(s, HDSP_controlRegister, s->control_register); } -static inline void hdsp_silence_playback(hdsp_t *hdsp) +static void hdsp_silence_playback(hdsp_t *hdsp) { memset(hdsp->playback_buffer, 0, HDSP_DMA_AREA_BYTES); } @@ -1236,7 +1203,7 @@ MIDI ----------------------------------------------------------------------------*/ -static inline unsigned char snd_hdsp_midi_read_byte (hdsp_t *hdsp, int id) +static unsigned char snd_hdsp_midi_read_byte (hdsp_t *hdsp, int id) { /* the hardware already does the relevant bit-mask with 0xff */ if (id) { @@ -1246,7 +1213,7 @@ } } -static inline void snd_hdsp_midi_write_byte (hdsp_t *hdsp, int id, int val) +static void snd_hdsp_midi_write_byte (hdsp_t *hdsp, int id, int val) { /* the hardware already does the relevant bit-mask with 0xff */ if (id) { @@ -1256,7 +1223,7 @@ } } -static inline int snd_hdsp_midi_input_available (hdsp_t *hdsp, int id) +static int snd_hdsp_midi_input_available (hdsp_t *hdsp, int id) { if (id) { return (hdsp_read(hdsp, HDSP_midiStatusIn1) & 0xff); @@ -1265,7 +1232,7 @@ } } -static inline int snd_hdsp_midi_output_possible (hdsp_t *hdsp, int id) +static int snd_hdsp_midi_output_possible (hdsp_t *hdsp, int id) { int fifo_bytes_used; @@ -1282,7 +1249,7 @@ } } -static inline void snd_hdsp_flush_midi_input (hdsp_t *hdsp, int id) +static void snd_hdsp_flush_midi_input (hdsp_t *hdsp, int id) { while (snd_hdsp_midi_input_available (hdsp, id)) { snd_hdsp_midi_read_byte (hdsp, id); @@ -1429,13 +1396,12 @@ static int snd_hdsp_midi_input_open(snd_rawmidi_substream_t * substream) { hdsp_midi_t *hmidi; - unsigned long flags; hmidi = (hdsp_midi_t *) substream->rmidi->private_data; - spin_lock_irqsave (&hmidi->lock, flags); + spin_lock_irq (&hmidi->lock); snd_hdsp_flush_midi_input (hmidi->hdsp, hmidi->id); hmidi->input = substream; - spin_unlock_irqrestore (&hmidi->lock, flags); + spin_unlock_irq (&hmidi->lock); return 0; } @@ -1443,12 +1409,11 @@ static int snd_hdsp_midi_output_open(snd_rawmidi_substream_t * substream) { hdsp_midi_t *hmidi; - unsigned long flags; hmidi = (hdsp_midi_t *) substream->rmidi->private_data; - spin_lock_irqsave (&hmidi->lock, flags); + spin_lock_irq (&hmidi->lock); hmidi->output = substream; - spin_unlock_irqrestore (&hmidi->lock, flags); + spin_unlock_irq (&hmidi->lock); return 0; } @@ -1456,14 +1421,13 @@ static int snd_hdsp_midi_input_close(snd_rawmidi_substream_t * substream) { hdsp_midi_t *hmidi; - unsigned long flags; snd_hdsp_midi_input_trigger (substream, 0); hmidi = (hdsp_midi_t *) substream->rmidi->private_data; - spin_lock_irqsave (&hmidi->lock, flags); + spin_lock_irq (&hmidi->lock); hmidi->input = NULL; - spin_unlock_irqrestore (&hmidi->lock, flags); + spin_unlock_irq (&hmidi->lock); return 0; } @@ -1471,14 +1435,13 @@ static int snd_hdsp_midi_output_close(snd_rawmidi_substream_t * substream) { hdsp_midi_t *hmidi; - unsigned long flags; snd_hdsp_midi_output_trigger (substream, 0); hmidi = (hdsp_midi_t *) substream->rmidi->private_data; - spin_lock_irqsave (&hmidi->lock, flags); + spin_lock_irq (&hmidi->lock); hmidi->output = NULL; - spin_unlock_irqrestore (&hmidi->lock, flags); + spin_unlock_irq (&hmidi->lock); return 0; } @@ -1563,7 +1526,7 @@ static int snd_hdsp_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif); return 0; @@ -1571,16 +1534,15 @@ static int snd_hdsp_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = val != hdsp->creg_spdif; hdsp->creg_spdif = val; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1593,7 +1555,7 @@ static int snd_hdsp_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif_stream); return 0; @@ -1601,18 +1563,17 @@ static int snd_hdsp_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_hdsp_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = val != hdsp->creg_spdif_stream; hdsp->creg_spdif_stream = val; hdsp->control_register &= ~(HDSP_SPDIFProfessional | HDSP_SPDIFNonAudio | HDSP_SPDIFEmphasis); hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register |= val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1653,7 +1614,7 @@ static int snd_hdsp_info_spdif_in(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *texts[4] = {"Optical", "Coaxial", "Internal", "AES"}; - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -1666,7 +1627,7 @@ static int snd_hdsp_get_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_spdif_in(hdsp); return 0; @@ -1674,19 +1635,18 @@ static int snd_hdsp_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.enumerated.item[0] % ((hdsp->io_type == H9632) ? 4 : 3); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = val != hdsp_spdif_in(hdsp); if (change) hdsp_set_spdif_input(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1722,7 +1682,7 @@ static int snd_hdsp_get_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = hdsp_spdif_out(hdsp); return 0; @@ -1730,18 +1690,17 @@ static int snd_hdsp_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_spdif_out(hdsp); hdsp_set_spdif_output(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1768,7 +1727,7 @@ static int snd_hdsp_get_spdif_professional(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = hdsp_spdif_professional(hdsp); return 0; @@ -1776,18 +1735,17 @@ static int snd_hdsp_put_spdif_professional(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_spdif_professional(hdsp); hdsp_set_spdif_professional(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1814,7 +1772,7 @@ static int snd_hdsp_get_spdif_emphasis(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = hdsp_spdif_emphasis(hdsp); return 0; @@ -1822,18 +1780,17 @@ static int snd_hdsp_put_spdif_emphasis(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_spdif_emphasis(hdsp); hdsp_set_spdif_emphasis(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1860,7 +1817,7 @@ static int snd_hdsp_get_spdif_nonaudio(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = hdsp_spdif_nonaudio(hdsp); return 0; @@ -1868,18 +1825,17 @@ static int snd_hdsp_put_spdif_nonaudio(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_spdif_nonaudio(hdsp); hdsp_set_spdif_nonaudio(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -1895,7 +1851,7 @@ static int snd_hdsp_info_spdif_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", "None", "128000", "176400", "192000"}; - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -1908,7 +1864,7 @@ static int snd_hdsp_get_spdif_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); switch (hdsp_spdif_sample_rate(hdsp)) { case 32000: @@ -1962,7 +1918,7 @@ static int snd_hdsp_get_system_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp->system_sample_rate; return 0; @@ -1979,7 +1935,7 @@ static int snd_hdsp_info_autosync_sample_rate(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", "None", "128000", "176400", "192000"}; uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -1992,7 +1948,7 @@ static int snd_hdsp_get_autosync_sample_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); switch (hdsp_external_sample_rate(hdsp)) { case 32000: @@ -2062,7 +2018,7 @@ static int snd_hdsp_get_system_clock_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_system_clock_mode(hdsp); return 0; @@ -2159,7 +2115,7 @@ static int snd_hdsp_info_clock_source(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *texts[] = {"AutoSync", "Internal 32.0 kHz", "Internal 44.1 kHz", "Internal 48.0 kHz", "Internal 64.0 kHz", "Internal 88.2 kHz", "Internal 96.0 kHz", "Internal 128 kHz", "Internal 176.4 kHz", "Internal 192.0 KHz" }; - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -2175,7 +2131,7 @@ static int snd_hdsp_get_clock_source(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_clock_source(hdsp); return 0; @@ -2183,8 +2139,7 @@ static int snd_hdsp_put_clock_source(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; @@ -2197,13 +2152,13 @@ } else { if (val > 6) val = 6; } - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); if (val != hdsp_clock_source(hdsp)) { change = (hdsp_set_clock_source(hdsp, val) == 0) ? 1 : 0; } else { change = 0; } - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2266,7 +2221,7 @@ static int snd_hdsp_get_da_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_da_gain(hdsp); return 0; @@ -2274,8 +2229,7 @@ static int snd_hdsp_put_da_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; @@ -2284,13 +2238,13 @@ val = ucontrol->value.enumerated.item[0]; if (val < 0) val = 0; if (val > 2) val = 2; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); if (val != hdsp_da_gain(hdsp)) { change = (hdsp_set_da_gain(hdsp, val) == 0) ? 1 : 0; } else { change = 0; } - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2353,7 +2307,7 @@ static int snd_hdsp_get_ad_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_ad_gain(hdsp); return 0; @@ -2361,8 +2315,7 @@ static int snd_hdsp_put_ad_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; @@ -2371,13 +2324,13 @@ val = ucontrol->value.enumerated.item[0]; if (val < 0) val = 0; if (val > 2) val = 2; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); if (val != hdsp_ad_gain(hdsp)) { change = (hdsp_set_ad_gain(hdsp, val) == 0) ? 1 : 0; } else { change = 0; } - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2440,7 +2393,7 @@ static int snd_hdsp_get_phone_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_phone_gain(hdsp); return 0; @@ -2448,8 +2401,7 @@ static int snd_hdsp_put_phone_gain(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; @@ -2458,13 +2410,13 @@ val = ucontrol->value.enumerated.item[0]; if (val < 0) val = 0; if (val > 2) val = 2; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); if (val != hdsp_phone_gain(hdsp)) { change = (hdsp_set_phone_gain(hdsp, val) == 0) ? 1 : 0; } else { change = 0; } - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2507,7 +2459,7 @@ static int snd_hdsp_get_xlr_breakout_cable(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_xlr_breakout_cable(hdsp); return 0; @@ -2515,18 +2467,17 @@ static int snd_hdsp_put_xlr_breakout_cable(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_xlr_breakout_cable(hdsp); hdsp_set_xlr_breakout_cable(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2573,7 +2524,7 @@ static int snd_hdsp_get_aeb(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_aeb(hdsp); return 0; @@ -2581,18 +2532,17 @@ static int snd_hdsp_put_aeb(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_aeb(hdsp); hdsp_set_aeb(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2662,7 +2612,7 @@ static int snd_hdsp_info_pref_sync_ref(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *texts[] = {"Word", "IEC958", "ADAT1", "ADAT Sync", "ADAT2", "ADAT3" }; - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -2691,7 +2641,7 @@ static int snd_hdsp_get_pref_sync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_pref_sync_ref(hdsp); return 0; @@ -2699,8 +2649,7 @@ static int snd_hdsp_put_pref_sync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change, max; unsigned int val; @@ -2723,10 +2672,10 @@ } val = ucontrol->value.enumerated.item[0] % max; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_pref_sync_ref(hdsp); hdsp_set_pref_sync_ref(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2780,7 +2729,7 @@ static int snd_hdsp_get_autosync_ref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_pref_sync_ref(hdsp); return 0; @@ -2806,19 +2755,17 @@ static int snd_hdsp_get_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); ucontrol->value.integer.value[0] = hdsp->passthru; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return 0; } static int snd_hdsp_put_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; int err = 0; @@ -2827,11 +2774,11 @@ return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (ucontrol->value.integer.value[0] != hdsp->passthru); if (change) err = hdsp_set_passthru(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return err ? err : change; } @@ -2871,29 +2818,27 @@ static int snd_hdsp_get_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); ucontrol->value.integer.value[0] = hdsp_line_out(hdsp); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return 0; } static int snd_hdsp_put_line_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_hdsp_use_is_exclusive(hdsp)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = (int)val != hdsp_line_out(hdsp); hdsp_set_line_output(hdsp, val); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -2920,8 +2865,7 @@ static int snd_hdsp_get_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int source; int destination; int addr; @@ -2935,16 +2879,15 @@ addr = hdsp_input_to_output_key(hdsp,source, destination); } - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); ucontrol->value.integer.value[2] = hdsp_read_gain (hdsp, addr); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return 0; } static int snd_hdsp_put_mixer(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); int change; int source; int destination; @@ -2965,11 +2908,11 @@ gain = ucontrol->value.integer.value[2]; - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); change = gain != hdsp_read_gain(hdsp, addr); if (change) hdsp_write_gain(hdsp, addr, gain); - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return change; } @@ -3011,7 +2954,7 @@ static int snd_hdsp_get_wc_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_wc_sync_check(hdsp); return 0; @@ -3043,7 +2986,7 @@ static int snd_hdsp_get_spdif_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_spdif_sync_check(hdsp); return 0; @@ -3074,7 +3017,7 @@ static int snd_hdsp_get_adatsync_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdsp_adatsync_sync_check(hdsp); return 0; @@ -3105,7 +3048,7 @@ static int snd_hdsp_get_adat_sync_check(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { int offset; - hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol); + hdsp_t *hdsp = snd_kcontrol_chip(kcontrol); offset = ucontrol->id.index - 1; snd_assert(offset >= 0); @@ -3194,10 +3137,6 @@ HDSP_LINE_OUT("Line Out", 0), }; -#define HDSP_CONTROLS (sizeof(snd_hdsp_controls)/sizeof(snd_kcontrol_new_t)) - -#define HDSP_9632_CONTROLS (sizeof(snd_hdsp_9632_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_hdsp_96xx_aeb = HDSP_AEB("Analog Extension Board", 0); static snd_kcontrol_new_t snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK; @@ -3207,7 +3146,7 @@ int err; snd_kcontrol_t *kctl; - for (idx = 0; idx < HDSP_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_hdsp_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_controls[idx], hdsp))) < 0) { return err; } @@ -3232,7 +3171,7 @@ /* DA, AD and Phone gain and XLR breakout cable controls for H9632 cards */ if (hdsp->io_type == H9632) { - for (idx = 0; idx < HDSP_9632_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_hdsp_9632_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_9632_controls[idx], hdsp))) < 0) { return err; } @@ -3583,59 +3522,34 @@ static void snd_hdsp_free_buffers(hdsp_t *hdsp) { - if (hdsp->capture_buffer_unaligned) { - snd_hammerfall_free_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, - hdsp->capture_buffer_unaligned, - hdsp->capture_buffer_addr, 1); - } - - if (hdsp->playback_buffer_unaligned) { - snd_hammerfall_free_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, - hdsp->playback_buffer_unaligned, - hdsp->playback_buffer_addr, 0); - } + snd_hammerfall_free_buffer(&hdsp->capture_dma_buf, hdsp->pci); + snd_hammerfall_free_buffer(&hdsp->playback_dma_buf, hdsp->pci); } static int __devinit snd_hdsp_initialize_memory(hdsp_t *hdsp) { - void *pb, *cb; - dma_addr_t pb_addr, cb_addr; unsigned long pb_bus, cb_bus; - cb = snd_hammerfall_get_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, &cb_addr, 1); - pb = snd_hammerfall_get_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, &pb_addr, 0); - - if (cb == 0 || pb == 0) { - if (cb) { - snd_hammerfall_free_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, cb, cb_addr, 1); - } - if (pb) { - snd_hammerfall_free_buffer(hdsp->pci, HDSP_DMA_AREA_BYTES, pb, pb_addr, 0); - } - + if (snd_hammerfall_get_buffer(hdsp->pci, &hdsp->capture_dma_buf, HDSP_DMA_AREA_BYTES) < 0 || + snd_hammerfall_get_buffer(hdsp->pci, &hdsp->playback_dma_buf, HDSP_DMA_AREA_BYTES) < 0) { + if (hdsp->capture_dma_buf.area) + snd_dma_free_pages(&hdsp->capture_dma_buf); printk(KERN_ERR "%s: no buffers available\n", hdsp->card_name); return -ENOMEM; } - /* save raw addresses for use when freeing memory later */ - - hdsp->capture_buffer_unaligned = cb; - hdsp->playback_buffer_unaligned = pb; - hdsp->capture_buffer_addr = cb_addr; - hdsp->playback_buffer_addr = pb_addr; - /* Align to bus-space 64K boundary */ - cb_bus = (cb_addr + 0xFFFF) & ~0xFFFFl; - pb_bus = (pb_addr + 0xFFFF) & ~0xFFFFl; + cb_bus = (hdsp->capture_dma_buf.addr + 0xFFFF) & ~0xFFFFl; + pb_bus = (hdsp->playback_dma_buf.addr + 0xFFFF) & ~0xFFFFl; /* Tell the card where it is */ hdsp_write(hdsp, HDSP_inputBufferAddress, cb_bus); hdsp_write(hdsp, HDSP_outputBufferAddress, pb_bus); - hdsp->capture_buffer = cb + (cb_bus - cb_addr); - hdsp->playback_buffer = pb + (pb_bus - pb_addr); + hdsp->capture_buffer = hdsp->capture_dma_buf.area + (cb_bus - hdsp->capture_dma_buf.addr); + hdsp->playback_buffer = hdsp->playback_dma_buf.area + (pb_bus - hdsp->playback_dma_buf.addr); return 0; } @@ -3809,7 +3723,7 @@ static snd_pcm_uframes_t snd_hdsp_hw_pointer(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); return hdsp_hw_pointer(hdsp); } @@ -3836,7 +3750,7 @@ static int snd_hdsp_playback_copy(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); char *channel_buf; snd_assert(pos + count <= HDSP_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); @@ -3851,7 +3765,7 @@ static int snd_hdsp_capture_copy(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); char *channel_buf; snd_assert(pos + count <= HDSP_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); @@ -3866,7 +3780,7 @@ static int snd_hdsp_hw_silence(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); char *channel_buf; channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel); @@ -3878,7 +3792,7 @@ static int snd_hdsp_reset(snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); snd_pcm_substream_t *other; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) other = hdsp->capture_substream; @@ -3906,7 +3820,7 @@ static int snd_hdsp_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); int err; pid_t this_pid; pid_t other_pid; @@ -3989,7 +3903,7 @@ static int snd_hdsp_channel_info(snd_pcm_substream_t *substream, snd_pcm_channel_info_t *info) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); int mapped_channel; snd_assert(info->channel < hdsp->max_channels, return -EINVAL); @@ -4026,7 +3940,7 @@ static int snd_hdsp_trigger(snd_pcm_substream_t *substream, int cmd) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); snd_pcm_substream_t *other; int running; @@ -4105,7 +4019,7 @@ static int snd_hdsp_prepare(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); + hdsp_t *hdsp = snd_pcm_substream_chip(substream); int result = 0; if (hdsp_check_for_iobox (hdsp)) { @@ -4123,10 +4037,10 @@ return -EIO; } - spin_lock(&hdsp->lock); + spin_lock_irq(&hdsp->lock); if (!hdsp->running) hdsp_reset_hw_pointer(hdsp); - spin_unlock(&hdsp->lock); + spin_unlock_irq(&hdsp->lock); return result; } @@ -4183,20 +4097,16 @@ static unsigned int hdsp_period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; -#define HDSP_PERIOD_SIZES sizeof(hdsp_period_sizes) / sizeof(hdsp_period_sizes[0]) - static snd_pcm_hw_constraint_list_t hdsp_hw_constraints_period_sizes = { - .count = HDSP_PERIOD_SIZES, + .count = ARRAY_SIZE(hdsp_period_sizes), .list = hdsp_period_sizes, .mask = 0 }; static unsigned int hdsp_9632_sample_rates[] = { 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000 }; -#define HDSP_9632_SAMPLE_RATES sizeof(hdsp_9632_sample_rates) / sizeof(hdsp_9632_sample_rates[0]) - static snd_pcm_hw_constraint_list_t hdsp_hw_constraints_9632_sample_rates = { - .count = HDSP_9632_SAMPLE_RATES, + .count = ARRAY_SIZE(hdsp_9632_sample_rates), .list = hdsp_9632_sample_rates, .mask = 0 }; @@ -4364,8 +4274,7 @@ static int snd_hdsp_playback_open(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); - unsigned long flags; + hdsp_t *hdsp = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; if (hdsp_check_for_iobox (hdsp)) { @@ -4383,7 +4292,7 @@ return -EIO; } - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); snd_pcm_set_sync(substream); @@ -4399,7 +4308,7 @@ hdsp->playback_pid = current->pid; hdsp->playback_substream = substream; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hdsp_hw_constraints_period_sizes); @@ -4430,15 +4339,14 @@ static int snd_hdsp_playback_release(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); - unsigned long flags; + hdsp_t *hdsp = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); hdsp->playback_pid = -1; hdsp->playback_substream = NULL; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); hdsp->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(hdsp->card, SNDRV_CTL_EVENT_MASK_VALUE | @@ -4449,8 +4357,7 @@ static int snd_hdsp_capture_open(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); - unsigned long flags; + hdsp_t *hdsp = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; if (hdsp_check_for_iobox (hdsp)) { @@ -4468,7 +4375,7 @@ return -EIO; } - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); snd_pcm_set_sync(substream); @@ -4484,7 +4391,7 @@ hdsp->capture_pid = current->pid; hdsp->capture_substream = substream; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hdsp_hw_constraints_period_sizes); @@ -4509,15 +4416,14 @@ static int snd_hdsp_capture_release(snd_pcm_substream_t *substream) { - hdsp_t *hdsp = _snd_pcm_substream_chip(substream); - unsigned long flags; + hdsp_t *hdsp = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&hdsp->lock, flags); + spin_lock_irq(&hdsp->lock); hdsp->capture_pid = -1; hdsp->capture_substream = NULL; - spin_unlock_irqrestore(&hdsp->lock, flags); + spin_unlock_irq(&hdsp->lock); return 0; } @@ -4830,19 +4736,13 @@ return 0; } -static inline void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp) +static void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp) { hdsp->control2_register |= HDSP_9652_ENABLE_MIXER; hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register); } -static inline void snd_hdsp_9652_disable_mixer (hdsp_t *hdsp) -{ - hdsp->control2_register &= ~HDSP_9652_ENABLE_MIXER; - hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register); -} - -static inline int snd_hdsp_enable_io (hdsp_t *hdsp) +static int snd_hdsp_enable_io (hdsp_t *hdsp) { int i; @@ -4858,7 +4758,7 @@ return 0; } -static inline void snd_hdsp_initialize_channels(hdsp_t *hdsp) +static void snd_hdsp_initialize_channels(hdsp_t *hdsp) { int status, aebi_channels, aebo_channels; @@ -4901,7 +4801,7 @@ } } -static inline void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp) +static void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp) { snd_hdsp_flush_midi_input (hdsp, 0); snd_hdsp_flush_midi_input (hdsp, 1); @@ -4980,7 +4880,6 @@ spin_lock_init(&hdsp->midi[0].lock); spin_lock_init(&hdsp->midi[1].lock); hdsp->iobase = 0; - hdsp->res_port = NULL; hdsp->control_register = 0; hdsp->control2_register = 0; hdsp->io_type = Undefined; @@ -5035,13 +4934,9 @@ pci_set_master(hdsp->pci); + if ((err = pci_request_regions(pci, "hdsp")) < 0) + return err; hdsp->port = pci_resource_start(pci, 0); - - if ((hdsp->res_port = request_mem_region(hdsp->port, HDSP_IO_EXTENT, "hdsp")) == NULL) { - snd_printk("unable to grab memory region 0x%lx-0x%lx\n", hdsp->port, hdsp->port + HDSP_IO_EXTENT - 1); - return -EBUSY; - } - if ((hdsp->iobase = (unsigned long) ioremap_nocache(hdsp->port, HDSP_IO_EXTENT)) == 0) { snd_printk("unable to remap region 0x%lx-0x%lx\n", hdsp->port, hdsp->port + HDSP_IO_EXTENT - 1); return -EBUSY; @@ -5114,7 +5009,7 @@ static int snd_hdsp_free(hdsp_t *hdsp) { - if (hdsp->res_port) { + if (hdsp->port) { /* stop the audio, and cancel all interrupts */ hdsp->control_register &= ~(HDSP_Start|HDSP_AudioInterruptEnable|HDSP_Midi0InterruptEnable|HDSP_Midi1InterruptEnable); hdsp_write (hdsp, HDSP_controlRegister, hdsp->control_register); @@ -5128,10 +5023,8 @@ if (hdsp->iobase) iounmap((void *) hdsp->iobase); - if (hdsp->res_port) { - release_resource(hdsp->res_port); - kfree_nocheck(hdsp->res_port); - } + if (hdsp->port) + pci_release_regions(hdsp->pci); return 0; } diff -Nru a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c --- a/sound/pci/rme9652/rme9652.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/rme9652/rme9652.c 2004-09-06 16:37:52 -07:00 @@ -46,21 +46,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi9652 (Hammerfall) soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for RME Digi9652 (Hammerfall) soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable/disable specific RME96{52,36} soundcards."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(precise_ptr, bool, boot_devs, 0444); MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably)."); -MODULE_PARM_SYNTAX(precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); MODULE_AUTHOR("Paul Davis , Winfried Ritsch"); MODULE_DESCRIPTION("RME Digi9652/Digi9636"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{RME,Hammerfall}," +MODULE_SUPPORTED_DEVICE("{{RME,Hammerfall}," "{RME,Hammerfall-Light}}"); /* The Hammerfall has two sets of 24 ADAT + 2 S/PDIF channels, one for @@ -217,7 +212,6 @@ spinlock_t lock; int irq; unsigned long port; - struct resource *res_port; unsigned long iobase; int precise_ptr; @@ -239,12 +233,11 @@ unsigned char ds_channels; unsigned char ss_channels; /* different for hammerfall/hammerfall-light */ - void *capture_buffer_unaligned; /* original buffer addresses */ - void *playback_buffer_unaligned; /* original buffer addresses */ + struct snd_dma_buffer playback_dma_buf; + struct snd_dma_buffer capture_dma_buf; + unsigned char *capture_buffer; /* suitably aligned address */ unsigned char *playback_buffer; /* suitably aligned address */ - dma_addr_t capture_buffer_addr; - dma_addr_t playback_buffer_addr; pid_t capture_pid; pid_t playback_pid; @@ -307,50 +300,24 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -#define RME9652_PREALLOCATE_MEMORY /* via module snd-hammerfall-mem */ - -#ifdef RME9652_PREALLOCATE_MEMORY -static void *snd_hammerfall_get_buffer(struct pci_dev *pci, size_t size, dma_addr_t *addrp, int capture) +static int snd_hammerfall_get_buffer(struct pci_dev *pci, struct snd_dma_buffer *dmab, size_t size) { - struct snd_dma_device pdev; - struct snd_dma_buffer dmbuf; - - memset(&pdev, 0, sizeof(pdev)); - pdev.type = SNDRV_DMA_TYPE_DEV; - pdev.dev = snd_dma_pci_data(pci); - pdev.id = capture; - dmbuf.bytes = 0; - if (! snd_dma_get_reserved(&pdev, &dmbuf)) { - if (snd_dma_alloc_pages(&pdev, size, &dmbuf) < 0) - return NULL; - snd_dma_set_reserved(&pdev, &dmbuf); + dmab->dev.type = SNDRV_DMA_TYPE_DEV; + dmab->dev.dev = snd_dma_pci_data(pci); + if (! snd_dma_get_reserved_buf(dmab, snd_dma_pci_buf_id(pci))) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), + size, dmab) < 0) + return -ENOMEM; } - *addrp = dmbuf.addr; - return dmbuf.area; -} - -static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) -{ - struct snd_dma_device pdev; - - memset(&pdev, 0, sizeof(pdev)); - pdev.type = SNDRV_DMA_TYPE_DEV; - pdev.dev = snd_dma_pci_data(pci); - pdev.id = capture; - snd_dma_free_reserved(&pdev); + return 0; } -#else -static void *snd_hammerfall_get_buffer(struct pci_dev *pci, size_t size, dma_addr_t *addrp, int capture) +static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci) { - return snd_malloc_pci_pages(pci, size, addrp); + if (dmab->area) + snd_dma_reserve_buf(dmab, snd_dma_pci_buf_id(pci)); } -static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) -{ - snd_free_pci_pages(pci, size, ptr, addr); -} -#endif static struct pci_device_id snd_rme9652_ids[] = { { @@ -858,7 +825,7 @@ static int snd_rme9652_control_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif); return 0; @@ -866,16 +833,15 @@ static int snd_rme9652_control_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme9652_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = val != rme9652->creg_spdif; rme9652->creg_spdif = val; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -888,7 +854,7 @@ static int snd_rme9652_control_spdif_stream_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); snd_rme9652_convert_to_aes(&ucontrol->value.iec958, rme9652->creg_spdif_stream); return 0; @@ -896,18 +862,17 @@ static int snd_rme9652_control_spdif_stream_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; u32 val; val = snd_rme9652_convert_from_aes(&ucontrol->value.iec958); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = val != rme9652->creg_spdif_stream; rme9652->creg_spdif_stream = val; rme9652->control_register &= ~(RME9652_PRO | RME9652_Dolby | RME9652_EMP); rme9652_write(rme9652, RME9652_control_register, rme9652->control_register |= val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -977,30 +942,28 @@ static int snd_rme9652_get_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.enumerated.item[0] = rme9652_adat1_in(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_adat1_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_rme9652_use_is_exclusive(rme9652)) return -EBUSY; val = ucontrol->value.enumerated.item[0] % 2; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = val != rme9652_adat1_in(rme9652); if (change) rme9652_set_adat1_input(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -1050,30 +1013,28 @@ static int snd_rme9652_get_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.enumerated.item[0] = rme9652_spdif_in(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_spdif_in(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_rme9652_use_is_exclusive(rme9652)) return -EBUSY; val = ucontrol->value.enumerated.item[0] % 3; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = val != rme9652_spdif_in(rme9652); if (change) rme9652_set_spdif_input(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -1121,29 +1082,27 @@ static int snd_rme9652_get_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.integer.value[0] = rme9652_spdif_out(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_spdif_out(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int val; if (!snd_rme9652_use_is_exclusive(rme9652)) return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = (int)val != rme9652_spdif_out(rme9652); rme9652_set_spdif_output(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -1210,27 +1169,25 @@ static int snd_rme9652_get_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.enumerated.item[0] = rme9652_sync_mode(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_sync_mode(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int val; val = ucontrol->value.enumerated.item[0] % 3; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = (int)val != rme9652_sync_mode(rme9652); rme9652_set_sync_mode(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } @@ -1291,7 +1248,7 @@ static int snd_rme9652_info_sync_pref(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { static char *texts[4] = {"IEC958 In", "ADAT1 In", "ADAT2 In", "ADAT3 In"}; - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; uinfo->count = 1; @@ -1304,19 +1261,17 @@ static int snd_rme9652_get_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.enumerated.item[0] = rme9652_sync_pref(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_sync_pref(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change, max; unsigned int val; @@ -1324,16 +1279,16 @@ return -EBUSY; max = rme9652->ss_channels == RME9652_NCHANNELS ? 4 : 3; val = ucontrol->value.enumerated.item[0] % max; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = (int)val != rme9652_sync_pref(rme9652); rme9652_set_sync_pref(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return change; } static int snd_rme9652_info_thru(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = rme9652->ss_channels; uinfo->value.integer.min = 0; @@ -1343,7 +1298,7 @@ static int snd_rme9652_get_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); unsigned int k; u32 thru_bits = rme9652->thru_bits; @@ -1355,8 +1310,7 @@ static int snd_rme9652_put_thru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int chn; u32 thru_bits = 0; @@ -1369,7 +1323,7 @@ thru_bits |= 1 << chn; } - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = thru_bits ^ rme9652->thru_bits; if (change) { for (chn = 0; chn < rme9652->ss_channels; ++chn) { @@ -1378,7 +1332,7 @@ rme9652_set_thru(rme9652,chn,thru_bits&(1<lock, flags); + spin_unlock_irq(&rme9652->lock); return !!change; } @@ -1399,19 +1353,17 @@ static int snd_rme9652_get_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.integer.value[0] = rme9652->passthru; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } static int snd_rme9652_put_passthru(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int val; int err = 0; @@ -1420,11 +1372,11 @@ return -EBUSY; val = ucontrol->value.integer.value[0] & 1; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); change = (ucontrol->value.integer.value[0] != rme9652->passthru); if (change) err = rme9652_set_passthru(rme9652, val); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return err ? err : change; } @@ -1447,12 +1399,11 @@ static int snd_rme9652_get_spdif_rate(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); - unsigned long flags; + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); ucontrol->value.integer.value[0] = rme9652_spdif_sample_rate(rme9652); - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } @@ -1477,7 +1428,7 @@ static int snd_rme9652_get_adat_sync(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); unsigned int mask1, mask2, val; switch (kcontrol->private_value) { @@ -1509,7 +1460,7 @@ static int snd_rme9652_get_tc_valid(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - rme9652_t *rme9652 = _snd_kcontrol_chip(kcontrol); + rme9652_t *rme9652 = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = (rme9652_read(rme9652, RME9652_status_register) & RME9652_tc_valid) ? 1 : 0; @@ -1573,8 +1524,6 @@ #endif /* ALSA_HAS_STANDARD_WAY_OF_RETURNING_TIMECODE */ -#define RME9652_CONTROLS (sizeof(snd_rme9652_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_rme9652_controls[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -1642,7 +1591,7 @@ int err; snd_kcontrol_t *kctl; - for (idx = 0; idx < RME9652_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_rme9652_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme9652_controls[idx], rme9652))) < 0) return err; if (idx == 1) /* IEC958 (S/PDIF) Stream */ @@ -1847,17 +1796,8 @@ static void snd_rme9652_free_buffers(rme9652_t *rme9652) { - if (rme9652->capture_buffer_unaligned) { - snd_hammerfall_free_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, - rme9652->capture_buffer_unaligned, - rme9652->capture_buffer_addr, 1); - } - - if (rme9652->playback_buffer_unaligned) { - snd_hammerfall_free_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, - rme9652->playback_buffer_unaligned, - rme9652->playback_buffer_addr, 0); - } + snd_hammerfall_free_buffer(&rme9652->capture_dma_buf, rme9652->pci); + snd_hammerfall_free_buffer(&rme9652->playback_dma_buf, rme9652->pci); } static int snd_rme9652_free(rme9652_t *rme9652) @@ -1866,57 +1806,40 @@ rme9652_stop(rme9652); snd_rme9652_free_buffers(rme9652); - if (rme9652->iobase) - iounmap((void *) rme9652->iobase); - if (rme9652->res_port) { - release_resource(rme9652->res_port); - kfree_nocheck(rme9652->res_port); - } if (rme9652->irq >= 0) free_irq(rme9652->irq, (void *)rme9652); + if (rme9652->iobase) + iounmap((void *) rme9652->iobase); + if (rme9652->port) + pci_release_regions(rme9652->pci); + return 0; } static int __devinit snd_rme9652_initialize_memory(rme9652_t *rme9652) { - void *pb, *cb; - dma_addr_t pb_addr, cb_addr; unsigned long pb_bus, cb_bus; - cb = snd_hammerfall_get_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, &cb_addr, 1); - pb = snd_hammerfall_get_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, &pb_addr, 0); - - if (cb == 0 || pb == 0) { - if (cb) { - snd_hammerfall_free_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, cb, cb_addr, 1); - } - if (pb) { - snd_hammerfall_free_buffer(rme9652->pci, RME9652_DMA_AREA_BYTES, pb, pb_addr, 0); - } - + if (snd_hammerfall_get_buffer(rme9652->pci, &rme9652->capture_dma_buf, RME9652_DMA_AREA_BYTES) < 0 || + snd_hammerfall_get_buffer(rme9652->pci, &rme9652->playback_dma_buf, RME9652_DMA_AREA_BYTES) < 0) { + if (rme9652->capture_dma_buf.area) + snd_dma_free_pages(&rme9652->capture_dma_buf); printk(KERN_ERR "%s: no buffers available\n", rme9652->card_name); return -ENOMEM; } - /* save raw addresses for use when freeing memory later */ - - rme9652->capture_buffer_unaligned = cb; - rme9652->playback_buffer_unaligned = pb; - rme9652->capture_buffer_addr = cb_addr; - rme9652->playback_buffer_addr = pb_addr; - /* Align to bus-space 64K boundary */ - cb_bus = (cb_addr + 0xFFFF) & ~0xFFFFl; - pb_bus = (pb_addr + 0xFFFF) & ~0xFFFFl; + cb_bus = (rme9652->capture_dma_buf.addr + 0xFFFF) & ~0xFFFFl; + pb_bus = (rme9652->playback_dma_buf.addr + 0xFFFF) & ~0xFFFFl; /* Tell the card where it is */ rme9652_write(rme9652, RME9652_rec_buffer, cb_bus); rme9652_write(rme9652, RME9652_play_buffer, pb_bus); - rme9652->capture_buffer = cb + (cb_bus - cb_addr); - rme9652->playback_buffer = pb + (pb_bus - pb_addr); + rme9652->capture_buffer = rme9652->capture_dma_buf.area + (cb_bus - rme9652->capture_dma_buf.addr); + rme9652->playback_buffer = rme9652->playback_dma_buf.area + (pb_bus - rme9652->playback_dma_buf.addr); return 0; } @@ -1984,7 +1907,7 @@ static snd_pcm_uframes_t snd_rme9652_hw_pointer(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); return rme9652_hw_pointer(rme9652); } @@ -2013,7 +1936,7 @@ static int snd_rme9652_playback_copy(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, void __user *src, snd_pcm_uframes_t count) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); char *channel_buf; snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); @@ -2030,7 +1953,7 @@ static int snd_rme9652_capture_copy(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); char *channel_buf; snd_assert(pos + count <= RME9652_CHANNEL_BUFFER_BYTES / 4, return -EINVAL); @@ -2047,7 +1970,7 @@ static int snd_rme9652_hw_silence(snd_pcm_substream_t *substream, int channel, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); char *channel_buf; channel_buf = rme9652_channel_buffer_location (rme9652, @@ -2061,7 +1984,7 @@ static int snd_rme9652_reset(snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); snd_pcm_substream_t *other; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) other = rme9652->capture_substream; @@ -2089,7 +2012,7 @@ static int snd_rme9652_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); int err; pid_t this_pid; pid_t other_pid; @@ -2154,7 +2077,7 @@ static int snd_rme9652_channel_info(snd_pcm_substream_t *substream, snd_pcm_channel_info_t *info) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); int chn; snd_assert(info->channel < RME9652_NCHANNELS, return -EINVAL); @@ -2197,7 +2120,7 @@ static int snd_rme9652_trigger(snd_pcm_substream_t *substream, int cmd) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); snd_pcm_substream_t *other; int running; spin_lock(&rme9652->lock); @@ -2260,13 +2183,14 @@ static int snd_rme9652_prepare(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); + unsigned long flags; int result = 0; - spin_lock(&rme9652->lock); + spin_lock_irqsave(&rme9652->lock, flags); if (!rme9652->running) rme9652_reset_hw_pointer(rme9652); - spin_unlock(&rme9652->lock); + spin_unlock_irqrestore(&rme9652->lock, flags); return result; } @@ -2319,10 +2243,8 @@ static unsigned int period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; -#define PERIOD_SIZES sizeof(period_sizes) / sizeof(period_sizes[0]) - static snd_pcm_hw_constraint_list_t hw_constraints_period_sizes = { - .count = PERIOD_SIZES, + .count = ARRAY_SIZE(period_sizes), .list = period_sizes, .mask = 0 }; @@ -2386,11 +2308,10 @@ static int snd_rme9652_playback_open(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); snd_pcm_set_sync(substream); @@ -2406,7 +2327,7 @@ rme9652->playback_pid = current->pid; rme9652->playback_substream = substream; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_period_sizes); @@ -2429,15 +2350,14 @@ static int snd_rme9652_playback_release(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); rme9652->playback_pid = -1; rme9652->playback_substream = NULL; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); rme9652->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(rme9652->card, SNDRV_CTL_EVENT_MASK_VALUE | @@ -2448,11 +2368,10 @@ static int snd_rme9652_capture_open(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); snd_pcm_set_sync(substream); @@ -2468,7 +2387,7 @@ rme9652->capture_pid = current->pid; rme9652->capture_substream = substream; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24); snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, &hw_constraints_period_sizes); @@ -2486,15 +2405,14 @@ static int snd_rme9652_capture_release(snd_pcm_substream_t *substream) { - rme9652_t *rme9652 = _snd_pcm_substream_chip(substream); - unsigned long flags; + rme9652_t *rme9652 = snd_pcm_substream_chip(substream); - spin_lock_irqsave(&rme9652->lock, flags); + spin_lock_irq(&rme9652->lock); rme9652->capture_pid = -1; rme9652->capture_substream = NULL; - spin_unlock_irqrestore(&rme9652->lock, flags); + spin_unlock_irq(&rme9652->lock); return 0; } @@ -2576,12 +2494,9 @@ spin_lock_init(&rme9652->lock); + if ((err = pci_request_regions(pci, "rme9652")) < 0) + return err; rme9652->port = pci_resource_start(pci, 0); - if ((rme9652->res_port = request_mem_region(rme9652->port, RME9652_IO_EXTENT, "rme9652")) == NULL) { - snd_printk("unable to grab memory region 0x%lx-0x%lx\n", rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); - return -EBUSY; - } - rme9652->iobase = (unsigned long) ioremap_nocache(rme9652->port, RME9652_IO_EXTENT); if (rme9652->iobase == 0) { snd_printk("unable to remap region 0x%lx-0x%lx\n", rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); diff -Nru a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c --- a/sound/pci/sonicvibes.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/sonicvibes.c 2004-09-06 16:37:54 -07:00 @@ -44,8 +44,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("S3 SonicVibes PCI"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{S3,SonicVibes PCI}}"); +MODULE_SUPPORTED_DEVICE("{{S3,SonicVibes PCI}}"); #ifndef PCI_VENDOR_ID_S3 #define PCI_VENDOR_ID_S3 0x5333 @@ -64,22 +63,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(reverb, bool, boot_devs, 0444); MODULE_PARM_DESC(reverb, "Enable reverb (SRAM is present) for S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(reverb, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); module_param_array(mge, bool, boot_devs, 0444); MODULE_PARM_DESC(mge, "MIC Gain Enable for S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(mge, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); module_param(dmaio, uint, 0444); MODULE_PARM_DESC(dmaio, "DDMA i/o base address for S3 SonicVibes soundcard."); -MODULE_PARM_SYNTAX(dmaio, "global," SNDRV_PORT_DESC); /* * Enhanced port direct registers @@ -207,7 +200,6 @@ */ typedef struct _snd_sonicvibes sonicvibes_t; -#define chip_t sonicvibes_t struct _snd_sonicvibes { unsigned long dma1size; @@ -215,13 +207,9 @@ int irq; unsigned long sb_port; - struct resource *res_sb_port; unsigned long enh_port; - struct resource *res_enh_port; unsigned long synth_port; - struct resource *res_synth_port; unsigned long midi_port; - struct resource *res_midi_port; unsigned long game_port; unsigned int dmaa_port; struct resource *res_dmaa; @@ -599,7 +587,7 @@ static irqreturn_t snd_sonicvibes_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, dev_id, return IRQ_NONE); + sonicvibes_t *sonic = dev_id; unsigned char status; status = inb(SV_REG(sonic, STATUS)); @@ -689,7 +677,6 @@ static int snd_sonicvibes_playback_prepare(snd_pcm_substream_t * substream) { - unsigned long flags; sonicvibes_t *sonic = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; unsigned char fmt = 0; @@ -704,17 +691,16 @@ fmt |= 2; snd_sonicvibes_setfmt(sonic, ~3, fmt); snd_sonicvibes_set_dac_rate(sonic, runtime->rate); - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); snd_sonicvibes_setdmaa(sonic, runtime->dma_addr, size); snd_sonicvibes_out1(sonic, SV_IREG_DMA_A_UPPER, count >> 8); snd_sonicvibes_out1(sonic, SV_IREG_DMA_A_LOWER, count); - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return 0; } static int snd_sonicvibes_capture_prepare(snd_pcm_substream_t * substream) { - unsigned long flags; sonicvibes_t *sonic = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; unsigned char fmt = 0; @@ -730,11 +716,11 @@ fmt |= 0x20; snd_sonicvibes_setfmt(sonic, ~0x30, fmt); snd_sonicvibes_set_adc_rate(sonic, runtime->rate); - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); snd_sonicvibes_setdmac(sonic, runtime->dma_addr, size); snd_sonicvibes_out1(sonic, SV_IREG_DMA_C_UPPER, count >> 8); snd_sonicvibes_out1(sonic, SV_IREG_DMA_C_LOWER, count); - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return 0; } @@ -864,7 +850,7 @@ static void snd_sonicvibes_pcm_free(snd_pcm_t *pcm) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, pcm->private_data, return); + sonicvibes_t *sonic = pcm->private_data; sonic->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -922,19 +908,17 @@ static int snd_sonicvibes_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); ucontrol->value.enumerated.item[0] = ((snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ADC) & SV_RECSRC_OUT) >> 5) - 1; ucontrol->value.enumerated.item[1] = ((snd_sonicvibes_in1(sonic, SV_IREG_RIGHT_ADC) & SV_RECSRC_OUT) >> 5) - 1; - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return 0; } static int snd_sonicvibes_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned short left, right, oval1, oval2; int change; @@ -943,7 +927,7 @@ return -EINVAL; left = (ucontrol->value.enumerated.item[0] + 1) << 5; right = (ucontrol->value.enumerated.item[1] + 1) << 5; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); oval1 = snd_sonicvibes_in1(sonic, SV_IREG_LEFT_ADC); oval2 = snd_sonicvibes_in1(sonic, SV_IREG_RIGHT_ADC); left = (oval1 & ~SV_RECSRC_OUT) | left; @@ -951,7 +935,7 @@ change = left != oval1 || right != oval2; snd_sonicvibes_out1(sonic, SV_IREG_LEFT_ADC, left); snd_sonicvibes_out1(sonic, SV_IREG_RIGHT_ADC, right); - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return change; } @@ -975,15 +959,14 @@ static int snd_sonicvibes_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; int invert = (kcontrol->private_value >> 24) & 0xff; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); ucontrol->value.integer.value[0] = (snd_sonicvibes_in1(sonic, reg)>> shift) & mask; - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); if (invert) ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0]; return 0; @@ -992,7 +975,6 @@ static int snd_sonicvibes_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int mask = (kcontrol->private_value >> 16) & 0xff; @@ -1004,12 +986,12 @@ if (invert) val = mask - val; val <<= shift; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); oval = snd_sonicvibes_in1(sonic, reg); val = (oval & ~(mask << shift)) | val; change = val != oval; snd_sonicvibes_out1(sonic, reg, val); - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return change; } @@ -1033,7 +1015,6 @@ static int snd_sonicvibes_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; int left_reg = kcontrol->private_value & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff; int shift_left = (kcontrol->private_value >> 16) & 0x07; @@ -1041,10 +1022,10 @@ int mask = (kcontrol->private_value >> 24) & 0xff; int invert = (kcontrol->private_value >> 22) & 1; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); ucontrol->value.integer.value[0] = (snd_sonicvibes_in1(sonic, left_reg) >> shift_left) & mask; ucontrol->value.integer.value[1] = (snd_sonicvibes_in1(sonic, right_reg) >> shift_right) & mask; - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); if (invert) { ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0]; ucontrol->value.integer.value[1] = mask - ucontrol->value.integer.value[1]; @@ -1055,7 +1036,6 @@ static int snd_sonicvibes_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); - unsigned long flags; int left_reg = kcontrol->private_value & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff; int shift_left = (kcontrol->private_value >> 16) & 0x07; @@ -1073,7 +1053,7 @@ } val1 <<= shift_left; val2 <<= shift_right; - spin_lock_irqsave(&sonic->reg_lock, flags); + spin_lock_irq(&sonic->reg_lock); oval1 = snd_sonicvibes_in1(sonic, left_reg); oval2 = snd_sonicvibes_in1(sonic, right_reg); val1 = (oval1 & ~(mask << shift_left)) | val1; @@ -1081,12 +1061,10 @@ change = val1 != oval1 || val2 != oval2; snd_sonicvibes_out1(sonic, left_reg, val1); snd_sonicvibes_out1(sonic, right_reg, val2); - spin_unlock_irqrestore(&sonic->reg_lock, flags); + spin_unlock_irq(&sonic->reg_lock); return change; } -#define SONICVIBES_CONTROLS (sizeof(snd_sonicvibes_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_sonicvibes_controls[] __devinitdata = { SONICVIBES_DOUBLE("Capture Volume", 0, SV_IREG_LEFT_ADC, SV_IREG_RIGHT_ADC, 0, 0, 15, 0), SONICVIBES_DOUBLE("Aux Playback Switch", 0, SV_IREG_LEFT_AUX1, SV_IREG_RIGHT_AUX1, 7, 7, 1, 1), @@ -1113,7 +1091,7 @@ static void snd_sonicvibes_master_free(snd_kcontrol_t *kcontrol) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, _snd_kcontrol_chip(kcontrol), return); + sonicvibes_t *sonic = snd_kcontrol_chip(kcontrol); sonic->master_mute = NULL; sonic->master_volume = NULL; } @@ -1129,7 +1107,7 @@ card = sonic->card; strcpy(card->mixername, "S3 SonicVibes"); - for (idx = 0; idx < SONICVIBES_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_sonicvibes_controls); idx++) { if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_sonicvibes_controls[idx], sonic))) < 0) return err; switch (idx) { @@ -1147,7 +1125,7 @@ static void snd_sonicvibes_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, entry->private_data, return); + sonicvibes_t *sonic = entry->private_data; unsigned char tmp; tmp = sonic->srs_space & 0x0f; @@ -1197,22 +1175,8 @@ #endif pci_write_config_dword(sonic->pci, 0x40, sonic->dmaa_port); pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port); - if (sonic->res_sb_port) { - release_resource(sonic->res_sb_port); - kfree_nocheck(sonic->res_sb_port); - } - if (sonic->res_enh_port) { - release_resource(sonic->res_enh_port); - kfree_nocheck(sonic->res_enh_port); - } - if (sonic->res_synth_port) { - release_resource(sonic->res_synth_port); - kfree_nocheck(sonic->res_synth_port); - } - if (sonic->res_midi_port) { - release_resource(sonic->res_midi_port); - kfree_nocheck(sonic->res_midi_port); - } + if (sonic->irq >= 0) + free_irq(sonic->irq, (void *)sonic); if (sonic->res_dmaa) { release_resource(sonic->res_dmaa); kfree_nocheck(sonic->res_dmaa); @@ -1221,15 +1185,14 @@ release_resource(sonic->res_dmac); kfree_nocheck(sonic->res_dmac); } - if (sonic->irq >= 0) - free_irq(sonic->irq, (void *)sonic); - snd_magic_kfree(sonic); + pci_release_regions(sonic->pci); + kfree(sonic); return 0; } static int snd_sonicvibes_dev_free(snd_device_t *device) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, device->device_data, return -ENXIO); + sonicvibes_t *sonic = device->device_data; return snd_sonicvibes_free(sonic); } @@ -1257,38 +1220,25 @@ return -ENXIO; } - sonic = snd_magic_kcalloc(sonicvibes_t, 0, GFP_KERNEL); + sonic = kcalloc(1, sizeof(*sonic), GFP_KERNEL); if (sonic == NULL) return -ENOMEM; spin_lock_init(&sonic->reg_lock); sonic->card = card; sonic->pci = pci; sonic->irq = -1; - sonic->sb_port = pci_resource_start(pci, 0); - if ((sonic->res_sb_port = request_region(sonic->sb_port, 0x10, "S3 SonicVibes SB")) == NULL) { - snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1); - snd_sonicvibes_free(sonic); - return -EBUSY; + + if ((err = pci_request_regions(pci, "S3 SonicVibes")) < 0) { + kfree(sonic); + return err; } + + sonic->sb_port = pci_resource_start(pci, 0); sonic->enh_port = pci_resource_start(pci, 1); - if ((sonic->res_enh_port = request_region(sonic->enh_port, 0x10, "S3 SonicVibes Enhanced")) == NULL) { - snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1); - snd_sonicvibes_free(sonic); - return -EBUSY; - } sonic->synth_port = pci_resource_start(pci, 2); - if ((sonic->res_synth_port = request_region(sonic->synth_port, 4, "S3 SonicVibes Synth")) == NULL) { - snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1); - snd_sonicvibes_free(sonic); - return -EBUSY; - } sonic->midi_port = pci_resource_start(pci, 3); - if ((sonic->res_midi_port = request_region(sonic->midi_port, 4, "S3 SonicVibes Midi")) == NULL) { - snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1); - snd_sonicvibes_free(sonic); - return -EBUSY; - } sonic->game_port = pci_resource_start(pci, 4); + if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_sonicvibes_free(sonic); @@ -1396,8 +1346,6 @@ * MIDI section */ -#define SONICVIBES_MIDI_CONTROLS (sizeof(snd_sonicvibes_midi_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_sonicvibes_midi_controls[] __devinitdata = { SONICVIBES_SINGLE("SonicVibes Wave Source RAM", 0, SV_IREG_WAVE_SOURCE, 0, 1, 0), SONICVIBES_SINGLE("SonicVibes Wave Source RAM+ROM", 0, SV_IREG_WAVE_SOURCE, 1, 1, 0), @@ -1408,20 +1356,20 @@ static int snd_sonicvibes_midi_input_open(mpu401_t * mpu) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, mpu->private_data, return -EIO); + sonicvibes_t *sonic = mpu->private_data; outb(sonic->irqmask &= ~SV_MIDI_MASK, SV_REG(sonic, IRQMASK)); return 0; } static void snd_sonicvibes_midi_input_close(mpu401_t * mpu) { - sonicvibes_t *sonic = snd_magic_cast(sonicvibes_t, mpu->private_data, return); + sonicvibes_t *sonic = mpu->private_data; outb(sonic->irqmask |= SV_MIDI_MASK, SV_REG(sonic, IRQMASK)); } static int __devinit snd_sonicvibes_midi(sonicvibes_t * sonic, snd_rawmidi_t * rmidi) { - mpu401_t * mpu = snd_magic_cast(mpu401_t, rmidi->private_data, return -ENXIO); + mpu401_t * mpu = rmidi->private_data; snd_card_t *card = sonic->card; snd_rawmidi_str_t *dir; unsigned int idx; @@ -1431,7 +1379,7 @@ mpu->open_input = snd_sonicvibes_midi_input_open; mpu->close_input = snd_sonicvibes_midi_input_close; dir = &rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT]; - for (idx = 0; idx < SONICVIBES_MIDI_CONTROLS; idx++) + for (idx = 0; idx < ARRAY_SIZE(snd_sonicvibes_midi_controls); idx++) if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_sonicvibes_midi_controls[idx], sonic))) < 0) return err; return 0; diff -Nru a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c --- a/sound/pci/trident/trident.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/trident/trident.c 2004-09-06 16:37:50 -07:00 @@ -33,8 +33,7 @@ MODULE_AUTHOR("Jaroslav Kysela , "); MODULE_DESCRIPTION("Trident 4D-WaveDX/NX & SiS SI7018"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Trident,4DWave DX}," +MODULE_SUPPORTED_DEVICE("{{Trident,4DWave DX}," "{Trident,4DWave NX}," "{SiS,SI7018 PCI Audio}," "{Best Union,Miss Melody 4DWave PCI}," @@ -56,19 +55,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Trident 4DWave PCI soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Trident 4DWave PCI soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Trident 4DWave PCI soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(pcm_channels, int, boot_devs, 0444); MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); -MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}"); module_param_array(wavetable_size, int, boot_devs, 0444); MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); -MODULE_PARM_SYNTAX(wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced"); static struct pci_device_id snd_trident_ids[] = { { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Trident 4DWave DX PCI Audio */ diff -Nru a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c --- a/sound/pci/trident/trident_main.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/trident/trident_main.c 2004-09-06 16:37:53 -07:00 @@ -44,8 +44,6 @@ #include -#define chip_t trident_t - static int snd_trident_pcm_mixer_build(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream); static int snd_trident_pcm_mixer_free(trident_t *trident, snd_trident_voice_t * voice, snd_pcm_substream_t *substream); static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs); @@ -119,7 +117,7 @@ unsigned int data = 0, treg; unsigned short count = 0xffff; unsigned long flags; - trident_t *trident = snd_magic_cast(trident_t, ac97->private_data, return -ENXIO); + trident_t *trident = ac97->private_data; spin_lock_irqsave(&trident->reg_lock, flags); if (trident->device == TRIDENT_DEVICE_ID_DX) { @@ -178,7 +176,7 @@ unsigned int address, data; unsigned short count = 0xffff; unsigned long flags; - trident_t *trident = snd_magic_cast(trident_t, ac97->private_data, return); + trident_t *trident = ac97->private_data; data = ((unsigned long) wdata) << 16; @@ -908,7 +906,7 @@ snd_trident_voice_t *evoice = voice->extra; snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[substream->number]; - spin_lock(&trident->reg_lock); + spin_lock_irq(&trident->reg_lock); /* set delta (rate) value */ voice->Delta = snd_trident_convert_rate(runtime->rate); @@ -969,7 +967,7 @@ evoice->ESO = (runtime->period_size * 2) - 1; } - spin_unlock(&trident->reg_lock); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -1010,7 +1008,7 @@ snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data; unsigned int val, ESO_bytes; - spin_lock(&trident->reg_lock); + spin_lock_irq(&trident->reg_lock); // Initilize the channel and set channel Mode outb(0, TRID_REG(trident, LEGACY_DMAR15)); @@ -1079,7 +1077,7 @@ snd_trident_write_voice_regs(trident, voice); - spin_unlock(&trident->reg_lock); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -1150,7 +1148,7 @@ snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data; snd_trident_voice_t *evoice = voice->extra; - spin_lock(&trident->reg_lock); + spin_lock_irq(&trident->reg_lock); voice->LBA = runtime->dma_addr; voice->Delta = snd_trident_convert_adc_rate(runtime->rate); @@ -1199,7 +1197,7 @@ evoice->ESO = (runtime->period_size * 2) - 1; } - spin_unlock(&trident->reg_lock); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -1221,7 +1219,7 @@ snd_trident_voice_t *voice = (snd_trident_voice_t *) runtime->private_data; snd_trident_voice_t *evoice = voice->extra; - spin_lock(&trident->reg_lock); + spin_lock_irq(&trident->reg_lock); /* Set channel buffer Address */ if (voice->memblk) @@ -1276,7 +1274,7 @@ evoice->ESO = (runtime->period_size * 2) - 1; } - spin_unlock(&trident->reg_lock); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -1367,7 +1365,7 @@ unsigned int RESO, LBAO; unsigned int temp; - spin_lock(&trident->reg_lock); + spin_lock_irq(&trident->reg_lock); if (trident->device != TRIDENT_DEVICE_ID_SI7018) { @@ -1479,7 +1477,7 @@ outl(temp, TRID_REG(trident, SI_SERIAL_INTF_CTRL)); } - spin_unlock(&trident->reg_lock); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -1526,7 +1524,7 @@ val = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff; snd_pcm_group_for_each(pos, substream) { s = snd_pcm_group_substream_entry(pos); - if ((trident_t *) _snd_pcm_chip(s->pcm) == trident) { + if ((trident_t *) snd_pcm_substream_chip(s) == trident) { voice = (snd_trident_voice_t *) s->runtime->private_data; evoice = voice->extra; what |= 1 << (voice->number & 0x1f); @@ -2127,21 +2125,21 @@ ---------------------------------------------------------------------------*/ static void snd_trident_pcm_free(snd_pcm_t *pcm) { - trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return); + trident_t *trident = pcm->private_data; trident->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } static void snd_trident_foldback_pcm_free(snd_pcm_t *pcm) { - trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return); + trident_t *trident = pcm->private_data; trident->foldback = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } static void snd_trident_spdif_pcm_free(snd_pcm_t *pcm) { - trident_t *trident = snd_magic_cast(trident_t, pcm->private_data, return); + trident_t *trident = pcm->private_data; trident->spdif = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -2324,13 +2322,12 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned char val; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); val = trident->spdif_ctrl; ucontrol->value.integer.value[0] = val == kcontrol->private_value; - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -2338,12 +2335,11 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned char val; int change; val = ucontrol->value.integer.value[0] ? (unsigned char) kcontrol->private_value : 0x00; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); /* S/PDIF C Channel bits 0-31 : 48khz, SCMS disabled */ change = trident->spdif_ctrl != val; trident->spdif_ctrl = val; @@ -2362,7 +2358,7 @@ outl(temp, TRID_REG(trident, SI_SERIAL_INTF_CTRL)); } } - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2393,14 +2389,13 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); ucontrol->value.iec958.status[0] = (trident->spdif_bits >> 0) & 0xff; ucontrol->value.iec958.status[1] = (trident->spdif_bits >> 8) & 0xff; ucontrol->value.iec958.status[2] = (trident->spdif_bits >> 16) & 0xff; ucontrol->value.iec958.status[3] = (trident->spdif_bits >> 24) & 0xff; - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -2408,7 +2403,6 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int val; int change; @@ -2416,7 +2410,7 @@ (ucontrol->value.iec958.status[1] << 8) | (ucontrol->value.iec958.status[2] << 16) | (ucontrol->value.iec958.status[3] << 24); - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = trident->spdif_bits != val; trident->spdif_bits = val; if (trident->device != TRIDENT_DEVICE_ID_SI7018) { @@ -2426,7 +2420,7 @@ if (trident->spdif == NULL) outl(trident->spdif_bits, TRID_REG(trident, SI_SPDIF_CS)); } - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2488,14 +2482,13 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); ucontrol->value.iec958.status[0] = (trident->spdif_pcm_bits >> 0) & 0xff; ucontrol->value.iec958.status[1] = (trident->spdif_pcm_bits >> 8) & 0xff; ucontrol->value.iec958.status[2] = (trident->spdif_pcm_bits >> 16) & 0xff; ucontrol->value.iec958.status[3] = (trident->spdif_pcm_bits >> 24) & 0xff; - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -2503,7 +2496,6 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int val; int change; @@ -2511,7 +2503,7 @@ (ucontrol->value.iec958.status[1] << 8) | (ucontrol->value.iec958.status[2] << 16) | (ucontrol->value.iec958.status[3] << 24); - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = trident->spdif_pcm_bits != val; trident->spdif_pcm_bits = val; if (trident->spdif != NULL) { @@ -2521,7 +2513,7 @@ outl(trident->spdif_bits, TRID_REG(trident, SI_SPDIF_CS)); } } - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2554,13 +2546,12 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned char val; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); val = trident->ac97_ctrl = inl(TRID_REG(trident, NX_ACR0_AC97_COM_STAT)); ucontrol->value.integer.value[0] = (val & (1 << kcontrol->private_value)) ? 1 : 0; - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return 0; } @@ -2568,11 +2559,10 @@ snd_ctl_elem_value_t * ucontrol) { trident_t *trident = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned char val; int change = 0; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); val = trident->ac97_ctrl = inl(TRID_REG(trident, NX_ACR0_AC97_COM_STAT)); val &= ~(1 << kcontrol->private_value); if (ucontrol->value.integer.value[0]) @@ -2580,7 +2570,7 @@ change = val != trident->ac97_ctrl; trident->ac97_ctrl = val; outl(trident->ac97_ctrl = val, TRID_REG(trident, NX_ACR0_AC97_COM_STAT)); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2624,19 +2614,18 @@ static int snd_trident_vol_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - unsigned long flags; trident_t *trident = snd_kcontrol_chip(kcontrol); unsigned int val; int change = 0; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); val = trident->musicvol_wavevol; val &= ~(0xffff << kcontrol->private_value); val |= ((255 - (ucontrol->value.integer.value[0] & 0xff)) | ((255 - (ucontrol->value.integer.value[1] & 0xff)) << 8)) << kcontrol->private_value; change = val != trident->musicvol_wavevol; outl(trident->musicvol_wavevol = val, TRID_REG(trident, T4D_MUSICVOL_WAVEVOL)); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2696,7 +2685,6 @@ static int snd_trident_pcm_vol_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - unsigned long flags; trident_t *trident = snd_kcontrol_chip(kcontrol); snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; unsigned int val; @@ -2707,12 +2695,12 @@ } else { val = (255 - (ucontrol->value.integer.value[0] & 255)) << 2; } - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = val != mix->vol; mix->vol = val; if (mix->voice != NULL) snd_trident_write_vol_reg(trident, mix->voice, val); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2760,7 +2748,6 @@ static int snd_trident_pcm_pan_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - unsigned long flags; trident_t *trident = snd_kcontrol_chip(kcontrol); snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; unsigned char val; @@ -2770,12 +2757,12 @@ val = ucontrol->value.integer.value[0] & 0x3f; else val = (0x3f - (ucontrol->value.integer.value[0] & 0x3f)) | 0x40; - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = val != mix->pan; mix->pan = val; if (mix->voice != NULL) snd_trident_write_pan_reg(trident, mix->voice, val); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2818,19 +2805,18 @@ static int snd_trident_pcm_rvol_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - unsigned long flags; trident_t *trident = snd_kcontrol_chip(kcontrol); snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; unsigned short val; int change = 0; val = 0x7f - (ucontrol->value.integer.value[0] & 0x7f); - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = val != mix->rvol; mix->rvol = val; if (mix->voice != NULL) snd_trident_write_rvol_reg(trident, mix->voice, val); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2873,19 +2859,18 @@ static int snd_trident_pcm_cvol_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { - unsigned long flags; trident_t *trident = snd_kcontrol_chip(kcontrol); snd_trident_pcm_mixer_t *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; unsigned short val; int change = 0; val = 0x7f - (ucontrol->value.integer.value[0] & 0x7f); - spin_lock_irqsave(&trident->reg_lock, flags); + spin_lock_irq(&trident->reg_lock); change = val != mix->cvol; mix->cvol = val; if (mix->voice != NULL) snd_trident_write_cvol_reg(trident, mix->voice, val); - spin_unlock_irqrestore(&trident->reg_lock, flags); + spin_unlock_irq(&trident->reg_lock); return change; } @@ -2961,21 +2946,21 @@ static int __devinit snd_trident_mixer(trident_t * trident, int pcm_spdif_device) { - ac97_bus_t _bus; - ac97_t _ac97; + ac97_template_t _ac97; snd_card_t * card = trident->card; snd_kcontrol_t *kctl; snd_ctl_elem_value_t *uctl; int idx, err, retries = 2; + static ac97_bus_ops_t ops = { + .write = snd_trident_codec_write, + .read = snd_trident_codec_read, + }; - uctl = (snd_ctl_elem_value_t *)snd_kcalloc(sizeof(*uctl), GFP_KERNEL); + uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); if (!uctl) return -ENOMEM; - memset(&_bus, 0, sizeof(_bus)); - _bus.write = snd_trident_codec_write; - _bus.read = snd_trident_codec_read; - if ((err = snd_ac97_bus(trident->card, &_bus, &trident->ac97_bus)) < 0) + if ((err = snd_ac97_bus(trident->card, 0, &ops, NULL, &trident->ac97_bus)) < 0) goto __out; memset(&_ac97, 0, sizeof(_ac97)); @@ -3132,7 +3117,7 @@ trident_gameport_t *gp = (trident_gameport_t *)gameport; trident_t *chip; snd_assert(gp, return 0); - chip = snd_magic_cast(trident_t, gp->chip, return 0); + chip = gp->chip; return inb(TRID_REG(chip, GAMEPORT_LEGACY)); } @@ -3141,7 +3126,7 @@ trident_gameport_t *gp = (trident_gameport_t *)gameport; trident_t *chip; snd_assert(gp, return); - chip = snd_magic_cast(trident_t, gp->chip, return); + chip = gp->chip; outb(0xff, TRID_REG(chip, GAMEPORT_LEGACY)); } @@ -3152,7 +3137,7 @@ int i; snd_assert(gp, return 0); - chip = snd_magic_cast(trident_t, gp->chip, return 0); + chip = gp->chip; *buttons = (~inb(TRID_REG(chip, GAMEPORT_LEGACY)) >> 4) & 0xf; @@ -3169,7 +3154,7 @@ trident_gameport_t *gp = (trident_gameport_t *)gameport; trident_t *chip; snd_assert(gp, return -1); - chip = snd_magic_cast(trident_t, gp->chip, return -1); + chip = gp->chip; switch (mode) { case GAMEPORT_MODE_COOKED: @@ -3280,7 +3265,7 @@ static void snd_trident_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - trident_t *trident = snd_magic_cast(trident_t, entry->private_data, return); + trident_t *trident = entry->private_data; char *s; switch (trident->device) { @@ -3331,7 +3316,7 @@ static int snd_trident_dev_free(snd_device_t *device) { - trident_t *trident = snd_magic_cast(trident_t, device->device_data, return -ENXIO); + trident_t *trident = device->device_data; return snd_trident_free(trident); } @@ -3354,7 +3339,8 @@ /* TLB array must be aligned to 16kB !!! so we allocate 32kB region and correct offset when necessary */ - if (snd_dma_alloc_pages(&trident->dma_dev, 2 * SNDRV_TRIDENT_MAX_PAGES * 4, &trident->tlb.buffer) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci), + 2 * SNDRV_TRIDENT_MAX_PAGES * 4, &trident->tlb.buffer) < 0) { snd_printk(KERN_ERR "trident: unable to allocate TLB buffer\n"); return -ENOMEM; } @@ -3367,7 +3353,8 @@ return -ENOMEM; } /* allocate and setup silent page and initialise TLB entries */ - if (snd_dma_alloc_pages(&trident->dma_dev, SNDRV_TRIDENT_PAGE_SIZE, &trident->tlb.silent_page) < 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci), + SNDRV_TRIDENT_PAGE_SIZE, &trident->tlb.silent_page) < 0) { snd_printk(KERN_ERR "trident: unable to allocate silent page\n"); return -ENOMEM; } @@ -3553,7 +3540,7 @@ return -ENXIO; } - trident = snd_magic_kcalloc(trident_t, 0, GFP_KERNEL); + trident = kcalloc(1, sizeof(*trident), GFP_KERNEL); if (trident == NULL) return -ENOMEM; trident->device = (pci->vendor << 16) | pci->device; @@ -3570,18 +3557,17 @@ if (max_wavetable_size < 0 ) max_wavetable_size = 0; trident->synth.max_size = max_wavetable_size * 1024; - trident->port = pci_resource_start(pci, 0); trident->irq = -1; trident->midi_port = TRID_REG(trident, T4D_MPU401_BASE); pci_set_master(pci); - trident->port = pci_resource_start(pci, 0); - if ((trident->res_port = request_region(trident->port, 0x100, "Trident Audio")) == NULL) { - snd_printk("unable to grab I/O region 0x%lx-0x%lx\n", trident->port, trident->port + 0x100 - 1); - snd_trident_free(trident); - return -EBUSY; + if ((err = pci_request_regions(pci, "Trident Audio")) < 0) { + kfree(trident); + return err; } + trident->port = pci_resource_start(pci, 0); + if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, "Trident Audio", (void *) trident)) { snd_printk("unable to grab IRQ %d\n", pci->irq); snd_trident_free(trident); @@ -3589,10 +3575,6 @@ } trident->irq = pci->irq; - memset(&trident->dma_dev, 0, sizeof(trident->dma_dev)); - trident->dma_dev.type = SNDRV_DMA_TYPE_DEV; - trident->dma_dev.dev = snd_dma_pci_data(pci); - /* allocate 16k-aligned TLB for NX cards */ trident->tlb.entries = NULL; trident->tlb.buffer.area = NULL; @@ -3692,18 +3674,15 @@ if (trident->tlb.memhdr) snd_util_memhdr_free(trident->tlb.memhdr); if (trident->tlb.silent_page.area) - snd_dma_free_pages(&trident->dma_dev, &trident->tlb.silent_page); + snd_dma_free_pages(&trident->tlb.silent_page); if (trident->tlb.shadow_entries) vfree(trident->tlb.shadow_entries); - snd_dma_free_pages(&trident->dma_dev, &trident->tlb.buffer); + snd_dma_free_pages(&trident->tlb.buffer); } if (trident->irq >= 0) free_irq(trident->irq, (void *)trident); - if (trident->res_port) { - release_resource(trident->res_port); - kfree_nocheck(trident->res_port); - } - snd_magic_kfree(trident); + pci_release_regions(trident->pci); + kfree(trident); return 0; } @@ -3727,7 +3706,7 @@ static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - trident_t *trident = snd_magic_cast(trident_t, dev_id, return IRQ_NONE); + trident_t *trident = dev_id; unsigned int audio_int, chn_int, stimer, channel, mask, tmp; int delta; snd_trident_voice_t *voice; @@ -3950,7 +3929,7 @@ #ifdef CONFIG_PM static int snd_trident_suspend(snd_card_t *card, unsigned int state) { - trident_t *trident = snd_magic_cast(trident_t, card->pm_private_data, return -EINVAL); + trident_t *trident = card->pm_private_data; trident->in_suspend = 1; snd_pcm_suspend_all(trident->pcm); @@ -3976,7 +3955,7 @@ static int snd_trident_resume(snd_card_t *card, unsigned int state) { - trident_t *trident = snd_magic_cast(trident_t, card->pm_private_data, return -EINVAL); + trident_t *trident = card->pm_private_data; pci_enable_device(trident->pci); if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 || diff -Nru a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c --- a/sound/pci/trident/trident_memory.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/trident/trident_memory.c 2004-09-06 16:37:54 -07:00 @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -189,7 +190,7 @@ snd_util_memblk_t *blk; snd_pcm_runtime_t *runtime = substream->runtime; int idx, page; - struct snd_sg_buf *sgbuf = runtime->dma_private; + struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream); snd_assert(runtime->dma_bytes > 0 && runtime->dma_bytes <= SNDRV_TRIDENT_MAX_PAGES * SNDRV_TRIDENT_PAGE_SIZE, return NULL); hdr = trident->tlb.memhdr; @@ -274,7 +275,7 @@ { snd_assert(trident != NULL, return NULL); snd_assert(substream != NULL, return NULL); - if (substream->dma_device.type == SNDRV_DMA_TYPE_DEV_SG) + if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV_SG) return snd_trident_alloc_sg_pages(trident, substream); else return snd_trident_alloc_cont_pages(trident, substream); @@ -367,10 +368,12 @@ set_silent_tlb(trident, page); if (ptr) { struct snd_dma_buffer dmab; + dmab.dev.type = SNDRV_DMA_TYPE_DEV; + dmab.dev.dev = snd_dma_pci_data(trident->pci); dmab.area = ptr; dmab.addr = addr; dmab.bytes = ALIGN_PAGE_SIZE; - snd_dma_free_pages(&trident->dma_dev, &dmab); + snd_dma_free_pages(&dmab); } } @@ -412,10 +415,11 @@ * fortunately Trident page size and kernel PAGE_SIZE is identical! */ for (page = first_page; page <= last_page; page++) { - if (snd_dma_alloc_pages(&hw->dma_dev, ALIGN_PAGE_SIZE, &dmab) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(hw->pci), + ALIGN_PAGE_SIZE, &dmab) < 0) goto __fail; if (! is_valid_page(dmab.addr)) { - snd_dma_free_pages(&hw->dma_dev, &dmab); + snd_dma_free_pages(&dmab); goto __fail; } set_tlb_bus(hw, page, (unsigned long)dmab.area, dmab.addr); diff -Nru a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c --- a/sound/pci/trident/trident_synth.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/trident/trident_synth.c 2004-09-06 16:37:52 -07:00 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -506,7 +507,7 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t * instr, char __user *data, long len, int atomic) { - trident_t *trident = snd_magic_cast(trident_t, private_data, return -ENXIO); + trident_t *trident = private_data; int size = instr->size; int shift = 0; @@ -540,12 +541,12 @@ instr->address.memory = memblk->offset; } else { struct snd_dma_buffer dmab; - - if (snd_dma_alloc_pages(&trident->dma_dev, size, &dmab) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci), + size, &dmab) < 0) return -ENOMEM; if (copy_from_user(dmab.area, data, size)) { - snd_dma_free_pages(&trident->dma_dev, &dmab); + snd_dma_free_pages(&dmab); return -EFAULT; } instr->address.ptr = dmab.area; @@ -559,7 +560,7 @@ static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t * instr, char __user *data, long len, int atomic) { - //trident_t *trident = snd_magic_cast(trident_t, private_data, return -ENXIO); + //trident_t *trident = private_data; int size = instr->size; int shift = 0; @@ -580,9 +581,14 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrument_t * instr, int atomic) { - trident_t *trident = snd_magic_cast(trident_t, private_data, return -ENXIO); + trident_t *trident = private_data; int size = instr->size; + if (instr->format & SIMPLE_WAVE_16BIT) + size <<= 1; + if (instr->format & SIMPLE_WAVE_STEREO) + size <<= 1; + if (trident->tlb.entries) { snd_util_memblk_t *memblk = (snd_util_memblk_t*)instr->address.ptr; if (memblk) @@ -590,14 +596,15 @@ else return -EFAULT; } else { - kfree(instr->address.ptr); + struct snd_dma_buffer dmab; + dmab.dev.type = SNDRV_DMA_TYPE_DEV; + dmab.dev.dev = snd_dma_pci_data(trident->pci); + dmab.area = instr->address.ptr; + dmab.addr = instr->address.memory; + dmab.bytes = size; + snd_dma_free_pages(&dmab); } - if (instr->format & SIMPLE_WAVE_16BIT) - size <<= 1; - if (instr->format & SIMPLE_WAVE_STEREO) - size <<= 1; - trident->synth.current_size -= size; if (trident->synth.current_size < 0) /* shouldn't need this check... */ trident->synth.current_size = 0; @@ -838,7 +845,7 @@ int what) { int idx; - trident_t *trident = snd_magic_cast(trident_t, private_data, return); + trident_t *trident = private_data; snd_trident_voice_t *pvoice; unsigned long flags; diff -Nru a/sound/pci/via82xx.c b/sound/pci/via82xx.c --- a/sound/pci/via82xx.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/via82xx.c 2004-09-06 16:37:54 -07:00 @@ -67,8 +67,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("VIA VT82xx audio"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{VIA,VT82C686A/B/C,pci},{VIA,VT8233A/C,8235}}"); +MODULE_SUPPORTED_DEVICE("{{VIA,VT82C686A/B/C,pci},{VIA,VT8233A/C,8235}}"); #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) #define SUPPORT_JOYSTICK 1 @@ -88,30 +87,22 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)"); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC); #ifdef SUPPORT_JOYSTICK module_param_array(joystick, bool, boot_devs, 0444); MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)"); -MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLE_DESC "," SNDRV_BOOLEAN_FALSE_DESC); #endif module_param_array(ac97_clock, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); -MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:48000"); module_param_array(ac97_quirk, int, boot_devs, 0444); MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); -MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,4}},dialog:list,default:-1"); module_param_array(dxs_support, int, boot_devs, 0444); MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA)"); -MODULE_PARM_SYNTAX(dxs_support, SNDRV_ENABLED ",allows:{{0,4}},dialog:list"); /* pci ids */ @@ -318,7 +309,6 @@ typedef struct _snd_via82xx via82xx_t; typedef struct via_dev viadev_t; -#define chip_t via82xx_t /* * pcm stream @@ -362,7 +352,6 @@ int irq; unsigned long port; - struct resource *res_port; struct resource *mpu_res; int chip_type; unsigned char revision; @@ -375,7 +364,6 @@ unsigned char spdif_ctrl_saved; unsigned char capture_src_saved[2]; unsigned int mpu_port_saved; - u32 pci_state[16]; #endif unsigned char playback_volume[4][2]; /* for VIA8233/C/8235; default = 0 */ @@ -405,8 +393,6 @@ spinlock_t ac97_lock; snd_info_entry_t *proc_entry; - struct snd_dma_device dma_dev; - #ifdef SUPPORT_JOYSTICK struct gameport gameport; struct resource *res_joystick; @@ -441,7 +427,9 @@ /* the start of each lists must be aligned to 8 bytes, * but the kernel pages are much bigger, so we don't care */ - if (snd_dma_alloc_pages(&chip->dma_dev, PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8), &dev->table) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8), + &dev->table) < 0) return -ENOMEM; } if (! dev->idx_table) { @@ -497,9 +485,8 @@ static int clean_via_table(viadev_t *dev, snd_pcm_substream_t *substream, struct pci_dev *pci) { - via82xx_t *chip = snd_pcm_substream_chip(substream); if (dev->table.area) { - snd_dma_free_pages(&chip->dma_dev, &dev->table); + snd_dma_free_pages(&dev->table); dev->table.area = NULL; } if (dev->idx_table) { @@ -556,7 +543,7 @@ static void snd_via82xx_codec_wait(ac97_t *ac97) { - via82xx_t *chip = snd_magic_cast(via82xx_t, ac97->private_data, return); + via82xx_t *chip = ac97->private_data; int err; err = snd_via82xx_codec_ready(chip, ac97->num); /* here we need to wait fairly for long time.. */ @@ -568,7 +555,7 @@ unsigned short reg, unsigned short val) { - via82xx_t *chip = snd_magic_cast(via82xx_t, ac97->private_data, return); + via82xx_t *chip = ac97->private_data; unsigned int xval; xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; @@ -583,7 +570,7 @@ static unsigned short snd_via82xx_codec_read(ac97_t *ac97, unsigned short reg) { - via82xx_t *chip = snd_magic_cast(via82xx_t, ac97->private_data, return ~0); + via82xx_t *chip = ac97->private_data; unsigned int xval, val = 0xffff; int again = 0; @@ -632,11 +619,10 @@ static irqreturn_t snd_via82xx_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - via82xx_t *chip = snd_magic_cast(via82xx_t, dev_id, return IRQ_NONE); + via82xx_t *chip = dev_id; unsigned int status; unsigned int i; - spin_lock(&chip->reg_lock); #if 0 /* FIXME: does it work on via823x? */ if (chip->chip_type != TYPE_VIA686) @@ -644,7 +630,6 @@ #endif status = inl(VIAREG(chip, SGD_SHADOW)); if (! (status & chip->intr_mask)) { - spin_unlock(&chip->reg_lock); if (chip->rmidi) /* check mpu401 interrupt */ return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); @@ -653,6 +638,7 @@ // _skip_sgd: /* check status for each stream */ + spin_lock(&chip->reg_lock); for (i = 0; i < chip->num_devs; i++) { viadev_t *viadev = &chip->devs[i]; unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS)); @@ -720,6 +706,10 @@ /* * calculate the linear position at the given sg-buffer index and the rest count */ + +#define check_invalid_pos(viadev,pos) \ + ((pos) < viadev->lastpos && ((pos) >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2)) + static inline unsigned int calc_linear_pos(viadev_t *viadev, unsigned int idx, unsigned int count) { unsigned int size, res; @@ -728,17 +718,24 @@ res = viadev->idx_table[idx].offset + size - count; /* check the validity of the calculated position */ - if (size < count || (res < viadev->lastpos && (res >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2))) { + if (size < count) { + snd_printd(KERN_ERR "invalid via82xx_cur_ptr (size = %d, count = %d)\n", (int)size, (int)count); + res = viadev->lastpos; + } else if (check_invalid_pos(viadev, res)) { #ifdef POINTER_DEBUG printk("fail: idx = %i/%i, lastpos = 0x%x, bufsize2 = 0x%x, offsize = 0x%x, size = 0x%x, count = 0x%x\n", idx, viadev->tbl_entries, viadev->lastpos, viadev->bufsize2, viadev->idx_table[idx].offset, viadev->idx_table[idx].size, count); #endif - /* count register returns full size when end of buffer is reached */ - if (size != count) { + if (count && size < count) { snd_printd(KERN_ERR "invalid via82xx_cur_ptr, using last valid pointer\n"); res = viadev->lastpos; } else { - res = viadev->idx_table[idx].offset + size; - if (res < viadev->lastpos && (res >= viadev->bufsize2 || viadev->lastpos < viadev->bufsize2)) { + if (! count) + /* bogus count 0 on the DMA boundary? */ + res = viadev->idx_table[idx].offset; + else + /* count register returns full size when end of buffer is reached */ + res = viadev->idx_table[idx].offset + size; + if (check_invalid_pos(viadev, res)) { snd_printd(KERN_ERR "invalid via82xx_cur_ptr (2), using last valid pointer\n"); res = viadev->lastpos; } @@ -904,7 +901,7 @@ { int changed = 0; - spin_lock(&rec->lock); + spin_lock_irq(&rec->lock); if (rec->rate != rate) { if (rec->rate && rec->used > 1) /* already set */ changed = -EINVAL; @@ -913,7 +910,7 @@ changed = 1; } } - spin_unlock(&rec->lock); + spin_unlock_irq(&rec->lock); return changed; } @@ -1035,6 +1032,7 @@ .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_PAUSE), .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, .rates = SNDRV_PCM_RATE_48000, @@ -1058,32 +1056,18 @@ { snd_pcm_runtime_t *runtime = substream->runtime; int err; - unsigned long flags; struct via_rate_lock *ratep; - struct ratetbl { - int rate; - unsigned int bit; - } ratebits[] = { - {8000, SNDRV_PCM_RATE_8000}, - {11025, SNDRV_PCM_RATE_11025}, - {16000, SNDRV_PCM_RATE_16000}, - {22050, SNDRV_PCM_RATE_22050}, - {32000, SNDRV_PCM_RATE_32000}, - {44100, SNDRV_PCM_RATE_44100}, - {48000, SNDRV_PCM_RATE_48000}, - }; - int i; runtime->hw = snd_via82xx_hw; /* set the hw rate condition */ ratep = &chip->rates[viadev->direction]; - spin_lock_irqsave(&ratep->lock, flags); + spin_lock_irq(&ratep->lock); ratep->used++; - if (chip->spdif_on) { - runtime->hw.rates = SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000; - runtime->hw.rate_min = 32000; - runtime->hw.rate_max = 48000; + if (chip->spdif_on && viadev->reg_offset == 0x30) { + /* DXS#3 and spdif is on */ + runtime->hw.rates = chip->ac97->rates[AC97_RATES_SPDIF]; + snd_pcm_limit_hw_rates(runtime); } else if (chip->dxs_fixed && viadev->reg_offset < 0x40) { /* fixed DXS playback rate */ runtime->hw.rates = SNDRV_PCM_RATE_48000; @@ -1091,30 +1075,13 @@ } else if (! ratep->rate) { int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC; runtime->hw.rates = chip->ac97->rates[idx]; - for (i = 0; i < (int)ARRAY_SIZE(ratebits); i++) { - if (runtime->hw.rates & ratebits[i].bit) { - runtime->hw.rate_min = ratebits[i].rate; - break; - } - } - for (i = ARRAY_SIZE(ratebits) - 1; i >= 0; i--) { - if (runtime->hw.rates & ratebits[i].bit) { - runtime->hw.rate_max = ratebits[i].rate; - break; - } - } + snd_pcm_limit_hw_rates(runtime); } else { /* a fixed rate */ runtime->hw.rates = SNDRV_PCM_RATE_KNOT; - for (i = 0; i < (int)ARRAY_SIZE(ratebits); i++) { - if (ratep->rate == ratebits[i].rate) { - runtime->hw.rates = ratebits[i].bit; - break; - } - } runtime->hw.rate_max = runtime->hw.rate_min = ratep->rate; } - spin_unlock_irqrestore(&ratep->lock, flags); + spin_unlock_irq(&ratep->lock); /* we may remove following constaint when we modify table entries in interrupt */ @@ -1188,16 +1155,15 @@ { via82xx_t *chip = snd_pcm_substream_chip(substream); viadev_t *viadev = (viadev_t *)substream->runtime->private_data; - unsigned long flags; struct via_rate_lock *ratep; /* release the rate lock */ ratep = &chip->rates[viadev->direction]; - spin_lock_irqsave(&ratep->lock, flags); + spin_lock_irq(&ratep->lock); ratep->used--; if (! ratep->used) ratep->rate = 0; - spin_unlock_irqrestore(&ratep->lock, flags); + spin_unlock_irq(&ratep->lock); viadev->substream = NULL; return 0; @@ -1363,6 +1329,10 @@ snd_dma_pci_data(chip->pci), 64*1024, 128*1024)) < 0) return err; + /* SPDIF supported? */ + if (! ac97_can_spdif(chip->ac97)) + return 0; + /* PCM #1: DXS3 playback (for spdif) */ err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 0, &pcm); if (err < 0) @@ -1446,17 +1416,16 @@ { via82xx_t *chip = snd_kcontrol_chip(kcontrol); unsigned long port = chip->port + (kcontrol->id.index ? (VIA_REG_CAPTURE_CHANNEL + 0x10) : VIA_REG_CAPTURE_CHANNEL); - unsigned long flags; u8 val, oval; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); oval = inb(port); val = oval & ~VIA_REG_CAPTURE_CHANNEL_MIC; if (ucontrol->value.enumerated.item[0]) val |= VIA_REG_CAPTURE_CHANNEL_MIC; if (val != oval) outb(val, port); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return val != oval; } @@ -1567,13 +1536,13 @@ static void snd_via82xx_mixer_free_ac97_bus(ac97_bus_t *bus) { - via82xx_t *chip = snd_magic_cast(via82xx_t, bus->private_data, return); + via82xx_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_via82xx_mixer_free_ac97(ac97_t *ac97) { - via82xx_t *chip = snd_magic_cast(via82xx_t, ac97->private_data, return); + via82xx_t *chip = ac97->private_data; chip->ac97 = NULL; } @@ -1585,6 +1554,18 @@ .type = AC97_TUNE_HP_ONLY }, { + .vendor = 0x1019, + .device = 0x0a81, + .name = "ECS K7VTA3", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x1019, + .device = 0x0a85, + .name = "ECS L7VMM2", + .type = AC97_TUNE_HP_ONLY + }, + { .vendor = 0x1849, .device = 0x3059, .name = "ASRock K7VM2", @@ -1613,19 +1594,18 @@ static int __devinit snd_via82xx_mixer_new(via82xx_t *chip, int ac97_quirk) { - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; int err; + static ac97_bus_ops_t ops = { + .write = snd_via82xx_codec_write, + .read = snd_via82xx_codec_read, + .wait = snd_via82xx_codec_wait, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_via82xx_codec_write; - bus.read = snd_via82xx_codec_read; - bus.wait = snd_via82xx_codec_wait; - bus.private_data = chip; - bus.private_free = snd_via82xx_mixer_free_ac97_bus; - bus.clock = chip->ac97_clock; - if ((err = snd_ac97_bus(chip->card, &bus, &chip->ac97_bus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0) return err; + chip->ac97_bus->private_free = snd_via82xx_mixer_free_ac97_bus; + chip->ac97_bus->clock = chip->ac97_clock; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -1653,6 +1633,8 @@ int i, err, caps; unsigned char val; + pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, + chip->old_legacy & ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM)); caps = chip->chip_type == TYPE_VIA8233A ? 1 : 2; for (i = 0; i < caps; i++) { snd_via8233_capture_source.index = i; @@ -1660,9 +1642,11 @@ if (err < 0) return err; } - err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs3_spdif_control, chip)); - if (err < 0) - return err; + if (ac97_can_spdif(chip->ac97)) { + err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs3_spdif_control, chip)); + if (err < 0) + return err; + } if (chip->chip_type != TYPE_VIA8233A) { err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip)); if (err < 0) @@ -1672,6 +1656,7 @@ /* select spdif data slot 10/11 */ pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &val); val = (val & ~VIA8233_SPDIF_SLOT_MASK) | VIA8233_SPDIF_SLOT_1011; + val &= ~VIA8233_SPDIF_DX3; /* SPDIF off as default */ pci_write_config_byte(chip->pci, VIA8233_SPDIF_CTRL, val); return 0; @@ -1686,6 +1671,7 @@ legacy_cfg = chip->old_legacy_cfg; legacy |= VIA_FUNC_MIDI_IRQMASK; /* FIXME: correct? (disable MIDI) */ legacy &= ~VIA_FUNC_ENABLE_GAME; /* disable joystick */ + legacy &= ~(VIA_FUNC_ENABLE_SB|VIA_FUNC_ENABLE_FM); /* diable SB & FM */ if (chip->revision >= VIA_REV_686_H) { rev_h = 1; if (mpu_port[dev] >= 0x200) { /* force MIDI */ @@ -1766,7 +1752,7 @@ */ static void snd_via82xx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - via82xx_t *chip = snd_magic_cast(via82xx_t, entry->private_data, return); + via82xx_t *chip = entry->private_data; int i; snd_iprintf(buffer, "%s\n\n", chip->card->longname); @@ -1903,7 +1889,7 @@ */ static int snd_via82xx_suspend(snd_card_t *card, unsigned int state) { - via82xx_t *chip = snd_magic_cast(via82xx_t, card->pm_private_data, return -EINVAL); + via82xx_t *chip = card->pm_private_data; int i; for (i = 0; i < 2; i++) @@ -1921,7 +1907,6 @@ chip->capture_src_saved[1] = inb(chip->port + VIA_REG_CAPTURE_CHANNEL + 0x10); } - pci_save_state(chip->pci, chip->pci_state); pci_set_power_state(chip->pci, 3); pci_disable_device(chip->pci); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1930,11 +1915,10 @@ static int snd_via82xx_resume(snd_card_t *card, unsigned int state) { - via82xx_t *chip = snd_magic_cast(via82xx_t, card->pm_private_data, return -EINVAL); + via82xx_t *chip = card->pm_private_data; int idx, i; pci_enable_device(chip->pci); - pci_restore_state(chip->pci, chip->pci_state); pci_set_power_state(chip->pci, 0); snd_via82xx_chip_init(chip); @@ -1976,16 +1960,13 @@ snd_via82xx_channel_reset(chip, &chip->devs[i]); synchronize_irq(chip->irq); __end_hw: + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); if (chip->mpu_res) { release_resource(chip->mpu_res); kfree_nocheck(chip->mpu_res); } - if (chip->res_port) { - release_resource(chip->res_port); - kfree_nocheck(chip->res_port); - } - if (chip->irq >= 0) - free_irq(chip->irq, (void *)chip); + pci_release_regions(chip->pci); if (chip->chip_type == TYPE_VIA686) { #ifdef SUPPORT_JOYSTICK if (chip->res_joystick) { @@ -1997,13 +1978,13 @@ pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, chip->old_legacy); pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, chip->old_legacy_cfg); } - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_via82xx_dev_free(snd_device_t *device) { - via82xx_t *chip = snd_magic_cast(via82xx_t, device->device_data, return -ENXIO); + via82xx_t *chip = device->device_data; return snd_via82xx_free(chip); } @@ -2023,7 +2004,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - if ((chip = snd_magic_kcalloc(via82xx_t, 0, GFP_KERNEL)) == NULL) + if ((chip = kcalloc(1, sizeof(*chip), GFP_KERNEL)) == NULL) return -ENOMEM; chip->chip_type = chip_type; @@ -2037,19 +2018,14 @@ chip->pci = pci; chip->irq = -1; - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(pci); - pci_read_config_byte(pci, VIA_FUNC_ENABLE, &chip->old_legacy); pci_read_config_byte(pci, VIA_PNP_CONTROL, &chip->old_legacy_cfg); - chip->port = pci_resource_start(pci, 0); - if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) { - snd_printk("unable to grab ports 0x%lx-0x%lx\n", chip->port, chip->port + 256 - 1); - snd_via82xx_free(chip); - return -EBUSY; + if ((err = pci_request_regions(pci, card->driver)) < 0) { + kfree(chip); + return err; } + chip->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, (void *)chip)) { snd_printk("unable to grab IRQ %d\n", pci->irq); @@ -2111,9 +2087,12 @@ { .vendor = 0x1005, .device = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */ { .vendor = 0x1019, .device = 0x0996, .action = VIA_DXS_48K }, { .vendor = 0x1019, .device = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ + { .vendor = 0x1019, .device = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ + { .vendor = 0x1025, .device = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ { .vendor = 0x1043, .device = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ { .vendor = 0x1043, .device = 0x80a1, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8-X */ { .vendor = 0x1043, .device = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ + { .vendor = 0x1071, .device = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ { .vendor = 0x10cf, .device = 0x118e, .action = VIA_DXS_ENABLE }, /* FSC laptop */ { .vendor = 0x1106, .device = 0x4161, .action = VIA_DXS_NO_VRA }, /* ASRock K7VT2 */ { .vendor = 0x1106, .device = 0xaa01, .action = VIA_DXS_NO_VRA }, /* EPIA MII */ @@ -2126,6 +2105,7 @@ { .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ { .vendor = 0x1462, .device = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */ { .vendor = 0x1584, .device = 0x8120, .action = VIA_DXS_ENABLE }, /* Gericom/Targa/Vobis/Uniwill laptop */ + { .vendor = 0x1584, .device = 0x8123, .action = VIA_DXS_NO_VRA }, /* Uniwill (Targa Visionary XP-210) */ { .vendor = 0x161f, .device = 0x202b, .action = VIA_DXS_NO_VRA }, /* Amira Note book */ { .vendor = 0x161f, .device = 0x2032, .action = VIA_DXS_48K }, /* m680x machines */ { .vendor = 0x1631, .device = 0xe004, .action = VIA_DXS_ENABLE }, /* Easy Note 3174, Packard Bell */ diff -Nru a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c --- a/sound/pci/vx222/vx222.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pci/vx222/vx222.c 2004-09-06 16:37:53 -07:00 @@ -28,15 +28,12 @@ #include #include "vx222.h" -#define chip_t vx_core_t - #define CARD_NAME "VX222" MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("Digigram VX222 V2/Mic"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Digigram," CARD_NAME "}}"); +MODULE_SUPPORTED_DEVICE("{{Digigram," CARD_NAME "}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -47,19 +44,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(mic, bool, boot_devs, 0444); MODULE_PARM_DESC(mic, "Enable Microphone."); -MODULE_PARM_SYNTAX(mic, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); module_param_array(ibl, int, boot_devs, 0444); MODULE_PARM_DESC(ibl, "Capture IBL size."); -MODULE_PARM_SYNTAX(ibl, SNDRV_ENABLED); /* */ @@ -119,24 +111,19 @@ */ static int snd_vx222_free(vx_core_t *chip) { - int i; struct snd_vx222 *vx = (struct snd_vx222 *)chip; if (chip->irq >= 0) free_irq(chip->irq, (void*)chip); - for (i = 0; i < 2; i++) { - if (vx->port_res[i]) { - release_resource(vx->port_res[i]); - kfree_nocheck(vx->port_res[i]); - } - } - snd_magic_kfree(chip); + if (vx->port[0]) + pci_release_regions(vx->pci); + kfree(chip); return 0; } static int snd_vx222_dev_free(snd_device_t *device) { - vx_core_t *chip = snd_magic_cast(vx_core_t, device->device_data, return -ENXIO); + vx_core_t *chip = device->device_data; return snd_vx222_free(chip); } @@ -164,21 +151,14 @@ if (! chip) return -ENOMEM; vx = (struct snd_vx222 *)chip; + vx->pci = pci; - for (i = 0; i < 2; i++) { - if (!(pci_resource_flags(pci, i + 1) & IORESOURCE_IO)) { - snd_printk(KERN_ERR "invalid i/o resource %d\n", i + 1); - snd_vx222_free(chip); - return -ENOMEM; - } - vx->port[i] = pci_resource_start(pci, i + 1); - if ((vx->port_res[i] = request_region(vx->port[i], 0x60, - CARD_NAME)) == NULL) { - snd_printk(KERN_ERR "unable to grab port 0x%lx\n", vx->port[i]); - snd_vx222_free(chip); - return -EBUSY; - } + if ((err = pci_request_regions(pci, CARD_NAME)) < 0) { + snd_vx222_free(chip); + return err; } + for (i = 0; i < 2; i++) + vx->port[i] = pci_resource_start(pci, i + 1); if (request_irq(pci->irq, snd_vx_irq_handler, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *) chip)) { diff -Nru a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h --- a/sound/pci/vx222/vx222.h 2004-09-06 16:37:55 -07:00 +++ b/sound/pci/vx222/vx222.h 2004-09-06 16:37:55 -07:00 @@ -28,8 +28,8 @@ vx_core_t core; /* h/w config; for PLX and for DSP */ + struct pci_dev *pci; unsigned long port[2]; - struct resource *port_res[2]; unsigned int regCDSP; /* current CDSP register */ unsigned int regCFG; /* current CFG register */ diff -Nru a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c --- a/sound/pci/vx222/vx222_ops.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pci/vx222/vx222_ops.c 2004-09-06 16:37:50 -07:00 @@ -27,8 +27,6 @@ #include #include "vx222.h" -#define chip_t vx_core_t - static int vx2_reg_offset[VX_REG_MAX] = { [VX_ICR] = 0x00, diff -Nru a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c --- a/sound/pci/ymfpci/ymfpci.c 2004-09-06 16:37:52 -07:00 +++ b/sound/pci/ymfpci/ymfpci.c 2004-09-06 16:37:52 -07:00 @@ -33,8 +33,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Yamaha DS-XG PCI"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Yamaha,YMF724}," +MODULE_SUPPORTED_DEVICE("{{Yamaha,YMF724}," "{Yamaha,YMF724F}," "{Yamaha,YMF740}," "{Yamaha,YMF740C}," @@ -54,27 +53,20 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the Yamaha DS-XG PCI soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the Yamaha DS-XG PCI soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Yamaha DS-XG soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(mpu_port, long, boot_devs, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 Port."); -MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED); module_param_array(fm_port, long, boot_devs, 0444); MODULE_PARM_DESC(fm_port, "FM OPL-3 Port."); -MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED); #ifdef SUPPORT_JOYSTICK module_param_array(joystick_port, long, boot_devs, 0444); MODULE_PARM_DESC(joystick_port, "Joystick port address"); -MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED); #endif module_param_array(rear_switch, bool, boot_devs, 0444); MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); -MODULE_PARM_SYNTAX(rear_switch, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); static struct pci_device_id snd_ymfpci_ids[] = { { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ diff -Nru a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c --- a/sound/pci/ymfpci/ymfpci_main.c 2004-09-06 16:37:54 -07:00 +++ b/sound/pci/ymfpci/ymfpci_main.c 2004-09-06 16:37:54 -07:00 @@ -42,8 +42,6 @@ #include -#define chip_t ymfpci_t - /* * constants */ @@ -102,7 +100,7 @@ static void snd_ymfpci_codec_write(ac97_t *ac97, u16 reg, u16 val) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, ac97->private_data, return); + ymfpci_t *chip = ac97->private_data; u32 cmd; snd_ymfpci_codec_ready(chip, 0); @@ -112,7 +110,7 @@ static u16 snd_ymfpci_codec_read(ac97_t *ac97, u16 reg) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, ac97->private_data, return -ENXIO); + ymfpci_t *chip = ac97->private_data; if (snd_ymfpci_codec_ready(chip, 0)) return ~0; @@ -330,7 +328,7 @@ static void snd_ymfpci_pcm_capture_interrupt(snd_pcm_substream_t *substream) { snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return); + ymfpci_pcm_t *ypcm = runtime->private_data; ymfpci_t *chip = ypcm->chip; u32 pos, delta; @@ -358,7 +356,7 @@ int cmd) { ymfpci_t *chip = snd_pcm_substream_chip(substream); - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, substream->runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = substream->runtime->private_data; int result = 0; spin_lock(&chip->reg_lock); @@ -395,7 +393,7 @@ int cmd) { ymfpci_t *chip = snd_pcm_substream_chip(substream); - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, substream->runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = substream->runtime->private_data; int result = 0; u32 tmp; @@ -541,7 +539,8 @@ static int __devinit snd_ymfpci_ac3_init(ymfpci_t *chip) { - if (snd_dma_alloc_pages(&chip->dma_dev, 4096, &chip->ac3_tmp_base) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + 4096, &chip->ac3_tmp_base) < 0) return -ENOMEM; chip->bank_effect[3][0]->base = @@ -568,7 +567,7 @@ spin_unlock_irq(&chip->reg_lock); // snd_ymfpci_irq_wait(chip); if (chip->ac3_tmp_base.area) { - snd_dma_free_pages(&chip->dma_dev, &chip->ac3_tmp_base); + snd_dma_free_pages(&chip->ac3_tmp_base); chip->ac3_tmp_base.area = NULL; } return 0; @@ -578,7 +577,7 @@ snd_pcm_hw_params_t * hw_params) { snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; int err; if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) @@ -596,7 +595,7 @@ if (runtime->private_data == NULL) return 0; - ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ypcm = runtime->private_data; /* wait, until the PCI operations are not finished */ snd_ymfpci_irq_wait(chip); @@ -616,7 +615,7 @@ { // ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; unsigned int nvoice; ypcm->period_size = runtime->period_size; @@ -654,7 +653,7 @@ { ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; snd_ymfpci_capture_bank_t * bank; int nbank; u32 rate, format; @@ -698,7 +697,7 @@ { ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; ymfpci_voice_t *voice = ypcm->voices[0]; if (!(ypcm->running && voice)) @@ -710,7 +709,7 @@ { ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; if (!ypcm->running) return 0; @@ -736,7 +735,7 @@ static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, dev_id, return IRQ_NONE); + ymfpci_t *chip = dev_id; u32 status, nvoice, mode; ymfpci_voice_t *voice; @@ -830,10 +829,10 @@ static void snd_ymfpci_pcm_free_substream(snd_pcm_runtime_t *runtime) { - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return); + ymfpci_pcm_t *ypcm = runtime->private_data; if (ypcm) - snd_magic_kfree(ypcm); + kfree(ypcm); } static int snd_ymfpci_playback_open_1(snd_pcm_substream_t * substream) @@ -842,7 +841,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; ymfpci_pcm_t *ypcm; - ypcm = snd_magic_kcalloc(ymfpci_pcm_t, 0, GFP_KERNEL); + ypcm = kcalloc(1, sizeof(*ypcm), GFP_KERNEL); if (ypcm == NULL) return -ENOMEM; ypcm->chip = chip; @@ -886,20 +885,19 @@ ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; ymfpci_pcm_t *ypcm; - unsigned long flags; int err; if ((err = snd_ymfpci_playback_open_1(substream)) < 0) return err; - ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return 0); + ypcm = runtime->private_data; ypcm->output_front = 1; ypcm->output_rear = chip->mode_dup4ch ? 1 : 0; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); if (ypcm->output_rear) { ymfpci_open_extension(chip); chip->rear_opened++; } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -908,22 +906,21 @@ ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; ymfpci_pcm_t *ypcm; - unsigned long flags; int err; if ((err = snd_ymfpci_playback_open_1(substream)) < 0) return err; - ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return 0); + ypcm = runtime->private_data; ypcm->output_front = 0; ypcm->output_rear = 1; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTCTRL, snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) | 2); ymfpci_open_extension(chip); chip->spdif_pcm_bits = chip->spdif_bits; snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTSTATUS, chip->spdif_pcm_bits); chip->spdif_opened++; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); chip->spdif_pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | @@ -936,18 +933,17 @@ ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; ymfpci_pcm_t *ypcm; - unsigned long flags; int err; if ((err = snd_ymfpci_playback_open_1(substream)) < 0) return err; - ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return 0); + ypcm = runtime->private_data; ypcm->output_front = 0; ypcm->output_rear = 1; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); ymfpci_open_extension(chip); chip->rear_opened++; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -958,7 +954,7 @@ snd_pcm_runtime_t *runtime = substream->runtime; ymfpci_pcm_t *ypcm; - ypcm = snd_magic_kcalloc(ymfpci_pcm_t, 0, GFP_KERNEL); + ypcm = kcalloc(1, sizeof(*ypcm), GFP_KERNEL); if (ypcm == NULL) return -ENOMEM; ypcm->chip = chip; @@ -993,30 +989,28 @@ static int snd_ymfpci_playback_close(snd_pcm_substream_t * substream) { ymfpci_t *chip = snd_pcm_substream_chip(substream); - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, substream->runtime->private_data, return -ENXIO); - unsigned long flags; + ymfpci_pcm_t *ypcm = substream->runtime->private_data; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); if (ypcm->output_rear && chip->rear_opened > 0) { chip->rear_opened--; ymfpci_close_extension(chip); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return snd_ymfpci_playback_close_1(substream); } static int snd_ymfpci_playback_spdif_close(snd_pcm_substream_t * substream) { ymfpci_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); chip->spdif_opened = 0; ymfpci_close_extension(chip); snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTCTRL, snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) & ~2); snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTSTATUS, chip->spdif_bits); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); chip->spdif_pcm_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, &chip->spdif_pcm_ctl->id); @@ -1026,14 +1020,13 @@ static int snd_ymfpci_playback_4ch_close(snd_pcm_substream_t * substream) { ymfpci_t *chip = snd_pcm_substream_chip(substream); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); if (chip->rear_opened > 0) { chip->rear_opened--; ymfpci_close_extension(chip); } - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return snd_ymfpci_playback_close_1(substream); } @@ -1041,7 +1034,7 @@ { ymfpci_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - ymfpci_pcm_t *ypcm = snd_magic_cast(ymfpci_pcm_t, runtime->private_data, return -ENXIO); + ymfpci_pcm_t *ypcm = runtime->private_data; if (ypcm != NULL) { chip->capture_substream[ypcm->capture_bank_number] = NULL; @@ -1074,7 +1067,7 @@ static void snd_ymfpci_pcm_free(snd_pcm_t *pcm) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, pcm->private_data, return); + ymfpci_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1120,7 +1113,7 @@ static void snd_ymfpci_pcm2_free(snd_pcm_t *pcm) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, pcm->private_data, return); + ymfpci_t *chip = pcm->private_data; chip->pcm2 = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1166,7 +1159,7 @@ static void snd_ymfpci_pcm_spdif_free(snd_pcm_t *pcm) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, pcm->private_data, return); + ymfpci_t *chip = pcm->private_data; chip->pcm_spdif = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1211,7 +1204,7 @@ static void snd_ymfpci_pcm_4ch_free(snd_pcm_t *pcm) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, pcm->private_data, return); + ymfpci_t *chip = pcm->private_data; chip->pcm_4ch = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1254,12 +1247,11 @@ snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); ucontrol->value.iec958.status[0] = (chip->spdif_bits >> 0) & 0xff; ucontrol->value.iec958.status[1] = (chip->spdif_bits >> 8) & 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1267,18 +1259,17 @@ snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int val; int change; val = ((ucontrol->value.iec958.status[0] & 0x3e) << 0) | (ucontrol->value.iec958.status[1] << 8); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); change = chip->spdif_bits != val; chip->spdif_bits = val; if ((snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) & 1) && chip->pcm_spdif == NULL) snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTSTATUS, chip->spdif_bits); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1302,12 +1293,11 @@ snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); ucontrol->value.iec958.status[0] = 0x3e; ucontrol->value.iec958.status[1] = 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1331,12 +1321,11 @@ snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); ucontrol->value.iec958.status[0] = (chip->spdif_pcm_bits >> 0) & 0xff; ucontrol->value.iec958.status[1] = (chip->spdif_pcm_bits >> 8) & 0xff; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -1344,18 +1333,17 @@ snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int val; int change; val = ((ucontrol->value.iec958.status[0] & 0x3e) << 0) | (ucontrol->value.iec958.status[1] << 8); - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); change = chip->spdif_pcm_bits != val; chip->spdif_pcm_bits = val; if ((snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) & 2)) snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTSTATUS, chip->spdif_pcm_bits); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1385,12 +1373,11 @@ static int snd_ymfpci_drec_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; u16 reg; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); reg = snd_ymfpci_readw(chip, YDSXGR_GLOBALCTRL); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); if (!(reg & 0x100)) value->value.enumerated.item[0] = 0; else @@ -1401,17 +1388,16 @@ static int snd_ymfpci_drec_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; u16 reg, old_reg; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); old_reg = snd_ymfpci_readw(chip, YDSXGR_GLOBALCTRL); if (value->value.enumerated.item[0] == 0) reg = old_reg & ~0x100; else reg = (old_reg & ~0x300) | 0x100 | ((value->value.enumerated.item[0] == 2) << 9); snd_ymfpci_writew(chip, YDSXGR_GLOBALCTRL, reg); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return reg != old_reg; } @@ -1470,7 +1456,6 @@ static int snd_ymfpci_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; int reg = kcontrol->private_value; unsigned int shift = 0, mask = 1, invert = 0; int change; @@ -1485,12 +1470,12 @@ if (invert) val = mask - val; val <<= shift; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); oval = snd_ymfpci_readl(chip, reg); val = (oval & ~(mask << shift)) | val; change = val != oval; snd_ymfpci_writel(chip, reg, val); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1517,16 +1502,15 @@ static int snd_ymfpci_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int reg = kcontrol->private_value; unsigned int shift_left = 0, shift_right = 16, mask = 16383, invert = 0; unsigned int val; if (reg < 0x80 || reg >= 0xc0) return -EINVAL; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); val = snd_ymfpci_readl(chip, reg); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); ucontrol->value.integer.value[0] = (val >> shift_left) & mask; ucontrol->value.integer.value[1] = (val >> shift_right) & mask; if (invert) { @@ -1539,7 +1523,6 @@ static int snd_ymfpci_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) { ymfpci_t *chip = snd_kcontrol_chip(kcontrol); - unsigned long flags; unsigned int reg = kcontrol->private_value; unsigned int shift_left = 0, shift_right = 16, mask = 16383, invert = 0; int change; @@ -1555,12 +1538,12 @@ } val1 <<= shift_left; val2 <<= shift_right; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); oval = snd_ymfpci_readl(chip, reg); val1 = (oval & ~((mask << shift_left) | (mask << shift_right))) | val1 | val2; change = val1 != oval; snd_ymfpci_writel(chip, reg, val1); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return change; } @@ -1594,8 +1577,6 @@ } -#define YMFPCI_CONTROLS (sizeof(snd_ymfpci_controls)/sizeof(snd_kcontrol_new_t)) - static snd_kcontrol_new_t snd_ymfpci_controls[] __devinitdata = { YMFPCI_DOUBLE("Wave Playback Volume", 0, YDSXGR_NATIVEDACOUTVOL), YMFPCI_DOUBLE("Wave Capture Volume", 0, YDSXGR_NATIVEDACLOOPVOL), @@ -1709,31 +1690,30 @@ static void snd_ymfpci_mixer_free_ac97_bus(ac97_bus_t *bus) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, bus->private_data, return); + ymfpci_t *chip = bus->private_data; chip->ac97_bus = NULL; } static void snd_ymfpci_mixer_free_ac97(ac97_t *ac97) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, ac97->private_data, return); + ymfpci_t *chip = ac97->private_data; chip->ac97 = NULL; } int __devinit snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch) { - ac97_bus_t bus; - ac97_t ac97; + ac97_template_t ac97; snd_kcontrol_t *kctl; unsigned int idx; int err; + static ac97_bus_ops_t ops = { + .write = snd_ymfpci_codec_write, + .read = snd_ymfpci_codec_read, + }; - memset(&bus, 0, sizeof(bus)); - bus.write = snd_ymfpci_codec_write; - bus.read = snd_ymfpci_codec_read; - bus.private_data = chip; - bus.private_free = snd_ymfpci_mixer_free_ac97_bus; - if ((err = snd_ac97_bus(chip->card, &bus, &chip->ac97_bus)) < 0) + if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0) return err; + chip->ac97_bus->private_free = snd_ymfpci_mixer_free_ac97_bus; memset(&ac97, 0, sizeof(ac97)); ac97.private_data = chip; @@ -1741,7 +1721,7 @@ if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0) return err; - for (idx = 0; idx < YMFPCI_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_ymfpci_controls); idx++) { if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0) return err; } @@ -1854,7 +1834,7 @@ static void snd_ymfpci_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, entry->private_data, return); + ymfpci_t *chip = entry->private_data; int i; snd_iprintf(buffer, "YMFPCI\n\n"); @@ -1975,7 +1955,8 @@ chip->work_size; /* work_ptr must be aligned to 256 bytes, but it's already covered with the kernel page allocation mechanism */ - if (snd_dma_alloc_pages(&chip->dma_dev, size, &chip->work_ptr) < 0) + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + size, &chip->work_ptr) < 0) return -ENOMEM; ptr = chip->work_ptr.area; ptr_addr = chip->work_ptr.addr; @@ -2106,7 +2087,7 @@ if (chip->reg_area_virt) iounmap((void *)chip->reg_area_virt); if (chip->work_ptr.area) - snd_dma_free_pages(&chip->dma_dev, &chip->work_ptr); + snd_dma_free_pages(&chip->work_ptr); if (chip->irq >= 0) free_irq(chip->irq, (void *)chip); @@ -2117,13 +2098,13 @@ pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_ymfpci_dev_free(snd_device_t *device) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, device->device_data, return -ENXIO); + ymfpci_t *chip = device->device_data; return snd_ymfpci_free(chip); } @@ -2159,7 +2140,7 @@ static int snd_ymfpci_suspend(snd_card_t *card, unsigned int state) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, card->pm_private_data, return -EINVAL); + ymfpci_t *chip = card->pm_private_data; unsigned int i; snd_pcm_suspend_all(chip->pcm); @@ -2178,7 +2159,7 @@ static int snd_ymfpci_resume(snd_card_t *card, unsigned int state) { - ymfpci_t *chip = snd_magic_cast(ymfpci_t, card->pm_private_data, return -EINVAL); + ymfpci_t *chip = card->pm_private_data; unsigned int i; pci_enable_device(chip->pci); @@ -2195,11 +2176,10 @@ /* start hw again */ if (chip->start_count > 0) { - unsigned long flags; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_ymfpci_writel(chip, YDSXGR_MODE, chip->saved_ydsxgr_mode); chip->active_bank = snd_ymfpci_readl(chip, YDSXGR_CTRLSELECT); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); } snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; @@ -2223,7 +2203,7 @@ if ((err = pci_enable_device(pci)) < 0) return err; - chip = snd_magic_kcalloc(ymfpci_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->old_legacy_ctrl = old_legacy_ctrl; @@ -2251,10 +2231,6 @@ return -EBUSY; } chip->irq = pci->irq; - - memset(&chip->dma_dev, 0, sizeof(chip->dma_dev)); - chip->dma_dev.type = SNDRV_DMA_TYPE_DEV; - chip->dma_dev.dev = snd_dma_pci_data(pci); snd_ymfpci_aclink_reset(pci); if (snd_ymfpci_codec_ready(chip, 0) < 0) { diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c 2004-09-06 16:37:51 -07:00 @@ -37,8 +37,7 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Sound Core " CARD_NAME); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Sound Core," CARD_NAME "}}"); +MODULE_SUPPORTED_DEVICE("{{Sound Core," CARD_NAME "}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -49,13 +48,10 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param(irq_mask, int, 0444); MODULE_PARM_DESC(irq_mask, "IRQ bitmask for " CARD_NAME " soundcard."); module_param_array(irq_list, int, boot_devs, 0444); @@ -103,13 +99,13 @@ card_list[pdacf->index] = NULL; pdacf->card = NULL; - snd_magic_kfree(pdacf); + kfree(pdacf); return 0; } static int snd_pdacf_dev_free(snd_device_t *device) { - pdacf_t *chip = snd_magic_cast(pdacf_t, device->device_data, return -ENXIO); + pdacf_t *chip = device->device_data; return snd_pdacf_free(chip); } @@ -152,7 +148,7 @@ return NULL; if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) { - snd_magic_kfree(pdacf); + kfree(pdacf); snd_card_free(card); return NULL; } @@ -258,7 +254,7 @@ */ static void snd_pdacf_detach(dev_link_t *link) { - pdacf_t *chip = snd_magic_cast(pdacf_t, link->priv, return); + pdacf_t *chip = link->priv; snd_printdd(KERN_DEBUG "pdacf_detach called\n"); /* Remove the interface data from the linked list */ @@ -297,7 +293,7 @@ static void pdacf_config(dev_link_t *link) { client_handle_t handle = link->handle; - pdacf_t *pdacf = snd_magic_cast(pdacf_t, link->priv, return); + pdacf_t *pdacf = link->priv; tuple_t tuple; cisparse_t parse; config_info_t conf; diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c --- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c 2004-09-06 16:37:51 -07:00 @@ -30,7 +30,7 @@ */ unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg) { - pdacf_t *chip = snd_magic_cast(pdacf_t, private_data, return 0); + pdacf_t *chip = private_data; unsigned long timeout; unsigned long flags; unsigned char res; @@ -62,7 +62,7 @@ void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val) { - pdacf_t *chip = snd_magic_cast(pdacf_t, private_data, return); + pdacf_t *chip = private_data; unsigned long timeout; unsigned long flags; @@ -130,7 +130,7 @@ static void pdacf_proc_read(snd_info_entry_t * entry, snd_info_buffer_t * buffer) { - pdacf_t *chip = snd_magic_cast(pdacf_t, entry->private_data, return); + pdacf_t *chip = entry->private_data; u16 tmp; snd_iprintf(buffer, "PDAudioCF\n\n"); @@ -151,7 +151,7 @@ { pdacf_t *chip; - chip = snd_magic_kcalloc(pdacf_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return NULL; chip->card = card; @@ -257,7 +257,7 @@ int snd_pdacf_suspend(snd_card_t *card, unsigned int state) { - pdacf_t *chip = snd_magic_cast(pdacf_t, card->pm_private_data, return -EINVAL); + pdacf_t *chip = card->pm_private_data; u16 val; snd_pcm_suspend_all(chip->pcm); @@ -278,7 +278,7 @@ int snd_pdacf_resume(snd_card_t *card, unsigned int state) { - pdacf_t *chip = snd_magic_cast(pdacf_t, card->pm_private_data, return -EINVAL); + pdacf_t *chip = card->pm_private_data; int timeout = 40; pdacf_reinit(chip, 1); diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c --- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c 2004-09-06 16:37:53 -07:00 @@ -28,7 +28,7 @@ */ irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs) { - pdacf_t *chip = snd_magic_cast(pdacf_t, dev, return IRQ_NONE); + pdacf_t *chip = dev; unsigned short stat; if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE| @@ -258,7 +258,7 @@ void pdacf_tasklet(unsigned long private_data) { - pdacf_t *chip = snd_magic_cast(pdacf_t, (void *)private_data, return); + pdacf_t *chip = (pdacf_t *) private_data; int size, off, cont, rdp, wdp; if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE|PDAUDIOCF_STAT_IS_CONFIGURED)) != PDAUDIOCF_STAT_IS_CONFIGURED) diff -Nru a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 2004-09-06 16:37:53 -07:00 +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c 2004-09-06 16:37:53 -07:00 @@ -28,8 +28,6 @@ #include #include "pdaudiocf.h" -#define chip_t pdacf_t - /* * we use a vmalloc'ed (sg-)buffer @@ -331,7 +329,7 @@ */ static void snd_pdacf_pcm_free(snd_pcm_t *pcm) { - pdacf_t *chip = snd_magic_cast(pdacf_t, pcm->private_data, return); + pdacf_t *chip = pcm->private_data; chip->pcm = NULL; } diff -Nru a/sound/pcmcia/vx/vx_entry.c b/sound/pcmcia/vx/vx_entry.c --- a/sound/pcmcia/vx/vx_entry.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pcmcia/vx/vx_entry.c 2004-09-06 16:37:50 -07:00 @@ -69,13 +69,13 @@ hw->card_list[vxp->index] = NULL; chip->card = NULL; - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_vxpocket_dev_free(snd_device_t *device) { - vx_core_t *chip = snd_magic_cast(vx_core_t, device->device_data, return -ENXIO); + vx_core_t *chip = device->device_data; return snd_vxpocket_free(chip); } @@ -121,7 +121,7 @@ return NULL; if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops) < 0) { - snd_magic_kfree(chip); + kfree(chip); snd_card_free(card); return NULL; } @@ -226,7 +226,7 @@ */ void snd_vxpocket_detach(struct snd_vxp_entry *hw, dev_link_t *link) { - vx_core_t *chip = snd_magic_cast(vx_core_t, link->priv, return); + vx_core_t *chip = link->priv; snd_printdd(KERN_DEBUG "vxpocket_detach called\n"); /* Remove the interface data from the linked list */ @@ -263,7 +263,7 @@ static void vxpocket_config(dev_link_t *link) { client_handle_t handle = link->handle; - vx_core_t *chip = snd_magic_cast(vx_core_t, link->priv, return); + vx_core_t *chip = link->priv; struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; tuple_t tuple; cisparse_t parse; diff -Nru a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c --- a/sound/pcmcia/vx/vxp_mixer.c 2004-09-06 16:37:50 -07:00 +++ b/sound/pcmcia/vx/vxp_mixer.c 2004-09-06 16:37:50 -07:00 @@ -25,8 +25,6 @@ #include #include "vxpocket.h" -#define chip_t vx_core_t - #define MIC_LEVEL_MIN 0 #define MIC_LEVEL_MAX 8 diff -Nru a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c --- a/sound/pcmcia/vx/vxp_ops.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pcmcia/vx/vxp_ops.c 2004-09-06 16:37:51 -07:00 @@ -26,8 +26,6 @@ #include #include "vxpocket.h" -#define chip_t vx_core_t - static int vxp_reg_offset[VX_REG_MAX] = { [VX_ICR] = 0x00, // ICR diff -Nru a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c --- a/sound/pcmcia/vx/vxpocket.c 2004-09-06 16:37:51 -07:00 +++ b/sound/pcmcia/vx/vxpocket.c 2004-09-06 16:37:51 -07:00 @@ -50,8 +50,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("Digigram " CARD_NAME); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Digigram," CARD_NAME "}}"); +MODULE_SUPPORTED_DEVICE("{{Digigram," CARD_NAME "}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -63,20 +62,16 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param(irq_mask, int, 0444); MODULE_PARM_DESC(irq_mask, "IRQ bitmask for " CARD_NAME " soundcard."); module_param_array(irq_list, int, boot_devs, 0444); MODULE_PARM_DESC(irq_list, "List of Available interrupts for " CARD_NAME " soundcard."); module_param_array(ibl, int, boot_devs, 0444); MODULE_PARM_DESC(ibl, "Capture IBL size for " CARD_NAME " soundcard."); -MODULE_PARM_SYNTAX(ibl, SNDRV_ENABLED); /* diff -Nru a/sound/ppc/Kconfig b/sound/ppc/Kconfig --- a/sound/ppc/Kconfig 2004-09-06 16:37:52 -07:00 +++ b/sound/ppc/Kconfig 2004-09-06 16:37:52 -07:00 @@ -6,9 +6,12 @@ comment "ALSA PowerMac requires I2C" depends on SND && I2C=n +comment "ALSA PowerMac requires INPUT" + depends on SND && INPUT=n + config SND_POWERMAC tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)" - depends on SND && I2C + depends on SND && I2C && INPUT select SND_PCM endmenu diff -Nru a/sound/ppc/Makefile b/sound/ppc/Makefile --- a/sound/ppc/Makefile 2004-09-06 16:37:52 -07:00 +++ b/sound/ppc/Makefile 2004-09-06 16:37:52 -07:00 @@ -3,7 +3,7 @@ # Copyright (c) 2001 by Jaroslav Kysela # -snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o +snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o # Toplevel Module Dependency obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o diff -Nru a/sound/ppc/awacs.c b/sound/ppc/awacs.c --- a/sound/ppc/awacs.c 2004-09-06 16:37:53 -07:00 +++ b/sound/ppc/awacs.c 2004-09-06 16:37:53 -07:00 @@ -29,8 +29,6 @@ #include #include "pmac.h" -#define chip_t pmac_t - #ifdef CONFIG_ADB_CUDA #define PMAC_AMP_AVAIL @@ -574,11 +572,22 @@ AWACS_VOLUME("Master Playback Volume", 2, 6, 1), AWACS_SWITCH("Master Capture Switch", 1, SHIFT_LOOPTHRU, 0), AWACS_VOLUME("Capture Volume", 0, 4, 0), - AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_LINE, 0), AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), +}; + +/* FIXME: is this correct order? + * screamer (powerbook G3 pismo) seems to have different bits... + */ +static snd_kcontrol_new_t snd_pmac_awacs_mixers2[] __initdata = { + AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_LINE, 0), AWACS_SWITCH("Mic Capture Switch", 0, SHIFT_MUX_MIC, 0), }; +static snd_kcontrol_new_t snd_pmac_screamer_mixers2[] __initdata = { + AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_MIC, 0), + AWACS_SWITCH("Mic Capture Switch", 0, SHIFT_MUX_LINE, 0), +}; + static snd_kcontrol_new_t snd_pmac_awacs_master_sw __initdata = AWACS_SWITCH("Master Playback Switch", 1, SHIFT_HDMUTE, 1); @@ -602,8 +611,6 @@ AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); -#define num_controls(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t)) - /* * add new mixer elements to the card */ @@ -818,9 +825,17 @@ */ strcpy(chip->card->mixername, "PowerMac AWACS"); - if ((err = build_mixers(chip, num_controls(snd_pmac_awacs_mixers), + if ((err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_mixers), snd_pmac_awacs_mixers)) < 0) return err; + if (chip->model == PMAC_SCREAMER) + err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), + snd_pmac_screamer_mixers2); + else + err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_mixers2), + snd_pmac_awacs_mixers2); + if (err < 0) + return err; chip->master_sw_ctl = snd_ctl_new1(&snd_pmac_awacs_master_sw, chip); if ((err = snd_ctl_add(chip->card, chip->master_sw_ctl)) < 0) return err; @@ -832,7 +847,7 @@ * screamer registers. * in this case, it seems the route C is not used. */ - if ((err = build_mixers(chip, num_controls(snd_pmac_awacs_amp_vol), + if ((err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_amp_vol), snd_pmac_awacs_amp_vol)) < 0) return err; /* overwrite */ @@ -846,7 +861,7 @@ #endif /* PMAC_AMP_AVAIL */ { /* route A = headphone, route C = speaker */ - if ((err = build_mixers(chip, num_controls(snd_pmac_awacs_speaker_vol), + if ((err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_speaker_vol), snd_pmac_awacs_speaker_vol)) < 0) return err; chip->speaker_sw_ctl = snd_ctl_new1(&snd_pmac_awacs_speaker_sw, chip); @@ -855,11 +870,11 @@ } if (chip->model == PMAC_SCREAMER) { - if ((err = build_mixers(chip, num_controls(snd_pmac_screamer_mic_boost), + if ((err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mic_boost), snd_pmac_screamer_mic_boost)) < 0) return err; } else { - if ((err = build_mixers(chip, num_controls(snd_pmac_awacs_mic_boost), + if ((err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_mic_boost), snd_pmac_awacs_mic_boost)) < 0) return err; } diff -Nru a/sound/ppc/beep.c b/sound/ppc/beep.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/ppc/beep.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,262 @@ +/* + * Beep using pcm + * + * Copyright (c) by Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmac.h" + +struct snd_pmac_beep { + int running; /* boolean */ + int volume; /* mixer volume: 0-100 */ + int volume_play; /* currently playing volume */ + int hz; + int nsamples; + short *buf; /* allocated wave buffer */ + unsigned long addr; /* physical address of buffer */ + struct input_dev dev; +}; + +/* + * stop beep if running + */ +void snd_pmac_beep_stop(pmac_t *chip) +{ + pmac_beep_t *beep = chip->beep; + if (beep && beep->running) { + beep->running = 0; + snd_pmac_beep_dma_stop(chip); + } +} + +/* + * Stuff for outputting a beep. The values range from -327 to +327 + * so we can multiply by an amplitude in the range 0..100 to get a + * signed short value to put in the output buffer. + */ +static short beep_wform[256] = { + 0, 40, 79, 117, 153, 187, 218, 245, + 269, 288, 304, 316, 323, 327, 327, 324, + 318, 310, 299, 288, 275, 262, 249, 236, + 224, 213, 204, 196, 190, 186, 183, 182, + 182, 183, 186, 189, 192, 196, 200, 203, + 206, 208, 209, 209, 209, 207, 204, 201, + 197, 193, 188, 183, 179, 174, 170, 166, + 163, 161, 160, 159, 159, 160, 161, 162, + 164, 166, 168, 169, 171, 171, 171, 170, + 169, 167, 163, 159, 155, 150, 144, 139, + 133, 128, 122, 117, 113, 110, 107, 105, + 103, 103, 103, 103, 104, 104, 105, 105, + 105, 103, 101, 97, 92, 86, 78, 68, + 58, 45, 32, 18, 3, -11, -26, -41, + -55, -68, -79, -88, -95, -100, -102, -102, + -99, -93, -85, -75, -62, -48, -33, -16, + 0, 16, 33, 48, 62, 75, 85, 93, + 99, 102, 102, 100, 95, 88, 79, 68, + 55, 41, 26, 11, -3, -18, -32, -45, + -58, -68, -78, -86, -92, -97, -101, -103, + -105, -105, -105, -104, -104, -103, -103, -103, + -103, -105, -107, -110, -113, -117, -122, -128, + -133, -139, -144, -150, -155, -159, -163, -167, + -169, -170, -171, -171, -171, -169, -168, -166, + -164, -162, -161, -160, -159, -159, -160, -161, + -163, -166, -170, -174, -179, -183, -188, -193, + -197, -201, -204, -207, -209, -209, -209, -208, + -206, -203, -200, -196, -192, -189, -186, -183, + -182, -182, -183, -186, -190, -196, -204, -213, + -224, -236, -249, -262, -275, -288, -299, -310, + -318, -324, -327, -327, -323, -316, -304, -288, + -269, -245, -218, -187, -153, -117, -79, -40, +}; + +#define BEEP_SRATE 22050 /* 22050 Hz sample rate */ +#define BEEP_BUFLEN 512 +#define BEEP_VOLUME 15 /* 0 - 100 */ + +static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type, unsigned int code, int hz) +{ + pmac_t *chip; + pmac_beep_t *beep; + unsigned long flags; + int beep_speed = 0; + int srate; + int period, ncycles, nsamples; + int i, j, f; + short *p; + + if (type != EV_SND) + return -1; + + switch (code) { + case SND_BELL: if (hz) hz = 1000; + case SND_TONE: break; + default: return -1; + } + + chip = dev->private; + if (! chip || (beep = chip->beep) == NULL) + return -1; + + if (! hz) { + spin_lock_irqsave(&chip->reg_lock, flags); + if (beep->running) + snd_pmac_beep_stop(chip); + spin_unlock_irqrestore(&chip->reg_lock, flags); + return 0; + } + + beep_speed = snd_pmac_rate_index(chip, &chip->playback, BEEP_SRATE); + srate = chip->freq_table[beep_speed]; + + if (hz <= srate / BEEP_BUFLEN || hz > srate / 2) + hz = 1000; + + spin_lock_irqsave(&chip->reg_lock, flags); + if (chip->playback.running || chip->capture.running || beep->running) { + spin_unlock_irqrestore(&chip->reg_lock, flags); + return 0; + } + beep->running = 1; + spin_unlock_irqrestore(&chip->reg_lock, flags); + + if (hz == beep->hz && beep->volume == beep->volume_play) { + nsamples = beep->nsamples; + } else { + period = srate * 256 / hz; /* fixed point */ + ncycles = BEEP_BUFLEN * 256 / period; + nsamples = (period * ncycles) >> 8; + f = ncycles * 65536 / nsamples; + j = 0; + p = beep->buf; + for (i = 0; i < nsamples; ++i, p += 2) { + p[0] = p[1] = beep_wform[j >> 8] * beep->volume; + j = (j + f) & 0xffff; + } + beep->hz = hz; + beep->volume_play = beep->volume; + beep->nsamples = nsamples; + } + + spin_lock_irqsave(&chip->reg_lock, flags); + snd_pmac_beep_dma_start(chip, beep->nsamples * 4, beep->addr, beep_speed); + spin_unlock_irqrestore(&chip->reg_lock, flags); + return 0; +} + +/* + * beep volume mixer + */ + +#define chip_t pmac_t + +static int snd_pmac_info_beep(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 1; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 100; + return 0; +} + +static int snd_pmac_get_beep(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + pmac_t *chip = snd_kcontrol_chip(kcontrol); + snd_assert(chip->beep, return -ENXIO); + ucontrol->value.integer.value[0] = chip->beep->volume; + return 0; +} + +static int snd_pmac_put_beep(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) +{ + pmac_t *chip = snd_kcontrol_chip(kcontrol); + int oval; + snd_assert(chip->beep, return -ENXIO); + oval = chip->beep->volume; + chip->beep->volume = ucontrol->value.integer.value[0]; + return oval != chip->beep->volume; +} + +static snd_kcontrol_new_t snd_pmac_beep_mixer = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Beep Playback Volume", + .info = snd_pmac_info_beep, + .get = snd_pmac_get_beep, + .put = snd_pmac_put_beep, +}; + +/* Initialize beep stuff */ +int __init snd_pmac_attach_beep(pmac_t *chip) +{ + pmac_beep_t *beep; + int err; + + beep = kmalloc(sizeof(*beep), GFP_KERNEL); + if (! beep) + return -ENOMEM; + + memset(beep, 0, sizeof(*beep)); + beep->buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL); + if (! beep->buf) { + kfree(beep); + return -ENOMEM; + } + beep->addr = virt_to_bus(beep->buf); + + beep->dev.evbit[0] = BIT(EV_SND); + beep->dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); + beep->dev.event = snd_pmac_beep_event; + beep->dev.private = chip; + + /* FIXME: set more better values */ + beep->dev.name = "PowerMac Beep"; + beep->dev.phys = "powermac/beep"; + beep->dev.id.bustype = BUS_ADB; + beep->dev.id.vendor = 0x001f; + beep->dev.id.product = 0x0001; + beep->dev.id.version = 0x0100; + + beep->volume = BEEP_VOLUME; + beep->running = 0; + if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_pmac_beep_mixer, chip))) < 0) { + kfree(beep->buf); + kfree(beep); + return err; + } + + chip->beep = beep; + input_register_device(&beep->dev); + + return 0; +} + +void snd_pmac_detach_beep(pmac_t *chip) +{ + if (chip->beep) { + input_unregister_device(&chip->beep->dev); + kfree(chip->beep->buf); + kfree(chip->beep); + chip->beep = NULL; + } +} diff -Nru a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c --- a/sound/ppc/burgundy.c 2004-09-06 16:37:51 -07:00 +++ b/sound/ppc/burgundy.c 2004-09-06 16:37:51 -07:00 @@ -28,8 +28,6 @@ #include "pmac.h" #include "burgundy.h" -#define chip_t pmac_t - /* Waits for busy flag to clear */ inline static void @@ -324,8 +322,6 @@ static snd_kcontrol_new_t snd_pmac_burgundy_speaker_sw __initdata = BURGUNDY_OUTPUT_SWITCH("PC Speaker Playback Switch", 0, BURGUNDY_OUTPUT_INTERN, 0, 0); -#define num_controls(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t)) - #ifdef PMAC_SUPPORT_AUTOMUTE /* @@ -420,7 +416,7 @@ */ strcpy(chip->card->mixername, "PowerMac Burgundy"); - for (i = 0; i < num_controls(snd_pmac_burgundy_mixers); i++) { + for (i = 0; i < ARRAY_SIZE(snd_pmac_burgundy_mixers); i++) { if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_pmac_burgundy_mixers[i], chip))) < 0) return err; } diff -Nru a/sound/ppc/daca.c b/sound/ppc/daca.c --- a/sound/ppc/daca.c 2004-09-06 16:37:51 -07:00 +++ b/sound/ppc/daca.c 2004-09-06 16:37:51 -07:00 @@ -28,8 +28,6 @@ #include #include "pmac.h" -#define chip_t pmac_t - /* i2c address */ #define DACA_I2C_ADDR 0x4d @@ -217,8 +215,6 @@ }, }; -#define num_controls(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t)) - #ifdef CONFIG_PMAC_PBOOK static void daca_resume(pmac_t *chip) @@ -272,7 +268,7 @@ */ strcpy(chip->card->mixername, "PowerMac DACA"); - for (i = 0; i < num_controls(daca_mixers); i++) { + for (i = 0; i < ARRAY_SIZE(daca_mixers); i++) { if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&daca_mixers[i], chip))) < 0) return err; } diff -Nru a/sound/ppc/pmac.c b/sound/ppc/pmac.c --- a/sound/ppc/pmac.c 2004-09-06 16:37:55 -07:00 +++ b/sound/ppc/pmac.c 2004-09-06 16:37:55 -07:00 @@ -36,8 +36,6 @@ #include #endif -#define chip_t pmac_t - #if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK) static int snd_pmac_register_sleep_notifier(pmac_t *chip); @@ -52,8 +50,8 @@ 44100, 29400, 22050, 17640, 14700, 11025, 8820, 7350 }; /* fixed frequency table for tumbler */ -static int tumbler_freqs[2] = { - 48000, 44100 +static int tumbler_freqs[1] = { + 44100 }; /* @@ -86,7 +84,7 @@ * look up frequency table */ -static unsigned int snd_pmac_rate_index(pmac_t *chip, pmac_stream_t *rec, unsigned int rate) +unsigned int snd_pmac_rate_index(pmac_t *chip, pmac_stream_t *rec, unsigned int rate) { int i, ok, found; @@ -203,7 +201,6 @@ { int i; volatile struct dbdma_cmd *cp; - unsigned long flags; snd_pcm_runtime_t *runtime = subs->runtime; int rate_index; long offset; @@ -226,15 +223,17 @@ /* We really want to execute a DMA stop command, after the AWACS * is initialized. * For reasons I don't understand, it stops the hissing noise - * common to many PowerBook G3 systems (like mine :-). + * common to many PowerBook G3 systems and random noise otherwise + * captured on iBook2's about every third time. -ReneR */ - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock_irq(&chip->reg_lock); snd_pmac_dma_stop(rec); - if (rec->stream == SNDRV_PCM_STREAM_PLAYBACK) { - st_le16(&chip->extra_dma.cmds->command, DBDMA_STOP); - snd_pmac_dma_set_command(rec, &chip->extra_dma); - snd_pmac_dma_run(rec, RUN); - } + st_le16(&chip->extra_dma.cmds->command, DBDMA_STOP); + snd_pmac_dma_set_command(rec, &chip->extra_dma); + snd_pmac_dma_run(rec, RUN); + spin_unlock_irq(&chip->reg_lock); + mdelay(5); + spin_lock_irq(&chip->reg_lock); /* continuous DMA memory type doesn't provide the physical address, * so we need to resolve the address here... */ @@ -252,7 +251,7 @@ snd_pmac_dma_stop(rec); snd_pmac_dma_set_command(rec, &rec->cmd); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock_irq(&chip->reg_lock); return 0; } @@ -264,7 +263,6 @@ static int snd_pmac_pcm_trigger(pmac_t *chip, pmac_stream_t *rec, snd_pcm_substream_t *subs, int cmd) { - unsigned long flags; volatile struct dbdma_cmd *cp; int i, command; @@ -275,7 +273,7 @@ return -EBUSY; command = (subs->stream == SNDRV_PCM_STREAM_PLAYBACK ? OUTPUT_MORE : INPUT_MORE) + INTR_ALWAYS; - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); snd_pmac_beep_stop(chip); snd_pmac_pcm_set_format(chip); for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) @@ -284,18 +282,18 @@ (void)in_le32(&rec->dma->status); snd_pmac_dma_run(rec, RUN|WAKE); rec->running = 1; - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: - spin_lock_irqsave(&chip->reg_lock, flags); + spin_lock(&chip->reg_lock); rec->running = 0; /*printk("stopped!!\n");*/ snd_pmac_dma_stop(rec); for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) out_le16(&cp->command, DBDMA_STOP); - spin_unlock_irqrestore(&chip->reg_lock, flags); + spin_unlock(&chip->reg_lock); break; default: @@ -490,14 +488,12 @@ snd_pcm_runtime_t *runtime = subs->runtime; int i, j, fflags; static int typical_freqs[] = { - 48000, 44100, 22050, 11025, 0, }; static int typical_freq_flags[] = { - SNDRV_PCM_RATE_48000, SNDRV_PCM_RATE_44100, SNDRV_PCM_RATE_22050, SNDRV_PCM_RATE_11025, @@ -651,7 +647,7 @@ pcm->private_data = chip; pcm->private_free = pmac_pcm_free; - pcm->info_flags = 0; + pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; strcpy(pcm->name, chip->card->shortname); chip->pcm = pcm; @@ -683,12 +679,41 @@ /* + * handling beep + */ +void snd_pmac_beep_dma_start(pmac_t *chip, int bytes, unsigned long addr, int speed) +{ + pmac_stream_t *rec = &chip->playback; + + snd_pmac_dma_stop(rec); + st_le16(&chip->extra_dma.cmds->req_count, bytes); + st_le16(&chip->extra_dma.cmds->xfer_status, 0); + st_le32(&chip->extra_dma.cmds->cmd_dep, chip->extra_dma.addr); + st_le32(&chip->extra_dma.cmds->phy_addr, addr); + st_le16(&chip->extra_dma.cmds->command, OUTPUT_MORE + BR_ALWAYS); + out_le32(&chip->awacs->control, + (in_le32(&chip->awacs->control) & ~0x1f00) + | (speed << 8)); + out_le32(&chip->awacs->byteswap, 0); + snd_pmac_dma_set_command(rec, &chip->extra_dma); + snd_pmac_dma_run(rec, RUN); +} + +void snd_pmac_beep_dma_stop(pmac_t *chip) +{ + snd_pmac_dma_stop(&chip->playback); + st_le16(&chip->extra_dma.cmds->command, DBDMA_STOP); + snd_pmac_pcm_set_format(chip); /* reset format */ +} + + +/* * interrupt handlers */ static irqreturn_t snd_pmac_tx_intr(int irq, void *devid, struct pt_regs *regs) { - pmac_t *chip = snd_magic_cast(pmac_t, devid, return IRQ_NONE); + pmac_t *chip = devid; snd_pmac_pcm_update(chip, &chip->playback); return IRQ_HANDLED; } @@ -697,7 +722,7 @@ static irqreturn_t snd_pmac_rx_intr(int irq, void *devid, struct pt_regs *regs) { - pmac_t *chip = snd_magic_cast(pmac_t, devid, return IRQ_NONE); + pmac_t *chip = devid; snd_pmac_pcm_update(chip, &chip->capture); return IRQ_HANDLED; } @@ -706,7 +731,7 @@ static irqreturn_t snd_pmac_ctrl_intr(int irq, void *devid, struct pt_regs *regs) { - pmac_t *chip = snd_magic_cast(pmac_t, devid, return IRQ_NONE); + pmac_t *chip = devid; int ctrl = in_le32(&chip->awacs->control); /*printk("pmac: control interrupt.. 0x%x\n", ctrl);*/ @@ -776,6 +801,8 @@ if (chip->mixer_free) chip->mixer_free(chip); + snd_pmac_detach_beep(chip); + /* release resources */ if (chip->irq >= 0) free_irq(chip->irq, (void*)chip); @@ -802,7 +829,7 @@ release_OF_resource(chip->node, i); } } - snd_magic_kfree(chip); + kfree(chip); return 0; } @@ -812,7 +839,7 @@ */ static int snd_pmac_dev_free(snd_device_t *device) { - pmac_t *chip = snd_magic_cast(pmac_t, device->device_data, return -ENXIO); + pmac_t *chip = device->device_data; return snd_pmac_free(chip); } @@ -862,7 +889,7 @@ chip->can_byte_swap = 1; chip->can_duplex = 1; chip->can_capture = 1; - chip->num_freqs = 8; + chip->num_freqs = ARRAY_SIZE(awacs_freqs); chip->freq_table = awacs_freqs; chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ @@ -920,14 +947,14 @@ chip->can_capture = 0; /* no capture */ chip->can_duplex = 0; // chip->can_byte_swap = 0; /* FIXME: check this */ - chip->num_freqs = 2; + chip->num_freqs = ARRAY_SIZE(tumbler_freqs); chip->freq_table = tumbler_freqs; chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ } if (device_is_compatible(sound, "snapper")) { chip->model = PMAC_SNAPPER; // chip->can_byte_swap = 0; /* FIXME: check this */ - chip->num_freqs = 2; + chip->num_freqs = ARRAY_SIZE(tumbler_freqs); chip->freq_table = tumbler_freqs; chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ } @@ -1069,7 +1096,7 @@ snd_runtime_check(chip_return, return -EINVAL); *chip_return = NULL; - chip = snd_magic_kcalloc(pmac_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; chip->card = card; @@ -1206,7 +1233,7 @@ static int snd_pmac_suspend(snd_card_t *card, unsigned int state) { - pmac_t *chip = snd_magic_cast(pmac_t, card->pm_private_data, return -EINVAL); + pmac_t *chip = card->pm_private_data; unsigned long flags; if (chip->suspend) @@ -1228,7 +1255,7 @@ static int snd_pmac_resume(snd_card_t *card, unsigned int state) { - pmac_t *chip = snd_magic_cast(pmac_t, card->pm_private_data, return -EINVAL); + pmac_t *chip = card->pm_private_data; snd_pmac_sound_feature(chip, 1); if (chip->resume) diff -Nru a/sound/ppc/pmac.h b/sound/ppc/pmac.h --- a/sound/ppc/pmac.h 2004-09-06 16:37:53 -07:00 +++ b/sound/ppc/pmac.h 2004-09-06 16:37:53 -07:00 @@ -84,7 +84,7 @@ snd_pcm_substream_t *substream; - unsigned int cur_freqs; /* currently available frequences */ + unsigned int cur_freqs; /* currently available frequencies */ unsigned int cur_formats; /* currently available formats */ }; @@ -155,6 +155,7 @@ void (*mixer_free)(pmac_t *); snd_kcontrol_t *master_sw_ctl; snd_kcontrol_t *speaker_sw_ctl; + snd_kcontrol_t *drc_sw_ctl; /* only used for tumbler -ReneR */ snd_kcontrol_t *hp_detect_ctl; /* lowlevel callbacks */ @@ -173,6 +174,12 @@ int snd_pmac_new(snd_card_t *card, pmac_t **chip_return); int snd_pmac_pcm_new(pmac_t *chip); int snd_pmac_attach_beep(pmac_t *chip); +void snd_pmac_detach_beep(pmac_t *chip); +void snd_pmac_beep_stop(pmac_t *chip); +unsigned int snd_pmac_rate_index(pmac_t *chip, pmac_stream_t *rec, unsigned int rate); + +void snd_pmac_beep_dma_start(pmac_t *chip, int bytes, unsigned long addr, int speed); +void snd_pmac_beep_dma_stop(pmac_t *chip); /* initialize mixer */ int snd_pmac_awacs_init(pmac_t *chip); @@ -205,10 +212,5 @@ set_current_state(TASK_UNINTERRUPTIBLE);\ schedule_timeout(((msec) * HZ + 999) / 1000);\ } while (0) - -#ifndef PMAC_SUPPORT_PCM_BEEP -#define snd_pmac_attach_beep(chip) 0 -#define snd_pmac_beep_stop(chip) /**/ -#endif #endif /* __PMAC_H */ diff -Nru a/sound/ppc/powermac.c b/sound/ppc/powermac.c --- a/sound/ppc/powermac.c 2004-09-06 16:37:55 -07:00 +++ b/sound/ppc/powermac.c 2004-09-06 16:37:55 -07:00 @@ -30,31 +30,19 @@ #define CHIP_NAME "PMac" MODULE_DESCRIPTION("PowerMac"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Apple,PowerMac}}"); +MODULE_SUPPORTED_DEVICE("{{Apple,PowerMac}}"); MODULE_LICENSE("GPL"); static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ -/* static int enable = 1; */ -#ifdef PMAC_SUPPORT_PCM_BEEP static int enable_beep = 1; -#endif module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for " CHIP_NAME " soundchip."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for " CHIP_NAME " soundchip."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); -/* module_param(enable, bool, 0444); - MODULE_PARM_DESC(enable, "Enable this soundchip."); - MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); */ -#ifdef PMAC_SUPPORT_PCM_BEEP module_param(enable_beep, bool, 0444); MODULE_PARM_DESC(enable_beep, "Enable beep using PCM."); -MODULE_PARM_SYNTAX(enable_beep, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); -#endif /* @@ -133,10 +121,8 @@ goto __error; chip->initialized = 1; -#ifdef PMAC_SUPPORT_PCM_BEEP if (enable_beep) snd_pmac_attach_beep(chip); -#endif if ((err = snd_card_register(card)) < 0) goto __error; @@ -151,18 +137,14 @@ /* - * MODULE sutff + * MODULE stuff */ static int __init alsa_card_pmac_init(void) { int err; - if ((err = snd_pmac_probe()) < 0) { -#ifdef MODULE - printk(KERN_ERR "no PMac soundchip found\n"); -#endif + if ((err = snd_pmac_probe()) < 0) return err; - } return 0; } diff -Nru a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c --- a/sound/ppc/tumbler.c 2004-09-06 16:37:50 -07:00 +++ b/sound/ppc/tumbler.c 2004-09-06 16:37:50 -07:00 @@ -16,6 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Rene Rebe : + * * update from shadow registers on wakeup and headphone plug + * * automatically toggle DRC on headphone plug + * */ @@ -36,8 +41,6 @@ #include "pmac.h" #include "tumbler_volume.h" -#define chip_t pmac_t - /* i2c address for tumbler */ #define TAS_I2C_ADDR 0x34 @@ -759,12 +762,6 @@ DEFINE_MONO("Tone Control - Treble", treble), DEFINE_MONO("PCM Playback Volume", pcm), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DRC Switch", - .info = snd_pmac_boolean_mono_info, - .get = tumbler_get_drc_switch, - .put = tumbler_put_drc_switch - }, - { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "DRC Range", .info = tumbler_info_drc_value, .get = tumbler_get_drc_value, @@ -791,12 +788,6 @@ DEFINE_SNAPPER_MONO("Tone Control - Bass", bass), DEFINE_SNAPPER_MONO("Tone Control - Treble", treble), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DRC Switch", - .info = snd_pmac_boolean_mono_info, - .get = tumbler_get_drc_switch, - .put = tumbler_put_drc_switch - }, - { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "DRC Range", .info = tumbler_info_drc_value, .get = tumbler_get_drc_value, @@ -826,6 +817,14 @@ .put = tumbler_put_mute_switch, .private_value = TUMBLER_MUTE_AMP, }; +static snd_kcontrol_new_t tumbler_drc_sw __initdata = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "DRC Switch", + .info = snd_pmac_boolean_mono_info, + .get = tumbler_get_drc_switch, + .put = tumbler_put_drc_switch +}; + #ifdef PMAC_SUPPORT_AUTOMUTE /* @@ -847,6 +846,29 @@ } } +static struct work_struct device_change; + +static void +device_change_handler(void *self) +{ + pmac_t *chip = (pmac_t*) self; + pmac_tumbler_t *mix; + + if (!chip) + return; + + mix = chip->mixer_data; + + /* first set the DRC so the speaker do not explode -ReneR */ + if (chip->model == PMAC_TUMBLER) + tumbler_set_drc(mix); + else + snapper_set_drc(mix); + + /* reset the master volume so the correct amplification is applied */ + tumbler_set_master_volume(mix); +} + static void tumbler_update_automute(pmac_t *chip, int do_notify) { if (chip->auto_mute) { @@ -856,14 +878,25 @@ /* mute speaker */ check_mute(chip, &mix->amp_mute, 1, do_notify, chip->speaker_sw_ctl); check_mute(chip, &mix->hp_mute, 0, do_notify, chip->master_sw_ctl); + mix->drc_enable = 0; + } else { /* unmute speaker */ check_mute(chip, &mix->amp_mute, 0, do_notify, chip->speaker_sw_ctl); check_mute(chip, &mix->hp_mute, 1, do_notify, chip->master_sw_ctl); + mix->drc_enable = 1; } - if (do_notify) + if (do_notify) { snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hp_detect_ctl->id); + snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, + &chip->drc_sw_ctl->id); + } + + /* finally we need to schedule an update of the mixer values + (master and DRC are enough for now) -ReneR */ + schedule_work(&device_change); + } } #endif /* PMAC_SUPPORT_AUTOMUTE */ @@ -872,7 +905,7 @@ /* interrupt - headphone plug changed */ static irqreturn_t headphone_intr(int irq, void *devid, struct pt_regs *regs) { - pmac_t *chip = snd_magic_cast(pmac_t, devid, return IRQ_NONE); + pmac_t *chip = devid; if (chip->update_automute && chip->initialized) { chip->update_automute(chip, 1); return IRQ_HANDLED; @@ -1114,10 +1147,16 @@ chip->speaker_sw_ctl = snd_ctl_new1(&tumbler_speaker_sw, chip); if ((err = snd_ctl_add(chip->card, chip->speaker_sw_ctl)) < 0) return err; + chip->drc_sw_ctl = snd_ctl_new1(&tumbler_drc_sw, chip); + if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0) + return err; + #ifdef CONFIG_PMAC_PBOOK chip->resume = tumbler_resume; #endif + + INIT_WORK(&device_change, device_change_handler, (void *)chip); #ifdef PMAC_SUPPORT_AUTOMUTE if (mix->headphone_irq >=0 && (err = snd_pmac_add_automute(chip)) < 0) diff -Nru a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c --- a/sound/sparc/amd7930.c 2004-09-06 16:37:51 -07:00 +++ b/sound/sparc/amd7930.c 2004-09-06 16:37:51 -07:00 @@ -54,18 +54,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Sun AMD7930 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Sun AMD7930 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Sun AMD7930 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); MODULE_AUTHOR("Thomas K. Dyas and David S. Miller"); MODULE_DESCRIPTION("Sun AMD7930"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Sun,AMD7930}}"); +MODULE_SUPPORTED_DEVICE("{{Sun,AMD7930}}"); /* Device register layout. */ @@ -345,7 +341,6 @@ unsigned int regs_size; struct snd_amd7930 *next; } amd7930_t; -#define chip_t amd7930_t static amd7930_t *amd7930_list; @@ -475,7 +470,6 @@ 0x000b, /* 16.9 dB */ 0x000f /* 18. dB */ }; -#define NR_GER_COEFFS (sizeof(ger_coeff) / sizeof(ger_coeff[0])) /* Update amd7930_map settings and program them into the hardware. * The amd->lock is held and local interrupts are disabled. @@ -487,7 +481,7 @@ map->gx = gx_coeff[amd->rgain]; map->stgr = gx_coeff[amd->mgain]; - level = (amd->pgain * (256 + NR_GER_COEFFS)) >> 8; + level = (amd->pgain * (256 + ARRAY_SIZE(ger_coeff))) >> 8; if (level >= 256) { map->ger = ger_coeff[level - 256]; map->gr = gx_coeff[255]; @@ -764,7 +758,7 @@ static void snd_amd7930_pcm_free(snd_pcm_t *pcm) { - amd7930_t *amd = snd_magic_cast(amd7930_t, pcm->private_data, return); + amd7930_t *amd = pcm->private_data; amd->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); @@ -916,8 +910,6 @@ }, }; -#define NUM_AMD7930_CONTROLS (sizeof(amd7930_controls)/sizeof(snd_kcontrol_new_t)) - static int __init snd_amd7930_mixer(amd7930_t *amd) { snd_card_t *card; @@ -928,7 +920,7 @@ card = amd->card; strcpy(card->mixername, card->shortname); - for (idx = 0; idx < NUM_AMD7930_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(amd7930_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&amd7930_controls[idx], amd))) < 0) return err; @@ -947,14 +939,14 @@ if (amd->regs) sbus_iounmap(amd->regs, amd->regs_size); - snd_magic_kfree(amd); + kfree(amd); return 0; } static int snd_amd7930_dev_free(snd_device_t *device) { - amd7930_t *amd = snd_magic_cast(amd7930_t, device->device_data, return -ENXIO); + amd7930_t *amd = device->device_data; return snd_amd7930_free(amd); } @@ -976,7 +968,7 @@ int err; *ramd = NULL; - amd = snd_magic_kcalloc(amd7930_t, 0, GFP_KERNEL); + amd = kcalloc(1, sizeof(*amd), GFP_KERNEL); if (amd == NULL) return -ENOMEM; diff -Nru a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c --- a/sound/sparc/cs4231.c 2004-09-06 16:37:50 -07:00 +++ b/sound/sparc/cs4231.c 2004-09-06 16:37:50 -07:00 @@ -53,18 +53,14 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable Sun CS4231 soundcard."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); MODULE_AUTHOR("Jaroslav Kysela, Derrick J. Brashear and David S. Miller"); MODULE_DESCRIPTION("Sun CS4231"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Sun,CS4231}}"); +MODULE_SUPPORTED_DEVICE("{{Sun,CS4231}}"); typedef struct snd_cs4231 { spinlock_t lock; @@ -112,7 +108,6 @@ unsigned int regs_size; struct snd_cs4231 *next; } cs4231_t; -#define chip_t cs4231_t static cs4231_t *cs4231_list; @@ -1232,7 +1227,7 @@ #ifdef SBUS_SUPPORT static irqreturn_t snd_cs4231_sbus_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return); + cs4231_t *chip = dev_id; u32 csr; csr = sbus_readl(chip->port + APCCSR); @@ -1256,7 +1251,7 @@ #ifdef EBUS_SUPPORT static void snd_cs4231_ebus_play_callback(struct ebus_dma_info *p, int event, void *cookie) { - cs4231_t *chip = snd_magic_cast(cs4231_t, cookie, return); + cs4231_t *chip = cookie; if (chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE) { snd_pcm_period_elapsed(chip->playback_substream); @@ -1267,7 +1262,7 @@ static void snd_cs4231_ebus_capture_callback(struct ebus_dma_info *p, int event, void *cookie) { - cs4231_t *chip = snd_magic_cast(cs4231_t, cookie, return); + cs4231_t *chip = cookie; if (chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE) { snd_pcm_period_elapsed(chip->capture_substream); @@ -1547,7 +1542,7 @@ static void snd_cs4231_pcm_free(snd_pcm_t *pcm) { - cs4231_t *chip = snd_magic_cast(cs4231_t, pcm->private_data, return); + cs4231_t *chip = pcm->private_data; chip->pcm = NULL; snd_pcm_lib_preallocate_free_for_all(pcm); } @@ -1592,7 +1587,7 @@ static void snd_cs4231_timer_free(snd_timer_t *timer) { - cs4231_t *chip = snd_magic_cast(cs4231_t, timer->private_data, return); + cs4231_t *chip = timer->private_data; chip->timer = NULL; } @@ -1821,8 +1816,6 @@ return change; } -#define CS4231_CONTROLS (sizeof(snd_cs4231_controls)/sizeof(snd_kcontrol_new_t)) - #define CS4231_SINGLE(xname, xindex, reg, shift, mask, invert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ .info = snd_cs4231_info_single, \ @@ -1875,7 +1868,7 @@ strcpy(card->mixername, chip->pcm->name); - for (idx = 0; idx < CS4231_CONTROLS; idx++) { + for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) { if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4231_controls[idx], chip))) < 0) @@ -1950,14 +1943,14 @@ if (chip->timer) snd_device_free(chip->card, chip->timer); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_cs4231_sbus_dev_free(snd_device_t *device) { - cs4231_t *cp = snd_magic_cast(cs4231_t, device->device_data, return -ENXIO); + cs4231_t *cp = device->device_data; return snd_cs4231_sbus_free(cp); } @@ -1975,7 +1968,7 @@ int err; *rchip = NULL; - chip = snd_magic_kcalloc(cs4231_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; @@ -2064,14 +2057,14 @@ if (chip->timer) snd_device_free(chip->card, chip->timer); - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_cs4231_ebus_dev_free(snd_device_t *device) { - cs4231_t *cp = snd_magic_cast(cs4231_t, device->device_data, return -ENXIO); + cs4231_t *cp = device->device_data; return snd_cs4231_ebus_free(cp); } @@ -2089,7 +2082,7 @@ int err; *rchip = NULL; - chip = snd_magic_kcalloc(cs4231_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (chip == NULL) return -ENOMEM; diff -Nru a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c --- a/sound/synth/emux/emux.c 2004-09-06 16:37:52 -07:00 +++ b/sound/synth/emux/emux.c 2004-09-06 16:37:52 -07:00 @@ -39,7 +39,7 @@ snd_emux_t *emu; *remu = NULL; - emu = snd_magic_kcalloc(snd_emux_t, 0, GFP_KERNEL); + emu = kcalloc(1, sizeof(*emu), GFP_KERNEL); if (emu == NULL) return -ENOMEM; @@ -77,7 +77,7 @@ emu->card = card; emu->name = snd_kmalloc_strdup(name, GFP_KERNEL); - emu->voices = snd_kcalloc(sizeof(snd_emux_voice_t) * emu->max_voices, GFP_KERNEL); + emu->voices = kcalloc(emu->max_voices, sizeof(snd_emux_voice_t), GFP_KERNEL); if (emu->voices == NULL) return -ENOMEM; @@ -143,7 +143,7 @@ if (emu->name) kfree(emu->name); - snd_magic_kfree(emu); + kfree(emu); return 0; } diff -Nru a/sound/synth/emux/emux_effect.c b/sound/synth/emux/emux_effect.c --- a/sound/synth/emux/emux_effect.c 2004-09-06 16:37:52 -07:00 +++ b/sound/synth/emux/emux_effect.c 2004-09-06 16:37:52 -07:00 @@ -278,7 +278,7 @@ snd_emux_create_effect(snd_emux_port_t *p) { int i; - p->effect = snd_kcalloc(sizeof(snd_emux_effect_table_t) * p->chset.max_channels, GFP_KERNEL); + p->effect = kcalloc(p->chset.max_channels, sizeof(snd_emux_effect_table_t), GFP_KERNEL); if (p->effect) { for (i = 0; i < p->chset.max_channels; i++) p->chset.channels[i].private = p->effect + i; diff -Nru a/sound/synth/emux/emux_hwdep.c b/sound/synth/emux/emux_hwdep.c --- a/sound/synth/emux/emux_hwdep.c 2004-09-06 16:37:54 -07:00 +++ b/sound/synth/emux/emux_hwdep.c 2004-09-06 16:37:54 -07:00 @@ -104,7 +104,7 @@ static int snd_emux_hwdep_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cmd, unsigned long arg) { - snd_emux_t *emu = snd_magic_cast(snd_emux_t, hw->private_data, return -ENXIO); + snd_emux_t *emu = hw->private_data; switch (cmd) { case SNDRV_EMUX_IOCTL_VERSION: diff -Nru a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c --- a/sound/synth/emux/emux_nrpn.c 2004-09-06 16:37:50 -07:00 +++ b/sound/synth/emux/emux_nrpn.c 2004-09-06 16:37:50 -07:00 @@ -22,8 +22,6 @@ #include "emux_voice.h" #include -#define NELEM(arr) (sizeof(arr)/sizeof((arr)[0])) - /* * conversion from NRPN/control parameters to Emu8000 raw parameters */ @@ -214,8 +212,6 @@ {26, EMUX_FX_REVERB, fx_reverb}, }; -static int num_awe_effects = NELEM(awe_effects); - /* * GS(SC88) NRPN effects; still experimental @@ -281,8 +277,6 @@ {10, EMUX_FX_LFO1_DELAY, gs_vib_delay}, }; -static int num_gs_effects = NELEM(gs_effects); - /* * NRPN events @@ -292,7 +286,7 @@ { snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL, return); snd_assert(chan != NULL, return); @@ -305,7 +299,7 @@ chan->control[MIDI_CTL_LSB_DATA_ENTRY]; val -= 8192; send_converted_effect - (awe_effects, num_awe_effects, + (awe_effects, ARRAY_SIZE(awe_effects), port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB], val, EMUX_FX_FLAG_SET); return; @@ -318,7 +312,7 @@ /* only MSB is valid */ val = chan->control[MIDI_CTL_MSB_DATA_ENTRY]; send_converted_effect - (gs_effects, num_gs_effects, + (gs_effects, ARRAY_SIZE(gs_effects), port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB], val, EMUX_FX_FLAG_ADD); return; @@ -362,12 +356,10 @@ {73, EMUX_FX_ENV2_ATTACK, xg_attack}, }; -static int num_xg_effects = NELEM(xg_effects); - int snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param) { - return send_converted_effect(xg_effects, num_xg_effects, + return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects), port, chan, param, chan->control[param], EMUX_FX_FLAG_ADD); @@ -382,7 +374,7 @@ snd_emux_port_t *port; snd_emux_t *emu; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL, return); snd_assert(chset != NULL, return); emu = port->emu; diff -Nru a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c --- a/sound/synth/emux/emux_oss.c 2004-09-06 16:37:51 -07:00 +++ b/sound/synth/emux/emux_oss.c 2004-09-06 16:37:51 -07:00 @@ -108,7 +108,7 @@ snd_seq_port_callback_t callback; char tmpname[64]; - emu = snd_magic_cast(snd_emux_t, closure, return -EINVAL); + emu = closure; snd_assert(arg != NULL && emu != NULL, return -ENXIO); down(&emu->register_mutex); @@ -179,7 +179,7 @@ snd_emux_port_t *p; snd_assert(arg != NULL, return -ENXIO); - p = snd_magic_cast(snd_emux_port_t, arg->private_data, return -EINVAL); + p = arg->private_data; snd_assert(p != NULL, return -ENXIO); emu = p->emu; @@ -208,7 +208,7 @@ int rc; snd_assert(arg != NULL, return -ENXIO); - p = snd_magic_cast(snd_emux_port_t, arg->private_data, return -EINVAL); + p = arg->private_data; snd_assert(p != NULL, return -ENXIO); emu = p->emu; @@ -248,7 +248,7 @@ snd_emux_t *emu; snd_assert(arg != NULL, return -ENXIO); - p = snd_magic_cast(snd_emux_port_t, arg->private_data, return -EINVAL); + p = arg->private_data; snd_assert(p != NULL, return -ENXIO); emu = p->emu; @@ -278,7 +278,7 @@ snd_emux_port_t *p; snd_assert(arg != NULL, return -ENXIO); - p = snd_magic_cast(snd_emux_port_t, arg->private_data, return -EINVAL); + p = arg->private_data; snd_assert(p != NULL, return -ENXIO); snd_emux_reset_port(p); return 0; @@ -296,7 +296,7 @@ snd_emux_port_t *p; unsigned char cmd, *data; - p = snd_magic_cast(snd_emux_port_t, private_data, return -EINVAL); + p = private_data; snd_assert(p != NULL, return -EINVAL); emu = p->emu; snd_assert(emu != NULL, return -EINVAL); @@ -339,9 +339,11 @@ p2 = *(short *) &event[6]; switch (cmd) { +#if 0 /* don't do this atomically */ case _EMUX_OSS_REMOVE_LAST_SAMPLES: snd_soundfont_remove_unlocked(emu->sflist); break; +#endif case _EMUX_OSS_SEND_EFFECT: if (chan) snd_emux_send_effect_oss(port, chan, p1, p2); diff -Nru a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c --- a/sound/synth/emux/emux_proc.c 2004-09-06 16:37:55 -07:00 +++ b/sound/synth/emux/emux_proc.c 2004-09-06 16:37:55 -07:00 @@ -36,7 +36,7 @@ snd_emux_t *emu; int i; - emu = snd_magic_cast(snd_emux_t, entry->private_data, return); + emu = entry->private_data; down(&emu->register_mutex); if (emu->name) snd_iprintf(buf, "Device: %s\n", emu->name); diff -Nru a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c --- a/sound/synth/emux/emux_seq.c 2004-09-06 16:37:56 -07:00 +++ b/sound/synth/emux/emux_seq.c 2004-09-06 16:37:56 -07:00 @@ -146,14 +146,14 @@ int i, type, cap; /* Allocate structures for this channel */ - if ((p = snd_magic_kcalloc(snd_emux_port_t, 0, GFP_KERNEL)) == NULL) { + if ((p = kcalloc(1, sizeof(*p), GFP_KERNEL)) == NULL) { snd_printk("no memory\n"); return NULL; } - p->chset.channels = snd_kcalloc(max_channels * sizeof(snd_midi_channel_t), GFP_KERNEL); + p->chset.channels = kcalloc(max_channels, sizeof(snd_midi_channel_t), GFP_KERNEL); if (p->chset.channels == NULL) { snd_printk("no memory\n"); - snd_magic_kfree(p); + kfree(p); return NULL; } for (i = 0; i < max_channels; i++) @@ -192,14 +192,14 @@ { snd_emux_port_t *p; - p = snd_magic_cast(snd_emux_port_t, private_data, return); + p = private_data; if (p) { #ifdef SNDRV_EMUX_USE_RAW_EFFECT snd_emux_delete_effect(p); #endif if (p->chset.channels) kfree(p->chset.channels); - snd_magic_kfree(p); + kfree(p); } } @@ -257,7 +257,7 @@ { snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, private_data, return -EINVAL); + port = private_data; snd_assert(port != NULL && ev != NULL, return -EINVAL); snd_midi_process_event(&emux_ops, ev, &port->chset); @@ -308,7 +308,7 @@ snd_emux_port_t *p; snd_emux_t *emu; - p = snd_magic_cast(snd_emux_port_t, private_data, return -EINVAL); + p = private_data; snd_assert(p != NULL, return -EINVAL); emu = p->emu; snd_assert(emu != NULL, return -EINVAL); @@ -329,7 +329,7 @@ snd_emux_port_t *p; snd_emux_t *emu; - p = snd_magic_cast(snd_emux_port_t, private_data, return -EINVAL); + p = private_data; snd_assert(p != NULL, return -EINVAL); emu = p->emu; snd_assert(emu != NULL, return -EINVAL); @@ -383,7 +383,7 @@ if (emu->midi_ports <= 0) return 0; - emu->vmidi = snd_kcalloc(sizeof(snd_rawmidi_t*) * emu->midi_ports, GFP_KERNEL); + emu->vmidi = kcalloc(emu->midi_ports, sizeof(snd_rawmidi_t*), GFP_KERNEL); if (emu->vmidi == NULL) return -ENOMEM; @@ -392,7 +392,7 @@ snd_virmidi_dev_t *rdev; if (snd_virmidi_new(card, emu->midi_devidx + i, &rmidi) < 0) goto __error; - rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, continue); + rdev = rmidi->private_data; sprintf(rmidi->name, "%s Synth MIDI", emu->name); rdev->seq_mode = SNDRV_VIRMIDI_SEQ_ATTACH; rdev->client = emu->client; diff -Nru a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c --- a/sound/synth/emux/emux_synth.c 2004-09-06 16:37:52 -07:00 +++ b/sound/synth/emux/emux_synth.c 2004-09-06 16:37:52 -07:00 @@ -61,7 +61,7 @@ unsigned long flags; snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL && chan != NULL, return); emu = port->emu; @@ -160,7 +160,7 @@ unsigned long flags; snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL && chan != NULL, return); emu = port->emu; @@ -201,7 +201,7 @@ */ void snd_emux_timer_callback(unsigned long data) { - snd_emux_t *emu = snd_magic_cast(snd_emux_t, (void*)data, return); + snd_emux_t *emu = (snd_emux_t*) data; snd_emux_voice_t *vp; int ch, do_again = 0; @@ -238,7 +238,7 @@ unsigned long flags; snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL && chan != NULL, return); emu = port->emu; @@ -322,7 +322,7 @@ { snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL && chan != NULL, return); switch (type) { @@ -402,7 +402,7 @@ snd_emux_t *emu; snd_emux_port_t *port; - port = snd_magic_cast(snd_emux_port_t, p, return); + port = p; snd_assert(port != NULL && chan != NULL, return); emu = port->emu; diff -Nru a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c --- a/sound/synth/emux/soundfont.c 2004-09-06 16:37:54 -07:00 +++ b/sound/synth/emux/soundfont.c 2004-09-06 16:37:54 -07:00 @@ -64,15 +64,14 @@ /* * lock access to sflist */ -static int -lock_preset(snd_sf_list_t *sflist, int nonblock) +static void +lock_preset(snd_sf_list_t *sflist) { - if (nonblock) { - if (down_trylock(&sflist->presets_mutex)) - return -EBUSY; - } else - down(&sflist->presets_mutex); - return 0; + unsigned long flags; + down(&sflist->presets_mutex); + spin_lock_irqsave(&sflist->lock, flags); + sflist->presets_locked = 1; + spin_unlock_irqrestore(&sflist->lock, flags); } @@ -82,6 +81,10 @@ static void unlock_preset(snd_sf_list_t *sflist) { + unsigned long flags; + spin_lock_irqsave(&sflist->lock, flags); + sflist->presets_locked = 0; + spin_unlock_irqrestore(&sflist->lock, flags); up(&sflist->presets_mutex); } @@ -143,7 +146,7 @@ if (patch.type == SNDRV_SFNT_OPEN_PATCH) { /* grab sflist to open */ - lock_preset(sflist, 0); + lock_preset(sflist); rc = open_patch(sflist, data, count, client); unlock_preset(sflist); return rc; @@ -157,7 +160,7 @@ } spin_unlock_irqrestore(&sflist->lock, flags); - lock_preset(sflist, 0); + lock_preset(sflist); rc = -EINVAL; switch (patch.type) { case SNDRV_SFNT_LOAD_INFO: @@ -237,8 +240,10 @@ return -ENOMEM; } + spin_lock_irqsave(&sflist->lock, flags); sflist->open_client = client; sflist->currsf = sf; + spin_unlock_irqrestore(&sflist->lock, flags); return 0; } @@ -261,7 +266,7 @@ } /* not found -- create a new one */ - sf = (snd_soundfont_t*)snd_kcalloc(sizeof(*sf), GFP_KERNEL); + sf = kcalloc(1, sizeof(*sf), GFP_KERNEL); if (sf == NULL) return NULL; sf->id = sflist->fonts_size; @@ -296,8 +301,12 @@ static int close_patch(snd_sf_list_t *sflist) { + unsigned long flags; + + spin_lock_irqsave(&sflist->lock, flags); sflist->currsf = NULL; sflist->open_client = -1; + spin_unlock_irqrestore(&sflist->lock, flags); rebuild_presets(sflist); @@ -337,7 +346,7 @@ { snd_sf_zone_t *zp; - if ((zp = snd_kcalloc(sizeof(*zp), GFP_KERNEL)) == NULL) + if ((zp = kcalloc(1, sizeof(*zp), GFP_KERNEL)) == NULL) return NULL; zp->next = sf->zones; sf->zones = zp; @@ -368,7 +377,7 @@ { snd_sf_sample_t *sp; - if ((sp = snd_kcalloc(sizeof(*sp), GFP_KERNEL)) == NULL) + if ((sp = kcalloc(1, sizeof(*sp), GFP_KERNEL)) == NULL) return NULL; sp->next = sf->samples; @@ -1090,7 +1099,7 @@ long count, int client) { int rc; - lock_preset(sflist, 0); + lock_preset(sflist); rc = load_guspatch(sflist, data, count, client); unlock_preset(sflist); return rc; @@ -1197,17 +1206,23 @@ snd_sf_zone_t **table, int max_layers) { int nvoices; + unsigned long flags; - if (lock_preset(sflist, 1)) + /* this function is supposed to be called atomically, + * so we check the lock. if it's busy, just returns 0 to + * tell the caller the busy state + */ + spin_lock_irqsave(&sflist->lock, flags); + if (sflist->presets_locked) { + spin_unlock_irqrestore(&sflist->lock, flags); return 0; - + } nvoices = search_zones(sflist, notep, vel, preset, bank, table, max_layers, 0); if (! nvoices) { if (preset != def_preset || bank != def_bank) nvoices = search_zones(sflist, notep, vel, def_preset, def_bank, table, max_layers, 0); } - unlock_preset(sflist); - + spin_unlock_irqrestore(&sflist->lock, flags); return nvoices; } @@ -1347,7 +1362,7 @@ { snd_sf_list_t *sflist; - if ((sflist = snd_kcalloc(sizeof(snd_sf_list_t), GFP_KERNEL)) == NULL) + if ((sflist = kcalloc(1, sizeof(*sflist), GFP_KERNEL)) == NULL) return NULL; init_MUTEX(&sflist->presets_mutex); @@ -1371,7 +1386,7 @@ if (sflist == NULL) return; - lock_preset(sflist, 0); + lock_preset(sflist); if (sflist->callback.sample_reset) sflist->callback.sample_reset(sflist->callback.private_data); snd_sf_clear(sflist); @@ -1387,7 +1402,7 @@ int snd_soundfont_remove_samples(snd_sf_list_t *sflist) { - lock_preset(sflist, 0); + lock_preset(sflist); if (sflist->callback.sample_reset) sflist->callback.sample_reset(sflist->callback.private_data); snd_sf_clear(sflist); @@ -1407,8 +1422,7 @@ snd_sf_zone_t *zp, *nextzp; snd_sf_sample_t *sp, *nextsp; - if (lock_preset(sflist, 1)) - return -EBUSY; + lock_preset(sflist); if (sflist->callback.sample_reset) sflist->callback.sample_reset(sflist->callback.private_data); diff -Nru a/sound/synth/util_mem.c b/sound/synth/util_mem.c --- a/sound/synth/util_mem.c 2004-09-06 16:37:51 -07:00 +++ b/sound/synth/util_mem.c 2004-09-06 16:37:51 -07:00 @@ -38,7 +38,7 @@ { snd_util_memhdr_t *hdr; - hdr = snd_kcalloc(sizeof(*hdr), GFP_KERNEL); + hdr = kcalloc(1, sizeof(*hdr), GFP_KERNEL); if (hdr == NULL) return NULL; hdr->size = memsize; diff -Nru a/sound/usb/Kconfig b/sound/usb/Kconfig --- a/sound/usb/Kconfig 2004-09-06 16:37:54 -07:00 +++ b/sound/usb/Kconfig 2004-09-06 16:37:54 -07:00 @@ -11,5 +11,15 @@ help Say 'Y' or 'M' to include support for USB audio and USB MIDI devices. +config SND_USB_USX2Y + tristate "Tascam US-122, US-224 and US-428 USB driver" + depends on SND && USB + select SND_HWDEP + select SND_RAWMIDI + select SND_PCM + help + Say 'Y' or 'M' to include support for Tascam USB Audio/MIDI + interfaces or controllers US-122, US-224 and US-428. + endmenu diff -Nru a/sound/usb/Makefile b/sound/usb/Makefile --- a/sound/usb/Makefile 2004-09-06 16:37:53 -07:00 +++ b/sound/usb/Makefile 2004-09-06 16:37:53 -07:00 @@ -2,7 +2,11 @@ # Makefile for ALSA # -snd-usb-audio-objs := usbaudio.o usbmixer.o usbmidi.o +snd-usb-audio-objs := usbaudio.o usbmixer.o +snd-usb-lib-objs := usbmidi.o # Toplevel Module Dependency -obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o +obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o snd-usb-lib.o +obj-$(CONFIG_SND_USB_USX2Y) += snd-usb-lib.o + +obj-$(CONFIG_SND) += usx2y/ diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c 2004-09-06 16:37:54 -07:00 +++ b/sound/usb/usbaudio.c 2004-09-06 16:37:54 -07:00 @@ -5,7 +5,7 @@ * * Copyright (c) 2002 by Takashi Iwai * - * Many codes borrowed from audio.c by + * Many codes borrowed from audio.c by * Alan Cox (alan@lxorguk.ukuu.org.uk) * Thomas Sailer (sailer@ife.ee.ethz.ch) * @@ -58,8 +58,7 @@ MODULE_AUTHOR("Takashi Iwai "); MODULE_DESCRIPTION("USB Audio"); MODULE_LICENSE("GPL"); -MODULE_CLASSES("{sound}"); -MODULE_DEVICES("{{Generic,USB Audio}}"); +MODULE_SUPPORTED_DEVICE("{{Generic,USB Audio}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ @@ -73,25 +72,18 @@ module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, "Index value for the USB audio adapter."); -MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, "ID string for the USB audio adapter."); -MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, "Enable USB audio adapter."); -MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); module_param_array(vid, int, boot_devs, 0444); MODULE_PARM_DESC(vid, "Vendor ID for the USB audio device."); -MODULE_PARM_SYNTAX(vid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16"); module_param_array(pid, int, boot_devs, 0444); MODULE_PARM_DESC(pid, "Product ID for the USB audio device."); -MODULE_PARM_SYNTAX(pid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16"); module_param(nrpacks, int, 0444); MODULE_PARM_DESC(nrpacks, "Max. number of packets per URB."); -MODULE_PARM_SYNTAX(nrpacks, SNDRV_ENABLED ",allows:{{1,10}}"); module_param(async_unlink, bool, 0444); MODULE_PARM_DESC(async_unlink, "Use async unlink mode."); -MODULE_PARM_SYNTAX(async_unlink, SNDRV_BOOLEAN_TRUE_DESC); /* @@ -104,7 +96,7 @@ * */ -#define MAX_PACKS 10 +#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 */ @@ -207,8 +199,6 @@ struct list_head list; }; -#define chip_t snd_usb_stream_t - /* * we keep the snd_usb_audio_t instances by ourselves for merging @@ -354,7 +344,7 @@ if (! urb->bandwidth) { int bustime; bustime = usb_check_bandwidth(urb->dev, urb); - if (bustime < 0) + if (bustime < 0) return bustime; printk("urb %d: bandwidth = %d (packets = %d)\n", ctx->index, bustime, urb->number_of_packets); usb_claim_bandwidth(urb->dev, urb, bustime, 1); @@ -826,7 +816,7 @@ } -/* +/* * wait until all urbs are processed. */ static int wait_clear_urbs(snd_usb_substream_t *subs) @@ -1148,7 +1138,7 @@ if (fmt->attributes & EP_CS_ATTR_PITCH_CONTROL) { data[0] = 1; if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, - USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, + USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, PITCH_CONTROL << 8, ep, data, 1, HZ)) < 0) { snd_printk(KERN_ERR "%d:%d:%d: cannot set enable PITCH\n", dev->devnum, iface, ep); @@ -1174,7 +1164,7 @@ data[1] = rate >> 8; data[2] = rate >> 16; if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, - USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, + USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) { snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep 0x%x\n", dev->devnum, iface, fmt->altsetting, rate, ep); @@ -1183,9 +1173,9 @@ if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN, SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) { - snd_printk(KERN_ERR "%d:%d:%d: cannot get freq at ep 0x%x\n", + snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at ep 0x%x\n", dev->devnum, iface, fmt->altsetting, ep); - return err; + return 0; /* some devices don't support reading */ } crate = data[0] | (data[1] << 8) | (data[2] << 16); if (crate != rate) { @@ -1323,7 +1313,7 @@ ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); if (ret < 0) return ret; - + format = params_format(hw_params); rate = params_rate(hw_params); channels = params_channels(hw_params); @@ -1482,7 +1472,7 @@ snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); unsigned int rmin, rmax; int changed; - + hwc_debug("hw_rule_rate: (%d,%d)\n", it->min, it->max); changed = 0; rmin = rmax = 0; @@ -1536,7 +1526,7 @@ snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); unsigned int rmin, rmax; int changed; - + hwc_debug("hw_rule_channels: (%d,%d)\n", it->min, it->max); changed = 0; rmin = rmax = 0; @@ -1590,7 +1580,7 @@ u64 fbits; u32 oldbits[2]; int changed; - + hwc_debug("hw_rule_format: %x:%x\n", fmt->bits[0], fmt->bits[1]); fbits = 0; list_for_each(p, &subs->fmt_list) { @@ -1734,13 +1724,13 @@ if (check_hw_params_convention(subs)) { hwc_debug("setting extra hw constraints...\n"); - if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, + if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, hw_rule_rate, subs, SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_CHANNELS, -1)) < 0) return err; - if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, + if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, hw_rule_channels, subs, SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_RATE, @@ -2001,8 +1991,8 @@ static void proc_pcm_format_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - snd_usb_stream_t *stream = snd_magic_cast(snd_usb_stream_t, entry->private_data, return); - + snd_usb_stream_t *stream = entry->private_data; + snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name); if (stream->substream[SNDRV_PCM_STREAM_PLAYBACK].num_formats) { @@ -2089,7 +2079,7 @@ free_substream(&stream->substream[0]); free_substream(&stream->substream[1]); list_del(&stream->list); - snd_magic_kfree(stream); + kfree(stream); } static void snd_usb_audio_pcm_free(snd_pcm_t *pcm) @@ -2146,7 +2136,7 @@ } /* create a new pcm */ - as = snd_magic_kmalloc(snd_usb_stream_t, 0, GFP_KERNEL); + as = kmalloc(sizeof(*as), GFP_KERNEL); if (! as) return -ENOMEM; memset(as, 0, sizeof(*as)); @@ -2158,13 +2148,13 @@ stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1, &pcm); if (err < 0) { - snd_magic_kfree(as); + kfree(as); return err; } as->pcm = pcm; pcm->private_data = as; pcm->private_free = snd_usb_audio_pcm_free; - pcm->info_flags = SNDRV_PCM_INFO_NONATOMIC_OPS; + pcm->info_flags = 0; if (chip->pcm_devs > 0) sprintf(pcm->name, "USB Audio #%d", chip->pcm_devs); else @@ -2182,6 +2172,24 @@ /* + * check if the device uses big-endian samples + */ +static int is_big_endian_format(struct usb_device *dev, struct audioformat *fp) +{ + /* M-Audio */ + if (dev->descriptor.idVendor == 0x0763) { + /* Quattro: captured data only */ + if (dev->descriptor.idProduct == 0x2001 && + fp->endpoint & USB_DIR_IN) + return 1; + /* Audiophile USB */ + if (dev->descriptor.idProduct == 0x2003) + return 1; + } + return 0; +} + +/* * parse the audio format type I descriptor * and returns the corresponding pcm format * @@ -2217,17 +2225,13 @@ pcm_format = SNDRV_PCM_FORMAT_S8; break; case 2: - /* M-Audio audiophile USB workaround */ - if (dev->descriptor.idVendor == 0x0763 && - dev->descriptor.idProduct == 0x2003) + if (is_big_endian_format(dev, fp)) pcm_format = SNDRV_PCM_FORMAT_S16_BE; /* grrr, big endian!! */ else pcm_format = SNDRV_PCM_FORMAT_S16_LE; break; case 3: - /* M-Audio audiophile USB workaround */ - if (dev->descriptor.idVendor == 0x0763 && - dev->descriptor.idProduct == 0x2003) + if (is_big_endian_format(dev, fp)) pcm_format = SNDRV_PCM_FORMAT_S24_3BE; /* grrr, big endian!! */ else pcm_format = SNDRV_PCM_FORMAT_S24_3LE; @@ -2281,7 +2285,7 @@ { int nr_rates = fmt[offset]; if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) { - snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", + snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", dev->devnum, fp->iface, fp->altsetting); return -1; } @@ -2419,7 +2423,7 @@ } #endif return 0; -} +} static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no) { @@ -2465,22 +2469,22 @@ } if (fmt[0] < 7) { - snd_printk(KERN_ERR "%d:%u:%d : invalid AS_GENERAL desc\n", + snd_printk(KERN_ERR "%d:%u:%d : invalid AS_GENERAL desc\n", dev->devnum, iface_no, altno); continue; } format = (fmt[6] << 8) | fmt[5]; /* remember the format value */ - + /* get format type */ fmt = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, FORMAT_TYPE); if (!fmt) { - snd_printk(KERN_ERR "%d:%u:%d : no FORMAT_TYPE desc\n", + snd_printk(KERN_ERR "%d:%u:%d : no FORMAT_TYPE desc\n", dev->devnum, iface_no, altno); continue; } if (fmt[0] < 8) { - snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", + snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", dev->devnum, iface_no, altno); continue; } @@ -2490,7 +2494,7 @@ if (!csep && altsd->bNumEndpoints >= 2) csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) { - snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n", + snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n", dev->devnum, iface_no, altno); continue; } @@ -2920,14 +2924,14 @@ */ static void proc_audio_usbbus_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - snd_usb_audio_t *chip = snd_magic_cast(snd_usb_audio_t, entry->private_data, return); + snd_usb_audio_t *chip = entry->private_data; if (! chip->shutdown) snd_iprintf(buffer, "%03d/%03d\n", chip->dev->bus->busnum, chip->dev->devnum); } static void proc_audio_usbid_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) { - snd_usb_audio_t *chip = snd_magic_cast(snd_usb_audio_t, entry->private_data, return); + snd_usb_audio_t *chip = entry->private_data; if (! chip->shutdown) snd_iprintf(buffer, "%04x:%04x\n", chip->dev->descriptor.idVendor, chip->dev->descriptor.idProduct); } @@ -2950,13 +2954,13 @@ static int snd_usb_audio_free(snd_usb_audio_t *chip) { - snd_magic_kfree(chip); + kfree(chip); return 0; } static int snd_usb_audio_dev_free(snd_device_t *device) { - snd_usb_audio_t *chip = snd_magic_cast(snd_usb_audio_t, device->device_data, return -ENXIO); + snd_usb_audio_t *chip = device->device_data; return snd_usb_audio_free(chip); } @@ -2975,7 +2979,7 @@ static snd_device_ops_t ops = { .dev_free = snd_usb_audio_dev_free, }; - + *rchip = NULL; if (snd_usb_get_speed(dev) != USB_SPEED_FULL && @@ -2990,7 +2994,7 @@ return -ENOMEM; } - chip = snd_magic_kcalloc(snd_usb_audio_t, 0, GFP_KERNEL); + chip = kcalloc(1, sizeof(*chip), GFP_KERNEL); if (! chip) { snd_card_free(card); return -ENOMEM; @@ -3171,7 +3175,7 @@ /* * we need to take care of counter, since disconnection can be called also - * many times as well as usb_audio_probe(). + * many times as well as usb_audio_probe(). */ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) { @@ -3182,7 +3186,7 @@ if (ptr == (void *)-1L) return; - chip = snd_magic_cast(snd_usb_audio_t, ptr, return); + chip = ptr; card = chip->card; down(®ister_mutex); chip->shutdown = 1; diff -Nru a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h --- a/sound/usb/usbaudio.h 2004-09-06 16:37:53 -07:00 +++ b/sound/usb/usbaudio.h 2004-09-06 16:37:53 -07:00 @@ -124,7 +124,6 @@ typedef struct snd_usb_audio snd_usb_audio_t; struct snd_usb_audio { - int index; struct usb_device *dev; snd_card_t *card; @@ -138,15 +137,17 @@ int next_midi_device; unsigned int ignore_ctl_error; /* for mixer */ -}; +}; /* * Information about devices with broken descriptors */ +/* special values for .ifnum */ #define QUIRK_NO_INTERFACE -2 #define QUIRK_ANY_INTERFACE -1 +/* quirk type */ #define QUIRK_MIDI_FIXED_ENDPOINT 0 #define QUIRK_MIDI_YAMAHA 1 #define QUIRK_MIDI_MIDIMAN 2 @@ -205,6 +206,8 @@ int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif); int snd_usb_create_midi_interface(snd_usb_audio_t *chip, struct usb_interface *iface, const snd_usb_audio_quirk_t *quirk); +void snd_usbmidi_input_stop(struct list_head* p); +void snd_usbmidi_input_start(struct list_head* p); void snd_usbmidi_disconnect(struct list_head *p, struct usb_driver *driver); /* diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c --- a/sound/usb/usbmidi.c 2004-09-06 16:37:54 -07:00 +++ b/sound/usb/usbmidi.c 2004-09-06 16:37:54 -07:00 @@ -49,6 +49,11 @@ #include #include "usbaudio.h" +MODULE_AUTHOR("Clemens Ladisch "); +MODULE_DESCRIPTION("USB Audio/MIDI helper module"); +MODULE_LICENSE("Dual BSD/GPL"); + + struct usb_ms_header_descriptor { __u8 bLength; __u8 bDescriptorType; @@ -175,7 +180,7 @@ */ static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs) { - snd_usb_midi_in_endpoint_t* ep = snd_magic_cast(snd_usb_midi_in_endpoint_t, urb->context, return); + snd_usb_midi_in_endpoint_t* ep = urb->context; if (urb->status == 0) { uint8_t* buffer = (uint8_t*)ep->urb->transfer_buffer; @@ -229,7 +234,7 @@ static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs) { - snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, urb->context, return); + snd_usb_midi_out_endpoint_t* ep = urb->context; if (urb->status < 0) { if (snd_usbmidi_urb_error(urb->status) < 0) @@ -393,7 +398,7 @@ int p; struct urb* urb = ep->urb; unsigned long flags; - + spin_lock_irqsave(&ep->buffer_lock, flags); if (urb->status == -EINPROGRESS || ep->umidi->chip->shutdown) { spin_unlock_irqrestore(&ep->buffer_lock, flags); @@ -417,14 +422,14 @@ static void snd_usbmidi_out_tasklet(unsigned long data) { - snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, (void*)data, return); - + snd_usb_midi_out_endpoint_t* ep = (snd_usb_midi_out_endpoint_t *) data; + snd_usbmidi_do_output(ep); } static int snd_usbmidi_output_open(snd_rawmidi_substream_t* substream) { - snd_usb_midi_t* umidi = snd_magic_cast(snd_usb_midi_t, substream->rmidi->private_data, return -ENXIO); + snd_usb_midi_t* umidi = substream->rmidi->private_data; usbmidi_out_port_t* port = NULL; int i, j; @@ -503,7 +508,7 @@ kfree(ep->urb->transfer_buffer); usb_free_urb(ep->urb); } - snd_magic_kfree(ep); + kfree(ep); } /* @@ -571,7 +576,7 @@ int length; rep->in = NULL; - ep = snd_magic_kcalloc(snd_usb_midi_in_endpoint_t, 0, GFP_KERNEL); + ep = kcalloc(1, sizeof(*ep), GFP_KERNEL); if (!ep) return -ENOMEM; ep->umidi = umidi; @@ -631,7 +636,7 @@ kfree(ep->urb->transfer_buffer); usb_free_urb(ep->urb); } - snd_magic_kfree(ep); + kfree(ep); } /* @@ -647,7 +652,7 @@ void* buffer; rep->out = NULL; - ep = snd_magic_kcalloc(snd_usb_midi_out_endpoint_t, 0, GFP_KERNEL); + ep = kcalloc(1, sizeof(*ep), GFP_KERNEL); if (!ep) return -ENOMEM; ep->umidi = umidi; @@ -695,7 +700,7 @@ if (ep->in) snd_usbmidi_in_endpoint_delete(ep->in); } - snd_magic_kfree(umidi); + kfree(umidi); } /* @@ -718,7 +723,7 @@ static void snd_usbmidi_rawmidi_free(snd_rawmidi_t* rmidi) { - snd_usb_midi_t* umidi = snd_magic_cast(snd_usb_midi_t, rmidi->private_data, return); + snd_usb_midi_t* umidi = rmidi->private_data; snd_usbmidi_free(umidi); } @@ -964,7 +969,7 @@ * If the endpoints aren't specified, use the first bulk endpoints in the * first alternate setting of the interface. */ -static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi, +static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi, snd_usb_midi_endpoint_info_t* endpoint) { struct usb_interface* intf; @@ -998,7 +1003,7 @@ /* * Detects the endpoints and ports of Yamaha devices. */ -static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi, +static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi, snd_usb_midi_endpoint_info_t* endpoint) { struct usb_interface* intf; @@ -1145,6 +1150,44 @@ } /* + * Temporarily stop input. + */ +void snd_usbmidi_input_stop(struct list_head* p) +{ + snd_usb_midi_t* umidi; + int i; + + umidi = list_entry(p, snd_usb_midi_t, list); + for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { + snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i]; + if (ep->in) + usb_unlink_urb(ep->in->urb); + } +} + +static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep) +{ + if (ep) { + struct urb* urb = ep->urb; + urb->dev = ep->umidi->chip->dev; + snd_usbmidi_submit_urb(urb, GFP_KERNEL); + } +} + +/* + * Resume input after a call to snd_usbmidi_input_stop(). + */ +void snd_usbmidi_input_start(struct list_head* p) +{ + snd_usb_midi_t* umidi; + int i; + + umidi = list_entry(p, snd_usb_midi_t, list); + for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) + snd_usbmidi_input_start_ep(umidi->endpoints[i].in); +} + +/* * Creates and registers everything needed for a MIDI streaming interface. */ int snd_usb_create_midi_interface(snd_usb_audio_t* chip, @@ -1156,7 +1199,7 @@ int out_ports, in_ports; int i, err; - umidi = snd_magic_kcalloc(snd_usb_midi_t, 0, GFP_KERNEL); + umidi = kcalloc(1, sizeof(*umidi), GFP_KERNEL); if (!umidi) return -ENOMEM; umidi->chip = chip; @@ -1189,7 +1232,7 @@ } } if (err < 0) { - snd_magic_kfree(umidi); + kfree(umidi); return err; } @@ -1202,7 +1245,7 @@ } err = snd_usbmidi_create_rawmidi(umidi, out_ports, in_ports); if (err < 0) { - snd_magic_kfree(umidi); + kfree(umidi); return err; } @@ -1219,8 +1262,11 @@ list_add(&umidi->list, &umidi->chip->midi_list); for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) - if (umidi->endpoints[i].in) - snd_usbmidi_submit_urb(umidi->endpoints[i].in->urb, - GFP_KERNEL); + snd_usbmidi_input_start_ep(umidi->endpoints[i].in); return 0; } + +EXPORT_SYMBOL(snd_usb_create_midi_interface); +EXPORT_SYMBOL(snd_usbmidi_input_stop); +EXPORT_SYMBOL(snd_usbmidi_input_start); +EXPORT_SYMBOL(snd_usbmidi_disconnect); diff -Nru a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c --- a/sound/usb/usbmixer.c 2004-09-06 16:37:51 -07:00 +++ b/sound/usb/usbmixer.c 2004-09-06 16:37:51 -07:00 @@ -5,7 +5,7 @@ * * Copyright (c) 2002 by Takashi Iwai * - * Many codes borrowed from audio.c by + * Many codes borrowed from audio.c by * Alan Cox (alan@lxorguk.ukuu.org.uk) * Thomas Sailer (sailer@ife.ee.ethz.ch) * @@ -77,7 +77,7 @@ unsigned int ctrlif; unsigned int id; unsigned int control; /* CS or ICN (high byte) */ - unsigned int cmask; /* channel mask bitmap: 0 = master */ + unsigned int cmask; /* channel mask bitmap: 0 = master */ int channels; int val_type; int min, max, res; @@ -299,7 +299,7 @@ unsigned char buf[2]; int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; int timeout = 10; - + while (timeout-- > 0) { if (snd_usb_ctl_msg(cval->chip->dev, usb_rcvctrlpipe(cval->chip->dev, 0), request, @@ -334,7 +334,7 @@ unsigned char buf[2]; int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; int timeout = 10; - + value_set = convert_bytes_value(cval, value_set); buf[0] = value_set & 0xff; buf[1] = (value_set >> 8) & 0xff; @@ -361,7 +361,7 @@ /* - * parser routines begin here... + * parser routines begin here... */ static int parse_audio_unit(mixer_build_t *state, int unitid); @@ -443,7 +443,7 @@ { 0x0712, "Multi-Track Recorder" }, { 0x0713, "Synthesizer" }, { 0 }, -}; +}; static int get_term_name(mixer_build_t *state, usb_audio_term_t *iterm, unsigned char *name, int maxlen, int term_only) @@ -573,7 +573,7 @@ static void usb_mixer_elem_free(snd_kcontrol_t *kctl) { if (kctl->private_data) { - snd_magic_kfree((void *)kctl->private_data); + kfree((void *)kctl->private_data); kctl->private_data = NULL; } } @@ -615,7 +615,7 @@ cval->res = 1; } else { int last_valid_res = cval->res; - + while (cval->res > 1) { if (set_ctl_value(cval, SET_RES, (cval->control << 8) | minchn, cval->res / 2) < 0) break; @@ -634,8 +634,8 @@ /* get a feature/mixer unit info */ static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) -{ - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); +{ + usb_mixer_elem_info_t *cval = kcontrol->private_data; if (cval->val_type == USB_MIXER_BOOLEAN || cval->val_type == USB_MIXER_INV_BOOLEAN) @@ -659,7 +659,7 @@ /* get the current value from feature/mixer unit */ static int mixer_ctl_feature_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int c, cnt, val, err; if (cval->cmask) { @@ -700,7 +700,7 @@ /* put the current value to feature/mixer unit */ static int mixer_ctl_feature_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int c, cnt, val, oval, err; int changed = 0; @@ -774,7 +774,7 @@ if (check_ignored_ctl(state, unitid, control)) return; - cval = snd_magic_kcalloc(usb_mixer_elem_info_t, 0, GFP_KERNEL); + cval = kcalloc(1, sizeof(*cval), GFP_KERNEL); if (! cval) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); return; @@ -801,7 +801,7 @@ kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval); if (! kctl) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); - snd_magic_kfree(cval); + kfree(cval); return; } kctl->private_free = usb_mixer_elem_free; @@ -914,7 +914,7 @@ if (master_bits & (1 << i)) build_feature_ctl(state, ftr, 0, i, &iterm, unitid); } - + return 0; } @@ -943,7 +943,7 @@ if (check_ignored_ctl(state, unitid, 0)) return; - cval = snd_magic_kcalloc(usb_mixer_elem_info_t, 0, GFP_KERNEL); + cval = kcalloc(1, sizeof(*cval), GFP_KERNEL); if (! cval) return; @@ -968,7 +968,7 @@ kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval); if (! kctl) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); - snd_magic_kfree(cval); + kfree(cval); return; } kctl->private_free = usb_mixer_elem_free; @@ -1014,7 +1014,7 @@ /* get callback for processing/extension unit */ static int mixer_ctl_procunit_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int err, val; err = get_cur_ctl_value(cval, cval->control << 8, &val); @@ -1032,7 +1032,7 @@ /* put callback for processing/extension unit */ static int mixer_ctl_procunit_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int val, oval, err; err = get_cur_ctl_value(cval, cval->control << 8, &oval); @@ -1170,7 +1170,7 @@ continue; if (check_ignored_ctl(state, unitid, valinfo->control)) continue; - cval = snd_magic_kcalloc(usb_mixer_elem_info_t, 0, GFP_KERNEL); + cval = kcalloc(1, sizeof(*cval), GFP_KERNEL); if (! cval) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); return -ENOMEM; @@ -1195,7 +1195,7 @@ kctl = snd_ctl_new1(&mixer_procunit_ctl, cval); if (! kctl) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); - snd_magic_kfree(cval); + kfree(cval); return -ENOMEM; } kctl->private_free = usb_mixer_elem_free; @@ -1243,8 +1243,8 @@ * use an enumerator type for routing */ static int mixer_ctl_selector_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) -{ - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); +{ + usb_mixer_elem_info_t *cval = kcontrol->private_data; char **itemlist = (char **)kcontrol->private_value; snd_assert(itemlist, return -EINVAL); @@ -1260,7 +1260,7 @@ /* get callback for selector unit */ static int mixer_ctl_selector_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int val, err; err = get_cur_ctl_value(cval, 0, &val); @@ -1279,7 +1279,7 @@ /* put callback for selector unit */ static int mixer_ctl_selector_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kcontrol->private_data, return -EINVAL); + usb_mixer_elem_info_t *cval = kcontrol->private_data; int val, oval, err; err = get_cur_ctl_value(cval, 0, &oval); @@ -1315,9 +1315,9 @@ int i, num_ins = 0; if (kctl->private_data) { - usb_mixer_elem_info_t *cval = snd_magic_cast(usb_mixer_elem_info_t, kctl->private_data,); + usb_mixer_elem_info_t *cval = kctl->private_data; num_ins = cval->max; - snd_magic_kfree(cval); + kfree(cval); kctl->private_data = NULL; } if (kctl->private_value) { @@ -1357,7 +1357,7 @@ if (check_ignored_ctl(state, unitid, 0)) return 0; - cval = snd_magic_kcalloc(usb_mixer_elem_info_t, 0, GFP_KERNEL); + cval = kcalloc(1, sizeof(*cval), GFP_KERNEL); if (! cval) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); return -ENOMEM; @@ -1375,7 +1375,7 @@ namelist = kmalloc(sizeof(char *) * num_ins, GFP_KERNEL); if (! namelist) { snd_printk(KERN_ERR "cannot malloc\n"); - snd_magic_kfree(cval); + kfree(cval); return -ENOMEM; } #define MAX_ITEM_NAME_LEN 64 @@ -1388,7 +1388,7 @@ while (--i > 0) kfree(namelist[i]); kfree(namelist); - snd_magic_kfree(cval); + kfree(cval); return -ENOMEM; } if (check_input_term(state, desc[5 + i], &iterm) >= 0) @@ -1400,7 +1400,7 @@ kctl = snd_ctl_new1(&mixer_selectunit_ctl, cval); if (! kctl) { snd_printk(KERN_ERR "cannot malloc kcontrol\n"); - snd_magic_kfree(cval); + kfree(cval); return -ENOMEM; } kctl->private_value = (unsigned long)namelist; diff -Nru a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c --- a/sound/usb/usbmixer_maps.c 2004-09-06 16:37:55 -07:00 +++ b/sound/usb/usbmixer_maps.c 2004-09-06 16:37:55 -07:00 @@ -32,7 +32,7 @@ const struct usbmix_name_map *map; int ignore_ctl_error; }; - + /* * USB control mappers for SB Exitigy */ diff -Nru a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h --- a/sound/usb/usbquirks.h 2004-09-06 16:37:52 -07:00 +++ b/sound/usb/usbquirks.h 2004-09-06 16:37:52 -07:00 @@ -91,6 +91,31 @@ YAMAHA_DEVICE(0x1021, "MOTIF ES 6"), YAMAHA_DEVICE(0x1022, "MOTIF ES 7"), YAMAHA_DEVICE(0x1023, "MOTIF ES 8"), +YAMAHA_DEVICE(0x1024, "CVP-301"), +YAMAHA_DEVICE(0x1025, "CVP-303"), +YAMAHA_DEVICE(0x1026, "CVP-305"), +YAMAHA_DEVICE(0x1027, "CVP-307"), +YAMAHA_DEVICE(0x1028, "CVP-309"), +YAMAHA_DEVICE(0x1029, "CVP-309GP"), +YAMAHA_DEVICE(0x102a, "PSR-1500"), +YAMAHA_DEVICE(0x102b, "PSR-3000"), +YAMAHA_DEVICE(0x102e, "ELS-01/01C"), +YAMAHA_DEVICE(0x1030, "PSR-295/293"), +YAMAHA_DEVICE(0x1031, "DGX-205/203"), +YAMAHA_DEVICE(0x1032, "DGX-305"), +YAMAHA_DEVICE(0x1033, "DGX-505"), +YAMAHA_DEVICE(0x1034, NULL), +YAMAHA_DEVICE(0x1035, NULL), +YAMAHA_DEVICE(0x1036, NULL), +YAMAHA_DEVICE(0x1037, NULL), +YAMAHA_DEVICE(0x1038, NULL), +YAMAHA_DEVICE(0x1039, NULL), +YAMAHA_DEVICE(0x103a, NULL), +YAMAHA_DEVICE(0x103b, NULL), +YAMAHA_DEVICE(0x103c, NULL), +YAMAHA_DEVICE(0x2000, "DGP-7"), +YAMAHA_DEVICE(0x2001, "DGP-5"), +YAMAHA_DEVICE(0x2002, NULL), YAMAHA_DEVICE(0x5000, "CS1D"), YAMAHA_DEVICE(0x5001, "DSP1D"), YAMAHA_DEVICE(0x5002, "DME32"), @@ -100,6 +125,11 @@ YAMAHA_DEVICE(0x5006, "NHB32-C"), YAMAHA_DEVICE(0x5007, "DM1000"), YAMAHA_DEVICE(0x5008, "01V96"), +YAMAHA_DEVICE(0x500a, "PM5D"), +YAMAHA_DEVICE(0x500b, "DME64N"), +YAMAHA_DEVICE(0x500c, "DME24N"), +YAMAHA_DEVICE(0x7000, "DTX"), +YAMAHA_DEVICE(0x7010, "UB99"), #undef YAMAHA_DEVICE #undef YAMAHA_INTERFACE @@ -267,7 +297,8 @@ } }, { - /* thanks to Emiliano Grilli for helping researching this data */ + /* thanks to Emiliano Grilli + * for helping researching this data */ USB_DEVICE(0x0582, 0x000c), .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { .vendor_name = "Roland", @@ -830,11 +861,42 @@ .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { .vendor_name = "M-Audio", .product_name = "Quattro", - .ifnum = 9, - .type = QUIRK_MIDI_MIDIMAN, - .data = & (const snd_usb_midi_endpoint_info_t) { - .out_cables = 0x0001, - .in_cables = 0x0001 + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = & (const snd_usb_audio_quirk_t[]) { + /* + * Interfaces 0-2 are "Windows-compatible", 16-bit only, + * and share endpoints with the other interfaces. + * Ignore them. The other interfaces can do 24 bits, + * but captured samples are big-endian (see usbaudio.c). + */ + { + .ifnum = 4, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 5, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 7, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 8, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 9, + .type = QUIRK_MIDI_MIDIMAN, + .data = & (const snd_usb_midi_endpoint_info_t) { + .out_cables = 0x0001, + .in_cables = 0x0001 + } + }, + { + .ifnum = -1 + } } } }, @@ -911,6 +973,21 @@ .vendor_name = "Terratec", .product_name = "PHASE 26", .ifnum = 3, + .type = QUIRK_MIDI_STANDARD_INTERFACE + } +}, + +{ + /* + * Some USB MIDI devices don't have an audio control interface, + * so we have to grab MIDI streaming interfaces here. + */ + .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS | + USB_DEVICE_ID_MATCH_INT_SUBCLASS, + .bInterfaceClass = USB_CLASS_AUDIO, + .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING, + .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { + .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_MIDI_STANDARD_INTERFACE } }, diff -Nru a/sound/usb/usx2y/Makefile b/sound/usb/usx2y/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/Makefile 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,3 @@ +snd-usb-usx2y-objs := usbusx2y.o usbusx2yaudio.o usX2Yhwdep.o + +obj-$(CONFIG_SND_USB_USX2Y) += snd-usb-usx2y.o diff -Nru a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usX2Yhwdep.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,282 @@ +/* + * Driver for Tascam US-X2Y USB soundcards + * + * FPGA Loader + ALSA Startup + * + * Copyright (c) 2003 by Karsten Wiese + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include "usx2y.h" +#include "usbusx2y.h" +#include "usX2Yhwdep.h" + + +static struct page * snd_us428ctls_vm_nopage(struct vm_area_struct *area, unsigned long address, int *type) +{ + unsigned long offset; + struct page * page; + void *vaddr; + + snd_printdd("ENTER, start %lXh, ofs %lXh, pgoff %ld, addr %lXh\n", + area->vm_start, + address - area->vm_start, + (address - area->vm_start) >> PAGE_SHIFT, + address); + + offset = area->vm_pgoff << PAGE_SHIFT; + offset += address - area->vm_start; + snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); + vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->us428ctls_sharedmem + offset; + page = virt_to_page(vaddr); + get_page(page); + snd_printdd( "vaddr=%p made us428ctls_vm_nopage() return %p; offset=%lX\n", vaddr, page, offset); + + if (type) + *type = VM_FAULT_MINOR; + + return page; +} + +static struct vm_operations_struct us428ctls_vm_ops = { + .nopage = snd_us428ctls_vm_nopage, +}; + +static int snd_us428ctls_mmap(snd_hwdep_t * hw, struct file *filp, struct vm_area_struct *area) +{ + unsigned long size = (unsigned long)(area->vm_end - area->vm_start); + usX2Ydev_t *us428 = (usX2Ydev_t*)hw->private_data; + + // FIXME this hwdep interface is used twice: fpga download and mmap for controlling Lights etc. Maybe better using 2 hwdep devs? + // so as long as the device isn't fully initialised yet we return -EBUSY here. + if (!(((usX2Ydev_t*)hw->private_data)->chip_status & USX2Y_STAT_CHIP_INIT)) + return -EBUSY; + + /* if userspace tries to mmap beyond end of our buffer, fail */ + if (size > ((PAGE_SIZE - 1 + sizeof(us428ctls_sharedmem_t)) / PAGE_SIZE) * PAGE_SIZE) { + snd_printd( "%lu > %lu\n", size, (unsigned long)sizeof(us428ctls_sharedmem_t)); + return -EINVAL; + } + + if (!us428->us428ctls_sharedmem) { + init_waitqueue_head(&us428->us428ctls_wait_queue_head); + if(!(us428->us428ctls_sharedmem = snd_malloc_pages(sizeof(us428ctls_sharedmem_t), GFP_KERNEL))) + return -ENOMEM; + memset(us428->us428ctls_sharedmem, -1, sizeof(us428ctls_sharedmem_t)); + us428->us428ctls_sharedmem->CtlSnapShotLast = -2; + } + area->vm_ops = &us428ctls_vm_ops; + area->vm_flags |= VM_RESERVED; + area->vm_private_data = hw->private_data; + return 0; +} + +static unsigned int snd_us428ctls_poll(snd_hwdep_t *hw, struct file *file, poll_table *wait) +{ + unsigned int mask = 0; + usX2Ydev_t *us428 = (usX2Ydev_t*)hw->private_data; + static unsigned LastN; + + if (us428->chip_status & USX2Y_STAT_CHIP_HUP) + return POLLHUP; + + poll_wait(file, &us428->us428ctls_wait_queue_head, wait); + + down(&us428->open_mutex); + if (us428->us428ctls_sharedmem + && us428->us428ctls_sharedmem->CtlSnapShotLast != LastN) { + mask |= POLLIN; + LastN = us428->us428ctls_sharedmem->CtlSnapShotLast; + } + up(&us428->open_mutex); + + return mask; +} + + +static int snd_usX2Y_hwdep_open(snd_hwdep_t *hw, struct file *file) +{ + return 0; +} + +static int snd_usX2Y_hwdep_release(snd_hwdep_t *hw, struct file *file) +{ + return 0; +} + +static int snd_usX2Y_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) +{ + static char *type_ids[USX2Y_TYPE_NUMS] = { + [USX2Y_TYPE_122] = "us122", + [USX2Y_TYPE_224] = "us224", + [USX2Y_TYPE_428] = "us428", + }; + int id = -1; + + switch (((usX2Ydev_t*)hw->private_data)->chip.dev->descriptor.idProduct) { + case USB_ID_US122: + id = USX2Y_TYPE_122; + break; + case USB_ID_US224: + id = USX2Y_TYPE_224; + break; + case USB_ID_US428: + id = USX2Y_TYPE_428; + break; + } + if (0 > id) + return -ENODEV; + strcpy(info->id, type_ids[id]); + info->num_dsps = 2; // 0: Prepad Data, 1: FPGA Code + if (((usX2Ydev_t*)hw->private_data)->chip_status & USX2Y_STAT_CHIP_INIT) + info->chip_ready = 1; + info->version = USX2Y_DRIVER_VERSION; + return 0; +} + + +static int usX2Y_create_usbmidi(snd_card_t* card ) +{ + static snd_usb_midi_endpoint_info_t quirk_data_1 = { + .out_ep =0x06, + .in_ep = 0x06, + .out_cables = 0x001, + .in_cables = 0x001 + }; + static snd_usb_audio_quirk_t quirk_1 = { + .vendor_name = "TASCAM", + .product_name = NAME_ALLCAPS, + .ifnum = 0, + .type = QUIRK_MIDI_FIXED_ENDPOINT, + .data = &quirk_data_1 + }; + static snd_usb_midi_endpoint_info_t quirk_data_2 = { + .out_ep =0x06, + .in_ep = 0x06, + .out_cables = 0x003, + .in_cables = 0x003 + }; + static snd_usb_audio_quirk_t quirk_2 = { + .vendor_name = "TASCAM", + .product_name = "US428", + .ifnum = 0, + .type = QUIRK_MIDI_FIXED_ENDPOINT, + .data = &quirk_data_2 + }; + struct usb_device *dev = usX2Y(card)->chip.dev; + struct usb_interface *iface = usb_ifnum_to_if(dev, 0); + snd_usb_audio_quirk_t *quirk = dev->descriptor.idProduct == USB_ID_US428 ? &quirk_2 : &quirk_1; + + snd_printdd("usX2Y_create_usbmidi \n"); + return snd_usb_create_midi_interface(&usX2Y(card)->chip, iface, quirk); +} + +static int usX2Y_create_alsa_devices(snd_card_t* card) +{ + int err; + + do { + if ((err = usX2Y_create_usbmidi(card)) < 0) { + snd_printk("usX2Y_create_alsa_devices: usX2Y_create_usbmidi error %i \n", err); + break; + } + if ((err = usX2Y_audio_create(card)) < 0) + break; + if ((err = snd_card_register(card)) < 0) + break; + } while (0); + + return err; +} + +static int snd_usX2Y_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) +{ + usX2Ydev_t *priv = hw->private_data; + int lret, err = -EINVAL; + snd_printdd( "dsp_load %s\n", dsp->name); + + if (access_ok(VERIFY_READ, dsp->image, dsp->length)) { + struct usb_device* dev = priv->chip.dev; + char *buf = kmalloc(dsp->length, GFP_KERNEL); + if (!buf) + return -ENOMEM; + if (copy_from_user(buf, dsp->image, dsp->length)) { + kfree(buf); + return -EFAULT; + } + err = usb_set_interface(dev, 0, 1); + if (err) + snd_printk("usb_set_interface error \n"); + else + err = usb_bulk_msg(dev, usb_sndbulkpipe(dev, 2), buf, dsp->length, &lret, 6*HZ); + kfree(buf); + } + if (err) + return err; + if (dsp->index == 1) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ/4); // give the device some time + err = usX2Y_AsyncSeq04_init(priv); + if (err) { + snd_printk("usX2Y_AsyncSeq04_init error \n"); + return err; + } + err = usX2Y_In04_init(priv); + if (err) { + snd_printk("usX2Y_In04_init error \n"); + return err; + } + err = usX2Y_create_alsa_devices(hw->card); + if (err) { + snd_printk("usX2Y_create_alsa_devices error %i \n", err); + snd_card_free(hw->card); + return err; + } + priv->chip_status |= USX2Y_STAT_CHIP_INIT; + snd_printdd("%s: alsa all started\n", hw->name); + } + return err; +} + + +int usX2Y_hwdep_new(snd_card_t* card, struct usb_device* device) +{ + int err; + snd_hwdep_t *hw; + + if ((err = snd_hwdep_new(card, SND_USX2Y_LOADER_ID, 0, &hw)) < 0) + return err; + + hw->iface = SNDRV_HWDEP_IFACE_USX2Y; + hw->private_data = usX2Y(card); + hw->ops.open = snd_usX2Y_hwdep_open; + hw->ops.release = snd_usX2Y_hwdep_release; + hw->ops.dsp_status = snd_usX2Y_hwdep_dsp_status; + hw->ops.dsp_load = snd_usX2Y_hwdep_dsp_load; + hw->ops.mmap = snd_us428ctls_mmap; + hw->ops.poll = snd_us428ctls_poll; + hw->exclusive = 1; + sprintf(hw->name, "/proc/bus/usb/%03d/%03d", device->bus->busnum, device->devnum); + return 0; +} + diff -Nru a/sound/usb/usx2y/usX2Yhwdep.h b/sound/usb/usx2y/usX2Yhwdep.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usX2Yhwdep.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,6 @@ +#ifndef USX2YHWDEP_H +#define USX2YHWDEP_H + +int usX2Y_hwdep_new(snd_card_t* card, struct usb_device* device); + +#endif diff -Nru a/sound/usb/usx2y/usbus428ctldefs.h b/sound/usb/usx2y/usbus428ctldefs.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usbus428ctldefs.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,108 @@ +/* + * + * Copyright (c) 2003 by Karsten Wiese + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +enum E_In84{ + eFader0 = 0, + eFader1, + eFader2, + eFader3, + eFader4, + eFader5, + eFader6, + eFader7, + eFaderM, + eTransport, + eModifier = 10, + eFilterSelect, + eSelect, + eMute, + + eSwitch = 15, + eWheelGain, + eWheelFreq, + eWheelQ, + eWheelPan, + eWheel = 20 +}; + +#define T_RECORD 1 +#define T_PLAY 2 +#define T_STOP 4 +#define T_F_FWD 8 +#define T_REW 0x10 +#define T_SOLO 0x20 +#define T_REC 0x40 +#define T_NULL 0x80 + + +struct us428_ctls{ + unsigned char Fader[9]; + unsigned char Transport; + unsigned char Modifier; + unsigned char FilterSelect; + unsigned char Select; + unsigned char Mute; + unsigned char UNKNOWN; + unsigned char Switch; + unsigned char Wheel[5]; +}; + +typedef struct us428_ctls us428_ctls_t; + +typedef struct us428_setByte{ + unsigned char Offset, + Value; +}us428_setByte_t; + +enum { + eLT_Volume = 0, + eLT_Light +}; + +typedef struct usX2Y_volume { + unsigned char Channel, + LH, + LL, + RH, + RL; +} usX2Y_volume_t; + +struct us428_lights{ + us428_setByte_t Light[7]; +}; +typedef struct us428_lights us428_lights_t; + +typedef struct { + char type; + union { + usX2Y_volume_t vol; + us428_lights_t lights; + } val; +} us428_p4out_t; + +#define N_us428_ctl_BUFS 16 +#define N_us428_p4out_BUFS 16 +struct us428ctls_sharedmem{ + us428_ctls_t CtlSnapShot[N_us428_ctl_BUFS]; + int CtlSnapShotDiffersAt[N_us428_ctl_BUFS]; + int CtlSnapShotLast, CtlSnapShotRed; + us428_p4out_t p4out[N_us428_p4out_BUFS]; + int p4outLast, p4outSent; +}; +typedef struct us428ctls_sharedmem us428ctls_sharedmem_t; diff -Nru a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usbusx2y.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,434 @@ +/* + * usbus428.c - ALSA USB US-428 Driver + * +2004-07-13 Karsten Wiese + Version 0.7.1: + Don't sleep in START/STOP callbacks anymore. + us428 channels C/D not handled just for this version, sorry. + +2004-06-21 Karsten Wiese + Version 0.6.4: + Temporarely suspend midi input + to sanely call usb_set_interface() when setting format. + +2004-06-12 Karsten Wiese + Version 0.6.3: + Made it thus the following rule is enforced: + "All pcm substreams of one usX2Y have to operate at the same rate & format." + +2004-04-06 Karsten Wiese + Version 0.6.0: + Runs on 2.6.5 kernel without any "--with-debug=" things. + us224 reported running. + +2004-01-14 Karsten Wiese + Version 0.5.1: + Runs with 2.6.1 kernel. + +2003-12-30 Karsten Wiese + Version 0.4.1: + Fix 24Bit 4Channel capturing for the us428. + +2003-11-27 Karsten Wiese, Martin Langer + Version 0.4: + us122 support. + us224 could be tested by uncommenting the sections containing USB_ID_US224 + +2003-11-03 Karsten Wiese + Version 0.3: + 24Bit support. + "arecord -D hw:1 -c 2 -r 48000 -M -f S24_3LE|aplay -D hw:1 -c 2 -r 48000 -M -f S24_3LE" works. + +2003-08-22 Karsten Wiese + Version 0.0.8: + Removed EZUSB Firmware. First Stage Firmwaredownload is now done by tascam-firmware downloader. + See: + http://usb-midi-fw.sourceforge.net/tascam-firmware.tar.gz + +2003-06-18 Karsten Wiese + Version 0.0.5: + changed to compile with kernel 2.4.21 and alsa 0.9.4 + +2002-10-16 Karsten Wiese + Version 0.0.4: + compiles again with alsa-current. + USB_ISO_ASAP not used anymore (most of the time), instead + urb->start_frame is calculated here now, some calls inside usb-driver don't need to happen anymore. + + To get the best out of this: + Disable APM-support in the kernel as APM-BIOS calls (once each second) hard disable interrupt for many precious milliseconds. + This helped me much on my slowish PII 400 & PIII 500. + ACPI yet untested but might cause the same bad behaviour. + Use a kernel with lowlatency and preemptiv patches applied. + To autoload snd-usb-midi append a line + post-install snd-usb-us428 modprobe snd-usb-midi + to /etc/modules.conf. + + known problems: + sliders, knobs, lights not yet handled except MASTER Volume slider. + "pcm -c 2" doesn't work. "pcm -c 2 -m direct_interleaved" does. + KDE3: "Enable full duplex operation" deadlocks. + + +2002-08-31 Karsten Wiese + Version 0.0.3: audio also simplex; + simplifying: iso urbs only 1 packet, melted structs. + ASYNC_UNLINK not used anymore: no more crashes so far..... + for alsa 0.9 rc3. + +2002-08-09 Karsten Wiese + Version 0.0.2: midi works with snd-usb-midi, audio (only fullduplex now) with i.e. bristol. + The firmware has been sniffed from win2k us-428 driver 3.09. + + * Copyright (c) 2002 Karsten Wiese + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "usx2y.h" +#include "usbusx2y.h" +#include "usX2Yhwdep.h" + + + +MODULE_AUTHOR("Karsten Wiese "); +MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.7.2"); +MODULE_LICENSE("GPL"); +MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}"); + +static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */ +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 boot_devs; + +module_param_array(index, int, boot_devs, 0444); +MODULE_PARM_DESC(index, "Index value for "NAME_ALLCAPS"."); +module_param_array(id, charp, boot_devs, 0444); +MODULE_PARM_DESC(id, "ID string for "NAME_ALLCAPS"."); +module_param_array(enable, bool, boot_devs, 0444); +MODULE_PARM_DESC(enable, "Enable "NAME_ALLCAPS"."); + + +static int snd_usX2Y_card_used[SNDRV_CARDS]; + +static void usX2Y_usb_disconnect(struct usb_device* usb_device, void* ptr); +static void snd_usX2Y_card_private_free(snd_card_t *card); + +/* + * pipe 4 is used for switching the lamps, setting samplerate, volumes .... + */ +static void i_usX2Y_Out04Int(struct urb* urb, struct pt_regs *regs) +{ +#ifdef CONFIG_SND_DEBUG + if (urb->status) { + int i; + usX2Ydev_t* usX2Y = urb->context; + for (i = 0; i < 10 && usX2Y->AS04.urb[i] != urb; i++); + snd_printdd("i_usX2Y_Out04Int() urb %i status=%i\n", i, urb->status); + } +#endif +} + +static void i_usX2Y_In04Int(struct urb* urb, struct pt_regs *regs) +{ + int err = 0; + usX2Ydev_t *usX2Y = urb->context; + us428ctls_sharedmem_t *us428ctls = usX2Y->us428ctls_sharedmem; + + usX2Y->In04IntCalls++; + + if (urb->status) { + snd_printdd("Interrupt Pipe 4 came back with status=%i\n", urb->status); + return; + } + + // printk("%i:0x%02X ", 8, (int)((unsigned char*)usX2Y->In04Buf)[8]); Master volume shows 0 here if fader is at max during boot ?!? + if (us428ctls) { + int diff = -1; + if (-2 == us428ctls->CtlSnapShotLast) { + diff = 0; + memcpy(usX2Y->In04Last, usX2Y->In04Buf, sizeof(usX2Y->In04Last)); + us428ctls->CtlSnapShotLast = -1; + } else { + int i; + for (i = 0; i < 21; i++) { + if (usX2Y->In04Last[i] != ((char*)usX2Y->In04Buf)[i]) { + if (diff < 0) + diff = i; + usX2Y->In04Last[i] = ((char*)usX2Y->In04Buf)[i]; + } + } + } + if (0 <= diff) { + int n = us428ctls->CtlSnapShotLast + 1; + if (n >= N_us428_ctl_BUFS || n < 0) + n = 0; + memcpy(us428ctls->CtlSnapShot + n, usX2Y->In04Buf, sizeof(us428ctls->CtlSnapShot[0])); + us428ctls->CtlSnapShotDiffersAt[n] = diff; + us428ctls->CtlSnapShotLast = n; + wake_up(&usX2Y->us428ctls_wait_queue_head); + } + } + + + if (usX2Y->US04) { + if (0 == usX2Y->US04->submitted) + do + err = usb_submit_urb(usX2Y->US04->urb[usX2Y->US04->submitted++], GFP_ATOMIC); + while (!err && usX2Y->US04->submitted < usX2Y->US04->len); + } else + if (us428ctls && us428ctls->p4outLast >= 0 && us428ctls->p4outLast < N_us428_p4out_BUFS) { + if (us428ctls->p4outLast != us428ctls->p4outSent) { + int j, send = us428ctls->p4outSent + 1; + if (send >= N_us428_p4out_BUFS) + send = 0; + for (j = 0; j < URBS_AsyncSeq && !err; ++j) + if (0 == usX2Y->AS04.urb[j]->status) { + us428_p4out_t *p4out = us428ctls->p4out + send; // FIXME if more then 1 p4out is new, 1 gets lost. + usb_fill_bulk_urb(usX2Y->AS04.urb[j], usX2Y->chip.dev, + usb_sndbulkpipe(usX2Y->chip.dev, 0x04), &p4out->val.vol, + p4out->type == eLT_Light ? sizeof(us428_lights_t) : 5, + i_usX2Y_Out04Int, usX2Y); + err = usb_submit_urb(usX2Y->AS04.urb[j], GFP_ATOMIC); + us428ctls->p4outSent = send; + break; + } + } + } + + if (err) { + snd_printk("In04Int() usb_submit_urb err=%i\n", err); + } + + urb->dev = usX2Y->chip.dev; + usb_submit_urb(urb, GFP_ATOMIC); +} + +/* + * Prepare some urbs + */ +int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y) +{ + int err = 0, + i; + + if (NULL == (usX2Y->AS04.buffer = kmalloc(URB_DataLen_AsyncSeq*URBS_AsyncSeq, GFP_KERNEL))) { + err = -ENOMEM; + } else + for (i = 0; i < URBS_AsyncSeq; ++i) { + if (NULL == (usX2Y->AS04.urb[i] = usb_alloc_urb(0, GFP_KERNEL))) { + err = -ENOMEM; + break; + } + usb_fill_bulk_urb( usX2Y->AS04.urb[i], usX2Y->chip.dev, + usb_sndbulkpipe(usX2Y->chip.dev, 0x04), + usX2Y->AS04.buffer + URB_DataLen_AsyncSeq*i, 0, + i_usX2Y_Out04Int, usX2Y + ); + } + return err; +} + +int usX2Y_In04_init(usX2Ydev_t* usX2Y) +{ + int err = 0; + if (! (usX2Y->In04urb = usb_alloc_urb(0, GFP_KERNEL))) + return -ENOMEM; + + if (! (usX2Y->In04Buf = kmalloc(21, GFP_KERNEL))) { + usb_free_urb(usX2Y->In04urb); + return -ENOMEM; + } + + init_waitqueue_head(&usX2Y->In04WaitQueue); + usb_fill_int_urb(usX2Y->In04urb, usX2Y->chip.dev, usb_rcvintpipe(usX2Y->chip.dev, 0x4), + usX2Y->In04Buf, 21, + i_usX2Y_In04Int, usX2Y, + 10); + err = usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); + return err; +} + +static void usX2Y_unlinkSeq(snd_usX2Y_AsyncSeq_t* S) +{ + int i; + for (i = 0; i < URBS_AsyncSeq; ++i) { + if (S[i].urb) { + usb_unlink_urb(S->urb[i]); + usb_free_urb(S->urb[i]); + S->urb[i] = NULL; + } + } + if (S->buffer) + kfree(S->buffer); +} + + +static struct usb_device_id snd_usX2Y_usb_id_table[] = { + { + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x1604, + .idProduct = USB_ID_US428 + }, + { + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x1604, + .idProduct = USB_ID_US122 + }, + { + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = 0x1604, + .idProduct = USB_ID_US224 + }, + { /* terminator */ } +}; + +static snd_card_t* usX2Y_create_card(struct usb_device* device) +{ + int dev; + snd_card_t* card; + for (dev = 0; dev < SNDRV_CARDS; ++dev) + if (enable[dev] && !snd_usX2Y_card_used[dev]) + break; + if (dev >= SNDRV_CARDS) + return NULL; + card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(usX2Ydev_t)); + if (!card) + return NULL; + snd_usX2Y_card_used[usX2Y(card)->chip.index = dev] = 1; + card->private_free = snd_usX2Y_card_private_free; + usX2Y(card)->chip.dev = device; + usX2Y(card)->chip.card = card; + init_MUTEX (&usX2Y(card)->open_mutex); + INIT_LIST_HEAD(&usX2Y(card)->chip.midi_list); + strcpy(card->driver, "USB "NAME_ALLCAPS""); + sprintf(card->shortname, "TASCAM "NAME_ALLCAPS""); + sprintf(card->longname, "%s (%x:%x if %d at %03d/%03d)", + card->shortname, + device->descriptor.idVendor, device->descriptor.idProduct, + 0,//us428(card)->usbmidi.ifnum, + usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum + ); + snd_card_set_dev(card, &device->dev); + return card; +} + + +static void* usX2Y_usb_probe(struct usb_device* device, struct usb_interface *intf, const struct usb_device_id* device_id) +{ + int err; + snd_card_t* card; + if (device->descriptor.idVendor != 0x1604 || + (device->descriptor.idProduct != USB_ID_US122 && + device->descriptor.idProduct != USB_ID_US224 && + device->descriptor.idProduct != USB_ID_US428) || + !(card = usX2Y_create_card(device))) + return NULL; + if ((err = usX2Y_hwdep_new(card, device)) < 0 || + (err = snd_card_register(card)) < 0) { + snd_card_free(card); + return NULL; + } + return card; +} + +/* + * new 2.5 USB kernel API + */ +static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + void *chip; + chip = usX2Y_usb_probe(interface_to_usbdev(intf), intf, id); + if (chip) { + dev_set_drvdata(&intf->dev, chip); + return 0; + } else + return -EIO; +} + +static void snd_usX2Y_disconnect(struct usb_interface *intf) +{ + usX2Y_usb_disconnect(interface_to_usbdev(intf), + dev_get_drvdata(&intf->dev)); +} + +MODULE_DEVICE_TABLE(usb, snd_usX2Y_usb_id_table); +static struct usb_driver snd_usX2Y_usb_driver = { + .owner = THIS_MODULE, + .name = "snd-usb-usx2y", + .probe = snd_usX2Y_probe, + .disconnect = snd_usX2Y_disconnect, + .id_table = snd_usX2Y_usb_id_table, +}; + +static void snd_usX2Y_card_private_free(snd_card_t *card) +{ + if (usX2Y(card)->In04Buf) + kfree(usX2Y(card)->In04Buf); + usb_free_urb(usX2Y(card)->In04urb); + if (usX2Y(card)->us428ctls_sharedmem) + snd_free_pages(usX2Y(card)->us428ctls_sharedmem, sizeof(*usX2Y(card)->us428ctls_sharedmem)); + if (usX2Y(card)->chip.index >= 0 && usX2Y(card)->chip.index < SNDRV_CARDS) + snd_usX2Y_card_used[usX2Y(card)->chip.index] = 0; +} + +/* + * Frees the device. + */ +static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr) +{ + if (ptr) { + usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr); + struct list_head* p; + if (usX2Y->chip_status == USX2Y_STAT_CHIP_HUP) // on 2.6.1 kernel snd_usbmidi_disconnect() + return; // calls us back. better leave :-) . + usX2Y->chip.shutdown = 1; + usX2Y->chip_status = USX2Y_STAT_CHIP_HUP; + usX2Y_unlinkSeq(&usX2Y->AS04); + usb_unlink_urb(usX2Y->In04urb); + snd_card_disconnect((snd_card_t*)ptr); + /* release the midi resources */ + list_for_each(p, &usX2Y->chip.midi_list) { + snd_usbmidi_disconnect(p, &snd_usX2Y_usb_driver); + } + if (usX2Y->us428ctls_sharedmem) + wake_up(&usX2Y->us428ctls_wait_queue_head); + snd_card_free_in_thread((snd_card_t*)ptr); + } +} + +static int __init snd_usX2Y_module_init(void) +{ + return usb_register(&snd_usX2Y_usb_driver); +} + +static void __exit snd_usX2Y_module_exit(void) +{ + usb_deregister(&snd_usX2Y_usb_driver); +} + +module_init(snd_usX2Y_module_init) +module_exit(snd_usX2Y_module_exit) diff -Nru a/sound/usb/usx2y/usbusx2y.h b/sound/usb/usx2y/usbusx2y.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usbusx2y.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,61 @@ +#ifndef USBUSX2Y_H +#define USBUSX2Y_H +#include "../usbaudio.h" +#include "usbus428ctldefs.h" + +#define NRURBS 2 /* */ +#define NRPACKS 1 /* FIXME: Currently only 1 works. + usb-frames/ms per urb: 1 and 2 are supported. + setting to 2 will PERHAPS make it easier for slow machines. + Jitter will be higher though. + On my PIII 500Mhz Laptop setting to 1 is the only way to go + for PLAYING synths. i.e. Jack & Aeolus sound quit nicely + at 4 periods 64 frames. + */ + +#define URBS_AsyncSeq 10 +#define URB_DataLen_AsyncSeq 32 +typedef struct { + struct urb* urb[URBS_AsyncSeq]; + char* buffer; +} snd_usX2Y_AsyncSeq_t; + +typedef struct { + int submitted; + int len; + struct urb* urb[0]; +} snd_usX2Y_urbSeq_t; + +typedef struct snd_usX2Y_substream snd_usX2Y_substream_t; + +typedef struct { + snd_usb_audio_t chip; + int stride; + struct urb *In04urb; + void *In04Buf; + char In04Last[24]; + unsigned In04IntCalls; + snd_usX2Y_urbSeq_t *US04; + wait_queue_head_t In04WaitQueue; + snd_usX2Y_AsyncSeq_t AS04; + unsigned int rate, + format; + int refframes; + int chip_status; + struct semaphore open_mutex; + us428ctls_sharedmem_t *us428ctls_sharedmem; + wait_queue_head_t us428ctls_wait_queue_head; + snd_usX2Y_substream_t *substream[4]; +} usX2Ydev_t; + + +#define usX2Y(c) ((usX2Ydev_t*)(c)->private_data) + +int usX2Y_audio_create(snd_card_t* card); + +int usX2Y_AsyncSeq04_init(usX2Ydev_t* usX2Y); +int usX2Y_In04_init(usX2Ydev_t* usX2Y); + +#define NAME_ALLCAPS "US-X2Y" + +#endif diff -Nru a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usbusx2yaudio.c 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,1027 @@ +/* + * US-428 AUDIO + + * Copyright (c) 2002-2003 by Karsten Wiese + + * based on + + * (Tentative) USB Audio Driver for ALSA + * + * Main and PCM part + * + * Copyright (c) 2002 by Takashi Iwai + * + * Many codes borrowed from audio.c by + * Alan Cox (alan@lxorguk.ukuu.org.uk) + * Thomas Sailer (sailer@ife.ee.ethz.ch) + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include +#include +#include +#include +#include +#include +#include +#include "usx2y.h" +#include "usbusx2y.h" + + +struct snd_usX2Y_substream { + usX2Ydev_t *usX2Y; + snd_pcm_substream_t *pcm_substream; + + unsigned char endpoint; + unsigned int datapipe; /* the data i/o pipe */ + unsigned int maxpacksize; /* max packet size in bytes */ + + char prepared, + running, + stalled; + + int hwptr; /* free frame position in the buffer (only for playback) */ + int hwptr_done; /* processed frame position in the buffer */ + int transfer_done; /* processed frames since last period update */ + + struct urb *urb[NRURBS]; /* data urb table */ + int next_urb_complete; + struct urb *completed_urb; + char *tmpbuf; /* temporary buffer for playback */ + volatile int submitted_urbs; + wait_queue_head_t wait_queue; +}; + + + + + + +static int usX2Y_urb_capt_retire(snd_usX2Y_substream_t *subs) +{ + struct urb *urb = subs->completed_urb; + snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime; + unsigned char *cp; + int i, len, lens = 0, hwptr_done = subs->hwptr_done; + usX2Ydev_t *usX2Y = subs->usX2Y; + + for (i = 0; i < NRPACKS; i++) { + cp = (unsigned char*)urb->transfer_buffer + urb->iso_frame_desc[i].offset; + if (urb->iso_frame_desc[i].status) { /* active? hmm, skip this */ + snd_printdd("activ frame status %i\n", urb->iso_frame_desc[i].status); + return urb->iso_frame_desc[i].status; + } + len = urb->iso_frame_desc[i].actual_length / usX2Y->stride; + if (! len) { + snd_printk("0 == len ERROR!\n"); + continue; + } + + /* copy a data chunk */ + if ((hwptr_done + len) > runtime->buffer_size) { + int cnt = runtime->buffer_size - hwptr_done; + int blen = cnt * usX2Y->stride; + memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, blen); + memcpy(runtime->dma_area, cp + blen, len * usX2Y->stride - blen); + } else { + memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, len * usX2Y->stride); + } + lens += len; + if ((hwptr_done += len) >= runtime->buffer_size) + hwptr_done -= runtime->buffer_size; + } + + subs->hwptr_done = hwptr_done; + subs->transfer_done += lens; + /* update the pointer, call callback if necessary */ + if (subs->transfer_done >= runtime->period_size) { + subs->transfer_done -= runtime->period_size; + snd_pcm_period_elapsed(subs->pcm_substream); + } + return 0; +} +/* + * prepare urb for playback data pipe + * + * we copy the data directly from the pcm buffer. + * the current position to be copied is held in hwptr field. + * since a urb can handle only a single linear buffer, if the total + * transferred area overflows the buffer boundary, we cannot send + * it directly from the buffer. thus the data is once copied to + * a temporary buffer and urb points to that. + */ +static int usX2Y_urb_play_prepare(snd_usX2Y_substream_t *subs, + struct urb *cap_urb, + struct urb *urb) +{ + int count, counts, pack; + usX2Ydev_t* usX2Y = subs->usX2Y; + snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime; + + count = 0; + for (pack = 0; pack < NRPACKS; pack++) { + /* calculate the size of a packet */ + counts = cap_urb->iso_frame_desc[pack].actual_length / usX2Y->stride; + count += counts; + if (counts < 43 || counts > 50) { + snd_printk("should not be here with counts=%i\n", counts); + return -EPIPE; + } + + /* set up descriptor */ + urb->iso_frame_desc[pack].offset = pack ? urb->iso_frame_desc[pack - 1].offset + urb->iso_frame_desc[pack - 1].length : 0; + urb->iso_frame_desc[pack].length = counts * usX2Y->stride; + } + if (subs->hwptr + count > runtime->buffer_size) { + /* err, the transferred area goes over buffer boundary. + * copy the data to the temp buffer. + */ + int len; + len = runtime->buffer_size - subs->hwptr; + urb->transfer_buffer = subs->tmpbuf; + memcpy(subs->tmpbuf, runtime->dma_area + subs->hwptr * usX2Y->stride, len * usX2Y->stride); + memcpy(subs->tmpbuf + len * usX2Y->stride, runtime->dma_area, (count - len) * usX2Y->stride); + subs->hwptr += count; + subs->hwptr -= runtime->buffer_size; + } else { + /* set the buffer pointer */ + urb->transfer_buffer = runtime->dma_area + subs->hwptr * usX2Y->stride; + if ((subs->hwptr += count) >= runtime->buffer_size) + subs->hwptr -= runtime->buffer_size; + } + urb->transfer_buffer_length = count * usX2Y->stride; + return 0; +} + +/* + * process after playback data complete + * + * update the current position and call callback if a period is processed. + */ +inline static int usX2Y_urb_play_retire(snd_usX2Y_substream_t *subs, struct urb *urb) +{ + snd_pcm_runtime_t *runtime = subs->pcm_substream->runtime; + int len = (urb->iso_frame_desc[0].actual_length +#if NRPACKS > 1 + + urb->iso_frame_desc[1].actual_length +#endif + ) / subs->usX2Y->stride; + + subs->transfer_done += len; + subs->hwptr_done += len; + if (subs->hwptr_done >= runtime->buffer_size) + subs->hwptr_done -= runtime->buffer_size; + if (subs->transfer_done >= runtime->period_size) { + subs->transfer_done -= runtime->period_size; + snd_pcm_period_elapsed(subs->pcm_substream); + } + return 0; +} + +inline static int usX2Y_urb_submit(snd_usX2Y_substream_t *subs, struct urb *urb, int frame) +{ + int err; + if (!urb) + return -ENODEV; + urb->start_frame = (frame + NRURBS*NRPACKS) & (1024 - 1); + urb->hcpriv = NULL; + urb->dev = subs->usX2Y->chip.dev; /* we need to set this at each time */ + if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { + snd_printk("%i\n", err); + return err; + } else { + subs->submitted_urbs++; + if (subs->next_urb_complete < 0) + subs->next_urb_complete = 0; + } + return 0; +} + + +static inline int frame_distance(int from, int to) +{ + int distance = to - from; + if (distance < -512) + distance += 1024; + else + if (distance > 511) + distance -= 1024; + return distance; +} + + +static void usX2Y_subs_set_next_urb_complete(snd_usX2Y_substream_t *subs) +{ + int next_urb_complete = subs->next_urb_complete + 1; + int distance; + if (next_urb_complete >= NRURBS) + next_urb_complete = 0; + distance = frame_distance(subs->completed_urb->start_frame, + subs->urb[next_urb_complete]->start_frame); + if (1 == distance) { + subs->next_urb_complete = next_urb_complete; + } else { + snd_printdd("distance %i not set_nuc %i %i %i \n", distance, subs->endpoint, next_urb_complete, subs->urb[next_urb_complete]->status); + subs->next_urb_complete = -1; + } +} + + +static inline void usX2Y_usbframe_complete(snd_usX2Y_substream_t *capsubs, snd_usX2Y_substream_t *playbacksubs, int frame) +{ + { + struct urb *urb; + if ((urb = playbacksubs->completed_urb)) { + if (playbacksubs->prepared) + usX2Y_urb_play_retire(playbacksubs, urb); + usX2Y_subs_set_next_urb_complete(playbacksubs); + } + if (playbacksubs->running) { + if (NULL == urb) + urb = playbacksubs->urb[playbacksubs->next_urb_complete + 1]; + if (urb && 0 == usX2Y_urb_play_prepare(playbacksubs, + capsubs->completed_urb, + urb)) { + if (usX2Y_urb_submit(playbacksubs, urb, frame) < 0) + return; + } else + snd_pcm_stop(playbacksubs->pcm_substream, SNDRV_PCM_STATE_XRUN); + } + playbacksubs->completed_urb = NULL; + } + if (capsubs->running) + usX2Y_urb_capt_retire(capsubs); + usX2Y_subs_set_next_urb_complete(capsubs); + if (capsubs->prepared) + usX2Y_urb_submit(capsubs, capsubs->completed_urb, frame); + capsubs->completed_urb = NULL; +} + + +static void usX2Y_clients_stop(snd_usX2Y_substream_t *subs) +{ + usX2Ydev_t *usX2Y = subs->usX2Y; + int i; + for (i = 0; i < 4; i++) { + snd_usX2Y_substream_t *substream = usX2Y->substream[i]; + if (substream && substream->running) + snd_pcm_stop(substream->pcm_substream, SNDRV_PCM_STATE_XRUN); + } +} + + +static void i_usX2Y_urb_complete(struct urb *urb, struct pt_regs *regs) +{ + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t*)urb->context; + + subs->submitted_urbs--; + if (urb->status) { + snd_printk("ep=%i stalled with status=%i\n", subs->endpoint, urb->status); + subs->stalled = 1; + usX2Y_clients_stop(subs); + urb->status = 0; + return; + } + if (urb == subs->urb[subs->next_urb_complete]) { + subs->completed_urb = urb; + } else { + snd_printk("Sequence Error!(ep=%i;nuc=%i,frame=%i)\n", + subs->endpoint, subs->next_urb_complete, urb->start_frame); + subs->stalled = 1; + usX2Y_clients_stop(subs); + return; + } + if (waitqueue_active(&subs->wait_queue)) + wake_up(&subs->wait_queue); + { + snd_usX2Y_substream_t *capsubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE], + *playbacksubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK]; + if (capsubs->completed_urb && + (playbacksubs->completed_urb || + !playbacksubs->prepared || + (playbacksubs->prepared && (playbacksubs->next_urb_complete < 0 || // not started yet + frame_distance(capsubs->completed_urb->start_frame, + playbacksubs->urb[playbacksubs->next_urb_complete]->start_frame) + > 0 || // other expected later + playbacksubs->stalled)))) + usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame); + } +} + + +static int usX2Y_urbs_capt_start(snd_usX2Y_substream_t *subs) +{ + int i, err; + + for (i = 0; i < NRURBS; i++) { + unsigned long pack; + struct urb *urb = subs->urb[i]; + urb->dev = subs->usX2Y->chip.dev; + urb->transfer_flags = URB_ISO_ASAP; + for (pack = 0; pack < NRPACKS; pack++) { + urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack; + urb->iso_frame_desc[pack].length = subs->maxpacksize; + } + urb->transfer_buffer_length = subs->maxpacksize * NRPACKS; + if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { + snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err); + return -EPIPE; + } else { + subs->submitted_urbs++; + } + urb->transfer_flags = 0; + } + subs->stalled = 0; + subs->next_urb_complete = 0; + subs->prepared = 1; + return 0; +} + +/* + * wait until all urbs are processed. + */ +static int usX2Y_urbs_wait_clear(snd_usX2Y_substream_t *subs) +{ + int timeout = HZ; + + do { + if (0 == subs->submitted_urbs) + break; + set_current_state(TASK_UNINTERRUPTIBLE); + snd_printdd("snd_usX2Y_urbs_wait_clear waiting\n"); + schedule_timeout(1); + } while (--timeout > 0); + if (subs->submitted_urbs) + snd_printk(KERN_ERR "timeout: still %d active urbs..\n", subs->submitted_urbs); + return 0; +} +/* + * return the current pcm pointer. just return the hwptr_done value. + */ +static snd_pcm_uframes_t snd_usX2Y_pcm_pointer(snd_pcm_substream_t *substream) +{ + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data; + return subs->hwptr_done; +} +/* + * start/stop substream + */ +static int snd_usX2Y_pcm_trigger(snd_pcm_substream_t *substream, int cmd) +{ + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)substream->runtime->private_data; + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + snd_printdd("snd_usX2Y_pcm_trigger(START)\n"); + if (subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE]->stalled) + return -EPIPE; + else + subs->running = 1; + break; + case SNDRV_PCM_TRIGGER_STOP: + snd_printdd("snd_usX2Y_pcm_trigger(STOP)\n"); + subs->running = 0; + break; + default: + return -EINVAL; + } + return 0; +} + + + +static void usX2Y_urb_release(struct urb** urb, int free_tb) +{ + if (*urb) { + if (free_tb) + kfree((*urb)->transfer_buffer); + usb_free_urb(*urb); + *urb = NULL; + } +} +/* + * release a substream + */ +static void usX2Y_urbs_release(snd_usX2Y_substream_t *subs) +{ + int i; + snd_printdd("snd_usX2Y_urbs_release() %i\n", subs->endpoint); + usX2Y_urbs_wait_clear(subs); + for (i = 0; i < NRURBS; i++) + usX2Y_urb_release(subs->urb + i, subs != subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK]); + + if (subs->tmpbuf) { + kfree(subs->tmpbuf); + subs->tmpbuf = NULL; + } +} + +static void usX2Y_substream_prepare(snd_usX2Y_substream_t *subs) +{ + snd_printdd("usX2Y_substream_prepare() ep=%i urb0=%p urb1=%p\n", subs->endpoint, subs->urb[0], subs->urb[1]); + /* reset the pointer */ + subs->hwptr = 0; + subs->hwptr_done = 0; + subs->transfer_done = 0; +} + + +/* + * initialize a substream's urbs + */ +static int usX2Y_urbs_allocate(snd_usX2Y_substream_t *subs) +{ + int i; + int is_playback = subs == subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK]; + struct usb_device *dev = subs->usX2Y->chip.dev; + + snd_assert(!subs->prepared, return 0); + + if (is_playback) { /* allocate a temporary buffer for playback */ + subs->datapipe = usb_sndisocpipe(dev, subs->endpoint); + subs->maxpacksize = dev->epmaxpacketout[subs->endpoint]; + if (NULL == subs->tmpbuf) { + subs->tmpbuf = kcalloc(NRPACKS, subs->maxpacksize, GFP_KERNEL); + if (NULL == subs->tmpbuf) { + snd_printk(KERN_ERR "cannot malloc tmpbuf\n"); + return -ENOMEM; + } + } + } else { + subs->datapipe = usb_rcvisocpipe(dev, subs->endpoint); + subs->maxpacksize = dev->epmaxpacketin[subs->endpoint]; + } + + /* allocate and initialize data urbs */ + for (i = 0; i < NRURBS; i++) { + struct urb** purb = subs->urb + i; + if (*purb) + continue; + *purb = usb_alloc_urb(NRPACKS, GFP_KERNEL); + if (NULL == *purb) { + usX2Y_urbs_release(subs); + return -ENOMEM; + } + if (!is_playback && !(*purb)->transfer_buffer) { + /* allocate a capture buffer per urb */ + (*purb)->transfer_buffer = kmalloc(subs->maxpacksize*NRPACKS, GFP_KERNEL); + if (NULL == (*purb)->transfer_buffer) { + usX2Y_urbs_release(subs); + return -ENOMEM; + } + } + (*purb)->dev = dev; + (*purb)->pipe = subs->datapipe; + (*purb)->number_of_packets = NRPACKS; + (*purb)->context = subs; + (*purb)->interval = 1; + (*purb)->complete = snd_usb_complete_callback(i_usX2Y_urb_complete); + } + return 0; +} + +static void i_usX2Y_04Int(struct urb* urb, struct pt_regs *regs) +{ + usX2Ydev_t* usX2Y = urb->context; + + if (urb->status) { + snd_printk("snd_usX2Y_04Int() urb->status=%i\n", urb->status); + return; + } + if (0 == --usX2Y->US04->len) + wake_up(&usX2Y->In04WaitQueue); +} +/* + * allocate a buffer, setup samplerate + * + * so far we use a physically linear buffer although packetize transfer + * doesn't need a continuous area. + * if sg buffer is supported on the later version of alsa, we'll follow + * that. + */ +static struct s_c2 +{ + char c1, c2; +} + SetRate44100[] = +{ + { 0x14, 0x08}, // this line sets 44100, well actually a little less + { 0x18, 0x40}, // only tascam / frontier design knows the further lines ....... + { 0x18, 0x42}, + { 0x18, 0x45}, + { 0x18, 0x46}, + { 0x18, 0x48}, + { 0x18, 0x4A}, + { 0x18, 0x4C}, + { 0x18, 0x4E}, + { 0x18, 0x50}, + { 0x18, 0x52}, + { 0x18, 0x54}, + { 0x18, 0x56}, + { 0x18, 0x58}, + { 0x18, 0x5A}, + { 0x18, 0x5C}, + { 0x18, 0x5E}, + { 0x18, 0x60}, + { 0x18, 0x62}, + { 0x18, 0x64}, + { 0x18, 0x66}, + { 0x18, 0x68}, + { 0x18, 0x6A}, + { 0x18, 0x6C}, + { 0x18, 0x6E}, + { 0x18, 0x70}, + { 0x18, 0x72}, + { 0x18, 0x74}, + { 0x18, 0x76}, + { 0x18, 0x78}, + { 0x18, 0x7A}, + { 0x18, 0x7C}, + { 0x18, 0x7E} +}; +static struct s_c2 SetRate48000[] = +{ + { 0x14, 0x09}, // this line sets 48000, well actually a little less + { 0x18, 0x40}, // only tascam / frontier design knows the further lines ....... + { 0x18, 0x42}, + { 0x18, 0x45}, + { 0x18, 0x46}, + { 0x18, 0x48}, + { 0x18, 0x4A}, + { 0x18, 0x4C}, + { 0x18, 0x4E}, + { 0x18, 0x50}, + { 0x18, 0x52}, + { 0x18, 0x54}, + { 0x18, 0x56}, + { 0x18, 0x58}, + { 0x18, 0x5A}, + { 0x18, 0x5C}, + { 0x18, 0x5E}, + { 0x18, 0x60}, + { 0x18, 0x62}, + { 0x18, 0x64}, + { 0x18, 0x66}, + { 0x18, 0x68}, + { 0x18, 0x6A}, + { 0x18, 0x6C}, + { 0x18, 0x6E}, + { 0x18, 0x70}, + { 0x18, 0x73}, + { 0x18, 0x74}, + { 0x18, 0x76}, + { 0x18, 0x78}, + { 0x18, 0x7A}, + { 0x18, 0x7C}, + { 0x18, 0x7E} +}; +#define NOOF_SETRATE_URBS ARRAY_SIZE(SetRate48000) + +static int usX2Y_rate_set(usX2Ydev_t *usX2Y, int rate) +{ + int err = 0, i; + snd_usX2Y_urbSeq_t *us = NULL; + int *usbdata = NULL; + DECLARE_WAITQUEUE(wait, current); + struct s_c2 *ra = rate == 48000 ? SetRate48000 : SetRate44100; + + if (usX2Y->rate != rate) { + do { + us = kmalloc(sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS, GFP_KERNEL); + if (NULL == us) { + err = -ENOMEM; + break; + } + memset(us, 0, sizeof(*us) + sizeof(struct urb*) * NOOF_SETRATE_URBS); + usbdata = kmalloc(sizeof(int)*NOOF_SETRATE_URBS, GFP_KERNEL); + if (NULL == usbdata) { + err = -ENOMEM; + break; + } + for (i = 0; i < NOOF_SETRATE_URBS; ++i) { + if (NULL == (us->urb[i] = usb_alloc_urb(0, GFP_KERNEL))) { + err = -ENOMEM; + break; + } + ((char*)(usbdata + i))[0] = ra[i].c1; + ((char*)(usbdata + i))[1] = ra[i].c2; + usb_fill_bulk_urb(us->urb[i], usX2Y->chip.dev, usb_sndbulkpipe(usX2Y->chip.dev, 4), + usbdata + i, 2, i_usX2Y_04Int, usX2Y); +#ifdef OLD_USB + us->urb[i]->transfer_flags = USB_QUEUE_BULK; +#endif + } + if (err) + break; + + add_wait_queue(&usX2Y->In04WaitQueue, &wait); + set_current_state(TASK_INTERRUPTIBLE); + us->submitted = 0; + us->len = NOOF_SETRATE_URBS; + usX2Y->US04 = us; + + do { + signed long timeout = schedule_timeout(HZ/2); + + if (signal_pending(current)) { + err = -ERESTARTSYS; + break; + } + if (0 == timeout) { + err = -ENODEV; + break; + } + usX2Y->rate = rate; + usX2Y->refframes = rate == 48000 ? 47 : 44; + } while (0); + + remove_wait_queue(&usX2Y->In04WaitQueue, &wait); + } while (0); + + if (us) { + us->submitted = 2*NOOF_SETRATE_URBS; + for (i = 0; i < NOOF_SETRATE_URBS; ++i) { + usb_unlink_urb(us->urb[i]); + usb_free_urb(us->urb[i]); + } + usX2Y->US04 = NULL; + kfree(usbdata); + kfree(us); + } + } + + return err; +} + + +static int usX2Y_format_set(usX2Ydev_t *usX2Y, snd_pcm_format_t format) +{ + int alternate, unlink_err, err; + struct list_head* p; + if (format == SNDRV_PCM_FORMAT_S24_3LE) { + alternate = 2; + usX2Y->stride = 6; + } else { + alternate = 1; + usX2Y->stride = 4; + } + list_for_each(p, &usX2Y->chip.midi_list) { + snd_usbmidi_input_stop(p); + } + unlink_err = usb_unlink_urb(usX2Y->In04urb); + if ((err = usb_set_interface(usX2Y->chip.dev, 0, alternate))) { + snd_printk("usb_set_interface error \n"); + return err; + } + if (0 == unlink_err) { + usX2Y->In04urb->dev = usX2Y->chip.dev; + err = usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); + } + list_for_each(p, &usX2Y->chip.midi_list) { + snd_usbmidi_input_start(p); + } + usX2Y->format = format; + usX2Y->rate = 0; + return err; +} + + +static int snd_usX2Y_pcm_hw_params(snd_pcm_substream_t *substream, + snd_pcm_hw_params_t *hw_params) +{ + int err = 0; + unsigned int rate = params_rate(hw_params); + snd_pcm_format_t format = params_format(hw_params); + snd_printdd("snd_usX2Y_hw_params(%p, %p)\n", substream, hw_params); + + { // all pcm substreams off one usX2Y have to operate at the same rate & format + snd_card_t *card = substream->pstr->pcm->card; + struct list_head *list; + list_for_each(list, &card->devices) { + snd_device_t *dev; + snd_pcm_t *pcm; + int s; + dev = snd_device(list); + if (dev->type != SNDRV_DEV_PCM) + continue; + pcm = dev->device_data; + for (s = 0; s < 2; ++s) { + snd_pcm_substream_t *test_substream; + test_substream = pcm->streams[s].substream; + if (test_substream && test_substream != substream && + test_substream->runtime && + ((test_substream->runtime->format && + test_substream->runtime->format != format) || + (test_substream->runtime->rate && + test_substream->runtime->rate != rate))) + return -EINVAL; + } + } + } + if (0 > (err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)))) { + snd_printk("snd_pcm_lib_malloc_pages(%p, %i) returned %i\n", substream, params_buffer_bytes(hw_params), err); + return err; + } + return 0; +} + +/* + * free the buffer + */ +static int snd_usX2Y_pcm_hw_free(snd_pcm_substream_t *substream) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data; + snd_printdd("snd_usX2Y_hw_free(%p)\n", substream); + + if (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) { + snd_usX2Y_substream_t *cap_subs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE]; + subs->prepared = 0; + usX2Y_urbs_release(subs); + if (!cap_subs->pcm_substream || + !cap_subs->pcm_substream->runtime || + !cap_subs->pcm_substream->runtime->status || + cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) { + cap_subs->prepared = 0; + usX2Y_urbs_release(cap_subs); + } + } else { + snd_usX2Y_substream_t *playback_subs = subs->usX2Y->substream[SNDRV_PCM_STREAM_PLAYBACK]; + if (!playback_subs->prepared) { + subs->prepared = 0; + usX2Y_urbs_release(subs); + } + } + + return snd_pcm_lib_free_pages(substream); +} +/* + * prepare callback + * + * set format and initialize urbs + */ +static int snd_usX2Y_pcm_prepare(snd_pcm_substream_t *substream) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data; + snd_usX2Y_substream_t *capsubs = subs->usX2Y->substream[SNDRV_PCM_STREAM_CAPTURE]; + int err = 0; + snd_printdd("snd_usX2Y_pcm_prepare(%p)\n", substream); + +// Start hardware streams +// SyncStream first.... + if (! capsubs->prepared) { + if (subs->usX2Y->format != runtime->format) + if ((err = usX2Y_format_set(subs->usX2Y, runtime->format)) < 0) + return err; + if (subs->usX2Y->rate != runtime->rate) + if ((err = usX2Y_rate_set(subs->usX2Y, runtime->rate)) < 0) + return err; + snd_printdd("starting capture pipe for playpipe\n"); + usX2Y_urbs_allocate(capsubs); + capsubs->completed_urb = NULL; + { + DECLARE_WAITQUEUE(wait, current); + add_wait_queue(&capsubs->wait_queue, &wait); + if (0 <= (err = usX2Y_urbs_capt_start(capsubs))) { + signed long timeout; + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(HZ/4); + if (signal_pending(current)) + err = -ERESTARTSYS; + else { + snd_printdd("%li\n", HZ/4 - timeout); + if (0 == timeout) + err = -EPIPE; + } + } + remove_wait_queue(&capsubs->wait_queue, &wait); + if (0 > err) + return err; + } + } + + if (subs != capsubs) { + int u; + if (!subs->prepared) { + if ((err = usX2Y_urbs_allocate(subs)) < 0) + return err; + subs->prepared = 1; + } + while (subs->submitted_urbs) + for (u = 0; u < NRURBS; u++) { + snd_printdd("%i\n", subs->urb[u]->status); + while(subs->urb[u]->status || NULL != subs->urb[u]->hcpriv) { + signed long timeout; + snd_printdd("ep=%i waiting for urb=%p status=%i hcpriv=%p\n", + subs->endpoint, subs->urb[u], + subs->urb[u]->status, subs->urb[u]->hcpriv); + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(HZ/10); + if (signal_pending(current)) { + return -ERESTARTSYS; + } + } + } + subs->completed_urb = NULL; + subs->next_urb_complete = -1; + subs->stalled = 0; + } + + usX2Y_substream_prepare(subs); + return err; +} + +static snd_pcm_hardware_t snd_usX2Y_2c = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, + .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, + .rate_min = 44100, + .rate_max = 48000, + .channels_min = 2, + .channels_max = 2, + .buffer_bytes_max = (2*128*1024), + .period_bytes_min = 64, + .period_bytes_max = (128*1024), + .periods_min = 2, + .periods_max = 1024, + .fifo_size = 0 +}; + + + +static int snd_usX2Y_pcm_open(snd_pcm_substream_t *substream) +{ + snd_usX2Y_substream_t *subs = ((snd_usX2Y_substream_t **) + snd_pcm_substream_chip(substream))[substream->stream]; + snd_pcm_runtime_t *runtime = substream->runtime; + + runtime->hw = snd_usX2Y_2c; + runtime->private_data = subs; + subs->pcm_substream = substream; + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 1000, 200000); + return 0; +} + + + +static int snd_usX2Y_pcm_close(snd_pcm_substream_t *substream) +{ + snd_pcm_runtime_t *runtime = substream->runtime; + snd_usX2Y_substream_t *subs = (snd_usX2Y_substream_t *)runtime->private_data; + int err = 0; + + subs->pcm_substream = NULL; + + return err; +} + + +static snd_pcm_ops_t snd_usX2Y_pcm_ops = +{ + .open = snd_usX2Y_pcm_open, + .close = snd_usX2Y_pcm_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_usX2Y_pcm_hw_params, + .hw_free = snd_usX2Y_pcm_hw_free, + .prepare = snd_usX2Y_pcm_prepare, + .trigger = snd_usX2Y_pcm_trigger, + .pointer = snd_usX2Y_pcm_pointer, +}; + + +/* + * free a usb stream instance + */ +static void usX2Y_audio_stream_free(snd_usX2Y_substream_t **usX2Y_substream) +{ + if (NULL != usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]) { + kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]); + usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL; + } + kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]); + usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL; +} + +static void snd_usX2Y_pcm_private_free(snd_pcm_t *pcm) +{ + snd_usX2Y_substream_t **usX2Y_stream = pcm->private_data; + if (usX2Y_stream) { + snd_pcm_lib_preallocate_free_for_all(pcm); + usX2Y_audio_stream_free(usX2Y_stream); + } +} + +static int usX2Y_audio_stream_new(snd_card_t *card, int playback_endpoint, int capture_endpoint) +{ + snd_pcm_t *pcm; + int err, i; + snd_usX2Y_substream_t **usX2Y_substream = + usX2Y(card)->substream + 2 * usX2Y(card)->chip.pcm_devs; + + for (i = playback_endpoint ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; + i <= SNDRV_PCM_STREAM_CAPTURE; ++i) { + usX2Y_substream[i] = kcalloc(1, sizeof(snd_usX2Y_substream_t), GFP_KERNEL); + if (NULL == usX2Y_substream[i]) { + snd_printk(KERN_ERR "cannot malloc\n"); + return -ENOMEM; + } + init_waitqueue_head(&usX2Y_substream[i]->wait_queue); + usX2Y_substream[i]->usX2Y = usX2Y(card); + } + + if (playback_endpoint) + usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]->endpoint = playback_endpoint; + usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]->endpoint = capture_endpoint; + + err = snd_pcm_new(card, NAME_ALLCAPS" Audio", usX2Y(card)->chip.pcm_devs, + playback_endpoint ? 1 : 0, 1, + &pcm); + if (err < 0) { + usX2Y_audio_stream_free(usX2Y_substream); + return err; + } + + if (playback_endpoint) + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_usX2Y_pcm_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_usX2Y_pcm_ops); + + pcm->private_data = usX2Y_substream; + pcm->private_free = snd_usX2Y_pcm_private_free; + pcm->info_flags = 0; + + sprintf(pcm->name, NAME_ALLCAPS" Audio #%d", usX2Y(card)->chip.pcm_devs); + + if ((playback_endpoint && + 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, + SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), + 64*1024, 128*1024))) || + 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, + SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data(GFP_KERNEL), + 64*1024, 128*1024))) { + snd_usX2Y_pcm_private_free(pcm); + return err; + } + usX2Y(card)->chip.pcm_devs++; + + return 0; +} + +/* + * free the chip instance + * + * here we have to do not much, since pcm and controls are already freed + * + */ +static int snd_usX2Y_device_dev_free(snd_device_t *device) +{ + return 0; +} + + +/* + * create a chip instance and set its names. + */ +int usX2Y_audio_create(snd_card_t* card) +{ + int err = 0; + static snd_device_ops_t ops = { + .dev_free = snd_usX2Y_device_dev_free, + }; + + INIT_LIST_HEAD(&usX2Y(card)->chip.pcm_list); + + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, usX2Y(card), &ops)) < 0) { +// snd_usX2Y_audio_free(usX2Y(card)); + return err; + } + + if (0 > (err = usX2Y_audio_stream_new(card, 0xA, 0x8))) + return err; + if (usX2Y(card)->chip.dev->descriptor.idProduct == USB_ID_US428) + if (0 > (err = usX2Y_audio_stream_new(card, 0, 0xA))) + return err; + if (usX2Y(card)->chip.dev->descriptor.idProduct != USB_ID_US122) + err = usX2Y_rate_set(usX2Y(card), 44100); // Lets us428 recognize output-volume settings, disturbs us122. + return err; +} diff -Nru a/sound/usb/usx2y/usx2y.h b/sound/usb/usx2y/usx2y.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/usb/usx2y/usx2y.h 2004-09-06 16:37:56 -07:00 @@ -0,0 +1,49 @@ +/* + * Driver for Tascam US-X2Y USB soundcards + * + * Copyright (c) 2003 by Karsten Wiese + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __SOUND_USX2Y_COMMON_H +#define __SOUND_USX2Y_COMMON_H + + +#define USX2Y_DRIVER_VERSION 0x0100 /* 0.1.0 */ + + +/* hwdep id string */ +#define SND_USX2Y_LOADER_ID "USX2Y Loader" + +/* hardware type */ +enum { + USX2Y_TYPE_122, + USX2Y_TYPE_224, + USX2Y_TYPE_428, + USX2Y_TYPE_NUMS +}; + +#define USB_ID_US122 0x8007 +#define USB_ID_US224 0x8005 +#define USB_ID_US428 0x8001 + +/* chip status */ +enum { + USX2Y_STAT_CHIP_INIT = (1 << 0), /* all operational */ + USX2Y_STAT_CHIP_HUP = (1 << 31), /* all operational */ +}; + +#endif /* __SOUND_USX2Y_COMMON_H */